/* ============================================================
   CONNECT - glow up theme
   aurora · grain · glass · frequency
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #08070d;
  --bg-soft: rgba(255, 255, 255, 0.05);
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #f2f0fa;
  --text-dim: #918da8;
  --text-faint: #55516e;
  --accent: #7c5cff;
  --accent-2: #ff5ca8;
  --accent-3: #4dd6ff;
  --ok: #4ade80;
  --danger: #ff4d67;
  --radius: 20px;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --ease-spring: cubic-bezier(0.22, 1.4, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- aurora backdrop ---------- */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; filter: blur(70px) saturate(1.15); opacity: 0.85; }
.bg-aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.bg-aurora i:nth-child(1) {
  width: 65vmax; height: 65vmax; left: -18vmax; top: -22vmax;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.5), transparent 62%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.bg-aurora i:nth-child(2) {
  width: 58vmax; height: 58vmax; right: -20vmax; top: 24vh;
  background: radial-gradient(circle, rgba(255, 92, 168, 0.4), transparent 62%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.bg-aurora i:nth-child(3) {
  width: 50vmax; height: 50vmax; left: 8vw; bottom: -26vmax;
  background: radial-gradient(circle, rgba(77, 214, 255, 0.33), transparent 62%);
  animation: drift3 38s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vw, -14vh) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-8vw, -10vh) scale(1.2); } }

.bg-grain {
  position: fixed; inset: -100px; z-index: -1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-40px,30px); }
  40% { transform: translate(30px,-45px); } 60% { transform: translate(-25px,-25px); }
  80% { transform: translate(35px,40px); }
}

/* ---------- app shell ---------- */
.app {
  max-width: 520px; margin: 0 auto; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom);
  position: relative;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 10px;
}
.topbar[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; appearance: none; background: none; border: none; color: var(--text); font-family: inherit; padding: 0; }
.brand-orb {
  width: 52px; height: 52px; border-radius: 50%; position: relative; overflow: hidden;
  box-shadow: 0 0 32px rgba(124, 92, 255, 0.7), 0 0 80px rgba(255, 92, 168, 0.3);
  animation: floaty 5s ease-in-out infinite alternate;
  background:
    /* contact blip */
    radial-gradient(ellipse 9% 9% at 70% 31%,
      rgba(255,195,228,1) 0 30%, rgba(255,92,168,0.95) 30% 58%,
      rgba(255,92,168,0.2) 58% 100%, transparent),
    /* crosshairs */
    linear-gradient(to right, transparent 49%, rgba(196,181,253,0.26) 49% 51%, transparent 51%),
    linear-gradient(to bottom, transparent 49%, rgba(196,181,253,0.26) 49% 51%, transparent 51%),
    /* range rings + rim */
    radial-gradient(circle closest-side at 50% 50%,
      transparent 0 36%, rgba(180,155,255,0.5) 36% 41%,
      transparent 41% 87%, rgba(180,155,255,0.7) 87% 93%,
      transparent 93%),
    /* scope face */
    radial-gradient(circle closest-side at 50% 50%,
      rgba(124,92,255,0.42) 0%, rgba(76,32,124,0.32) 55%, rgba(10,4,26,0.9) 100%),
    linear-gradient(135deg, #1b0c38, #0a0418);
}
.brand-orb.aura {
  box-shadow:
    inset 0 0 12px rgba(0,0,0,0.45),
    0 0 26px rgba(124, 92, 255, 0.65),
    0 0 60px rgba(255, 92, 168, 0.22);
}
.brand-orb.aura::before {
  inset: -35%;
  background: conic-gradient(from 0deg,
    rgba(255,255,255,0.92) 0deg,
    rgba(214,200,255,0.6) 10deg,
    rgba(150,110,250,0.3) 40deg,
    rgba(124,92,255,0.08) 80deg,
    transparent 110deg);
  animation: spin 2.6s linear infinite;
}
.brand-orb.aura::after {
  opacity: 0.05;
}
.brand-name { font-weight: 700; font-size: 30px; letter-spacing: -0.03em; }
.brand-name::after { content: "."; color: var(--accent-2); }

.online-pill {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  background: var(--card); border: 1px solid var(--card-border);
  padding: 7px 13px; border-radius: 999px; backdrop-filter: blur(12px);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.7s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.icon-btn.sfx { font-size: 14px; }

/* ---------- screens ---------- */
.screen { display: flex; flex-direction: column; flex: 1; padding: 14px 0 22px; animation: screen-in 0.35s var(--ease-spring); }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- hero ---------- */
.hero { text-align: center; margin: 34px 0 8px; perspective: 400px; }
.hero.compact { margin: 16px 0 20px; }
.hero h1 {
  font-size: clamp(28px, 8.5vw, 46px); font-weight: 700; line-height: 1.08;
  letter-spacing: -0.04em;
}
.k-char {
  display: inline-block; white-space: pre;
  animation: k-in 0.6s var(--ease-spring) both;
  animation-delay: calc(var(--i) * 0.032s);
}
@keyframes k-in {
  from { opacity: 0; transform: translateY(0.55em) rotate(4deg); filter: blur(6px); }
}
.hero em {
  font-style: normal;
}
.hero em .k-char {
  background: linear-gradient(92deg, var(--accent-3), var(--accent) 45%, var(--accent-2));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: k-in 0.6s var(--ease-spring) both, shimmer 5.5s linear infinite;
  animation-delay: calc(var(--i) * 0.032s), 0s;
}
@keyframes shimmer { to { background-position: 220% 0; } }

.tagline { color: var(--text-dim); margin-top: 12px; font-size: 15px; font-weight: 500; }

/* ---------- vibe marquee ---------- */
.marquee {
  overflow: hidden; margin: 18px -20px 26px; padding: 8px 0;
  border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex; gap: 0; white-space: nowrap;
  animation: marquee 26s linear infinite;
  font-size: 13px; font-weight: 500; color: var(--text-faint);
}
.marquee-track b { color: var(--text-dim); font-weight: 500; }
.marquee-track span { padding: 0 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- glass card ---------- */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,0.065), rgba(255,255,255,0.028));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.identity-card { padding: 20px; margin-bottom: 20px; }
.aura-row { display: flex; gap: 20px; align-items: center; }

/* ---------- aura orbs ---------- */
.aura {
  border-radius: 50%; position: relative; overflow: hidden; flex-shrink: 0;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.3), 0 8px 30px rgba(124, 92, 255, 0.22);
}
.aura::before {
  content: ""; position: absolute; inset: -30%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.09), transparent 32%);
  animation: spin 7s linear infinite;
}
.aura::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.07; /* no mix-blend-mode: WebKit paints blend-layer bounds as a square when the parent has a filter */
}
@keyframes spin { to { transform: rotate(360deg); } }
.orb-lg { width: 86px; height: 86px; animation: floaty 8s ease-in-out infinite alternate; }
.orb-xl { width: 132px; height: 132px; animation: floaty 6s ease-in-out infinite alternate; }
.orb-sm { width: 40px; height: 40px; }
.orb-sm::before { animation-duration: 11s; }
/* pure motion - a hue-rotate here would shift each person's signature colour,
   and that colour is half of how you recognise them */
@keyframes floaty {
  from { transform: translateY(-2px) scale(1); }
  to   { transform: translateY(3px) scale(1.045); }
}

.identity-fields { flex: 1; min-width: 0; }
.field-label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-dim); margin-bottom: 7px; font-weight: 500;
}
.handle-row {
  display: flex; align-items: center; gap: 2px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--card-border);
  border-radius: 13px; padding: 11px 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.handle-row input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-weight: 600;
}
.handle-row input::placeholder { color: var(--text-faint); font-weight: 400; }
.handle-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16); }
.handle-at { color: var(--accent); font-weight: 700; }
#handle-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; font-weight: 600; font-family: inherit;
}
#handle-input::placeholder { color: var(--text-faint); font-weight: 400; }
.handle-hint { font-size: 12px; color: var(--text-dim); margin: 7px 2px 9px; min-height: 15px; transition: color 0.2s; }
.handle-hint.ok { color: var(--ok); animation: hint-pop 0.3s var(--ease-spring); }
.handle-hint.err { color: var(--danger); animation: shake 0.32s; }
@keyframes hint-pop { from { transform: scale(0.94); opacity: 0; } }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ---------- gender options ---------- */
.gender-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.gender-option {
  appearance: none; cursor: pointer; text-align: center;
  background: linear-gradient(160deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius); padding: 19px 10px 15px; color: var(--text);
  font-family: inherit;
  transition: border-color 0.16s, transform 0.16s var(--ease-spring), box-shadow 0.16s;
}
.gender-option:active { transform: scale(0.96); }
.gender-option.selected {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 0 34px rgba(124, 92, 255, 0.3), inset 0 0 22px rgba(124, 92, 255, 0.09);
  animation: sel-pop 0.3s var(--ease-spring);
}
@keyframes sel-pop { 45% { transform: scale(1.04); } }
.g-icon { display: block; font-size: 26px; margin-bottom: 7px; transition: transform 0.2s var(--ease-spring); }
.gender-option.selected .g-icon { transform: scale(1.18); }
.g-label { display: block; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.g-sub { display: block; font-size: 12px; color: var(--text-dim); margin-top: 3px; transition: color 0.15s; }
.gender-option.selected .g-sub { color: rgba(255, 255, 255, 0.85); }
.gender-option.selected .g-label { color: #fff; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  border-radius: 15px; font-weight: 700; color: var(--text);
  font-family: inherit; letter-spacing: -0.01em;
  transition: transform 0.14s var(--ease-spring), opacity 0.15s, box-shadow 0.2s, filter 0.15s;
  position: relative; overflow: hidden;
  isolation: isolate;
}
.btn:active { transform: scale(0.96); }
.btn.primary {
  background:
    linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent) no-repeat,
    linear-gradient(92deg, var(--accent), var(--accent-2));
  background-size: 45% 100%, 100% 100%;
  background-position: -70% 0, 0 0;
  animation: sheen-bg 3.2s ease-in-out infinite;
  box-shadow: 0 10px 34px rgba(124, 92, 255, 0.4);
  padding: 16px 26px; font-size: 16.5px;
}
@keyframes sheen-bg {
  0%, 55% { background-position: -70% 0, 0 0; }
  75%, 100% { background-position: 130% 0, 0 0; }
}
.btn.primary:disabled { opacity: 0.32; box-shadow: none; cursor: not-allowed; animation: none; }
.btn.ghost {
  background: var(--card); border-color: var(--card-border);
  padding: 12px 19px; font-size: 14px; color: var(--text-dim); backdrop-filter: blur(12px);
}
.btn.sm { padding: 8px 13px; font-size: 13px; }
.btn.lg { width: 100%; }
.btn.danger-solid { background: var(--danger); padding: 12px 19px; font-size: 14px; }
.btn-arrow { display: inline-block; transition: transform 0.18s var(--ease-spring); }
.btn.primary:not(:disabled):hover .btn-arrow { transform: translateX(5px); }

.home-foot { text-align: center; color: var(--text-faint); font-size: 12px; margin-top: auto; padding-top: 24px; }

/* ---------- safety controls ---------- */
/* ---------- safety controls ---------- */
/* ---------- daily prompt ---------- */
.prompt-card { padding: 20px; margin: 24px 0 20px; }
.prompt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.prompt-kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent-3); font-weight: 600; margin-right: auto;
}
.streak-chip { color: var(--accent-2); }
.streak-chip b { font-weight: 700; color: var(--text); }
.prompt-text {
  font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3;
  margin-bottom: 14px;
}
#prompt-answer-view .handle-row { padding: 6px 6px 6px 14px; }
#prompt-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 14.5px; font-family: inherit;
}
#prompt-input::placeholder { color: var(--text-faint); }
.prompt-mine {
  font-size: 15px; line-height: 1.5;
  background: rgba(124,92,255,0.12); border: 1px solid rgba(124,92,255,0.3);
  border-radius: 13px; padding: 11px 14px; margin-bottom: 10px;
}

.answers-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; text-align: left; }
.answer-row {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 15px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.answer-body { flex: 1; min-width: 0; }
.answer-text { font-size: 14px; line-height: 1.4; }
.answer-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.fire-btn {
  appearance: none; cursor: pointer; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-soft); border: 1px solid var(--card-border);
  font-size: 17px; transition: transform 0.14s var(--ease-spring), box-shadow 0.2s;
}
.fire-btn:not(:disabled):hover { transform: scale(1.15); box-shadow: 0 0 16px rgba(255,92,168,0.45); }
.fire-btn:disabled { opacity: 0.35; cursor: default; }
.feed-empty { text-align: center; color: var(--text-dim); font-size: 13.5px; padding: 22px 0; }

/* event + utility buttons */
.event-btn {
  margin-top: 12px; border-color: rgba(255,92,168,0.4); color: var(--accent-2);
  font-weight: 600;
}
.event-btn:hover { border-color: var(--accent-2); }
.share-panel h3 { text-align: center; }

.safety-card { padding: 20px; margin-top: 16px; }
.toggle-row {
  appearance: none; width: 100%; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: none; border: none; padding: 10px 2px;
  color: var(--text); font-family: inherit; text-align: left;
}
.toggle-row + .toggle-row { border-top: 1px solid var(--card-border); }
.toggle-text { display: flex; flex-direction: column; gap: 2px; }
.toggle-text b { font-size: 14.5px; font-weight: 600; }
.toggle-text small { font-size: 12px; color: var(--text-dim); }
.switch {
  flex-shrink: 0; width: 44px; height: 25px; border-radius: 999px;
  background: rgba(0,0,0,0.4); border: 1px solid var(--card-border);
  position: relative; transition: background 0.2s, border-color 0.2s;
}
.switch i {
  position: absolute; top: 2.5px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.22s var(--ease-spring), background 0.2s;
}
.toggle-row.on .switch { background: rgba(124,92,255,0.45); border-color: var(--accent); }
.toggle-row.on .switch i { transform: translateX(19px); background: #fff; box-shadow: 0 0 10px rgba(124,92,255,0.8); }

/* ---------- home lists ---------- */
.list-section { margin-bottom: 24px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-dim); margin-bottom: 10px; font-weight: 500;
}
.count-chip {
  background: var(--card); border: 1px solid var(--card-border);
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; font-size: 11px; color: var(--text);
}
.count-chip[hidden] { display: none; }
.count-chip.hot { border-color: rgba(255, 92, 168, 0.55); animation: pulse 1.5s infinite; }
.section-sub { font-size: 12.5px; color: var(--text-faint); margin: 0 2px 10px; }

.people-list { display: flex; flex-direction: column; gap: 8px; }
.person-row {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 11px 15px 11px 11px;
  color: var(--text); font-family: inherit; cursor: pointer;
  backdrop-filter: blur(12px);
  transition: transform 0.14s var(--ease-spring), border-color 0.16s, box-shadow 0.2s;
  appearance: none;
  animation: row-in 0.4s var(--ease-spring) both;
  animation-delay: calc(var(--i, 0) * 0.05s);
}
@keyframes row-in { from { opacity: 0; transform: translateY(10px); } }
.person-row:active { transform: scale(0.975); }
.person-row:not(.static):hover { border-color: rgba(124, 92, 255, 0.5); box-shadow: 0 6px 24px rgba(124, 92, 255, 0.14); }
.person-row.static { cursor: default; }
.person-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.person-handle { font-weight: 700; font-size: 14.5px; }
.person-sub {
  font-size: 12.5px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.when { font-size: 11.5px; color: var(--text-faint); }
.unread-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.8);
  animation: pulse 1.6s infinite;
}

.chip {
  font-size: 11.5px; padding: 4.5px 11px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--card-border); color: var(--text-dim);
}
.chip.hot { color: var(--accent-2); border-color: rgba(255, 92, 168, 0.5); animation: pulse 1.5s infinite; }
.chip.ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.4); }
.chip.dim { opacity: 0.5; }

/* ---------- waiting screen ---------- */
#screen-waiting { align-items: center; justify-content: center; gap: 28px; text-align: center; }
.wait-stage { position: relative; width: 230px; height: 230px; display: grid; place-items: center; cursor: pointer; }
.radar { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(124, 92, 255, 0.22); overflow: hidden; }
.radar::before {
  content: ""; position: absolute; inset: 18%;
  border-radius: 50%; border: 1px solid rgba(124, 92, 255, 0.16);
}
.radar::after {
  content: ""; position: absolute; inset: 0;
  background: conic-gradient(from 0deg, rgba(124, 92, 255, 0.28), rgba(124, 92, 255, 0.08) 55deg, transparent 100deg);
  animation: sweep 2.8s linear infinite;
  border-radius: 50%;
  transform-origin: 50% 50%;
  will-change: transform;
}
.rings { position: absolute; inset: 0; pointer-events: none; }
@keyframes sweep { to { transform: rotate(360deg); } }
.rings i {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(124, 92, 255, 0.5);
  animation: ripple 2.4s ease-out infinite;
}
.rings i:nth-child(2) { animation-delay: 0.8s; }
.rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ripple {
  from { transform: scale(0.42); opacity: 0.9; }
  to { transform: scale(1.18); opacity: 0; }
}
.ping {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-3); pointer-events: none;
  animation: ping-out 1s ease-out forwards;
  box-shadow: 0 0 16px var(--accent-3);
}
@keyframes ping-out {
  from { transform: scale(0.4); opacity: 1; }
  to { transform: scale(3.4); opacity: 0; }
}

#wait-line { font-size: 17.5px; font-weight: 600; letter-spacing: -0.02em; min-height: 22px; animation: wait-fade 0.5s both; }
@keyframes wait-fade { from { opacity: 0; transform: translateY(5px); } }
.wait-stats { color: var(--text-dim); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.wait-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.sep { opacity: 0.4; }

/* ---------- chat ---------- */
.chat-screen { padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }
.chat-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 2px 14px; border-bottom: 1px solid var(--card-border);
}
.partner-chip { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.partner-meta { display: flex; flex-direction: column; min-width: 0; }
.partner-handle { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typing-note { display: none; color: var(--text-dim); font-size: 12px; height: 12px; gap: 3px; align-items: center; }
.typing-note.on { display: inline-flex; }
.typing-note i {
  width: 4.5px; height: 4.5px; border-radius: 50%; background: var(--accent-2);
  animation: bounce 0.9s infinite;
}
.typing-note i:nth-child(2) { animation-delay: 0.14s; }
.typing-note i:nth-child(3) { animation-delay: 0.28s; }
@keyframes bounce { 35% { transform: translateY(-4px); } }

.chat-actions { display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn {
  appearance: none; cursor: pointer; color: var(--text-dim);
  background: var(--card); border: 1px solid var(--card-border);
  width: 37px; height: 37px; border-radius: 12px; font-size: 15px;
  transition: color 0.15s, border-color 0.15s, transform 0.14s var(--ease-spring);
  font-family: inherit;
}
.icon-btn:hover { color: var(--text); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn.back { flex-shrink: 0; }
.icon-btn.danger:hover { color: var(--danger); border-color: rgba(255, 77, 103, 0.45); }

.messages {
  flex: 1; overflow-y: auto; padding: 16px 4px;
  display: flex; flex-direction: column; gap: 9px;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.messages > :first-child { margin-top: auto; } /* recent at the bottom, history grows upward */
.messages::-webkit-scrollbar { display: none; }
.message {
  max-width: 79%; padding: 11px 15px; border-radius: 17px;
  line-height: 1.48; font-size: 15px; word-wrap: break-word;
  animation: pop-in 0.24s var(--ease-spring);
  position: relative;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.message.mine {
  align-self: flex-end;
  background: linear-gradient(125deg, var(--accent), #6442f0);
  border-bottom-right-radius: 6px;
  box-shadow: 0 5px 20px rgba(124, 92, 255, 0.3);
  transform-origin: bottom right;
}
.message.theirs {
  align-self: flex-start;
  background: var(--bg-soft); border: 1px solid var(--card-border);
  border-bottom-left-radius: 6px;
  backdrop-filter: blur(10px);
  transform-origin: bottom left;
}
.message.mine.pop { animation: pop-mine 0.28s var(--ease-spring); }
.message.theirs.pop { animation: pop-theirs 0.28s var(--ease-spring); }
@keyframes pop-mine { from { transform: translateY(8px) rotate(1.1deg) scale(0.95); } }
@keyframes pop-theirs { from { transform: translateY(8px) rotate(-1.1deg) scale(0.95); } }
.message.system {
  align-self: center; max-width: 94%;
  background: none; color: var(--text-dim); font-size: 12.5px; text-align: center; padding: 4px;
  animation: fade-in 0.6s;
}
@keyframes fade-in { from { opacity: 0; } }
.message .time { display: block; font-size: 10px; opacity: 0.55; margin-top: 4px; text-align: right; }
.message.mine .time::before { content: "✓"; margin-right: 3px; opacity: 0.7; }
.message.mine .time.read::before { content: "✓✓"; color: var(--accent-3); opacity: 1; }

/* reaction chips */
.rx-row { display: flex; gap: 5px; margin-top: -4px; align-self: flex-start; }
.rx-row.on-mine { align-self: flex-end; }
.rx-chip {
  font-size: 12.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--card-border);
  animation: pop-in 0.22s var(--ease-spring);
}

/* floating reaction bar */
.reaction-bar {
  position: fixed; z-index: 70;
  display: flex; gap: 4px; padding: 6px;
  background: linear-gradient(165deg, rgba(30,27,48,0.97), rgba(16,14,27,0.98));
  border: 1px solid var(--card-border); border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.55);
  animation: rise 0.16s var(--ease-spring);
}
.reaction-bar[hidden] { display: none; }
.reaction-bar button {
  appearance: none; background: none; border: none; cursor: pointer;
  font-size: 21px; width: 40px; height: 40px; border-radius: 50%;
  transition: transform 0.13s var(--ease-spring), background 0.14s;
}
.reaction-bar button:hover { background: var(--card); transform: scale(1.22); }

/* ---------- icebreaker sheet ---------- */
.sheet { align-items: flex-end; }
.sheet .sheet-panel {
  width: 100%; max-width: 520px;
  background: linear-gradient(165deg, rgba(30, 27, 48, 0.96), rgba(16, 14, 27, 0.98));
  border: 1px solid var(--card-border); border-bottom: none;
  border-radius: 26px 26px 0 0; padding: 18px 24px calc(env(safe-area-inset-bottom) + 26px);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  animation: slide-up 0.28s var(--ease-spring);
  text-align: center;
}
@keyframes slide-up { from { transform: translateY(60%); opacity: 0.4; } }
.sheet-grip {
  width: 42px; height: 4.5px; border-radius: 999px;
  background: var(--card-border); margin: 0 auto 16px;
}
.card-stack { position: relative; height: 190px; margin: 14px 0 18px; }
.ib-card {
  position: absolute; left: 8%; right: 8%; top: 12px;
  height: 158px; border-radius: 20px; cursor: pointer;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,92,168,0.25), transparent 45%),
    radial-gradient(circle at 12% 85%, rgba(124,92,255,0.28), transparent 48%),
    linear-gradient(165deg, rgba(46,42,74,0.95), rgba(24,21,40,0.97));
  border: 1px solid rgba(255,255,255,0.14);
  display: grid; place-items: center; padding: 20px 26px;
  font-size: 17.5px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
  transition: transform 0.25s var(--ease-spring);
}
.ib-card:nth-child(1) { z-index: 3; transform: rotate(-2.4deg); }
.ib-card:nth-child(2) { z-index: 2; transform: rotate(1.6deg) translateY(9px) scale(0.96); opacity: 0.75; filter: brightness(0.8); }
.ib-card:nth-child(3) { z-index: 1; transform: rotate(-0.8deg) translateY(18px) scale(0.92); opacity: 0.45; filter: brightness(0.65); }
.ib-card:hover { transform: rotate(0deg) scale(1.02); }

/* icebreaker nudge */
.icebreaker-nudge { display: flex; justify-content: center; padding: 0 0 8px; }
.nudge-chip {
  appearance: none; cursor: pointer; font-family: inherit;
  background: linear-gradient(92deg, rgba(124,92,255,0.22), rgba(255,92,168,0.22));
  border: 1px solid rgba(124,92,255,0.45); color: var(--text);
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(10px);
  animation: rise 0.3s var(--ease-spring);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.composer { display: flex; gap: 8px; align-items: center; padding: 8px 0 0; }
#msg-input {
  flex: 1; min-width: 0;
  background: var(--bg-soft); border: 1px solid var(--card-border);
  border-radius: 999px; padding: 14px 19px;
  color: var(--text); font-size: 15px; outline: none; font-family: inherit;
  transition: border-color 0.16s, box-shadow 0.16s;
  backdrop-filter: blur(10px);
}
#msg-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.14); }
.composer-btn, .mic-btn {
  appearance: none; cursor: pointer; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text-dim); font-size: 17px;
  display: grid; place-items: center;
  transition: transform 0.14s var(--ease-spring), border-color 0.16s, color 0.16s, background 0.2s;
  font-family: inherit; position: relative;
}
.composer-btn:hover, .mic-btn:hover { color: var(--text); border-color: rgba(124, 92, 255, 0.5); }
.composer-btn:active { transform: scale(0.88); }
.mic-btn { color: var(--accent-2); }
.mic-btn.recording {
  background: linear-gradient(135deg, var(--accent-2), #ff2d55);
  color: #fff; border-color: transparent;
  animation: rec-pulse 1.1s infinite;
  cursor: grab;
}
@keyframes rec-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255, 77, 103, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(255, 77, 103, 0); }
}
.rec-timer {
  display: none;
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mic-btn.recording .rec-timer { display: block; }
.rec-hint { text-align: center; font-size: 12px; color: var(--accent-2); margin-top: 7px; min-height: 15px; }

.game-bar { display: flex; justify-content: center; margin-top: 9px; }
.game-bar .linklike { font-size: 12.5px; }

/* ---------- voice notes ---------- */
.voice-note {
  display: flex; align-items: center; gap: 11px; min-width: 210px;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.vn-play {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: none; background: rgba(255,255,255,0.18); color: #fff;
  display: grid; place-items: center; font-size: 13px;
  transition: transform 0.13s var(--ease-spring);
}
.voice-note.playing .vn-play { background: rgba(255,255,255,0.32); }
.vn-wave { display: flex; align-items: center; gap: 2.5px; flex: 1; height: 30px; }
.vn-wave i {
  width: 3px; border-radius: 2px; background: currentColor; opacity: 0.45;
  height: calc(var(--h) * 1%);
}
.voice-note.playing .vn-wave i {
  animation: wave-dance 0.7s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 0.06s);
}
@keyframes wave-dance { to { opacity: 1; transform: scaleY(calc(1.9 - var(--h) / 100)); } }
.vn-meta { display: flex; flex-direction: column; font-size: 11px; opacity: 0.8; min-width: 36px; text-align: right; }
.vn-pitch { font-size: 14px; }

/* ---------- would you rather ---------- */
.wyr-bubble.wyr { max-width: 88%; }
.wyr-q {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--accent-3); font-weight: 600; margin-bottom: 10px;
}
.wyr-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wyr-opt {
  appearance: none; cursor: pointer; font-family: inherit;
  border: 1.5px solid var(--card-border); border-radius: 13px;
  background: rgba(0,0,0,0.25); color: var(--text);
  padding: 12px 10px; font-size: 13.5px; line-height: 1.3;
  position: relative; overflow: hidden; text-align: left;
  transition: border-color 0.16s, transform 0.14s var(--ease-spring);
}
.wyr-opt:not(:disabled):hover { border-color: var(--accent); }
.wyr-opt:not(:disabled):active { transform: scale(0.96); }
.wyr-opt:disabled { cursor: default; }
.wyr-opt .pct-fill {
  position: absolute; inset: 0; width: var(--w, 0%); z-index: 0;
  background: rgba(124, 92, 255, 0.24);
  transition: width 0.6s var(--ease-spring);
}
.wyr-opt.win .pct-fill { background: rgba(74, 222, 128, 0.22); }
.wyr-opt span { position: relative; z-index: 1; display: block; }
.wyr-opt .pct-label {
  position: relative; z-index: 1; display: block;
  font-size: 11px; opacity: 0.75; margin-top: 5px; min-height: 13px;
}
.wyr-done { font-size: 11.5px; color: var(--text-dim); margin-top: 9px; text-align: center; }
.game-bar .linklike[disabled] { opacity: 0.4; cursor: not-allowed; }
.send-btn {
  appearance: none; cursor: pointer; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.42);
  transition: transform 0.14s var(--ease-spring), opacity 0.15s, box-shadow 0.2s;
}
.send-btn:hover { box-shadow: 0 8px 32px rgba(255, 92, 168, 0.5); }
.send-btn:active { transform: scale(0.88); }
.send-btn:disabled { opacity: 0.35; }
.find-new-btn { margin-top: 10px; }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 3, 9, 0.68); backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 24px;
  animation: fade-in 0.2s;
}
.modal[hidden] { display: none; }
.modal-panel {
  width: 100%; max-width: 365px;
  background: linear-gradient(165deg, rgba(30, 27, 48, 0.92), rgba(16, 14, 27, 0.94));
  border: 1px solid var(--card-border);
  border-radius: 22px; padding: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: rise 0.28s var(--ease-spring);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.modal-panel h3 { font-size: 17.5px; margin-bottom: 16px; letter-spacing: -0.02em; }
.modal-sub { color: var(--text-dim); font-size: 14px; margin: -8px 0 16px; line-height: 1.5; }
.radio-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.radio-group label {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 11px; font-size: 14px; cursor: pointer;
  transition: background 0.14s;
}
.radio-group label:hover { background: var(--card); }
.radio-group input { accent-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.linklike {
  appearance: none; background: none; border: none; cursor: pointer;
  color: var(--text-faint); font-size: 13px; text-decoration: underline; font-family: inherit;
}

/* ---------- spark prompt ---------- */
.spark-modal .modal-panel { text-align: center; max-width: 340px; }
.spark-kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-dim); margin-bottom: 18px; font-weight: 500;
}
.spark-panel .orb-xl { margin: 0 auto 16px; animation: floaty 4s ease-in-out infinite alternate; }
.spark-handle { font-size: 23px; letter-spacing: -0.03em; margin-bottom: 7px; }
.spark-panel .modal-sub { margin: 0 auto 22px; max-width: 250px; }
.spark-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-bottom: 14px; }
.big-ghost { padding: 15px; font-size: 15px; }
.spark-yes { font-size: 16.5px; }
.spark-yes { animation-duration: 2.2s; }

/* ---------- connect moment & celebration overlays ---------- */
.moment {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  display: grid; place-items: center; visibility: hidden;
}
.moment-frame { position: absolute; inset: 0; }
.moment.active { visibility: visible; pointer-events: all; }
.moment-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(20, 16, 40, 0.9), rgba(5, 4, 11, 0.97));
  opacity: 0; transition: opacity 0.25s;
}
.moment.active .moment-bg { opacity: 1; }

.co-orb {
  position: absolute; top: calc(50% - 66px);
  width: 84px; height: 84px; border-radius: 50%;
  box-shadow: 0 0 60px rgba(124, 92, 255, 0.65);
}
.moment.active .co-orb.l { left: 8%; animation: fly-r 0.9s cubic-bezier(0.5, 0, 0.7, 0.4) forwards; }
.moment.active .co-orb.r { right: 8%; animation: fly-l 0.9s cubic-bezier(0.5, 0, 0.7, 0.4) forwards; }
@keyframes fly-r { to { left: calc(50% - 42px); transform: scale(0.72); } }
@keyframes fly-l { to { right: calc(50% - 42px); transform: scale(0.72); } }

.co-flash {
  position: absolute; top: calc(50% - 90px); left: calc(50% - 90px);
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(124,92,255,0.5) 40%, transparent 70%);
  opacity: 0; transform: scale(0.2);
}
.co-flash.go { animation: flash 0.85s ease-out forwards; }
@keyframes flash {
  12% { opacity: 1; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(2.6); }
}

.co-shockwave {
  position: absolute; top: calc(50% - 60px); left: calc(50% - 60px);
  width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8); opacity: 0;
}
.co-shockwave.go { animation: shock 0.9s ease-out 0.12s forwards; }
@keyframes shock {
  from { opacity: 0.9; transform: scale(0.4); }
  to { opacity: 0; transform: scale(4.2); }
}

.co-label {
  position: absolute; left: 0; right: 0; bottom: 21vh; text-align: center;
  font-size: 24px; font-weight: 700; letter-spacing: -0.03em;
  opacity: 0;
}
.co-label.go { animation: label-in 0.55s var(--ease-spring) 0.75s forwards; }
@keyframes label-in { from { opacity: 0; transform: translateY(16px) scale(0.92); } to { opacity: 1; transform: none; } }
.co-label small { display: block; font-size: 13.5px; font-weight: 500; color: var(--text-dim); margin-top: 7px; }

.cele-sparks { position: absolute; top: calc(50% - 110px); left: 50%; }
.cele-sparks i {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2); opacity: 0;
}
.moment.active .cele-sparks i { animation: burst 1s ease-out forwards; animation-delay: 0.15s; }
.cele-sparks i:nth-child(odd) { background: var(--accent); }
.cele-sparks i:nth-child(3n) { background: var(--accent-3); }
@keyframes burst {
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.4); }
}

.cele-word {
  position: absolute; left: 0; right: 0; bottom: 20vh; text-align: center;
  font-size: clamp(30px, 9vw, 42px); font-weight: 700; letter-spacing: -0.04em;
  background: linear-gradient(92deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0;
}
.cele-word.go { animation: label-in 0.5s var(--ease-spring) 0.2s forwards; }
.cele-sub {
  position: absolute; left: 0; right: 0; bottom: 15.5vh; text-align: center;
  font-size: 14px; color: var(--text-dim); opacity: 0;
}
.cele-sub.go { animation: label-in 0.5s var(--ease-spring) 0.42s forwards; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 28px);
  transform: translateX(-50%);
  background: linear-gradient(165deg, rgba(30, 27, 48, 0.96), rgba(16, 14, 27, 0.97));
  border: 1px solid var(--card-border);
  padding: 12px 21px; border-radius: 999px; font-size: 14px; z-index: 90;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  animation: toast-in 0.3s var(--ease-spring);
  max-width: 86vw; text-align: center;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.95); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

@media (min-width: 521px) {
  .app { border-left: 1px solid var(--card-border); border-right: 1px solid var(--card-border); }
}

/* ============================================================
   MULTI-PAGE SHELL · responsive nav
   ============================================================ */

.shell { display: flex; min-height: 100dvh; }

/* ---------- desktop people pane (two-pane shell) ---------- */
:root { --ppane-w: 340px; }
.ppane {
  display: none;
  position: sticky; top: 0; height: 100dvh; width: var(--ppane-w); flex-shrink: 0;
  flex-direction: column;
  padding: 22px 14px calc(env(safe-area-inset-bottom) + 16px);
  border-right: 1px solid var(--card-border);
  background: rgba(10, 9, 17, 0.55);
  backdrop-filter: blur(18px);
  z-index: 40;
}
.pp-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; }
.pp-identity {
  appearance: none; cursor: pointer; width: 100%; text-align: left;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--card-border); border-radius: 16px;
  padding: 12px 14px; color: var(--text); font-family: inherit; margin-bottom: 14px;
  transition: border-color 0.15s;
}
.pp-identity:hover { border-color: rgba(124,92,255,0.5); }
.pp-id-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-handle { font-weight: 700; font-size: 15px; }
.pp-streak { font-size: 12px; color: var(--text-dim); }
.pp-streak b { color: var(--text); }
.pp-nav { display: flex; gap: 8px; margin-bottom: 16px; }
.pp-nav-item {
  appearance: none; cursor: pointer; flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 8px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text-dim); font-family: inherit; font-size: 14px; font-weight: 600;
  transition: all 0.15s;
}
.pp-nav-item:hover { color: var(--text); border-color: rgba(124,92,255,0.4); }
.pp-nav-item.active {
  background: linear-gradient(92deg, rgba(124,92,255,0.2), rgba(255,92,168,0.14));
  border-color: rgba(124,92,255,0.45); color: var(--text);
}
.pp-people-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-dim);
}
.pp-filters { display: flex; gap: 5px; }
.pp-chip {
  appearance: none; cursor: pointer; font-family: inherit;
  background: none; border: 1px solid var(--card-border); border-radius: 999px;
  color: var(--text-dim); font-size: 11px; padding: 4px 10px;
  transition: all 0.14s;
}
.pp-chip.on { background: rgba(124,92,255,0.22); border-color: var(--accent); color: var(--text); }
.pp-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding-right: 2px; scrollbar-width: none; }
.pp-list::-webkit-scrollbar { display: none; }
.pp-list .person-row { animation: none; }
.pp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; }

/* ---------- main column ---------- */
.main-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100dvh;
}
.topbar { display: flex; }

.page-area {
  flex: 1; width: 100%;
  padding: 0 20px calc(84px + env(safe-area-inset-bottom));
}

/* ---------- routed pages ---------- */
.page { display: none; }
.page.active {
  display: flex; flex-direction: column;
  animation: screen-in 0.32s var(--ease-spring);
  width: 100%;
}
.page-narrow { max-width: 620px; margin: 0 auto; }
#page-chats.active, #page-profile.active, #page-discover.active { max-width: 620px; margin: 0 auto; }
#page-discover.active { padding-top: 8px; }

.page-title {
  font-size: 26px; font-weight: 700; letter-spacing: -0.03em;
  margin: 8px 0 20px;
}
.empty-note {
  color: var(--text-faint); font-size: 13.5px; text-align: center;
  padding: 26px 12px;
}

/* ---------- legal pages ---------- */
.legal-page.active { max-width: 640px; margin: 0 auto; padding-bottom: 40px; }
.legal-updated { color: var(--text-faint); font-size: 12.5px; margin: -8px 0 20px; }
.legal-page h3 { font-size: 16px; margin: 22px 0 8px; color: var(--text); letter-spacing: -0.01em; }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.65; color: var(--text-dim); margin-bottom: 10px; }
.legal-page b { color: var(--text); }
.legal-page ul { padding-left: 20px; margin-bottom: 10px; }
.legal-page li { margin-bottom: 6px; list-style: disc; }
.foot-links { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 12px; color: var(--text-faint); flex-wrap: wrap; }
.foot-links .linklike { font-size: 12px; margin: 0; }
.foot-privacy { margin-bottom: 8px; }

/* ---------- searching + chat = immersive takeover pages ---------- */
.page-searching.active,
.chat-screen.active {
  position: fixed; inset: 0; z-index: 45; /* above rail (40) so the rail never intercepts chat clicks */
  background: rgba(8, 7, 13, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}
.page-searching.active {
  align-items: center; justify-content: center; gap: 20px; text-align: center;
  padding: 20px; overflow: hidden;
}
@media (max-width: 400px) {
  .page-searching.active .wait-stage { width: 190px; height: 190px; }
  .page-searching.active .orb-xl { width: 100px; height: 100px; }
  .page-searching.active { gap: 16px; }
}
.chat-screen.active {
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 14px);
}

@media (min-width: 900px) {
  /* moments center over the main stage, not the whole screen */
  .moment-frame { left: var(--ppane-w); }
  .ppane { display: flex; }
  .tabbar { display: none !important; }
  .topbar { display: none; }
  .page-area { padding: 0 34px 44px; }
  .page-discover.active, .page-chats.active, .page-matches.active, .page-profile.active { max-width: 640px; }
  /* chat fills the main stage beside the people pane */
  .chat-screen.active {
    left: var(--ppane-w);
    right: 0;
    width: auto; /* .page.active's width:100% must not push it off-screen */
    padding: calc(env(safe-area-inset-top) + 18px) clamp(20px, 5vw, 70px)
             calc(env(safe-area-inset-bottom) + 16px);
  }

  /* searching fills the main stage beside the people pane */
  .page-searching.active {
    left: var(--ppane-w);
    right: 0; width: auto;
    transform: none;
    border: none; border-radius: 0; box-shadow: none;
  }
  .page-searching.active .wait-stage { width: 280px; height: 280px; }
  .page-searching.active .orb-xl { width: 150px; height: 150px; }
}

/* ---------- mobile bottom tabs ---------- */
.tabbar[hidden] { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 9, 17, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--card-border);
}
.tab-item {
  appearance: none; cursor: pointer; flex: 1; max-width: 130px;
  background: none; border: none; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-faint); position: relative;
  transition: color 0.15s;
}
.tab-item.active { color: var(--text); }
.tab-item.active .ti-icon { filter: drop-shadow(0 0 10px rgba(124, 92, 255, 0.7)); }
.ti-icon { font-size: 21px; line-height: 1; transition: transform 0.2s var(--ease-spring); }
.tab-item.active .ti-icon { transform: translateY(-1px) scale(1.08); }
.ti-label { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.tab-badge { position: absolute; top: 8px; right: calc(50% - 26px); min-width: 18px; height: 18px; font-size: 10px; }

/* ---------- onboarding wizard ---------- */
.onboard-panel { max-width: 360px; }
.ob-title { font-size: 22px; letter-spacing: -0.03em; margin-bottom: 8px; }
.ob-handle { padding: 12px 14px; margin: 14px 0 4px; font-size: 16px; }
#ob-handle-input { font-size: 17px; }
#onboard-modal .modal-panel { animation: rise 0.3s var(--ease-spring); }
#ob-step2 .gender-options { grid-template-columns: 1fr 1fr; }
#ob-phrase-input {
  background: var(--bg-soft); border: 1px solid var(--card-border);
  border-radius: 13px; padding: 13px;
  color: var(--text); font-size: 15px; outline: none; font-family: inherit;
  transition: border-color 0.16s;
}
#ob-phrase-input:focus { border-color: var(--accent); }
.phrase-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px; font-weight: 600; letter-spacing: 0.06em;
  text-align: center; color: var(--accent-3);
  background: rgba(77, 214, 255, 0.07);
  border: 1px dashed rgba(77, 214, 255, 0.45);
  border-radius: 13px; padding: 16px 10px; margin-bottom: 10px;
  user-select: all;
}
.static-row { cursor: default; }



/* ---------- interests / hashtags ---------- */
.tags-card { padding: 20px; margin: 16px 0; }
.tag-selected { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 30px; align-items: center; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124, 92, 255, 0.18); border: 1px solid rgba(124, 92, 255, 0.45);
  color: var(--text); padding: 6px 8px 6px 12px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600;
  animation: pop-in 0.2s var(--ease-spring);
}
.tag-x { appearance: none; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 15px; padding: 0 2px; line-height: 1; }
.tag-x:hover { color: var(--danger); }
.tag-empty { color: var(--text-faint); font-size: 13.5px; }
.tag-add-row { display: flex; gap: 8px; }
#tag-input {
  flex: 1; min-width: 0; background: var(--bg-soft);
  border: 1px solid var(--card-border); border-radius: 12px;
  padding: 10px 14px; color: var(--text); font-size: 14px;
  outline: none; font-family: inherit; transition: border-color 0.15s;
}
#tag-input:focus { border-color: var(--accent); }
#tag-input:disabled { opacity: 0.45; }
.tag-suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag-sug {
  appearance: none; cursor: pointer; font-family: inherit;
  background: none; border: 1px dashed var(--card-border); border-radius: 999px;
  color: var(--text-dim); font-size: 12.5px; padding: 6px 12px;
  transition: all 0.14s;
}
.tag-sug:hover { color: var(--text); border-color: var(--accent); }

.tag-availability { text-align: center; color: var(--accent-3); font-size: 13.5px; margin: 12px 0 0; }
.tag-fallback { text-align: center; margin-top: 18px; animation: rise 0.25s var(--ease-spring); }
.tag-fallback[hidden] { display: none; }
.tag-fallback-text { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }

/* ---------- find chooser sheet ---------- */
.find-opt {
  appearance: none; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 15px 16px; margin-bottom: 10px;
  color: var(--text); font-family: inherit;
  transition: border-color 0.15s, transform 0.12s var(--ease-spring), background 0.15s;
}
.find-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.find-opt:active { transform: scale(0.98); }
.fo-icon {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(124,92,255,0.25), rgba(255,92,168,0.2));
  color: var(--accent-3);
}
.find-opt:last-of-type .fo-icon { color: var(--accent-2); }
.fo-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fo-text b { font-size: 15px; }
.fo-text small { font-size: 12px; color: var(--text-dim); }
.fo-arrow { color: var(--text-faint); font-size: 16px; }
.find-opt:hover .fo-arrow { color: var(--text); }

/* ---------- lobby (the door) ---------- */
.page-lobby.active {
  max-width: 640px; margin: 0 auto;
  min-height: calc(100dvh - 100px);
  display: flex; flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-bottom: 20px;
}
/* fixed footer BAR - bottom of the stage, always visible */
.lobby-view { display: flex; flex-direction: column; width: 100%; align-items: center; animation: screen-in 0.35s var(--ease-spring); flex: 1; justify-content: center; }
.lobby-view[hidden] { display: none; }
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 35;
  display: flex; flex-direction: row; justify-content: space-between; align-items: center;
  padding: 13px 24px;
  padding-bottom: calc(13px + env(safe-area-inset-bottom));
  background: rgba(10, 9, 17, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--card-border);
}
.site-footer[hidden] { display: none; }
.site-footer.footer-boot { opacity: 0; pointer-events: none; }
.site-footer { transition: opacity 0.4s ease; }
.sf-copy { font-size: 12px; color: var(--text-faint); letter-spacing: 0.02em; }
.site-footer .foot-links { margin: 0; }
@media (min-width: 900px) {
  .site-footer { left: var(--ppane-w); padding-left: 34px; padding-right: 34px; }
}
@media (max-width: 899px) {
  .site-footer {
    bottom: calc(62px + env(safe-area-inset-bottom));
    padding-left: 20px; padding-right: 20px;
  }
}
.lobby-view .btn.lg { width: 100%; margin-bottom: 12px; }
.lobby-view .btn.ghost.lg { margin-bottom: 0; }
.lobby-view .linklike { margin-top: 16px; }
#ob-phrase-input {
  width: 100%; text-align: center; font-size: 16px;
  background: var(--bg-soft); border: 1px solid var(--card-border);
  border-radius: 13px; padding: 14px; color: var(--text); outline: none;
  font-family: inherit; margin-bottom: 8px;
}
#ob-phrase-input:focus { border-color: var(--accent); }

/* ---------- full-screen onboarding journey ---------- */
.page-onboard.active {
  max-width: 460px; margin: 0 auto;
  align-items: center; justify-content: center;
  min-height: calc(100dvh - 120px);
  text-align: center; gap: 0;
}
.ob-dots { display: flex; gap: 8px; margin-bottom: 34px; }
.ob-dots i {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--card-border); transition: all 0.3s var(--ease-spring);
}
.ob-dots i.on { background: var(--accent); width: 22px; box-shadow: 0 0 10px rgba(124,92,255,0.6); }
.ob-dots i.done { background: var(--accent-2); }
.ob-screen { display: flex; flex-direction: column; width: 100%; align-items: center; animation: screen-in 0.35s var(--ease-spring); }
.ob-screen[hidden] { display: none; }
.ob-logo { width: 92px; height: 92px; margin-bottom: 26px; animation: floaty 5s ease-in-out infinite alternate; }
.ob-hero { font-size: clamp(32px, 9vw, 42px); font-weight: 700; letter-spacing: -0.04em; }
.ob-hero em {
  font-style: normal;
  background: linear-gradient(92deg, var(--accent-3), var(--accent) 45%, var(--accent-2));
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5.5s linear infinite;
}
.ob-sub { color: var(--text-dim); margin: 12px 0 34px; font-size: 15px; }
.ob-q { font-size: 24px; letter-spacing: -0.03em; margin-bottom: 8px; }
.ob-hint-line { color: var(--text-dim); font-size: 14px; margin-bottom: 22px; line-height: 1.5; }
.ob-screen .handle-row { width: 100%; padding: 14px 16px; margin-bottom: 6px; }
.ob-screen .tag-selected { justify-content: center; }
.ob-screen .tag-add-row { width: 100%; }
.ob-screen #ob-tag-input {
  flex: 1; min-width: 0; text-align: center; font-size: 15px;
  background: var(--bg-soft); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 11px 14px; color: var(--text);
  outline: none; font-family: inherit;
}
.ob-screen #ob-tag-input:focus { border-color: var(--accent); }
.ob-screen .tag-suggestions { justify-content: center; }
#ob-handle-input, #ob-phrase-input {
  width: 100%; text-align: center; font-size: 17px;
}
#ob-phrase-input {
  background: var(--bg-soft); border: 1px solid var(--card-border);
  border-radius: 13px; padding: 14px; color: var(--text); outline: none;
  font-family: inherit; transition: border-color 0.16s;
}
#ob-phrase-input:focus { border-color: var(--accent); }
.ob-screen .btn.primary.lg { margin-top: 16px; }

.ob-sig-stage { display: grid; place-items: center; padding: 6px 0 22px; }
.ob-sig-stage .aura { animation: floaty 6s ease-in-out infinite alternate; }
#ob-aura-reroll { min-width: 150px; }
#ob-aura-reroll:disabled { opacity: 0.5; }
.ob-row-links { display: flex; justify-content: center; margin-top: 16px; }
.ob-gender { width: 100%; margin-bottom: 4px; }
.ob-confirm {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 4px; font-size: 14px; color: var(--text-dim); cursor: pointer;
}
.ob-confirm input { accent-color: var(--accent); width: 17px; height: 17px; }

/* ---------- identity strip on discover ---------- */
.identity-strip {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 10px 14px; margin: 6px 0 18px;
  cursor: pointer; backdrop-filter: blur(12px);
  transition: border-color 0.15s, transform 0.12s var(--ease-spring);
  appearance: none; width: 100%; text-align: left; color: var(--text); font-family: inherit;
}
.identity-strip:active { transform: scale(0.98); }
.identity-strip:hover { border-color: rgba(124,92,255,0.4); }
.strip-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.strip-handle { font-weight: 700; font-size: 15.5px; }
.strip-sub { font-size: 12px; color: var(--text-dim); }
