/* Vibio web app - design system + components.
   Tokens first; every component reads tokens only, so light/dark and future theming stay in one place. */
@font-face { font-family: "Baloo 2"; src: url("/fonts/baloo2.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --canvas: #fbf7f8;
  --canvas-2: #f5eef1;
  --surface: #ffffff;
  --surface-2: #fcf9fa;
  --raised: #ffffff;
  --line: #ece2e7;
  --line-strong: #dccfd6;
  --ink: #1d1320;
  --text: #46384a;
  --muted: #7e6d7b;
  --faint: #ab9ba8;
  --rose: #e2447e;
  --rose-ink: #c22f66;
  --rose-soft: #fdebf2;
  --violet: #7d45e3;
  --violet-soft: #f1eafd;
  --mint: #1c9466;
  --mint-soft: #e5f4ed;
  --amber: #c9861a;
  --amber-soft: #fcf2e0;
  --danger: #d23b57;
  --danger-soft: #fde9ed;
  --on-ink: #ffffff;
  --overlay: rgba(23, 12, 22, .46);
  --brand: linear-gradient(120deg, #ec4d86 0%, #c44fc0 55%, #7d45e3 100%);
  --shadow-xs: 0 1px 2px rgba(40, 14, 34, .06);
  --shadow-sm: 0 1px 2px rgba(40, 14, 34, .05), 0 2px 8px -3px rgba(40, 14, 34, .08);
  --shadow-md: 0 1px 2px rgba(40, 14, 34, .05), 0 12px 32px -14px rgba(60, 18, 50, .24);
  --shadow-lg: 0 2px 6px rgba(40, 14, 34, .05), 0 30px 70px -28px rgba(60, 18, 50, .42);
  --r-xs: 8px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --head: "Baloo 2", "Inter", system-ui, sans-serif;
  --body: "Inter", -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sidebar: 252px;
  --topbar: 60px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #141016; --canvas-2: #1c171f; --surface: #1d1820; --surface-2: #221c26; --raised: #262029;
    --line: #2f2733; --line-strong: #3d3342; --ink: #f7f0f5; --text: #d9ccd6; --muted: #a595a3; --faint: #77687a;
    --rose: #f0588f; --rose-ink: #ff7aa8; --rose-soft: #3a1a29; --violet: #a27bff; --violet-soft: #2a1f45;
    --mint: #45c993; --mint-soft: #15312a; --amber: #e6aa45; --amber-soft: #352914; --danger: #ff6b85; --danger-soft: #3d1a22;
    --on-ink: #1d1320; --overlay: rgba(0, 0, 0, .6);
    --shadow-xs: 0 1px 2px rgba(0,0,0,.4); --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 2px 8px -3px rgba(0,0,0,.4);
    --shadow-md: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.65); --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 30px 70px -28px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #141016; --canvas-2: #1c171f; --surface: #1d1820; --surface-2: #221c26; --raised: #262029;
  --line: #2f2733; --line-strong: #3d3342; --ink: #f7f0f5; --text: #d9ccd6; --muted: #a595a3; --faint: #77687a;
  --rose: #f0588f; --rose-ink: #ff7aa8; --rose-soft: #3a1a29; --violet: #a27bff; --violet-soft: #2a1f45;
  --mint: #45c993; --mint-soft: #15312a; --amber: #e6aa45; --amber-soft: #352914; --danger: #ff6b85; --danger-soft: #3d1a22;
  --on-ink: #1d1320; --overlay: rgba(0, 0, 0, .6);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4); --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 2px 8px -3px rgba(0,0,0,.4);
  --shadow-md: 0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.65); --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 30px 70px -28px rgba(0,0,0,.8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--text); font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--rose-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -.012em; line-height: 1.15; }
h1, .display { font-family: var(--head); font-weight: 750; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
::selection { background: var(--rose-soft); color: var(--rose-ink); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { padding: 40px 20px; text-align: center; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 24px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-logo { width: 40px; height: 40px; animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.88); opacity: .6; } }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand b { font-family: var(--head); font-weight: 800; font-size: 25px; line-height: 1; padding-top: 4px;
  background: linear-gradient(90deg, #ec4d86, #a94be3); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn { --h: 42px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 18px;
  border-radius: var(--r-sm); border: 1px solid transparent; background: none; font-weight: 600; font-size: 14.5px; letter-spacing: -.005em; line-height: 1;
  white-space: nowrap; user-select: none; text-decoration: none !important; color: var(--ink);
  transition: transform .15s var(--ease), background-color .15s, border-color .15s, color .15s, box-shadow .15s, opacity .15s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }
.btn-sm { --h: 34px; padding: 0 12px; font-size: 13.5px; border-radius: var(--r-xs); }
.btn-lg { --h: 50px; padding: 0 22px; font-size: 15.5px; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-primary { background: var(--rose); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 18px -10px rgba(226, 68, 126, .75); }
.btn-primary:hover:not(:disabled) { background: var(--rose-ink); }
:root[data-theme="dark"] .btn-primary:hover:not(:disabled) { background: #ff6b9c; }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover:not(:disabled) { opacity: .9; }
.btn-secondary { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--canvas-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.94); }
.btn-danger-ghost { color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }
.btn-icon { --h: 40px; width: var(--h); padding: 0; border-radius: var(--r-sm); }
.btn-icon.btn-sm { --h: 34px; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; color: var(--ink); }
.btn-primary.loading::after, .btn-ink.loading::after, .btn-danger.loading::after { color: #fff; border-color: #fff; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--rose); animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; padding: 0; color: var(--rose-ink); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--danger); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 104px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23887' stroke-width='2' stroke-linecap='round' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .reveal-pw { position: absolute; right: 4px; top: 4px; }
.counter { font-size: 12px; color: var(--faint); text-align: right; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--rose); flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.code-input { font-size: 26px; letter-spacing: .4em; text-align: center; height: 60px; font-variant-numeric: tabular-nums; font-weight: 600; padding-left: .4em; }

/* Chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--text); transition: background-color .15s, border-color .15s, color .15s; user-select: none; }
button.chip:hover { border-color: var(--faint); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip .x { width: 14px; height: 14px; opacity: .7; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--canvas-2); color: var(--text);
  font-size: 12.5px; font-weight: 550; }
.tag .icon { width: 14px; height: 14px; }
.tag.rose { background: var(--rose-soft); color: var(--rose-ink); }
.tag.violet { background: var(--violet-soft); color: var(--violet); }
.tag.mint { background: var(--mint-soft); color: var(--mint); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }

/* Segmented control */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-sm); background: var(--canvas-2); }
.segmented button { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: background-color .15s, color .15s, box-shadow .15s; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.segmented.block { display: flex; }
.segmented.block button { flex: 1; }

/* Switch */
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background-color .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease-out); }
.switch input:checked + span { background: var(--rose); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }

/* Range */
.range { width: 100%; accent-color: var(--rose); height: 24px; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; }
.range-head output { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.card-head h2 { font-size: 17px; font-weight: 650; }
.card-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.card-body { padding: 18px 24px 24px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.section-title { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 24px; min-height: 60px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row .title { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.list-row .sub { color: var(--muted); font-size: 13px; }
.list-row.link { color: inherit; text-decoration: none; transition: background-color .15s; cursor: pointer; }
.list-row.link:hover { background: var(--surface-2); text-decoration: none; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--canvas-2); color: var(--text); font-size: 14px; }
.callout .icon { margin-top: 1px; }
.callout.rose { background: var(--rose-soft); color: var(--rose-ink); }
.callout.amber { background: var(--amber-soft); color: var(--amber); }
.callout.danger { background: var(--danger-soft); color: var(--danger); }
.callout.mint { background: var(--mint-soft); color: var(--mint); }
.callout strong { display: block; color: inherit; }
.callout p { color: inherit; opacity: .92; }

/* Avatar */
.avatar { --s: 44px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; flex: none; background: var(--canvas-2); overflow: visible; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar .initial { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font-weight: 650; color: var(--muted); font-size: calc(var(--s) * .4); }
.avatar.online::after { content: ""; position: absolute; right: 0; bottom: 0; width: calc(var(--s) * .26); height: calc(var(--s) * .26); min-width: 10px; min-height: 10px;
  border-radius: 50%; background: var(--mint); border: 2px solid var(--surface); }
.avatar-sm { --s: 32px; }
.avatar-lg { --s: 56px; }
.avatar-xl { --s: 88px; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rose); color: #fff;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); flex: none; }
.verified { color: #3b82f6; }

/* Skeleton */
.skel { position: relative; overflow: hidden; background: var(--canvas-2); border-radius: var(--r-xs); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 1.3s infinite; }
:root[data-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); } }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-line { height: 12px; }
.skel-circle { border-radius: 50%; }

/* Empty + error states */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px; }
.empty .art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose); margin-bottom: 6px; }
.empty .art .icon { width: 28px; height: 28px; }
.empty h2, .empty h3 { font-size: 19px; font-weight: 650; }
.empty p { color: var(--muted); max-width: 380px; }
.empty .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 1000; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px));
  pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--on-ink);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; animation: toast-in .35s var(--ease-out); }
.toast.out { animation: toast-out .25s var(--ease) forwards; }
.toast .icon { width: 18px; height: 18px; }
.toast.error .icon { color: #ff8aa1; }
.toast.success .icon { color: #6ee0ad; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .8; font-weight: 650; padding: 4px 6px; border-radius: 6px; }
.toast button:hover { opacity: 1; background: rgba(127,127,127,.18); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Dialogs ---------- */
dialog.modal { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; color: inherit; overflow: hidden; }
dialog.modal::backdrop { background: transparent; }
.modal-scrim { position: fixed; inset: 0; background: var(--overlay); animation: fade-in .25s var(--ease); }
.modal-box { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 32px)); max-height: min(86vh, 860px); overflow: auto;
  background: var(--raised); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: modal-in .32s var(--ease-out); overscroll-behavior: contain; }
.modal-box.wide { width: min(720px, calc(100vw - 32px)); }
.modal-box.bare { background: transparent; box-shadow: none; overflow: visible; }
dialog.closing .modal-scrim { animation: fade-out .2s var(--ease) forwards; }
dialog.closing .modal-box { animation: modal-out .2s var(--ease) forwards; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 0; }
.modal-head h2 { font-size: 20px; font-weight: 700; }
.modal-head p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.modal-body { padding: 18px 24px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
@keyframes modal-out { to { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
@media (max-width: 640px) {
  .modal-box:not(.bare) { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0;
    padding-bottom: var(--safe-b); animation: sheet-in .38s var(--ease-out); }
  .modal-box:not(.bare)::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto -6px; }
  dialog.closing .modal-box:not(.bare) { animation: sheet-out .22s var(--ease) forwards; }
  .modal-foot .btn { flex: 1; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }

/* Popover / menu */
.menu { position: absolute; z-index: 60; min-width: 220px; padding: 6px; border-radius: var(--r-md); background: var(--raised); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); animation: pop-in .18s var(--ease-out); transform-origin: top right; }
.menu.up { transform-origin: bottom left; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; text-align: left;
  font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none !important; }
.menu button:hover, .menu a:hover, .menu button:focus-visible { background: var(--canvas-2); color: var(--ink); outline: none; }
.menu .danger { color: var(--danger); }
.menu .danger:hover { background: var(--danger-soft); color: var(--danger); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

/* ---------- Auth layout ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-main { display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 64px); }
.auth-main .brand { align-self: flex-start; }
.auth-form { width: 100%; max-width: 420px; margin: auto; padding: 40px 0; animation: rise .5s var(--ease-out); }
.auth-form h1 { font-size: clamp(32px, 4vw, 40px); line-height: 1.05; }
.auth-form .lead { color: var(--muted); margin: 10px 0 28px; font-size: 15.5px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }
.auth-legal { font-size: 12.5px; color: var(--faint); text-align: center; }
.auth-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-aside { position: sticky; top: 12px; height: calc(100vh - 24px); height: calc(100dvh - 24px); overflow: hidden; margin: 12px; border-radius: 28px; background: #170f1b; color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px; isolation: isolate; }
.auth-aside::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(520px 380px at 90% 0%, rgba(236, 77, 134, .5), transparent 70%), radial-gradient(560px 420px at 0% 100%, rgba(125, 69, 227, .55), transparent 70%); }
.auth-aside h2 { font-family: var(--head); font-size: clamp(30px, 3.4vw, 44px); color: #fff; line-height: 1.05; font-weight: 750; max-width: 460px; }
.auth-aside p { color: #d4c3d1; margin-top: 14px; max-width: 420px; font-size: 16px; }
.aside-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.aside-points li { display: flex; gap: 12px; align-items: center; color: #eadce6; font-size: 15px; }
.aside-points .icon { color: #ff8db4; }
.aside-cards { position: absolute; top: 48px; left: 48px; right: 48px; display: grid; gap: 12px; }
.aside-card { display: flex; align-items: center; gap: 12px; max-width: 320px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: floaty 7s ease-in-out infinite; }
.aside-card:nth-child(2) { margin-left: auto; animation-delay: -3s; }
.aside-card .ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #ff8db4; flex: none; }
.aside-card strong { display: block; font-size: 14px; }
.aside-card small { color: #bfaebc; font-size: 12.5px; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.steps-bar { display: flex; gap: 6px; margin-bottom: 26px; }
.steps-bar i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background-color .3s; }
.steps-bar i.on { background: var(--rose); }
.step-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.auth-sent { display: grid; justify-items: center; text-align: center; }
.auth-sent .art { width: 72px; height: 72px; border-radius: 22px; background: var(--rose-soft); color: var(--rose); display: grid; place-items: center; margin-bottom: 22px; }
.auth-sent .art .icon { width: 32px; height: 32px; }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

/* ---------- App shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 16px; border-right: 1px solid var(--line);
  background: var(--surface-2); }
.sidebar .brand { padding: 0 10px 18px; }
.nav { display: grid; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text); font-weight: 550;
  font-size: 14.5px; text-decoration: none; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--canvas-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav a[aria-current="page"] .icon { color: var(--rose); }
.nav a .badge { margin-left: auto; }
.nav-label { display: inline; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.bucks-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.bucks-chip:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.bucks-chip .coin { width: 30px; height: 30px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); display: grid; place-items: center; flex: none; }
.bucks-chip .coin .icon { width: 17px; height: 17px; }
.bucks-chip strong { font-size: 15px; font-variant-numeric: tabular-nums; display: block; line-height: 1.2; }
.bucks-chip small { font-size: 12px; color: var(--muted); }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: var(--r-md); border: 0; background: none; text-align: left; color: var(--ink); }
.me-btn:hover, .me-btn[aria-expanded="true"] { background: var(--canvas-2); }
.me-btn .name { font-weight: 600; font-size: 14px; display: block; }
.me-btn .mail { font-size: 12px; color: var(--muted); display: block; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.tabbar { display: none; }
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px clamp(16px, 3vw, 40px) 64px; animation: page-in .35s var(--ease-out); }
.page.narrow { max-width: 760px; }
.page.full { max-width: none; padding: 0; height: 100vh; height: 100dvh; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(28px, 3vw, 34px); }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bell { position: relative; }
.bell .badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; box-shadow: 0 0 0 2px var(--surface-2); }
.side-top { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.side-top .brand { padding-bottom: 18px; }
.side-top .bell { margin-top: -18px; }

@media (max-width: 1100px) and (min-width: 768px) {
  :root { --sidebar: 76px; }
  .sidebar { padding: 20px 12px 14px; align-items: center; }
  .sidebar .brand b, .nav-label, .bucks-chip div, .me-btn > span:not(.avatar) { display: none; }
  .sidebar .brand { padding: 0 0 16px; }
  .side-top { flex-direction: column; padding: 0; }
  .side-top .bell { margin: 0 0 12px; }
  .nav a { justify-content: center; width: 48px; padding: 0; }
  .nav a .badge { position: absolute; top: 4px; right: 2px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }
  .bucks-chip { padding: 8px; justify-content: center; }
  .me-btn { justify-content: center; }
}
@media (max-width: 767px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 6px; height: var(--topbar); padding: 0 8px 0 16px;
    background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
    border-bottom: 1px solid var(--line); }
  .topbar .brand b { font-size: 23px; }
  .topbar .brand svg { width: 24px; height: 24px; }
  .topbar .spacer { flex: 1; }
  .topbar .bucks-mini { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--amber-soft); color: var(--amber);
    font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; text-decoration: none; }
  .topbar .bucks-mini .icon { width: 16px; height: 16px; }
  .tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar) + var(--safe-b));
    padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
    border-top: 1px solid var(--line); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600;
    text-decoration: none; transition: color .15s; }
  .tabbar a .icon { width: 22px; height: 22px; transition: transform .2s var(--ease-out); }
  .tabbar a[aria-current="page"] { color: var(--rose); }
  .tabbar a[aria-current="page"] .icon { transform: translateY(-1px); }
  .tabbar a .badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .main { min-height: 100dvh; padding-bottom: calc(var(--tabbar) + var(--safe-b)); }
  .page { padding: 20px 16px 40px; }
  .page.full { height: calc(100dvh - var(--topbar) - var(--tabbar) - var(--safe-b)); }
  .shell.immersive .topbar, .shell.immersive .tabbar { display: none; }
  .shell.immersive .main { padding-bottom: 0; }
  .shell.immersive .page.full { height: 100dvh; }
  .page-head { margin-bottom: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .card-pad { padding: 20px; }
  .card-head { padding: 18px 20px 0; }
  .card-body { padding: 16px 20px 20px; }
  .list-row { padding: 12px 20px; }
}

/* ---------- Notifications panel ---------- */
.notif-panel { width: min(380px, calc(100vw - 24px)); padding: 0; max-height: min(70vh, 560px); overflow: auto; }
.notif-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; background: var(--raised); z-index: 1; }
.notif-head h3 { font-size: 15px; font-weight: 650; }
.notif-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; color: var(--text);
  text-decoration: none !important; }
.notif-item:hover { background: var(--canvas-2); }
.notif-item .t { font-size: 14px; color: var(--ink); font-weight: 550; line-height: 1.35; }
.notif-item .s { font-size: 12.5px; color: var(--muted); }
.notif-empty { padding: 28px 20px 32px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Discover ---------- */
.discover { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.deck { position: relative; width: 100%; max-width: 460px; margin: 0 auto; aspect-ratio: 3 / 4.15; }
.pcard { position: absolute; inset: 0; border-radius: var(--r-xl); overflow: hidden; background: #2a2030; box-shadow: var(--shadow-lg); user-select: none; touch-action: pan-y;
  transition: transform .45s var(--ease-out), opacity .45s var(--ease-out); will-change: transform; }
.pcard.behind { transform: scale(.95) translateY(14px); opacity: .7; pointer-events: none; }
.pcard.leave-left { transform: translateX(-120%) rotate(-14deg); opacity: 0; }
.pcard.leave-right { transform: translateX(120%) rotate(14deg); opacity: 0; }
.pcard.dragging { transition: none; }
.pcard .photo { position: absolute; inset: 0; }
.pcard .photo img { width: 100%; height: 100%; object-fit: cover; }
.pcard .bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.pcard .bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.pcard .bars i.on { background: #fff; }
.pcard .tap { position: absolute; top: 0; bottom: 40%; width: 50%; z-index: 2; border: 0; background: none; cursor: pointer; }
.pcard .tap.prev { left: 0; } .pcard .tap.next { right: 0; }
.pcard .tap:focus-visible { outline-offset: -4px; }
.pcard .info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 90px 22px 22px; color: #fff;
  background: linear-gradient(to top, rgba(14, 8, 16, .9) 0%, rgba(14, 8, 16, .55) 55%, transparent 100%); }
.pcard .name { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 32px; font-weight: 750; line-height: 1.05; color: #fff; }
.pcard .name .age { font-weight: 500; opacity: .9; }
.pcard .name .verified { color: #7fb8ff; width: 22px; height: 22px; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.86); }
.pcard .meta span { display: inline-flex; align-items: center; gap: 5px; }
.pcard .meta .icon { width: 15px; height: 15px; }
.pcard .bio { margin-top: 10px; font-size: 14.5px; color: rgba(255,255,255,.92); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .more { margin-top: 12px; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.18); height: 32px; font-size: 13px; }
.pcard .more:hover { background: rgba(255,255,255,.22); }
.pcard .stamp { position: absolute; top: 34px; z-index: 4; padding: 6px 14px; border: 3px solid; border-radius: 10px; font-weight: 800; font-size: 26px; letter-spacing: .06em;
  opacity: 0; transition: opacity .1s; }
.pcard .stamp.like { left: 22px; color: #5fe0a8; transform: rotate(-12deg); }
.pcard .stamp.nope { right: 22px; color: #ff7d97; transform: rotate(12deg); }
.pcard .online-pill { position: absolute; top: 24px; left: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(14, 8, 16, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 12px; font-weight: 600; }
.pcard .online-pill i { width: 7px; height: 7px; border-radius: 50%; background: #45d796; }
.deck-actions { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.act { display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-md); color: var(--ink);
  transition: transform .2s var(--ease-out), box-shadow .2s, background-color .2s, color .2s; }
.act:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow-lg); }
.act:active:not(:disabled) { transform: scale(.94); }
.act:disabled { opacity: .45; cursor: not-allowed; }
.act.pass { width: 60px; height: 60px; color: var(--danger); }
.act.like { width: 72px; height: 72px; background: var(--rose); border-color: var(--rose); color: #fff; box-shadow: 0 16px 30px -12px rgba(226, 68, 126, .7); }
.act.super { width: 52px; height: 52px; color: var(--violet); }
.act .icon { width: 26px; height: 26px; }
.act.like .icon { width: 30px; height: 30px; }
.act.super .icon { width: 22px; height: 22px; }
.kbd-hint { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 14px; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  font: 600 11.5px/1 var(--body); color: var(--muted); background: var(--surface); }
.side-panel { display: grid; gap: 16px; position: sticky; top: 32px; }
.deck-empty { position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--r-xl); border: 1px dashed var(--line-strong); background: var(--surface-2); }
.deck-skel { position: absolute; inset: 0; border-radius: var(--r-xl); }
@media (max-width: 1000px) {
  .discover { grid-template-columns: 1fr; }
  .side-panel { position: static; max-width: 460px; width: 100%; margin: 0 auto; }
}
@media (max-width: 767px) {
  .deck { max-width: none; aspect-ratio: auto; height: calc(100dvh - var(--topbar) - var(--tabbar) - var(--safe-b) - 160px); min-height: 380px; }
  .pcard .name { font-size: 28px; }
  .kbd-hint { display: none; }
  .deck-actions { margin-top: 16px; }
}

/* Match celebration */
.match-pop { text-align: center; padding: 36px 28px 28px; }
.match-pop h2 { font-family: var(--head); font-size: 40px; font-weight: 800; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.match-pop p { color: var(--muted); margin: 8px 0 24px; }
.match-avatars { display: flex; justify-content: center; margin-bottom: 22px; }
.match-avatars .avatar { --s: 96px; border: 4px solid var(--raised); box-shadow: var(--shadow-md); animation: pop-av .6s var(--ease-out) both; }
.match-avatars .avatar:first-child { transform: rotate(-6deg); margin-right: -14px; }
.match-avatars .avatar:last-child { transform: rotate(6deg); animation-delay: .08s; }
@keyframes pop-av { from { opacity: 0; scale: .6; } }

/* Profile sheet (viewing someone) */
.person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.person .gallery { position: relative; background: #2a2030; min-height: 420px; }
.person .gallery img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.person .gallery .bars { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; gap: 4px; z-index: 2; }
.person .gallery .bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.person .gallery .bars i.on { background: #fff; }
.person .gallery .nav-btn { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(14, 8, 16, .45);
  color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.person .gallery .nav-btn.prev { left: 12px; } .person .gallery .nav-btn.next { right: 12px; }
.person .details { padding: 28px; display: grid; gap: 18px; align-content: start; }
.person .details h2 { font-family: var(--head); font-size: 32px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.person .details h2 .age { font-weight: 500; color: var(--muted); }
.facts-list { display: grid; gap: 8px; }
.facts-list div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.facts-list .icon { width: 17px; height: 17px; color: var(--muted); }
.close-fab { position: absolute; top: 12px; right: 12px; z-index: 5; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(14, 8, 16, .5); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.close-fab:hover { background: rgba(14, 8, 16, .7); }
@media (max-width: 720px) {
  .person { grid-template-columns: 1fr; }
  .person .gallery { min-height: 0; aspect-ratio: 4 / 4.6; }
  .person .details { padding: 22px 20px 26px; }
}

/* ---------- Messages ---------- */
.messages { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; }
.convo-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface-2); min-height: 0; }
.convo-list-head { padding: 26px 20px 14px; display: grid; gap: 14px; }
.convo-list-head h1 { font-size: 28px; }
.convo-scroll { flex: 1; overflow-y: auto; padding: 0 10px 16px; overscroll-behavior: contain; }
.convo { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); color: inherit; text-decoration: none !important; transition: background-color .15s; }
.convo:hover { background: var(--canvas-2); }
.convo[aria-current="page"] { background: var(--surface); box-shadow: var(--shadow-sm); }
.convo .who { display: flex; align-items: baseline; gap: 8px; }
.convo .who b { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.convo .who time { margin-left: auto; font-size: 12px; color: var(--faint); flex: none; }
.convo .last { font-size: 13.5px; color: var(--muted); }
.convo.unread .last { color: var(--ink); font-weight: 600; }
.convo .tag { height: 20px; font-size: 11px; padding: 0 7px; }
.new-matches { display: flex; gap: 12px; overflow-x: auto; padding: 2px 10px 14px; scrollbar-width: none; }
.new-matches::-webkit-scrollbar { display: none; }
.new-match { display: grid; justify-items: center; gap: 6px; width: 64px; flex: none; color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none !important; }
.new-match .avatar { --s: 60px; box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px var(--rose); }
.new-match span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--canvas); height: 100%; }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 68px; border-bottom: 1px solid var(--line); background: var(--surface); }
.thread-head .who { display: flex; align-items: center; gap: 12px; min-width: 0; border: 0; background: none; padding: 4px; border-radius: var(--r-sm); text-align: left; color: inherit; }
.thread-head .who:hover { background: var(--canvas-2); }
.thread-head .who b { color: var(--ink); font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.thread-head .who small { display: block; font-size: 12.5px; color: var(--muted); }
.thread-head .actions { margin-left: auto; display: flex; gap: 4px; }
.thread-body { flex: 1; overflow-y: auto; padding: 20px clamp(12px, 3vw, 28px) 8px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.day-sep { align-self: center; margin: 14px 0 10px; font-size: 12px; font-weight: 600; color: var(--faint); }
.msg { display: flex; flex-direction: column; max-width: min(72%, 520px); }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg .b { padding: 9px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.msg.them .b { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me .b { background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 6px; }
.msg.super .b { background: var(--violet-soft); color: var(--ink); border-color: transparent; }
.msg.super .super-tag { font-size: 11.5px; font-weight: 650; color: var(--violet); display: inline-flex; gap: 4px; align-items: center; margin-bottom: 3px; }
.msg.cont .b { margin-top: 2px; }
.msg:not(.cont) { margin-top: 10px; }
.msg .photo-msg { border-radius: 16px; overflow: hidden; max-width: 280px; background: var(--canvas-2); cursor: zoom-in; border: 0; padding: 0; }
.msg .photo-msg img { width: 100%; height: auto; }
.msg .meta { font-size: 11.5px; color: var(--faint); margin-top: 4px; padding: 0 4px; }
.msg.pending .b { opacity: .6; }
.msg.failed .b { box-shadow: 0 0 0 1.5px var(--danger); }
.msg .retry { font-size: 12px; color: var(--danger); background: none; border: 0; padding: 4px; font-weight: 600; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--surface); border: 1px solid var(--line);
  margin-top: 10px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.composer .textarea { min-height: 44px; max-height: 160px; height: 44px; resize: none; padding: 11px 14px; border-radius: 22px; }
.composer .btn-icon { --h: 44px; border-radius: 50%; }
.thread-empty { margin: auto; text-align: center; padding: 30px; display: grid; justify-items: center; gap: 10px; max-width: 360px; }
.thread-empty .avatar { --s: 88px; margin-bottom: 6px; }
.thread-empty h3 { font-size: 18px; font-weight: 650; }
.thread-empty p { color: var(--muted); font-size: 14px; }
.no-thread { display: grid; place-items: center; height: 100%; }
.back-btn { display: none; }
@media (max-width: 900px) {
  .messages { grid-template-columns: 1fr; }
  .messages.has-thread .convo-list { display: none; }
  .messages:not(.has-thread) .thread, .messages:not(.has-thread) .no-thread { display: none; }
  .convo-list { border-right: 0; }
  .back-btn { display: inline-flex; }
}
@media (max-width: 767px) {
  .convo-list-head { padding: 18px 16px 12px; }
  .convo-list-head h1 { font-size: 24px; }
  .msg { max-width: 82%; }
}
.lightbox { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; box-shadow: var(--shadow-lg); animation: modal-in2 .3s var(--ease-out); }
@keyframes modal-in2 { from { opacity: 0; transform: scale(.96); } }

/* ---------- People grids ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.pc { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-xs); transition: transform .25s var(--ease-out), box-shadow .25s; }
.pc:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pc .ph { position: relative; aspect-ratio: 4 / 4.6; background: var(--canvas-2); border: 0; padding: 0; cursor: pointer; display: block; width: 100%; }
.pc .ph img { width: 100%; height: 100%; object-fit: cover; }
.pc .ph .online-pill { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: rgba(14,8,16,.55); color: #fff; font-size: 11px; font-weight: 600; }
.pc .ph .online-pill i { width: 6px; height: 6px; border-radius: 50%; background: #45d796; }
.pc .bd { padding: 14px; display: grid; gap: 10px; }
.pc .nm { font-weight: 650; color: var(--ink); font-size: 15px; display: flex; gap: 6px; align-items: center; }
.pc .nm span { font-weight: 450; color: var(--muted); }
.pc .sub { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.pc .acts { display: flex; gap: 6px; }
.pc .acts .btn { flex: 1; }
.req-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.req-row + .req-row { border-top: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; height: 44px; padding: 0 14px; border: 0; background: none; font-weight: 600; color: var(--muted); font-size: 14.5px; white-space: nowrap;
  display: inline-flex; gap: 8px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--rose); }
.spot-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.spot { display: grid; justify-items: center; gap: 6px; width: 76px; flex: none; border: 0; background: none; padding: 0; color: var(--text); font-size: 12.5px; font-weight: 600; }
.spot .avatar { --s: 68px; box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px var(--amber); }
.spot span { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Play ---------- */
.lobby-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); background: #170f1b; color: #fff; isolation: isolate; }
.lobby-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(520px 360px at 100% 0%, rgba(236, 77, 134, .42), transparent 70%), radial-gradient(520px 380px at 0% 110%, rgba(125, 69, 227, .5), transparent 70%); }
.lobby-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); }
.lobby-hero p { color: #d2c1cf; margin: 12px 0 28px; max-width: 520px; font-size: 16px; }
.lobby-hero .tag { background: rgba(255,255,255,.1); color: #f3e3ee; }
.lobby-hero .btn-light { background: #fff; color: #1d1320; }
.lobby-hero .btn-light:hover { box-shadow: 0 12px 30px -14px rgba(0,0,0,.7); }
.lobby-hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.25); }
.lobby-hero .btn-outline:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.05); }
.searching { display: flex; align-items: center; gap: 16px; }
.radar { position: relative; width: 56px; height: 56px; flex: none; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #ff8db4; animation: radar 2s var(--ease) infinite; opacity: 0; }
.radar i:nth-child(2) { animation-delay: .66s; } .radar i:nth-child(3) { animation-delay: 1.33s; }
.radar b { position: absolute; inset: 16px; border-radius: 50%; background: #ff8db4; }
@keyframes radar { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mode { display: grid; gap: 8px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); text-align: left; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .2s var(--ease-out); }
button.mode:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.mode[aria-pressed="true"] { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.mode .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); }
.mode b { color: var(--ink); font-size: 15px; font-weight: 650; }
.mode span { color: var(--muted); font-size: 13px; line-height: 1.45; }

.game { max-width: 720px; margin: 0 auto; }
.game-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.round-dots { display: flex; gap: 6px; }
.round-dots i { width: 28px; height: 6px; border-radius: 6px; background: var(--line); }
.round-dots i.done { background: var(--mint); }
.round-dots i.now { background: var(--rose); }
.question { font-family: var(--head); font-size: clamp(26px, 3.2vw, 34px); font-weight: 750; color: var(--ink); line-height: 1.15; margin: 6px 0 22px; }
.options { display: grid; gap: 12px; }
.option { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--surface);
  text-align: left; font-size: 16px; font-weight: 550; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .2s var(--ease-out), background-color .15s; }
.option:hover:not(:disabled) { border-color: var(--rose); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.option .k { width: 30px; height: 30px; border-radius: 9px; background: var(--canvas-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); flex: none; }
.option.picked { border-color: var(--rose); background: var(--rose-soft); }
.option.picked .k { background: var(--rose); color: #fff; }
.option.lie { border-color: var(--violet); background: var(--violet-soft); }
.option:disabled { cursor: default; }
.waiting { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--r-md); background: var(--canvas-2); color: var(--muted); font-size: 14px; }
.history { display: grid; gap: 10px; }
.history-item { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.history-item .q { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.history-item .a { display: flex; gap: 8px; color: var(--text); }
.history-item .a b { color: var(--muted); font-weight: 600; min-width: 72px; }
.partner-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.partner-card .avatar.hidden-av { background: var(--canvas-2); display: grid; place-items: center; color: var(--faint); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-head .avatar { --s: 96px; }
.profile-head h1 { font-size: 32px; display: flex; align-items: center; gap: 8px; }
.profile-head h1 .age { font-weight: 500; color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-slot { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--canvas-2); border: 1px solid var(--line); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot.cover::before { content: "Main"; position: absolute; left: 8px; top: 8px; z-index: 2; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(14,8,16,.6); color: #fff;
  font-size: 11px; font-weight: 650; display: inline-flex; align-items: center; }
.photo-slot .tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 4px; padding: 26px 6px 8px;
  background: linear-gradient(to top, rgba(14,8,16,.65), transparent); opacity: 0; transition: opacity .2s; }
.photo-slot:hover .tools, .photo-slot:focus-within .tools { opacity: 1; }
@media (hover: none) { .photo-slot .tools { opacity: 1; } }
.photo-slot .tools button { width: 32px; height: 32px; border-radius: 9px; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.photo-slot .tools button:hover { background: rgba(255,255,255,.32); }
.photo-slot .tools button:disabled { opacity: .35; }
.photo-slot .tools .icon { width: 16px; height: 16px; }
.photo-slot .hidden-note { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12px; background: rgba(14,8,16,.62); color: #fff; font-size: 12.5px; font-weight: 600; }
.photo-add { display: grid; place-items: center; align-content: center; gap: 8px; aspect-ratio: 3 / 4; border-radius: var(--r-md); border: 1.5px dashed var(--line-strong);
  background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; transition: border-color .15s, color .15s, background-color .15s; }
.photo-add:hover { border-color: var(--rose); color: var(--rose-ink); background: var(--rose-soft); }
.photo-add .icon { width: 24px; height: 24px; }
.photo-add.drag { border-color: var(--rose); background: var(--rose-soft); }
.upload-progress { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(14,8,16,.5); color: #fff; font-weight: 700; font-size: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.verify-steps { display: grid; gap: 14px; counter-reset: v; }
.vstep { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.vstep b { color: var(--ink); font-size: 14.5px; display: block; }
.vstep small { color: var(--muted); font-size: 13px; }
.vstep.done { border-color: color-mix(in srgb, var(--mint) 40%, var(--line)); background: var(--mint-soft); }
.vstep .thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }

/* ---------- Settings ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.settings-nav { position: sticky; top: 32px; display: grid; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: var(--r-sm); color: var(--text); font-weight: 550; font-size: 14px;
  text-decoration: none !important; }
.settings-nav a:hover { background: var(--canvas-2); color: var(--ink); }
.settings-nav a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.settings-nav .icon { width: 17px; height: 17px; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 16px 24px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .t { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.set-row .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 0 -16px; padding: 0 16px; }
  .settings-nav a { flex: none; }
}
@media (max-width: 767px) { .set-row { padding: 14px 20px; } }

/* ---------- Wallet ---------- */
.wallet-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 28px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, #2a1a2e, #170f1b); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.wallet-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(400px 260px at 100% 0%, rgba(244, 174, 61, .35), transparent 70%); }
.wallet-hero .lbl { color: #cdbdca; font-size: 13.5px; font-weight: 550; }
.wallet-hero .amt { font-family: var(--head); font-size: 52px; font-weight: 800; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; color: #fff; }
.wallet-hero .amt small { font-size: 18px; font-weight: 600; color: #e6c88f; margin-left: 6px; }
.streak { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.streak span { display: grid; place-items: center; width: 40px; height: 48px; border-radius: 10px; background: rgba(255,255,255,.07); font-size: 11px; color: #bfaebc; gap: 0; line-height: 1.1; }
.streak span b { font-size: 13px; color: #fff; }
.streak span.done { background: rgba(244, 174, 61, .22); }
.streak span.done b { color: #ffd38a; }
.streak span.next { box-shadow: 0 0 0 1.5px #ffd38a inset; }
.boosts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.boost { display: grid; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.boost .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); }
.boost b { color: var(--ink); font-size: 15.5px; font-weight: 650; }
.boost p { color: var(--muted); font-size: 13.5px; }
.boost .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.price { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.price .icon { width: 16px; height: 16px; color: var(--amber); }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pack { padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 4px; }
.pack b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pack span { color: var(--muted); font-size: 13px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.plan { padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; }
.plan.current { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.plan b { font-size: 17px; color: var(--ink); }
.plan ul { margin: 4px 0 0; padding-left: 18px; color: var(--text); font-size: 14px; display: grid; gap: 4px; }
@media (max-width: 600px) {
  .wallet-hero { grid-template-columns: 1fr; padding: 22px; }
  .wallet-hero .amt { font-size: 44px; }
}

/* ---------- Onboarding gate ---------- */
.gate { max-width: 520px; margin: 0 auto; padding: 48px 0; text-align: center; display: grid; justify-items: center; gap: 12px; }
.gate .art { width: 80px; height: 80px; border-radius: 24px; background: var(--rose-soft); color: var(--rose); display: grid; place-items: center; margin-bottom: 10px; }
.gate .art .icon { width: 36px; height: 36px; }
.gate h1 { font-size: 30px; }
.gate p { color: var(--muted); max-width: 440px; }
.gate .actions { display: grid; gap: 10px; width: 100%; max-width: 320px; margin-top: 14px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .skel::after, .radar i, .boot-logo { animation: none !important; }
}
