/* ==========================================================================
   Clippings — game page layout + scene (shared by every -dle)
   ========================================================================== */

/* ---------- scene ---------- */

#scene {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: min(46vh, 430px);
  z-index: 0;
  pointer-events: none;
}
.scene-svg { width: 100%; height: 100%; display: block; overflow: visible; }

.scene-svg .i1 { fill: var(--ink-1); }
.scene-svg .i2 { fill: var(--ink-2); }
.scene-svg .pp { fill: var(--paper-card); }
.scene-svg .h1 { fill: url(#ht1); }
.scene-svg .h2 { fill: url(#ht2); }
.scene-svg .s0 { fill: none; stroke: var(--paper-card); }
.scene-svg .s1 { fill: none; stroke: var(--ink-1); }
.scene-svg .s2 { fill: none; stroke: var(--ink-2); }

.scene-set .layer {
  transition: transform 0.85s cubic-bezier(.2,.8,.2,1), opacity 0.6s ease;
}
.scene-set .layer.mid { transition-delay: 0.08s; }
.scene-set .layer.front { transition-delay: 0.16s; }
.scene-set.entering .layer { transform: translateY(70px); opacity: 0; }
.scene-set.entering .layer.back { transform: translateY(30px); }
.scene-set.leaving .layer { transform: translateY(90px); opacity: 0; transition-delay: 0s; transition-duration: 0.6s; }

.scene-svg .float, .scene-svg .hover, .scene-svg .sway,
.scene-svg .flicker, .scene-svg .rise, .scene-svg .blink {
  transform-box: fill-box;
  transform-origin: center;
}
.scene-svg .float { animation: float 6s ease-in-out infinite; }
.scene-svg .hover { animation: float 4.5s ease-in-out infinite; }
.scene-svg .sway { transform-origin: bottom center; animation: sway 7s ease-in-out infinite; }.scene-svg .flicker { transform-origin: bottom center; animation: flicker 1.7s ease-in-out infinite; }
.scene-svg .rise { transform-origin: bottom center; animation: rise 5s ease-in-out infinite; }
.scene-svg .blink { animation: blink 5.5s infinite; }
.scene-svg .spin-slow { animation: spin 90s linear infinite; }
.scene-svg .pp-text { fill: var(--paper-card); }.scene-svg .bubble { transform-box: fill-box; animation: bubble 2.4s ease-in infinite; }.scene-svg .buzz { animation: buzz 9s steps(1) infinite; }
.scene-svg .static { animation: static-shift 0.35s steps(3) infinite; }

@keyframes bubble { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-46px); opacity: 0; } }
@keyframes buzz { 0%, 100% { opacity: 1; } 91% { opacity: 0.55; } 92% { opacity: 1; } }
@keyframes static-shift { 33% { transform: translate(2px, -3px); } 66% { transform: translate(-3px, 2px); } }

@keyframes float { 50% { transform: translateY(-12px) rotate(2deg); } }
@keyframes sway { 50% { transform: rotate(5deg); } }
@keyframes flicker { 30% { transform: scale(0.9, 1.08) skewX(3deg); } 60% { transform: scale(1.05, 0.94) skewX(-3deg); } }
@keyframes rise { 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- format overlays ---------- */

/* full-viewport, but behind the page content: above the scene (z 0), below the stage (z 5) */
.fmt { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.fmt .osd {
  position: absolute;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  opacity: 0.78;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--paper-card);
  text-shadow: 2px 2px 0 var(--ink-2), -1px -1px 0 var(--ink-2), 1px -1px 0 var(--ink-2), -1px 1px 0 var(--ink-2);
  white-space: pre;
}

/* found footage: handheld camcorder viewfinder */
html[data-format=found] #scene .scene-svg { animation: handheld 14s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes handheld {
  0%, 100% { transform: scale(1.03) translate(0, 0) rotate(0deg); }
  25% { transform: scale(1.03) translate(-3px, 2px) rotate(-0.15deg); }
  55% { transform: scale(1.03) translate(2px, -1px) rotate(0.1deg); }
  80% { transform: scale(1.03) translate(-1px, -2px) rotate(0deg); }
}
.fmt-found {
  inset: 10px;
  box-shadow: inset 0 0 120px 0 rgba(28, 23, 23, 0.16);
}
.vf-corner {
  position: absolute;
  width: 26px; height: 19px;
  opacity: 0.8;
  border: 0 solid var(--paper-card);
  filter: drop-shadow(1.5px 1.5px 0 var(--ink-2)) drop-shadow(-1px -1px 0 var(--ink-2));
}
.vf-corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.vf-corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.vf-corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.vf-corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }
.vf-rec { top: 64px; left: 22px; display: flex; align-items: center; gap: 8px; }
.vf-rec i {
  width: 0.62em; height: 0.62em;
  border-radius: 50%;
  background: var(--ink-1);
  box-shadow: 0 0 0 2px var(--ink-2);
  animation: rec-blink 1.1s steps(1) infinite;
}
@keyframes rec-blink { 50% { opacity: 0; } }
.vf-mode { top: 64px; right: 22px; display: flex; align-items: center; }
.vf-batt {
  display: inline-flex; gap: 2px;
  padding: 2px;
  border: 2px solid var(--paper-card);
  box-shadow: 1.5px 1.5px 0 var(--ink-2);
  position: relative;
}
.vf-batt::after { content: ''; position: absolute; right: -6px; top: 4px; width: 3px; height: 6px; background: var(--paper-card); }
.vf-batt b { width: 6px; height: 10px; background: var(--paper-card); }
.vf-batt b.low { animation: rec-blink 1.4s steps(1) infinite; }
.vf-time { bottom: 18px; left: 22px; text-align: left; }

@media (max-width: 520px) {
  .fmt-found { inset: 6px; }
}

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

.topbar {
  position: sticky;   /* locked; quiz.js clips the page content at its bottom line */
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  max-width: 980px;
  margin: 0 auto;
}
/* every page keeps room for a scrollbar, so the bar (centred) never shifts between pages that scroll and pages that don't */
html { scrollbar-gutter: stable; }

/* Trick or Treat only (treat.css turns it on): a bank of cut-paper clouds behind the top bar (quiz.js lockTopBar adds it),
   like the clouds in its sky: flat paper, rough-cut, a hard shadow. The page slides away up under them. Two layers, the
   back one a shade off; their shallow lobes reach down to where the other pages' dividers sit (the bar's bottom edge),
   and the page is cut a little higher, between the lobes, so the cut never shows. */
:root {
  --cloud-front-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='18'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='5' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cpath filter='url%28%23c%29' fill='%23ece3cf' d='M-4 -4 H304 V5 H300 C296.6 13.0 261.4 13.0 258 5 C254.3 15.6 215.7 15.6 212 5 C208.8 14.3 175.2 14.3 172 5 C167.8 18.3 124.2 18.3 120 5 C117.3 11.7 88.7 11.7 86 5 C82.2 17.0 41.8 17.0 38 5 C35.0 13.0 3.0 13.0 0 5 H-4 Z'/%3E%3C/svg%3E");
  --cloud-back-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='20'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='5' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cpath filter='url%28%23c%29' fill='%23d3c6aa' d='M-4 -4 H324 V7 H320 C316.0 15.0 274.0 15.0 270 7 C265.4 19.0 216.6 19.0 212 7 C208.0 16.3 166.0 16.3 162 7 C157.0 19.0 105.0 19.0 100 7 C96.5 15.0 59.5 15.0 56 7 C51.5 17.6 4.5 17.6 0 7 H-4 Z'/%3E%3C/svg%3E");
  --cloud-front-night: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='18'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='5' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cpath filter='url%28%23c%29' fill='%2314242c' d='M-4 -4 H304 V5 H300 C296.6 13.0 261.4 13.0 258 5 C254.3 15.6 215.7 15.6 212 5 C208.8 14.3 175.2 14.3 172 5 C167.8 18.3 124.2 18.3 120 5 C117.3 11.7 88.7 11.7 86 5 C82.2 17.0 41.8 17.0 38 5 C35.0 13.0 3.0 13.0 0 5 H-4 Z'/%3E%3C/svg%3E");
  --cloud-back-night: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='20'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='5' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cpath filter='url%28%23c%29' fill='%231b323d' d='M-4 -4 H324 V7 H320 C316.0 15.0 274.0 15.0 270 7 C265.4 19.0 216.6 19.0 212 7 C208.0 16.3 166.0 16.3 162 7 C157.0 19.0 105.0 19.0 100 7 C96.5 15.0 59.5 15.0 56 7 C51.5 17.6 4.5 17.6 0 7 H-4 Z'/%3E%3C/svg%3E");
}
.clouds { display: none; position: absolute; z-index: -1; top: -80px; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none;
  --cloud-front: #ece3cf; --cloud-back: #d3c6aa; --cloud-front-edge: var(--cloud-front-paper); --cloud-back-edge: var(--cloud-back-paper);
  --cloud-shadow: rgba(28, 23, 23, 0.28); }
.clouds i { position: absolute; left: 0; right: 0; top: 0; filter: drop-shadow(3px 5px 0 var(--cloud-shadow)); }
.clouds .front { bottom: -5px; background: linear-gradient(var(--cloud-front), var(--cloud-front)) top / 100% calc(100% - 18px) no-repeat, var(--cloud-front-edge) left bottom / 300px 18px repeat-x; }
.clouds .back { bottom: -7px; background: linear-gradient(var(--cloud-back), var(--cloud-back)) top / 100% calc(100% - 20px) no-repeat, var(--cloud-back-edge) -130px bottom / 320px 20px repeat-x; }
.tools { display: flex; gap: 4px; }

/* game switcher: folder tabs in the top bar */
.game-tabs { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.game-tabs { gap: 18px; align-items: center; min-height: 52px; }   /* the same height whichever tab is open */
.game-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px;
  text-decoration: none;
  color: var(--ink-2);
  opacity: 0.5;
  filter: grayscale(0.7);
  transition: opacity 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}
.game-tab:hover, .game-tab:focus-visible { opacity: 1; filter: none; transform: translateY(-2px) rotate(-1deg); }
.game-tab.active { opacity: 1; filter: none; }   /* no scaling, so the gaps between tabs never change from page to page */
.game-tab:focus-visible { outline: 2px dashed var(--ink-1); outline-offset: 4px; }

/* Paper Cuts tab: tiny ransom letters */
.tab-ransom.ransom { font-size: 1.45rem; gap: 0.1em 0.28em; flex-wrap: nowrap; }
.tab-ransom .rl { padding: 0.08em 0.1em 0.04em; }

/* Watchlist tab: an admit-one cinema ticket cut from paper, notched at both ends (its shadow is on the wrapper) */
/* Séance tab: just the scrying ball, as tall as the Case Files label; on hover the mist swirls and it twinkles */
.tab-bag { display: inline-flex; }
/* the small red star keeps its colour when faded, like the other games' tabs keep theirs */
.game-tab.treat-tab:not(.active) { filter: none; }
/* Paper Cuts' small icon keeps its red tile when faded too (greyed, the red turned muddy) */
.game-tab[aria-label="Paper Cuts"]:not(.active) { filter: none; }
/* ...and Case Files' small folder keeps its red pin red */
.game-tab[aria-label="Case Files"]:not(.active) { filter: none; }
.tab-bag svg { width: 151px; height: 40px; overflow: visible; }
/* Case Files: its stamp, drawn as SVG at the real one's proportions */
.tab-cf { display: inline-flex; }
.tab-cf svg { height: 32px; width: auto; aspect-ratio: 472 / 92; overflow: visible; }
/* narrower windows: tabs a little closer and the stamp a little smaller, so the bar stays on one row */
@media (min-width: 561px) and (max-width: 900px) { .game-tabs { gap: 10px; } .tab-cf svg { height: 27px; } .tab-bag svg { width: 132px; height: 35px; } }
/* Watchlist and Trick or Treat: small icons in the bar, full size only on their own page */
@media (min-width: 561px) {
  .game-tab.compact:not(.active) > :not(.tab-mini) { display: none; }
  .game-tab.compact:not(.active) .tab-mini { display: inline-flex; }
  /* as big as the crystal ball (38 × 44) */
  .game-tab.compact:not(.active) .tab-mini svg { width: 56px; height: 42px; filter: drop-shadow(1.5px 2px 0 var(--shadow)); }
  .game-tab.compact:not(.active) .tab-mini svg[viewBox="0 0 40 44"] { width: 40px; height: 44px; filter: none; margin: 0 -7.5px; }   /* tucked in like the crystal ball, so the gaps either side match */
}
@media (max-width: 560px) { .game-tab .tab-mini svg[viewBox="0 0 40 44"] { width: 26px; height: 29px; filter: none; } }
.tab-ball { display: inline-flex; }
/* Ask the Stars on its own page: the ball with its name on a label (a small ball stands in on phones) */
.tab-ball-full { display: inline-flex; }
.tab-ball-full svg { width: 166px; height: 44px; overflow: visible; margin: -2px 0; }
.tab-ball.phone-only { display: none; }
.game-tab.active .tab-ball-full .orb-mist { transform-box: view-box; transform-origin: 20px 18.5px; animation: orb-swirl 2.4s linear infinite; }
.game-tab.active .tab-ball-full .orb-spark { transform-box: fill-box; transform-origin: center; opacity: .85; animation: orb-twinkle 0.9s ease-in-out infinite alternate; }
@media (max-width: 560px) { .tab-ball.phone-only { display: inline-flex; } }
.tab-ball svg { width: 35px; height: 40px; overflow: visible; }
.tab-ball .orb-mist { transform-box: view-box; transform-origin: 20px 18.5px; }
.tab-ball .orb-spark { transform-box: fill-box; transform-origin: center; opacity: 0.85; }
.game-tab:hover .tab-ball .orb-mist, .game-tab:focus-visible .tab-ball .orb-mist { animation: orb-swirl 2.4s linear infinite; }
.game-tab:hover .tab-ball .orb-spark, .game-tab:focus-visible .tab-ball .orb-spark { animation: orb-twinkle 0.9s ease-in-out infinite alternate; }
.game-tab:hover .tab-ball .orb-spark.s2 { animation-delay: 0.45s; }
@keyframes orb-swirl { to { transform: rotate(360deg); } }
@keyframes orb-twinkle { from { transform: scale(0.5); opacity: 0.4; } to { transform: scale(1.25); opacity: 1; } }

/* Case Files tab: tiny rubber stamp on a paper label */
.tab-stamp { display: inline-block; padding: 4px 5px; background: var(--paper-card); box-shadow: 2px 2px 0 var(--shadow); }
.tab-stamp span {
  display: inline-block;
  font-family: 'Archivo Black', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.3em 0.55em 0.22em;
  color: var(--ink-1);
  border: 3px solid currentColor;
  box-shadow: inset 0 0 0 2px var(--paper-card), inset 0 0 0 3.5px currentColor;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(#000, #000), var(--noise);
  -webkit-mask-composite: source-out;
  mask-image: linear-gradient(#000, #000), var(--noise);
  mask-composite: subtract;
}

/* ---------- archive & stats pages ---------- */

.icon-btn[aria-pressed="true"] { background: var(--ink-2); }
.icon-btn[aria-pressed="true"] svg { stroke: var(--paper-card); }
/* Back on the left, the page title centred */
.view-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 0 0 14px; }
.view-head > .btn-wrap { justify-self: start; }
.view-head .title { font-size: clamp(1.9rem, 7vw, 2.8rem); margin: 0; }
.view-sub { text-align: center; }
.view-sub { font-family: var(--font-hand); font-size: 1.25rem; margin: 14px 0 0; }

.issue-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.issue-grid .issue { display: block; text-decoration: none; color: inherit; transform: rotate(var(--r, 0deg)); transition: transform 0.15s ease; }
.issue-grid .issue:hover { transform: rotate(0deg) translateY(-4px); }
.issue .sheet { padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.issue-n { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.issue-d { font-family: var(--font-type); font-size: 0.85rem; opacity: 0.8; }
.issue-s { margin-top: auto; align-self: flex-start; font-family: var(--font-display); font-size: 1.05rem; padding: 3px 10px 1px; background: var(--ink-2); color: var(--paper-card); transform: rotate(-2deg); }
.issue.done .issue-s { background: var(--ink-1); }
.issue:not(.done) .issue-s { background: none; color: var(--ink-2); outline: 2px dashed var(--ink-2); outline-offset: -2px; opacity: 0.7; }
/* the issue you're on: its number in red ink */
.issue.current .issue-n { color: var(--ink-1); }

.stat-grid.big b { font-family: var(--font-display); font-size: 3rem; line-height: 1.1; }
.stat-grid.big div { font-size: 0.85rem; }
.fine { font-size: 0.88rem; opacity: 0.8; margin: 0 0 18px; }
.dialog-sub { font-family: var(--font-display); text-transform: uppercase; font-size: 0.85rem; margin: 0 0 10px; }
.q-note { font-size: 0.85rem; opacity: 0.7; }
.rules b { font-family: var(--font-body); }
.icon-btn {
  width: 42px; height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 2px;
}
.icon-btn svg { width: 24px; height: 24px; stroke: var(--ink-2); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: rgba(29, 26, 26, 0.08); }
.icon-btn:focus-visible { outline: 2px dashed var(--ink-1); outline-offset: 2px; }

/* ---------- stage ---------- */

.stage {
  position: relative;
  z-index: 5;
  max-width: 640px;
  margin: 0 auto;
  padding: 6px 16px 48px;
}

.masthead { text-align: center; margin: 4px 0 18px; }
.masthead .title { font-size: clamp(2.1rem, 8vw, 3.4rem); }
.masthead .issue {
  margin-top: 14px;
  font-family: var(--font-type);
  font-size: 0.95rem;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
/* progress row: one cut square per question */
.progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 18px;
}

/* ---------- question card ---------- */

.card { margin-top: 6px; animation: card-in 0.45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(26px) rotate(1.5deg); } }

.q-label { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
/* the subgenre sits at the end of the question header, in red on paper, matching the backdrop it names */
.strip.q-sub { margin-left: auto; background: var(--paper-card); color: var(--ink-1); box-shadow: inset 0 0 0 2px var(--ink-1); transform: rotate(1.5deg); }
.q-prompt {
  font-family: var(--font-type);
  font-size: 1.28rem;
  line-height: 1.4;
  margin: 0 0 18px;
}
.q-clue {
  position: relative;
  margin: 4px 0 22px;
  padding: 18px 20px 16px;
  background: var(--ink-2);
  color: var(--paper);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1.25;
  transform: rotate(-1deg);
}
.q-clue::before { content: '“'; color: var(--ink-1); font-size: 2.6rem; line-height: 0; vertical-align: -0.38em; margin-right: 4px; }
.q-clue::after { content: '”'; color: var(--ink-1); font-size: 2.6rem; line-height: 0; vertical-align: -0.38em; margin-left: 2px; }

.q-hint { min-height: 1.5em; margin: 10px 0 0; font-size: 0.9rem; color: var(--ink-1); font-weight: 700; }
.q-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

/* case-file tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.tags li {
  font-family: var(--font-type);
  font-size: 0.98rem;
  padding: 7px 12px 5px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px rgba(29, 26, 26, 0.55), 2px 2px 0 var(--shadow);
  transform: rotate(var(--r, 0deg));
  animation: tag-in 0.35s ease both;
  animation-delay: var(--d, 0s);
}
.tags li:nth-child(4n + 1) { background: var(--paper-card); }
.tags li:nth-child(5n + 2) { background: var(--newsprint); }
@keyframes tag-in { from { opacity: 0; transform: translateY(-10px) rotate(-6deg); } }

/* feedback */
.reveal {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed var(--ink-2);
}
.reveal .answer { font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; line-height: 1.2; }
.reveal .answer small { font-family: var(--font-body); text-transform: none; font-size: 0.9rem; opacity: 0.7; }
.reveal .yours { font-size: 0.9rem; opacity: 0.75; margin-top: 4px; }
.reveal .fact { margin: 12px 0 0; font-size: 0.95rem; }
.reveal .fact b { color: var(--ink-1); }

.masthead.small { margin-bottom: 12px; }
.masthead.small .title { font-size: clamp(1.5rem, 5vw, 2.1rem); }
.masthead.small .issue { margin-top: 8px; font-size: 0.85rem; }
.icon-btn.muted svg { opacity: 0.5; }

/* ---------- intro & results ---------- */

.lede { font-family: var(--font-type); font-size: 1.12rem; margin: 0 0 16px; text-align: center; }
.rules { margin: 0 0 22px; padding: 0; list-style: none; }
.rules li { padding: 6px 0 6px 30px; position: relative; }
.rules li::before { content: '✂'; position: absolute; left: 0; color: var(--ink-1); font-size: 1.1rem; }
.center { text-align: center; }

/* Paper Cuts' countdown: a paper sign on a stake, stuck in the ground at the left of the backdrop */
.pc-next { position: fixed; z-index: 1; right: max(18px, calc(50% - 490px)); top: 112px; display: flex; flex-direction: column; align-items: center; pointer-events: none; rotate: 3deg; transform-origin: 50% 0; }
/* taped up at the top right, near the page like the other games' countdowns */
.pc-next .tape { width: 60px; height: 20px; top: -11px; }   /* the same tape as the cards (paper.css) */
.pc-next-sign { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 12px 8px;
  background-color: var(--paper-card); background-image: var(--fibers-soft); box-shadow: 3px 4px 0 var(--shadow); }
.pc-next-word { font-family: var(--font-type, 'Courier Prime', monospace); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.pc-next-sign b { font-family: 'Archivo Black', sans-serif; font-weight: normal; font-size: 1.45rem; letter-spacing: 0.06em; color: var(--ink-1); font-variant-numeric: tabular-nums; line-height: 1; font-size: 1.15rem; }
.pc-next-stake { display: none; width: 9px; height: 13vh; margin-top: -4px; background: var(--ink-2); box-shadow: 2px 0 0 var(--shadow); clip-path: polygon(0 0, 100% 0, 100% 92%, 50% 100%, 0 92%); }
@media (max-width: 1100px) { .pc-next { display: none; } }
/* only on the issue itself: the archive and Your Record are wider and the sign would sit on them */
body:has(#stage > .view-head) .pc-next { display: none; }
/* the top bar's copy of the countdown only shows where the scene's one can't be seen */
.tb-next.has-scene { display: none; }
@media (max-width: 1100px) { body[data-game="paper-cuts"] .tb-next.has-scene { display: inline-flex; } }
@media (max-aspect-ratio: 3/2) { body[data-game="case-file"] .tb-next.has-scene { display: inline-flex; } }
@media (max-width: 1080px) { body[data-game="treat"] .tb-next.has-scene { display: inline-flex; } }

/* next-puzzle countdown, in the top bar (pages without a scene of their own) */
.tools { align-items: center; }
.tb-next { display: inline-flex; align-items: baseline; gap: 6px; margin-right: 8px; font-family: var(--font-type); font-size: 0.8rem; white-space: nowrap; }
.tb-next b { font-family: 'Archivo Black', sans-serif; font-weight: normal; font-size: 0.95rem; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
button.tb-next.ready { border: 0; cursor: pointer; padding: 6px 10px 5px; background: var(--ink-1); color: var(--paper-card); font-family: 'Archivo Black', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; box-shadow: 2px 2px 0 var(--shadow); }
@media (max-width: 560px) { .tb-next > span { display: none; } }

.review { margin-top: 28px; }
.review h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.05rem; margin: 0 0 12px; text-align: center; }
.review ol { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.review li {
  counter-increment: q;
  position: relative;
  padding: 12px 0 12px 46px;
  border-top: 1.5px dashed rgba(29, 26, 26, 0.4);
}
.review li::before {
  content: counter(q);
  position: absolute;
  left: 0; top: 12px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  color: var(--paper);
  background: var(--ink-2);
}
.review li.right::before { background: var(--ink-1); }
.review .rq { font-size: 0.88rem; opacity: 0.75; }
.review .ra { font-family: var(--font-display); text-transform: uppercase; margin: 2px 0; line-height: 1.2; }
.review .rf { font-size: 0.88rem; margin: 4px 0 0; }
.review .ry { font-size: 0.82rem; }
.review .ry s { opacity: 0.6; }

/* ---------- stats ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin-bottom: 22px; }
.stat-grid div { font-size: 0.72rem; text-transform: uppercase; line-height: 1.2; }
.stat-grid b { display: block; font-family: var(--font-display); font-size: 2rem; }

.dist { display: grid; gap: 6px; }
.dist-row { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; font-family: var(--font-display); }
.dist-bar {
  background: var(--ink-2);
  color: var(--paper);
  padding: 3px 16px 1px 8px;   /* room for the count clear of the ribbon's notched tip */
  min-width: 40px;
  width: var(--w);
  text-align: right;
  font-size: 0.85rem;
  clip-path: polygon(0 0, 100% 6%, 98% 50%, 100% 94%, 0 100%);
}
.dist-row.today .dist-bar { background: var(--ink-1); }

.toast {
  position: fixed;
  left: 50%; top: 18px;
  transform: translateX(-50%) rotate(-1deg);
  z-index: 2000;
  background: var(--ink-2);
  color: var(--paper);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 18px 8px;
  white-space: nowrap;
  max-width: calc(100vw - 16px);
  animation: toast 2.2s ease both;
  pointer-events: none;
}
@keyframes toast { 0% { opacity: 0; transform: translateX(-50%) translateY(-14px); } 12%, 82% { opacity: 1; transform: translateX(-50%) rotate(-1deg); } 100% { opacity: 0; } }

/* ---------- phones ---------- */

@media (max-width: 520px) {
  body { font-size: 16px; }
  .sheet { padding: 26px 18px 24px; }
  .q-prompt { font-size: 1.12rem; }
  .q-clue { font-size: 1.2rem; }
  .progress { gap: 6px; }
  .progress span { width: 27px; height: 27px; }  #scene { height: 30vh; }
  .stat-grid b { font-size: 1.6rem; }
}

/* ---------- question bar: issue + date left, progress right ---------- */

.q-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -10px 0 30px; }
.q-issue { display: flex; align-items: center; gap: 10px; font-family: var(--font-type); font-size: 1rem; }
.q-bar .progress { margin: 0; gap: 6px; }
.q-bar + .card { margin-top: 0; }

/* progress markers: small cut-paper chips */
.progress span {
  width: 32px; height: 34px;
  outline: 0;
  background: var(--paper-card);
  color: var(--ink-2);
  box-shadow: 1.5px 2px 0 var(--shadow);
  clip-path: polygon(4% 6%, 96% 0, 100% 92%, 2% 100%);
  opacity: 0.55;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.progress span.now { opacity: 1; transform: translateY(-4px) rotate(var(--r, 0deg)); box-shadow: inset 0 -4px 0 var(--ink-1), 1.5px 2px 0 var(--shadow); outline: 0; }
.progress span.right { opacity: 1; background: var(--ink-1); color: var(--paper-card); }
.progress span.wrong { opacity: 1; background: var(--ink-2); color: var(--paper-card); }

/* Case Files question: no title above the file */
.cf-file-stack.q { margin-top: 6px; }

/* ---------- close answers (half a point) ---------- */
.stamp.close { color: var(--ink-1); border-style: dashed; box-shadow: none; transform: rotate(-6deg); }
.progress span.close {
  opacity: 1;
  color: var(--ink-2);
  background-color: var(--paper-card);
  background-image: radial-gradient(var(--ink-1) 38%, transparent 41%);
  background-size: 6px 6px;
}
.review li.close::before { background-color: var(--paper-card); background-image: radial-gradient(var(--ink-1) 38%, transparent 41%); background-size: 6px 6px; color: var(--ink-2); }
.reveal .why { font-size: 0.9rem; margin-top: 4px; color: var(--ink-1); font-weight: 700; }

/* results footer: Archive on the left, the other game on the right */
.end-links { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 26px; }
.end-links .el-left { justify-self: start; }
.end-links .el-right { justify-self: end; }
@media (max-width: 560px) {
  .end-links { grid-template-columns: 1fr 1fr; }
  .end-links .el-mid { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

/* chip marks centred; result squares show the share emoji */
.progress span { display: grid; place-items: center; line-height: 1; font-family: var(--font-display); }
/* ---------- results: issue number on the card ---------- */
/* ---------- the answers as a till receipt ---------- */
.receipt-wrap { width: min(440px, 100%); margin: 30px auto 0; filter: drop-shadow(3px 5px 0 var(--shadow)); }
.receipt {
  --zz: 12px;
  background: #fbf8f1;
  color: #2a2522;
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.35;
  padding: 26px 22px 30px;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zz) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zz) 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zz) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zz) 51% repeat-x;
}
.rc-head { text-align: center; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.rc-shop { font-family: 'Archivo Black', sans-serif; font-size: 1.4rem; letter-spacing: 0.12em; margin-bottom: 2px; }
.rc-rule { border-top: 2px dashed rgba(42, 37, 34, 0.55); margin: 12px 0; }
.rc-items { list-style: none; margin: 0; padding: 0; }
.rc-items li { padding: 6px 0 8px; }
.rc-items li + li { border-top: 1px dotted rgba(42, 37, 34, 0.35); }
.rc-line { display: flex; align-items: baseline; gap: 8px; font-weight: 700; text-transform: uppercase; }
.rc-q { flex: none; }
.rc-a { flex: 0 1 auto; }
.rc-dots { flex: 1 1 20px; border-bottom: 2px dotted rgba(42, 37, 34, 0.45); transform: translateY(-4px); }
.rc-mark { flex: none; font-size: 1rem; }
.rc-sub { padding-left: 28px; font-size: 0.78rem; opacity: 0.75; }
.rc-fact { padding-left: 28px; font-size: 0.78rem; margin-top: 2px; opacity: 0.85; }
.rc-fact b { font-weight: 700; }
.rc-total { display: flex; justify-content: space-between; font-family: 'Archivo Black', sans-serif; font-size: 1.15rem; letter-spacing: 0.06em; }
.rc-foot { text-align: center; font-size: 0.74rem; letter-spacing: 0.08em; }
.receipt-wrap.solo { margin-top: 0; }
/* the copy button sits right on the barcode, with a red scanner line through it */
.rc-scan { position: relative; display: flex; align-items: center; justify-content: center; margin-top: 14px; }
.rc-scan::before { content: ''; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: var(--ink-1); box-shadow: 0 0 6px var(--ink-1); opacity: 0.8; }
.rc-scan .btn-wrap { position: absolute; }
.rc-barcode {
  height: 64px; margin: 0 auto; width: 84%;
  background: repeating-linear-gradient(90deg, #2a2522 0 2px, transparent 2px 4px, #2a2522 4px 5px, transparent 5px 8px, #2a2522 8px 11px, transparent 11px 13px);
}

/* results stats: the same size on both games */

/* Paper Cuts: the verdict stamp sits on the right of the revealed answer, level with the film title */
.reveal { position: relative; }
.reveal .stamp.q-stamp { top: 6px; right: 6px; }
.reveal .answer, .reveal .yours, .reveal .why { padding-right: 190px; }

/* Classic / Easy switch in the top bar: the chosen mode is a raised red chip with a tick,
   the other is faint, flat and dashed, so it reads as "not this one" */
/* on a game's intro: top right of the window (it's inside the page, so it scrolls under the nav like everything else) */
.mode-switch { position: absolute; z-index: 3; top: -14px; right: calc(50% - 50vw + 18px); display: flex; align-items: center; gap: 8px; }
@media (max-width: 560px) {
  .mode-switch { position: relative; top: 0; right: auto; justify-content: center; margin: 2px auto 14px; }
}
/* the mode a finished game was played in: a little rubber stamp in the top-right corner */
.receipt, .cf-report { position: relative; }
.mode-stamp {
  position: absolute; z-index: 3; top: 30px; right: 14px; transform: rotate(8deg);
  font-family: 'Archivo Black', sans-serif; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-1); padding: 3px 7px 2px; border: 2px solid currentColor; box-shadow: inset 0 0 0 1.5px var(--paper-card), inset 0 0 0 2.5px currentColor;
  mix-blend-mode: multiply; opacity: 0.85;
  -webkit-mask-image: linear-gradient(#000, #000), var(--noise); -webkit-mask-composite: source-out;
  mask-image: linear-gradient(#000, #000), var(--noise); mask-composite: subtract;
}
.mode-switch button {
  cursor: pointer; padding: 4px 8px 3px; font-family: 'Archivo Black', sans-serif; font-size: 0.68rem;
  letter-spacing: 0.06em; text-transform: uppercase; background: transparent; color: var(--ink-2);
  border: 1.5px dashed rgba(28, 23, 23, 0.35); opacity: 0.7; transition: opacity .15s;
}
.mode-switch button:not(.on):hover { opacity: 0.8; }
.mode-switch button.on {
  background: var(--ink-1); color: var(--paper-card); border: 1.5px solid var(--ink-1); opacity: 1;
  box-shadow: 2px 2px 0 var(--shadow); transform: rotate(-2deg); cursor: default;
}
.mode-switch button.on::before { content: '\2713'; margin-right: 4px; }
.mode-switch button:focus-visible { outline: 2px dashed var(--ink-1); outline-offset: 2px; }
@media (max-width: 560px) { .mode-switch button { padding: 3px 5px 2px; font-size: 0.6rem; } }


/* Back buttons on the archive and record pages: only as wide as their label */
.btn.back-btn { padding: 10px 15px 8px; }

/* phones: one row. Each game tab becomes a small icon in its own style; tools and countdown sit beside them */
.tab-mini { display: none; }
@media (max-width: 560px) {
  .topbar { flex-wrap: nowrap; gap: 6px; padding: 8px 10px; }
  .game-tabs { flex: 0 1 auto; flex-wrap: nowrap; gap: 8px; }
  .game-tab { padding: 2px; }
  .game-tab > :not(.tab-mini):not(.tab-ball) { display: none; }
  .tab-mini { display: inline-flex; }
  .tab-mini svg { width: 36px; height: 27px; filter: drop-shadow(1.5px 2px 0 var(--shadow)); }
  .tab-ball svg { width: 26px; height: 30px; }
  .tools { flex: 0 0 auto; gap: 0; }
  .tools .icon-btn { width: 32px; height: 32px; }
}


/* ---------- phones: tidy question screens, results and back buttons ---------- */
@media (max-width: 560px) {
  /* the question bar keeps the 1-5 boxes beside the issue number and date */
  .q-bar { flex-wrap: nowrap; gap: 8px; margin: -6px 0 18px; }
  .q-issue { gap: 6px; font-size: 0.82rem; white-space: nowrap; min-width: 0; }
  .q-issue .strip { font-size: 0.78rem; padding: 4px 8px 2px; }
  .q-bar .progress { gap: 4px; flex: 0 0 auto; }
  .q-bar .progress span { width: 24px; height: 26px; font-size: 0.8rem; }
  /* the genre wraps to its own line here, so it sits on the left */
  .strip.q-sub { margin-left: 0; }
  /* no "pick from the list" note; the skip link stays on the right */
  .q-note { display: none; }
  .q-actions { justify-content: flex-end; }
  /* results: previous day and the archive side by side, the other game underneath */
  .end-links { grid-template-columns: 1fr 1fr; gap: 12px 10px; }
  .end-links .el-mid { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .end-links .el-left { grid-column: 1; grid-row: 2; justify-self: start; }
  .end-links .el-right { grid-column: 2; grid-row: 2; justify-self: end; }
  .end-links .btn { font-size: 0.82rem; padding: 10px 14px 8px; }
  /* back: just the arrow */
  body .view-head .btn.back-btn { font-size: 0; padding: 8px 14px 6px; letter-spacing: 0; }
  body .view-head .btn.back-btn::before { content: '←'; font-size: 1.3rem; line-height: 1; }
}

/* archive pages: newer / page x of y / older */
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 26px 0 10px; }
.pager-n { font-family: var(--font-type); font-size: 0.9rem; color: var(--ink-2); background: var(--paper-card); padding: 6px 12px 5px; box-shadow: 2px 2px 0 var(--shadow); transform: rotate(-1deg); white-space: nowrap; }
.pager .btn[disabled] { opacity: 0.35; }
/* on an intro screen: step to the issue before or after this one */
/* the issue you're on in the back issues: an ACTIVE stamp in its top-right corner */
.mode-stamp.issue-active { top: 12px; right: 12px; }

/* cut-paper arrows on back / forward buttons */
.cut-arrow { width: 1.25em; height: 0.9em; display: block; }
.arrow-l, .arrow-r { display: inline-flex; align-items: center; }
.arrow-r .cut-arrow { transform: scaleX(-1); }
/* the back button has its own look (dark ink), so it isn't mistaken for the day / page buttons */
body .btn.back-btn { --bg: var(--ink-2); --fg: var(--paper); }
@media (max-width: 560px) {
  body .view-head .btn.back-btn { font-size: 1rem; padding: 9px 13px 7px; }
  body .view-head .btn.back-btn::before { content: none; }
  body .view-head .btn.back-btn > span:not(.arrow-l) { display: none; }
}

/* the end of a game: day arrows either side of the Classic / Popular flipper, the other game underneath */
.mode-switch.end-switch { position: static; justify-content: center; margin: 0; }
.mode-switch.end-switch button:not(.on) { background: var(--paper-card); opacity: 0.9; }
/* even gaps between the nav tabs: trim the ransom title's trailing space and the ball's empty margins */
.tab-ransom.ransom { margin-right: -4px; }
.tab-ball svg { margin: 0 -4px; }

/* Watchlist tab: a cinema marquee, gold bulbs top and bottom, each letter on its own little marquee card */
.tab-marquee {
  display: inline-flex; align-items: center; gap: 2px; padding: 12px 9px; margin-left: -4px; position: relative;
  background-color: #2a1418;
  background-image: radial-gradient(circle, #f6d06a 1.5px, rgba(246, 208, 106, 0.25) 2.2px, transparent 2.8px), radial-gradient(circle, #f6d06a 1.5px, rgba(246, 208, 106, 0.25) 2.2px, transparent 2.8px);
  background-size: 8px 7px, 8px 7px; background-position: 2px 0, 2px 100%; background-repeat: repeat-x;
  box-shadow: 2px 2px 0 var(--shadow);
}
.tab-marquee .ml {
  display: inline-block; min-width: 12px; padding: 2px 2px 1px; text-align: center;
  background: #f7f1e3; color: #1d1a1a; font-family: 'Archivo Black', sans-serif; font-size: 0.8rem; line-height: 1.05;
  transform: rotate(var(--r, 0deg)); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.tab-marquee .ml.red { color: var(--ink-1); }

/* results flipper: an edition already finished gets a little "played" tag hanging under its chip */
.mode-switch.end-switch { padding-bottom: 14px; }
.mode-switch.end-switch button { position: relative; }
.mode-switch.end-switch button.played::after {
  content: 'played'; position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%) rotate(-2deg);
  font-family: var(--font-type); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: lowercase;
  color: var(--ink-2); background: var(--paper-card); padding: 1px 5px 0; box-shadow: 1px 1px 0 var(--shadow); white-space: nowrap;
}

/* nav balance: a smaller Case Files stamp, a bigger marquee and crystal ball */
.tab-stamp span { font-size: 0.95rem; }
.tab-marquee .ml { font-size: 0.9rem; min-width: 13px; }
.tab-ball svg { width: 41px; height: 47px; margin: -3px -5px -3px -8px; }
/* on the Séance page itself the ball keeps swirling and twinkling */
.game-tab.active .tab-ball .orb-mist { animation: orb-swirl 2.4s linear infinite; }
.game-tab.active .tab-ball .orb-spark { animation: orb-twinkle 0.9s ease-in-out infinite alternate; }
.game-tab.active .tab-ball .orb-spark.s2 { animation-delay: 0.45s; }
@media (max-width: 560px) { .tab-ball svg { width: 28px; height: 32px; margin: 0 -3px; } }

/* results flipper: chips sit straight and centred on the day buttons; the "played" tag hangs straight, overlapping the chip's bottom edge */
.mode-switch.end-switch { padding-bottom: 0; align-self: center; }
.mode-switch.end-switch button.on { transform: none; }
.mode-switch.end-switch button.played::after { top: calc(100% - 6px); transform: translateX(-50%); z-index: 1; }

/* nav: the Case Files stamp is the page's own title scaled down: bigger caps, the same letter spacing and
   double frame, and it fills its paper label the way the big one does */
.tab-stamp { padding: 4px 6px; }
.tab-stamp span {
  font-size: 1.2rem; letter-spacing: 0.14em; padding: 0.1em 0.38em 0.12em 0.52em;
  border-width: 2px; box-shadow: inset 0 0 0 1.5px var(--paper-card), inset 0 0 0 3px currentColor;
}
.tab-marquee { padding-top: 7px; padding-bottom: 7px; }
.tab-marquee .ml { font-size: 1rem; }
/* ...now a length of film like its small icon: square sprocket holes along both edges, each letter a straight
   frame, slivers of the next frames at the ends, and zigzag edges where the strip was cut */
.tab-marquee { background: none; box-shadow: none; isolation: isolate; filter: drop-shadow(2px 2px 0 var(--shadow)); }
.tab-marquee::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background-color: #231517;
  background-image:
    linear-gradient(90deg, #f7f1e3 0 3px, transparent 3px 7px), linear-gradient(90deg, #f7f1e3 0 3px, transparent 3px 7px),
    linear-gradient(rgba(247, 241, 227, .55), rgba(247, 241, 227, .55)), linear-gradient(rgba(247, 241, 227, .55), rgba(247, 241, 227, .55));
  background-size: 7px 3px, 7px 3px, 2px calc(100% - 22px), 2px calc(100% - 22px);
  background-position: 4px 3.5px, 4px calc(100% - 3.5px), 3px center, calc(100% - 3px) center;
  background-repeat: repeat-x, repeat-x, no-repeat, no-repeat;
  clip-path: polygon(0 0, 100% 0, calc(100% - 2px) 25%, 100% 50%, calc(100% - 2px) 75%, 100% 100%, 0 100%, 2px 75%, 0 50%, 2px 25%);
}
.tab-marquee .ml { transform: none; border-radius: 1px; box-shadow: none; }
.tab-ball svg { width: 38px; height: 44px; margin: -2px -4px -2px -7px; }
@media (max-width: 560px) { .tab-ball svg { width: 28px; height: 32px; margin: 0 -3px; } }

/* archive description: tucked closer to the title, more room before the grid */
.view-sub { margin: 0 0 18px; }

/* the "played" tag hangs a little lower, still overlapping the chip's bottom edge */
.mode-switch.end-switch button.played::after { top: calc(100% - 3px); }
/* intros: the day row (prev · Classic / Popular · next) sits under the card, like on the results */
.end-wrap.intro-row { position: relative; z-index: 3; width: 100%; }
.end-wrap.intro-row .end-links { margin-top: 18px; }

/* the Classic / Popular chips under intros and results: a bit bigger; the "played" tag gets a tiny all-round shadow */
.mode-switch.end-switch { gap: 10px; }
.mode-switch.end-switch button { font-size: 0.8rem; padding: 6px 12px 5px; }
.mode-switch.end-switch button.played::after { font-size: 0.68rem; box-shadow: 0 0 2px rgba(28, 23, 23, 0.5); }
@media (max-width: 560px) { .mode-switch.end-switch button { font-size: 0.72rem; padding: 5px 10px 4px; } }

/* the unselected Classic / Popular chip: solid and fully opaque on every game (Case Files had it first) */
.mode-switch button:not(.on), .mode-switch.end-switch button:not(.on) { border-style: solid; border-color: rgba(28, 23, 23, 0.45); opacity: 1; background: var(--paper-card); }

/* swapping Classic / Popular: the stage fades out and back in, no page reload */
#stage { transition: opacity 0.16s ease; }
#stage.swapping { opacity: 0; }

/* bats: wings beat from the shoulders and the bat drifts in a slow loop (instead of squashing the whole bat) */
.scene-svg .bat-drift { animation: bat-drift 7s ease-in-out infinite; }
.scene-svg .wing-l, .scene-svg .wing-r { transform-box: fill-box; animation: wing-l 0.42s ease-in-out infinite alternate; }
.scene-svg .wing-l { transform-origin: 100% 40%; }
.scene-svg .wing-r { transform-origin: 0% 40%; animation-name: wing-r; }
@keyframes wing-l { from { transform: rotate(-22deg) scaleY(1); } to { transform: rotate(28deg) scaleY(0.75); } }
@keyframes wing-r { from { transform: rotate(22deg) scaleY(1); } to { transform: rotate(-28deg) scaleY(0.75); } }
@keyframes bat-drift { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(14px, -8px); } 50% { transform: translate(4px, 6px); } 75% { transform: translate(-12px, -4px); } }
@media (prefers-reduced-motion: reduce) { .scene-svg .bat-drift, .scene-svg .wing-l, .scene-svg .wing-r { animation: none; } }

/* the figure in the haunted house's tower window paces side to side behind the glass */
.scene-svg .pace { transform-box: fill-box; animation: pace 11s ease-in-out infinite; }
@keyframes pace { 0%, 100% { transform: translateX(-6px); } 45%, 55% { transform: translateX(6px); } }

/* the abducted cow turns slowly as it floats up the beam; rings climb the beam; the saucer's rim lights chase */
.scene-svg .tumble { transform-box: fill-box; transform-origin: center; animation: tumble 9s ease-in-out infinite; }
@keyframes tumble { 0% { transform: translateY(14px) rotate(-18deg); } 50% { transform: translateY(-14px) rotate(14deg); } 100% { transform: translateY(14px) rotate(-18deg); } }
.scene-svg .ufo-light { animation: ufo-light 1.05s steps(1) infinite; }
@keyframes ufo-light { 0%, 100% { fill: var(--paper-card); } 50% { fill: var(--ink-1); } }

/* a fly buzzing round the teleporter pod, wings a blur */
.scene-svg .fly-buzz { animation: fly-buzz 5s ease-in-out infinite; }
@keyframes fly-buzz {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(18px, -14px) rotate(-12deg); }
  40% { transform: translate(-6px, -24px) rotate(8deg); }
  60% { transform: translate(-20px, -6px) rotate(-6deg); }
  80% { transform: translate(6px, 8px) rotate(10deg); }
}
.scene-svg .fly-wings { transform-box: fill-box; transform-origin: 50% 100%; animation: fly-wings 0.08s linear infinite alternate; }
@keyframes fly-wings { to { transform: scaleY(0.4); } }
@media (prefers-reduced-motion: reduce) { .scene-svg .fly-buzz, .scene-svg .fly-wings { animation: none; } }

/* the lab window: the lightning bolt flashes now and then */
.scene-svg .storm { animation: storm 6s steps(1) infinite; }
@keyframes storm { 0%, 100% { opacity: 0; } 62% { opacity: 1; } 64% { opacity: 0; } 67% { opacity: 1; } 72% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scene-svg .storm { animation: none; opacity: 1; } }

/* Paper Cuts hint: a small button under the answer box; once used, the film's tags as little paper tags */
.q-hint-label { font-family: var(--font-type); font-size: 0.8rem; margin: 0 0 8px; opacity: 0.75; }
.q-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.q-tags li {
  font-family: var(--font-type); font-size: 0.78rem; line-height: 1.2; padding: 4px 9px 3px;
  background: var(--paper-card); box-shadow: inset 0 0 0 1.5px rgba(28, 23, 23, 0.5), 1.5px 1.5px 0 var(--shadow);
}

/* the answer note sits right under the answer box; the hint button shares the row with "I don't know" */
.q-form .q-note { margin: 6px 0 0; }/* every stamp sits on the right of its card, so they all lean clockwise */
.stamp { transform: rotate(9deg); }
.stamp.close { transform: rotate(6deg); }
.stamp.wrong { transform: rotate(8deg); }
@keyframes stamp-in { 0% { opacity: 0; transform: scale(2.4) rotate(22deg); } 100% { opacity: 1; } }

/* the hint: once used, its button stays put but is crossed out; the tags sit on a second torn page below */
.q-actions .used .btn { text-decoration: line-through; text-decoration-thickness: 2px; opacity: 0.5; cursor: default; pointer-events: none; }
.q-hint-card { margin-top: 14px; }
.q-hint-card:empty { display: none; }
.q-hint-card .sheet { text-align: center; padding-top: 16px; padding-bottom: 18px; }
.q-hint-title { font-family: 'Archivo Black', sans-serif; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.95rem; margin: 0 0 10px; }
.q-hint-card .q-hint-label { margin: 10px 0 0; }
/* the hint page's title in the same hand-lettered face as the question sheet's lede */
.q-hint-title { font-family: var(--font-hand); font-weight: normal; text-transform: none; letter-spacing: 0; font-size: 1.5rem; }
/* Paper Cuts: the hint and "I don't know" buttons a shade brighter than the question sheet */
body:not([data-game="case-file"]) .q-actions .btn.paper { --bg: #fffdf6; }
/* ...made a shade darker than the sheet instead, the colour of the tape holding it down */
body:not([data-game="case-file"]) .q-actions .btn.paper { --bg: #e6dcc2; }

/* the Case Files tab in the nav is pinned to the board, on every page */
.game-tab .tab-stamp { position: relative; }
.game-tab .tab-stamp::after { content: ''; position: absolute; left: 50%; top: -3px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: radial-gradient(circle at 34% 34%, rgba(251, 246, 230, 0.8) 0 18%, transparent 22%), var(--ink-1);
  filter: drop-shadow(1.5px 2.5px 1.5px rgba(28, 23, 23, 0.42)); }

/* ---------- Clippings home link: a scrap of red tape at the left of every game's top bar ----------
   The bar is 980px at most and full with the game tabs, so on wide screens the tape hangs just outside it on the left;
   narrower, it shrinks to just the scissors. */
.home-link {
  flex: none; order: -1;
  font-family: 'Archivo Black', sans-serif; font-size: 0; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--paper-card, #f5eedd);
  padding: 7px 10px; transform: rotate(-3deg);
  /* the red tape is drawn on ::after so the torn shape can cast a shadow (a clip-path would cut it off) */
  position: relative; isolation: isolate; filter: drop-shadow(1.5px 2px 0 rgba(28, 23, 23, 0.32));
  transition: transform .12s;
}
.home-link::after {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink-1, #d7262e);
  clip-path: polygon(0 8%, 6% 0, 14% 6%, 24% 0, 36% 5%, 50% 0, 62% 6%, 76% 1%, 88% 7%, 100% 2%, 97% 50%, 100% 96%, 88% 92%, 74% 100%, 60% 93%, 46% 100%, 32% 94%, 18% 100%, 6% 93%, 0 98%, 3% 50%);
}
.home-link::before { content: '✂'; font-size: 16px; }
.home-link:hover { transform: rotate(-1deg) scale(1.08); }
.home-link:focus-visible { outline: 2px dashed var(--ink-2); outline-offset: 3px; }
.home-link + .game-tabs { margin-right: auto; }
@media (min-width: 561px) { .home-link { margin-right: 10px; } }
@media (min-width: 1320px) {   /* only when there is room for it (and its hover swell) to the left of the bar */
  .home-link { position: absolute; right: calc(100% + 14px); top: 50%; translate: 0 -50%; font-size: 14px; padding: 6px 12px 6px 11px; }
  .home-link::before { content: '✂ '; font-size: 14px; }
}
/* phones: the bar is full, so the countdown steps aside for the ✂ (the "new issue is out" button still shows) */
@media (max-width: 560px) {
  .tools span.tb-next { display: none; }
  .home-link { padding: 6px 8px; }
  .home-link::before { font-size: 14px; }
}

/* phones: every small tab sized by what's actually drawn (not its box), all about the same height, centred on one line,
   with the same gap between drawings; the empty space inside each icon's box is trimmed off with negative margins */
@media (max-width: 560px) {
  .game-tabs { gap: 10px; }
  .game-tab { padding: 0; }
  .game-tab[aria-label="Paper Cuts"] .tab-mini svg { width: 36.28px; height: 27.21px; margin: -1.11px -0.36px -1.12px -0.31px; overflow: visible; }
  .game-tab[aria-label="Case Files"] .tab-mini svg { width: 41.82px; height: 31.36px; margin: -5.23px -7.63px -3.14px -7.63px; overflow: visible; }
  .game-tab[aria-label="Trick or Treat"] .tab-mini svg { width: 32.5px; height: 35.75px; margin: -4.31px -2.52px -5.44px -2.6px; overflow: visible; }
  .game-tab[aria-label="Watchlist"] .tab-mini svg { width: 36.67px; height: 27.5px; margin: -2.75px -0.92px -2.75px -0.92px; overflow: visible; }
  .game-tab[aria-label="Ask the Stars"] .tab-ball svg { width: 25.96px; height: 29.86px; margin: -0px -0px -2.86px -0px; overflow: visible; }
  /* the bar is full on phones: the countdown steps aside (beats each game's own "show it here" rule); the new-issue button still shows */
  body .topbar .tools span.tb-next { display: none; }
  .home-link { padding: 4px 7px; line-height: 1; margin-right: 4px; }
  .home-link::before { font-size: 15px; }
}

/* web: the other games' small icons, sized by what's drawn (about 30px tall), centred on one line, with even gaps */
@media (min-width: 561px) {
  .game-tab.compact:not(.active), .game-tab[aria-label="Ask the Stars"]:not(.active) { padding-left: 0; padding-right: 0; }
  .game-tab.compact[aria-label="Paper Cuts"]:not(.active) .tab-mini svg { width: 43.56px; height: 32.67px; margin: -1.33px -0.44px -1.34px -0.37px; overflow: visible; }
  .game-tab.compact[aria-label="Case Files"]:not(.active) .tab-mini svg { width: 52.73px; height: 39.55px; margin: -6.59px -9.62px -3.95px -9.62px; overflow: visible; }
  .game-tab.compact[aria-label="Trick or Treat"]:not(.active) .tab-mini svg { width: 40px; height: 44px; margin: -5.3px -3.1px -6.7px -3.2px; overflow: visible; }
  .game-tab.compact[aria-label="Watchlist"]:not(.active) .tab-mini svg { width: 50px; height: 37.5px; margin: -3.75px -1.25px -3.75px -1.25px; overflow: visible; position: relative; top: 2px; }
  .game-tab[aria-label="Ask the Stars"]:not(.active) .tab-ball svg { width: 32.69px; height: 37.6px; margin: -0px -0px -3.6px -0px; overflow: visible; }
}
@media (min-width: 561px) and (max-width: 900px) { .game-tab.compact:not(.active) .tab-mini svg, .game-tab:not(.active) .tab-ball svg { zoom: .85; } }

/* web: even spacing in the nav. Each tab's margins cancel the empty space (or the overhang, drop shadows included)
   around what it actually draws, measured per tab, so the gap you see between any two drawings is --tab-gap, the open
   game's tab included. (--tab-open would add extra room either side of the open tab; Rowan preferred none.) */
@media (min-width: 561px) {
  .game-tabs { --tab-gap: 22px; --tab-open: 0px; gap: var(--tab-gap); }
  .game-tab { margin: 0 var(--mr, 0px) 0 var(--ml, 0px); }
  .game-tab.active { margin: 0 calc(var(--mr, 0px) + var(--tab-open)) 0 calc(var(--ml, 0px) + var(--tab-open)); }
  .game-tab[aria-label="Paper Cuts"] { --ml: 0.7px; --mr: 1.5px; }
  .game-tab[aria-label="Paper Cuts"].active { --ml: -3.1px; --mr: 1.2px; }
  .game-tab[aria-label="Case Files"] { --ml: 0px; --mr: 2.2px; }
  .game-tab[aria-label="Case Files"].active { --ml: -4px; --mr: -5px; }
  .game-tab[aria-label="Trick or Treat"] { --ml: -2.3px; --mr: -1.3px; }   /* the flat nav star */
  .game-tab[aria-label="Trick or Treat"].active { --ml: -5px; --mr: -5.3px; }
  .game-tab[aria-label="Watchlist"] { --ml: 0px; --mr: 1.5px; }
  .game-tab[aria-label="Watchlist"].active { --ml: -9px; --mr: -11px; }
  .game-tab[aria-label="Ask the Stars"].active { --ml: -2.1px; --mr: -4.4px; }
}
@media (min-width: 561px) and (max-width: 900px) { .game-tabs { --tab-gap: 14px; --tab-open: 0px; } }
@media (min-width: 561px) and (max-width: 820px) { .game-tabs { --tab-gap: 10px; --tab-open: 0px; } }   /* tighter, so the row still fits on one line */
@media (min-width: 561px) and (max-width: 780px) { .game-tabs { --tab-gap: 7px; --tab-open: 0px; } }

/* the backdrop scene can spill past the sides (trees, a moon) but never makes the page scroll sideways; it may still
   rise above its box */
#scene { overflow-x: clip; overflow-y: visible; }
/* nothing on a game page (a strip of tape on a card's corner, say) may poke past the screen's sides on a phone -- it
   would widen the page and the phone would zoom out to fit it */
main.stage { overflow-x: clip; }
