/* Tell Hydra — app design system (/home).
   Direction: deep-purple "night" headers over a soft lavender page with white cards; Discover is
   fully dark. Purple is the action colour, coral is reserved for the heart (liking) and reveal.
   Light by default, dark via the system setting or the in-app toggle (html[data-theme]). */

:root {
  --bg: #f4f1fb;
  --surface: #ffffff;
  --surface-2: #f3effc;
  --surface-3: #e7e0f7;
  --ink: #1b1530;
  --ink-2: #4b4466;
  --muted: #7d7698;
  --line: #ebe6f7;
  --primary: #7c3aed;
  --primary-2: #8b5cf6;
  --primary-ink: #ffffff;
  --primary-soft: #efe8ff;
  --good: #16a34a;
  --good-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #e11d48;
  --bad-soft: #ffe4ea;
  --night: radial-gradient(120% 100% at 15% 0%, #3c1a8f 0%, #22106a 34%, #0f0a42 68%, #05051f 100%);
  --night-flat: #0b0830;
  --glass: rgba(255, 255, 255, .09);
  --glass-line: rgba(255, 255, 255, .14);
  --violet: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  --coral: linear-gradient(135deg, #ff5f8f 0%, #ff8466 100%);
  --brand: linear-gradient(135deg, #ff2d9b 0%, #a95cff 52%, #12a9ff 100%);
  --shadow-1: 0 1px 2px rgba(40, 20, 90, .05), 0 2px 8px -2px rgba(40, 20, 90, .06);
  --shadow-2: 0 14px 34px -16px rgba(60, 25, 140, .35), 0 2px 6px rgba(40, 20, 90, .05);
  --shadow-3: 0 28px 70px -24px rgba(30, 10, 80, .6);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 22px;
  --r-xl: 28px;
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 66px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0a1c; --surface: #1a1430; --surface-2: #231b3e; --surface-3: #2f2550;
    --ink: #f4f0ff; --ink-2: #cdc4ea; --muted: #9b92bc; --line: #2c2349;
    --primary: #a78bfa; --primary-2: #8b5cf6; --primary-soft: #2c2052;
    --good-soft: #10331f; --warn-soft: #3a2a0d; --bad-soft: #3d1522;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 14px 34px -16px rgba(0, 0, 0, .7); --shadow-3: 0 28px 70px -24px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0a1c; --surface: #1a1430; --surface-2: #231b3e; --surface-3: #2f2550;
  --ink: #f4f0ff; --ink-2: #cdc4ea; --muted: #9b92bc; --line: #2c2349;
  --primary: #a78bfa; --primary-2: #8b5cf6; --primary-soft: #2c2052;
  --good-soft: #10331f; --warn-soft: #3a2a0d; --bad-soft: #3d1522;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 14px 34px -16px rgba(0, 0, 0, .7); --shadow-3: 0 28px 70px -24px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---- Base ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary-2) 60%, transparent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.stack-lg { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 28px; height: 28px; }
.icon.fill { fill: currentColor; }

/* ---- Buttons ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font: 700 15px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), background-color .15s, box-shadow .15s, opacity .15s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: 0 10px 22px -10px rgba(124, 58, 237, .8); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 10px 22px -10px rgba(255, 95, 143, .8); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-glass { background: var(--glass); color: #fff; border-color: var(--glass-line); }
.btn-white { background: #fff; color: #3b1585; }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 15px; font-size: 14px; }
.btn-icon { width: 46px; min-height: 46px; padding: 0; border-radius: 50%; }
.link-btn { background: none; border: 0; padding: 6px; color: var(--primary); font-weight: 700; cursor: pointer; }

/* ---- Inputs -------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 500 16px/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 42px; background-repeat: no-repeat; background-position: right 16px center; background-size: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d7698' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-2) 18%, transparent); }
.input-prefix { display: flex; align-items: center; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); overflow: hidden; }
.input-prefix:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-2) 18%, transparent); }
.input-prefix span { padding-left: 14px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.input-prefix .input { border: 0; box-shadow: none; padding-left: 2px; }
.hint { font-size: 13px; color: var(--muted); }
.hint.ok { color: var(--good); font-weight: 700; }
.hint.bad, .error { color: var(--bad); font-weight: 600; font-size: 14px; }
.error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); margin: 1px 0 0; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 15px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14px var(--font); cursor: pointer; transition: all .15s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--violet); border-color: transparent; color: #fff; }
.chip.static { cursor: default; min-height: 32px; padding: 0 12px; font-size: 13px; background: var(--surface-2); border-color: transparent; }

/* Pill tabs (All / Unread / Replied …) — glass on the night header, lavender elsewhere */
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pills button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 700 14px var(--font); cursor: pointer;
}
.pills button[aria-selected="true"] { background: var(--violet); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(124, 58, 237, .9); }
.hero .pills button { background: var(--glass); border-color: var(--glass-line); color: rgba(255, 255, 255, .9); }
.hero .pills button[aria-selected="true"] { background: var(--violet); border-color: transparent; color: #fff; }
.segmented { display: flex; padding: 4px; gap: 4px; background: var(--surface-2); border-radius: 999px; }
.segmented button { flex: 1; min-height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 13px var(--font); cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ff4d79; color: #fff; font: 800 11px/1 var(--font); }
.badge:empty, .badge[data-n="0"] { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font: 700 12px var(--font); background: var(--surface-2); color: var(--ink-2); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.brand { background: var(--primary-soft); color: var(--primary); }
.plus { font: 800 12px var(--font); color: #ff4d79; background: #ffe4ec; padding: 3px 8px; border-radius: 999px; }

/* ---- Cards --------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-1); }
.card.flat { box-shadow: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 2px 2px 12px; }
.section-head h2 { font-size: 19px; }
.list { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }

.avatar {
  --size: 44px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  color: #fff; font: 800 calc(var(--size) * .38) / 1 var(--font); letter-spacing: -.02em; background: var(--av, var(--brand)); position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.halo { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5.5px #ff5f8f; }
.avatar.xl { --size: 92px; }
.avatar.lg { --size: 60px; }
.avatar.sm { --size: 36px; }
.avatar.anon { background: linear-gradient(160deg, #c4b5fd 0%, #8b5cf6 55%, #6d28d9 100%); }
.avatar.anon .icon { width: 58%; height: 58%; stroke: none; fill: rgba(40, 10, 90, .55); margin-top: 22%; }

/* ---- Logo: the treehouse mark + "treehouse." wordmark ------------------------------------ */
.logo { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.wordmark { font: 900 25px/1 "Nunito", var(--font); letter-spacing: -.03em; }
.wordmark .dot { display: inline-block; width: .2em; height: .2em; margin-left: .06em; border-radius: 50%; background: #ff2d9b; }

/* ---- Night header ("hero") -------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--night);
  margin: 0 -16px; padding: max(18px, env(safe-area-inset-top)) 20px 26px; border-radius: 0 0 30px 30px;
  display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr);
}
.hero::before { content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(168, 85, 247, .55), transparent 65%); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 240px; height: 240px; left: -90px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 95, 162, .28), transparent 65%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 30px; }
.hero .sub { color: rgba(255, 255, 255, .78); font-size: 15px; margin-top: -8px; max-width: 420px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-actions { display: flex; gap: 6px; }
.hero-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.hero-btn:hover { background: var(--glass); }
.hero-btn .badge { position: absolute; top: 2px; right: 2px; box-shadow: 0 0 0 2px #3b1585; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--r-lg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.below-hero { margin-top: -10px; }

/* ---- App shell ------------------------------------------------------------------------- */
.shell { min-height: 100dvh; }
.main { padding: 0 16px calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); max-width: 680px; margin: 0 auto; }
.screen { animation: screenIn .28s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -18px rgba(40, 20, 90, .35);
}
.nav-item {
  position: relative; display: grid; justify-items: center; gap: 3px; padding: 4px 0; border: 0; background: none;
  color: var(--muted); font: 600 11.5px var(--font); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.nav-item .icon { width: 25px; height: 25px; transition: transform .2s var(--ease); }
.nav-item[aria-current="page"] { color: var(--primary); font-weight: 800; }
.nav-item[aria-current="page"] .icon { fill: color-mix(in srgb, var(--primary-2) 22%, transparent); transform: translateY(-1px); }
.nav-item .badge { position: absolute; top: -2px; left: calc(50% + 5px); box-shadow: 0 0 0 2px var(--surface); }

.sidebar { display: none; }
@media (min-width: 960px) {
  .bottom-nav { display: none; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 25; display: flex; flex-direction: column; gap: 4px;
    padding: 24px 16px; background: var(--night); color: #fff;
  }
  .sidebar .logo { margin: 0 10px 26px; }
  .side-item {
    position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 0; background: none;
    color: rgba(255, 255, 255, .75); font: 700 15px var(--font); text-decoration: none; cursor: pointer; text-align: left;
  }
  .side-item:hover { background: var(--glass); color: #fff; }
  .side-item[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }
  .side-item .badge { margin-left: auto; }
  .side-foot { margin-top: auto; display: grid; gap: 10px; }
  .side-foot .tiny { color: rgba(255, 255, 255, .6); }
  .shell-body { margin-left: 264px; }
  .main { padding: 20px 32px 48px; max-width: 780px; }
  .hero { margin: 0; border-radius: var(--r-xl); padding: 26px 28px 30px; }
  .below-hero { margin-top: 0; }
  .home-hero .hero-top .logo { visibility: hidden; }
}

/* ---- Sheets, toasts ---------------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(12, 5, 30, .55); backdrop-filter: blur(3px); animation: fadeIn .2s ease; display: grid; align-items: end; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { width: 100%; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); animation: sheetUp .32s var(--ease); box-shadow: var(--shadow-3); }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 14px; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@media (min-width: 640px) {
  .scrim { align-items: center; justify-items: center; }
  .sheet { width: min(480px, 92vw); border-radius: var(--r-xl); padding-top: 22px; animation: popIn .25s var(--ease); }
  .sheet::before { display: none; }
}
@keyframes popIn { from { opacity: 0; transform: scale(.96); } }
.sheet h2 { margin-bottom: 6px; }
.sheet-actions { display: grid; gap: 10px; margin-top: 18px; }
.menu-list { display: grid; gap: 4px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 12px; border: 0; border-radius: 14px; background: none; text-align: left; font: 600 15px var(--font); cursor: pointer; color: var(--ink); }
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--bad); }
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); z-index: 80; display: grid; justify-items: center; pointer-events: none; padding: 0 16px; }
@media (min-width: 960px) { .toast-wrap { bottom: 28px; left: 264px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: #1d0d45; color: #fff; font: 600 14px var(--font); box-shadow: var(--shadow-3); animation: toastIn .3s var(--ease); max-width: 100%; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---- Loading, empty ---------------------------------------------------------------------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; background: var(--night); }
.loading-screen { color: #fff; }
.loading-screen .logo-mark { width: 72px; height: 72px; animation: breathe 1.6s ease-in-out infinite; }
.loading-screen .wordmark { font-size: 30px; }
.loading-screen .empty h3, .loading-screen .empty p { color: #fff; }
@keyframes breathe { 50% { transform: scale(1.06); filter: drop-shadow(0 10px 24px rgba(169, 92, 255, .7)); } }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 34px 20px; }
.empty-art { position: relative; width: 120px; height: 120px; display: grid; place-items: center; margin-bottom: 6px; }
.empty-art::before { content: ""; position: absolute; inset: 8px; border-radius: 42% 58% 55% 45% / 50% 42% 58% 50%; background: var(--brand); opacity: .2; animation: blob 8s ease-in-out infinite; }
.empty-art span { position: relative; font-size: 52px; animation: float 3.6s ease-in-out infinite; }
@keyframes blob { 50% { border-radius: 58% 42% 45% 55% / 42% 58% 50% 50%; transform: rotate(12deg) scale(1.05); } }
@keyframes float { 50% { transform: translateY(-6px) rotate(-4deg); } }
.empty h3 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--muted); max-width: 330px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: 14px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.brand { background: var(--primary-soft); color: var(--primary); }

/* ---- Landing / auth / onboarding ---------------------------------------------------------- */
.auth-page { min-height: 100dvh; background: var(--night); color: #fff; }
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; padding: max(24px, env(safe-area-inset-top)) 20px 32px; max-width: 460px; margin: 0 auto; gap: 22px; }
.auth.light { color: var(--ink); }
.auth-page .muted, .auth-page .hint { color: rgba(255, 255, 255, .7); }
.auth-page .link-btn { color: #d8b4fe; }
.auth-page .field > span { color: rgba(255, 255, 255, .85); }
.auth-page .select option { color: #1b1530; }
.auth-page .input, .auth-page .select, .auth-page .textarea, .auth-page .input-prefix { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.auth-page .select { appearance: none; -webkit-appearance: none; padding-right: 42px; background-repeat: no-repeat; background-position: right 16px center; background-size: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.auth-page .input-prefix span { color: rgba(255, 255, 255, .6); }
.auth-page .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.auth-page .chip[aria-pressed="true"] { background: #fff; color: #3b1585; }
.auth-page .check { color: rgba(255, 255, 255, .85); }
.auth-page .error, .auth-page .hint.bad { color: #fda4af; }
.auth-page .hint.ok { color: #86efac; }
.auth-page .icon-btn { background: var(--glass); color: #fff; }
.auth-page .card { background: var(--glass); border-color: var(--glass-line); color: #fff; box-shadow: none; }
.auth-page .empty p, .auth-page .empty h3 { color: #fff; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.brand-head { display: grid; justify-items: center; gap: 10px; }
.brand-head .logo-mark { width: 54px; height: 54px; }
.brand-head .wordmark { font-size: 34px; }
.tagline-caps { font: 600 11.5px var(--font); letter-spacing: .32em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.hero-land { display: grid; gap: 18px; text-align: center; }
.hero-land h1 { font-size: clamp(40px, 11.5vw, 56px); line-height: .98; letter-spacing: -.05em; }
.hero-land h1 em { font-style: normal; background: linear-gradient(120deg, #ff8fb8, #d8b4fe 60%, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-land .lead { color: rgba(255, 255, 255, .8); font-size: 17px; }
.feature-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
.feature-tile { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--glass-line); color: #fff; text-decoration: none; cursor: pointer; font: inherit; text-align: left; }
.feature-tile .ft-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.feature-tile .ft-icon.msg { background: var(--violet); }
.feature-tile .ft-icon.date { background: var(--coral); }
.feature-tile b { font-size: 15px; line-height: 1.2; }
.feature-tile .row { align-items: flex-start; }
.feature-tile .ft-icon { flex: none; }
.feature-tile p { font-size: 13px; color: rgba(255, 255, 255, .72); display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.floaty { position: absolute; font-size: 28px; animation: float 4s ease-in-out infinite; pointer-events: none; opacity: .9; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
.steps i.on { background: linear-gradient(90deg, #ff8fb8, #c084fc); }
.onb-head { display: grid; gap: 8px; }
.onb-head h1 { font-size: 30px; }
.onb-head p { color: rgba(255, 255, 255, .72); }

/* ---- Home ----------------------------------------------------------------------------------- */
.home-hero .me { display: flex; align-items: center; gap: 16px; }
.home-hero .avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 12px 30px -10px rgba(0, 0, 0, .6); }
.home-hero h1 { font-size: 26px; line-height: 1.15; }
.home-hero .tagline { color: rgba(255, 255, 255, .75); font-size: 13px; margin-top: 4px; }
.link-card { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; }
.link-card .lc-icon { width: 42px; height: 42px; border-radius: 13px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; flex: none; }
.link-card b { display: block; font-size: 15px; }
.link-card code { display: block; font: 600 13.5px var(--font); color: rgba(255, 255, 255, .78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card .hero-btn { background: rgba(255, 255, 255, .1); border-radius: 13px; }
.stat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); cursor: pointer; text-align: left; position: relative; color: var(--ink); }
.stat-card .sc-icon { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: none; color: #fff; }
.stat-card .sc-icon.msg { background: var(--violet); }
.stat-card .sc-icon.heart { background: var(--coral); }
.stat-card b { display: block; font: 800 24px/1 var(--font); letter-spacing: -.03em; }
.stat-card span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-card .plus { position: absolute; top: 10px; right: 10px; }
.h-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 12px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.person-tile { scroll-snap-align: start; position: relative; height: 196px; border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; background: var(--av); cursor: pointer; text-align: left; border: 0; box-shadow: var(--shadow-2); }
.person-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(15, 5, 40, .7)); }
.person-tile > * { position: relative; }
.person-tile .pt-initials { position: absolute; top: 26px; left: 0; right: 0; text-align: center; font: 800 46px/1 var(--font); opacity: .9; }
.person-tile b { font-size: 14px; line-height: 1.2; }
.person-tile span { font-size: 12px; opacity: .85; }
.cta-card { display: grid; gap: 12px; padding: 22px; border-radius: var(--r-xl); background: var(--night); color: #fff; position: relative; overflow: hidden; }
.cta-card p { color: rgba(255, 255, 255, .8); font-size: 14px; }

/* ---- Inbox --------------------------------------------------------------------------------- */
.msg-card { position: relative; display: grid; gap: 10px; padding: 16px 16px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.msg-card.unread { border-color: color-mix(in srgb, var(--primary-2) 45%, var(--line)); }
.msg-head { display: flex; align-items: center; gap: 12px; }
.msg-head b { display: block; font-size: 15.5px; }
.msg-head .when { font-size: 12.5px; color: var(--muted); }
.msg-head .more { margin-left: auto; align-self: flex-start; width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.msg-head .more:hover { background: var(--surface-2); }
.unread-dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: #ff4d79; box-shadow: 0 0 0 2.5px var(--surface); }
.msg-topic { font-size: 12px; font-weight: 700; color: var(--primary); text-transform: lowercase; }
.msg-text { font: 600 16px/1.45 var(--font); color: var(--ink); overflow-wrap: anywhere; padding-left: 56px; }
.msg-foot { display: flex; align-items: center; gap: 6px; padding-left: 56px; flex-wrap: wrap; }
.react { min-width: 40px; height: 34px; padding: 0 10px; border-radius: 999px; border: 0; background: var(--surface-2); font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; transition: transform .15s var(--ease), background .15s; }
.react:active { transform: scale(.88); }
.react[aria-pressed="true"] { background: #ffe4ec; box-shadow: inset 0 0 0 1.5px #ff7aa0; transform: scale(1.04); }
.react.more-r { color: var(--muted); font: 700 16px var(--font); }
.reply-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--primary-soft); color: var(--primary); font: 700 14px var(--font); cursor: pointer; }
.replied-tag { font-size: 12px; font-weight: 700; color: var(--good); display: inline-flex; gap: 4px; align-items: center; }
.story-preview { width: min(100%, calc((100dvh - 330px) * 9 / 16)); aspect-ratio: 9 / 16; border-radius: var(--r-lg); margin: 0 auto; background: var(--surface-2); box-shadow: var(--shadow-2); -webkit-touch-callout: default; }
.share-strip { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; }

/* Sealed message rows (like the owner app) */
.mrow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: transform .15s var(--ease); }
.mrow:active { transform: scale(.985); }
.mrow-icon { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.mrow.unread .mrow-icon { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -8px rgba(169, 92, 255, .9); animation: wiggle 2.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-8deg); } 91% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.mrow-title { display: block; font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow.unread .mrow-title { font-weight: 800; }
.mrow-sub { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow > .icon:last-child { color: var(--muted); }
.story-bar { margin-bottom: 12px; }
/* In the app, press-and-hold is handled by the app (the phone's own image menu would also pop up). */
.story-preview.native-hold { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.icon-btn.danger { color: var(--bad); }

/* ---- Discover (dark screen) ------------------------------------------------------------------ */
body.dark-screen { background: #07071f; }
body.dark-screen .main { color: #fff; }
.disc-hero { background: transparent; padding-bottom: 6px; }
.disc-hero::before, .disc-hero::after { display: none; }
body.dark-screen .hero.disc-hero { background: transparent; }
.deck { position: relative; height: clamp(420px, calc(100dvh - 300px), 600px); margin: 8px 0 0; }
.swipe-card {
  position: absolute; inset: 0; border-radius: 30px; overflow: hidden; background: var(--av); color: #fff;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08); display: flex; flex-direction: column; justify-content: flex-end;
  touch-action: pan-y; user-select: none; transform-origin: 50% 110%; will-change: transform;
}
.swipe-card.behind { transform: scale(.95) translateY(12px); filter: brightness(.7); }
.swipe-card.behind-2 { transform: scale(.9) translateY(24px); filter: brightness(.5); }
.swipe-card.animating { transition: transform .35s var(--ease), opacity .35s; }
.swipe-art { position: absolute; inset: 0; overflow: hidden; }
.swipe-art .blob { position: absolute; border-radius: 50%; filter: blur(30px); opacity: .7; }
.swipe-art .big-initials { position: absolute; top: 15%; left: 0; right: 0; text-align: center; font: 800 clamp(84px, 26vw, 140px)/1 var(--font); letter-spacing: -.06em; color: rgba(255, 255, 255, .92); text-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.swipe-art .mask { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 46px; opacity: .9; }
.swipe-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 4, 30, 0) 30%, rgba(10, 4, 30, .55) 58%, rgba(10, 4, 30, .92) 100%); pointer-events: none; }
.card-badge { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 999px; background: rgba(15, 8, 35, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font: 700 13px var(--font); white-space: nowrap; }
.card-badge button { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .6); background: none; color: #fff; font: 800 12px var(--font); cursor: pointer; }
.liked-you { position: absolute; top: 62px; right: 16px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: var(--coral); font: 800 12px var(--font); }
.card-info { position: relative; z-index: 2; padding: 18px 20px 104px; display: grid; gap: 8px; }
.card-info h2 { font-size: 32px; letter-spacing: -.035em; display: flex; align-items: center; gap: 8px; }
.card-info .where { display: flex; align-items: center; gap: 6px; font-size: 15px; opacity: .9; }
.card-info .bio { font-size: 15.5px; line-height: 1.45; opacity: .95; }
.card-info .chips .chip.static { background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(6px); }
.card-info .intent { justify-self: start; }
.deck-actions { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 5; display: flex; justify-content: center; align-items: center; gap: 18px; pointer-events: none; }
.deck-actions > * { pointer-events: auto; }
.round-btn { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: rgba(15, 8, 35, .55); border: 1.5px solid rgba(255, 255, 255, .35); color: #fff; backdrop-filter: blur(8px); transition: transform .15s var(--ease); }
.round-btn:active { transform: scale(.9); }
.round-btn.sm { width: 50px; height: 50px; }
.round-btn.big { width: 76px; height: 76px; border: 0; background: var(--coral); box-shadow: 0 14px 30px -10px rgba(255, 95, 143, .9); }
.round-btn.big .icon { width: 34px; height: 34px; fill: #fff; stroke: #fff; }
.round-btn .icon { width: 28px; height: 28px; }
.round-btn:disabled { opacity: .35; cursor: default; }
.stamp { position: absolute; top: 70px; z-index: 3; padding: 6px 14px; border-radius: 12px; border: 4px solid; font: 900 30px/1 var(--font); opacity: 0; transform: rotate(-14deg); }
.stamp.like { left: 22px; color: #4ade80; border-color: #4ade80; }
.stamp.nope { right: 22px; color: #fb7185; border-color: #fb7185; transform: rotate(14deg); }
.dark-note { color: rgba(255, 255, 255, .55); }
body.dark-screen .empty h3 { color: #fff; }
body.dark-screen .empty p { color: rgba(255, 255, 255, .65); }
body.dark-screen .notice { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .85); }

/* Location filter */
.loc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; font: 700 14px var(--font); cursor: pointer; }
.loc-chip .icon:last-child { transform: rotate(90deg); opacity: .7; }
.state-list { display: grid; gap: 2px; margin-top: 10px; max-height: 52dvh; overflow-y: auto; }
.state-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 600 15px var(--font); cursor: pointer; text-align: left; }
.state-opt:hover { background: var(--surface-2); }
.state-opt.on { background: var(--primary-soft); color: var(--primary); }
body.dark-screen .notice .btn-white { flex: none; }

/* Match moment */
.match-scrim { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(169, 92, 255, .95), rgba(5, 5, 31, .98) 70%); animation: fadeIn .3s ease; overflow: hidden; padding: 24px; }
.match-box { position: relative; z-index: 2; display: grid; justify-items: center; gap: 18px; text-align: center; color: #fff; }
.match-box h1 { font-size: clamp(46px, 13vw, 70px); font-style: italic; letter-spacing: -.05em; animation: matchPop .7s cubic-bezier(.2, 1.6, .4, 1) both .15s; }
.match-box p { color: rgba(255, 255, 255, .85); max-width: 300px; }
.match-avatars { position: relative; display: flex; align-items: center; }
.match-avatars .avatar { --size: 108px; box-shadow: 0 0 0 4px #fff; animation: slideL .6s var(--ease) both; }
.match-avatars .avatar + .avatar { margin-left: -18px; animation-name: slideR; }
.match-heart { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 48px; height: 48px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; color: #fff; z-index: 2; box-shadow: 0 0 0 4px #fff; animation: matchPop .6s cubic-bezier(.2, 1.6, .4, 1) both .45s; }
.match-heart .icon { fill: #fff; }
@keyframes slideL { from { transform: translateX(-60px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(60px); opacity: 0; } }
@keyframes matchPop { from { transform: scale(.3); opacity: 0; } }
.confetti { position: absolute; top: -20px; z-index: 1; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---- Connections (matches, requests, chats) ----------------------------------------------- */
.story-row { display: grid; grid-auto-flow: column; grid-auto-columns: 70px; gap: 14px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 2px; }
.story-row::-webkit-scrollbar { display: none; }
.story { display: grid; justify-items: center; gap: 6px; border: 0; background: none; cursor: pointer; color: #fff; font: 600 12px var(--font); text-align: center; }
.story .avatar { --size: 62px; box-shadow: 0 0 0 2.5px #fff; }
.story.new .avatar { box-shadow: 0 0 0 3px #ff5f8f; }
.story .heart-dot { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; box-shadow: 0 0 0 2px #2b1269; }
.story .heart-dot .icon { width: 12px; height: 12px; fill: #fff; stroke: #fff; }
.story .online-dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2.5px #2b1269; }
.story span:last-child { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.convo { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px; border-radius: var(--r-md); border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); }
.convo:hover { background: var(--surface-2); }
.convo .preview { color: var(--muted); font-size: 14px; }
.convo.unread .preview { color: var(--ink); font-weight: 700; }
.convo .when { font-size: 12px; color: var(--muted); }
.request-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.request-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.match-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); width: 100%; text-align: left; cursor: pointer; color: var(--ink); }

/* Chat */
.chat { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); animation: chatIn .28s var(--ease); }
@keyframes chatIn { from { transform: translateX(30px); opacity: 0; } }
@media (min-width: 960px) { .chat { left: 264px; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-head .grow b { display: block; font-size: 16.5px; }
.chat-head .status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.chat-head .status i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.chat-head .plain-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.chat-head .plain-btn:hover { background: var(--surface-2); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 2px; max-width: 760px; width: 100%; margin: 0 auto; }
.msg-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.msg-row.me { flex-direction: row-reverse; }
.bubble { max-width: 76%; padding: 11px 15px; border-radius: 20px; font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; animation: bubbleIn .22s var(--ease); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.msg-row.them .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow-1); }
.msg-row.me .bubble { background: var(--violet); color: #fff; border-bottom-right-radius: 6px; }
.msg-row time { font-size: 11px; color: var(--muted); white-space: nowrap; padding-bottom: 4px; }
.day-sep { align-self: center; font: 700 12px var(--font); color: var(--muted); background: var(--surface-2); padding: 4px 12px; border-radius: 999px; margin: 8px 0 12px; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 15px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: .5; } }
.reveal-card { display: flex; align-items: center; gap: 12px; margin: 0 12px 10px; padding: 12px 12px 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.reveal-card .rc-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: #ffe4ec; color: #ff4d79; flex: none; }
.reveal-card b { display: block; font-size: 14.5px; }
.reveal-card p { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.reveal-card .btn { flex: none; }
.reveal-card.done { background: var(--good-soft); border-color: transparent; }
.reveal-card.done .rc-icon { background: #fff; color: var(--good); }
@media (min-width: 960px) { .reveal-card { max-width: 736px; margin-left: auto; margin-right: auto; width: calc(100% - 24px); } }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.composer .input { min-height: 46px; max-height: 120px; border-radius: 24px; resize: none; padding: 12px 18px; background: var(--surface-2); border-color: transparent; }
.composer .send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--violet); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 8px 18px -8px rgba(124, 58, 237, .9); }
.composer .send:disabled { opacity: .5; }
.chat-closed { padding: 14px; text-align: center; color: var(--muted); font-size: 14px; background: var(--surface-2); }

/* ---- Profile ---------------------------------------------------------------------------------- */
.profile-hero { justify-items: center; text-align: center; }
.profile-hero .avatar { box-shadow: 0 0 0 4px rgba(255, 255, 255, .85); }
.profile-hero .handle { color: rgba(255, 255, 255, .75); margin-top: -10px; }
.completion { display: flex; align-items: center; gap: 14px; }
.ring { --p: 0; width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(#8b5cf6 calc(var(--p) * 1%), var(--surface-3) 0); }
.ring span { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 800 13px var(--font); }
.todo { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.todo .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.todo.done .dot { background: var(--good-soft); color: var(--good); }
.todo.done { color: var(--muted); }
.settings-group { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-1); }
.settings-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; border: 0; background: none; text-align: left; font: 600 15px var(--font); color: var(--ink); cursor: pointer; }
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row:hover { background: var(--surface-2); }
.settings-row > .icon { color: var(--primary); }
.settings-row .sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.settings-row .chev { margin-left: auto; color: var(--muted); }
.settings-row.danger, .settings-row.danger > .icon { color: var(--bad); }
.toggle { margin-left: auto; position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.toggle i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background .2s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .2s var(--ease); }
.toggle input:checked + i { background: var(--primary-2); }
.toggle input:checked + i::after { transform: translateX(20px); }

/* ---- Notifications -------------------------------------------------------------------------- */
.notif { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); border: 0; background: none; width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.notif:hover { background: var(--surface-2); }
.notif .n-icon { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; flex: none; font-size: 20px; background: var(--surface-2); }
.notif.new .n-icon { background: var(--primary-soft); box-shadow: inset 0 0 0 1.5px var(--primary-2); }
.notif p { font-size: 14px; }
.notif .when { font-size: 12px; color: var(--muted); }

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

/* Last active: green "online" dot beside a name, and the "Active 3 hours ago" line on Discover cards. */
.online-dot-inline { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, .25); vertical-align: middle; }
.card-info h2 .online-dot-inline { width: 13px; height: 13px; box-shadow: 0 0 0 3px rgba(34, 197, 94, .3); }
.card-info .active-line { font-size: 13.5px; font-weight: 600; opacity: .85; }
.card-info .active-line.on { color: #4ade80; opacity: 1; }
.name-dot { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.name-dot-slot { display: inline-flex; }
.name-dot-slot:empty { display: none; }

/* Push notifications: the "Never miss a message" card on Home, and the iPhone steps sheet. */
.push-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.push-card .push-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ff2d9b, #a95cff 55%, #12a9ff); }
.push-card b { display: block; font-size: 16px; }
.push-card p { margin-top: 2px; }
.push-card .push-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.steps-list { margin: 12px 0 8px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.45; }

/* Chat with the keyboard open: the chat is sized to the visible area (set in hy-dating.js), and the
   home-indicator gap under the message box isn't needed while the keyboard covers it. */
.chat { overscroll-behavior: contain; will-change: transform; }
.chat.kb-open .composer { padding-bottom: 10px; }

/* "Get the treehouse app" card on Home and the Add to Home Screen steps. */
.install-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; }
.install-card .install-icon { width: 48px; height: 48px; border-radius: 12px; box-shadow: var(--shadow-1); }
.install-card b { display: block; font-size: 16px; }
.install-card p { margin-top: 2px; }
.install-card .push-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.install-art { display: grid; place-items: center; margin-bottom: 4px; }
.install-art img { border-radius: 16px; box-shadow: var(--shadow-2); }
.kbd-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-2); vertical-align: -6px; color: #2f8cff; }
.install-link { justify-self: center; display: inline-flex; align-items: center; gap: 6px; color: #d8b4fe; font-weight: 700; padding: 8px; }

/* Six tabs fit on small phones: slightly smaller labels and icons. */
@media (max-width: 400px) { .nav-item { font-size: 10.5px; } .nav-item .icon { width: 23px; height: 23px; } }


/* ---- Chatrooms (design: navy with pink accents) ---------------------------------------------- */
.cr-screen { display: grid; gap: 14px; padding-top: max(8px, env(safe-area-inset-top)); }
.cr-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.cr-top h1 { text-align: center; font-size: 24px; letter-spacing: -.02em; }
.cr-top .plain-btn { justify-self: end; }
.cr-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cr-search[hidden] { display: none; }
.cr-search .input { border: 0; background: transparent; padding-left: 0; box-shadow: none; }
.cr-pills { display: flex; gap: 10px; overflow-x: auto; }
.cr-pill { flex: none; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--ink); font: 700 15px var(--font); cursor: pointer; }
.cr-pill.on { background: linear-gradient(135deg, #ff2d9b, #ff4fae); color: #fff; box-shadow: 0 8px 22px -10px #ff2d9b; }
.cr-head h2 { font-size: 19px; }
.cr-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.cr-list { display: grid; gap: 10px; }
.cr-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.cr-row:disabled { opacity: .5; cursor: not-allowed; }
.cr-row.mine { border-color: #ff2d9b; box-shadow: 0 0 0 1px #ff2d9b inset; }
.cr-row b { display: flex; align-items: center; gap: 8px; font-size: 16.5px; }
.cr-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #ff4fae; background: color-mix(in srgb, #ff2d9b 16%, transparent); }
.cr-online { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin-top: 1px; }
.cr-online i, .room-online i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; }
.cr-tag { font: 700 11px var(--font); padding: 3px 8px; border-radius: 999px; background: #ff2d9b; color: #fff; }
.cr-tag.soft { background: color-mix(in srgb, #ff2d9b 18%, transparent); color: #ff6fb8; }
.cr-current { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 18px; border: 0; color: #fff; cursor: pointer; font: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, #ff2d9b 70%, #2a0f4f), #6d28d9); box-shadow: 0 14px 30px -18px #ff2d9b; }
.cr-current b { display: block; font-size: 16px; }
.cr-current span:not(.cr-group) { font-size: 13px; opacity: .85; }
.cr-group { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ff2d9b, #a855f7); }
.cr-current .cr-group { background: rgba(255, 255, 255, .18); }

/* Inside a room */
.room-head .cr-group { width: 40px; height: 40px; }
.room-head b { font-size: 17px; }
.room-online { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.room-banner { display: flex; align-items: flex-start; gap: 10px; margin: 10px 12px 0; padding: 12px 12px 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, #7c3aed 22%, var(--surface)); border: 1px solid color-mix(in srgb, #a855f7 45%, transparent); }
.room-banner p { flex: 1; font-size: 13.5px; line-height: 1.4; }
.rb-pin { color: #ff4fae; margin-top: 2px; }
.room-middle { flex: 1; min-height: 0; display: flex; }
.room-body { flex: 1; min-width: 0; gap: 14px; }
.rmsg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; }
.rmsg-av { border: 0; background: none; padding: 0; cursor: pointer; }
.room-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--font); color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 40%, #1e1147)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.room-av.sm { width: 30px; height: 30px; font-size: 11px; }
.room-av.xl { width: 112px; height: 112px; font-size: 38px; box-shadow: 0 0 0 4px #ff2d9b, 0 18px 40px -16px #ff2d9b; }
.rmsg-top { display: flex; align-items: baseline; gap: 8px; }
.rmsg-name { border: 0; background: none; padding: 0; font: 800 15px var(--font); cursor: pointer; text-align: left; }
.rmsg-top time { font-size: 11.5px; color: var(--muted); }
.rmsg-text { font-size: 15px; line-height: 1.42; overflow-wrap: anywhere; margin-top: 2px; cursor: pointer; }
.rmsg.me .rmsg-text { color: var(--ink); }
.rx-row { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.rx { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 700 13px var(--font); cursor: pointer; }
.rx.on { border-color: #ff2d9b; background: color-mix(in srgb, #ff2d9b 18%, var(--surface-2)); }
.rx.add { padding: 4px 8px; color: var(--muted); }
.rx-picker { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 5; display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3); }
.rx-picker button, .rx-quick button { border: 0; background: none; font-size: 22px; padding: 4px 6px; cursor: pointer; border-radius: 10px; }
.rx-quick { display: flex; justify-content: space-between; margin: 12px 0; padding: 8px; border-radius: 16px; background: var(--surface-2); }
.online-panel { flex: none; width: 128px; display: flex; flex-direction: column; gap: 6px; padding: 12px 8px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); overflow-y: auto; }
.online-panel[hidden] { display: none; }
.online-panel > b { font-size: 13.5px; padding: 0 4px 4px; }
.op-list, .op-grid { display: grid; gap: 4px; }
.op-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 12px 0; max-height: 55vh; overflow: auto; }
.op-person { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 5px 4px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 12.5px var(--font); cursor: pointer; text-align: left; }
.op-person:hover { background: var(--surface-2); }
.op-av { position: relative; flex: none; }
.op-av i { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--surface); }
.op-all { margin-top: auto; border: 0; background: none; color: #ff4fae; font: 700 13px var(--font); padding: 8px; cursor: pointer; }
.room-composer { align-items: center; }
.room-composer .plain-btn { color: var(--ink-2); padding: 6px; }
.room-composer .send { background: linear-gradient(135deg, #ff2d9b, #ff5fa2); }
.emoji-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.emoji-bar[hidden] { display: none; }
.emoji-bar button { border: 0; background: none; font-size: 22px; padding: 4px; cursor: pointer; }

/* Profile card */
.pc { display: grid; justify-items: center; gap: 6px; text-align: center; padding-top: 8px; }
.pc-av { position: relative; margin-bottom: 6px; }
.pc-av i { position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px var(--surface); }
.pc h2 { font-size: 26px; }
.pc-sub { color: var(--muted); font-size: 14.5px; }
.pc-status { padding: 4px 14px; border-radius: 999px; font: 700 13px var(--font); background: var(--surface-2); color: var(--muted); }
.pc-status.on { background: color-mix(in srgb, #22c55e 18%, transparent); color: #4ade80; border: 1px solid color-mix(in srgb, #22c55e 45%, transparent); }
.pc-actions { display: flex; gap: 10px; margin-top: 10px; }
.pc-about { display: grid; gap: 8px; margin-top: 18px; }
.pc-about h3 { font-size: 17px; }
.pc-facts { display: grid; gap: 10px; margin-top: 6px; }
.pc-facts span { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.pc-safety { margin-top: 18px; }
.feature-tile.rooms-tile { background: linear-gradient(135deg, color-mix(in srgb, #ff2d9b 32%, transparent), color-mix(in srgb, #7c3aed 28%, transparent)); border-color: color-mix(in srgb, #ff2d9b 40%, transparent); }
.feature-tile.rooms-tile .row { align-items: center; gap: 12px; }
.feature-tile.rooms-tile b { font-size: 17px; }
.feature-tile.rooms-tile p { display: block; margin-top: 2px; }
.feature-tile .ft-icon.rooms { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #ff2d9b, #c026d3); }
.cr-top .plain-btn { background: none; color: var(--ink); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }

/* Chatroom header v2: treehouse bar + room pill; members drop down over the chat. */
.room-head2 { display: grid; gap: 10px; padding: max(8px, env(safe-area-inset-top)) 12px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.room-topbar { display: flex; align-items: center; gap: 8px; }
.room-topbar .logo { transform: scale(.92); transform-origin: left center; }
.room-topbar .hero-btn, .room-topbar .plain-btn { color: var(--ink); }
.room-pill { display: flex; align-items: center; gap: 12px; width: min(100%, 360px); padding: 7px 14px 7px 7px; border-radius: 999px; cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  background: color-mix(in srgb, #ff2d9b 8%, var(--surface-2)); border: 1.5px solid color-mix(in srgb, #ff2d9b 70%, transparent); box-shadow: 0 10px 26px -18px #ff2d9b; }
.room-pill b { display: block; font-size: 17px; }
.rp-count { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rp-count i, .dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.dot-on { margin: 0 5px 1px 0; vertical-align: middle; }
.rp-chev { transform: rotate(90deg); transition: transform .2s var(--ease); color: var(--ink-2); }
.room-pill.open .rp-chev { transform: rotate(-90deg); }
.room-middle { position: relative; }
.members-drop { position: absolute; top: 6px; left: 10px; right: 10px; z-index: 6; max-height: calc(100% - 12px); display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 22px; background: var(--surface); border: 1.5px solid color-mix(in srgb, #a855f7 45%, var(--line)); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); animation: dropIn .18s var(--ease); }
.members-drop[hidden] { display: none; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.md-head { display: flex; align-items: center; gap: 12px; }
.md-head b { display: block; font-size: 18px; }
.md-head p, .mp-head p { font-size: 13px; color: var(--muted); }
.md-icon { color: #ff4fae; }
.md-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.md-search .input { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.md-list, .mp-list { display: grid; overflow-y: auto; min-height: 0; }
.md-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.md-row:last-child { border-bottom: 0; }
.md-row b { display: block; font-size: 15.5px; }
.md-place { display: block; font-size: 13px; color: var(--muted); }
.md-row .room-av { width: 44px; height: 44px; }
.md-all { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border: 0; border-radius: 999px; color: #fff; font: 800 15.5px var(--font); cursor: pointer;
  background: linear-gradient(90deg, #12a9ff, #a855f7, #ff2d9b); }
.fr-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font: 700 13px var(--font); cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid #ff2d9b; }
.fr-btn.pending { border-color: var(--line); background: var(--surface-2); color: var(--ink-2); }
.fr-btn.incoming { background: #ff2d9b; color: #fff; }
.fr-btn.friends { background: #1d6fe0; border-color: #3b8bff; color: #fff; }
.fr-btn:disabled { opacity: .6; }
.members-page { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; gap: 12px; padding: max(10px, env(safe-area-inset-top)) 14px 14px; background: var(--bg); animation: chatIn .22s var(--ease); }
.mp-head { display: flex; align-items: center; gap: 10px; }
.mp-head h2 { font-size: 21px; }
.mp-list { flex: 1; }
.pc-actions .fr-btn { padding: 11px 18px; font-size: 15px; }
.room .plain-btn, .members-page .plain-btn { background: none; border: 0; color: var(--ink); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; padding: 0; }
.room .plain-btn:hover, .members-page .plain-btn:hover { background: var(--surface-2); }
.room-banner .plain-btn { width: 28px; height: 28px; }
.rx-row[hidden] { display: none; }
.rmsg-text { cursor: pointer; }
.md-row .grow { min-width: 0; } .md-row b, .md-place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-list, .mp-list { align-content: start; }
.fr-note { flex: none; font-size: 12px; color: var(--muted); }

/* ---- Custom avatars ---------------------------------------------------------------------------- */
.has-av { background: none !important; color: transparent; }
.has-av > .av-svg, .av-face > .av-svg { width: 100%; height: 100%; display: block; }
.avatar.has-av, .room-av.has-av { padding: 0; }
.room-av.has-av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); }
.person-tile .pt-initials.has-av { width: 112px; height: 112px; margin: 0 auto; border-radius: 50%; overflow: hidden; top: 18px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.swipe-art .big-initials.has-av { width: min(62%, 260px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 5px rgba(255,255,255,.25), 0 30px 60px -20px rgba(0,0,0,.5); }
.av-hero-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.av-pencil { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #2a2440; border: 2px solid rgba(255,255,255,.5); }

.av-page { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--night, #05051f); color: #fff; padding: max(12px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; animation: chatIn .24s var(--ease); }
.av-page .plain-btn { color: #fff; }
.av-top { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; }
.av-top .logo { justify-self: center; }
.av-top h1 { text-align: center; font-size: 21px; }
.av-head { text-align: center; }
.av-head h1 { font-size: 26px; letter-spacing: -.02em; }
.av-head p { color: rgba(255,255,255,.75); font-size: 14.5px; margin-top: 4px; }
.av-face { display: block; width: 100%; aspect-ratio: 1; border-radius: inherit; overflow: hidden; }
.av-preview { position: relative; align-self: center; width: min(62vw, 240px); aspect-ratio: 1; border-radius: 50%; overflow: visible; }
.av-preview .av-face { border-radius: 50%; box-shadow: 0 0 0 5px #ff4fae, 0 24px 60px -18px #ff2d9b; }
.av-preview.big { width: min(66vw, 260px); }
.av-preview .av-pencil { right: 8%; bottom: 6%; width: 44px; height: 44px; }
.av-pills { justify-content: center; }
.av-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.av-tile { border: 0; padding: 0; border-radius: 18px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: none; box-shadow: 0 10px 24px -14px rgba(0,0,0,.6); }
.av-tile .av-face { border-radius: 18px; }
.av-tile.on { outline: 3px solid #ff4fae; outline-offset: 2px; }
.av-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 6px; }
.av-cta { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border: 0; border-radius: 999px; color: #fff; font: 800 17px var(--font); cursor: pointer;
  background: linear-gradient(90deg, #ff2d9b, #a855f7 55%, #12a9ff); box-shadow: 0 16px 34px -16px #ff2d9b; }
.av-save { padding: 9px 20px; border: 0; border-radius: 999px; background: #ff2d9b; color: #fff; font: 800 15px var(--font); cursor: pointer; }
.av-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid rgba(255,255,255,.12); }
.av-tabs button { display: grid; justify-items: center; gap: 4px; padding: 8px 2px 10px; border: 0; background: none; color: rgba(255,255,255,.7); font: 600 12px var(--font); cursor: pointer; border-bottom: 3px solid transparent; }
.av-tabs button.on { color: #fff; border-bottom-color: #ff4fae; }
.av-tabs button.on .icon { color: #ff4fae; }
.av-body { display: grid; gap: 18px; }
.av-sec h3 { font-size: 17px; margin-bottom: 10px; }
.av-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scroll-snap-type: x proximity; }
.av-opt { flex: none; width: 92px; display: grid; gap: 6px; justify-items: center; padding: 0; border: 0; background: none; color: rgba(255,255,255,.85); font: 600 12px var(--font); cursor: pointer; scroll-snap-align: start; position: relative; }
.av-opt .av-face { width: 92px; border-radius: 16px; border: 2px solid rgba(255,255,255,.1); }
.av-opt.on .av-face { border-color: #ff4fae; }
.av-opt.on::after { content: '✓'; position: absolute; top: -4px; right: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #ff2d9b; color: #fff; font: 800 12px var(--font); }
.av-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.av-swatch { width: 52px; height: 52px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.av-swatch.on { border-color: #ff4fae; box-shadow: 0 0 0 3px #05051f inset; }
.av-page .plain-btn { background: none; border: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; padding: 0; }
.av-tabs button { font-size: 11px; letter-spacing: -.01em; }
.room-notice { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: var(--muted); padding: 5px 12px; border-radius: 999px; background: var(--surface-2); }
.room-notice.me { background: color-mix(in srgb, #ff2d9b 12%, var(--surface-2)); }
.new-pill { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 5; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #ff2d9b, #a855f7); color: #fff; font: 800 13.5px var(--font); box-shadow: 0 12px 28px -12px #ff2d9b; cursor: pointer; }
.new-pill[hidden] { display: none; }
.new-pill .icon { transform: rotate(90deg); }
