/* What every page of the Fable round shares: the bar, the foot, and the game a visitor plays on the page (a card
   dealt, called, turned over in its colour and thrown to the hand; a final played on the clock). Each home page
   direction adds its own sheet on top.

   Space is a 4 point unit. Corners: 28 for a card, 16 for a key or a tile, 6 for a small card in the hand, round for a
   pill. One key light, top left and warm: every card shows a lit edge there and its shadow falls down and right, on a
   ground the light reaches only near the card. */
:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --right: #69db86;
  --close: #ffe372;
  --off: #ff8e83;
  --muted: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.16);
  --wash: transparent;
  --on: #ffffff;
  --on-pill: #0a0a0a;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Inter, 'Segoe UI', system-ui, sans-serif;
  --gutter: 16px;
  --card: 28px;
  --tile: 16px;
  --chip: 6px;
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --land: cubic-bezier(0.3, 1.3, 0.5, 1);
  --tx: 0deg;
  --ty: 0deg;
  --lx: 22%;
  --ly: 12%;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Nothing may widen the page past the screen: a phone would open it zoomed out. */
html { -webkit-text-size-adjust: 100%; background: var(--ink); overflow-x: clip; }
body {
  margin: 0; min-height: 100svh; position: relative; background: var(--ink); color: var(--paper);
  font: 400 17px/1.4 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #0a84ff; outline-offset: 3px; border-radius: 8px; }

/* A club's colour, or an answer's, poured from the top and gone to black well before the fold. */
.wash {
  position: absolute; inset: 0 0 auto; height: min(62svh, 560px); z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--wash) 0%, color-mix(in oklab, var(--wash) 78%, var(--ink)) 22%, color-mix(in oklab, var(--wash) 38%, var(--ink)) 52%, color-mix(in oklab, var(--wash) 10%, var(--ink)) 80%, var(--ink) 100%);
  transform-origin: top; transition: opacity 500ms var(--out), transform 620ms var(--out);
}
.wash.away { opacity: 0; transform: scaleY(0.4); }

/* Non-Safari iOS quick-install bar (TikTok, Instagram, X, Chrome iOS where Apple's Smart App Banner does not show). */
.app-bar {
  display: flex; align-items: center; gap: 10px; padding: max(8px, env(safe-area-inset-top)) 12px 8px 6px;
  background: #141414; border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: relative; z-index: 30;
}
.app-bar .x {
  width: 36px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1;
  display: grid; place-items: center; padding: 0; cursor: pointer; flex: none;
}
.app-bar img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.app-bar .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.app-bar .meta b { font-size: 14px; font-weight: 600; color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-bar .meta span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-bar .cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 16px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; flex: none;
}

/* The bar: the name, and the one action opposite it, on the right. */
.bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: max(8px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right), calc((100% - 1184px) / 2 + var(--gutter))) 8px max(var(--gutter), env(safe-area-inset-left), calc((100% - 1184px) / 2 + var(--gutter)));
  transition: background-color 240ms, backdrop-filter 240ms;
}
/* Once the page moves under it, the bar takes the black behind it as a frosted pane, so nothing reads through it. */
.bar.scrolled, body[data-page='doc'] .bar { background: rgba(10, 10, 10, 0.8); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.04em; color: var(--on); }
.brand svg { width: 28px; height: 28px; }
.get {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--on); color: var(--on-pill); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  transition: transform 140ms var(--out), opacity 140ms; position: relative; overflow: hidden;
}
.get:active { transform: scale(0.96); opacity: 0.86; }
/* After a call the one action is shown once: a light crosses it. */
.get.now::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(105, 219, 134, 0.55) 50%, transparent 70%); transform: translateX(-100%); animation: cross 900ms var(--out) 200ms 1 both; }
@keyframes cross { to { transform: translateX(100%); } }

main { position: relative; z-index: 1; max-width: 1184px; margin: 0 auto; padding: 0 var(--gutter); }

/* The game. Its head is the page's own heading and the hand: one small card for each call made, in its colour. */
.game { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; min-height: calc(100svh - 60px - env(safe-area-inset-top)); padding: 4px 0 max(16px, env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 44px; }
.head h1 { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700; color: var(--on); text-wrap: balance; }
.head .when { display: block; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: color-mix(in srgb, var(--on) 72%, transparent); margin-top: 4px; }
.hand { display: flex; gap: 4px; padding-bottom: 4px; min-height: 30px; }
.hand i { width: 20px; height: 26px; border-radius: var(--chip); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(10, 10, 10, 0.18), inset 1px 1px 0 rgba(255, 255, 255, 0.5); }
.hand svg { width: 12px; height: 12px; }
[data-tone='right'] { --tone: var(--right); }
[data-tone='close'] { --tone: var(--close); }
[data-tone='off'] { --tone: var(--off); }
.hand i, .fan i { background: var(--tone); color: var(--ink); }

/* The table: where the key light falls. The card's shadow can be seen because the ground near it is lit. */
.table { position: relative; display: grid; perspective: 1200px; min-height: 216px; }
.table::before {
  content: ''; position: absolute; inset: -18% -4% -24%; z-index: -1; pointer-events: none;
  /* The pool of light falls off to nothing inside its own box, so no edge of it is ever seen. */
  background: radial-gradient(50% 50% at 42% 38%, rgba(255, 236, 214, 0.12) 0%, rgba(255, 236, 214, 0.05) 42%, rgba(255, 236, 214, 0) 72%);
}
.card {
  position: relative; display: grid; transform-style: preserve-3d; border-radius: var(--card); touch-action: pan-y;
  transform: rotateX(var(--tx)) rotateY(var(--ty)); transition: transform 220ms var(--out); will-change: transform;
}
.card.turned { transform: rotateX(var(--tx)) rotateY(calc(180deg + var(--ty))); transition: transform 560ms cubic-bezier(0.3, 0.9, 0.3, 1.12); }
.card.turned { touch-action: none; cursor: grab; }
.card.lift { transform: translateY(-8px) scale(1.025) rotateX(var(--tx)) rotateY(var(--ty)); transition: transform 240ms var(--out); }
.card.held { transition: none; }
/* A card is an object: dragging it never selects its words. */
.card, .keys, .opts, .hand { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.face {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px; border-radius: var(--card);
  backface-visibility: hidden; -webkit-backface-visibility: hidden; color: var(--ink); overflow: hidden; position: relative;
  box-shadow: 14px 26px 44px -18px rgba(0, 0, 0, 0.9), 2px 3px 0 -1px rgba(0, 0, 0, 0.5);
}
.front { background: linear-gradient(135deg, #ffffff 0%, #ffffff 46%, #f4f1ec 100%); }
.back { transform: rotateY(180deg); background: var(--tone, var(--paper)); }
/* The lit corner of a coloured card: it follows the pointer, or the card's own turn. */
.back::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(90% 70% at var(--lx) var(--ly), rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.12) 34%, transparent 64%);
}
.back > * { position: relative; }
.topic { font-size: 14px; font-weight: 500; color: rgba(10, 10, 10, 0.66); letter-spacing: -0.005em; }
.q { font-size: clamp(22px, 6.2vw, 27px); line-height: 1.14; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
.back .q { font-size: 17px; line-height: 1.24; letter-spacing: -0.012em; font-weight: 600; color: rgba(10, 10, 10, 0.82); text-wrap: pretty; }
/* The mark sits in the coloured side's top corner: the words beside it keep clear of it. */
.back .topic, .back .q { padding-right: 52px; }
.call, .ans { margin-top: auto; display: flex; align-items: baseline; gap: 8px; min-height: 72px; }
.digits, .ans b { font-size: clamp(60px, 10.5svh, 92px); line-height: 0.92; font-weight: 700; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.digits.empty { color: rgba(10, 10, 10, 0.16); animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.4; } }
.unit { font-size: 17px; font-weight: 600; color: rgba(10, 10, 10, 0.62); letter-spacing: -0.01em; }
.back .unit { color: rgba(10, 10, 10, 0.78); }
.said { margin-top: auto; font-size: 15px; font-weight: 600; color: rgba(10, 10, 10, 0.72); font-variant-numeric: tabular-nums; }
.said:empty { display: none; }
.said + .ans { margin-top: 0; }
.ans.name b { font-size: clamp(28px, 8.4vw, 44px); line-height: 1.02; letter-spacing: -0.035em; }
.mark { position: absolute !important; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.mark svg { width: 24px; height: 24px; }
.card.turned .mark { animation: stamp 420ms var(--land) 380ms both; }
@keyframes stamp { from { transform: scale(2.2); opacity: 0; } 60% { opacity: 1; } }
/* A card dealt from above lands with its weight; a card thrown to the hand leaves the way it came. */
.card.dealt { animation: deal 560ms var(--land) both; }
/* Only its place moves: a card that fades is no longer a thing with two sides. */
@keyframes deal { from { transform: translate3d(8%, -128%, 0) rotate(-9deg); } }
.peek { position: absolute; inset: 0; border-radius: var(--card); z-index: -1; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.45), 10px 18px 30px -16px rgba(0, 0, 0, 0.8); transition: transform 520ms var(--out), opacity 320ms; }
.peek.miss { background: var(--off); transform: rotate(-5.5deg) translate(-8px, 6px); }
.peek.hit { background: var(--right); transform: rotate(4deg) translate(9px, 4px); }
.called .peek { opacity: 0; transform: rotate(0) scale(0.94); }

/* What sits under the card: the keys and Lock in, then the line a supporter would say, and the next thing to do. */
.under { display: grid; gap: 12px; align-content: end; min-height: 262px; position: relative; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.keys button {
  height: clamp(44px, 6.4svh, 52px); border: 0; background: transparent; border-radius: var(--tile); font-size: 26px; font-weight: 500;
  font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation; transition: background-color 180ms;
}
/* While a call is held and turned, the keys step back so the card has the stage. */
.under:not(.typing) .keys, .under:not(.typing) #lock { opacity: 0.22; transition: opacity 200ms; }
.keys button:active, .keys button.down { background: rgba(255, 255, 255, 0.14); transition: none; }
.keys svg { width: 26px; height: 26px; vertical-align: middle; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts button {
  min-height: 64px; padding: 10px 14px; border: 0; border-radius: var(--tile); background: linear-gradient(135deg, #fff 0%, #fff 50%, #f2efea 100%); color: var(--ink);
  font-size: 18px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; text-align: left; cursor: pointer; touch-action: manipulation;
  display: flex; align-items: flex-end; box-shadow: 8px 14px 24px -14px rgba(0, 0, 0, 0.9); transition: transform 140ms var(--out), opacity 200ms;
}
.opts button:active { transform: scale(0.97); }
.opts.four { align-content: end; }
.go {
  min-height: 52px; border: 0; border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer; touch-action: manipulation; transition: opacity 180ms, transform 140ms var(--out); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; width: 100%;
}
.go:disabled { opacity: 0.22; cursor: default; }
.go:not(:disabled):active { transform: scale(0.98); }
.go.quiet { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24); }
.go svg { width: 20px; height: 20px; }
.verdict { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px; margin-bottom: auto; padding-top: 12px; }
.verdict .said-line { font-size: clamp(30px, 8.6vw, 40px); line-height: 1.02; font-weight: 700; letter-spacing: -0.04em; text-wrap: balance; }
.verdict .pts { font-size: clamp(30px, 8.6vw, 40px); line-height: 1; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--tone); }
.verdict > * { animation: rise 420ms var(--out) 520ms both; }
.theirs { font-size: 15px; font-weight: 600; color: var(--muted); padding: 0 2px; animation: rise 420ms var(--out) 600ms both; }
.dare { text-align: center; font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: -0.01em; text-wrap: balance; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.under > .go, .under > .row, .under > .dare { animation: rise 420ms var(--out) 640ms both; }
.under.typing > .go { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* Full time: the hand comes back as a fan, the score under it, in the middle of the room the card left. */
.game.over .table { align-content: center; }
.ft { display: grid; justify-items: center; align-content: center; gap: 4px; text-align: center; padding: 8px 0 4px; }
.fan { display: flex; justify-content: center; height: 96px; margin-bottom: 20px; }
.fan i {
  width: 60px; height: 84px; border-radius: var(--tile); margin: 0 -7px; display: grid; place-items: center; font-style: normal; font-size: 26px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  transform: translateY(calc(var(--d) * var(--d) * 3.2px)) rotate(calc(var(--d) * 7deg)); transform-origin: 50% 120%;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5), 8px 14px 24px -12px rgba(0, 0, 0, 0.9); animation: fan 620ms var(--land) both; animation-delay: calc(var(--i) * 70ms);
}
@keyframes fan { from { transform: translate3d(calc(var(--d) * -30px), -120px, 0) rotate(0deg) scale(0.4); opacity: 0; } }
.ft .fulltime { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; padding: 3px 8px; border-radius: 6px; background: var(--paper); color: var(--ink); }
.ft .total { font-size: clamp(84px, 24vw, 120px); line-height: 0.95; font-weight: 700; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.ft .total small { font-size: 0.3em; letter-spacing: -0.03em; color: var(--muted); font-weight: 600; margin-left: 4px; }
.ft .say { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.ft .versus { font-size: 15px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.ft > .fulltime, .ft > .total, .ft > .say, .ft > .versus { animation: rise 460ms var(--out) 460ms both; }
.ft .next { font-size: 15px; font-weight: 600; color: var(--muted); margin-top: 8px; animation: rise 460ms var(--out) 900ms both; }
.ft .next time { color: var(--paper); font-variant-numeric: tabular-nums; }
.done-acts { display: grid; gap: 8px; }
.done-acts > * { animation: rise 420ms var(--out) 700ms both; }

/* A final on the clock. */
.match { display: grid; gap: 12px; max-width: 480px; margin: 0 auto; min-height: calc(100svh - 60px - env(safe-area-inset-top)); grid-template-rows: auto auto 1fr auto; padding: 4px 0 max(16px, env(safe-area-inset-bottom)); }
.match h1 { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700; text-wrap: balance; }
.match .ground { display: block; font-size: 15px; font-weight: 500; color: var(--muted); margin-top: 4px; letter-spacing: -0.01em; }
.board {
  position: relative; border-radius: var(--card); padding: 20px 18px 18px; background: linear-gradient(135deg, #2a2a2a 0%, #1c1c1c 60%, #161616 100%);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.14), 14px 26px 44px -18px rgba(0, 0, 0, 0.9); display: grid; gap: 14px;
}
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 10px; }
.side { font-size: clamp(17px, 4.8vw, 21px); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; padding-top: 6px; }
.side.away { text-align: right; }
.goals { display: flex; align-items: center; gap: 6px; font-size: clamp(52px, 15vw, 68px); line-height: 0.9; font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.goals span { display: inline-block; min-width: 0.62em; text-align: center; }
.goals span.up { animation: flip 460ms var(--land) both; }
@keyframes flip { from { transform: translateY(-46%) rotateX(80deg); opacity: 0; } }
.goals i { width: 14px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.5); }
.clock { justify-self: center; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--muted); display: flex; align-items: center; gap: 8px; min-height: 28px; }
.clock.stopped { color: var(--paper); animation: beat 520ms var(--out) 1; }
.clock .ft-mark { font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--paper); color: var(--ink); letter-spacing: 0.02em; }
@keyframes beat { 30% { transform: scale(1.22); } }
/* The match as a line: the run of the clock, half time, and a mark where each goal fell. */
.run { position: relative; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); margin: 2px 2px 4px; }
.run i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: rgba(255, 255, 255, 0.72); transition: width 60ms linear; }
.run .half { position: absolute; top: -3px; width: 1px; height: 10px; background: rgba(255, 255, 255, 0.28); }
.run b { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 3px #1c1c1c; animation: stamp 420ms var(--land) both; }
.run b.known { background: var(--right); }
.run b.missed { background: var(--off); }
.run b.own { background: rgba(255, 255, 255, 0.5); }
/* Room kept for the scorers from the start, so the board never grows while a name is being called. */
.scorers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 84px; }
.scorers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.scorers ul + ul { text-align: right; justify-items: end; }
.scorers li { display: inline-flex; align-items: center; gap: 6px; animation: rise 360ms var(--out) both; }
.scorers li svg { width: 14px; height: 14px; flex: none; }
.scorers li.known svg { color: var(--right); }
.scorers li.missed svg { color: var(--off); }
.scorers li.own { color: var(--muted); }
.ask { align-self: end; display: grid; gap: 12px; }
.ask h2 { font-size: clamp(22px, 6.2vw, 27px); line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; animation: rise 360ms var(--out) both; }
.ask .opts button { animation: rise 380ms var(--out) both; }
.ask .opts button:nth-child(2) { animation-delay: 50ms; }
.ask .opts button:nth-child(3) { animation-delay: 100ms; }
.ask .opts button:nth-child(4) { animation-delay: 150ms; }
.opts button.was { background: var(--right); }
.opts button.not { background: var(--off); }
.opts button.rest { opacity: 0.34; }
.tally { font-size: clamp(30px, 8.6vw, 40px); line-height: 1.02; font-weight: 700; letter-spacing: -0.04em; animation: rise 420ms var(--out) both; }
.tally small { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); margin-top: 6px; }

/* Below a game: more to play, as plain links a person and a search engine can both walk. */
.more { max-width: 1184px; margin: 0 auto; padding: 40px 0 8px; display: grid; gap: 32px; }
.more h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 0 20px; }
.links a { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 0; text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -0.012em; border-top: 1px solid var(--line); }
.links a span { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.links a:active { opacity: 0.6; }
@media (hover: hover) { .links a:hover { color: var(--right); } }
details.answers { border-top: 1px solid var(--line); }
details.answers summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; }
details.answers summary::-webkit-details-marker { display: none; }
details.answers summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform 200ms var(--out); }
details.answers[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.answers ol { margin: 0; padding: 0 0 16px 22px; display: grid; gap: 12px; font-size: 15px; line-height: 1.4; color: var(--muted); }
details.answers ol b { color: var(--paper); font-weight: 600; }
details.answers a { text-underline-offset: 3px; }

/* The index. */
.index { max-width: 1184px; margin: 0 auto; padding: 8px 0 24px; display: grid; gap: 36px; }
.index h1 { font-size: clamp(40px, 11vw, 64px); line-height: 1; letter-spacing: -0.05em; font-weight: 700; }
.find { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); max-width: 480px; margin-top: 20px; }
.find svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.find input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--paper); font: inherit; font-size: 17px; outline: 0; min-height: 44px; }
.find input::placeholder { color: var(--muted); }
.find:focus-within { box-shadow: 0 0 0 3px #0a84ff; }
.index section[hidden] + section { margin-top: 0; }
.none { color: var(--muted); font-weight: 600; }

/* The foot. */
.foot { position: relative; z-index: 1; max-width: 1184px; margin: 0 auto; padding: 36px var(--gutter) max(36px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, 0.1); display: grid; gap: 16px; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.foot nav a { text-decoration: none; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; font-weight: 500; }
.foot nav a:hover { color: var(--paper); }
.foot .store { justify-self: start; display: inline-flex; min-height: 48px; align-items: center; }
.foot .store img { height: 48px; width: auto; display: block; margin: 0; }
.foot .fine { max-width: 60ch; line-height: 1.45; }
.qr { display: none; }
.gate-qr { display: none; }

/* Pages set for reading: privacy, terms, support. */
.doc { max-width: 680px; margin: 0 auto; padding: 16px var(--gutter) 48px; }
.doc h1 { font-size: 34px; line-height: 1.1; letter-spacing: -0.03em; margin: 16px 0 4px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.doc .toc { list-style: none; padding: 12px 20px; margin: 0 0 32px; background: rgba(255, 255, 255, 0.07); border-radius: var(--tile); columns: 2 200px; column-gap: 24px; font-size: 15px; }
.doc .toc li { break-inside: avoid; }
.doc .toc a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.doc h2 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; margin: 40px 0 12px; scroll-margin-top: 72px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { line-height: 1.6; color: rgba(255, 255, 255, 0.86); }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin: 6px 0; }
.doc .table { overflow-x: auto; margin: 16px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc a { text-underline-offset: 3px; }
/* Duel head-to-head SEO cards: two tactile flat cards side by side on dark ink. */
.duel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.duel-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 220px; padding: 20px 16px;
  border: 0; border-radius: var(--card); background: var(--paper); color: var(--ink); text-align: left; cursor: pointer;
  transition: transform 160ms var(--out), background-color 220ms var(--out);
}
.duel-card:active:not(:disabled) { transform: scale(0.97); }
.duel-card[data-tone='right'] { background: var(--right); color: var(--ink); }
.duel-card[data-tone='off'] { background: var(--off); color: var(--ink); }
.duel-card[data-tone='rest'] { opacity: 0.65; }
.duel-card .d-name { font-size: 20px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.duel-card .d-note { font-size: 14px; font-weight: 500; opacity: 0.65; margin-top: -6px; }
.duel-card .d-val { font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: auto; }
mark.draft { background: rgba(255, 227, 114, 0.6); color: inherit; padding: 0 2px; border-radius: 4px; }
.draft-note { border-left: 3px solid var(--close); padding-left: 12px; color: var(--muted); }

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .game { max-width: 880px; grid-template-columns: minmax(0, 480px) 320px; grid-template-rows: auto 1fr; column-gap: 56px; min-height: 0; padding-top: 28px; align-items: center; justify-content: center; }
  .game .head { grid-column: 1 / -1; }
  .game .table { min-height: 400px; }
  .game .under { align-content: center; min-height: 400px; }
  .game.over { grid-template-columns: minmax(0, 480px); }
  .q { font-size: 32px; }
  .match { max-width: 560px; min-height: 0; padding-top: 28px; grid-template-rows: auto auto auto auto; gap: 20px; }
  .more { padding-top: 72px; }
  /* Below a game, the links keep the game's own column, so the page has one left edge. */
  body[data-page='five'] .more, body[data-page='final'] .more { max-width: 856px; }
  body[data-page='final'] .match { max-width: 856px; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; column-gap: 40px; align-items: start; }
  body[data-page='final'] .match > header { grid-column: 1 / -1; }
  body[data-page='final'] .match > div:empty { display: none; }
  body[data-page='final'] .ask { align-self: start; }
  .foot { grid-template-columns: 1fr auto; align-items: end; }
  .foot .fine { grid-column: 1; }
  .qr { display: flex; align-items: center; gap: 12px; grid-column: 2; grid-row: 1 / span 3; text-decoration: none; font-weight: 600; }
  .qr img { width: 96px; height: 96px; border-radius: var(--tile); }
  .gate-qr { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; padding: 12px 16px; border-radius: var(--tile); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); text-decoration: none; font-size: 14px; font-weight: 600; color: var(--paper); }
  .gate-qr img { width: 64px; height: 64px; border-radius: 10px; flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .card.turned .front, .card:not(.turned) .back { opacity: 0; }
  .face { transition: opacity 220ms !important; }
  .card.turned { transform: none; }
  .back { transform: none; }
  .digits.empty { animation: none; }
}

/* A short phone, such as an iPhone SE: the card gives up some height so the keys and Lock in stay on the first screen. */
@media (max-width: 899px) and (max-height: 720px) {
  .table { min-height: 168px; }
  .under { min-height: 0; }
  .head h1 { font-size: 26px; }
  .keys button { height: 44px; }
}
