/* BandNerdz website: Flyers on the Floor.
   The app's world (setlist paper, gaffer tape, spike tape, red marker on a
   stage floor) turned up: whole flyers in the four tape colours. */

@font-face {
  font-family: "Permanent Marker";
  src: url("/fonts/permanent-marker.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Physical things: the same in any light. */
  --paper: #F4F2ED;
  --ink: #161513;
  --ink-2: #3B3934;
  --yellow: #FFD400;
  --pink: #FF5C9D;
  --cyan: #2EC4F1;
  --green: #7CE07A;
  --gaffer: #E6E4DD;

  /* Light: the afternoon rehearsal on blue-grey Marley. */
  --floor: #A7B0B5;
  --floor-tex: url("/img/floor-marley.webp");
  --floor-tex-blend: soft-light;
  --floor-tex-opacity: .55;
  --text: #161513;
  --text-2: #2F2D2A;
  --red: #C8261B;
  --tapebar: #1B1A19;
  --tapebar-press: #3A3936;
  --on-tapebar: #F1EFE9;
  --shadow: 0 18px 30px -12px rgb(28 34 38 / .45), 0 3px 6px -2px rgb(28 34 38 / .25);
  --shadow-lift: 0 26px 40px -14px rgb(28 34 38 / .5), 0 4px 8px -2px rgb(28 34 38 / .25);
  --focus: #161513;
  --tape-alpha: .9;

  --gutter: clamp(20px, 4.4vw, 64px);
  --max: 1440px;
  --body: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --marker: "Permanent Marker", "Marker Felt", "Archivo", sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Dark: the show. A black stage under one work light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --floor: #131211;
    --floor-tex: url("/img/floor-stage.webp");
    --floor-tex-blend: overlay;
    --floor-tex-opacity: .5;
    --text: #ECE9E3;
    --text-2: #A5A29B;
    --red: #D02A1E;
    --tapebar: #EDEAE3;
    --tapebar-press: #C9C6BF;
    --on-tapebar: #161513;
    --shadow: 0 20px 34px -12px rgb(0 0 0 / .75), 0 3px 8px -2px rgb(0 0 0 / .5);
    --shadow-lift: 0 28px 44px -14px rgb(0 0 0 / .8), 0 4px 10px -2px rgb(0 0 0 / .5);
    --focus: #FFD400;
    --tape-alpha: .86;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --floor: #131211;
  --floor-tex: url("/img/floor-stage.webp");
  --floor-tex-blend: overlay;
  --floor-tex-opacity: .5;
  --text: #ECE9E3;
  --text-2: #A5A29B;
  --red: #D02A1E;
  --tapebar: #EDEAE3;
  --tapebar-press: #C9C6BF;
  --on-tapebar: #161513;
  --shadow: 0 20px 34px -12px rgb(0 0 0 / .75), 0 3px 8px -2px rgb(0 0 0 / .5);
  --shadow-lift: 0 28px 44px -14px rgb(0 0 0 / .8), 0 4px 10px -2px rgb(0 0 0 / .5);
  --focus: #FFD400;
  --tape-alpha: .86;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--floor);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--body);
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  scrollbar-color: var(--text-2) var(--floor);
}
/* The floor's grain, laid over the flat floor colour. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--floor-tex) 0 0 / 512px 512px repeat;
  mix-blend-mode: var(--floor-tex-blend);
  opacity: var(--floor-tex-opacity);
  pointer-events: none;
}
::selection { background: var(--yellow); color: var(--ink); }
.flyer.yellow ::selection { background: var(--ink); color: var(--yellow); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--floor); }
::-webkit-scrollbar-thumb { background: var(--text-2); border: 3px solid var(--floor); border-radius: 2px; }

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.flyer :focus-visible { outline-color: var(--ink); }

.m { font-family: var(--marker); font-weight: 400; letter-spacing: 0; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--yellow); color: var(--ink); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }
.fine { font-size: .9375rem; line-height: 1.45; }

/* ---------- Tape ---------- */
/* White gaffer with torn ends. Ends are a zigzag mask, not a polygon. */
.tape {
  position: absolute;
  top: -15px;
  left: var(--x, 40%);
  width: clamp(96px, 22%, 160px);
  height: 32px;
  background: var(--gaffer);
  opacity: var(--tape-alpha);
  transform: translateX(-50%) rotate(var(--r, 2deg));
  box-shadow: 0 1px 2px rgb(0 0 0 / .18);
  --z: 5px;
  -webkit-mask:
    conic-gradient(from 45deg at left, #000 0 90deg, #0000 0) 0 0 / 51% calc(2 * var(--z)) repeat-y,
    conic-gradient(from -135deg at right, #000 0 90deg, #0000 0) 100% 0 / 51% calc(2 * var(--z)) repeat-y;
  mask:
    conic-gradient(from 45deg at left, #000 0 90deg, #0000 0) 0 0 / 51% calc(2 * var(--z)) repeat-y,
    conic-gradient(from -135deg at right, #000 0 90deg, #0000 0) 100% 0 / 51% calc(2 * var(--z)) repeat-y;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Tape bar: the primary action, as in the app ---------- */
.tapebar {
  --z: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border: 0;
  background: var(--tapebar);
  color: var(--on-tapebar);
  font: 760 1.0625rem/1.2 var(--body);
  font-stretch: 92%;
  text-decoration: none;
  cursor: pointer;
  -webkit-mask:
    conic-gradient(from 45deg at left, #000 0 90deg, #0000 0) 0 0 / 51% calc(2 * var(--z)) repeat-y,
    conic-gradient(from -135deg at right, #000 0 90deg, #0000 0) 100% 0 / 51% calc(2 * var(--z)) repeat-y;
  mask:
    conic-gradient(from 45deg at left, #000 0 90deg, #0000 0) 0 0 / 51% calc(2 * var(--z)) repeat-y,
    conic-gradient(from -135deg at right, #000 0 90deg, #0000 0) 100% 0 / 51% calc(2 * var(--z)) repeat-y;
  transition: background-color .15s, transform .2s var(--ease-out);
}
.tapebar:hover { transform: translateY(-1px); }
.tapebar:active { background: var(--tapebar-press); transform: translateY(1px); }
.tapebar:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--yellow); }
.flyer .tapebar { background: var(--ink); color: var(--paper); }
.flyer .tapebar:active { background: #3A3936; }
.tapebar.big { font-size: 1.25rem; padding: 18px 30px; min-height: 64px; width: 100%; }
.tapebar.small { min-height: 44px; padding: 10px 20px; font-size: 1rem; }
.tapebar[aria-disabled="true"] { cursor: default; opacity: 1; }
.tapebar[aria-disabled="true"]:hover { transform: none; }

/* ---------- Top bar ---------- */
.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter) 0;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
}
.logo { font-size: 1.9rem; line-height: 1; text-decoration: none; margin-right: auto; color: var(--text); }
.top nav { display: flex; gap: clamp(16px, 2.2vw, 32px); }
.top nav a { font-weight: 620; text-decoration: none; padding: 10px 0; background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 3px no-repeat; transition: background-size .25s var(--ease-out); }
.top nav a:hover { background-size: 100% 3px; }
.lights {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 12px;
  background: none; border: 2px solid currentColor; border-radius: 6px;
  font-weight: 620; font-size: .9375rem; cursor: pointer;
  color: var(--text);
}
.lights svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lights:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }

/* ---------- Flyers ---------- */
.flyer {
  position: relative;
  color: var(--ink);
  padding: clamp(28px, 3.4vw, 52px);
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt, 0deg));
}
.flyer.yellow { background: var(--yellow); }
.flyer.pink { background: var(--pink); }
.flyer.cyan { background: var(--cyan); }
.flyer.green { background: var(--green); }
.flyer.paper { background: var(--paper); }
.flyer h2 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); line-height: 1.02; text-wrap: balance; }
.flyer h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); line-height: 1.05; }
.flyer p { max-width: 62ch; font-weight: 520; }
.flyer h2 + p, .flyer h3 + p { margin-top: 14px; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(36px, 5vh, 64px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 7.2fr) minmax(0, 4.8fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(32px, 5vw, 96px);
  row-gap: clamp(36px, 5vh, 56px);
  align-items: start;
}
.hero-flyer { --tilt: -1.6deg; grid-row: 1 / span 3; padding-bottom: 28px; }
.hero-flyer h1 {
  font-size: clamp(3.4rem, 1.4rem + 6vw, 6rem);
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.pitch { margin-top: 18px; font-size: clamp(1.0625rem, .95rem + .45vw, 1.3rem); line-height: 1.42; font-weight: 600 !important; max-width: 34em !important; }
.beta-flyer { --tilt: 2deg; margin-top: 30px; }
.beta-flyer h2 { margin-bottom: 18px; }
.beta-flyer p { margin-top: 12px; }
.beta-flyer .fine { font-weight: 560; }
.newbie-flyer { --tilt: -1.3deg; margin: 0 clamp(0px, 4vw, 70px) 0 clamp(0px, 3vw, 48px); }
.newbie-flyer p { margin-top: 10px !important; }
.newbie-flyer h2 { font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem); }
/* Red's place in the first viewport: on the floor under the flyers, never on them. */
.red-spot { display: flex; align-items: flex-end; justify-content: flex-end; gap: 4px; align-self: start; margin-top: calc(-1 * clamp(36px, 5vh, 56px) - 10px); position: relative; z-index: 3; }
.red-spot .bubble { position: relative; background: var(--paper); color: var(--ink); padding: 14px 44px 12px 18px; max-width: 290px; transform: rotate(-1.5deg); box-shadow: var(--shadow); margin-bottom: 34px; }
.red-spot .bubble p { font-size: 1.15rem; line-height: 1.25; }
.red-spot .bubble.gone { visibility: hidden; }
.red-spot .marker { width: 150px; flex: none; transform: rotate(-18deg); filter: drop-shadow(0 10px 10px rgb(0 0 0 / .35)); }
.red-spot.pop .bubble { animation: pop .38s var(--ease-out); }
.red-spot.wiggle .marker { animation: wiggle-spot .7s var(--ease-out); }
@keyframes wiggle-spot { 30% { transform: rotate(-24deg); } 60% { transform: rotate(-14deg); } }
.red-spot.hidden { display: none; }
.red-spot .x { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--ink); border-radius: 4px; }
.red-spot .x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
html:not(.js) .red-spot .x { display: none; }

/* ---------- The round ---------- */
.round { margin-top: 26px; }
.round-row { display: flex; align-items: center; gap: 16px 18px; flex-wrap: wrap; }
.play {
  width: 64px; height: 64px; flex: none;
  border: 0; border-radius: 50%;
  background: var(--ink); color: var(--yellow);
  display: grid; place-items: center; cursor: pointer;
  transition: transform .2s var(--ease-out);
}
.play svg { width: 30px; height: 30px; fill: currentColor; grid-area: 1 / 1; }
.play:hover { transform: scale(1.05); }
.play:active { transform: scale(.96); }
.play .i-stop { display: none; }
.round[data-state="playing"] .play .i-play,
.round[data-state="revealed"].sounding .play .i-play { display: none; }
.round[data-state="playing"] .play .i-stop,
.round[data-state="revealed"].sounding .play .i-stop { display: block; }
.status { flex: 1 1 220px; font-weight: 640 !important; font-size: 1.0625rem; line-height: 1.35; }
.lights4 { display: flex; gap: 8px; }
.lights4 i { width: 22px; height: 22px; border: 2.5px solid var(--ink); transform: rotate(-3deg); }
.lights4 i:nth-child(2) { transform: rotate(2deg); }
.lights4 i:nth-child(3) { transform: rotate(-1deg); }
.lights4 i:nth-child(4) { transform: rotate(3deg); }
.lights4 i.on { background: var(--ink); }
.lights4 i:first-child { width: 26px; height: 26px; border-width: 3.5px; }
.lights4 { align-items: center; }

.controls { margin-top: 18px; gap: 12px; }
.pick { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.pick .m { font-size: clamp(3.2rem, 2.2rem + 2.4vw, 4.4rem); line-height: .9; font-variant-numeric: tabular-nums; min-width: 2.2ch; }
.pick small { font-size: .875rem; font-weight: 700; line-height: 1.2; max-width: 6em; }
.nudge { display: flex; gap: 8px; }
.key {
  min-width: 52px; min-height: 48px; padding: 0 10px;
  border: 2.5px solid var(--ink); border-radius: 6px;
  background: transparent; color: var(--ink);
  font-weight: 760; font-size: 1.0625rem; font-variant-numeric: tabular-nums; cursor: pointer;
}
.key:hover { background: rgb(22 21 19 / .08); }
.key:active { background: rgb(22 21 19 / .16); }
.tap { min-width: 0; padding-inline: 20px; }
.tap.hit { background: #3A3936; }
.lock { min-width: 0; padding-inline: 20px; }
.round button:disabled { cursor: not-allowed; transform: none; }
.round .tapebar:disabled { background: transparent; color: var(--ink); -webkit-mask: none; mask: none; box-shadow: inset 0 0 0 2.5px rgb(22 21 19 / .55); color: rgb(22 21 19 / .7); }
.round .key:disabled { opacity: .5; }

/* The tick tape: a strip of gaffer over the flyer's bottom edge. */
.ticktape {
  position: relative;
  margin: 26px calc(-1 * clamp(28px, 3.4vw, 52px) - 14px) 0 -8px;
  height: 92px;
  background: var(--gaffer);
  transform: rotate(.8deg);
  box-shadow: 0 6px 12px -6px rgb(0 0 0 / .35);
  touch-action: pan-y;
}
.ticks { position: absolute; inset: 0 24px; }
.ticks i { position: absolute; top: 0; width: 2px; height: 14px; background: var(--ink); transform: translateX(-1px); }
.ticks i.major { height: 24px; width: 2.5px; }
.ticks b { position: absolute; top: 30px; transform: translateX(-50%); font: 700 .875rem/1 var(--body); font-variant-numeric: tabular-nums; }
.ticktape input[type="range"] {
  -webkit-appearance: none; appearance: none;
  position: absolute; inset: 0 12px; width: calc(100% - 24px); height: 100%;
  margin: 0; background: transparent; cursor: pointer; z-index: 3;
}
.ticktape input[type="range"]::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.ticktape input[type="range"]::-moz-range-track { height: 100%; background: transparent; }
/* The thumb is the visitor's pick: seat one's yellow tape with its circle. */
.ticktape input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 92px; margin-top: 0;
  background:
    radial-gradient(circle at 50% 70px, var(--ink) 0 6px, transparent 6.5px),
    linear-gradient(90deg, transparent 10px, var(--ink) 10px 14px, transparent 14px) 0 0 / 100% 56px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 0 58px / 100% 26px no-repeat;
  border: 0;
}
.ticktape input[type="range"]::-moz-range-thumb {
  width: 24px; height: 92px; border: 0; border-radius: 0;
  background:
    radial-gradient(circle at 50% 70px, var(--ink) 0 6px, transparent 6.5px),
    linear-gradient(90deg, transparent 10px, var(--ink) 10px 14px, transparent 14px) 0 0 / 100% 56px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 0 58px / 100% 26px no-repeat;
}
.ticktape input[type="range"]:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

/* The truth: hidden until the reveal. */
.truth { position: absolute; inset: 0 24px; pointer-events: none; z-index: 4; visibility: hidden; }
.round[data-state="revealed"] .truth, .truth.hunting { visibility: visible; }
.truth .cursor { position: absolute; top: -16px; left: var(--hunt, 0%); width: 5px; height: 112px; margin-left: -2.5px; background: var(--red); border-radius: 2px; }
.truth.settled .cursor { left: var(--at, 50%); }

/* After the reveal the controls make way for the answer, circled in red. */
.reveal-row { display: none; margin-top: 18px; align-items: center; gap: 22px 30px; min-height: 96px; }
.round[data-state="revealed"].settled .reveal-row { display: flex; }
.round[data-state="revealed"].settled .controls { display: none; }
.big-truth { position: relative; flex: none; padding: 6px 22px; }
.big-truth .m { display: block; font-size: clamp(3.6rem, 2.6rem + 2.6vw, 5rem); line-height: .95; font-variant-numeric: tabular-nums; }
.big-truth .ring { position: absolute; left: 0; top: -10px; width: 100%; height: calc(100% + 20px); overflow: visible; }
.big-truth .ring path { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.round.settled .big-truth .ring path { stroke-dashoffset: 0; transition: stroke-dashoffset .6s cubic-bezier(.5, 0, .2, 1) .1s; }
.result { flex: 1 1 260px; margin: 0; font-weight: 640; font-size: 1.125rem; line-height: 1.4; max-width: 40em; }
.result:empty { display: none; }
.result b.m { font-weight: 400; font-size: 1.35em; }
.again { margin-top: 14px; }
.nojs { margin-top: 14px; font-weight: 640; }
.js .nojs { display: none; }
html:not(.js) .round .round-row, html:not(.js) .round .ticktape { display: none; }

/* ---------- How it plays ---------- */
.how { max-width: var(--max); margin: 0 auto; padding: clamp(28px, 4vw, 48px) var(--gutter) 0; }
.how-head { --tilt: .9deg; max-width: 760px; margin-left: clamp(0px, 12vw, 200px); margin-top: calc(-1 * clamp(0px, 3vw, 40px)); }
.shots {
  margin-top: clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3.4vw, 56px);
  counter-reset: none;
}
.shots { perspective: 1800px; perspective-origin: 50% 0%; }
.shot { transform: rotate(var(--r)); transform-style: preserve-3d; }
/* The camera: phones lie on the floor and we look down at them from a low
   angle; the one being passed is lifted off the floor, mid hand-off. As the
   row scrolls in, the camera rises toward overhead. */
.shot .phone { transform: rotateX(20deg); transform-origin: 50% 100%; }
.shot.passing .phone { transform: translateY(-30px) rotateX(10deg) rotateZ(-6deg) scale(1.05); box-shadow: var(--shadow-lift), 0 60px 50px -30px rgb(0 0 0 / .45), inset 0 0 0 1.5px #3A3936; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .shot .phone { animation: camera linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .shot.passing .phone { animation-name: camera-pass; }
  }
}
@keyframes camera { from { transform: rotateX(42deg); } to { transform: rotateX(20deg); } }
@keyframes camera-pass { from { transform: translateY(10px) rotateX(36deg) rotateZ(2deg) scale(1); } to { transform: translateY(-30px) rotateX(10deg) rotateZ(-6deg) scale(1.05); } }
.shot:nth-child(even) { margin-top: clamp(0px, 4vw, 60px); }
.phone {
  position: relative;
  aspect-ratio: 603 / 1311;
  padding: 3.2%;
  background: #0B0B0A;
  border-radius: 13% / 6%;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #3A3936;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 10.5% / 4.9%; }
.phone .gaffer { position: absolute; left: 50%; bottom: 12%; width: 62%; height: 26px; transform: translateX(-50%) rotate(-4deg); background: var(--gaffer); opacity: .85; --z: 4px;
  -webkit-mask: conic-gradient(from 45deg at left, #000 0 90deg, #0000 0) 0 0 / 51% calc(2 * var(--z)) repeat-y, conic-gradient(from -135deg at right, #000 0 90deg, #0000 0) 100% 0 / 51% calc(2 * var(--z)) repeat-y;
  mask: conic-gradient(from 45deg at left, #000 0 90deg, #0000 0) 0 0 / 51% calc(2 * var(--z)) repeat-y, conic-gradient(from -135deg at right, #000 0 90deg, #0000 0) 100% 0 / 51% calc(2 * var(--z)) repeat-y;
}
.phone .gaffer { top: -12px; bottom: auto; transform: translateX(-50%) rotate(-3deg); }
.for-dark { display: none; }
:root[data-theme="dark"] .for-dark { display: block; }
:root[data-theme="dark"] .for-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .for-dark { display: block; }
  :root:not([data-theme="light"]) .for-light { display: none; }
}
.label {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px; padding: 6px 16px 6px 12px;
  color: var(--ink); font-weight: 760; font-size: 1.125rem;
  transform: rotate(-1.5deg);
}
.label b { font-size: 1.5rem; line-height: 1; font-weight: 400; }
.shot > p:last-child { margin-top: 10px; font-weight: 520; max-width: 26ch; color: var(--text); }
.yellow-tape { background: var(--yellow); }
.pink-tape { background: var(--pink); }
.cyan-tape { background: var(--cyan); }
.green-tape { background: var(--green); }
.caption { margin-top: 40px; color: var(--text-2); font-size: .9375rem; font-weight: 560; }

/* ---------- Rules ---------- */
.rules {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px); align-items: start;
}
.rules-flyer { --tilt: -1deg; }
.rule-list { margin-top: 26px; display: grid; gap: 16px; }
.rule-list li { display: grid; grid-template-columns: minmax(3.2rem, max-content) 1fr; gap: 14px; align-items: baseline; font-weight: 560; font-size: 1.125rem; line-height: 1.4; max-width: 52ch; }
.rule-list b { font-size: 2rem; line-height: 1; font-weight: 400; text-align: center; }
.example-flyer { --tilt: 2.2deg; margin-top: clamp(0px, 6vw, 90px); }
.example { width: 100%; margin-top: 18px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.example th, .example td { text-align: left; padding: 12px 8px 12px 0; border-bottom: 1.5px solid #CFCCC4; vertical-align: middle; }
.example thead th { font-size: .8125rem; font-weight: 760; color: var(--ink-2); padding-bottom: 8px; }
.example tbody th { font-weight: 760; }
.example .who { display: inline-flex; align-items: center; gap: 10px; }
.example td small { display: block; font-size: .8125rem; color: var(--ink-2); font-weight: 600; }
.example s { color: var(--ink-2); text-decoration-color: var(--red); text-decoration-thickness: 3px; margin-right: 6px; }
.example b.m { font-size: 1.6rem; font-weight: 400; }
.example-flyer .fine { margin-top: 16px; color: var(--ink-2); font-weight: 560; }
.seat { display: inline-grid; place-items: center; width: 30px; height: 26px; flex: none; transform: rotate(-3deg); }
.seat i { display: block; background: var(--ink); }
.seat .ci { width: 11px; height: 11px; border-radius: 50%; }
.seat .sq { width: 11px; height: 11px; }
.seat .tr { width: 13px; height: 12px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.seat .di { width: 10px; height: 10px; transform: rotate(45deg); }

/* ---------- Aids ---------- */
.aids { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter) 0; }
.aids-flyer { --tilt: 1.2deg; max-width: 1080px; margin-left: auto; margin-right: clamp(0px, 6vw, 100px); }
.aid-list { margin-top: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.aid-list > div { border-top: 3px solid var(--ink); padding-top: 14px; }
.aid-list dt { font-size: 1.6rem; line-height: 1.1; }
.aid-list dd { margin-top: 8px; font-weight: 560; line-height: 1.45; }

/* ---------- What you need + FAQ ---------- */
.need {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 6.4fr) minmax(0, 5.6fr);
  gap: clamp(32px, 5vw, 80px); align-items: start;
}
.need-flyer { --tilt: -1.4deg; }
.need-list { margin-top: 24px; display: grid; gap: 18px; }
.need-list li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; line-height: 1.45; font-weight: 520; max-width: 58ch; }
.need-list .seat { margin-top: 2px; }
.need-list b { font-weight: 760; }
.faq-flyer { --tilt: 1.8deg; margin-top: clamp(0px, 5vw, 70px); }
.faq-flyer h2 { margin-bottom: 14px; }
.faq-flyer details { border-top: 2.5px solid var(--ink); }
.faq-flyer details:last-of-type { border-bottom: 2.5px solid var(--ink); }
.faq-flyer summary::marker, .red-lines summary::marker { content: ""; }
.faq-flyer summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 0; font-weight: 760; font-size: 1.0625rem;
}
.faq-flyer summary::-webkit-details-marker { display: none; }
.faq-flyer summary::after { content: "+"; font: 400 1.8rem/1 var(--marker); transition: transform .25s var(--ease-out); }
.faq-flyer details[open] summary::after { transform: rotate(45deg); }
.faq-flyer details p { padding: 0 0 16px; font-weight: 540; }

/* ---------- Close ---------- */
.close { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 11vw, 150px) var(--gutter) clamp(60px, 8vw, 110px); }
.close-flyer { --tilt: -1.2deg; max-width: 980px; margin: 0 auto; padding: clamp(36px, 4.6vw, 72px); }
.close-flyer h2 { font-size: clamp(2.6rem, 1.6rem + 3.4vw, 5rem); line-height: .98; max-width: 14ch; }
.close-flyer > p { margin-top: 20px; font-size: 1.1875rem; font-weight: 600; }
.cta-row { margin-top: 30px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-row .tapebar.big { width: auto; flex: 0 1 auto; }
.appstore { font-weight: 760; font-size: 1.125rem; }
.close-flyer .fine { margin-top: 22px; font-weight: 560; }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) calc(110px + env(safe-area-inset-bottom));
  border-top: 2px solid color-mix(in srgb, var(--text) 25%, transparent);
  display: grid; grid-template-columns: auto 1fr; gap: 12px 32px; align-items: start;
  color: var(--text-2);
}
.foot .m { color: var(--text); font-size: 1.3rem; margin-right: 10px; }
.foot-controls { display: flex; gap: 24px; justify-content: flex-end; flex-wrap: wrap; align-items: start; }
.foot .fine { grid-column: 1 / -1; max-width: 70ch; }
.link { background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--text); font-weight: 640; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; cursor: pointer; }
.red-lines summary::-webkit-details-marker { display: none; }
.red-lines summary { list-style: none; cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 640; color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.red-lines summary::after { content: " +"; font-family: var(--marker); text-decoration: none; display: inline-block; margin-left: 4px; }
.red-lines[open] summary::after { content: " \2212"; }
.red-lines ul { margin-top: 6px; display: grid; gap: 6px; max-width: 40ch; }
.red-lines li { font-family: var(--marker); color: var(--text); }

/* ---------- Red, the companion ---------- */
.red {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 30; width: 176px; pointer-events: none;
}
.red .marker { width: 176px; height: auto; transform: rotate(-22deg); transform-origin: 70% 50%; filter: drop-shadow(0 10px 10px rgb(0 0 0 / .35)); pointer-events: auto; }
.red .pupil { transition: transform .4s var(--ease-out); }
.red.looking .pupil { transform: translateX(-4px) translateY(-2px); }
.red .bubble {
  position: absolute; right: 36px; bottom: 82px; width: max-content; max-width: min(300px, 70vw);
  background: var(--paper); color: var(--ink);
  padding: 14px 44px 12px 18px; transform: rotate(-1.5deg);
  box-shadow: var(--shadow); pointer-events: auto;
}
.red .bubble[hidden] { display: none; }
.red .bubble p { font-size: 1.15rem; line-height: 1.25; }
.red .x { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--ink); border-radius: 4px; }
.red .x:hover { background: rgb(22 21 19 / .08); }
.red .x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.red.hidden, .red.yield { display: none; }
.red.tucked .bubble { visibility: hidden; }
.red.away { visibility: hidden; }
.red.pop .bubble { animation: pop .38s var(--ease-out); }
.red.wiggle .marker { animation: wiggle .7s var(--ease-out); }
@keyframes pop { from { transform: rotate(-1.5deg) translateY(8px) scale(.96); opacity: 0; } }
@keyframes wiggle { 30% { transform: rotate(-28deg); } 60% { transform: rotate(-18deg); } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .big-truth .ring path { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1366px) {
  .red, .red .marker { width: 140px; }
  .red .bubble { bottom: 66px; }
}
@media (max-width: 1180px) {
  .top nav { display: none; }
}
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-flyer { grid-row: auto; --tilt: -1deg; }
  .beta-flyer { margin-top: 0; --tilt: 1.4deg; }
  .newbie-flyer { margin: 0; }
  .red-spot { margin-top: -18px; }
  .how-head { margin-left: 0; margin-top: 0; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot:nth-child(even) { margin-top: 0; }
  .rules, .need { grid-template-columns: 1fr; }
  .example-flyer, .faq-flyer { margin-top: 0; }
  .aid-list { grid-template-columns: 1fr; gap: 18px; }
  .aids-flyer { margin: 0; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .top { padding-top: 16px; gap: 10px; }
  .logo { font-size: 1.5rem; }
  .lights span { display: none; }
  .lights { padding: 8px 10px; }
  .tapebar.small { padding: 10px 14px; font-size: .9375rem; }
  .flyer { --tilt: 0deg !important; padding: 26px 20px; }
  .hero { padding-top: 26px; row-gap: 28px; }
  .hero-flyer h1 { font-size: clamp(2.9rem, 13vw, 3.6rem); }
  .round-row:first-child { gap: 12px; }
  .status { flex-basis: calc(100% - 80px); order: 2; font-size: 1rem; }
  .lights4 { order: 3; width: 100%; }
  .controls { display: grid; grid-template-columns: 1fr auto; }
  .pick { grid-column: 1 / -1; }
  .nudge { grid-column: 1 / -1; }
  .nudge .key { flex: 1; }
  .tap, .lock { width: 100%; min-width: 0; }
  .tap { grid-column: 1; }
  .lock { grid-column: 2; }
  .ticktape { margin-right: -28px; margin-left: -12px; }
  .ticks b.minor-label { display: none; }
  .shots { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 24px var(--gutter) 18px; scrollbar-width: thin; }
  .shot { flex: 0 0 min(260px, 72vw); scroll-snap-align: center; }
  .shot > p:last-child { font-size: .9375rem; }
  .label { font-size: 1rem; padding: 4px 12px 4px 8px; }
  .rule-list li { grid-template-columns: minmax(2.4rem, max-content) 1fr; font-size: 1.0625rem; gap: 12px; }
  .cta-row .tapebar.big { width: 100%; }
  .foot { grid-template-columns: 1fr; }
  .foot-controls { justify-content: flex-start; }
  .red-spot .marker { width: 120px; }
  .red-spot .bubble { max-width: 230px; }
  .red { width: 120px; }
  .red .marker { width: 120px; }
  .red .bubble { right: 10px; bottom: 58px; }
}
@media (forced-colors: active) {
  .tape, .phone .gaffer { display: none; }
  .tapebar { border: 2px solid ButtonText; -webkit-mask: none; mask: none; }
  .flyer { border: 2px solid CanvasText; }
}
@media print {
  .red, .lights, .round { display: none; }
  body::before { display: none; }
}

/* ---------- 404 ---------- */
.lost-main { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 10vh, 120px) var(--gutter) 96px; }
.lost-flyer { --tilt: -1.6deg; max-width: 640px; margin: 0 auto; }
.lost-flyer h1 { font-size: clamp(2.6rem, 1.8rem + 3vw, 4.4rem); line-height: 1.05; }
.lost-flyer p { margin-top: 16px; font-weight: 560; font-size: 1.125rem; }
.lost-flyer .tapebar { margin-top: 28px; width: auto; }
.lost-code { position: relative; display: inline-block; padding: 0 .18em; margin-right: .12em; }
.lost-code::after { content: ""; position: absolute; inset: 0; border: 4.5px solid var(--red); border-radius: 50%; transform: rotate(-4deg); }

/* ---------- Placement of tape and staged shots (classes, not inline styles: the CSP allows no inline style) ---------- */
.p-r1_6 { --r:1.6deg; }
.p-r2 { --r:2deg; }
.p-rm1_2 { --r:-1.2deg; }
.p-rm2_2 { --r:-2.2deg; }
.p-x12-rm3 { --x:12%;--r:-3deg; }
.p-x18-rm2 { --x:18%;--r:-2deg; }
.p-x20-rm2 { --x:20%;--r:-2deg; }
.p-x24-rm3 { --x:24%;--r:-3deg; }
.p-x30-rm4 { --x:30%;--r:-4deg; }
.p-x34-r2 { --x:34%;--r:2deg; }
.p-x38-r3 { --x:38%;--r:3deg; }
.p-x40-r3 { --x:40%;--r:3deg; }
.p-x40-rm3 { --x:40%;--r:-3deg; }
.p-x54-r3 { --x:54%;--r:3deg; }
.p-x60-r2 { --x:60%;--r:2deg; }
.p-x70-r2 { --x:70%;--r:2deg; }
.p-x70-r3 { --x:70%;--r:3deg; }
