/* pinfact — "vintage expedition map + 80s cockpit" theme */
:root {
  --paper: #e9dbb6;
  --paper-light: #f4e9cc;
  --ink: #3a2816;
  --muted: #7a6146;
  --rule: rgba(90, 60, 30, 0.28);
  --red: #9b1c1c;
  --navy: #1f3b57;
  --metal: #2a2723;
  --metal-edge: #14120f;
  --amber: #ffb000;
  --needle: #ff8a1c;
  --serif: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --caps: "IM Fell English SC", "Iowan Old Style", Georgia, serif;
  --type: "Special Elite", "Courier New", monospace;
  --lcd: "VT323", "Consolas", monospace;
  /* one type scale for the slip and the receipt: nothing under 12px */
  --fs-label: 12px;  /* typewriter caps labels, captions, small numbers */
  --fs-small: 14px;  /* chips, picks, the question line, side notes */
  --fs-body: 16px;   /* facts and sentences */
  --fs-name: 20px;   /* answer names, badges, a leg's points */
  --fs-score: 28px;  /* the round's points */
  --fs-total: 44px;  /* the day's total */
}

* { box-sizing: border-box; }

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

/* ---------- Paper map backdrop ---------- */

#paper {
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    /* soft light behind the globe */
    radial-gradient(circle at 50% 52%, rgba(255, 248, 228, 0.75) 0, rgba(255, 248, 228, 0) 46%),
    /* gently darker, aged edges */
    radial-gradient(ellipse at center, transparent 55%, rgba(110, 70, 30, 0.22) 88%, rgba(70, 40, 15, 0.38) 100%),
    var(--paper);
}
/* fine paper grain */
#paper::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.22 0 0 0 0 0.1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.25;
  mix-blend-mode: multiply;
}
/* mottled foxing and faint fibres, like old map paper */
#paper::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.06 0.5' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.27 0 0 0 0 0.12 0 0 0 2.6 -1.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000' preserveAspectRatio='none'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004' numOctaves='4' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0 0.12 0 0 0 2 -0.95'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  background-size: 600px 600px, cover;
  background-repeat: repeat, no-repeat;
  opacity: 0.28;
  mix-blend-mode: multiply;
}

#globe { position: fixed; inset: 0; cursor: grab; touch-action: none; } /* fingers move the globe, never the page */
#globe:active { cursor: grabbing; }

/* The map (streetmap.js): drawn under the globe, which takes all the input. */
#streetmap { position: fixed; inset: 0; pointer-events: none; }
#streetmap .streetmap-canvas { position: absolute; inset: 0; }
/* the globe's light and shade, over the globe; sized by streetmap.js (the globe is always centred) */
.streetmap-shade {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 248, 225, 0.22) 0, rgba(255, 248, 225, 0) 38%),
    radial-gradient(circle at 42% 40%, rgba(60, 38, 15, 0) 52%, rgba(60, 38, 15, 0.2) 82%, rgba(45, 28, 10, 0.42) 100%);
  box-shadow: inset 0 0 0 1px rgba(60, 38, 15, 0.35);
}
/* map credit, tucked under the top bar and clear of the ticket */
/* the map's credits (required by its licences): one faint line, bottom left (above the ticket on phones) */
.map-credits {
  /* along the very top edge, in the middle: clear of the ticket and the slip at any size */
  position: fixed; top: 2px; left: 50%; transform: translateX(-50%); z-index: 6;
  white-space: nowrap; margin: 0;
  font: 9px/1.2 var(--type); letter-spacing: 0.02em; color: var(--muted); opacity: 0.6;
}
.map-credits a { color: inherit; text-decoration: none; }
.map-credits a:hover { text-decoration: underline; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px;
  pointer-events: none;
  z-index: 5; /* stay above the results overlay so Reset is reachable */
}
/* Progress: a simple question counter. */
.progress { list-style: none; margin: 0; padding: 0; }
.qcount {
  font-family: var(--type); font-size: 14px; letter-spacing: 0.08em; color: var(--muted);
  padding: 3px 10px;
  background: var(--paper-light);
  border: 1px solid #b89a6a;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(60, 35, 10, 0.2);
}
.qcount b { font-weight: normal; color: var(--red); font-size: 18px; }
.progress:not(.in) { visibility: hidden; } /* revealed by the intro */
.topbar-right { display: flex; align-items: center; gap: 12px; }
/* Local testing only: clears today's progress */
.reset-btn {
  pointer-events: auto;
  font-family: var(--type);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--paper-light);
  border: 1.5px dashed var(--muted);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
}
.reset-btn:hover { border-color: var(--red); color: var(--red); }
/* Sound on/off: a small paper tab with a speaker */
.sound-btn {
  pointer-events: auto;
  display: grid; place-items: center;
  width: 30px; height: 26px; padding: 0;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid #b89a6a;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(60, 35, 10, 0.2);
  cursor: pointer;
}
.sound-btn:hover { color: var(--red); }
.sound-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn .spk { fill: currentColor; }
.sound-btn .cross, .sound-btn.off .wave { display: none; }
.sound-btn.off .cross { display: inline; }
.sound-btn.off { color: var(--muted); }
/* The day's number: the same paper tab as the question counter. */
#day-label {
  font-family: var(--type); font-size: 14px; letter-spacing: 0.08em; color: var(--muted);
  padding: 3px 10px;
  background: var(--paper-light);
  border: 1px solid #b89a6a;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(60, 35, 10, 0.2);
}
#day-label b { font-weight: normal; color: var(--red); font-size: 18px; }

/* ---------- Paper cards ---------- */

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%),
    var(--paper-light);
  border: 1px solid #b89a6a;
  outline: 1px solid rgba(120, 85, 45, 0.35);
  outline-offset: -6px;
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 12px 24px -8px rgba(60, 35, 10, 0.55),
    0 2px 4px rgba(60, 35, 10, 0.3);
}

.question {
  /* centred by its margins and kept upright (no translate(-50%) or tilt): a transform puts the
     text on half pixels and smooths it, which reads as blurry */
  --base: translate(0, 0);
  z-index: 4;
  position: fixed; top: 58px; left: 0; right: 0; margin-inline: auto;
  width: min(560px, calc(100% - 32px));
  padding: 16px 22px 14px;
  text-align: center;
}
.question h1 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.2; margin: 0; }
/* On a wide screen the question stays over the globe but is kept compact (narrower, smaller
   type, less padding), so the globe below it gets more of the screen. */
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .question { top: 52px; width: min(480px, calc(100% - 32px)); padding: 11px 18px 10px; }
  .question h1 { font-size: 21px; }
  .question .q-rule { margin-top: 6px; }
  .question .q-timer { margin-top: 10px; }
}
/* Wide enough that the card fits between the leg counter and the buttons: it moves up into the
   top bar's row (just under the map credits), so the globe gets that strip too. */
@media (min-width: 1080px) and (min-aspect-ratio: 5/4) {
  .question { top: 16px; }
}
/* Short, wide screens (a phone on its side, a small laptop window): the cards would leave the
   globe a sliver. The question goes up into the top bar's row, tighter,  */
@media (max-height: 560px) and (min-aspect-ratio: 5/4) {
  .question { top: 14px; width: min(460px, calc(100% - 260px)); padding: 7px 14px 6px; }
  .question h1 { font-size: 16px; }
  .question .q-rule { margin-top: 3px; }
  .question .q-timer { margin-top: 5px; }
}

/* The clock: a suitcase moves along a dashed route from the left of the card to the clock on
   the right, inking the stretch behind it, and arrives at zero (see moveCase() in app.js). Navy while there's time, red for the last ten seconds. */
.q-timer { --ink: var(--navy); display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.q-timer.warn { --ink: var(--red); }
.q-route {
  position: relative; flex: 1; height: 2px; margin: 0 4px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 11px); opacity: 0.9;
}
.q-flown {
  position: absolute; left: 0; top: -1px; height: 4px; border-radius: 2px; width: 100%;
  transform: scaleX(0); transform-origin: left center;
  background: var(--ink); transition: background-color 0.4s;
}
/* the suitcase, centred on the line (moved along it by moveCase() in app.js) */
.q-tumble {
  position: absolute; left: 0; top: 50%; width: 20px; height: 20px; transform: translateY(-50%);
  color: var(--ink); transition: color 0.4s;
  filter: drop-shadow(0 0 1.5px var(--paper-light)) drop-shadow(0 0 1.5px var(--paper-light)); /* clear of the line */
}
.q-icon { display: block; width: 100%; height: 100%; }
.q-clock {
  font-family: var(--type); font-size: 20px; line-height: 1; min-width: 3em; text-align: right;
  color: var(--ink); font-variant-numeric: tabular-nums; transition: color 0.4s;
}
/* time's up: the line, suitcase and clock fade away, then the card closes up round the question */
.q-timer { max-height: 40px; transition: max-height 0.35s ease, margin-top 0.35s ease; }
.q-timer.out .q-route, .q-timer.out .q-clock { opacity: 0; transition: opacity 0.25s; }
.question .q-timer.out { max-height: 0; margin-top: 0; overflow: hidden; transition-delay: 0.2s; }
@media (max-width: 600px) { .q-clock { font-size: 17px; } .q-tumble { width: 18px; height: 18px; } }


/* ---------- Buttons: chunky cockpit switches ---------- */

.action-bar { display: flex; justify-content: center; }

/* Buttons: a red pill with a lowercase typewriter label, like the wordmark. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 26px 10px;
  border: 0; border-radius: 999px;
  font-family: var(--type); font-size: 16px;
  text-transform: lowercase; letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.15s, filter 0.15s, opacity 0.2s;
}
.btn.primary {
  background: var(--red);
  color: #f6ecd2;
  filter: drop-shadow(0 2px 3px rgba(60, 30, 10, 0.3));
}
.btn.primary:hover { background-color: #ad2222; filter: drop-shadow(0 3px 5px rgba(60, 30, 10, 0.35)); }
.btn.primary:active { transform: scale(0.97); }
.btn.primary:disabled {
  background-color: rgba(155, 28, 28, 0.3);
  color: rgba(246, 236, 210, 0.9);
  cursor: default;
  filter: none;
}
/* no ring: the game focuses start / let's fly by itself, which drew a black outline on them.
   Keyboard focus shows as the hover colour instead. */
.btn:focus, .btn:focus-visible { outline: none; }
.btn.primary:focus-visible { background-color: #ad2222; }
.btn.ghost:focus-visible { color: var(--ink); }
.btn .arrow { font-family: var(--serif); font-size: 18px; line-height: 0; }
.btn.ghost {
  background: none; color: var(--muted);
  padding: 6px 4px;
  font-size: 13px;
  text-decoration: underline dashed;
  text-underline-offset: 4px;
}
.btn.ghost:hover { color: var(--ink); }
.btn.floating {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  z-index: 5;
}
.btn.floating:active { transform: translateX(-50%) translateY(1px); }


.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) rotate(-1deg);
  background: var(--paper-light); color: var(--ink);
  border: 1px solid #b89a6a;
  padding: 10px 16px; border-radius: 3px;
  font-family: var(--type); font-size: 14px;
  box-shadow: 0 6px 14px rgba(60, 35, 10, 0.35);
  z-index: 10;
}

.loading {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--type); font-size: 18px; letter-spacing: 0.05em;
  transition: opacity 0.7s ease, transform 0.9s ease;
  z-index: 20;
}
/* the paper lifts away as the intro starts */
.loading.fade { opacity: 0; pointer-events: none; }
.loading.fade .start-btn { pointer-events: none; } /* faded out, the start button stops taking taps (it sits over the game) */
.loader { display: grid; justify-items: center; gap: 14px; }
.loader p { margin: 0; }
.loading-contact { font-size: var(--fs-small); color: var(--muted); }
.loading-contact[hidden] { display: none; }
/* "pinfactualising..." while loading: "pin" in red like the wordmark; the dots type on one by one, then clear and go again */
.ld-pin { color: var(--red); }
/* the logo's full stop, in ink, at the text's own size */
.ld-dots { color: var(--ink); letter-spacing: 0.02em; }
.ld-dots i { font-style: normal; animation: ld-dot 1.4s infinite both; }
.ld-dots i:nth-child(2) { animation-delay: 0.2s; }
.ld-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ld-dot { 0%, 15% { opacity: 0; } 30%, 75% { opacity: 1; } 90%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ld-dots i { animation: none; } }
/* Title screen: once loaded, the paper clears to show the globe turning behind and the start
   button fades up (see showTitle in app.js). */
.loading.ready {
  background-color: transparent;
  pointer-events: none; /* the globe behind can be spun and tapped; only the button takes clicks */
  place-items: center; /* name and button sit in the middle, over the globe */
  transition: background-color 1.2s ease, opacity 0.7s ease;
}
.loading.ready .loader { position: relative; }
@keyframes fade-in { from { opacity: 0; } }
/* the wordmark: lowercase typewriter, "pin" and the full stop in red */
.title-name { display: none; margin: 0; font-family: var(--type); font-weight: 400; font-size: clamp(44px, 9vw, 72px); line-height: 1; color: var(--ink); letter-spacing: 0; text-transform: none; }
.title-name .tn-pin, .title-name .tn-dot { color: var(--red); }
.loading.ready .title-name { display: block; animation: title-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both; }
@keyframes title-in { from { opacity: 0; transform: translateY(10px); } }
.start-btn[hidden] { display: none; }
.start-btn { margin-top: 6px; font-size: 17px; padding: 12px 26px; pointer-events: auto; }
.start-btn:not([hidden]) { animation: bar-in 0.45s ease-out 0.35s both; }

/* ---------- Intro ---------- */

/* Globe is hidden behind the loading screen, then fades in and settles to full size. */
#globe { opacity: 0; transition: opacity 0.9s ease, translate 1.8s cubic-bezier(0.45, 0.05, 0.3, 1); }
/* (On the title screen the globe stays centred: it's close up and fills the screen, so lifting
   it left a bare strip of paper along the bottom.) */
body.ready #globe { opacity: 1; }

/* Question card drops onto the map; the button slides up after it. */
.question.enter { animation: card-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes card-in {
  from { opacity: 0; transform: var(--base) translateY(-36px) rotate(-3.4deg); }
  to   { opacity: 1; transform: var(--base); }
}
/* A new question is read in the middle of the screen first, over a blurred backdrop (spot), then
   slides up into its place (settle) as the clock starts; see spotlightQuestion. Same size in both
   places and moved by its top (no transform), so the text is drawn sharp the whole way and nothing
   re-wraps or snaps when it lands. */
.question.spot, .question.settle { z-index: 9; }
.question.spot { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 22px 44px -10px rgba(60, 35, 10, 0.5), 0 3px 8px rgba(60, 35, 10, 0.2); }
.q-backdrop {
  position: fixed; inset: 0; z-index: 8; pointer-events: none; opacity: 0;
  background: rgba(233, 219, 182, 0.28);
  -webkit-backdrop-filter: blur(3px) saturate(0.9); backdrop-filter: blur(3px) saturate(0.9);
  /* Hidden (not just see-through) once faded out: some browsers keep re-blurring the moving globe
     behind a full-screen backdrop-filter even at opacity 0, every frame of the game. */
  visibility: hidden;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.7s;
}
.q-backdrop.on { opacity: 1; visibility: visible; transition-delay: 0s; pointer-events: auto; cursor: pointer; } /* a tap drops the card early */
/* Under the card while it's read: ×1 › ×1.25 › ×1.5, popping in left to right (see multsHint) */
.q-mults { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--type); color: var(--ink); }
.q-mults[hidden] { display: none; }
.q-mults > * { opacity: 0; }
.q-backdrop.on .q-mults > * { animation: qm-in 0.35s cubic-bezier(0.3, 1.4, 0.5, 1) both; animation-delay: calc(0.35s + var(--k, 0) * 0.12s); }
@keyframes qm-in { from { opacity: 0; transform: translateY(6px) scale(0.85); } to { opacity: 1; transform: none; } }
.qm-chip { padding: 3px 9px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 400; font-size: 16px; line-height: 18px;
  box-shadow: 0 2px 5px rgba(60, 35, 10, 0.25); }
.qm-chip.gold { background: linear-gradient(160deg, #f6d77a, #b8860b 45%, #f2cf6b 70%, #9a6c08); }
.qm-arrow { font-size: 18px; color: var(--muted); }
.qm-end { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); text-shadow: 0 0 6px var(--paper-light); }
@media (max-width: 640px) { .q-mults { gap: 5px; } .qm-chip { font-size: 14px; padding: 2px 7px; } .qm-end { font-size: 10.5px; } }
.action-bar.enter { animation: bar-in 0.45s ease-out 0.25s both; }
@keyframes bar-in { from { opacity: 0; transform: translateY(8px) scale(0.95); } }
/* Day number stamps on like a rubber stamp. */
#day-label:not(.stamp-in) { visibility: hidden; } /* waits for the intro to stamp it on */
#day-label.stamp-in { animation: stamp-in 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes stamp-in {
  from { opacity: 0; transform: scale(1.6); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #globe { transition: opacity 0.4s ease; transform: none; }
  .question.enter, .action-bar.enter, #day-label.stamp-in { animation: none; }
}

/* ---------- Map pins ---------- */

/* Distance tag on the route: solid paper, red border, upright typewriter figures. */
.route-label {
  transform: translate(-50%, -150%) rotate(-2deg);
  white-space: nowrap; margin: 0;
  pointer-events: none;
  font-family: var(--type); font-size: 16px; letter-spacing: 0.04em;
  color: #5a0d0d;
  padding: 3px 9px 2px;
  background: #f8f0d8;
  border: 1.5px solid #8e1414;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(60, 35, 10, 0.35);
  animation: label-in 0.4s ease-out both;
}
@keyframes label-in { from { opacity: 0; transform: translate(-50%, -110%) rotate(-2deg); } }

/* Answer reveal tag: rides the route's tip counting up the km, then stays over the answer
   (above the pin). Sits above the map, under the cards. */
.route-tag { position: fixed; left: 0; top: 0; z-index: 2; pointer-events: none; will-change: transform; }
.rt-inner {
  position: absolute; left: 0; bottom: 44px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.rt-km {
  white-space: nowrap; margin: 0;
  font-family: var(--type); font-size: 16px; letter-spacing: 0.04em;
  color: #5a0d0d;
  padding: 3px 9px 2px;
  background: #f8f0d8;
  border: 1.5px solid #8e1414;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(60, 35, 10, 0.35);
  transform: rotate(-2deg);
}
.route-tag.counting .rt-inner { bottom: 14px; }
.route-tag.counting .rt-km { opacity: 0.92; }
.route-tag.landed .rt-inner { transition: bottom 0.25s ease-out; }
/* Hangs under the spot instead when there's no room above. */
.route-tag.below .rt-inner { bottom: auto; top: 18px; }
.route-tag.landed .rt-km { animation: km-settle 0.4s ease-out; }
/* resting over the middle of the finished line, as on the results globe */
.route-tag.mid .rt-inner { bottom: 12px; transition: bottom 0.5s ease-in-out; }
.route-tag.mid.below .rt-inner { bottom: auto; }
@keyframes km-settle { 35% { transform: rotate(-2deg) scale(1.18); } }

@media (prefers-reduced-motion: reduce) {
  .route-tag .rt-km { animation: none !important; }
}

.pin { position: relative; width: 0; height: 0; pointer-events: none; }

/* Guess pin: the tack's tip sits on the exact point; everything pivots around it. */
.pin.guess .tack {
  position: absolute; left: -9px; bottom: -1px;
  width: 18px; height: 30px;
  transform-origin: 50% 100%;
  transform: translateY(0) rotate(10deg) scale(1, 1);
  filter: drop-shadow(1px 1px 1px rgba(40, 20, 5, 0.35));
  animation: pin-drop 0.62s both;
}
@keyframes pin-drop {
  0%   { transform: translateY(-40px) rotate(-12deg) scale(1, 1); opacity: 0; animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.5); }
  12%  { opacity: 1; }
  52%  { transform: translateY(0) rotate(10deg) scale(1, 1); animation-timing-function: ease-out; }
  62%  { transform: translateY(0) rotate(12deg) scale(1.08, 0.84); animation-timing-function: ease-out; }
  78%  { transform: translateY(-8px) rotate(7deg) scale(0.96, 1.05); animation-timing-function: ease-in; }
  90%  { transform: translateY(0) rotate(11deg) scale(1.03, 0.95); }
  100% { transform: translateY(0) rotate(10deg) scale(1, 1); }
}

/* Soft shadow cast down-right of the tip; grows as the pin falls toward the paper. */
.pin.guess .pin-shadow {
  position: absolute; left: -3px; top: -3px;
  width: 18px; height: 6px;
  border-radius: 50%;
  background: rgba(40, 20, 5, 0.42);
  filter: blur(1.5px);
  animation: pin-shadow 0.62s both;
}
@keyframes pin-shadow {
  0%   { transform: translateX(10px) scale(0.2); opacity: 0; }
  52%  { transform: translateX(0) scale(1); opacity: 1; }
  62%  { transform: scale(1.2, 1); }
  78%  { transform: scale(0.8); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}


.pin.x svg { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; animation: stamp 0.35s ease-out; }
@keyframes stamp { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .pin.guess .tack, .pin.guess .pin-shadow, .pin.x svg { animation: none; }
}

/* ---------- Submit ---------- */
/* Just the button, floating at the bottom centre over the globe while you guess. */

.instruments {
  position: fixed; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  z-index: 2;
}
.instruments:not(.in) { visibility: hidden; } /* revealed by the intro */
.instruments.in { animation: dash-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
/* once you've guessed, Submit steps away (the slip takes over) until the next question */
body.guessed .instruments { opacity: 0; translate: 0 24px; pointer-events: none; transition: opacity 0.25s, translate 0.3s; }
body:not(.guessed) .instruments.in { transition: opacity 0.3s, translate 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes dash-in { from { opacity: 0; translate: 0 24px; } }
/* Big and plain to find: the main thing to press. Once a pin is down it pops, then softly glows. */
.instruments .btn { min-width: 240px; padding: 17px 56px 16px; font-size: 22px; }
.instruments .btn.primary:not(:disabled) { animation: submit-ready 0.4s cubic-bezier(0.3, 1.6, 0.5, 1), submit-glow 2.4s ease-in-out 0.4s infinite; }
@keyframes submit-ready { from { transform: scale(0.9); } }
@keyframes submit-glow {
  0%, 100% { filter: drop-shadow(0 2px 3px rgba(60, 30, 10, 0.3)); }
  50% { filter: drop-shadow(0 3px 10px rgba(155, 28, 28, 0.55)) brightness(1.08); }
}
@media (prefers-reduced-motion: reduce) { .instruments .btn.primary:not(:disabled) { animation: none; } }
@media (max-width: 640px) { .instruments .btn { min-width: 210px; padding: 15px 44px 14px; font-size: 20px; } }

@media (max-width: 640px) {
  .instruments { bottom: 14px; }
  /* the question card kept short, so more of the globe shows */
  .question { top: 48px; padding: 9px 14px 8px; }
  .question h1 { font-size: 17px; line-height: 1.2; }
  .question .q-timer { margin-top: 8px; gap: 10px; }
  .progress { gap: 5px; }
  }

.ink-great { color: #1d7a3c; } .ink-good { color: #1b4fa8; } .ink-fair { color: #7a35a8; } .ink-miss { color: #c4232b; }
.ink-pinpoint { color: #a8740c; } /* a Pinpoint: gold */
/* ----- Nicheness -----
   Each tier has its colour, climbing from plain to foil: Mainstream (paper brown), Well-trodden
   (teal), Backroad (blue), Hidden gem (violet), Uncharted (gold foil). */
.niche-1 { --niche: #8a7a5c; } .niche-2 { --niche: #0f7c80; } .niche-3 { --niche: #1b4fa8; }
.niche-4 { --niche: #7a35a8; } .niche-5 { --niche: #a3740a; }
.niche-ink { color: var(--niche); font-weight: 700; }

/* The rule under each question's prompt */
.q-rule { margin: 8px 0 0; text-align: center; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 17px; line-height: 1.2; color: var(--ink); }
.q-rule[hidden] { display: none; }
@media (max-width: 640px) { .q-rule { font-size: 15px; margin-top: 4px; } }

/* Today's scores as bars, yours flagged in red (see distributionSVG) */
.bb-dist { display: block; width: 100%; max-width: 260px; margin: 6px auto 0; overflow: visible; }
.bb-dist .bar { fill: rgba(122, 97, 70, 0.2); transform-box: fill-box; transform-origin: 50% 100%; }
/* (only as the receipt first opens: .grow, see distributionSVG) */
.bb-dist.grow .bar { animation: bar-grow 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both; animation-delay: calc(0.15s + var(--i) * 10ms); }
.bb-dist .bar.below { fill: rgba(122, 97, 70, 0.5); } /* players you beat */
.bb-dist .bar.you { fill: var(--red); }
@keyframes bar-grow { from { transform: scaleY(0); } }
.bb-dist .base { stroke: rgba(60, 40, 20, 0.45); stroke-width: 1; }
.bb-dist text { font-family: var(--type); font-size: 11px; fill: var(--muted); letter-spacing: 0.03em; }
.bb-dist .flag rect, .bb-dist .flag path { fill: var(--red); }
.bb-dist .flag text { fill: #fff8ea; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; }
.bb-dist.grow .flag { animation: fade-in 0.3s ease-out 0.6s both; }
@media (prefers-reduced-motion: reduce) { .bb-dist .bar, .bb-dist .flag { animation: none; } }

body.results-open .instruments { display: none; }


/* Viewing the globe after the results: a small card for the pin you clicked. */
.globe-info {
  position: fixed; left: 50%; top: 58px; z-index: 5;
  transform: translateX(-50%) rotate(-0.4deg);
  width: min(460px, calc(100% - 32px));
  padding: 12px 18px 11px;
  text-align: center;
  animation: info-in 0.25s ease-out both;
}
.globe-info .gi-q { margin: 0; font-family: var(--type); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.globe-info .gi-prompt { margin: 3px 0 4px; font-family: var(--serif); font-size: 19px; line-height: 1.25; color: var(--ink); }
.globe-info .gi-line { margin: 0; font-family: var(--type); font-size: 12.5px; color: var(--muted); }
.globe-info .gi-line b { font-weight: normal; color: #1f5a33; }
.globe-info .gi-also { margin: 6px 0 0; padding-top: 6px; border-top: 1px dashed rgba(60, 35, 10, 0.25); font-family: var(--type); font-size: 12.5px; color: var(--muted); }
.globe-info .gi-also span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #1e6b34; margin-right: 4px; }
.globe-info .gi-also b { font-weight: normal; color: #1f5a33; }
@keyframes info-in { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } }


/* A clicked spot on the results globe: an ink dot with the place's name on a paper label above. */
.place-tag { position: fixed; left: 0; top: 0; z-index: 2; pointer-events: none; will-change: transform; }
.place-tag::before { /* the dot */
  content: ""; position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 2px rgba(248, 240, 216, 0.85);
}
.pt-name {
  position: absolute; left: 0; bottom: 9px; transform: translateX(-50%);
  white-space: nowrap; font-family: var(--type); font-size: 16px; letter-spacing: 0.04em; color: var(--ink);
  padding: 3px 10px 2px; background: #f8f0d8; border: 1px solid rgba(90, 60, 30, 0.45); border-radius: 3px;
  box-shadow: 0 2px 4px rgba(60, 35, 10, 0.25);
}
.place-tag.pop .pt-name { animation: pt-pop 0.25s ease-out; }
@keyframes pt-pop { from { opacity: 0; transform: translateX(-50%) translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .place-tag.pop .pt-name { animation: none; } }
.route-label.clickable { pointer-events: auto; cursor: pointer; }
.route-label.clickable:hover { background: #fff7e2; }

/* ---------- Results: one look for the slip and the receipt ----------
   A guess reads as: the badge (a medal, how close), the points bar (closeness solid in the
   badge's colour, the rarity bonus striped in the gem's), and, for questions with several
   answers, the bonus box: the answer's area on a little map with your pin, what players picked,
   and the multiplier that comes of them (a tick, or a lock when the pin missed the area). */
.medal, .gem { display: block; flex: none; overflow: visible; }
.seg { display: block; flex: none; height: 100%; width: 0; background: var(--c); transition: width 0.7s cubic-bezier(0.3, 0.7, 0.3, 1); }
.seg.close { border-radius: inherit; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.seg.extra { background: repeating-linear-gradient(135deg, var(--c) 0 6px, color-mix(in srgb, var(--c) 70%, #fff) 6px 12px); }
.seg.extra.gold { background: repeating-linear-gradient(135deg, #b8860b 0 6px, #f2cf6b 6px 12px); }
.seg.missed {
  display: grid; place-items: center; overflow: hidden;
  color: color-mix(in srgb, var(--c) 75%, #000);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, transparent) 0 4px, transparent 4px 8px);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 0 6px 6px 0;
}
.seg.missed .lock { width: 12px; height: 12px; }

.bonus {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 14px 12px; border-radius: 8px;
  background: rgba(122, 97, 70, 0.07); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.14);
}
.b-col { display: grid; align-content: start; gap: 4px; min-width: 0; }
.b-where { justify-items: center; }
.amap { display: block; width: 84px; height: 84px; }
.amap .apin, .amap .zmark, .amap .zone, .amap .ripple { transform-box: fill-box; }
.amap .ripple { opacity: 0; transform-origin: 50% 50%; }
.b-where small { font-family: var(--type); font-size: var(--fs-label); color: var(--muted); text-align: center; line-height: 1.15; }
.b-where small.in { color: var(--c); }
.b-lbl { display: block; font-family: var(--type); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: #8a6a48; white-space: nowrap; }
.picks { display: grid; grid-template-columns: auto auto minmax(20px, 1fr) auto; gap: 3px 8px; align-items: center; font-size: var(--fs-small); line-height: 1.25; }
.pk-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pk-name.me { color: var(--c); font-weight: 700; }
.pk-gem { display: grid; place-items: center; }
.pk-gem .gem { width: 14px; height: 14px; filter: drop-shadow(0 1px 1px rgba(60, 35, 10, 0.25)); }
.pk-you { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; vertical-align: -1px; font: 700 var(--fs-label)/1 var(--type); color: #b3261e; }
.pk-you svg { width: 9px; height: 12px; }
.pk-name.me { max-width: none; overflow: visible; }
.pk-bar { height: 7px; width: 0; border-radius: 4px; background: color-mix(in srgb, var(--c, #7a6146) 45%, transparent); transition: width 0.6s cubic-bezier(0.3, 0.7, 0.3, 1); }
.pk-bar.me { background: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
.pk-pc { font-family: var(--type); font-size: var(--fs-label); color: var(--muted); text-align: right; }
.pk-pc.me { color: var(--c); font-weight: 700; }

/* the bonus box as a sum: rarity × your pin = the bonus, three discs the same size, each with
   what it is over it and what it means under it */
.bonus.eq { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.b-sum { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 14px minmax(0, 1fr); grid-template-rows: auto auto auto; align-items: center; gap: 5px 8px; padding-top: 8px; border-top: 1px dashed rgba(90, 60, 30, 0.22); }
.b-sum .b-col { grid-row: 1 / span 3; grid-template-rows: subgrid; justify-items: center; align-items: start; text-align: center; gap: 5px; }
.b-sum .b-col > .b-disc, .b-sum .b-col > .amap { align-self: center; }
.b-sum .b-op { grid-row: 2; justify-self: center; }
.b-op { font-family: var(--serif); font-size: 22px; line-height: 1; color: #a08a6a; }
.b-sum .amap, .b-disc { width: min(72px, 100%); height: auto; aspect-ratio: 1; }
.b-cap { min-height: 2.3em; font-family: var(--type); font-size: var(--fs-label); line-height: 1.15; color: var(--muted); }
.b-cap.in { color: var(--c); }
.b-tname { overflow-wrap: anywhere; }
.b-kept { color: var(--muted); }
.b-kept.in { color: var(--c); }
.b-disc { position: relative; display: grid; place-items: center; box-sizing: border-box; border-radius: 50%; }
/* the rarity: its gem, large, on a disc of its colour */
.b-gemdisc {
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 10%, #fffaf0), color-mix(in srgb, var(--c) 28%, #f3ead2));
  box-shadow: inset 0 0 0 2px var(--c), inset 0 0 0 5px color-mix(in srgb, var(--c) 15%, transparent);
}
.b-gemdisc .gem { width: 38px; height: 38px; filter: drop-shadow(0 2px 2px rgba(60, 35, 10, 0.3)); }
.b-gemdisc.gold { box-shadow: inset 0 0 0 2px #b8860b, inset 0 0 0 5px rgba(242, 207, 107, 0.4); }
.b-gemdisc.off { background: rgba(122, 97, 70, 0.08); box-shadow: inset 0 0 0 1.5px rgba(90, 60, 30, 0.3); }
.b-gemdisc.off .gem { width: 30px; height: 30px; filter: none; }
/* the bonus: the multiplier on a disc, filled when won, dashed and locked when missed */
.b-mult { color: #7a6146; background: rgba(122, 97, 70, 0.08); box-shadow: inset 0 0 0 1.5px rgba(90, 60, 30, 0.3); }
.b-mult b { font-family: var(--type); font-weight: 400; font-size: var(--fs-name); line-height: 1; translate: 0 2px; } /* the typewriter sits high in its line */
.b-mult .tick, .b-mult .lock { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; padding: 4px; box-sizing: border-box; border-radius: 50%; background: #f3ead2; color: var(--c); box-shadow: 0 0 0 1.5px currentColor; }
.b-mult.ok { color: #fff; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 75%, #fff), var(--c) 70%); box-shadow: 0 3px 8px color-mix(in srgb, var(--c) 40%, transparent), inset 0 0 0 3px rgba(255, 255, 255, 0.25); }
.b-mult.ok.gold { --c: #b8860b; color: #3d2a05; background: linear-gradient(150deg, #f6d77a, #c99a1a 55%, #f2cf6b); }
@property --fill { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.b-mult { --fill: var(--share, 0%); }
.b-mult.ok.part, .b-mult.ok.filling {
  color: var(--c); box-shadow: none;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--c) 10%, #f3ead2) calc(100% - 6px), transparent calc(100% - 5.5px)),
    conic-gradient(var(--c) var(--fill), color-mix(in srgb, var(--c) 18%, #f3ead2) 0);
}
.b-mult.ok.filling.gold { --c: #b8860b; color: #8a6406; }
.b-mult.locked { background: transparent; box-shadow: none; outline: 1.5px dashed rgba(90, 60, 30, 0.4); outline-offset: -1.5px; }
.b-mult.locked b { color: #b0a184; text-decoration: line-through; text-decoration-thickness: 2px; }
.b-mult.locked .lock { color: #7a6146; }

/* ---------- Between rounds: the slip ----------
   Printed by the ticket, over it, for the round just played. It shows what you want to know in
   order: the answer, how close (the bar fills, the badge lands), whether the pin was in the
   area, how rare the answer is, so the multiplier, the final points, then the note. */
.slip {
  position: fixed; z-index: 6; left: 50%; bottom: 10px;
  transform: translateX(-50%);
  width: min(700px, calc(100% - 24px));
  overflow: hidden; /* the paper feeds up out of the bottom edge */
  filter: drop-shadow(0 10px 14px rgba(60, 35, 10, 0.35)) drop-shadow(0 2px 3px rgba(60, 35, 10, 0.25));
}
.slip:not(:has(.with-bonus)) { width: min(540px, calc(100% - 24px)); }
.slip.measure { visibility: hidden; }
.slip.measure * { transition: none !important; animation: none !important; }
.slip-sheet {
  max-height: calc(100svh - 150px); overflow-y: auto;
  padding: 14px 18px 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%), #f3ead2;
  color: var(--ink);
}
.slip.in .slip-sheet { animation: slip-up 0.35s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
@keyframes slip-up { from { transform: translateY(102%); } }
.slip.out .slip-sheet { animation: slip-away 0.3s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
@keyframes slip-away { to { transform: translateY(105%); } }
.s-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 5px; border-bottom: 1px dotted rgba(90, 60, 30, 0.35); font-family: var(--type); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: #8a6a48; }
.s-head span:first-child { flex: none; white-space: nowrap; }
.s-head span:nth-child(2) { flex: 1; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the receipt's header: the name stays lowercase; its Hide is the slip's (.s-tuck below) */
.rc-head > span:first-child { text-transform: none; }
/* Hide / Show: tucks the slip down to its top strip, over the ticket */
.s-tuck {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; gap: 4px; margin: -3px -4px -3px 2px; padding: 2px 6px; border-radius: 4px;
  color: #7d2a22;
}
.s-tuck::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; translate: 0 -2px; transition: rotate 0.3s, translate 0.3s; }
.s-tuck:hover { background: rgba(125, 42, 34, 0.08); }
.s-tuck:focus-visible { outline: 2px solid #7d2a22; outline-offset: 1px; }
/* tucked: just the top strip (which leg, how far off, Show); tap it to bring the rest back.
   A compact tab rather than a full-width bar: even padding all round, centred text and a
   Show pill, so it reads as a deliberate little card, not a collapsed sheet. */
.slip.tucked { width: min(440px, calc(100% - 32px)); }
.slip.tucked .slip-sheet { cursor: pointer; padding: 8px 8px 8px 18px; border-radius: 12px; transition: background-color 0.2s; }
.slip.tucked .slip-sheet:hover { background-color: #f6eed9; }
.slip.tucked .slip-sheet > :not(.s-head) { display: none; }
.slip.tucked .s-head { align-items: center; gap: 14px; padding-bottom: 0; border-bottom: 0; }
.slip.tucked .s-head span:first-child { color: var(--ink); }
.slip.tucked .s-tuck {
  margin: 0; padding: 6px 12px 6px 13px; gap: 7px; border-radius: 999px;
  background: rgba(125, 42, 34, 0.07); box-shadow: inset 0 0 0 1px rgba(125, 42, 34, 0.22);
}
.slip.tucked .s-tuck:hover { background: rgba(125, 42, 34, 0.13); }
.slip.tucked .s-tuck::after { rotate: 225deg; translate: 0 2px; }
.s-lbl { display: block; font-family: var(--type); font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: #8a6a48; }
.s-answer { margin-top: 0; }
.s-fact .w-off { color: transparent; } /* the rest of the fact, not typed in yet */
.s-fact b { font-weight: 700; }
.s-name { margin: 1px 0 0; font-family: var(--caps); font-weight: 400; font-size: var(--fs-name); line-height: 1.15; color: #22160a; }
.s-grid { display: grid; gap: 10px; margin-top: 8px; }
.s-top { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.s-top .medal { width: 40px; height: 40px; }
.s-badge { flex: 1; min-width: 0; font-family: var(--caps); font-size: var(--fs-name); line-height: 1; color: var(--c); }
.s-pts { font-family: var(--type); font-size: var(--fs-score); line-height: 1; font-variant-numeric: tabular-nums; }
.s-pts.thump { animation: slip-thump 0.4s ease-out; }
@keyframes slip-thump { 40% { transform: scale(1.15); } }
/* the bonus flying from its disc into the score (see flyBonus) */
.s-fly {
  position: fixed; z-index: 20; pointer-events: none;
  padding: 3px 9px; border-radius: 999px;
  font: 600 var(--fs-small)/1.2 var(--type); color: #fff; white-space: nowrap;
  background: var(--c); box-shadow: 0 4px 10px rgba(60, 35, 10, 0.3);
}
/* a great round's sparks around the score (see sparks) */
.s-spark { position: fixed; z-index: 20; pointer-events: none; width: 7px; height: 7px; border-radius: 1.5px; }
/* once the total's in, a light runs along the filled part of the bar */
.s-track.shine::after {
  content: ""; position: absolute; inset: 0 calc(100% - var(--fill, 100%)) 0 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%) no-repeat;
  background-size: 60% 100%;
  animation: bar-shine 0.9s ease-out forwards;
}
@keyframes bar-shine { from { background-position: -150% 0; } to { background-position: 250% 0; opacity: 0.6; } }
.s-bar { margin-top: 10px; }
.s-track { position: relative; display: flex; height: 20px; border-radius: 6px; background: rgba(90, 60, 30, 0.12); box-shadow: inset 0 1px 3px rgba(60, 35, 10, 0.2); }
/* where the bonus will join the bar (the discs send their parts here); the bar's end lights in
   the rarity's colour as each part arrives */
.s-end { position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none; }
.s-track.fed { animation: bar-fed 0.9s cubic-bezier(0.3, 1.4, 0.5, 1); }
@keyframes bar-fed {
  0% { scale: 1 1; box-shadow: inset 0 1px 3px rgba(60, 35, 10, 0.2), 0 0 0 0 var(--c); }
  25% { scale: 1.012 1.3; box-shadow: inset 0 1px 3px rgba(60, 35, 10, 0.2), 0 0 0 3px color-mix(in srgb, var(--c) 45%, transparent), 0 0 16px color-mix(in srgb, var(--c) 65%, transparent); }
  100% { scale: 1 1; box-shadow: inset 0 1px 3px rgba(60, 35, 10, 0.2), 0 0 0 0 transparent; }
}
/* a disc "sending" its part to the bar; the bar's jolt as the bonus lands */
.b-disc.drive, .amap.drive { animation: disc-drive 0.55s ease-out; }
@keyframes disc-drive {
  0% { filter: none; }
  35% { filter: drop-shadow(0 0 8px var(--c)) brightness(1.12); scale: 1.12; }
  100% { filter: none; scale: 1; }
}
.s-tipgem { position: absolute; top: 50%; translate: -50% -50%; z-index: 1; }
.s-tipgem .gem { width: 28px; height: 28px; filter: drop-shadow(0 2px 2px rgba(60, 35, 10, 0.4)); }
.s-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; margin-top: 6px; }
.s-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-family: var(--type); font-size: var(--fs-small); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.s-chip.locked { --c: #7a6146; }
.s-chip .lock { width: 11px; height: 11px; }
.s-foot { margin-top: 10px; padding-top: 8px; border-top: 1px dotted rgba(90, 60, 30, 0.35); }
.s-fact { margin: 0; font-size: var(--fs-body); line-height: 1.4; color: #4a3720; text-wrap: pretty; }
/* the other right answers and Next on one line, centred on each other (Next is the taller), so
   the gap under the note is the same as the gap above it */
.s-row { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
/* the bonus sum under the score, and what players picked beside it, each in its own box */
.s-sumwrap { margin-top: 10px; padding: 10px 12px 8px; border-radius: 8px; background: rgba(122, 97, 70, 0.07); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.14); }
.s-sumwrap .b-sum { padding-top: 0; border-top: 0; }
.s-picks { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 10px 10px 14px; border-radius: 8px; background: rgba(122, 97, 70, 0.07); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.14); }
.pk-hint { letter-spacing: 0.06em; text-transform: none; color: #a08a6a; }
/* each row a button: tap it to see that answer (its note, and the globe goes to it) */
.picks.tap { gap: 0 8px; }
.pk-row {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center;
  margin: 0; padding: 3px 6px; border: 0; border-radius: 5px; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; transition: background 0.15s;
}
.pk-row:hover { background: rgba(90, 60, 30, 0.08); }
.pk-row:focus-visible { outline: 2px solid #7d2a22; outline-offset: -2px; }
/* yours: a card of its colour with your red "You" tag; the one you're looking at: outlined */
.pk-row.me { background: color-mix(in srgb, var(--c) 13%, #fbf5e6); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent), 0 1px 3px rgba(60, 35, 10, 0.15); }
.pk-row[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 10%, transparent); box-shadow: inset 0 0 0 2px var(--c); }
.pk-row[aria-pressed="true"] .pk-name { color: var(--c); font-weight: 700; }
.s-also { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.s-also .s-lbl { flex: none; }
/* every other right answer in one row, scrolled sideways when there are more than fit */
.s-also-list {
  display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px 18px 2px 0;
  scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  -webkit-mask: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
          mask: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
}
.s-also-list::-webkit-scrollbar { display: none; }
/* each in its rarity's colour: a light tint, filled in full when it's the one showing */
.s-other {
  flex: none; scroll-snap-align: start; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px;
  border: 1.2px solid color-mix(in srgb, var(--c) 40%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--c) 9%, transparent); color: color-mix(in srgb, var(--c) 85%, #000);
  font-family: var(--serif); font-size: var(--fs-small); cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.s-other .gem { width: 13px; height: 13px; opacity: 0.75; }
.s-other:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.s-other[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 45%, transparent); }
.s-other[aria-pressed="true"] .gem { opacity: 1; filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)); }
.s-next { flex: none; white-space: nowrap; padding: 8px 20px; font-size: var(--fs-small); }
@media (min-width: 641px) {
  .s-grid { margin-top: 2px; }
  .s-grid.with-bonus { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: stretch; gap: 18px; }
  /* the list takes the score column's height and scrolls inside it (contain: it adds no height) */
  .s-grid.with-bonus .s-picks { contain: size; margin-top: 8px; }
  .s-grid.with-bonus .s-picks .picks { flex: 1 1 0; min-height: 0; max-height: none; }
}

/* each piece waits for its turn (see openSlip) */
.slip .s-step { opacity: 0; transform: translateY(5px); transition: opacity 0.35s, transform 0.35s; }
.slip .s-step.pop { transform: scale(0.4); transition: opacity 0.25s, transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
.slip .s-step.on { opacity: 1; transform: none; }
/* the sum in the bonus box comes in a piece at a time: rarity, your pin, the bonus */
.slip .b-sum > .b-col, .slip .b-op { opacity: 0; transition: opacity 0.25s; }
.slip .b-sum > .b-col.on, .slip .b-sum > .b-col.on + .b-op { opacity: 1; }
.slip .b-sum > .b-col .b-disc, .slip .b-sum > .b-col .amap { transform: scale(0.5); transition: transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
.slip .b-sum > .b-col.on .b-disc, .slip .b-sum > .b-col.on .amap { transform: none; }
.slip .b-sum > .b-res .b-mult { transition: transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1), --fill 0.9s cubic-bezier(0.4, 0, 0.3, 1) 0.15s; }
.slip .b-sum > .b-res:not(.on) .b-mult { --fill: 0%; }
.b-mult.filled { animation: disc-fill 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes disc-fill { 40% { scale: 1.12; } }
.slip .b-where .apin, .slip .b-where .zmark { opacity: 0; }
.slip .b-where.on .apin { animation: map-pin 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) 0.3s both; }
.slip .b-where.on .zone.lit { animation: zone-lit 0.6s ease-out 0.7s both; }
.slip .b-where.on .ripple { animation: zone-ripple 1s ease-out 0.7s both; }
.slip .b-where.on .zmark { animation: zone-mark 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) 0.75s both; }
@keyframes map-pin { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; } }
@keyframes zone-lit { 0% { fill-opacity: 0.1; } 45% { fill-opacity: 0.75; } 100% { fill-opacity: 0.42; } }
@keyframes zone-ripple { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes zone-mark { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; } }

@media (max-width: 640px) {
  .slip { left: 8px; right: 8px; bottom: 8px; width: auto; transform: none; }
  .slip:not(:has(.with-bonus)) { width: auto; }
  .slip-sheet { max-height: calc(100svh - 160px); padding: 12px 14px 12px; }
  .s-top .medal { width: 34px; height: 34px; }
  .s-bar { margin-top: 8px; }
  .s-grid { gap: 8px; }
  .s-top .medal { width: 30px; height: 30px; }
  .s-track { height: 16px; }
  .s-tipgem .gem { width: 24px; height: 24px; }
  .s-chips { min-height: 20px; margin-top: 4px; }
  .s-chip { padding: 2px 9px; }
  .bonus { gap: 8px; padding: 9px 11px; }
  .bonus { gap: 10px; }
  .b-lbl { letter-spacing: 0.06em; }
  .picks { gap: 1px 6px; }
  .pk-name { max-width: 140px; }
  .b-sum .amap, .b-disc { width: min(64px, 100%); }
  .b-gemdisc .gem { width: 32px; height: 32px; }
  /* kept compact so the globe above stays in view: the label goes (the head says which leg) and
     the other right answers take one line (their green pins can be tapped too). The fact is
     shown in full; the card grows to fit it and the camera frames the globe above it. */
  .s-head { padding-bottom: 4px; }
  .s-foot { margin-top: 8px; padding-top: 6px; }
  .s-fact { line-height: 1.35; }
  .s-row { margin-top: 6px; }
  .s-also { gap: 6px; }
  .s-next { padding: 7px 16px; }
}

/* ---------- Results: the trip receipt ----------
   The same paper, type and pieces as the slip (.s-head, .s-lbl, .s-track, .s-chip, .s-fact,
   .s-other, the bonus box), so the end of the day reads like the slips that led to it. One size
   for each kind of text: labels in the typewriter caps, names in the small caps, numbers in the
   typewriter, everything else in the serif. */
.results {
  position: fixed; inset: 0; z-index: 7;
  display: grid; place-items: start center;
  padding: 64px 16px 24px; /* clear of the top bar */
  overflow-y: auto;
  background: rgba(50, 30, 12, 0.5);
}
.results:not(.hidden) { animation: fade-in 0.4s ease-out both; }
.receipt { width: min(460px, 100%); filter: drop-shadow(0 14px 22px rgba(40, 20, 5, 0.45)); }
.results:not(.hidden) .receipt { animation: rc-rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rc-rise { from { opacity: 0; transform: translateY(16px); } }
.rc-main, .rc-side, .rc-legsbox { background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 30%), #f3ead2; color: var(--ink); }
.rc-main { padding: 14px 18px 6px; border-radius: 8px 8px 0 0; }
.rc-side {
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px 18px 18px;
  border-top: 1px dotted rgba(90, 60, 30, 0.45);
}
/* the five legs: last on a phone, under the total on a wide screen */
.rc-legsbox { padding: 0 18px 10px; border-top: 1px dotted rgba(90, 60, 30, 0.45); border-radius: 0 0 8px 8px; }
@media (min-width: 900px) {
  .receipt { width: min(900px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; grid-template-areas: "main side" "legs side"; align-items: stretch; }
  .rc-main { grid-area: main; border-radius: 8px 0 0 0; padding-bottom: 0; }
  .rc-legsbox { grid-area: legs; border-radius: 0 0 0 8px; }
  .rc-side { grid-area: side; border-top: 0; border-left: 1px dotted rgba(90, 60, 30, 0.45); border-radius: 0 8px 8px 0; }
  .rc-side .rc-boxes { grid-template-columns: 1fr; }
}

/* the total */
.rc-top { padding: 12px 0 14px; } /* the dotted line under it is the next part's top edge */
.rc-totrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 2px; }
.rc-total { font-family: var(--type); white-space: nowrap; }
.rc-total b { font-weight: 400; font-size: var(--fs-total); line-height: 1; font-variant-numeric: tabular-nums; }
.rc-total small { font-size: var(--fs-small); color: var(--muted); }
.rc-meter { margin-top: 10px; height: 16px; overflow: hidden; }
.rc-meter .seg { border-radius: 0; transition-duration: 0.6s; }
.rc-meter .seg.end { box-shadow: inset -2px 0 #f3ead2; }
/* each leg's part of the bar opens that leg below */
.rc-meter .seg[data-leg] { cursor: pointer; }
.rc-meter .seg[data-leg]:hover { filter: brightness(1.15); }
.rc-leg.flash { animation: leg-flash 1.4s ease-out; scroll-margin-top: 12px; }
@keyframes leg-flash { from { background: rgba(155, 28, 28, 0.14); } }
@media (prefers-reduced-motion: reduce) { .rc-leg.flash { animation: none; } }
.s-chip .sw { width: 12px; height: 9px; border-radius: 2px; background: linear-gradient(90deg, #a8740c, #1d7a3c 50%, #1b4fa8); }
.s-chip .sw.extra { background: repeating-linear-gradient(135deg, #0f7c80 0 3px, #8fc9c9 3px 6px); }
.rc-top .s-chips { margin-top: 8px; min-height: 0; }

/* the legs */
.rc-sec { margin-top: 2px; padding-bottom: 5px; border-bottom: 1px dotted rgba(90, 60, 30, 0.35); }
.rc-legs-lbl { margin-top: 14px; }
.rc-legs-lbl span { letter-spacing: 0.08em; text-transform: none; color: var(--muted); }
.rc-legs { list-style: none; margin: 0; padding: 0; }
.rc-leg + .rc-leg { border-top: 1px dotted rgba(90, 60, 30, 0.35); }
/* closed: medal | name over badge | points ⌄, then the bar and its chips under the name */
.rc-row {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 10px; align-items: center; gap: 4px 10px;
  padding: 12px 0;
}
.rc-row:focus-visible { outline: 2px solid #7d2a22; outline-offset: 2px; border-radius: 4px; }
.rc-row .medal { width: 32px; height: 32px; }
.rc-title { display: grid; min-width: 0; }
/* the question, over the answer, so each leg says what it was for */
.rc-qline { margin-bottom: 2px; font-size: var(--fs-small); line-height: 1.3; color: #6b5338; text-wrap: pretty; }
.rc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--caps); font-size: var(--fs-name); line-height: 1.15; color: #22160a; }
.rc-row:hover .rc-name { text-decoration: underline; text-decoration-color: rgba(90, 60, 30, 0.35); text-underline-offset: 3px; }
.rc-badge { font-family: var(--caps); font-size: var(--fs-body); line-height: 1.2; color: var(--c); }
.rc-p { font-family: var(--type); font-size: var(--fs-name); line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.rc-body { grid-column: 2 / -1; display: grid; gap: 6px; }
.rc-body .s-track { height: 10px; border-radius: 5px; overflow: hidden; }
.rc-body .seg { transition: none; }
.rc-body .seg.missed .lock { display: none; }
.rc-body .s-chips { margin-top: 0; min-height: 0; }
.s-chip .gem { width: 12px; height: 12px; }
.s-chip.plain { --c: #7a6146; }
.rc-chev { width: 7px; height: 7px; border-right: 1.5px solid #8a6a48; border-bottom: 1.5px solid #8a6a48; rotate: 45deg; translate: 0 -3px; transition: rotate 0.3s, translate 0.3s; }
.rc-leg.open .rc-chev { rotate: 225deg; translate: 0 2px; }
/* open: pin facts, the bonus box with what players picked, the answer */
.rc-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rc-leg.open .rc-more { grid-template-rows: 1fr; }
.rc-more > div { overflow: hidden; min-height: 0; }
.rc-in { display: grid; gap: 12px; padding: 0 0 16px 42px; }
.rc-sub { display: grid; gap: 4px; }
.rc-sub .s-chips { margin-top: 2px; min-height: 0; }
.rc-q { margin: 0; font-size: var(--fs-body); line-height: 1.4; color: #4a3720; }
.rc-in .s-fact { display: block; overflow: visible; -webkit-line-clamp: unset; }
.rc-ans { margin: 0; font-family: var(--caps); font-size: var(--fs-name); line-height: 1.2; color: #22160a; }
.rc-also { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-also .s-other { cursor: default; }
.rc-also .s-other:hover { background: color-mix(in srgb, var(--c) 9%, transparent); }
/* questions with lots of right answers: the picks bars (on the slip and the receipt) and the
   other answers scroll in their own box (about 7 bars, 3 rows of chips) so neither card gets
   tall. The box opens scrolled so your pick is in view (showMyPick); after that it scrolls
   freely, your row with the rest. (position: relative so your row's offsetTop is measured
   from the box.) */
.slip .picks, .rc-in .picks, .rc-also {
  max-height: 132px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(90, 60, 30, 0.35) transparent;
}
.slip .picks, .rc-in .picks { position: relative; padding-right: 6px; }
.rc-also { max-height: 92px; align-content: flex-start; }

/* down the side */
#rc-side-info { display: flex; flex-direction: column; gap: 10px; }
.rc-side .rc-sec:not(:first-child) { margin-top: 12px; }
/* highlights: a picture, a small label, the value big enough to read at a glance, a note under it */
.rc-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc-box { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-radius: 8px; background: rgba(122, 97, 70, 0.07); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.14); }
.rc-box > span { display: grid; gap: 3px; min-width: 0; }
.rc-box .s-lbl { font-size: 11px; }
.rc-box .medal, .rc-gemdisc { flex: none; width: 36px; height: 36px; }
/* the rarest find: its gem on a disc of its colour, as in the bonus box */
.rc-gemdisc { display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 10%, #fffaf0), color-mix(in srgb, var(--c) 28%, #f3ead2)); box-shadow: inset 0 0 0 1.5px var(--c); }
.rc-gemdisc .gem { width: 20px; height: 20px; }
.rc-gemdisc.off { background: rgba(122, 97, 70, 0.08); box-shadow: inset 0 0 0 1.5px rgba(90, 60, 30, 0.3); }
.rc-v { overflow-wrap: anywhere; font-family: var(--caps); font-size: 19px; line-height: 1.15; color: var(--ink); }
.rc-v.num { font-family: var(--type); font-size: 19px; font-variant-numeric: tabular-nums; }
.rc-box small { overflow-wrap: anywhere; font-size: var(--fs-small); line-height: 1.25; color: var(--muted); }
/* how you compare: You / Average / Top score side by side, then one plain sentence */
.rc-vs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 8px; background: rgba(122, 97, 70, 0.07); box-shadow: inset 0 0 0 1px rgba(90, 60, 30, 0.14); text-align: center; }
.rc-vs > div { display: grid; gap: 4px; padding: 12px 6px 10px; }
.rc-vs > div + div { border-left: 1px dotted rgba(90, 60, 30, 0.35); }
.rc-vs > div b { font-family: var(--type); font-weight: 400; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.rc-vs .you b { color: var(--red); }
.rc-vs p b { font-weight: 400; font-size: var(--fs-body); color: var(--ink); }
.rc-vs p { grid-column: 1 / -1; margin: 0; padding: 9px 12px; border-top: 1px dotted rgba(90, 60, 30, 0.35); font-size: var(--fs-small); line-height: 1.3; color: var(--muted); }
.rc-side .bb-dist { max-width: none; margin-top: 2px; }
.bb-dist .tk { stroke: rgba(60, 40, 20, 0.45); stroke-width: 1; }
/* beside the total, level with its label */
.rc-actions { display: flex; align-self: flex-start; margin-top: -6px; }
.rc-next { margin: 14px 0 6px; text-align: center; font-family: var(--type); font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 400px) { .rc-boxes { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .results { padding: 52px 8px 16px; }
  .rc-main { padding: 12px 14px 4px; }
  .rc-side { padding: 12px 14px 16px; }
  .rc-legsbox { padding: 0 14px 8px; }
  .rc-total b { font-size: 38px; }
  .rc-in { padding-left: 0; }
  .rc-box { gap: 10px; padding: 11px 12px; }
  .rc-box .medal, .rc-gemdisc { width: 32px; height: 32px; }
  .rc-v, .rc-v.num { font-size: 17px; }
}

/* the receipt, tucked away while you look at the globe */
.receipt-dock {
  position: fixed; left: 50%; bottom: 16px; z-index: 6;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border: 0; border-radius: 8px;
  background: #f3ead2; color: var(--ink);
  font-family: var(--caps); font-size: 15px; letter-spacing: 0.06em;
  box-shadow: 0 8px 18px rgba(60, 35, 10, 0.35);
  cursor: pointer;
}
.receipt-dock svg { width: 20px; height: 20px; }
.receipt-dock:hover { transform: translateX(-50%) translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .slip.in .slip-sheet, .slip.out .slip-sheet, .results:not(.hidden) .receipt, .results:not(.hidden) { animation: none; }
  .slip .s-step, .slip .b-sum > .b-col, .slip .b-op, .slip .b-sum .b-disc, .slip .b-sum .amap { opacity: 1; transform: none; transition: none; }
}

/* ---------- How to play ---------- */
/* The "?" tab sits beside the sound tab and borrows its look (.sound-btn). */
.help-btn svg path { fill: none; stroke-width: 2; }
.help-btn svg .dot { fill: currentColor; stroke: none; }
.help-btn[aria-expanded="true"] { color: var(--red); }

/* Dimmed backdrop; the card is a paper sheet, tilted a touch like the question card. */
.help {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(40, 24, 8, 0.45);
  animation: fade-in 0.2s ease-out;
  overflow-y: auto;
}
.help[hidden] { display: none; }
.help-card {
  position: relative;
  width: min(440px, 100%);
  padding: 22px 22px 20px;
  text-align: center;
  color: var(--ink);
  animation: help-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes help-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
.help-x {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--muted);
}
.help-x:hover { color: var(--red); }
.help-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.help-title { margin: 2px 0 8px; font-family: var(--caps); font-weight: 400; font-size: 30px; line-height: 1; }
/* two lines: how many, then how to move the globe */
.help-sub {
  display: grid; gap: 2px; margin: 0 0 16px; padding-bottom: 14px;
  border-bottom: 1px dotted rgba(90, 60, 30, 0.35);
  font-family: var(--type); font-size: 13px; letter-spacing: 0.03em; color: var(--muted);
}
.help-sub span:first-child { color: var(--red); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.help-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; text-align: left; }
.help-step {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start;
  animation: title-in 0.4s ease-out backwards;
}
.help-step:nth-child(2) { animation-delay: 0.08s; }
.help-step:nth-child(3) { animation-delay: 0.16s; }
.help-step:nth-child(4) { animation-delay: 0.24s; }
/* each picture is a snapshot of the game (or a drawing in its style), framed like a photo */
.help-shot {
  display: block; width: 140px; height: auto; aspect-ratio: 2 / 1;
  border: 3px solid #fffaf0; border-radius: 2px;
  box-shadow: 0 0 0 1px #b89a6a, 0 4px 10px -3px rgba(60, 35, 10, 0.45);
  box-sizing: content-box;
}
img.help-shot { box-sizing: border-box; }
svg.help-shot { width: 134px; height: 67px; }
.help-draw text { font-family: var(--type); }
.help-draw .hd-mults text { font-size: 19px; text-anchor: middle; }
.help-draw .hd-ends text { font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; fill: var(--muted); }
/* the number in a column of its own, so the heading and its line start at the same edge */
.help-text { display: grid; grid-template-columns: 22px 1fr; gap: 3px 9px; align-items: center; }
.help-text h3 { min-height: 24px; display: flex; align-items: center; }
.help-text h3 { margin: 0; font-family: var(--caps); font-weight: 400; font-size: 21px; line-height: 1.1; }
.help-num {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  font-family: var(--type); font-size: 13px; line-height: 1;
  color: var(--red); border: 1.5px solid var(--red); border-radius: 50%;
}
.help-text p { grid-column: 2; margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.25; color: var(--muted); }
.help-go { margin-top: 20px; }
/* how to get in touch, quietly under the button */
.help-contact { margin: 14px 0 0; text-align: center; font-size: var(--fs-small); line-height: 1.4; color: var(--muted); }
.help-contact a, .loading-contact a { color: var(--ink); text-decoration: underline dotted; text-underline-offset: 3px; overflow-wrap: anywhere; }
@media (max-width: 400px) {
  .help-card { padding: 18px 14px 16px; }
  .help-step { grid-template-columns: 118px 1fr; gap: 12px; }
  .help-shot { width: 118px; }
  svg.help-shot { width: 112px; height: 56px; }
  .help-text { gap: 2px 7px; }
  .help-text h3 { font-size: 18px; }
  .help-text p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .help, .help-card, .help-step { animation: none; }
}
/* No WebGL (see noGraphics in app.js): the message is long, so it wraps. */
.no-webgl #loading-text { max-width: 30em; padding: 0 16px; text-align: center; line-height: 1.4; }
