/* The Defiant Jazz Incident, web version. The game is a dark-teal console in both themes, after
   the comic prototype; the page around it follows Grafana's light or dark theme. */

:root {
  --bg: #efede4;
  --text: #24292e;
  --muted: #4d5156;
  --border: rgba(36, 41, 46, 0.16);
  --link: #1f62e0;
  --btn-quiet: rgba(36, 41, 46, 0.08);
  --danger: #c4162a;
  --focus: #b3542f;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
  /* The console, the same in both themes */
  --c-bg: #101b1d;
  --c-panel: #142326;
  --c-term: #0c1719;
  --c-ink: #e8e4d3;
  --c-muted: #9dada7;
  --c-mint: #b7d4b4;
  --c-line: #344442;
  --c-line-soft: #243735;
  --c-chip: #1a2b2b;
  --c-chip-line: #40544b;
  --c-peach: #efbb98;
  --c-alert: #d0614f;
  --c-paper: #e8dfc8;
  --c-paper-ink: #263931;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1416;
    --text: #ccccdc;
    --muted: #a8aabd;
    --border: rgba(204, 204, 220, 0.16);
    --link: #6e9fff;
    --btn-quiet: rgba(204, 204, 220, 0.1);
    --danger: #e0485b;
    --focus: #efbb98;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1416;
  --text: #ccccdc;
  --muted: #a8aabd;
  --border: rgba(204, 204, 220, 0.16);
  --link: #6e9fff;
  --btn-quiet: rgba(204, 204, 220, 0.1);
  --danger: #e0485b;
  --focus: #efbb98;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--link); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
main:focus, h2:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon { width: 16px; height: 16px; flex: none; fill: currentColor; }

/* ---- top bar ---------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 6;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding: 6px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand { font: 600 16px/1.2 var(--serif); letter-spacing: 0.01em; }
.leads { color: var(--muted); font: 12px/1.4 var(--mono); letter-spacing: 0.04em; }
.spacer { flex: 1; }
/* In a narrow panel the panel title already names the game. */
@media (max-width: 720px) { .brand { display: none; } }

/* ---- buttons ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2;
  min-height: 36px; padding: 8px 16px;
  border: 1px solid var(--border); border-radius: 2px;
  background: var(--btn-quiet); color: var(--text);
  cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-quiet { background: transparent; font-size: 13px; min-height: 28px; padding: 4px 10px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
/* On the console */
.btn-primary {
  background: var(--c-ink); border-color: var(--c-ink); color: #20332f;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
}
.btn-primary:hover { background: #fff8e4; border-color: #fff8e4; }
.btn-next .icon { margin-left: 6px; }
.btn-quiet-console, .btn-console {
  background: var(--c-chip); border-color: var(--c-chip-line); color: var(--c-mint);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
}
.btn-quiet-console { background: transparent; }
.btn-quiet-console:hover, .btn-console:hover { border-color: var(--c-mint); color: var(--c-ink); }
.btn-console { min-height: 30px; padding: 5px 10px; }
.btn-alert {
  background: var(--c-alert); border-color: var(--c-alert); color: #fff;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
}
.btn-alert:hover { filter: brightness(1.1); }
.player :focus-visible, .hub :focus-visible, .title-view :focus-visible { outline: 3px solid var(--c-peach); outline-offset: 3px; }
.player h2:focus-visible, .hub h2:focus-visible { outline: none; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---- layout ------------------------------------------------------------------- */

main { padding: 16px 24px 40px; max-width: 1212px; margin: 0 auto; }
@media (max-width: 640px) { main { padding: 12px 12px 32px; } }

h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }

.rule {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 12px;
  color: var(--c-peach); font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.rule::after { content: ""; flex: 1; border-top: 1px solid var(--c-line); }

.lede { color: var(--c-muted); }

/* The console screen every view sits on */
.player, .hub {
  padding: 4px 18px 20px;
  border: 1px solid var(--c-line); border-radius: 4px;
  background: var(--c-bg); color: var(--c-ink);
}
@media (max-width: 640px) { .player, .hub { padding: 2px 10px 14px; } }
.player a, .hub a { color: #9fc3ff; }
.note { color: var(--c-muted); font-size: 13px; }

.chapterbar {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 0;
  color: var(--c-mint); font: 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.chapter-count { color: var(--c-muted); }
.player-intro { max-width: 90ch; margin-inline: auto; }

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

.title-view { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
/* The key art, the title on an office computer's screen, with the lede and Start under it.
   It's a painting, not pixel art, so it scales smoothly. */
.title-art {
  max-width: none;
  border: 1px solid #75887a; background: var(--c-bg);
}
.title-art { position: relative; overflow: hidden; }
.title-pic { position: relative; }
.title-text { position: relative; }
.title-pic > img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .title-pic > img { animation: scene-in 0.8s ease-out; }
}
.title-text { padding: 16px; }

/* Motion over the picture (titleLights in game.js): the disco ball's glints and the coloured
   light it throws, and digits drifting on the screen above and below the title. Everything is
   placed in percentages of the picture, sized from its width, and uses transform and opacity
   only. Without motion the layer is hidden and the picture stands as it is. */
.title-pic { position: relative; container-type: inline-size; overflow: hidden; }
.title-lights { display: none; position: absolute; inset: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .title-lights { display: block; }
  .tl-ball { position: absolute; left: 88.4%; top: 3.8%; width: 9.4%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; }
  .tl-shimmer {
    position: absolute; inset: -10%; border-radius: 50%; opacity: 0.3;
    background: conic-gradient(rgba(255, 255, 255, 0.9), transparent 12%, rgba(120, 220, 255, 0.8) 25%, transparent 38%,
      rgba(255, 120, 200, 0.8) 52%, transparent 65%, rgba(255, 240, 150, 0.8) 78%, transparent 90%, rgba(255, 255, 255, 0.9));
    animation: tl-spin 14s linear infinite;
  }
  .tl-glint {
    position: absolute; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(0); opacity: 0;
    background: radial-gradient(circle, #fff 0 14%, rgba(255, 255, 255, 0.7) 22%, transparent 62%);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
    animation: tl-glint 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s);
  }
  .tl-spark {
    position: absolute; width: 6%; aspect-ratio: 1; border-radius: 50%; mix-blend-mode: screen; opacity: 0;
    background: radial-gradient(circle, hsla(var(--hue), 100%, 65%, 0.85), transparent 65%);
    animation: tl-spark 9s ease-in-out infinite; animation-delay: calc(var(--i) * -1.3s);
  }
  .tl-digit {
    position: absolute; font: 700 1.9cqw/1 var(--mono); color: #8ff0b8; opacity: 0;
    text-shadow: 0 0 0.6cqw rgba(143, 240, 184, 0.7);
    animation: tl-digit 6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.9s);
  }
}
.tl-fill, .tl-type, .tl-cursor { position: absolute; }
@media (prefers-reduced-motion: no-preference) {
  /* the fairy lights on the tree and garlands: small soft glints over the bulbs, out of step */
  .tl-bulb {
    position: absolute; width: 2.4%; aspect-ratio: 1; margin: -1.2% 0 0 -1.2%; border-radius: 50%; mix-blend-mode: screen;
    background: radial-gradient(circle, hsla(var(--hue), 100%, 82%, 0.9) 0 18%, hsla(var(--hue), 100%, 65%, 0.45) 40%, transparent 70%);
    opacity: 0; animation: tl-bulb 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.37s);
  }
  /* the title typed on the screen: the fill hides the picture's own lettering until it is typed */
  .tl-fill { overflow: hidden; animation: tl-fadeout 0.5s ease-out var(--end) both; }
  .tl-edge { position: absolute; inset: 0; background-repeat: no-repeat; }
  .tl-fade { -webkit-mask-image: linear-gradient(to right, transparent, #000); mask-image: linear-gradient(to right, transparent, #000); }
  .tl-type { overflow: hidden; clip-path: inset(0 100% 0 0); animation: tl-type var(--dur) steps(var(--n)) var(--start) both; }
  .tl-cursor {
    background: #d9f5c4; box-shadow: 0 0 1.2cqw rgba(190, 255, 190, 0.7); opacity: 0; transform: translateX(0);
    animation: tl-move var(--dur) steps(var(--n)) var(--start) both, tl-show var(--dur) steps(1) var(--start);
  }
  .tl-last { animation: tl-move var(--dur) steps(var(--n)) var(--start) both, tl-show var(--dur) steps(1) var(--start), tl-blink 1.1s steps(1) calc(var(--start) + var(--dur)) infinite; }
}
@keyframes tl-bulb { 0%, 100% { opacity: 0; transform: scale(0.5); } 45% { opacity: 1; transform: scale(1.1); } 70% { opacity: 0.2; transform: scale(0.8); } }
@keyframes tl-type { to { clip-path: inset(0 0 0 0); } }
@keyframes tl-fadeout { to { opacity: 0; } }
@keyframes tl-move { to { transform: translateX(calc(var(--n) * 100%)); } }
@keyframes tl-show { 0%, 100% { opacity: 1; } }
@keyframes tl-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tl-spin { to { transform: rotate(1turn); } }
@keyframes tl-glint { 0%, 30%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); } 55% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); } 75% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(90deg); } }
@keyframes tl-spark { 0%, 100% { opacity: 0; transform: translate(0, 0); } 25%, 65% { opacity: 1; } 50% { transform: translate(-2.5cqw, 1cqw); } 90% { opacity: 0; transform: translate(-5cqw, 1.5cqw); } }
@keyframes tl-digit { 0%, 100% { opacity: 0; transform: translateY(0); } 20%, 60% { opacity: 0.75; } 50% { transform: translateY(0.8cqw); } 80% { opacity: 0.1; transform: translateY(1.4cqw); } }

/* ---- panels --------------------------------------------------------------------- */
/* One full-image panel: the picture, where we are and the headline over it, the text under it */

.panel { margin: 0; border: 1px solid #75887a; background: var(--c-panel); }
.panel-art { position: relative; }
.panel-pic { position: relative; width: 100%; background: #314f49; }
.panel-pic img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
@media (prefers-reduced-motion: no-preference) {
  .panel-pic img { animation: scene-in 0.5s ease-out; }
}
@keyframes scene-in { from { opacity: 0; } }
/* Shade under the headline, and faint scan lines, as in the comic */
.panel-pic::before, .panel-pic::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.panel-pic::after { background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(7, 28, 32, 0.07) 3px 4px); }
.panel-dim img { filter: brightness(0.38) saturate(0.7); }
.panel-black { background: #040607; }
.panel-art { background: var(--c-term); }
/* EXPERIMENT (16:9 full-window layout, this branch only). Every panel's picture area is one stage that fills the window
   edge to edge (no outer box): the picture keeps its own shape and is centred in it; a narrower picture is shown whole, and a wider one
   is magnified up to 1.6x the column with its sides cropped, hotspots kept in view, and an even dark margin above and below. .panel-pic stays the picture-sized box, so the
   hotspots, camera and clock overlays and the power-cut columns need no remapping. On a wide window the story text and the
   cards sit beside the stage; on a phone they stack under it and the stage is 16:9. */
body:has(.panel-art-staged, .title-view) { background: var(--c-bg); }
main:has(.panel-art-staged, .title-view) { max-width: none; padding: 0; }
main:has(.title-view) { padding: 12px 16px; }
.player:has(.panel-art-staged) { border: 0; border-radius: 0; background: transparent; }
.panel:has(.panel-art-staged) { border: 1px solid #75887a; background: var(--c-term); margin-left: 16px; margin-right: 16px; }
.panel-art-staged { width: 100%; display: flex; flex-direction: column; min-height: 0; background: transparent; }
.panel-stage {
  position: relative; overflow: hidden; container-type: size;
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 16 / 9; background: var(--c-term);
}
.panel-stage > .panel-pic {
  /* The picture fills the stage's height; a wider one is cropped at the sides but never so far that a hotspot leaves the view
     (--hc, --hs from game.js), and then it is as wide as the hotspots allow, with an even dark margin above and below. A narrower one is whole. */
  --wp: min(calc(100cqh * var(--r, 1.5)), calc(100cqw * 1.6), max(100cqw, calc((100cqw - 56px) / var(--hs, 0.001))));   /* never magnified past 1.6x the column: a wide picture keeps its top and bottom, with an even margin */
  --m: max(0px, calc((var(--wp) - 100cqw) / 2));
  position: relative; z-index: 1; flex: none; width: var(--wp); margin: 0;
  left: clamp(calc(-1 * var(--m)), calc((0.5 - var(--hc, 0.5)) * var(--wp)), var(--m));
}
@media (max-width: 899px) { .panel-stage { aspect-ratio: var(--sr, 1.7778); } }   /* stacked: a narrower picture's stage is as tall as the picture, so it fills the width */
/* The headline sits above the stage, never over the picture. */
.panel-head { padding: 10px 18px 8px; }
.panel-where {
  margin: 0;
  color: #f1d8b4; font: 11px/1.4 var(--mono); letter-spacing: 0.22em; text-transform: uppercase;
}
.panel-head h2 {
  margin: 2px 0 0;
  color: var(--c-ink); font: normal clamp(22px, 2.6vw, 34px)/1.05 var(--serif); letter-spacing: -0.02em;
}
.panel-head-wide h2 { font-size: clamp(20px, 2.2vw, 28px); }
@media (max-width: 640px) {
  .panel-head, .panel-head-wide { padding: 12px 14px 10px; }
  .panel-head h2, .panel-head-wide h2 { font-size: 24px; }
}
.panel-sound {
  position: absolute; z-index: 3; right: 4%; bottom: 10%; max-width: 50%; margin: 0;
  padding: 8px 12px; background: rgba(32, 19, 43, 0.86); color: var(--c-ink);
  font: 11px/1.5 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
}
@media (max-width: 480px) { .panel-sound { font-size: 9px; padding: 6px 8px; letter-spacing: 0.1em; } }
@media (min-width: 900px) {
  .player:has(.panel-art-staged) { min-height: calc(100vh - 41px); min-height: calc(100svh - 47px); padding: 0; }
  .player:has(.panel-art-staged) > :not(.panel) { margin-left: 16px; margin-right: 16px; }
  .panel:has(.panel-art-staged) {
    flex: 1; min-height: 420px; margin-bottom: 0 !important;
    display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 36vw, 720px); grid-template-rows: minmax(0, 1fr) auto auto;
  }
  .panel:has(.panel-art-staged):not(:has(> figcaption.panel-text)) { grid-template-columns: minmax(0, 1fr); }   /* a picture with no text (the flyer) takes the whole width */
  .panel:has(.panel-art-staged) > .panel-art { grid-column: 1; grid-row: 1; min-height: 0; }
  .panel:has(.panel-art-staged) .panel-stage { flex: 1; min-height: 0; aspect-ratio: auto; }
  .panel:has(.panel-art-staged) > .recorder, .panel:has(.panel-art-staged) > .cam-caption { grid-column: 1; padding-left: 16px; }
  .panel:has(.panel-art-staged) > figcaption { grid-column: 2; grid-row: 1 / span 3; border-left: 1px solid var(--c-line); background: var(--c-bg); }
  .panel:has(.panel-art-staged) > .panel-text { border-top: 0; overflow-y: auto; contain: size; padding: 10px 16px 12px; }
  .panel:has(.panel-art-staged) .panel-text > .card-body { max-width: none; }
  .panel:has(.panel-art-staged) > .panel-text { font-size: clamp(16px, calc(0.95vw + 6px), 26px); line-height: 1.5; }
  .panel:has(.panel-art-staged) .panel-text .card-body p { margin-bottom: 7px; }
}
main:has(.panel-role) { padding-top: 8px; padding-bottom: 8px; }
.player:has(.panel-role) { min-height: calc(100vh - 66px); min-height: calc(100svh - 66px); }
@media (min-width: 900px) { .panel-role .panel-text { padding-top: 8px; padding-bottom: 10px; } .panel-role .role-tiles { margin-bottom: 8px; } }

/* Art to come: the same frame, with a quiet label */
.panel-placeholder {
  background:
    radial-gradient(ellipse at 70% 60%, rgba(183, 212, 180, 0.12), transparent 60%),
    repeating-linear-gradient(135deg, #1b3134 0 14px, #182c2f 14px 28px);
}
.placeholder-label {
  position: absolute; right: 12px; bottom: 10px; z-index: 2;
  color: rgba(232, 228, 211, 0.5); font: 10px/1.4 var(--mono); letter-spacing: 0.18em; text-transform: uppercase;
}

.panel-text { padding: 14px 20px 16px; border-top: 1px solid var(--c-line); font-size: 15px; }
@media (max-width: 640px) { .panel-text { padding: 12px 14px 14px; } }
.panel-text .card-body > :last-child { margin-bottom: 0; }
.panel:not(.panel-role) .panel-text > .card-body { max-width: 90ch; margin-inline: auto; }
/* What the picture already says, a click away */
.drawn { margin-top: 10px; }
.drawn summary {
  width: fit-content; cursor: pointer;
  color: var(--c-mint); font: 11px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.drawn[open] summary { margin-bottom: 8px; }

/* ---- card text ------------------------------------------------------------------ */

.card-body p { max-width: 90ch; }
.card-body .stage { color: var(--c-muted); font-style: italic; }
.card-body ul, .card-body ol { margin: 0 0 10px; padding-left: 1.4em; }
.card-body li { margin-bottom: 6px; }
.card-body s { text-decoration-thickness: 2px; }
/* Spoken lines as captions: the investigator's in peach, everyone else's in mint */
.card-body .speech {
  width: fit-content; max-width: 90ch;
  padding: 6px 12px; margin: 0 0 8px;
  border-left: 3px solid var(--c-mint); background: var(--c-chip);
}
.card-body .speech .speaker {
  margin-right: 2px;
  color: var(--c-mint); font: 600 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.card-body .speech-you { border-left-color: var(--c-peach); }
.card-body .speech-you .speaker { color: var(--c-peach); }
/* Paper and screens, close up: the same in both themes */
.card-body .screen {
  max-width: 90ch; margin: 4px 0 12px; padding: 12px 16px;
  background: var(--c-paper); color: var(--c-paper-ink);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
  font: 15px/1.6 var(--serif);
}
.card-body .screen div { white-space: pre-wrap; overflow-wrap: anywhere; }
.card-body .screen div + div { margin-top: 4px; }
.card-body .screen strong { color: #873c36; }

/* "Your role": the three things you do, as tiles */
.role-tiles {
  list-style: none; padding: 0 !important; margin: 12px 0 0 !important;
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.role-tiles li {
  margin: 0; padding: 12px 14px;
  border: 1px solid var(--c-chip-line); background: var(--c-chip); color: #c7d5c9; font-size: 14px;
}
.role-tiles .icon { display: block; width: 22px; height: 22px; margin-bottom: 8px; color: var(--c-peach); }
.role-tiles strong { color: var(--c-ink); text-transform: capitalize; }
.panel-role .panel-head { position: static; max-width: none; padding: 16px 20px 0; text-shadow: none; }

/* The buttons that step on and back sit at the bottom of the screen on every panel, whatever
   its picture's shape or its text's length: a player can click in the same place each time.
   A player that is shorter than the screen stretches to fill it, and the bar stays in view when
   it is taller. */
.player { display: flex; flex-direction: column; padding-bottom: 0; min-height: calc(100vh - 58px); min-height: calc(100svh - 58px); }
@media (max-width: 640px) { .player { padding-bottom: 0; min-height: calc(100vh - 54px); min-height: calc(100svh - 54px); } }
.framebar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: auto; padding: 12px 0 20px;
  position: sticky; bottom: 0; z-index: 4;
  background: var(--c-bg); border-top: 1px solid var(--c-line-soft);
}
.player > .panel, .player > .text-card { margin-bottom: 14px; }
.key-hint { color: var(--c-muted); font: 11px/1.4 var(--mono); letter-spacing: 0.06em; }
.key-hint kbd { font: inherit; padding: 0 4px; border: 1px solid var(--c-line); border-radius: 2px; }
@media (hover: none), (pointer: coarse) { .key-hint { display: none; } }
@media (max-width: 640px) { .framebar { padding-bottom: 14px; } }
.framebar-nav, .framebar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.framebar-actions { margin-left: auto; justify-content: flex-end; }
.framebar-note { flex-basis: 100%; margin: 0; text-align: right; font-size: 14px; }

/* Hotspots: numbered markers placed by game.js at a percentage of the picture */
.hotspot {
  position: absolute; z-index: 4; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0;
  border: 1px solid #f4e6b5; border-radius: 50%;
  background: rgba(18, 46, 49, 0.85); color: #fff5d2;
  font: 600 13px/28px var(--mono); text-align: center; cursor: pointer;
  box-shadow: 0 0 0 5px rgba(11, 37, 37, 0.35);
}
.hotspot:hover, .hotspot[aria-expanded="true"] { background: #8a4b00; }
.hotspot:focus-visible { outline: 3px solid var(--c-peach); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .hotspot { animation: hotspot-breathe 3s ease-in-out infinite; }
  .hotspot-note { animation: scene-in 0.15s ease-out; }
}
@keyframes hotspot-breathe { 50% { box-shadow: 0 0 0 8px rgba(11, 37, 37, 0.15); } }
@media (max-width: 480px) {
  .hotspot { width: 24px; height: 24px; margin: -12px 0 0 -12px; font-size: 12px; line-height: 22px; }
}
.hotspot-note {
  position: absolute; z-index: 5;
  width: max-content; max-width: min(22rem, 100%);
  padding: 10px 12px;
  border: 1px solid var(--c-mint);
  background: #102326; color: var(--c-ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  font-size: 14px; line-height: 1.45;
}
.hotspot-note[hidden] { display: none; }
.hotspot-note .hotspot-label { margin: 0 0 4px; color: var(--c-peach); font: 600 12px/1.4 var(--mono); letter-spacing: 0.06em; }
.hotspot-note .card-body p { margin: 0 0 6px; }
.hotspot-note .card-body > :last-child { margin-bottom: 0; }
.hotspot-note .card-body .screen { margin: 8px 0 0; padding: 10px 12px; box-shadow: none; border: 1px solid #b9ab8a; }

/* Panels that play (animate() in game.js): frames cross-fade over the first picture, the picture keeps its
   shape, and the hotspots wait until it has played. */
.panel-pic { container-type: inline-size; }
.panel-pic img.anim-frame { position: absolute; inset: 0; opacity: 0; animation: none; transition: opacity 0.35s ease-in-out; }
.panel-pic img.anim-frame.on { opacity: 1; }
.pic-calm img.anim-frame { transition: none; }
.pic-playing { cursor: pointer; }
/* A brief flash round the picture when it is about to change (cue() in game.js), so a glance away still catches it */
@media (prefers-reduced-motion: no-preference) {
  .pic-cue::after { z-index: 4; animation: pic-cue 0.5s ease-out; }
}
@keyframes pic-cue { 0% { box-shadow: inset 0 0 0 5px rgba(255, 233, 170, 0.85), inset 0 0 40px rgba(255, 233, 170, 0.45); } 100% { box-shadow: inset 0 0 0 5px rgba(255, 233, 170, 0), inset 0 0 40px rgba(255, 233, 170, 0); } }
.pic-playing .hotspot { visibility: hidden; }
.anim-stage { position: absolute; inset: 0; z-index: 1; background: #05070a; overflow: hidden; }

/* 03:02: three columns, each the lit room and then the dark one */
.power-col { position: absolute; top: 0; bottom: 0; width: 33.333%; overflow: hidden; }
.power-col:nth-child(1) { left: 0; }
.power-col:nth-child(2) { left: 33.333%; border-left: 1px solid #2c2230; border-right: 1px solid #2c2230; }
.power-col:nth-child(3) { left: 66.666%; }
.power-col:nth-child(2) { width: 33.334%; }
.power-col img.anim-frame { object-fit: cover; }
.power-col img.dark { transition-duration: 0.4s; }

/* The security cameras: a clock over the picture, a blinking record light, scan lines and grain */
.cam-ts, .cam-name {
  position: absolute; z-index: 2; color: #e9f2e4; font: 700 3.3cqw/1 var(--mono); letter-spacing: 0.06em;
  text-shadow: 0 0 4px #000, 0 1px 0 #000; font-variant-numeric: tabular-nums;
}
.cam-rec { position: absolute; z-index: 2; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #d84a3a; }
@media (prefers-reduced-motion: no-preference) {
  .cam-rec { animation: cam-blink 1.6s steps(1) infinite; }
  .cam-feed::after, .cam-overlay::after { animation: cam-grain 0.5s steps(2) infinite; }
}
@keyframes cam-blink { 50% { opacity: 0; } }
@keyframes cam-grain { 0% { background-position: 0 0; } 50% { background-position: 5px 3px; } }
.cam-overlay { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cam-overlay { transition: opacity 0.35s; }
.cam-overlay.gone { opacity: 0; }
.cam-overlay .cam-ts { left: 2.4cqw; bottom: 2.4cqw; }
.cam-overlay .cam-rec { left: auto; right: 3cqw; top: 2.6cqw; }
.cam-overlay .cam-name { right: 5.6cqw; top: 2.2cqw; font-size: 2.4cqw; }
.cam-overlay::after, .cam-feed::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: 0.35;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 4px);
}
.cams .cam-title {
  position: absolute; left: 0; right: 0; top: 2cqw; z-index: 2; margin: 0; text-align: center; color: #e2b88f;
  font: 700 3.6cqw/1.2 var(--mono); letter-spacing: 0.1em; text-shadow: 0 0 4px #000, 0 1px 0 #000;
}
/* One camera, one picture: the 03:01:20 and 03:07:03 feeds share the frame, and static covers it while the cameras are offline */
.cam-feed { position: absolute; inset: 0; overflow: hidden; background: #000; }
.cam-feed.cam-hide { visibility: hidden; }
.cam-feed img { position: absolute; inset: 0; animation: none; }
.cam-feed .cam-ts { left: 4cqw; bottom: 3.4cqw; font-size: 5.4cqw; }
.cam-feed .cam-rec { right: 5cqw; top: 3cqw; width: 3cqw; height: 3cqw; }
.cam-static {
  position: absolute; inset: 0; z-index: 3; display: none; background-color: #07090b;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 2px, rgba(0, 0, 0, 0.35) 2px 5px, transparent 5px 9px),
    repeating-linear-gradient(45deg, rgba(150, 170, 160, 0.12) 0 1px, transparent 1px 7px);
}
.cam-static.on { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .cam-static.on { animation: cam-static 0.18s steps(3) infinite; }
}
@keyframes cam-static { 0% { background-position: 0 0, 0 0, 0 0; } 33% { background-position: 0 2px, 3px 0, 5px 4px; } 66% { background-position: 0 1px, 6px 0, 2px 6px; } }
.cam-veil {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  color: #f0a078; font: 700 5.6cqw/1.3 var(--mono); letter-spacing: 0.12em; text-shadow: 0 0 8px #000;
}
.cam-veil span { padding: 0 6%; }
/* What the room sounds like: a caption under the camera's picture, like a subtitle, never burnt into the footage */
.cam-caption {
  margin: 0; padding: 10px 20px; border-top: 1px solid var(--c-line); background: rgba(5, 7, 10, 0.55); color: #cfe0d8;
  font: 600 13px/1.4 var(--mono); letter-spacing: 0.05em; text-align: center;
}
@media (max-width: 640px) { .cam-caption { padding: 8px 14px; font-size: 12px; } }
/* Switching between the two moments, after the footage has played */
.cam-switch { position: absolute; left: 4cqw; right: 4cqw; bottom: 3cqw; z-index: 5; display: flex; gap: 2cqw; justify-content: flex-end; }
.cam-switch-btn {
  padding: 0.8cqw 2.6cqw; border: 1px solid #5d7068; background: rgba(5, 7, 10, 0.78); color: #e9f2e4;
  font: 600 3.4cqw/1.2 var(--mono); letter-spacing: 0.06em; cursor: pointer;
}
.cam-switch-btn[aria-pressed="true"] { background: #e9f2e4; color: #05070a; border-color: #e9f2e4; }
.cam-switch-btn:focus-visible { outline: 3px solid var(--c-peach); outline-offset: 2px; }
.pic-playing .cam-switch { visibility: hidden; }
/* Each moment of the one-camera panel shows only its own markers */
.panel-pic[data-feed="a"] .hotspot[data-feed="b"], .panel-pic[data-feed="b"] .hotspot[data-feed="a"],
.panel-pic[data-feed=""] .hotspot[data-feed] { display: none; }
/* The statistics are over the panel's end (at the bottom of the 450 x 600 frame the clock sits under the buttons) */
.cam-feed .cam-ts { bottom: 12cqw; }

/* A note opened to read: the paper enlarged, over the game, until it's closed */
.hotspot-read { border-style: dashed; }
.reader {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(3, 8, 9, 0.78); overflow: auto;
}
.reader-sheet {
  width: min(40rem, 100%); max-height: 100%; overflow: auto; padding: 18px 20px 16px;
  border: 1px solid var(--c-mint); background: var(--c-panel); color: var(--c-ink);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.reader-label { margin: 0 0 10px; color: var(--c-peach); font: 600 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.reader .card-body { font-size: clamp(17px, 2.6vw, 22px); }
.reader .card-body .screen { box-sizing: border-box; max-width: 100%; font-size: clamp(20px, 3.4vw, 30px); line-height: 1.5; padding: 16px 22px; overflow-wrap: anywhere; }
.reader-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.title-text .actions { align-items: center; gap: 14px; }
/* The split, said once under the title: the agent has the telemetry, the player has the leads. */
.split-line { margin: 0 0 14px; max-width: 62ch; padding-left: 12px; border-left: 3px solid var(--c-peach); color: var(--c-ink); font-size: 15px; line-height: 1.45; }
.title-local { margin: 28px 0 0; font-size: 12px; line-height: 1.4; color: var(--c-muted); }
.title-local a { color: inherit; text-decoration: underline; }
.title-local a:hover, .title-local a:focus-visible { color: var(--c-ink); }

/* ---- the console's boxes -------------------------------------------------------- */

.console { min-width: 0; border: 1px solid var(--c-line); background: var(--c-term); }
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--c-line-soft);
  color: var(--c-muted); font: 10px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.console-bar .icon { width: 14px; height: 14px; color: var(--c-mint); }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c-mint); }
.dot-alert { background: var(--c-alert); }
.console-body { padding: 14px 16px 16px; }
.console-body h2, .console-body h3 { color: var(--c-ink); font: normal 22px/1.2 var(--serif); }
.console-body h3 { font-size: 19px; }
.console .actions { margin-top: 14px; }
.console-body > p { font-size: 14px; color: #c7d5c9; }
.console-body > p.note { font-size: 13px; color: var(--c-muted); }

/* ---- hub ---------------------------------------------------------------------- */

.hub > h2 { color: var(--c-ink); font: normal clamp(26px, 3vw, 36px)/1.1 var(--serif); }
.hub > .lede { max-width: 72ch; }
.hub-grid {
  display: grid; gap: 14px; margin-top: 16px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "ai" "inv" "review" "accuse";
}
@media (min-width: 900px) {
  .hub-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "ai inv" "ai accuse" "review review";
    grid-template-rows: auto 1fr auto;
    align-items: start;
  }
  .hub-grid .area-ai { align-self: stretch; }
}
.area-inv { grid-area: inv; }
.area-ai { grid-area: ai; }
.area-review { grid-area: review; }
.area-accuse { grid-area: accuse; }

/* The seven leads: tiles with their price, all open to the player from the start */
.lead-tiles { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.lead-tile {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; min-width: 0; text-align: left; cursor: pointer;
  padding: 10px; border: 1px solid var(--c-line); background: var(--c-panel); color: var(--c-ink); font: inherit;
}
.lead-tile:hover { border-color: var(--c-mint); }
.lead-tile:focus-visible { outline: 3px solid var(--c-peach); outline-offset: 2px; }
.lead-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--c-chip-line); color: var(--c-muted);
}
.lead-words { display: grid; flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.lead-words small { color: var(--c-muted); font: 10px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.lead-words strong { color: var(--c-ink); font: normal 16px/1.25 var(--serif); }
.lead-note { color: var(--c-muted); font-size: 12px; }
.lead-price { flex: none; align-self: flex-start; padding: 1px 6px; border: 1px solid var(--c-peach); color: var(--c-peach); font: 11px/1.5 var(--mono); white-space: nowrap; }
/* The clock time after a lead sits inside its tile: its space is always kept (no shifting), the words show on hover or focus,
   and on touch screens, which have no hover, they are always there. */
.lead-after { margin-top: 4px; color: var(--c-peach); font: 11px/1.4 var(--mono); opacity: 0; }
.lead-tile:hover .lead-after, .lead-tile:focus-visible .lead-after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .lead-after { transition: opacity 0.2s ease; } }
@media (hover: none) { .lead-after { opacity: 1; } }
.lead-done .lead-icon { background: var(--c-mint); border-color: var(--c-mint); color: #20332f; }
.lead-done .lead-price { border-color: var(--c-mint); color: var(--c-mint); }
.meter { margin: 0; padding: 8px 10px; border: 1px solid var(--c-chip-line); background: var(--c-chip); color: #c7d5c9; font-size: 13px; }
.meter strong { color: var(--c-ink); }

/* The story's clock, above the leads: an analogue face and the time in big figures, moving on as leads are followed */
.area-inv { display: grid; gap: 14px; align-content: start; min-width: 0; }
.night-clock {
  display: flex; align-items: center; gap: 18px; min-width: 0; padding: 14px 18px;
  border: 1px solid var(--c-peach); background: linear-gradient(135deg, #1d2a27, var(--c-term) 70%);
  box-shadow: inset 0 0 0 1px rgba(239, 187, 152, 0.12), 0 0 22px rgba(239, 187, 152, 0.08);
}
.night-clock-face { flex: none; width: clamp(84px, 11vw, 104px); height: auto; }
.night-clock-face .rim { fill: #0c1719; stroke: var(--c-peach); stroke-width: 3; }
.night-clock-face .tick { stroke: var(--c-muted); stroke-width: 2; stroke-linecap: round; }
.night-clock-face .tick-major { stroke: var(--c-ink); stroke-width: 3.5; }
.night-clock-face .hand { stroke-linecap: round; transform-origin: 50px 50px; transition: transform 0.9s cubic-bezier(0.3, 1.3, 0.5, 1); }
.night-clock-face .hand-hour { stroke: var(--c-ink); stroke-width: 5; }
.night-clock-face .hand-minute { stroke: var(--c-mint); stroke-width: 3.2; }
.night-clock-face .pin { fill: var(--c-peach); }
@media (prefers-reduced-motion: reduce) { .night-clock-face .hand { transition: none; } }
.night-clock-words { display: grid; gap: 2px; flex: 1; min-width: 0; }
.night-clock-words small { color: var(--c-muted); font: 10px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.night-clock-time { color: var(--c-ink); font: 700 clamp(34px, 5vw, 46px)/1.05 var(--mono); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.night-clock-dawn { color: var(--c-peach); font: 12px/1.4 var(--mono); letter-spacing: 0.06em; }
.night-clock-bar { display: flex; height: 6px; margin: 6px 0 4px; border: 1px solid var(--c-chip-line); background: var(--c-chip); }
.night-clock-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-mint), var(--c-peach)); }
/* The preview of a hovered or focused lead: the minutes it would use, hatched and faint after what is spent */
.night-clock-bar .night-clock-preview {
  flex: none; width: 0; background: repeating-linear-gradient(135deg, var(--c-peach) 0 3px, transparent 3px 6px); opacity: 0.55;
}
@media (prefers-reduced-motion: no-preference) { .night-clock-bar .night-clock-preview { transition: width 0.25s ease; } }
.night-clock-note { margin: 0; color: var(--c-muted); font-size: 12px; line-height: 1.4; }
@media (max-width: 480px) { .night-clock { gap: 12px; padding: 12px; } }

/* The clock at the top of the briefing: the time and the hours to dawn, the night clock's own colours, in one slim strip */
.night-strip {
  display: flex; align-items: center; gap: 16px; min-width: 0; margin: 6px 0 12px; padding: 8px 14px;
  border: 1px solid var(--c-peach); background: linear-gradient(135deg, #1d2a27, var(--c-term) 70%);
  box-shadow: inset 0 0 0 1px rgba(239, 187, 152, 0.12), 0 0 22px rgba(239, 187, 152, 0.08);
}
.night-strip .night-clock-time { flex: none; font-size: clamp(24px, 4vw, 32px); }
.night-strip-words { display: grid; gap: 2px; flex: 1; min-width: 0; }
.night-strip .night-clock-bar { margin: 4px 0 0; }
@media (max-width: 480px) { .night-strip { gap: 10px; padding: 8px 10px; } }

/* The advert cut off by Floor Security's call: the flyer breaks up, its last line stops mid-word, static, then the call.
   Paint only (no clicks, no keys); nothing shows with reduced motion, and the call's text is under it for a screen reader. */
.player.has-glitch { position: relative; }
.glitch { display: none; }
@media (prefers-reduced-motion: no-preference) {
  /* The advert's own screen (a copy of it, so the flyer is the same size in the same place) torn up by the interruption. */
  .glitch {
    display: flex; flex-direction: column; position: absolute; inset: 0; z-index: 5; overflow: hidden; pointer-events: none;
    background: var(--c-bg); animation: glitch-out 2.3s steps(1, end) forwards;
  }
  .glitch > .player { flex: 1; margin: 0; background: var(--c-bg); }
  .glitch .panel { animation: glitch-jolt 2.3s steps(1, end) forwards; }
  .glitch .panel-stage { animation: glitch-break 2.3s steps(1, end) forwards; }
  .glitch .panel-pic img { animation: none; }
  .glitch-static {
    position: absolute; inset: 0; opacity: 0; mix-blend-mode: screen;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 3px),
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 7px);
    animation: glitch-static 2.3s steps(1, end) forwards;
  }
}
@keyframes glitch-out { 0%, 94% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@keyframes glitch-type { from { max-width: 0; } to { max-width: 100%; } }
@keyframes glitch-jolt {
  0%, 46% { transform: none; }
  48% { transform: translate(-6px, 2px) skewX(6deg); }
  50% { transform: translate(8px, -3px); }
  52% { transform: translate(-3px, 4px) skewX(-8deg); }
  54%, 100% { transform: none; }
}
@keyframes glitch-break {
  0%, 46% { opacity: 1; filter: none; }
  48% { opacity: 0.8; filter: hue-rotate(90deg) contrast(1.6); }
  52% { opacity: 1; filter: invert(1); }
  56%, 100% { opacity: 0; filter: none; }
}
@keyframes glitch-static {
  0%, 44% { opacity: 0; }
  46% { opacity: 1; background-position: 0 0, 3px 0; }
  50% { opacity: 0.7; background-position: 0 2px, 0 0; }
  54% { opacity: 1; background-position: 0 1px, 5px 0; }
  62% { opacity: 0.5; background-position: 0 3px, 2px 0; }
  78% { opacity: 0.8; background-position: 0 0, 6px 0; }
  90%, 100% { opacity: 0; }
}
.score-parts { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 4px; }
.score-parts li { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.score-parts strong { min-width: 7em; }
.route { margin: 4px 0 14px; padding-left: 1.4em; color: #c7d5c9; }

.questions { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; gap: 8px; }
.questions li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--c-line); background: var(--c-panel);
}
.questions .q-mark { color: var(--c-peach); font-family: var(--mono); }
.questions .q-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.questions .q-hint {
  justify-self: start; padding: 1px 6px; border: 1px solid var(--c-chip-line); background: var(--c-chip);
  color: var(--c-mint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.questions .q { overflow-wrap: anywhere; color: #c7d5c9; font-size: 14px; }
.questions .btn { flex: none; }
.questions .q-buttons { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
@media (max-width: 480px) {
  .questions li { flex-wrap: wrap; }
  .questions .btn, .questions .q-buttons { margin-left: auto; }
}

.review-tiles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.review-tile {
  display: grid; gap: 4px; width: 100%; padding: 0 0 10px; text-align: left; cursor: pointer;
  border: 1px solid var(--c-line); background: var(--c-panel); color: var(--c-ink);
  font-family: inherit; font-size: 13px; line-height: 1.35;
}
.review-tile:hover { border-color: var(--c-mint); }
.review-tile small, .review-tile span:last-child { padding: 0 10px; }
.review-tile small { color: var(--c-muted); font: 10px/1.4 var(--mono); letter-spacing: 0.12em; }

/* Small crops of the pictures, for buttons */
.thumb { display: block; position: relative; overflow: hidden; aspect-ratio: 3 / 1; background: #1b3134; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.thumb-empty { background: repeating-linear-gradient(135deg, #1b3134 0 10px, #182c2f 10px 20px); }

.suspect-strip { display: flex; gap: 8px; margin: 8px 0 12px; }
.suspect-mini { display: grid; gap: 4px; width: 76px; color: var(--c-muted); font: 11px/1.3 var(--mono); text-align: center; }
.suspect-mini .thumb, .suspect .thumb { aspect-ratio: 1; }
.suspect-mini .thumb img, .suspect .thumb img { object-position: 50% 30%; transform: scale(2.6); transform-origin: 50% 30%; }

/* The accusation's picker: a portrait and name for each suspect, in a row. */
.pick-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.pick-card {
  display: grid; gap: 6px; width: 104px; padding: 0 0 8px; cursor: pointer; text-align: center;
  border: 1px solid var(--c-chip-line); background: var(--c-chip); color: var(--c-ink); font: normal 16px/1.2 var(--serif);
}
.pick-card:hover { border-color: var(--c-mint); }
.pick-card[aria-pressed="true"] { border-color: var(--c-peach); box-shadow: 0 0 0 1px var(--c-peach) inset; }
.pick-card:focus-visible { outline: 3px solid var(--c-peach); outline-offset: 2px; }
.pick-card .thumb { aspect-ratio: 1; }
.pick-card .thumb img { object-position: 50% 30%; transform: scale(2.6); transform-origin: 50% 30%; }
select {
  width: 100%; font: inherit; color: var(--c-ink);
  background: var(--c-panel); border: 1px solid var(--c-chip-line); border-radius: 2px; padding: 7px 9px;
}

/* ---- forms -------------------------------------------------------------------- */

fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.player legend, .player label.block { color: var(--c-mint); font: 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.suspects { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.suspect {
  position: relative; display: grid; gap: 8px; padding: 0 0 10px; cursor: pointer;
  border: 1px solid var(--c-chip-line); background: var(--c-chip); color: var(--c-ink);
}
.suspect:hover { border-color: var(--c-mint); }
.suspect:has(input:checked) { border-color: var(--c-peach); box-shadow: 0 0 0 1px var(--c-peach) inset; }
.suspect:focus-within { outline: 3px solid var(--c-peach); outline-offset: 2px; }
.suspect-name { display: grid; gap: 6px; padding: 0 10px; font: normal 17px/1.2 var(--serif); }
.suspect-other .thumb { display: flex; align-items: center; justify-content: center; color: var(--c-muted); font: 40px/1 var(--serif); }
/* The radio covers its whole card, unseen: the card is what you click */
.suspect input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.suspect input[type="text"] { position: relative; z-index: 1; font-size: 14px; }

/* The two optional questions before the verdict: a five-stop slider and Yes / No */
.self-q { margin: 0 0 22px; }
.self-q input[type="range"] { display: block; width: 100%; margin: 10px 0 4px; accent-color: var(--c-peach); cursor: pointer; }
.self-q input[type="range"]:focus-visible, .self-choice input:focus-visible { outline: 3px solid var(--c-peach); outline-offset: 3px; }
.self-stops { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; list-style: none; margin: 0 0 6px; padding: 0; color: var(--c-muted); font-size: 12px; line-height: 1.3; }
.self-stops li { text-align: center; }
.self-stops li:first-child { text-align: left; }
.self-stops li:last-child { text-align: right; }
.self-readout { margin: 0 0 4px; color: var(--c-ink); font-size: 14px; }
.self-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.self-choice {
  display: inline-flex; align-items: center; gap: 8px; min-width: 96px; padding: 10px 14px; cursor: pointer;
  border: 1px solid var(--c-chip-line); background: var(--c-chip); color: var(--c-ink);
}
.self-choice:hover { border-color: var(--c-mint); }
.self-choice:has(input:checked) { border-color: var(--c-peach); box-shadow: 0 0 0 1px var(--c-peach) inset; }

input[type="text"], textarea {
  width: 100%; font: inherit; color: var(--c-ink);
  background: var(--c-panel); border: 1px solid var(--c-chip-line); border-radius: 2px;
  padding: 7px 9px;
}
textarea { min-height: 120px; resize: vertical; }
label.block { display: block; margin-bottom: 6px; }
.error { color: #ff9b8c; font-weight: 500; }
.error:empty { display: none; }

.spoiler { padding: 12px 14px; margin: 0 0 12px; border: 1px solid var(--c-peach); background: var(--c-panel); }

/* ---- verdict ------------------------------------------------------------------ */

.verdict .panel { margin-bottom: 14px; }
.accused { margin: 0 0 8px; color: var(--c-ink); font: normal 26px/1.15 var(--serif); }
.score-answers { margin: 14px 0 22px; }
.verdict > h2:not(.accused) { margin-top: 22px; }
.verdict .score { margin-top: 18px; }
.verdict .framebar { position: static; margin-top: 18px; }
.score-answers summary { width: fit-content; cursor: pointer; color: var(--c-mint); font: 11px/1.6 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.score-answers[open] summary { margin-bottom: 8px; }
.text-card { max-width: 90ch; margin-inline: auto; padding: 4px 0 0; }
.text-card h2 { color: var(--c-ink); font: normal 26px/1.15 var(--serif); }
.text-card .card-body p, .text-card .card-body li { color: #d6d9cc; }
.reasoning {
  margin: 0 0 16px; padding: 8px 12px;
  border-left: 3px solid var(--c-peach); background: var(--c-chip);
  color: var(--c-ink); white-space: pre-wrap;
}

/* ---- dialog and status -------------------------------------------------------- */

dialog {
  max-width: min(440px, calc(100vw - 32px));
  color: var(--c-ink); background: var(--c-bg);
  border: 1px solid var(--c-line); border-radius: 2px; padding: 22px;
}
dialog h2 { font: normal 24px/1.2 var(--serif); }
dialog::backdrop { background: rgba(6, 14, 18, 0.8); }
dialog .actions { margin-top: 16px; }
dialog .btn:not(.btn-danger) { background: transparent; border-color: var(--c-chip-line); color: var(--c-mint); }

.toast {
  position: fixed; z-index: 7; left: 50%; bottom: 16px; transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 9px 14px; border: 1px solid var(--c-mint);
  background: var(--c-panel); color: var(--c-ink); font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---- the scored accusation ---------------------------------------------------------- */

.accuse-form .question { margin: 0 0 16px; }
.player label.q-label { color: var(--c-ink); font: 17px/1.3 var(--serif); letter-spacing: 0; text-transform: none; }
.q-label .pts { margin-left: 6px; color: var(--c-muted); font: 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

/* The swag draw (verdict.js swagView): a heading, a muted line, the button, then the closing date on its own line. The button is a link
   (.player a is the link blue), so it takes the outlined button's mint text back (the same look as the outlined console buttons,
   .btn-quiet-console), with no underline, and the ink on hover, as .setup-back does. */
.swag { margin-top: 8px; }
.swag .note { margin: 0 0 10px; max-width: 60ch; color: var(--c-muted); font-size: 14px; line-height: 1.5; }
.swag .actions { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 0; }
.swag .actions .note { margin: 0; font-size: 13px; }
.player .swag a.btn, .player .swag a.btn:visited, .player .swag a.btn:focus-visible { color: var(--c-mint); text-decoration: none; }
.player .swag a.btn:hover { color: var(--c-ink); text-decoration: none; }
.player .share a.btn, .player .share a.btn:visited, .player .share a.btn:focus-visible { color: var(--c-mint); text-decoration: none; }
.player .share a.btn:hover { color: var(--c-ink); text-decoration: none; }
@media (max-width: 480px) { .swag .actions { align-items: stretch; } }
/* "Your route" (verdict.js dashboardLink): the sentence, then the rank button on its own row below it, spaced like the swag draw's. */
.rank-link { flex-direction: column; align-items: flex-start; gap: 10px; }
@media (max-width: 480px) { .rank-link { align-items: stretch; } }

.score-total { margin: 0 0 6px; color: var(--c-peach); font: normal 34px/1.1 var(--serif); }
.score-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.score-row { padding: 10px 12px; border: 1px solid var(--c-chip-line); border-left-width: 4px; background: var(--c-chip); }
.score-row.full { border-left-color: var(--c-mint); }
.score-row.part { border-left-color: var(--c-peach); }
.score-row.none { border-left-color: var(--c-muted); }
.score-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.score-pts { font: 13px/1.4 var(--mono); color: var(--c-mint); white-space: nowrap; }
.score-line { margin: 4px 0 0; overflow-wrap: anywhere; }
.score-k { display: inline-block; min-width: 7.5em; margin-right: 8px; color: var(--c-muted); font: 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* Local mode: the optional "add my score to the public leaderboard" section (local.js). */
.opt-in { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--c-chip-line); border-left: 4px solid var(--c-mint); background: var(--c-chip); }
.opt-in h3 { margin-top: 0; }
.opt-in-list { margin: 8px 0; padding-left: 20px; }

/* ---- recordings ------------------------------------------------------------------ */

.recorder { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 4px; }
.recorder-btn { display: inline-flex; align-items: center; gap: 8px; }
.recorder-btn .icon { width: 18px; height: 18px; }
.recorder-status { color: var(--c-peach); font: 12px/1.4 var(--mono); }
.recorder-hint { color: var(--c-muted); font-size: 12px; }

/* ---- the verdict's route and share block ---------------------------------------------- */

.share { margin: 10px 0; }
.share-code { border: 1px solid var(--c-chip-line); background: var(--c-chip); }

/* ---- the sleep report (the verdict's score page) ------------------------------------------ */
.report { margin: 14px 0 16px; padding: 14px 16px; border: 1px solid var(--c-line); background: var(--c-panel); }
.report h3 { margin: 0 0 10px; font: normal 18px/1.2 var(--serif); color: var(--c-ink); }
.rings { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ring { display: grid; justify-items: center; gap: 2px; text-align: center; font-size: 14px; }
.ring strong { color: var(--c-ink); }
.ring span { color: var(--c-muted); font: 12px/1.3 var(--mono); }
.ring-svg { width: 84px; max-width: 100%; height: auto; }
.ring-track { fill: none; stroke: var(--c-chip-line); stroke-width: 9; }
.ring-fill { fill: none; stroke: var(--c-mint); stroke-width: 9; stroke-linecap: butt; }
.ring-answers .ring-fill { stroke: var(--c-peach); }
.ring-time .ring-fill { stroke: #8fb8d8; }
.night-ends { display: flex; justify-content: space-between; margin: 0 0 4px; color: var(--c-muted); font: 12px/1.3 var(--mono); }
.night-track { display: flex; height: 22px; border: 1px solid var(--c-chip-line); background: var(--c-chip); overflow: hidden; }
.night-block { display: block; height: 100%; border-right: 2px solid var(--c-panel); box-sizing: border-box; }
.night-block.night-paper { background: #e6c35c; }
.night-block.night-scene { background: #5b93c9; background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.22) 0 3px, transparent 3px 7px); }
.night-block.night-home { background: #d0614f; background-image: radial-gradient(rgba(0, 0, 0, 0.28) 1.4px, transparent 1.6px); background-size: 7px 7px; }
.night-accused { margin: 10px 0 0; color: var(--c-ink); font: 600 17px/1.3 var(--mono); }
.night-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; color: var(--c-muted); font-size: 13px; }
.night-key::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; background: var(--c-chip-line); }
.night-key.night-paper::before { background: #e6c35c; }
.night-key.night-scene::before { background: #5b93c9; }
.night-key.night-home::before { background: #d0614f; }
.share { margin: 10px 0 14px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; }
.share-code { margin: 0; padding: 8px 10px; max-width: 100%; overflow-x: auto; font: 14px/1.5 var(--mono); }
.share .actions { margin-top: 0; }
@media (max-width: 480px) { .rings { grid-template-columns: minmax(0, 1fr); } }

/* ---- local mode's setup screen (connect your agent, before the story) ------------------------- */
.setup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.setup-cloud { display: grid; justify-items: start; gap: 8px; padding: 12px 14px; border: 1px solid var(--c-chip-line); }
.setup-cloud h3, .setup-cloud p { margin: 0; }
/* The two routes: a card each, a picture of how the agent reaches Grafana and the route's name as one button, and when to choose it below. */
.route-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.route-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.route-pick.btn {
  position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px;
  width: 100%; padding: 12px 12px 10px; text-align: left; border: 1px solid var(--c-line); border-radius: 2px;
  background: var(--c-term) repeating-linear-gradient(0deg, rgba(183, 212, 180, 0.05) 0 1px, transparent 1px 3px);
  color: var(--c-ink); font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; transition: border-color 0.15s, box-shadow 0.15s;
}
.route-pick.btn:hover { border-color: var(--c-mint); }
.route-pick.is-picked.btn { border-color: var(--c-mint); box-shadow: 0 0 0 1px var(--c-mint), 0 0 18px rgba(183, 212, 180, 0.22); }
.route-art { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.route-name { display: flex; justify-content: flex-start; align-items: center; gap: 8px; font-size: 14px; color: var(--c-mint); }
.route-name::before { content: "> "; color: var(--c-peach); }
.route-state { margin-left: auto; padding: 1px 6px; border: 1px solid var(--c-mint); color: #10201d; background: var(--c-mint); font-size: 11px; text-transform: uppercase; }
.route-when { margin: 0; font-size: 14px; color: #c7d5c9; }
.route-rule { margin: 0; font-size: 15px; font-weight: 600; color: var(--c-ink, #e8efe9); }
.route-agents { margin: 8px 0 4px; font-size: 14px; font-weight: 600; color: #e1ece3; }
.route-tag { position: absolute; top: 8px; right: 8px; padding: 2px 8px; font: 11px/1.4 var(--mono, monospace); letter-spacing: 0.08em; text-transform: uppercase;
  color: #0b1213; background: var(--accent, #7fe3b0); border-radius: 3px; }
.route-bullets { margin: 10px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.45; color: #c7d5c9; }
.route-bullets li { margin: 4px 0; }
.dg-box { fill: var(--c-panel); stroke: var(--c-chip-line); stroke-width: 1.2; }
.is-picked .dg-box { stroke: var(--c-mint); }
.dg-text { fill: var(--c-ink); font: 9px var(--mono); letter-spacing: 0.04em; text-anchor: middle; }
.dg-arrow { stroke: var(--c-peach); stroke-width: 1.4; stroke-dasharray: 3 3; }
.dg-head { fill: var(--c-peach); }
@media (prefers-reduced-motion: no-preference) {
  .dg-arrow { animation: dg-flow 1.2s linear infinite; }
}
@keyframes dg-flow { to { stroke-dashoffset: -12; } }
@media (max-width: 640px) { .route-grid { grid-template-columns: minmax(0, 1fr); } }
.setup-divider { width: 100%; height: 0; margin: 10px 0 6px; border: 0; border-top: 1px solid var(--c-mint); opacity: 0.55; }
.setup-own { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--c-chip-line); }
.setup-own h3 { margin: 0 0 6px; font-size: 16px; }
/* The agent dropdown under a route: one native select with its label, the same in both themes (the console is dark in both). */
.agent-pick { display: grid; gap: 6px; max-width: 26em; min-width: 0; }
.agent-pick label.block { margin: 0; }
.agent-pick select { color-scheme: dark; max-width: 100%; min-width: 0; font-family: var(--mono); font-size: 14px; background-color: var(--c-term); border-color: var(--c-mint); }
.agent-pick select option { background: var(--c-panel); color: var(--c-ink); }
.agent-pick select:focus-visible { outline: 3px solid var(--c-peach); outline-offset: 2px; }
.agent-pick .note { margin: 0; }
.setup-more { margin-top: 8px; padding: 6px 10px; border: 1px solid var(--c-chip-line); }
.setup-more summary { cursor: pointer; color: var(--c-mint); font-size: 13px; }
.setup-os { margin: 8px 0 4px; }
/* An OS alternative of one step's command: indented under it behind a rule, its label muted, so it reads as part of that step. */
.setup-alt { margin: 6px 0 0 -10px; padding-left: 8px; border-left: 2px solid var(--c-chip-line); min-width: 0; }
/* Under a numbered step, what is folded away keeps its box but hangs out to the left by its own border and padding, so the code and words inside line up with the step's body text. */
.setup-steps .setup-fold, .setup-steps .setup-more { margin-left: -11px; }
.setup-alt .setup-os { margin: 0 0 4px; opacity: 0.8; }
/* The manual way to do a step the button above it already does: closed until the player opens it. */
.setup-fold { margin: 10px 0 0; padding: 6px 10px; border: 1px dashed var(--c-chip-line); min-width: 0; }
.setup-fold summary { cursor: pointer; color: var(--c-mint); font-size: 13px; line-height: 1.5; }
.setup-fold summary:focus-visible { outline: 3px solid var(--c-peach); outline-offset: 2px; }
.setup-fold[open] summary { margin-bottom: 6px; }
.player a.setup-install { color: var(--c-mint); text-decoration: none; }
.player a.setup-install:hover { color: var(--c-ink); }
.setup-sub { margin: 0 0 8px; padding-left: 1.4em; display: grid; gap: 4px; }
.setup-sub li { overflow-wrap: anywhere; }
.setup-back { justify-self: start; text-decoration: none; }
.player a.setup-back { color: var(--c-mint); }
.setup-steps { margin: 4px 0; padding-left: 1.4em; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.setup-steps p { margin: 0 0 6px; }
.setup-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 6px 8px; width: fit-content; max-width: 100%; }
.setup-code {
  min-width: 0; max-width: 68ch; margin: 0; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--c-chip-line); background: var(--c-term); color: var(--c-ink); font: 13px/1.5 var(--mono);
}
.setup-steps code, .setup-sub code, .setup-os code { font: 0.92em var(--mono); overflow-wrap: anywhere; }
.setup-code-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
/* A long message to paste, collapsed to its first line (the Copy button beside it copies all of it). */
.setup-code-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-more-toggle { grid-column: 1 / -1; justify-self: start; }
.setup-copy { display: inline-flex; align-items: center; gap: 6px; }
.setup-copy .icon { width: 16px; height: 16px; }

/* The line under both route cards, above Continue, until a route is picked. */
#setup-hint { margin: 4px 0 0; text-align: center; font-family: var(--mono); letter-spacing: 0.04em; }


/* ---- the leads are the player's ---------------------------------------------------- */

.lead-owner-wrap { margin-bottom: 12px; }
.lead-owner { padding: 8px 12px; border: 1px solid var(--c-line); background: var(--c-term); }
.lead-owner-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.only-you {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 8px;
  border: 1px solid var(--c-peach); border-radius: 999px; color: var(--c-peach);
  font: 600 11px/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.only-you .icon { width: 14px; height: 14px; }
.share-status { display: block; margin-top: 6px; color: var(--c-muted); font-size: 13px; }
.share-status:empty { display: none; }
.share-fallback {
  margin: 8px 0 0; padding: 10px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-ink); font: 13px/1.5 var(--mono); user-select: all;
}
.share-fallback[hidden] { display: none; }
.split-reminder { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--c-peach); background: var(--c-panel); color: var(--c-ink); font-size: 14px; line-height: 1.45; }

/* ---- the postmortem on the verdict ------------------------------------------------- */

.pm { margin: 14px 0; }
.pm-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); margin: 10px 0 12px; }
@media (min-width: 820px) { .pm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pm-item { min-width: 0; padding: 10px 12px; border: 1px solid var(--c-line-soft); background: var(--c-panel); }
.pm-item h4 { margin: 0 0 6px; color: var(--c-mint); font: 600 11px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.pm-item p { margin: 0; color: var(--c-ink); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.pm-item-3 { border-color: var(--c-mint); }
.pm-route { margin: 0 0 6px; }
.pm-reveal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-line-soft); }
.pm-reveal .note { margin: 0; flex: 1 1 260px; }

/* EXPERIMENT: the title in the window, the green border back, no blur. Overlay (default): the picture as large as fits, the lede and
   Start in a panel over its bottom-left corner. Split (?title=split): the picture with the text in a column beside it. */
.title-art { position: relative; border: 1px solid #75887a; background: var(--c-term); }
.title-overlay { min-height: 0; justify-content: flex-start; }
.title-overlay .title-art { width: min(100%, calc((100vh - 41px - 26px) * 16 / 9)); margin: 0 auto; container-type: inline-size; }
/* The panel is sized from the picture's own width (cqw), not the window's, so at every stage size it stays inside the lower third and
   leaves the tagline on the computer's screen (about 58-64% down the picture) uncovered. */
.title-overlay .title-text {
  position: absolute; z-index: 2; left: 2.5%; bottom: 4%; width: 58%; max-width: 58%; padding: clamp(8px, 1.4cqw, 22px) clamp(12px, 2cqw, 28px);
  background: rgba(10, 22, 24, 0.86); border: 1px solid #75887a;
}
.title-overlay .title-text .lede { margin: 0 0 clamp(3px, 0.6cqw, 8px); font-size: clamp(11px, 1.25cqw, 24px); }
.title-overlay .title-text .split-line { font-size: clamp(12px, 1.5cqw, 28px); }
.title-overlay .title-text .actions { margin-top: clamp(6px, 0.8cqw, 14px); }
.title-overlay .title-text .title-local { margin-top: clamp(8px, 1.2cqw, 28px); font-size: clamp(11px, 0.9cqw, 16px); }
@media (min-width: 900px) {
  .title-split { min-height: 0; justify-content: flex-start; }
  .title-split .title-art { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 34vw, 640px); align-items: center; min-height: calc(100vh - 41px - 26px); }
  .title-split .title-text { padding: 24px 28px; }
  .title-split .title-text .lede { font-size: clamp(16px, 1.4vw, 26px); }
  .title-split .title-text .split-line { font-size: clamp(18px, 1.6vw, 30px); }
}
@media (max-width: 899px) { .title-overlay .title-text { position: static; width: auto; max-width: none; padding: 16px; border-width: 1px 0 0; } .title-overlay .title-text .lede { font-size: 15px; margin-bottom: 8px; } .title-overlay .title-text .split-line { font-size: 15px; } .title-overlay .title-text .actions { margin-top: 18px; } .title-overlay .title-text .title-local { margin-top: 28px; font-size: 12px; } .title-overlay .title-art { width: 100%; } }
/* The story panels' text column: centred vertically, and the incident file (the paper card) bigger. */
@media (min-width: 900px) {
  .panel:has(.panel-art-staged) > .panel-text { display: flex; flex-direction: column; }
  .panel:has(.panel-art-staged) > .panel-text > .card-body { margin-block: auto; }
  .panel:has(.panel-art-staged) .panel-text .card-body .screen { font-size: clamp(20px, calc(1.5vw + 4px), 36px); line-height: 1.45; padding: 18px 24px; }
}

/* EXPERIMENT: every screen is as wide as the story panels (the frame fills the window), and the screens after the panels use that width. */
main { max-width: none; padding: 8px 16px 12px; }
.hub, .player:not(:has(.panel-art-staged)) { border: 0; background: transparent; }
.hub { padding: 0; }
.hub > .lede, .player-intro { max-width: none; margin-inline: 0; }
.player-intro { font-size: clamp(17px, calc(0.8vw + 7px), 26px); line-height: 1.5; }
.card-body .speech .speaker { font: 600 1em/1.3 var(--mono); letter-spacing: 0.04em; }
.card-body .speech { max-width: none; }

/* The case hub in one screen: Ask your AI and Follow a lead (with the clock) as two big columns, then a slim Accuse bar, then the
   Review row with its pictures. */
@media (min-width: 1100px) {
  .hub { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 24px; align-items: baseline; }
  .hub > .chapterbar { grid-column: 1 / -1; padding: 6px 0; }
  .hub > h2 { font-size: clamp(26px, 2.4vw, 40px); margin: 0; }
  .hub > .lede { font-size: clamp(14px, 1vw, 19px); margin: 0; }
  .hub > .hub-grid { grid-column: 1 / -1; }
  .hub-grid {
    margin-top: 6px; gap: 8px; align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "ai inv" "review inv" "accuse inv"; grid-template-rows: 1fr auto auto;
  }
  .hub .area-ai .console-bar, .hub .area-inv .console-bar { font: 600 clamp(18px, 1.5vw, 28px)/1.2 var(--serif); letter-spacing: 0.02em; text-transform: none; color: var(--c-ink); padding: 8px 16px; }
  .hub .area-ai .console-bar .dot, .hub .area-inv .console-bar .dot { width: 12px; height: 12px; }
  .hub .area-ai .console-body, .hub .area-inv .console-body { font-size: clamp(14px, 1vw, 19px); }
  .hub .console-body { padding: 10px 16px 12px; }
  .hub .console-body > p.note { margin: 0 0 4px; }
  .hub .lead-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 6px 0 2px; gap: 8px; }
  .hub .lead-tile { flex-direction: column; align-items: flex-start; padding: 8px 10px; gap: 4px; position: relative; }
  .hub .lead-icon { width: 30px; height: 30px; }
  .hub .lead-price { position: absolute; top: 6px; right: 8px; }
  .hub .lead-after { position: absolute; right: 8px; bottom: 6px; margin: 0; }
  .hub .lead-words strong { font-size: clamp(14px, 1.05vw, 18px); }
  .hub .lead-words { font-size: 12px; }
  .hub .night-clock { padding: 6px 18px; gap: 18px; }
  main:has(.hub) { padding-bottom: 4px; padding-top: 4px; }
  .hub .area-review .console-bar { padding: 2px 16px; }
  .hub .night-clock-face { width: clamp(70px, 6vw, 100px); }
  .hub .area-inv { align-content: stretch; }
  .hub .area-inv .console { display: flex; flex-direction: column; }
  .hub .questions li { padding: 4px 10px; }
  .hub .questions { gap: 6px; margin: 6px 0 8px; }
  .hub .console-body h3 { font-size: 17px; margin-bottom: 4px; }
  .hub .area-ai .console-body > p, .hub .area-accuse .console-body > p { margin-bottom: 6px; }
  /* Accuse: a slim bar */
  .hub .area-accuse .console-bar { display: none; }
  .hub .area-accuse .console-body { display: flex; align-items: center; gap: 18px; padding: 8px 16px; }
  .hub .area-accuse .console-body > h3 { margin: 0; white-space: nowrap; }
  .hub .area-accuse .suspect-strip { margin: 0; }
  .hub .area-accuse .suspect-mini .thumb { width: 36px; }
  .hub .area-accuse .suspect-mini span:last-child { font-size: 11px; }
  .hub .area-accuse .console-body > p { flex: 1; margin: 0; font-size: 14px; }
  .hub .area-accuse .actions { margin: 0; }
  /* Review: one row of pictures, scrolling sideways when there are more than fit */
  .hub .area-review .console-bar { padding: 4px 16px; }
  .hub .area-review .console-body { padding: 6px 16px 8px; }
  .hub .area-review .console-body > h3 { display: none; }
  .hub .review-tiles { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 0; padding-bottom: 4px; }
  .hub .review-tiles li { flex: 0 0 clamp(96px, 8.4vw, 170px); }
  .hub .review-tile { gap: 2px; }
  .hub .review-tile small { display: none; }
  .hub .review-tile { padding-bottom: 6px; font-size: 12px; }
  .hub .review-tile .thumb { display: block; }
}

/* The question page: two columns of questions. */
@media (min-width: 1000px) {
  .accuse-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; align-items: start; }
  .accuse-form textarea { min-height: 0; height: 7em; }
  .accuse-form { grid-auto-flow: column; grid-template-rows: repeat(4, auto); }   /* question 1 down the left, then the right */
  .accuse-form > .framebar, .accuse-form > .error { grid-column: 1 / -1; grid-row: 5; }
}

/* "Your role": the whole width, bigger type, the cards filling the space. */
.panel-role { border: 0; background: transparent; }
@media (min-width: 900px) {
  .player:has(.panel-role) { min-height: calc(100vh - 66px); }
  .panel-role { flex: 1; display: flex; flex-direction: column; }
  .panel-role .panel-head h2 { font-size: clamp(34px, 3.6vw, 64px); }
  .panel-role .panel-text { flex: 1; display: flex; flex-direction: column; font-size: clamp(18px, calc(1.1vw + 6px), 32px); border-top: 0; }
  .panel-role .panel-text > .card-body { max-width: none; flex: 1; display: flex; flex-direction: column; }
  .panel-role .role-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; flex: 1; align-items: stretch; }
  .panel-role .role-tiles li { padding: 30px 32px; font-size: 1em; display: block; }
  .panel-role .role-tiles .icon { width: clamp(30px, 2.4vw, 48px); height: clamp(30px, 2.4vw, 48px); margin-bottom: 14px; }
}

/* EXPERIMENT: the role cards' headings, very large bold italic serif in peach, with short texts. */
.panel-role .role-tiles .role-word { display: block; margin-bottom: 0.5em; color: var(--c-peach); font: italic 700 clamp(28px, 2.7vw, 48px)/1 var(--serif); letter-spacing: -0.02em; }
.panel-role .role-tiles .role-text { display: block; }
@media (min-width: 900px) { .panel-role .panel-text { font-size: clamp(20px, calc(1.2vw + 7px), 34px); } }

/* Tablet width: three narrow columns would leave small text, so the cards become full-width rows (the word, then its text) in big type. */
@media (min-width: 600px) and (max-width: 899px) {
  .panel-role .panel-text { font-size: 21px; }
  .panel-role .role-tiles { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 18px !important; }
  .panel-role .role-tiles li { display: grid; grid-template-columns: minmax(150px, 28%) minmax(0, 1fr); gap: 4px 24px; align-items: center; padding: 26px 30px; font-size: 1em; line-height: 1.45; }
  .panel-role .role-tiles .role-word { margin: 0; font-size: 44px; }
}

/* The hub's Accuse: in the step bar at the bottom right, where Continue and Next are. */
.hub > .framebar { grid-column: 1 / -1; }
@media (min-width: 1100px) {
  /* bigger type on the cards */
  .hub .lead-words strong { font-size: clamp(17px, 1.4vw, 28px); }
  .hub .lead-words { font-size: clamp(14px, 1.05vw, 20px); }
  .hub .lead-words small, .hub .lead-price { font-size: clamp(11px, 0.85vw, 16px); }
  .hub .lead-icon { width: clamp(26px, 2vw, 40px); height: clamp(26px, 2vw, 40px); }
  .hub .questions .q { font-size: clamp(15px, 1.15vw, 22px); line-height: 1.4; }
  .hub .questions .q-hint { font-size: clamp(11px, 0.85vw, 16px); }
  .hub .review-tiles { flex-wrap: wrap; overflow: visible; }
  .hub .review-tiles li { flex: 0 0 calc(16.66% - 7px); }
  .hub .review-tile .thumb { display: block; width: 100%; height: 3.2vw; max-height: 70px; overflow: hidden; }
  .hub .review-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .hub .review-tile { font-size: clamp(11px, 0.85vw, 15px); }
}

/* The hover time on a lead card: a clock and the time it would then be, under the price, only on hover or focus; never over the words. */
@media (min-width: 1100px) {
  .hub .lead-after { position: absolute; right: 8px; top: calc(clamp(11px, 0.85vw, 16px) * 1.5 + 14px); bottom: auto; display: inline-flex; align-items: center; gap: 5px; margin: 0; color: var(--c-peach); font: 600 clamp(14px, 1vw, 18px)/1.2 var(--mono); }
  .hub .lead-after .icon { width: 1.1em; height: 1.1em; fill: currentColor; }
}
/* Nothing tiny on the hub */
.hub .lead-words small, .hub .lead-price, .hub .q-hint, .hub .console-bar, .hub .night-clock-words small, .hub .night-clock-dawn,
.hub .review-tile small, .hub .meter, .hub .lead-note { font-size: max(13px, 1em); }
.hub .lead-words small, .hub .lead-price, .hub .q-hint, .hub .night-clock-words small { font-size: max(13px, 0.85vw); }
.hub .note, .hub .console-body > p.note, .hub .night-clock-words, .hub .night-clock-words p, .hub .lead-words, .hub .lead-words span { font-size: max(13px, 0.95vw); }
.hub .review-tile { font-size: max(13px, 0.9vw); }
.hub .console-bar { font-size: max(15px, 1.1vw); }
.hub .key-hint { font-size: max(12px, 0.8vw); }

@media (min-width: 1100px) and (max-width: 1699px) {
  .hub .lead-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub .lead-tile { flex-direction: row; align-items: center; }
  .hub .lead-words { padding-right: 78px; }
  .hub .lead-words strong { font-size: 16px; }
  .hub .night-clock { padding: 4px 16px; }
  .hub .night-clock-words .night-clock-note, .hub .night-clock-words p { margin: 0; }
  .hub .review-tiles li { flex: 0 0 calc(16.66% - 7px); }
  .hub .review-tile .thumb { height: 34px; }
  .hub .review-tile { padding-bottom: 3px; line-height: 1.25; }
}

@media (min-width: 1100px) {
  .hub { min-height: calc(100vh - 54px); grid-template-rows: auto auto 1fr auto; }
  .hub > .framebar { align-self: end; }
}
.hub .console-body p, .hub .console-body h3 { font-size: max(15px, 1.05vw); }
.hub .console-body > h3 { font-size: max(18px, 1.3vw); }

/* Hub: even columns, a wide last card, one marker per followed lead. */
@media (min-width: 1100px) {
  .hub-grid { align-content: stretch; }
  .hub .area-ai, .hub .area-review { align-self: stretch; }
  .hub .area-ai { display: flex; flex-direction: column; }
  .hub .area-ai .console-body { flex: 1; }
  .hub .area-inv .console { flex: 1; }
  .hub .lead-tiles > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1700px) {
  .hub .lead-tiles > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.lead-order { position: absolute; top: 8px; right: 8px; min-width: 1.6em; padding: 1px 6px; border: 1px solid var(--c-mint); border-radius: 999px; color: var(--c-mint); font: 600 13px/1.4 var(--mono); text-align: center; }
.hub .lead-tile { position: relative; }
@media (min-width: 1100px) {
  .hub > .hub-grid { align-self: stretch; }
  .hub .area-inv { grid-template-rows: auto 1fr; }
  .hub .area-inv .console-body { display: flex; flex-direction: column; }
  .hub .area-inv .lead-tiles { flex: 1; align-content: stretch; grid-auto-rows: 1fr; }
}

/* The verdict's reveal picture: as large as the screen allows at the full width (the story-panel grid would cap it at its 420px minimum). */
@media (min-width: 900px) {
  .verdict .panel:has(.panel-art-staged) { display: block; min-height: 0; flex: none; }
  .verdict .panel:has(.panel-art-staged) .panel-stage { flex: none; aspect-ratio: 16 / 9; max-height: calc(100vh - 230px); }
}

/* EXPERIMENT: the accusation as a line-up, a why box, five index cards, the points ring and the time left. */
.accuse-view { display: flex; flex-direction: column; gap: 10px; }
.accuse-view > h2 { margin: 0; font-size: clamp(26px, 2.4vw, 40px); }
.accuse-dash { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px 20px; align-items: center; }
.accuse-dash .accuse-line { margin: 0; font-size: max(15px, 1.05vw); color: var(--c-ink); }
.chip { padding: 3px 12px; border: 1px solid var(--c-chip-line); border-radius: 999px; background: var(--c-chip); color: var(--c-muted); font: 13px/1.4 var(--mono); white-space: nowrap; }
.ring-box { display: flex; align-items: center; gap: 10px; }
.points-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.points-ring circle { fill: none; stroke-width: 9; }
.ring-track { stroke: var(--c-line); }
.ring-fill { stroke: var(--c-peach); stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
.ring-words { display: grid; font: 600 13px/1.2 var(--mono); color: var(--c-muted); }
.ring-words strong { font-size: 26px; color: var(--c-ink); }
.ring-words small { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.dawn-box { display: grid; gap: 2px; padding: 4px 14px; border: 1px solid var(--c-peach); background: var(--c-term); }
.dawn-box small { color: var(--c-muted); font: 12px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.dawn-box strong { color: var(--c-peach); font: 700 24px/1.1 var(--mono); }
.accuse-view .q-label { font: normal clamp(17px, 1.3vw, 24px)/1.25 var(--serif); }
.lineup { display: flex; justify-content: center; gap: clamp(12px, 2vw, 32px); margin-top: 8px; }
.lineup .pick-card { flex: 1 1 0; max-width: 360px; position: relative; padding: 0 0 8px; border: 2px solid var(--c-line); background: var(--c-panel); color: var(--c-ink); cursor: pointer; transition: opacity 0.25s, filter 0.25s, box-shadow 0.25s; }
.lineup .pick-card .thumb { aspect-ratio: 4 / 3; width: 100%; }
.lineup .pick-card .thumb img { object-position: 50% 25%; transform: none; }
.lineup .pick-name { display: block; padding-top: 6px; font: normal clamp(18px, 1.6vw, 28px)/1.2 var(--serif); }
.lineup-dim { opacity: 0.45; filter: grayscale(0.6); }
.lineup-on { border-color: #ffe9a8; box-shadow: 0 0 0 3px rgba(255, 233, 168, 0.35), 0 0 36px 8px rgba(255, 190, 110, 0.55), 0 -30px 60px -10px rgba(255, 233, 168, 0.35); }
.stamp { position: absolute; left: 50%; top: 45%; z-index: 3; padding: 4px 18px; border: 5px solid var(--c-alert); color: var(--c-alert); background: rgba(10, 17, 18, 0.55); font: 800 clamp(26px, 3vw, 54px)/1.1 var(--mono); letter-spacing: 0.1em; transform: translate(-50%, -50%) rotate(-12deg); }
@media (prefers-reduced-motion: no-preference) { .stamp { animation: stamp-in 0.45s cubic-bezier(0.2, 1.5, 0.4, 1) both; } }
@keyframes stamp-in { from { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(3); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
.accuse-view .q-why textarea { width: 100%; height: 5.5em; min-height: 0; }
.accuse-view .question { position: relative; }
.bonus-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.bonus-cards .q-card { flex: 0 0 calc(33.333% - 8px); box-sizing: border-box; padding: 10px 14px 12px; border: 1px solid var(--c-line); background: #e8dfc8; color: #263931; }
.bonus-cards .q-card .q-label { color: #263931; margin: 0 0 6px; }
.bonus-cards .q-card .pts { float: right; padding: 0 8px; border: 1px solid #8a4b00; color: #8a4b00; background: #f4e6b5; font: 700 13px/1.5 var(--mono); }
.bonus-cards .q-card input { width: 100%; box-sizing: border-box; background: #fffaf0; color: #263931; border: 1px solid #b9ab8a; }
.q-tick { position: absolute; top: 8px; right: 62px; width: 22px; height: 22px; border-radius: 50%; background: #3f7a55; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.q-tick[hidden] { display: none; }
.q-tick .icon { width: 14px; height: 14px; }
.q-why .q-tick { right: 12px; top: 2px; }
.btn-finale { padding: 14px 34px; font-size: clamp(16px, 1.4vw, 24px); }
.btn-finale[disabled] { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 899px) { .accuse-dash { grid-template-columns: 1fr; } .lineup { gap: 8px; } .bonus-cards .q-card { flex-basis: 100%; } }
@media (min-width: 900px) {
  .accuse-view { gap: 6px; }
  .accuse-view > h2 { font-size: clamp(22px, 1.8vw, 32px); }
  .accuse-view > .chapterbar { padding: 4px 0; }
  .lineup .pick-card .thumb { aspect-ratio: auto; height: clamp(140px, 24vh, 340px); }
  .lineup .pick-name { padding-top: 2px; font-size: clamp(16px, 1.3vw, 24px); }
  .points-ring { width: 52px; height: 52px; }
  .ring-words strong { font-size: 22px; }
  .dawn-box strong { font-size: 20px; }
  .accuse-view .q-why textarea { height: 3.4em; }
  .bonus-cards { gap: 8px; }
  .bonus-cards .q-card { padding: 6px 12px 8px; }
  .bonus-cards .q-card .q-label { margin-bottom: 4px; font-size: clamp(15px, 1.05vw, 20px); }
  .accuse-view .player, .accuse-view > .framebar { padding-top: 6px; padding-bottom: 8px; }
}
@media (min-width: 900px) { main:has(.accuse-view) { padding-top: 0; padding-bottom: 0; } .accuse-view { gap: 5px; } .accuse-view .lineup { margin-top: 2px; } }
@media (min-width: 900px) { main { padding-bottom: 0; } }

/* EXPERIMENT round 025: mug shots, one dark theme for all seven questions, one button size, a ring that reads, no empty band. */
.mug { display: block; overflow: hidden; }
.mug img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.lineup .pick-card .mug { height: clamp(150px, 30vh, 420px); }
.lineup .pick-card { max-width: clamp(240px, 24vw, 440px); }
.bonus-cards .q-card { background: var(--c-term); color: var(--c-ink); border: 1px solid var(--c-line); border-left: 4px solid var(--c-peach); }
.bonus-cards .q-card .q-label { color: var(--c-ink); }
.bonus-cards .q-card .pts { border-color: var(--c-peach); color: var(--c-peach); background: transparent; }
.bonus-cards .q-card input { background: var(--c-bg); color: var(--c-ink); border: 1px solid var(--c-line); }
.accuse-view .q-why textarea, .accuse-view input { background: var(--c-bg); color: var(--c-ink); border: 1px solid var(--c-line); }
.points-ring { width: 64px; height: 64px; }
.points-ring circle { stroke-width: 12; }
.ring-track { stroke: #2a3b3a; }
.ring-fill { stroke: #f4c78a; }
/* Every button the same, slightly larger size; the red ones keep their colour. */
.btn, .btn-console, .btn-quiet-console, .btn-primary, .btn-alert, .btn-finale { min-height: 44px; padding: 10px 20px; font-size: 16px; }
.btn-finale { font-size: 16px; padding: 10px 20px; }
.btn-quiet { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.hub .questions .btn-console { min-height: 40px; padding: 8px 14px; font-size: 14px; }

/* EXPERIMENT: a recording's Play button sits at the top of the text column, above the transcript. */
@media (min-width: 900px) {
  .panel:has(.panel-art-staged):has(> .recorder) { grid-template-rows: auto minmax(0, 1fr) auto; }
  .panel:has(.panel-art-staged):has(> .recorder) > .panel-art { grid-row: 1 / -1; }
  .panel:has(.panel-art-staged) > .recorder { grid-column: 2; grid-row: 1; padding: 12px 16px 0; border-left: 1px solid var(--c-line); background: var(--c-bg); }
  .panel:has(.panel-art-staged):has(> .recorder) > figcaption { grid-row: 2; }
  .panel:has(.panel-art-staged):has(> .recorder) > .panel-text { max-height: none; }
}

.bonus-cards .q-card .opt { margin-left: 6px; color: var(--c-muted); font: 14px/1.4 var(--mono); }
.panel-stage { background: var(--c-term); }

/* EXPERIMENT round 029: whole mug shots and three accusation layouts (?acc=a, b or c). */
.lineup .pick-card .mug { height: auto; aspect-ratio: 1; }
.lineup .pick-card .mug img { object-fit: contain; object-position: 50% 50%; }
.lineup { align-items: flex-start; }
.accuse-dash { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.dash-text { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.dash-meter { display: flex; align-items: center; gap: 20px; }
.stepper { display: none; }
@media (min-width: 600px) {   /* the three steps from tablet width up; a phone keeps the one stacked page */
  /* A: suspects on the left, one aligned list of questions on the right */
  /* B: line-up on top, a left-aligned grid; the sixth cell holds the points ring and the clock */
  /* C: a stepper, one step at a time */
  .acc-c { display: flex; flex-direction: column; }
  .acc-c .stepper { display: flex; gap: 8px; }
  .step-tab { flex: 1; padding: 10px 16px; border: 1px solid var(--c-line); background: var(--c-term); color: var(--c-muted); font: 600 16px/1.2 var(--mono); text-align: left; cursor: pointer; }
  .step-tab[aria-current="step"] { border-color: var(--c-peach); color: var(--c-ink); box-shadow: inset 0 -3px 0 var(--c-peach); }
  .acc-c > .q-killer, .acc-c > .q-why, .acc-c > .bonus-cards { display: none; }
  .acc-c[data-step="1"] > .q-killer { display: block; }
  .acc-c[data-step="2"] > .q-why { display: block; }
  .acc-c[data-step="3"] > .bonus-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .acc-c .bonus-cards .q-card { flex: none; }
  .acc-c .lineup { gap: clamp(16px, 3vw, 48px); }
  .acc-c .lineup .pick-card { max-width: clamp(220px, 30vh, 420px); }
  .acc-c .q-why textarea { height: 40vh; font-size: 20px; }
}

.reveal-ask { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border: 1px solid var(--c-alert); background: var(--c-term); }
.reveal-ask p { margin: 0; font-size: clamp(16px, 1.3vw, 22px); }

@media (min-width: 900px) {
  /* B: the ring and the clock take the sixth cell; the line-up is larger */
  /* A: the ring and the clock under the line-up; the cards no taller than their content */
}
@media (min-width: 900px) {
}
/* EXPERIMENT: "Your role" uses the same frame and bottom bar as the story panels, so Previous / Next never move between screens. */
@media (min-width: 900px) {
  main:has(.panel-role) { padding: 0; }
  .player:has(.panel-role) { min-height: calc(100vh - 41px); min-height: calc(100svh - 47px); padding: 0; }
  .player:has(.panel-role) > :not(.panel) { margin-left: 16px; margin-right: 16px; }
  .panel-role { margin: 0 16px; margin-bottom: 0 !important; flex: 1; border: 1px solid #75887a; background: var(--c-term); }
}
@media (min-width: 900px) {
  .hub { min-height: calc(100vh - 41px); min-height: calc(100svh - 41px); }
  main:has(.hub) { padding-left: 16px; padding-right: 16px; }
  .accuse-view { padding: 0; min-height: calc(100vh - 41px); min-height: calc(100svh - 41px); }
  .accuse-view > :not(.framebar) { margin-left: 16px; margin-right: 16px; }
  .accuse-view > .framebar { margin-left: 16px; margin-right: 16px; margin-top: auto; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) { display: flex; flex-direction: column; min-height: calc(100vh - 41px); min-height: calc(100svh - 41px); }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) > .console { flex: 1; display: flex; flex-direction: column; margin: 0 16px; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) > .console > .console-body { flex: 1; display: flex; flex-direction: column; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) .framebar { margin-top: auto; }
}
@media (min-width: 900px) {
  .accuse-view > .framebar { margin-left: 0; margin-right: 0; }
  .hub, .accuse-view, .player:has(.console):not(.accuse-view):not(:has(.panel)) { min-height: calc(100vh - 47px); min-height: calc(100svh - 47px); }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) { padding-left: 0; padding-right: 0; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) > .console .framebar { margin-left: 0; margin-right: 0; }
}
@media (min-width: 900px) {
  .accuse-view { min-height: calc(100vh - 59px); min-height: calc(100svh - 59px); }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) { min-height: calc(100vh - 41px); min-height: calc(100svh - 41px); padding-bottom: 0; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) > .console { margin-bottom: 0; border-bottom: 0; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) > .console > .console-body { padding-bottom: 0; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) .framebar { padding-bottom: 20px; }
}
@media (min-width: 900px) {
  main:has(.player > .console) { padding-top: 0; padding-bottom: 0; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) .framebar { margin-left: -33px; margin-right: -33px; }
}
@media (min-width: 900px) {
  .player:has(.console):not(.accuse-view):not(:has(.panel)) > .console .framebar { margin-left: -33px; margin-right: -33px; }
  .player:has(.console):not(.accuse-view):not(:has(.panel)) { min-height: calc(100vh - 47px); min-height: calc(100svh - 47px); }
}

/* the interrupted flyer's Continue sits exactly where the first flyer's does */
.glitch > .player { padding: 0; min-height: calc(100vh - 41px); min-height: calc(100svh - 41px); }
.glitch > .player > .chapterbar, .glitch > .player > .framebar { margin-left: 16px; margin-right: 16px; }

/* EXPERIMENT: the three-step accusation (the chosen layout). */
.step-tab { display: flex; justify-content: space-between; align-items: center; }
.step-tick { width: 22px; height: 22px; border-radius: 50%; background: #3f7a55; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.step-tick[hidden] { display: none; }
.step-tick .icon { width: 14px; height: 14px; }
.btn[hidden], .btn-finale[hidden] { display: none; }
@media (min-width: 600px) {
  .acc-c { min-height: calc(100vh - 59px); }
  .acc-c .lineup { justify-content: center; gap: clamp(20px, 3vw, 56px); margin-top: 18px; }
  .acc-c .lineup .pick-card { width: min(28vw, 52vh); max-width: none; flex: 0 0 auto; }
  .acc-c .lineup .pick-name { font-size: clamp(20px, 2vw, 34px); padding: 8px 0; }
  .acc-c .q-label { font-size: clamp(20px, 1.8vw, 30px); }
  .acc-c[data-step="2"] > .q-why textarea { height: 46vh; font-size: clamp(18px, 1.5vw, 26px); padding: 16px 20px; }
  .acc-c[data-step="3"] > .bonus-cards { gap: 16px; align-content: start; }
  .acc-c .bonus-cards .q-card { padding: 14px 18px 18px; }
  .acc-c .bonus-cards .q-card .q-label { font-size: clamp(18px, 1.4vw, 24px); }
  .acc-c .bonus-cards .q-card input { height: 52px; font-size: 18px; }
}
.glitch > .player > .chapterbar, .glitch > .player > .framebar { margin-left: 0; margin-right: 0; }
.glitch > .player { min-height: calc(100vh - 41px); min-height: calc(100svh - 41px); }
.glitch > .player > .framebar { margin-bottom: 6px; }

/* The verdict: headline, the picture scaled to the height that is left, and Continue in the usual place; no scrolling. */
@media (min-width: 900px) {
  .player.verdict:not(.results-page) { display: flex; flex-direction: column; min-height: calc(100vh - 41px); min-height: calc(100svh - 41px); height: calc(100svh - 47px); padding: 0; }
  .player.verdict:not(.results-page) > :not(.panel):not(.framebar) { margin-left: 16px; margin-right: 16px; }
  .player.verdict:not(.results-page) > .panel { flex: 1; min-height: 0; display: flex; margin: 0 16px; }
  .player.verdict:not(.results-page) .panel-art { flex: 1; min-height: 0; display: flex; max-width: none; }
  .player.verdict:not(.results-page) .panel-stage { flex: 1; min-height: 0; aspect-ratio: auto; max-height: none; }
  .player.verdict:not(.results-page) > .framebar { margin-top: 0; padding-bottom: 20px; }
  .player.verdict:not(.results-page) h2.accused { margin: 4px 16px; }
}
@media (min-width: 900px) { .player.verdict:not(.results-page) { min-height: 0; height: calc(100vh - 47px); height: calc(100svh - 47px); } }
