:root {
  --red: oklch(0.57 0.23 27);
  --red-deep: oklch(0.42 0.17 25);
  --red-dark: oklch(0.32 0.12 25);
  --yellow: oklch(0.91 0.17 100);
  --yellow-deep: oklch(0.8 0.16 85);
  --paper: oklch(0.955 0.014 90);
  --paper-shade: oklch(0.9 0.02 85);
  --ink: oklch(0.2 0.012 60);
  --ink-soft: oklch(0.4 0.015 60);
  --ink-faint: oklch(0.6 0.015 70);
  --green: oklch(0.55 0.15 150);
  --display: "Anton", Impact, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --ui: "Archivo", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.75, 0);
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--red-dark);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button { font: inherit; color: inherit; cursor: pointer; }

/* ── Stage: fixed 1600×900, scaled to fit ──────────── */

#viewport {
  position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(circle, oklch(0.25 0.1 25) 28%, transparent 30%) 0 0 / 18px 18px,
    var(--red-dark);
}

#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1600px; height: 900px;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  overflow: hidden;
  background: var(--red);
  box-shadow: 0 0 80px oklch(0.15 0.05 25 / 0.6);
}

/* A very slowly turning sunburst with halftone dots over it. It speeds up when the deadline is close. */
#stage::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 2400px; height: 2400px; margin: -1200px 0 0 -1200px;
  background: repeating-conic-gradient(from 0deg, oklch(0.58 0.22 28) 0 7.5deg, oklch(0.535 0.21 26) 7.5deg 15deg);
  animation: spin 400s linear infinite;
}
#stage::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle, oklch(0.3 0.12 25 / 0.35) 30%, transparent 33%) 0 0 / 12px 12px;
  mask-image: radial-gradient(ellipse at 50% 45%, transparent 35%, black 95%);
  pointer-events: none;
}
#stage.panic::before { animation-duration: 40s; }
#stage.panic #shake { animation: panic 0.5s infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes panic { 50% { filter: saturate(1.4) brightness(1.06); } }

#shake, #app { position: absolute; inset: 0; }
#shake { z-index: 1; }
#shake.shake-1 { animation: shake1 0.25s; }
#shake.shake-2 { animation: shake2 0.4s; }
#shake.shake-3 { animation: shake3 0.6s; }

@keyframes shake1 { 30% { transform: translate(-3px, 2px); } 60% { transform: translate(3px, -1px); } }
@keyframes shake2 {
  15% { transform: translate(-8px, 4px) rotate(-0.4deg); } 35% { transform: translate(7px, -5px) rotate(0.3deg); }
  55% { transform: translate(-5px, 3px); } 75% { transform: translate(3px, -2px); }
}
@keyframes shake3 {
  10% { transform: translate(-16px, 8px) rotate(-1deg); } 25% { transform: translate(14px, -10px) rotate(0.8deg); }
  40% { transform: translate(-11px, 6px) rotate(-0.5deg); } 55% { transform: translate(9px, -6px); }
  70% { transform: translate(-5px, 3px); } 85% { transform: translate(3px, -2px); }
}

/* ── Shared bits ───────────────────────────────────── */

.label {
  font-family: var(--ui); font-weight: 800; font-size: 13px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.hot { color: var(--red); font-weight: 700; }

.btn {
  font-family: var(--display); font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--ink); color: var(--yellow);
  border: none; padding: 12px 26px 10px;
  box-shadow: 5px 5px 0 var(--red-deep);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 8px 8px 0 var(--red-deep); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--red-deep); }
.btn:disabled { opacity: 0.3; pointer-events: none; }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.small { font-size: 20px; padding: 8px 16px 6px; box-shadow: 4px 4px 0 var(--red-deep); }
.btn.tiny {
  font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.08em;
  padding: 5px 9px; box-shadow: 2px 2px 0 var(--red-deep);
}

.mock-badge {
  font-family: var(--ui); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--ink); color: var(--yellow); padding: 4px 8px; align-self: start;
}

.pop {
  position: absolute; z-index: 50; pointer-events: none;
  font-family: var(--display); font-size: 44px; color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  transform: translate(-50%, 0);
  animation: pop 1.1s var(--ease) forwards;
}
.pop.big { font-size: 72px; color: var(--paper); -webkit-text-stroke: 3px var(--red-deep); }
@keyframes pop {
  0% { transform: translate(-50%, 10px) scale(0.4); opacity: 0; }
  20% { transform: translate(-50%, -20px) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -110px) scale(1); opacity: 0; }
}

/* ── Desk layout (round + reveal) ──────────────────── */

.desk, .newsroom {
  position: absolute; inset: 0;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 270px 900px 310px;
  column-gap: 28px;
  row-gap: 22px;
}
.desk { grid-template-rows: 1fr 232px; }
.newsroom { grid-template-rows: 1fr; }
.desk .cards { grid-row: 1 / 3; }
.desk .tray { grid-column: 2 / 4; }

/* ── Staff (cards as press passes) ─────────────────── */

.cards { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.cards > .label { color: var(--paper); }
.badge {
  position: relative;
  flex: 1; min-height: 0;
  background: var(--paper);
  padding: 0 14px 10px;
  transform: rotate(var(--r, 0deg));
  box-shadow: 4px 6px 0 oklch(0.25 0.1 25 / 0.45);
  display: flex; flex-direction: column;
}
.badge-top {
  font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  background: var(--red); color: var(--paper);
  margin: 0 -14px 6px; padding: 4px 14px;
}
.badge h3 { font-family: var(--display); font-weight: 400; font-size: 23px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; }
.badge p { font-size: 15px; line-height: 1.25; margin-top: 3px; color: var(--ink-soft); }
.badge .status {
  align-self: start; margin-top: auto;
  font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--yellow); color: var(--ink); padding: 2px 6px;
}
.badge .btn.tiny { position: absolute; right: 8px; top: 2px; padding: 2px 7px; font-size: 11px; box-shadow: none; background: var(--ink); color: var(--paper); }
.badge .btn.tiny:hover { transform: none; background: var(--yellow); color: var(--ink); }
.badge .btn.tiny.promote { top: auto; bottom: 8px; background: var(--yellow); color: var(--ink); }
.badge .btn.tiny.promote:hover { background: var(--ink); color: var(--yellow); }
.badge.promoted .badge-top { background: var(--ink); color: var(--yellow); }
.badge.empty {
  background: transparent; box-shadow: none;
  border: 2px dashed oklch(0.95 0.02 85 / 0.35);
  color: oklch(0.95 0.02 85 / 0.5);
  font-family: var(--ui); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  align-items: center; justify-content: center;
}
.badge.fired { animation: fired 0.5s var(--ease); z-index: 5; }
@keyframes fired {
  0% { transform: rotate(var(--r)); }
  35% { transform: translate(14px, -10px) rotate(-4deg) scale(1.08); }
  100% { transform: rotate(var(--r)); }
}
.bubble {
  position: absolute; right: -36px; top: -10px; z-index: 6;
  font-family: var(--display); font-size: 22px; text-transform: uppercase; white-space: nowrap;
  background: var(--yellow); color: var(--ink);
  padding: 4px 10px 2px;
  border: 3px solid var(--ink);
  transform: rotate(6deg);
  animation: bubble 0.9s var(--ease) forwards;
}
@keyframes bubble {
  0% { transform: scale(0) rotate(-20deg); }
  20% { transform: scale(1.15) rotate(8deg); }
  30%, 80% { transform: scale(1) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(6deg) translateY(-12px); opacity: 0; }
}

/* ── The page ──────────────────────────────────────── */

.page {
  background:
    linear-gradient(90deg, oklch(0.5 0.02 70 / 0.06) 1px, transparent 1px) 0 0 / 300px 100%,
    var(--paper);
  transform: rotate(-0.6deg);
  box-shadow: 10px 12px 0 oklch(0.25 0.1 25 / 0.45);
  display: flex; flex-direction: column;
  min-height: 0;
  padding: 0 26px 18px;
}

.masthead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  border-bottom: 4px double var(--ink);
  padding: 14px 0 8px;
}
.masthead .flag {
  font-family: var(--display); font-size: 54px; line-height: 0.9; text-transform: uppercase; letter-spacing: 0.01em;
  background: var(--red); color: var(--paper);
  padding: 8px 14px 4px;
  margin-left: -26px;
}
.masthead .flag span { color: var(--yellow); }
.masthead .dateline {
  font-family: var(--ui); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); padding-bottom: 4px;
}

.themes { display: flex; align-items: center; gap: 12px; padding: 12px 0 10px; border-bottom: 1.5px solid var(--ink); flex-wrap: wrap; }
.themes .label { color: var(--ink-soft); margin-right: 4px; }
.theme {
  --h: 30;
  display: inline-block;
  font-family: var(--display); font-size: 26px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em;
  background: oklch(0.55 0.17 var(--h)); color: var(--paper);
  padding: 7px 14px 4px;
  transform: rotate(var(--r, -2deg));
  box-shadow: 3px 3px 0 var(--ink);
  animation: slap 0.45s var(--ease) both;
}
.theme:nth-of-type(2) { animation-delay: 0.12s; }
.theme:nth-of-type(3) { animation-delay: 0.24s; }
.theme small { font-family: var(--ui); font-size: 13px; font-weight: 800; vertical-align: top; }
.theme.card-theme {
  background: transparent; color: oklch(0.45 0.16 var(--h));
  box-shadow: none; outline: 2.5px dashed currentColor; outline-offset: -2px;
  font-size: 20px;
}
@keyframes slap {
  0% { transform: scale(2.4) rotate(calc(var(--r) - 12deg)); opacity: 0; }
  60% { transform: scale(0.94) rotate(var(--r)); opacity: 1; }
  100% { transform: scale(1) rotate(var(--r)); }
}

.copy {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0.26em 0.42em;
  padding-top: 14px;
  font-family: var(--display); font-size: 64px; line-height: 1.05;
}
.copy .hint {
  font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.35; color: var(--ink-faint);
  max-width: 30ch; margin-top: 30px;
}
.copy .w {
  position: relative;
  text-transform: uppercase;
  padding: 0 0.08em;
  transform: rotate(calc(var(--r) * 0.4));
  transition: color 0.3s, opacity 0.3s;
}
.copy .w.slam { animation: wordSlam 0.4s var(--ease) both; }
.copy .w.active { background: var(--yellow); color: var(--ink); box-shadow: 0 0 0 0.08em var(--yellow); transform: rotate(var(--r)) scale(1.08); z-index: 2; }
.copy .w.miss { color: var(--ink-faint); }
.copy .w sup {
  font-family: var(--ui); font-weight: 800; font-size: max(13px, 0.3em); color: var(--red);
  vertical-align: top; margin-left: 0.1em; position: relative; top: 0.25em;
}
/* Theme stickers slapped across the bottom of each scored word. */
.copy .w .stickers {
  position: absolute; left: 0.04em; bottom: -0.1em; z-index: 1;
  display: flex; gap: 0.25em;
  font-size: max(10px, 0.2em);
  pointer-events: none;
}
.copy .w .stickers i {
  --r: -4deg;
  font-style: normal; font-family: var(--display); line-height: 1; white-space: nowrap;
  background: oklch(0.55 0.17 var(--h)); color: var(--paper);
  padding: 0.2em 0.4em 0.05em;
  box-shadow: 0.12em 0.12em 0 var(--ink);
  transform: rotate(var(--r));
  animation: slap 0.3s var(--ease) both;
}
.copy .w .stickers i:nth-child(2) { --r: 3deg; animation-delay: 0.06s; }
.copy .w .stickers i:nth-child(3) { --r: -2deg; animation-delay: 0.12s; }
@keyframes wordSlam {
  0% { transform: translateY(160px) scale(1.6) rotate(-8deg); opacity: 0; }
  60% { transform: scale(0.95) rotate(calc(var(--r) * 0.4)); opacity: 1; }
}

/* ── Right panel ───────────────────────────────────── */

.panel { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.panel > .label { color: var(--paper); }

.clock {
  background: var(--yellow); color: var(--ink);
  padding: 12px 20px 6px;
  transform: rotate(2deg);
  box-shadow: 6px 6px 0 var(--ink);
  display: grid;
}
.clock small, .score small, .facts small { font-family: var(--ui); font-weight: 800; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }
.clock b { font-family: var(--display); font-weight: 400; font-size: 112px; line-height: 1; font-variant-numeric: tabular-nums; }
.clock.low { background: var(--ink); color: var(--yellow); animation: clockLow 0.5s infinite; }
@keyframes clockLow { 50% { transform: rotate(-2deg) scale(1.05); color: var(--paper); } }

.score {
  background: var(--paper); padding: 12px 18px 14px;
  transform: rotate(-1deg);
  box-shadow: 6px 6px 0 oklch(0.25 0.1 25 / 0.45);
  display: grid;
}
.score b { font-family: var(--display); font-weight: 400; font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.score span { font-family: var(--ui); font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.score .meter { display: none; height: 12px; background: var(--paper-shade); margin-top: 10px; position: relative; overflow: hidden; }
.score.counting .meter { display: block; }
.score.counting b { font-size: 88px; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--ink); transition: width 0.4s var(--ease); }
.meter.passed i { background: var(--green); }

.facts { display: flex; gap: 14px; }
.facts > div { flex: 1; background: var(--ink); color: var(--paper); padding: 8px 14px 6px; display: grid; }
.facts b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1.05; font-variant-numeric: tabular-nums; }

.orders {
  background: var(--paper); color: var(--ink);
  padding: 10px 14px 12px;
  border: 4px solid var(--red);
  transform: rotate(1.5deg);
  display: grid; gap: 2px; grid-template-columns: 76px 1fr; column-gap: 12px; align-content: start;
  font-size: 17px; line-height: 1.25;
}
.orders > :not(.portrait) { grid-column: 2; }
.orders .portrait { grid-row: 1 / span 3; width: 76px; height: 76px; border: 3px solid var(--ink); align-self: start; }
.orders .label { color: var(--red); font-size: 11px; }
.orders b { font-family: var(--display); font-weight: 400; font-size: 28px; text-transform: uppercase; line-height: 1.05; }

.panel > .round-btns { margin-top: auto; }

/* ── Tray: compose + rack, or the reveal spotlight ─── */

.tray {
  display: grid; grid-template-rows: 88px 1fr 22px; gap: 10px;
  min-height: 0;
}

.compose {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--ink);
  padding: 0 22px;
  box-shadow: 6px 6px 0 oklch(0.25 0.1 25 / 0.45);
}
.compose .letters { display: flex; align-items: center; gap: 4px; }
.compose .letters > span:not(.caret) {
  font-family: var(--display); font-size: 50px; line-height: 1; text-transform: uppercase;
  padding: 6px 10px 2px; min-width: 46px; text-align: center;
}
.compose .letters > span.new { animation: letterIn 0.18s var(--ease) both; }
.compose .bad { background: transparent; color: var(--red); outline: 3px dashed var(--red); outline-offset: -3px; text-decoration: line-through; text-decoration-thickness: 4px; }
.compose .caret { width: 4px; height: 56px; background: var(--yellow); animation: blink 1s steps(1) infinite; margin-left: 6px; }
.compose .msg, .compose .preview { font-family: var(--ui); font-weight: 700; font-size: 18px; white-space: nowrap; }
.compose .msg { color: var(--yellow); }
.compose .preview { color: var(--ink-faint); }
.compose.shake { animation: shake2 0.35s; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes letterIn { from { transform: scale(1.8); opacity: 0; } }

.rack {
  display: flex; gap: 10px; align-items: center; justify-content: flex-start;
  background: var(--red-dark); padding: 0 16px;
  box-shadow: inset 0 6px 12px oklch(0.15 0.06 25 / 0.6);
}

/* Classic letter tiles, shared by the rack, typed letters and the bag view.
   Only meaningful differences get colour: wild tiles are yellow. */
.tl {
  background: linear-gradient(160deg, oklch(0.95 0.035 85), oklch(0.88 0.05 80));
  color: var(--ink);
  border-radius: 6px;
  box-shadow: inset 0 -4px 0 oklch(0.78 0.06 75), inset 0 2px 0 oklch(0.99 0.02 90), 2px 4px 0 oklch(0.2 0.08 25 / 0.55);
}
.tl.wild { background: linear-gradient(160deg, var(--yellow), oklch(0.82 0.16 90)); box-shadow: inset 0 -4px 0 oklch(0.68 0.14 80), 2px 4px 0 oklch(0.2 0.08 25 / 0.55); }

.tile {
  position: relative;
  width: 70px; height: 80px;
  border: none;
  font-family: var(--display); font-size: 46px; line-height: 1; text-transform: uppercase;
  display: grid; place-items: center;
  transition: transform 0.14s var(--ease), opacity 0.14s;
}
.tile.deal { animation: tileIn 0.35s var(--ease) both; }
.tile sub { position: absolute; right: 7px; bottom: 5px; font-family: var(--ui); font-style: normal; font-weight: 800; font-size: 13px; }
.tile.up sub { background: var(--red); color: var(--paper); padding: 0 4px; border-radius: 3px; }
.tile.used { transform: translateY(-22px) scale(0.85); opacity: 0.2; }
.tile:hover:not(.used) { transform: translateY(-6px); }
.rack .tile:nth-child(3n) { animation-delay: 0.04s; }
.rack .tile:nth-child(3n + 1) { animation-delay: 0.08s; }
@keyframes tileIn { from { opacity: 0; transform: translateY(-60px) rotate(-30deg) scale(1.3); } }

.keys { display: flex; gap: 22px; font-family: var(--ui); font-weight: 700; font-size: 14px; color: var(--paper); }
.keys kbd {
  font-family: var(--ui); font-weight: 800; font-size: 12px;
  background: var(--paper); color: var(--ink); padding: 2px 7px; margin-right: 6px;
  box-shadow: 0 2px 0 var(--red-dark);
}

.spot {
  grid-row: 1 / 4;
  background: var(--ink); color: var(--paper);
  box-shadow: 6px 6px 0 oklch(0.25 0.1 25 / 0.45);
  display: grid;
  grid-template-columns: 300px 1fr auto;
  grid-template-rows: 1fr 24px;
  align-items: center; gap: 0 26px;
  padding: 16px 28px 10px;
  overflow: hidden;
}
.spot-wait { grid-column: 1 / -1; font-style: italic; font-size: 30px; color: var(--ink-faint); animation: blinkSoft 1.2s infinite; }
@keyframes blinkSoft { 50% { opacity: 0.4; } }
.spot-word { font-family: var(--display); font-size: 92px; line-height: 1; text-transform: uppercase; color: var(--yellow); overflow: hidden; white-space: nowrap; height: 110px; display: flex; align-items: center; }
.spot-word:has(.verdict) { overflow: visible; }
.spot-word .slam { display: inline-block; animation: wordSlam 0.3s var(--ease) both; }
.spot-stamps { display: flex; flex-wrap: wrap; gap: 8px 10px; align-content: center; }
.spot-calc { font-family: var(--display); font-size: 48px; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
/* Fixed width, filled from the left, so nothing shifts when the total lands. */
.spot-calc { display: flex; align-items: center; gap: 12px; width: 600px; justify-content: flex-start; }
.spot-calc .ctr {
  display: flex; flex-direction: column; align-items: center;
  min-width: 108px; padding: 6px 14px 4px;
  color: var(--paper);
  box-shadow: 4px 4px 0 oklch(0.1 0.02 25);
}
.spot-calc .ctr small { font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; }
.spot-calc .ctr b { font-weight: 400; font-size: 56px; line-height: 1; }
.spot-calc .ctr.base { background: oklch(0.52 0.15 245); rotate: -2deg; }
.spot-calc .ctr.mult { background: oklch(0.58 0.21 28); rotate: 2deg; }
.spot-calc .extra { color: var(--yellow); font-size: 40px; }
.spot-calc .extra:empty { display: none; }
.spot-calc .sum { display: flex; align-items: center; gap: 12px; }
.bump { display: inline-block; animation: bump 0.28s var(--ease); }
@keyframes bump { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
.spot-calc .x, .spot-calc .eq { color: var(--ink-faint); }
.spot-calc .sum b { font-weight: 400; color: var(--yellow); font-size: 72px; animation: wordSlam 0.3s var(--ease) both; }
.spot-hint { grid-column: 1 / -1; font-family: var(--ui); font-weight: 700; font-size: 13px; color: var(--ink-faint); letter-spacing: 0.08em; text-transform: uppercase; }
.verdict {
  display: inline-block;
  font-family: var(--display); font-size: 72px; line-height: 1.1; color: var(--green);
  border: 6px solid currentColor; padding: 0 18px; margin-left: 8px;
  transform: rotate(-4deg);
  animation: slap 0.45s var(--ease) both;
  --r: -4deg;
}
.verdict.fail { color: var(--red); }

.stamp {
  --h: 30;
  display: inline-block;
  font-family: var(--display); font-size: 24px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1;
  color: var(--paper);
  background: oklch(0.55 0.17 var(--h));
  padding: 8px 12px 5px;
  transform: rotate(var(--r, -3deg));
  animation: slap 0.32s var(--ease) both;
  white-space: nowrap;
}
.stamp small { font-family: var(--ui); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; margin-left: 8px; opacity: 0.9; }
.stamp.glance { background: transparent; color: oklch(0.75 0.13 var(--h)); outline: 3px dashed currentColor; outline-offset: -3px; }
.stamp.cross { background: var(--yellow); color: var(--ink); font-size: 32px; padding: 8px 14px 5px; }
.stamp.card-stamp { background: var(--paper); color: var(--ink); }
.stamp.card-stamp small { color: var(--red); opacity: 1; }

/* ── Front page (end of round, title, final) ───────── */

.scrim { position: absolute; inset: 0; z-index: 20; background: oklch(0.15 0.05 25 / 0.55); animation: fadeIn 0.4s both; }
@keyframes fadeIn { from { opacity: 0; } }

.frontpage {
  position: absolute; z-index: 21;
  left: 50%; top: 50%;
  width: 1040px; height: 800px; margin: -400px 0 0 -520px;
  background:
    radial-gradient(ellipse at 30% 20%, transparent 60%, oklch(0.6 0.04 80 / 0.12)),
    var(--paper);
  padding: 0 40px 30px;
  box-shadow: 18px 22px 0 oklch(0.15 0.06 25 / 0.5);
  display: flex; flex-direction: column;
  transform: rotate(-2deg);
  animation: spinIn 0.9s var(--ease) both;
}
@keyframes spinIn {
  0% { transform: scale(0.05) rotate(-900deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: scale(1) rotate(-2deg); }
}
.frontpage .masthead { padding-top: 22px; }
.frontpage .masthead .flag { font-size: 84px; margin-left: -40px; padding: 12px 22px 6px; }
.frontpage .story { padding: 22px 0 18px; border-bottom: 1.5px solid var(--ink); display: grid; gap: 10px; }
.kicker {
  justify-self: start;
  font-family: var(--display); font-size: 34px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1;
  background: var(--ink); color: var(--yellow);
  padding: 8px 14px 4px;
  transform: rotate(-1.5deg);
  animation: slap 0.4s var(--ease) both; --r: -1.5deg;
}
.kicker.pending, .headline.pending { animation: blinkSoft 1s infinite; }
.headline {
  font-family: var(--display); font-weight: 400; font-size: 112px; line-height: 0.95; text-transform: uppercase;
  height: 214px; overflow: hidden;
  animation: wordSlam 0.45s var(--ease) both;
}
.subhead { font-style: italic; font-size: 28px; line-height: 1.3; color: var(--ink-soft); min-height: 1.3em; }

.fp-bottom { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 34px; padding-top: 22px; min-height: 0; }
.photo { display: flex; flex-direction: column; gap: 8px; min-height: 0; position: relative; }
.halftone {
  flex: 1; min-height: 0;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 96px; text-transform: uppercase; color: var(--paper);
  background:
    radial-gradient(circle, oklch(0.2 0.01 60 / 0.9) 32%, transparent 36%) 0 0 / 9px 9px,
    linear-gradient(135deg, var(--ink-soft), var(--ink));
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  filter: contrast(1.1);
  overflow: hidden;
}
.photo figcaption { font-size: 17px; font-style: italic; color: var(--ink-soft); }
.why { display: flex; flex-wrap: wrap; gap: 6px; }
.why span { line-height: 1; font-family: var(--display); font-size: 18px; text-transform: uppercase; color: var(--paper); background: oklch(0.55 0.17 var(--h)); padding: 3px 8px 1px; }
.why span.near { background: none; color: oklch(0.5 0.15 var(--h)); outline: 2px dashed currentColor; outline-offset: -2px; }
.why b { font-weight: 400; opacity: 0.85; }
.report { display: flex; flex-direction: column; gap: 6px; position: relative; }
.report-line { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px dotted var(--ink-faint); padding-bottom: 4px; }
.report-line span { font-family: var(--ui); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.report-line b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; }
.report-line.small b { font-size: 26px; color: var(--green); }
.fp-stamp {
  position: absolute; right: -18px; top: -16px;
  font-family: var(--display); font-size: 54px; text-transform: uppercase; color: var(--green);
  border: 6px solid currentColor; padding: 0 16px;
  transform: rotate(12deg);
  background: var(--paper);
  animation: stampDown 0.35s 0.8s var(--ease-in) both;
}
.fp-stamp.fail { color: var(--red); }
@keyframes stampDown { from { transform: scale(3) rotate(20deg); opacity: 0; } to { transform: rotate(12deg); opacity: 1; } }
.frontpage .actions { margin-top: auto; display: flex; gap: 18px; align-items: center; }

/* Title page and final page sit straight on the stage, no scrim. */
.title-page { animation-duration: 1.1s; }
.title-page .headline { font-size: 128px; height: auto; }
.columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding: 18px 0; flex: 1; }
.columns p { font-size: 19px; line-height: 1.4; color: var(--ink-soft); border-left: 1px solid var(--ink-faint); padding-left: 14px; }
.columns p:first-child { border-left: none; padding-left: 0; }
.columns b { color: var(--ink); }
.best { font-family: var(--ui); font-weight: 700; font-size: 15px; color: var(--ink-soft); }

.final .fp-bottom { grid-template-columns: 1fr 1.2fr; }
.clipping {
  background: var(--paper-shade); padding: 18px 22px; transform: rotate(1.5deg);
  display: grid; gap: 8px; align-content: start;
  box-shadow: 4px 5px 0 oklch(0.3 0.03 70 / 0.25);
}
.clipping small { font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); }
.clipping b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; text-transform: uppercase; }
.clipping span { font-style: italic; font-size: 19px; color: var(--ink-soft); }

/* ── Newsroom (shop) ───────────────────────────────── */

.room { display: grid; grid-template-rows: auto auto auto 1fr; gap: 18px; min-height: 0; }
.room-head h2 {
  display: inline-block;
  font-family: var(--display); font-weight: 400; font-size: 64px; line-height: 1; text-transform: uppercase;
  background: var(--paper); color: var(--red);
  padding: 8px 18px 2px; transform: rotate(-1.5deg);
  box-shadow: 6px 6px 0 var(--ink);
}
.room-head p { color: var(--paper); font-style: italic; font-size: 19px; margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .label { color: var(--paper); display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }

.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.badge.offer { height: 248px; flex: none; padding-bottom: 14px; animation: dealIn 0.5s var(--ease) both; }
.badge.offer:nth-child(2) { animation-delay: 0.08s; }
.badge.offer:nth-child(3) { animation-delay: 0.16s; }
.badge.offer h3 { font-size: 30px; }
.badge.offer p { font-size: 17px; }
.badge.offer .covers { font-family: var(--ui); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-top: 8px; }
.badge.offer .covers .theme { font-size: 16px; padding: 4px 8px 2px; margin-left: 4px; animation: none; }
.badge.offer > .btn { margin-top: auto; align-self: start; }
.badge.sold { opacity: 0.35; }
@keyframes dealIn { from { transform: translateY(-120px) rotate(-14deg); opacity: 0; } }

.tickets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ticket {
  position: relative;
  height: 150px;
  text-align: left;
  background: var(--yellow); color: var(--ink);
  border: none; outline: 3px dashed var(--ink); outline-offset: -9px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 4px 5px 0 oklch(0.25 0.1 25 / 0.45);
  transition: transform 0.14s var(--ease);
}
.ticket:nth-child(odd) { transform: rotate(-1.5deg); }
.ticket:nth-child(even) { transform: rotate(1.2deg); }
.ticket:hover:not(:disabled) { transform: rotate(0) scale(1.04); }
.ticket b { font-family: var(--display); font-weight: 400; font-size: 25px; text-transform: uppercase; line-height: 1.05; padding-right: 40px; }
.ticket span { font-size: 15px; line-height: 1.25; }
.ticket .price {
  position: absolute; right: 10px; top: 10px;
  font-family: var(--display); font-size: 24px; line-height: 1;
  background: var(--ink); color: var(--yellow); padding: 6px 8px 3px; transform: rotate(8deg);
}
.ticket:disabled { cursor: default; }
.ticket:disabled:not(.sold) { filter: grayscale(0.7); opacity: 0.6; }
.ticket.sold { opacity: 0.3; }

.case { min-height: 0; }
.bagview {
  display: flex; flex-wrap: wrap; gap: 8px;
  background: var(--red-dark); padding: 12px 14px;
  box-shadow: inset 0 6px 12px oklch(0.15 0.06 25 / 0.6);
}
.bagview .chip {
  display: inline-flex; align-items: baseline; gap: 4px;
  font-family: var(--display); font-size: 26px; text-transform: uppercase; line-height: 1;
  border: none; padding: 7px 9px 4px;
  box-shadow: 2px 3px 0 oklch(0.25 0.1 25 / 0.45);
}
.bagview .chip small { font-family: var(--ui); font-style: normal; font-size: 12px; font-weight: 800; opacity: 0.8; }
.bagview .chip:disabled { cursor: default; }
.bagview.culling .chip { cursor: pointer; animation: jitter 0.3s infinite; }
.bagview.culling .chip:nth-child(even) { animation-delay: 0.15s; }
.bagview.culling .chip:hover { outline: 4px solid var(--ink); }
@keyframes jitter { 50% { transform: rotate(3deg); } }

.tomorrow .themes { border: none; padding: 0; gap: 14px; }
.tomorrow .themes button { background: none; border: none; padding: 0; cursor: default; }
.tomorrow .themes.rewriting button { cursor: pointer; }
.tomorrow .themes.rewriting .theme { animation: jitter 0.3s infinite; outline: 3px solid var(--yellow); }
.tomorrow .hot { color: var(--yellow); font-family: var(--ui); font-weight: 800; }
.btn.go { margin-top: auto; font-size: 40px; padding: 18px 26px 14px; background: var(--yellow); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }

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

/* Shop re-renders (after buying, selling...) shouldn't deal everything in again. */
.newsroom.calm .badge, .newsroom.calm .theme, .newsroom.calm .ticket { animation: none; }

/* Boss rounds: the editor's orders slam in and hold the clock. */
.briefing {
  position: absolute; z-index: 21; left: 50%; top: 46%;
  width: 860px; translate: -50% -50%;
  background: var(--yellow); color: var(--ink);
  border: 8px solid var(--ink);
  box-shadow: 16px 16px 0 var(--ink);
  padding: 34px 44px 38px;
  rotate: -2deg;
  animation: briefIn 0.55s var(--ease) both;
}
.briefing .label { font-family: var(--ui); font-weight: 800; font-size: 16px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.briefing:has(.portrait) { width: 1120px; display: grid; grid-template-columns: 340px 1fr; gap: 36px; align-items: center; }
.briefing .portrait { width: 340px; height: 340px; border: 6px solid var(--ink); rotate: 2deg; background: var(--paper); }
.briefing h2 { font-family: var(--display); font-weight: 400; font-size: 96px; line-height: 0.95; text-transform: uppercase; margin: 10px 0 14px; }
.briefing p { font-family: var(--serif); font-size: 36px; line-height: 1.25; margin: 0 0 28px; }
@keyframes briefIn { from { transform: scale(2.4) rotate(14deg); opacity: 0; } }

/* Rare themes: gold foil, so they read as special at a glance. */
.theme.rare, .stamp.rare, .copy .w .stickers i.rare, .why span.rare {
  background: linear-gradient(110deg, oklch(0.78 0.14 85) 0%, oklch(0.93 0.09 95) 45%, oklch(0.78 0.14 85) 55%, oklch(0.7 0.14 75) 100%) 0 0 / 250% 100%;
  color: var(--ink);
  animation: slap 0.45s var(--ease) both, foil 2.4s linear infinite;
}
.theme.rare::before { content: "★ "; color: var(--red); }
.stamp.rare small { color: var(--ink); }
@keyframes foil { from { background-position: 100% 0; } to { background-position: -150% 0; } }

.round-btns { display: flex; gap: 12px; }
#stage.paused .tray, #stage.paused .copy { filter: blur(14px); }
.pause-card { width: 520px; text-align: center; rotate: 1.5deg; }

/* Editors' effects on the desk */
.badge.struck { filter: grayscale(1); opacity: 0.55; }
.badge.struck::after {
  content: "On strike"; position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -12deg;
  font-family: var(--display); font-size: 34px; text-transform: uppercase; color: var(--red);
  border: 4px solid currentColor; padding: 0 10px; background: var(--paper);
}
.theme.secret { background: var(--ink); color: var(--yellow); letter-spacing: 0.2em; }
.rack.scrambled { animation: shake2 0.35s; }

/* Daily edition: byline on the title page, standings page */
.byline { display: flex; flex-direction: column; gap: 2px; }
.byline span { font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.byline input {
  width: 220px; border: none; border-bottom: 3px solid var(--ink); background: transparent;
  font-family: var(--display); font-size: 30px; text-transform: uppercase; color: var(--ink); padding: 2px 0;
}
.byline input:focus { outline: none; border-color: var(--red); }
.byline.shake { animation: shake2 0.35s; }
.byline.shake input { border-color: var(--red); }
.title-page > .best { margin-top: 12px; }

.standings .story { padding-bottom: 6px; }
.standings-day { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 34px; color: var(--ink-soft); margin-top: 6px; }
.table { list-style: none; flex: 1; display: flex; flex-direction: column; border-top: 2px solid var(--ink); margin: 10px 0 18px; }
.table li {
  display: grid; grid-template-columns: 44px 210px 120px 110px 1fr; align-items: baseline; gap: 16px;
  padding: 8px 0 6px; border-bottom: 1px dotted var(--ink-faint);
}
.table li.empty { display: block; font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ink-faint); padding: 30px 0; border: none; }
.table .rank { font-family: var(--display); font-size: 30px; color: var(--red); }
.table .who { font-family: var(--display); font-size: 30px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .rounds { font-family: var(--ui); font-weight: 800; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.table .pts { font-family: var(--display); font-size: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.table .hl { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* History: back issues on the left, the chosen run's rounds on the right */
.history .story { padding-bottom: 4px; }
.history .empty { flex: 1; font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ink-faint); padding: 30px 0; }
.archive { flex: 1; min-height: 0; display: grid; grid-template-columns: 400px 1fr; gap: 28px; padding: 12px 0 16px; }
.issues { list-style: none; padding: 0; border-top: 2px solid var(--ink); overflow: hidden; }
.issues button {
  width: 100%; display: grid; grid-template-columns: 100px 1fr 80px; grid-template-rows: auto auto; column-gap: 10px;
  text-align: left; background: none; border: none; border-bottom: 1px dotted var(--ink-faint); padding: 6px 8px; cursor: pointer;
  font: inherit; color: var(--ink);
}
.issues button:hover { background: color-mix(in oklch, var(--ink) 6%, transparent); }
.issues button.on { background: var(--ink); color: var(--paper); }
.issues .when { font-family: var(--display); font-size: 20px; text-transform: uppercase; grid-row: span 2; align-self: center; }
.issues .when small { display: block; font-family: var(--ui); font-size: 11px; font-weight: 700; opacity: 0.6; }
.issues .kind { font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.65; }
.issues .reach { font-family: var(--serif); font-style: italic; font-size: 16px; grid-column: 2; }
.issues .reach.won { color: var(--red); font-weight: 700; }
.issues button.on .reach.won { color: var(--yellow); }
.issues .pts { font-family: var(--display); font-size: 24px; text-align: right; grid-column: 3; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; }

.issue { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.issue .rounds { display: flex; gap: 6px; }
.issue .rounds button {
  width: 42px; height: 42px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  font-family: var(--display); font-size: 22px; cursor: pointer;
}
.issue .rounds button.fail { border-color: var(--red); color: var(--red); }
.issue .rounds button.on { background: var(--ink); color: var(--paper); }
.issue .rounds button.on.fail { background: var(--red); color: var(--paper); }
.issue-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.themes-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.history i { font-style: normal; display: inline-block; padding: 2px 8px; font-family: var(--display); font-size: 16px; text-transform: uppercase;
  color: #fff; background: oklch(0.55 0.17 var(--h)); }
.history i.rare { background: linear-gradient(110deg, #b8862c, #f3d27a 45%, #b8862c); color: var(--ink); }
.history i.near { background: none; color: oklch(0.5 0.17 var(--h)); outline: 2px dashed oklch(0.55 0.17 var(--h)); outline-offset: -2px; }
.themes-row i { font-size: 22px; padding: 3px 12px; }
.editor { font-family: var(--ui); font-weight: 800; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; background: var(--yellow); color: var(--ink); padding: 5px 10px; }
.tally { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink-soft); white-space: nowrap; }
.tally b { font-family: var(--display); font-style: normal; font-size: 40px; color: var(--ink); }
.tally.fail b { color: var(--red); }
.clip { border-left: 4px solid var(--red); padding-left: 12px; }
.clip small { font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.clip h3 { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; text-transform: uppercase; height: 42px; overflow: hidden; }
.wordlist { list-style: none; padding: 0; flex: 1; min-height: 0; columns: 2; column-gap: 28px; column-fill: auto; border-top: 2px solid var(--ink); padding-top: 4px; overflow: hidden; }
.wordlist li { break-inside: avoid; display: grid; grid-template-columns: 1fr 52px auto; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px dotted var(--ink-faint); }
.wordlist li.none { display: block; font-family: var(--serif); font-style: italic; color: var(--ink-faint); border: none; }
.wordlist b { font-family: var(--display); font-weight: 400; font-size: 22px; text-transform: uppercase; }
.wordlist .pts { font-family: var(--display); font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.wordlist .stickers { display: flex; gap: 4px; min-width: 120px; }
.wordlist i { font-size: 13px; padding: 1px 6px; }
.frontpage.swap, .frontpage.swap .kicker, .frontpage.swap .headline { animation: fadeIn 0.25s ease both; }
.frontpage.calm, .frontpage.calm .kicker { animation: none; }
