  /* One column, phone width, centred on anything wider. The rig is played on
     a phone; a desktop layout that has to be kept in step with it is a second
     design to maintain and a second place for the phone to go wrong (D92). */
  /* The design system's tokens (D138), once: colours and the three typefaces. */
  :root {
    --orange: #ff5a00; --on-orange: #0b0b0f; --surface: #0b0b0f; --surface-raised: #15151b; --surface-deep: #08080b;
    --ink: #f3efe6; --ink-secondary: #b8b4aa; --ink-muted: #8a877f; --slate: #8a877f; --line: #2a2a32;
    /* A text field's edge. The panel line is too faint to show where a field is in the
       dark (beta testers could not see the fields on the sign-up form): 3:1 against the
       raised surface. In the light the panel line already does the job. */
    --field-line: #6a6a78;
    --focus: #ff5a00; --live: #3ddc84;
    /* Text roles (review): orange and the live green as text. On paper they take
       values that read, since the design system keeps orange as a ground there. */
    --accent-text: #ff5a00; --live-text: #3ddc84;
    /* The wordmark for the ground, so the right one paints first (review). */
    --wordmark: url("/brand/wordmark-dark.png");
    /* The top bar's switch, the same way (D160): the sun in the dark, the
       moon on paper, right from the first paint, not once game.js runs. */
    --sun-icon: block; --moon-icon: none;
    --font-display: Unbounded, system-ui, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    /* The rig's names, kept for the rules not yet redrawn in the brand
       (parts 2 and 3 of D138). --bg is the installed app's colour, a literal
       because the manifest is checked against it; the page itself paints
       --surface, which the paper theme below changes. */
    --bg: #0B0B0F; --panel: var(--surface-raised); --raise: var(--line);
    --dim: var(--ink-muted); --gold: var(--orange); --good: var(--live);
    --bad: var(--orange); --blue: var(--ink); --num: var(--font-mono);
  }
  /* The paper theme (D138; the owner, 1 October: the page follows the phone,
     with a switch on the Account screen to override). The same tokens with
     the design system's paper values, once for a phone that asks for light
     while no choice is made, once for the choice "light". The orange, what
     sits on it and the live green are the same on both grounds, so nothing
     below names a colour of its own: every tint is a mix of a token. */
  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --surface: #f3efe6; --surface-raised: #ffffff; --surface-deep: #d9d5cc;
      --ink: #0b0b0f; --ink-secondary: #3a3834; --ink-muted: #6b6862; --slate: #6b6862; --line: #d9d5cc; --field-line: var(--line);
      --focus: #0b0b0f;
      --accent-text: #b83f00; --live-text: #157a43;
      --wordmark: url("/brand/wordmark-light.png");
      --sun-icon: none; --moon-icon: block;
    }
  }
  :root[data-theme="light"] {
    --surface: #f3efe6; --surface-raised: #ffffff; --surface-deep: #d9d5cc;
    --ink: #0b0b0f; --ink-secondary: #3a3834; --ink-muted: #6b6862; --slate: #6b6862; --line: #d9d5cc; --field-line: var(--line);
    --focus: #0b0b0f;
    --accent-text: #b83f00; --live-text: #157a43;
    --wordmark: url("/brand/wordmark-light.png");
    --sun-icon: none; --moon-icon: block;
  }
  /* Traditional Chinese and Korean (D170): the brand's faces have no Chinese
     or Korean characters, so those pages read in the phone's own face, by
     design, until a chosen face is added. Words and headings take it first;
     the number voice keeps JetBrains Mono, and the big figures Instrument
     Serif, with the phone's face behind them for any word in their place.
     Korean breaks a line between words, never inside one. Scoped to the
     language lang.js puts on <html>: English and French are untouched.
     In the mono face a digit waiting for JetBrains Mono falls to another
     monospace face before the phone's Chinese or Korean one, whose digits
     are not all one width. */
  html[lang="zh-Hant"] {
    --font-display: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
    --font-serif: 'Instrument Serif', "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", monospace;
  }
  html[lang="ko"] {
    --font-display: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    --font-serif: 'Instrument Serif', "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", monospace;
    word-break: keep-all; overflow-wrap: break-word;
  }
  /* The small mono labels space their letters out for the brand's capitals;
     Chinese and Korean have no capitals, and spaced out they read as loose
     characters, so on those pages they set close again (D170). */
  html[lang="zh-Hant"] :is(.pill, .stamp-cap, .cap, .gap-cap, .row .done, .win-kicker),
  html[lang="ko"] :is(.pill, .stamp-cap, .cap, .gap-cap, .row .done, .win-kicker) { letter-spacing: normal; }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

  /* The browser's own `[hidden] { display: none }` is a user-agent rule, and
     ANY rule here that sets `display` beats it. Three panels below are flex,
     so `hidden` did nothing to them: the swap banner, the undo bar and the
     balance strip all sat on screen permanently, and a player was told to
     "tap a new level" by a banner that could not be dismissed (D93). */
  [hidden] { display: none !important; }
  body {
    margin: 0; background: var(--surface); color: var(--ink);
    font: 15px/1.5 var(--font-display);
    /* Nothing on this page is meant to be selected, and selection is what
       summons Android Chrome's "Touch to Search" — the Google panel that kept
       appearing when a thumb aiming at "swap" landed on the price beside it.
       Twice this was fixed per-element and twice a new neighbouring label
       reopened it. Off at the root; the input below opts back in (D97). */
    -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: none;
  }
  input, textarea { -webkit-user-select: text; user-select: text; }
  .wrap { max-width: 460px; margin: 0 auto; }

  /* The play-money line: a fact, never an alert, switched on by the server (D138). */
  .banner {
    flex-shrink: 0; height: 28px; display: flex; align-items: center; justify-content: center;
    background: var(--surface-deep); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
    color: var(--ink-muted); grid-area: banner;
  }
  /* No padding above or below since D160: the switch's 40px row and the 32px
     balance line make the 72px a player's header already was. */
  .header {
    flex-shrink: 0; min-height: 56px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px 0 4px; grid-area: header;
  }
  /* The name, and under it the balance and the swaps (D144); the light/dark
     switch on the name's row (D160). A grid: the balance line spans the
     switch's column as well as the name's, so a long balance runs on under
     the switch rather than over it. The first column takes any spare width,
     which keeps the switch beside the name; the name's gives way first. */
  .head-right { display: grid; grid-template-columns: 1fr minmax(0, auto); justify-items: end; align-items: center; min-width: 0; }
  .header img { height: 40px; width: auto; display: block; }
  .header .wordmark { display: block; width: 128px; height: 40px; background: var(--wordmark) left center / contain no-repeat; }
  /* "Sign in" for a visitor, the player's name for a player (D138). A long
     name ends in an ellipsis rather than push the page sideways on a narrow
     phone, now the light/dark switch sits beside it (D160). */
  .header .who { grid-row: 1; grid-column: 2; background: transparent; color: var(--ink); font-size: 13px; font-weight: 600;
                 letter-spacing: -.01em; min-height: 32px; padding: 4px 4px 2px;
                 max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* The switch between dark and light (D160), beside Sign in or the name: the
     header's own look, the icon in ink on no ground, a 40px target. Which
     icon shows is the ground's (the tokens above); the script sets only the
     label. */
  .header .theme-toggle { grid-row: 1; grid-column: 1; display: flex; align-items: center; justify-content: center;
                          width: 40px; height: 40px; min-height: 40px; padding: 0;
                          background: transparent; color: var(--ink); border-radius: 50%; }
  #theme-sun { display: var(--sun-icon); }
  #theme-moon { display: var(--moon-icon); }
  /* The language (D170), just left of the sun and moon and in their look:
     the short name in the mono voice, a 40px target. In the switch's own
     cell, the width of one switch in from its end, so the cell keeps room for
     both and the name's row stays one row. The list opens under it, over the
     page. */
  .header .lang { grid-row: 1; grid-column: 1; justify-self: end; margin-right: 40px; position: relative; }
  .header .lang-toggle { display: flex; align-items: center; justify-content: center;
                         width: 40px; height: 40px; min-height: 40px; padding: 0;
                         background: transparent; color: var(--ink); border-radius: 50%;
                         font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
  .lang-menu { position: absolute; top: 100%; right: 0; z-index: 50; min-width: 168px; padding: 4px;
               display: flex; flex-direction: column; background: var(--surface-raised);
               border: 1px solid var(--line); border-radius: 10px; }
  .lang-menu .lang-item { background: transparent; color: var(--ink); text-align: left; font-size: 14px; font-weight: 600; white-space: nowrap; }
  .lang-menu .lang-item[aria-current="true"] { color: var(--accent-text); }
  /* Each language's own name in its own face, on every page: an English
     page would otherwise draw 繁體中文 in whatever face the phone picks for
     English (lang.js marks each item with its language, D170). */
  .lang-item[lang="zh-Hant"] { font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
  .lang-item[lang="ko"] { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
  /* On a phone the game fills the first screen and the chart takes the room
     the rest leave it (D148): the jackpot card, the clock, the chart (its Buy
     card opens on it) and what sits under it down to the message, the Swap
     button among them. The last result and the lists come after, a short
     scroll down. This replaces D138's one screen with the lists in it, which
     left the chart about a quarter of the owner's phone. The page scrolls as a
     whole, so the guess list is never clipped: a Swap is decided on the
     distances it shows (the owner, testing the live site, 1 October). One column
     of rows; only the chart's row grows. The others are min-content, as on
     the desktop, never auto: Chromium counts an auto row at its minimum (the
     header's min-height, a message's one line) when it works out the chart's
     share, then grows it to its content, and a three-line message pushed the
     first screen 57px past the phone's. At least one screen, the small one
     like the item below: at 100dvh, with the bars hidden and little below
     the first screen, the column's floor handed the bars' height to the
     chart's row. The prize race (D156) is the last row but one, after the
     lists; "Report a bug or idea" (D161) the last. */
  .screen {
    display: grid; grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(5, min-content) 1fr repeat(8, min-content);
    grid-template-areas: "banner" "header" "jackpot" "explain" "clock" "chart" "paused" "swap" "msg" "result" "mine" "rounds" "race" "feedback";
    min-height: 100svh; max-width: 460px; margin: 0 auto;
  }
  /* One screen tall, laid over the rows from the top down to the message, and
     empty: the grid makes those rows at least this tall together, and only the
     chart's row can grow to make up the difference (D148). The small viewport
     (svh: the screen with the browser's bars showing), so the chart keeps its
     height when the bars slide away as the page scrolls. */
  .screen::before { content: ""; grid-column: 1; grid-row: banner-start / msg-end; height: 100svh; }
  /* The side column is nothing on a phone: its chart and lists are the
     column's own items, the lists in their rows after the result. */
  .side { display: contents; }
  /* In the desktop's side column only the list gives; a squeezed message laid its lines over the list. */
  .side > :not(.mine) { flex-shrink: 0; }
  .a-explain { grid-area: explain; } .a-paused { grid-area: paused; } .a-jackpot { grid-area: jackpot; } .a-clock { grid-area: clock; }
  .a-swap { grid-area: swap; } .a-msg { grid-area: msg; }
  .a-result { grid-area: result; }
  .a-chart { grid-area: chart; } .a-mine { grid-area: mine; } .a-rounds { grid-area: rounds; } .a-race { grid-area: race; }
  .a-feedback { grid-area: feedback; }
  @media (min-width: 960px) {
    /* The desktop as it was (D148): the chart's own height, in the flow of its column. */
    .chartbox canvas {
      position: static; height: 380px;
    }
    /* On a desktop the Guess card starts past the markers' column, as D144
       had it: the chart is wide enough there to aim beside it (D159). */
    .chartbox .pick { left: 102px; max-width: calc(100% - 164px); }
    /* And the 2-decimal card (D174), whose own max-width is the phone's. */
    .chartbox .pick.two { max-width: calc(100% - 164px); }
    .screen::before { content: none; }
    .screen {
      display: grid; grid-template-columns: 420px minmax(0, 1fr); column-gap: 48px; padding: 0 48px;
      max-width: none; align-content: start;
      /* Only the last row can grow: the side column's height goes to it, so
         the left stack stays tight at the top and the foot sits at the bottom. */
      grid-template-rows: repeat(8, min-content) auto;
      grid-template-areas: "banner banner" "header header" "jackpot side" "explain side" "clock side" "paused side" "swap side" "msg side" "result side";
    }
    .side { grid-area: side; display: flex; flex-direction: column; }
  }

  /* touch-action and user-select are not decoration on a phone. Without them
     Android Chrome can read a tap on a button's label as *selecting a word*
     and slides its "Touch to Search" panel up from the bottom of the screen.
     To a player that looks like the game opening Google mid-bet (D91). */
  button {
    font: inherit; border: 0; border-radius: 6px; cursor: pointer;
    background: var(--orange); color: var(--on-orange); font-weight: 600;
    padding: 10px 14px; min-height: 44px;
    touch-action: manipulation;
    -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: none;
  }
  button.ghost { background: var(--line); color: var(--ink); font-weight: 600; }
  button.flat { background: transparent; color: var(--dim); font-weight: 600; }
  button.tiny { min-height: 32px; padding: 4px 10px; font-size: 12px; border-radius: 6px; }
  button:disabled { opacity: .45; cursor: not-allowed; }
  input {
    font: inherit; width: 100%; border-radius: 6px; border: 1px solid var(--field-line);
    background: var(--surface-raised); color: var(--ink); padding: 0 16px; min-height: 52px;
    box-sizing: border-box; caret-color: var(--orange);
  }
  input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  /* Empty, as tall as one line (13px at 1.5, 19.5px): on a phone the chart
     takes the room left above it (D148), and a one-line message must not
     nudge it, as 18px did. */
  .msg { font-size: 13px; line-height: 1.5; min-height: 1.5em; margin-top: 8px; }
  .msg.status { padding: 0 20px; margin-top: 6px; text-align: center; }
  /* Words carry the kind; green means live and nothing else (D138). */
  .msg.err { color: var(--accent-text); } .msg.ok { color: var(--ink); }
  .muted { color: var(--dim); font-size: 13px; }
  /* Read aloud, never drawn. The heading above the field says "Who are you",
     but a heading is not a label, and a placeholder is not an accessible name. */
  .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
        overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .num { font-family: var(--num); font-variant-numeric: tabular-nums; }

  /* ---- the jackpot card, the game's standing and its prize (D138) ---------- */
  .card { margin: 0 16px; padding: 10px 16px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
  .card-top { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; }
  /* The left takes the room the right leaves it (D149): the tag and the
     stamp keep their width, and the jackpot's size is a share of what is
     left (cqi, below), so a narrow phone shrinks the sum rather than
     running it into the stamp. */
  .card-left { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
               flex: 1 1 0; min-width: 0; container-type: inline-size; }
  .card-right { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; flex: none; }
  .jackpot-sum { margin-top: 8px; }
  .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px;
          font-family: var(--font-mono); font-size: 11px; line-height: 1; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
  .pill .pip { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  .pill.live { color: var(--live-text); border: 1px solid color-mix(in srgb, var(--live) 35%, transparent);
               background: color-mix(in srgb, var(--live) 12%, transparent); }
  .pill.live .pip { box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
  .pill.paused { color: var(--ink-muted); border: 1px solid var(--line); background: var(--surface-raised); }
  .jackpot-word { font-family: var(--font-display); font-size: 18px; line-height: 1; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
  .stag { display: inline-flex; flex-direction: column; align-items: stretch; box-sizing: border-box; border: 1px solid var(--orange); border-radius: 6px; overflow: hidden;
          font-family: var(--font-mono); line-height: 1; font-variant-numeric: tabular-nums; }
  .stag-streak { display: flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; background: var(--orange); color: var(--on-orange);
                 font-family: var(--font-display); font-size: 16px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
  .stag-round { display: flex; align-items: center; justify-content: center; gap: 5px; height: 22px; padding: 0 12px; background: var(--surface-raised);
                color: var(--ink-muted); font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
  .stag-round span { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--ink); }
  .stag.paused { border-color: var(--line); }
  .stag.paused .stag-streak { background: var(--line); color: var(--ink); }
  /* The sum, then its dollars under it (D149, board 21b), beside the stamp.
     52px at most, the board's 44px at eight or nine characters, and below
     those a share of the column (cqi), so the widest sum of each length
     fits the column a 360px phone leaves it: per 100px of type, seven
     characters with BTC run 363px, nine 431px, eleven 461px (measured in
     Chromium). The plain size first, for a browser without container units. */
  .jackpot-amount { margin-top: 4px; font-family: var(--font-serif); font-style: italic;
                    font-size: 52px; font-size: min(52px, 27cqi);
                    line-height: .95; letter-spacing: -.01em; font-weight: 700; color: var(--accent-text);
                    white-space: nowrap; font-variant-numeric: tabular-nums; }
  .jackpot-amount .unit { font-size: .5em; letter-spacing: .02em; }
  /* Most jackpots run to eight or nine characters (0.0032295): a size down
     keeps the sum and BTC on one line. */
  .jackpot-amount.long { font-size: 44px; font-size: min(44px, 23cqi); }
  .jackpot-amount.longer { font-size: 38px; font-size: min(38px, 21cqi); }
  .jackpot-usd { margin-top: 5px; font-size: 17px; line-height: 1; font-weight: 600; color: var(--ink); white-space: nowrap; }
  /* The other jackpot's pot, in one small line under this one's dollars (D174).
     Two lines' room while two run, written or empty: on a phone the line
     wraps after its name (measured at 360 to 412px, and in French on a
     desktop), so the card keeps its height when the other Streak ends or
     starts and the chart never moves under a finger (D148). Hidden with one. */
  .jackpot-other { margin-top: 4px; font-size: 12px; line-height: 16px; min-height: 32px; color: var(--ink-secondary); }
  /* What a right guess wins (D149, board 21b): on the card's right, under
     the tag, every line 11px or larger. */
  .stamp { margin-top: 8px; text-align: right; }
  /* Hidden while no Streak runs, it keeps its room: the right column is the
     card's tallest, and a card changing height when a Streak starts or ends
     would move the chart under it (D148). The one exception to the rule
     that hidden is display: none. */
  .stamp[hidden] { display: block !important; visibility: hidden; }
  .stamp-cap { font-family: var(--font-mono); font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: .1em;
               text-transform: uppercase; white-space: nowrap; color: var(--ink-secondary); }
  .stamp-mid { margin: 4px 0; display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; white-space: nowrap; }
  /* "and get" over "up to" (D149, amended), the lower line on the number's
     foot, so the stamp is no wider than with "and get" alone. */
  .stamp-get { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
  .stamp-get .stamp-cap { color: var(--ink-muted); }
  .stamp-times { font-family: var(--font-serif); font-style: italic; font-size: 38px; line-height: .9; font-weight: 700;
                 color: var(--accent-text); font-variant-numeric: tabular-nums; }
  .stamp-x { font-size: 24px; }

  /* ---- the clock ----------------------------------------------------------- */
  /* The one sentence a newcomer needs, under the card, with the link. */
  .says { margin: 8px 16px 0; text-align: center; font-size: 12px; line-height: 1.4; color: var(--ink-secondary); }
  .says a { color: var(--ink); font-weight: 600; white-space: nowrap; }
  .clock-block { padding: 10px 16px 0; }
  .clock-row { display: flex; justify-content: space-between; align-items: flex-end; }
  .cap { font-family: var(--font-mono); font-size: 11px; line-height: 1.2; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
  .clock-soon { margin-top: 4px; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--ink); max-width: 18em; }
  .clock { margin-top: 4px; font-family: var(--font-mono); font-size: 28px; line-height: 1; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
  .clock.locked { color: var(--accent-text); }
  .clock-block.live .clock { color: var(--accent-text); }
  .clock-block.live #clock-label { color: var(--accent-text); }
  .clock-meta { text-align: right; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
  .bar { margin-top: 8px; height: 4px; background: var(--line); overflow: hidden; }
  .bar > div { height: 100%; background: var(--orange); transition: width .2s linear; }
  .bar.lock > div { background: var(--orange); }

  /* ---- the chart you bet on ------------------------------------------------ */
  .chartbox { position: relative; background: var(--surface-deep);
              border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
              /* On a phone the chart's row is the room left on the first
                 screen (D148), and never less than this. The content box,
                 so the minimum is the canvas's own, inside the two borders.
                 300px fits the Guess card where it stays (D166): open with
                 its box and the line under it, 217px as measured in
                 Chromium, its foot 56px off the chart's (the zoom row,
                 ZOOM_BAND), its top 22px down (the ✕ above it inside), and
                 5px to spare. Under that the card covered the zoom row or
                 jumped as the box opened. The one-screen rule (D138) had
                 set 200px. */
              box-sizing: content-box; min-height: clamp(300px, 26dvh, 320px); }
  /* The 2-decimal board's floor (D174; the review of task 9), set by the
     board (drawChartFloor): its card is 261 to 274px tapped and up to 344px
     with its box and the line under it, as measured in Chromium. 375px puts
     the tapped card above the zoom row (274 + 56 + 22 + 23 to spare) and
     keeps the open one inside the chart, its ✕ inside (344 + 8 + 22). Open,
     it covers the zoom row, as the French 1-decimal card does at 300px. */
  .chartbox.two { min-height: 375px; }
  canvas {
    /* Laid over its box at the box's size. A canvas's own size is its
       drawing's, three times what is shown on many phones (drawChart), so
       in the flow it would push its row taller at every draw. */
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: block; cursor: crosshair;
    /* pan-y, never none. `none` made the chart swallow every swipe, so a player
       trying to scroll the page got a bet instead — the gesture had nowhere to
       go and ended as a tap (D92). */
    touch-action: pan-y;
  }
  /* A quarter of the time there is nothing to tap: 10% of it the round is
     locked, 15% no round is running. The chart looked identical either way, so
     a tap that could not possibly work looked like a tap that failed (D95).
     pointer-events stay off so the page still scrolls over it. */
  .shut { position: absolute; inset: 0; display: flex; align-items: center;
          justify-content: center; background: color-mix(in srgb, var(--surface) 66%, transparent);
          pointer-events: none; font-size: 13px; font-weight: 600;
          color: var(--ink-secondary); text-align: center; padding: 0 24px; }
  /* While a round is locked the price is the whole show, so the chart stays in
     plain view: one line at the top says why it cannot be tapped (D129). The
     zoom buttons are at the bottom now (D144), so it needs no room for them. */
  .shut.light { background: none; align-items: flex-start; padding: 10px 12px 0 12px; }
  .shut.light #chart-shut-text { background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line);
                                 border-radius: 999px; padding: 6px 12px; }
  /* Between rounds: the price the round closed at and the seconds to the next,
     big, over a chart that is nearly black (D129). */
  .shut.gap { background: color-mix(in srgb, var(--surface) 93%, transparent); }
  .gap-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  /* The break in the brand (D138): eyebrows, the price in the number voice,
     the one countdown in orange mono. */
  .gap-cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
             color: var(--ink-muted); font-weight: 500; }
  .gap-price { font-family: var(--font-serif); font-style: italic; font-size: 44px; line-height: 1; font-weight: 400;
               color: var(--ink); margin-bottom: 16px; font-variant-numeric: tabular-nums; }
  .gap-count { font-family: var(--font-mono); font-size: 48px; line-height: 1; font-weight: 700; color: var(--accent-text);
               font-variant-numeric: tabular-nums; }
  /* Two small round buttons at the bottom left (D144), out of the price
     line's usual path: it runs across the middle and ends at the right. The
     guess markers also start at the left edge, so markPlacements steps any
     marker inside this corner's band out past it, see ZOOM_BAND (D101). */
  .zoom { position: absolute; bottom: 8px; left: 8px; display: flex; align-items: center; gap: 8px; z-index: 2; }
  .zoom button { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%;
                 background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink);
                 border: 1px solid var(--line); font-size: 20px; line-height: 1; font-weight: 600; }
  /* The minutes the chart shows, between − and + (D148), on the buttons' own
     ground so the line can pass behind it. A fixed width, so the corner
     ZOOM_BAND keeps clear is the same at "2 min" and "15 min". */
  .zoom-span { width: 52px; padding: 4px 0; text-align: center; white-space: nowrap; border-radius: 999px;
               background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line);
               font-size: 11px; line-height: 1.2; font-weight: 600; color: var(--ink-secondary); }
  /* The top left, which the zoom buttons gave up (D144). */
  .hint { position: absolute; left: 12px; top: 8px; font-size: 12px;
          color: var(--ink-muted); pointer-events: none; }

  /* Your guesses, marked down the left edge. Labels only: the swap button used
     to live here at 22px and was the smallest target on the page. It is now in
     the list below, where there is room for a whole finger (D91, D92). */
  .marks { position: absolute; inset: 0; pointer-events: none;
           -webkit-user-select: none; user-select: none; }
  .mark {
    position: absolute; left: 0; transform: translateY(-50%);
    display: flex; align-items: center; gap: 7px;
    background: var(--surface); color: var(--ink-secondary); border-left: 3px solid var(--ink-secondary);
    border-radius: 0 6px 6px 0; padding: 4px 10px 4px 8px;
    font-family: var(--num); font-size: 12px; font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .mark.was { border-left-color: var(--line); color: var(--ink-muted); }
  .mark.armed { border-left-color: var(--orange); color: var(--ink); box-shadow: 0 0 0 1px var(--orange); }
  /* Guesses beyond the view, at the top or bottom edge (D144): a dashed edge, since the level itself is off the chart. */
  .mark.edge { border-left-style: dashed; color: var(--ink-muted); }
  /* While one guess is being moved, the rest step back so the player can see
     which one they are actually moving. */
  .mark.dim { opacity: .35; }

  /* ---- choosing a price, on the chart ------------------------------------- */
  /* The confirm step happens where the decision happens (D97): a price is
     chosen by tapping the chart, and confirmed on the card at the chart's
     foot, which stays put while the next tap moves the price (D166). */
  /* At the left and at the chart's foot (D159, D166), so the chart above it
     and to its right, where the price line runs, stays free for the next
     tap: an earlier overlay sat exactly where the next tap was going and ate
     it (D98). Narrow enough to stop short of the 54px gutter on the right,
     where the price axis and the live-price tag are drawn, the one number a
     player cannot aim without (D99). */
  /* On a phone, at the left edge, over the guess markers while it is open,
     so the chart's right side, where the price line runs, is free to aim the
     next tap (the owner, D159; a desktop keeps it past the markers, above).
     The ✕ hangs 14px off the card's left edge (D149), so the card starts 16px
     in and the ✕ 2px inside the chart; its width stops it short of the
     right-hand strip where the live price rides (D144). */
  /* The Guess card (D149, board 21b): a column, the button its whole width,
     about 190 × 145 against 190 × 155 with the step buttons. Every text on
     it is 11px or larger. 16px over the button, so it starts where the ✕
     on the corner ends (the review, fix round 2: a miss to the ✕'s lower
     right landed on Guess). */
  .pick {
    position: absolute; left: 16px; z-index: 3; width: 190px; max-width: calc(100% - 78px);
    display: flex; flex-direction: column; gap: 8px;
    background: var(--surface-raised); border: 1px solid var(--line);
    border-radius: 10px; padding: 16px 10px 10px; pointer-events: auto;
  }
  /* One full-width orange button, 48px tall, in two lines: what it does over
     the price, in the number voice (D149). */
  .pick button.go { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
                    min-height: 48px; padding: 0 8px; line-height: 1; white-space: nowrap; }
  .pick .go-word { font-size: 12px; font-weight: 600; }
  .pick .go-price { font-family: var(--font-mono); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
  /* At the cap the second line is words, "this round" under "All 23 used"
     (D166): in the words' voice, as the line above it. */
  .pick .go-price.words { font-family: var(--font-display); font-size: 12px; font-weight: 600; }
  /* At the cap (D166) the button is off and says why, at full strength: a
     quiet surface, a thin line and the words in ink, as the page's quiet
     buttons are, never the faded orange (button:disabled) of a button that
     is only waiting. The same two lines in the same column. */
  .pick button.go.capped { opacity: 1; background: var(--surface); border: 1px solid var(--line); color: var(--ink-secondary);
                           cursor: default; }
  /* ✕ on the card's top-left corner, 30px round (D149). The pad is pressed
     as the button, so a thumb has 42px to hit while the card shows a small
     ✕; it grows only up and left, off the card, never over Guess (the
     review, fix round 2). */
  .pick button.x { position: absolute; top: -14px; left: -14px; z-index: 1;
                   width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%;
                   display: flex; align-items: center; justify-content: center;
                   background: color-mix(in srgb, var(--line) 70%, var(--surface-raised));
                   border: 1px solid color-mix(in srgb, var(--ink) 8%, var(--line));
                   color: var(--ink); font-size: 14px; line-height: 1; font-weight: 400; }
  .pick button.x::before { content: ""; position: absolute; top: -12px; left: -12px; right: 0; bottom: 0; }
  /* Under a thin line: the cost, whether anybody has the price, and the link.
     6px under the line, and the link with no margin, give back the 6px over
     the button. */
  .pick-foot { padding-top: 6px; border-top: 1px solid var(--line); text-align: center; }
  /* The cost in the number voice; a sentence in its place (a visitor's held
     pick, no play money, a price that is taken) in the words' (D149). */
  .pick-cost { font-family: var(--font-mono); font-size: 12px; line-height: 1.3; font-weight: 700; color: var(--ink);
               font-variant-numeric: tabular-nums; min-height: 16px; }
  .pick-cost.words { font-family: var(--font-display); font-size: 11px; font-weight: 600; color: var(--ink-secondary); }
  .pick-free { margin-top: 3px; font-size: 11px; line-height: 1.3; font-weight: 600; min-height: 14px; }
  /* "Type an exact price" (D149): small, under the rest, since tapping stays
     the way to guess (D72). Orange as text takes the text role (D138). */
  /* Its own padding small, so the card stays about 145px (with the board's
     6px it measured 154px in Chromium); the pad around it gives a finger a
     target 42px tall: 18px of line, 2px of padding and 10px of pad above
     and below (the review, fix round 2). */
  .pick button.exact { position: relative; margin-top: 0; padding: 2px 4px; min-height: 0; font-size: 12px; line-height: 1.5;
                       font-weight: 600; color: var(--accent-text); }
  .pick button.exact::before { content: ""; position: absolute; inset: -10px -8px; }
  /* The box it opens (D149, board 21c), above the button: labelled, the
     price in the number voice at 18px (under 16px a phone zooms the page in
     on focus), ringed in orange. */
  .pick-type { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-secondary); }
  .pick-type input { height: 44px; min-height: 44px; padding: 0 10px; border: 2px solid var(--orange); border-radius: 6px;
                     background: var(--surface); color: var(--ink); font-family: var(--font-mono); font-size: 18px; font-weight: 700;
                     text-align: center; font-variant-numeric: tabular-nums; }
  /* The ring is its focus, as on board 21c: the box is only open to be
     typed in. The page's focus outline drew a second ring around it. */
  .pick-type input:focus-visible { outline: none; }
  /* While the box holds no price: one plain line under it, and the button off. */
  .pick-bad { margin-top: -3px; font-size: 11px; line-height: 1.3; color: var(--ink-secondary); text-align: center; }

  /* The card on the 2-decimal board (D174, amended 26 October), as the owner
     tried it on the trial page ("All in one"): 260px, so five digits a row
     are 44px wide on a 360px phone ((260 - 2 - 20 - 16) / 5), its foot where
     the 1-decimal card's is (D166). A grid of three columns: a cent down,
     Guess and a cent up in one row, the price between the steps, and every
     other part across all three. The page keeps its order (the box, its
     line, Guess, the steps, the digits, the foot), so a screen reader and
     the Tab key meet Guess first; dense placement puts each step back in
     Guess's row. The steps sit 6px from Guess, as on the trial page, which
     leaves Guess about 138px; rows keep the card's 8px. The ✕ is in no
     column: absolutely placed from the card's corner, as on every card. Its
     right edge stops short of the live price's strip, as the 1-decimal
     card's does: 260px from a 338px chart up, 242px at 320px. */
  .pick.two { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-auto-flow: row dense; column-gap: 6px;
              width: 260px; max-width: calc(100% - 78px); }
  .pick.two .pick-type, .pick.two .pick-bad, .pick.two .pick-digits, .pick.two .pick-foot { grid-column: 1 / -1; }
  /* Between the steps the top line wraps to two lines, centred, at its 12px
     ("Choisissez le dernier chiffre"); a word too long for the button breaks
     inside it rather than run under a step. The price stays on one line.
     Always as tall as two lines over the price (2 x 15 + 4 + 16 + 12), so
     the card does not change height, nor move, when the digit is chosen. */
  .pick.two button.go { grid-column: 2; white-space: normal; padding: 6px; min-height: 62px; }
  .pick.two .go-word { text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
  .pick.two .go-price { white-space: nowrap; }
  .pick.two #pick-cent-down { grid-column: 1; }
  .pick.two #pick-cent-up { grid-column: 3; }
  /* A cent down and a cent up: quiet, in the number voice, as tall as Guess;
     faded while the last digit waits. */
  .pick button.step { min-height: 48px; min-width: 0; padding: 0; border-radius: 8px; background: var(--surface); color: var(--ink);
                      border: 1px solid var(--line); font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
  .pick button.step:disabled { opacity: .4; }
  /* The last digit, two rows of five, each a thumb's 44px; the one chosen in
     orange, none until the player presses one. */
  .pick-digits { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .pick-digits button.digit { min-height: 44px; min-width: 0; padding: 0; border-radius: 6px; font-family: var(--font-mono); font-size: 17px;
                              font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface); color: var(--ink);
                              border: 1px solid var(--line); }
  .pick-digits button.digit[aria-pressed="true"] { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }

  /* Under the chart, where a player is already looking, and where the thing it
     changes is in view. A setting on a profile page is a setting nobody finds
     (D106). */
  .swapbar { padding: 8px 16px 0; }
  .swapbar button { width: 100%; min-height: 48px; }
  /* Ready, the Swap button is orange like Buy; waiting for the second tap it
     keeps the colour and gains a ring (D133). */
  .swapbar button.armed { outline: 2px solid var(--ink); outline-offset: 2px; }
  .onetap { display: flex; align-items: center; gap: 9px; margin-top: 6px;
            font-size: 12.5px; color: var(--dim); cursor: pointer;
            -webkit-user-select: none; user-select: none; }
  .onetap input { width: 20px; height: 20px; min-height: 20px; margin: 0;
                  accent-color: var(--gold); flex: 0 0 auto; }

  /* ---- your guesses -------------------------------------------------------- */
  .mine { padding: 12px 16px 0; }
  .mine .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .row { display: flex; align-items: center; gap: 10px; padding: 4px 0;
         border-bottom: 1px solid var(--line); }
  .row:last-child { border-bottom: 0; }
  .row .swatch { width: 8px; height: 8px;
                 background: var(--orange); flex-shrink: 0; }
  .row .swatch.was { background: var(--line); }
  .row .price { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--ink);
                flex-grow: 1; font-variant-numeric: tabular-nums; }
  .row .paid { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
  /* "I was blindly swapping without knowing if the guess was near the current
     price or far off." So every row says, and the list is ordered by it. */
  .row .away { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
  /* Within two dollars of the live price: green, as the first test site had it
     (the owner, 1 October). The one place green means something other than live;
     as text it takes the live text token, which reads on paper too (D138, part 2). */
  .row.near .away { color: var(--live-text); font-weight: 600; }
  .row.arming { background: color-mix(in srgb, var(--orange) 12%, transparent); }
  .nosw { display: flex; align-items: center; justify-content: space-between;
          gap: 10px; margin-top: 10px; font-size: 12px; color: var(--dim); }
  /* Beside the price it belongs to, so every distance lines up on the right
     (D132). */
  .row .who { flex-grow: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .row .who .price { flex-grow: 0; }
  .row .done { padding: 2px 6px; font-family: var(--font-mono);
               font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
               color: var(--ink-muted); font-weight: 500; }
  /* A visitor's last rounds: the number, the price, the outcome in words (D138). */
  .round-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line);
               font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .round-row:last-child { border-bottom: 0; }
  .round-row .n { font-size: 12px; color: var(--ink-muted); width: 44px; }
  .round-row .p { font-size: 15px; font-weight: 600; color: var(--ink); flex-grow: 1; }
  .round-row .o { font-size: 12px; color: var(--ink-muted); }
  /* Names the two columns of "Your guesses" (D132). */
  .cols { display: flex; justify-content: space-between; padding: 6px 0 2px;
          font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
          color: var(--dim); font-weight: 700; }

  /* ---- the race for the Streak prizes (D156) -------------------------------- */
  /* A card under the lists, for everyone: the prize in the number voice, the
     words in Unbounded, ranks and counts in mono (D138). A name is the
     player's own and may be long, so it gives way with an ellipsis: nothing
     on a 390px phone scrolls sideways. */
  .race { margin: 16px 16px 24px; padding: 14px 16px 12px; }
  .race-title { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .race-word { font-family: var(--font-display); font-size: 14px; line-height: 1.2; font-weight: 800;
               letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
  .race-prize { font-family: var(--font-serif); font-style: italic; font-size: 32px; line-height: 1; font-weight: 400;
                color: var(--accent-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
  /* When it starts, that nobody has won yet: a sentence. "Final standings": an eyebrow. */
  .race-line { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-secondary); }
  .race-line.cap { margin-top: 12px; font-size: 11px; line-height: 1.2; color: var(--ink-muted); }
  .race .cols { margin-top: 8px; }
  .race-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line);
              font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .race-row:last-child { border-bottom: 0; }
  .race-row .r { flex: none; width: 26px; font-size: 12px; color: var(--ink-muted); }
  .race-row .n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
                 font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
  .race-row .w { flex: none; font-size: 15px; font-weight: 700; color: var(--ink); }
  /* The player's own place, in orange as text (D138); under the ten when it is lower. */
  .race-row.you .r, .race-row.you .n, .race-row.you .w { color: var(--accent-text); }
  .race-row.mine { margin-top: 6px; }
  /* How the bug prize is judged: under a thin line, small. */
  .race-note { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5;
               color: var(--ink-muted); overflow-wrap: anywhere; }
  /* The Telegram channel (D157): the card's last line, the link in orange as text (D138). */
  .race-follow { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5;
                 color: var(--ink-muted); }
  .race-follow a { color: var(--accent-text); font-weight: 600; }

  /* ---- the balance and the swaps, under the name (D144) ------------------- */
  /* Under the switch and the name (D160). Too long for the room on a narrow
     phone, the swaps go under the balance rather than off the side. */
  .header .purse { grid-row: 2; grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end;
                   align-items: center; gap: 0 14px; }
  .purse .v { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink-secondary);
              font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* The balance and the swaps open the wallet and the referrals (D139). */
  .purse button.purse-cell { display: block; min-height: 32px; padding: 2px 0 4px; background: none; color: inherit;
                             font: inherit; border-radius: 6px; }
  .purse-cell .v::after { content: " \203A"; color: var(--ink-muted); font-weight: 400; }

  /* ---- what happened to you ------------------------------------------------ */
  /* What happened to you, as a brand card (D138): the landing price in the
     number voice, your closest in orange mono with its distance beside it. */
  .result { margin: 8px 16px 0; padding: 16px 18px; background: var(--surface-raised);
            border: 1px solid var(--line); border-radius: 10px; text-align: center; }
  .result.won { border-color: var(--orange); }
  .result .settled { font-family: var(--font-serif); font-style: italic; font-size: 44px; line-height: 1;
                     font-weight: 400; margin-top: 6px; font-variant-numeric: tabular-nums; }
  .result .rule { margin: 14px 0 12px; height: 1px; background: var(--line); }
  .result .near { margin-top: 6px; display: flex; align-items: baseline;
                  justify-content: center; gap: 10px; }
  .result .near .p { font-family: var(--font-mono); font-size: 26px; line-height: 1;
                     font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
  .result .near .away { font-family: var(--font-mono); font-size: 14px; color: var(--ink-secondary); }
  /* Paused (D136, D138): what it means for the player, in a card under the chart. */
  .paused { margin: 8px 16px 0; padding: 14px 16px; background: var(--surface-raised);
            border: 1px solid var(--line); border-radius: 10px; }
  .paused-title { font-size: 18px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
  .paused-text { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--ink-secondary); }

  /* ---- everything that is not the game ------------------------------------- */
  .stack { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
  /* One passkey on the account security card: its name, when it was last
     used, and its two buttons. */
  /* Board 15 (D138, part 2): the security card as two groups on the Account
     screen, each recovery line a row with its action at the right. */
  .account-id { margin: -8px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
  #auth-account .group { margin-top: 14px; padding: 14px 16px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
  #auth-account .group .stack { margin-top: 10px; }
  .sec-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .sec .cap + .sec-row { border-top: 0; }
  .sec-line { flex: 1 1 180px; margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-secondary); }
  /* A row whose line is hidden goes with it: a Nostr-only account's recovery
     rows (D167). The next row, then first under the heading, has no rule above. */
  .sec-row:has(> .sec-line[hidden]) { display: none; }
  .sec .cap + .sec-row:has(> .sec-line[hidden]) + .sec-row { border-top: 0; }
  /* The Nostr group (D167): the one line in place of what needs a passkey; the
     key's line on its own with its buttons together under it; the key the only
     way in; and the whole npub to copy by hand. */
  #sec-nostr-only { margin-top: 12px; }
  #auth-account .group .stack:has(> #sec-add[hidden]) { display: none; }
  #sec-nostr { justify-content: flex-start; }
  #sec-nostr .sec-line { flex-basis: 100%; }
  #sec-nostr-last { margin-top: -4px; padding-bottom: 4px; }
  #sec-nostr-full { margin: -4px 0 8px; font-family: var(--font-mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere;
                    -webkit-user-select: all; user-select: all; }
  #sec-email-form { padding: 4px 0 12px; border-top: 1px solid var(--line); }
  #sec-email-form .sec-line { margin-top: 12px; }
  /* The authenticator app's set-up and removal, open under its row (D145). */
  #sec-auth-setup, #sec-auth-remove-form { padding: 4px 0 12px; border-top: 1px solid var(--line); }
  #sec-auth-setup .sec-line { margin-top: 12px; }
  /* A QR code: the authenticator app's set-up (D145) and the deposit address (D145 "Money in", D171). */
  #sec-auth-qr, #deposit-qr { display: block; width: 200px; height: 200px; max-width: 100%; margin: 12px 0 0; border-radius: 8px; }
  #sec-auth-secret { font-family: var(--font-mono); font-size: 14px; letter-spacing: .04em; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
  /* A passkey's row: the name, the meta line in mono, its two small buttons. */
  .pk { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
  .pk:first-child { border-top: 0; }
  .pk-name { grid-column: 1; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); overflow-wrap: anywhere; }
  .pk .meta { grid-column: 1; margin-top: 3px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
  .pk label { grid-column: 1; }
  .pk-acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; }
  #auth-account .sheet-title, #auth-wallet .sheet-title, #auth-referrals .sheet-title { font-size: 24px; }
  #feedback-sheet .sheet-title { font-size: 24px; }
  /* Three buttons since D161: they wrap on a narrow phone rather than push the sheet sideways. */
  .account-nav { margin: 12px 0 0; flex-wrap: wrap; }
  /* Board 17: the wallet. */
  .wallet-balance { margin-top: 4px; }
  .wallet-sum { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-family: var(--font-mono);
                font-variant-numeric: tabular-nums; }
  #wallet-balance { font-size: 30px; font-weight: 700; color: var(--ink); }
  .wallet-sum .usd { font-size: 15px; font-weight: 600; color: var(--ink-secondary); }
  /* Board 18: referrals and swaps. */
  .ref-code-row { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .ref-code { font-family: var(--font-mono); font-size: 22px; font-weight: 700; letter-spacing: .04em; color: var(--accent-text); overflow-wrap: anywhere; }
  /* The referrals screen's cards (17 November): a row is its label at the left and its value at the right, the hint under it,
     the rows parted by a rule as the account screen's are. The value never shrinks or wraps; a long label wraps, and a value
     that does not fit beside its label goes to the line under it. */
  .ref-item { padding: 12px 0; border-top: 1px solid var(--line); }
  .cap + .ref-item { border-top: 0; }
  .ref-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
  .ref-label { flex: 1 1 8em; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink); }
  .ref-value { flex: none; margin-left: auto; font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ref-row > .ref-value:first-child { margin-left: 0; }
  .ref-row > button { flex: none; margin-left: auto; }
  /* The programme's rate line (D180); p. so that it outranks .lead, which comes later. */
  p.ref-rate { font-weight: 700; color: var(--ink); }
  #auth-referrals .group { margin-top: 14px; padding: 14px 16px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
  #auth-referrals .group .stack { margin-top: 10px; }
  #auth-wallet .group { margin-top: 14px; padding: 14px 16px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
  #auth-wallet .group .stack { margin-top: 10px; }
  #auth-wallet .sec-line { margin-top: 6px; }
  /* The deposit card on the real game (D145 "Money in", D171): the address
     breaks anywhere, and is the one line here a player can select, or press
     and hold to copy by hand; its QR code shares the authenticator's rule. */
  .deposit-address { margin: 10px 0 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere;
                     -webkit-user-select: all; user-select: all; -webkit-touch-callout: default; }
  .money-row { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line);
               font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .money-row:first-child { border-top: 0; }
  .money-row .kind { flex: 0 0 auto; min-width: 96px; font-size: 12px; color: var(--ink-muted); }
  .money-row .amount { flex-grow: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
  .money-row .when { font-size: 12px; color: var(--ink-muted); }
  /* The appearance switch (D138; the owner, 1 October): three quiet buttons, the chosen one pressed. */
  .segment { display: flex; gap: 6px; margin-top: 10px; }
  .segment button.quiet { flex: 1 1 0; min-height: 40px; padding: 0 6px; font-size: 13px; }
  .segment button.quiet[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); background: var(--surface-deep); }
  /* Korean's "휴대폰 설정 따르기" is longer than its neighbours: the three share
     the row by their words, so it keeps to one line as "Follow phone" does (D170). */
  html[lang="ko"] .theme .segment button.quiet { flex: 1 1 auto; }
  /* The feedback sheet's chips (D161): the same buttons, four to a question, two by two so the longest fits a phone. */
  .segment.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segment.chips button.quiet { min-height: 44px; line-height: 1.25; }
  /* The switch between the two jackpots (D174), at the top of the jackpot
     card: the same buttons, flush with the card's top and room under it.
     After .segment, whose margin it replaces. */
  .lane-switch { margin: 0 0 12px; }
  /* Scrolls on a short phone: at most the screen that
     is actually showing (100dvh, not the taller layout viewport behind a
     phone's address bar), with the rest reached by scrolling. The sheet is
     centred by its own auto margins, not by align-items alone — those give
     way when the sheet is taller than the screen, where align-items: center
     pushes its top above the screen, out of reach of any scrolling. */
  /* A sheet up from the bottom, over the live game a visitor is looking at
     (D138). The modal is what scrolls: a sheet taller than a short phone is
     reached from its top (margin-top: auto gives way), and Continue at its
     foot scrolls into view (journey A). */
  .modal { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
           align-items: center; padding: 0;
           background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(3px);
           backdrop-filter: blur(3px); max-height: 100dvh; overflow-y: auto; }
  /* A Streak won (D134): the whole page, for everyone, once per win. It waits
     for the game to be showing, so it is never over the sign-in panel. */
  /* Solid underneath the glow: the game must not show through it. */
  /* The one screen allowed an orange ground (D138): the win, once per device (D134). */
  .win { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center;
         justify-content: center; padding: 16px 20px 20px; max-height: 100dvh; overflow-y: auto;
         background: var(--orange); color: var(--on-orange); }
  body.won { overflow: hidden; }
  .win-sheet { width: 100%; max-width: 420px; margin: auto; text-align: left; }
  .win-mark { height: 40px; width: auto; display: block; margin-bottom: 28px; }
  .win-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
                color: var(--on-orange); font-weight: 500; }
  /* Fits a phone: "satoshi_fan won." on one or two lines, never off the edge. */
  .win-title { margin: 10px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 12vw, 56px);
               line-height: .95; letter-spacing: -.03em; color: var(--on-orange); overflow-wrap: anywhere; }
  .win-amount { margin: 22px 0 0; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 64px;
                line-height: .95; color: var(--on-orange); font-variant-numeric: tabular-nums; }
  .win-usd { margin-top: 10px; font-family: var(--font-mono); font-size: 14px; color: var(--on-orange);
             font-variant-numeric: tabular-nums; }
  .win-card { margin-top: 28px; padding: 16px 18px; background: var(--surface); border-radius: 10px; color: var(--ink); }
  .win-who { margin: 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
  .win-who b { color: var(--accent-text); font-weight: 600; }
  .win-round { margin-top: 8px; font-size: 13px; color: var(--ink-muted); }
  .win-round:empty { display: none; }
  .win-next { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
  .win button { width: 100%; min-height: 52px; margin-top: 20px; font-size: 15px; background: var(--surface); color: var(--ink); }
  .modal .sheet { width: 100%; max-width: 400px; background: var(--surface); color: var(--ink);
                  border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0;
                  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
                  margin: auto auto 0; flex-shrink: 0; }
  /* ---- the sheet's scaffold (D138, part 2, boards 8 to 16) ----------------- */
  .sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  .sheet-title { margin: 0; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
  .sheet-head .quiet, .sheet-head .link { flex-shrink: 0; min-height: 36px; padding: 0 10px; font-size: 13px; }
  .lead { margin: 0 0 16px; font-size: 15px; line-height: 1.5; letter-spacing: -.01em; color: var(--ink-secondary); }
  .field { margin-top: 16px; }
  .field label { display: block; font-size: 13px; font-weight: 600; letter-spacing: -.01em; color: var(--ink-secondary); }
  .field input { display: block; width: 100%; margin-top: 6px; min-height: 52px; padding: 0 16px; box-sizing: border-box;
                 background: var(--surface-raised); border: 1px solid var(--field-line); border-radius: 6px;
                 font: inherit; font-size: 16px; color: var(--ink); caret-color: var(--orange); }
  .field input.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
  .field-hint { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--ink-secondary); }
  .info { margin-top: 16px; padding: 12px 14px; background: var(--surface-deep); border-radius: 6px;
          font-size: 12px; line-height: 1.5; color: var(--ink-secondary); }
  button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); min-height: 48px; }
  button.quiet { background: transparent; color: var(--ink-secondary); border: 1px solid var(--line); min-height: 44px; font-size: 14px; }
  button.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--ink); font-weight: 600;
                font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
  /* "Report a bug or idea" at the foot of the game (D161): quiet, centred
     under the race on a phone and at the foot of the side column on a
     desktop, a full tap target however short the words. */
  button.feedback-open { justify-self: center; align-self: center; min-height: 44px; margin: -8px 16px 24px; padding: 0 8px;
                         font-size: 13px; color: var(--ink-secondary); }
  /* The feedback sheet (D161): taps first, the words, the screenshot, Send. */
  #feedback-sheet .group { margin-top: 18px; }
  #feedback-sheet .group:first-child { margin-top: 0; }
  .field textarea { display: block; width: 100%; margin-top: 6px; min-height: 96px; padding: 12px 16px; box-sizing: border-box;
                    background: var(--surface-raised); border: 1px solid var(--field-line); border-radius: 6px; resize: vertical;
                    font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); caret-color: var(--orange); }
  .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  .feedback-picture button.secondary { width: 100%; }
  .feedback-preview { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
  .feedback-preview img { display: block; max-width: 100%; max-height: 160px; width: auto; height: auto;
                          border: 1px solid var(--line); border-radius: 6px; background: var(--surface-deep); }
  .feedback-preview button.quiet { min-height: 40px; padding: 0 14px; font-size: 13px; }
  .aside { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--ink-secondary); }
  /* "Already playing?" shows only with its Sign in link, offered when the account may exist (review). */
  .aside:has(> button[hidden]) { display: none; }
  .standing { margin: 24px 0 0; text-align: center; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
  /* A wrong turn's Create an account (D168), under the welcome's message line. The button carries
     the spacing, so the row, empty while it is hidden, takes no room on any phone. */
  .wrong-turn button { display: block; width: 100%; margin-top: 10px; }
  /* "Something not working?" at the foot of every sign-in and sign-up screen (D168): quieter than
     the links above it, and a full tap target however short the words. */
  .report-line { margin-top: 12px; }
  button.link.auth-report { min-height: 44px; padding: 0 8px; font-weight: 400; color: var(--ink-secondary); }
  /* The visitor's pick, held while they sign up (board 8). */
  .held { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 10px 14px;
          background: var(--surface-deep); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--ink-secondary); }
  .held .num { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
  /* The two ways back in (board 13): a card each, with the cost stated. */
  .choice { margin-top: 12px; padding: 16px 18px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
  .choice-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
  .choice-line { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--ink-secondary); }
  .choice button { margin-top: 14px; width: 100%; }
  p.info { margin: 0 0 4px; }
  /* The passkey card (board 10): the mark, whose passkey, where it lives. */
  .passkey-card { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 16px 18px;
                  background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
  .passkey-mark { width: 56px; height: 56px; border-radius: 12px; display: block; flex-shrink: 0; }
  .passkey-who { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
  .passkey-where { margin-top: 4px; font-size: 12px; color: var(--ink-secondary); }
  /* The ten codes (board 11): two columns in the mono voice. */
  .codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
  .codes div { display: flex; align-items: center; justify-content: center; height: 40px; background: var(--surface-deep);
               border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-mono); font-size: 14px;
               font-weight: 600; letter-spacing: .04em; color: var(--ink); }
  .row-buttons { display: flex; gap: 8px; margin-top: 12px; }
  button.small { min-height: 36px; padding: 0 14px; font-size: 12px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
  .tick { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--ink); cursor: pointer;
          -webkit-user-select: none; user-select: none; }
  .tick input { width: 22px; height: 22px; min-height: 22px; margin: 0; accent-color: var(--orange); flex: 0 0 auto; }
  /* One field drawn as six cells (board 9): one input keeps the phone's one-time-code autofill. */
  .field input.cells { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: .55em; padding-left: .55em; min-height: 56px; }
  ol.how { margin: 8px 0 0; padding-left: 20px; }
  ol.how li { margin-bottom: 6px; font-size: 14px; }

  /* The margins and alignments the rig's markup carried as style attributes,
     as classes: the page's CSP allows no inline style (D138). */
  .d-flex { display: flex; }
  .fd-column { flex-direction: column; }
  .fs-15px { font-size: 15px; }
  .gap-6px { gap: 6px; }
  .m-0 { margin: 0; }
  .m-0-0-10px { margin: 0 0 10px; }
  .m-0-0-12px { margin: 0 0 12px; }
  .m-0-0-4px { margin: 0 0 4px; }
  .m-10px-0-0 { margin: 10px 0 0; }
  .m-12px-0-0 { margin: 12px 0 0; }
  .m-14px-0-0 { margin: 14px 0 0; }
  .mt-10px { margin-top: 10px; }
  .mt-12px { margin-top: 12px; }
  .mt-14px { margin-top: 14px; }
  .mt-4px { margin-top: 4px; }
  .mt-8px { margin-top: 8px; }
  .ta-right { text-align: right; }
  .w-100pct { width: 100%; }
  #bar > div { width: 0; }
  .away { font-size: 14px; font-weight: 600; color: var(--ink-secondary); }
