:root {
  --deep:    #0A1A1E;
  --surface: #10262B;
  --card:    #163238;
  --mango:   #FFB627;
  --rosas:   #F26D85;
  --mist:    #CFE3E0;
  --dim:     #7C9A99;
  --line:    rgba(207, 227, 224, 0.14);

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body:    'DM Sans', system-ui, sans-serif;
  --data:    'DM Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100dvh;
  background: var(--deep);
  color: var(--mist);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  max-width: 520px;
  margin: 0 auto;
}

[hidden] { display: none !important; }

/* ── Type ─────────────────────────────────────────── */
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 13vw, 3.6rem);
  letter-spacing: -0.045em;
  margin: 0;
  color: var(--mist);
}
.wordmark--sm { font-size: 1.15rem; letter-spacing: -0.03em; }

.tagline {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--mango);
  margin: 6px 0 0;
}

/* Ages and distances are the whole point of this app, so they get
   the mono face everywhere they appear. */
.data { font-family: var(--data); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── Gate ─────────────────────────────────────────── */
.gate { justify-content: center; gap: 32px; }
.gate__head { text-align: left; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--deep);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.seg__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-family: var(--body);
  font-size: 0.9rem;
  padding: 9px;
  border-radius: 9px;
  cursor: pointer;
}
.seg__btn.is-on { background: var(--card); color: var(--mist); }

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}
.field input, .field select {
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--mist);
  font-family: var(--body);
  font-size: 1rem;
  padding: 12px 13px;
}
.field input[type="date"] { font-family: var(--data); }
.field input:focus-visible, .field select:focus-visible,
button:focus-visible, input[type="range"]:focus-visible {
  outline: 2px solid var(--mango);
  outline-offset: 2px;
}
.hint { display: block; color: var(--dim); font-size: 0.75rem; margin-top: 5px; }

.error {
  color: var(--rosas);
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.btn {
  width: 100%;
  border-radius: 12px;
  padding: 14px;
  font-family: var(--body);
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--solid { background: var(--mango); color: #16120A; font-weight: 500; }
.btn--ghost { background: transparent; color: var(--dim); border-color: var(--line); margin-top: 8px; }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* ── Deck ─────────────────────────────────────────── */
.bar { display: flex; align-items: center; gap: 12px; }
.bar .wordmark--sm { margin-right: auto; }
.bar__btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--dim);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.8rem;
  font-family: var(--body);
  cursor: pointer;
}

/* Signature: distance rings. Outermost ring = your search radius. */
.radar {
  position: relative;
  height: 132px;
  margin: 18px 0 -46px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.radar__ring {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.radar__ring[data-r="1"] { width: 88px;  height: 88px; }
.radar__ring[data-r="2"] { width: 172px; height: 172px; }
.radar__ring[data-r="3"] { width: 256px; height: 256px; border-style: dashed; }
.radar__me {
  width: 7px; height: 7px;
  background: var(--mist);
  border-radius: 50%;
}
.radar__them {
  position: absolute;
  width: 11px; height: 11px;
  background: var(--mango);
  border-radius: 50%;
  transform: translate(0, 0);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 0 5px rgba(255, 182, 39, 0.18);
}

.card-slot { flex: 1; display: flex; align-items: center; }

.card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  animation: settle 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes settle {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.card__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  background: var(--surface);
  display: block;
  margin-bottom: 18px;
}
.card__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.035em;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.card__age { font-family: var(--data); font-size: 1.15rem; color: var(--dim); font-weight: 400; }
.card__distance {
  font-family: var(--data);
  font-size: 0.85rem;
  color: var(--mango);
  margin: 8px 0 0;
}
.card__bio { color: var(--mist); opacity: 0.85; line-height: 1.5; margin: 14px 0 0; font-size: 0.95rem; }

.loading, .empty {
  width: 100%;
  text-align: center;
  color: var(--dim);
  font-family: var(--body);
  line-height: 1.6;
}
.empty b { display: block; color: var(--mist); font-family: var(--display); font-size: 1.3rem; margin-bottom: 8px; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 18px; }
.act {
  border-radius: 14px;
  padding: 17px;
  font-family: var(--body);
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
}
.act--like { background: var(--rosas); border-color: var(--rosas); color: #2A0810; font-weight: 500; }
.act[disabled] { opacity: 0.5; }

/* ── Sheets ───────────────────────────────────────── */
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 14, 0.72);
  display: flex;
  align-items: flex-end;
  z-index: 10;
}
.sheet__body {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  animation: rise 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet__body--center { text-align: center; padding-bottom: 34px; }
@keyframes rise { from { transform: translateY(100%); } to { transform: none; } }

.sheet__title { font-family: var(--display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; margin: 0 0 20px; }

.range { display: block; margin-bottom: 22px; }
.range > span { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--dim); margin-bottom: 10px; }
.range > span b { color: var(--mango); }
.range__pair { display: grid; gap: 8px; }
input[type="range"] { width: 100%; accent-color: var(--mango); }

.match__kicker {
  font-family: var(--data);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mango);
  margin: 0 0 6px;
}
.match__name { font-family: var(--display); font-weight: 800; font-size: 2.2rem; letter-spacing: -0.04em; margin: 0; }
.match__line { color: var(--dim); margin: 8px 0 22px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
