@font-face {
  font-family: Departure Mono;
  src: url('fonts/departure-mono.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --game-mono: 'Departure Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --plate: #21153d;
  --plate-dark: #100c26;
  --plate-line: #644a85;
  --plate-light: #8865a1;
  --menu-active: #eaff94;
  --pixel-cyan: #89fff0;
  --pixel-pink: #ff91d3;
  font-family: var(--game-mono);
  font-synthesis: none;
}
button, input, select, textarea { font-family: var(--game-mono); }
::selection { background: #eaff94; color: #160e2b; }

/* Cold boot: one game screen, with controls inside the picture. */
.arcade-shell {
  max-width: 1550px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(12px, 2.3vw, 38px);
  display: grid;
  align-items: center;
}
.arcade-title {
  --frame: 6px;
  margin: 0;
  min-height: min(760px, calc(100dvh - 2 * clamp(12px, 2.3vw, 38px)));
  align-content: center;
  grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr);
  gap: clamp(20px,4.4vw,88px);
  padding: clamp(36px,5.8vw,100px) clamp(22px,5vw,85px) clamp(88px,9vw,124px);
  border: var(--frame) solid #3a275b;
  box-shadow: 0 0 0 2px #9471b0, 0 0 0 5px #1a1035, 0 8px 0 5px #080619;
}
.title-world {
  inset: 0;
  background: linear-gradient(90deg, #10062625, transparent 50%, #0a05275c),
    url('art/night-city.svg') 50% 66% / cover no-repeat;
}
.arcade-title::after {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: -1;
  box-shadow: inset 0 0 0 2px #d69cc948, inset 4px 6px #0e082b44;
}
.title-brand h1 { margin-left: -2%; }
.title-brand img { width: min(100%, 600px); }
.title-pixel-party { margin-top: 12px; }
.pixel-window {
  position: relative;
  border: 2px solid var(--plate-line);
  box-shadow: inset 0 0 0 3px #2f2052, inset 0 0 0 5px #100c26, 5px 5px #090616;
  background-color: var(--plate-dark);
}
.arcade-menu.pixel-window { padding: 20px; background: #170e2cec; }
.title-command-list { display: grid; gap: 10px; }
.title-command {
  display: grid;
  grid-template-columns: 1.5ch minmax(0,1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 2px solid #654a87;
  background: #2a1c49;
  color: #f9e7fa;
  text-align: left;
  font-size: clamp(1.14rem,2.15vw,1.55rem);
  line-height: 1.24;
  box-shadow: inset 0 2px #946db06b, inset 0 -4px #100b305e, 3px 3px #0c081e;
}
.command-icon { color: var(--pixel-pink); font-size: .78em; }
.title-command:first-child { border-color: #d0e77a; color: var(--menu-active); }
.title-command:first-child .command-icon { color: var(--menu-active); }
.title-command:hover, .title-command:focus-visible {
  outline: 2px solid var(--menu-active);
  outline-offset: 2px;
  background: var(--menu-active);
  border-color: #d0e77a;
  color: #1b1533;
}
.title-command:hover .command-icon, .title-command:focus-visible .command-icon { color: #1b1533; }
.title-command:active { transform: translate(2px,2px); box-shadow: inset 0 2px #aaaf816e; }
.arcade-menu.pixel-window .arcade-join { margin: 0; padding-top: 0; border-top: 0; }
.arcade-menu .arcade-join h2 { font-size: 1.45rem; color: var(--pixel-cyan); }
.menu-back { margin-top: 10px; font-size: .95rem; }
.title-controls {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 49px;
  padding: 5px 14px;
  background: #100925ef;
  border-top: 2px solid #8d5ca2;
}
.title-controls .demo-pill { margin-right: auto; }
.title-settings { display: flex; align-items: center; gap: 16px; }
.title-settings .title-audio>div { top: auto; bottom: 100%; }
.title-controls .text-btn, .title-controls summary { font-size: 1rem; }

/* The room identifier and round counter are part of the play HUD. */
.play-shell { padding: clamp(12px,2vw,26px); }
.stream-screen .play-header, .controller-screen .play-header {
  display: grid;
  grid-template-columns: minmax(0,auto) 1fr auto auto;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 12px;
  border: 2px solid var(--plate-line);
  background: var(--plate);
  box-shadow: inset 0 2px #9877bd67, inset 0 -3px #0d092b, 3px 3px #090616;
}
.play-header .hud-phase, .play-header .hud-player {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pixel-pink);
  letter-spacing: 0;
  font-size: clamp(1.1rem,2vw,1.48rem);
  line-height: 1.17;
  overflow-wrap: anywhere;
}
.hud-phase img { image-rendering: pixelated; }
.hud-stats { display: flex; flex-wrap: wrap; gap: 5px; padding-left: 4px; }
.hud-stats>div { display: flex; align-items: baseline; gap: 7px; padding: 3px 8px; background: #100b26; border: 1px solid #644683; }
.hud-stats small { color: #ddbfef; font-size: .75rem; }
.hud-stats strong { color: var(--pixel-cyan); font-size: 1.13rem; }
.play-actions { grid-column: -2 / -1; margin-left: 0; }
.play-header .game-menu summary { font-size: 1rem; }
.stream-screen .stream-main.pixel-window {
  border: 2px solid var(--plate-line);
  border-top-color: var(--plate-light);
  box-shadow: inset 0 0 0 3px #2f2052, inset 0 0 0 5px #100c26, 5px 5px #090616;
  padding-inline: clamp(15px,3.25vw,56px);
}
.stream-main h1 { font-size: clamp(1.8rem,3.85vw,3.45rem); line-height: 1.18; letter-spacing: 0; text-shadow: 3px 3px #130c29; }
.stream-main .eyebrow { letter-spacing: .07em; color: var(--pixel-pink); }
.stream-lobby h1 { font-size: clamp(3.4rem,9vw,7rem); line-height: 1; }
.stream-main .challenge-reminder, .stream-main .stream-instruction { font-size: clamp(1.13rem,1.9vw,1.38rem); }
.stream-main .btn, .controller-main .btn { border-color: #8b75a7; min-height: 46px; }
.stream-main .btn:not(.secondary), .controller-main .btn:not(.secondary) { border-color: #d1e88e; }
.stream-main .btn:focus-visible, .controller-main .btn:focus-visible, .answer-grid button:focus-visible { outline-color: var(--menu-active); }
.stream-main .progress-track { border: 1px solid #8868ab; background: #0f0a26; height: 12px; }
.stream-main .progress-fill { height: 100%; background: repeating-linear-gradient(90deg,#8fffe7 0 9px,#4a8b92 9px 11px); }
.stream-main #countdown { font-variant-numeric: tabular-nums; text-shadow: 2px 2px #17314a; }
.stream-main .entry, .controller-main .entry { border: 2px solid #6c528b; }
.answer-grid .entry .letter { display: grid; place-items: center; border: 2px solid #7559a0; }
.score-strip { gap: 8px; }
.score-chip {
  position: relative;
  gap: 8px;
  border: 2px solid #604781;
  min-height: 56px;
  box-shadow: inset 0 2px #9c71ac30, inset 0 -3px #0f082b, 3px 3px #08061a;
}
.score-seat { color: #c5adf7; font-size: .8rem; }
.score-chip strong { font-size: 1.08rem; }
.score-chip b { border-left: 2px solid #583c75; padding-left: 8px; color: var(--menu-active); }

/* RPG dialogue windows, with separate colours for players and the GM. */
.stream-main .scene-marquee { border-bottom: 2px solid #624881; padding-bottom: 10px; }
.stream-main .scene-title { color: var(--pixel-cyan); font-size: clamp(1.45rem,2.1vw,2rem); }
.pixel-dialogue .dialogue-track { padding: 0 3px; }
.story-bubble, .story-bubble.bubble-player {
  --dialogue-frame: #9a73ba;
  border: 2px solid var(--dialogue-frame);
  border-radius: 0;
  background: #211642;
  box-shadow: inset 0 0 0 2px #100a2a, inset 0 -5px #553c773c, 4px 4px #09061b;
}
.story-bubble.bubble-player { --dialogue-frame: #659b9c; background: #112e3b; }
.story-bubble.bubble-prompt { --dialogue-frame: #8aa064; background: #242e28; }
.story-bubble.bubble-speech { --dialogue-frame: #bc73a4; }
.story-bubble.is-current { outline: 2px solid #322350; outline-offset: 2px; }
.bubble-speaker { color: #fface4; font-size: 1rem; }
.story-bubble p { font-size: clamp(1.13rem,1.55vw,1.38rem); }
.story-bubble.is-current p { font-size: clamp(1.24rem,1.95vw,1.62rem); }
.slide-nav .text-btn, .answer-pages .text-btn { border: 1px solid #6c528b; padding-inline: 10px; }

/* Phone controllers share the game colours and have their own input window. */
.controller-screen .play-header { grid-template-columns: minmax(0,1fr) auto auto; }
.controller-screen .play-header>.demo-pill { display: none; }
.controller-screen .play-header .hud-player { max-width: none; font-size: 1.02rem; }
.hud-player .sprite { width: 24px; height: 24px; }
.controller-screen .hud-stats { padding: 0; }
.controller-screen .hud-stats>div { padding: 2px 6px; flex-direction: column; gap: 0; }
.controller-screen .hud-stats small { font-size: .67rem; }
.controller-screen .hud-stats strong { font-size: .94rem; }
.controller-main.pixel-window {
  min-height: 0;
  margin-top: 14px;
  padding: clamp(14px,4vw,23px);
  border-top-color: var(--plate-light);
}
.controller-main h1, .setup-screen h1 { color: var(--pixel-cyan); font-size: clamp(1.55rem,5.4vw,2.15rem); letter-spacing: 0; }
.controller-main .controller-question { font-size: 1.2rem; }
.controller-main .small-copy, .controller-main label, .controller-main .answer-grid .entry p { font-size: 1.03rem; }
.controller-main textarea { font-size: 1.13rem; }
.controller-main .controller-wait { padding: 34px 5px; }
.setup-screen { padding: clamp(18px,4vw,32px); }
.setup-screen button[data-action=home] { margin-top: 14px; }
@media(max-width:800px) {
  .arcade-title { grid-template-columns: 1fr; align-content: center; }
  .title-brand img { width: min(82%,410px); }
  .arcade-menu { width: min(100%,480px); }
}
@media(max-width:540px) {
  .arcade-shell { padding: 12px; }
  .arcade-title { --frame: 3px; min-height: calc(100dvh - 24px); padding: 24px 14px 72px; }
  .arcade-menu.pixel-window { padding: 12px; }
  .title-command { min-height: 49px; }
  .title-controls { padding: 4px 8px; }
  .title-settings { gap: 8px; }
  .title-controls .text-btn, .title-controls summary { font-size: .875rem; }
  .play-header .hud-phase { font-size: 1rem; }
  .stream-screen .play-header, .controller-screen .play-header { gap: 6px; padding: 6px 7px; }
  .controller-screen .play-header .hud-player .sprite { display: none; }
  .controller-screen .play-header .hud-player { font-size: .94rem; }
  .controller-screen .play-actions { gap: 6px; }
  .controller-screen .play-header .game-menu summary { font-size: .81rem; }
  .score-chip { gap: 6px; padding: 7px; }
  .score-chip .sprite { width: 24px; height: 24px; }
}
