@charset "UTF-8";

:root {
  --mi-text: #101535;
  --mi-muted: #5a6381;
  --mi-blue: #2244f3;
  --mi-orange: #ff8b2c;
  --mi-green: #19b76b;
  --mi-red: #f05257;
  --mi-line: rgba(255, 255, 255, .58);
  --mi-shadow: 0 24px 70px rgba(21, 43, 118, .18);
}

* { box-sizing: border-box; }
html,
body {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--mi-text);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 139, 44, .18), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(34, 68, 243, .18), transparent 30%),
    linear-gradient(135deg, #f9fbff 0%, #eaf2ff 42%, #f7faff 100%);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(255,255,255,.34) 19%, transparent 31%),
    linear-gradient(36deg, transparent 0 58%, rgba(34,68,243,.08) 59%, transparent 74%);
  opacity: .86;
}

body::after {
  left: 7vw;
  right: 7vw;
  top: 13vh;
  height: 74vh;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 36px;
  background: linear-gradient(130deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.44);
  transform: skewX(-7deg);
}

body.is-app-screen::after {
  opacity: .38;
  left: 12vw;
  right: 12vw;
  top: 18vh;
  height: 64vh;
}

a { color: inherit; text-decoration: none; }
button,
input { font: inherit; }

.match-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 78px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: 14px clamp(14px, 3vw, 34px) 18px;
}

.match-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 64px;
  padding: 0 clamp(14px, 2vw, 22px);
  border: 1px solid var(--mi-line);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,.66), rgba(255,255,255,.26));
  box-shadow: 0 18px 42px rgba(32, 56, 126, .12), inset 0 1px 0 rgba(255,255,255,.58);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
}

.match-logo img {
  width: auto;
  height: 31px;
  display: block;
}

.match-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 28px);
  color: #263055;
  font-size: 14px;
  font-weight: 800;
}

.match-nav a { transition: color .18s ease; }
.match-nav a:hover { color: var(--mi-blue); }

.match-flow {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.flow-screen {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding-top: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity .34s ease, transform .34s ease;
}

.flow-screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.glass-panel,
.glass-card {
  border: 1px solid var(--mi-line);
  background:
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,.30)),
    rgba(238, 245, 255, .22);
  box-shadow: var(--mi-shadow), inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
}

.glass-button,
.swipe-button {
  border: 1px solid rgba(255,255,255,.62);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}

.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: #172459;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.34));
  box-shadow: 0 13px 26px rgba(28, 52, 124, .12), inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
}

.glass-button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--mi-blue), #4265ff);
}

.glass-button.compact {
  min-height: 40px;
  padding-inline: 16px;
}

.glass-button.wide { width: 100%; }
.glass-button:hover,
.swipe-button:hover { transform: translateY(-2px); }
.glass-button:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
}

.tiny-label {
  display: block;
  color: var(--mi-blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.intro-layout,
.app-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
}

.intro-copy h1,
.upload-copy h1,
.app-status h1,
.done-panel h1 {
  margin: 8px 0 12px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .94;
  letter-spacing: 0;
}

.hero-line {
  max-width: 660px;
  margin: 0 0 14px;
  color: #1d2750;
  font-size: clamp(21px, 2.4vw, 32px);
  font-weight: 850;
  line-height: 1.15;
}

.hero-text,
.upload-copy p,
.done-panel p {
  max-width: 640px;
  margin: 0;
  color: var(--mi-muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.preview-card {
  width: min(100%, 460px);
  overflow: hidden;
  border-radius: 34px;
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 0;
}

.compat-pill {
  min-height: 32px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #9b4d0d;
  font-size: 12px;
  font-weight: 950;
  background: rgba(255,139,44,.16);
}

.card-photo {
  position: relative;
  display: grid;
  place-items: center;
  height: 180px;
  margin-top: 14px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16,21,53,.08), rgba(34,68,243,.18)),
    var(--profile-gradient, linear-gradient(135deg, #2447f4, #65a4ff 55%, #ff8b2c));
}

.card-photo::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 28px;
  transform: skewX(-8deg);
}

.card-photo span {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 32px;
  color: #fff;
  font-size: 44px;
  font-weight: 950;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62), 0 18px 42px rgba(0,0,0,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.preview-copy {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.preview-copy h2,
.profile-heading h2,
.drawer-panel h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1;
}

.preview-copy p,
#profileBio {
  margin: 0;
  color: #313b61;
  font-size: 15px;
  line-height: 1.5;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.interest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-row span {
  min-height: 30px;
  padding: 8px 11px;
  border: 1px solid rgba(34,68,243,.14);
  border-radius: 999px;
  color: #2440b8;
  font-size: 12px;
  font-weight: 900;
  background: rgba(34,68,243,.08);
}

.benefit-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(1180px, 100%);
  margin: clamp(18px, 3vh, 34px) auto 0;
}

.benefit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 18px;
  border-radius: 22px;
}

.benefit-card strong {
  color: var(--mi-orange);
  font-size: 24px;
  font-weight: 950;
}

.benefit-card span {
  color: #263055;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.3;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(320px, 470px);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 34px;
}

.upload-copy small {
  display: block;
  max-width: 520px;
  margin-top: 18px;
  color: #263055;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.45;
}

.upload-form {
  display: grid;
  gap: 13px;
}

.field-label {
  display: grid;
  gap: 7px;
  color: #263055;
  font-size: 13px;
  font-weight: 900;
}

.field-label input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(34,68,243,.16);
  border-radius: 15px;
  outline: 0;
  color: var(--mi-text);
  background: rgba(255,255,255,.72);
}

.field-label input:focus {
  border-color: rgba(34,68,243,.55);
  box-shadow: 0 0 0 4px rgba(34,68,243,.08);
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 156px;
  padding: 18px;
  border: 1px dashed rgba(34,68,243,.35);
  border-radius: 24px;
  color: #263055;
  text-align: center;
  background: rgba(255,255,255,.46);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.drop-zone.is-dragging,
.drop-zone.is-ready {
  border-color: var(--mi-green);
  background: rgba(25,183,107,.08);
}

.drop-zone.is-processing {
  border-color: var(--mi-orange);
  background: rgba(255,139,44,.10);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--mi-blue);
  background: rgba(34,68,243,.09);
}

.drop-icon svg,
.swipe-button svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-zone strong {
  font-size: 16px;
  font-weight: 950;
}

.drop-zone span:last-child {
  color: var(--mi-muted);
  font-size: 13px;
  font-weight: 750;
}

.app-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  height: calc(100dvh - 104px);
}

.app-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(760px, 100%);
  margin: 0 auto clamp(8px, 1.8vh, 18px);
  padding: 0 8px;
}

.app-status h1 {
  margin: 5px 0 0;
  font-size: clamp(30px, 4vw, 48px);
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-actions span,
.progress-copy {
  color: #263055;
  font-size: 13px;
  font-weight: 900;
}

.deck-area {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-items: center;
  align-items: start;
  min-height: 0;
}

.deck-area::before {
  content: "";
  position: absolute;
  top: 18px;
  width: min(650px, 78vw);
  height: min(470px, 58vh);
  border-radius: 40px;
  background: radial-gradient(circle at 50% 28%, rgba(255,255,255,.72), rgba(34,68,243,.10) 48%, transparent 72%);
  filter: blur(4px);
  pointer-events: none;
}

.profile-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 500px);
  height: min(520px, calc(100dvh - 310px));
  min-height: 380px;
  overflow: hidden;
  border-radius: 34px;
  touch-action: none;
  user-select: none;
  transform: translate3d(var(--drag-x, 0px), var(--drag-y, 0px), 0) rotate(var(--drag-rotate, 0deg));
  transition: transform .22s ease, box-shadow .22s ease;
  cursor: grab;
  --swipe-progress: 0;
  --swipe-rgb: 25, 183, 107;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(var(--swipe-rgb), calc(var(--swipe-progress) * .42)), rgba(var(--swipe-rgb), calc(var(--swipe-progress) * .12))),
    radial-gradient(circle at var(--swipe-light-x, 70%) 18%, rgba(var(--swipe-rgb), calc(var(--swipe-progress) * .45)), transparent 44%);
  opacity: var(--swipe-progress);
  pointer-events: none;
  transition: opacity .18s ease, background .18s ease;
}

.profile-card.is-dragging {
  cursor: grabbing;
  transition: none;
  box-shadow: 0 32px 84px rgba(21, 43, 118, .24), inset 0 1px 0 rgba(255,255,255,.72);
}

.profile-card.is-resetting {
  --swipe-progress: 0;
}

.profile-card.is-leaving-like { animation: likeOut .38s ease forwards; }
.profile-card.is-leaving-pass { animation: passOut .38s ease forwards; }

.card-status {
  position: absolute;
  top: 34px;
  left: 28px;
  z-index: 4;
  display: none;
  padding: 10px 14px;
  border: 3px solid currentColor;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: rotate(-10deg);
}

.profile-card.is-preview-like .card-status,
.profile-card.is-preview-pass .card-status { display: block; }
.profile-card.is-preview-like .card-status { color: var(--mi-green); }
.profile-card.is-preview-pass .card-status { color: var(--mi-red); }

.profile-card .card-photo {
  height: 24%;
  min-height: 112px;
  margin-top: 0;
}

.profile-card .card-photo,
.profile-card .card-copy {
  position: relative;
  z-index: 1;
}

.card-copy {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  height: 76%;
  padding: clamp(18px, 2.4vw, 28px);
}

.profile-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.profile-heading strong {
  display: block;
  margin-top: 8px;
  color: #263055;
  font-size: 17px;
  line-height: 1.2;
}

.live-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--mi-green);
  box-shadow: 0 0 0 8px rgba(25,183,107,.14);
}

.card-copy .interest-row { margin-top: auto; }

.action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 14px;
}

.swipe-button {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,.70);
  box-shadow: 0 18px 38px rgba(24,48,120,.14), inset 0 1px 0 rgba(255,255,255,.75);
}

.swipe-button.pass { color: var(--mi-red); }
.swipe-button.like { color: var(--mi-green); }

.progress-copy {
  min-height: 20px;
  margin: 10px 0 0;
}

.done-panel {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px);
  border-radius: 34px;
  text-align: center;
}

.done-summary {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.done-summary span,
.radar-item span {
  min-height: 30px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #2440b8;
  font-size: 12px;
  font-weight: 900;
  background: rgba(34,68,243,.08);
}

.done-panel .hero-actions { justify-content: center; }

.match-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 15;
  display: none;
  min-width: min(360px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, var(--mi-blue), var(--mi-green));
  box-shadow: 0 20px 48px rgba(24,48,120,.22);
  transform: translateX(-50%);
}

.match-toast.is-visible {
  display: block;
  animation: toastIn .28s ease both;
}

.radar-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.radar-drawer.is-open { display: block; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 43, .30);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.drawer-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100vw - 36px));
  overflow: hidden;
  border-radius: 28px;
  padding: 26px;
  animation: drawerIn .24s ease both;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 50%;
  color: #263055;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  background: rgba(255,255,255,.58);
  cursor: pointer;
}

.radar-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.radar-item {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 18px;
  background: rgba(255,255,255,.42);
}

.radar-item strong {
  color: #263055;
  font-size: 14px;
}

.radar-item p {
  margin: 0;
  color: var(--mi-muted);
  font-size: 13px;
  line-height: 1.35;
}

@keyframes likeOut {
  to { opacity: 0; transform: translateX(42vw) rotate(16deg); }
}

@keyframes passOut {
  to { opacity: 0; transform: translateX(-42vw) rotate(-16deg); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes drawerIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 900px) {
  .intro-layout,
  .upload-layout {
    grid-template-columns: 1fr;
  }

  .benefit-row {
    grid-template-columns: 1fr;
  }

  .preview-card {
    justify-self: center;
  }

  .upload-layout {
    align-content: center;
  }

  .app-status {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .match-shell {
    grid-template-rows: 62px minmax(0, 1fr);
    padding: 10px 10px 12px;
  }

  .match-topbar {
    height: 54px;
    border-radius: 18px;
  }

  .match-logo img { height: 25px; }
  .match-nav { display: none; }
  .glass-button.compact { min-height: 36px; padding-inline: 12px; font-size: 12px; }

  .flow-screen {
    padding-top: 6px;
  }

  .intro-layout {
    gap: 14px;
    align-content: center;
  }

  .intro-copy h1,
  .upload-copy h1,
  .done-panel h1 {
    font-size: 42px;
  }

  .hero-line {
    font-size: 20px;
  }

  .hero-text,
  .upload-copy p,
  .done-panel p {
    font-size: 14px;
    line-height: 1.45;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .preview-card {
    display: none;
  }

  .benefit-row {
    gap: 8px;
    margin-top: 16px;
  }

  .benefit-card {
    min-height: 62px;
    padding: 12px;
    border-radius: 18px;
  }

  .upload-layout {
    padding: 16px;
    border-radius: 24px;
    gap: 14px;
  }

  .upload-copy small {
    margin-top: 10px;
    font-size: 12px;
  }

  .field-label input {
    min-height: 42px;
  }

  .drop-zone {
    min-height: 118px;
    border-radius: 18px;
  }

  .app-layout {
    height: calc(100dvh - 84px);
    align-items: stretch;
  }

  .app-status {
    width: 100%;
    gap: 8px;
    margin-bottom: 4px;
  }

  .app-status h1 {
    font-size: 28px;
  }

  .status-actions {
    width: 100%;
    justify-content: space-between;
  }

  .profile-card {
    width: 100%;
    height: calc(100dvh - 250px);
    min-height: 392px;
    border-radius: 28px;
  }

  .profile-card .card-photo {
    height: 21%;
    min-height: 92px;
  }

  .card-photo span {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    font-size: 34px;
  }

  .card-copy {
    height: 79%;
    gap: 10px;
    padding: 16px;
  }

  .profile-heading h2 {
    font-size: 26px;
  }

  .profile-heading strong {
    font-size: 14px;
  }

  #profileBio {
    font-size: 13px;
    line-height: 1.42;
  }

  .interest-row span {
    min-height: 26px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .action-row {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 22px;
    z-index: 8;
    gap: 34px;
    pointer-events: none;
  }

  .action-row button {
    pointer-events: auto;
  }

  .swipe-button {
    width: 64px;
    height: 64px;
  }

  .progress-copy {
    margin-top: 8px;
  }

  .done-panel {
    padding: 24px 18px;
    border-radius: 26px;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .match-shell {
    grid-template-rows: 66px minmax(0, 1fr);
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .match-topbar { height: 56px; }
  .intro-copy h1 { font-size: 54px; }
  .hero-line { font-size: 24px; }
  .benefit-card { min-height: 68px; padding: 14px; }
  .upload-layout { padding: 24px; }
  .profile-card {
    height: calc(100dvh - 310px);
    min-height: 360px;
  }
}
