/* Dead Channel — a dead channel is one nobody's watching. */

:root {
  --bg:        #f5f4ef;
  --bg-2:      #ebe8dd;
  --fg:        #14161f;
  --fg-mute:   #5a5f73;
  --line:      rgba(20, 22, 31, 0.12);
  --line-2:    rgba(20, 22, 31, 0.26);
  --signal:    #d99b1a;
  --intf:      #c53434;
  --link:      #2f6f9f;
  --onair:     #3f7f52;
  --mag:       #8f3fa0;
  --blu:       #3a45a8;

  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Consolas,
          "Liberation Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(16px, 3vw, 32px);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Native `hidden` attribute must beat display:flex/grid on fixed overlays. */
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(20, 22, 31, 0.025) 0 1px,
    transparent 1px 3px
  );
  z-index: 1;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor; }

.mono { font-family: var(--mono); }

/* ---------- Boot ---------- */

.boot {
  position: fixed; inset: 0;
  background: var(--bg);
  display: grid; place-items: center;
  z-index: 100;
  transition: opacity 240ms ease-out, visibility 240ms;
}
.boot.is-off { opacity: 0; visibility: hidden; }
.boot__label {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(48px, 10vw, 120px);
  color: var(--fg);
  text-shadow: -2px 0 var(--intf), 2px 0 var(--link);
  animation: shimmer 1.6s steps(3) infinite;
}
@keyframes shimmer {
  0%, 100% { transform: translate(0, 0); opacity: 1; }
  33%      { transform: translate(1px, 0); opacity: 0.9; }
  66%      { transform: translate(-1px, 0.5px); opacity: 1; }
}

/* ---------- Signature: color-bar wipe ---------- */

.bars {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    var(--signal)  0 14.28%,
    var(--onair)  14.28% 28.57%,
    var(--link)   28.57% 42.85%,
    var(--mag)    42.85% 57.14%,
    var(--blu)    57.14% 71.42%,
    var(--intf)   71.42% 85.71%,
    var(--fg)     85.71% 100%);
}
.bars.is-wiping { animation: wipe 260ms linear forwards; }
@keyframes wipe {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .boot__label { animation: none; text-shadow: none; }
  .bars.is-wiping { animation: none; opacity: 0.4; transition: opacity 80ms; }
  .bars.is-wiping.is-done { opacity: 0; }
}

/* ---------- App shell ---------- */

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh; min-height: 100dvh;
  padding: var(--pad);
  max-width: 1080px; margin: 0 auto;
}
.screen { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 32px); }
.screen--center {
  min-height: calc(100vh - 2 * var(--pad));
  min-height: calc(100dvh - 2 * var(--pad));
  justify-content: center; align-items: stretch;
  max-width: 520px; margin: 0 auto;
}
.screen--game {
  gap: 0; padding: 0;
  --fg: #f5f4ef;
  --fg-mute: #8a8fa3;
  --line: rgba(245, 244, 239, 0.10);
  --line-2: rgba(245, 244, 239, 0.22);
}
.screen--signal { max-width: 720px; margin: 0 auto; }

/* ---------- Brand / tagline / page head ---------- */

.brand { display: flex; align-items: baseline; gap: 12px; font-weight: 800; letter-spacing: -0.04em; }
.brand__mark {
  font-family: var(--mono);
  font-size: 14px;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--signal);
  letter-spacing: 0.06em;
}
.brand__word { font-size: clamp(28px, 5vw, 44px); }
.tagline { color: var(--fg-mute); font-size: clamp(15px, 2vw, 17px); margin: 0; font-style: italic; }

.page-head {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.page-title {
  margin: 0;
  font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(20px, 3vw, 28px);
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-mute);
}
.field__row {
  display: flex; align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.field__prefix {
  display: grid; place-items: center;
  padding: 0 12px;
  color: var(--fg-mute);
  font-family: var(--mono);
  border-right: 1px solid var(--line);
}
.field__input,
.field__textarea {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 17px;
  outline: none;
}
.field__row .field__input { background: transparent; border: 0; padding: 14px 14px; }
.field__textarea { font-family: var(--sans); resize: vertical; min-height: 84px; }
.field__input:focus,
.field__textarea:focus,
.field__row:focus-within {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(240, 192, 74, 0.15);
}
.field__hint { font-size: 13px; color: var(--fg-mute); }
.field__error {
  font-family: var(--mono); font-size: 13px; color: var(--intf);
  padding: 8px 10px;
  border-left: 2px solid var(--intf);
  background: rgba(230, 69, 69, 0.06);
  margin: 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 20px;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: transform 80ms ease-out, background 120ms, color 120ms, border-color 120ms;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--signal); color: #191612; border-color: var(--signal); }
.btn--primary:hover { background: #b8830f; border-color: #b8830f; color: var(--bg); }
.btn--ghost { color: var(--fg); background: transparent; }
.btn--ghost:hover { border-color: var(--fg); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

.link-btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-mute);
  padding: 6px 8px;
}
.link-btn:hover { color: var(--fg); }

/* ---------- Topbar / dashboard ---------- */

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.topbar__left { display: flex; align-items: center; gap: 12px; }
.topbar__right { display: flex; gap: 20px; }
.handle { font-size: 15px; color: var(--fg); }
.stat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.stat__label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--fg-mute); text-transform: uppercase;
}
.stat__value { font-size: 18px; }
.stat__value[data-signal] { color: var(--signal); }

/* Dashboard tiles */
.cta-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .cta-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.tile {
  text-align: left;
  padding: clamp(18px, 2.5vw, 26px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 12px;
  min-height: 180px;
  transition: background 120ms, border-color 120ms, transform 120ms;
}
.tile:hover { border-color: var(--fg); transform: translateY(-2px); }
.tile__eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--fg-mute); text-transform: uppercase;
}
.tile__title {
  font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.05; text-transform: uppercase;
}
.tile__meta { color: var(--fg-mute); font-size: 14px; margin-top: auto; }
.tile--primary { background: var(--signal); color: #191612; border-color: var(--signal); }
.tile--primary .tile__eyebrow,
.tile--primary .tile__meta { color: #4a3d1f; }
.tile--primary:hover { background: #b8830f; border-color: #b8830f; color: var(--bg); }
.tile--primary:hover .tile__eyebrow,
.tile--primary:hover .tile__meta { color: rgba(245, 244, 239, 0.72); }
.tile--live { border-color: var(--link); }
.tile--live .tile__eyebrow { color: var(--link); }
.tile--live:hover { background: rgba(47, 111, 159, 0.08); }

/* Join by code form */
.joincode { display: flex; flex-direction: column; gap: 10px; }
.joincode__form { display: flex; gap: 8px; }
.joincode__input {
  flex: 0 0 160px;
  text-transform: uppercase; letter-spacing: 0.25em;
  font-family: var(--mono); font-size: 20px; text-align: center;
}

/* ---------- Pilot list ---------- */

.section-title {
  font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: 20px; display: flex; align-items: baseline; gap: 10px; margin: 0;
}
.section-title__count { font-size: 14px; color: var(--fg-mute); }
.pilot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pilot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.pilot__title { font-weight: 700; letter-spacing: -0.01em; }
.pilot__meta { grid-column: 1; font-family: var(--mono); font-size: 12px; color: var(--fg-mute); }
.pilot__previews { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--mono); font-size: 13px; color: var(--fg-mute); }
.pilot__previews strong { color: var(--onair); font-weight: 700; }
.pilot__actions { grid-column: 1 / -1; display: flex; gap: 12px; margin-top: 6px; }
.pilot__copy { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--link); padding: 4px 0; }
.pilot__copy:hover { color: var(--fg); }
.empty { color: var(--fg-mute); font-style: italic; padding: 20px 0; }

/* ---------- Preview / vote ---------- */

.stationid {
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
}
.stationid__bar {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg,
    var(--signal) 0 14%, var(--onair) 14% 28%, var(--link) 28% 42%,
    var(--mag) 42% 57%, var(--blu) 57% 71%, var(--intf) 71% 85%, var(--fg) 85% 100%);
}
.stationid__eyebrow { font-size: 11px; letter-spacing: 0.16em; color: var(--fg-mute); }
.stationid__title {
  margin: 0; font-weight: 800; letter-spacing: -0.04em;
  font-size: clamp(30px, 6vw, 52px); text-transform: uppercase; line-height: 1;
}
.stationid__author { color: var(--fg-mute); font-size: 14px; margin: 0; }
.stationid__author span { color: var(--link); }
.stationid__pitch { border-left: 2px solid var(--signal); padding: 8px 14px; margin: 0; font-size: 17px; font-style: italic; }
.stationid__meta { color: var(--fg-mute); font-size: 13px; margin: 0; }

.verdict-title { margin: 0; font-weight: 800; letter-spacing: -0.03em; font-size: clamp(28px, 5vw, 40px); text-transform: uppercase; }
.verdict-sub { color: var(--fg-mute); margin: 0; }
.verdict-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.verdict {
  padding: 18px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  text-align: left; transition: border-color 120ms, background 120ms;
}
.verdict:hover { border-color: var(--fg); }
.verdict__label { display: block; font-weight: 700; letter-spacing: -0.01em; font-size: 17px; text-transform: uppercase; }
.verdict__hint { display: block; color: var(--fg-mute); font-size: 13px; margin-top: 4px; }
.verdict[data-v="fun"] .verdict__label      { color: var(--onair); }
.verdict[data-v="too_strong"] .verdict__label { color: var(--intf); }
.verdict[data-v="too_weak"] .verdict__label   { color: var(--mag); }
.verdict[data-v="confusing"] .verdict__label  { color: var(--link); }
.verdict[data-v="keep"] .verdict__label     { color: var(--signal); }
.verdict[data-v="change"] .verdict__label   { color: var(--fg-mute); }

/* ---------- Signal chat (unchanged) ---------- */

.signal-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.signal-head__mark { color: var(--signal); font-size: 13px; letter-spacing: 0.14em; }
.signal-body { display: flex; flex-direction: column; gap: 20px; }
.signal-thread { display: flex; flex-direction: column; gap: 14px; }
.msg { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); max-width: 92%; }
.msg--player { align-self: flex-end; background: var(--bg-2); }
.msg--signal { align-self: flex-start; border-left: 2px solid var(--signal); }
.msg--system { align-self: flex-start; border-left: 2px solid var(--link); color: var(--fg-mute); font-family: var(--mono); font-size: 13px; }
.msg__from { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--fg-mute); text-transform: uppercase; margin-bottom: 4px; }

.draft { padding: 16px; border: 1px solid var(--signal); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; background: rgba(240, 192, 74, 0.04); }
.draft__title { font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; font-size: 22px; margin: 0; }
.draft__kind { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--fg-mute); }
.draft__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; font-family: var(--mono); font-size: 13px; }
.draft__stats dt { color: var(--fg-mute); }
.draft__stats dd { margin: 0; color: var(--fg); }
.draft__weakness { color: var(--fg-mute); font-style: italic; font-size: 14px; }
.draft__clamped { color: var(--intf); font-family: var(--mono); font-size: 12px; }
.draft__actions { display: flex; gap: 12px; margin-top: 6px; }
.qlist { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; margin: 4px 0 0; }
.qlist li { color: var(--fg); font-size: 15px; }
.signal-actions { display: flex; gap: 12px; }

/* ---------- Broadcaster select / cards ---------- */

.bcaster-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .bcaster-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .bcaster-grid { grid-template-columns: repeat(3, 1fr); } }
.bcaster-grid--compact { gap: 8px; }
.bcaster {
  --accent: var(--fg);
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 120ms, background 120ms;
}
.bcaster:hover { transform: translateY(-2px); background: rgba(20,22,31,0.04); }
.bcaster.is-picked { background: color-mix(in oklab, var(--accent) 12%, var(--bg-2)); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.bcaster__head { display: flex; align-items: center; gap: 12px; }
.bcaster__mascot {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 6px;
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4);
}
.bcaster__mascot svg { width: 100%; height: 100%; display: block; }
.bcaster__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bcaster__title { font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; font-size: 20px; color: var(--accent); line-height: 1; }
.bcaster__role {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--fg-mute); text-transform: uppercase;
  padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 999px;
  align-self: flex-start;
}
.bcaster__tag { color: var(--fg-mute); font-size: 13px; font-style: italic; }
.bcaster__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-family: var(--mono); font-size: 12px; color: var(--fg-mute); margin-top: 4px; }
.bcaster__stats b { color: var(--fg); font-weight: 500; }
.bcaster-cta { display: flex; justify-content: center; padding-top: 8px; }

/* Mode picker (lobby) */
.lobby__modes { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lobby__modes { grid-template-columns: 1fr 1fr; } }
.mode-btn {
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 100ms, border-color 120ms, background 120ms;
}
.mode-btn:hover { transform: translateY(-1px); border-color: var(--fg); }
.mode-btn.is-picked { border-color: var(--signal); background: rgba(240,192,74,0.06); box-shadow: 0 0 0 1px var(--signal) inset; }
.mode-btn__eyebrow { font-size: 11px; letter-spacing: 0.16em; color: var(--fg-mute); text-transform: uppercase; }
.mode-btn.is-picked .mode-btn__eyebrow { color: var(--signal); }
.mode-btn__title { font-weight: 800; letter-spacing: -0.02em; font-size: 20px; text-transform: uppercase; }
.mode-btn__hint { color: var(--fg-mute); font-size: 13px; }
.mode-btn--signal-steal.is-picked {
  border-color: var(--mag); background: rgba(179,86,196,0.08);
  box-shadow: 0 0 0 1px var(--mag) inset;
}
.mode-btn--signal-steal.is-picked .mode-btn__eyebrow { color: var(--mag); }
@media (min-width: 900px) { .lobby__modes { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Lobby ---------- */

.lobby { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px); }
.lobby__section { display: flex; flex-direction: column; gap: 10px; }
.lobby__code { padding: 20px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2); position: relative; overflow: hidden; }
.lobby__code::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    var(--signal) 0 14%, var(--onair) 14% 28%, var(--link) 28% 42%,
    var(--mag) 42% 57%, var(--blu) 57% 71%, var(--intf) 71% 85%, var(--fg) 85% 100%);
}
.lobby__code-label { font-size: 11px; letter-spacing: 0.14em; color: var(--fg-mute); text-transform: uppercase; }
.lobby__code-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 0; }
.lobby__code-value { font-size: clamp(48px, 10vw, 88px); font-weight: 700; letter-spacing: 0.2em; color: var(--link); line-height: 1; }
.lobby__code-hint { color: var(--fg-mute); font-size: 13px; }
.lobby__code-hint span { color: var(--fg); word-break: break-all; }
.lobby__players { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lobby__player {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px; font-family: var(--mono); font-size: 13px;
}
.lobby__player-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-mute); }
.lobby__cta { display: flex; align-items: center; gap: 16px; }
.lobby__cta-hint { color: var(--fg-mute); font-size: 13px; }

/* ---------- Game / HUD ---------- */

.hud {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 16px;
  z-index: 3;
  pointer-events: none;
}
.hud__left, .hud__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hud__right { justify-content: flex-end; }
.hud__label { font-size: 10px; letter-spacing: 0.16em; color: var(--fg-mute); text-transform: uppercase; }
.hud__bar {
  width: 160px; height: 4px;
  background: rgba(245, 244, 239, 0.15);
  overflow: hidden;
}
.hud__bar-fill {
  height: 100%; width: 100%;
  background: var(--onair);
  transform-origin: left;
  transition: transform 100ms linear;
}
.hud__bar--target .hud__bar-fill { background: var(--signal); }
.hud__towerbar { display: flex; align-items: center; gap: 10px; }
.hud__stack { display: flex; flex-direction: column; gap: 4px; }

/* Ammo pips */
.hud__ammo { display: flex; gap: 4px; }
.hud__ammo-pip {
  width: 22px; height: 6px;
  border: 1px solid var(--line-2);
  background: rgba(14,15,20,0.55);
  overflow: hidden;
  position: relative;
}
.hud__ammo-pip-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 100%;
  background: var(--signal);
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 60ms linear;
}
.hud__ammo-pip.is-full .hud__ammo-pip-fill { background: var(--fg); }

/* Hype meter */
.hud__hype { display: flex; align-items: center; gap: 6px; }
.hud__hype-label {
  font-size: 9px; letter-spacing: 0.18em; color: var(--fg-mute);
  text-transform: uppercase;
}
.hud__hype-bar {
  width: 140px; height: 4px;
  background: rgba(245,244,239,0.14);
  overflow: hidden;
  position: relative;
}
.hud__hype-fill {
  height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--intf) 0%, var(--signal) 50%, var(--onair) 100%);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 120ms linear;
}
.hud__hype.is-ready .hud__hype-label { color: var(--signal); }
.hud__hype.is-ready .hud__hype-bar {
  box-shadow: 0 0 0 1px var(--signal), 0 0 12px rgba(240,192,74,0.7);
  animation: hype-pulse 1.1s ease-in-out infinite;
}
@keyframes hype-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--signal), 0 0 6px rgba(240,192,74,0.35); }
  50%      { box-shadow: 0 0 0 1px var(--signal), 0 0 16px rgba(240,192,74,0.9); }
}

/* Super label */
.hud__super {
  font-size: 11px; letter-spacing: 0.14em; color: var(--signal);
  padding: 3px 8px;
  border: 1px solid var(--signal);
  border-radius: 2px;
  text-transform: uppercase;
  animation: hype-pulse 1.1s ease-in-out infinite;
}

/* Signal Steal HUD block */
.hud__steal {
  display: flex; align-items: center; gap: 10px;
}
.hud__steal-role {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 2px;
  color: var(--fg-mute);
}
.hud__steal-role.is-defend { color: var(--link); border-color: var(--link); }
.hud__steal-role.is-attack { color: var(--intf); border-color: var(--intf); }

/* PvP scoreboard (Ratings War) */
.hud__pvp {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.hud__pvp-row {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(14,15,20,0.7); backdrop-filter: blur(4px);
}
.hud__pvp-team { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.hud__pvp-team--a { color: var(--link); }
.hud__pvp-team--b { color: var(--intf); }
.hud__pvp-count { font-size: 20px; font-weight: 700; color: var(--fg); min-width: 20px; text-align: center; }
.hud__pvp-sep { color: var(--fg-mute); }
.hud__pvp-mine { font-size: 10px; letter-spacing: 0.16em; color: var(--fg-mute); text-transform: uppercase; }
.hud__center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hud__wave { font-size: 12px; color: var(--fg-mute); letter-spacing: 0.16em; }
.hud__timer { font-size: 18px; color: var(--fg); }
.hud__ability {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-width: 100px; text-align: center;
}
.hud__ability.is-ready { color: var(--fg); border-color: var(--fg); }

.stage {
  display: block;
  width: 100vw; height: 100vh; height: 100dvh;
  background: #05060a;
  cursor: crosshair;
  touch-action: none;
}

/* ---------- Game FX overlays ---------- */

.fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }

.popup {
  position: absolute;
  font-family: var(--mono); font-weight: 700;
  font-size: 15px;
  color: var(--fg);
  text-shadow: 0 1px 0 #000, 0 0 4px rgba(0,0,0,0.4);
  animation: popup 700ms cubic-bezier(.2,.9,.2,1) forwards;
}
.popup--crit { color: var(--signal); font-size: 20px; }
.popup--kill {
  font-family: var(--sans);
  font-weight: 800; letter-spacing: -0.02em;
  font-size: 17px;
  text-shadow: -1.5px 0 var(--intf), 1.5px 0 var(--link), 0 1px 0 #000;
}
.popup--sub    { color: var(--signal); }
.popup--viewer { color: var(--onair); }
@keyframes popup {
  0%   { transform: translate(-50%, 0)  scale(0.85); opacity: 0; }
  15%  { transform: translate(-50%, -6px) scale(1.05); opacity: 1; }
  100% { transform: translate(-50%, -50px) scale(1); opacity: 0; }
}

.emoji {
  position: absolute;
  bottom: 90px;
  right: 30px;
  font-size: 26px;
  animation: emoji-float 2400ms cubic-bezier(.2,.7,.3,1) forwards;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}
@keyframes emoji-float {
  0%   { opacity: 0; transform: translateY(10px) scale(0.6) rotate(-8deg); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-260px) scale(1.1) rotate(6deg); }
}

/* ---------- Viewers pill ---------- */

.viewers {
  position: fixed; right: 16px; bottom: 16px;
  z-index: 4;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(14, 15, 20, 0.75);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.viewers__dot { color: var(--intf); animation: pulse 1.4s ease-in-out infinite; font-size: 10px; }
.viewers__count { font-size: 15px; font-weight: 700; color: var(--fg); }
.viewers__label { font-size: 11px; color: var(--fg-mute); letter-spacing: 0.12em; text-transform: uppercase; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Spectator chat ---------- */

.chatpanel {
  position: fixed; left: 12px; top: 60px; bottom: 100px;
  width: 220px;
  z-index: 4;
  display: flex; flex-direction: column;
  background: linear-gradient(to right, rgba(14,15,20,0.65) 0%, rgba(14,15,20,0) 100%);
  pointer-events: none;
}
.chatpanel__head {
  font-size: 10px; letter-spacing: 0.16em; color: var(--intf);
  padding: 0 8px 8px; text-transform: uppercase;
}
.chatpanel__list {
  list-style: none; margin: 0; padding: 0 8px;
  display: flex; flex-direction: column-reverse; gap: 6px;
  overflow: hidden; flex: 1;
}
.chatpanel__list li {
  font-size: 12px;
  line-height: 1.3;
  animation: chat-in 200ms ease-out;
  color: var(--fg);
}
.chatpanel__list li .who { color: var(--link); font-family: var(--mono); }
@keyframes chat-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (max-width: 720px) { .chatpanel { display: none; } }

/* ---------- Reaction hints ---------- */

.reactions {
  position: fixed; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: rgba(14,15,20,0.72);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.reactions__key {
  font-size: 11px; padding: 2px 6px;
  border: 1px solid var(--line-2); border-radius: 3px;
  color: var(--fg-mute); letter-spacing: 0.06em;
}
.reactions__emoji { font-size: 15px; margin-right: 6px; }
.reactions__emoji:last-child { margin-right: 0; }

/* ---------- Wave-break card ---------- */

.wavecard {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  z-index: 5;
  background: rgba(14, 15, 20, 0.72);
  backdrop-filter: blur(2px);
}
.wavecard { flex-direction: column; }
.wavecard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.wavecard__eyebrow { font-size: 12px; letter-spacing: 0.2em; color: var(--intf); text-transform: uppercase; }
.wavecard__num {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(120px, 22vw, 240px);
  letter-spacing: -0.06em; line-height: 1;
  color: var(--signal);
  text-shadow: -3px 0 var(--intf), 3px 0 var(--link);
}
.wavecard__label { font-size: 12px; letter-spacing: 0.24em; color: var(--fg); text-transform: uppercase; }

/* ---------- End card ---------- */

.endcard {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--pad);
  gap: 18px;
  z-index: 6;
  background: rgba(14, 15, 20, 0.9);
  backdrop-filter: blur(3px);
  text-align: center;
}
.endcard__eyebrow { font-size: 11px; letter-spacing: 0.2em; color: var(--fg-mute); text-transform: uppercase; }
.endcard__title {
  margin: 0;
  font-weight: 800; letter-spacing: -0.04em;
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.02; text-transform: uppercase;
  max-width: 900px;
  text-shadow: -2px 0 var(--intf), 2px 0 var(--link);
}
.endcard__stats { display: flex; gap: 20px; font-size: 13px; color: var(--fg-mute); letter-spacing: 0.12em; text-transform: uppercase; }
.endcard__stats b { color: var(--fg); font-size: 20px; font-weight: 700; margin: 0 4px; }
.endcard__actions { margin-top: 6px; }

/* ---------- Onboard ---------- */

.onboard { display: flex; flex-direction: column; gap: 20px; }
