/* mychesslab.uk (STYLE.md: one look, light and dark; DESIGN_PASS.md: the visual system).
   Three sizes, built for on purpose (SHELL.md D-SH.5). Mobile-first: the base rules are the phone;
     tablet   min-width: 600px
     desktop  min-width: 1024px
   plus a short-landscape rule (a phone on its side) where a board is shown. Input is matched by
   pointer and hover, not width: (pointer: coarse) gets 44px targets, (hover: hover) hover effects.
   Reading pages sit in .read (38rem); app pages in .app (up to 72rem). Checked at each size by
   ops/site/screens.mjs.
   The system (DESIGN_PASS.md §4):
   - Type: five sizes only (--fs-*); 14px for anything read, 12px only for headers, counts and
     metadata. Plex set as IBM sets it: Text (450) for running text, SemiBold (600) for emphasis,
     a little tracking at 14px and 12px, never negative.
   - Colour: neutral text in three greys (strong, text, muted). The accent means "you are here"
     or "the main action": the current move, the selected tab, the primary button, links in prose,
     focus. Clickable things are shown by shape and hover, not by colour (D-DP.3).
   - One look per kind of control: button (primary or plain), segmented control (one of a few
     views of the same thing), tab (underline), filter chip (removable), clickable row (hover
     tint), link (underlined, in prose).
   - Corners: 6px for controls and rows, 10px for panels, round for chips. Shadows only on the
     filters drawer. */
/* ---- Type: IBM Plex, self-hosted (STYLE.md D-ST.3; fonts/plex-2/SOURCE.md, OFL) ---- */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 450; font-display: swap;
  src: url("/fonts/plex-2/IBMPlexSans-Text-Latin1.woff2") format("woff2"); unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 450; font-display: swap;
  src: url("/fonts/plex-2/IBMPlexSans-Text-Latin2.woff2") format("woff2"); unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-017F, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01FA-01FF, U+0218-021B, U+0237, U+0259, U+1E80-1E85, U+1E9E, U+20A1, U+20A4, U+20A6, U+20A8-20AA, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BD, U+20BF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 450; font-display: swap;
  src: url("/fonts/plex-2/IBMPlexSans-Text-Latin3.woff2") format("woff2"); unicode-range: U+0102-0103, U+01CD-01DC, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/plex-2/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2"); unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/plex-2/IBMPlexSans-SemiBold-Latin2.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/plex-2/IBMPlexMono-Regular-Latin1.woff2") format("woff2"); unicode-range: U+0000, U+000D, U+0020-007E, U+00A0-00A3, U+00A4-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+2074, U+20AC, U+2122, U+2212, U+FB01-FB02; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/plex-2/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2"); unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02; }

/* ---- Colour, spacing, radii and layers live in tokens.css (loaded first; PHASE3_PLAN step 1).
   Rules here use those tokens only: ops/site/rawcheck.py fails on a raw colour or z-index. ---- */
:root {
  /* Type: in tokens.css (the bar's frame.css uses it on the open pages too, T-288). */

  --gutter: 16px; --wide: 72rem; --narrow: 38rem;
  /* Height a board must leave for the top bar and a row of tools. */
  --board-chrome: 8.5rem;
}
.mcl-board { --mcl-light: var(--board-light); --mcl-dark: var(--board-dark); }
* { box-sizing: border-box; }
html { background: var(--bg); font-size: 100%;
  /* No browser swipe-to-go-back/forward over the site (owner, 2026-10-25-1: a drag on the board's
     edge files went back a page). The phone's own edge gesture can't be switched off by a page. */
  overscroll-behavior-x: none; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: var(--w-text) var(--fs-md)/1.55 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* The two small sizes, with IBM's tracking for Plex at those sizes. */
.small, .fs-sm { font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.fs-xs { font-size: var(--fs-xs); letter-spacing: var(--ls-xs); }
/* ---- The plain pages' top bar (public/layout.html); the app's frame is in kit.css. Then the page
   column and footer. ---- */
header { width: 100%; border-bottom: 1px solid var(--border); }
.bar { max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 12px var(--gutter);
       display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; }
.brand { font-weight: var(--w-bold); color: var(--strong); text-decoration: none; margin-right: auto; }
/* The plain pages: two links, in the bar at every size. Nav links are neutral; the current one is
   strong with the accent under it (you are here). */
header nav { display: flex; gap: 1.25rem; }
header nav a { text-decoration: none; padding: 0.2rem 0; color: var(--muted); }
@media (hover: hover) { header nav a:hover { color: var(--strong); } }
header nav a[aria-current=page] { color: var(--strong); font-weight: var(--w-bold); box-shadow: 0 2px 0 var(--accent); }
main { flex: 1; width: 100%; padding: 1.25rem var(--gutter) 48px; }
.read { max-width: var(--narrow); margin: 0 auto; }
.app { max-width: var(--wide); margin: 0 auto; }
footer { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 16px var(--gutter) 24px;
         color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm);
         background: linear-gradient(var(--border), var(--border)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
         display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
footer a { overflow-wrap: anywhere; color: var(--muted); }

@media (min-width: 600px) {
  main { padding-top: 2rem; }
}

/* Touch: every target at least 44px high (D-SH.5). */
@media (pointer: coarse) {
  button, .button, select { min-height: 44px; }
  input[type=checkbox] { width: 24px; height: 24px; }
  header nav a { min-height: 44px; display: inline-flex; align-items: center; }
  footer a { min-height: 36px; display: inline-flex; align-items: center; }
}
h1 { font-size: var(--fs-xl); line-height: 1.25; margin: 0 0 1rem; color: var(--strong); font-weight: var(--w-bold); text-wrap: balance; }
h2 { font-size: var(--fs-lg); line-height: 1.3; margin: 0 0 0.5rem; color: var(--strong); font: inherit; font-weight: var(--w-bold); }
/* The guide (public/guide.html): a label on the page, and a key to press. */
.ui { font-weight: var(--w-bold); color: var(--strong); }
kbd { font-family: "IBM Plex Mono", monospace; font-size: var(--fs-sm); border: 1px solid var(--control); border-radius: var(--r-control);
  padding: 0 0.3rem; background: var(--surface); color: var(--strong); }
p { margin: 0 0 1rem; color: var(--muted); }
a { color: var(--accent); text-underline-offset: 0.15em; }
strong { color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }

form { display: grid; gap: 0.35rem; margin: 0 0 1rem; }
label { display: grid; gap: 0.25rem; margin-top: 0.6rem; font-weight: var(--w-bold); color: var(--strong); }
label small { font-weight: var(--w-text); color: var(--muted); }
label.inline { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; font-weight: var(--w-text);
               color: var(--text); }
/* The sign-in form's age tick and Cloudflare's Turnstile check (65px tall when it shows). */
label.tick { margin-top: 0.75rem; }
.turnstile { margin-top: 0.5rem; min-height: 65px; }
input[type=email], input[type=text], input[type=number], input[type=search], input[type=date], textarea {
  width: 100%; font: inherit; font-weight: var(--w-text); color: var(--text); background: var(--surface);
  border: 1px solid var(--control); border-radius: var(--r-control); padding: 0.55rem 0.7rem;
}
::placeholder { color: var(--muted); opacity: 1; }
/* Radios and checkboxes in the accent: a ticked box is a chosen thing (D-DP.3). */
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }
/* Keyboard focus is always visible, on every control (STYLE.md §5). */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
main:focus { outline: none; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: var(--z-bar3); background: var(--accent);
        color: var(--on-accent); padding: 0.5rem 0.9rem; border-radius: var(--r-control); font-weight: var(--w-bold); }
.skip:focus { top: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
textarea { resize: vertical; }
/* Buttons: the primary one (the page's main action) is the accent; every other is plain. */
button, .button {
  font: inherit; font-weight: var(--w-bold); cursor: pointer; justify-self: start; margin-top: 0.9rem;
  background: var(--accent); color: var(--on-accent); border: 1px solid transparent; border-radius: var(--r-control);
  padding: 0.55rem 1.1rem; text-decoration: none; display: inline-block;
  /* Quick taps never zoom the page (test finding 5: Next tapped fast on an iPad read as a
     double-tap). */
  touch-action: manipulation;
}
.actions .button { margin-top: 0; }
button:disabled { opacity: 0.55; cursor: progress; }
button.secondary, .button.secondary { background: var(--surface); color: var(--strong); border-color: var(--border); }
@media (hover: hover) { button.secondary:hover:not(:disabled), .button.secondary:hover { background: var(--hover); border-color: var(--control); } }
/* A delete that has been asked for once already (the admin page). */
button.danger { background: var(--surface); color: var(--error); border-color: var(--error); }
button.link { background: none; border: 0; padding: 0; margin: 0; color: var(--accent);
              font-weight: var(--w-text); text-decoration: underline; text-underline-offset: 0.15em; }
.field-error, .error { color: var(--error); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.note { color: var(--text); background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--r-panel); padding: 0.6rem 0.8rem; }

.applications { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.applications li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel);
                   padding: 1rem 1.1rem; min-width: 0; }
.applications h2 { overflow-wrap: anywhere; }
dl { margin: 0 0 0.5rem; display: grid; gap: 0.2rem; }
dl div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.5rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.decide { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.decide button { margin-top: 0.4rem; }

.mono { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }
.moves { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.moves button { margin: 0; padding: 0.3rem 0.55rem; min-width: 3.2rem; }
.swatch { width: 1.6rem; height: 1.6rem; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.swatch.on { border-color: var(--text); }
/* The board's drawing brushes: these are the arrows' own colours, not page colours. */
.swatch.green { background: var(--mark-green); } .swatch.red { background: var(--mark-red); }
.swatch.blue { background: var(--mark-blue); } .swatch.yellow { background: var(--mark-yellow); }
.played { min-height: 1.4em; margin-top: 0.6rem; }

.gap { margin-top: 2rem; }

/* ---- Member home: cards, 1 / 2 / 3 across ---- */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
.card-more { margin: 0.75rem 0 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); padding: 1rem 1.1rem; }
.card h2 { font-size: var(--fs-md); }
.card .button { margin-top: 0; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---- Account ---- */
dl.account div { grid-template-columns: 1fr; gap: 0; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
@media (min-width: 600px) { dl.account div { grid-template-columns: 9rem 1fr; gap: 0.5rem; } }

/* ---- Settings: piece-set tiles, 2 across on a phone, 3 from tablet up (big enough to judge) ---- */
.status { min-height: 1.6em; margin: 0 0 0.5rem; }
.sets { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.75rem;
        grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .sets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
@media (min-width: 1024px) { .sets { max-width: 60rem; gap: 1.25rem; } }
button.set { display: grid; gap: 0.15rem; width: 100%; margin: 0; padding: 0.5rem; text-align: left;
             background: var(--surface); color: var(--text); border: 2px solid var(--border); border-radius: var(--r-panel);
             font-weight: var(--w-text); }
button.set.on { border-color: var(--accent); }
button.set:disabled { cursor: default; }
.set-board { display: block; margin-bottom: 0.35rem; }
.set-board .mcl-board { pointer-events: none; }
.set-name { font-weight: var(--w-bold); color: var(--strong); }
.set.on .set-name::after { content: " ✓"; color: var(--accent); }
.set-by { color: var(--muted); font-size: var(--fs-xs); letter-spacing: var(--ls-xs); line-height: 1.35; }
@media (hover: hover) { button.set:hover { border-color: var(--control); } button.set.on:hover { border-color: var(--accent); } }

/* ---- The board's frame (the explorer) ----
   Phone portrait: full width, panel below. Tablet / phone landscape: board limited by the height.
   Desktop: board beside the panel. The board never needs scrolling to be seen whole. */
.board-frame { width: min(100%, calc(var(--vh) - var(--board-chrome))); min-width: 240px; max-width: 100%; }
@media (max-height: 500px) and (orientation: landscape) {
  .board-frame { width: calc(var(--vh) - 5rem); }
}

/* ---- Segmented controls: one of a few views of the same thing (DESIGN_PASS.md §4) ----
   A groove with the chosen segment raised in it: the light/dark switch, the explorer's source
   (Masters | Lichess) and a player's moves (theirs | all games). */
.theme-switch, .source-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; margin: 0;
  background: var(--track); border-radius: calc(var(--r-control) + 2px); }
footer .theme-switch { margin-left: auto; }
.theme-switch button, .source-tabs button.chip { margin: 0; background: transparent; color: var(--muted); border: 0;
  border-radius: var(--r-control); font-weight: var(--w-text); font-size: var(--fs-sm); letter-spacing: var(--ls-sm);
  padding: 0.3rem 0.8rem; }
@media (hover: hover) { .theme-switch button:hover, .source-tabs button.chip:hover { color: var(--strong); } }
.theme-switch button[aria-pressed=true], .source-tabs button.chip[aria-pressed=true] {
  background: var(--knob); color: var(--on-knob); font-weight: var(--w-bold); box-shadow: 0 0 0 1px var(--control); }
select { font: inherit; font-weight: var(--w-text); color: var(--text); background: var(--surface);
         border: 1px solid var(--control); border-radius: var(--r-control); padding: 0.35rem 0.5rem; }
/* Settings › Your level (REPERTOIRE_R3.md D-R3.1): two labelled pickers, side by side when there's room. */
.level-picks { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin: 0 0 1rem; }
.level-pick { display: flex; flex-direction: column; gap: 0.25rem; font-size: var(--fs-sm); }
.level-pick select { min-height: 44px; min-width: 12rem; }

/* ---- Explorer (EXPLORER.md §4) ----
   Phone: opening line, board, controls, path, then Moves | Games as tabs; the filters open in a
   sheet from the bottom. Tablet portrait: the same stacked, both sections shown. Desktop (and a
   tablet on its side): board left, panel right; the board stays put while the panel scrolls.
   Phone on its side: the board limited by the height on the left, the panel on the right. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.explorer { display: grid; gap: 0.75rem 1.75rem; grid-template-columns: minmax(0, 1fr); --board-chrome: 15rem; }
.ex-board-side, .ex-panel { min-width: 0; }
.ex-board { margin: 0 auto 0.4rem 0; }
.opening { min-height: 2.6rem; margin-bottom: 0.5rem; }
.opening-name { margin: 0; color: var(--strong); font-weight: var(--w-bold); line-height: 1.3; }
.opening-name.muted { color: var(--muted); font-weight: var(--w-text); }
.eco { color: var(--muted); font-weight: var(--w-text); }
.crumbs { display: flex; align-items: baseline; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap;
  font-size: var(--fs-sm); letter-spacing: var(--ls-sm); color: var(--muted); }
.crumbs button.link { font-size: inherit; text-decoration: none; color: var(--muted); }
@media (hover: hover) { .crumbs button.link:hover:not(:disabled) { color: var(--strong); text-decoration: underline; } }
.crumbs button.link:disabled { color: var(--text); cursor: default; opacity: 1; }
.crumbs .sep:last-child { display: none; }
.ex-controls { display: flex; align-items: center; gap: 0.25rem; }
/* Icon buttons: plain, the icon in text colour. */
button.icon { margin: 0; padding: 0.35rem 0.6rem; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-control); display: inline-flex; align-items: center; justify-content: center; min-width: 44px; }
@media (hover: hover) { button.icon:hover:not(:disabled) { background: var(--hover); color: var(--strong); border-color: var(--control); } }
button.icon:disabled { opacity: 0.4; cursor: default; }
.ex-controls .phone-only { margin-left: auto; }
/* The line played: the current move is the accent (you are here). */
.path { list-style: none; margin: 0.5rem 0 0; padding: 0 0 0.25rem; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 0.1rem;
  font-size: var(--fs-sm); }
.path li { flex: none; }
.path button { margin: 0; padding: 0.15rem 0.35rem; background: none; color: var(--text); font-weight: var(--w-text); border: 0; border-radius: var(--r-control); }
@media (hover: hover) { .path button:hover { background: var(--hover); } }
.path button[aria-current=step] { background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); }
.path li.ahead button { color: var(--muted); }
p.path { padding: 0.15rem 0; }
.fen-entry { margin-top: 0.5rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); color: var(--muted); }
.fen-entry summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.fen-entry form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; margin: 0.25rem 0 0; }
.fen-entry input { font-size: var(--fs-sm); }
.fen-entry button { margin: 0; }

/* What's applied, as chips (D-LY.1); × takes one off. Fixed chips (the source, the whole range)
   are words in an outline; removable ones are filled. */
.filter-summary { display: flex; align-items: center; gap: 0.75rem; justify-content: space-between; }
.fchips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; }
.fchip { display: inline-flex; align-items: center; gap: 0.1rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--raised); color: var(--strong); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); line-height: 1.3;
  padding: 0.2rem 0.25rem 0.2rem 0.7rem; }
.fchip.fixed { background: transparent; color: var(--muted); padding-right: 0.7rem; }
button.fchip-x { margin: 0; padding: 0.15rem; background: none; color: var(--muted); border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; }
button.fchip-x svg { width: 0.95rem; height: 0.95rem; }
@media (hover: hover) { button.fchip-x:hover { color: var(--strong); background: var(--hover); } }
/* Touch: the × keeps a 44px target (D-SH.5) without making every chip that tall. */
@media (pointer: coarse) {
  .fchips { gap: 0.5rem 0.6rem; }
  button.fchip-x { min-height: 0; position: relative; }
  button.fchip-x::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
}
.filter-summary > button { margin: 0; flex: none; padding: 0.35rem 0.8rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }

/* The filters drawer (D-LY.1): never blocks the page, so the results change behind it. A bottom
   sheet by default; a side sheet over the board where there's a board column beside the results. */
.filters { position: fixed; z-index: var(--z-bar2); left: var(--frame-l); right: 0; bottom: var(--bottom-bar); margin: 0; max-height: 50dvh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px var(--shade);
  padding: 0 0.9rem 0.75rem; display: grid; gap: 0.6rem; }
.sheet-head { position: sticky; top: 0; z-index: var(--z-page); background: var(--surface); display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.6rem 0 0.4rem; border-bottom: 1px solid var(--border); }
.sheet-head h2 { margin: 0; font-size: var(--fs-md); }
.sheet-head h2:focus { outline: none; }
.sheet-head button.icon { background: transparent; border-color: transparent; color: var(--muted); }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }
.filters legend { font-weight: var(--w-bold); color: var(--strong); padding: 0; margin-bottom: 0.2rem; width: 100%; }
.filters label { margin-top: 0; }
.filters select, .filters input[type=month] { width: 100%; font: inherit; font-weight: var(--w-text); color: var(--text); background: var(--surface);
  border: 1px solid var(--control); border-radius: var(--r-control); padding: 0.35rem 0.5rem; }
.filters .rating select { width: auto; flex: 1 1 8rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1rem; }
/* Presets: small plain buttons that fill in a filter. */
.presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
button.chip { margin: 0; padding: 0.25rem 0.7rem; font-weight: var(--w-text); font-size: var(--fs-sm); letter-spacing: var(--ls-sm);
  border-radius: var(--r-control); }
.filter-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.filter-actions button { margin: 0; }

/* Tabs: distinct sections. Neutral words; the chosen one strong with the accent under it. */
.ex-tabs, .games-tabs { display: flex; gap: 0; margin: 0.75rem 0 0.5rem; border-bottom: 1px solid var(--border); }
.ex-tabs button, .games-tabs button { margin: 0; background: none; color: var(--muted); border: 0; border-radius: 0;
  padding: 0.4rem 0.9rem; font-weight: var(--w-text); }
@media (hover: hover) { .ex-tabs button:hover, .games-tabs button:hover { color: var(--strong); } }
.ex-tabs button[aria-selected=true], .games-tabs button[aria-selected=true] { color: var(--strong); font-weight: var(--w-bold);
  box-shadow: inset 0 -2px 0 var(--accent); }
.ex-moves.off, .ex-games.off { display: none; }
.total { margin: 0 0 0.25rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.stale { opacity: 0.5; }
/* The moves table: rows you click, shown by a hover tint, not by coloured moves. */
.moves-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.moves-table th, .moves-table td { padding: 0.4rem 0.4rem; text-align: left; font-weight: var(--w-text); vertical-align: middle; }
.moves-table thead th { color: var(--muted); font-size: var(--fs-xs); letter-spacing: var(--ls-xs); font-weight: var(--w-bold);
  padding-top: 0.25rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--border); }
.moves-table tbody tr { border-bottom: 1px solid var(--border); }
.moves-table tbody tr.move-row { cursor: pointer; }
@media (hover: hover) { .moves-table tbody tr.move-row:hover { background: var(--hover); } }
.moves-table .num { text-align: right; white-space: nowrap; }
.moves-table .bar-col { width: 45%; }
.moves-table tr.ended th { color: var(--muted); }
.san { margin: 0; padding: 0.1rem 0.3rem; background: none; color: var(--strong); font-weight: var(--w-bold); font-size: var(--fs-md); border: 0; }
.child-name { display: block; font-size: var(--fs-xs); letter-spacing: var(--ls-xs); color: var(--muted); line-height: 1.3; padding-left: 0.3rem; }
.col-avg, .col-perf, .child-name { display: none; }
/* Each move's stored eval, a small tag after the move (STORED_EVALS D-SE.13 B, owner 2026-10-21-1):
   a number, never a colour (results are words). The move and its tag stay on one line; the opening
   name under them still wraps. */
.moves-table th:has(.ev-chip) { white-space: nowrap; }
.moves-table th:has(.ev-chip) .child-name { white-space: normal; }
.ev-chip { display: inline-block; margin-left: 0.15rem; padding: 0 0.3rem; border-radius: var(--r-control); background: var(--raised);
  color: var(--text); font-size: var(--fs-xs); letter-spacing: 0; line-height: 1.5; vertical-align: 0.1em; white-space: nowrap; }
/* ---- Theory against practice (F17-lite, F17_LITE.md D-F17.4 A) ----
   Results are words, never red or green: look A marks the move as a scoresheet does (?! ?), look B
   names the verdict in a quiet label (punishable in the strongest text, dubious in the body's). */
.pr-switch { display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap; margin: 0 0 0.5rem; }
.pr-views { flex: 0 1 auto; }
.pr-split th { padding-top: 0.9rem !important; color: var(--muted); font-size: var(--fs-xs); letter-spacing: var(--ls-xs); font-weight: var(--w-bold); }
.pr-compare .pr-lv { font-weight: var(--w-bold); color: var(--strong); }
.pr-toggle { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-sm); color: var(--strong);
  font-weight: var(--w-bold); min-height: 44px; cursor: pointer; }
.pr-toggle input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.pr-lv { display: block; font-weight: var(--w-text); color: var(--muted); white-space: nowrap; }
/* Compare's own column is a table cell (T-173, finding 10: as a block it sat a few px above Elite's). */
.moves-table td.pr-lv { display: table-cell; }
.pr-band { min-height: 36px; font: inherit; font-size: var(--fs-sm); padding: 0 0.4rem; border: 1px solid var(--control);
  border-radius: var(--r-control); background: var(--surface); color: var(--text); }
.pr-star { margin-left: 0.25rem; color: var(--strong); font-size: var(--fs-xs); }
.pr-v-col { white-space: nowrap; text-align: right; }
.pr-v:empty { display: none; }
.pr-v { display: inline-block; padding: 0.05rem 0.4rem; border-radius: var(--r-control); font-size: var(--fs-xs);
  letter-spacing: var(--ls-xs); color: var(--muted); }
.pr-table .more { margin-left: 0.25rem; }
tr.pr-card td { padding: 0.25rem 0.5rem 0.6rem; }
.pr-card-body { display: grid; gap: 0.35rem; padding: 0.25rem 0 0.4rem; max-width: 36rem; }
.pr-card-body p { margin: 0; color: var(--text); }
.pr-card-h { font-weight: var(--w-bold); color: var(--strong) !important; }
.pr-trap { color: var(--strong) !important; }
.pr-key { margin: 0.5rem 0 0; }
button.more { margin: 0; padding: 0.1rem 0.5rem; background: none; color: var(--muted); border: 0; font-weight: var(--w-text); }
tr.details td { padding: 0.25rem 0.5rem 0.6rem; }
tr.details dl div { grid-template-columns: 8rem 1fr; }
.wdl { display: flex; height: 1.25rem; border: 1px solid var(--control); border-radius: 4px; overflow: hidden;
  font-size: var(--fs-xs); letter-spacing: var(--ls-xs); line-height: 1.25rem; }
.wdl span { display: block; text-align: center; overflow: hidden; white-space: nowrap; }
.wdl-white { background: var(--wdl-white); color: var(--on-wdl-light); }
.wdl-draw { background: var(--wdl-draw); color: var(--on-wdl-light); }
.wdl-black { background: var(--wdl-black); color: var(--on-wdl-dark); }
.excluded { margin: 0.5rem 0 0; }
/* Game rows: clickable rows on a surface. */
.games { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.games-more { margin-top: 0.75rem; width: 100%; }
.games-opening { margin: 0.5rem 0 0; }
.game-opening { grid-column: 1 / -1; }
.novelty-line { margin: 0.25rem 0; }
.games-download { margin: 0.6rem 0 0; }
.games-save { margin: 0.3rem 0 0; }
.games-save-form { display: grid; gap: 0.5rem; margin-top: 0.6rem; padding: 0.6rem 0.7rem; border: 1px solid var(--border);
                   border-radius: var(--r-panel); background: var(--surface); }
.games-save-form label { margin: 0; }
.games-save-form select { width: 100%; margin-top: 0.2rem; }
.games-save-form p { margin: 0; overflow-wrap: anywhere; }
.games-save-form .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.games-save-form .actions button { margin: 0; }
.path li.novelty button { box-shadow: inset 0 -2px 0 var(--accent); }
.game-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.game-actions button { margin: 0; }
/* The workspace search (D-LY.2): one box above the results; what it finds drops below it. */
.ws-search { margin: 0 0 0.75rem; }
.ws-search input[type=search] { width: 100%; }
.ws-results { margin-top: 0.4rem; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-panel);
  padding: 0.5rem 0.6rem; display: grid; gap: 0.25rem; max-height: 60dvh; overflow-y: auto; }
.ws-results p { margin: 0; }
.ws-results p.ws-group { font-size: var(--fs-xs); letter-spacing: var(--ls-xs); font-weight: var(--w-bold); color: var(--muted); margin-top: 0.35rem; }
.ws-results p.ws-group:first-child { margin-top: 0; }
/* The search box's own-games rows and saved searches (SEARCH.md part 3, D-SR.6 A). */
.you-mark { font-size: var(--fs-xs); font-weight: var(--w-bold); color: var(--muted); }
.saved-row { display: flex; align-items: stretch; gap: 0.25rem; }
.saved-row .opening-row { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.ws-results button.saved-x { background: transparent; border-color: transparent; color: var(--muted); padding: 0.2rem 0.4rem; margin: 0; }
.ws-results button.saved-new { justify-self: start; margin: 0.25rem 0 0; }
.saved-form { display: grid; gap: 0.3rem; margin-top: 0.25rem; }
.saved-form-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.saved-form-row input { flex: 1 1 12rem; min-width: 0; }
.saved-form-row button { margin: 0; }
/* The chosen player (D-LY.2), above the moves. */
.player-strip { border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-panel); padding: 0.5rem 0.6rem 0.4rem 0.8rem; margin: 0 0 0.6rem; }
.player-strip p { margin: 0 0 0.35rem; }
.ps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.ps-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; min-width: 0; overflow-wrap: anywhere; }
.player-strip button.ps-x { background: transparent; border-color: transparent; color: var(--muted); padding: 0.2rem 0.4rem; }
.player-strip .source-tabs { margin-bottom: 0.4rem; }
.start { border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-panel); margin: 0 0 0.75rem;
  padding: 0.7rem 0.9rem 0.6rem; }
.start .chip { margin: 0; }
.start p { margin: 0 0 0.4rem; }
.start-head { font-weight: var(--w-bold); color: var(--strong); }
.start-examples { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.5rem; }
.start ul { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.start li { margin: 0 0 0.2rem; }
.start-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.start-foot button { margin: 0; padding: 0.35rem 0.9rem; }
/* Keys only off touch screens (where a keyboard is likely). */
.key-hints { margin: 0.25rem 0 0; display: none; }
@media not all and (pointer: coarse) { .key-hints { display: block; } }
.source-tabs { margin: 0 0 0.5rem; }
.openings-toggle { font-size: var(--fs-sm); letter-spacing: var(--ls-sm); margin-left: 0.5rem; }
.openings { margin: 0.75rem 0; display: grid; gap: 0.5rem; }
.openings input[type=search] { width: 100%; }
.opening-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.25rem; }
.opening-row { width: 100%; display: flex; align-items: baseline; gap: 0.5rem; text-align: left; margin: 0;
  background: var(--surface); color: var(--strong); font-weight: var(--w-text); border: 1px solid var(--border); border-radius: var(--r-control); padding: 0.45rem 0.6rem; }
@media (hover: hover) { .opening-row:hover { background: var(--hover); border-color: var(--control); } }
.opening-row-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opening-share { display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.opening-share .small { min-width: 2.6em; text-align: right; color: var(--muted); }
.opening-share .opening-count { min-width: 4.5em; font-size: var(--fs-xs); letter-spacing: var(--ls-xs); }
.opening-bar { width: 4.5rem; height: 0.4rem; border-radius: 2px; background: var(--border); overflow: hidden; }
.opening-bar > span { display: block; height: 100%; background: var(--muted); }
button.game { width: 100%; margin: 0; text-align: left; background: var(--surface); color: var(--text); font-weight: var(--w-text);
  border: 1px solid var(--border); border-radius: var(--r-control); padding: 0.5rem 0.75rem;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.75rem; }
@media (hover: hover) { button.game:hover { background: var(--hover); border-color: var(--control); } }
button.game[aria-busy=true] { opacity: 0.6; }
/* In the board: ↗ (a new tab) at the row's top right, over the button. */
.games li.with-tab { position: relative; }
.games li.with-tab button.game { padding-right: 2.6rem; }
.game-tab { position: absolute; z-index: var(--z-page); top: 0.25rem; right: 0.25rem; display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 36px; border-radius: var(--r-control); color: var(--muted); text-decoration: none; font-size: var(--fs-lg); }
@media (hover: hover) { .game-tab:hover { background: var(--hover); color: var(--strong); } }
@media (pointer: coarse) { .game-tab { min-width: 44px; min-height: 44px; top: 0; right: 0; } }
/* ☆ (bookmark, D-LB.21) under ↗; ★ once the game is in the library. */
.game-star { position: absolute; z-index: var(--z-page); top: calc(0.25rem + 36px); right: 0.25rem; margin: 0; padding: 0; display: inline-flex;
  align-items: center; justify-content: center; min-width: 36px; min-height: 36px; background: none; border: 0;
  border-radius: var(--r-control); color: var(--muted); font-size: var(--fs-lg); font-weight: var(--w-text); }
.game-star.held { color: var(--accent); }
@media (hover: hover) { .game-star:not(:disabled):hover { background: var(--hover); color: var(--strong); } }
@media (pointer: coarse) { .game-star { min-width: 44px; min-height: 44px; top: 44px; right: 0; } }
.games li.with-star button.game { min-height: calc(0.5rem + 72px); }
@media (pointer: coarse) { .games li.with-star button.game { min-height: 88px; } }
/* Bookmark and Copy on one reference game (the preview, a game's tab). */
.ref-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.ref-buttons button { margin: 0; }
.ref-buttons p { margin: 0; flex-basis: 100%; }
.game-players { min-width: 0; overflow-wrap: anywhere; color: var(--strong); }
.player .title { font-weight: var(--w-bold); color: var(--strong); }
.player .rating, .game-meta, .game-date, .game-next { color: var(--muted); }
.player .rating { font-size: var(--fs-sm); }
.game-meta, .game-date, .game-next { font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.game-result { font-weight: var(--w-bold); color: var(--strong); text-align: right; }
.game-date { text-align: right; }
.game-head { border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-panel); padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; }
.game-head p { margin: 0; }
.game-head .result { margin-left: 0.6rem; font-weight: var(--w-bold); color: var(--strong); }
.game-head .back { margin-top: 0.4rem; padding: 0.3rem 0.8rem; }
.provenance { margin-top: 1rem; color: var(--muted); }

.filter-actions { position: sticky; bottom: -0.75rem; background: var(--surface); padding: 0.5rem 0 0.75rem; border-top: 1px solid var(--border); }
/* Phone: the board's own Filters button opens the drawer. */
@media (max-width: 599px) {
  .filter-summary > button { display: none; }
  .pair { grid-template-columns: minmax(0, 1fr); }
}
/* A board column beside the results: a side sheet. */
@media (min-width: 1024px), (max-height: 500px) and (orientation: landscape) {
  .filters { top: 0; bottom: 0; max-height: none; align-content: start; }
  .pair { grid-template-columns: minmax(0, 1fr); }
}
/* Landscape phone: no room to make way, so the sheet goes over the board, never the results. */
@media (max-height: 500px) and (orientation: landscape) {
  .filters { right: auto; width: min(26rem, 45vw); border-radius: 0 14px 14px 0; box-shadow: 8px 0 24px var(--shade); }
}
/* Desktop (owner, 2026-10-23-1; replaces 2026-10-15's "page makes way"): the sheet comes over
   the board from the left, never over the results, and the page doesn't move. */
@media (min-width: 1024px) {
  :root { --sheet: 22rem; }
  .filters { right: auto; width: var(--sheet); border-radius: 0 14px 14px 0; box-shadow: 8px 0 24px var(--shade); }
}
@media (min-width: 600px) {
  .ex-tabs, .ex-controls .phone-only { display: none; }
  .ex-moves.off, .ex-games.off { display: block; }
  .ex-games { margin-top: 1.25rem; }
  .col-avg { display: table-cell; }
  .col-more { display: none; }
  tr.details { display: none; }
}
/* Desktop (owner, 2026-10-15-4, F1 A): the board as big as the window's height allows, the move
   line still in view below it, the results 26–40rem beside it; the page (and its header and
   footer) widens to fit, up to the screen. With the filters open the board shrinks only where
   board, results and sheet can't all fit. */
@media (min-width: 1024px) {
  body:has(.explorer) { --exb: min(calc(var(--vh) - 15rem), calc(var(--vw) - 2 * var(--gutter) - 1.75rem - 26rem)); }
  body:has(.explorer) .app { max-width: calc(var(--exb) + 1.75rem + 40rem); }
  body:has(.explorer) .bar, body:has(.explorer) footer { max-width: calc(var(--exb) + 1.75rem + 40rem + 2 * var(--gutter)); }
  /* The board column is the board's width, so a long breadcrumb scrolls instead of widening it. */
  .explorer { --ex-board: var(--exb); grid-template-columns: var(--ex-board) minmax(26rem, 40rem); align-items: start; }
  .ex-board-side { position: sticky; top: calc(var(--frame-t) + 1rem); }
  .ex-board { width: var(--ex-board); min-width: 0; }
  .path { flex-wrap: wrap; overflow: visible; }
  .col-perf, .child-name { display: table-cell; }
  .child-name { display: block; }
}
/* Phone on its side (owner, 2026-10-15-4, F2 C): the board the screen's full height, the controls
   in a column beside it, everything else in a column on the right. The page never scrolls (a
   scroll slides the browser's address bar, and a height that followed it made the board jump):
   the explorer scrolls inside a fixed height (svh: the height with the bar showing), the board and
   controls staying put. No site header here; turn the phone upright for the menu. */
@media (max-height: 500px) and (orientation: landscape) {
  body:has(.explorer) { height: 100svh; min-height: 0; overflow: hidden; }
  body:has(.explorer) footer { display: none; }
  body:has(.explorer) main { min-height: 0; overflow: hidden; padding: 0.4rem var(--gutter); display: flex; flex-direction: column; }
  body:has(.explorer) .app { flex: 1; min-height: 0; width: 100%; max-width: none; }
  /* The board and controls are fixed on the left; the explorer is one plain column beside them. */
  .explorer { --ex-board: calc(var(--svh) - 0.8rem); --ex-ctl: 48px; display: block; height: 100%; overflow-y: auto;
    overscroll-behavior: contain; padding-left: calc(var(--ex-board) + var(--ex-ctl) + 1rem); }
  .ex-board-side { display: contents; }
  .ex-board { position: fixed; top: 0.4rem; left: var(--gutter); width: var(--ex-board); min-width: 0; margin: 0; }
  .ex-controls { position: fixed; top: 0.4rem; left: calc(var(--gutter) + var(--ex-board) + 0.4rem); width: var(--ex-ctl);
    flex-direction: column; gap: 2px; }
  .ex-controls button.icon { min-width: 0; width: 100%; min-height: 0; height: calc((var(--ex-board) - 12px) / 7); padding: 0; }
  .ex-board-side > :not(.ex-board):not(.ex-controls), .ex-panel { margin-bottom: 0.3rem; }
  .ex-controls .phone-only { display: inline-flex; }
  .fen-entry { display: none; }
  .opening { min-height: 0; margin: 0; }
  .path { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; margin: 0; }
  .ex-tabs { display: flex; }
  .ex-moves.off, .ex-games.off { display: none; }
}

/* ---- Health panel (/admin/health; T-283 D-OPS.7, mock health-2026-12-01.html after
   correspondencechess's /admin): a verdict banner, Run live check, groups of cards made of rows,
   each state a pill with its word (Fine / Check / Problem). ---- */
.hl-chip { justify-self: start; font-family: var(--mono, ui-monospace, monospace); font-size: var(--fs-xs); padding: 2px 9px;
           border-radius: 999px; border: 1px solid var(--accent); background: var(--acc-soft); color: var(--accent); overflow-wrap: anywhere; }
.hl-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: var(--fs-xs);
           font-weight: var(--w-bold); border: 1px solid var(--line); background: var(--panel2); color: var(--dim); white-space: nowrap; }
.hl-pill.good { background: var(--gs-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.hl-pill.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); }
.hl-pill.crit { background: color-mix(in srgb, var(--error) 14%, var(--panel)); color: var(--error);
                border-color: color-mix(in srgb, var(--error) 45%, var(--line)); }
.hl-verdict { border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow);
              padding: var(--s4); display: grid; gap: var(--s3); }
.hl-verdict.good { background: color-mix(in srgb, var(--gs-soft) 55%, var(--panel)); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.hl-verdict.warn { background: color-mix(in srgb, var(--warn-soft) 55%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.hl-verdict.crit { background: color-mix(in srgb, var(--error) 12%, var(--panel)); border-color: color-mix(in srgb, var(--error) 50%, var(--line)); }
.hl-vtop { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.hl-vtitle { display: flex; align-items: center; gap: var(--s2); }
.hl-vtitle h2 { margin: 0; font-size: 1.0625rem; }
.hl-vdot { width: 10px; height: 10px; border-radius: 999px; flex: none; background: var(--dim); }
.hl-verdict.good .hl-vdot { background: var(--good); } .hl-verdict.warn .hl-vdot { background: var(--warn); }
.hl-verdict.crit .hl-vdot { background: var(--error); }
.hl-vsub { font-size: var(--fs-sm); color: var(--dim); margin-top: 2px; }
.hl-vact { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.hl-vact .k-btn { margin: 0; }
.hl-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.hl-reasons li { display: flex; gap: var(--s2); align-items: baseline; overflow-wrap: anywhere; }
.hl-reasons a { color: var(--ink); }
.hl-mail { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-control); padding: 7px 10px;
           font-size: var(--fs-xs); display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.hl-mono, .hl-ms { font-family: var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.hl-ms { font-size: var(--fs-xs); color: var(--dim); }
.hl-live { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow);
           padding: var(--s3) var(--s4); display: grid; gap: var(--s2); }
.hl-lhead { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.hl-group { display: grid; gap: var(--s2); }
.hl-ghead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
.hl-ghead h2 { margin: 0; font-size: var(--fs-xs); letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); }
.hl-ghead span { font-size: var(--fs-xs); color: var(--dim); }
.hl-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
:root:not([data-format=desk]) .hl-grid2 { grid-template-columns: minmax(0, 1fr); }
.hl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow);
           padding: var(--s3) var(--s4); display: grid; gap: var(--s2); align-content: start; min-width: 0; }
.hl-wide { grid-column: 1 / -1; }
.hl-chead { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-bottom: var(--s2);
            border-bottom: 1px solid var(--line); }
.hl-chead h3 { margin: 0; font-size: var(--fs-sm); font-weight: var(--w-bold); }
.hl-rows { display: grid; gap: 6px; }
.hl-rows:empty { display: none; }
.hl-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); padding: 6px 8px;
          border-radius: var(--r-control); background: var(--bg); }
.hl-row.warn { background: color-mix(in srgb, var(--warn-soft) 55%, var(--bg)); }
.hl-row.crit { background: color-mix(in srgb, var(--error) 11%, var(--bg)); }
.hl-rmain { display: grid; gap: 2px; min-width: 0; }
.hl-rname { font-size: var(--fs-sm); font-weight: var(--w-bold); overflow-wrap: anywhere; }
.hl-rmeta { font-size: var(--fs-xs); color: var(--dim); overflow-wrap: anywhere; }
.hl-rwhy { font-size: var(--fs-xs); color: var(--ink); overflow-wrap: anywhere; }
.hl-rright { display: flex; align-items: center; gap: 6px; flex: none; }
.hl-meter { height: 6px; border-radius: 999px; background: var(--panel2); overflow: hidden; margin-top: 4px; }
.hl-meter i { display: block; height: 100%; border-radius: 999px; background: var(--good); }
.hl-meter i.warn { background: var(--warn); } .hl-meter i.crit { background: var(--error); }
.hl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
:root:not([data-format=desk]) .hl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hl-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.hl-stat .l, .hl-stat .d { font-size: var(--fs-xs); color: var(--dim); }
.hl-stat .v { font-size: 1.125rem; font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.hl-spark { display: flex; align-items: flex-end; gap: 2px; height: 28px; margin-top: 4px; }
.hl-spark i { flex: 1; background: color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 1px; }
.hl-spark i:last-child { background: var(--accent); }
.hl-table-wrap { overflow-x: auto; }
.hl-table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.hl-table th, .hl-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hl-table th { color: var(--dim); font-weight: var(--w-bold); }
.hl-table tr.warn td { background: color-mix(in srgb, var(--warn-soft) 45%, transparent); }
.hl-table tr.crit td { background: color-mix(in srgb, var(--error) 10%, transparent); }
.hl-foot { margin: 0; font-size: var(--fs-xs); color: var(--dim); }
.hl-more { font-size: var(--fs-sm); }
.hl-more > summary, .hl-jobs summary { cursor: pointer; color: var(--dim); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.hl-inner { display: grid; gap: var(--s3); margin-top: var(--s2); }
.hl-sect h4 { margin: 0 0 0.35rem; font-size: var(--fs-sm); display: flex; justify-content: space-between; gap: 1rem; }
.hl-sect h3 { font-size: var(--fs-xs); color: var(--muted); margin: 0.6rem 0 0.3rem; }
.hl-level { font-weight: var(--w-bold); color: var(--strong); white-space: nowrap; }
.hl-level.hl-green { font-weight: var(--w-text); color: var(--muted); }
.hl-dl { margin: 0; display: grid; gap: 0.35rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.hl-dl div { display: grid; gap: 0 1rem; }
.hl-dl dt { color: var(--muted); }
.hl-dl dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.hl-cmd { user-select: all; }
.hl-jobs, .hl-runs { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.hl-runs { margin: 0.4rem 0 0.6rem 1rem; }
.hl-gfold > summary, .hl-where > summary { list-style: none; cursor: pointer; }
.hl-gfold > summary::-webkit-details-marker, .hl-where > summary::-webkit-details-marker { display: none; }
.hl-gfold:not([open]) > summary .hl-chead, .hl-where:not([open]) > summary .hl-chead { border-bottom: 0; padding-bottom: 0; }
.hl-gfold > summary h3::before, .hl-where > summary h3::before { content: "▸ "; color: var(--dim); }
.hl-gfold[open] > summary h3::before, .hl-where[open] > summary h3::before { content: "▾ "; }
.hl-gbody { display: grid; gap: var(--s3); margin-top: var(--s2); }
.hl-gbody .hl-card { box-shadow: none; }
@media (pointer: coarse) { .hl-more > summary, .hl-jobs summary, .hl-gfold > summary, .hl-where > summary { min-height: 44px; display: flex; align-items: center; } }
@media (min-width: 600px) { .hl-dl div { grid-template-columns: 11rem 1fr; } }
.adm-body:has(.hl-verdict) { display: grid; gap: var(--s4); }
/* Tabs inside Health (owner, 2026-12-01-8): a row that scrolls sideways on a phone; a dot on a tab
   that needs a look; the Overview's tiles open their tab. */
.hl-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); min-width: 0; }
.hl-tabs::-webkit-scrollbar { display: none; }
.hl-tabs button { flex: none; margin: 0 0 -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
                  min-height: 2.75rem; padding: 0 var(--s3); font: inherit; font-size: var(--fs-sm); font-weight: var(--w-bold);
                  color: var(--dim); cursor: pointer; }
.hl-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.hl-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hl-tdot { display: inline-block; width: 7px; height: 7px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.hl-tdot.warn { background: var(--warn); } .hl-tdot.crit { background: var(--error); }
.hl-overview { display: grid; gap: var(--s4); }
.hl-overview[hidden], .hl-group[hidden] { display: none; }
.hl-glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--s3); }
:root[data-format=phone] .hl-glance { grid-template-columns: minmax(0, 1fr); }
.hl-gl { width: 100%; max-width: none; min-height: 0; margin: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; background: var(--panel); border: 1px solid var(--line);
         border-radius: var(--r-panel); box-shadow: var(--shadow); padding: var(--s3); display: grid; gap: 6px; align-content: start; min-width: 0; }
.hl-gl:hover { background: var(--hover); }
.hl-gl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hl-gl.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.hl-gl.crit { border-color: color-mix(in srgb, var(--error) 50%, var(--line)); }
.hl-gltop { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.hl-gltop b { font-size: var(--fs-sm); }
/* The "Last 14 days" card (PANEL_WATCHES D-PW.5 B): plain SVG lines in text ink, a wash under them,
   hairline grid; the reference line (a Check level, a budget, the cores) dashed in the control edge. */
.hl-wide { grid-column: 1 / -1; }
.hc-grid { display: grid; gap: 1.25rem 1.5rem; margin-top: 0.75rem; }
.hc { margin: 0; min-width: 0; }
.hc figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 0.75rem;
  font-size: var(--fs-sm); letter-spacing: var(--ls-sm); margin-bottom: 0.35rem; }
.hc-title { color: var(--muted); }
.hc-val { color: var(--strong); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
.hc-plot { position: relative; height: 7rem; touch-action: pan-y; cursor: crosshair; border-radius: 2px; }
.hc-plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hc-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hc-plot .hc-rule { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hc-plot .hc-base { stroke: var(--control); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hc-plot .hc-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke; }
.hc-plot .hc-area { fill: var(--text); fill-opacity: 0.08; stroke: none; }
.hc-y { position: absolute; left: 0; font-size: var(--fs-xs); letter-spacing: var(--ls-xs); color: var(--muted);
  background: var(--surface); padding: 0 0.25rem 0 0; line-height: 1.2; pointer-events: none; }
.hc-y-top { top: 0; transform: translateY(-50%); }
.hc-ref { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--control); pointer-events: none; }
.hc-ref-label { position: absolute; right: 0; transform: translateY(-110%); font-size: var(--fs-xs);
  letter-spacing: var(--ls-xs); color: var(--muted); background: var(--surface); padding: 0 0 0 0.25rem;
  line-height: 1.2; pointer-events: none; }
.hc-ref-label.hc-below { transform: translateY(15%); }
.hc-cross { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--muted); pointer-events: none; }
.hc-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--strong); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.hc-x { display: flex; justify-content: space-between; font-size: var(--fs-xs); letter-spacing: var(--ls-xs);
  color: var(--muted); margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .hc-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .hc-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ---- The board (/board, WORKSPACE F1; BOARD_LAYOUT.md D-BL.2–4, D-BL.8) ----
   Wide (desktop, landscape tablet, phone on its side): the board left at the height the window
   allows, one column right: the tree (sized to its moves up to a third, or where the splitter
   left it), then the tool tabs. The page never scrolls; the tree and the pane scroll inside.
   Phone and portrait tablet: board, a strip of the line, then tabs (Moves · Explorer · Notes);
   the board bar replaces the site's bar and header (the site's links are under ☰). */
body:has(.ws) { height: 100dvh; min-height: 0; overflow: hidden; }
body:has(.ws) footer { display: none; }
body:has(.ws) main { min-height: 0; padding: 0.75rem var(--gutter); display: flex; }
.ws { flex: 1; min-height: 0; width: 100%; display: flex; gap: 1.25rem; justify-content: center; }
.ws-main { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.ws-board-wrap { position: relative; }
/* A phone's name strips over and under the board (owner, 2026-10-26-1). */
.ws-player { display: flex; align-items: center; gap: 0.45rem; margin: 0; padding: 0.15rem 0.2rem; min-width: 0; color: var(--strong); }
.ws-player-dot { flex: none; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--piece-black); border: 1px solid var(--control); }
.ws-player-dot.white { background: var(--piece-white); }
.ws-player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--w-bold); }
.ws-player-elo { flex: none; margin-left: auto; }
.ws-board { width: var(--bs); min-width: 0; }
.ws-controls { display: flex; align-items: center; gap: 0.25rem; }
.ws-typer { flex: 1; min-width: 5rem; width: auto; font-size: var(--fs-sm); padding: 0.4rem 0.5rem; }
.ws-picker { position: absolute; z-index: var(--z-sticky); left: 50%; top: 40%; transform: translate(-50%, -50%); display: grid; gap: 0.25rem;
  min-width: 12rem; padding: 0.5rem; background: var(--surface); border: 1px solid var(--control); border-radius: var(--r-panel);
  box-shadow: 0 8px 24px var(--shade); }
.ws-picker p { margin: 0 0.25rem; }
.ws-picker button { margin: 0; text-align: left; background: var(--surface); color: var(--strong); border: 1px solid var(--border); font-weight: var(--w-text); }
.ws-picker button.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); font-weight: var(--w-bold); }

.ws-side { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; min-height: 0; }
.ws-tree-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); display: flex;
  flex-direction: column; min-height: 4rem; max-height: 33%; flex: none; }
.ws-tree { position: relative; overflow-y: auto; padding: 0.4rem 0.6rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); line-height: 1.75; min-height: 0; flex: 1; }
.ws-tree p { margin: 0.2rem 0; }
.ws-tree .mv { cursor: pointer; color: var(--strong); padding: 0.05rem 0.2rem; border-radius: 4px; white-space: nowrap; }
@media (hover: hover) { .ws-tree .mv:hover { background: var(--hover); } }
.ws-tree .mv.cur { background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); }
.ws-tree .cm { color: var(--muted); overflow-wrap: anywhere; white-space: pre-line; }
.ws-tree .vline { margin: 0.1rem 0 0.15rem 0.6rem; padding-left: 0.5rem; border-left: 2px solid var(--border); }
.ws-tree .vline .mv, .ws-tree .var .mv { color: var(--text); }
.ws-tree .var { color: var(--muted); }
/* The main line apart (T-111): its moves bold, a side line's regular, one inside it muted and a
   step smaller; a comment you can tap shows a text cursor; the in-place comment editor. */
.ws-tree .ws-mainline > .mv { font-weight: var(--w-bold); color: var(--strong); }
.ws[data-layout] :is(.ws-tree .vline, .ws-tree .var, .ws-mt-var) .mv { font-weight: var(--w-text); }
.ws[data-layout] .ws-tree .var .mv { color: var(--muted); font-size: 0.95em; }
.ws[data-layout] :is(.ws-tree .vline, .ws-tree .var, .ws-mt-var) .mv.cur { color: var(--on-accent); }
.ws-tree .cm[role=button], .ws-mt-cm[role=button] { cursor: text; }
.ws-cm-edit { display: block; width: 100%; margin: 0.2rem 0 0.4rem; font-size: var(--fs-sm); line-height: 1.45; resize: vertical; }
.ws-result { font-weight: var(--w-bold); color: var(--strong); padding-left: 0.2rem; }
.ws-splitter { flex: none; height: 12px; margin: -4px 0; cursor: ns-resize; touch-action: none; border-radius: 4px;
  background: linear-gradient(var(--control), var(--control)) center / 40px 3px no-repeat; }
.ws-tabs { display: flex; flex: none; border-bottom: 1px solid var(--border); }
.ws-tabs button { margin: 0; background: none; color: var(--muted); border: 0; border-radius: 0; font-weight: var(--w-text);
  padding: 0.4rem 0.9rem; white-space: nowrap; }
@media (max-width: 420px) { .ws-tabs button { padding: 0.4rem 0.6rem; } }
@media (hover: hover) { .ws-tabs button:hover { color: var(--strong); } }
.ws-tabs button[aria-selected=true] { color: var(--strong); font-weight: var(--w-bold); box-shadow: inset 0 -2px 0 var(--accent); }
.ws-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 0.25rem 0.1rem; }
.ws-soon { margin: 0.6rem 0; }
.ws-pane.off, .ws-explorer.off, .ex-pane .off { display: none; }
.ex-pane { padding-top: 0.25rem; }
.ex-pane-openings { margin: 0.2rem 0 0.4rem; }
/* The explorer's Filters button sits in its summary row at every size (the page's own phone
   button lives in its controls, which the board doesn't have). */
.ex-pane .filter-summary > button { display: inline-block; }
/* A bookmark or a copy of a reference game on the board (D-LB.19–20): a slim bar under the title. */
.ws-refbar { margin: 0; padding: 0.3rem 0.6rem; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--r-control); background: var(--surface); color: var(--text); }
.ws-refbar-mark { color: var(--accent); }
/* A bookmark's bar (LIBRARY.md 4b): a line each for what it is, unsaved changes, its copy. */
div.ws-refbar { display: grid; gap: 0.2rem; }
div.ws-refbar p { margin: 0; }
.ws-refbar button.link { margin: 0; padding: 0; min-height: 0; }
/* A repertoire's tab (REPERTOIRE_R2.md D-R2.0): the bar says which, and how saving is. */
.ws-repbar p { display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.ws-repbar-state { margin-left: auto; }
/* R2 step 3: the mark on the tab and bar, the bar's question, the line under the board, the
   Repertoire side tab, the explorer's marks. */
.ws-rep-icon { flex: none; vertical-align: -2px; margin-right: 0.3rem; color: var(--accent); }
.ws-rep-ask { margin-top: 0.3rem; padding-top: 0.3rem; border-top: 1px solid var(--border); }
.ws-repbar .ws-rep-ask p { display: block; color: var(--text); }
.ws-rep-ask .ws-rep-acts { margin-top: 0.3rem; }
.ws-rep-line { margin: 0.3rem 0 0; color: var(--muted); }
.ws-rep-line.inside { color: var(--text); }
.ws-rep-pane.off { display: none; }
.ws-rep { padding: 0.5rem 0.1rem; }
.ws-rep p { margin: 0 0 0.4rem; color: var(--text); }
.ws-rep p.muted, .ws-rep .muted { color: var(--muted); }
.ws-rep h3 { margin: 0 0 0.3rem; font-size: var(--fs-sm); font-weight: var(--w-text); letter-spacing: var(--ls-sm); }
.ws-rep h3 strong { color: var(--strong); }
.ws-rep-here { margin-bottom: 0.8rem; }
.ws-rep-move { margin: 0; padding: 0; min-height: 0; }
.ws-rep-note { white-space: pre-line; color: var(--muted); }
.ws-rep-check { padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--raised); }
.ws-rep-check ul { list-style: none; margin: 0; padding: 0; }
.ws-rep-check li + li { margin-top: 0.6rem; }
.ws-rep-acts { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.ws-rep-acts button { margin: 0; }
.ws-rep-follow a { white-space: nowrap; }
/* R3 (REPERTOIRE_R3.md): At your level in the Repertoire side tab: the level and Online | Over
   the board, the replies table, a mistake's card, the gaps below, Widen · Deeper · Narrow. */
.lv { margin: 0.8rem 0; padding-top: 0.7rem; border-top: 1px solid var(--border); }
.lv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; margin-bottom: 0.5rem; }
.ws-rep .lv-title { margin: 0; font-size: var(--fs-md); font-weight: var(--w-bold); color: var(--strong); }
.lv-grow { flex: 1 1 0; }
.lv-head .pr-views { margin: 0; }
.lv-against { margin: -0.3rem 0 0.6rem; }
.lv-against button.link { margin: 0; padding: 0; min-height: 0; }
.lv-prepared { margin: 0.2rem 0 0.3rem; }
.lv-meter { display: block; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border); margin-bottom: 0.6rem; }
.lv-meter span { display: block; height: 100%; background: var(--muted); }
.lv-sub { margin: 0.5rem 0 0.2rem; font-weight: var(--w-bold); color: var(--strong); }
.lv-rows { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.lv-rows li { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; border-top: 1px solid var(--border); }
.lv-rows li.lv-card-item { display: block; border-top: 0; min-height: 0; }
.lv-rows .lv-move { min-width: 5rem; font-weight: var(--w-bold); color: var(--strong); }
.lv-rows button { margin: 0; }
.lv-rows button.lv-add { min-height: 32px; padding: 0.1rem 0.7rem; }
.lv-cross { margin: 0.6rem 0 0; }
.lv-cross button.link { margin: 0; padding: 0.15rem 0; min-height: 32px; text-align: left; }
.ws-tip { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0 0 0.7rem; padding: 0.55rem 0.8rem;
  border-radius: var(--r-panel); background: var(--raised); color: var(--text); }
.ws-tip-text { flex: 1 1 0; }
.ws-tip-text button.link { margin: 0; padding: 0; min-height: 0; }
.ws-tip > button { margin: 0; flex: none; min-height: 32px; padding: 0.1rem 0.8rem; }
.lv-card { padding: 0.5rem 0.7rem; border-radius: var(--r-panel); background: var(--raised); margin: 0 0 0.5rem; }
.lv-card p { margin: 0.25rem 0 0; }
.lv-card button { margin: 0.4rem 0.4rem 0 0; }
.lv-gaps h4 { margin: 0.4rem 0 0.2rem; font-weight: var(--w-bold); color: var(--strong); }
.lv-list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.lv-list button.link { margin: 0; padding: 0.15rem 0; min-height: 32px; text-align: left; }
.lv-actions, .lv-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.4rem 0; }
.lv-actions button, .lv-buttons button { margin: 0; }
.lv-panel { margin-top: 0.7rem; padding: 0.6rem 0.8rem; border: 1px solid var(--control); border-radius: var(--r-panel); background: var(--surface); }
.lv-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.lv-panel-head h4 { margin: 0; font-size: var(--fs-md); color: var(--strong); }
.lv-props { list-style: none; margin: 0.4rem 0; padding: 0; }
.lv-props li + li { border-top: 1px solid var(--border); }
.lv-prop { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0; cursor: pointer; }
.lv-prop input { width: 22px; height: 22px; margin: 0.1rem 0 0; flex: none; }
.lv-note { display: block; margin-top: 0.15rem; }
.rep-mark { display: inline-block; margin-left: 0.25rem; padding: 0 0.3rem; border-radius: var(--r-control); border: 1px solid var(--border);
  font-size: var(--fs-xs); letter-spacing: var(--ls-xs); color: var(--muted); line-height: 1.4; }
.rep-mark.yours { border-color: var(--accent); color: var(--accent); font-weight: var(--w-bold); }
/* A narrow table: the mark under the move, so the row doesn't widen. */
@media (max-width: 599px) { .moves-table .rep-mark { display: block; width: fit-content; margin: 0.1rem 0 0 0.3rem; } }
.ref-said button.link { margin: 0; padding: 0; min-height: 0; }
.ref-pick { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0.3rem 0 0; flex-wrap: wrap; }
.ref-pick select { margin: 0; }
.ws.phone .ws-refbar { align-self: stretch; margin: 0 var(--gutter); }
.ws-head-refs { margin-top: 0.35rem; }
.ws-preview-refs { margin-top: 0.4rem; }
.ws-notes p { margin: 0.3rem 0; }
.ws-notes .nags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.35rem 0; }
.ws-notes button.nag { margin: 0; min-width: 2.6rem; padding: 0.2rem 0.5rem; background: var(--surface); color: var(--strong);
  border: 1px solid var(--border); font-weight: var(--w-text); }
.ws-notes button.nag[aria-pressed=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: var(--w-bold); }
.ws-notes button.nag:disabled { opacity: 0.4; cursor: default; }
.ws-notes textarea { font-size: var(--fs-sm); resize: vertical; }
.ws-kept { margin: 0.3rem 0; }
.ws-menu > .ws-kept { margin: 0; }
.ws-line-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0; }
.ws-line-actions button { margin: 0; padding: 0.3rem 0.7rem; font-size: var(--fs-sm); font-weight: var(--w-text); }
.ws-line-actions button:disabled { opacity: 0.4; cursor: default; }
.ws-scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: transparent; }
.ws-line-menu { position: fixed; z-index: var(--z-sheet); width: 14rem; padding: 0.35rem; background: var(--surface); border: 1px solid var(--control);
  border-radius: var(--r-panel); box-shadow: 0 8px 24px var(--shade); }
.ws-line-menu .ws-line-actions { display: grid; margin: 0; }
.ws-line-menu { --lm-h: 30rem; max-height: calc(100dvh - 1rem); overflow-y: auto; }
/* The line menu's symbols (T-111): three rows of small buttons, not menu rows. */
.ws-line-nags { padding: 0.15rem 0 0.3rem; border-bottom: 1px solid var(--line); margin-bottom: 0.2rem; }
.ws-line-nags .nags { display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0.1rem 0; }
.ws .ws-line-menu .ws-line-nags button.nag.nag { min-width: 1.9rem; min-height: 1.9rem; width: auto; padding: 0 0.3rem; border: 0; border-top: 0;
  border-radius: var(--r-control); background: var(--panel2); font-size: var(--fs-sm); text-align: center; justify-content: center; font-weight: var(--w-bold); }
.ws .ws-line-menu .ws-line-nags button.nag.nag[aria-pressed=true] { background: var(--accent); color: var(--on-accent); }
.ws-line-menu button { text-align: left; border: 0; background: none; color: var(--strong); }
@media (hover: hover) { .ws-line-menu button:hover:not(:disabled) { background: var(--hover); } }
.ws-line-head { display: none; }
/* On a phone the line menu is a sheet (frame P11), over All moves when opened from there; on an
   iPad a card beside the move, titled, with Done (frame W7). On touch a long press shows no text
   selection or iOS callout. */
.ws[data-layout|=ipad] .ws-line-scrim { background: transparent; }
.ws[data-layout|=ipad] .ws-line-menu { --lm-w: 21rem; --lm-h: 27rem; width: var(--lm-w); padding: 0 var(--s3) var(--s2); border: 0; border-radius: var(--r-card); }
.ws[data-layout=phone] .ws-line-menu { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; z-index: var(--z-sheet3);
  padding: 0 var(--s3) calc(var(--s3) + env(safe-area-inset-bottom)); border: 0; border-radius: var(--r-card) var(--r-card) 0 0; box-shadow: var(--shadow); }
.ws:not([data-layout=desk]) .ws-line-scrim { z-index: var(--z-sheet2); background: var(--scrim-soft); }
.ws:not([data-layout=desk]) .ws-line-menu .ws-line-actions button { width: 100%; justify-content: flex-start; }
.ws-line-menu .k-done { background: var(--accent); color: var(--on-accent); }
.ws:not([data-layout=desk]) .ws-line-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) 0 var(--s2); border-bottom: 1px solid var(--line); }
.ws:not([data-layout=desk]) .ws-line-head b { flex: 1; font-size: var(--fs-md); }
.ws:not([data-layout=desk]) .ws-line-menu button:not(.k-done) { min-height: 3rem; border-top: 1px solid var(--line); border-radius: 0; font-size: var(--fs-md); }
.ws:not([data-layout=desk]) :is(.mv, .ws-ph-mv) { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* The ☰ / ⋯ sheet: from the bottom on a phone, a panel at the corner on wider screens. */
.ws-sheet { position: fixed; z-index: var(--z-sheet); left: 0; right: 0; bottom: 0; max-height: 85dvh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px var(--shade);
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .ws-sheet { left: auto; right: 1rem; bottom: 1rem; width: 26rem; border-radius: var(--r-panel); } }
.ws-menu-home { margin-left: auto; margin-right: 0.5rem; padding: 0.5rem 0.25rem; font-weight: var(--w-bold); }
.ws-menu { display: grid; gap: 0.9rem; padding-top: 0.6rem; }
.ws-menu-group { display: grid; gap: 0.35rem; }
.ws-menu-group > :is(button, a) { margin: 0; width: 100%; text-align: left; }
.ws-menu-group p { margin: 0; }
/* A panel focused as it opens (crate::modal) isn't outlined: focus is there for the keyboard's start. */
[role=dialog][tabindex="-1"]:focus { outline: none; }
.ws-menu-h { font-size: var(--fs-sm); letter-spacing: var(--ls-sm); font-weight: var(--w-bold); color: var(--muted); text-transform: uppercase; }
.ws-key { margin-left: auto; padding: 0 0.3rem; color: var(--muted); font-weight: var(--w-text); }
.ws-menu-group > button:has(.ws-key), .ws-menu-row button:has(.ws-key) { display: flex; align-items: center; gap: 0.6rem; }
@media (pointer: coarse) { .ws-key { display: none; } }
.ws-menu-group label.inline { margin: 0.2rem 0; }
.ws-menu-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ws-menu-row button { margin: 0; }
.ws-brushes { display: flex; gap: 0.5rem; }
.ws-brushes .swatch { margin: 0; min-height: 0; }
.ws-file-games { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.2rem; max-height: 12rem; overflow-y: auto; }
.ws-file-games button.link { text-align: left; min-height: 32px; }
.ws-file-games button[aria-current] { color: var(--strong); font-weight: var(--w-bold); text-decoration: none; opacity: 1; }
/* F13 step 5: the Paste sheet's "Review a recent game". */
.ws-recent { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--border); grid-template-columns: minmax(0, 1fr); }
.ws-recent-h { margin: 0; font-size: 1rem; }
.ws-recent-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
.ws-recent-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 36px; }
.ws-recent-who { min-width: 0; display: grid; }
.ws-recent-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-recent-list button.link { margin: 0; flex: none; min-height: 32px; }
.ws-recent-acct { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.ws-recent-acct button { margin: 0; }
.site-links a { padding: 0.45rem 0; color: var(--strong); }
.ws-paste { margin-top: 0.6rem; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: var(--fs-sm); letter-spacing: 0; }
.ws-sheet > .ws-menu-row, .k-sheet > .ws-menu-row { margin: 0.6rem 0; }
.ws-said { position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(var(--bottom-bar) + 1rem); transform: translateX(-50%);
  max-width: min(36rem, calc(var(--vw) - 2 * var(--gutter))); padding: 0.45rem 1rem; border-radius: var(--r-panel);
  background: var(--strong); color: var(--bg); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); box-shadow: 0 4px 12px var(--shade-deep); }
.ws-said.off { display: none; }
/* The preview board (D-BL.5 amended): the sheet, a small board, its own steps. */
.ws-preview .sheet-head h2 { font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.ws-preview-meta { margin: 0.4rem 0 0.3rem; }
.ws-preview-board { width: min(100%, 22rem, 42dvh); margin: 0 auto; }
.ws-preview-controls { justify-content: center; margin: 0.4rem 0; }
.ws-preview-ply { min-width: 6rem; text-align: center; }
.ws-preview-actions { justify-content: center; }
/* A game from a list: its neighbours (PgUp / PgDn). */
.ws-preview-list { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0 0 0.4rem; }
.ws-preview-list button { margin: 0; }
.ws-preview-actions .button { margin: 0; }
.ws-preview-actions a.button.secondary { background: var(--surface); color: var(--strong); border-color: var(--border); }
@media (hover: hover) { .ws-preview-actions a.button.secondary:hover { background: var(--hover); border-color: var(--control); } }

/* Wide: the board as big as the height allows, leaving the column at least 22rem. */
/* A reference-game banner above the board (refs.rs) takes its height off the board, so the move
   buttons stay on screen (owner, 2026-10-26-1): one line, or a bookmark's two or three. */
.ws.wide:has(p.ws-refbar) { --refbar: 2.4rem; }
.ws.wide:has(div.ws-refbar) { --refbar: 5rem; }
.ws.wide:has(.ws-refbar-unsaved) { --refbar: 6.8rem; }
/* 11rem (was 10): the move buttons ran 6px off a 961px-tall window (2026-11-02-3); 16px more. */
/* 25rem (was 22): the side column's engine line and tab row need it; a large iPad on its side (1366×1024) gave the board the height and left the column 22rem, too narrow (2026-11-07-4). */
.ws.wide { --bs: min(calc(var(--vh) - 11rem - var(--refbar, 0rem) - var(--under, 0rem)), calc(var(--vw) - 2 * var(--gutter) - 1.25rem - 25rem)); }
.ws.wide .ws-main { flex: none; width: var(--bs); }
.ws.wide .ws-side { flex: 0 1 40rem; }
body:has(.ws.wide) .bar { max-width: none; }
/* The side column's two groups (side.rs): the analysis's own, then the tools. One column
   unless docked out. */
.ws-side-a, .ws-side-b { display: contents; }
.ws-dock { flex: none; margin-left: 0.35rem; align-self: center; padding: 0.2rem 0.6rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); white-space: nowrap; color: var(--strong); }
/* Docked out (D-BL.2 variant 3, from 1280 px): [engine, tree, Notes] | [board] | [explorer:
   next moves over games, the preview inside]. The board gives up some width for the third
   column: at least 31rem, so the query row keeps its three pickers (under 30rem it folds to the
   phone's summary line). */
.ws.wide.docked { --bs: min(calc(var(--vh) - 12.5rem - var(--refbar, 0rem) - var(--under, 0rem)), calc(var(--vw) - 2 * var(--gutter) - 2.5rem - 16rem - 31rem)); }
.ws.docked .ws-side { display: contents; }
.ws.docked .ws-side-a, .ws.docked .ws-side-b { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; min-height: 0; }
.ws.docked .ws-side-a { order: -1; flex: 1 1 16rem; max-width: 28rem; }
.ws.docked .ws-side-b { flex: 1 1 31rem; max-width: 48rem; position: relative; }
/* The query row stays put while the moves and games scroll under it. */
.ws.docked .ex-query { position: sticky; top: 0; z-index: var(--z-page3); background: var(--bg); padding: 0.25rem 0 0.4rem; margin: -0.25rem 0 0.1rem; }
.ws.docked .ws-tree-box { flex: 1 1 auto; max-height: none; }
.ws-docked-notes { flex: 0 1 auto; max-height: 45%; overflow-y: auto; padding: 0.1rem 0.6rem 0.4rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
/* The narrow left column: the engine's head wraps rather than running out of it. */
.ws.docked .ws-eng-head, .ws.docked .ws-eng-sum { flex-wrap: wrap; row-gap: 0.1rem; }
.ws.docked .ws-eng-wdl { flex: 1 1 auto; white-space: normal; }
.ws-side-b > .ws-preview { position: absolute; top: 0; left: 0; right: 0; bottom: auto; width: auto; max-height: 100%; }
.ex-stack-h { margin: 1rem 0 0.4rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); font-weight: var(--w-bold); color: var(--strong); }

/* Phone and portrait tablet: the board bar at the foot (on a phone in place of the tabs). */
body:has(.ws.phone) { --bottom-bar: calc(52px + env(safe-area-inset-bottom)); }
body:has(.ws.phone:not(.ws-rp)), body:has(.ws.ws-rp.phone:not(.choosing)) { --bottom-bar: calc(4.25rem + env(safe-area-inset-bottom)); }
body:has(.ws.phone) main { padding: 0; }
.ws.phone { flex-direction: column; gap: 0.3rem; --bs: min(var(--vw), calc(var(--vh) - 15rem), 62dvh); }
.ws.phone .ws-main { align-items: center; gap: 0.2rem; }
.ws.phone .ws-side { flex: 1; padding: 0 var(--gutter); }
.ws.phone .ws-tabs { order: -1; }
.ws.phone .ws-tree-box { flex: 1; max-height: none; border: 0; background: none; }
.ws.phone .ws-tree { padding: 0.25rem 0; font-size: var(--fs-md); }
.ws-bbar { position: fixed; z-index: var(--z-bar3); left: var(--frame-l); right: 0; bottom: 0; display: flex; background: var(--raised);
  border-top: 1px solid var(--border); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.ws-bbar button { flex: 1; margin: 0; min-height: 52px; min-width: 44px; padding: 0; background: none; border: 0; border-radius: 0;
  color: var(--strong); display: inline-flex; align-items: center; justify-content: center; }
.ws.phone ~ .ws-said, .ws.phone .ws-said { bottom: calc(var(--bottom-bar) + 0.75rem); }
/* The phone's board (PHASE4_BOARD_PLAN §4): its own header, the line under the board, the bar of
   four (First, Back, a big Next, Tools) and Tools' switches. */
.ws-ph-head { align-self: stretch; display: flex; align-items: center; gap: var(--s1); min-height: 3.25rem; padding: 0 var(--s1); }
.ws-ph-title { flex: 1; min-width: 0; text-align: left; line-height: 1.2; }
.ws-ph-title > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-ph-title b { font-size: var(--fs-md); }
.ws-ph-tabs { margin: 0; min-width: 2.75rem; min-height: 2.75rem; padding: 0 var(--s2); border: 0; border-radius: var(--r-panel);
  background: var(--panel3); color: var(--ink); font-weight: var(--w-bold); }
.ws-ph-head .ws-save, .ws-ph-head .ws-rep-done { flex: none; }
.ws-ph-line { align-self: stretch; display: flex; flex-direction: column; gap: var(--s1); min-height: 0; overflow-y: auto; padding-bottom: var(--s2); }
.ws-ph-opening { margin: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-ph-strip { display: flex; align-items: center; justify-content: center; gap: var(--s1); overflow: hidden; white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, var(--ink) 8%, var(--ink) 92%, transparent); }
.ws-ph-mv { flex: none; margin: 0; min-height: 2.75rem; padding: 0 var(--s2); border: 0; border-radius: var(--r-control); background: none;
  color: var(--ink); font-weight: var(--w-bold); font-size: var(--fs-md); }
.ws-ph-mv.on { background: var(--accent); color: var(--on-accent); }
/* The explorer on a phone (frames P5, P6): the moves in view under a one-line query. The Moves ⇄
   Explorer switch is a segmented control; Next moves | Games are text tabs; the level views small;
   Browse openings after the results. */
.ws[data-layout=phone] .ws-tabs { margin: var(--s2) var(--s3) var(--s1); padding: 3px; gap: 2px; border: 0; border-radius: var(--r-control); background: var(--panel2); }
.ws[data-layout=phone] .ws-tabs button[role=tab] { flex: 1; min-height: 2.25rem; border-radius: calc(var(--r-control) - 2px); font-weight: var(--w-bold); }
.ws[data-layout=phone] .ws-tabs button[aria-selected=true] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.ws[data-layout=phone] .ws-tabs .ws-search-slot:not(:has(.ws-search-wrap.open)) { display: none; }
.ws[data-layout=phone] .ex-pane { display: flex; flex-direction: column; }
.ws[data-layout=phone] .ex-pane > .ex-pane-openings, .ws[data-layout=phone] .ex-pane > #ex-openings { order: 5; }
.ws[data-layout=phone] .ex-query { margin-bottom: var(--s1); }
.ws[data-layout=phone] .ex-query .qsum { padding: 0.3rem 0.5rem; border: 0; background: none; box-shadow: none; }
.ws[data-layout=phone] .ex-result { display: flex; gap: var(--s4); margin: 0 0 var(--s1); padding: 0; background: none; }
.ws[data-layout=phone] .ex-result button.chip { padding: var(--s1) 0; border-radius: 0; background: none; box-shadow: none; }
.ws[data-layout=phone] .ex-result button.chip[aria-pressed=true] { color: var(--ink); font-weight: var(--w-bold); box-shadow: inset 0 -2px 0 var(--accent); }
.ws[data-layout=phone] .pr-views { margin-bottom: var(--s1); }
.ws[data-layout=phone] .pr-views button.chip { padding: 0.15rem 0.6rem; }
/* A game still coming (§2.11, frame P3): the board greyed, a spinner and where it comes from. */
.ws.loading .ws-board-wrap { opacity: 0.35; filter: grayscale(1); }
.ws-loading { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); }
.ws-spin { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 3px solid var(--panel3); border-top-color: var(--accent); animation: ws-spin 1s linear infinite; }
@keyframes ws-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ws-spin { animation: none; } }
.ws-ph-more { flex: none; margin: 0; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0;
  border-radius: var(--r-control); background: var(--panel2); color: var(--ink); }
.ws-ph-more .ic { width: 1.1rem; height: 1.1rem; }
/* The variations bar at a fork (PA.2 B, frame P17). */
.ws-ph-forks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); padding: 0 var(--s3); }
.ws-ph-forks button { margin: 0; min-height: 2.25rem; padding: 0 var(--s3); border: 0; border-radius: var(--r-control);
  background: var(--panel2); color: var(--ink); font-weight: var(--w-bold); }
.ws-ph-forks button.main { background: var(--accent); color: var(--on-accent); }
/* All moves in two columns (frame P10). */
.ws-mt { padding: 0 var(--s3) var(--s3); font-size: var(--fs-md); }
.ws-mt-row { display: grid; grid-template-columns: 2.5rem 1fr 1fr 2.5rem; align-items: center; min-height: 2.5rem; border-top: 1px solid var(--line); }
.ws-mt-row:first-child { border-top: 0; }
.ws-mt-row .n { color: var(--dim); text-align: right; padding-right: var(--s2); font-variant-numeric: tabular-nums; }
.ws-mt-row .c { justify-self: start; }
.ws-mt-row .mv { cursor: pointer; padding: 0.3rem 0.5rem; border-radius: var(--r-control); font-weight: var(--w-bold); white-space: nowrap; }
.ws-mt-row .mv.cur { background: var(--accent); color: var(--on-accent); }
.ws-mt-row .m { justify-self: end; }
.ws-mt-cm { display: block; white-space: pre-line; margin: 0 0 var(--s2) 2.5rem; color: var(--dim); font-size: var(--fs-sm); line-height: 1.45; }
.ws-mt-var.ws-tree { margin: 0 0 var(--s2) 2.5rem; padding: var(--s1) var(--s2); border-left: 3px solid var(--panel3); overflow: visible; font-size: var(--fs-sm); }
.ws-mt-res { margin: var(--s2) 0 0 2.5rem; font-weight: var(--w-bold); }
.ws-ph-comment { margin: 0; padding: var(--s2) var(--s3); border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow);
  font-size: var(--fs-sm); line-height: 1.45; }
.ws-ph-comment .by { display: block; margin-bottom: 0.1rem; }
/* The save word (D-BI.4, frames P1, P18): Saved / Saving… / Not saved in red; a tap opens the save sheet. */
.ws-saveword { flex: none; margin: 0; display: inline-flex; align-items: center; gap: 0.25rem; min-height: 2.75rem; padding: 0 var(--s2);
  border: 0; border-radius: var(--r-control); background: none; color: var(--dim); font-size: var(--fs-sm); white-space: nowrap; }
.ws-saveword .ic { width: 1rem; height: 1rem; }
.ws-saveword.bad { color: var(--error); font-weight: var(--w-bold); background: color-mix(in srgb, var(--error) 14%, transparent); }
/* Tools' rows with a line under them (frame P8), Game info (P13), Rename in the tab list (P12). */
.ws-menu button.secondary > small, .ws-menu .tx > small { display: block; font-weight: var(--w-text); color: var(--dim); font-size: var(--fs-sm); }
/* Touch sheets as rows (frames P8, P12, W5): an icon, the words with a line under them, a switch
   at the row's end; the groups' names small and spaced. Desktop's ⋯ sheet keeps its buttons until
   step D's desktop slice cuts it (D-BI.2). */
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu { gap: var(--s2); }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu-group { gap: 0; }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu-group > :is(button.secondary, a),
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu-row > button.secondary {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--s3); width: 100%; min-height: 3rem; margin: 0;
  padding: var(--s1) 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none;
  color: var(--ink); font-weight: var(--w-text); font-size: var(--fs-md); text-align: left; text-decoration: none; }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu-h + :is(button, a, span) { border-top: 0; }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu-row { flex-wrap: nowrap; gap: var(--s3); border-top: 1px solid var(--line); }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu-row > button.secondary { flex: 1; border-top: 0; }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu :is(button, a) > .ic { flex: none; width: 1.25rem; height: 1.25rem; color: var(--dim); }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu .tx { flex: 1; min-width: 0; }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-menu-h { margin-top: var(--s2); font-size: var(--fs-xs, 0.72rem); letter-spacing: 0.06em; }
.ws:not([data-layout=desk]) :is(.ws-sheet, .ws-rp-tools) .ws-switch .ws-knob { margin-left: auto; }
/* "Done" in words at a sheet's head (D-AR.23). */
.k-done { flex: none; margin: 0; min-height: 2.25rem; padding: 0 var(--s3); border: 0; border-radius: var(--r-control);
  background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); }
.ws-info { display: flex; flex-direction: column; gap: 0; padding: 0 var(--s3) var(--s3); }
.ws-info-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s2); align-items: baseline; padding: var(--s2) 0; border-top: 1px solid var(--line); }
.ws-info-row:first-child { border-top: 0; }
.ws-info-ref { padding: var(--s2) 0; border-top: 1px solid var(--line); }
.ws-info > button { margin-top: var(--s3); }
.ws-ph-engset .ws-eng-done { display: none; }
.ws-ph-engset .ws-eng-settings { padding: 0 var(--s3) var(--s3); }
.ws-rename { display: flex; gap: var(--s2); margin: var(--s2) 0; }
.ws-rename input { flex: 1; min-width: 0; }
.ws-save-why { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-card); background: var(--panel2); line-height: 1.45; }
.ws.phone .ws-player-elo { margin-left: 0; }
.ws.phone .ws-tabs.solo:not(:has(.ws-search-wrap.open)) { display: none; }
.ws[data-layout=phone] .ws-tabs .ws-search-icon { display: none; }
.ws-ph-bar { display: flex; gap: var(--s2); background: var(--rail); border-top: 0;
  padding: var(--s2) calc(var(--s3) + env(safe-area-inset-right)) calc(var(--s2) + env(safe-area-inset-bottom)) calc(var(--s3) + env(safe-area-inset-left)); }
.ws-ph-bar button { position: relative; min-height: 3.25rem; border-radius: var(--r-panel); background: var(--panel3); gap: var(--s1); font-weight: var(--w-bold); }
.ws-ph-bar button:disabled { opacity: 0.45; }
.ws-ph-bar button.main { background: var(--accent); color: var(--on-accent); }
.ws-ph-bar button.tools { flex: 1.3; }
.ws-ph-bar button.next { flex: 1.6; }
.ws-ph-bar .ic { width: 1.5rem; height: 1.5rem; }
.ws-ph-dot { position: absolute; top: var(--s2); right: var(--s2); width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
.ws-switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); text-align: left; }
.ws-switch small { display: block; color: var(--dim); font-weight: var(--w-text); }
.ws-knob { flex: none; position: relative; width: 2.75rem; height: 1.6rem; border-radius: 999px; background: var(--panel3); }
.ws-knob::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--panel); box-shadow: var(--shadow); }
.ws-switch[aria-checked=true] .ws-knob { background: var(--accent); }
.ws-switch[aria-checked=true] .ws-knob::after { left: 1.35rem; }
.ws-ph-moves .ws-tree { padding: var(--s2) var(--s3); font-size: var(--fs-md); }
/* An iPad (PHASE4_BOARD_PLAN §5, D-AR.23 iPad). On its side: the board by the height with the
   names over and under it, and one column (about 36%) of the game's header, the segments, the
   pane and the big step buttons at its foot. Upright: the phone's stack, larger, with the
   segments under the board. */
.ws[data-layout=ipad-wide] { --bs: min(calc(var(--vh) - 4.5rem - var(--refbar, 0rem) - var(--under, 0rem)), calc(var(--vw) * 0.64 - 2 * var(--gutter) - 3rem)); align-items: stretch; }
.ws[data-layout=ipad-wide] .ws-side { flex: 1 1 auto; height: calc(var(--vh) - 1rem); overflow: hidden; }
.ws[data-layout=ipad-wide] .ws-ph-head { order: -3; padding: 0 0 var(--s2); }
.ws[data-layout=ipad-wide] .ws-tabs { order: -1; }
.ws[data-layout=ipad-wide] .ws-tree-box { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
.ws[data-layout=ipad-wide] .ws-pane:not(.off) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ws-ph-bar.in-column { position: static; margin-top: auto; padding: var(--s2) 0 0; background: none; }
.ws-ph-bar.in-column button { flex: 1; display: inline-flex; align-items: center; justify-content: center; margin: 0; min-height: 3.25rem; padding: 0; border: 0; color: var(--strong); }
.ws-ph-bar.in-column button.main { color: var(--on-accent); }
.ws[data-layout=ipad-tall] .ws-tree { font-size: var(--fs-md); }
/* The iPad's look (phase 4 D, iPad slice; frames W1-W10, U2, U5-U8). The header: the players, the
   event and place, the opening; the save word, the tab count and Game info at its end. */
.ws-ph-head.ipad { align-items: flex-start; min-height: 0; padding: 0 0 var(--s2); gap: var(--s2); }
.ws-ph-head.ipad .ws-ph-title b { font-size: var(--fs-lg, 1.125rem); }
.ws-ph-head.ipad .ws-ph-op b { font-weight: var(--w-bold); color: var(--ink); }
.ws-ph-head.ipad .ws-save { padding-top: 0.15rem; }
.ws-ph-head.ipad .ws-ph-tabs { min-width: 2rem; min-height: 1.85rem; padding: 0 var(--s2); border: 1.5px solid var(--ink); background: none; border-radius: var(--r-control); font-size: var(--fs-sm); }
.ws-ph-head.ipad .ws-ph-info { min-width: 2rem; min-height: 2rem; }
.ws-ph-head.ipad .ws-ph-info .ic { width: 1.25rem; height: 1.25rem; }
/* The segments as one control (as the phone's), search at its end. */
.ws[data-layout|=ipad] .ws-tabs { margin: 0 0 var(--s2); padding: 3px; gap: 2px; border: 0; border-radius: var(--r-control); background: var(--panel2); overflow: visible; }
.ws[data-layout|=ipad] .ws-tabs button[role=tab] { flex: 1 1 0; min-width: 0; min-height: 2.4rem; padding-inline: var(--s1); border-radius: calc(var(--r-control) - 2px); font-weight: var(--w-bold); font-size: var(--fs-sm); box-shadow: none; }
.ws[data-layout|=ipad] .ws-tabs button[aria-selected=true] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.ws[data-layout|=ipad] .ws-tabs .ws-search-icon { display: inline-flex; }
/* The pane a card: the moves with their comments as cards and ⋯ by the current move. */
.ws[data-layout|=ipad] .ws-tree-box, .ws[data-layout|=ipad] .ws-pane:not(.off) { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.ws[data-layout|=ipad] .ws-pane:not(.off) { padding: var(--s2) var(--s3); }
.ws[data-layout|=ipad] .ws-tree { padding: var(--s2) var(--s3); font-size: var(--fs-md); line-height: 2; }
.ws[data-layout|=ipad] .ws-tree .mv { font-weight: var(--w-bold); }
.ws[data-layout|=ipad] .ws-tree .cm { display: block; margin: var(--s1) 0; padding: var(--s2) var(--s3); border-radius: var(--r-control); background: var(--panel2); color: var(--text); line-height: 1.45; font-size: var(--fs-sm); }
.ws-mv-more { margin: 0 0.15rem; padding: 0 0.45rem; min-height: 1.6rem; border: 0; border-radius: var(--r-control); background: var(--panel3); color: var(--ink); font-weight: var(--w-bold); line-height: 1; vertical-align: middle; }
/* Upright: the header over everything, the board smaller by default with ⤢ beside it (PA.3 B,
   frame U2), the segments and the pane in the room left, the bar at the foot. */
.ws.phone[data-layout=ipad-tall], .ws.phone[data-layout=ipad-tall]:has(.ws-engine) { --bs-full: min(calc(var(--vw) - 2 * var(--gutter)), calc(var(--vh) - 22rem)); --bs: calc(var(--bs-full) * 0.7); }
.ws.phone[data-layout=ipad-tall].big, .ws.phone[data-layout=ipad-tall].big:has(.ws-engine) { --bs: var(--bs-full); }
.ws[data-layout=ipad-tall] .ws-main { align-items: center; }
.ws[data-layout=ipad-tall] .ws-ph-head { align-self: stretch; padding: var(--s2) var(--gutter) var(--s2); }
.ws[data-layout=ipad-tall]:not(.big) .ws-board-wrap { padding-right: 3.25rem; }
.ws[data-layout=ipad-tall].big .ws-size { top: -0.25rem; min-width: 2rem; min-height: 2rem; background: none; }
.ws-size { position: absolute; top: 1.75rem; right: 0; min-width: 2.5rem; min-height: 2.5rem; border-radius: var(--r-control); background: var(--panel2); }
.ws-size .ic { width: 1.25rem; height: 1.25rem; }
.ws.phone[data-layout=ipad-tall] { height: calc(var(--vh) - var(--bottom-bar)); min-height: 0; }
.ws.phone[data-layout=ipad-tall] .ws-side { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; padding: var(--s1) var(--gutter) var(--s2); }
.ws[data-layout=ipad-tall] .ws-tree-box, .ws[data-layout=ipad-tall] .ws-pane:not(.off) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* A phone on its side: no header, the board the full height. */
@media (max-height: 500px) and (orientation: landscape) {
  body:has(.ws.wide) main { padding: 0.4rem var(--gutter); }
  .ws.wide { --bs: calc(var(--vh) - 4.2rem); }
  .ws-controls .ws-typer { display: none; }
  .ws-controls { justify-content: space-between; }
  /* The column (engine, a game's header, the moves, the tools) can be taller than the screen:
     it scrolls as one, the tool pane keeping a few lines (F-ph1). */
  .ws.wide .ws-side { overflow-y: auto; }
  .ws.wide .ws-side > * { flex-shrink: 0; }
  .ws.wide .ws-pane { flex: 1 0 12rem; }
}
/* Typed moves sit under the board where there's room, and in the menu where there isn't. */
.ws-menu-typer { display: flex; }
.ws.wide .ws-menu-typer { display: none; }
@media (max-height: 500px) and (orientation: landscape) { .ws.wide .ws-menu-typer { display: flex; } }
/* A game's tab (D-BL.5 A): its header at the top of the column; on a phone, over the board. */
.ws-game-head { margin: 0 0 0.5rem; padding: 0.5rem 0.7rem; }
.ws-game-head .game-actions { margin-top: 0.35rem; }
.ws-head-pop { position: absolute; z-index: var(--z-sticky2); top: 0; left: var(--gutter); right: var(--gutter); box-shadow: 0 4px 16px var(--shade); }
.ws-head-pop .ws-game-head { margin: 0; }
/* Phone: the players come first and open the header; the opening name takes what's left. */
/* The desktop's board (desk.rs; frames D1, D5, D6 inventoried in PHASE4_BOARD_PLAN "D-desktop,
   redone"): the tab row on its own band across the frame, then the board and the column; the
   column: the header, the engine card while on, the moves card, the steps, the tool pane card. */
.ws[data-layout=desk]:not(.docked) { display: grid; grid-template-columns: var(--bs) minmax(25rem, 1fr); grid-template-rows: auto minmax(0, 1fr);
  column-gap: 1.75rem; row-gap: 0.75rem; justify-content: stretch; padding-left: 3.75rem; }
.ws[data-layout=desk]:not(.docked) > .ws-tabrow { grid-column: 1 / -1; grid-row: 1; }
.ws[data-layout=desk]:not(.docked) > .ws-main { grid-column: 1; grid-row: 2; min-height: 0; }
.ws[data-layout=desk]:not(.docked) > .ws-side { grid-column: 2; grid-row: 2; min-height: 0; overflow: hidden; gap: 0.5rem; }
/* Docked out (X, frame D8): board | [header, moves, steps, Notes] | the explorer at 25rem, under the
   tab row (side.rs: the column's halves). */
.ws[data-layout=desk].docked { display: grid; grid-template-columns: var(--bs) minmax(18rem, 1fr) 25rem;
  grid-template-rows: auto minmax(0, 1fr); column-gap: 1rem; row-gap: 0.75rem; padding-left: 3.75rem; }
.ws[data-layout=desk].docked > .ws-tabrow { grid-column: 1 / -1; grid-row: 1; }
.ws[data-layout=desk].docked > .ws-main { grid-column: 1; grid-row: 2; min-height: 0; }
.ws[data-layout=desk].docked > .ws-side { display: contents; }
.ws[data-layout=desk].docked .ws-side-a { grid-column: 2; grid-row: 2; max-width: none; min-height: 0; display: flex; flex-direction: column; gap: 0.5rem; overflow: hidden; }
.ws[data-layout=desk].docked .ws-side-b { grid-column: 3; grid-row: 2; max-width: none; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.ws[data-layout=desk].docked .ws-side-b .ws-pane { flex: 1 1 0; min-height: 0; overflow: auto; padding: 0.4rem 0.75rem; }
.ws[data-layout=desk].docked .ws-tree-box { flex: 1 1 0; min-height: 6rem; max-height: none; }
.ws[data-layout=desk].docked .ws-dtyped { display: none; }
.ws[data-layout=desk].docked .ws-docked-notes { flex: 0 0 15.6rem; min-height: 0; overflow: auto; padding: 0 0.75rem 0.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.ws[data-layout=desk].docked .ws-docked-notes::before { content: "Notes"; display: block; margin: 0 -0.75rem 0.4rem; padding: 0.45rem 0.75rem 0.4rem;
  border-bottom: 1px solid var(--border); font-weight: var(--w-bold); font-size: var(--fs-sm); color: var(--strong); box-shadow: inset 0 -2px 0 var(--accent); width: fit-content; }
/* The explorer's column is narrow (D8): no Avg or Perf; the summary's chooser shortened to ▸; the
   header keeps its result in view (the ratings go). */
.ws[data-layout=desk].docked .ws-side-b :is(.col-avg, .col-perf) { display: none; }
.ws[data-layout=desk].docked .ex-query .qsum > span:last-child::before { content: ""; }
.ws[data-layout=desk].docked .ws-dh-l1 .muted { display: none; }
.ws[data-layout=desk].docked .ws-docked-notes .nags { flex-wrap: wrap; }
.ws[data-layout=desk].docked .ws-tabs::after { content: "docked · X puts it back"; margin-left: auto; padding-right: 0.5rem; font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
/* The board as big as the height allows (D1: ~734 px at 900): menu bar, padding, tab row, names. */
/* --bscale: the drag handle's share of that (D-BL.2; desk.rs SizeGrip), 1 until dragged. */
.ws.wide[data-layout=desk] { --bs: calc(min(calc(var(--vh) - 8.6rem - var(--refbar, 0rem) - var(--under, 0rem)), calc(var(--vw) - 2 * var(--gutter) - 5.5rem - 25rem)) * var(--bscale, 1)); }
.ws.wide[data-layout=desk].docked { --bs: calc(min(calc(var(--vh) - 8.6rem - var(--refbar, 0rem) - var(--under, 0rem)), calc(var(--vw) - 2 * var(--gutter) - 5.75rem - 18rem - 25rem)) * var(--bscale, 1)); }
/* The handle: a corner grip just outside the board's bottom right, visible on hover. */
.ws[data-layout=desk] .ws-board { position: relative; }
.ws-grip { position: absolute; right: -14px; bottom: -14px; width: 18px; height: 18px; z-index: var(--z-page); cursor: nwse-resize; touch-action: none;
  border-right: 3px solid var(--control); border-bottom: 3px solid var(--control); border-radius: 0 0 4px 0; opacity: 0.45; }
.ws-grip:hover, .ws-grip:active { opacity: 1; border-color: var(--accent); }
/* Side bar and menus hidden (., frame D14): the tab row goes too, the board takes the height, and
   a hint at the foot says how to get them back. */
:root[data-focus] .ws-tabrow { display: none; }
:root[data-focus] .ws.wide[data-layout=desk] { --bs: calc(min(calc(var(--vh) - 6.5rem - var(--refbar, 0rem) - var(--under, 0rem)), calc(var(--vw) - 2 * var(--gutter) - 5.5rem - 25rem)) * var(--bscale, 1)); grid-template-rows: 0 minmax(0, 1fr); }
.ws-bare-hint { display: none; }
:root[data-focus] .ws-bare-hint { display: block; position: fixed; z-index: var(--z-sticky2); left: 50%; bottom: 0.6rem; transform: translateX(-50%); margin: 0;
  padding: 0.25rem 0.65rem; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); box-shadow: 0 1px 3px var(--shade);
  font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
:root[data-focus] .ws-bare-hint::before { content: "Side bar and menus hidden · . or Esc brings them back"; }
.ws.wide[data-layout=desk]:has(div.ws-repbar) { --refbar: 2.6rem; }
.ws[data-layout=desk] .ws-main { gap: 0.3rem; }
.ws[data-layout=desk] .ws-player { padding: 0; min-height: 1.6rem; }
.ws[data-layout=desk] .ws-player-elo { margin-left: 0.15rem; color: var(--muted); font-weight: var(--w-text); }
/* The eval bar: 14 px beside the board; the score over it while the engine is on (D5). */
.ws.wide[data-layout=desk] .ws-evalbar { left: -38px; top: 1.9rem; bottom: 1.9rem; width: 14px; border-radius: 4px; overflow: visible; }
.ws.wide[data-layout=desk] .ws-evalbar.none { background: none; border-color: transparent; }
.ws.wide[data-layout=desk] .ws-evalbar[data-score]::before { content: attr(data-score); position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px); padding: 1px 6px; border-radius: 6px;
  background: var(--surface); box-shadow: 0 1px 3px var(--shade); font-weight: var(--w-bold); font-size: 0.78rem; font-family: "IBM Plex Mono", monospace; color: var(--strong); white-space: nowrap; }
/* The tab row: a band of its own; flat tabs, the open one the page's colour; no + (File, Alt+N, ▾). */
.ws-tabrow { display: flex; align-items: flex-end; gap: 0.5rem; min-width: 0; margin: -0.75rem calc(-1 * var(--gutter)) 0 -3.75rem; padding: 0.4rem var(--gutter) 0 0.75rem;
  background: var(--panel2); }
.ws-tabrow-sp { flex: 1; }
.ws-tabrow .ws-saveword { min-height: 2rem; align-self: center; background: none; color: var(--muted); font-size: var(--fs-sm); }
.ws-tabrow .ws-saveword.bad { color: var(--error); }
.ws-tabrow .ws-rep-done { flex: none; align-self: center; }
.ws-tabrow .ws-tab-new { display: none; }
.ws-tabrow .ws-tab { border: 0; background: none; flex-basis: auto; max-width: 18rem; }
.ws-tabrow .ws-tab.on { background: var(--bg); box-shadow: none; }
.ws-tabrow .ws-tab-btn { padding: 0.45rem 0.4rem 0.45rem 0.8rem; }
.ws-tabrow .ws-tab-more { background: none; border: 0; color: var(--muted); }
/* The header (D1): two lines, result and Game info… at the right. */
.ws-dhead { flex: none; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; line-height: 1.35; }
.ws-dhead p { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 0.4rem; }
.ws-dh-l1 { color: var(--strong); }
.ws-dh-l1 .muted { font-size: var(--fs-sm); }
.ws-dh-res { margin-left: auto; }
.ws-dh-l2 { font-size: var(--fs-sm); color: var(--muted); }
.ws-dh-ev, .ws-dh-op { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws-dh-ev:not(:empty) + .ws-dh-op::before { content: "· "; }
.ws-dh-op b { color: var(--strong); }
.ws-dh-info { flex: none; margin: 0 0 0 auto; padding: 0; min-height: 0; background: none; border: 0; color: var(--accent); font-weight: var(--w-bold); font-size: var(--fs-sm); }
/* The moves (D1): a card filling the spare height; bold moves, comments as grey cards (as iPad). */
.ws[data-layout=desk] .ws-tree-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.ws[data-layout=desk] .ws-tree { padding: 0.5rem 0.75rem; font-size: 0.875rem; line-height: 1.85; }
.ws[data-layout=desk] .ws-tree .mv { font-weight: var(--w-bold); }
.ws[data-layout=desk] .ws-tree .cm { display: block; margin: 0.2rem 0 0.4rem; padding: 0.4rem 0.65rem; border-radius: var(--r-control); background: var(--panel2); color: var(--text); line-height: 1.45; font-size: var(--fs-sm); }
/* The moves take what they need, up to a third of the column, and scroll inside; the tool pane
   below takes the rest, so the explorer and Notes stay on a laptop's screen (owner, 2026-11-09).
   The splitter sets the moves' height (side.rs, MOVES_KEY). */
.ws[data-layout=desk]:not(.docked) .ws-tree-box { flex: 0 1 auto; min-height: 4.5rem; max-height: 33%; }
/* The steps (D3/D4): four 40 x 32 buttons and the typed box with its key. */
.ws-dfoot { flex: none; display: flex; align-items: center; gap: 0.4rem; }
.ws-dfoot .k-icon-btn { flex: none; width: 2.5rem; min-width: 0; height: 2rem; min-height: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); }
.ws-dfoot .k-icon-btn:disabled { opacity: 0.45; }
.ws-dtyped { flex: 1; min-width: 5rem; position: relative; display: flex; }
.ws-dtyped .ws-typer { flex: 1; min-width: 0; height: 2rem; margin: 0; padding: 0 2.2rem 0 0.65rem; font-size: var(--fs-sm); }
.ws-dtyped::after { content: "T"; position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 0.75rem "IBM Plex Mono", monospace; padding: 0 0.3rem; border: 1px solid var(--control); border-radius: var(--r-control); color: var(--muted); }
/* The tool pane (D1): a card; Explorer · Notes and the hint; search lives in the menu bar. */
.ws[data-layout=desk]:not(.docked) .ws-side-b { display: flex; flex-direction: column; min-height: 10rem; flex: 1 1 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.ws[data-layout=desk]:not(.docked) .ws-pane { flex: 1 1 0; min-height: 0; overflow: auto; padding: 0.4rem 0.75rem; }
.ws[data-layout=desk] .ws-tabs { padding: 0 0.25rem; }
.ws[data-layout=desk] .ws-search-slot { display: none; }
/* The splitter and X, said (drawn by CSS: no code on the first load). */
.ws[data-layout=desk]:not(.docked) .ws-tabs::after { content: "drag the bar above to resize"; margin-left: auto; padding-right: 0.5rem; font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1280px) and (min-height: 600px) { .ws[data-layout=desk]:not(.docked) .ws-tabs::after { content: "drag the bar above to resize · X docks the explorer"; } }
/* The explorer (D1, D6): the one-line summary of Where · What · Filters, opening them; the result
   switch as underlined tabs. */
.ws[data-layout=desk] .ex-query .qsum { display: flex; align-items: center; gap: 0.5rem; width: 100%; margin: 0; padding: 0.45rem 0.1rem; text-align: left;
  background: none; color: var(--muted); border: 0; border-bottom: 1px solid var(--border); border-radius: 0; font-size: var(--fs-sm); font-weight: var(--w-text); }
.ws[data-layout=desk] .ex-query .qsum .grow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws[data-layout=desk] .ex-query .qsum > span:last-child::before { content: "Where · What · Filters "; }
.ws[data-layout=desk] .ex-query > .qrow, .ws[data-layout=desk] .ex-query > .filter-summary, .ws[data-layout=desk] .ex-query ~ .filter-summary { display: none; }
.ws[data-layout=desk] .qsheet { left: auto; right: 1.5rem; top: 9rem; bottom: auto; width: 26rem; max-height: 70vh; border: 1px solid var(--border); border-radius: var(--r-card); padding: 0.8rem; }
.ws[data-layout=desk] .ex-result { gap: 1rem; background: none; padding: 0; border-bottom: 1px solid var(--border); }
.ws[data-layout=desk] .ex-result .chip { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0.35rem 0; margin: 0; color: var(--muted); border-bottom: 2px solid transparent; }
.ws[data-layout=desk] .ex-result .chip[aria-pressed=true] { color: var(--strong); font-weight: var(--w-bold); border-bottom-color: var(--accent); }
/* The engine (D5): a card over the moves; "Stockfish 19 on this device", E and the settings on its
   first line, the figures on the next, lines ruled. Elsewhere the name and key don't show. */
.ws[data-layout=desk] .ws-engine { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 0; }
.ws[data-layout=desk] .ws-engine.on .ws-eng-head { flex-wrap: wrap; padding: 0.4rem 0.75rem; row-gap: 0.25rem; }
.ws[data-layout=desk] .ws-engine.on .ws-eng-head::after { content: ""; order: 1; flex-basis: 100%; }
.ws[data-layout=desk] .ws-engine.on :is(.ws-eng-eval, .ws-eng-state, .ws-eng-wdl, [data-act=go-deeper]) { order: 2; }
/* "Stockfish 19 on this device", then E (drawn by CSS: no code on the first load). */
.ws[data-layout=desk] .ws-engine.on .ws-eng-switch { order: -1; }
.ws[data-layout=desk] .ws-engine.on .ws-eng-head::before { content: "Stockfish 19 · on this device"; order: 0; flex: 1; font-size: var(--fs-sm); color: var(--muted); }
.ws[data-layout=desk] .ws-engine.on .ws-eng-more::before { content: "E"; margin-right: 0.6rem; font: 0.75rem "IBM Plex Mono", monospace; padding: 0 0.3rem; border: 1px solid var(--control); border-radius: var(--r-control); }
.ws[data-layout=desk] .ws-engine.on .ws-eng-lines > li { border-top: 1px solid var(--border); padding: 0.35rem 0.75rem; }
/* Focus (Z, frame D13): the explorer takes the column's height; the hint says how to leave. */
.ws[data-layout=desk].focus .ws-side-b { flex: 1 1 0; }
.ws[data-layout=desk].focus .ws-pane { flex: 1 1 0; height: auto; max-height: none; overflow: auto; }
.ws[data-layout=desk].focus .ws-tabs::after { content: "Focus: moves and notes hidden · Z brings them back"; }
/* Notes (D9): the move in bold, symbols as filled keys (the chosen one in the accent), one line on
   saving; the line's actions are in Edit and the right-click. */
.ws[data-layout=desk] .ws-notes > p:first-child { color: var(--muted); }
.ws[data-layout=desk] .ws-notes > p:first-child b { color: var(--strong); }
.ws[data-layout=desk] .ws-notes .nags { gap: 0.3rem; }
.ws[data-layout=desk] .ws-notes .nag { min-width: 2.5rem; height: 2.125rem; min-height: 0; padding: 0 0.4rem; border: 0; border-radius: var(--r-control); background: var(--panel2); font-weight: var(--w-bold); }
.ws[data-layout=desk] .ws-notes .nag[aria-pressed=true] { background: var(--accent); color: var(--on-accent); box-shadow: none; outline: 0; }
.ws[data-layout=desk] .ws-notes .off { display: none; }
/* The line menu (D10): a small card at the pointer, its title, rows of 30 px, Make main line first,
   the side line's two only on a side line, Del said. */
.ws[data-layout=desk] .ws-line-menu { width: auto; min-width: 17rem; padding: 0.3rem; border-color: var(--border); border-radius: var(--r-card); box-shadow: 0 8px 24px var(--shade); }
.ws[data-layout=desk] .ws-line-head { display: block; padding: 0.25rem 0.6rem; }
.ws[data-layout=desk] .ws-line-head b { font-size: 0.75rem; color: var(--muted); }
.ws[data-layout=desk] .ws-line-head .k-done { display: none; }
.ws[data-layout=desk] .ws-line-menu .ws-line-actions { display: flex; flex-direction: column; gap: 0; }
.ws[data-layout=desk] .ws-line-menu button { display: flex; align-items: center; height: 1.875rem; min-height: 0; padding: 0 0.6rem 0 1.6rem; border-radius: var(--r-control); font-size: var(--fs-sm); }
.ws[data-layout=desk] .ws-line-menu button:disabled { display: none; }
.ws[data-layout=desk] .ws-line-menu [data-act=make-main] { order: -1; }
.ws[data-layout=desk] .ws-line-menu [data-act=delete-line]::after { content: "Del"; margin-left: auto; padding-left: 1rem; font: 0.72rem "IBM Plex Mono", monospace; color: var(--muted); }
.ws[data-layout=desk] .ws-line-menu .ws-copy-to { padding: 0.2rem 0.6rem 0 1.6rem; }
/* The tab row's tabs (D11): the board icon before the name. The save word (D15): red when failing. */
.ws-tabrow .ws-tab-btn > .ic { width: 1rem; height: 1rem; flex: none; margin-right: 0.3rem; opacity: 0.75; }
.ws-tabrow .ws-saveword.bad { color: var(--error); background: color-mix(in srgb, var(--error) 12%, transparent); font-weight: var(--w-bold); border-radius: var(--r-control); padding: 0 0.6rem; }
/* The drop-downs (D11 Tabs ▾, D15 the save word): under what opened them, menu rows. */
.ws-scrim.clear { background: none; }
.ws-sheet[data-drop] { position: fixed; bottom: auto; width: 22.5rem; max-height: 70vh; overflow: auto; padding: 0.3rem; border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: 0 8px 24px var(--shade); background: var(--panel); transform: none; }
.ws-sheet[data-drop=tabs] { width: 20rem; }
/* A tab's right-click menu (D11): at the pointer. */
.ws-sheet[data-drop=tab] { width: 12rem; }
.ws-sheet[data-drop=tab] .mb-item { color: var(--ink); }
.ws-sheet[data-drop=tabs] .mb-item, .ws-sheet[data-drop=tabs] .mb-sep { color: var(--ink); }
.ws-drop-list { display: grid; }
.ws-drop-h { margin: 0; padding: 0.4rem 0.6rem 0.15rem; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: var(--w-bold); color: var(--muted); }
.ws-drop-save .ws-save-card { margin: 0.4rem; padding: 0.6rem 0.75rem; border-radius: var(--r-card); background: var(--panel2); font-size: var(--fs-sm); line-height: 1.45; }
.ws-drop-acts { display: flex; gap: 0.5rem; padding: 0 0.4rem 0.4rem; }
.ws-drop-acts button { flex: 1; margin: 0; min-height: 2.25rem; }
/* The menus' rows (D12): a tick column, the name, the key at the right; 30 px. */
.mb-item, .ws-drop-list .mb-item { gap: 0.6rem; height: 1.875rem; padding: 0 0.6rem; font-size: var(--fs-sm); }
.mb-ck { width: 0.9rem; flex: none; color: var(--accent); font-weight: var(--w-bold); }
.mb-item:hover .mb-ck, .mb-item:focus-visible .mb-ck { color: inherit; }
.mb-t { flex: 1; }
.mb-key { margin-left: 1rem; font: 0.72rem "IBM Plex Mono", monospace; }
/* The keys (?): two columns. */
.ws-keys { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0.5rem 0; font-size: var(--fs-sm); }
.ws-keys dt { text-align: right; }
.ws-keys dd { margin: 0; }
/* The game preview (D7): a card in the middle of the page, the board inset, the facts under it,
   four steps across, then Open in a tab, Add to my analysis. */
.ws[data-layout=desk] .ws-preview { position: fixed; left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: 28.75rem; max-height: 92vh;
  display: flex; flex-direction: column; padding: 0 0 0.6rem; border-radius: var(--r-panel); border: 1px solid var(--border); box-shadow: 0 12px 32px var(--shade); }
.ws[data-layout=desk] .ws-preview .sheet-head .k-done { width: auto; padding: 0 0.9rem; min-height: 2.1rem; background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); }
.ws[data-layout=desk] .ws-preview .sheet-head { padding: 0.6rem 0.5rem 0.5rem 1rem; border-bottom: 1px solid var(--border); }
.ws[data-layout=desk] .ws-preview .ws-preview-board { order: 1; margin: 0.75rem 4.4rem 0.25rem; }
.ws[data-layout=desk] .ws-preview .ws-preview-meta { order: 2; text-align: center; margin: 0.1rem 0.75rem; }
.ws[data-layout=desk] .ws-preview .ws-preview-controls { order: 3; display: flex; gap: 0.4rem; padding: 0.4rem 0.75rem; }
.ws[data-layout=desk] .ws-preview .ws-preview-controls button { flex: 1; height: 2rem; min-height: 0; border-radius: var(--r-control); background: var(--panel2); }
.ws[data-layout=desk] .ws-preview .ws-preview-ply { display: none; }
.ws[data-layout=desk] .ws-preview .ws-preview-list { order: 3; padding: 0 0.75rem; margin: 0; }
.ws[data-layout=desk] .ws-preview .ws-preview-actions { order: 4; display: flex; gap: 0.5rem; padding: 0.4rem 0.75rem 0; }
.ws[data-layout=desk] .ws-preview .ws-preview-actions > * { flex: 1; margin: 0; min-height: 2.25rem; }
.ws[data-layout=desk] .ws-preview .ws-preview-actions [data-act=open-tab] { order: -1; }
.ws[data-layout=desk] .ws-preview .ws-preview-actions > a, .ws[data-layout=desk] .ws-preview .ws-preview-actions > button:last-child { display: none; }
.ws[data-layout=desk] .ws-preview .ws-preview-refs { order: 5; padding: 0.3rem 0.75rem 0; }
/* The games list in the board (D7): compact rows, no titles; ↗ and ★ are in the preview; the
   opened game marked. */
.ws[data-layout=desk] .ws-explorer .games li { border: 0; border-top: 1px solid var(--border); border-radius: 0; margin: 0; padding: 0; background: none; }
.ws[data-layout=desk] .ws-explorer .games li > .game-tab, .ws[data-layout=desk] .ws-explorer .games li > :not(.game):not(.game-tab) { display: none; }
.ws[data-layout=desk] .ws-explorer .games li > .game-tab { display: none; }
.ws[data-layout=desk] .ws-explorer .games .game { display: grid; grid-template-columns: 1fr auto; gap: 0 0.6rem; padding: 0.35rem 0.75rem; font-size: var(--fs-sm); }
.ws[data-layout=desk] .ws-explorer .games .game .title, .ws[data-layout=desk] .ws-explorer .games .game-date, .ws[data-layout=desk] .ws-explorer .games .game-opening { display: none; }
.ws[data-layout=desk] .ws-explorer .games .game-players { font-weight: var(--w-bold); }
.ws[data-layout=desk] .ws-explorer .games .game-players .rating { font-weight: var(--w-text); color: var(--muted); }
.ws[data-layout=desk] .ws-explorer .games .game-result { text-align: right; font-weight: var(--w-bold); }
.ws[data-layout=desk] .ws-explorer .games .game-meta, .ws[data-layout=desk] .ws-explorer .games .game-next { color: var(--muted); font-family: inherit; font-size: 0.75rem; }
.ws[data-layout=desk] .ws-explorer .games .game-next { text-align: right; }
.ws[data-layout=desk] .ws-explorer .games li.opened { background: var(--acc-soft); box-shadow: inset 3px 0 0 var(--accent); }
/* The tabs (BOARD_TABS): on a desktop, the tab row across the frame (desk.rs, frame D1), the save
   word at its end. On a phone and an iPad, a count in the header, and the list in a sheet. */
.ws-tabstrip { flex: 0 1 auto; display: flex; align-items: stretch; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.ws-tab { display: flex; align-items: center; flex: 0 1 13rem; min-width: 6rem; border: 1px solid var(--border); border-bottom: 0;
  border-radius: var(--r-control) var(--r-control) 0 0; background: var(--surface); }
.ws-tab.on { background: var(--bg); border-color: var(--control); box-shadow: inset 0 2px 0 var(--accent); }
.ws-tab-btn { flex: 1; min-width: 0; margin: 0; padding: 0.3rem 0.2rem 0.3rem 0.55rem; display: flex; align-items: center; gap: 0.25rem;
  background: none; border: 0; border-radius: 0; color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); font-weight: var(--w-text); text-align: left; }
.ws-tab.on .ws-tab-btn { color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.ws-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ws-tab-dot { color: var(--accent); flex: none; }
.ws-tab-x { flex: none; margin: 0; padding: 0 0.45rem; min-height: 0; background: none; border: 0; color: var(--muted); font-size: 1rem; line-height: 1; }
@media (hover: hover) { .ws-tab-x:hover, .ws-tab-btn:hover { color: var(--strong); } }
.ws-tab-name { flex: 1; min-width: 0; margin: 0.15rem 0.3rem; padding: 0.15rem 0.35rem; font-size: var(--fs-sm); min-height: 0; }
.ws-tab-new, .ws-tab-more { flex: none; margin: 0 0 0 0.2rem; padding: 0.2rem 0.6rem; min-height: 0; align-self: center;
  background: none; border: 1px solid transparent; color: var(--muted); font-size: 1.05rem; }
.ws-tab-more { margin-left: 0; font-size: var(--fs-sm); }
@media (hover: hover) { .ws-tab-new:hover, .ws-tab-more:hover { color: var(--strong); border-color: var(--border); } }
.ws-tab-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.ws-tab-list li { display: flex; align-items: center; gap: 0.3rem; border-radius: var(--r-control); padding: 0 0 0 0.4rem; }
.ws-tab-list li.on { background: var(--hover); box-shadow: inset 3px 0 0 var(--accent); }
.ws-tab-list .ws-tab-pick { flex: 1; min-width: 0; text-align: left; text-decoration: none; color: var(--strong); padding: 0.45rem 0; min-height: 36px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-tab-list li.on .ws-tab-pick { font-weight: var(--w-bold); }
.ws-tab-list .ws-tab-x { min-height: 36px; min-width: 36px; }
/* The tab list as rows (frame P12): a board mark, the name with its state under it, ✓ on this one. */
.ws-tab-list .ws-tab-pick { display: flex; align-items: center; gap: var(--s3); }
.ws-tab-list .ws-tab-pick > .ic { flex: none; width: 1.25rem; height: 1.25rem; color: var(--dim); }
.ws-tab-list .ws-tab-pick .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws-tab-list .ws-tab-pick small { display: block; font-weight: var(--w-text); color: var(--dim); font-size: var(--fs-sm); }
.ws-tab-here { flex: none; }
.ws:not([data-layout=desk]) .ws-tab-list { gap: 0; }
.ws:not([data-layout=desk]) .ws-tab-list li { border-top: 1px solid var(--line); border-radius: 0; padding: 0; }
.ws:not([data-layout=desk]) .ws-tab-list li:first-child { border-top: 0; }
.ws:not([data-layout=desk]) .ws-tab-list li.on { background: none; box-shadow: none; }
.ws:not([data-layout=desk]) .ws-tab-list .ws-tab-pick { min-height: 3rem; }
.ws-tab-acts { display: flex; gap: var(--s2); }
.ws-tab-acts button { flex: 1; margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); min-height: 2.75rem; }
.ws-tab-acts button, .ws-info > button { background: var(--panel3); color: var(--ink); border: 0; box-shadow: none; font-weight: var(--w-bold); }
.ws-tab-acts .ic, .ws-info > button .ic { width: 1.1rem; height: 1.1rem; }
.ws-info > button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); }
.ws-copy-to { width: 100%; margin-top: 0.2rem; }
@media (pointer: coarse) { .ws-keys-note { display: none; } }
.ws-said-act { margin: 0 0 0 0.6rem; padding: 0; min-height: 0; color: inherit; font-weight: var(--w-bold); }
/* Another browser tab has the board (D-BT.8). */
.ws-gone { position: fixed; inset: 0; z-index: var(--z-top); display: grid; place-items: center; background: var(--scrim); padding: var(--gutter); }
.ws-gone-card { max-width: 26rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); padding: 1.1rem 1.2rem; display: grid; gap: 0.6rem; }
.ws-gone-card h2 { margin: 0; font-size: var(--fs-lg); }
.ws-gone-card p { margin: 0; }
.ws-gone-card button { justify-self: start; margin: 0; }
/* The engine (F3, BOARD_LAYOUT D-BL.7): its strip at the top of the column (over the board on a
   phone, when on), an eval bar beside the board (over it on a phone). */
.ws-engine { flex: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); padding: 0.3rem 0.5rem; min-width: 0; }
.ws-eng-head { display: flex; align-items: center; gap: 0.5rem; min-height: 2rem; min-width: 0; flex-wrap: wrap; row-gap: 0.1rem; }
.ws-eng-switch { margin: 0; padding: 0; flex: none; position: relative; width: 2.5rem; height: 1.45rem; min-height: 0; border-radius: 999px;
  background: var(--track); border: 1px solid var(--control); }
.ws-eng-knob { position: absolute; top: 2px; left: 2px; width: calc(1.45rem - 6px); height: calc(1.45rem - 6px); border-radius: 50%;
  background: var(--muted); transition: left 0.15s; }
.ws-eng-switch[aria-checked=true] { background: var(--accent); border-color: var(--accent); }
.ws-eng-switch[aria-checked=true] .ws-eng-knob { left: calc(2.5rem - 1.45rem + 2px); background: var(--on-accent); }
@media (pointer: coarse) { .ws-eng-switch { width: 2.9rem; height: 1.7rem; } .ws-eng-knob { width: calc(1.7rem - 6px); height: calc(1.7rem - 6px); }
  .ws-eng-switch[aria-checked=true] .ws-eng-knob { left: calc(2.9rem - 1.7rem + 2px); } }
.ws-eng-eval { flex: none; min-width: 3.4rem; font-size: var(--fs-lg); color: var(--strong); }
.ws-eng-state { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-eng-wdl { flex: none; white-space: nowrap; }
.ws-eng-head button.link { flex: none; }
.ws-eng-close { flex: none; margin: 0 -0.25rem 0 0; padding: 0 0.4rem; min-height: 2rem; background: transparent; border-color: transparent; color: var(--muted); }
@media (pointer: coarse) { .ws-eng-close { min-width: 44px; min-height: 44px; margin: -0.4rem -0.4rem -0.4rem 0; } }
.ws-eng-more { flex: none; padding: 0.15rem 0.5rem; white-space: nowrap; font-weight: var(--w-text); }
.ws-eng-more[aria-expanded=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ws-eng-settings .ws-eng-done { margin: 0 0 0 auto; padding: 0.3rem 1rem; }
.ws-eng-lines { list-style: none; margin: 0.15rem 0 0; padding: 0; display: grid; gap: 0.05rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.ws-eng-lines li { display: flex; gap: 0.4rem; align-items: baseline; min-width: 0; }
.ws-eng-score { flex: none; min-width: 3.4rem; color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.ws-eng-moves { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-eng-moves .mv { margin: 0; padding: 0 0.15rem; min-height: 0; background: none; border: 0; border-radius: 4px; color: var(--text);
  font: inherit; font-weight: var(--w-text); }
@media (hover: hover) { .ws-eng-moves .mv:hover { background: var(--hover); color: var(--strong); } }
/* Stored evals (STORED_EVALS D-SE.12 A): the engine-off strip's own row, the "none yet" note, and
   the one small stored line beside the live engine. */
.ws-eng-none { margin: 0.1rem 0 0.1rem; }
/* The strip's body keeps one height per mode: invisible rows (.ws-eng-ghost) under the content, in
   the same grid cell, so a move whose answer is still coming doesn't shrink or grow it. */
.ws-eng-fix { display: grid; min-width: 0; }
.ws-eng-fix > * { grid-area: 1 / 1; align-self: start; min-width: 0; }
.ws-eng-ghost { visibility: hidden; }
/* Engine off, touch: the ask button's row is 44px, so the first row is held at that too. */
@media (pointer: coarse) { .ws-eng-fix.off .ws-eng-ghost li:first-child { min-height: 44px; } }
.ws-eng-stored { display: flex; gap: 0.4rem; align-items: baseline; min-width: 0; margin-top: 0.1rem; }
.ws-eng-stored > span { flex: none; }
.ws-eng-stored .ws-eng-lines { flex: 1; min-width: 0; margin: 0; }
.ws.phone .ws-eng-more-info { display: none; }
/* A phone's engine-off strip is one row whatever it shows (owner, 2026-10-26-1: "none yet" grew
   it and moved the board): the ask block's parts side by side, long words cut short, and its
   second note (when ready, asks left) left out. */
.ws.phone .ws-ask { display: flex; align-items: center; gap: 0.5rem; min-width: 0; overflow: hidden; margin: 0; }
.ws.phone .ws-ask p { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws.phone .ws-ask p:has(button) { flex: none; }
.ws.phone .ws-ask .ws-ask-row { flex: 1 1 auto; flex-wrap: nowrap; }
.ws.phone .ws-ask button { flex: none; }
.ws.phone .ws-ask .ws-ask-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws.phone .ws-ask p.muted:not(:first-child) { display: none; }
.ws.phone .ws-eng-sum-label { white-space: nowrap; }
.ws-eng-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin-top: 0.3rem; padding: 0.4rem 0 0.2rem;
  border-top: 1px solid var(--border); }
.ws-eng-settings p { margin: 0; flex-basis: 100%; }
.ws-eng-settings select { width: auto; padding: 0.15rem 0.3rem; }
.ws-evalbar { position: absolute; z-index: var(--z-page); overflow: hidden; background: var(--wdl-black); border: 1px solid var(--control); border-radius: 3px; }
.ws-evalbar-white { position: absolute; background: var(--wdl-white); transition: height 0.3s, width 0.3s; }
.ws.wide .ws-evalbar { left: -15px; top: 0; bottom: 0; width: 10px; }
.ws.wide .ws-evalbar-white { left: 0; right: 0; bottom: 0; height: calc(var(--share) * 100%); }
.ws.wide .ws-evalbar.flipped .ws-evalbar-white { bottom: auto; top: 0; }
.ws.phone .ws-evalbar { position: relative; height: 6px; margin-bottom: 2px; }
/* An upright iPad: the bar beside the board, as sideways (frame U5 under PA.3 B). */
.ws.phone[data-layout=ipad-tall] .ws-evalbar { position: absolute; left: -15px; top: 1.75rem; bottom: 1.75rem; width: 10px; height: auto; margin: 0; }
.ws.phone[data-layout=ipad-tall] .ws-evalbar-white { left: 0; right: 0; bottom: 0; top: auto; height: calc(var(--share) * 100%); width: auto; }
.ws.phone[data-layout=ipad-tall] .ws-evalbar.flipped .ws-evalbar-white { bottom: auto; top: 0; left: 0; right: 0; }
.ws-evalbar.none { visibility: hidden; }
.ws.phone .ws-evalbar-white { top: 0; bottom: 0; left: 0; width: calc(var(--share) * 100%); }
.ws.phone .ws-evalbar.flipped .ws-evalbar-white { left: auto; right: 0; }
/* The eval bar on an iPad (frames EC1-EC5; after the general rules, which it overrides): 14 px in a 3rem column left of the board, the score
   in a chip over it while the engine is on (as the desktop's D5). Upright and grown (⤢), no room
   for the column: the thin bar as before, no chip (the lines card's head has the score). */
.ws[data-layout=ipad-wide] .ws-board-wrap, .ws[data-layout=ipad-tall]:not(.big) .ws-board-wrap { padding-left: 3rem; }
.ws[data-layout=ipad-wide] .ws-evalbar, .ws.phone[data-layout=ipad-tall]:not(.big) .ws-evalbar { left: calc(1.5rem - 7px); top: 3.4rem; bottom: 1.9rem; width: 14px; border-radius: 4px; overflow: visible; }
.ws[data-layout=ipad-wide] .ws-evalbar-white, .ws.phone[data-layout=ipad-tall]:not(.big) .ws-evalbar-white { border-radius: 3px; }
.ws[data-layout=ipad-wide] .ws-evalbar.none, .ws.phone[data-layout=ipad-tall]:not(.big) .ws-evalbar.none { background: none; border-color: transparent; }
.ws[data-layout=ipad-wide] .ws-evalbar[data-score]::before, .ws.phone[data-layout=ipad-tall]:not(.big) .ws-evalbar[data-score]::before { content: attr(data-score); position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px); padding: 1px 5px; border-radius: 6px;
  background: var(--surface); box-shadow: 0 1px 3px var(--shade); font-weight: var(--w-bold); font-size: 0.72rem; font-family: "IBM Plex Mono", monospace; color: var(--strong); white-space: nowrap; }
@media (max-width: 599px) { .ws.phone .ws-eng-wdl { display: none; } }
.ws.phone .ws-engine { align-self: stretch; margin: 0 var(--gutter); padding: 0.15rem 0.4rem; }
/* A short phone (iPhone 8 in Safari, owner 2026-10-19-4): the board keeps a usable size and the
   tool pane at least a few lines; the page scrolls to the rest (F-ph1: it was held still, so the
   rest was out of reach). The area under the header scrolls instead; the tool pane counts as
   its minimum (contain: size), so it fills what's left of the screen, never grows with its
   content, and where everything fits there's nothing to scroll. */
body:has(.ws.phone) main { overflow-y: auto; }
.ws.phone { min-height: min-content; }
.ws.phone .ws-side { contain: size; }
.ws.phone { --bs: min(var(--vw), max(18rem, calc(var(--vh) - 15rem)), 62dvh); }
.ws.phone .ws-side { min-height: 15rem; }
/* Taller than the screen, it grows downwards (centred, it would spill off the top). */
.ws.phone { justify-content: flex-start; flex: 1 0 auto; }
.ws.phone:has(.ws-engine) { --bs: min(var(--vw), max(18rem, calc(var(--vh) - 20rem)), 62dvh); }
.ws-bbar button[aria-pressed=true] { color: var(--accent); box-shadow: inset 0 2px 0 var(--accent); }

/* The library (T-079, SAVING.md D-SV.5 A): its page, and the board's Save mark. */
.lib-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.6rem; }
.lib-actions .button, .lib-actions button { margin-top: 0; }
.lib-actions label.button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.lib-sort { margin-left: auto; display: flex; align-items: center; gap: 0.3rem; }
.lib-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.lib-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel);
               padding: 0.7rem 0.9rem; display: grid; gap: 0.2rem; }
.lib-open { font-weight: var(--w-bold); color: var(--strong); }
.lib-copy { color: var(--text); }
/* Part 4 (D-LB.19–20): a bookmark's mark, and a copy's link to its original. */
.lib-mark { color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.lib-copy-of { color: var(--text); }
.lib-row-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.lib-row-actions button { margin-top: 0; }
@media (max-width: 639px) { .lib-sort { margin-left: 0; } }
/* Databases and the trash (LIBRARY.md part 1): the databases down the side on a desktop (each a
   drop target: a drag moves, Ctrl/⌥+drag copies, D-LB.9), a picker over the list on smaller
   screens; ticked games get a bar of actions; the last action's message carries Undo. */
.lib-wrap { display: grid; gap: 1.25rem; }
.lib-main { min-width: 0; }
.lib-side { display: none; }
.lib-pick { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem; margin-bottom: 1.25rem; }
.lib-pick-label { margin: 0; flex: 1 1 14rem; font-weight: var(--w-text); }
.lib-pick select { width: 100%; }
.lib-pick button { margin: 0; }
/* Your training (the library as the hub for your own things). */
.lib-train-link { flex-basis: 100%; color: var(--accent); }
.lib-train { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 0.4rem 0.6rem; border-radius: var(--r-control);
  color: var(--strong); text-decoration: none; }
@media (hover: hover) { .lib-train:hover { background: var(--hover); } }
.lib-train-sub { padding: 0 0.6rem; color: var(--muted); }
@media (min-width: 1024px) {
  .lib-wrap { grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
  .lib-side { display: grid; gap: 0.5rem; position: sticky; top: calc(var(--frame-t) + 1rem); max-height: calc(var(--vh) - 2rem); overflow-y: auto; padding: 2px; }
  .lib-pick { display: none; }
}
.lib-side-h { font-size: var(--fs-xs); letter-spacing: var(--ls-xs); color: var(--muted); margin: 0; }
.lib-drag-hint { margin: 0; color: var(--text); background: var(--raised); border-radius: var(--r-control); padding: 0.45rem 0.6rem; }
.lib-dbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
button.lib-db { margin: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 0.5rem;
  text-align: left; background: transparent; color: var(--text); font-weight: var(--w-text); border: 1px solid transparent; padding: 0.4rem 0.6rem; }
@media (hover: hover) { button.lib-db:hover { background: var(--hover); } }
button.lib-db.on { color: var(--strong); font-weight: var(--w-bold); background: var(--surface); border-color: var(--border); box-shadow: inset 3px 0 0 var(--accent); }
button.lib-trash-target { margin-top: 0.6rem; }
.lib-db-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-db-n { color: var(--muted); }
.lib-drop-word { grid-column: 1 / -1; color: var(--strong); font: inherit; font-weight: var(--w-bold); }
/* While dragging: every target shows as one; the one under the pointer, plainly. */
.lib-dragging button.lib-db { border: 1px dashed var(--control); }
.lib-dragging button.lib-db * { pointer-events: none; }
.lib-dragging button.lib-db.over { border: 2px solid var(--accent); background: var(--surface); }
button.lib-new { margin: 0.25rem 0 0; justify-self: start; }
.lib-head h1 { overflow-wrap: anywhere; margin-bottom: 0.25rem; }
.lib-desc { color: var(--text); margin: 0 0 0.25rem; overflow-wrap: anywhere; }
.lib-sub { margin: 1.5rem 0 0; font-size: var(--fs-md); }
.lib-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-top: 0.75rem; padding: 0.4rem 0.6rem;
  border: 1px solid transparent; border-radius: var(--r-panel); }
.lib-selbar.has { background: var(--raised); border-color: var(--border); position: sticky; top: calc(var(--frame-t) + 0.5rem); z-index: var(--z-page2); }
.lib-selbar button, .lib-selbar .button { margin: 0; }
.lib-selbar label.inline { margin: 0; }
.lib-list li.lib-row { grid-template-columns: auto minmax(0, 1fr); column-gap: 0.7rem; align-items: start; }
.lib-list li.lib-row-db { grid-template-columns: minmax(0, 1fr); }
.lib-list li.picked { border-color: var(--accent); }
.lib-tick { margin: 0.3rem 0 0; }
.lib-row-main { display: grid; gap: 0.2rem; min-width: 0; }
.lib-row-main .lib-open, .lib-row-main strong { overflow-wrap: anywhere; }
@media (pointer: fine) { .lib-list li[draggable=true] { cursor: grab; } }
/* Part 3 (LIBRARY.md D-LB.14–18): the filter, tags on a game, the import's duplicates, the
   header form (shared with the board). */
.lib-filter { margin-top: 0.75rem; padding: 0.75rem 0.9rem; background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-panel); }
.lib-filter-grid, .hdr-grid { display: grid; gap: 0.5rem 0.9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.lib-filter label, .hdr-form label { margin: 0; }
.lib-filter input, .lib-filter select, .hdr-form input, .hdr-form select { width: 100%; }
.lib-filter-player, .lib-filter-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; grid-column: span 2; }
@media (max-width: 639px) { .lib-filter-player, .lib-filter-dates { grid-column: auto; } }
.lib-filter .actions, .hdr-form .actions { margin-top: 0.6rem; }
.lib-actions button.on { box-shadow: inset 0 -2px 0 var(--accent); }
.lib-filtered { margin: 0.6rem 0 0; color: var(--text); }
.lib-opening { overflow-wrap: anywhere; }
.lib-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
button.lib-tag { margin: 0; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--raised); color: var(--text);
  border: 1px solid var(--border); font-weight: var(--w-text); min-height: 0; }
@media (hover: hover) { button.lib-tag:hover { background: var(--hover); } }
.lib-when button.link { margin: 0; padding: 0; min-height: 0; }
/* Part 4b tidy-up (owner 2026-10-22-1: elements lacked definition; 2026-10-22-2 picked the
   table, B): the sidebar's two lists (D-LB.23), one count line, Import as the main action, and
   the games as a table whose headings sort. */
.lib-ico { width: 1rem; height: 1rem; color: var(--muted); }
button.lib-db { grid-template-columns: auto minmax(0, 1fr) auto; }
button.lib-db.on .lib-ico { color: var(--accent); }
button.lib-db .lib-drop-word, button.lib-db .lib-db-busy { grid-column: 2 / -1; }
/* Each list is its own panel with a heading band, so the two read apart in both modes; the
   shown one is a raised row with the accent rail. */
@media (min-width: 1024px) { .lib-side { gap: 0.9rem; } }
.lib-side-sec { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel);
  padding: 0 0.35rem 0.45rem; }
.lib-side .lib-side-h { font-size: var(--fs-sm); letter-spacing: var(--ls-sm); color: var(--strong); font-weight: var(--w-bold);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; margin: 0 -0.35rem 0.35rem; padding: 0.5rem 0.9rem;
  background: var(--raised); border-bottom: 1px solid var(--border); border-radius: var(--r-panel) var(--r-panel) 0 0; }
.lib-side-sec .lib-dbs { gap: 1px; }
.lib-side-sec button.lib-db.on { background: var(--raised); border-color: var(--control); }
.lib-side-sub { font-size: var(--fs-xs); letter-spacing: var(--ls-xs); color: var(--muted); font-weight: var(--w-text); }
.lib-side button.lib-new { margin: 0.35rem 0 0 0.6rem; }
.lib-side button.lib-trash-target { margin-top: 0; border: 1px solid var(--border); background: var(--surface); }
.lib-side .lib-drag-hint { background: none; padding: 0 0.6rem; color: var(--muted); }
.lib-kind { margin: 0 0 0.15rem; color: var(--muted); font-weight: var(--w-bold); letter-spacing: var(--ls-xs); text-transform: uppercase; }
.lib-head h1 { margin-top: 0; }
.lib-count { margin: 0; }
.lib-count strong { color: var(--strong); }
.lib-list li.lib-row { display: grid; column-gap: 0.75rem; row-gap: 0.15rem; align-items: baseline; }
.lib-list .lib-tick { margin: 0; align-self: center; }
.lib-c-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem; min-width: 0; }
a.lib-open { text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) { a.lib-open:hover { text-decoration: underline; } }
.lib-badge { padding: 0 0.4rem; border: 1px solid var(--control); border-radius: var(--r-control); color: var(--strong);
  font-weight: var(--w-bold); white-space: nowrap; }
.lib-badge-mark { background: var(--raised); }
.lib-badge-warn { border-style: dashed; }
.lib-c-res { color: var(--strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lib-c-meta { min-width: 0; overflow-wrap: anywhere; }
.lib-c-meta > span:empty { display: none; }
.lib-c-when { display: flex; gap: 0.6rem; align-items: baseline; justify-content: end; white-space: nowrap; }
.lib-c-when button.link { margin: 0; padding: 0; min-height: 0; }
/* Review beside the names, always shown (owner, 2026-11-02-1). */
.lib-c-who a.lib-rv { font-size: var(--fs-xs); font-weight: var(--w-bold); line-height: 1.5; padding: 0 0.45rem; border: 1px solid var(--accent); border-radius: var(--r-control); background: var(--surface); color: var(--accent); text-decoration: none; white-space: nowrap; }
.lib-c-who a.lib-rv:hover { background: var(--hover); }
.lib-c-who a.lib-rv.done { border-color: var(--border); color: var(--muted); font-weight: 400; }
.lib-c-sub { display: flex; flex-wrap: wrap; gap: 0.3rem 0.75rem; align-items: center; min-width: 0; }
.lib-list button.lib-tag { background: var(--surface); color: var(--strong); border-color: var(--control); font-weight: var(--w-bold); } /* visible at a glance (owner, 2026-10-25) */
/* The table: columns from a tablet up; a phone gets divided two-line rows. */
.lib-table { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; }
.lib-list.lib-table li { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; padding: 0.5rem 0.8rem; }
.lib-list.lib-table li:first-child { border-top: 0; }
.lib-list.lib-table li.picked { background: var(--raised); box-shadow: inset 3px 0 0 var(--accent); }
@media (hover: hover) { .lib-list.lib-table li.lib-row:hover { background: var(--hover); } }
.lib-list li.lib-thead { display: none; }
.lib-table li.lib-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tick who res" ". meta meta" ". sub sub" ". when when"; }
.lib-table .lib-tick { grid-area: tick; } .lib-table .lib-c-who { grid-area: who; } .lib-table .lib-c-res { grid-area: res; }
.lib-table .lib-c-meta { grid-area: meta; } .lib-table .lib-c-when { grid-area: when; justify-content: start; } .lib-table .lib-c-sub { grid-area: sub; }
.lib-table .lib-c-meta > span:not(:empty) ~ span:not(:empty)::before { content: " · "; }
@media (min-width: 768px) {
  .lib-list.lib-table li.lib-thead { display: grid; column-gap: 0.75rem; color: var(--muted); font-weight: var(--w-bold);
    letter-spacing: var(--ls-xs); background: var(--raised); padding-block: 0.4rem; }
  .lib-table li.lib-row, .lib-list.lib-table li.lib-thead { grid-template-areas: none;
    grid-template-columns: 1.1rem minmax(0, 2.3fr) 3.3rem minmax(0, 1.6fr) 6.3rem 3.6rem 6.5rem; }
  .lib-table li.lib-row > * { grid-area: auto; }
  .lib-table .lib-c-meta { display: contents; }
  .lib-table .lib-unit { display: none; }
  .lib-table .lib-c-meta > span::before { content: none !important; }
  .lib-table .lib-c-meta > span:empty { display: block; }
  .lib-table .lib-c-moves, .lib-table .lib-c-when { text-align: right; justify-content: end; }
  .lib-table li.lib-row > .lib-c-sub { grid-column: 2 / -1; }
}
/* With a mouse, a table row's Details… takes the saved date's place under the pointer. */
@media (min-width: 768px) and (hover: hover) {
  .lib-table .lib-c-when button.link { display: none; }
  .lib-table li.lib-row:hover .lib-c-when button.link, .lib-table li.lib-row:focus-within .lib-c-when button.link { display: inline; }
  .lib-table li.lib-row:hover .lib-c-when > span:first-child, .lib-table li.lib-row:focus-within .lib-c-when > span:first-child { display: none; }
}
@media (min-width: 768px) and (max-width: 1279px) {
  .lib-table li.lib-row, .lib-list.lib-table li.lib-thead { grid-template-columns: 1.1rem minmax(0, 2fr) 3.3rem minmax(0, 1.4fr) 6.3rem 5.6rem; }
  .lib-table .lib-c-moves, .lib-thead .lib-c-meta > span:last-child { display: none !important; }
}
/* The headings that sort: plain words that are buttons (the sorted one bold, with its arrow). */
button.lib-sorter { margin: 0; padding: 0; min-height: 0; background: none; border: 0; color: inherit; font: inherit;
  letter-spacing: inherit; cursor: pointer; text-align: left; }
button.lib-sorter.on { color: var(--strong); }
@media (hover: hover) { button.lib-sorter:hover { color: var(--strong); text-decoration: underline; } }
.lib-db-kind { border: 0; padding: 0; margin: 0 0 0.6rem; display: grid; gap: 0.3rem; }
.lib-db-kind legend { padding: 0; margin-bottom: 0.2rem; color: var(--muted); }
.lib-db-kind label.inline { display: flex; gap: 0.5rem; align-items: start; margin: 0; }
.lib-dups { border: 1px solid var(--border); border-radius: var(--r-panel); padding: 0.5rem 0.75rem; margin: 0.6rem 0; display: grid; gap: 0.4rem; }
.lib-dups legend { padding: 0 0.3rem; font-weight: var(--w-bold); color: var(--strong); }
.lib-dups label.inline { display: flex; gap: 0.5rem; align-items: start; margin: 0; }
.lib-dups input { margin-top: 0.2rem; }
.lib-report { margin-top: 0.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); }
.lib-report summary { cursor: pointer; color: var(--strong); }
.lib-report ul { margin: 0.5rem 0; padding-left: 1.2rem; max-height: 16rem; overflow-y: auto; }
.lib-report-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.lib-report-actions button { margin: 0; }
.hdr-form { display: grid; gap: 0.6rem; }
.hdr-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0.5rem; margin-top: 0.5rem; }
.hdr-form > button.link { justify-self: start; margin: 0; }
.lib-toast, .lib-dragbar { position: fixed; z-index: var(--z-toast); left: var(--gutter); right: var(--gutter); bottom: calc(var(--bottom-bar) + 0.75rem);
  background: var(--surface); color: var(--strong); border-radius: var(--r-panel); box-shadow: 0 6px 20px var(--shade); }
.lib-toast { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.55rem 0.6rem 0.55rem 0.9rem;
  border: 1px solid var(--control); }
.lib-toast span { flex: 1 1 12rem; }
.lib-toast button { margin: 0; }
.lib-dragbar { pointer-events: none; padding: 0.55rem 0.9rem; border: 2px solid var(--accent); font-weight: var(--w-bold); text-align: center; }
@media (min-width: 600px) {
  .lib-toast, .lib-dragbar { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: min(44rem, calc(100% - 2rem)); }
}
/* What the pointer carries in a drag (the browser draws it; off screen otherwise). */
.lib-drag-ghost { position: fixed; top: -200px; left: -200px; background: var(--accent); color: var(--on-accent);
  padding: 0.3rem 0.7rem; border-radius: var(--r-control); font-weight: var(--w-bold); font-size: var(--fs-sm); }
.lib-db-form { padding-top: 0.25rem; }
.lib-db-form .actions { margin-top: 0.75rem; }
.lib-db-form .actions button { margin: 0; }
.lib-db-delete { border-top: 1px solid var(--border); padding-top: 0.75rem; margin-top: 0.25rem; }
.lib-db-delete .actions { margin-top: 0.5rem; }
.lib-db-delete .actions button { margin: 0; }
.ws-save { flex: none; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); color: var(--muted);
           font-weight: var(--w-text); white-space: nowrap; line-height: 1.5rem; }
.ws-save button.link { font-size: inherit; }
/* Save (owner, 2026-10-19-5): the disk and a word, top right; quiet once saved. */
/* One width for Save, Saved and Saving… so the title line never moves (owner, 2026-10-20-2). */
.ws-save-btn { margin: 0; min-height: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.3rem 0.75rem; min-width: 7.5rem; font-size: var(--fs-sm); line-height: 1.3rem; }
.ws-save-btn.saving, .ws-save-btn.saving:disabled { color: var(--muted); opacity: 1; cursor: default; }
.ws-save-btn svg { width: 1.1rem; height: 1.1rem; }
.ws-save-btn.saved { background: var(--surface); color: var(--strong); border-color: var(--border); }


/* Cloud eval asks (EVAL_ASKS.md): the strip's ask block and the member's requests list; the
   "ready" notice on any page, above the phone's bottom bar. */
.ws-ask { margin: 0.1rem 0; }
.ws-ask p { margin: 0.1rem 0; }
.ws-ask-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; }
button.ws-ask-btn { margin: 0; padding: 0.2rem 0.7rem; font-size: var(--fs-sm); }
@media (pointer: coarse) { button.ws-ask-btn { min-height: 44px; } }
/* Asks on their way: a link in the strip's top row, its list a dropdown over the page (the strip
   keeps its size). */
.ws-asks { position: relative; flex: none; }
.ws-asks summary { cursor: pointer; white-space: nowrap; }
@media (pointer: coarse) { .ws-asks summary { min-height: 44px; display: flex; align-items: center; } }
.ws-asks ul { position: absolute; z-index: var(--z-sheet); right: 0; top: 100%; margin: 0.25rem 0 0; padding: 0.5rem 0.75rem 0.5rem 1.6rem;
  width: max-content; max-width: min(22rem, calc(var(--vw) - 2 * var(--gutter))); background: var(--surface);
  border: 1px solid var(--control); border-radius: var(--r-panel); box-shadow: 0 8px 24px var(--shade); }
.ws-asks li { margin: 0.15rem 0; }
/* The strip keeps one size beside the board (owner, 2026-10-21-1: it jumped between no eval, an
   ask on its way and an eval): at least the stored eval's height (head + 3 lines, 9rem, measured);
   every engine-off state fits inside it. With the engine on it only grows for more than 3 lines
   (a setting, steady from move to move) or its settings panel. Phones keep theirs (over the board). */
.ws:not(.phone) .ws-engine:is(.on, .open) { min-height: 9rem; }
/* Engine off (BOARD_STRUCTURE D-BS.1): one line, the stored eval in it; ▾ opens its lines. */
.ws-eng-name { flex: none; white-space: nowrap; }
.ws-eng-sum { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; row-gap: 0.1rem; }
.ws-eng-sum-btn { flex: 1 1 auto; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-eng-head .ws-eng-sum-btn.link { flex: 1 1 auto; padding: 0; min-height: 0; }
/* Imports (LIBRARY.md part 2): a line per running import under the buttons; the Import panel. */
.lib-imports { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.5rem; }
.lib-imports:empty { display: none; }
.lib-import { display: flex; align-items: start; gap: 0.6rem; padding: 0.55rem 0.7rem; background: var(--raised);
              border: 1px solid var(--accent); border-radius: var(--r-panel); }
.lib-import.ended { background: none; border: 0; border-left: 3px solid var(--border); border-radius: 0; padding: 0.15rem 0 0.15rem 0.6rem; align-items: center; }
.lib-import.ended button { min-height: 0; padding: 0.15rem 0.4rem; }
.lib-imports { margin: 0.25rem 0 0.75rem; }
.lib-db-busy { grid-column: 1 / -1; color: var(--strong); }
.lib-import-main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lib-import-main p { margin: 0.2rem 0 0; }
.lib-import button { margin: 0; flex: none; }
.lib-import-bar { height: 6px; margin: 0.45rem 0 0.15rem; background: var(--border); border-radius: 3px; overflow: hidden; }
.lib-import-bar span { display: block; height: 100%; background: var(--accent); }
.lib-imp-tabs { margin: 0 0 0.75rem; }
.lib-imp { display: grid; gap: 0.6rem; }
.lib-imp label { margin: 0; }
.lib-imp .actions button { margin: 0; }
.lib-imp-user { display: flex; gap: 0.5rem; margin-top: 0.25rem; }
.lib-imp-user input { flex: 1 1 auto; min-width: 0; }
.lib-imp-user button { margin: 0; flex: none; }
.lib-imp-found { margin: 0.6rem 0; overflow-wrap: anywhere; }
.lib-imp-speeds { border: 1px solid var(--border); border-radius: var(--r-control); margin: 0; padding: 0.4rem 0.7rem 0.6rem;
                  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.lib-imp-speeds legend { padding: 0 0.3rem; color: var(--text); }
.lib-imp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.lib-imp-row select { width: 100%; padding: 0.5rem; }
.lib-imp > label > select { width: 100%; margin-top: 0.25rem; }
.lib-accounts { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.5rem; }
.lib-accounts li { display: grid; gap: 0.4rem; padding: 0.55rem 0.7rem; border: 1px solid var(--border);
                   border-radius: var(--r-panel); background: var(--surface); }
.lib-accounts .lib-row-main strong { overflow-wrap: anywhere; }
.lib-evals { margin-top: 2rem; }
.lib-evals-list { padding-left: 1.2rem; }
.lib-evals-list li { margin: 0.25rem 0; }
.ask-notice { position: fixed; z-index: var(--z-toast2); left: 50%; bottom: calc(var(--bottom-bar) + 1rem); transform: translateX(-50%);
  width: max-content; max-width: calc(var(--vw) - 2 * var(--gutter)); display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.6rem 0.6rem 1rem; background: var(--surface); color: var(--text); border: 1px solid var(--control);
  border-radius: var(--r-panel); box-shadow: 0 8px 24px var(--shade); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.ask-notice > span { flex: 1 1 auto; min-width: 0; }
.ask-notice button { flex: none; }
.ask-notice button { margin: 0; }
.ask-notice button.ask-x { background: transparent; border-color: transparent; color: var(--muted); }
@media (pointer: coarse) { .ask-notice button { min-height: 44px; min-width: 44px; } }

/* The position setup editor (SETUP_EDITOR.md, SE.1 A): a full-screen panel over the board. The
   board and its two trays share --sb: as big as the screen allows. The trays add a quarter of
   the board's height (a square each), the heading ~4.5rem; a wide screen keeps a 20rem column beside it. */
body:has(.setup) { overflow: hidden; }
.setup-scrim { z-index: var(--z-sheet2); }
.setup { position: fixed; inset: 0; z-index: var(--z-sheet3); overflow-y: auto; overscroll-behavior: contain; background: var(--surface);
  padding: 0 var(--gutter) calc(1rem + env(safe-area-inset-bottom));
  --sb: min(calc(var(--vw) - 2 * var(--gutter)), calc((var(--vh) - 4.5rem) * 0.8), 34rem); }
.setup-body { display: grid; gap: 1rem; justify-content: center; align-items: start; grid-template-columns: minmax(0, var(--sb)); padding-top: 0.6rem; }
.setup-boardcol { display: grid; gap: 0.3rem; width: var(--sb); align-content: start; }
.setup-board { width: var(--sb); min-width: 0; }
.setup-palette { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; }
.setup-tool { margin: 0; padding: 0; min-width: 0; min-height: 0; width: 100%; aspect-ratio: 1; justify-self: center;
  display: flex; align-items: center; justify-content: center;
  background: var(--raised); color: var(--text); border: 2px solid transparent; border-radius: var(--r-control); touch-action: none; }
/* Pieces sit on the board's own light square, so both colours read in light and dark. */
.setup-piece { background: var(--board-light); }
.setup-tool img { width: 86%; height: 86%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-select: none; }
.setup-tool[aria-pressed=true] { border-color: var(--accent); }
@media (hover: hover) { .setup-tool:not(.setup-piece):hover { background: var(--hover); } .setup-piece:hover { border-color: var(--control); } }
.setup-carry { position: fixed; z-index: var(--z-sheet4); width: calc(var(--sb) / 8); height: calc(var(--sb) / 8); pointer-events: none;
  transform: translate(-50%, -50%); }
.setup-carry img { width: 100%; height: 100%; }
.setup-side { display: grid; gap: 0.7rem; align-content: start; }
.setup-side button { margin: 0; }
.setup-side label.setup-row { display: flex; }
.setup-row { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 0; }
.setup-row > .small:first-child { min-width: 3rem; }
.setup-castling { display: grid; gap: 0.2rem; }
.setup-turn { justify-self: start; }
.setup-side input.setup-number { width: 6rem; margin: 0; }
.setup-side select { margin: 0; }
.setup-fen { display: grid; gap: 0.2rem; }
.setup-fen input { margin: 0; width: 100%; }
.setup-msg { margin: 0; }
/* The endgame tables under the engine (D-CS.3 A): the result, then the moves with theirs. */
.ws-tb { padding: var(--s1) 0; }
.ws-tb p { margin: 0; }
.ws-tb-moves { display: flex; flex-wrap: wrap; gap: 0 var(--s3); list-style: none; margin: var(--s1) 0 0; padding: 0; }
.ws-tb-moves .mv { margin: 0; padding: 0 0.15rem; min-height: 0; background: none; border: 0; border-radius: 4px; color: var(--strong); font: inherit; font-weight: var(--w-bold); }
@media (hover: hover) { .ws-tb-moves .mv:hover { background: var(--hover); } }
.setup-actions { margin-top: 0.3rem; }
/* One column (phone, iPad upright): Find / Analyse stay in reach at the bottom of the sheet
   while the board and its controls scroll (BOARD_STRUCTURE's phone gaps, D-BS.7). */
@media (max-width: 899px) and (min-height: 501px) {
  .setup { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
  .setup-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-page); margin: 0; justify-content: flex-end;
    padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
}
@media (min-width: 900px) {
  .setup { --sb: min(calc((var(--vh) - 4.5rem) * 0.8), calc(var(--vw) - 2 * var(--gutter) - 22rem), 40rem); }
  .setup-body { grid-template-columns: var(--sb) 20rem; gap: 2rem; }
}
/* A phone on its side: the board as tall as the screen allows, the controls beside it. */
@media (orientation: landscape) and (max-height: 500px) {
  .setup { --sb: min(calc((var(--vh) - 4rem) * 0.8), calc(var(--vw) - 2 * var(--gutter) - 18rem)); }
  .setup .sheet-head { padding: 0.2rem 0; }
  .setup-body { grid-template-columns: var(--sb) minmax(0, 17rem); padding-top: 0.3rem; }
}
/* "My games" in the explorer (SEARCH.md part 2). Last played: from tablet width up. Layout B's bar:
   the database and whose games, always in view. */
.col-last { display: none; white-space: nowrap; }
@media (min-width: 600px) { .col-last { display: table-cell; } }
.your-names .fchips { margin: 0.2rem 0 0.4rem; }
.names-add { display: flex; gap: 0.5rem; width: 100%; }
.names-add input { flex: 1 1 auto; min-width: 0; margin: 0; }
.names-add button { margin: 0; flex: none; }
.filters input[type=text] { width: 100%; }
/* All databases (SEARCH.md item 5): the database a game is in, a quiet label in its row. */
.lib-in-db { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text); background: var(--raised); border-radius: var(--r-control);
  padding: 0 0.4rem; overflow-wrap: anywhere; }
.lib-in-db .lib-ico { flex: none; width: 0.85rem; height: 0.85rem; }

/* Pattern mode of the setup editor (SEARCH.md part 4, D-SR.8 A): the ✕ marks over the board,
   a ninth palette tool, the file toggles. */
.setup-board { position: relative; }
.pattern-mark { position: absolute; width: 12.5%; height: 12.5%; display: grid; place-items: center; pointer-events: none; color: var(--accent); }
.pattern-mark svg { width: 70%; height: 70%; stroke-width: 3; }
.setup-palette.pattern { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.pattern-files { flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.pattern-file-row { display: flex; flex-wrap: wrap; gap: 2px; }
.pattern-file { min-width: 2rem; margin: 0; padding-inline: 0.4rem; }
.pattern-file[aria-pressed=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: var(--w-bold); }

/* The query row (BOARD_STRUCTURE D, T-108 step 4): Where · What · Which games, one row of three
   pickers above Next moves | Games; each a small label over what's on. */
.ex-query { margin: 0 0 0.5rem; display: grid; gap: 0.4rem; }
.qrow { display: flex; gap: 0.4rem; align-items: stretch; }
.ex-pane .pick { flex: 1 1 0; min-width: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.05rem;
  padding: 0.25rem 0.55rem; border: 1px solid var(--control); border-radius: var(--r-control); background: var(--surface);
  color: var(--strong); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); font-weight: var(--w-text); text-align: left; cursor: pointer; }
.ex-pane button.pick { flex: 0 1 auto; }
.ex-pane .pick:hover { background: var(--hover); }
.ex-pane .pick .k { font-size: var(--fs-xs); letter-spacing: var(--ls-xs); color: var(--muted); line-height: 1.2; }
.ex-pane .pick select { width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit;
  text-overflow: ellipsis; cursor: pointer; }
.ex-pane .pick select:focus-visible { outline: none; }
.ex-pane .pick:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ex-query .filter-summary { justify-content: flex-start; }
.ex-result { display: flex; gap: 0.35rem; }

/* The search box in the tab row (T-108 step 4): fills the row's spare width when the row is wide
   enough (a container query: the row, not the screen); an icon otherwise, opening over the tabs. Its finds drop down over the pane. */
.ws-tabs { position: relative; align-items: center; container-type: inline-size; }
.ws-search-slot { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.ws-search-slot > div { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.ws-search-wrap { position: relative; flex: 1 1 auto; min-width: 0; max-width: 22rem; margin: 0 0.4rem; }
.ws-search-wrap .ws-search { margin: 0; }
.ws-search-wrap .ws-search input[type=search] { margin: 0; padding: 0.25rem 0.5rem; font-size: var(--fs-sm); min-height: 0; }
.ws-search-wrap .ws-results { position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-sheet); max-height: var(--finds-max, 50vh); overflow-y: auto; box-sizing: border-box; margin-top: 2px;
  box-shadow: 0 6px 20px var(--shade); min-width: min(22rem, calc(var(--vw) - 2 * var(--gutter))); }
.ws-tabs .ws-search-icon { display: none; }
@container (max-width: 36rem) {
  .ws-search-wrap { flex: none; margin: 0; }
  .ws-tabs .ws-search-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); padding: 0.4rem 0.6rem; }
  .ws-tabs .ws-search-icon svg { width: 1.1rem; height: 1.1rem; }
  .ws-search-wrap .ws-search { display: none; }
  .ws-search-wrap.open { position: absolute; inset: 0; z-index: var(--z-sheet); display: flex; align-items: center; background: var(--bg); max-width: none; padding: 0 0.25rem; }
  .ws-search-wrap.open .ws-search-icon { display: none; }
  .ws-search-wrap.open .ws-search { display: block; flex: 1 1 auto; }
  .ws-search-wrap.open .ws-results { right: 0.25rem; left: 0.25rem; }
}

/* The Find sheet (D-BS.4) and its banner over the results. */
.find-tabs { margin: 0.4rem auto 0; display: flex; justify-content: center; max-width: 40rem; }
.find-presets { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.find-presets button { margin: 0; }
.find-typed { display: grid; gap: 0.3rem; }
.find-typed input { width: 100%; margin: 0; }
.find-steps { min-height: 1.5rem; }
.ex-banner { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--accent); border-radius: var(--r-control);
  padding: 0.4rem 0.6rem; }
.ex-banner .grow { flex: 1 1 auto; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.ex-banner button { margin: 0; flex: none; }
.ex-banner button svg { width: 1rem; height: 1rem; }

/* The query row on a phone (owner picked version a, 2026-10-22-9): under 30rem of pane, one
   summary line; the pickers open in a sheet. */
.ex-pane { container-type: inline-size; }
.qsum { display: none; }
.qsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet4); max-height: 85dvh; overflow-y: auto; display: grid; gap: 0.6rem;
  background: var(--surface); border-top: 1px solid var(--border); border-radius: var(--r-panel) var(--r-panel) 0 0;
  padding: 0.6rem var(--gutter) calc(0.8rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px var(--shade); }
.qsheet .pick { flex: none; }
.qsheet > button { margin: 0; justify-self: start; }
@container (max-width: 30rem) {
  .ex-query .qsum { display: flex; align-items: center; gap: 0.5rem; width: 100%; margin: 0; padding: 0.45rem 0.6rem; text-align: left;
    background: var(--surface); color: var(--strong); border: 1px solid var(--control); border-radius: var(--r-control);
    font-size: var(--fs-sm); letter-spacing: var(--ls-sm); font-weight: var(--w-text); }
  .ex-query .qsum .grow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ex-query > .qrow, .ex-query > .filter-summary, .ex-query ~ .filter-summary { display: none; }
}

/* ---- Puzzles: the solve screen (PUZZLES.md §2, D-PS.5, D-PS.14) ----
   Its own 44 px header for everyone; the site's header, bottom bar and footer step aside so the
   board can take min(var(--vw), 100svh − the bands). On a phone the actions sit at the bottom, within
   thumb reach; on a big screen, just under the board. */
body:has(.pz-page) footer { display: none; }
body:has(.pz-page) { --bottom-bar: 0px; }
body:has(.pz-page) main { padding: 0; }
/* --pz-bands: everything under the board, measured (T-124): the status strip (4.3rem), the buttons
   (9.6rem) and the credit line (2rem), so the page never scrolls on a phone (PUZZLES.md §5). */
.pz-page { --pz-head: 44px; --pz-bands: 15.9rem; max-width: 40rem; margin: 0 auto;
  display: flex; flex-direction: column; min-height: var(--svh); }
/* Puzzle Mayhem keeps its own bands (its bar and buttons differ). */
.pz-page.mh { --pz-bands: 10.5rem; }
.pz-head { display: flex; align-items: center; gap: 0.5rem; height: var(--pz-head);
  padding: 0 calc(var(--gutter) / 2); border-bottom: 1px solid var(--border); }
.pz-back { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px;
  font-size: 1.6rem; line-height: 1; color: var(--strong); text-decoration: none; }
.pz-title { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-md); font-weight: var(--w-bold); color: var(--strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-rating { color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); white-space: nowrap;
  /* Same-width digits in a fixed box: a new rating doesn't nudge the title or the icons (T-124). */
  min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.pz-icon { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px;
  margin: 0; padding: 0; border: 0; background: none; color: var(--strong); font-size: 1.15rem; }
.pz-board { width: min(100%, max(12rem, calc(var(--svh) - var(--pz-head) - var(--pz-bands)))); margin: 0 auto; }
/* Phones: the board stays clear of the screen's edges, where the system's back gesture starts. */
@media (pointer: coarse) and (max-width: 47.99rem) {
  .pz-board { width: min(calc(100% - 28px), max(12rem, calc(var(--svh) - var(--pz-head) - var(--pz-bands)))); }
}
.pz-dot { display: inline-block; flex: none; width: 0.8rem; height: 0.8rem; border-radius: 50%;
  background: var(--piece-white); border: 1px solid var(--control); }
.pz-dot.pz-dot-b { background: var(--piece-black); }
.pz-status { margin: 0; padding: 0.6rem var(--gutter) 0; min-height: 2.6rem; text-align: center;
  color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.pz-ok { color: var(--accent); }
.pz-no { color: var(--error); }
.pz-themes { margin: 0; padding: 0.25rem var(--gutter) 0; text-align: center; color: var(--muted);
  font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
/* The strip under the board: one height whatever it says (owner's pick B, T-124). */
.pz-under { height: 4.3rem; overflow: hidden; flex: none; }
.pz-under .pz-status { min-height: 0; }
.pz-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-small .pz-voted[aria-pressed=true] { border-color: var(--accent); background: var(--raised); box-shadow: 0 0 0 1px var(--accent); }
.pz-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: auto;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom)); }
.pz-big, .pz-small button { width: 100%; min-height: 44px; padding: 0 0.25rem; white-space: nowrap;
  border-radius: var(--r-control); border: 1px solid var(--border); background: var(--surface);
  color: var(--strong); font: inherit; }
.pz-big { min-height: 48px; font-weight: var(--w-bold); }
.pz-small { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.pz-small button { font-size: var(--fs-sm); letter-spacing: var(--ls-sm); overflow: hidden; text-overflow: ellipsis; }
.pz-small button:disabled { color: var(--muted); opacity: 0.6; }
.pz-small button.pz-armed { border-color: var(--accent); color: var(--strong); box-shadow: 0 0 0 1px var(--accent); }
.pzh-how { margin-top: 0.25rem; font-size: var(--fs-sm); }
.pzh-how summary { cursor: pointer; color: var(--muted); }
.pzh-how p { margin: 0.2rem 0 0; }
/* Floats above the buttons for its 4 s, like a toast, so nothing moves (the session check: a line of
   its own pushed the buttons 29px and back, since T-163). */
.pz-actions { position: relative; }
.pz-armed-note { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(100% + 0.25rem); z-index: var(--z-sticky);
  margin: 0; padding: 0.35rem 0.6rem; font-size: var(--fs-sm); color: var(--strong); text-align: center;
  background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r-control); box-shadow: var(--shadow); }
.pz-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pz-credit { margin: 0; padding: 0 var(--gutter) 0.75rem; color: var(--muted);
  font-size: var(--fs-xs); letter-spacing: var(--ls-xs); }
.pz-rate { font-weight: var(--w-text); color: var(--strong); font-variant-numeric: tabular-nums; }
.pz-muted { color: var(--muted); }
.pz-change, .pz-link { margin: 0; padding: 0 0.15rem; border: 0; background: none; font: inherit; color: inherit;
  text-decoration: underline dotted; text-underline-offset: 0.2em; cursor: pointer; min-height: 0; }
.pz-link { color: var(--accent); text-decoration: underline; }
.pz-sheet { padding: 0 var(--gutter) calc(1rem + env(safe-area-inset-bottom)); }
.pz-sheet p { margin: 0.6rem 0; }
.pz-why { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0.6rem 0;
  font-variant-numeric: tabular-nums; }
.pz-why dt { color: var(--muted); }
.pz-why dd { margin: 0; color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.pz-levels { display: grid; gap: 0.5rem; margin: 0.75rem 0; }
.pz-levels button { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; margin: 0; min-height: 48px;
  padding: 0 1rem; border-radius: var(--r-control); border: 1px solid var(--border); background: var(--surface);
  color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.pz-levels small { color: var(--muted); font-weight: var(--w-text); font-size: var(--fs-sm); }
/* A big screen: the actions follow the board, not the window's bottom edge. */
@media (min-width: 600px) and (min-height: 700px) {
  .pz-page:not(.mh) { --pz-bands: 16.7rem; } /* the credit line is taller here (its top padding) */
  .pz-actions { margin-top: 0; }
  .pz-credit { margin-top: auto; padding-top: 0.75rem; }
}
/* A very short phone (320×450, PUZZLES.md §5; T-124): tighter buttons and no credit line (the
   puzzle's game and your history are a tap away in Analyse and the menu), so the board keeps
   ~13rem and the page still doesn't scroll. */
@media (max-height: 520px) and (orientation: portrait) {
  .pz-page:not(.mh) { --pz-bands: 13rem; }
  .pz-page:not(.mh) .pz-credit { display: none; }
  .pz-page:not(.mh) .pz-actions { gap: 0.35rem; padding-top: 0.5rem; padding-bottom: calc(0.5rem + env(safe-area-inset-bottom)); }
  .pz-page:not(.mh) .pz-big { min-height: 44px; }
}

/* ---- Puzzles: the filter sheet (PUZZLES.md §4, D-PS.15 B) ----
   A sheet from the bottom on a phone (the board peeks above it); a column beside the board on a
   wide screen, always open. Short, with the theme groups and More folding in place. */
.pz-filters { position: relative; }
.pz-badge { position: absolute; top: 6px; right: 4px; min-width: 1rem; height: 1rem; padding: 0 0.2rem; border-radius: 0.5rem;
  background: var(--accent); color: var(--on-accent); font-size: 0.65rem; line-height: 1rem; font-weight: var(--w-bold); }
.pz-scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: var(--scrim-soft); }
.pz-fsheet { position: fixed; z-index: var(--z-sheet); left: 0; right: 0; bottom: 0; max-height: max(calc(var(--vh) - 7.5rem), 80dvh); display: flex;
  background: var(--surface); border-top: 1px solid var(--border); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px var(--shade); }
.pz-fsheet > .pf { flex: 1; min-height: 0; }
.pf { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.pf-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem var(--gutter) 0.5rem; border-bottom: 1px solid var(--border); }
.pf-head h2 { margin: 0; flex: 1; font-size: var(--fs-md); color: var(--strong); }
.pf-head h2:focus { outline: none; }
button.pf-done { margin: 0; border: 0; background: none; color: var(--accent); font-weight: var(--w-bold); min-height: 44px; padding: 0 0.25rem; }
.pf-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0.75rem var(--gutter); display: grid; gap: 1rem; align-content: start; }
.pf-foot { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); }
.pf-grp { display: grid; gap: 0.5rem; }
.pf-lab { display: flex; align-items: baseline; gap: 0.5rem; margin: 0; font-weight: var(--w-bold); color: var(--strong); font-size: var(--fs-sm); }
.pf-note { font-weight: var(--w-text); color: var(--muted); font-size: var(--fs-sm); }
.pf-sub { font-size: var(--fs-xs); letter-spacing: var(--ls-xs); text-transform: uppercase; font-weight: var(--w-bold); color: var(--muted); }
.pf-right { margin-left: auto; }
.pf-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: var(--r-control); background: var(--track); }
.pf-seg button { justify-self: stretch; margin: 0; min-height: 36px; padding: 0 0.25rem; border: 0; border-radius: 4px; background: transparent; color: var(--muted);
  font-size: var(--fs-sm); letter-spacing: var(--ls-sm); white-space: nowrap; }
.pf-seg button[aria-pressed=true] { background: var(--knob); color: var(--on-knob); font-weight: var(--w-bold); box-shadow: 0 0 0 1px var(--control); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
button.pf-chip { margin: 0; min-height: 36px; padding: 0 0.65rem; display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--border); border-radius: var(--r-control); background: var(--raised); color: var(--text);
  font-size: var(--fs-sm); letter-spacing: var(--ls-sm); font-weight: var(--w-text); }
button.pf-chip small { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.7rem; letter-spacing: 0; color: var(--muted); }
button.pf-chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.pf-chip[aria-pressed=true] small { color: var(--on-accent); opacity: 0.8; }
.pf-expect { margin: 0; color: var(--muted); font-size: var(--fs-sm);
  /* Two lines kept, so the groups below don't move when "for your 1507" arrives (T-124). */
  min-height: 3em; min-height: 2lh; }
.pf-expect b { color: var(--strong); }
button.pf-link { justify-self: start; margin: 0; min-height: 0; padding: 0.15rem 0; border: 0; background: none; color: var(--accent);
  font-size: var(--fs-sm); font-weight: var(--w-text); text-decoration: underline; text-underline-offset: 0.2em; }
.pf-band { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); }
.pf-band select { width: auto; margin: 0; font: inherit; font-variant-numeric: tabular-nums; }
.pf-folds { display: grid; }
.pf-fold { border: 1px solid var(--border); border-radius: var(--r-control); }
.pf-folds .pf-fold { border-radius: 0; }
.pf-folds .pf-fold + .pf-fold { border-top: 0; }
.pf-folds .pf-fold:first-child { border-radius: var(--r-control) var(--r-control) 0 0; }
.pf-folds .pf-fold:last-child { border-radius: 0 0 var(--r-control) var(--r-control); }
.pf-fold > button { width: 100%; margin: 0; min-height: 44px; display: flex; align-items: center; gap: 0.5rem; padding: 0 0.7rem;
  border: 0; border-radius: inherit; background: var(--surface); color: var(--strong); text-align: left; font-weight: var(--w-text); }
@media (hover: hover) { .pf-fold > button:hover { background: var(--hover); } }
.pf-t { flex: 1; font-size: var(--fs-sm); }
.pf-n { color: var(--muted); font-size: var(--fs-xs); }
.pf-k { color: var(--accent); font-size: var(--fs-xs); font-weight: var(--w-bold); }
.pf-car { color: var(--muted); transition: transform 0.15s; }
.pf-fold.open .pf-car { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .pf-car { transition: none; } }
.pf-in { padding: 0.25rem 0.7rem 0.7rem; display: grid; gap: 0.5rem; }
.pf-in.pf-chips { display: flex; }
input.pf-field { width: 100%; margin: 0; font: inherit; font-size: var(--fs-sm); }
.pf-found { list-style: none; margin: 0; padding: 0; display: grid; }
.pf-found button { width: 100%; margin: 0; min-height: 40px; display: flex; justify-content: space-between; gap: 0.75rem; padding: 0 0.5rem;
  border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: none; color: var(--strong); text-align: left;
  font-size: var(--fs-sm); font-weight: var(--w-text); }
.pf-found small { color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, monospace; }
@media (hover: hover) { .pf-found button:hover { background: var(--hover); } }
.pf-save { display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.pf-save input { flex: 1; min-width: 0; }
.pf-save button { margin: 0; }
.pf-said { margin: 0; min-height: 1em; color: var(--muted); font-size: var(--fs-sm); }
.pf-said:empty { display: none; }
button.pf-go { flex: 1; margin: 0; min-height: 48px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent);
  font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }
button.pf-plain { margin: 0; min-height: 44px; background: var(--surface); color: var(--strong); border-color: var(--control); }
@media (hover: hover) { button.pf-plain:hover { background: var(--hover); } }
.pf-count { flex: 1; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.pf-few { font-weight: var(--w-bold); }
.pf-count.pf-few { color: var(--strong); }

/* Wide: the solve screen on the left, the filters in a column on the right, always open. */
.pz-main { display: contents; }
.pz-page.pz-wide { max-width: 72rem; display: grid; grid-template-columns: minmax(0, 1fr) 22rem; align-items: stretch; }
.pz-wide .pz-main { display: flex; flex-direction: column; min-height: var(--svh); min-width: 0; }
.pz-wide .pz-board { width: min(100%, 40rem, calc(var(--svh) - var(--pz-head) - var(--pz-bands))); }
.pz-wide .pz-actions { width: min(100%, 40rem); margin-left: auto; margin-right: auto; }
.pz-side { position: sticky; top: var(--frame-t); height: var(--svh); display: flex; border-left: 1px solid var(--border); }
.pz-side > .pf { flex: 1; }
/* A phone on its side: the sheet takes the whole height (the board can't peek usefully). */
@media (max-height: 500px) { .pz-fsheet { max-height: 100dvh; top: 0; border-radius: 0; } }

/* ---- Puzzles: your history (PUZZLES.md §11) ---- */
.pzh { max-width: 46rem; margin: 0 auto; display: grid; gap: 1rem; padding-bottom: 2rem; }
.pzh h1 { margin: 0; }
.pzh-back { margin: 0; }
.pzh-back a { color: var(--muted); text-decoration: none; }
.pzh-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.pzh-stats > div { display: grid; gap: 0.1rem; }
.pzh-big { font-size: var(--fs-xl); font-weight: var(--w-bold); color: var(--strong); font-variant-numeric: tabular-nums; line-height: 1.1; }
.pzh-k { color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.pzh-note { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.pzh-note:empty { display: none; }
.pzh-card { display: grid; gap: 0.6rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
.pzh-card h2 { margin: 0; font-size: var(--fs-md); }
.pzh-card .button { justify-self: start; margin: 0; }
.pzh-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.pzh-range { width: 11rem; }
.pzh-chart .hc-plot { height: 9rem; margin-left: 2.5rem; }
.pzh-chart .hc-x { margin-left: 2.5rem; }
.pzh-chart .hc-y { left: -2.5rem; width: 2.2rem; text-align: right; }
.pzh-y-mid { top: 50%; transform: translateY(-50%); }
.pzh-y-bottom { bottom: 0; transform: translateY(50%); }
.hc-plot .pzh-line { stroke: var(--accent); }
.hc-plot .pzh-area { fill: var(--accent); }
.pzh-dot { background: var(--accent); border: 2px solid var(--surface); }
.pzh-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pzh-filters .pf-seg { width: 10rem; }
.pzh-filters select { width: auto; margin: 0; flex: 1 1 10rem; max-width: 16rem; }
.pzh-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pzh-item { display: grid; gap: 0.2rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.pzh-top { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: baseline; gap: 0.75rem; font-variant-numeric: tabular-nums; }
.pzh-top a { font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0; }
.pzh-r { color: var(--muted); }
.pzh-res { color: var(--strong); min-width: 0; }
.pzh-miss .pzh-res { color: var(--error); }
.pzh-chg { font-weight: var(--w-bold); text-align: right; white-space: nowrap; }
.pzh-sub { display: flex; gap: 0.75rem; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.pzh-themes { min-width: 0; }
.pzh-rep { color: var(--accent); font-size: var(--fs-sm); }
.pz-retry { margin: 0; padding: 0.4rem var(--gutter); text-align: center; font-size: var(--fs-sm); color: var(--strong);
  background: var(--raised); border-bottom: 1px solid var(--border); }
.pz-credit a + a { margin-left: 0; }

/* The owner's puzzle reports (§10): a small board beside the words. */
.pzr { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); align-items: start; gap: 1rem; }
.pzr h2 { margin: 0; }
.pzr-text { display: grid; gap: 0.4rem; min-width: 0; }
.pzr-line { margin: 0; font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.pzr-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pzr-actions button { margin: 0; }
@media (max-width: 30rem) { .pzr { grid-template-columns: minmax(0, 1fr); } .pzr-board { max-width: 16rem; } }

/* Analyse here (D-PS.16): the engine strip (the board page's look), the moves, the way through. */
.pz-eng { margin: 0.4rem calc(var(--gutter) / 2); padding: 0.45rem 0.6rem; display: grid; gap: 0.15rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
.pz-eng-top { display: flex; align-items: baseline; gap: 0.6rem; }
.pz-eng-score { font-weight: var(--w-bold); font-size: var(--fs-lg); color: var(--strong); font-variant-numeric: tabular-nums; }
.pz-eng-depth { flex: 1; color: var(--muted); font-size: var(--fs-xs); letter-spacing: var(--ls-xs); }
button.pz-eng-x { margin: 0; min-height: 36px; min-width: 36px; padding: 0; border: 1px solid var(--control); border-radius: var(--r-control);
  background: var(--surface); color: var(--strong); }
.pz-eng-line { margin: 0; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-eng-line b { display: inline-block; min-width: 3.2rem; color: var(--strong); font-variant-numeric: tabular-nums; }
.pz-an-moves { margin: 0; padding: 0.5rem var(--gutter) 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; align-items: baseline; font-size: var(--fs-sm); }
button.pz-an-mv { margin: 0; min-height: 32px; padding: 0 0.3rem; border: 0; border-radius: 4px; background: none; color: var(--text); font-weight: var(--w-text); }
button.pz-an-mv.cur { background: var(--raised); color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.pz-an-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.pz-an-nav button { margin: 0; min-height: 44px; border: 1px solid var(--border); border-radius: var(--r-control); background: var(--surface); color: var(--strong); }
.pz-small.pz-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pz-hidden { display: none; }
.pz-an-choice .pz-first { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pz-an-choice button { flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.6rem 1rem; text-align: left; }
/* While analysing, the puzzle's own lines step aside. */
.pz-an .pz-under { display: none; }
.pz-side-an { flex-direction: column; background: var(--surface); }
.pz-side-an .pz-eng { margin: 0.75rem; }
.pz-side-note { margin: 0 0.9rem; font-size: var(--fs-sm); }
/* The puzzles' landing page and the great players (T-127, owner 2026-10-25-1: layout A, tiles):
   each way to play an equal card; Rated (and a pack's "found") on the accent, the main action. */
.pzl { max-width: 65rem; margin: 0 auto; display: grid; gap: 1rem; padding-bottom: 2rem; }
.pzl h1 { margin: 0; }
.pzl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; }
.pzl-me { color: var(--muted); font-size: var(--fs-sm); }
.pzl-me strong { color: var(--strong); font-size: var(--fs-md); }
.pzl-intro { margin: 0; color: var(--muted); }
.pzl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.pzl-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem; min-height: 8rem; box-sizing: border-box; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); color: var(--text); text-decoration: none; }
a.pzl-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { a.pzl-card:not(.pzl-main):hover { background: var(--hover); } a.pzl-main:hover { filter: brightness(1.08); } }
.pzl-icon { color: var(--strong); flex: none; }
.pzl-t { color: var(--strong); font-size: var(--fs-md); font-weight: var(--w-bold); }
.pzl-d { color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); line-height: 1.4; }
.pzl-k { color: var(--muted); font-size: var(--fs-sm); }
.pzl-text { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; flex: 1; }
.pzl-main { background: var(--accent); border-color: var(--accent); }
.pzl-main .pzl-t, .pzl-main .pzl-d, .pzl-main .pzl-icon { color: var(--on-accent); }
.pzl-edge { border-color: var(--control); }
.pzl-daily { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 0.8rem; min-height: 0; padding: 0.6rem; }
.pzl-daily img, .pzl-ph { width: 7rem; height: 7rem; border-radius: var(--r-control); object-fit: cover; flex: none; background: var(--raised); }
.pzl-line { min-height: 2.8em; }
.pzl-daily .pzl-t { font-size: var(--fs-lg); }
.pzl-go { color: var(--accent); font-weight: var(--w-bold); font-size: var(--fs-sm); }
.pzl-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 0.8rem; min-height: 0; }
.pzl-chev { color: var(--muted); font-size: var(--fs-xl); line-height: 1; }
.pzl-soon { background: var(--raised); border: 1px dashed var(--control); color: var(--muted); }
.pzl-soon .pzl-t, .pzl-soon .pzl-icon { color: var(--muted); }
.pzl-foot { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.pzl-more { min-height: 0; }
.pzl-pack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; padding: 0.9rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-panel); }
.pzl-pack-who { grid-column: 1 / -1; display: grid; gap: 0.35rem; }
.pzl-pack h2 { margin: 0; font-size: var(--fs-lg); }
.pzl-pack .pzl-card { min-height: 7.5rem; }
.pzl-tcs { display: flex; flex-wrap: wrap; gap: 0.35rem; }
button.pzl-chip { margin: 0; padding: 0.3rem 0.8rem; min-height: 2.25rem; border-radius: 999px; font-size: var(--fs-sm); font-weight: var(--w-text);
  background: var(--raised); color: var(--text); border: 1px solid var(--border); }
button.pzl-chip[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); }
@media (pointer: coarse) { button.pzl-chip { min-height: 44px; } }
@media (min-width: 48rem) {
  .pzl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .pzl-card { padding: 1.1rem; min-height: 9.5rem; }
  .pzl-daily { grid-column: span 2; padding: 1rem; gap: 1.25rem; }
  .pzl-daily img, .pzl-ph { width: 12rem; height: 12rem; }
  .pzl-wide { grid-column: span 2; }
  .pzl-grid > .pzl-soon:last-child, .pzl-grid > .pzl-wide2 { grid-column: span 2; }
  .pzl-more { min-height: 0; }
  .pzl-pack { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: 1.25rem; }
  .pzl-pack-who { grid-column: auto; align-content: start; }
}
/* The owner's flags (puzzles migration 010): the Flag button on the solve screen, its reasons. */
.pzf-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; width: 100%; margin-top: 0.4rem; }
.pzf-note { flex: 1 1 10rem; min-width: 0; padding: 0.3rem 0.5rem; font: inherit; font-size: var(--fs-sm); }
button.pzf-reason { margin: 0; padding: 0.25rem 0.7rem; font-size: var(--fs-sm); }
@media (pointer: coarse) { button.pzf-reason { min-height: 44px; } }
.pzf-h { margin: 0.5rem 0 0; font-size: var(--fs-lg); }
/* Puzzle Mayhem (T-129): the mode buttons, the bar over the board (clock, score, strikes), the
   flash after each puzzle, and the run as a strip of squares. */
.mh-before { display: grid; gap: 0.9rem; padding: 1rem var(--gutter); }
.mh-lead { margin: 0; color: var(--text); }
.mh-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
@media (max-width: 30rem) { .mh-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mh-skip { min-height: 2.4rem; padding: 0.3rem 0.9rem; font-size: var(--fs-sm); }
button.mh-mode { width: 100%; display: grid; gap: 0.15rem; justify-items: center; border-radius: var(--r-panel); padding: 0.6rem 0.3rem; min-height: 3.6rem; }
.mh-best { font-size: var(--fs-xs); font-weight: var(--w-text); opacity: 0.85; }
.mh-start { width: 100%; }
.mh-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.4rem var(--gutter);
  font-variant-numeric: tabular-nums; font-weight: var(--w-bold); color: var(--strong); }
.mh-clock { font-size: var(--fs-lg); min-width: 4.5rem; }
.mh-strikes { display: flex; gap: 0.3rem; }
.mh-strike { width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 2px solid var(--control); }
.mh-strike.on { background: var(--error); border-color: var(--error); }
.mh-board { position: relative; border-radius: 4px; transition: box-shadow 0.15s; }
.mh-done { position: absolute; top: 0.4rem; right: 0.4rem; z-index: var(--z-page3); pointer-events: none; display: grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; font-size: 1.3rem; font-weight: var(--w-bold); line-height: 1;
  color: var(--on-solid); background: var(--bad-solid); box-shadow: 0 1px 4px var(--shade-deep); }
.mh-done.ok { background: var(--ok-solid); }
.mh-board.mh-ok { box-shadow: 0 0 0 4px var(--ok-solid); }
.mh-board.mh-no { box-shadow: 0 0 0 4px var(--error); }
.mh-after { display: grid; gap: 0.6rem; padding: 0.8rem var(--gutter) 1.5rem; }
.mh-final { margin: 0; font-size: var(--fs-xl); font-weight: var(--w-bold); color: var(--strong); text-align: center; }
.mh-new { color: var(--accent); }
.mh-strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; }
.mh-sq { display: block; width: 1.6rem; height: 1.6rem; border-radius: 4px; background: var(--error); }
.mh-sq.ok { background: var(--ok-solid); }
@media (pointer: coarse) { .mh-sq { width: 2.2rem; height: 2.2rem; } }
a.mh-back { display: block; text-align: center; margin-top: 0; }
.mh-hint { text-align: center; }
.mh-time { margin-top: 0.4rem; padding: 0.8rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); }
.mh-time h2 { margin: 0 0 0.3rem; font-size: var(--fs-md); }
.mh-time p, .mh-time ul { margin: 0.2rem 0; font-size: var(--fs-sm); }
.mh-time ul { padding-left: 1.1rem; }
.mh-time-k { color: var(--muted); }
.mh-note { margin: 0; padding: 0.3rem var(--gutter); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.pzl-done { color: var(--strong); font-weight: var(--w-bold); font-size: var(--fs-sm); }
.pz-done { color: inherit; font-weight: var(--w-bold); }

/* ---- Repertoires (/repertoire, T-140 R1, REPERTOIRE_R1.md): a list of cards, each with its
   actions and one panel open under them (import, to check, rename). ---- */
.rep { max-width: 52rem; margin: 0 auto; }
.rep-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.rep-head h1 { margin: 0; }
.rep-head .actions { margin-top: 0; gap: 0.5rem; }
.rep-head .actions button { margin-top: 0; }
.rep-intro { margin: 0.75rem 0 0.25rem; }
.rep-msg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; color: var(--text); }
.rep-msg.error { color: var(--error); }
.rep-msg button.link { margin: 0; }
.rep-new { margin: 0 0 1rem; }
.rep-new h2 { font-size: var(--fs-md); }
.rep-sides { border: 0; padding: 0; margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.rep-sides legend { padding: 0; margin-bottom: 0.25rem; color: var(--muted); }
/* The board's Add line to repertoire (REPERTOIRE_R2.md step 5): which repertoire. */
.rep-pick { border: 0; padding: 0; margin: 0.6rem 0 0; display: grid; gap: 0.3rem; }
.rep-pick legend { padding: 0; margin-bottom: 0.25rem; color: var(--muted); }
.rep-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.rep-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; }
.rep-item h2 { font-size: var(--fs-md); margin: 0; overflow-wrap: anywhere; }
.rep-side { color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 0.5rem; }
.rep-desc { margin: 0.25rem 0 0; color: var(--text); overflow-wrap: anywhere; }
.rep-size { margin: 0.25rem 0 0; }
.rep-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.rep-actions button, .rep-actions .button { margin: 0; }
.rep-panel { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.rep-panel > p { color: var(--text); }
.rep-form { margin: 0.5rem 0 0; }
.rep-form label.button { margin-top: 0.4rem; }
textarea.rep-paste { min-height: 8rem; }
.rep-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.rep-checks p { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.rep-checks .rep-actions { margin-top: 0.3rem; }
.rep-cap { margin-top: 0.75rem; }

/* ---- The repertoire trainer, /repertoire/train (REPERTOIRE_R4.md; phone first) ---- */
.tr-page { max-width: 36rem; margin: 0 auto; min-height: var(--svh); display: flex; flex-direction: column;
  background: var(--bg); }
.tr-head { display: flex; align-items: center; gap: 0.5rem; min-height: 3rem; padding: 0 var(--gutter) 0 0.25rem;
  border-bottom: 1px solid var(--border); background: var(--surface); }
.tr-back { display: inline-flex; align-items: center; min-height: 44px; padding-left: 0.75rem;
  text-decoration: none; font-size: var(--fs-sm); }
.tr-title { flex: 1; font-weight: var(--w-bold); color: var(--strong); }
.tr-count { font-size: var(--fs-sm); color: var(--muted); }
.tr-stop { width: 44px; height: 44px; border: 0; background: none; font: inherit; font-size: 1.2rem; line-height: 1;
  color: var(--muted); cursor: pointer; }
.tr-progress { display: block; height: 4px; background: var(--border); }
.tr-progress > span { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.tr-line { margin: 0; padding: 0.6rem var(--gutter); min-height: 2.75rem; box-sizing: border-box;
  font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.tr-board { width: min(100%, max(12rem, calc(var(--svh) - 19rem)), 36rem); margin: 0 auto; }
@media (pointer: coarse) and (max-width: 47.99rem) {
  .tr-board { width: min(calc(100% - 28px), max(12rem, calc(var(--svh) - 19rem))); }
}
.tr-says { padding: 0.9rem var(--gutter) 1.25rem; display: flex; flex-direction: column; gap: 0.4rem;
  align-items: center; text-align: center; }
.tr-prompt { margin: 0; font-size: var(--fs-lg); color: var(--strong); }
.tr-sub { margin: 0; font-size: var(--fs-sm); }
.tr-ok { color: var(--accent); font-weight: var(--w-bold); }
.tr-show { min-height: 44px; }
.tr-card { align-self: stretch; text-align: left; display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0.75rem 0.9rem; border-radius: var(--r-panel); background: var(--raised);
  border: 1px solid var(--border); line-height: 1.45; }
.tr-card strong { color: var(--strong); }
.tr-new { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: transparent; }
.tr-drill { background: var(--surface); border-style: dashed; border-color: var(--control); }
.tr-tag { font-size: var(--fs-xs); font-weight: var(--w-bold); letter-spacing: 0.04em; color: var(--accent); }
.tr-drill .tr-tag { color: var(--muted); }
.tr-worth { border-top: 1px solid var(--border); padding-top: 0.35rem; }
.tr-pad { padding: 1.25rem var(--gutter); display: flex; flex-direction: column; gap: 1rem; }
.tr-today h1 { margin: 0; font-size: var(--fs-xl); color: var(--strong); }
.tr-today p { margin: 0.25rem 0 0; }
.tr-reps { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-panel); }
.tr-reps:empty { display: none; }
.tr-reps li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--border); }
.tr-reps li:first-child { border-top: 0; }
.tr-reps li > :first-child { flex: 1; color: var(--strong); }
.tr-start { display: block; box-sizing: border-box; width: 100%; text-align: center; font: inherit;
  font-size: var(--fs-md); font-weight: var(--w-bold); border: 0; border-radius: var(--r-control);
  background: var(--accent); color: var(--on-accent); padding: 0.8rem; min-height: 48px;
  text-decoration: none; cursor: pointer; }
.tr-says .tr-start { margin-top: 0.4rem; }
.tr-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-block: 0.4rem; }
.tr-filters a.ld-chip { text-decoration: none; }
.tr-more { font: inherit; font-weight: var(--w-bold); border: 1px solid var(--control); border-radius: var(--r-control);
  background: var(--surface); color: var(--strong); padding: 0.7rem; min-height: 48px; cursor: pointer; }
.tr-waiting { text-align: center; margin: 0; }
.tr-figures { margin: 0; border-top: 1px solid var(--border); padding-top: 0.8rem; display: flex;
  flex-direction: column; gap: 0.35rem; font-size: var(--fs-sm); }
.tr-figures div { display: flex; justify-content: space-between; gap: 1rem; }
.tr-figures dd { margin: 0; font-weight: var(--w-bold); color: var(--strong); }
.tr-perday select { font: inherit; }
/* The shelf's way in (R4): Train: 10 today. */
.rep-train { display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; border-radius: var(--r-panel);
  background: var(--accent); color: var(--on-accent); text-decoration: none; min-height: 48px; box-sizing: border-box; }
.rep-train > span:first-child { flex: 1; display: flex; flex-direction: column; }
.rep-train > span:last-child { font-size: 1.4rem; }
.rep-train b { font-size: var(--fs-md); }
.rep-train small { font-size: var(--fs-sm); }
.rep-due { font-size: var(--fs-sm); font-weight: var(--w-bold); white-space: nowrap; }
/* Play through, in a repertoire's own tab (REPERTOIRE_R4.md D-R4C.2 C). */
.ws-pt-start { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 0.75rem; }
.ws-pt { border: 1px solid var(--accent); border-radius: var(--r-panel); background: var(--surface);
  padding: 0.6rem 0.75rem; margin: 0 0 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.ws-pt p { margin: 0; }
.ws-pt-head { display: flex; align-items: baseline; gap: 0.5rem; }
.ws-pt-head strong { flex: 1; color: var(--strong); }
.ws-pt-keys { display: flex; gap: 0.4rem; }
.ws-pt-keys button { min-width: 44px; min-height: 44px; }
.ws-pt-next { flex: 1; font-weight: var(--w-bold); }

/* ---- From games (T-140 R5, REPERTOIRE_R5.md §12): what for, which games, the openings found,
   pick up to 3, the cards with their notes, Keep. Phone first. ---- */
.found h1 { margin: 0.25rem 0 0.75rem; }
.found-step { font-size: var(--fs-md); margin: 1.25rem 0 0.4rem; }
.found-step small { font-weight: var(--w-text); }
.found-purposes { display: grid; gap: 0.5rem; }
@media (min-width: 700px) { .found-purposes { grid-template-columns: repeat(3, 1fr); } }
.found-purposes button.set { padding: 0.7rem 0.8rem; }
.found-purposes button.set b { color: var(--strong); }
.found-pick { display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; }
.found-pick label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; align-items: center;
  padding: 0.6rem 0.8rem; min-height: 44px; box-sizing: border-box; border-bottom: 1px solid var(--border); cursor: pointer; }
.found-pick label:last-child { border-bottom: 0; }
.found-pick label.off { color: var(--muted); cursor: default; }
.found-pick input { margin: 0; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.found-pick span:last-child { font-variant-numeric: tabular-nums; }
.found-player { min-height: 44px; width: 100%; max-width: 24rem; }
.found-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.9rem; }
.found-level { margin-top: 0.9rem; }
.found-card h2 { margin: 0 0 0.2rem; }
.found-notes { list-style: none; padding: 0; margin: 0.5rem 0 0.75rem; display: grid; gap: 0.6rem; }
.found-notes li { border-left: 3px solid var(--accent); padding: 0.1rem 0 0.1rem 0.6rem; }
.found-notes button.found-note { margin: 0; padding: 0.15rem 0; background: none; border: 0; text-align: left; color: var(--strong);
  font-weight: var(--w-bold); min-height: 44px; }
@media (hover: hover) { .found-notes button.found-note:hover { text-decoration: underline; } }
.found-notes p { margin: 0.15rem 0 0.2rem; }
.found-first { font-size: var(--fs-sm); color: var(--muted); margin: 0.9rem 0 0.2rem; }
.found-kind { color: var(--accent); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; margin-right: 0.3rem; }
.found-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-toast); background: var(--bg); border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px var(--shade); padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom) + var(--bottom-bar));
  max-height: 85dvh; overflow: auto; border-radius: var(--r-panel) var(--r-panel) 0 0; }
@media (min-width: 700px) { .found-sheet { left: 50%; right: auto; bottom: auto; top: 15vh; transform: translateX(-50%);
  width: min(32rem, 92vw); border: 1px solid var(--border); border-radius: var(--r-panel); } }
.found-sheet h2 { margin: 0 0 0.6rem; }
.found-sheet input[type=text] { width: 100%; box-sizing: border-box; margin: 0.2rem 0 0.6rem; }
.found-opt { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.4rem 0; }
.found-opt input { margin-top: 0.25rem; accent-color: var(--accent); }

/* The board's Found tab (R5, D-R5.16 B): Keep in place of Save, the notes strip, the pane. */
a.button.ws-found-keep { margin: 0; padding: 0.35rem 0.9rem; }
.ws-found-strip { display: flex; align-items: center; gap: 0.25rem; margin: 0.35rem 0 0; padding: 0.15rem;
  background: var(--raised); border-radius: var(--r-control); }
p.ws-found-strip { padding: 0.45rem 0.6rem; }
.ws-found-strip button { margin: 0; min-height: 44px; }
button.ws-found-nb { background: none; border: 0; color: var(--strong); font-size: 1.15rem; padding: 0 0.7rem; }
button.ws-found-nb:disabled { opacity: 0.3; }
button.ws-found-nt { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--text);
  font-weight: var(--w-text); font-size: var(--fs-sm); padding: 0 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.ws-found-nt b { color: var(--strong); }
.ws-found-dot { color: var(--accent); font-weight: var(--w-bold); }
.mv .ws-found-dot { margin-left: 0.1rem; }
.mv.cur .ws-found-dot { color: var(--on-accent); }
.ws-found-note { border: 1px solid var(--accent); border-radius: var(--r-panel); padding: 0.7rem 0.8rem; margin: 0.5rem 0 0.8rem; background: var(--surface); }
.ws-found-note h3 { margin: 0.2rem 0 0.3rem; font-size: var(--fs-md); color: var(--strong); }
.ws-found-note p { margin: 0.2rem 0; }
.ws-found-kind { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: var(--w-bold); }
.ws-found-sect { color: var(--muted); font-weight: var(--w-bold); margin: 0.6rem 0 0.2rem; }
.ws-found-moves { list-style: none; margin: 0; padding: 0; }
.ws-found-moves li { border-bottom: 1px solid var(--border); padding: 0.2rem 0; }
.ws-found-moves p { margin: 0 0 0.3rem; }
button.ws-found-mv { margin: 0; width: 100%; min-height: 44px; text-align: left; background: none; border: 0; color: var(--text); font-weight: var(--w-text); padding: 0.2rem 0; }
/* Face their openings (T-230, frames XF1-XF3): the Face side tab. */
.ws-face { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.2rem 0; }
.ws-face-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.ws-face-h h3 { margin: 0; font-size: var(--fs-md); color: var(--strong); }
.ws-face > p { margin: 0; }
.ws-face-status { color: var(--strong); font-weight: var(--w-bold); }
.ws-face-say { padding: 0.55rem 0.7rem; border-radius: var(--r-panel); background: var(--acc-soft); color: var(--text); line-height: 1.45; }
.ws-face-say.hand { background: var(--panel2); }
.ws-face-say b { color: var(--strong); }
.ws-face-moves { display: grid; grid-template-columns: 2.4em 1fr 1fr; gap: 2px 0.5rem; align-items: center; font-variant-numeric: tabular-nums; }
.ws-face-n { color: var(--muted); font-size: var(--fs-sm); }
button.ws-face-mv { margin: 0; padding: 0.15rem 0.35rem; min-height: 32px; width: 100%; text-align: left; background: none; border: 0; border-radius: 4px; color: var(--text); font-weight: var(--w-text); }
button.ws-face-mv.cur { background: var(--acc-soft); color: var(--strong); }
.ws-face-t, .ws-face-sf { margin-left: 0.3rem; font-size: 0.66rem; font-weight: var(--w-bold); }
.ws-face-t { color: var(--accent); }
.ws-face-sf { color: var(--muted); }
.ws-face-ctl { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ws-face-ctl .k-btn { margin: 0; min-height: 2.25rem; padding: 0 0.8rem; font-size: var(--fs-sm); background: var(--panel2); color: var(--ink); }
.ws-face-ctl .k-btn:disabled { opacity: 0.55; }
.ws-face-ctl .k-btn.ws-face-go { background: var(--accent); color: var(--on-accent); }
.ws-face-two { display: grid; grid-template-columns: 1fr 1fr; }
.ws-face-two .k-btn { width: 100%; }
.ws-face-stop { display: flex; flex-direction: column; gap: 0.4rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.ws-face-stop p { margin: 0; }
.ws[data-layout=phone] .ws-face { padding: 0 var(--s3); }
button.ws-found-mv b { color: var(--strong); }
@media (hover: hover) { button.ws-found-mv:hover { background: var(--hover); } }

/* Retry positions on the trainer's start screen (F13 D-GR.21/.22 A). */
.tr-retry { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.75rem 0.9rem; border-radius: var(--r-panel);
  background: var(--surface); border: 1px solid var(--border); }
.tr-retry-head { display: flex; align-items: center; gap: 0.6rem; }
.tr-retry-head strong { color: var(--strong); }
.tr-retry-head > span { flex: 1; min-width: 0; }
.tr-retry-head .link { min-height: 44px; }
.tr-retry > a { align-self: flex-start; min-height: 32px; display: inline-flex; align-items: center; }
.tr-retry-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tr-retry-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-top: 1px solid var(--border); }
.tr-retry-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.tr-retry-text strong { color: var(--strong); overflow-wrap: anywhere; }
.tr-retry-list .link { min-height: 44px; }
.tr-diagram { flex: none; width: 4.5rem; height: 4.5rem; display: grid; grid-template-columns: repeat(8, 1fr);
  border-radius: 3px; overflow: hidden; }
.tr-diagram > span { background: var(--mcl-dark); position: relative; }
.tr-diagram > span.light { background: var(--mcl-light); }
.tr-diagram img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Ways in to Retry (F13 D-GR.21/.22 A): the shelf's row, the library's link. */
.rep-retry { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; padding: 0.7rem 1rem;
  border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--border); color: var(--strong);
  text-decoration: none; min-height: 48px; box-sizing: border-box; }
.rep-retry > span:first-child { font-weight: var(--w-bold); }
.rep-retry > span:nth-child(2) { flex: 1; }
.lib-retry { float: right; display: inline-flex; align-items: center; min-height: 32px; font-weight: var(--w-bold); }

/* ---------- Game review (F13 G1a, workspace/review.rs; mock-up v3, spikes/f13-mock) ---------- */
.ws-rv-pane.off { display: none; }
.ws-rv { padding: 0.5rem 0.1rem 1rem; font-size: var(--fs-sm); }
.ws-rv:focus { outline: none; }
.ws-rv p { margin: 0 0 0.5rem; }
.ws-rv button { margin: 0; }
.ws-rv-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.6rem 0; }
.ws-rv-two button { width: 100%; }
/* E2 (frames RP1-RP4, RW1-RW2, RD1): the start card with the guess switch and its own bar; the
   check filling in; the side question; the guess as your moves in big buttons. */
/* A wide column: the start card's bar at the column's foot (frame RD1). */
.ws:is([data-layout=desk], [data-layout=ipad-wide]) .ws-rv-start { display: flex; flex-direction: column; min-height: 100%; }
.ws:is([data-layout=desk], [data-layout=ipad-wide]) .ws-rv-start > .ws-rv-bar { margin-top: auto; }
h3.ws-rv-starth { margin: 0.2rem 0 0.2rem; font-size: var(--fs-md); color: var(--strong); }
button.ws-rv-gsw { width: 100%; margin: 0.4rem 0 0.6rem; padding: 0.5rem 0.2rem; min-height: 52px; background: none; border: 0; color: var(--text); font-weight: var(--w-text); }
button.ws-rv-gsw > .ic { flex: none; width: 1.25rem; height: 1.25rem; color: var(--dim); }
button.ws-rv-gsw .tx { flex: 1; min-width: 0; }
.ws-rv-checking { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.3rem 0 0.6rem; }
p.ws-rv-ch { margin: 0; display: grid; }
p.ws-rv-ch b { color: var(--strong); }
.ws-rv-prog { height: 8px; border-radius: 4px; background: var(--panel3); overflow: hidden; }
.ws-rv-prog i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
@media (prefers-reduced-motion: reduce) { .ws-rv-prog i { transition: none; } }
p.ws-rv-rest { margin: 0; padding: 0.6rem 0.8rem; }
.ws-rv-ask h3 { margin: 0 0 0.3rem; font-size: var(--fs-md); color: var(--strong); }
.ws-rv-ask button.ws-rv-side { width: 100%; margin: 0 0 0.5rem; }
.ws-rv-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin: 0.5rem 0; }
button.ws-rv-pick { display: flex; align-items: center; width: 100%; margin: 0; min-height: 44px; justify-content: flex-start; padding: 0 0.8rem; border: 0; border-radius: var(--r-control); background: var(--surface); box-shadow: var(--shadow); color: var(--strong); font: inherit; font-weight: var(--w-bold); }
button.ws-rv-pick.cur { outline: 2px solid var(--accent); }
button.ws-rv-pick.on { background: var(--accent); color: var(--on-accent); }
.ws-rv-act { margin: 0.6rem 0; }
.ws-rv-act > button { width: 100%; }
.ws-rv-ends { display: grid; gap: 0.5rem; }
.ws-rv-ends > a.button { display: block; text-align: center; }
/* On a phone the main action stays in reach under the pane. */
@media not ((min-width: 1024px), (orientation: landscape) and (min-width: 640px)) {
  .ws-rv-act { position: sticky; bottom: calc(var(--bottom-bar) + 0.25rem); z-index: var(--z-page2); background: var(--bg); padding: 0.3rem 0; }
}
.ws-rv-ask { background: var(--raised); border-radius: var(--r-panel); padding: 0.7rem 0.8rem; margin: 0.4rem 0 0.6rem; }
.ws-rv-head { display: flex; gap: 0.7rem; align-items: center; margin: 0.1rem 0 0.4rem; }
.ws-rv-head h2 { margin: 0; font-size: var(--fs-lg); color: var(--strong); line-height: 1.25; }
.ws-rv-eco { flex: none; width: 3rem; height: 3rem; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: var(--w-bold); }
p.ws-rv-res { margin: 0.15rem 0 0; color: var(--muted); }
/* D-DR.1 B (wide): the game in a compact header; the graph, one panel where you are, the move list
   in its own scroll under it; the rest folded. */
.ws-rv-head.compact { gap: 0.5rem; margin: 0 0 0.2rem; }
.ws-rv-head.compact .ws-rv-eco { width: 2.2rem; height: 2.2rem; border-radius: 8px; font-size: var(--fs-sm); }
.ws-rv-head.compact h2 { font-size: var(--fs-md); }
.ws-rv-head.compact p.ws-rv-res { font-size: var(--fs-sm); margin: 0; }
.ws-rv-panel { border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); padding: 0.3rem 0.8rem 0.6rem; margin: 0.5rem 0; min-height: 11rem; }
.ws-rv-panel .ws-rv-tp { border: 0; border-radius: 0; padding: 0; background: none; }
.ws-rv-panel .ws-rv-story { margin: 0.2rem 0 0.4rem; }
.ws-rv-b .ws-rv-spine { max-height: min(24rem, 45vh); overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r-control); margin: 0; }
details.ws-rv-fold > summary { cursor: pointer; padding: 0.5rem 0; font-weight: var(--w-bold); color: var(--strong); }
details.ws-rv-fold[open] > summary { margin-bottom: 0.3rem; }
.ws-rv-guess { margin: 0.4rem 0; }
.ws-rv-guess h3 { margin: 0 0 0.2rem; color: var(--strong); font-size: var(--fs-md); }
.ws-rv-eng { margin: 0.3rem 0; }
.ws-rv-mstrip { display: flex; align-items: center; gap: 0.2rem; overflow-x: auto; scrollbar-width: none; padding: 0.15rem 0 0.3rem; }
.ws-rv-mstrip::-webkit-scrollbar { display: none; }
.ws-rv-mstrip .ws-rv-no { padding: 0 0 0 0.3rem; flex: none; }
/* The walk's strip (frame RP7): moves as text, the one you're on in the accent. */
.ws-rv-mstrip button.ws-rv-sm { flex: none; width: auto; min-height: 0; padding: 0.2rem 0.4rem; border: 0; border-radius: 6px; background: none; gap: 0; font-weight: var(--w-bold); }
.ws-rv-mstrip button.ws-rv-sm.cur { background: var(--accent); color: var(--on-accent); }
.ws-rv-mstrip .ws-rv-no { color: var(--muted); font-size: var(--fs-sm); }
button.ws-rv-sm.ws-rv-gc.on { box-shadow: inset 0 0 0 2px var(--accent); font-weight: var(--w-bold); }
ul.ws-rv-facts { list-style: none; padding: 0; margin: 0.6rem 0; border-top: 1px solid var(--border); }
ul.ws-rv-facts:empty { display: none; }
ul.ws-rv-facts li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.5rem; padding: 0.45rem 0.1rem; border-bottom: 1px solid var(--border); }
ul.ws-rv-facts b { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 0.1rem; }
/* The graph */
.ws-rv-graph { margin: 0.5rem 0 0.2rem; }
/* The graph under the board on an iPad on its side and a desktop (D-OF.1 A, owner 2026-11-10-1;
   T-183's pinned column graph before it): the board gives up --under for it. */
.ws-under-board:empty { display: none; }
.ws:has(.ws-under-board:not(:empty)) { --under: 9rem; }
.ws-under-board .ws-rv-graph { margin: 0.2rem 0 0; }
.ws-under-board .ws-rv-svg > svg:not(:first-child) { display: none; }
.ws-under-board .ws-rv-graph .ws-rv-svg > svg:first-child, .ws-under-board .ws-rv-gov { height: 112px; }
.ws-rv-gcap { display: flex; justify-content: space-between; gap: var(--s2); margin: 0.75rem 0 0; }
.ws[data-layout=ipad-wide] .ws-under-board { padding-left: 3rem; }
.ws-rv-gcap span:last-child { text-align: right; }
.ws-rv-gbox { position: relative; touch-action: pan-y; cursor: crosshair; user-select: none; }
.ws-rv-gbox:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The pins look 24px; a finger's target is 44px (the site's touch size). */
button.ws-rv-gp::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.ws-rv-svg svg { width: 100%; display: block; }
.ws-rv-graph .ws-rv-svg > svg:first-child { height: 140px; border-radius: var(--r-control) var(--r-control) 0 0; }
.ws-rv-svg .mid { stroke: var(--g-mid); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ws-rv-svg .ln { fill: none; vector-effect: non-scaling-stroke; }
/* Graph colours on trial (owner, 2026-11-02-3): A two-tone, filled to the middle (ahead green,
   behind red); B one accent area fading down. */
.ws-rv-graph .bg { fill: var(--surface); }
.ws-rv-graph .up { fill: color-mix(in srgb, var(--m-good) 55%, transparent); }
.ws-rv-graph .dn { fill: color-mix(in srgb, var(--m-bl) 50%, transparent); }
.ws-rv-graph .ln { stroke: var(--strong); stroke-width: 1.5; }
.ws-rv-graph .ws-rv-svg > svg:first-child { border: 1px solid var(--border); box-sizing: border-box; }
.ws-rv-svg .cursor { stroke: var(--m-bl); stroke-width: 2; vector-effect: non-scaling-stroke; }
svg.ws-rv-clk { height: 24px; background: var(--raised); border-radius: 0 0 var(--r-control) var(--r-control); }
.ws-rv-clk path { fill: none; vector-effect: non-scaling-stroke; }
.ws-rv-clk .you { stroke: var(--strong); stroke-width: 2; } .ws-rv-clk .them { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 2; }
.ws-rv-gov { position: absolute; left: 0; right: 0; top: 0; height: 140px; pointer-events: none; }
.ws-rv-gd, .ws-rv-gp, .ws-rv-gg { position: absolute; transform: translate(-50%, -50%); }
.ws-rv-gd { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--bg); }
.ws-rv-gd.mi { background: var(--m-mi); } .ws-rv-gd.bl { background: var(--m-bl); }
.ws-rv-gg { top: 90%; color: var(--muted); font-size: 12px; } .ws-rv-gg.hit { color: var(--m-good); }
button.ws-rv-gp { pointer-events: auto; width: 24px; height: 24px; min-height: 0; min-width: 0; padding: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 2px solid var(--bg); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ws-rv-lgd { display: flex; justify-content: flex-end; flex-wrap: wrap; }
button.ws-rv-phase { display: block; text-align: left; margin: 0.35rem 0 0; color: var(--text); font-size: var(--fs-sm); }
.ws-rv-svg .ph { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.ws-rv-phm { position: absolute; top: 2px; margin-left: 4px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.ws-rv-phm.end { transform: translateX(-100%); margin-left: -4px; }
.ws-rv-lgd p { margin: 0.2rem 0; }
button.ws-rv-qm { width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; border-radius: 50%; font-size: var(--fs-xs); }
/* E4: a phone header's dots in the walk (frame RP7), one per turning point. */
.ws-rv-dots { display: flex; gap: 4px; padding-right: var(--s2); flex: none; }
.ws-rv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--panel3); display: block; }
.ws-rv-dots i.on { background: var(--accent); }
.ws-rv-key { white-space: nowrap; margin-right: 0.4rem; }
.ws-rv-key::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; margin: 0 0.25em 0 0.1em; }
.ws-rv-key.in::before { background: var(--m-in); } .ws-rv-key.mi::before { background: var(--m-mi); } .ws-rv-key.bl::before { background: var(--m-bl); } .ws-rv-key.good::before { background: var(--m-good); }
table.ws-rv-vs { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
table.ws-rv-vs th { text-align: left; width: 3.5rem; color: var(--muted); font-weight: var(--w-bold); padding: 0.3rem 0; }
table.ws-rv-vs td { padding: 0.3rem 0; }
table.ws-rv-vs td.ws-rv-acc { width: 4.5rem; font-size: var(--fs-md); font-weight: var(--w-bold); color: var(--strong); }
tr.ws-rv-vsh td { padding: 0; font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ws-rv-kick { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: var(--w-bold); }
h3.ws-rv-title { margin: 0.15rem 0 0.35rem; font-size: var(--fs-lg); color: var(--strong); }
p.ws-rv-lead { font-size: var(--fs-md); }
p.ws-rv-said { margin: 0.5rem 0; padding: 0.45rem 0.6rem; border-radius: var(--r-control); font-weight: var(--w-bold); color: var(--strong); background: color-mix(in srgb, var(--m-mi) 16%, transparent); }
p.ws-rv-said.ok { background: color-mix(in srgb, var(--m-good) 16%, transparent); }
table.ws-rv-mv { width: 100%; border-collapse: collapse; margin: 0.4rem 0; }
table.ws-rv-mv td { padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--border); }
table.ws-rv-mv td.san { font-weight: var(--w-bold); color: var(--strong); }
table.ws-rv-mv td.r { text-align: right; color: var(--muted); }
.ws-rv-lines.folded { display: none; }
.ws-rv-fold { display: block; margin: 0.3rem 0; }
table.ws-rv-bands th { padding: 0.3rem 0.4rem; text-align: left; font-weight: var(--w-bold); color: var(--muted); font-size: 0.85em; border-bottom: 1px solid var(--border); }
table.ws-rv-bands th.r { text-align: right; }
table.ws-rv-bands tr.on td { color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.ws-rv-sw { display: inline-block; width: 0.8em; height: 0.25em; border-radius: 2px; margin-right: 0.4em; vertical-align: middle; }
.ws-rv-sw.be { background: var(--m-good); } .ws-rv-sw.al { background: var(--m-also); } .ws-rv-sw.pl { background: var(--m-bl); }
.ws-rv-lines { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.6rem 0 0.2rem; }
.ws-rv-lines button.on { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.ws-rv-step { display: flex; align-items: center; gap: 0.3rem; margin: 0.3rem 0 0.5rem; }
.ws-rv-step span { flex: 1; line-height: 1.5; }
p.ws-rv-why { border-left: 3px solid var(--m-good); padding-left: 0.55rem; }
.ws-rv-causes { margin-top: 0.6rem; }
.ws-rv-chips { display: flex; gap: 0.3rem; flex-wrap: wrap; margin: 0.4rem 0; }
button.ws-rv-chip { padding: 0.3rem 0.65rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: var(--w-text); font-size: var(--fs-sm); }
button.ws-rv-chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
button.ws-rv-chip.sug { border-color: var(--accent); border-style: dashed; }
/* Tactic names (F13_G2_TACTICS D-TN.4 A): the tag over the why lines, and the hint. */
.ws-rv-tag { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--raised); color: var(--text); border: 1px solid var(--accent); font-size: var(--fs-sm); font-weight: var(--w-bold); }
.ws-rv-hint { margin: 0.4rem 0 0; }
button.ws-rv-hint { min-height: 44px; }
label.ws-rv-opt { display: flex; gap: 0.5rem; align-items: center; margin: 0.5rem 0; min-height: 44px; }
label.ws-rv-opt input { margin: 0; flex: none; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
button.ws-rv-fact { display: block; width: 100%; text-align: left; font: inherit; font-weight: var(--w-text); color: var(--text); padding: 0.55rem 0.7rem; border: 0; border-left: 3px solid var(--accent); background: var(--surface); margin: 0.45rem 0; border-radius: 0 var(--r-control) var(--r-control) 0; }
button.ws-rv-fact.on { background: var(--raised); border-left-width: 5px; }
div.ws-rv-fact { padding: 0.55rem 0.7rem; border-left: 3px solid var(--border); margin: 0.45rem 0; }
/* The opening (F13_OPENING D-OS.1 A): the name with how it fares; "At your level" as sentences
   in the facts' look (owner, 2026-11-03-3: sentences, not a list). */
button.ws-rv-oname b { font-size: var(--fs-md); color: var(--strong); }
button.ws-rv-oname span { display: block; color: var(--muted); margin-top: 0.15rem; }
h4.ws-rv-oh { margin: 0.8rem 0 0.2rem; font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.ws-rv-sec .ws-rv-fact + button.secondary { margin-top: 0.4rem; }
/* The middlegame (F13 G3): the structure in the opening's look, then one fact per plan. */
div.ws-rv-plan b { color: var(--strong); }
div.ws-rv-plan span { white-space: nowrap; }
.ws-rv-walkmid { margin-top: 0.6rem; }
/* The review and your repertoire (F13_REPERTOIRE): the file line, its add, what training counted. */
.ws-rv-file button.ws-rv-fact { margin-bottom: 0.3rem; }
.ws-rv-file p { margin: 0.2rem 0 0.5rem 0.9rem; }
button.ws-rv-repadd { display: block; min-height: 44px; margin: 0.3rem 0 0.5rem 0.9rem; max-width: calc(100% - 0.9rem); text-align: left; white-space: normal; }
h3.ws-rv-title small { font-size: var(--fs-sm); color: var(--muted); font-weight: var(--w-text); }
/* The takeaway */
.ws-rv-lesson { border: 1px solid var(--accent); border-radius: var(--r-panel); padding: 0.7rem 0.85rem; margin: 0.7rem 0; background: var(--surface); }
.ws-rv-lesson p { margin: 0.3rem 0 0; }
.ws-rv-lesson > p:first-of-type { font-size: var(--fs-md); }
button.ws-rv-gp.on { box-shadow: 0 0 0 3px var(--strong); }
/* The column (review page v2, D-RP.1 A): sections; every move written is a link. */
.ws-rv-sec { padding: 0.4rem 0 0.8rem; border-top: 1px solid var(--border); }
.ws-rv-sec:first-of-type { border-top: 0; }
h3.ws-rv-h { margin: 0.5rem 0 0.4rem; font-size: var(--fs-md); color: var(--strong); }
p.ws-rv-story { font-size: var(--fs-md); line-height: 1.55; color: var(--text); margin: 0.2rem 0 0.6rem; }
button.ws-rv-mvl { display: inline; min-height: 0; padding: 0 0.15em; margin: 0; font: inherit; font-weight: var(--w-bold); color: var(--accent);
  background: none; border: 0; border-radius: 3px; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; cursor: pointer; }
button.ws-rv-mvl:hover { background: var(--hover); }
button.ws-rv-cnt { min-height: 32px; padding: 0.15rem 0.55rem; margin: 0 0.3rem 0.3rem 0; background: var(--surface); color: var(--text); border: 1px solid var(--border); font-weight: var(--w-text); font-size: var(--fs-sm); }
button.ws-rv-cnt:hover { border-color: var(--accent); }
.ws-rv-goods { margin: 0.5rem 0; }
.ws-rv-goods ul { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.25rem; }
button.ws-rv-good { width: 100%; text-align: left; min-height: 36px; padding: 0.3rem 0.6rem; background: var(--surface); color: var(--text); font-weight: var(--w-text);
  border: 0; border-left: 3px solid var(--m-good); border-radius: 0 var(--r-control) var(--r-control) 0; }
/* The move list: a row a move, marks after the move, a turning point's card under its row. */
.ws-rv-spine { display: grid; margin: 0.3rem 0; }
.ws-rv-row { display: grid; grid-template-columns: 2.2rem 1fr 1fr 2rem; align-items: stretch; border-bottom: 1px solid var(--border); }
/* Your notes (F13_NOTES D-NT.1 A): ✎ on the move you're on, the note under its row, the box. */
button.ws-rv-pen { min-height: 34px; padding: 0; margin: 0; background: none; border: 0; border-radius: 0; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--w-text); }
button.ws-rv-pen:hover { background: var(--hover); color: var(--accent); }
button.ws-rv-note { display: block; width: 100%; min-height: 0; padding: 0.25rem 0.5rem 0.35rem 2.7rem; margin: 0; text-align: left; white-space: pre-wrap;
  background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--text); font-size: var(--fs-sm); font-weight: var(--w-text); }
button.ws-rv-note:hover { background: var(--hover); }
.ws-rv-notebox { margin: 0.35rem 0 0.5rem 1rem; padding: 0.5rem 0.6rem; border: 1px solid var(--accent); border-radius: var(--r-panel); background: var(--surface); }
.ws-rv-notebox textarea { display: block; width: 100%; box-sizing: border-box; margin: 0.25rem 0 0; }
.ws-rv-notebar { display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; margin-top: 0.35rem; }
p.ws-rv-walknote { margin: 0.2rem 0; }
.ws-rv-walk .ws-rv-notebox { margin-left: 0; }
p.ws-rv-walknote em { display: block; white-space: pre-wrap; }
p.ws-rv-endnotes { margin: 0.5rem 0; }
.ws-rv-no { color: var(--muted); text-align: right; padding: 0.35rem 0.5rem 0 0; font-size: var(--fs-xs); }
button.ws-rv-sm, span.ws-rv-sm { display: flex; align-items: baseline; gap: 0.2rem; min-height: 34px; padding: 0.3rem 0.4rem; margin: 0; background: none; border: 0; border-radius: 0;
  color: var(--strong); font-weight: var(--w-text); font-size: var(--fs-sm); text-align: left; }
button.ws-rv-sm:hover { background: var(--hover); }
button.ws-rv-sm.cur { background: var(--accent); color: var(--on-accent); }
button.ws-rv-sm .g { font-weight: var(--w-bold); }
button.ws-rv-sm.in .g { color: var(--m-in); } button.ws-rv-sm.mi .g { color: var(--m-mi); } button.ws-rv-sm.bl .g { color: var(--m-bl); } button.ws-rv-sm.good .g { color: var(--m-good); }
button.ws-rv-sm.cur .g { color: inherit; }
.ws-rv-row > button.ws-rv-sm { width: 100%; }
button.ws-rv-sm .ws-rv-ev { margin-left: auto; display: grid; justify-items: end; line-height: 1.15; font-size: var(--fs-xs); color: var(--muted); }
button.ws-rv-sm .ws-rv-ev small { font-size: 0.68rem; }
button.ws-rv-sm .ws-rv-ev small:empty { display: none; }
button.ws-rv-sm.cur .ws-rv-ev { color: inherit; }
.ws-rv-pin { align-self: center; flex: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; margin-right: 0.15rem; }
/* E3, the summary (D-AR.34 1A; frames RP5, RW3, RT1, RD2): one verdict line, three numbers,
   the graph, the turning points as rows (pins in their mark's colour), the folds. */
.ws-rv-sum { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.2rem 0 0.6rem; }
.ws-rv-verd b { display: block; font-size: var(--fs-md); line-height: 1.35; color: var(--strong); }
.ws-rv-verd span { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: 0.15rem; }
.ws-rv-verd button.link { font: inherit; color: inherit; min-height: 0; padding: 0; margin: 0; }
.ws-rv-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.ws-rv-nums div { background: var(--surface); border-radius: var(--r-control); padding: 0.4rem 0.6rem; box-shadow: var(--shadow); }
.ws-rv-nums b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--strong); }
.ws-rv-nums span { font-size: var(--fs-xs, 0.72rem); color: var(--muted); }
.ws-rv-sum .ws-rv-tls .ws-rv-pin, .ws-rv-tls .ws-rv-pin.mi, .ws-rv-tls .ws-rv-pin.bl { width: 1.4rem; height: 1.4rem; font-size: var(--fs-xs); color: var(--on-solid); }
.ws-rv-pin.mi { background: var(--m-mi); } .ws-rv-pin.bl { background: var(--m-bl); }
.ws-rv-gp.mi { background: var(--m-mi); color: var(--on-solid); } .ws-rv-gp.bl { background: var(--m-bl); color: var(--on-solid); }
.ws-rv-folds { border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
details.ws-rv-fold2 + details.ws-rv-fold2, .ws-rv-folds > * + * { border-top: 1px solid var(--border); }
details.ws-rv-fold2 > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.55rem 0.8rem; color: var(--strong); }
details.ws-rv-fold2 > summary::-webkit-details-marker { display: none; }
details.ws-rv-fold2 > summary::after { content: "▾"; color: var(--muted); flex: none; }
details.ws-rv-fold2[open] > summary::after { content: "▴"; }
details.ws-rv-fold2 > summary small { display: block; font-size: var(--fs-sm); color: var(--muted); font-weight: var(--w-text); }
details.ws-rv-fold2[open] { padding-bottom: 0.6rem; }
details.ws-rv-fold2 > :not(summary) { margin-left: 0.8rem; margin-right: 0.8rem; }
button.ws-rv-sm.cur .ws-rv-pin { background: var(--on-accent); color: var(--accent); }
.ws-rv-tp { margin: 0.4rem 0 0.6rem 1rem; padding: 0.6rem 0.75rem 0.4rem; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 0 var(--r-panel) var(--r-panel) 0; background: var(--surface); scroll-margin-top: 0.5rem; }
.ws-rv-tp.on { border-color: var(--accent); }
.ws-rv-tp h3.ws-rv-title { font-size: var(--fs-md); }
.ws-rv-lrow { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); gap: 0.3rem; align-items: baseline; margin: 0.2rem 0; }
.ws-rv-lk { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; }
.ws-rv-lms { line-height: 1.9; }
button.ws-rv-lm { display: inline; min-height: 0; padding: 0.05rem 0.25rem; margin: 0; font: inherit; font-size: var(--fs-sm); font-weight: var(--w-text);
  color: var(--strong); background: none; border: 0; border-radius: 4px; }
button.ws-rv-lm:hover { background: var(--hover); }
button.ws-rv-lm.on { background: var(--accent); color: var(--on-accent); }
.ws-rv-lines .ws-rv-step { margin: 0.2rem 0 0.4rem; }
p.ws-rv-after { margin: 0.6rem 0 0; color: var(--muted); }
.ws-rv-endsec .ws-rv-ends { margin: 0.6rem 0; }

/* A phone's two views (F13_PHONE_REVIEW D-PH.1): the summary, and the walk-through's one card.
   The board stays on screen through both (T-170, frames R1-R3): the summary scrolls under it. */
.ws-rv-tls { list-style: none; margin: 0.3rem 0 0.6rem; padding: 0; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
.ws-rv-tls li + li { border-top: 1px solid var(--border); }
button.ws-rv-tl { display: flex; align-items: center; gap: 0.6rem; width: 100%; margin: 0; padding: 0.5rem 0.8rem; min-height: 48px;
  background: none; border: 0; border-radius: 0; color: var(--text); font-weight: var(--w-text); text-align: left; }
button.ws-rv-tl:hover { background: var(--hover); }
.ws-rv-tl .ws-rv-pin { width: 1.5rem; height: 1.5rem; font-size: var(--fs-xs); }
.ws-rv-tlw { display: grid; min-width: 0; }
.ws-rv-tlw b { color: var(--strong); }
.ws-rv-tlw small { color: var(--muted); }
.ws-rv-tlgo { margin-left: auto; color: var(--muted); font-size: var(--fs-lg, 1.25rem); }
button.ws-rv-walkall { margin: 0 0 0.4rem; }
.ws-rv-walk .ws-rv-tp { margin: 0; }
/* E1: the chips over a wide review (Summary · 1 2 3 4 · End) and the review's one bar: at the
   screen's foot on a phone or an upright iPad (in place of the board's), at the column's foot on
   an iPad on its side or a desktop. */
.ws-rv-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin: 0 0 0.5rem; }
.ws-rv-chips:has(.ws-rv-chipacc) { flex-wrap: nowrap; }
.ws-rv-chips button { margin: 0; min-height: 28px; padding: 0 0.6rem; border: 0; border-radius: 999px; background: var(--panel3); color: var(--muted); font-size: var(--fs-sm); font-weight: var(--w-bold); }
.ws-rv-chips button.dn { color: var(--strong); }
.ws-rv-chips button.on { background: var(--strong); color: var(--surface); }
.ws-rv-bar.in-column { position: sticky; bottom: 0; z-index: var(--z-page2); background: var(--bg); padding: var(--s2) 0; margin-top: var(--s2); }
.ws-rv-bar button.tools { flex: 1; }
.ws-rv-bar button.next { flex: 2.4; }
/* E4, the walk (frames RP7–RP14, RW4–5, RT2–3, RD3–4): the slot, the card in the ruled order,
   the review's one move list on wide, "Back to it", the bar's Hint and keys. */
.ws-rv-slot { border-radius: var(--r-panel); padding: 0.55rem 0.75rem; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.2rem; }
.ws-rv-slot .k { font-size: var(--fs-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ws-rv-slot .k.bl { color: var(--m-bl); } .ws-rv-slot .k.mi { color: var(--m-mi); }
.ws-rv-slot .dim { color: var(--muted); font-size: var(--fs-sm); }
.ws-rv-slot.good { background: color-mix(in srgb, var(--m-good) 14%, var(--surface)); }
.ws-rv-slot.good .k { color: var(--m-good); }
.ws-rv-slot.bad { background: color-mix(in srgb, var(--error) 12%, var(--surface)); }
.ws-rv-slot.bad .k { color: var(--error); }
.ws-rv-card2 { margin-top: 0.5rem; background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--shadow); padding: 0.6rem 0.75rem; display: flex; flex-direction: column; gap: 0.45rem; }
.ws-rv-card2 table.ws-rv-mv { margin: 0; }
.ws-rv-card2 table.ws-rv-mv td { border-bottom: 0; border-top: 1px solid var(--line); padding: 0.25rem 0; }
.ws-rv-card2 table.ws-rv-mv tr:first-child td { border-top: 0; }
.ws-rv-card2 table.ws-rv-mv td:first-child { color: var(--muted); width: 6rem; font-size: var(--fs-sm); }
.ws-rv-card2 table.ws-rv-mv td.san { font-weight: var(--w-text); }
table.ws-rv-mv td.v { text-align: right; font-family: var(--mono, monospace); font-size: var(--fs-sm); color: var(--muted); }
table.ws-rv-mv td.v.bad { color: var(--error); }
.ws-rv-card2 .ws-rv-why { margin: 0; }
button.ws-rv-fl { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 0; margin: 0; padding: 0.45rem 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  background: none; color: var(--muted); font-size: var(--fs-sm); font-weight: var(--w-text); text-align: left; }
button.ws-rv-fl.pen { color: var(--accent); font-weight: var(--w-bold); }
.ws-rv-card2 .ws-rv-lines.folded { display: none; }
.ws-rv-card2 .ws-rv-opt { margin: 0; }
.ws-rv-mynote { margin: 0; }
.ws-rv-tp, .ws-rv-walk .ws-rv-tp { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.ws-rv-resume { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.5rem; padding: 0.45rem 0.75rem; border-radius: var(--r-panel); background: var(--acc-soft); font-size: var(--fs-sm); }
.ws-rv-resume button { margin: 0; min-height: 32px; flex: none; }
.ws-rv-walk .ws-rv-mstrip .ws-rv-hid, .ws-rv-rml .ws-rv-hid { color: var(--muted); padding: 0 0.3rem; }
.ws-rv-panel { border: 0; background: none; padding: 0; margin: 0.4rem 0 0; min-height: 0; }
.ws-rv-lbox { margin-top: 0.6rem; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.ws-rv-lh { display: flex; justify-content: space-between; padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--line); font-size: var(--fs-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.ws-rv-rml { padding: 0.4rem 0.75rem; line-height: 1.95; font-size: var(--fs-sm); }
.ws-rv-rml .n { color: var(--muted); margin-right: 0.2rem; font-variant-numeric: tabular-nums; }
button.ws-rv-lm2 { display: inline; min-height: 0; margin: 0; padding: 0.1rem 0.3rem; border: 0; border-radius: 6px; background: none; color: var(--strong); font: inherit; font-weight: var(--w-bold); }
button.ws-rv-lm2:hover { background: var(--hover); }
button.ws-rv-lm2.on { background: var(--accent); color: var(--on-accent); }
button.ws-rv-lm2 .g { margin-left: 1px; } button.ws-rv-lm2.mi .g { color: var(--m-mi); } button.ws-rv-lm2.bl .g { color: var(--m-bl); } button.ws-rv-lm2.in .g { color: var(--m-in); }
button.ws-rv-lm2.on .g { color: inherit; }
.ws-rv-rml .ws-rv-pin { color: var(--on-solid); vertical-align: middle; }
.ws-rv-hideh { margin: 0; padding: 0 0.75rem 0.5rem; }
.ws-rv-chipacc { margin-left: auto; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
/* The end's Sign in (a link) sized as the bar's buttons. */
.ws-rv-bar a.button.main { display: flex; align-items: center; justify-content: center; flex: 2.4; min-height: 3.25rem; margin: 0; padding: 0 var(--s2); border-radius: var(--r-panel); background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); text-decoration: none; line-height: 1.2; text-align: center; }
.ws-rv-bar button.hint { flex: 1; }
.ws-rv-bar .ws-rv-gap { flex: 1; min-width: 44px; }
.ws-ph-bar.in-column.ws-rv-bar .ws-rv-gap { flex: 1.4; }
.ws-rv-bar kbd { margin-left: 0.35rem; font-size: var(--fs-xs); padding: 0 0.3rem; border-radius: 4px; background: var(--panel2); color: var(--muted); font-family: inherit; }
.ws-rv-bar button.main kbd { background: color-mix(in srgb, var(--on-accent) 18%, transparent); color: inherit; }
/* "Check deeper" as a row with its own button, on the summary (test finding 16). */
.ws-rv-deeper { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.5rem 0.75rem; margin: 0.4rem 0; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
.ws-rv-deeper > span:first-child { display: grid; flex: 1; min-width: 10rem; }
.ws-rv-deeper small { color: var(--muted); font-size: var(--fs-sm); }
.ws-rv-deeper button { margin: 0; flex: none; }
.ws-rv-deeperbar { flex-basis: 100%; height: 4px; border-radius: 2px; background: var(--panel2); overflow: hidden; }
.ws-rv-deeperbar i { display: block; height: 100%; background: var(--accent); }
/* E5, the end (frames RP15, RW6, RT4, RD5): the lesson, the numbers, each turning point found or
   shown, then Keep notes and Review your next game full width; Retry now is the bar's. */
.ws-rv-end { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.3rem 0 0; }
.ws-rv-end .ws-rv-lesson { margin: 0; }
.ws-rv-end .ws-rv-tls { margin: 0; }
.ws-rv-res { margin-left: auto; flex: none; font-size: var(--fs-sm); font-weight: var(--w-bold); color: var(--muted); }
.ws-rv-res.ok { color: var(--m-good); }
.ws-rv-endfacts { margin: 0; }
.ws-rv-end .ws-rv-ends { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; }
.ws-rv-end .ws-rv-ends > * { width: 100%; margin: 0; }
/* A desktop: the card and the move list split the column, each scrolling (frame RD3). */
.ws[data-layout=desk] .ws-rv-panel { display: flex; flex-direction: column; gap: 0.6rem; }
.ws[data-layout=desk] .ws-rv-panel .ws-rv-lbox { margin-top: 0; }
/* The walk-through gives the card the room: no tabs, no "Other games" (the summary has them). */
.ws[data-layout=phone]:has(.ws-rv-walkv) .ws-tabs { display: none; }
.ws.phone:has(.ws-rv-walkv) .ws-main { padding-top: 0.25rem; }
.ws.ws-rp.phone:has(.ws-rv-walkv) .ws-side { padding-bottom: 0.5rem; }
.ws-rv-walk { padding-bottom: 0.5rem; }
/* The walk-through's slim graph (PA.4 A, frame R4): where you are in the game, always in sight. */
.ws-rv-graph.slim { margin: 0.2rem 0 0.3rem; }
.ws-rv-graph.slim .ws-rv-svg > svg:first-child { height: 40px; border-radius: var(--r-control); }
.ws-rv-graph.slim .ws-rv-gov { height: 40px; }
.ws-rv-graph.slim .ws-rv-gd { width: 7px; height: 7px; }
.ws-rv-graph.slim .ws-rv-svg > svg:not(:first-child), .ws-rv-graph.slim .ws-rv-phm, .ws-rv-graph.slim .ws-rv-gg { display: none; }
.ws-rv-graph.slim .ws-rv-gp { width: 0.7rem; height: 0.7rem; min-height: 0; padding: 0; font-size: 0; }
.ws-rv-walk .ws-rv-kick { font-size: var(--fs-xs); }
.ws-rv-walk .ws-rv-tp h3.ws-rv-title { margin: 0.1rem 0 0.2rem; }
p.ws-rv-walkmv { margin: 0.2rem 0; font-size: var(--fs-md); line-height: 1.5; }

/* The review page, /review (F13, workspace/review_page.rs; E1): the board's own frame on every
   device, with the chooser in place of the column (on a phone or an upright iPad, in place of the
   board too, frames RC1-RC3). */
.ws-rp .off { display: none; }
.ws-rp-sidewrap { display: contents; }
.ws-rp .ws-rp-sidewrap.off { display: none; }
/* The review saves by itself (a library game) or not at all (an example): no "not saved" dot. */
.ws-rp .ws-ph-dot { display: none; }
.ws-rp-choose { display: flex; flex-direction: column; gap: 0.5rem; }
/* Frames RC1-RC3: group headings, rows with Review at the right (the first in the accent), the
   paste box, the examples, Sign in. */
.ws-rp-gh { margin: 0.5rem 0 0; font-size: var(--fs-xs, 0.72rem); letter-spacing: 0.06em; text-transform: uppercase; font-weight: var(--w-bold); color: var(--muted); }
button.ws-rp-game > .ic { flex: none; width: 1.25rem; height: 1.25rem; color: var(--muted); }
.ws-rp-go { margin-left: auto; flex: none; font-size: var(--fs-sm); color: var(--muted); }
.ws-rp-go.main { color: var(--accent); font-weight: var(--w-bold); }
b.ws-rp-res, b.ws-rp-res.w, b.ws-rp-res.l { width: auto; font-size: inherit; color: var(--strong); }
.ws-rp-paste { border: 1.5px dashed var(--border); border-radius: var(--r-panel); background: var(--surface); padding: 0.7rem 0.8rem; resize: vertical; }
button.ws-rp-pastego { align-self: flex-start; margin: 0; }
a.ws-rp-signin { display: flex; justify-content: center; margin-top: 0.75rem; }
.ws-rp-accts p { margin: 0; }
.ws-rp-accts button.link { min-height: 32px; padding: 0; margin: 0; }
/* A phone choosing: the header, then the chooser with the screen to itself. */
.ws.ws-rp.choosing[data-layout=phone] .ws-rp-side, .ws.ws-rp.choosing[data-layout=ipad-tall] .ws-rp-side { padding: 0.5rem var(--gutter) 1.5rem; }
.ws-rp-h { margin: 0.2rem 0 0; font-size: var(--fs-md); }
.ws-rp-tabs { margin-bottom: 0.2rem; }
.ws.phone .ws-rp-tabs { order: 0; }
/* The review's column scrolls on its own; the board stays put (as on the board page). */
.ws-rp-side { overflow-y: auto; min-height: 0; }
.ws-rp-games { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
.ws-rp-games li + li { border-top: 1px solid var(--border); }
button.ws-rp-game { display: flex; align-items: center; gap: 0.7rem; width: 100%; margin: 0; padding: 0.55rem 0.8rem; min-height: 44px;
  background: none; border: 0; border-radius: 0; color: var(--text); font-weight: var(--w-text); text-align: left; }
button.ws-rp-game:hover { background: var(--hover); }
button.ws-rp-game.sel { box-shadow: inset 3px 0 0 var(--accent); }
.ws-rp-res { flex: none; width: 2.4rem; font-size: var(--fs-sm); font-weight: var(--w-bold); color: var(--muted); }
.ws-rp-res.w { color: var(--good); }
.ws-rp-res.l { color: var(--error); }
.ws-rp-who { min-width: 0; display: grid; }
.ws-rp-who b { color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-rp-done { margin-left: auto; flex: none; font-size: var(--fs-xs); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.5rem; }
.ws-rp-accts p { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.2rem 0; }
.ws-rp-accts button { margin: 0; }
.ws-rp-paste { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-sm); }

/* ---- Your games (/insights, F13 G4; D-AR.37, yourgames-2026-11-14) ----
   iPad (landscape) and desktop, 1A (ygWide): the head (Library mark, the sub line, the two
   filters), then the left column scrolling (what stands out, a card per section: one column on
   iPad, two on desktop) beside the right (How you do, Your mistakes, a note). The phone, 2A
   (ygPhone, ygPhoneSec): its own top bar with the filter button, the summary, a row per section,
   each section its own screen. A line is a row (words and games, a bar from zero, the figure,
   a chevron) that opens in place. */
.lib-train-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.lib-train-links .lib-train-link { flex-basis: auto; }
.yg a { color: inherit; text-decoration: none; }
.yg .k-area { width: 30px; height: 30px; border-radius: 9px; }
.yg .k-area .ic { width: 19px; height: 19px; }
.yg-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--w-bold); font-size: 16px; color: var(--ink); }
.yg-hint { font-size: 13px; color: var(--dim); }
.yg-small { margin: 0; font-size: 12px; color: var(--dim); }
.yg-seg { flex-wrap: wrap; }
.yg .yg-seg button { padding: 4px 10px; font-size: 12.5px; white-space: nowrap; }
/* Wide: the page fills the screen; the left column scrolls. */
body:has(.ygw) { height: 100dvh; min-height: 0; overflow: hidden; }
body:has(.ygw) main { min-height: 0; padding: 0; display: flex; }
body:has(.ygw) .app { max-width: none; flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; min-height: 0; }
.ygw { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
.ygw-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: none; }
.yg-segs { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.ygw-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
:root[data-format=desk] .ygw-cols { grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); }
.ygw-left, .ygw-side { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.ygw-left { padding-bottom: 12px; }
.ygw-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
:root[data-format=desk] .ygw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* The lead card and the cards. */
.yg-stand { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.yg-stand h3, .yg-card h3 { margin: 0; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: var(--w-bold); }
.yg-h3n { text-transform: none; letter-spacing: 0; font-weight: var(--w-text); }
.yg-f { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 0; min-height: 0; border: 0; border-radius: 0; background: none;
  color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.yg-f .yg-v { min-width: 52px; text-align: right; }
.yg-v { font-variant-numeric: tabular-nums; font-weight: var(--w-bold); }
.yg .up { color: var(--good); }
.yg .dn { color: var(--error); }
.yg-v.flat { color: var(--dim); }
.yg-v.few { color: var(--dim); font-size: 11px; font-weight: var(--w-text); }
.yg-card { flex: none; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); }
.yg-card h3 { padding: 11px 12px 4px; }
.yg-empty { padding: 14px; }
.yg-empty p { margin: 0; }
.yg-empty a { text-decoration: underline; }
.yg-line { border-top: 1px solid var(--line); }
.yg-card > .yg-line:first-child, .yg-card h3 + .yg-line { border-top: 0; }
.yg-gl { display: grid; grid-template-columns: minmax(0, 1fr) 120px 48px 16px; align-items: center; gap: 10px; width: 100%; margin: 0; min-height: 0;
  padding: 7px 12px; border: 0; border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
@media (hover: hover) { .yg-gl:hover { background: var(--hover); } }
.yg-line.open .yg-gl { background: var(--panel2); }
.yg-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-lb span { margin-left: 6px; font-size: 11.5px; color: var(--dim); }
.yg-gl .yg-v { text-align: right; white-space: nowrap; }
.yg-chev { display: inline-grid; color: var(--muted); transition: transform 0.15s; }
.yg-chev .ic { width: 16px; height: 16px; }
.yg-line.open .yg-chev, .yg-more[aria-expanded=true] .yg-chev { transform: rotate(90deg); }
.yg-plot { position: relative; height: 10px; background: var(--panel2); border-radius: 5px; }
.yg-plot::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.yg-plot i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.yg-plot i.p { left: 50%; background: var(--good); }
.yg-plot i.n { right: 50%; background: var(--error); }
.yg-plot i.flat { background: var(--muted); }
.yg-detail { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; background: var(--panel2); border-top: 1px solid var(--line); font-size: 12.5px; }
.yg-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.yg .yg-sm { min-height: 32px; margin: 0; padding: 0 11px; gap: 4px; border-radius: 9px; font-size: 12.5px; }
.yg-sm .ic { width: 14px; height: 14px; }
.yg-models { flex-basis: 100%; order: 9; }
.yg-models p { margin: 0 0 4px; }
.yg-model-list { margin: 0; padding-left: 1.4rem; display: grid; gap: 4px; }
@media (hover: hover) { .yg-model-list a:hover { text-decoration: underline; } }
.yg-more { display: flex; align-items: center; gap: 4px; width: 100%; margin: 0; min-height: 0; padding: 7px 12px 10px; border: 0;
  border-top: 1px solid var(--line); border-radius: 0; background: none; color: var(--dim); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.yg-thin { padding: 4px 12px 10px; font-size: 13px; color: var(--dim); line-height: 1.5; }
.yg-thin b { color: var(--ink); }
.yg-thin .yg-link { color: var(--accent); font-weight: var(--w-bold); }
.yg-extra { padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.yg-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 12px 10px; }
.yg-tile { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 10px; background: var(--panel2); min-width: 0; }
.yg-tile span { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-tile b { font-size: 20px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .yg-tile:hover { background: var(--hover); } }
.yg-mist { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.yg-card h3 + .yg-mist { border-top: 0; }
.yg-mist b { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yg-m { flex: none; width: 9px; height: 9px; border-radius: 2px; background: var(--muted); }
.yg-m.bl { background: var(--m-bl); }
.yg-m.mi { background: var(--m-mi); }
.yg-m.in { background: var(--m-in); }
/* How your games end, inside Game length (F13_G4_CLOCK D-CK.3 A). */
.ins-num { font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; white-space: nowrap; }
.ins-endings { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); font-size: 13px; }
.ins-end { min-width: 0; }
.ins-ends { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); }
.ins-ends caption { text-align: left; color: var(--ink); font-weight: var(--w-bold); padding: 0 0 4px; }
.ins-ends th, .ins-ends td { padding: 5px 10px; text-align: left; font-weight: normal; }
.ins-ends thead th { font-size: var(--fs-xs); letter-spacing: var(--ls-xs); color: var(--dim); }
.ins-ends tbody tr { border-top: 1px solid var(--line); }
.ins-ends td.ins-num, .ins-ends thead th + th { text-align: right; }
.ins-ends a { text-decoration: underline; }
.ins-draws { margin: 4px 0 0; color: var(--dim); }
/* The phone: its own top bar, the summary, a row per section. */
body:has(.ygp) main { padding: 0; }
.ygp { display: flex; flex-direction: column; min-height: calc(var(--svh) - var(--bottom-bar, 0px)); }
.yg-top { height: 56px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; }
.yg-tt { flex: 1; min-width: 0; line-height: 1.2; }
.yg-tt h1 { margin: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-tt span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 18px; }
.yg-list { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.yg-secrow { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.yg-secrow:first-child { border-top: 0; }
.yg-secrow .tx { flex: 1; min-width: 0; }
.yg-secrow .tx b { display: block; font-size: 14.5px; }
.yg-secrow .tx span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-secrow > .ic { color: var(--muted); }
.yg-pill { flex: none; font-size: 12px; font-weight: var(--w-bold); border-radius: 8px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.yg-pill.up { background: color-mix(in srgb, var(--good) 16%, transparent); }
.yg-pill.dn { background: color-mix(in srgb, var(--error) 14%, transparent); }
.yg-filt { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.yg-lab { font-size: 11.5px; color: var(--dim); font-weight: var(--w-bold); letter-spacing: 0.04em; text-transform: uppercase; }
.yg-filt .k-seg { display: flex; }
.yg-filt .k-seg button { flex: 1; padding: 8px 6px; }
@media (prefers-reduced-motion: reduce) { .yg-chev { transition: none; } }

/* ---- You (src/shell/you.rs; D-AR.37, yourgames-2026-11-14 youList, youPhone, youPhoneSet,
   youWide): who you are, one list of rows, the admin rows, the small print. Phone: its own top
   bar, each setting a screen with Back. iPad and desktop: the list left, the settings (or the
   account) in a card on the right. ---- */
.you-app a { color: inherit; text-decoration: none; }
body:has(.you-phone) main, body:has(.you-wide) main { padding: 0; }
body:has(.you-wide) .app { max-width: none; }
.you-top { height: 56px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; }
.you-top h1 { flex: 1; min-width: 0; margin: 0; font-size: 15.5px; }
.you-top h1.big { padding-left: 10px; font-size: 18px; }
.you-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 14px 18px; }
.you-head { display: flex; align-items: center; gap: 12px; }
.you-av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft);
  color: var(--accent); font-weight: var(--w-bold); }
.you-who { min-width: 0; }
.you-who b { display: block; font-size: 16px; }
.you-who span { display: block; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.you-list { margin: 0; padding: 0; list-style: none; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.you-list li + li { border-top: 1px solid var(--line); }
.you-list li.on { background: var(--acc-soft); }
.you-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; font-size: 13.5px; color: var(--ink); }
@media (hover: hover) { .you-list li:not(.on) .you-row:hover { background: var(--hover); } }
.you-ic { display: inline-grid; color: var(--accent); }
.you-admin .you-ic { color: var(--dim); }
.you-name { flex: 1; min-width: 0; }
.you-name b { display: block; font-weight: var(--w-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.you-name span { display: block; font-size: 12px; color: var(--dim); }
.you-row > .ic:last-child { color: var(--muted); }
.you-h { margin: 6px 2px 0; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: var(--w-bold); }
.you-print { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 12px; color: var(--dim); }
.you-app .you-print a { color: var(--dim); }
.you-wide { display: flex; justify-content: center; align-items: flex-start; gap: 18px; padding: 18px 22px; }
.you-left { flex: none; width: 320px; display: flex; flex-direction: column; gap: 10px; }
:root[data-format=desk] .you-left { width: 340px; }
.you-card { flex: 1; min-width: 0; max-width: 560px; display: flex; flex-direction: column; gap: 22px; padding: 18px; background: var(--panel);
  border-radius: 14px; box-shadow: var(--shadow); }
:root[data-format=desk] .you-card { max-width: 640px; }
.you-sec { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 16px; }
.you-sec h2 { margin: 0; font-size: 16px; }
.you-sec h3 { margin: 8px 0 0; font-size: 14px; }
.you-sec p { margin: 0; font-size: 12.5px; color: var(--dim); }
.you-sets { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.you-set { width: 100%; margin: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px;
  border: 2px solid transparent; border-radius: 10px; background: var(--panel2); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.you-set.on { border-color: var(--accent); }
.you-set-board { display: block; width: 100%; }
.you-set-board .mcl-board { pointer-events: none; }
.you-saved { min-height: 1.4em; font-size: 12px; color: var(--good); }
.you-sels { display: flex; flex-wrap: wrap; gap: 8px; }
.you-sels select { flex: 1; min-width: 12rem; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--panel2);
  color: var(--ink); font: inherit; font-size: 13px; }
.you-sec .theme-switch { align-self: flex-start; }
.you-account dl.account { margin: 0; }
.you-signout { align-self: flex-start; margin: 0; }
.you-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.you-app .you-account a { color: var(--accent); text-decoration: underline; }

/* ---- Guess the move (T-121, GUESS_PAGE.md; the B scoresheet, D-GM.9) ---- */
/* The lobbies (GUESS_PRESENTATION D-GPR.1 B, frames B1-B4): a timeline of the champions, then a
   champion's games as a list (phone, iPad) or a table with a preview (desktop). */
.gm-shelf { max-width: var(--narrow); margin: 0 auto; display: flex; flex-direction: column; gap: var(--s3); }
.gm-shelf[data-view=wide] { max-width: none; }
.gm-shelf-head h1 { margin-bottom: 0.4rem; }
.gm-intro { color: var(--muted); margin: 0; font-size: var(--fs-sm); }
.gm-back { margin: 0 0 0.25rem; font-size: var(--fs-sm); }
.gm-muted { color: var(--muted); }
.gm-mark { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: var(--fs-md); }
.gm-mark-tile { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--gs); color: var(--on-area); flex: none; }
.gm-mark-tile svg { width: 19px; height: 19px; }
.gm-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; min-width: 0; }
.gm-side { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--control); flex: none; vertical-align: middle; }
.gm-side.w { background: var(--piece-white); } .gm-side.b { background: var(--piece-black); }
.gm-cont { display: flex; align-items: center; gap: var(--s3); background: var(--surface); border-radius: var(--r-card); padding: 10px 12px; box-shadow: var(--shadow); min-width: 0; }
.gm-cont-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.gm-cont-tx strong { color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-cont-tx span { font-size: var(--fs-sm); color: var(--muted); }
a.button.gm-play { margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); border-radius: var(--r-panel); white-space: nowrap; }
a.button.gm-play svg { width: 16px; height: 16px; }
/* The timeline: the names, a track per champion (the span of these games faint, each reign a bar), progress. */
.gm-tl { --namew: 124px; padding-top: var(--s2); }
.gm-axis { position: relative; height: 18px; margin: 0 calc(64px + 10px + 12px) 0 calc(12px + var(--namew) + 10px); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gm-axis span { position: absolute; transform: translateX(-50%); }
.gm-era { padding: 10px 12px 4px; font-size: var(--fs-xs); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: var(--w-bold); border-top: 1px solid var(--border); }
.gm-blist > .gm-era:first-child { border-top: 0; }
.gm-trow { display: grid; grid-template-columns: var(--namew) minmax(0, 1fr) 64px; align-items: center; gap: 0 10px; min-height: 46px; padding: 0 12px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.gm-trow.on { background: var(--gs-soft); box-shadow: inset 3px 0 0 var(--gs); }
@media (hover: hover) { .gm-trow:not(.on):hover { background: var(--hover); } }
.gm-tn { min-width: 0; line-height: 1.25; }
.gm-tn strong { display: block; font-size: 13.5px; color: var(--strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-tn span { font-size: 11.5px; color: var(--muted); }
.gm-track { position: relative; height: 14px; background: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 100%); background-size: calc(100% / 7) 100%; border-radius: 2px; }
.gm-track i { position: absolute; top: 3px; height: 8px; border-radius: 4px; background: var(--gs); }
.gm-track u { position: absolute; top: 6px; height: 2px; background: var(--control); opacity: 0.6; text-decoration: none; }
.gm-pf { font-size: var(--fs-xs); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; line-height: 1.25; }
.gm-pf strong { color: var(--strong); }
/* A champion: header (phone), card, style line, stats. */
.gm-top { display: flex; align-items: center; gap: var(--s1); min-width: 0; }
.gm-backbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-panel); color: var(--strong); flex: none; }
.gm-top-tx { flex: 1; min-width: 0; line-height: 1.2; display: flex; flex-direction: column; }
.gm-top-tx strong { font-size: 15.5px; color: var(--strong); }
.gm-top-tx span { font-size: var(--fs-xs); color: var(--muted); }
.app.gm-app { max-width: none; }
.gm-hero { display: flex; gap: var(--s3); align-items: center; }
.gm-mono { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 19px; background: var(--gs); color: var(--on-area); flex: none; }
.gm-hero-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gm-hero-tx strong { font-size: var(--fs-lg); color: var(--strong); line-height: 1.2; }
.gm-hero-tx span { font-size: var(--fs-sm); color: var(--muted); }
.gm-style { margin: 0; font-size: var(--fs-sm); color: var(--text); }
.gm-hstats { display: flex; gap: var(--s2); flex-wrap: wrap; }
.gm-hstat { background: var(--panel2); border-radius: var(--r-panel); padding: 6px 10px; display: flex; flex-direction: column; min-width: 78px; }
.gm-hstat span { font-size: 11px; color: var(--muted); }
.gm-hstat strong { font-size: 15px; color: var(--strong); font-variant-numeric: tabular-nums; }
/* The list: a row per game; the chosen one open in place. */
.gm-brow { padding: 9px 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.gm-brow.on { background: var(--gs-soft); box-shadow: inset 3px 0 0 var(--gs); }
button.gm-bhead { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; cursor: pointer; width: 100%; min-height: 40px; }
button.gm-bhead:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.gm-btx { min-width: 0; line-height: 1.3; display: flex; flex-direction: column; }
.gm-btx strong { font-size: var(--fs-sm); color: var(--strong); }
.gm-btx span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-res { font-size: 12.5px; font-weight: var(--w-bold); color: var(--muted); width: 30px; text-align: center; }
.gm-tags { display: flex; gap: 5px; flex-wrap: wrap; padding-left: 24px; }
.gm-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 11.5px; font-weight: var(--w-bold); background: var(--panel2); color: var(--muted); white-space: nowrap; }
.gm-tag.t { background: var(--gs-soft); color: var(--strong); }
.gm-brow.on .gm-tag.t { background: var(--surface); }
.gm-sc { min-width: 48px; height: 24px; padding: 0 8px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--on-gm); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gm-sc.p3 { background: var(--gm3); } .gm-sc.p2 { background: var(--gm2); } .gm-sc.p1 { background: var(--gm1); } .gm-sc.p0 { background: var(--gm0); }
.gm-sc.live { background: var(--panel2); color: var(--strong); font: inherit; font-weight: var(--w-bold); }
.gm-sc.none, .gm-sc.lock { background: none; color: var(--muted); font-weight: var(--w-text); min-width: 0; }
.gm-bexp { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--s3); padding-top: 6px; }
.gm-bexp > .gm-detail-tx:only-child { grid-column: 1 / -1; }
.gm-detail-tx { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.gm-detail-tx .gm-tags { padding-left: 0; }
.gm-cap { font-size: 13px; color: var(--strong); }
.gm-why { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.gm-detail-tx a.button.gm-play { align-self: stretch; }
/* iPad and desktop: the timeline beside the champion; desktop adds the preview. */
.gm-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.gm-head .gm-cont { margin-left: auto; width: min(100%, 30rem); }
.gm-cols { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.gm-cols.desk { grid-template-columns: 400px minmax(0, 1fr) 290px; }
.gm-tlcol .gm-tl { --namew: 140px; }
.gm-cols.desk .gm-tlcol .gm-tl { --namew: 150px; }
.gm-mid { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.gm-side-col { position: sticky; top: var(--s3); min-width: 0; }
.gm-prev { display: flex; flex-direction: column; gap: var(--s3); padding: 14px; }
/* Smaller than the column (owner, 2026-11-10-1, T-189): the key position is a taster, not the board. */
.gm-prev .mini-board { width: min(100%, 210px); align-self: center; }
.gm-prev .gm-tags { padding-left: 0; }
.gm-prev-score { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.gm-prev-game { margin: 0; font-size: 12.5px; color: var(--muted); }
.gm-prev-game strong { font-size: 15px; color: var(--strong); }
.gm-tablewrap { overflow-x: auto; }
.gm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.gm-table th { text-align: left; font-weight: var(--w-text); color: var(--muted); font-size: var(--fs-xs); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.gm-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; cursor: pointer; }
.gm-table tr.on td { background: var(--gs-soft); }
.gm-table tr.on td:first-child { box-shadow: inset 3px 0 0 var(--gs); }
@media (hover: hover) { .gm-table tr:not(.on):hover td { background: var(--hover); } }
.gm-table .dim { color: var(--muted); }
button.gm-tbtn { all: unset; cursor: pointer; font-weight: var(--w-bold); color: var(--strong); }
button.gm-tbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The game: the board column, then the scoresheet beside it from tablet up. */
.gm-page { max-width: var(--wide); margin: 0 auto; }
.gm-page button { margin-top: 0; background: var(--surface); color: var(--strong); border-color: var(--border); }
.gm-page button.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
@media (hover: hover) { .gm-page button:not(.primary):hover:not(:disabled) { background: var(--hover); border-color: var(--control); } }
/* The game (T-280, guess-2026-11-06 `phGame` / `wideGame`). Phone: the header, the board edge to
   edge, the score and prompt, the scoresheet, the bar in the tabs' place. Wider: the board in
   Analyse's place, the column beside it with the big buttons at its foot. */
.gm-game { display: grid; gap: 0.6rem 1.25rem; align-items: start;
  --gm-bs: min(calc(var(--vh) - 6.5rem), calc(var(--vw) * 0.6 - 3rem)); }
.gm-game:not(.phone) { grid-template-columns: var(--gm-bs) minmax(17rem, 1fr); }
.gm-game:not(.phone) .gm-bcol { width: var(--gm-bs); display: flex; flex-direction: column; gap: var(--s2); }
.gm-col { display: flex; flex-direction: column; gap: 0.6rem; height: calc(var(--vh) - 4rem); min-height: 24rem; }
.gm-col .gm-sheet { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0.5rem; border: 1px solid var(--border);
  border-radius: var(--r-panel); background: var(--panel); }
.gm-game.phone { display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem; margin: calc(-1 * var(--s2)) calc(-1 * var(--gutter)) 0;
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
.gm-game.phone > .gm-head, .gm-game.phone > .gm-pad, .gm-game.phone > .gm-sheet, .gm-game.phone > .gm-end { padding-left: 14px; padding-right: 14px; }
.gm-head { display: flex; align-items: center; gap: var(--s2); min-height: 3.25rem; }
.gm-tt { flex: 1; min-width: 0; line-height: 1.25; }
.gm-tt h1 { margin: 0; font-size: var(--fs-md); }
.gm-tt span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.gm-col .gm-tt h1 { font-size: var(--fs-lg); }
.gm-page a.gm-backlink { flex: none; color: var(--strong); }
.gm-page button.gm-modechip { flex: none; min-height: 0; padding: 0.25rem 0.75rem; border: 0; border-radius: 999px;
  background: var(--gs-soft); color: var(--strong); font-size: var(--fs-xs); font-weight: var(--w-bold); }
.gm-pad { display: flex; flex-direction: column; gap: 0.25rem; }
.gm-line { min-height: 1.6rem; font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.gm-unsaved { margin: var(--s1) 0 0; color: var(--error); font-size: var(--fs-sm); }
.gm-cap { margin: 0; color: var(--muted); }
.gm-tip { display: flex; gap: 0.6rem; align-items: center; padding: 0.5rem 0.7rem;
  background: var(--raised); border-radius: var(--r-control); color: var(--text); }
.gm-page button.gm-tchip { flex: none; padding: 0.3rem 0.7rem; font-size: var(--fs-xs); }
.gm-sub { margin: 0.1rem 0 0.4rem; color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.gm-score { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 0.6rem; font-size: var(--fs-sm); color: var(--muted); }
.gm-score b { color: var(--strong); font-size: var(--fs-md); }
.gm-sdots { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 100%; }
.gm-sdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--track); }
.gm-sdots i.p3 { background: var(--gm3); } .gm-sdots i.p2 { background: var(--gm2); }
.gm-sdots i.p1 { background: var(--gm1); } .gm-sdots i.p0 { background: var(--gm0); }
.gm-sdots i.gr { background: var(--muted); opacity: 0.45; }
/* The bar: the board screens' (Back · Hint · the main button), Guess's colours kept off it. */
.gm-page .gm-bar button { flex: 1; display: inline-flex; align-items: center; justify-content: center; margin: 0;
  border: 0; background: var(--panel3); color: var(--strong); }
.gm-page .gm-bar button.main { background: var(--accent); color: var(--on-accent); }
.gm-page .gm-bar button[data-act=gm-back] { flex: 0.6; }
.gm-book { margin: 0; padding: 0.4rem 0.25rem; border-bottom: 1px solid var(--border); color: var(--muted); font-size: var(--fs-xs); }
.gm-book:empty { display: none; }
.gm-sheet { border-top: 1px solid var(--border); }
.gm-row2 { display: grid; grid-template-columns: 2.2rem 1fr 1fr; align-items: center; padding: 0.3rem 0.25rem;
  border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.gm-row2.cur { background: var(--surface); }
.gm-n { color: var(--muted); }
.gm-san { color: var(--strong); }
.gm-inline { grid-column: 1 / -1; padding: 0.4rem 0 0.2rem; }
.gm-rev { display: flex; gap: 0.5rem; align-items: flex-start; }
.gm-chip { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.3rem;
  border-radius: 0.75rem; font-weight: var(--w-bold); font-size: var(--fs-xs); color: var(--on-gm); flex: none; }
.gm-chip.p3 { background: var(--gm3); } .gm-chip.p2 { background: var(--gm2); }
.gm-chip.p1 { background: var(--gm1); } .gm-chip.p0 { background: var(--gm0); }
.gm-chip.gr { background: var(--track); color: var(--muted); }
.gm-now { width: fit-content; padding: 2px 6px; margin-left: -6px; border-radius: 7px; background: var(--gs-soft); color: var(--muted); font-weight: var(--w-bold); }
.gm-end { padding: 0.8rem 0 1rem; }
.gm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; text-align: center; margin: 0.5rem 0; }
.gm-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-control);
  padding: 0.5rem 0.3rem; font-size: var(--fs-xs); color: var(--muted); }
.gm-stats b { display: block; font-size: var(--fs-lg); color: var(--strong); }
.gm-endlinks { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }
.gm-btn { display: inline-block; padding: 0.55rem 1.1rem; border-radius: var(--r-control); background: var(--accent);
  color: var(--on-accent); font-weight: var(--w-bold); text-decoration: none; }
/* The mode, before a game (D-GM.10). */
.gm-modal p { margin: 0.5rem 0; }
.gm-dots { display: flex; gap: 0.35rem; margin-bottom: 0.6rem; }
.gm-dots i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--track); }
.gm-dots i.on { background: var(--accent); }
.gm-legend { display: grid; gap: 0.35rem; margin: 0.6rem 0; }
.gm-page button.gm-mcard { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; width: 100%;
  margin-top: 0.5rem; padding: 0.7rem 0.8rem; text-align: left; font-weight: var(--w-text); }
.gm-page button.gm-mcard[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gm-mcard b { color: var(--strong); }
.gm-mcard span { color: var(--muted); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.gm-mcard span.gm-cnt { color: var(--strong); }
.gm-rec { margin-left: 0.4rem; font-size: var(--fs-xs); color: var(--accent); font-weight: var(--w-bold); }
.gm-mgame { font-size: var(--fs-sm); }
.gm-seg { display: flex; margin: 0.8rem 0 0.4rem; }
.gm-seg button { flex: 1; }
.gm-page .k-seg button { min-height: 0; border: 0; background: transparent; color: var(--muted); }
.gm-page .k-seg button[aria-pressed=true] { background: var(--knob); color: var(--ink); box-shadow: var(--shadow); }
.gm-custom summary { cursor: pointer; color: var(--accent); font-size: var(--fs-sm); min-height: 32px; }
.gm-custom label { display: flex; gap: 0.5rem; align-items: center; margin: 0.35rem 0; font-size: var(--fs-sm); }
.gm-mfoot { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.gm-mfoot button { min-height: 44px; }
/* The puzzles page's way in (a full-width card at every size). */
.pzl-grid > .pzl-full { grid-column: 1 / -1; min-height: 0; }
/* ---- Home (src/home.rs; PHASE3_PLAN step 4, D-AR.30): a greeting, one lead card, equal tiles,
   the library's files and the games open in Analyse (beside it from 1000 px), one dated line. */
.home { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s2) 0 var(--s5); }
.home-hello { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.home-hello h1 { margin: 0; font-size: var(--fs-xl); }
.home-you { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--panel2); color: var(--ink); }
.home-you .ic { width: 1.25rem; height: 1.25rem; }
.home-date { margin: 0; color: var(--dim); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.home-cols { display: grid; gap: var(--s5); align-items: start; }
.home-main, .home-side { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.home-side:empty { display: none; }
.home-area { display: flex; align-items: center; gap: var(--s2); color: var(--dim); font-size: var(--fs-xs);
  letter-spacing: var(--ls-xs); font-weight: var(--w-bold); text-transform: uppercase; }
.home-area .k-area { width: 1.5rem; height: 1.5rem; }
.home-area .k-area .ic { width: 1rem; height: 1rem; }
.home-k { color: var(--dim); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.home-s { color: var(--dim); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.home-go { margin-top: auto; color: var(--ink); font-size: var(--fs-sm); font-weight: var(--w-bold); }
.home-lead { padding: var(--s4); }
.home-lead-row { display: flex; gap: var(--s4); align-items: center; }
.home-lead-t { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.home-lead-t h2 { margin: 0; font-size: var(--fs-lg); overflow-wrap: anywhere; }
.home-lead .mini-board { width: 6rem; }
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.home-tiles:empty { display: none; }
.home-tile { min-height: 8.5rem; }
.home-tile.tall { grid-row: span 2; }
.home-tile.tall .mini-board { width: min(100%, 11rem); margin: var(--s1) 0; }
.home-tile h3 { font-size: var(--fs-md); overflow-wrap: anywhere; }
@media (hover: hover) { .home-tile:hover { background: var(--hover); } }
.home-fresh { display: flex; align-items: center; gap: var(--s2); margin: var(--s2) 0 0; color: var(--dim);
  font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.home-sect { margin: var(--s2) 0 0; font-size: var(--fs-sm); color: var(--dim); }
.home-list > li { padding: 0; }
.home-row { flex: 1; display: flex; align-items: center; gap: var(--s3); min-height: 3.25rem; padding: var(--s2) var(--s3);
  color: var(--ink); text-decoration: none; min-width: 0; }
.home-row:hover { background: var(--hover); }
.home-row > .ic { color: var(--dim); }
.home-row-t { flex: 1; display: grid; min-width: 0; overflow-wrap: anywhere; }
.home-row-t .small { color: var(--dim); }
:root:not([data-format=phone]) .home-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:root:not([data-format=phone]) .home-lead .mini-board { width: 10rem; }
@media (min-width: 1000px) {
  :root:not([data-format=phone]) .home-cols { grid-template-columns: minmax(0, 1fr) 20rem; }
}
/* A small still board (src/home.rs MiniBoard), in the board's colours. */
.mini-board { flex: none; display: block; aspect-ratio: 1; border-radius: var(--r-control); }
.mini-light { fill: var(--board-light); }
.mini-dark { fill: var(--board-dark); }
.mini-last { fill: color-mix(in srgb, var(--mark-yellow) 38%, var(--board-light)); }
.mini-coord { font-size: 0.22px; font-weight: 600; fill: var(--ink); opacity: 0.6; }
/* ---- The visitor's front page (src/puzzles/front.rs; D-AR.31 B): today's puzzle, then the
   explorer, Guess and the join card (beside the board on iPad and desktop). ---- */
.front { display: grid; gap: var(--s5); padding: var(--s2) 0 var(--s5); align-items: start; }
.front-play { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.front-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.front-head h1 { margin: 0; font-size: var(--fs-lg); }
.front-title { color: var(--dim); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
.front-board { width: min(100%, max(16rem, calc(var(--svh) - 16rem))); }
.front-board.off { display: none; }
.front-turn { display: flex; align-items: center; gap: var(--s2); margin: 0; }
.front-turn .small { color: var(--dim); }
.front-says { margin: 0; min-height: 1.6em; }
.front-acts { display: flex; flex-wrap: wrap; gap: var(--s2); }
.front-more { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.front-card { color: inherit; text-decoration: none; }
@media (hover: hover) { .front-card:hover { background: var(--hover); } }
.front-join h2 { margin: 0; font-size: var(--fs-md); }
.front-join p { margin: 0; color: var(--dim); font-size: var(--fs-sm); letter-spacing: var(--ls-sm); }
:root:not([data-format=phone]) .front { grid-template-columns: minmax(0, 38rem) minmax(16rem, 26rem); gap: var(--s6); }
:root:not([data-format=phone]) .front-board { width: min(100%, calc(var(--vh) - 12rem)); }

/* The engine on an iPad (T-174, ruled C + E2 B; frames EC1-EC5): a switch in the segment row by
   search; while it's on, its lines in a card over the segments, the best line with ▾ for the
   rest. The switch, score and W/D/B leave the card's head (the row and the bar carry them). */
.ws[data-layout|=ipad] .ws-tabs .ws-seg-rule { flex: none; width: 1px; height: 1.25rem; margin: 0 var(--s1); background: var(--border); }
.ws-seg-eng { flex: none; display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0 var(--s2); min-height: 2.4rem;
  background: none; border: 0; border-radius: calc(var(--r-control) - 2px); color: var(--muted); font-weight: var(--w-bold); font-size: var(--fs-sm); }
.ws-seg-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--panel3); }
.ws-seg-eng[aria-checked=true] { color: var(--accent); }
.ws-seg-eng[aria-checked=true] .ws-seg-dot { background: var(--accent); }
.ws[data-layout|=ipad] .ws-side > .ws-engine { order: -2; align-self: stretch; margin: 0 0 var(--s2); padding: 0; min-height: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-head { flex-wrap: nowrap; padding: 0.3rem 0.4rem 0.3rem 0.75rem; min-height: 2.4rem; }
.ws[data-layout|=ipad] .ws-side > .ws-engine :is(.ws-eng-switch, .ws-eng-eval, .ws-eng-wdl) { display: none; }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-state::before { content: "Stockfish 19 · "; }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-more { padding: 0.3rem; border: 0; background: none; color: var(--muted); }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-more .ic { width: 1.1rem; height: 1.1rem; }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-settings { padding: 0 0.75rem 0.5rem; }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-lines { margin: 0; gap: 0; }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-lines > li { border-top: 1px solid var(--border); padding: 0.4rem 0.75rem; }
.ws-engine .ws-eng-fold.link { display: block; width: 100%; margin: 0; padding: 0.35rem 0.75rem; min-height: 0; text-align: left; border: 0; border-top: 1px solid var(--border);
  border-radius: 0; background: none; color: var(--accent); font-size: var(--fs-sm); font-weight: var(--w-bold); text-decoration: none; }
.ws[data-layout|=ipad] .ws-side > .ws-engine .ws-eng-moves .mv:first-child { font-weight: var(--w-bold); color: var(--ink); }
/* The header keeps its height over the card (EC2: the card squeezed its opening line away). */
.ws[data-layout=ipad-wide] .ws-ph-head { flex: none; }
/* Six things in the row (EC1): the segments as wide as their words, the switch and search tight. */
.ws[data-layout|=ipad] .ws-tabs button[role=tab] { flex: 1 1 auto; min-width: max-content; padding-inline: 0.35rem; font-size: 0.8125rem; }
.ws[data-layout|=ipad] .ws-seg-eng { padding: 0 0.4rem; font-size: 0.8125rem; gap: 0.3rem; }
/* Search on an iPad is always the icon, opening over the row (EC1-EC5), however wide the row. */
.ws[data-layout|=ipad] .ws-search-slot, .ws[data-layout|=ipad] .ws-search-slot > div { flex: none; }
.ws[data-layout|=ipad] .ws-search-wrap { flex: none; margin: 0; }
.ws[data-layout|=ipad] .ws-tabs .ws-search-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); padding: 0.4rem; }
.ws[data-layout|=ipad] .ws-tabs .ws-search-icon svg { width: 1.1rem; height: 1.1rem; }
.ws[data-layout|=ipad] .ws-search-wrap .ws-search { display: none; }
.ws[data-layout|=ipad] .ws-search-wrap.open { position: absolute; inset: 0; z-index: var(--z-sheet); display: flex; align-items: center; background: var(--bg); max-width: none; padding: 0 0.25rem; }
.ws[data-layout|=ipad] .ws-search-wrap.open .ws-search-icon { display: none; }
.ws[data-layout|=ipad] .ws-search-wrap.open .ws-search { display: block; flex: 1 1 auto; }

/* T-173, the iPad sweep (test findings 2, 3, 9-11). */
/* 2: Next and Tools keep their wider share in the column's bar (the in-column rule made all five
   equal); the words a size down. */
.ws-ph-bar.in-column button.next { flex: 1.6; }
.ws-ph-bar.in-column button.tools { flex: 1.4; }
.ws[data-layout|=ipad] .ws-ph-bar button { font-size: var(--fs-sm); gap: 0.3rem; }
.ws[data-layout|=ipad] .ws-ph-bar .ic { width: 1.25rem; height: 1.25rem; }
/* 3: the column as wide as the screen leaves it, whatever its segment holds (a wide table grew it). */
.ws[data-layout=ipad-wide] .ws-side { flex: 1 1 0; min-width: 0; }
/* 9: the result bar's figures fit their segments. */
.ws[data-layout|=ipad] .wdl { font-size: 0.625rem; letter-spacing: 0; }
/* 11: the explorer tighter (frames W3, U6): no Avg and Perf in the column, closer rows, less
   room between its controls. */
.ws[data-layout|=ipad] .ws-explorer :is(.col-avg, .col-perf) { display: none; }
.ws[data-layout|=ipad] .ws-explorer .moves-table :is(th, td) { padding: 0.3rem 0.35rem; }
.ws[data-layout|=ipad] .ws-explorer .total { margin: 0 0 0.15rem; font-size: var(--fs-xs); }
.ws[data-layout|=ipad] .ws-explorer :is(.source-tabs, .pr-switch) { margin-bottom: 0.35rem; }
/* The move's button took the buttons' touch height and set each row's (54 px); the whole row is the
   tap on an iPad (it plays the move), so the rows follow the mock's (W3: about 34 px). */
.ws[data-layout|=ipad] .ws-explorer .moves-table .san { min-height: 0; padding: 0 0.2rem 0 0; font-size: var(--fs-sm); }
.ws[data-layout|=ipad] .ws-explorer .moves-table tbody :is(th, td) { padding-block: 0.45rem; }
/* The query as one summary line on every iPad (frames W3, U6; finding 11), however wide the pane:
   upright it showed the full Where · What · Which games row. The pickers open in their sheet. */
.ws[data-layout|=ipad] .ex-query .qsum { display: flex; align-items: center; gap: 0.5rem; width: 100%; margin: 0; padding: 0.45rem 0.6rem; text-align: left;
  background: var(--surface); color: var(--strong); border: 1px solid var(--control); border-radius: var(--r-control);
  font-size: var(--fs-sm); letter-spacing: var(--ls-sm); font-weight: var(--w-text); }
.ws[data-layout|=ipad] .ex-query .qsum .grow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws[data-layout|=ipad] :is(.ex-query > .qrow, .ex-query > .filter-summary, .ex-query ~ .filter-summary) { display: none; }
/* The engine went quiet (T-181): the note and its record, for a screenshot. */
.ws-rv-stall { margin: 0 0 var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--panel2); }
.ws-rv-stall p { margin: 0; }
.ws-rv-stall pre { margin: var(--s2) 0 0; max-height: 18rem; overflow: auto; font-size: var(--fs-xs); white-space: pre-wrap; word-break: break-all; }

/* ---- The library on a desktop (phase 4, frame 2B; src/library/desk.rs): Analyse's tab row, the
   board previewing the picked game, one quiet pane (picker, import line, filter, selection bar, a
   table one line a game, foot). Sizes from library-2026-11-06 `desk()`. ---- */
body:has(.lib-new) { height: 100dvh; min-height: 0; overflow: hidden; }
body:has(.lib-new) footer { display: none; }
body:has(.lib-new) main { min-height: 0; padding: 0; display: flex; }
.app.lib.lib-new { max-width: none; flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; min-height: 0; }
.ld { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ld button { min-height: 0; margin: 0; font-family: inherit; line-height: inherit; }
.ld kbd { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--dim); background: none; border: 0; padding: 0; }
.ld-sp { flex: 1; }
.ld-tabs { height: 38px; flex: none; display: flex; align-items: flex-end; gap: 2px; padding: 0 10px; background: var(--rail); overflow-x: auto; scrollbar-width: none; }
.ld-tab { height: 31px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 8px 8px 0 0;
  background: none; color: var(--dim); font-size: 12.5px; max-width: 230px; white-space: nowrap; cursor: pointer; }
.ld-tab .ic { width: 15px; height: 15px; }
.ld-tab-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ld-tab.on { background: var(--bg); color: var(--ink); font-weight: var(--w-bold); cursor: default; }
.ld-tab-x { border: 0; background: none; padding: 0; color: var(--dim); font-size: 12px; cursor: pointer; }
@media (hover: hover) { .ld-tab:not(.on):hover { color: var(--ink); background: var(--hover); } }
.ld-body { flex: 1; min-height: 0; display: flex; gap: 18px; padding: 14px 18px; }
/* The preview: Analyse's board place (640 at 1440 × 900), never taller than the window allows. */
.ld-prev { --pv: min(640px, calc(var(--vh) - 38px - 28px - 150px), calc(var(--vw) - 36px - 18px - 560px));
  width: var(--pv); flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ld-prev .mini-board { width: 100%; border-radius: 6px; }
.ld-pvh { display: flex; align-items: baseline; gap: 10px; font-size: 13px; min-width: 0; }
.ld-pvh b { font-size: 15px; white-space: nowrap; }
.ld-pvh span { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-pvh { flex-wrap: wrap; }
.ld-pvh .ld-left { flex-basis: 100%; }
.ld-strip { font-size: 13px; line-height: 1.7; font-variant-numeric: tabular-nums; padding: 6px 10px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); max-height: 66px; overflow-y: auto; scrollbar-width: thin; min-height: 2.4rem; }
.ld-strip .n { color: var(--dim); margin-right: 3px; }
.ld-strip .cur { background: var(--acc-soft); border-radius: 5px; padding: 1px 4px; font-weight: 700; }
.ld-prev-btns { display: flex; gap: 8px; }
.ld-prev-btns .k-btn { min-height: 40px; font-size: 14px; }
.ld-pane { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ld-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0; }
.ld-head, .ld-filter, .ld-selbar, .ld-imp-wrap, .ld-note { margin-left: 10px; margin-right: 10px; }
.ld-head { margin: 0; }
.ld-pickwrap, .ld-pop-anchor { position: relative; }
.ld-picker { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-radius: 9px;
  background: var(--panel2); color: var(--ink); font-weight: var(--w-bold); font-size: 14px; white-space: nowrap; cursor: pointer; }
.ld-picker .ic { width: 16px; height: 16px; }
.ld-picker small { font-weight: 400; color: var(--dim); font-size: 12.5px; }
.ld-tb { height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border: 0; border-radius: 7px;
  background: var(--panel2); color: var(--ink); font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.ld-tb .ic { width: 15px; height: 15px; }
.ld-tb.del { color: var(--error); }
.ld-tb.main { background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); }
.ld-tb:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) { .ld-tb:not(:disabled):not(.main):hover, .ld-picker:hover { background: var(--hover); } }
.ld-pop { position: absolute; z-index: var(--z-sheet); top: calc(100% + 4px); left: 0; min-width: 15rem; max-height: min(70vh, 32rem); overflow-y: auto;
  display: grid; padding: 4px; background: var(--panel); border-radius: var(--r-panel); box-shadow: 0 8px 24px var(--shade); }
.ld-mh { margin: 8px 10px 2px; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); font-weight: var(--w-bold); }
.ld-mi { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 10px; border: 0; border-radius: var(--r-control);
  background: none; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; white-space: nowrap; }
.ld-mi .ic { width: 16px; height: 16px; color: var(--dim); }
.ld-mi.dim { color: var(--dim); }
.ld-mi.on { background: var(--acc-soft); font-weight: var(--w-bold); }
.ld-mi:hover, .ld-mi:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
.ld-mi:hover .ic, .ld-mi:hover kbd, .ld-mi:hover .ld-mi-n { color: inherit; }
.ld-mi-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ld-mi-n { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ld-mi kbd { margin-left: var(--s4); }
.ld-msep { margin: 4px 8px; border: 0; border-top: 1px solid var(--line); }
.ld-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.ld-tagdot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none; margin: 0 4px 0 3px; }
.ld-rowmenu { position: fixed; top: auto; }
.ld-imp { display: flex; flex-direction: column; gap: 5px; padding: 9px 12px; border-radius: 10px; background: var(--acc-soft); font-size: 12.5px; cursor: pointer; }
.ld-imp-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ld-imp-l1 b { font-size: 13px; white-space: nowrap; }
.ld-imp-l1 span { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-imp-x { margin-left: auto !important; border: 0; background: none; color: var(--dim); font-weight: var(--w-bold); cursor: pointer; padding: 0; }
.ld-ibar { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 22%, transparent); overflow: hidden; }
.ld-ibar i { display: block; height: 100%; background: var(--accent); }
.ld-ibar.wait i { opacity: 0.35; }
.ld-imp-wrap .lib-imports { margin: 6px 0 0; }
.ld-filter { display: flex; gap: 6px; align-items: center; }
.ld-box { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--dim); font-size: 12.5px; }
.ld-box:focus-within { border-color: var(--control); }
.ld-box .ic { width: 17px; height: 17px; }
.ld-box input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; outline: none; box-shadow: none; }
.ld-box kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.ld-chip { height: 30px; display: inline-flex; align-items: center; gap: 4px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 12.5px; white-space: nowrap; cursor: pointer; }
.ld-chip .ic { width: 14px; height: 14px; }
.ld-chip.on { background: var(--acc-soft); border-color: transparent; font-weight: var(--w-bold); }
.ld-chipmenu { left: auto; right: 0; min-width: 12rem; }
.ld-dates { gap: 8px; padding: 10px; font-size: 13px; }
.ld-dates label { display: grid; gap: 2px; color: var(--dim); }
.ld-dates input { margin: 0; height: 32px; font-size: 13px; }
.ld-dates-btns { display: flex; gap: 6px; justify-content: flex-end; }
.ld-selbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; overflow: hidden; }
.ld-selbar b { white-space: nowrap; padding: 0 4px; }
.ld-hint { color: var(--dim); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-lk { border: 0; background: none; padding: 0 4px; color: var(--accent); font-weight: var(--w-bold); white-space: nowrap; cursor: pointer; }
.ld-note { margin-top: 0; margin-bottom: 0; font-size: 12.5px; color: var(--dim); }
.ld-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; border-top: 1px solid var(--line); }
.ld-scroll > .lib-list, .ld-scroll > .lib-head, .ld-scroll > .lib-selbar, .ld-scroll > p { margin-left: 10px; margin-right: 10px; }
.ld-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; font-variant-numeric: tabular-nums; }
.ld-table th { position: sticky; top: 0; z-index: var(--z-page); text-align: left; font-weight: 500; color: var(--dim); font-size: 11.5px;
  padding: 7px 8px; border-bottom: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.ld-table th.srt, .ld-table th.srt .ld-th { color: var(--ink); font-weight: var(--w-bold); }
.ld-th { border: 0; background: none; padding: 0; color: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; }
.ld-table td { padding: 0 8px; height: 30px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-table tbody tr { cursor: pointer; }
.ld-table tr.on td { background: var(--acc-soft); }
.ld-table tr.on td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.ld-table tr.tk:not(.on) td { background: color-mix(in srgb, var(--acc-soft) 55%, transparent); }
@media (hover: hover) { .ld-table tbody tr:not(.on):not(.tk):hover td { background: var(--hover); } }
.ld-table .dimc { color: var(--dim); }
.ld-table td.res { font-weight: var(--w-bold); }
/* A tag's own view (D-LB.25): "Games" and "Bookmarks" over their rows. */
.ld-table tr.ld-head td { cursor: default; color: var(--dim); font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.lt-head { list-style: none; padding: var(--s3) var(--s4) var(--s1); color: var(--dim); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.ld-table td.me { font-weight: 700; }
.ld-mark { color: var(--dim); }
.ld-tick { width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid var(--control); display: inline-grid; place-items: center;
  vertical-align: middle; background: var(--panel); cursor: pointer; }
.ld-tick.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ld-tick .ic { width: 14px; height: 14px; stroke-width: 3; }
.ld-tg { display: inline-block; margin: 0 0 0 4px; padding: 0 6px; border: 0; border-radius: 7px; background: var(--panel2); color: var(--dim);
  font-size: 11px; font-weight: 500; line-height: 17px; cursor: pointer; }
.ld-tg:first-child { margin-left: 0; }
.ld-empty { margin: 12px 10px; color: var(--dim); font-size: 13px; }
.ld-end { height: 1px; }
.ld-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; font-size: 12px; color: var(--dim);
  border-top: 1px solid var(--line); background: var(--panel); }
.mb-keys { color: var(--dim); font-size: 12px; white-space: nowrap; padding: 0 var(--s2); }
.mb-keys kbd { font-family: "IBM Plex Mono", monospace; font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin: 0 1px; }

/* ---- The library on an iPad and a phone (phase 4, frames W and 1-3; src/library/touch.rs). ---- */
.lt { flex: 1; min-height: 0; display: flex; }
.lt button { margin: 0; font-family: inherit; }
.lt .k-btn.lt-small { min-height: 36px; height: 36px; font-size: 14px; }
.lt-badge { min-width: 34px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700;
  padding: 0 6px; flex: none; font-variant-numeric: tabular-nums; }
.lt-badge.w { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.lt-badge.l { background: color-mix(in srgb, var(--error) 16%, transparent); color: var(--error); }
.lt-badge.d { background: var(--panel2); color: var(--dim); }
.ld-tick.big { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.ld-tick.big .ic { width: 17px; height: 17px; }
.me { font-weight: 700; }
/* iPad: the board on the left by height, one column. */
.lt-ipad { gap: 16px; padding: 16px; }
.lt-left { --pv: min(600px, calc(var(--vh) - 32px - 30px - 76px), calc(var(--vw) - 48px - 360px));
  width: var(--pv); flex: none; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.lt-left .mini-board { width: 100%; border-radius: 6px; }
.lt-left .ld-strip { flex: 0 1 auto; max-height: 76px; }
.lt-col { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.lt-head { display: flex; align-items: center; gap: 8px; }
.lt-count { font-size: 16px; flex: 1; }
.lt-search { display: flex; gap: 8px; align-items: center; }
.lt-box { height: 40px; flex: 1; font-size: 13.5px; }
.lt-chip { height: 40px; border-radius: 10px; }
.lt-quiet { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lt-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.lt-scroll > .lib-list, .lt-scroll > .lib-head, .lt-scroll > .lib-selbar, .lt-scroll > p { margin-left: 10px; margin-right: 10px; }
.lt-rows { list-style: none; margin: 0; padding: 0; }
.lt-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-height: 48px; border-top: 1px solid var(--line); cursor: pointer; }
.lt-row:first-child { border-top: 0; }
.lt-row.on { background: var(--acc-soft); box-shadow: inset 3px 0 0 var(--accent); }
.lt-row.tk { background: color-mix(in srgb, var(--acc-soft) 60%, transparent); }
.lt-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; gap: 1px; text-align: left; }
.lt-row .lt-tx { flex-direction: row; align-items: baseline; white-space: nowrap; overflow: hidden; }
.lt-tx b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-tx > span { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-row .lt-date { color: var(--dim); font-size: 14px; }
.lt-btns { display: flex; gap: 8px; }
.lt-btns .k-btn.big { flex: 1; width: auto; min-height: 52px; border-radius: 12px; }
.lt-btns .lt-open { flex: 1.6; }
.lt-actions { display: flex; gap: 6px; padding: 6px; background: var(--rail); border-radius: 12px; }
.lt-actions .k-btn { flex: 1; min-height: 52px; height: 52px; border-radius: 12px; flex-direction: column; gap: 2px; font-size: 12px; padding: 0; }
.lt-actions .k-btn .ic { width: 20px; height: 20px; }
.lt-actions .k-btn.del { color: var(--error); }
/* Phone: your library, then a database's games. */
.lt-phone { flex-direction: column; height: calc(var(--vh) - var(--bottom-bar, 0px)); }
.lt-top { height: 56px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; }
.lt-tt { flex: 1; min-width: 0; line-height: 1.2; }
.lt-tt h1 { margin: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-tt span { font-size: 12px; color: var(--dim); }
.lt-body { flex: 1; overflow-y: auto; padding: 4px 14px 18px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.lt-sbox { flex: none; width: 100%; color: var(--dim); cursor: text; text-align: left; }
.lt-gh { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--dim); padding: 12px 14px 4px; margin: 0; font-weight: 600; }
.lt-grp { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lt-quietlist { list-style: none; margin: 0; padding: 0; }
.lt-body > .lt-quietlist { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lt-quietlist li + li { border-top: 1px solid var(--line); }
.lt-srow { display: flex; align-items: center; gap: 11px; width: 100%; padding: 0 14px; min-height: 50px; border: 0; background: none;
  color: var(--ink); font-size: 14.5px; text-align: left; cursor: pointer; }
.lt-srow .ic { width: 19px; height: 19px; color: var(--dim); }
.lt-nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-nm small { display: block; font-size: 12px; color: var(--accent); font-weight: 600; }
.lt-ct { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.lt-chev { color: var(--dim); }
.lt-ghead { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 0 14px 10px; }
.lt-ghead .ld-imp-wrap, .lt-ghead .ld-note { margin: 0; }
.lt-body .ld-imp-wrap { margin: 0; }
.lt-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lt-plist { flex: 1; min-height: 0; overflow-y: auto; background: var(--panel); border-top: 1px solid var(--line); }
.lt-prows { list-style: none; margin: 0; padding: 0; }
.lt-prows li + li { border-top: 1px solid var(--line); }
.lt-prow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; min-height: 60px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.lt-rt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
/* The filter sheet (frame 3). */
.lt-fsheet { background: var(--bg); display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }
.lt-fhead { background: var(--bg); border-bottom: 0; }
.lt-fhead h2 { font-size: 17px; }
.lt-clear { border: 0; background: none; color: var(--dim); font-size: 15px; padding: 0 var(--s2); min-height: 0; cursor: pointer; }
.lt-fhead .k-done { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 15px; padding: 0 var(--s2); min-height: 0; cursor: pointer; }
.lt-frow { display: flex; flex-direction: column; gap: 6px; }
.lt-frow > span { font-size: 12px; color: var(--dim); font-weight: 600; }
.lt-seg { display: flex; border-radius: 10px; padding: 3px; gap: 3px; }
.lt-seg button { flex: 1; height: 34px; min-height: 0; padding: 0; border-radius: 8px; font-size: 13.5px; font-weight: 450; }
.lt-seg button[aria-pressed=true] { font-weight: 600; }
.lt-in { height: 42px; margin: 0; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); padding: 0 12px; font-size: 14px; width: 100%; }
.lt-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lt-show { margin-top: var(--s1); }
.lt .lt-srow, .lt .lt-prow, .lt .lt-sbox { font-weight: var(--w-text); }
.lt .lt-sbox { color: var(--dim); font-size: 13.5px; }
.lt .lt-nm small, .lt .lt-tx b { font-weight: 600; }
.lt .ld-chip { min-height: 0; height: 30px; font-weight: var(--w-text); font-size: 12.5px; }
.lt .ld-chip.on { font-weight: 600; }
.lt .lt-search .ld-chip { height: 40px; }
.lt-fsheet .lt-seg button { min-height: 0; height: 34px; font-weight: var(--w-text); font-size: 13.5px; }
.lt-fsheet .lt-seg button[aria-pressed=true] { font-weight: 600; }
.lt-col .ld-imp-wrap, .lt-col .ld-note { margin-left: 0; margin-right: 0; }
/* The shelf picker, made prominent (owner, 2026-11-13-1): the pane's title, soft olive, its kind over its name. */
.ld .ld-picker, .lt .ld-picker { height: auto; min-height: 48px; padding: 5px 12px 5px 10px; gap: 10px; border-radius: 11px;
  background: var(--acc-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); max-width: 100%; }
.ld-picker > .ic:first-child { width: 22px; height: 22px; color: var(--accent); }
.ld-picker > .ic:last-child { width: 18px; height: 18px; color: var(--accent); }
.ld-pick-tx { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.ld-pick-tx b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22rem; }
.ld-pick-k { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.ld .ld-pick-n, .lt .ld-pick-n { align-self: flex-end; margin-bottom: 2px; font-size: 13px; }
@media (hover: hover) { .ld .ld-picker:hover, .lt .ld-picker:hover { background: color-mix(in srgb, var(--acc-soft) 70%, var(--hover)); } }
.ld-picker[aria-expanded=true] { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---- Puzzles' front page on an iPad held sideways and a desktop (phase 4, frame 1A;
   src/puzzles/hub.rs): a hub in two columns. Sizes from puzzles-wide-2026-11-06 `hub()`. ---- */
body:has(.phb) { height: 100dvh; min-height: 0; overflow: hidden; }
body:has(.phb) footer { display: none; }
body:has(.phb) main { min-height: 0; padding: 0; display: flex; }
body:has(.phb) .app { max-width: none; flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; min-height: 0; }
.phb { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 22px; }
.phb a { color: inherit; text-decoration: none; }
.phb-head { display: flex; align-items: center; gap: 14px; }
.phb-head .phb-hint { font-size: 13.5px; }
.phb-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--w-bold); font-size: 16px; color: var(--ink); }
.phb .k-area { width: 30px; height: 30px; border-radius: 9px; }
.phb .k-area .ic { width: 19px; height: 19px; }
.phb-hint { font-size: 12.5px; color: var(--dim); }
.phb-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.phb-left { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.phb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.phb-card { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; cursor: pointer; }
.phb-card b { font-size: 16px; }
.phb-s { font-size: 13px; color: var(--dim); }
.phb-top { display: flex; align-items: center; gap: 8px; }
.phb-badge { margin-left: auto; font-size: 11.5px; font-weight: var(--w-bold); border-radius: 8px; padding: 2px 8px; background: color-mix(in srgb, var(--pz) 18%, transparent); color: var(--ink); }
.phb-lead { grid-column: 1 / -1; flex-direction: row; gap: 16px; align-items: center; background: color-mix(in srgb, var(--pz) 10%, var(--panel)); }
.phb-mb { width: 150px; flex: none; }
.phb-mb .mini-board { width: 100%; border-radius: 6px; }
.phb-ph { display: block; width: 150px; aspect-ratio: 1; border-radius: 6px; background: var(--panel2); }
.phb-tx { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.phb-lt { font-size: 18px !important; }
.phb-done { font-size: 13px; font-weight: var(--w-bold); color: var(--good); }
.phb .phb-play { align-self: flex-start; min-height: 44px; padding: 0 16px; border-radius: 10px; background: var(--pz); color: var(--on-area);
  font-weight: var(--w-bold); font-size: 14px; box-shadow: 0 3px 0 color-mix(in srgb, var(--pz) 60%, var(--black)); }
.phb-foot { margin: 0; font-size: 12px; color: var(--dim); }
.phb-side { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.phb-rcard { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.phb-rrow { display: flex; align-items: flex-end; gap: 12px; }
.phb-big { font-size: 30px; font-weight: var(--w-bold); font-variant-numeric: tabular-nums; line-height: 1; }
.phb-chg { color: var(--good); font-weight: var(--w-bold); }
.phb-chg.dn { color: var(--error); }
.phb-spark { width: 100%; height: 60px; display: block; }
.phb-in b { font-size: 15px; }
.phb-row { flex-direction: row; align-items: center; }
.phb-row b { flex: 1; }
.phb-recent { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; }
.phb-rh { display: flex; justify-content: space-between; padding: 10px 12px 4px; font-size: 12.5px; color: var(--dim); }
.phb-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.phb-att { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.phb-att:first-child { border-top: 0; }
.phb-att .m { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--good); }
.phb-att.l .m { background: var(--error); }
.phb-att .tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phb-att .ch { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--good); }
.phb-att.l .ch { color: var(--error); }
.phb-none { padding: 8px 12px; margin: 0; }
@media (hover: hover) { .phb-card:hover, .phb-att:hover { filter: brightness(0.97); } }

/* ---- Puzzles solving on an iPad held sideways and a desktop (phase 4, frames QW2, QD2;
   src/puzzles/mod.rs `wide_view`): the board left (by height, at most 600 / 640 px), one panel
   right. Sizes from puzzles-wide-2026-11-06 `solve()`. ---- */
body:has(.pz-w) { height: 100dvh; min-height: 0; overflow: hidden; }
body:has(.pz-w) footer { display: none; }
body:has(.pz-w) main { min-height: 0; padding: 0; display: flex; }
.pz-page.pz-w { max-width: none; margin: 0; flex: 1; min-width: 0; min-height: 0; height: var(--vh); }
.pzw { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 16px; box-sizing: border-box; height: 100%; }
:root[data-format=desk] .pzw { gap: 18px; padding: 14px 18px; }
.pzw-board { --bw: min(600px, calc(var(--vh) - 32px), calc(100vw - var(--frame-l, 84px) - 32px - 16px - 340px)); width: var(--bw); flex: none; }
:root[data-format=desk] .pzw-board { --bw: min(640px, calc(var(--vh) - 28px), calc(100vw - var(--frame-l, 76px) - 36px - 18px - 360px)); }
.pz-w .pz-board { width: 100%; margin: 0; }
.pzw-pnl { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: thin; }
.pzw-pnl button { margin: 0; }
.pzw-hd { display: flex; align-items: center; gap: 10px; }
.pzw-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--w-bold); font-size: 16px; color: var(--ink); }
.pzw-mark .k-area { width: 30px; height: 30px; border-radius: 9px; }
.pzw-mark .k-area .ic { width: 19px; height: 19px; }
.pzw-r { margin-left: auto; text-align: right; line-height: 1.2; }
.pzw-r b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pzw-r span { display: block; font-size: 11.5px; color: var(--dim); }
.pzw-ctx { margin: 0; font-size: 12.5px; color: var(--dim); }
.pzw-hint { font-size: 12.5px; color: var(--dim); margin: 0; }
.pzw-which { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 0; padding: 9px 12px; border: 0; border-radius: 10px;
  background: var(--panel2); color: var(--ink); font-size: 13.5px; font-weight: 400; text-align: left; cursor: pointer; }
.pzw-which b { font-weight: 600; }
.pzw-which .ic { width: 16px; height: 16px; }
.pzw-which .ic:last-child { margin-left: auto; }
.pzw-prompt { border-radius: 12px; padding: 12px 14px; background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column;
  gap: 4px; min-height: 92px; justify-content: center; flex: none; }
.pzw-prompt .t { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: var(--w-bold); }
.pzw-prompt .s { font-size: 13.5px; color: var(--dim); min-height: 1.2em; }
.pzw-prompt.ok { background: color-mix(in srgb, var(--good) 14%, var(--panel)); }
.pzw-prompt.no { background: color-mix(in srgb, var(--error) 12%, var(--panel)); }
.pzw-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--dim); background: var(--piece-white); flex: none; }
.pzw-dot.b { background: var(--piece-black); }
.pzw-res { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.pzw-res b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pzw-chg { color: var(--good); font-weight: var(--w-bold); }
.pzw-chg.dn { color: var(--error); }
.pzw-why { min-height: 0; padding: 0 4px; border: 0; background: none; color: var(--dim); font-size: 13px; cursor: pointer; }
.pzw-thm { display: flex; flex-wrap: wrap; gap: 6px; }
.pzw-thm:empty { display: none; }
.pzw-thm i { font-style: normal; font-size: 12px; border-radius: 12px; padding: 3px 10px; background: color-mix(in srgb, var(--pz) 16%, transparent); color: var(--ink); }
.pzw-sess { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pzw-lab { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.pzw-sqs { display: flex; gap: 5px; flex-wrap: wrap; }
.pzw-sq { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-size: 10.5px; font-weight: var(--w-bold);
  color: var(--on-area); text-decoration: none; font-variant-numeric: tabular-nums; }
.pzw-sq.w { background: var(--good); } .pzw-sq.l { background: var(--error); }
.pzw-sq.cur { background: none; border: 2px dashed var(--dim); color: var(--dim); box-sizing: border-box; }
.pzw-filt { flex: 1 1 auto; min-height: 12rem; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; scrollbar-width: thin; }
.pzw-filt .pf { padding: 12px; font-size: 13px; }
.pzw-gap { flex: 1 0 0; }
.pzw-foot { display: flex; gap: 8px; flex: none; }
.pzw-foot .k-btn { min-height: 52px; border-radius: 12px; padding: 0 14px; font-size: 15px; }
.pzw-foot .k-btn .ic { width: 18px; height: 18px; }
.pzw-foot .grow { flex: 1; }
.pzw-foot .k-btn.pz { background: var(--pz); color: var(--on-area); font-weight: var(--w-bold); box-shadow: 0 3px 0 color-mix(in srgb, var(--pz) 60%, var(--black)); border: 0; }
.pzw-foot .k-btn[aria-pressed=true] { background: var(--acc-soft); }
.pzw-credit { margin: 0; font-size: 12px; color: var(--dim); flex: none; }
.pz-w .pz-an-moves { margin: 0; }
/* The filters in the desktop's panel (2B): the mock's quiet pane, compact; the sheet's head kept for
   focus (F) but out of sight. */
.pzw-filt .pf { background: none; }
.pzw-filt .pf-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; }
.pzw-filt .pf-body { padding: 12px; gap: 10px; overflow: visible; }
.pzw-filt .pf-lab { font-size: 11.5px; color: var(--dim); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.pzw-filt .pf-note { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pzw-filt .pf-seg { border-radius: 9px; background: var(--panel2); }
.pzw-filt .pf-seg button { min-height: 30px; font-size: 12.5px; border-radius: 7px; }
.pzw-filt .pf-seg button[aria-pressed=true] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.pzw-filt .pf-chip { min-height: 28px; padding: 0 10px; font-size: 12px; }
.pzw-filt .pf-expect, .pzw-filt .pf-sub { font-size: 12.5px; }
.pzw-filt .pf-foot { padding: 8px 12px; font-size: 12.5px; }
.pzw-filt button.pf-chip { border-radius: 14px; }
.pzw-filt button.pf-chip[aria-pressed=true] { background: color-mix(in srgb, var(--pz) 18%, transparent); border-color: transparent; color: var(--ink); font-weight: 600; }

/* ---- Puzzle Mayhem on an iPad held sideways and a desktop (frames QW3-4, QD3-4;
   src/puzzles/mayhem.rs `wide_view`), from puzzles-wide-2026-11-06 `mayhem()`. ---- */
.mhw-name { margin-left: 6px; font-size: 12.5px; }
.mhw-empty { position: relative; }
.mhw-empty .mini-board { width: 100%; border-radius: 6px; }
.mhw-press { position: absolute; inset: 0; display: grid; place-items: center; font-weight: var(--w-bold); font-size: 20px; color: var(--ink);
  background: color-mix(in srgb, var(--bg) 55%, transparent); border-radius: 6px; }
.stage-after .mhw-empty .mini-board { opacity: 0.5; }
.pzw-mtabs { display: flex; border-radius: 10px; background: var(--panel2); padding: 3px; gap: 3px; flex: none; }
.pzw-mtabs button { flex: 1; min-height: 34px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink); font-size: 13px; font-weight: 400; }
.pzw-mtabs button[aria-pressed=true] { background: var(--panel); font-weight: 600; box-shadow: var(--shadow); }
.pzw-pnl .phb-rcard { flex: none; }
.pzw-pnl .phb-big { display: block; }
.mhw-rules { font-size: 13.5px; }
.mhw-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: none; }
.mhw-hud .box { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; }
.mhw-hud .box span { font-size: 11.5px; color: var(--dim); }
.mhw-hud .box b { font-size: 34px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mhw-strikes { display: flex; align-items: center; gap: 12px; }
.mhw-x { display: flex; gap: 6px; font-size: 20px; font-weight: var(--w-bold); }
.mhw-x i { font-style: normal; color: var(--panel3); }
.mhw-x i.on { color: var(--error); }
.mhw-after { display: flex; flex-direction: column; gap: 10px; }
.mhw-after .mh-final { margin: 0; }
.pzw-foot a.k-btn { text-decoration: none; }
.mhw-after.mh-after { padding: 0; }
.mhw-after .mh-final { text-align: left; }

/* ---- The trainer per format (phase 4, D-AR.36; src/train.rs; frames TP2, TP3, TW2, TD2 of
   repertoire-2026-11-13): on a phone a board screen with its own bar; on an iPad held sideways and
   a desktop the board left (as Puzzles), one panel with the line, the prompt, this session's
   squares and the foot. Sizes from the mock's `phTrain()`, `phDone()`, `trainW()`. ---- */
.tr-head { min-height: 56px; padding: 0 8px 0 6px; border-bottom: 0; background: none; }
body:has(.tr-page) main { padding: 0; }
:root[data-format=phone] .tr-page { min-height: var(--svh); }
.tr-stop, .tr-back { width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; color: var(--ink); }
.tr-stop .ic, .tr-back .ic { width: 22px; height: 22px; }
.tr-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.tr-tt b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.tr-tt span { font-size: 12px; color: var(--dim); }
.tr-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--w-bold); font-size: 16px; color: var(--ink); }
.tr-mark .k-area { width: 30px; height: 30px; border-radius: 9px; }
.tr-mark .k-area .ic { width: 19px; height: 19px; }
.tr-progress { height: 4px; border-radius: 2px; background: var(--panel2); overflow: hidden; flex: none; }
.tr-progress > span { background: var(--rp); }
.tr-progress.tr-top { margin: 0 14px 2px; }
.tr-run { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tr-run .tr-line { min-height: 0; padding: 6px 14px; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-format=phone] .tr-board { width: min(100%, max(12rem, calc(var(--svh) - 17rem))); margin: 0 auto; }
.tr-under { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.tr-says { padding: 0; gap: 0; align-items: stretch; text-align: left; }
.tr-pr { border-radius: 12px; padding: 12px 14px; background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column;
  gap: 4px; min-height: 92px; justify-content: center; text-align: left; }
.tr-pr .t { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: var(--w-bold); color: var(--ink); }
.tr-pr .s { font-size: 13.5px; color: var(--dim); }
.tr-pr .s.sm { font-size: 12.5px; }
.tr-pr.ok { background: color-mix(in srgb, var(--good) 14%, var(--panel)); }
.tr-pr.no { background: color-mix(in srgb, var(--error) 12%, var(--panel)); }
.tr-pr.new { background: color-mix(in srgb, var(--rp) 10%, var(--panel)); }
.tr-pr.drill { box-shadow: none; border: 1px dashed var(--control); }
.tr-pr .tr-tag { align-self: flex-start; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 6px;
  padding: 2px 7px; background: var(--rp); color: var(--on-area); }
.tr-pr.drill .tr-tag { background: var(--panel2); color: var(--dim); }
.tr-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--dim); background: var(--piece-white); flex: none; }
.tr-dot.b { background: var(--piece-black); }
.tr-sess { display: flex; flex-direction: column; gap: 6px; }
.tr-lab { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.tr-sqs { display: flex; gap: 5px; flex-wrap: wrap; }
.tr-sqs i { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 12px;
  font-weight: var(--w-bold); color: var(--on-area); }
.tr-sqs i.w { background: var(--good); }
.tr-sqs i.l { background: var(--error); }
.tr-sqs i.cur { background: none; border: 2px dashed var(--dim); color: var(--dim); }
.tr-bar { position: sticky; bottom: 0; margin-top: auto; min-height: 64px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px env(safe-area-inset-bottom); background: var(--rail); flex: none; }
.tr-bar .k-btn { min-height: 44px; margin: 0; }
.tr-bar-hint { flex: 1; min-width: 0; text-align: center; font-size: 12.5px; color: var(--dim); }
.tr-sm { padding: 0 14px; }
.k-btn.tr-main { flex: 1; background: var(--rp); color: var(--on-area); font-weight: var(--w-bold); border-radius: 10px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--rp) 60%, var(--black)); text-decoration: none; }
.k-btn.tr-main:hover { background: color-mix(in srgb, var(--rp) 88%, var(--black)); }
.tr-bar .tr-main { flex: 1; }
.tr-run .tr-bar .tr-main { flex: 0 1 auto; }
.tr-showme .ic, .tr-main .ic { width: 18px; height: 18px; }
/* The session's end (TP3). */
.tr-done { flex: 1; gap: 12px; padding: 4px 14px 0; }
.tr-done .tr-today h1 { font-size: 24px; color: var(--ink); }
.tr-done .tr-today p { margin: 0; font-size: 14px; color: var(--dim); }
.tr-rows { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; }
.tr-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.tr-row:first-child { border-top: 0; }
.tr-row .x { color: var(--error); } .tr-row .v { color: var(--good); }
.tr-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tr-row .tx b { font-weight: 600; color: var(--ink); }
.tr-row .tx span { font-size: 12px; color: var(--dim); }
.tr-fig { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.tr-lab2 { font-size: 12.5px; color: var(--dim); }
.tr-fig-row { display: flex; align-items: flex-end; gap: 12px; }
.tr-big { font-size: 30px; font-weight: var(--w-bold); font-variant-numeric: tabular-nums; line-height: 1; color: var(--rp); }
.tr-figs { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); }
.tr-figs b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tr-done .tr-bar { margin: auto -14px 0; }
/* Wide (TW2, TD2): the board left, one panel. */
body:has(.tr-w) { height: 100dvh; min-height: 0; overflow: hidden; }
body:has(.tr-w) footer { display: none; }
body:has(.tr-w) main { min-height: 0; padding: 0; display: flex; }
.tr-page.tr-w { max-width: none; margin: 0; flex: 1; min-width: 0; min-height: 0; height: var(--vh); }
.tr-w.tr-going .tr-head, .tr-w .tr-top { display: none; }
.tr-w .tr-pad { width: 100%; max-width: 36rem; margin: 0 auto; box-sizing: border-box; overflow-y: auto; min-height: 0; }
.tr-w .tr-done .tr-bar { position: static; background: none; margin: 0; padding: 0; }
.trw { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 16px; box-sizing: border-box; height: 100%; }
:root[data-format=desk] .trw { gap: 18px; padding: 14px 18px; }
.trw-board { --bw: min(600px, calc(var(--vh) - 32px), calc(100vw - var(--frame-l, 84px) - 32px - 16px - 340px)); width: var(--bw); flex: none; }
:root[data-format=desk] .trw-board { --bw: min(640px, calc(var(--vh) - 28px), calc(100vw - var(--frame-l, 76px) - 36px - 18px - 360px)); }
.trw-board .tr-board, .trw .mcl-board { width: 100%; margin: 0; }
.trw-pnl { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.trw-hd { display: flex; align-items: center; gap: 10px; }
.trw-r { margin-left: auto; text-align: right; line-height: 1.2; }
.trw-r b { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink); }
.trw-r span { display: block; font-size: 11.5px; color: var(--dim); }
.trw-line { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; }
.trw-lh { display: flex; gap: 8px; padding: 9px 12px 0; font-size: 12.5px; color: var(--dim); }
.trw-lh span { margin-left: auto; }
.trw-moves { padding: 10px 12px; font-size: 13.5px; line-height: 1.9; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; color: var(--ink); }
.trw-moves .mn { color: var(--dim); margin-right: 2px; font-variant-numeric: tabular-nums; }
.trw-moves .mv { padding: 1px 4px; border-radius: 5px; white-space: nowrap; }
.trw-moves .mv.mine { color: var(--rp); font-weight: var(--w-bold); }
.trw-moves .tr-gap { display: inline-block; min-width: 44px; text-align: center; border: 2px dashed var(--rp); border-radius: 6px; color: var(--rp);
  font-weight: var(--w-bold); line-height: 1.3; }
.trw-moves .tr-note { display: block; margin: 2px 0 6px; padding: 6px 10px; border-left: 3px solid color-mix(in srgb, var(--rp) 55%, transparent);
  background: var(--panel2); border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.trw-foot { display: flex; gap: 8px; flex: none; }
.trw-foot .k-btn { min-height: 52px; border-radius: 12px; margin: 0; }
.trw-foot .tr-showme, .trw-foot .tr-main { flex: 1; }
.trw-foot .tr-showme { background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, var(--black)); }
.trw-foot .tr-showme:disabled { box-shadow: none; }

/* ---- Repertoire's front page per format (phase 4, D-AR.36 1A; src/repertoire.rs; frames TP1,
   TW1, TD1 of repertoire-2026-11-13): the phone's Today first with your repertoires as rows; the
   hub on an iPad held sideways and a desktop (Puzzles' `phb` layout in purple). Sizes from the
   mock's `phFront()`, `hub()`, `repCard()`. ---- */
.rph .phb-lead { background: color-mix(in srgb, var(--rp) 10%, var(--panel)); }
.rph .phb-badge { background: color-mix(in srgb, var(--rp) 18%, transparent); }
.rph .phb-play, .rp-today .tr-main { display: inline-flex; align-items: center; gap: 8px; background: var(--rp); color: var(--on-area);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--rp) 60%, var(--black)); text-decoration: none; }
.rph .phb-play .ic, .rp-today .tr-main .ic { width: 18px; height: 18px; }
.rp-count { font-size: 13.5px; }
.rp-side { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--dim); background: var(--piece-white); flex: none; display: inline-block; }
.rp-side.b { background: var(--piece-black); }
.rp-card { cursor: default; gap: 7px; padding: 13px 14px; }
.rp-card .phb-top b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rp-card .phb-s { font-size: 12.5px; }
.rp-bar { display: block; height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: var(--rp); border-radius: 3px; }
.rp-card .rp-chk { color: var(--ink); font-weight: var(--w-bold); font-size: inherit; }
.rp-acts { display: flex; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.k-btn.rp-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; margin: 0; text-decoration: none; }
.rp-sm .ic { width: 16px; height: 16px; }
.rp-add { box-shadow: none; background: none; border: 2px dashed var(--line); justify-content: center; align-items: flex-start; gap: 8px; cursor: default; }
.rp-retry { gap: 10px; }
.rp-retry > .ic { width: 20px; height: 20px; color: var(--rp); flex: none; }
.rp-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rp-tx b { font-size: 16px; }
.rp-perday { display: flex; align-items: center; gap: 10px; }
.rp-seg { flex: 1; display: flex; border-radius: 9px; background: var(--panel2); padding: 3px; gap: 3px; }
.rp-seg button { flex: 1; margin: 0; min-height: 30px; border: 0; border-radius: 7px; background: none; color: var(--ink); font-size: 12.5px; font-weight: 400; cursor: pointer; }
.rp-seg button[aria-pressed=true] { background: var(--panel); font-weight: 600; box-shadow: var(--shadow); }
.rp-foot { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.rp-foot .link { display: inline-flex; align-items: center; gap: 4px; margin: 0; min-height: 32px; }
.rp-foot .ic { width: 15px; height: 15px; }
.rph .tr-fig { border-radius: 14px; }
.rp-menu { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.rp-menu .k-btn { justify-content: flex-start; margin: 0; text-decoration: none; }
.rp-sheet .rep-panel { margin-top: 0; padding-top: 0; border-top: 0; }
/* The phone (TP1). */
.rpp { display: flex; flex-direction: column; min-height: calc(var(--svh) - var(--bottom-bar, 0px)); }
.rpp-top { height: 56px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; flex: none; }
.rpp-top .tr-mark { flex: 1; }
.rpp-body { padding: 4px 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.rp-today { background: color-mix(in srgb, var(--rp) 10%, var(--panel)); border-radius: 14px; box-shadow: var(--shadow); padding: 14px;
  display: flex; flex-direction: column; gap: 8px; }
.rp-today b { font-size: 20px; color: var(--ink); }
.rp-today > span { font-size: 13.5px; color: var(--dim); }
.rp-today .tr-main { justify-content: center; margin: 0; }
.rp-rows { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; }
.rp-row { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: inherit; text-decoration: none; }
.rp-row:first-child { border-top: 0; }
.rp-row .rp-tx b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-row .rp-tx span { font-size: 12px; color: var(--dim); }
.rp-row > .ic { width: 18px; height: 18px; color: var(--dim); flex: none; }
.rpp .rp-retry { flex-direction: row; align-items: center; }
.rp-figline { margin: 0; text-align: center; font-size: 12.5px; color: var(--dim); }
body:has(.rpp) main { padding: 0; }
.rpp a { color: inherit; text-decoration: none; }
.rpp .phb-badge { margin-left: auto; font-size: 11.5px; font-weight: var(--w-bold); border-radius: 8px; padding: 2px 8px; background: color-mix(in srgb, var(--rp) 18%, transparent); color: var(--ink); }
.rpp .phb-card { background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; display: flex; }
.rpp .phb-s { font-size: 13px; color: var(--dim); }
button.rpp-more { margin: 0; border: 0; background: none; min-height: 44px; }

/* ---- Our starters (R7, src/starter.rs; frames SP1-SP5, SD1, SD2 of starter-r7-2026-11-17):
   the offer on an empty shelf, the starter's sheet with its slots, slot chips and a copy's lines
   on the shelf's cards, our decision and the card's line in the board's Repertoire column, the
   switch, card and update sheets. Sizes from the mock's `.blk`, `.slots`, `.chip`, `.lbl`. ---- */
.st-offer { background: var(--rp-soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.st-offer b { font-size: 16px; }
.st-offer .k-btn.st-see, .k-btn.st-add, .k-btn.st-switch { align-self: flex-start; margin: 0; background: var(--rp); color: var(--on-area);
  font-weight: var(--w-bold); border-radius: 10px; min-height: 38px; padding: 0 14px; }
.k-btn.st-add { align-self: stretch; justify-content: center; width: 100%; }
.rp-acts .k-btn.st-add { flex: 1; }
.k-btn.st-switch { background: var(--panel2); color: var(--ink); }
.st-own { flex-direction: column; gap: 8px; }
.st-own b { font-size: 15px; }
.st-ways { display: flex; flex-wrap: wrap; gap: 6px; }
.st-sheet .phb-s { font-size: 13px; color: var(--dim); margin: 0; }
.st-slots { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; }
.st-slots li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.st-slots li:first-child { border-top: 0; }
.st-sl { display: flex; flex-direction: column; min-width: 0; }
.st-mono, .st-pct { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; color: var(--dim); letter-spacing: 0; }
.st-pct { font-variant-numeric: tabular-nums; color: var(--ink); }
.st-slots .k-btn { margin: 0; }
.st-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.st-chip { font-size: 11px; border: 1px dashed var(--dim); color: var(--dim); border-radius: 999px; padding: 1px 8px; }
.st-chip.on { border: 1px solid transparent; background: var(--rp); color: var(--on-area); }
.st-line { font-size: 13px; padding: 4px 0; text-align: left; margin: 0; }
button.st-line { justify-content: flex-start; }
.st-pline { padding: 0 12px 10px 34px; min-height: 0; }
.st-here { background: var(--panel); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.st-here.st-dec { background: var(--rp-soft); }
.st-here h3 { margin: 0; font-size: 15px; }
.st-here p { margin: 0; font-size: 13.5px; }
.st-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.st-read { color: var(--rp); font-weight: 600; margin: 0; }
.st-lbl { font-size: 11px; font-weight: var(--w-bold); letter-spacing: .05em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px;
  background: color-mix(in srgb, var(--pz) 22%, var(--panel)); color: var(--ink); vertical-align: middle; }
.st-ex { font-size: 11px; font-weight: var(--w-bold); letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.st-body { font-size: 14px; margin: 0; }
.st-h { margin: 6px 0 0; font-size: 13px; color: var(--rp); }
.st-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }

/* ---- Play through on a phone (phase 4, D-AR.36 4A; workspace/playthrough.rs `PhonePlay`; frame
   TP4 of repertoire-2026-11-13 `phRep()`): the line and a card with your move and your note
   under the board, and its own bar (⏮, ◀, Next in purple, Train) in place of the board's. ---- */
.ws.pt .ws-rp-sidewrap, .ws.pt .ws-rep-line, .ws.pt .ws-repbar { display: none; }
.ws-ptp { padding: 10px 14px calc(64px + 12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.ws-ptp-line { margin: 0; font-size: 12.5px; color: var(--dim); }
.ws-ptp-line b { color: var(--ink); }
.ws-ptp-card { border-radius: 12px; padding: 12px 14px; background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.ws-ptp-card .t { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: var(--w-bold); color: var(--ink); }
.ws-ptp-card .t .ic { width: 18px; height: 18px; color: var(--rp); }
.ws-ptp-card .s { font-size: 13.5px; color: var(--dim); }
.ws-ptp-stop { align-self: flex-start; margin: 2px 0 0; min-height: 32px; }
.ws-ptp-bar { position: fixed; z-index: var(--z-bar3); left: 0; right: 0; bottom: 0; min-height: 64px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px env(safe-area-inset-bottom); background: var(--rail); }
.ws-ptp-bar .k-btn { margin: 0; min-height: 44px; padding: 0 14px; text-decoration: none; }
.ws-ptp-bar .ic { width: 20px; height: 20px; }
.ws-ptp-bar .ws-ptp-next { flex: 1; background: var(--rp); color: var(--on-area); font-weight: var(--w-bold);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--rp) 60%, var(--black)); }
.ws-ptp-bar .ws-ptp-next:disabled { opacity: 0.45; box-shadow: none; }
button.ws-ph-more { margin: 0; }

/* ---- The workbench per format (phase 4, D-AR.36; frames TW3, TD3 of repertoire-2026-11-13
   `buildW()`, `buildD()`, `repPane()`): the repertoire bar in purple; the Repertoire pane in
   sections with small-caps headings, moves as chips, the verdicts as cards; on an iPad the pane
   first with Done at the column's foot; on a desktop (3B) its own column beside the moves and the
   Explorer, the board at Analyse's 640 px. ---- */
.ws-repbar { background: color-mix(in srgb, var(--rp) 12%, var(--panel)); border-color: transparent; border-left-color: var(--rp); border-radius: 10px; }
.ws-repbar .ws-refbar-mark, .ws-repbar .ic { color: var(--rp); }
.ws-rep-here { margin: 0; padding: 10px 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ws-rep-here p { margin: 0; }
.ws-rep-head, .lv-title, .lv-gaps h4 { margin: 0 0 2px; font-size: 11.5px !important; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim) !important; font-weight: var(--w-bold); }
button.ws-rep-move { display: inline-flex; align-items: center; height: 28px; min-height: 28px; margin: 0 2px; padding: 0 10px; border-radius: 8px;
  background: color-mix(in srgb, var(--rp) 20%, transparent); color: var(--ink); font-weight: 600; font-size: 12.5px; text-decoration: none; }
.lv { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.lv-card { border-radius: 9px; padding: 8px 10px; background: color-mix(in srgb, var(--good) 12%, var(--panel)); font-size: 12.5px; }
.lv-gaps { padding-top: 6px; border-top: 1px solid var(--line); }
.lv-list button.link { color: var(--ink); text-decoration: none; }
.lv-list li::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 8px; border-radius: 50%;
  border: 1.5px solid var(--dim); font-size: 10px; font-weight: var(--w-bold); color: var(--dim); vertical-align: middle; }
.lv-actions button, .lv-buttons button { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.ws-pt-start .secondary { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.ws-tabrow .ws-rep-icon { color: var(--rp); opacity: 1; }
/* An iPad on its side: Done at the column's foot. */
.ws-ph-bar .ws-ph-done { flex: 1.6; display: flex; }
.ws-ph-bar .ws-ph-done .ws-save { flex: 1; display: flex; margin: 0; }
.ws-ph-bar .ws-ph-done .ws-save-btn { flex: 1; min-height: 3.25rem; border-radius: var(--r-panel); background: var(--accent); color: var(--on-accent); font-weight: var(--w-bold); margin: 0; }
/* A desktop's repertoire tab (3B): board | moves, steps, Explorer · Notes | Repertoire. */
.ws[data-layout=desk].repcol:not(.docked) { grid-template-columns: var(--bs) minmax(18rem, 20.6rem) minmax(18rem, 1fr); column-gap: 1rem; }
.ws.wide[data-layout=desk].repcol { --bs: min(calc(var(--vh) - 8.6rem - var(--refbar, 0rem) - var(--under, 0rem)), calc(var(--vw) - 2 * var(--gutter) - 5.5rem - 20.6rem - 18rem - 1rem), 640px); }
.ws[data-layout=desk].repcol > .ws-rep-col { grid-column: 3; grid-row: 2; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.ws-rep-col-head { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ws-rep-col-head b { padding: 6px 0; box-shadow: inset 0 -2px 0 var(--rp); }
.ws-rep-col-head span { margin-left: auto; font-size: 12px; color: var(--dim); }
.ws-rep-col .ws-rep-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px 10px; scrollbar-width: thin; }
.ws[data-layout=desk].repcol .ws-tabs::after { content: none; }

/* ---- Admin (src/admin.rs; PHASE4_ADMIN_PLAN_2026-11-14): one frame for the owner's four pages,
   built from the kit. Phone: its own top bar with Back to You. iPad, desktop: the name and the
   four pages as links. Health folds its cards to rows except on a desktop (health.rs Glance). ---- */
.adm { max-width: 72rem; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.adm-top { display: flex; align-items: center; gap: 6px; min-height: 48px; }
.adm-top h1 { flex: 1; min-width: 0; margin: 0; font-size: var(--fs-lg); }
.adm-nav { display: flex; flex-wrap: wrap; align-self: flex-start; gap: var(--s1); padding: var(--s1); background: var(--panel2); border-radius: var(--r-panel); }
.adm-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3); border-radius: var(--r-control); color: var(--dim); font-weight: var(--w-bold); font-size: var(--fs-sm); text-decoration: none; }
.adm-nav a[aria-current=page] { background: var(--knob); color: var(--ink); box-shadow: var(--shadow); }
@media (hover: hover) { .adm-nav a:not([aria-current]):hover { color: var(--ink); } }
:root[data-format=phone] .adm-nav { display: none; }
:root:not([data-format=phone]) .adm-back { display: none; }
:root[data-format=phone] .adm-top { margin: -0.75rem 0 0 -6px; }
.adm-body { min-width: 0; }
.adm-h { margin: 12px 2px 8px; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); font-weight: var(--w-bold); }
.adm .applications li { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.adm .decide button, .adm .pzr-actions button { min-height: 2.75rem; }
:root[data-format=desk] .adm .applications { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm .pzh { margin: 0; max-width: 52rem; }
.adm .pzh-card { background: var(--panel); border-color: var(--line); }
/* R8: compare the openings at your level (REPERTOIRE_R8, frames CP1–CP3, CD1). */
.st-here .st-ways .k-btn { margin: 0; }
.st-lvl, .st-placepick { font: inherit; font-size: 13.5px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: var(--panel); color: var(--ink); align-self: flex-start; }
.st-cmp { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.st-cmp li { display: flex; flex-direction: column; gap: 4px; padding: 9px 0; border-top: 1px solid var(--line); }
.st-cmp li:first-child { border-top: 0; }
.st-cmp li.open { background: var(--rp-soft); border-radius: 10px; padding: 10px; border-top-color: transparent; }
.st-nm { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.st-nm:focus-visible { outline: 2px solid var(--rp); outline-offset: 2px; border-radius: 6px; }
.st-facts { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.st-mk { font-size: 11px; font-weight: var(--w-bold); letter-spacing: .04em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; white-space: nowrap; background: var(--panel2); color: var(--dim); }
.st-mk.ours { background: var(--rp); color: var(--on-area); }
.st-mk.book { color: var(--rp); }
.st-mk.worse { background: color-mix(in srgb, var(--pz) 22%, var(--panel)); color: var(--ink); }
.st-mk.few { background: none; border: 1px dashed var(--dim); }
.st-cmp .st-ways .k-btn { margin: 0; }
.st-cmppage { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-width: 0; }
.st-cmppage h1 { margin: 0; font-size: 20px; text-wrap: balance; }
.st-cmpgrid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.st-places { display: flex; flex-direction: column; gap: 2px; }
.st-place { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.st-place.on { background: var(--rp-soft); color: var(--rp); font-weight: 600; }
.st-place:focus-visible { outline: 2px solid var(--rp); }
.st-placepick { display: none; }
.st-cmpmain { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.st-lt { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.st-lt th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.st-lt td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.st-lt .n { text-align: right; }
.st-cmprows { display: none; }
@media (max-width: 760px) {
  .st-cmpgrid { grid-template-columns: 1fr; }
  .st-places, .st-lt { display: none; }
  .st-placepick, .st-cmprows { display: block; }
}

/* ---- Players and the dossier (DOSSIER step 3, frames XL1, XD1; players.rs) ---- */
.pl-page { display: flex; flex-direction: column; gap: 0.75rem; max-width: 76rem; padding: 0.9rem 1.1rem 1.2rem; }
.pl-h { margin: 0; font-size: var(--fs-lg); }
.pl-lede { margin: 0; color: var(--dim); max-width: 70ch; }
.pl-back { margin: 0; font-size: var(--fs-sm); }
.pl-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-items: start; }
.pl-g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; align-items: start; }
:root[data-format=phone] :is(.pl-g2, .pl-g3) { grid-template-columns: 1fr; }
:root[data-format=ipad] .pl-g3 { grid-template-columns: 1fr 1fr; }
.pl-card { gap: 0.5rem; padding: 0.65rem 0.75rem; }
.pl-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.pl-ch h3 { margin: 0; font-size: var(--fs-md); }
.pl-more { color: var(--accent); font-weight: var(--w-bold); font-size: var(--fs-sm); white-space: nowrap; text-decoration: none; }
.pl-linkbtn { margin: 0; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.pl-more.pl-linkbtn { color: var(--accent); font-weight: var(--w-bold); font-size: var(--fs-sm); }
.pl-ls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pl-ls li { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.3rem 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.pl-ls li:first-child { border-top: 0; }
.pl-ls li.chosen { background: var(--acc-soft); border-radius: var(--r-control); padding-inline: 0.4rem; border-top-color: transparent; }
.pl-ls li.chosen + li { border-top-color: transparent; }
.pl-fn { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
a.pl-fn:hover, button.pl-fn:hover { text-decoration: underline; }
.pl-num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-size: var(--fs-sm); }
.pl-sc { min-width: 3em; }
.pl-tr { font-size: 0.68rem; font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.04em; border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.pl-tr.up { background: var(--acc-soft); color: var(--accent); }
.pl-tr.dn { background: var(--panel2); color: var(--dim); }
/* Lichess broadcasts (DOSSIER step 5a, XB1–XB3) */
.pl-bt { font-size: 0.62rem; font-weight: var(--w-bold); letter-spacing: 0.04em; text-transform: uppercase; border-radius: 5px; padding: 1px 5px; margin-left: 6px; background: var(--panel2); color: var(--dim); }
.pl-lx { margin-left: 6px; color: var(--dim); white-space: nowrap; }
/* A player's Lichess broadcast games under the explorer's list (review decision 1). */
.games-bcast-head { margin: 0.75rem 0 0.25rem; color: var(--dim); }
.pl-note { margin: 0; }
.pl-wk-ev { margin: 0; }
.pl-wk-ev a { color: var(--ink); text-decoration: none; }
.pl-wk-ev a:hover { text-decoration: underline; }
/* The big search (XL1). */
.pl-find { position: relative; }
.pl-find-box { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-card); padding: 0.75rem 0.9rem; cursor: text; }
.pl-find-ic { color: var(--dim); font-size: var(--fs-md); }
.pl-find-box { font-weight: var(--w-text); }
.pl-find input.pl-find-in { flex: 0 1 16rem; border: 0; box-shadow: none; margin: 0; min-height: 0; background: transparent; }
.pl-find-in { flex: 0 1 16rem; min-width: 10rem; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: var(--fs-md); padding: 0; outline-offset: 4px; }
.pl-find-in::placeholder { color: var(--ink); }
.pl-find-hint { flex: 1 1 14rem; }
.pl-hits { position: absolute; z-index: var(--z-page3); left: 0; right: 0; top: calc(100% + 0.25rem); box-shadow: var(--shadow); }
.pl-hits a { display: flex; gap: 0.5rem; align-items: baseline; color: inherit; text-decoration: none; width: 100%; }
/* The dossier's header (XD1). */
.pl-ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.pl-meta { color: var(--dim); font-size: var(--fs-sm); }
.pl-ti { background: var(--ink); color: var(--bg); border-radius: 5px; padding: 0 6px; font-size: 0.78rem; font-weight: var(--w-bold); margin-right: 4px; }
.pl-rt { display: flex; gap: 1.1rem; }
.pl-rt div, .pl-rt a { display: flex; flex-direction: column; align-items: flex-end; }
.pl-rt a { color: inherit; text-decoration: none; }
.pl-rt a:hover b, .pl-rt a:focus-visible b { text-decoration: underline; }
.pl-chart-tap { cursor: pointer; }
.pl-peak-l { display: inline-block; margin-top: 0.25rem; }
.pl-rt b { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pl-rt span { font-size: 0.72rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }
.pl-src { margin: 0; }
.pl-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pl-acts .k-btn { min-height: 2.25rem; padding: 0 0.8rem; font-size: var(--fs-sm); background: var(--accent); color: var(--on-accent); }
.pl-acts .k-btn.pl-ghost { background: var(--panel2); color: var(--ink); }
.pl-acts .k-btn em { font-style: normal; font-weight: 400; font-size: 0.75rem; }
.pl-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); }
.pl-tabs button { margin: 0 0 -1px; padding: 0.45rem 0.9rem; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-weight: var(--w-bold); color: var(--dim); cursor: pointer; }
.pl-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.pl-filt { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pl-filt .k-seg button { padding: 0.2rem 0.6rem; font-size: var(--fs-sm); }
.pl-card .k-seg.pl-seg-sm { padding: 2px; }
.pl-card .k-seg.pl-seg-sm button { padding: 0.05rem 0.5rem; font-size: var(--fs-xs); }
.pl-t th, .pl-t td { padding: 0.25rem 0.4rem; }
.pl-busy .pl-g2, .pl-busy .pl-g3 { opacity: 0.6; transition: opacity 0.2s; }
/* Rating chart and results. */
.pl-chart .pl-gl { stroke: var(--line); stroke-width: 1; }
.pl-chart .pl-ax { font-size: 9px; fill: var(--dim); }
.pl-chart .pl-gz { fill: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.pl-chart .pl-ln { fill: none; stroke-width: 1.6; }
.pl-chart .sd { stroke: var(--ink); } .pl-chart .rp { stroke: var(--rp); } .pl-chart .bz { stroke: var(--pz); }
.pl-chart .pl-dot { fill: var(--ink); }
.pl-lg { display: flex; gap: 0.9rem; font-size: 0.76rem; color: var(--dim); flex-wrap: wrap; }
.pl-lg i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.pl-lg i.sd { background: var(--ink); } .pl-lg i.rp { background: var(--rp); } .pl-lg i.bz { background: var(--pz); }
.pl-lg i.gz { height: 10px; background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border: 1px solid var(--line); }
.pl-years { display: flex; align-items: flex-end; gap: 3px; height: 86px; overflow-x: auto; }
.pl-yb { flex: 1 0 1.1rem; min-width: 1.1rem; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; height: 100%; }
.pl-st { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; }
.pl-st i { display: block; width: 100%; }
.pl-st i.w { background: var(--accent); } .pl-st i.dr { background: var(--wdl-draw); } .pl-st i.l { background: color-mix(in srgb, var(--pz) 70%, var(--ink)); }
.pl-yb span { font-size: 0.62rem; color: var(--dim); }
/* A year opens its games (2026-11-21-2): a link that looks like the bar. */
a.pl-yb { color: inherit; text-decoration: none; border-radius: 4px; }
a.pl-yb:hover, a.pl-yb:focus-visible { background: var(--hover); }
/* Best wins: each row is one game. */
.pl-game { font-size: 0.72rem; color: var(--dim); font-weight: 400; white-space: nowrap; }
.pl-t th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pl-t th.pl-num, .pl-t td.pl-num { text-align: right; }
.pl-h2h { margin: 0; background: var(--acc-soft); border-radius: var(--r-panel); padding: 0.45rem 0.55rem; font-size: var(--fs-sm); }
.pl-h2h a { color: var(--accent); font-weight: var(--w-bold); }
.pl-h2h-in { width: 100%; font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--control); border-radius: var(--r-control); background: var(--panel); color: var(--ink); }
.pl-prep p { margin: 0; }
/* The Prepare tab (DOSSIER step 6, XD2, XP3). */
.pl-prep-tab { display: flex; flex-direction: column; gap: 0.75rem; }
:root[data-format=phone] .pl-prep-tab { gap: 0.6rem; }
.pl-busy.pl-prep-tab .pl-card { opacity: 0.6; transition: opacity 0.2s; }
.pl-bar { width: 70px; height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; align-self: center; flex: none; }
.pl-bar i { display: block; height: 100%; background: var(--accent); }
.pl-ok { font-size: 0.72rem; font-weight: var(--w-bold); color: var(--accent); white-space: nowrap; }
.pl-gap, .pl-gaptx { font-size: 0.72rem; font-weight: var(--w-bold); color: var(--error); white-space: nowrap; }
.pl-gaptx { font-size: inherit; }
.pl-prep-tab .pl-fold p { margin: 0 0 0.3rem; }
:root[data-format=phone] .pl-acts.pl-acts-1 { grid-template-columns: 1fr; }
/* On the Prepare tab the side switch does the Prepare buttons' job (XD2); the phone keeps only its back bar (XP3). */
:root .pl-dossier.pl-on-prep :is(.pl-src, .pl-head-acts) { display: none; }
/* Add their games (XA1 side sheet, XA2 bottom sheet). */
.pl-addl { color: var(--accent); font-weight: var(--w-bold); font-size: inherit; }
.pl-scrim { position: fixed; inset: 0; background: var(--scrim-soft); z-index: var(--z-scrim); }
.pl-sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100%); z-index: var(--z-sheet); background: var(--panel); border-left: 1px solid var(--line);
  padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; overflow-y: auto; box-shadow: var(--shadow); }
:root[data-format=phone] .pl-sheet { top: auto; left: 0; width: auto; max-height: 85vh; border-left: 0; border-radius: 16px 16px 0 0; padding: 0.9rem; }
.pl-sheet h3 { margin: 0; font-size: var(--fs-md); }
.pl-sec { display: flex; flex-direction: column; gap: 0.4rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.pl-sec p { margin: 0; }
.pl-row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.pl-sheet .pl-row > span.small { flex: 1 1 8rem; } /* XS5: the note stays beside its button, wrapping in itself */
.pl-in { flex: 1; min-width: 8rem; font: inherit; font-size: var(--fs-sm); padding: 0.35rem 0.55rem; border: 1px solid var(--control); border-radius: var(--r-control); background: var(--bg); color: var(--ink); margin: 0; min-height: 0; }
.pl-okline { color: var(--accent); font-weight: var(--w-bold); }
.pl-chip-s { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--fs-xs); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.55rem; background: var(--panel); }
.pl-x { border: 0; background: none; padding: 0; margin: 0; min-height: 0; font: inherit; color: var(--dim); cursor: pointer; }
.k-btn.pl-wide { width: 100%; justify-content: center; }
.pl-sheet .k-btn { min-height: 2.1rem; padding: 0 0.8rem; font-size: var(--fs-sm); background: var(--accent); color: var(--on-accent); }
.pl-sheet .k-btn.pl-ghost { background: var(--panel2); color: var(--ink); }
.pl-sheet input.pl-in { font-size: var(--fs-sm); padding: 0.3rem 0.55rem; min-height: 0; height: auto; }
.pl-sheet .k-seg button { padding: 0.15rem 0.55rem; font-size: var(--fs-sm); min-height: 0; }
.pl-src-p { display: block; }
/* T-056 step 2 (XS2B, XS4B): the coverage strip / fold, what the online-games store holds. */
.pl-cov { gap: 0.4rem; }
.pl-cov .pl-ch .small { margin-left: auto; }
.pl-tl { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); font-size: 0.68rem; font-weight: var(--w-bold); }
.pl-tl > * { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; padding: 0 4px; }
.pl-tl-old { flex: 0 0 72px; color: var(--dim); background: repeating-linear-gradient(45deg, var(--panel2) 0 4px, transparent 4px 8px); }
.pl-tl-held { flex: 1; background: var(--accent); color: var(--on-accent); text-decoration: none; }
a.pl-tl-held:hover, a.pl-tl-held:focus-visible { text-decoration: underline; }
.pl-tl-held.pl-tl-none { background: transparent; color: var(--dim); }
.pl-tl-new { flex: 0 0 110px; color: var(--dim); background: repeating-linear-gradient(45deg, var(--panel2) 0 4px, transparent 4px 8px); }
.pl-tlx { display: flex; justify-content: space-between; font-size: 0.66rem; color: var(--dim); }
.pl-tlx a { color: inherit; text-decoration: none; }
.pl-tlx a:hover, .pl-tlx a:focus-visible { text-decoration: underline; }
.pl-cov-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 6px; }
:root[data-format=phone] .pl-tl-old { flex-basis: 40px; }
:root[data-format=phone] .pl-tl-new { flex-basis: 70px; }
:root .pl-dossier.pl-on-prep .pl-cov { display: none; }
.pl-prep .pl-ls li:has(.pl-why) { flex-wrap: wrap; }
.pl-mark { font-weight: var(--w-bold); min-width: 1.5em; }
.pl-why { flex-basis: 100%; }
.pl-note-in { width: 100%; font: inherit; padding: 0.5rem 0.6rem; border: 1px solid var(--control); border-radius: var(--r-control); background: var(--panel); color: var(--ink); resize: vertical; }
:root[data-format=phone] .pl-dossier.pl-on-prep .pl-ph { display: none; }
/* Step 4 (frames XL2, XL3, XH1, XT1, XP1–XP3): the iPad's lists in one column, the phone's folds. */
.pl-col { display: contents; }
:root[data-format=ipad] .pl-col { display: flex; flex-direction: column; gap: 0.75rem; }
:root[data-format=phone] .pl-col { display: flex; flex-direction: column; gap: 0.6rem; }
.pl-fold > summary { font-weight: var(--w-bold); font-size: var(--fs-sm); cursor: pointer; }
.pl-fold[open] > summary { margin-bottom: 0.4rem; }
.pl-foot { display: flex; justify-content: flex-start; gap: 0.75rem; }
.k-seg.pl-seg-full { display: flex; }
.k-seg.pl-seg-full button { flex: 1; white-space: nowrap; padding-block: 0.3rem; min-height: 0; }
.pl-find-sm .pl-find-box { padding: 0.5rem 0.65rem; }
.pl-find-sm .pl-find-in { font-size: var(--fs-sm); }
.pl-next .pl-ls { margin-top: 0.15rem; }
:root[data-format=phone] .pl-page { padding: 0.6rem 0.75rem 1rem; gap: 0.6rem; }
:root[data-format=phone] .pl-app .pl-lede { display: none; }
:root[data-format=phone] .pl-h { font-size: var(--fs-md); }
.pl-pbar { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); }
.pl-pbar a { color: var(--ink); text-decoration: none; font-size: var(--fs-lg); line-height: 1; padding: 0 0.3rem; }
:root[data-format=phone] .pl-ph { flex-direction: column; align-items: stretch; gap: 0.5rem; }
:root[data-format=phone] .pl-rt { justify-content: space-between; }
:root[data-format=phone] .pl-rt div, :root[data-format=phone] .pl-rt a { align-items: flex-start; }
:root[data-format=phone] .pl-acts { display: grid; grid-template-columns: 1fr 1fr; }
:root[data-format=phone] .pl-acts .k-btn { justify-content: center; text-align: center; }
:root[data-format=phone] .pl-tabs button { flex: 1; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pl-chip { position: relative; display: inline-flex; }
.pl-chip select { appearance: none; width: auto; margin: 0; min-height: 2rem; font: inherit; font-size: var(--fs-xs); font-weight: var(--w-bold);
  border: 0; border-radius: 999px; padding: 0.2rem 1.4rem 0.2rem 0.65rem; background: var(--ink); color: var(--bg); cursor: pointer; }
.pl-chip::after { content: "▾"; position: absolute; right: 0.55rem; top: 50%; transform: translateY(-50%);
  font-size: var(--fs-xs); color: var(--bg); pointer-events: none; }
/* The explorer's player strip: the dossier's doorway (XE1). */
.ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.player-strip .ps-row .source-tabs { margin-bottom: 0; }
.player-strip .ps-dossier { color: var(--accent); font-weight: var(--w-bold); font-size: var(--fs-sm); white-space: nowrap; text-decoration: none; }
.ps-prep { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.4rem; }
.ps-prep .ps-btn { border-radius: var(--r-panel); padding: 0.3rem 0.65rem; font-size: var(--fs-sm); font-weight: var(--w-bold); background: var(--accent); color: var(--on-accent); text-decoration: none; white-space: nowrap; }
.ps-opp { display: flex; align-items: center; gap: 0.3rem; }
/* On demand (T-056 step 3, XS3/XS6): what is being fetched, the first fetch's progress card,
   the older fetch's place in the queue. */
.pl-tl-now { color: var(--accent); background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, transparent) 0 6px, var(--panel2) 6px 12px); }
.pl-prog { height: 5px; border-radius: 3px; background: var(--panel2); overflow: hidden; }
.pl-prog i { display: block; height: 100%; background: var(--accent); transition: width 0.6s; }
.pl-cov-prog { gap: 0.4rem; }
.pl-cov-prog p { margin: 0; }
.pl-qpill { display: inline-block; font-size: 0.72rem; font-weight: var(--w-bold); border-radius: 999px; padding: 1px 8px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pl-cov .note, .pl-cov-prog .note { margin: 0; }
.pl-cov-after { margin: 0; }
.pl-hits-h { padding: 0.4rem 0.75rem 0.1rem; font-size: 0.68rem; font-weight: var(--w-bold); letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
.pl-dossier.pl-on-prep .pl-cov-prog, .pl-dossier.pl-on-prep .pl-cov-after { display: none; }
/* XS3: no Prepare buttons while the first fetch runs (the tab is still there). */
.pl-cov-prog ~ .pl-head-acts { display: none; }
.pl-cov .k-btn.pl-ghost { background: var(--panel2); color: var(--ink); }
.k-btn.pl-fetch-older { padding: 5px 10px; font-size: 0.82rem; min-height: 0; }

/* T-288 step 3 (D-SO2.7): a visitor's place, its taster and the one signpost card
   (mock tasters-2026-12-04, frames VT1-6 desktop, VP1-6 phone). */
.vt-page { display: grid; gap: var(--s4); align-content: start; padding-block: var(--s4); }
.vt-page h1 { font-size: var(--fs-xl); margin: 0; }
.vt-lead { color: var(--muted); max-width: 60ch; margin: 0; }
.vt-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr); gap: var(--s4); align-items: start; }
@media (max-width: 759px) { .vt-two { grid-template-columns: minmax(0, 1fr); } }
.vt-col { display: grid; gap: var(--s3); min-width: 0; }
.vt-card { display: grid; gap: var(--s2); }
.vt-card h2 { margin: 0; }
.vt-sign { background: var(--surface); border: 2px solid var(--acc-soft); border-radius: var(--r-card); padding: var(--s4); display: grid; gap: var(--s3); }
.vt-sign h2 { margin: 0; font-size: var(--fs-md); }
.vt-sign ul, .vt-keeps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.vt-sign li, .vt-keeps li { display: flex; gap: var(--s2); }
.vt-sign li::before, .vt-keeps li::before { content: "✓"; color: var(--accent); font-weight: var(--w-bold); }
.vt-sign p { margin: 0; }
.vt-btns { display: flex; gap: var(--s2); flex-wrap: wrap; }
.vt-btns .button { margin: 0; }
.vt-pic { border-radius: var(--r-panel); overflow: hidden; border: 1px solid var(--border); background: var(--panel2); }
.vt-pic img { display: block; width: 100%; height: auto; }
.vt-search input { width: 100%; }
.vt-list { display: grid; padding-block: var(--s1); }
.vt-row { display: flex; justify-content: space-between; gap: var(--s2); padding-block: var(--s2); border-top: 1px solid var(--border); color: var(--strong); text-decoration: none; }
.vt-row:first-child { border-top: 0; }
@media (hover: hover) { .vt-row:hover { color: var(--accent); } }
.vt-row small { font-variant-numeric: tabular-nums; }
.vt-tree { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s1); }
.vt-mono { font-family: var(--mono, ui-monospace, monospace); }
.vt-chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.vt-chips span { background: var(--panel2); border-radius: var(--r-control); padding: var(--s1) var(--s3); font-size: var(--fs-sm); }
.vt-deep { max-width: 26rem; }
.vt-try { margin: 0; }
