/* ============================================================
   Coravi — Design System + App Shell (rebuild 2026-07)
   Mobile-first. Desktop = 3 colunas. Salas = tema escuro.
   ============================================================ */
:root {
  /* Marca */
  --brand-1:#ff5e87;      /* rosa */
  --brand-2:#ff8a5b;      /* coral */
  --brand-grad: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  --brand-ink:#3f2338;    /* texto forte plum */
  --brand-soft:#fff2f5;   /* fundo rosado */

  /* Neutros */
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#fbfbfd;
  --line:#ececf1;
  --line-2:#e2e2ea;
  --ink:#1d1b22;
  --muted:#8a8593;
  --muted-2:#b6b2bd;

  /* Feedback */
  --danger:#e23b5a;
  --success:#22a06b;
  --warning:#e6a100;
  --info:#2f6bff;
  --gold:#f5b301;
  --diamond:#3aa0ff;

  /* Escala */
  --r-sm:10px; --r-md:14px; --r-lg:20px; --r-xl:28px; --r-pill:999px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px;
  --shadow-1:0 1px 2px rgba(24,20,32,.05), 0 1px 3px rgba(24,20,32,.06);
  --shadow-2:0 6px 20px rgba(24,20,32,.10);
  --shadow-3:0 16px 40px rgba(24,20,32,.22);
  --tap:44px;

  --nav-h:64px;       /* bottom-nav mobile */
  --topbar-h:56px;    /* topbar mobile */
  --rail-w:248px;     /* nav esquerda desktop */
  --rail2-w:320px;    /* rail direita desktop */
  --content-max:640px;
  --ease:cubic-bezier(.4,0,.2,1);
}

* { box-sizing:border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color:var(--ink); background:var(--bg);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img { max-width:100%; display:block; }
button { font-family:inherit; cursor:pointer; }
a { color:inherit; text-decoration:none; }
:focus-visible { outline:2px solid var(--brand-1); outline-offset:2px; }
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-thumb { background:#d8d5df; border-radius:99px; border:2px solid transparent; background-clip:content-box; }

/* ---------- Utilitários ---------- */
.hidden { display:none !important; }
.muted { color:var(--muted); }
.center { text-align:center; }
.row { display:flex; align-items:center; gap:var(--sp-3); }
.col { display:flex; flex-direction:column; }
.grow { flex:1 1 auto; min-width:0; }
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.spinner { width:22px; height:22px; border-radius:50%; border:3px solid var(--line-2); border-top-color:var(--brand-1); animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@keyframes spin { to { transform:rotate(360deg); } }

/* ---------- Botões ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:var(--tap); padding:0 18px; border:none; border-radius:var(--r-pill);
  font-size:15px; font-weight:700; background:var(--surface); color:var(--ink);
  border:1px solid var(--line-2); transition:transform .06s var(--ease), filter .15s, background .15s;
  line-height:1; }
.btn:active { transform:scale(.97); }
.btn:disabled { opacity:.55; cursor:not-allowed; }
.btn-primary { background:var(--brand-grad); color:#fff; border:none; box-shadow:0 6px 16px rgba(255,94,135,.32); }
.btn-primary:hover { filter:brightness(1.04); }
.btn-soft { background:var(--brand-soft); color:var(--brand-1); border:1px solid #ffdbe4; }
.btn-ghost { background:transparent; border:1px solid var(--line-2); }
.btn-dark { background:#20202a; color:#fff; border:none; }
.btn-block { width:100%; }
.btn-sm { min-height:36px; font-size:13px; padding:0 14px; }
.btn-icon { width:var(--tap); height:var(--tap); padding:0; border-radius:50%; }

/* ---------- Cartões / superfícies ---------- */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow-1); }
.chip { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 12px; border-radius:var(--r-pill);
  background:var(--surface); border:1px solid var(--line-2); font-size:13px; font-weight:600; color:var(--ink); white-space:nowrap; }
.chip.on { background:var(--brand-ink); color:#fff; border-color:var(--brand-ink); }
.badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px;
  border-radius:99px; background:var(--danger); color:#fff; font-size:11px; font-weight:800; }
.pill-live { display:inline-flex; align-items:center; gap:5px; height:22px; padding:0 9px; border-radius:99px;
  background:var(--danger); color:#fff; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; }
.pill-live::before { content:""; width:6px; height:6px; border-radius:50%; background:#fff; animation:pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
@keyframes floatup { 0%{opacity:0; transform:translateY(0) scale(.6)} 20%{opacity:1} 100%{opacity:0; transform:translateY(-220px) scale(1.3)} }
.tag-verified { color:var(--info); }
.tag-vip { background:linear-gradient(135deg,#f5b301,#ff8a5b); -webkit-background-clip:text; background-clip:text; color:transparent; font-weight:800; }

/* Moeda / diamante */
.coin::before { content:"🪙"; margin-right:5px; }
.gem::before { content:"💎"; margin-right:5px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app { min-height:100vh; min-height:100dvh; }

/* Topbar (mobile) */
.topbar { position:sticky; top:0; z-index:40; height:var(--topbar-h);
  display:flex; align-items:center; gap:var(--sp-3); padding:0 var(--sp-4);
  background:rgba(255,255,255,.9); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.topbar .logo { display:flex; align-items:center; gap:8px; font-weight:800; font-size:19px; color:var(--brand-ink); }
.topbar .logo b { background:var(--brand-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
.topbar-actions { margin-left:auto; display:flex; align-items:center; gap:6px; }
.icon-btn { position:relative; width:42px; height:42px; border-radius:50%; border:none; background:transparent; color:var(--brand-ink);
  display:flex; align-items:center; justify-content:center; }
.icon-btn:hover { background:var(--brand-soft); }
.icon-btn .badge { position:absolute; top:5px; right:5px; }
.hdr-wallet { display:flex; align-items:center; gap:8px; margin-left:auto; border:1px solid var(--line-2); background:var(--surface);
  border-radius:var(--r-pill); padding:5px 10px; font-size:12px; font-weight:800; color:var(--ink); white-space:nowrap; }
.hdr-wallet span { display:inline-flex; align-items:center; gap:3px; }
.hdr-wallet b { font-weight:800; }
.topbar-actions { margin-left:8px; }
@media (min-width:960px){ .hdr-wallet { display:none; } }

/* Nav esquerda (desktop) */
.rail { display:none; }

/* Área principal */
.main { max-width:var(--content-max); margin:0 auto; padding:var(--sp-4) var(--sp-4) calc(var(--nav-h) + 24px); }
.page { display:none; }
.page.active { display:block; animation:fade .18s var(--ease); }
@keyframes fade { from{opacity:0; transform:translateY(4px)} to{opacity:1; transform:none} }
.page-head { display:flex; align-items:center; gap:var(--sp-3); margin:2px 0 var(--sp-4); }
.page-head h1 { font-size:24px; font-weight:800; margin:0; letter-spacing:-.02em; }

/* Abas horizontais */
.tabs { display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; margin-bottom:var(--sp-4); scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tab { flex:0 0 auto; height:38px; padding:0 16px; border-radius:var(--r-pill); border:1px solid var(--line-2);
  background:var(--surface); font-weight:700; font-size:14px; color:var(--muted); }
.tab.on { background:var(--brand-ink); color:#fff; border-color:var(--brand-ink); }

/* Bottom nav (mobile) */
.botnav { position:fixed; left:0; right:0; bottom:0; z-index:50; height:var(--nav-h);
  display:grid; grid-template-columns:repeat(5,1fr);
  background:rgba(255,255,255,.96); backdrop-filter:blur(12px); border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom); }
.botnav .nav { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  border:none; background:transparent; color:var(--muted); font-size:11px; font-weight:700; position:relative; min-height:var(--tap); }
.botnav .nav svg { width:24px; height:24px; }
.botnav .nav.on { color:var(--brand-1); }
.botnav .nav.on::before { content:""; position:absolute; top:0; width:26px; height:3px; border-radius:0 0 3px 3px; background:var(--brand-grad); }
.botnav .nav .badge { position:absolute; top:6px; right:calc(50% - 22px); }

/* Rail direita (desktop) */
.rail2 { display:none; }

/* ---------- Estados vazios / skeleton ---------- */
/* grid-column:1/-1 garante centralizacao real quando o .empty e inserido
   sozinho dentro de um grid (live-grid/people-grid), nao so na 1a celula. */
.empty { grid-column:1 / -1; text-align:center; padding:48px 20px; color:var(--muted); }
.empty .emo { font-size:44px; margin-bottom:10px; }
.empty h3 { color:var(--ink); margin:0 0 6px; font-size:18px; }
.btn-orange { background:var(--brand-2); color:#fff; border:none; box-shadow:0 6px 16px rgba(255,138,91,.35); margin-top:6px; }
.skel { background:linear-gradient(100deg,#eee 30%,#f6f6f8 50%,#eee 70%); background-size:200% 100%; animation:sh 1.2s infinite; border-radius:12px; }
@keyframes sh { to { background-position:-200% 0; } }

/* ============================================================
   COMPONENTES DE CONTEÚDO
   ============================================================ */
/* Card de pessoa (Encontros/Por perto) */
.people-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:var(--sp-3); }
.person { position:relative; border-radius:var(--r-lg); overflow:hidden; background:#ddd; aspect-ratio:3/4; box-shadow:var(--shadow-1); }
.person img { width:100%; height:100%; object-fit:cover; }
.person .ov { position:absolute; inset:auto 0 0 0; padding:28px 12px 10px; color:#fff;
  background:linear-gradient(transparent, rgba(0,0,0,.72)); }
.person .nm { font-weight:800; font-size:15px; display:flex; align-items:center; gap:5px; }
.person .meta { font-size:12px; opacity:.9; }
.person .top { position:absolute; top:8px; left:8px; right:8px; display:flex; gap:6px; }
.person .online { width:11px; height:11px; border-radius:50%; background:#2ec16b; border:2px solid #fff; margin-left:auto; }

/* Swipe deck (Encontros) */
.deck { position:relative; height:calc(100dvh - 330px); max-height:560px; min-height:340px; }
.swipe-card { position:absolute; inset:0; border-radius:var(--r-xl); overflow:hidden; background:#ccc; box-shadow:var(--shadow-2); }
.swipe-card img { width:100%; height:100%; object-fit:cover; }
.swipe-card .ov { position:absolute; inset:auto 0 0 0; padding:60px 20px 18px; color:#fff; background:linear-gradient(transparent, rgba(0,0,0,.78)); }
.swipe-card .ov h2 { margin:0; font-size:26px; font-weight:800; display:flex; align-items:center; gap:8px; }
.deck-actions { display:flex; align-items:center; justify-content:center; gap:18px; margin-top:18px; }
.fab { width:60px; height:60px; border-radius:50%; border:none; box-shadow:var(--shadow-2); display:flex; align-items:center; justify-content:center; background:#fff; }
.fab.pass { color:var(--muted); } .fab.like { background:var(--brand-grad); color:#fff; width:68px; height:68px; }
.fab.star { color:var(--info); }

/* Lista de conversas */
.conv { display:flex; align-items:center; gap:12px; padding:10px 6px; border-radius:14px; }
.conv:hover { background:var(--surface-2); }
.conv .av { width:54px; height:54px; border-radius:50%; object-fit:cover; background:#ddd; flex:0 0 auto; }
.conv .nm { font-weight:700; }
.conv .last { color:var(--muted); font-size:13px; }
.conv .when { margin-left:auto; font-size:11px; color:var(--muted-2); align-self:flex-start; }

/* Rail direita (desktop): cards mais limpos, tiles da carteira achatados */
.rail2 .card { box-shadow:none; }
.rail2 .wallet { gap:10px; }
.rail2 .wallet .w { background:var(--surface-2); border:none; padding:12px; }
.rail2 .wallet .w .ico { font-size:22px; }
.rail2 .wallet .w b { font-size:18px; }

/* Banner "baixe o app" (Android) */
.install-banner { position:fixed; left:12px; right:12px; bottom:calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index:60;
  display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--surface); border:1px solid var(--line-2);
  border-radius:var(--r-lg); box-shadow:var(--shadow-3); animation:slideup .3s var(--ease); }
@keyframes slideup { from { transform:translateY(120%); opacity:0; } to { transform:none; opacity:1; } }
.install-banner img { width:44px; height:44px; border-radius:12px; }
.install-banner .ib-txt { flex:1; min-width:0; line-height:1.2; }
.install-banner .ib-txt b { font-size:15px; display:block; }
.install-banner .ib-txt span { font-size:12px; color:var(--muted); }
.install-banner .ib-close { width:28px; height:28px; border:none; background:transparent; color:var(--muted); font-size:22px; line-height:1; flex:0 0 auto; }
@media (min-width:960px){ .install-banner { display:none; } }

/* Álbum de fotos */
.photo-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.photo-cell { position:relative; aspect-ratio:1; border-radius:12px; overflow:hidden; background:#eee; }
.photo-cell img, .photo-cell video { width:100%; height:100%; object-fit:cover; }
.ph-del { position:absolute; top:4px; right:4px; width:24px; height:24px; border-radius:50%; border:none; background:rgba(0,0,0,.55); color:#fff; font-size:16px; line-height:1; display:flex; align-items:center; justify-content:center; }

/* Rolagem infinita (Por perto) */
#perto-sentinel { height:1px; }
.perto-loading { display:flex; justify-content:center; padding:20px 0 8px; }
.perto-loading.hidden { display:none; }
/* IMPORTANTE: o anuncio ocupa 1 CELULA do grid (mesmo tamanho/formato de uma
   miniatura .person, aspect-ratio 3/4), misturado entre os perfis — NAO e'
   largura cheia. Decisao explicita do user em 2026-07-17; nao alterar sem
   ordem direta dele. Ver memoria [[site-rebuild-2026-07]]. */
.ad-slot { position:relative; aspect-ratio:3/4; border:1px solid var(--line); border-radius:var(--r-lg); padding:14px 10px; background:var(--surface-2);
  display:flex; align-items:center; justify-content:center; overflow:hidden; }
.ad-slot .ad-tag { position:absolute; top:6px; left:8px; font-size:10px; color:var(--muted-2); text-transform:uppercase; letter-spacing:.5px; }
.ad-slot ins.adsbygoogle { width:100%; max-height:100%; }

/* Carteira */
.wallet { display:flex; gap:12px; }
.wallet .w { flex:1; display:flex; align-items:center; gap:10px; padding:14px; border-radius:var(--r-md); background:var(--surface); border:1px solid var(--line); }
.wallet .w .ico { font-size:26px; }
.wallet .w b { font-size:20px; } .wallet .w small { color:var(--muted); font-weight:700; font-size:11px; text-transform:uppercase; }

/* ============================================================
   MODAL / SHEET
   ============================================================ */
.scrim { position:fixed; inset:0; z-index:100; background:rgba(20,16,28,.55); display:flex; align-items:flex-end; justify-content:center; }
@media (min-width:640px){ .scrim { align-items:center; } }
.sheet { background:var(--surface); width:100%; max-width:480px; border-radius:var(--r-xl) var(--r-xl) 0 0; padding:20px; max-height:92vh; overflow:auto; box-shadow:var(--shadow-3); }
@media (min-width:640px){ .sheet { border-radius:var(--r-xl); } }
.sheet h3 { margin:0 0 4px; font-size:20px; }
.sheet .grab { width:40px; height:4px; border-radius:99px; background:var(--line-2); margin:0 auto 14px; }
.field { margin:12px 0; } .field label { display:block; font-size:13px; font-weight:700; margin-bottom:6px; }
.field input, .field select, .field textarea { width:100%; min-height:var(--tap); padding:11px 14px; border:1px solid var(--line-2); border-radius:var(--r-md); font-size:15px; background:var(--surface); }
.summary { background:var(--brand-soft); border:1px solid #ffdbe4; border-radius:var(--r-md); padding:12px; font-size:14px; }
.summary .r { display:flex; justify-content:space-between; padding:3px 0; }
.summary .r b { color:var(--brand-1); }

/* Loja de moedas */
.packs { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.pack { text-align:center; padding:16px 12px; border:1.5px solid var(--line-2); border-radius:var(--r-lg); background:var(--surface); }
.pack .n { font-size:22px; font-weight:800; } .pack .p { color:var(--brand-1); font-weight:800; margin-top:4px; }
.pack.best { border-color:var(--brand-1); position:relative; }
.pack.best::after { content:"Melhor valor"; position:absolute; top:-10px; left:50%; transform:translateX(-50%); background:var(--brand-grad); color:#fff; font-size:10px; font-weight:800; padding:3px 8px; border-radius:99px; }

/* Toast */
.toast-wrap { position:fixed; left:0; right:0; bottom:calc(var(--nav-h) + 14px); z-index:200; display:flex; flex-direction:column; align-items:center; gap:8px; pointer-events:none; }
.toast { background:#20202a; color:#fff; padding:11px 18px; border-radius:99px; font-size:14px; font-weight:600; box-shadow:var(--shadow-2); animation:fade .2s; }
.toast.err { background:var(--danger); } .toast.ok { background:var(--success); }

/* ============================================================
   THREAD DE CHAT (overlay)
   ============================================================ */
.thread { position:fixed; inset:0; z-index:110; background:var(--bg); display:flex; flex-direction:column; }
.thread-head { display:flex; align-items:center; gap:10px; padding:10px 12px; padding-top:calc(10px + env(safe-area-inset-top));
  background:var(--surface); border-bottom:1px solid var(--line); }
.thread-head .av { width:40px; height:40px; border-radius:50%; object-fit:cover; background:#ddd; }
.thread-head .nm { font-weight:800; line-height:1.1; }
.thread-head .st { font-size:12px; color:var(--muted); }
.thread-head .on { color:var(--success); }
.thread-body { flex:1; overflow-y:auto; padding:16px 14px; display:flex; flex-direction:column; gap:8px; }
.bubble { max-width:78%; padding:9px 13px; border-radius:18px; font-size:15px; line-height:1.4; word-wrap:break-word; box-shadow:var(--shadow-1); }
.bubble.them { align-self:flex-start; background:var(--surface); border:1px solid var(--line); border-bottom-left-radius:6px; }
.bubble.me { align-self:flex-end; background:var(--brand-grad); color:#fff; border-bottom-right-radius:6px; }
.bubble img { border-radius:12px; margin:-2px 0; max-height:280px; width:auto; }
.bubble .t { font-size:10px; opacity:.7; margin-top:3px; text-align:right; }
.thread-bar { display:flex; align-items:center; gap:8px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--line); }
.thread-bar input[type=text] { flex:1; min-height:44px; border:1px solid var(--line-2); border-radius:var(--r-pill); padding:0 16px; font-size:15px; background:var(--surface-2); }
.day-sep { align-self:center; font-size:12px; color:var(--muted); background:var(--surface); border:1px solid var(--line); padding:3px 12px; border-radius:99px; margin:6px 0; }
@media (min-width:960px){ .thread { left:auto; width:min(560px,46vw); border-left:1px solid var(--line); } }

/* Videochamada / sala de vídeo (LiveKit) */
.callview { position:fixed; inset:0; z-index:130; background:#0d0d12; color:#fff; display:flex; flex-direction:column; }
.callview .stage { flex:1; position:relative; overflow:hidden; }
.callview video { position:absolute; width:100%; height:100%; object-fit:cover; background:#0d0d12; }
.callview .remote { inset:0; }
.callview .local { right:12px; top:calc(12px + env(safe-area-inset-top)); width:104px; height:150px; border-radius:14px; overflow:hidden; box-shadow:var(--shadow-2); z-index:2; background:#222; }
.callview .local video { border-radius:14px; }
.callview .c-top { position:absolute; top:0; left:0; right:0; z-index:3; display:flex; align-items:center; gap:10px; padding:16px; padding-top:calc(16px + env(safe-area-inset-top)); background:linear-gradient(rgba(0,0,0,.5),transparent); }
.callview .c-status { text-align:center; margin:auto; z-index:3; }
.callview .c-bar { display:flex; align-items:center; justify-content:center; gap:18px; padding:20px; padding-bottom:calc(20px + env(safe-area-inset-bottom)); z-index:3; }
.c-btn { width:58px; height:58px; border-radius:50%; border:none; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.16); color:#fff; }
.c-btn.end { background:var(--danger); } .c-btn.off { background:#fff; color:#111; }

/* ============================================================
   SALAS AO VIVO (tema escuro)
   ============================================================ */
.live-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.live-cell { position:relative; aspect-ratio:3/4; border-radius:var(--r-lg); overflow:hidden; background:#222; box-shadow:var(--shadow-1); }
.live-cell img { width:100%; height:100%; object-fit:cover; }
.live-cell .top { position:absolute; top:8px; left:8px; right:8px; display:flex; align-items:center; }
.live-cell .viewers { margin-left:auto; background:rgba(0,0,0,.5); color:#fff; font-size:11px; font-weight:700; padding:3px 8px; border-radius:99px; }
.live-cell .bot { position:absolute; left:8px; right:8px; bottom:8px; color:#fff; }
.live-cell .bot .nm { font-weight:800; font-size:14px; }
.live-fab { position:fixed; right:16px; bottom:calc(var(--nav-h) + 16px); z-index:45; width:58px; height:58px; border-radius:50%; border:none; background:var(--brand-grad); color:#fff; box-shadow:var(--shadow-2); display:flex; align-items:center; justify-content:center; }

/* Room fullscreen */
.room { position:fixed; inset:0; z-index:120; background:#101014; color:#fff; display:flex; flex-direction:column; }
.room video { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.room .r-top { position:relative; z-index:2; display:flex; align-items:center; gap:10px; padding:14px; }
.room .r-chat { position:relative; z-index:2; margin-top:auto; padding:12px 14px; display:flex; flex-direction:column; gap:8px; max-height:38vh; }
.room .r-msg { background:rgba(0,0,0,.4); border-radius:14px; padding:7px 12px; font-size:14px; align-self:flex-start; max-width:85%; }
.room .r-bar { position:relative; z-index:2; display:flex; gap:8px; padding:10px 14px calc(10px + env(safe-area-inset-bottom)); }
.room .r-bar input { flex:1; background:rgba(255,255,255,.12); border:none; color:#fff; border-radius:99px; padding:12px 16px; }

/* ============================================================
   DESKTOP (≥ 960px) — 3 colunas
   ============================================================ */
@media (min-width:960px){
  .topbar { display:none; }
  .botnav { display:none; }
  .live-fab { bottom:24px; }
  .app { display:grid; grid-template-columns:var(--rail-w) minmax(0,1fr) var(--rail2-w); max-width:1280px; margin:0 auto; align-items:start; }
  .rail { display:flex; flex-direction:column; gap:4px; position:sticky; top:0; height:100vh; padding:20px 14px; border-right:1px solid var(--line); }
  .rail .logo { display:flex; align-items:center; gap:8px; font-weight:800; font-size:22px; color:var(--brand-ink); padding:8px 12px 18px; }
  .rail .logo b { background:var(--brand-grad); -webkit-background-clip:text; background-clip:text; color:transparent; }
  .rail .nav { display:flex; align-items:center; gap:14px; padding:12px 14px; border-radius:14px; border:none; background:transparent; color:var(--ink); font-size:16px; font-weight:700; width:100%; }
  .rail .nav svg { width:24px; height:24px; }
  .rail .nav:hover { background:var(--brand-soft); }
  .rail .nav.on { background:var(--brand-ink); color:#fff; }
  .rail .nav .badge { margin-left:auto; }
  .rail .me { margin-top:auto; }
  .main { max-width:none; padding:24px 28px 40px; }
  .rail2 { display:block; position:sticky; top:0; height:100vh; overflow:auto; padding:24px 18px; border-left:1px solid var(--line); }
  .people-grid, .live-grid { grid-template-columns:repeat(3,1fr); }
  .deck { height:560px; max-height:560px; }
  .room { left:auto; width:min(440px,40vw); }
}
@media (min-width:1200px){
  .people-grid { grid-template-columns:repeat(4,1fr); }
}
