/* =========================================================================
   Visse Live — design system
   Ink backgrounds, glass surfaces, a violet→mint signature gradient,
   pill-shaped controls, Sora for display type and Inter for UI text.
   ========================================================================= */

/* ---------- Themes ---------- */
:root, [data-theme="visse"] {
  --bg: #0a0a12;
  --bg-glow-1: rgba(124, 92, 255, .22);
  --bg-glow-2: rgba(45, 225, 194, .12);
  --surface: rgba(255, 255, 255, .035);
  --surface-solid: #12121c;
  --surface-2: rgba(255, 255, 255, .06);
  --surface-3: rgba(255, 255, 255, .1);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #f3f2fa;
  --muted: #a3a1b8;
  --faint: #6f6d85;
  --brand: #7c5cff;
  --brand-2: #2de1c2;
  --brand-text: #a996ff;
  --on-brand: #ffffff;
  --live: #ff4d6d;
  --ok: #2de1c2;
  --danger: #ff4d6d;
  --name-l: 72%;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --input-bg: rgba(0, 0, 0, .25);
  --tile-bg: #05050a;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f4fb;
  --bg-glow-1: rgba(109, 75, 255, .14);
  --bg-glow-2: rgba(18, 184, 160, .1);
  --surface: rgba(255, 255, 255, .75);
  --surface-solid: #ffffff;
  --surface-2: rgba(20, 16, 50, .045);
  --surface-3: rgba(20, 16, 50, .08);
  --border: rgba(20, 16, 50, .09);
  --border-strong: rgba(20, 16, 50, .16);
  --text: #16142b;
  --muted: #5d5a77;
  --faint: #8d8aa6;
  --brand: #6d4bff;
  --brand-2: #12b8a0;
  --brand-text: #5a37f0;
  --name-l: 40%;
  --shadow: 0 24px 50px -24px rgba(30, 20, 80, .35);
  --input-bg: #ffffff;
  --tile-bg: #0c0b16;
  color-scheme: light;
}
[data-theme="sunset"] { --bg: #120a0c; --bg-glow-1: rgba(255, 106, 61, .2); --bg-glow-2: rgba(255, 61, 139, .14); --surface-solid: #1c1114; --brand: #ff6a3d; --brand-2: #ff3d8b; --brand-text: #ff9a76; --ok: #ffb03d; }
[data-theme="ocean"] { --bg: #070d18; --bg-glow-1: rgba(47, 123, 255, .22); --bg-glow-2: rgba(34, 211, 238, .14); --surface-solid: #0e1626; --brand: #2f7bff; --brand-2: #22d3ee; --brand-text: #7fb0ff; --ok: #22d3ee; }
[data-theme="forest"] { --bg: #08100b; --bg-glow-1: rgba(34, 197, 94, .18); --bg-glow-2: rgba(198, 244, 50, .1); --surface-solid: #0f1912; --brand: #22c55e; --brand-2: #c6f432; --brand-text: #7ee2a2; --on-brand: #06210f; --ok: #c6f432; }
[data-theme="mono"] { --bg: #0c0c0d; --bg-glow-1: rgba(255, 255, 255, .06); --bg-glow-2: rgba(255, 255, 255, .03); --surface-solid: #161618; --brand: #fafafa; --brand-2: #9a9aa8; --brand-text: #e5e5ea; --on-brand: #0c0c0d; --ok: #d4d4dc; }
[data-theme="amoled"] { --bg: #000; --bg-glow-1: rgba(124, 92, 255, .1); --bg-glow-2: rgba(45, 225, 194, .05); --surface: rgba(255, 255, 255, .03); --surface-solid: #0a0a0d; }
:root { --grad: linear-gradient(135deg, var(--brand), var(--brand-2)); --ease: cubic-bezier(.2, .8, .2, 1); }

/* ---------- Base ---------- */
/* No scroll bars anywhere: panels are sized to fit, and what does scroll
   (chat, long lists, the page) moves with the mouse wheel or touchpad. */
* { box-sizing: border-box; scrollbar-width: none; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
/* The glow lives on its own fixed layer: the GPU composites it once instead of
   repainting the page background on every scroll (background-attachment: fixed). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(800px 520px at 100% 0%, var(--bg-glow-2), transparent 60%);
}
body.in-room::before { display: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--brand) 40%, transparent); }
h1, h2, h3, .display { font-family: "Sora Variable", "Sora", "Inter Variable", system-ui, sans-serif; letter-spacing: -0.02em; }
h1 { font-size: 28px; line-height: 1.15; margin: 0 0 8px; font-weight: 700; }
h2 { font-size: 21px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; }
h3 { font-size: 16px; margin: 0 0 6px; font-weight: 650; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: 2px 7px; border-radius: 7px; border: 1px solid var(--border); }
.icon { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap { gap: 14px; } .gap-sm { gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.center { text-align: center; }
.center-x { justify-content: center; }
.mt { margin-top: 14px; } .mt-sm { margin-top: 8px; } .mt-lg { margin-top: 24px; }
.pad { padding: 10px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { border-radius: 9px; display: block; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.wordmark { display: inline-flex; align-items: center; gap: 7px; font-family: "Sora Variable", "Sora", sans-serif; font-weight: 680; font-size: 19px; letter-spacing: -0.005em; }
.live-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px 2px 16px; border-radius: 999px; color: var(--on-brand); background: var(--grad); position: relative;
}
.live-tag::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: 66px; padding: 0 max(18px, calc((100vw - 1180px) / 2));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-center { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.nav-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 550; transition: color .15s, background .15s; }
.nav-pill:hover { color: var(--text); }
.nav-pill.active { color: var(--text); background: var(--surface-3); }
.nav-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.user-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; font-weight: 550;
}
.user-chip:hover { background: var(--surface-2); }
.user-chip .avatar { border-radius: 50%; }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown .menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 230px;
  background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 16px; padding: 6px;
  box-shadow: var(--shadow); animation: pop .14s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dropdown .menu.right { left: auto; right: 0; }
.dropdown.up .menu { top: auto; bottom: calc(100% + 10px); }
.dropdown.open .menu { display: block; }
.menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: 0; border-radius: 11px;
  background: none; text-align: left; font-size: 14px; color: var(--text);
}
.menu-item:hover, .menu-item.active { background: var(--surface-2); }
.menu-item.danger { color: var(--danger); }
.menu-item small { display: block; color: var(--muted); font-size: 12px; }
.menu-label { padding: 7px 11px 9px; font-size: 12px; color: var(--muted); }
.swatch { width: 26px; height: 26px; border-radius: 9px; border: 1px solid var(--border-strong); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .2s, opacity .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn.primary {
  background: var(--grad); color: var(--on-brand); border-color: transparent;
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--brand) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn.primary:hover { box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--brand) 95%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:disabled { box-shadow: none; filter: saturate(.4); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.outline-accent { background: transparent; border-color: color-mix(in srgb, var(--brand) 55%, transparent); color: var(--brand-text); }
.btn.outline-accent:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.btn.outline-plain { background: var(--surface); }
.btn.danger-outline { border-color: color-mix(in srgb, var(--danger) 60%, transparent); color: var(--danger); background: transparent; }
.btn.watching { border-color: color-mix(in srgb, var(--brand-2) 60%, transparent); color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 12%, transparent); }
.btn.discord-btn svg { color: #5865f2; }
.btn.discord-solid { background: #5865f2; color: #fff; border-color: transparent; box-shadow: 0 10px 26px -12px #5865f2; }
.btn.block { width: 100%; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 15.5px; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; gap: 6px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid transparent; background: none; color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.boxed { border-color: var(--border-strong); background: var(--surface); }
.text-link { display: inline; color: var(--brand-text); font-weight: 550; background: none; border: 0; padding: 0; font-size: inherit; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link.inline { display: inline; }
.label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.hint { color: var(--faint); font-size: 12.5px; margin: 8px 2px 16px; }
.input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px;
  background: var(--input-bg); border: 1px solid var(--border-strong); outline: none; font-size: 15.5px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 13px 16px; resize: vertical; }
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.select { width: auto; height: 42px; font-size: 14px; padding: 0 12px; border-radius: 999px; }
.error { color: var(--danger); font-size: 14px; min-height: 1.2em; }
.field-wrap { position: relative; display: flex; align-items: center; }
.field-wrap .prefix { position: absolute; left: 16px; color: var(--faint); font-size: 14px; pointer-events: none; font-family: ui-monospace, Consolas, monospace; }
.field-wrap .input.with-prefix { padding-left: 74px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 15px; }
.field-wrap .input-icon { position: absolute; left: 16px; color: var(--faint); pointer-events: none; }
.field-wrap .input.with-icon { padding-left: 44px; }

/* Segmented / chips */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.segmented.compact { display: inline-grid; }
.seg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 999px; border: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--muted);
}
.seg:hover { color: var(--text); }
.seg.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg .n { color: var(--faint); font-weight: 500; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.chip:hover { color: var(--text); }
.chip.active { color: var(--on-brand); background: var(--grad); border-color: transparent; }
.option-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; text-align: left;
  border: 1px solid var(--border-strong); background: var(--surface); transition: border-color .15s, background .15s;
}
.option-card b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.option-card small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.option-card:hover { background: var(--surface-2); }
.option-card.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.option-card.active b .icon { color: var(--brand-text); }
.divider { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dot.green { background: var(--ok); } .dot.blue { background: var(--brand); }
.dot.live { position: relative; background: var(--live); }
.dot.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live); animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3); opacity: 0; } }
.badge-live .dot.live::after { display: none; }
.badge-live { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live); font-size: 11px; font-weight: 800; letter-spacing: .08em; }

/* ---------- Layout ---------- */
.view { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 18px 72px; }
.view.full { max-width: none; padding: 0; display: flex; flex-direction: column; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px; }
.glass {
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong); border-radius: 26px; box-shadow: var(--shadow);
}
.grad-border { position: relative; }
.grad-border::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 80%, transparent), transparent 40%, transparent 60%, color-mix(in srgb, var(--brand-2) 70%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.center-card { max-width: 460px; margin: 40px auto; padding: 34px; }
.center-card.wide { max-width: 660px; }
.empty { grid-column: 1 / -1; padding: 46px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 22px; }
.empty .icon { color: var(--faint); margin-bottom: 8px; }
.site-footer { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; padding: 26px 18px 34px; color: var(--faint); font-size: 13px; }
.site-footer a:hover { color: var(--text); }
body.in-room .site-footer, body.wide-page.map-open .site-footer { display: none; }

/* Avatars */
.avatar {
  flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 38px; height: 38px; border-radius: 50%; font-weight: 700; color: #fff; font-family: "Sora Variable", sans-serif;
  background: linear-gradient(135deg, hsl(var(--h, 260) 70% 58%), hsl(calc(var(--h, 260) + 40) 70% 46%));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 26px; height: 26px; font-size: 11.5px; }
.avatar.md { width: 46px; height: 46px; font-size: 18px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; border-radius: 20px; }
.avatar.xl { width: 96px; height: 96px; font-size: 38px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--surface-solid); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .more { display: inline-grid; place-items: center; height: 26px; min-width: 26px; padding: 0 6px; margin-left: -8px; border-radius: 999px; background: var(--surface-3); border: 2px solid var(--surface-solid); font-size: 11px; font-weight: 700; color: var(--muted); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 30px 0 10px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.035em; margin: 18px 0 18px; font-weight: 750; }
.hero .lead { color: var(--muted); font-size: 17.5px; max-width: 520px; margin: 0 0 26px; }
.live-pill { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); font-size: 13.5px; font-weight: 600; }
.live-pill b { font-variant-numeric: tabular-nums; }
.perks { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.perks li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.perks li .icon { color: var(--brand-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.launcher { padding: 28px; }
.launcher h2 { font-size: 22px; margin-bottom: 4px; }
.launcher .sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.launcher-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.launcher-foot .who { display: inline-flex; align-items: center; gap: 8px; }
.name-row { display: flex; gap: 8px; }
.name-row .btn { height: 50px; width: 50px; padding: 0; flex: none; }
.account-links { display: flex; gap: 8px; margin-top: 14px; }
.account-links .btn { flex: 1; }
.section { margin-top: 72px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step3 { padding: 22px; }
.step3 .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--grad); color: var(--on-brand); font-family: "Sora Variable", sans-serif; font-weight: 750; margin-bottom: 14px; }
.step3 p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Room cards (home + explore) ---------- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.room-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s, background .18s;
}
.room-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); opacity: .0; transition: opacity .2s; }
.room-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2); }
.room-card:hover::after { opacity: 1; }
.room-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-card .ago { color: var(--faint); font-size: 12px; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-name { font-family: "Sora Variable", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; word-break: break-word; line-height: 1.25; }
.room-card .people-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.counts span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); color: var(--faint); font-size: 12px; font-weight: 600; }
.counts .on { color: var(--text); }
.counts .on .icon { color: var(--brand-2); }
.room-card .btn { margin-top: auto; }

/* ---------- Explore (public rooms) ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 34px; margin: 0; display: flex; align-items: center; gap: 12px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.count-badge { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px; background: var(--surface-3); font-size: 14px; font-family: "Inter Variable", sans-serif; letter-spacing: 0; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar .field-wrap { flex: 1; min-width: 240px; }

/* ---------- Map ---------- */
.map-page { position: relative; flex: 1; min-height: calc(100vh - 66px); display: flex; }
.map { position: relative; flex: 1; min-height: 420px; background: var(--surface-solid); z-index: 0; }
.map.picker { height: 380px; min-height: 0; border-radius: 16px; overflow: hidden; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.map-panel { position: absolute; z-index: 600; top: 16px; left: 16px; width: min(380px, calc(100% - 32px)); padding: 20px; }
.map-panel h1 { font-size: 22px; margin: 0 0 4px; }
.map-panel p { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.map-panel .note { font-size: 12px; color: var(--faint); margin: 0 0 14px; }
.map-panel .segmented { margin-bottom: 12px; }
.map-search {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; margin-bottom: 12px;
  background: var(--input-bg); border: 1px solid var(--border-strong); border-radius: 14px; color: var(--faint);
}
.map-search.floating { position: absolute; z-index: 500; top: 12px; left: 56px; width: min(320px, calc(100% - 70px)); margin: 0; background: var(--surface-solid); }
.map-search input { flex: 1; background: none; border: 0; outline: none; height: 100%; color: var(--text); font-size: 14px; min-width: 0; }
.map-results { position: absolute; top: 48px; left: 0; right: 0; z-index: 10; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.map-results:empty { display: none; }
.map-results button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.map-results button:hover { background: var(--surface-2); }
.map-pin-wrap { background: none; border: 0; }
.map-pin { position: relative; width: 34px; height: 34px; }
.pin-dot {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; transform: rotate(-45deg);
  font-weight: 800; font-size: 13px; color: #fff; border: 2px solid #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.pin-dot > span { transform: rotate(45deg); }
.map-pin.room .pin-dot { background: linear-gradient(135deg, #2de1c2, #10b39a); border-radius: 50% 50% 50% 4px; }
.map-pin.group .pin-dot { background: linear-gradient(135deg, #7c5cff, #5536e0); border-radius: 50% 50% 50% 4px; }
.pin-count { position: absolute; top: -9px; right: -12px; padding: 0 6px; border-radius: 999px; background: #fff; color: #111; font-size: 11px; font-weight: 800; line-height: 18px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.pin-label {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; background: rgba(10, 10, 18, .88); color: #fff; font-size: 12px; font-weight: 650;
}
/* Leaflet's stylesheet loads after this one, so overrides are scoped to .map. */
.map.leaflet-container { font: inherit; background: var(--surface-solid); }
.map .leaflet-popup-content-wrapper, .map .leaflet-popup-tip { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }
.map .leaflet-popup-content-wrapper { border-radius: 18px; border: 1px solid var(--border-strong); }
.map .leaflet-popup-content { margin: 14px 16px; font-size: 14px; line-height: 1.45; }
.map .leaflet-popup-content b { font-size: 15px; font-family: "Sora Variable", sans-serif; }
.map .leaflet-popup-content a.btn.primary { color: var(--on-brand); }
.map .leaflet-popup-content hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
.map a.leaflet-popup-close-button { color: var(--muted); }
.map .leaflet-top.leaflet-left { top: auto; bottom: 30px; }
.map .leaflet-bar { border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; }
.map .leaflet-bar a { background: var(--surface-solid); color: var(--text); border-color: var(--border); }
.map .leaflet-bar a:hover { background: var(--surface-solid); color: var(--brand-text); }
.map .leaflet-bar a.leaflet-disabled { background: var(--surface-solid); color: var(--faint); }
.map.picker .leaflet-top.leaflet-left { top: 0; bottom: auto; }
.map .leaflet-control-attribution { background: color-mix(in srgb, var(--surface-solid) 85%, transparent); color: var(--muted); border-top-left-radius: 8px; }
.map .leaflet-control-attribution a { color: var(--brand-text); }

/* Groups */
.verified { color: var(--brand-2); display: inline-flex; }
.owner-tools { border-top: 1px solid var(--border); padding-top: 18px; }
.group-hero { display: flex; gap: 18px; align-items: center; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 12, .66); backdrop-filter: blur(6px); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 24px; box-shadow: var(--shadow); animation: pop .18s var(--ease); }
.modal.wide { max-width: 740px; }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 0 24px; }
.modal header h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 14px 24px 24px; }

/* ---------- Room ---------- */
body.in-room .topbar, body.in-room .site-footer { display: none; }
body.in-room { background: var(--bg); }
.view.room-view { max-width: none; padding: 0; display: flex; }
.room { flex: 1; display: flex; flex-direction: column; height: 100vh; min-height: 0; position: relative; }
.room-bar { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 16px; }
.room-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.room-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16.5px; font-family: "Sora Variable", sans-serif; letter-spacing: -0.01em; }
.room-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.conn-status { color: #fbbf24; font-size: 13px; font-weight: 600; }
.room-main { flex: 1; display: flex; min-height: 0; gap: 12px; padding: 0 12px 12px; }
.room-content { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow: auto; padding-bottom: 92px; }

.stage { flex: 1; display: grid; gap: 12px; min-height: 260px; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.stage[data-count="2"] { grid-template-columns: 1fr 1fr; }
.stage[data-count="3"], .stage[data-count="4"] { grid-template-columns: 1fr 1fr; }
.stage[data-count="5"] { grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; min-height: 0; border-radius: 22px; overflow: hidden; background: var(--tile-bg); border: 1px solid var(--border); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--tile-bg); }
.tile.cam video { object-fit: cover; }
.tile-wait { position: absolute; inset: 0; display: grid; place-items: center; color: #a3a1b8; font-size: 14px; }
.tile.ready .tile-wait { display: none; }
.tile.ready.stalled .tile-wait { display: grid; background: rgba(5, 5, 10, .45); color: #fff; font-weight: 600; }
.tile-quality { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(5, 5, 10, .62); color: #fff; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .8; }
.tile-quality::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; }
.tile-quality.fair::before { background: #ffc145; }
.tile-quality.poor::before { background: #ff5d73; }
.tile-tag { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 999px; background: rgba(5, 5, 10, .62); backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; font-weight: 600; }
.tile-tag .avatar { width: 22px; height: 22px; font-size: 10px; }
.tile-bar {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px;
  padding: 4px; border-radius: 999px; background: rgba(5, 5, 10, .66); backdrop-filter: blur(10px); color: #fff;
  opacity: 0; transition: opacity .2s;
}
.tile:hover .tile-bar, .tile:focus-within .tile-bar { opacity: 1; }
.tile-bar .icon-btn { color: #e8e6f5; width: 34px; height: 34px; }
.tile-bar .icon-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.tile-volume { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; color: #e8e6f5; }
.tile-volume input { width: 84px; accent-color: #fff; }
/* Full screen inside the app window (not the monitor): the chosen stream is
   big and the others sit small in a strip below; clicking one swaps them. */
.stage.expanded[data-count] {
  position: fixed; inset: 0; z-index: 50; min-height: 0; padding: 12px; gap: 10px; background: var(--bg);
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-auto-rows: 0;
}
.stage.expanded.with-strip[data-count] {
  grid-template-columns: minmax(0, 1fr) repeat(var(--others), minmax(0, 240px)) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 135px;
}
.stage.expanded > .tile.featured { grid-column: 1 / -1; grid-row: 1; border-radius: 16px; }
.stage.expanded > .tile:not(.featured) { grid-row: 2; border-radius: 14px; cursor: pointer; transition: border-color .15s; }
.stage.expanded > .tile:not(.featured):hover { border-color: var(--brand); }
.stage.expanded > .tile.self-screen { cursor: default; }
.stage.expanded > .tile.self-screen:hover { border-color: var(--border); }
.stage.expanded > .tile:not(.featured) .tile-bar, .stage.expanded > .tile:not(.featured) .tile-quality { display: none; }
.stage.expanded > .tile:not(.featured) .tile-tag { top: auto; bottom: 8px; left: 8px; max-width: calc(100% - 16px); padding: 3px 9px 3px 4px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage.expanded > .tile:not(.featured) .tile-tag .avatar { width: 18px; height: 18px; }

/* People: big "call" cards when nobody is being watched, a compact strip otherwise */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-content: start; }
.person {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 26px 16px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .2s;
}
.person .avatar { width: 84px; height: 84px; font-size: 32px; transition: box-shadow .15s; }
.person.speaking { border-color: color-mix(in srgb, var(--ok) 70%, transparent); }
.person.speaking .avatar { box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--ok); }
.person-info { min-width: 0; max-width: 100%; }
.person-name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-status { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; color: var(--faint); flex-wrap: wrap; }
.person-status > span:not(.viewers) { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--surface-2); }
.person-status .on { color: var(--text); }
.person-status .off { color: var(--danger); }
.person-status .live { color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 14%, transparent); }
.person-status .viewers { font-size: 12px; color: var(--muted); }
.person-actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.person-actions:empty { display: none; }
.person-actions .icon-btn { position: absolute; top: 10px; right: 10px; }
.people.compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); flex: none; max-height: 34vh; overflow: auto; }
.people.compact .person { flex-direction: row; flex-wrap: wrap; text-align: left; padding: 10px 12px; gap: 10px; border-radius: 18px; }
.people.compact .person .avatar { width: 40px; height: 40px; font-size: 16px; }
.people.compact .person-info { flex: 1; min-width: 90px; }
.people.compact .person-status { justify-content: flex-start; margin-top: 2px; }
.people.compact .person-status > span:not(.viewers) { width: 22px; height: 22px; }
.people.compact .person-actions .icon-btn { position: static; }
.people.compact .person-actions { margin-left: auto; }

.room-side { width: 340px; flex: none; display: flex; flex-direction: column; border-radius: 22px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; margin-bottom: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--border); font-family: "Sora Variable", sans-serif; }
.messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.msg { max-width: 88%; align-self: flex-start; }
.msg .meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; margin: 0 4px 3px; }
.msg .meta b { font-weight: 650; }
.msg .meta .time { color: var(--faint); }
.msg .bubble { display: inline-block; padding: 8px 13px; border-radius: 16px 16px 16px 5px; background: var(--surface-2); word-wrap: break-word; line-height: 1.45; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine .bubble { background: var(--grad); color: var(--on-brand); border-radius: 16px 16px 5px 16px; text-align: left; }
.msg.system { align-self: center; max-width: 100%; color: var(--faint); font-size: 12.5px; text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-form .input { height: 44px; font-size: 14.5px; border-radius: 999px; }
.chat-form .btn { width: 44px; height: 44px; padding: 0; flex: none; }

/* Floating control dock */
.dock {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px;
}
.room.side-open .dock { left: calc((100% - 352px) / 2); }
.ctrl {
  position: relative; display: inline-grid; place-items: center; width: 52px; height: 52px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  transition: background .15s, transform .12s var(--ease);
}
.ctrl:hover { background: var(--surface-3); }
.ctrl:active { transform: scale(.96); }
.ctrl.off { background: color-mix(in srgb, var(--danger) 16%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.ctrl.on { background: var(--surface-3); color: var(--text); }
.ctrl.sharing { background: var(--grad); color: var(--on-brand); border-color: transparent; }
.ctrl.danger { width: auto; padding: 0 22px; background: var(--danger); color: #fff; border-color: transparent; display: inline-flex; gap: 8px; font-weight: 650; }
.ctrl span { display: none; }
.ctrl.danger span { display: inline; }
.ctrl-group { display: flex; align-items: center; }
.ctrl-group > .ctrl:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; width: 56px; padding-left: 4px; }
.ctrl.caret { width: 32px; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ctrl-group .menu { left: 50%; transform: translateX(-50%); min-width: 280px; }
.dock-sep { width: 1px; height: 28px; background: var(--border-strong); margin: 0 2px; }
.badge { position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--live); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; line-height: 19px; text-align: center; }
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  padding: 5px 10px; border-radius: 8px; background: var(--surface-solid); border: 1px solid var(--border-strong);
  color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow);
}
.dropdown.open > [data-tip]::after { display: none; }

/* ---------- Landing pages ---------- */
.landing { padding-bottom: 20px; }
.hero-block { text-align: center; padding: 36px 0 10px; max-width: 820px; margin: 0 auto; }
.hero-block h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.035em; margin: 18px 0 16px; font-weight: 750; }
.lead { color: var(--muted); font-size: 17.5px; margin: 0 auto 28px; max-width: 660px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 18px; justify-content: center; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.ticks li { display: inline-flex; align-items: center; gap: 6px; }
.ticks .icon { color: var(--brand-2); }
.section-h { text-align: center; font-size: 30px; margin: 80px 0 8px; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.feature-grid.two { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); max-width: 900px; margin: 0 auto; }
.feature { transition: border-color .2s, transform .2s var(--ease); }
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature p, .step p { color: var(--muted); font-size: 14.5px; margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-text); margin-bottom: 14px; }
.demo { height: 118px; margin-bottom: 18px; border-radius: 16px; background: var(--input-bg); border: 1px solid var(--border); padding: 14px; font-size: 13px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.demo.bars div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; }
.demo.bars i { display: block; height: 10px; border-radius: 5px; background: var(--grad); }
.demo.bars div + div i { background: var(--faint); }
.demo small { color: var(--faint); }
.demo.checks label { display: flex; align-items: center; gap: 8px; }
.demo.checks input { accent-color: var(--brand); }
.demo.checks em { margin-left: auto; color: var(--faint); font-style: normal; font-size: 12px; }
.demo.tiles { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; padding: 10px; }
.demo.tiles b, .demo.tiles span { display: grid; place-items: center; border-radius: 9px; background: var(--surface-3); font-size: 12px; }
.demo.tiles b { grid-row: span 2; background: var(--grad); color: var(--on-brand); }
.demo.echo { flex-direction: row; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.demo.echo .icon:nth-of-type(2) { color: var(--danger); }
.demo.picker { flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: 6px; }
.demo.picker .tab { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 12px; }
.demo.picker .tab.on { background: var(--grad); color: var(--on-brand); border-color: transparent; }
.demo.update { align-items: center; text-align: center; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.step b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--grad); color: var(--on-brand); font-size: 13px; margin-bottom: 14px; font-family: "Sora Variable", sans-serif; }
.cta { text-align: center; margin-top: 80px; padding: 44px 28px; border-radius: 28px; background: radial-gradient(600px 220px at 50% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent), var(--surface); }
.cta h2 { font-size: 28px; }
.commands { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; }
.commands div { display: grid; grid-template-columns: 210px 1fr; gap: 12px; align-items: baseline; }
.commands span { color: var(--muted); font-size: 14.5px; }
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 20px; transition: border-color .15s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-text); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 10px 0 0; font-size: 14.5px; }

.discord-mock { display: grid; grid-template-columns: 240px 1fr; padding: 0; overflow: hidden; margin: 44px auto 0; max-width: 780px; background: #313338; color: #dbdee1; border: 1px solid #1e1f22; border-radius: 22px; font-size: 14px; box-shadow: var(--shadow); }
.dm-side { background: #2b2d31; padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.dm-head { font-size: 12px; font-weight: 700; color: #949ba4; padding: 0 6px 6px; }
.dm-channel { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 6px; background: #404249; color: #fff; }
.dm-time { margin-left: auto; font-size: 12px; color: #949ba4; }
.dm-status { margin-left: 26px; font-size: 12px; color: #949ba4; word-break: break-all; }
.dm-user { display: flex; align-items: center; gap: 8px; margin-left: 20px; color: #dbdee1; }
.dm-chat { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.dm-msg { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.bot-av { width: 40px !important; height: 40px !important; border-radius: 50% !important; padding: 0; overflow: hidden; background: none; }
.bot-av img { width: 100%; height: 100%; }
.dm-tag { background: #5865f2; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 4px; font-weight: 700; }
.dm-link { color: #00a8fc; word-break: break-all; }
.prose li { margin-bottom: 8px; color: var(--muted); }

/* ---------- Download prompt & toast ---------- */
.app-prompt {
  position: fixed; right: 18px; bottom: 18px; z-index: 25; display: flex; align-items: center; gap: 14px;
  max-width: 420px; padding: 12px 10px 12px 12px; border-radius: 22px;
  animation: slide-in .45s var(--ease) 3s both;
}
@keyframes slide-in { from { opacity: 0; transform: translateY(24px); } }
.app-prompt > div { flex: 1; min-width: 0; }
.app-prompt p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.app-prompt b { font-size: 14px; white-space: nowrap; }
.app-prompt-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 15px; background: var(--grad); color: var(--on-brand); }
body.in-app .app-prompt { display: none; }
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px); opacity: 0; z-index: 2000;
  padding: 11px 18px; border-radius: 999px; background: var(--surface-solid); color: var(--text); border: 1px solid var(--border-strong);
  font-size: 14px; font-weight: 550; transition: all .22s var(--ease); pointer-events: none; box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .steps3 { grid-template-columns: 1fr; }
  .room-side { position: fixed; z-index: 40; top: 62px; right: 12px; bottom: 100px; width: min(360px, calc(100vw - 24px)); box-shadow: var(--shadow); background: var(--surface-solid); }
  .room.side-open .dock { left: 50%; }
  .discord-mock { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: auto 1fr; padding: 0 14px; gap: 10px; }
  .nav-center { display: none; }
  .mobile-nav { display: flex !important; }
  .user-chip span, .nav-right .label-text { display: none; }
  .view { padding: 20px 14px 60px; }
  .center-card { padding: 24px; margin: 16px auto; }
  .launcher { padding: 22px; }
  .hero .perks, .hero .hero-actions { display: none; }
  .hero h1 { margin-bottom: 12px; }
  .option-cards { grid-template-columns: 1fr 1fr; }
  .room-grid { grid-template-columns: 1fr; }
  .stage[data-count] { grid-template-columns: 1fr; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .people.compact { grid-template-columns: 1fr; }
  .person { padding: 18px 10px 14px; }
  .person .avatar { width: 64px; height: 64px; font-size: 24px; }
  .hide-sm { display: none; }
  .dock { bottom: 14px; gap: 6px; padding: 6px; }
  .ctrl { width: 46px; height: 46px; }
  .ctrl.danger { padding: 0 14px; }
  .ctrl.danger span { display: none; }
  .commands div { grid-template-columns: 1fr; gap: 2px; }
  .app-prompt { display: none; }
  body:not(.in-room) .view { padding-bottom: 96px; }
  .feature-grid.two { grid-template-columns: 1fr; }
  .map-panel { top: auto; bottom: 12px; left: 12px; padding: 16px; }
  .map-panel .note, .map-panel p { display: none; }
}
.mobile-nav { display: none; position: fixed; z-index: 24; left: 50%; bottom: 14px; transform: translateX(-50%); gap: 2px; padding: 5px; border-radius: 999px; }
.mobile-nav a { display: grid; place-items: center; width: 50px; height: 42px; border-radius: 999px; color: var(--muted); }
.mobile-nav a.active { background: var(--surface-3); color: var(--text); }
body.in-room .mobile-nav, body.in-app .mobile-nav.hide-in-app { display: none !important; }
.rot-270 { transform: rotate(-90deg); }
.invite-card { border-style: dashed; border-color: var(--border-strong); background: transparent; }
.invite-card .invite-icon { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-text); }
.people.compact .invite-card { display: none; }
.lang-btn { padding: 0 12px; gap: 6px; letter-spacing: .04em; }
.lang-code { display: inline-grid; place-items: center; width: 30px; height: 22px; border-radius: 7px; background: var(--surface-3); font-size: 11px; letter-spacing: .05em; }

/* ---------- Performance & accessibility ---------- */
/* Nothing blurs over live video: a blur behind a playing video is recomputed
   every frame, which costs GPU time that games and encoders need. */
.room .dock { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface-solid); }
.tile-tag, .tile-bar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5, 5, 10, .78); }
/* Videos and the dock get their own compositing layers. */
.tile video, .dock { contain: paint; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .topbar, .modal-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface-solid); }
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:focus-visible, .seg:focus-visible, .chip:focus-visible, .ctrl:focus-visible, .icon-btn:focus-visible { outline-offset: 3px; }
