/* wayrouter design system v3: quiet, neutral, flat. One lavender accent. */
:root {
  --bg: #09090c;
  --bg-2: #0c0c10;
  --surface: #111116;
  --surface-2: #17171d;
  --surface-3: #1f1f27;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f4f4f7;
  --muted: #9b9ba8;
  --faint: #65656f;
  --accent: #9a8cf7;
  --accent-hover: #ab9fff;
  --accent-ink: #14112b;
  --accent-soft: rgba(154, 140, 247, 0.14);
  --grad: #9a8cf7;
  --grad-soft: rgba(154, 140, 247, 0.07);
  --bubble-me: #2b2547;
  --gold: #d9c98a;
  --blush: #c4bcf5;
  --ok: #6fd6a0;
  --warn: #e8c46a;
  --danger: #ff7a85;
  --shadow: 0 20px 50px -28px rgba(0, 0, 0, 0.8);
  --shadow-pop: 0 18px 44px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line-2);
  --r-xl: 20px; --r-lg: 16px; --r-md: 12px; --r-pill: 999px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --display: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --serif: var(--display);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f6f6f9;
  --bg-2: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f0f0f5;
  --surface-3: #e7e7ee;
  --line: rgba(20, 20, 40, 0.08);
  --line-2: rgba(20, 20, 40, 0.15);
  --text: #15151c;
  --muted: #666675;
  --faint: #9a9aa8;
  --accent: #6e5ce6;
  --accent-hover: #5d4bd6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(110, 92, 230, 0.1);
  --grad: #6e5ce6;
  --grad-soft: rgba(110, 92, 230, 0.06);
  --bubble-me: #e6e2fb;
  --gold: #a68a1f;
  --blush: #5d4bd6;
  --ok: #1f9a5a;
  --warn: #b07800;
  --danger: #d02f45;
  --shadow: 0 20px 50px -30px rgba(30, 30, 70, 0.3);
  --shadow-pop: 0 18px 44px -16px rgba(30, 30, 70, 0.28), 0 0 0 1px var(--line-2);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.serif, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.025em; }
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 0.7rem 1.3rem; border-radius: var(--r-pill); border: 0; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 0.92rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease-spring), background 160ms, border-color 160ms;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.3); }
.btn.ghost { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn.white { background: var(--text); color: var(--bg); }
.btn.sm { min-height: 36px; padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.btn.lg { min-height: 54px; padding: 0.9rem 1.8rem; font-size: 1.05rem; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); box-shadow: none; }

.icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text); text-decoration: none; transition: background 160ms, transform 160ms var(--ease-spring); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
:root[data-theme='light'] .theme-toggle .sun { display: block; }
:root[data-theme='light'] .theme-toggle .moon { display: none; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 600 1.05rem/1 var(--display); letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.wordmark svg { width: 28px; height: 28px; color: var(--text); }

/* avatar: real image when present, otherwise a warm duotone monogram */
.av {
  --s: 44px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 90% at 28% 18%, hsl(var(--h, 20) 28% 40%), transparent 62%), hsl(var(--h, 20) 22% 14%);
  font: 600 calc(var(--s) * 0.42) / 1 var(--display);
}
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av.sq { border-radius: 12px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 0.25rem 0.7rem; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line); font-size: 0.76rem; font-weight: 500; color: var(--muted); }
.chip.accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* age gate */
.gate { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); display: grid; place-items: center; padding: 24px; }
.gate-box { max-width: 420px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow); }
.gate-box h2 { font: 600 2rem/1.05 var(--display); letter-spacing: -0.025em; margin-bottom: 10px; }
.gate-box p { color: var(--muted); margin-bottom: 22px; }
.gate-box .row { display: flex; gap: 10px; flex-wrap: wrap; }

@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
