/* ============================================================
   DISEM·BOWLING — TV-first physics party game
   ============================================================ */

:root {
  --bg: #08080d;
  --bg-deep: #02020a;
  --ink: #f7f6f0;
  --ink-dim: #a3a299;
  --acid: #b3ff2c;
  --acid-deep: #6cba00;
  --blood: #ff2c4d;
  --blood-deep: #b50029;
  --bone: #f4ecd6;
  --bruise: #5d3bff;
  --rot: #45ffae;
  --night: #131726;
  --rim: #1f2330;
  --shadow: rgba(0, 0, 0, 0.6);
  --tv-radius: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none; /* TV: no cursor visible */
}

body.tv {
  background: radial-gradient(ellipse at 30% 0%, #1a1735 0%, #08070f 55%, #000 100%);
}

/* ── 3D stage ───────────────────────────────────────────── */

#stage3d {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: radial-gradient(ellipse at 50% 70%, #1a1d2c 0%, #0d0e16 50%, #06060c 100%);
}

#stage3d canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
  z-index: 5;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.65) 100%);
}

/* ── Top bar ───────────────────────────────────────────────── */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 40px;
  pointer-events: none;
}

.brand {
  font-family: 'Rubik Mono One', 'Bungee', sans-serif;
  font-size: clamp(36px, 4.6vw, 78px);
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow:
    0 0 30px rgba(179, 255, 44, 0.55),
    0 0 4px rgba(255, 44, 77, 0.7);
}

.brand-z {
  color: var(--acid);
  text-shadow:
    -3px 3px 0 var(--blood),
    -6px 6px 0 rgba(255, 44, 77, 0.4),
    0 0 20px rgba(179, 255, 44, 0.7);
}

.brand-rest {
  color: var(--bone);
}

.brand-blip {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.3em;
  background: var(--blood);
  border-radius: 50%;
  vertical-align: super;
  animation: blip 1.4s steps(2) infinite;
  box-shadow: 0 0 12px var(--blood);
}

@keyframes blip {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.1; }
}

.topbar-meta {
  text-align: right;
  display: grid;
  gap: 6px;
  background: rgba(2, 2, 6, 0.55);
  border: 1px solid rgba(179, 255, 44, 0.18);
  border-radius: 12px;
  padding: 12px 20px;
  backdrop-filter: blur(6px);
}

.meta-row {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.meta-label {
  color: var(--ink-dim);
  letter-spacing: 0.18em;
  font-size: 11px;
}

.meta-row strong {
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 22px;
  color: var(--bone);
  letter-spacing: 0.06em;
}

body.is-attract .hide-when-attract { display: none; }

/* ── Side panels ───────────────────────────────────────────── */

.players, .scoreboard {
  position: fixed;
  z-index: 18;
  width: 280px;
  background: rgba(4, 5, 12, 0.7);
  border: 1px solid rgba(179, 255, 44, 0.14);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  padding: 14px 16px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.players {
  left: 28px;
  top: 130px;
  max-height: calc(100vh - 280px);
  overflow: hidden;
}

.scoreboard {
  right: 28px;
  top: 200px;
  max-height: calc(100vh - 360px);
  overflow: hidden;
}

.players-header, .scoreboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--acid);
  text-transform: uppercase;
}

.players-count {
  font-family: 'Rubik Mono One', sans-serif;
  background: var(--acid);
  color: #000;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.players-list, .scoreboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.players-list li, .scoreboard-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 9px;
  font-size: 14px;
}

.player-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}

.player-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.player-score {
  font-family: 'Rubik Mono One', sans-serif;
  color: var(--bone);
  font-size: 15px;
}

.scoreboard-list li.rank-1 { background: linear-gradient(90deg, rgba(255,209,0,0.25), rgba(255,209,0,0.05)); }
.scoreboard-list li.rank-2 { background: linear-gradient(90deg, rgba(220,220,220,0.18), rgba(220,220,220,0.04)); }
.scoreboard-list li.rank-3 { background: linear-gradient(90deg, rgba(205,127,50,0.22), rgba(205,127,50,0.05)); }

.players-list li.is-throwing {
  outline: 2px solid var(--acid);
  outline-offset: -2px;
  animation: pulse-throw 0.6s ease-out;
}
.players-list li.is-tv-control {
  background: linear-gradient(90deg, rgba(179,255,44,0.18), rgba(179,255,44,0.02));
}

@keyframes pulse-throw {
  0%, 100% { box-shadow: 0 0 0 rgba(179,255,44,0); }
  50% { box-shadow: 0 0 18px rgba(179,255,44,0.7); }
}

/* ── HUD ───────────────────────────────────────────────────── */

.hud {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(5, auto) 1fr;
  align-items: end;
  gap: 28px;
  padding: 22px 40px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7) 60%);
  pointer-events: none;
}

body.is-attract .hud,
body.is-lobby .hud,
body.is-roundend .hud,
body.is-final .hud {
  display: none;
}

.hud > div { display: flex; flex-direction: column; gap: 4px; }

.hud-label, .combo-label {
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hud strong {
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 28px;
  color: var(--bone);
  letter-spacing: 0.04em;
}

.power-bar {
  width: 220px;
  height: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(179, 255, 44, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.power-bar-fill {
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, var(--acid), var(--blood));
  transition: width 60ms linear;
  box-shadow: 0 0 14px var(--acid);
}

.hud-combo {
  text-align: center;
}
.hud-combo strong {
  color: var(--acid);
  text-shadow: 0 0 12px var(--acid);
  font-size: 32px;
}
.hud-combo.is-hot strong {
  color: var(--blood);
  text-shadow: 0 0 18px var(--blood);
  animation: combo-flare 0.4s ease-out;
}
@keyframes combo-flare {
  0% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Boot-status banner: red while JS is loading, hides itself once game.js boots
   so on the TV we can tell at a glance whether the page is alive. */
#boot-status {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 44, 77, 0.92);
  color: #fff;
  pointer-events: none;
  transition: opacity 320ms ease;
}
#boot-status[data-state="ok"] { opacity: 0; }

.hud-brains { display: flex; flex-direction: column; gap: 4px; }
.brain-pips { display: flex; gap: 4px; align-items: center; font-size: 22px; }
.brain-pip { transition: filter 240ms, transform 240ms; }
.brain-pip.full { filter: drop-shadow(0 0 6px var(--blood)); }
.brain-pip.spent { filter: grayscale(1) brightness(0.35); transform: scale(0.85); }

#celebration {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: center;
  font-family: 'Rubik Mono One', sans-serif;
  font-size: clamp(80px, 16vw, 240px);
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.4);
  color: var(--bone);
  text-shadow: 0 0 50px var(--acid), 0 0 12px #000;
}
#celebration.active {
  animation: celebrate 1.6s cubic-bezier(.2,.7,.2,1.4) forwards;
}
@keyframes celebrate {
  0%   { opacity: 0; transform: scale(0.4) rotate(-6deg); }
  18%  { opacity: 1; transform: scale(1.25) rotate(2deg); }
  40%  { opacity: 1; transform: scale(1.0) rotate(-1deg); }
  85%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.6); }
}

.hud-keys {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px !important;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hud-keys span { display: inline-flex; align-items: center; gap: 6px; }

kbd {
  font-family: 'JetBrains Mono', monospace;
  display: inline-block;
  padding: 3px 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(179, 255, 44, 0.4);
  border-bottom-width: 3px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--bone);
  min-width: 22px;
  text-align: center;
  line-height: 1;
}

.cta-key {
  font-size: 28px !important;
  padding: 10px 16px !important;
  background: var(--acid) !important;
  color: #000 !important;
  border-color: var(--acid-deep) !important;
}

/* ── Overlays (attract / lobby / round-end / final) ────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 2, 8, 0.78);
  backdrop-filter: blur(6px);
}

.overlay.hidden { display: none; }

/* Attract */

.overlay-attract {
  background: radial-gradient(ellipse at center, rgba(2,2,8,0.4) 0%, rgba(2,2,8,0.92) 80%);
  flex-direction: column;
  gap: 24px;
  padding: 90px 40px 110px;
  overflow: hidden;
}

.attract-stack {
  text-align: center;
  z-index: 2;
  display: grid;
  gap: 22px;
  justify-items: center;
  max-width: 100%;
}

.attract-title {
  font-family: 'Rubik Mono One', sans-serif;
  font-size: clamp(48px, 7vw, 132px);
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 0.95;
  white-space: nowrap;
  text-shadow:
    -6px 6px 0 var(--blood),
    -12px 12px 0 rgba(255, 44, 77, 0.3),
    0 0 50px rgba(179, 255, 44, 0.55);
  color: var(--bone);
  animation: title-jitter 4.5s infinite;
}

@media (max-aspect-ratio: 4/3) {
  .attract-title { font-size: clamp(44px, 9vw, 110px); white-space: normal; }
  .attract-title-bowl { display: block; margin-left: 0; }
}

.attract-title-bowl {
  color: var(--acid);
  display: inline-block;
  margin-left: 0.05em;
  animation: bowl-roll 6s ease-in-out infinite;
}

@keyframes bowl-roll {
  0%, 100% { transform: rotate(0deg); }
  45% { transform: rotate(-6deg); }
  55% { transform: rotate(6deg); }
}

@keyframes title-jitter {
  0%, 92%, 100% { transform: translate(0, 0); }
  93% { transform: translate(-3px, 2px); }
  95% { transform: translate(2px, -2px); }
  97% { transform: translate(-1px, 1px); }
}

.attract-tag {
  font-size: clamp(16px, 1.6vw, 22px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0;
}

.attract-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Rubik Mono One', sans-serif;
  font-size: clamp(24px, 2.4vw, 38px);
  letter-spacing: 0.1em;
  color: var(--acid);
  text-shadow: 0 0 20px var(--acid);
}

.cta-blink {
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  60%, 90% { opacity: 0.25; }
}

.attract-join {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.attract-qr {
  width: 140px;
  height: 140px;
  background: var(--bone);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.attract-qr svg, .attract-qr canvas {
  width: 100%;
  height: 100%;
}

.attract-join code {
  font-size: 14px;
  color: var(--bone);
  letter-spacing: 0.05em;
}

.attract-marquee {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  height: 50px;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 22px;
  color: rgba(255, 44, 77, 0.45);
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.attract-marquee span {
  display: inline-block;
  padding: 0 60px;
  animation: marquee 40s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Lobby */

.lobby-stack {
  background: rgba(8, 9, 18, 0.82);
  border: 2px solid rgba(179, 255, 44, 0.3);
  border-radius: var(--tv-radius);
  padding: 40px 60px;
  display: grid;
  gap: 28px;
  min-width: min(720px, 86vw);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lobby-stack h2 {
  font-family: 'Rubik Mono One', sans-serif;
  margin: 0;
  font-size: 48px;
  text-align: center;
  color: var(--acid);
  text-shadow: 0 0 24px rgba(179, 255, 44, 0.55);
  letter-spacing: 0.06em;
}

.lobby-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.lobby-option {
  display: grid;
  grid-template-columns: 1fr 1fr 0.5fr;
  align-items: center;
  padding: 16px 22px;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  font-size: 18px;
}

.lobby-option.active {
  border-color: var(--acid);
  background: rgba(179, 255, 44, 0.08);
  box-shadow: 0 0 20px rgba(179,255,44,0.25);
}

.lobby-key {
  color: var(--ink-dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 13px;
}

.lobby-value {
  font-family: 'Rubik Mono One', sans-serif;
  color: var(--bone);
  font-size: 24px;
}

.lobby-hint {
  text-align: right;
  color: var(--acid);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.lobby-option.active .lobby-hint {
  animation: blink 1s ease-in-out infinite;
}

.lobby-hint-row {
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
  letter-spacing: 0.1em;
  margin: 0;
}

.lobby-roster {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.lobby-roster .roster-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  font-size: 13px;
}

/* Round end */

.roundend-stack, .final-stack {
  background: rgba(8, 9, 18, 0.85);
  border: 2px solid rgba(255, 44, 77, 0.4);
  border-radius: var(--tv-radius);
  padding: 40px 60px;
  display: grid;
  gap: 22px;
  min-width: min(640px, 86vw);
  text-align: center;
}

.roundend-stack h2, .final-stack h2 {
  font-family: 'Rubik Mono One', sans-serif;
  margin: 0;
  font-size: 56px;
  letter-spacing: 0.06em;
  color: var(--blood);
  text-shadow: 0 0 24px rgba(255, 44, 77, 0.6);
}

.roundend-scores {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.roundend-scores li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  font-size: 18px;
}

.roundend-scores li .pos {
  font-family: 'Rubik Mono One', sans-serif;
  color: var(--acid);
}

.final-podium {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 14px;
  align-items: end;
  margin: 12px 0 8px;
}
.podium-slot {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
}
.podium-slot.podium-1 { background: linear-gradient(180deg, rgba(255,209,0,0.3), rgba(255,209,0,0.05)); transform: translateY(-8px); }
.podium-slot.podium-2 { background: linear-gradient(180deg, rgba(220,220,220,0.25), rgba(220,220,220,0.05)); }
.podium-slot.podium-3 { background: linear-gradient(180deg, rgba(205,127,50,0.3), rgba(205,127,50,0.05)); }
.podium-rank { font-family: 'Rubik Mono One', sans-serif; font-size: 24px; color: var(--bone); }
.podium-name { font-size: 14px; }
.podium-score { font-family: 'Rubik Mono One', sans-serif; font-size: 20px; color: var(--acid); }

/* Toast notifications */

.toast-stack {
  position: fixed;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(8, 9, 18, 0.92);
  border: 1px solid var(--acid);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--bone);
  text-transform: uppercase;
  animation: toast-pop 0.32s cubic-bezier(.2,.7,.2,1.4);
  box-shadow: 0 8px 30px rgba(179, 255, 44, 0.3);
}
.toast.t-blood { border-color: var(--blood); box-shadow: 0 8px 30px rgba(255, 44, 77, 0.4); }
.toast.t-rot { border-color: var(--rot); box-shadow: 0 8px 30px rgba(69, 255, 174, 0.35); }
.toast.t-bruise { border-color: var(--bruise); box-shadow: 0 8px 30px rgba(93, 59, 255, 0.35); }

@keyframes toast-pop {
  from { transform: translateY(-12px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.toast.fade-out {
  animation: toast-fade 0.3s ease-out forwards;
}
@keyframes toast-fade {
  to { opacity: 0; transform: translateY(-12px) scale(0.95); }
}

/* ── Controller (phone) ────────────────────────────────────── */

body.controller {
  cursor: auto;
  background: linear-gradient(180deg, #1a1735 0%, #0d0e16 100%);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  font-family: 'JetBrains Mono', monospace;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.ctl-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.3);
}

.ctl-brand {
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 22px;
  color: var(--acid);
}

.ctl-room {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
}
.ctl-room strong {
  color: var(--bone);
  margin-left: 6px;
  letter-spacing: 0.06em;
}

.ctl-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 16px;
}

.ctl-pad {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(179,255,44,0.08), transparent 70%),
    rgba(255,255,255,0.02);
  border: 2px dashed rgba(179, 255, 44, 0.35);
  border-radius: 50%;
  touch-action: none;
}

.ctl-pad-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--acid);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--acid);
}

.ctl-pad-aim {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--acid), transparent);
  transform-origin: 0 50%;
  transform: translate(0, -50%) rotate(0deg);
  pointer-events: none;
}

.ctl-pad-puck {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--bone), #999);
  border: 4px solid var(--acid);
  box-shadow:
    0 0 0 4px rgba(179, 255, 44, 0.18),
    0 12px 30px rgba(0,0,0,0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: grid;
  place-items: center;
  font-size: 30px;
}

.ctl-pad-instructions {
  position: absolute;
  bottom: -52px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ctl-footer {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.ctl-name-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ctl-name-row input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--bone);
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
}
.ctl-name-row input:focus {
  border-color: var(--acid);
}

.ctl-color {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.2);
  background: var(--acid);
  cursor: pointer;
}

.ctl-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}
.ctl-stats div strong {
  display: block;
  color: var(--bone);
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 22px;
  margin-top: 2px;
}

.ctl-status {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-align: center;
  text-transform: uppercase;
}
.ctl-status.is-ok { color: var(--acid); }
.ctl-status.is-bad { color: var(--blood); }

.ctl-fire {
  display: block;
  width: 100%;
  background: var(--blood);
  color: var(--bone);
  border: none;
  font-family: 'Rubik Mono One', sans-serif;
  font-size: 22px;
  letter-spacing: 0.1em;
  padding: 18px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 44, 77, 0.45);
}
.ctl-fire:active { transform: translateY(1px); }
.ctl-fire:disabled { opacity: 0.4; box-shadow: none; }

/* ── Tiny screens ──────────────────────────────────────────── */

@media (max-width: 980px) {
  body.tv .players, body.tv .scoreboard {
    width: 200px;
    font-size: 12px;
  }
  body.tv .hud { gap: 14px; padding: 14px 18px; font-size: 12px; }
  body.tv .hud strong { font-size: 20px; }
}
