/* Tallygate: game night on green card-table felt. Sheets torn from a scorepad, graphite tally
   marks in five-bar gates, a coloured pencil each, a gold star and the gold game-tile button.
   No JavaScript anywhere: the tally and the spinner are radio buttons and the rules below. */

@font-face { font-family: "Lilita One"; src: url(/assets/fonts/lilita.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kalam"; src: url(/assets/fonts/kalam.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kalam"; src: url(/assets/fonts/kalam-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/assets/fonts/atkinson.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/assets/fonts/atkinson-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* ---- Tokens: Daylight, then Lamplight ---- */

:root {
  --felt: #2E6A4F;
  --felt-deep: #235440;
  --felt-line: #3C7A5D;
  --chalk: #F6F1E3;
  --chalk-soft: #CFE0D3;
  --chalk-dash: rgb(246 241 227 / .75);
  --paper: #FCFAF3;
  --paper-edge: #E5DFCF;
  --grid: #CBD9E3;
  --grid-line: rgb(203 217 227 / .55);
  --graphite: #34363A;
  --graphite-soft: #6A6D72;
  --graphite-faint: rgb(106 109 114 / .5);
  --graphite-dash: rgb(52 54 58 / .7);
  --gold: #E7B547;
  --gold-deep: #B4862A;
  --on-gold: #2B2416;
  --gold-wash: rgb(231 181 71 / .35);
  --shadow: rgb(14 36 26 / .28);
  --hole: rgb(35 84 64 / .55);
  --link-paper: #235440;
  --p0: #C0392B; --p1: #2B5EA7; --p2: #2F7D3E; --p3: #C46A12;
  --p4: #74469A; --p5: #8A5532; --p6: #1F7A7A; --p7: #B03A6E;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --felt: #173A2B;
    --felt-deep: #102C20;
    --felt-line: #214A37;
    --chalk: #EDE6D2;
    --chalk-soft: #A9C2B1;
    --chalk-dash: rgb(237 230 210 / .7);
    --paper: #E9E3D2;
    --paper-edge: #CBC3AE;
    --grid: #B7C3C9;
    --grid-line: rgb(183 195 201 / .55);
    --graphite: #2C2E31;
    --graphite-soft: #5B5E62;
    --graphite-faint: rgb(91 94 98 / .55);
    --graphite-dash: rgb(44 46 49 / .7);
    --gold: #DDAA3E;
    --gold-deep: #A77B22;
    --gold-wash: rgb(221 170 62 / .38);
    --shadow: rgb(0 0 0 / .3);
    --hole: rgb(16 44 32 / .6);
    --link-paper: #173A2B;
  }
}

/* ---- Base ---- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 12px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--felt) url(/assets/img/felt.svg) 0 0 / 40px 40px;
  color: var(--chalk);
  font: 400 1.0625rem/1.55 var(--body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sheet :focus-visible, .slip :focus-visible { outline-color: var(--felt); }
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.skip {
  position: absolute; left: 16px; top: -120px; z-index: 50;
  padding: 10px 16px; border-radius: 10px;
  background: var(--gold); color: var(--on-gold); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.ink0 { color: var(--p0); } .ink1 { color: var(--p1); } .ink2 { color: var(--p2); } .ink3 { color: var(--p3); }
.ink4 { color: var(--p4); } .ink5 { color: var(--p5); } .ink6 { color: var(--p6); } .ink7 { color: var(--p7); }

/* ---- Paper: a sheet torn off the pad, with its row of perforations ---- */

.sheet, .slip {
  position: relative;
  color: var(--graphite);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--paper-edge);
  border-radius: 3px;
  box-shadow: 2px 4px 0 var(--shadow);
}
.sheet::before, .slip::before {
  content: "";
  position: absolute; left: 4px; right: 4px; top: -3px; height: 6px;
  background: radial-gradient(circle at 3px 3px, var(--hole) 2.4px, transparent 2.9px) 0 0 / 10.08px 6px space no-repeat;
  pointer-events: none;
}
.tilt-a { rotate: -1.1deg; } .tilt-b { rotate: 1.8deg; } .tilt-c { rotate: .7deg; }
.tilt-d { rotate: -2deg; } .tilt-e { rotate: -.6deg; }

.mtag { margin: 0 0 6px; font: 700 .75rem/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--graphite-soft); }

/* ---- Buttons: the gold game tile, and the dashed chalk one ---- */

.tile {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 26px;
  border: 0; border-radius: 14px;
  background: var(--gold); color: var(--on-gold);
  box-shadow: 0 4px 0 var(--gold-deep);
  font: 700 1.0625rem/1.2 var(--body); letter-spacing: .01em; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
  transition: translate .08s ease-out, box-shadow .08s ease-out, filter .15s;
}
.tile:hover { filter: brightness(1.05) saturate(1.05); }
.tile:active { translate: 0 3px; box-shadow: 0 1px 0 var(--gold-deep); }
.chalk {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 18px;
  border: 1.6px dashed var(--chalk-dash); border-radius: 14px;
  background: transparent; color: var(--chalk);
  font: 700 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chalk:hover { background: rgb(255 255 255 / .07); }
.chalk.on-paper { color: var(--graphite); border-color: var(--graphite-dash); }
.chalk.on-paper:hover { background: rgb(52 54 58 / .06); }
.chalk.small { min-height: 44px; padding: 8px 14px; font-size: .9375rem; }
.ink-i { width: 20px; height: 20px; flex: none; }
.chalk .ink-i { width: 18px; height: 18px; }

/* ---- Header and footer ---- */

.top { padding: 16px 0 4px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; font: 400 1.625rem/1 var(--display); letter-spacing: .01em; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 4px 18px; }
.nav a { padding: 10px 0; color: var(--chalk); font-weight: 700; font-size: .9375rem; text-decoration: none; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--chalk-soft); }
.nav-wide { display: none; }
@media (min-width: 760px) { .nav-wide { display: inline; } .brand { font-size: 1.875rem; } }

.foot { margin-top: 24px; padding: 36px 0 44px; background: rgb(0 0 0 / .14); border-top: 1px solid var(--felt-line); color: var(--chalk-soft); }
.foot-in { display: grid; gap: 18px; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--chalk); font: 400 1.5rem/1 var(--display); }
.foot-brand img { width: 32px; height: 32px; border-radius: 8px; }
.foot-luck { margin: 0; color: var(--chalk); font: 700 1.25rem/1.2 var(--hand); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot-links a { padding: 6px 0; color: var(--chalk); font-weight: 700; }
.foot-mail { overflow-wrap: anywhere; }
.foot-small { max-width: 62em; margin: 0; font-size: .875rem; line-height: 1.6; }
.foot-small a { color: var(--chalk-soft); }
.foot-copy { display: block; margin-bottom: 4px; color: var(--chalk); font-weight: 700; }

/* ---- Section furniture on the felt ---- */

section > .wrap > h2, .yours-copy h2, .last h2 {
  font: 400 clamp(2rem, 6.4vw, 3rem)/1.05 var(--display); color: var(--chalk);
  letter-spacing: .005em; text-wrap: balance;
}
.intro { max-width: 36em; margin: 12px 0 0; color: var(--chalk-soft); font-size: 1.125rem; }
.cta-note { margin: 0; color: var(--chalk-soft); font-size: .9375rem; }
.hand-note { margin: 10px 0 0; color: var(--graphite-soft); font: 400 1.125rem/1.3 var(--hand); }

/* ---- Hero ---- */

.hero { padding: 18px 0 72px; overflow-x: clip; }
.hero-in { display: grid; gap: 28px; align-items: center; }
.hero h1 { margin-bottom: 18px; color: var(--chalk); font: 400 clamp(2.625rem, 10.5vw, 4.5rem)/.98 var(--display); letter-spacing: .005em; text-wrap: balance; }
.lead { max-width: 33em; margin-bottom: 28px; font-size: clamp(1.0625rem, 2.8vw, 1.25rem); line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-bottom: 16px; }
.hero-table { position: relative; display: grid; justify-items: center; isolation: isolate; padding-top: 4px; }
.notes { display: grid; width: min(100%, 420px); min-height: 92px; margin-bottom: -6px; position: relative; z-index: 2; }
.note {
  grid-area: 1 / 1; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 0;
  margin: 0; color: var(--chalk); font: 700 1.1875rem/1.15 var(--hand); text-align: center; rotate: -2deg;
}
.note span { max-width: 14em; }
.note .arrow { width: 30px; height: auto; margin-top: 2px; color: var(--chalk); flex: none; }
.note-5 { visibility: hidden; align-self: center; rotate: 2deg; }
.hero-table:has(.pad) .note-4 { visibility: hidden; }
.hero-table:has(.c1 .n4:checked) .note-4 { visibility: visible; }
.hero-table:has(.c1 .n5:checked):not(:has(.n7:checked)) .note-5 { visibility: visible; }
.hero-pencil { position: relative; z-index: -1; justify-self: end; width: 200px; margin: -26px -18px 0 0; rotate: 4deg; pointer-events: none; }
@media (min-width: 920px) {
  .hero { padding-bottom: 96px; }
  .hero-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding-top: 28px; }
  .pad { width: 440px; }
  .gates { max-width: 96px; }
  .hero-pencil { position: absolute; z-index: 1; width: 250px; right: -128px; bottom: 120px; margin: 0; rotate: -64deg; }
}

/* ---- The tally (state rules are generated by build.swift, see the end of this file) ---- */

.pad { display: block; width: min(100%, 420px); margin: 0; padding: 16px 6px 12px; rotate: -1deg; user-select: none; -webkit-user-select: none; }
.pad-head { position: relative; min-height: 58px; padding: 4px 12px 6px; }
.pad-game { margin: 0; color: var(--graphite); font: 700 1.0625rem/1.25 var(--body); }
.pad-game span { display: block; color: var(--graphite-soft); font-size: .875rem; font-weight: 400; }
.verdict { display: none; margin: 0; font: 700 2.125rem/1.1 var(--hand); }
.verdict .v { display: none; }
.verdict .vt { color: var(--graphite); }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col { position: relative; }
.col input { position: absolute; top: 12px; left: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.keys { height: 0; font-size: 0; line-height: 0; }
.face { display: flex; flex-direction: column; align-items: center; min-height: 244px; padding: 0 4px 60px; }
.sep { position: absolute; left: -6px; top: 0; width: 12px; height: 100%; color: var(--graphite-soft); opacity: .5; pointer-events: none; }
.name { position: relative; margin: 4px 0 0; padding: 2px 6px; font: 700 1.375rem/1.2 var(--hand); white-space: nowrap; }
.loop { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--graphite); visibility: hidden; pointer-events: none; }
.loop path { stroke-dasharray: 1 2; stroke-dashoffset: 1; }
.star { display: grid; place-items: center; height: 18px; color: var(--gold); visibility: hidden; }
.star-i { width: 15px; height: 15px; }
.gates { width: 100%; max-width: 84px; height: auto; margin-top: 10px; overflow: visible; }
.gates .all { transform: translateX(21px); }
.gates .st { visibility: hidden; stroke-dashoffset: 1; }
.gates .st path { stroke-dasharray: 1 2; }
.gates .k5 { --draw: .26s; }
.tot { min-height: 1.1em; margin: auto 0 0; color: var(--graphite); font: 700 2.5rem/1.1 var(--hand); }
.tap {
  display: none; position: absolute; inset: 0 3px 62px; z-index: 2;
  border-radius: 8px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.tap:hover { background: rgb(52 54 58 / .05); }
.tap:active { background: rgb(52 54 58 / .09); }
.rub {
  display: none; position: absolute; z-index: 3; left: 50%; bottom: 10px;
  width: 44px; height: 44px; margin-left: -22px; place-items: center;
  border: 1.5px solid var(--graphite-faint); border-radius: 50%;
  color: var(--graphite-soft); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.rub:hover { background: rgb(52 54 58 / .06); }
.rub .ink-i { width: 18px; height: 18px; }
.ring { position: absolute; inset: 0 3px; z-index: 4; border-radius: 8px; pointer-events: none; }
.col input:focus-visible ~ .ring { outline: 3px solid var(--felt); outline-offset: -2px; }
.pad-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 10px 0; }
.pad-how { flex: 1 1 150px; margin: 0; color: var(--graphite-soft); font: 400 1.0625rem/1.3 var(--hand); }

/* ---- Two ways to keep score ---- */

.how { padding: 48px 0 32px; }
.spread { display: grid; justify-items: center; gap: 32px; max-width: 880px; margin: 48px auto 0; }
.slip { width: 100%; max-width: 560px; padding: 30px clamp(18px, 5vw, 30px) 26px; }
.way h3 { margin-bottom: 10px; font: 700 1.375rem/1.2 var(--body); }
.shot { width: min(250px, 62vw); border: 1px solid rgb(0 0 0 / .18); border-radius: 24px; box-shadow: 3px 6px 0 var(--shadow); }
.way-art { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.gates-art { width: 176px; height: auto; overflow: visible; }
.way-sum { color: var(--graphite); font: 700 2.5rem/1 var(--hand); }
.rounds { width: 100%; max-width: 380px; margin-top: 12px; border-collapse: collapse; color: var(--graphite); font: 400 1.375rem/1 var(--hand); }
.rounds th, .rounds td { height: 40px; padding: 4px 2px; text-align: center; font-weight: 400; }
.rounds thead th { font-weight: 700; white-space: nowrap; }
.rounds tbody th, .rounds tfoot th { width: 34px; color: var(--graphite-soft); }
.rounds tfoot th { font-family: var(--body); font-size: 1.25rem; }
.rounds .rule-row td { height: auto; padding: 0; }
.double-rule { width: 100%; height: 13px; color: var(--graphite); overflow: visible; }
.rounds tfoot td { color: var(--graphite-soft); font-weight: 700; font-size: 1.875rem; }
.rounds tfoot td.in-front { color: var(--graphite); }
.lead-star { display: inline-block; vertical-align: super; margin-left: 2px; color: var(--gold); }
.lead-star .star-i { width: 14px; height: 14px; }
.win-big { margin: 14px 0 4px; font: 700 clamp(2.25rem, 9vw, 2.75rem)/1.1 var(--hand); }
.win-names { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 10px 0 4px; font: 700 1.5rem/1.2 var(--hand); }
.circled { position: relative; padding: 2px 6px; }
.loop-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--graphite); pointer-events: none; }
@media (min-width: 820px) {
  .spread { grid-template-columns: minmax(0, 1fr) 250px; justify-items: stretch; align-items: center; gap: 0; }
  .spread .slip { justify-self: end; margin-right: -34px; padding-right: 66px; }
  .spread.flip { grid-template-columns: 250px minmax(0, 1fr); }
  .spread.flip .slip { justify-self: start; margin: 0 0 0 -34px; padding-left: 66px; padding-right: 30px; }
  .spread.flip .shot { order: -1; }
  .shot { position: relative; z-index: 1; width: 250px; }
  .spread + .spread { margin-top: 8px; }
}

/* ---- House rules and the spinner ---- */

.rules { padding: 56px 0 40px; }
.rules-in { display: grid; gap: 56px; margin-top: 36px; }
.rules-sheet { padding: 24px clamp(10px, 3vw, 22px) 16px; rotate: .4deg; }
.rule-list { margin: 0; padding: 0; list-style: none; }
.rule-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 8px; padding: 10px 0; }
.rn { color: var(--graphite-soft); font: 400 1.625rem/1.1 var(--hand); text-align: center; }
.rule-list h3 { font: 700 1.125rem/1.35 var(--body); }
.rule-list p { margin: 2px 0 0; }
.pencils { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 6px !important; font: 700 1.3125rem/1.4 var(--hand); }
.rule-sum { margin-top: 6px; }
.rule-sum p { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 8px; align-items: baseline; margin: 6px 0 0; font: 700 1.375rem/1.3 var(--hand); }
.rule-sum .rn { font-family: var(--body); font-size: 1.25rem; }

.spinner { --d: min(300px, 76vw); --turn: .6s; display: grid; justify-items: center; align-content: start; gap: 18px; text-align: center; }
.spin-title { color: var(--chalk); font: 400 clamp(1.75rem, 5vw, 2.25rem)/1.1 var(--display); }
.spinner input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.disc { position: relative; width: var(--d); height: var(--d); border-radius: 50%; background: var(--paper); box-shadow: 0 5px 0 var(--shadow); }
.disc-ring { position: absolute; inset: 14%; border: 1px solid var(--grid-line); border-radius: 50%; }
.disc-pencil { position: absolute; left: 50%; top: 50%; width: 56%; max-width: none; translate: -50% -50%; rotate: -45deg; }
.who { position: absolute; left: 50%; top: 50%; translate: -50% -50%; isolation: isolate; padding: 0 6px; font: 400 1.375rem/1.25 var(--hand); white-space: nowrap; }
.w0 { margin-top: calc(var(--d) * -.4); }
.w1 { margin-left: calc(var(--d) * .37); --lag: calc(var(--turn) * -.75); }
.w2 { margin-top: calc(var(--d) * .4); --lag: calc(var(--turn) * -.5); }
.w3 { margin-left: calc(var(--d) * -.37); --lag: calc(var(--turn) * -.25); }
.s1 { --lag: calc(var(--turn) * -.75); } .s2 { --lag: calc(var(--turn) * -.5); } .s3 { --lag: calc(var(--turn) * -.25); }
.who::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 8px; background: var(--gold-wash); visibility: hidden; }
.spin-say { display: grid; margin: 0; color: var(--chalk); font: 700 clamp(1.75rem, 6vw, 2.25rem)/1.2 var(--hand); }
.spin-say > span { grid-area: 1 / 1; visibility: hidden; }
.spin-say .say-rest { visibility: visible; }
.spin-keys { display: flex; justify-content: center; }
.lg-go .b, .lg-stop { display: none; }
.spin-help { max-width: 24em; margin: 0; color: var(--chalk-soft); font-size: .9375rem; }

#spin-go:checked ~ .disc .disc-pencil,
#spin-stop:checked ~ .disc .disc-pencil { animation: twirl var(--turn) linear infinite; }
#spin-go:checked ~ .disc .who::before,
#spin-stop:checked ~ .disc .who::before,
#spin-go:checked ~ .spin-say .say-w,
#spin-stop:checked ~ .spin-say .say-w { animation: pick var(--turn) linear var(--lag, 0s) infinite; }
#spin-stop:checked ~ .disc .disc-pencil,
#spin-stop:checked ~ .disc .who::before,
#spin-stop:checked ~ .spin-say .say-w { animation-play-state: paused; }
#spin-go:checked ~ .disc .who::before,
#spin-go:checked ~ .spin-say .say-w { visibility: hidden !important; }
#spin-go:checked ~ .spin-say .say-rest,
#spin-stop:checked ~ .spin-say .say-rest { visibility: hidden; }
#spin-go:checked ~ .spin-say .say-go { visibility: visible; }
#spin-go:checked ~ .spin-keys .lg-go { display: none; }
#spin-go:checked ~ .spin-keys .lg-stop { display: inline-flex; }
#spin-stop:checked ~ .spin-keys .lg-go .a { display: none; }
#spin-stop:checked ~ .spin-keys .lg-go .b { display: inline; }
#spin-rest:focus-visible ~ .spin-keys .lg-go,
#spin-go:focus-visible ~ .spin-keys .lg-stop,
#spin-stop:focus-visible ~ .spin-keys .lg-go { outline: 3px solid var(--chalk); outline-offset: 4px; }

@keyframes twirl { from { rotate: -135deg; } to { rotate: 225deg; } }
@keyframes tick { 0% { rotate: -90deg; } 25% { rotate: 0deg; } 50% { rotate: 90deg; } 75% { rotate: 180deg; } 100% { rotate: 270deg; } }
@keyframes pick { 0%, 24.99% { visibility: visible; } 25%, 100% { visibility: hidden; } }

@media (min-width: 960px) {
  .rules-in { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
  .spinner { position: sticky; top: 24px; padding-top: 12px; }
}

/* ---- Daylight and Lamplight ---- */

.looks { padding: 56px 0 40px; overflow-x: clip; }
.looks-pair { display: flex; justify-content: center; gap: clamp(14px, 6vw, 72px); margin-top: 40px; }
.looks-pair figure { display: grid; justify-items: center; gap: 14px; margin: 0; }
.looks-pair img { width: min(250px, 40vw); border: 1px solid rgb(0 0 0 / .18); border-radius: 22px; box-shadow: 3px 6px 0 var(--shadow); }
.looks-pair figure:first-child { rotate: -2deg; }
.looks-pair figure:last-child { rotate: 2.2deg; margin-top: 32px; }
.looks-pair figcaption { color: var(--chalk); font: 700 1.375rem/1 var(--hand); }

/* ---- Yours, on your phone ---- */

.yours { padding: 56px 0 40px; }
.yours-in { display: grid; gap: 32px; }
.yours-slip { justify-self: center; }
.ticks { margin: 0 0 14px; padding: 0; list-style: none; }
.ticks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.ticks .ink-i { width: 26px; height: 26px; color: var(--p2); }
.slip-link { margin: 0; padding-left: 38px; font-weight: 700; }
.slip-link a { color: var(--link-paper); }
@media (min-width: 900px) {
  .yours-in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 56px; }
}

/* ---- Last word ---- */

.last { padding: 56px 0 64px; text-align: center; }
.last-in { display: grid; justify-items: center; gap: 22px; }
.last .gates-art { width: 70px; color: var(--chalk); }
.last h2 { max-width: 14em; }

/* ---- Legal pages ---- */

.legal { padding: 20px 0 64px; }
.legal .sheet { max-width: 880px; margin: 0 auto; padding: clamp(30px, 6vw, 60px) clamp(18px, 6vw, 64px) 44px; }
.legal h1 { margin-bottom: 10px; color: var(--graphite); font: 400 clamp(2.25rem, 7vw, 3.25rem)/1.05 var(--display); }
.legal .meta { color: var(--graphite-soft); }
.legal a { color: var(--link-paper); }
.legal code { padding: 1px 5px; border-radius: 4px; background: rgb(52 54 58 / .07); font: .92em/1 ui-monospace, Menlo, Consolas, monospace; }
.summary { position: relative; margin: 26px 0 30px; padding: 18px clamp(14px, 4vw, 22px) 8px; border: 1.5px dashed var(--gold-deep); border-radius: 12px; background: var(--gold-wash); }
.summary-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 1.5rem/1.2 var(--hand); }
.summary-title .star-i { width: 22px; height: 22px; color: var(--gold-deep); }
.summary ul { margin: 0 0 12px; padding-left: 1.2em; }
.summary li { margin: 6px 0; }
.toc { margin: 0 0 8px; }
.toc h2 { margin-bottom: 6px; font: 700 1rem/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--graphite-soft); font-size: .8125rem; }
.toc ol { columns: 2 230px; column-gap: 32px; margin: 0; padding-left: 1.6em; }
.toc li { margin: 0; padding: 3px 0; break-inside: avoid; }
.legal-body { max-width: 70ch; }
.legal-body h2 { display: flex; align-items: baseline; gap: 10px; margin: 42px 0 12px; color: var(--graphite); font: 700 1.375rem/1.3 var(--body); scroll-margin-top: 16px; }
.legal-body h2 .n { min-width: 1.4em; color: var(--graphite-soft); font: 700 1.625rem/1 var(--hand); }
.legal-body h3 { margin: 26px 0 8px; font: 700 1.125rem/1.35 var(--body); scroll-margin-top: 16px; }
.legal-body ul { padding-left: 1.3em; }
.legal-body li { margin: 6px 0; }
.legal-body dt { margin-top: 12px; font-weight: 700; }
.legal-body dd { margin: 2px 0 0; }
.back-top { margin-top: 40px; font-weight: 700; }

/* ---- Not found ---- */

.lost { display: grid; justify-items: center; padding: 32px 0 72px; text-align: center; }
.lost .slip { max-width: 540px; padding: 34px clamp(18px, 6vw, 40px) 32px; rotate: -1deg; }
.lost .gates-art { width: 92px; margin: 0 auto 8px; color: var(--graphite); }
.lost-note { margin: 0 0 18px; color: var(--graphite-soft); font: 700 1.25rem/1.2 var(--hand); }
.lost h1 { margin-bottom: 12px; color: var(--graphite); font: 400 clamp(2rem, 7vw, 2.75rem)/1.05 var(--display); }
.lost .tile { margin-top: 10px; }

/* ---- Motion ---- */

@media (prefers-reduced-motion: reduce) {
  .gates .st, .gates .st path, .loop path { transition: none !important; }
  .spinner { --turn: 1.6s; }
  #spin-go:checked ~ .disc .disc-pencil,
  #spin-stop:checked ~ .disc .disc-pencil { animation-name: tick; animation-timing-function: steps(1, end); }
  .tile { transition: none; }
}

/* ---- Tally state rules, generated ---- */
/* Generated by build.swift from demoSeats (3 players, first to 7). */
.col .n1:checked ~ .face .s1,
.col .n1 ~ :checked ~ .face .s1,
.col .n2:checked ~ .face .s2,
.col .n2 ~ :checked ~ .face .s2,
.col .n3:checked ~ .face .s3,
.col .n3 ~ :checked ~ .face .s3,
.col .n4:checked ~ .face .s4,
.col .n4 ~ :checked ~ .face .s4,
.col .n5:checked ~ .face .s5,
.col .n5 ~ :checked ~ .face .s5,
.col .n6:checked ~ .face .s6,
.col .n6 ~ :checked ~ .face .s6,
.col .n7:checked ~ .face .s7,
.col .n7 ~ :checked ~ .face .s7 { visibility: visible; stroke-dashoffset: 0; transition: stroke-dashoffset var(--draw, .17s) cubic-bezier(.4, 0, .2, 1); }
.col .n6:checked ~ .face .all, .col .n6 ~ :checked ~ .face .all { transform: none; }
.col .n0:checked ~ .face .tot::after { content: "0"; }
.col .n1:checked ~ .face .tot::after { content: "1"; }
.col .n2:checked ~ .face .tot::after { content: "2"; }
.col .n3:checked ~ .face .tot::after { content: "3"; }
.col .n4:checked ~ .face .tot::after { content: "4"; }
.col .n5:checked ~ .face .tot::after { content: "5"; }
.col .n6:checked ~ .face .tot::after { content: "6"; }
.col .n7:checked ~ .face .tot::after { content: "7"; }
.col .n0:checked ~ .keys .l1 .tap,
.col .n1:checked ~ .keys .l2 .tap,
.col .n2:checked ~ .keys .l3 .tap,
.col .n3:checked ~ .keys .l4 .tap,
.col .n4:checked ~ .keys .l5 .tap,
.col .n5:checked ~ .keys .l6 .tap,
.col .n6:checked ~ .keys .l7 .tap { display: block; }
.col .n1:checked ~ .keys .l0 .rub,
.col .n2:checked ~ .keys .l1 .rub,
.col .n3:checked ~ .keys .l2 .rub,
.col .n4:checked ~ .keys .l3 .rub,
.col .n5:checked ~ .keys .l4 .rub,
.col .n6:checked ~ .keys .l5 .rub,
.col .n7:checked ~ .keys .l6 .rub { display: grid; }
.col .n7:checked ~ .face .loop { visibility: visible; }
.col .n7:checked ~ .face .loop path { stroke-dashoffset: 0; transition: stroke-dashoffset .6s cubic-bezier(.3, 0, .2, 1) .1s; }
.col .n7:checked ~ .face .tot { color: var(--graphite); }
.pad:has(.n7:checked) :is(.tap, .rub) { display: none !important; }
.pad:has(.n7:checked) .pad-game { display: none; }
.pad:has(.n7:checked) .verdict { display: block; }
.pad:has(.c0 .n7:checked) .v0 { display: inline; }
.pad:has(.c1 .n7:checked) .v1 { display: inline; }
.pad:has(.c2 .n7:checked) .v2 { display: inline; }
.pad:has(.c0 .n7:checked):has(.c1 .n7:checked) .v,
.pad:has(.c0 .n7:checked):has(.c2 .n7:checked) .v,
.pad:has(.c1 .n7:checked):has(.c2 .n7:checked) .v { display: none; }
.pad:has(.c0 .n7:checked):has(.c1 .n7:checked) .vt,
.pad:has(.c0 .n7:checked):has(.c2 .n7:checked) .vt,
.pad:has(.c1 .n7:checked):has(.c2 .n7:checked) .vt { display: inline; }
.pad:is(:has(.c0 .n0:checked):has(.c1 :is(.n0):checked), :has(.c0 .n1:checked):has(.c1 :is(.n0, .n1):checked), :has(.c0 .n2:checked):has(.c1 :is(.n0, .n1, .n2):checked), :has(.c0 .n3:checked):has(.c1 :is(.n0, .n1, .n2, .n3):checked), :has(.c0 .n4:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4):checked), :has(.c0 .n5:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4, .n5):checked), :has(.c0 .n6:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6):checked), :has(.c0 .n7:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6, .n7):checked)):is(:has(.c0 .n0:checked):has(.c2 :is(.n0):checked), :has(.c0 .n1:checked):has(.c2 :is(.n0, .n1):checked), :has(.c0 .n2:checked):has(.c2 :is(.n0, .n1, .n2):checked), :has(.c0 .n3:checked):has(.c2 :is(.n0, .n1, .n2, .n3):checked), :has(.c0 .n4:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4):checked), :has(.c0 .n5:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4, .n5):checked), :has(.c0 .n6:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6):checked), :has(.c0 .n7:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6, .n7):checked)):not(:is(:has(.c0 .n0:checked):has(.c1 .n0:checked):has(.c2 .n0:checked), :has(.c0 .n1:checked):has(.c1 .n1:checked):has(.c2 .n1:checked), :has(.c0 .n2:checked):has(.c1 .n2:checked):has(.c2 .n2:checked), :has(.c0 .n3:checked):has(.c1 .n3:checked):has(.c2 .n3:checked), :has(.c0 .n4:checked):has(.c1 .n4:checked):has(.c2 .n4:checked), :has(.c0 .n5:checked):has(.c1 .n5:checked):has(.c2 .n5:checked), :has(.c0 .n6:checked):has(.c1 .n6:checked):has(.c2 .n6:checked), :has(.c0 .n7:checked):has(.c1 .n7:checked):has(.c2 .n7:checked))):not(:has(.n7:checked)) .c0 .star { visibility: visible; }
.pad:is(:has(.c1 .n0:checked):has(.c0 :is(.n0):checked), :has(.c1 .n1:checked):has(.c0 :is(.n0, .n1):checked), :has(.c1 .n2:checked):has(.c0 :is(.n0, .n1, .n2):checked), :has(.c1 .n3:checked):has(.c0 :is(.n0, .n1, .n2, .n3):checked), :has(.c1 .n4:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4):checked), :has(.c1 .n5:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4, .n5):checked), :has(.c1 .n6:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6):checked), :has(.c1 .n7:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6, .n7):checked)):is(:has(.c1 .n0:checked):has(.c2 :is(.n0):checked), :has(.c1 .n1:checked):has(.c2 :is(.n0, .n1):checked), :has(.c1 .n2:checked):has(.c2 :is(.n0, .n1, .n2):checked), :has(.c1 .n3:checked):has(.c2 :is(.n0, .n1, .n2, .n3):checked), :has(.c1 .n4:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4):checked), :has(.c1 .n5:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4, .n5):checked), :has(.c1 .n6:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6):checked), :has(.c1 .n7:checked):has(.c2 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6, .n7):checked)):not(:is(:has(.c0 .n0:checked):has(.c1 .n0:checked):has(.c2 .n0:checked), :has(.c0 .n1:checked):has(.c1 .n1:checked):has(.c2 .n1:checked), :has(.c0 .n2:checked):has(.c1 .n2:checked):has(.c2 .n2:checked), :has(.c0 .n3:checked):has(.c1 .n3:checked):has(.c2 .n3:checked), :has(.c0 .n4:checked):has(.c1 .n4:checked):has(.c2 .n4:checked), :has(.c0 .n5:checked):has(.c1 .n5:checked):has(.c2 .n5:checked), :has(.c0 .n6:checked):has(.c1 .n6:checked):has(.c2 .n6:checked), :has(.c0 .n7:checked):has(.c1 .n7:checked):has(.c2 .n7:checked))):not(:has(.n7:checked)) .c1 .star { visibility: visible; }
.pad:is(:has(.c2 .n0:checked):has(.c0 :is(.n0):checked), :has(.c2 .n1:checked):has(.c0 :is(.n0, .n1):checked), :has(.c2 .n2:checked):has(.c0 :is(.n0, .n1, .n2):checked), :has(.c2 .n3:checked):has(.c0 :is(.n0, .n1, .n2, .n3):checked), :has(.c2 .n4:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4):checked), :has(.c2 .n5:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4, .n5):checked), :has(.c2 .n6:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6):checked), :has(.c2 .n7:checked):has(.c0 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6, .n7):checked)):is(:has(.c2 .n0:checked):has(.c1 :is(.n0):checked), :has(.c2 .n1:checked):has(.c1 :is(.n0, .n1):checked), :has(.c2 .n2:checked):has(.c1 :is(.n0, .n1, .n2):checked), :has(.c2 .n3:checked):has(.c1 :is(.n0, .n1, .n2, .n3):checked), :has(.c2 .n4:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4):checked), :has(.c2 .n5:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4, .n5):checked), :has(.c2 .n6:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6):checked), :has(.c2 .n7:checked):has(.c1 :is(.n0, .n1, .n2, .n3, .n4, .n5, .n6, .n7):checked)):not(:is(:has(.c0 .n0:checked):has(.c1 .n0:checked):has(.c2 .n0:checked), :has(.c0 .n1:checked):has(.c1 .n1:checked):has(.c2 .n1:checked), :has(.c0 .n2:checked):has(.c1 .n2:checked):has(.c2 .n2:checked), :has(.c0 .n3:checked):has(.c1 .n3:checked):has(.c2 .n3:checked), :has(.c0 .n4:checked):has(.c1 .n4:checked):has(.c2 .n4:checked), :has(.c0 .n5:checked):has(.c1 .n5:checked):has(.c2 .n5:checked), :has(.c0 .n6:checked):has(.c1 .n6:checked):has(.c2 .n6:checked), :has(.c0 .n7:checked):has(.c1 .n7:checked):has(.c2 .n7:checked))):not(:has(.n7:checked)) .c2 .star { visibility: visible; }
.pad:has(input:focus-visible) .pad-how .vh { position: static; width: auto; height: auto; clip-path: none; overflow: visible; white-space: normal; }

