:root {
  color-scheme: dark;
  --bg: #050816;
  --panel: rgba(8, 14, 34, 0.92);
  --panel-edge: #233a72;
  --ink: #eaf0ff;
  --muted: #8a98c2;
  --cyan: #4fe3ff;
  --lime: #b6f23c;
  --gold: #ffd23f;
  --warn: #ff6b7d;
  --pixel: 'Press Start 2P', monospace;
  --label: 'Silkscreen', monospace;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #03050f;
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, #0d1838 0%, #03050f 70%);
}

button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.stage {
  position: relative;
  width: min(100vw, 480px);
  height: 100%; /* fills the page, so it also fits inside a host's safe-area padding */
  overflow: hidden;
  overflow: clip; /* the parked end screen must never make the stage scrollable */
  background: #0a1024;
  box-shadow: 0 0 0 1px #121c3d, 0 0 60px rgba(0, 0, 0, 0.6);
}

/* faint CRT scanlines over everything */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.1) 2px 3px);
}

#scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* ------------------------------------------------------------ world overlays */

.world-layer { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; transition: opacity 0.5s; }
.world-layer.quiet #landmarks { opacity: 0; }
#landmarks { transition: opacity 0.6s; }

.landmark {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: rgba(234, 240, 255, 0.7);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}
.landmark.show { opacity: 1; }
.landmark::before { content: ""; width: 10px; height: 1px; background: rgba(234, 240, 255, 0.55); }
.landmark span { padding: 1px 4px; background: rgba(5, 8, 22, 0.6); }

.tier-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.22);
  opacity: 0;
  transition: opacity 0.35s, border-color 0.2s;
}
.tier-line.show { opacity: 1; }
.tier-line.lit { border-top-color: var(--c); }
.tier-line .tl {
  position: absolute;
  top: -9px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 1px 5px;
  font-family: var(--label);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(234, 240, 255, 0.55);
  background: rgba(5, 8, 22, 0.7);
  transition: color 0.2s;
}
.tier-line .tl i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.tier-line.lit .tl { color: var(--c); }

.nameplate {
  position: absolute;
  top: 0;
  left: 0;
  padding: 5px 10px;
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: min(280px, calc(100vw - 48px)); /* long answers wrap instead of running off a phone screen */
  line-height: 1.3;
  text-align: center;
  color: var(--c, #c9d3ea);
  background: rgba(6, 12, 32, 0.92);
  border: 2px solid var(--c, #4a5a85);
  box-shadow: 0 0 14px -2px var(--c, transparent);
  transform-origin: center;
  opacity: 0;
  transition: opacity 0.25s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.nameplate.show { opacity: 1; }
.nameplate.flash { animation: plateflash 0.35s; }

/* ---------------------------------------------------------------------- hud */

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 10px 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s, transform 0.4s;
}
.hud.show { opacity: 1; transform: none; }
.hud-box {
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 84px;
  padding: 5px 10px 6px;
  background: rgba(5, 9, 26, 0.85);
  border: 1px solid #1e2f5e;
}
.hud-box.right { justify-self: end; align-items: flex-end; }
.hud-label { font-family: var(--label); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hud-value { font-family: var(--pixel); font-size: 13px; color: var(--cyan); }
.hud-value.score { color: var(--lime); }
.hud-mid { display: flex; flex-direction: column; align-items: center; gap: 5px; padding-top: 4px; }
.pips { display: flex; gap: 4px; }
.pip { width: 11px; height: 11px; border: 1px solid #33467a; background: rgba(5, 9, 26, 0.8); }
.pip.current { border-color: #fff; animation: pip 1s steps(2) infinite; }
.pip.done { border-color: transparent; background: var(--c); box-shadow: 0 0 6px -1px var(--c); }

/* ------------------------------------------------------------- prompt + bar */

.prompt-card {
  position: absolute;
  top: 40%;
  left: 14px;
  right: 14px;
  z-index: 4;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s, transform 0.35s;
}
.prompt-card.show { opacity: 1; transform: none; }
.prompt-kicker { margin: 0 0 8px; font-family: var(--label); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lime); }
.prompt-q { margin: 0; font-family: var(--mono); font-size: clamp(18px, 5vw, 22px); font-weight: 600; line-height: 1.3; color: #fff; }
.prompt-note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.prompt-note::before { content: "▼ "; color: var(--cyan); }

/* "did you mean" box for close misspellings, with stepped pixel corners */
.suggest, .suggest-inner {
  clip-path: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
}
.suggest {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  z-index: 5;
  width: fit-content;
  margin: 0 auto;
  padding: 2px;
  background: #2b4478;
  cursor: pointer;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s;
}
.suggest.show { opacity: 1; transform: none; pointer-events: auto; animation: suggestin 0.28s ease-out; }
.suggest-inner { padding: 12px 20px 11px; text-align: center; background: #0b1532; }
.suggest-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 10px; margin: 0; font-family: var(--mono); font-size: clamp(14px, 4.3vw, 17px); }
.suggest-typed { color: #8f9cc4; }
.suggest-arrow { color: #fff; }
.suggest-fix { font-weight: 600; color: var(--cyan); text-shadow: 0 0 12px rgba(79, 227, 255, 0.45); }
.suggest-help { margin: 7px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: #8f9cc4; }

.getset {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 4;
  padding: 7px 12px;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--muted);
  background: rgba(5, 9, 26, 0.85);
  border: 1px solid #1e2f5e;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.3s, transform 0.3s;
}
.getset.show { opacity: 1; transform: translate(-50%, 0); }
.getset b { display: inline-block; min-width: 1.3em; margin-left: 4px; font-family: var(--pixel); font-size: 14px; font-weight: 400; text-align: center; vertical-align: -2px; color: var(--lime); text-shadow: 0 0 10px rgba(182, 242, 60, 0.6); }
.getset b.tick { animation: tick 0.5s ease-out; }

.shot-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s, transform 0.3s;
}
.shot-bar.show { opacity: 1; transform: none; pointer-events: auto; }
.shot-bar.shake #answer { animation: shake 0.35s; }
.shot-hint { grid-column: 1 / -1; min-height: 14px; margin: 0; font-family: var(--label); font-size: 11px; letter-spacing: 0.04em; color: var(--warn); text-shadow: 0 1px 0 #000; }
.clock { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(5, 9, 26, 0.92); }
.clock svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.clock-track { fill: none; stroke: #1b2a55; stroke-width: 3; }
.clock-fill { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-dasharray: 106.8; stroke-dashoffset: 0; transition: stroke 0.2s; }
.clock.low .clock-fill { stroke: var(--warn); }
.clock span { position: relative; font-family: var(--pixel); font-size: 11px; }
#answer {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 16px;
  color: #fff;
  background: rgba(5, 9, 26, 0.94);
  border: 1px solid #2d4a8a;
  border-radius: 0;
  outline: none;
}
#answer:focus { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
#answer::placeholder { color: #5d6a91; }
.shoot-btn {
  height: 44px;
  padding: 0 16px;
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a1404;
  background: var(--lime);
  border: 0;
}
.shoot-btn:active { transform: translateY(1px); }

/* ------------------------------------------------------------- result card */

.result-card {
  position: absolute;
  top: 40%;
  left: 20px;
  right: 20px;
  z-index: 4;
  text-align: center;
  background: rgba(6, 11, 30, 0.95);
  border: 1px solid var(--c);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 30px -8px var(--c), 0 18px 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.35s, transform 0.35s;
}
.result-card.show { opacity: 1; transform: none; pointer-events: auto; }
.result-head {
  padding: 14px 12px 12px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--c) 24%, transparent), transparent);
  border-bottom: 1px dashed color-mix(in srgb, var(--c) 45%, transparent);
}
.result-tier { margin: 0; font-family: var(--pixel); font-size: clamp(19px, 6vw, 26px); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); text-shadow: 0 0 14px var(--c), 0 3px 0 #000; }
.result-card.show .result-tier { animation: tierpop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.result-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 16px; }
.result-answer { margin: 0; font-size: 16px; font-weight: 600; color: #fff; }
.result-points { display: flex; gap: 8px; margin: 0; }
.result-points span { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; font-family: var(--label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid #1e2f5e; background: rgba(255, 255, 255, 0.02); }
.result-points b { font-family: var(--pixel); font-size: 13px; font-weight: 400; color: var(--c); }
.result-flavor { max-width: 290px; margin: 0; font-size: 12.5px; line-height: 1.45; color: #c9d3ea; }

.btn-primary {
  margin-top: 6px;
  padding: 12px 22px;
  font-family: var(--label);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: #0b1f5c;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 18px -6px var(--cyan);
}
.btn-primary:hover { background: #0e2a8a; }
.btn-primary.small { padding: 9px 16px; font-size: 12px; }
.btn-ghost { padding: 12px 22px; font-family: var(--label); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; background: rgba(5, 9, 26, 0.6); border: 2px solid #2d4a8a; }
.link-btn { padding: 4px 0; font-family: var(--label); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: none; border: 0; }
.link-btn:hover { color: var(--ink); }

.big-call {
  position: absolute;
  top: 30%;
  left: 0;
  right: 0;
  z-index: 6;
  font-family: var(--pixel);
  font-size: clamp(18px, 6vw, 26px);
  line-height: 1.7;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  text-shadow: -2px 0 #ff3d6e, 2px 0 #3fd4ff, 0 0 20px rgba(255, 210, 63, 0.6);
  pointer-events: none;
}
.big-call span { display: block; opacity: 0; }
.big-call.show span:first-child { animation: callin 2.4s forwards; }
.big-call.show span:last-child { color: var(--gold); animation: callin 2.0s 0.45s forwards; }

/* ------------------------------------------------------------- title screen */

.title-screen {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(6vh + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  transition: opacity 0.6s, transform 0.6s;
}
.title-screen.hidden { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.title-block {
  padding: 16px 0 18px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(5, 8, 22, 0), rgba(5, 8, 22, 0.6) 22%, rgba(5, 8, 22, 0.6) 78%, rgba(5, 8, 22, 0));
}
.logo {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(28px, 10vw, 48px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: -3px 0 rgba(255, 61, 110, 0.85), 3px 0 rgba(63, 212, 255, 0.85), 0 5px 0 #000;
}
.logo { animation: glow 3.2s ease-in-out infinite; }
.logo.ping { animation: ping 0.5s, glow 3.2s ease-in-out infinite; }
.edition { margin: 14px 0 0; font-family: var(--label); font-size: clamp(11px, 3.4vw, 15px); letter-spacing: 0.42em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 2px 0 #000; }
.title-bottom { display: flex; flex-direction: column; gap: 12px; }
.tagline { margin: 0 auto; padding: 6px 10px; font-size: clamp(10px, 2.9vw, 11.5px); white-space: nowrap; text-align: center; color: #d6def5; background: rgba(5, 9, 26, 0.78); border: 1px solid #1e2f5e; }
.kickoff {
  width: 100%;
  padding: 16px;
  font-family: var(--label);
  font-size: 18px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(9, 24, 80, 0.94);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 24px -6px var(--cyan);
  animation: breathe 2.4s ease-in-out infinite;
}
.kickoff:hover { background: #0e2a8a; }
.kickoff .arrow { display: inline-block; animation: blink 1.1s steps(2) infinite; }
/* once today's matchday is played, the title swaps Kick off for a countdown */
.played-panel { display: none; flex-direction: column; gap: 10px; }
.title-screen.is-played .played-panel { display: flex; }
.title-screen.is-played .kickoff, .title-screen.is-played .tagline { display: none; }
.played-score { margin: 0 auto; padding: 6px 12px; font-family: var(--label); font-size: 11px; letter-spacing: 0.06em; text-align: center; text-transform: uppercase; color: #d6def5; background: rgba(5, 9, 26, 0.85); border: 1px solid #1e2f5e; }
.played-score b { font-weight: 400; color: var(--lime); }
.played-panel .next-shot { margin: 0; }
.played-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; }
.played-actions .btn-primary { margin: 0; white-space: nowrap; }
.played-actions .link-btn { padding: 7px 10px; color: #b9c4e4; background: rgba(5, 9, 26, 0.85); border: 1px solid #1e2f5e; }

.next-shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 16px 12px 14px;
  text-align: center;
  background: rgba(5, 9, 26, 0.92);
  border: 1px solid #2b4478;
  box-shadow: inset 0 0 0 1px rgba(182, 242, 60, 0.08), 0 0 26px -12px var(--lime);
}
.next-label { font-family: var(--label); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.next-clock { font-family: var(--pixel); font-size: clamp(24px, 8.4vw, 34px); letter-spacing: 0.04em; color: var(--lime); text-shadow: 0 0 16px rgba(182, 242, 60, 0.5), 0 3px 0 #000; }
.next-sub { font-size: 11.5px; color: var(--muted); }

.title-meta { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px; font-family: var(--label); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #b9c4e4; background: rgba(5, 9, 26, 0.85); border: 1px solid #1e2f5e; }
.title-meta .link-btn { color: var(--cyan); }

.sound-toggle { display: grid; place-items: center; width: 26px; height: 22px; padding: 0; color: var(--cyan); background: none; border: 1px solid #2b4478; pointer-events: auto; }
.sound-toggle svg { width: 13px; height: 13px; }
.sound-toggle .cross { display: none; }
.sound-toggle.muted { color: var(--muted); }
.sound-toggle.muted .waves { display: none; }
.sound-toggle.muted .cross { display: inline; }
.hud .sound-toggle { background: rgba(5, 9, 26, 0.85); border-color: #1e2f5e; }

.how {
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-46%);
  transition: opacity 0.3s, transform 0.3s;
}
.how.show { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.how h3 { margin: 0 0 10px; font-family: var(--pixel); font-size: 13px; font-weight: 400; color: var(--cyan); }
.how ol { margin: 0 0 12px; padding-left: 18px; font-size: 12.5px; line-height: 1.5; color: #d6def5; }
.how li + li { margin-top: 4px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 0 0 14px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 8px; font-family: var(--label); font-size: 11px; text-transform: uppercase; }
.legend li i { width: 10px; height: 10px; background: var(--c); box-shadow: 0 0 6px -1px var(--c); }
.legend li span { flex: 1; color: var(--c); }
.legend li b { font-weight: 400; color: var(--muted); }

/* --------------------------------------------------------------- end screen */

.end-screen {
  position: absolute;
  inset: 0;
  z-index: 9;
  overflow-y: auto;
  background: linear-gradient(to bottom, rgba(5, 8, 22, 0.2), rgba(5, 8, 22, 0.94) 26%);
  transform: translateY(100%);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.end-screen.show { transform: none; }
.end-inner { padding: calc(28px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom)); }
.end-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.end-title { display: flex; flex-direction: column; gap: 7px; }
.end-tools { display: flex; gap: 4px; }
.end-brand { font-family: var(--pixel); font-size: 14px; color: #fff; text-shadow: -2px 0 rgba(255, 61, 110, 0.8), 2px 0 rgba(63, 212, 255, 0.8); }
.end-sub { font-family: var(--label); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.end-score { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; }
.end-big { font-family: var(--pixel); font-size: 56px; color: #fff; text-shadow: 0 4px 0 #000; }
.end-unit { font-family: var(--label); font-size: 14px; color: var(--muted); text-transform: uppercase; }
.end-band { margin: 10px 0 0; font-family: var(--pixel); font-size: 15px; text-transform: uppercase; color: var(--gold); }
.end-dist { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.bands { display: flex; flex-direction: column; gap: 3px; margin: 18px 0 0; padding: 0; list-style: none; }
.bands li { display: flex; justify-content: space-between; padding: 6px 10px; font-family: var(--label); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid transparent; }
.bands li.on { color: #fff; background: rgba(79, 227, 255, 0.08); border-color: var(--cyan); }
.end-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 26px 0 10px; font-family: var(--label); font-size: 12px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.end-h small { font-size: 10px; letter-spacing: 0.04em; color: var(--muted); text-transform: none; }
.shots { display: flex; flex-direction: column; gap: 6px; }
.shot { background: rgba(9, 16, 40, 0.85); border: 1px solid #1a2a55; }
.shot-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; background: none; border: 0; }
.shot-row .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px -1px var(--c); }
.shot-main { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.shot-main b { font-size: 14px; font-weight: 600; }
.shot-main small { font-size: 11px; line-height: 1.35; color: var(--muted); }
.shot-pts { font-family: var(--pixel); font-size: 11px; color: var(--c); }
.shot-answers { padding: 0 12px 12px; }
.shot-search { width: 100%; height: 34px; margin-bottom: 8px; padding: 0 10px; font-family: var(--mono); font-size: 14px; color: #fff; background: rgba(5, 9, 26, 0.9); border: 1px solid #2d4a8a; border-radius: 0; }
.shot-answers ul { max-height: 220px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.shot-answers li { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.shot-answers li i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.shot-answers li span { flex: 1; }
.shot-answers li em { font-style: normal; font-size: 11px; color: var(--muted); }
.shot-answers li b { font-family: var(--label); font-weight: 400; font-size: 11px; color: var(--c); }
.shot-answers li.mine { background: rgba(255, 255, 255, 0.06); }
.shot-answers li.mine span::after { content: "  ← you"; font-family: var(--label); font-size: 10px; color: var(--cyan); }
.share-box { margin: 0; padding: 12px; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre-wrap; background: rgba(5, 9, 26, 0.9); border: 1px solid #1e2f5e; }
.end-actions { display: flex; gap: 10px; margin-top: 10px; }
.end-actions .btn-primary { margin: 0; }

/* --------------------------------------------------------------- animation */

@keyframes blink { 50% { opacity: 0.25; } }
@keyframes pip { 50% { background: rgba(255, 255, 255, 0.35); } }
@keyframes plateflash { 0% { filter: brightness(2.2); } 100% { filter: none; } }
@keyframes shake {
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
@keyframes ping {
  0% { transform: none; }
  20% { transform: translateY(-4px) rotate(-1.5deg); }
  45% { transform: translateY(2px) rotate(1deg); }
  70% { transform: translateY(-1px) rotate(-0.4deg); }
  100% { transform: none; }
}
@keyframes suggestin { 0% { opacity: 0; transform: translateY(10px) scale(0.96); } 100% { opacity: 1; transform: none; } }
@keyframes tick { 0% { transform: scale(1.9); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
@keyframes tierpop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes breathe { 50% { box-shadow: 0 0 34px -4px var(--cyan); } }
@keyframes glow {
  0%, 100% { text-shadow: -3px 0 rgba(255, 61, 110, 0.85), 3px 0 rgba(63, 212, 255, 0.85), 0 5px 0 #000; }
  50% { text-shadow: -3px 0 rgba(255, 61, 110, 0.85), 3px 0 rgba(63, 212, 255, 0.85), 0 5px 0 #000, 0 0 24px rgba(255, 255, 255, 0.35); }
}
@keyframes callin {
  0% { opacity: 0; transform: scale(0.6); }
  12% { opacity: 1; transform: scale(1.12); }
  22% { transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* ---------------------------------------------------- tools, settings, kits */

.side-rail {
  position: absolute;
  top: 42%;
  right: calc(8px + env(safe-area-inset-right));
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-50%);
}
.tool-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #b9c4e4;
  background: rgba(5, 9, 26, 0.88);
  border: 1px solid #1e2f5e;
  pointer-events: auto;
}
.tool-btn:hover { color: var(--cyan); border-color: var(--panel-edge); }
.tool-btn svg { width: 16px; height: 16px; }

.sheet {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
  background: rgba(2, 4, 12, 0.74);
  animation: fadein 0.2s ease-out;
}
.sheet-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 14px 16px 18px;
  background: #0a1230;
  border: 2px solid var(--panel-edge);
  box-shadow: 0 0 0 2px #050816, 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: panelin 0.22s ease-out;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheet-head h3 { margin: 0; font-family: var(--pixel); font-size: 13px; font-weight: 400; letter-spacing: 0.04em; color: var(--cyan); }
.sheet-close { width: 34px; height: 34px; padding: 0; font-family: var(--label); font-size: 14px; color: #b9c4e4; background: #070d24; border: 1px solid #2b4478; }
.sheet-close:hover { color: #fff; }

.settings-list { display: flex; flex-direction: column; }
.setting { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px dashed #1e2f5e; }
.setting:first-child { border-top: 0; }
.setting-text { flex: 1; min-width: 0; }
.setting h4 { margin: 0 0 5px; font-family: var(--label); font-size: 12px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.setting p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.switch { flex: none; width: 66px; height: 30px; padding: 3px; background: #040817; border: 1px solid #2b4478; }
.switch span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 100%;
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a1230;
  background: #7f8db5;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s, background 0.15s;
}
.switch[aria-checked="true"] { border-color: var(--lime); }
.switch[aria-checked="true"] span { transform: translateX(26px); background: var(--lime); }
.sheet-foot { margin: 6px 0 0; padding-top: 12px; border-top: 1px dashed #1e2f5e; font-size: 10.5px; line-height: 1.5; color: #6f7ca3; }

.kits-intro { margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.kits-intro b { font-family: var(--pixel); font-size: 11px; font-weight: 400; color: var(--lime); }
.kits-intro em { font-style: normal; color: var(--gold); }
.kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 8px 10px;
  text-align: center;
  background: #0c1638;
  border: 1px solid #1e2f5e;
}
.kit-card canvas { width: 42px; height: 72px; image-rendering: pixelated; }
.kit-card:hover:not(.locked) { border-color: var(--panel-edge); }
.kit-card.on { border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan), 0 0 14px -4px var(--cyan); }
.kit-name { font-family: var(--label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.kit-card.on .kit-name { color: var(--cyan); }
.kit-status { display: flex; flex-direction: column; align-items: center; gap: 5px; font-family: var(--label); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kit-card.locked { cursor: not-allowed; }
.kit-card.locked canvas { filter: grayscale(1) brightness(0.45); }
.kit-card.locked .kit-name { color: #6f7ca3; }
.kit-bar { display: block; width: 64px; height: 4px; background: linear-gradient(to right, var(--lime) var(--p), #1a2550 var(--p)); }

.kit-unlock { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; background: rgba(182, 242, 60, 0.07); border: 1px solid var(--lime); }
.kit-unlock canvas { flex: none; width: 28px; height: 48px; image-rendering: pixelated; }
.kit-unlock-text { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.kit-unlock-text b { font-family: var(--label); font-size: 10px; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); }
.kit-unlock-text span { font-family: var(--pixel); font-size: 10px; line-height: 1.4; color: #fff; }
.kit-unlock .btn-primary:disabled { opacity: 0.6; cursor: default; }

/* low-power mode: no scanlines or glowing logo; colour-blind mode: brighter text */
.stage.low-power::after { display: none; }
.low-power .logo { animation: none; }
.stage.cb { --ink: #ffffff; --muted: #b8c4e6; }

@keyframes fadein { from { opacity: 0; } }
@keyframes panelin { from { opacity: 0.4; transform: translateY(10px); } }

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