/* TalkBeam desktop — the four looks from the phone app (Aurora Glass, Signal Radio, Pop Sticker,
   Midnight Minimal) on a layout built for big screens: channels · room · transcript · crew.
   No external requests: system fonts, inline icons. */

/* ================================================================ tokens */

:root {
  --f-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --f-serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --side-w: 272px;
  --crew-w: 304px;
  --stage-h: clamp(300px, 44vh, 470px);
}

/* B · Signal Radio (default) */
:root, [data-theme="signal"] {
  --bg: #161513;
  --bg-2: #1c1b18;
  --panel: #201e1b;
  --panel-2: #26241f;
  --line: #3a362f;
  --line-2: #2c2a25;
  --text: #f1e9da;
  --muted: #a89f8e;
  --faint: #6f685b;
  --accent: #ff6b1a;
  --accent-2: #ff8233;
  --on-accent: #161513;
  --ok: #9de36b;
  --sos: #ff4b3e;
  --lcd: #0f1410;
  --r: 10px;
  --r-lg: 14px;
  --bw: 1px;
  --shadow: none;
  --f-ui: var(--f-body);
  --f-head: var(--f-body);
  --logo-bg: #ff6b1a;
  --logo-fg: #f1e9da;
  color-scheme: dark;
}

/* A · Aurora Glass */
[data-theme="aurora"] {
  --bg: #0b0a14;
  --bg-2: #0e0c1b;
  --panel: rgba(255, 255, 255, .06);
  --panel-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .14);
  --line-2: rgba(255, 255, 255, .08);
  --text: #f4f2ff;
  --muted: rgba(244, 242, 255, .64);
  --faint: rgba(244, 242, 255, .4);
  --accent: #7c5cff;
  --accent-2: #27e1ff;
  --on-accent: #fff;
  --ok: #b6ff3b;
  --sos: #ff4f6d;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 20px 60px rgba(5, 3, 20, .45);
  --f-ui: var(--f-display);
  --f-head: var(--f-display);
  --logo-bg: #7c5cff;
  --logo-fg: #f4f2ff;
  color-scheme: dark;
}

/* C · Pop Sticker */
[data-theme="pop"] {
  --bg: #fff4e4;
  --bg-2: #ffeed6;
  --panel: #ffffff;
  --panel-2: #fff9f0;
  --line: #1b1a1f;
  --line-2: #e9dcc6;
  --text: #1b1a1f;
  --muted: #5b5560;
  --faint: #8a838f;
  --accent: #ff5a36;
  --accent-2: #2e4bff;
  --on-accent: #ffffff;
  --ok: #3ddc97;
  --sos: #ff3b30;
  --yellow: #ffc53d;
  --violet: #b9a6ff;
  --r: 14px;
  --r-lg: 20px;
  --bw: 2px;
  --shadow: 3px 3px 0 #1b1a1f;
  --f-ui: var(--f-display);
  --f-head: var(--f-display);
  --logo-bg: #ff5a36;
  --logo-fg: #fff4e4;
  color-scheme: light;
}

/* D · Midnight Minimal */
[data-theme="midnight"] {
  --bg: #000;
  --bg-2: #050505;
  --panel: #0b0b0a;
  --panel-2: #121211;
  --line: #262624;
  --line-2: #1a1a18;
  --text: #f5f5f0;
  --muted: #9a9a94;
  --faint: #6e6e69;
  --accent: #ccff4d;
  --accent-2: #ccff4d;
  --on-accent: #000;
  --ok: #ccff4d;
  --sos: #ff5a4e;
  --r: 12px;
  --r-lg: 16px;
  --shadow: none;
  --f-ui: var(--f-body);
  --f-head: var(--f-serif);
  --logo-bg: #ccff4d;
  --logo-fg: #000;
  color-scheme: dark;
}

/* ================================================================ base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.45 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img, svg { display: block; }
kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel);
  font: 600 11.5px/1.5 var(--f-mono); color: var(--muted); text-align: center;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.mono { font-family: var(--f-mono); }
.serif { font-family: var(--f-serif); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.i--xs { width: 15px; height: 15px; }
.i--lg { width: 30px; height: 30px; }
.i--xl { width: 42px; height: 42px; }
.rot90 { transform: rotate(90deg); }
.logo { width: 28px; height: 28px; flex-shrink: 0; }

/* thin scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

/* ================================================================ boot */

#app { height: 100%; }
.boot { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: #a89f8e; font: 600 13px/1 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; }
.boot .logo { width: 56px; height: 56px; animation: boot 1.4s var(--ease) infinite; }
@keyframes boot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.92); opacity: .7; } }

/* ================================================================ shell layout */

.shell {
  height: 100%;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--crew-w);
  grid-template-rows: auto auto var(--stage-h) minmax(0, 1fr);
  grid-template-areas:
    "side head crew"
    "side banners crew"
    "side stage crew"
    "side feed crew";
  position: relative;
  isolation: isolate;
}
.side { grid-area: side; }
#room { display: contents; }
.room__head { grid-area: head; }
.banners { grid-area: banners; }
.stage { grid-area: stage; }
.feedwrap { grid-area: feed; }
.crew { grid-area: crew; }
.lobby { grid-row: head-start / feed-end; grid-column: head-start / -1; }
#app:not(.in-room) .crew { display: none; }

/* Wide screens: the stage and the transcript side by side. */
@media (min-width: 1500px) {
  :root { --side-w: 288px; --crew-w: 320px; }
  .shell {
    grid-template-columns: var(--side-w) minmax(0, 1fr) minmax(380px, .92fr) var(--crew-w);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "side head head crew"
      "side banners banners crew"
      "side stage feed crew";
  }
  .stage { min-height: 0; }
}

/* Tablet: channels + room; the crew slides in. */
@media (max-width: 1179px) {
  :root { --side-w: 248px; }
  .shell {
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    grid-template-areas:
      "side head"
      "side banners"
      "side stage"
      "side feed";
  }
  .crew {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); z-index: 40;
    transform: translateX(105%); transition: transform .35s var(--ease);
    box-shadow: -30px 0 60px rgba(0, 0, 0, .35);
  }
  #app.crew-open .crew { transform: none; }
  #app:not(.in-room) .crew { display: flex; }
}
@media (min-width: 1180px) {
  .room__crewbtn, .crew__close { display: none !important; }
}

/* Phone width: one column; channels slide in from the left. */
/* Short screens (laptops): a compact stage. */
@media (max-height: 900px) {
  :root { --stage-h: clamp(290px, 50vh, 420px); }
  .lcd { padding: 10px 14px; gap: 6px; }
  .lcd__ch { font-size: 38px; }
  .lcd__name { font-size: 18px; }
  .st { gap: 10px; padding: 14px 20px; }
  .room__head { padding: 12px 20px 10px; }
  .st--signal .st__hint { display: none; }
}
@media (max-width: 767px) {
  :root { --stage-h: clamp(280px, 46vh, 420px); }
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "banners" "stage" "feed";
  }
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); z-index: 41;
    transform: translateX(-105%); transition: transform .35s var(--ease);
    box-shadow: 30px 0 60px rgba(0, 0, 0, .35);
  }
  #app.side-open .side, #app:not(.in-room) .side { transform: none; position: static; width: auto; box-shadow: none; }
  #app:not(.in-room) .shell { grid-template-areas: "side"; grid-template-rows: minmax(0, 1fr); }
  #app:not(.in-room) .lobby { display: none; }
  #app.side-open .side { position: fixed; width: min(320px, 86vw); box-shadow: 30px 0 60px rgba(0, 0, 0, .35); }
  .seg { order: 5; width: 100%; }
  .room__acts .pill span { display: none; }
}
@media (min-width: 768px) {
  .room__menu { display: none !important; }
}

/* ================================================================ sidebar */

.side {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-2);
  border-right: var(--bw, 1px) solid var(--line-2);
}
.side__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 17px/1 var(--f-display); letter-spacing: -.02em; }
.conn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font: 700 10.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); }
.conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.conn--online i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.conn--connecting i { background: #ffb23f; animation: blink 1s steps(2) infinite; }
.conn--offline { color: var(--sos); border-color: color-mix(in srgb, var(--sos) 50%, transparent); }
.conn--offline i { background: var(--sos); }
.conn--demo { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.me {
  display: flex; align-items: center; gap: 11px; width: calc(100% - 24px); margin: 0 12px 10px; padding: 10px 12px;
  border-radius: var(--r); background: var(--panel); border: var(--bw, 1px) solid var(--line-2); text-align: left;
  transition: background .2s, border-color .2s;
}
.me:hover { background: var(--panel-2); border-color: var(--line); }
.me__txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.me__txt b { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me__txt small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me__gear { color: var(--faint); width: 18px; height: 18px; }

.jump {
  display: flex; align-items: center; gap: 8px; margin: 0 12px 6px; padding: 0 10px; height: 38px;
  border-radius: var(--r); border: var(--bw, 1px) solid var(--line-2); background: color-mix(in srgb, var(--panel) 60%, transparent);
  color: var(--faint);
}
.jump:focus-within { border-color: var(--accent); color: var(--text); }
.jump input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font-size: 13.5px; }
.jump input::placeholder { color: var(--faint); }
.jump input::-webkit-search-cancel-button { display: none; }
.jump .i { width: 16px; height: 16px; }

.side__list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 12px; }
.chs + .chs { margin-top: 10px; }
.chs h3 { padding: 12px 10px 6px; font: 700 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.ch {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin: 1px 0;
  border-radius: var(--r); text-align: left; color: var(--text); transition: background .15s;
}
.ch:hover { background: color-mix(in srgb, var(--panel) 80%, transparent); }
.ch.is-active { background: var(--panel-2); }
.ch__num { display: none; }
.ch__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ch__main b { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch__main small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch.is-unread .ch__main b { font-weight: 800; }
.ch.is-live .ch__main small { color: var(--accent); font-weight: 600; }
.ch__side { display: flex; align-items: center; color: var(--faint); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.livebars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.livebars i { width: 3px; height: 14px; border-radius: 2px; background: var(--accent); transform-origin: bottom; animation: bar .8s ease-in-out infinite; }
.livebars i:nth-child(2) { animation-delay: .15s; }
.livebars i:nth-child(3) { animation-delay: .3s; }
.ch--join { opacity: .8; }
.side__empty, .side__none { padding: 28px 16px; color: var(--muted); text-align: center; display: grid; gap: 8px; justify-items: center; font-size: 13.5px; }
.side__foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 12px 14px; border-top: var(--bw, 1px) solid var(--line-2); }
.sbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border-radius: var(--r); color: var(--muted); font-size: 11.5px; font-weight: 600; transition: background .15s, color .15s; }
.sbtn:hover { background: var(--panel); color: var(--text); }
.linkbtn { color: var(--accent); font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.linkbtn:hover { text-decoration: underline; }

/* ================================================================ tiles & avatars */

.tile {
  --h: 30;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: calc(var(--r) - 2px); font-size: 18px; line-height: 1;
  background: hsl(var(--h) 75% 55% / .2); border: 1px solid hsl(var(--h) 75% 62% / .35);
}
.tile--lg { width: 48px; height: 48px; font-size: 24px; border-radius: var(--r); }
.av {
  --h: 30;
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h) 78% 64%), hsl(calc(var(--h) + 42) 80% 52%));
  color: #0d0c10; font: 800 13px/1 var(--f-display);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av--sm { width: 30px; height: 30px; font-size: 12.5px; }
.av--md { width: 36px; height: 36px; font-size: 14px; }
.av--xl { width: 76px; height: 76px; font-size: 30px; }

/* ================================================================ buttons & pills */

.ib { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r); color: var(--muted); transition: background .15s, color .15s; flex-shrink: 0; }
.ib:hover { background: var(--panel-2); color: var(--text); }
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: var(--bw, 1px) solid var(--line); background: var(--panel); color: var(--text); font-size: 13px; font-weight: 650; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
  text-decoration: none;
}
.pill:hover { background: var(--panel-2); }
.pill .i { width: 17px; height: 17px; }
.pill--accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: color-mix(in srgb, var(--accent) 70%, var(--text)); }
.pill--sm { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.pill--wide { width: 100%; justify-content: center; }
.pill--warn { border-color: color-mix(in srgb, var(--sos) 50%, transparent); color: var(--sos); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 750; font-size: 14px; border: var(--bw, 1px) solid transparent;
  transition: filter .15s, transform .15s; box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn--danger { background: var(--sos); color: #fff; }
.btn--ok { background: var(--ok); color: #0b0f06; }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn--lg { height: 50px; font-size: 16px; width: 100%; }

/* ================================================================ room header */

.room__head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 22px 14px;
  border-bottom: var(--bw, 1px) solid var(--line-2); min-width: 0;
}
.room__ttl { flex: 1; min-width: 180px; }
.room__eyebrow { font: 700 10.5px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.room__ttl h1 { font: 800 24px/1.1 var(--f-head); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room__sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room__acts { display: flex; align-items: center; gap: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 999px; background: var(--panel); border: var(--bw, 1px) solid var(--line-2); min-width: 280px; }
.seg button { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--muted); transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); }

/* ================================================================ banners */

.banners { display: grid; gap: 8px; padding: 12px 22px 0; }
.banner {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 14px; border-radius: var(--r);
  background: var(--panel); border: var(--bw, 1px) solid var(--line); font-size: 13.5px;
  animation: rise .4s var(--ease);
}
.banner > div { flex: 1; min-width: 0; }
.banner p { color: var(--muted); margin-top: 2px; line-height: 1.5; }
.banner b { font-weight: 700; }
.banner__txt { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner__hint { color: var(--muted); font-size: 12.5px; }
.banner--direct { border-color: color-mix(in srgb, var(--accent-2) 55%, transparent); background: color-mix(in srgb, var(--accent-2) 10%, var(--panel)); }
.banner--summary { align-items: flex-start; border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.banner--summary > .i { color: var(--accent); margin-top: 1px; }
.banner--warn { border-color: color-mix(in srgb, var(--sos) 55%, transparent); color: var(--sos); }
.banner--warn b { flex: 1; }

/* ================================================================ stage (shared) */

.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.st { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px 22px; }
.st__status { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; min-height: 22px; }
.st__hint { color: var(--muted); font-size: 12.5px; text-align: center; }
.st__hint.mono { font-family: var(--f-mono); letter-spacing: .08em; font-size: 11px; }
.timer { color: var(--muted); font: 600 12.5px/1 var(--f-mono); }
.bars { --lvl: 0; display: inline-flex; align-items: center; gap: 3px; height: 20px; }
.bars i { width: 4px; height: 20px; border-radius: 2px; background: var(--accent-2); transform: scaleY(calc(.25 + var(--lvl) * .9)); transition: transform .08s linear; }
.bars i:nth-child(2) { transform: scaleY(calc(.35 + var(--lvl) * 1.1)); }
.bars i:nth-child(3) { transform: scaleY(calc(.3 + var(--lvl) * .75)); }
.bars i:nth-child(4) { transform: scaleY(calc(.2 + var(--lvl) * 1)); }
[data-ptt] { touch-action: none; user-select: none; -webkit-user-select: none; }

/* ---------------------------------------------------------------- A · Aurora stage */
.st--aurora { overflow: hidden; container-type: size; }
.au-glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(8px); animation: float 11s ease-in-out infinite; }
.au-g1 { left: -8%; top: -10%; width: 55%; aspect-ratio: 1; background: radial-gradient(circle, rgba(124, 92, 255, .42), rgba(124, 92, 255, 0) 68%); }
.au-g2 { right: -10%; top: 20%; width: 50%; aspect-ratio: 1; background: radial-gradient(circle, rgba(39, 225, 255, .26), rgba(39, 225, 255, 0) 68%); animation-delay: -4s; }
.au-g3 { left: 25%; bottom: -35%; width: 50%; aspect-ratio: 1.2; background: radial-gradient(circle, rgba(255, 79, 216, .22), rgba(255, 79, 216, 0) 68%); animation-delay: -8s; }
.au-stage { --size: min(380px, calc(100cqh - 120px), calc(100cqw - 110px)); position: relative; width: var(--size); height: var(--size); flex-shrink: 0; }
.au-ring { position: absolute; inset: 14%; border-radius: 50%; border: 2px solid rgba(124, 92, 255, .6); opacity: 0; }
.st--aurora.is-hot .au-ring { animation: ring 2.4s ease-out infinite; }
.au-r2 { animation-delay: .8s !important; }
.au-r3 { animation-delay: 1.6s !important; }
.au-orb { position: absolute; inset: 22%; border-radius: 50%; box-shadow: 0 0 60px rgba(124, 92, 255, .55); transition: transform .2s var(--ease), box-shadow .3s; }
.au-orb:hover { transform: scale(1.02); }
.au-orb:active, .st--aurora.is-live .au-orb { transform: scale(.97); box-shadow: 0 0 90px rgba(39, 225, 255, .7); }
.au-spin { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#27e1ff, #7c5cff, #ff4fd8, #27e1ff); animation: spin 6s linear infinite; }
.st--aurora.is-hot .au-spin { animation-duration: 2.2s; }
.au-orb-in { position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #3a2f7a, #120f26 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center; }
.au-orb-in small { font-size: 12.5px; font-weight: 650; color: rgba(244, 242, 255, .85); line-height: 1.25; }
.au-orb-in .av { box-shadow: 0 0 0 calc(var(--lvl, 0) * 10px) rgba(39, 225, 255, .35); transition: box-shadow .08s; }
.au-mic { color: #f4f2ff; }
.au-member { position: absolute; left: 50%; top: 50%; transform: rotate(var(--a)) translate(calc(var(--size) * .47)) rotate(calc(-1 * var(--a))) translate(-50%, -50%); }
.au-member .av { border: 2px solid rgba(255, 255, 255, .22); animation: bob 4s ease-in-out infinite; }
.st--aurora .bars i { background: #27e1ff; }

/* ---------------------------------------------------------------- B · Signal stage */
.st--signal { justify-content: center; gap: 16px; }
.lcd { width: min(560px, 100%); border-radius: 14px; background: var(--lcd); border: 2px solid var(--line-2); padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; font-family: var(--f-mono); box-shadow: inset 0 0 40px rgba(0, 0, 0, .45); }
.lcd__r { display: flex; align-items: flex-end; justify-content: space-between; }
.lcd__ch { font-size: 52px; line-height: .95; font-weight: 700; color: var(--accent); text-shadow: 0 0 18px rgba(255, 107, 26, .45); letter-spacing: -.02em; }
.sig { display: flex; align-items: flex-end; gap: 3px; height: 26px; padding-bottom: 6px; }
.sig i { width: 5px; background: var(--accent); }
.sig i:nth-child(1) { height: 8px; }
.sig i:nth-child(2) { height: 13px; }
.sig i:nth-child(3) { height: 18px; }
.sig i:nth-child(4) { height: 24px; }
.sig--off i { background: #5a3620; }
.lcd__name { font: 900 22px/1.1 var(--f-body); letter-spacing: .02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcd__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.blink { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: blink 1s steps(2) infinite; }
.sg-stage { position: relative; flex: 0 1 auto; height: clamp(190px, 34vh, 300px); min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.grille { position: absolute; height: min(250px, 100%); aspect-ratio: 1; border-radius: 50%; background-color: #1e1c19; background-image: radial-gradient(#3a362f 2.2px, transparent 2.6px); background-size: 12px 12px; border: 2px solid var(--line-2); }
.sg-ptt {
  position: relative; height: min(164px, 72%); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--line-2);
  background: var(--accent); color: var(--on-accent); font: 800 12.5px/1.3 var(--f-mono); letter-spacing: .08em; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px;
  box-shadow: 0 10px 30px rgba(255, 107, 26, .25), inset 0 -6px 0 rgba(0, 0, 0, .18);
  transition: transform .12s var(--ease), box-shadow .2s;
}
.sg-ptt:hover { transform: scale(1.02); }
.sg-ptt:active, .sg-ptt.is-live { transform: scale(.96); box-shadow: 0 0 0 10px rgba(255, 107, 26, .18), 0 0 50px rgba(255, 107, 26, .55), inset 0 4px 0 rgba(0, 0, 0, .2); }
.sg-ptt.is-live { animation: press 1.2s ease-out infinite; }
.sg-ptt.is-rx { background: #2b2824; color: var(--text); }
.rx { width: min(560px, 100%); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-family: var(--f-mono); }
.rx__l { font-size: 12px; font-weight: 700; color: var(--accent); min-width: 96px; letter-spacing: .06em; }
.vu { display: flex; gap: 3px; flex: 1; }
.vu i { flex: 1; max-width: 12px; height: 14px; border-radius: 2px; background: var(--accent); opacity: .16; transition: opacity .06s; }
.vu i:nth-child(n + 10) { background: var(--text); }
.vu i.on { opacity: 1; }
.rx__t { font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; }

/* ---------------------------------------------------------------- C · Pop stage */
.st--pop { gap: 14px; container-type: size; }
.pp-stage { position: relative; width: min(440px, calc((100cqh - 130px) * 1.1), calc(100cqw - 40px)); aspect-ratio: 1.1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pp-blob { border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; animation: wobble 4s ease-in-out infinite; }
.pp-bg { position: absolute; width: 68%; aspect-ratio: 1; background: var(--yellow); border: 2px solid var(--line); }
.pp-ptt {
  position: relative; width: 54%; aspect-ratio: 1; border: 3px solid var(--line); background: var(--accent); box-shadow: 6px 6px 0 var(--line);
  color: #fff; font: 800 17px/1.2 var(--f-display); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center;
  transition: transform .12s var(--ease), box-shadow .12s;
}
.pp-ptt:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--line); }
.pp-ptt:active, .pp-ptt.is-live { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--line); background: #ff3d14; }
.pp-member {
  --h: 30;
  position: absolute; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--line); font: 800 20px/1 var(--f-display);
  background: hsl(var(--h) 85% 72%); color: var(--line); transform: rotate(var(--r)); animation: bob 3s ease-in-out infinite;
}
.pp-m1 { --r: -8deg; left: 2%; top: 8%; }
.pp-m2 { --r: 9deg; right: 3%; top: 12%; animation-delay: -1s; }
.pp-m3 { --r: 6deg; left: 8%; bottom: 6%; animation-delay: -2s; }
.pp-m4 { --r: -6deg; right: 7%; bottom: 8%; animation-delay: -.5s; }
.pp-m5 { --r: 4deg; left: 44%; top: -2%; animation-delay: -1.5s; width: 44px; height: 44px; font-size: 17px; }
.pp-now { display: flex; align-items: center; gap: 12px; width: min(460px, 100%); padding: 12px 16px; border-radius: 18px; border: 2px solid var(--line); background: #fff; box-shadow: 4px 4px 0 var(--line); font-weight: 800; }
.pp-now.is-hot { background: var(--ok); }
.pp-now b { flex: 1; font-size: 16px; }
.pp-now .bars i { background: var(--line); border-radius: 3px; width: 5px; }
.pp-now .timer { color: var(--text); font-weight: 800; }

/* ---------------------------------------------------------------- D · Midnight stage */
.st--midnight { align-items: stretch; justify-content: center; gap: 22px; padding: 22px clamp(22px, 3vw, 44px) 24px; }
.mn-spk { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.mn-spk__h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.mn-name { font-size: clamp(30px, 3.4vw, 46px); font-style: italic; line-height: 1.05; }
.mn-live { font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.mn-wave { width: 100%; height: clamp(70px, 16vh, 140px); }
.mn-wave path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.mn-avs { display: flex; gap: 10px; flex-wrap: wrap; }
.mn-avs span { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #3a3a37; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.mn-avs .on { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 650; }
.mn-ptt { height: 68px; border-radius: 34px; background: var(--accent); color: #000; font-size: 16.5px; font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .12s var(--ease), filter .15s; }
.mn-ptt:hover { filter: brightness(1.05); }
.mn-ptt:active, .mn-ptt.is-live { transform: scale(.985); box-shadow: 0 0 0 6px rgba(204, 255, 77, .15), 0 0 50px rgba(204, 255, 77, .35); }
.st--midnight .st__hint { text-align: left; }

/* ================================================================ transcript */

.feedwrap { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-top: var(--bw, 1px) solid var(--line-2); }
@media (min-width: 1500px) { .feedwrap { border-top: 0; border-left: var(--bw, 1px) solid var(--line-2); } }
.feed__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; }
.feed__head h2 { display: flex; align-items: center; gap: 8px; font: 700 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.feed__head h2 .i { width: 16px; height: 16px; color: var(--accent); }
.fsearch { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; width: min(260px, 50%); border-radius: 999px; border: var(--bw, 1px) solid var(--line-2); color: var(--faint); background: var(--panel); }
.fsearch:focus-within { border-color: var(--accent); }
.fsearch .i { width: 15px; height: 15px; }
.fsearch input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 13px; color: var(--text); }
.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 22px 18px; display: flex; flex-direction: column; gap: 4px; scroll-behavior: smooth; }
.feed:focus { outline: none; }
.feed__empty { margin: auto; display: grid; justify-items: center; gap: 10px; color: var(--faint); text-align: center; max-width: 280px; }
.msg { --h: 30; position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 10px 10px; border-radius: var(--r); animation: rise .35s var(--ease); }
.msg:hover { background: color-mix(in srgb, var(--panel) 70%, transparent); }
.msg__time { display: none; }
.msg__body { min-width: 0; }
.msg header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg__name { font-weight: 750; font-size: 13.5px; }
.msg__meta { color: var(--faint); font-size: 11.5px; }
.msg__text { margin-top: 2px; font-size: 14.5px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.msg__orig { margin-top: 3px; font-size: 12.5px; color: var(--faint); font-style: italic; }
.msg__more { opacity: 0; width: 30px; height: 30px; align-self: start; }
.msg:hover .msg__more, .msg__more:focus-visible { opacity: 1; }
.msg--sos { background: color-mix(in srgb, var(--sos) 12%, transparent); }
.msg--sos .msg__name { color: var(--sos); }
.msg--direct .msg__meta { color: var(--accent-2); }
.sys { align-self: center; margin: 8px 0; padding: 4px 12px; border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 12px; }
.auto { display: flex; gap: 12px; padding: 12px 14px; margin: 4px 0; border-radius: var(--r); border: var(--bw, 1px) solid var(--line); background: var(--panel); }
.auto .i { color: var(--accent); margin-top: 1px; }
.auto p { color: var(--text); margin: 2px 0; }
.auto small { color: var(--faint); font-size: 11.5px; }
.auto--critical { border-color: color-mix(in srgb, var(--sos) 55%, transparent); background: color-mix(in srgb, var(--sos) 10%, var(--panel)); }
.auto--critical .i { color: var(--sos); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.jumpdown { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.jumpdown .i { width: 15px; height: 15px; }

/* ================================================================ crew */

.crew { display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); border-left: var(--bw, 1px) solid var(--line-2); }
.crew__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 8px; }
.crew__head h2 { display: flex; align-items: center; gap: 8px; font: 700 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.crew__head h2 .i { width: 16px; height: 16px; }
.crew__list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 10px 12px; }
.crew__list h3 { display: flex; justify-content: space-between; padding: 14px 8px 6px; font: 700 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.crew__list h3 span { color: var(--faint); }
.crew__empty { padding: 24px 12px; color: var(--muted); font-size: 13px; text-align: center; }
.pp { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r); }
.pp:hover { background: var(--panel); }
.pp__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pp__txt b { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp__txt small { color: var(--muted); font-size: 11.5px; }
.pp.is-away { opacity: .55; }
.pp.is-speaking .av { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 calc(4px + var(--lvl, 0) * 5px) var(--accent); transition: box-shadow .08s linear; }
.pp.is-speaking .pp__txt small { color: var(--accent); font-weight: 650; }
.pp__acts { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 4px; padding-left: 18px; opacity: 0; pointer-events: none; transition: opacity .15s; background: linear-gradient(90deg, transparent, var(--panel) 18px); }
.pp:hover .pp__acts, .pp:focus-within .pp__acts { opacity: 1; pointer-events: auto; }
.pp__more { width: 28px; height: 28px; background: var(--panel); }
.lead { padding: 10px 14px; display: grid; gap: 8px; border-top: var(--bw, 1px) solid var(--line-2); }
.lead h3 { font: 700 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.dev { display: grid; gap: 10px; padding: 14px 16px 16px; border-top: var(--bw, 1px) solid var(--line-2); }
.dev__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dev__lbl { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.dev__lbl .i { width: 16px; height: 16px; }
.meter { position: relative; flex: 1; max-width: 150px; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.meter i { --lvl: 0; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--lvl)); background: linear-gradient(90deg, var(--ok), var(--accent)); transition: transform .06s linear; }
.meter--wide { max-width: none; height: 8px; display: block; margin: 4px 0 8px; }
input[type="range"] { accent-color: var(--accent); }
.dev input[type="range"] { flex: 1; max-width: 150px; }
.sosbtn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 999px; border: var(--bw, 1px) solid color-mix(in srgb, var(--sos) 55%, transparent); color: var(--sos); font-weight: 800; letter-spacing: .06em; transition: background .15s; }
.sosbtn:hover { background: color-mix(in srgb, var(--sos) 14%, transparent); }

/* ================================================================ lobby */

.lobby { position: relative; overflow-y: auto; padding: clamp(28px, 6vh, 72px) clamp(20px, 5vw, 64px); display: flex; flex-direction: column; align-items: center; gap: 32px; }
.lobby__menu { position: absolute; left: 12px; top: 12px; }
.lobby__hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 30px; }
.lobby__hero .logo { width: 64px; height: 64px; position: relative; z-index: 1; }
.lobby__hero h1 { font: 800 clamp(28px, 3vw, 40px)/1.1 var(--f-head); letter-spacing: -.03em; }
.lobby__hero p { color: var(--muted); font-size: 15px; }
.beams { position: absolute; top: 62px; left: 50%; width: 0; height: 0; pointer-events: none; }
.beams i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ring 3s ease-out infinite; }
.beams i:nth-child(2) { animation-delay: 1s; }
.beams i:nth-child(3) { animation-delay: 2s; }
.lobby__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; width: min(900px, 100%); }
.lcard { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: var(--bw, 1px) solid var(--line-2); text-align: left; transition: transform .2s var(--ease), border-color .2s, background .2s; }
.lcard:hover { transform: translateY(-2px); border-color: var(--line); background: var(--panel-2); }
.lcard b { font-size: 15px; font-weight: 750; }
.lcard small { color: var(--muted); font-size: 12.5px; }
.lcard--add { border-style: dashed; color: var(--muted); }
.lcard--add b { color: var(--text); }
.lobby__keys { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; color: var(--faint); font-size: 12.5px; }

/* ================================================================ overlays */

#overlays { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
#overlays > * { pointer-events: auto; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: min(560px, 90vw); padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 650; font-size: 13.5px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); animation: toast .35s var(--ease); text-align: center; }
.toast--err { background: var(--sos); color: #fff; }
.announce { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--r-lg); background: var(--panel-2); border: var(--bw, 1px) solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .4); animation: drop .4s var(--ease); backdrop-filter: blur(16px); }
.announce > span { flex: 1; font-size: 13.5px; line-height: 1.5; }
.announce small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.announce > .i { margin-top: 1px; color: var(--accent); }
.announce--warning { border-color: color-mix(in srgb, var(--sos) 60%, transparent); }
.announce--warning > .i { color: var(--sos); }
.announce--auto { top: 76px; }
.menu-scrim { position: fixed; inset: 0; }
.menu { position: fixed; width: 240px; padding: 6px; border-radius: var(--r); background: var(--panel-2); border: var(--bw, 1px) solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); animation: pop .16s var(--ease); backdrop-filter: blur(20px); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: calc(var(--r) - 4px); font-size: 13.5px; text-align: left; }
.menu button:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.menu button .i { width: 17px; height: 17px; color: var(--muted); }
.menu .danger, .menu .danger .i { color: var(--sos); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 2px; }

/* ================================================================ modals */

.scrim { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); animation: fade .2s ease; }
[data-theme="pop"] .scrim { background: rgba(27, 26, 31, .35); }
.scrim--urgent { background: rgba(0, 0, 0, .72); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: var(--r-lg); background: var(--bg-2); border: var(--bw, 1px) solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: pop .25s var(--ease); }
.modal--settings { width: min(820px, 100%); height: min(640px, calc(100vh - 40px)); overflow: hidden; }
.modal--palette { width: min(600px, 100%); align-self: flex-start; margin-top: 12vh; overflow: hidden; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 6px; }
.modal__head h2 { font: 800 20px/1.2 var(--f-head); letter-spacing: -.02em; }
.modal__head p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.form { display: grid; gap: 16px; padding: 14px 22px 22px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field small { color: var(--faint); font-size: 12px; line-height: 1.45; }
.field input:not([type="range"]):not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r); background: var(--panel); border: var(--bw, 1px) solid var(--line); color: var(--text); outline: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field textarea { resize: vertical; }
.hue { width: 100%; height: 10px; border-radius: 5px; -webkit-appearance: none; appearance: none; background: linear-gradient(90deg, hsl(0 80% 60%), hsl(60 80% 60%), hsl(120 80% 55%), hsl(180 80% 55%), hsl(240 80% 65%), hsl(300 80% 62%), hsl(360 80% 60%)); }
.hue::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid #1b1a1f; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.hue::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #1b1a1f; }
.emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.emojis label { cursor: pointer; }
.emojis input { position: absolute; opacity: 0; pointer-events: none; }
.emojis span { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 10px; font-size: 20px; border: var(--bw, 1px) solid transparent; background: var(--panel); transition: background .15s; }
.emojis input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel)); }
.emojis input:focus-visible + span { outline: 2px solid var(--accent); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 12px; border-radius: var(--r); border: var(--bw, 1px) solid var(--line); background: var(--panel); }
.choice span .i { grid-row: span 2; color: var(--muted); }
.choice small { color: var(--muted); font-size: 12px; }
.choice input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.radios { display: grid; gap: 6px; }
.radios label, .check, .toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; }
.radios input, .check input, .toggle input { accent-color: var(--accent); margin-top: 3px; }
.check span { color: var(--muted); line-height: 1.5; }
.check a { color: var(--accent); }
.toggle { padding: 12px 14px; border-radius: var(--r); background: var(--panel); border: var(--bw, 1px) solid var(--line-2); }
.toggle span { display: grid; gap: 2px; }
.toggle small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.toggle input { width: 18px; height: 18px; flex-shrink: 0; }
.form__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--panel); color: var(--muted); font-size: 13px; line-height: 1.5; }
.note .i { width: 17px; height: 17px; margin-top: 1px; color: var(--accent); }
.subh { font: 700 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.form hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 0; }
.photo { display: flex; align-items: center; gap: 16px; }
.photo > div { display: grid; gap: 6px; justify-items: start; }
.org { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--panel); }
.org small { display: block; color: var(--muted); font-size: 12.5px; }

.settings { display: grid; grid-template-columns: 190px 1fr; height: 100%; }
.settings__nav { display: flex; flex-direction: column; gap: 2px; padding: 18px 10px; background: var(--bg); border-right: var(--bw, 1px) solid var(--line-2); }
.settings__nav button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); color: var(--muted); font-weight: 600; font-size: 13.5px; text-align: left; }
.settings__nav button:hover { color: var(--text); background: var(--panel); }
.settings__nav button.on { color: var(--text); background: var(--panel-2); }
.settings__nav .i { width: 17px; height: 17px; }
.settings__body { overflow-y: auto; }
@media (max-width: 640px) {
  .settings { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .settings__nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-2); padding: 8px; }
  .settings__nav span { display: none; }
}

/* the four looks, as cards */
.looks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 14px 22px 22px; }
.looks--mini { padding: 0; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.look { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--r); border: var(--bw, 1px) solid var(--line); background: var(--panel); text-align: left; cursor: pointer; transition: transform .2s var(--ease), border-color .2s; }
.look:hover { transform: translateY(-2px); }
.look.on, .look:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.look input { position: absolute; opacity: 0; }
.look b { font-size: 13px; font-weight: 750; margin-top: 4px; }
.look small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.looks--mini .look b { font-size: 11.5px; }
.look__art { position: relative; height: 84px; border-radius: calc(var(--r) - 4px); overflow: hidden; display: block; }
.looks--mini .look__art { height: 56px; }
.look__art i { position: absolute; display: block; }
.look--aurora .look__art { background: radial-gradient(circle at 20% 20%, rgba(124, 92, 255, .6), transparent 55%), radial-gradient(circle at 85% 70%, rgba(39, 225, 255, .4), transparent 50%), #0b0a14; }
.look--aurora .look__art i:nth-child(1) { left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; background: conic-gradient(#27e1ff, #7c5cff, #ff4fd8, #27e1ff); animation: spin 5s linear infinite; }
.look--aurora .look__art i:nth-child(2) { left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px; border-radius: 50%; background: #1a1540; }
.look--signal .look__art { background: #161513; }
.look--signal .look__art i:nth-child(1) { left: 10px; top: 10px; right: 10px; height: 26px; border-radius: 6px; background: #0f1410; border: 1px solid #2c2a25; }
.look--signal .look__art i:nth-child(1)::after { content: "CH07"; position: absolute; left: 8px; top: 4px; font: 700 14px/1 var(--f-mono); color: #ff6b1a; }
.look--signal .look__art i:nth-child(2) { left: 50%; bottom: 8px; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: #ff6b1a; border: 3px solid #2c2a25; }
.looks--mini .look--signal .look__art i:nth-child(2) { width: 22px; height: 22px; margin-left: -11px; bottom: 5px; }
.looks--mini .look--signal .look__art i:nth-child(1) { height: 18px; }
.looks--mini .look--signal .look__art i:nth-child(1)::after { font-size: 10px; top: 3px; }
.look--pop .look__art { background: #fff4e4; }
.look--pop .look__art i:nth-child(1) { left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; background: #ffc53d; border: 2px solid #1b1a1f; border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; animation: wobble 4s ease-in-out infinite; }
.look--pop .look__art i:nth-child(2) { left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; background: #ff5a36; border: 2px solid #1b1a1f; border-radius: 50%; box-shadow: 2px 2px 0 #1b1a1f; }
.look--pop .look__art i:nth-child(3) { left: 10px; top: 10px; width: 16px; height: 16px; background: #3ddc97; border: 2px solid #1b1a1f; border-radius: 50%; }
.look--midnight .look__art { background: #000; }
.look--midnight .look__art i:nth-child(1) { left: 10px; top: 12px; font: italic 20px/1 var(--f-serif); color: #f5f5f0; }
.look--midnight .look__art i:nth-child(1)::after { content: "Mike"; }
.look--midnight .look__art i:nth-child(2) { left: 10px; right: 10px; bottom: 10px; height: 12px; border-radius: 6px; background: #ccff4d; }
.looks--mini .look--midnight .look__art i:nth-child(1) { font-size: 15px; top: 8px; }
.looks--mini .look--midnight .look__art i:nth-child(2) { height: 9px; bottom: 7px; }

.discover { padding: 6px 22px 22px; display: grid; gap: 8px; }
.discover h3 { font: 700 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 10px 0 2px; }
.dcard { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r); background: var(--panel); }
.dcard > div { flex: 1; min-width: 0; }
.dcard b { display: block; font-weight: 700; }
.dcard small { color: var(--muted); font-size: 12px; }

.palette__in { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: var(--bw, 1px) solid var(--line-2); color: var(--faint); }
.palette__in input { flex: 1; background: none; border: 0; outline: 0; font-size: 17px; color: var(--text); }
.palette__list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.prow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: var(--r); text-align: left; }
.prow b { flex: 1; font-weight: 650; }
.prow small { color: var(--faint); font-size: 12px; }
.prow__i { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: calc(var(--r) - 2px); background: var(--panel); color: var(--muted); }
.prow.is-sel, .prow:hover { background: var(--panel-2); }

.keys { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; padding: 14px 22px 24px; margin: 0; align-items: center; }
.keys dt { text-align: right; }
.keys dd { margin: 0; color: var(--muted); }

.modal--urgent { width: min(460px, 100%); border-color: color-mix(in srgb, var(--sos) 50%, var(--line)); }
.urgent { display: grid; justify-items: center; gap: 10px; padding: 30px 28px 26px; text-align: center; }
.urgent h2 { font: 800 22px/1.2 var(--f-head); letter-spacing: -.02em; }
.urgent__msg { font-size: 17px; font-weight: 650; }
.urgent__icon { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--sos) 18%, transparent); color: var(--sos); animation: pulse 1.4s ease-out infinite; }
.urgent__icon--ok { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); animation: none; }
.urgent__count { font: 800 72px/1 var(--f-mono); color: var(--sos); }
.urgent__acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.acks { display: flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 650; font-size: 13.5px; }
.acks .i { width: 17px; height: 17px; }
.urgent .note { text-align: left; }

/* ================================================================ onboarding */

.onb { height: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); overflow-y: auto; }
.onb__hero { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(32px, 7vw, 96px); overflow: hidden; background: var(--bg-2); border-right: var(--bw, 1px) solid var(--line-2); }
.onb__hero .beams { top: 50%; left: 78%; }
.onb__hero .beams i { width: 380px; height: 380px; left: -190px; top: -190px; border-width: 1px; animation-duration: 4.5s; }
.onb__brand { display: flex; align-items: center; gap: 12px; font: 800 20px/1 var(--f-display); letter-spacing: -.02em; }
.onb__brand .logo { width: 40px; height: 40px; }
.onb__hero h1 { font: 800 clamp(38px, 4.6vw, 64px)/1.02 var(--f-head); letter-spacing: -.04em; max-width: 11ch; }
.onb__hero > p { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 34em; }
.onb__pts { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.onb__pts li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.onb__pts .i { color: var(--accent); }
.onb__demo { align-self: flex-start; }
.onb__form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.onb__form .form { width: min(420px, 100%); padding: 0; gap: 18px; }
.onb__form h2 { font: 800 26px/1.15 var(--f-head); letter-spacing: -.02em; }
.onb__preview { display: flex; justify-content: flex-start; }
.onb__looks { display: grid; gap: 10px; max-width: 520px; }
.onb__lbl { font: 700 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.linkcard {
  width: min(400px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center;
  padding: 30px 28px 26px; border-radius: var(--r-lg); background: var(--panel); border: var(--bw, 1px) solid var(--line); box-shadow: var(--shadow);
}
.linkcard h2 { font: 800 24px/1.15 var(--f-head); letter-spacing: -.02em; }
.qrbox { width: 248px; height: 248px; padding: 10px; border-radius: 18px; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 14px 40px rgba(0, 0, 0, .28); position: relative; }
.qrbox .qr { width: 100%; height: 100%; animation: pop .3s var(--ease); }
.qrbox.is-waiting { background: var(--panel-2); box-shadow: none; border: 2px dashed var(--line); }
.qrbox__wait { color: var(--muted); font-size: 13px; padding: 20px; }
.linkcode { font-size: 26px; font-weight: 800; letter-spacing: .16em; }
.linkcode .mono { font-family: var(--f-mono); }
.steps { display: grid; gap: 8px; text-align: left; margin: 4px 0 0; padding: 0 0 0 22px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.steps b { color: var(--text); font-weight: 650; }
[data-theme="pop"] .linkcard { border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--line); background: #fff; }
[data-theme="pop"] .qrbox { border: 2px solid var(--line); box-shadow: 4px 4px 0 var(--line); }
[data-theme="signal"] .linkcard { background: var(--bg-2); border: 2px solid var(--line-2); }
[data-theme="signal"] .linkcode { color: var(--accent); text-shadow: 0 0 16px rgba(255, 107, 26, .35); }
[data-theme="midnight"] .linkcard { background: transparent; border-color: var(--line-2); }
[data-theme="midnight"] .linkcard h2 { font-weight: 400; font-size: 32px; }
[data-theme="aurora"] .linkcard { backdrop-filter: blur(20px); background: rgba(255, 255, 255, .06); }

@media (max-width: 860px) {
  .onb { grid-template-columns: 1fr; }
  .onb__hero { padding: 36px 24px; border-right: 0; }
  .onb__hero h1 { font-size: 38px; }
}

/* ================================================================ look-specific touches */

/* A · Aurora Glass: glows behind glass panels */
[data-theme="aurora"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 8% 10%, rgba(124, 92, 255, .22), transparent 70%),
    radial-gradient(38vw 38vw at 92% 30%, rgba(39, 225, 255, .12), transparent 70%),
    radial-gradient(50vw 40vw at 45% 110%, rgba(255, 79, 216, .12), transparent 70%);
}
[data-theme="aurora"] .shell { background: transparent; }
[data-theme="aurora"] .side, [data-theme="aurora"] .crew { background: rgba(255, 255, 255, .035); backdrop-filter: blur(24px) saturate(1.2); }
[data-theme="aurora"] .me, [data-theme="aurora"] .banner, [data-theme="aurora"] .lcard { backdrop-filter: blur(14px); }
[data-theme="aurora"] .ch.is-active { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
[data-theme="aurora"] .seg button.on { background: #f4f2ff; color: #14112a; }
[data-theme="aurora"] .feed .msg { background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .08); margin-bottom: 4px; }
[data-theme="aurora"] .modal { background: rgba(20, 17, 42, .92); backdrop-filter: blur(24px); }
[data-theme="aurora"] .pill--accent { color: #d8ff8f; border-color: rgba(182, 255, 59, .35); background: rgba(182, 255, 59, .1); }
[data-theme="aurora"] .btn { background: linear-gradient(135deg, #7c5cff, #27b5ff); }
[data-theme="aurora"] .av { color: #0b0a14; }
[data-theme="aurora"] .room__ttl h1 { font-weight: 700; }

/* B · Signal Radio: numbered channels, LED rows, the log */
[data-theme="signal"] .ch__num { display: block; font: 700 10.5px/1 var(--f-mono); color: var(--faint); width: 30px; flex-shrink: 0; }
[data-theme="signal"] .ch.is-active { background: var(--panel); box-shadow: inset 3px 0 0 var(--accent); }
[data-theme="signal"] .ch.is-active .ch__num { color: var(--accent); }
[data-theme="signal"] .tile { border-radius: 8px; }
[data-theme="signal"] .room__ttl h1 { text-transform: uppercase; font-weight: 900; letter-spacing: .01em; }
[data-theme="signal"] .seg { border-radius: 10px; border: 2px solid var(--line); padding: 0; gap: 0; background: var(--panel); }
[data-theme="signal"] .seg button { border-radius: 0; height: 36px; font: 700 11.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
[data-theme="signal"] .seg button + button { border-left: 2px solid var(--line); }
[data-theme="signal"] .seg button.on { background: var(--accent); color: var(--on-accent); }
[data-theme="signal"] .pill { border-radius: 8px; font: 700 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
[data-theme="signal"] .pill--accent { background: transparent; border: 2px solid var(--text); color: var(--text); }
[data-theme="signal"] .btn { border-radius: 10px; font-family: var(--f-mono); letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
[data-theme="signal"] .feedwrap { background: var(--bg); }
[data-theme="signal"] .feed { margin: 0 18px 18px; padding: 12px 16px; border-radius: 12px; background: var(--lcd); border: 2px solid var(--line-2); gap: 2px; font-family: var(--f-mono); }
[data-theme="signal"] .msg { grid-template-columns: 46px 1fr auto; gap: 10px; padding: 5px 6px; border-radius: 6px; }
[data-theme="signal"] .msg:hover { background: rgba(255, 255, 255, .04); }
[data-theme="signal"] .msg__time { display: block; color: var(--faint); font-size: 12px; padding-top: 1px; }
[data-theme="signal"] .msg__av { display: none; }
[data-theme="signal"] .msg header { display: inline; }
[data-theme="signal"] .msg__name { color: var(--accent); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
[data-theme="signal"] .msg__name::after { content: ">"; margin: 0 6px 0 1px; }
[data-theme="signal"] .msg__meta { display: none; }
[data-theme="signal"] .msg__text { display: inline; font-size: 12.5px; }
[data-theme="signal"] .msg__orig { font-size: 11.5px; font-style: normal; }
[data-theme="signal"] .msg__orig::before { content: "[ORIG] "; }
[data-theme="signal"] .msg--me .msg__name { color: var(--ok); }
[data-theme="signal"] .feed__head h2::after { content: "AUTO-TRANSCRIBED"; margin-left: 10px; color: var(--faint); letter-spacing: .1em; font-size: 10px; }
[data-theme="signal"] .crew__list .pp__txt small { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
[data-theme="signal"] .sosbtn { border-radius: 10px; border-width: 2px; font-family: var(--f-mono); }

/* C · Pop Sticker: outlines, hard shadows, bubbles */
[data-theme="pop"] .side, [data-theme="pop"] .crew { background: var(--bg-2); border-color: var(--line); }
[data-theme="pop"] .room__head, [data-theme="pop"] .feedwrap, [data-theme="pop"] .side__foot, [data-theme="pop"] .dev, [data-theme="pop"] .lead { border-color: var(--line); }
[data-theme="pop"] .me, [data-theme="pop"] .jump, [data-theme="pop"] .lcard, [data-theme="pop"] .banner, [data-theme="pop"] .fsearch { border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--line); background: #fff; }
[data-theme="pop"] .ch.is-active { background: #fff; box-shadow: inset 0 0 0 2px var(--line), 3px 3px 0 var(--line); }
[data-theme="pop"] .ch:hover:not(.is-active) { background: rgba(255, 255, 255, .6); }
[data-theme="pop"] .tile { border: 2px solid var(--line); background: hsl(var(--h) 90% 78%); border-radius: 12px; }
[data-theme="pop"] .av { border: 2px solid var(--line); color: var(--line); background: hsl(var(--h) 85% 72%); }
[data-theme="pop"] .conn { border: 2px solid var(--line); color: var(--line); }
[data-theme="pop"] .room__ttl h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
[data-theme="pop"] .seg { background: transparent; border: 0; gap: 8px; padding: 0; }
[data-theme="pop"] .seg button { height: 38px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--line); font-weight: 750; }
[data-theme="pop"] .seg button.on { background: var(--accent-2); color: #fff; box-shadow: 3px 3px 0 var(--line); }
[data-theme="pop"] .pill { border: 2px solid var(--line); background: #fff; color: var(--line); box-shadow: 2px 2px 0 var(--line); }
[data-theme="pop"] .pill--accent { background: var(--yellow); }
[data-theme="pop"] .btn { border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--line); }
[data-theme="pop"] .btn--ghost { background: #fff; color: var(--line); }
[data-theme="pop"] .ib:hover { background: #fff; }
[data-theme="pop"] .msg { grid-template-columns: auto minmax(0, max-content) auto; }
[data-theme="pop"] .msg:hover { background: transparent; }
[data-theme="pop"] .msg__body { padding: 9px 14px 10px; border-radius: 18px 18px 18px 6px; border: 2px solid var(--line); background: #fff; max-width: 620px; }
[data-theme="pop"] .msg:nth-child(3n + 2) .msg__body { background: #efe9ff; }
[data-theme="pop"] .msg--me .msg__body { background: #e0fff1; }
[data-theme="pop"] .msg__meta { color: var(--muted); }
[data-theme="pop"] .msg__name { font-weight: 800; }
[data-theme="pop"] .modal, [data-theme="pop"] .menu, [data-theme="pop"] .announce { background: #fff; border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--line); }
[data-theme="pop"] .toggle, [data-theme="pop"] .note, [data-theme="pop"] .dcard, [data-theme="pop"] .org { border: 2px solid var(--line); background: #fff; }
[data-theme="pop"] .field input:not([type="range"]):not([type="radio"]):not([type="checkbox"]), [data-theme="pop"] .field select, [data-theme="pop"] .field textarea { border: 2px solid var(--line); background: #fff; }
[data-theme="pop"] .settings__nav { background: var(--bg); }
[data-theme="pop"] .sosbtn { border: 2px solid var(--line); background: #fff; box-shadow: 3px 3px 0 var(--line); }
[data-theme="pop"] .toast { background: var(--line); color: #fff4e4; box-shadow: 4px 4px 0 var(--accent); }
[data-theme="pop"] kbd { border-color: var(--line); background: #fff; color: var(--line); }
[data-theme="pop"] .pp.is-speaking .av { box-shadow: 0 0 0 calc(3px + var(--lvl, 0) * 5px) var(--ok); }
[data-theme="pop"] *::-webkit-scrollbar-thumb { border-color: var(--bg); background: #d4c3a6; }

/* D · Midnight Minimal: hairlines, serif, lime */
[data-theme="midnight"] .side, [data-theme="midnight"] .crew { background: #000; }
[data-theme="midnight"] .me { background: transparent; border-color: var(--line-2); }
[data-theme="midnight"] .ch.is-active { background: transparent; box-shadow: inset 2px 0 0 var(--accent); }
[data-theme="midnight"] .ch.is-active .ch__main b { color: var(--accent); }
[data-theme="midnight"] .tile { background: transparent; border-color: var(--line); border-radius: 50%; }
[data-theme="midnight"] .av { background: transparent; border: 1px solid #3a3a37; color: var(--text); font-family: var(--f-body); font-weight: 500; }
[data-theme="midnight"] .room__head { padding-top: 22px; }
[data-theme="midnight"] .room__ttl h1 { font: 400 40px/1 var(--f-serif); letter-spacing: -.01em; }
[data-theme="midnight"] .seg { background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 0; gap: 18px; min-width: 0; display: flex; }
[data-theme="midnight"] .seg button { border-radius: 0; padding: 0 0 8px; height: auto; background: transparent !important; font-weight: 500; font-size: 13.5px; }
[data-theme="midnight"] .seg button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 600; }
[data-theme="midnight"] .pill { background: transparent; border-color: var(--line); }
[data-theme="midnight"] .pill--accent { border: 0; background: transparent; color: var(--accent); padding: 0 6px; }
[data-theme="midnight"] .banner { background: transparent; }
[data-theme="midnight"] .msg { grid-template-columns: 48px 1fr auto; gap: 14px; border-radius: 0; padding: 12px 0; border-top: 1px solid var(--line-2); }
[data-theme="midnight"] .msg:first-child { border-top: 0; }
[data-theme="midnight"] .msg:hover { background: transparent; }
[data-theme="midnight"] .msg__time { display: block; color: var(--faint); font-size: 12px; padding-top: 2px; }
[data-theme="midnight"] .msg__av { display: none; }
[data-theme="midnight"] .msg__name { font-weight: 500; color: var(--muted); font-size: 13px; }
[data-theme="midnight"] .msg__text { font-size: 15px; }
[data-theme="midnight"] .feed__head h2 .i { color: var(--muted); }
[data-theme="midnight"] .pp.is-speaking .av { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: 0 0 0 calc(var(--lvl, 0) * 6px) rgba(204, 255, 77, .25); }
[data-theme="midnight"] .lcard { background: transparent; }
[data-theme="midnight"] .lobby__hero h1, [data-theme="midnight"] .onb__hero h1 { font-weight: 400; letter-spacing: -.02em; }
[data-theme="midnight"] .onb__hero h1 { font-style: italic; }
[data-theme="midnight"] .modal { background: #070707; }

/* ================================================================ map */

.viewtog { display: flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--panel); border: var(--bw, 1px) solid var(--line-2); }
.viewtog button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.viewtog button .i { width: 16px; height: 16px; }
.viewtog button.on { background: var(--text); color: var(--bg); }
[data-theme="signal"] .viewtog { border-radius: 10px; border: 2px solid var(--line); padding: 0; gap: 0; }
[data-theme="signal"] .viewtog button { border-radius: 0; height: 36px; font: 700 11.5px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
[data-theme="signal"] .viewtog button.on { background: var(--accent); color: var(--on-accent); }
[data-theme="pop"] .viewtog { border: 2px solid var(--line); background: #fff; }
[data-theme="pop"] .viewtog button.on { background: var(--line); color: #fff4e4; }
[data-theme="midnight"] .viewtog { background: transparent; border: 1px solid var(--line); }
[data-theme="midnight"] .viewtog button.on { background: var(--accent); color: #000; }

/* The map takes the stage and, on wide screens, spans stage + transcript height. */
.stage--map { padding: 0; }
.mapstage { position: relative; height: 100%; min-height: 320px; overflow: hidden; }
.map { position: absolute !important; inset: 0; background: var(--bg-2); } /* MapLibre sets position: relative */
.map[data-style="radar"], .map[data-style="constellation"] { background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 10%, var(--bg-2)), var(--bg) 70%); }
.map__err { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.map__ui { position: absolute; inset: 0; pointer-events: none; }
.map__ui > * { pointer-events: auto; }
.mapcard { position: absolute; left: 16px; top: 16px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: color-mix(in srgb, var(--bg-2) 82%, transparent); border: var(--bw, 1px) solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.mapcard b { font-weight: 750; }
.mapcard small { color: var(--muted); font-size: 12px; }
.maptools { position: absolute; right: 16px; top: 16px; display: flex; gap: 8px; }
.maptools .pill { backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg-2) 82%, transparent); }
/* Full-screen map (desktop and tablet; phones already give the map the whole screen) */
.stage--map.is-full { position: fixed; inset: 0; z-index: 55; border-radius: 0; border: 0; margin: 0; box-shadow: none; }
.stage--map.is-full .mapstage { min-height: 100%; }
.stage--map.is-full .mapcard { top: max(16px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); }
.stage--map.is-full .maptools { top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
.stage--map.is-full .mapbottom { bottom: max(24px, env(safe-area-inset-bottom)); }
@media (max-width: 767px) { .maptools__full { display: none; } .stage--map.is-full { position: relative; z-index: auto; } }
.ib--glass { background: color-mix(in srgb, var(--bg-2) 82%, transparent); border: var(--bw, 1px) solid var(--line); backdrop-filter: blur(14px); color: var(--text); border-radius: 999px; }
.mapconsent { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; padding: 18px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--bg-2) 92%, transparent); border: var(--bw, 1px) solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.mapconsent > .i { color: var(--accent); }
.mapconsent p { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.mapconsent__acts { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.mapempty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); max-width: 320px; }
.mapempty .i { color: var(--faint); }
.mapempty b { color: var(--text); }
.mapbottom { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.mapbottom > * { pointer-events: auto; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: color-mix(in srgb, var(--bg-2) 85%, transparent); border: var(--bw, 1px) solid var(--line); backdrop-filter: blur(14px); color: var(--text); }
.chip .i { width: 16px; height: 16px; }
.chip--on { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.maptalk { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 15px; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); transition: transform .12s var(--ease); }
.maptalk:active, .maptalk.is-live { transform: scale(.97); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent), 0 14px 40px rgba(0, 0, 0, .35); }
.maptalk .timer { color: inherit; opacity: .7; }
[data-theme="pop"] .maptalk { border: 3px solid var(--line); box-shadow: 5px 5px 0 var(--line); }
[data-theme="pop"] .mapcard, [data-theme="pop"] .mapconsent, [data-theme="pop"] .chip, [data-theme="pop"] .ib--glass { background: #fff; border: 2px solid var(--line); box-shadow: 3px 3px 0 var(--line); }
.maplibregl-ctrl-attrib { font-size: 10px !important; }
.maplibregl-ctrl-bottom-right { bottom: 84px !important; }
.maplibregl-ctrl-attrib.maplibregl-compact { background: color-mix(in srgb, var(--bg-2) 80%, transparent) !important; color: var(--muted); }

/* markers on real maps */
.mk { --h: 30; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 11.5px/1 var(--f-ui); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); cursor: default; }
.mk__dot { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 14px/1 var(--f-display); color: #0d0c10; text-shadow: none; background: linear-gradient(135deg, hsl(var(--h) 78% 64%), hsl(calc(var(--h) + 42) 80% 52%)); border: 2px solid #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.mk.is-me .mk__dot { border-color: #ff6b1a; }
.mk.is-speaking .mk__dot { animation: mkpulse 1.2s ease-out infinite; }
.mk--beams .mk__dot { box-shadow: 0 0 18px rgba(255, 107, 26, .8); }
.mk--arcs .mk__dot { border-color: #27e1ff; box-shadow: 0 0 16px rgba(39, 225, 255, .7); }
.mk--sticker { color: #1b1a1f; text-shadow: none; }
.mk__face { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 800 17px/1 var(--f-display); background: hsl(var(--h) 85% 72%); border: 2px solid #1b1a1f; box-shadow: 3px 3px 0 #1b1a1f; transform: rotate(-6deg); }
.mk--sticker b { padding: 2px 6px; border-radius: 6px; background: #fff; border: 2px solid #1b1a1f; }
.mk__bubble { padding: 4px 8px; border-radius: 10px 10px 10px 2px; background: #3ddc97; border: 2px solid #1b1a1f; font-size: 11px; animation: bob 1.6s ease-in-out infinite; }
.mk--sos { color: #fff; }
.mk--sos span { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #ff4b3e; border: 2px solid #fff; font: 900 11px/1 var(--f-mono); animation: mkpulse 1s ease-out infinite; }
@keyframes mkpulse { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 26, .7); } 100% { box-shadow: 0 0 0 18px rgba(255, 107, 26, 0); } }

/* drawn maps (Radar, Constellation) */
.drawn { display: block; width: 100%; height: 100%; font-family: var(--f-ui); }
.drawn .ring { fill: none; stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1; stroke-dasharray: 3 5; }
.drawn .ring-l { fill: var(--faint); font: 600 10.5px/1 var(--f-mono); }
.drawn .axis { stroke: color-mix(in srgb, var(--accent) 22%, transparent); stroke-width: 1; }
.drawn .sweep { animation: spin 5s linear infinite; }
.drawn .sweep path { fill: url(#none); fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.drawn .link { stroke: color-mix(in srgb, var(--text) 30%, transparent); stroke-width: 1; }
.drawn .pt__halo { fill: hsl(var(--h) 80% 60% / .16); }
.drawn .pt__dot { fill: hsl(var(--h) 80% 62%); stroke: var(--bg); stroke-width: 2; }
.drawn .is-me .pt__dot { fill: var(--accent); }
.drawn .is-speaking .pt__halo { fill: color-mix(in srgb, var(--accent) 35%, transparent); animation: halo 1.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.drawn .is-sos .pt__dot { fill: var(--sos); }
.drawn .pt__name { fill: var(--text); font-size: 12px; font-weight: 700; text-anchor: middle; }
.drawn .pt__km { fill: var(--muted); font: 600 10.5px/1 var(--f-mono); text-anchor: middle; }
.drawn--constellation .pt__dot { fill: var(--text); }
.drawn--constellation .is-me .pt__dot { fill: var(--accent); }
@keyframes halo { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }

/* ================================================================ voice overlay */

.voiceov { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; min-width: min(420px, 92vw); max-width: 92vw; padding: 14px 20px 14px 14px; border-radius: 999px; background: var(--panel-2); border: var(--bw, 1px) solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); backdrop-filter: blur(18px); animation: toast .3s var(--ease); z-index: 65; }
.voiceov b { font-size: 15px; }
.voiceov p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.voiceov__orb { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); }
.voiceov--listening .voiceov__orb { animation: pulse 1.2s ease-out infinite; }
.voiceov--thinking .voiceov__orb .i { animation: spin 1.2s linear infinite; }
.voiceov.is-err .voiceov__orb { background: var(--sos); color: #fff; }

/* ================================================================ preview · invite · member */

.preview { display: grid; justify-items: center; gap: 10px; padding: 34px 28px 26px; text-align: center; }
.preview h2 { font: 800 24px/1.2 var(--f-head); letter-spacing: -.02em; }
.preview__when { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.preview__desc { max-width: 38ch; line-height: 1.55; }
.preview__snip { color: var(--muted); font-style: italic; max-width: 40ch; }
.tile--xl { width: 76px; height: 76px; font-size: 38px; border-radius: 20px; }
.av--xxl { width: 96px; height: 96px; font-size: 38px; }
.invite { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 10px 22px 24px; }
.qrbox--sm { width: 188px; height: 188px; padding: 8px; }
.invite__side { display: grid; gap: 8px; justify-items: start; }
.invite__link { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 520px) { .invite { grid-template-columns: 1fr; justify-items: center; } .invite__side { justify-items: center; text-align: center; } }
.dcard__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.dcard__main > div { min-width: 0; }
.dnear { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: var(--r); background: var(--panel); }
.choice--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .choice--3 { grid-template-columns: 1fr; } }
.field--place { display: none; }
.form:has(input[name="vis"][value="nearby"]:checked) .field--place { display: grid; }
.pro { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--panel); border: var(--bw, 1px) solid var(--line-2); }
.pro .i { color: var(--faint); margin-top: 1px; }
.pro small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 2px; }
.pro--on { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.pro--on .i { color: var(--accent); fill: var(--accent); }
.pp__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; }

/* ================================================================ photos */

.modal--photo { width: min(560px, 100%); }
.photosheet { display: grid; gap: 14px; padding: 18px; }
.photosheet__img { width: 100%; max-height: 52vh; object-fit: contain; border-radius: var(--r); background: #000; }
.phstatus { display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 650; color: var(--muted); }
.phstatus .i { width: 18px; height: 18px; }
.phstatus--ok { color: var(--ok); }
.phstatus--err { color: var(--sos); text-align: center; }
.phstatus--live { color: var(--accent); }
.photosheet__acts { display: grid; gap: 10px; text-align: center; }
.photosheet__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photosheet [data-caption] { touch-action: none; user-select: none; }
.photosheet [data-caption].is-live { transform: scale(.98); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.msgphoto { display: block; margin-top: 6px; max-width: min(360px, 100%); width: 100%; border-radius: calc(var(--r) - 2px); overflow: hidden; background: var(--panel-2); cursor: zoom-in; }
.msgphoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-theme="pop"] .msgphoto { border: 2px solid var(--line); }
[data-theme="signal"] .msgphoto { border: 1px solid var(--line); margin: 6px 0 2px; }
[data-theme="signal"] .msg:has(.msgphoto) .msg__body { display: block; }
.modal--lightbox { width: auto; max-width: min(1200px, 96vw); background: #000; border: 0; padding: 0; overflow: hidden; }
.lightbox { position: relative; }
.lightbox img { display: block; max-width: min(1200px, 96vw); max-height: 86vh; object-fit: contain; }
.lightbox p { padding: 12px 16px; color: #f1e9da; background: #111; font-size: 14px; }
.lightbox__x { position: absolute; right: 10px; top: 10px; }
#app.is-dropping::after {
  content: "Drop to share this photo"; position: fixed; inset: 12px; z-index: 80; display: flex; align-items: center; justify-content: center;
  border: 3px dashed var(--accent); border-radius: 24px; background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--text);
  font: 800 22px/1 var(--f-head); pointer-events: none; backdrop-filter: blur(4px);
}

/* ================================================================ embedded preview (landing page) */

.embed body { pointer-events: none; }
.embed .toast, .embed .announce { display: none; }

/* ================================================================ motion */

@keyframes bar { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes ring { 0% { transform: scale(.72); opacity: .75; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(22px, -16px); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-6px) rotate(var(--r, 0deg)); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes press { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 26, .55), 0 0 50px rgba(255, 107, 26, .5); } 50% { box-shadow: 0 0 0 16px rgba(255, 107, 26, 0), 0 0 50px rgba(255, 107, 26, .5); } }
@keyframes wobble {
  0%, 100% { border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; transform: rotate(0); }
  50% { border-radius: 44% 56% 46% 54% / 57% 43% 57% 43%; transform: rotate(6deg); }
}
@keyframes typing { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sos) 45%, transparent); } 100% { box-shadow: 0 0 0 22px transparent; } }

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