/* Page layouts. */
.btn-reset { border: 0; background: none; cursor: pointer; width: 100%; text-align: left; }
.fly.fly-up { top: auto; bottom: -6px; }
@media (max-width: 720px) { .m-hide { display: none; } }

/* ---------- Board + panel (Play, Mansubat, Dusut) ---------- */
.play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 24px; align-items: start; }
.play-board { width: 100%; max-width: calc(100vh - 150px); min-width: 0; margin: 0 auto; }
.board-box { position: relative; }
/* the players' bars stand a little apart from the board (the owner, 4 Dec 2026: 10 px of room above and below it); the
   board keeps its size: the bars lose their 2 px of padding above and below (the 50 px face sets their height) and the
   move strip under them comes 4 px closer, so a game still fits a 900 px laptop screen */
.play-board > .strip:has(+ :is(.board-box, .board-row)) { margin-bottom: 10px; }
.play-board > :is(.board-box, .board-row) + .strip { margin-top: 10px; }
.play-board > .strip { min-height: 50px; padding-top: 0; padding-bottom: 0; }
.play-board > :is(.board-box, .board-row) + .strip + .stepper { margin-top: 4px; }
/* Find a game's way back (js/pages/find.js; the owner, 4 Dec 2026), as Practice's: before a game and while looking (a
   game hides it: the grid loses .cp-find); the board gives up its line, so the page still fits a laptop screen */
.find-crumb { margin: -4px 0 8px; }
.find-crumb .link { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; font-weight: var(--w-label); color: var(--text-2); text-decoration: none; }
.find-crumb .link:hover { color: var(--text); }
.find-crumb .ico { width: 16px; height: 16px; }
.find-crumb:has(+ .play:not(.cp-find)) { display: none; }
@media (min-width: 981px) { :root .find-crumb + .cp-find .play-board { max-width: calc(100vh - 178px - var(--acct-h)); } }
.play-panel { position: sticky; top: 22px; height: calc(100vh - 44px); max-height: 900px; }
@media (max-width: 980px) {
  .play { grid-template-columns: minmax(0, 1fr); }   /* the column never grows past the screen, whatever the panel holds */
  .play-board { max-width: min(100%, calc(100vh - 220px)); }
  .play-panel { position: static; height: auto; max-height: none; }
}
/* A short, wide window: a phone held sideways (844x390), a laptop zoomed to 200% (1280x800 is then 640x400), a
   small laptop. The board took what the width left under the bars and shrank to about 115 px (the site check,
   29 Nov 2026). Here, on the game and on a mansuba (the boards with a move strip), the board stands on the left
   as tall as the window allows and stays there (sticky); on the right, as lichess does sideways, the opponent's
   bar, the move strip, the visitor's bar, then the panel, which scrolls with the page. --short-top: where the
   board stands; --short-h: the height it may take; --bsz: its size (the panel keeps about 340 px beside it, so that
   its words are never crushed: at 960x600 it had 300 and the classes ran out of it).
   The Sign in row stands over the right column only: the board starts at the top of the page, beside it (34 px more
   board at 844x390), and the bars on the right start under that row. */
@media (orientation: landscape) and (max-height: 600px) {
  .play:has(> .play-board.has-steps) {
    --short-top: 22px;
    --short-h: calc(100vh - var(--short-top) - 12px);
    --short-h: calc(100dvh - var(--short-top) - 12px);
    --bsz: max(240px, min(var(--short-h), calc(100vw - var(--side-w, 72px) - 56px - 356px)));
    grid-template-columns: var(--bsz) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
    grid-template-areas: "board top" "board steps" "board bottom" "board panel";
    column-gap: 16px; row-gap: 4px; align-items: start;
    margin-top: calc(-1 * var(--acct-h, 0px));
  }
  .play-board.has-steps > .strip:first-child { margin-top: var(--acct-h, 0px); }
  .play-board.has-steps { display: contents; }
  .play-board.has-steps > .board-row, .play-board.has-steps > .board-box { grid-area: board; position: sticky; top: var(--short-top); width: var(--bsz); z-index: 2; }
  .play-board.has-steps > .strip:first-child { grid-area: top; }
  .play-board.has-steps > .strip ~ .strip { grid-area: bottom; }
  .play-board.has-steps > #steps { grid-area: steps; min-width: 0; }
  .play-board.has-steps > #steps .stepper { margin-top: 0; }
  .play-board.has-steps.analysing > .strip { margin-left: 0; }
  .play-board.has-steps > .strip { min-height: 44px; min-width: 0; margin-bottom: 0; }
  .play-board.has-steps > :is(.board-box, .board-row) + .strip { margin-top: 0; }   /* (the bars stand beside the board here: no room to keep from it) */
  .play-board.has-steps > .strip .av { width: 40px; height: 40px; }
  .play:has(> .play-board.has-steps) > .play-panel { grid-area: panel; position: static; height: auto; max-height: none; margin-top: 6px; overflow: visible; }
  /* (the panel is as tall as what it holds: its body never scrolls, nor is it squeezed by the row beside the board) */
  .play:has(> .play-board.has-steps) > .play-panel > .panel-body { overflow: visible; flex: none; }
  .play:has(> .play-board.has-steps) .an-body > .an-list { max-height: 264px; }
  /* the engine's tip in the narrower column: its arrow switch shows only its arrow, as on a phone */
  .play:has(> .play-board.has-steps) .an-pv { gap: 6px; }
  .play:has(> .play-board.has-steps) .pv-play .pv-play-t { display: none; }
  .play:has(> .play-board.has-steps) .pv-label { font-size: 12px; }
  /* the tip in two rows of a fixed height: what it is, its score and switches above, the moves under them (the column
     beside the board is too narrow for one row) */
  .play:has(> .play-board.has-steps) .an-pv { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; row-gap: 2px; height: 70px; }
  .play:has(> .play-board.has-steps) .an-pv > * { grid-row: 1; }
  .play:has(> .play-board.has-steps) .an-pv > .pv-line { grid-row: 2; grid-column: 1 / -1; }
  /* choosing a master: Play comes right under the panel's head (the bars above already name him), the classes after it
     (js/pages/play.js writes the foot first here, so that the keyboard follows the screen); the button no longer sticks
     to the screen's foot, where it covered most of the column, and Options opens downwards (.menu.drop) */
  .play-panel:has(> .pick-body) > .panel-foot { position: static; border-top: 0; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
  /* the bars above say who plays, so the panel's own head goes; in a game the panel opens on the line that says whose
     move it is, then the controls */
  .play-panel:has(> .game-body) > .panel-head, .play-panel:has(> .pick-body) > .panel-head { display: none; }
  .game-body > * { order: 3; }
  .game-body > p.status { order: 0; min-height: 0; }
  .game-body > .viewing { order: 1; }
  .game-body > .game-dock, .game-body > .game-dock > * { order: 2; }
  /* the Resign question's two answers keep their words on one line each (they broke to "Yes, / resign") */
  .resign-ask .ask-row .btn { padding-inline: 10px; }
  .resign-ask .ask-row .btn .ico { display: none; }
  /* a mansuba: its Hint / Solution foot stays in the panel, under the tabs it covered on the first screen */
  .play:has(> .play-board.has-steps) .play-panel .panel-foot { position: static; }
  /* while the end card is up over the board, the panel beside it says the result only: Rematch and Game analysis
     are in the card (they stood twice, side by side); the rest comes back when the card is closed */
  .play:has(#result:not([hidden])) .game-body > :not(.status) { display: none; }
  /* a locked class's row: its line, not its faces (they pushed the row out of the panel) */
  .lad-class.is-shut .lad-faces { display: none; }
}
/* the same on a phone's width (the bars of a phone at the top and the foot): the board between them */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 720px) {
  .play:has(> .play-board.has-steps) {
    --short-top: calc(var(--topbar-h, 49px) + 6px);
    --short-h: calc(100vh - var(--topbar-h, 49px) - var(--foot-bar, calc(74px + env(safe-area-inset-bottom))) - 12px);
    --short-h: calc(100dvh - var(--topbar-h, 49px) - var(--foot-bar, calc(74px + env(safe-area-inset-bottom))) - 12px);
    --bsz: max(160px, min(var(--short-h), calc(100vw - 32px - 292px)));
    margin-top: -8px; column-gap: 12px;
  }
  .play-board.has-steps > .strip:first-child { margin-top: 0; }
  /* the bars slimmer, so that the row of controls is on the first screen down to 568x320 (it was under the foot bar
     below about 394 px of height) */
  .play-board.has-steps > .strip { min-height: 38px; }
  .play-board.has-steps > .strip .av { width: 34px; height: 34px; }
  .play-board.has-steps > .strip .who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .game-dock.live .hint-btn { padding: 0 4px; }
  .play-board.has-steps > .board-row.an-board { width: calc(var(--bsz) - 24px); }
}
@media (orientation: landscape) and (max-height: 340px) and (max-width: 720px) {
  /* the smallest windows (568x320): the board, the status and the controls first; the visitor's own bar steps aside */
  .play-board.has-steps > .strip ~ .strip { display: none; }
}
.strip .side-dot.on { box-shadow: 0 0 0 2px var(--accent-hi); }
.strip .av svg, .strip .av img, .av svg, .av img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* the end of a game: a frosted-glass panel over the board, both faces and the result (25 Nov 2026) */
.result { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; background: rgba(6, 14, 9, .24); border-radius: 6px; animation: page-in .25s var(--ease); z-index: 20; }
.result-card { position: relative; width: min(400px, 94%); max-height: 100%; overflow: hidden; border-radius: 18px; padding: 20px 18px 16px; text-align: center; color: var(--text); background: var(--panel); box-shadow: 0 18px 50px rgba(0, 0, 0, .4); }
.result-card.glass { background: color-mix(in srgb, var(--panel) 68%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .16); }
:root[data-theme="light"] .result-card.glass { background: rgba(255, 255, 255, .72); border-color: rgba(255, 255, 255, .9); box-shadow: 0 18px 50px rgba(40, 30, 10, .28); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .result-card.glass, :root[data-theme="light"] .result-card.glass { background: var(--panel); }
}
.result-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; }
.result-x:hover { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
.result-x .ico { width: 18px; height: 18px; }
/* the gate into the games going (js/games-in-progress.js): the kept game's card, and a line for the others */
.gate { display: grid; gap: 6px; margin-bottom: 12px; }
.gate .gate-game { margin: 0; }
.gate-more { justify-self: end; font-size: 13.5px; }
.gate-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.gate-row { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); color: var(--text); text-decoration: none; min-height: 44px; }
.gate-row small { grid-column: 1; color: var(--text-2); font-size: 13px; }
.gate-row .chev { grid-column: 2; grid-row: 1 / span 2; width: 18px; height: 18px; color: var(--text-3); }
/* the end card of a game between people (js/end-card.js): in a rated game the new rating is the card's main thing, the
   biggest number on it, the change beside it; while the server's answer is on its way the same place waits softly */
.result-card .end-rate { margin: 0 0 10px; font-size: 15px; color: var(--text-2); }
.result-card .end-rate b { color: var(--text); font-variant-numeric: tabular-nums; }
.end-hero { display: grid; justify-items: center; gap: 2px; margin: -2px 0 12px; min-height: 74px; align-content: center; }
.end-hero-row { display: inline-flex; align-items: baseline; gap: 10px; }
.end-hero-n { font-size: 46px; line-height: 1; font-weight: var(--w-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.end-hero-d { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.end-hero-d.up { color: var(--ok); } .end-hero-d.down { color: var(--red); }
:root[data-theme="light"] .end-hero-d.up { color: #2f7d43; } :root[data-theme="light"] .end-hero-d.down { color: #b0283a; }
.end-hero-l { font-size: 12px; font-weight: var(--w-label); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.end-hero.waiting .end-hero-n { display: block; width: 116px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--text) 10%, transparent); animation: end-wait 1.6s ease-in-out infinite; }
@keyframes end-wait { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .end-hero.waiting .end-hero-n { animation: none; } }
.result-card .end-casual { margin: -2px 0 12px; font-size: 13px; font-weight: var(--w-label); color: var(--text-2); }
.result-card.tight .end-hero-n { font-size: 40px; }
/* an account's Games rating beside its name during a rated live game (js/live-end.js ratingTag) */
.live-r { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--text-2); font-size: .86em; font-weight: 600; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.face-off { display: grid; grid-template-columns: minmax(60px, 1fr) minmax(0, 1.5fr) minmax(60px, 1fr); align-items: center; gap: 6px; margin: 24px 0 10px; }   /* (the room above keeps the Close button off a portrait) */
.face { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.face-av { position: relative; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: block; box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent), 0 6px 16px rgba(0, 0, 0, .25); transition: opacity .3s, filter .3s; }
.face-av img, .face-av .tile-av { width: 100%; height: 100%; display: grid; object-fit: cover; }
.face-av img { transform: scale(1.18); }
.face.win .face-av { box-shadow: 0 0 0 3px var(--gold), 0 0 22px color-mix(in srgb, var(--gold) 55%, transparent); }
.face.lost .face-av { opacity: .62; filter: grayscale(.45); }
.face figcaption { font-size: 13px; font-weight: var(--w-label); color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verdict { display: grid; gap: 2px; justify-items: center; }
.verdict b { font-size: 22px; font-weight: var(--w-display); letter-spacing: -.01em; line-height: 1.15; text-wrap: balance; overflow-wrap: break-word; }
.verdict small { font-size: 12px; font-weight: var(--w-label); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }   /* "Resigned": quiet (crimson is the Rematch under it) */
.result-card .why { margin: 0 0 12px; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.res-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.res-btns .btn { width: 100%; }
.res-btns .btn:only-child { grid-column: 1 / -1; }
/* the card never scrolls (js/pages/play.js fitCard): the lines marked data-fold give way to the side panel */
.result-card [hidden] { display: none !important; }
.result-card .end-medals { margin: 0 0 10px; }
.result-card:not(.folded) .end-medals.fold-only { display: none; }
.res-more { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.res-more .btn { min-height: var(--btn-h-sm); flex: 0 1 auto; padding-inline: 10px; font-size: 13.5px; }
.result-card.tight .face-av { width: 52px; height: 52px; }
.result-card.tight .face-off { margin-bottom: 6px; }
.result-card.tiny .face { display: none; }
.result-card.tiny .face-off { grid-template-columns: minmax(0, 1fr); margin: 10px 0 8px; }
.result-card.tiny .verdict { grid-column: 1; grid-row: 1; }
.result-card.tinier .end-moves-box { display: none; }
.result-card.tiniest .res-more { display: none; }       /* Share and Another master: the panel has Choose another master */
.result-card.least .end-medals.fold-only { display: none; }   /* the smallest boards (568x320): the result and the two buttons */
.end-sheet { display: grid; gap: 12px; }
.end-sheet .h-sec { margin: 0; }
.end-sheet p { margin: 0; }
/* a small board (a short window, 200% zoom): the two faces side by side and the result under them across the card,
   so that a master's name is never broken a word to a line */
.result { container-type: inline-size; }
@container (max-width: 400px) {
  .result-card .face-off { grid-template-columns: 1fr 1fr; row-gap: 4px; margin-top: 18px; }
  .result-card .verdict { grid-column: 1 / -1; grid-row: 2; }
  .result-card .face-av { width: 52px; height: 52px; }
  .result-card .verdict b { font-size: 18px; }
}
/* the buttons keep their words on one line ("Game / analysis", "Another / master" broke): no icons, less padding */
@container (max-width: 420px) {
  .result-card .res-btns .btn, .result-card .res-more .btn { padding-inline: 8px; }
  .result-card .res-btns .btn .ico, .result-card .res-more .btn .ico { display: none; }
}
@container (max-width: 300px) {
  .result-card { padding-inline: 10px; }
  .result-card .res-btns { gap: 6px; grid-template-columns: auto minmax(0, 1fr); }   /* Rematch as wide as its word, Game analysis the rest */
  .result-card .res-btns .btn { font-size: 14px; padding-inline: 6px; }
}
@container (max-width: 230px) { .result-card .res-btns { grid-template-columns: minmax(0, 1fr); } }   /* one under the other */
@media (max-width: 420px) {
  .result-card { padding: 14px 12px 12px; }
  .face-av { width: 64px; height: 64px; }
  .verdict b { font-size: 18px; }
  .result-card .why { font-size: 13px; margin-bottom: 8px; }
}

/* the chosen master, large */
.bot-hero { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; margin-bottom: 18px; }
.hero-av { position: relative; width: 132px; height: 132px; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 3px var(--accent), 0 10px 24px rgba(0, 0, 0, .3); }
.hero-av img, .hero-av .tile-av { width: 100%; height: 100%; display: grid; object-fit: cover; }
.hero-av img { transform: scale(1.08); }
.hero-av .won { width: 24px; height: 24px; right: 6px; bottom: 6px; }
.hero-text { min-width: 0; }
.hero-text h2 { font-size: 21px; margin: 2px 0 6px; line-height: 1.15; }
.hero-text h2 .ar { display: block; font-size: 15px; line-height: 1.5; color: var(--gold); }
.hero-text p { margin: 8px 0 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
/* "More": the source, his story and the likeness note, one tap away (the owner's clean pass) */
.pick-more > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; font-weight: var(--w-label); color: var(--text-3); }
.pick-more > summary::-webkit-details-marker { display: none; }
.pick-more > summary:hover { color: var(--text-2); }
.pick-more > summary .chev { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.pick-more[open] > summary .chev { transform: rotate(90deg); }
.pick-more .bot-meta { margin-top: 8px; }
.pick-more .likeness { margin: 6px 0 0; font-size: 12px; color: var(--text-3); font-weight: var(--w-meta); }
.bot-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; font-weight: var(--w-meta); }
@media (max-width: 400px) {
  .bot-hero { grid-template-columns: 108px 1fr; gap: 12px; }
  .hero-av { width: 108px; height: 108px; border-radius: 16px; }
  .hero-text h2 { font-size: 19px; }
}
/* a master's level: a short bar and its number */
.lvl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: var(--w-label); color: var(--text-3); white-space: nowrap; }
.lvl-bar { display: block; width: 44px; height: 5px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.lvl.big { font-size: 12.5px; color: var(--text-2); font-weight: var(--w-meta); }
.lvl.big .lvl-bar { width: 96px; height: 7px; }
/* the tiers, folded; each shows the faces of its masters */
.tier { margin-bottom: 8px; }
.tier > summary .count { white-space: nowrap; }
.tier > summary small { display: block; font-weight: var(--w-meta); font-size: 12px; color: var(--text-3); }
.tier-name { min-width: 0; }
.tier-faces { display: flex; flex: none; padding-left: 2px; }
.tier-faces span { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; margin-left: -10px; box-shadow: 0 0 0 2px var(--panel-2); }
.tier-faces span:first-child { margin-left: 0; }
.tier-faces img, .tier-faces .tile-av { width: 100%; height: 100%; display: grid; object-fit: cover; transform: scale(1.25); }
.tier-faces .tile-av { transform: none; }
/* the masters of a tier, compact: a small face, the name and the level beside it (the large portrait
   is the chosen master's, above; the clean pass keeps it there only) */
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; padding-top: 4px !important; }
.bot-pick { border: 0; background: var(--panel); padding: 6px 8px 6px 6px; border-radius: 10px; cursor: pointer; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; text-align: left; color: var(--text); font: inherit; transition: background .15s; }
.bot-pick:hover { background: color-mix(in srgb, var(--panel-2) 50%, var(--panel)); }
.bot-pick .av { position: relative; grid-row: span 2; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; }
.bot-pick .av img, .bot-pick .av .tile-av { width: 100%; height: 100%; display: grid; object-fit: cover; }
.bot-pick .av img { transform: scale(1.12); }
.bot-pick .av .won { width: 15px; height: 15px; right: 1px; bottom: 1px; }
.bot-pick .av .won .ico { width: 10px; height: 10px; }
.bot-pick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.bot-pick .nm { align-self: end; font-size: 13px; font-weight: var(--w-label); color: var(--text); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-pick .lvl { align-self: start; }
.won { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; z-index: 1; }
.won .ico { width: 12px; height: 12px; stroke-width: 3.5; }
.opt-btn { width: 100%; justify-content: flex-start; padding: 0 8px; }
.opt-btn .sum { margin-left: auto; font-weight: var(--w-meta); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.opt-btn > .ico:last-child { width: 16px; height: 16px; }
.menu-wrap .menu.up { left: 0; right: 0; max-height: max(220px, calc(100vh - 310px)); max-height: max(220px, calc(100dvh - 310px)); overflow-y: auto; overscroll-behavior: contain; }   /* never taller than the screen above it: its first choices stay in reach */
/* a short window: the foot stands at the top of the panel, so Options opens downwards, over the classes (it opened
   upwards past the top of the window, and You play: Red / Black could not be reached: the review of 29 Nov 2026) */
.menu-wrap .menu.drop { top: calc(100% + 6px); left: 0; right: 0; }      /* as long as it is: the page scrolls to its end */

/* in the game */
.game-body { display: flex; flex-direction: column; gap: 10px; }
.status { font-weight: var(--w-label); font-size: 16px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2); }
.status.alert { background: color-mix(in srgb, var(--red) 22%, var(--panel)); }
.status small { display: block; font-weight: var(--w-meta); font-size: 12.5px; color: var(--text-2); }
.moves { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; font-variant-numeric: tabular-nums; }
.moves li { display: grid; grid-template-columns: 38px 1fr 1fr; padding: 5px 8px; border-radius: 4px; font-size: 14px; }
.moves li:nth-child(odd) { background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.moves .n { color: var(--text-3); }
.moves .cur { font-weight: var(--w-title); }
.tool-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tool-row .btn { flex-direction: column; gap: 2px; min-height: 52px; padding: 6px 4px; font-size: 12px; }
.tool-row .btn .ico { width: 20px; height: 20px; }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 440px); gap: 40px; align-items: center; padding: 18px 0 30px; }
.hero h1 { margin: 10px 0 14px; max-width: 16ch; }
.hero p { font-size: 17px; color: var(--text-2); max-width: 52ch; margin: 0 0 22px; }
.hero .btn-row .btn.big { width: auto; padding: 0 30px; }
.today { display: block; text-decoration: none; padding: 14px; transition: transform .2s var(--ease), box-shadow .2s; }
.today:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.today .cap { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.today .cap b { display: block; font-size: 16px; }
.today .cap span { font-size: 13px; color: var(--text-2); }
.today .go { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: var(--w-label); white-space: nowrap; }
.today .go .ico { width: 18px; height: 18px; }
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.door { display: flex; flex-direction: column; gap: 8px; padding: 20px; text-decoration: none; min-height: 190px; position: relative; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.door:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.door .tile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 4px; }
.door .tile .ico { width: 26px; height: 26px; }
.door.play-d .tile { background: linear-gradient(135deg, #36c7b1, #15806f); }
.door.story-d .tile { background: linear-gradient(135deg, #f0bd58, #b9801c); }
.door.arch-d .tile { background: linear-gradient(135deg, #ef7a62, #a93522); }
.door h3 { font-size: 21px; }
.door p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.door .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-3); font-weight: var(--w-meta); padding-top: 10px; }
.door .foot .ico { width: 20px; height: 20px; color: var(--text-2); transition: transform .2s var(--ease); }
.door:hover .foot .ico { transform: translateX(4px); color: var(--sec, var(--text)); }
.faces { display: flex; }
.faces span { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; margin-right: -8px; box-shadow: 0 0 0 2px var(--panel); }
.faces svg, .faces img { width: 100%; height: 100%; display: block; }
.home-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 22px; color: var(--text-3); font-size: 13.5px; }
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; gap: 22px; } .doors { grid-template-columns: 1fr; } .h-display { font-size: 32px; } }

/* painted pictures in their slots (site/art/), when they exist */
.hero.has-art { background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 42%, transparent 70%), var(--hero) right center / cover no-repeat; border-radius: 16px; padding: 44px 28px; margin-bottom: 22px; }
.door .door-art { display: block; margin: -20px -20px 8px; aspect-ratio: 16 / 9; background: center / cover no-repeat; }
.art-paper body { background-image: var(--paper); background-size: 512px; }

/* ---------- the approved play screen: move list with piece pictures, switches, tiles ---------- */
.tile-av { display: grid; place-items: center; width: 100%; height: 100%; }
.tile-av .man { width: 84%; height: 84%; }
.game-body .status { margin: 0; padding: 0; background: none; min-height: 2.9em; font-size: 14.5px; font-weight: var(--w-label); }
.game-body .status.alert { background: none; color: #ff9a85; }
.game-body .moves { background: var(--panel-2); border-radius: 8px; max-height: 260px; min-height: 120px; overflow: auto; font-variant-numeric: tabular-nums; font-size: 14px; flex: none; }
.game-body .moves table { width: 100%; border-collapse: collapse; }
.game-body .moves td { padding: 4px 8px; }
.game-body .moves td.n { color: var(--text-3); width: 2.5em; }
.game-body .moves tr:nth-child(odd) { background: rgba(255, 255, 255, .025); }
.mv { display: inline-flex; align-items: center; gap: 2px; font-weight: var(--w-label); }
.mv .man { width: 18px; height: 18px; flex: none; }
.mv.cur { background: color-mix(in srgb, var(--accent) 24%, transparent); border-radius: 5px; padding: 0 4px; }
.empty-moves { color: var(--text-3); padding: 10px; font-size: 13.5px; }
.tool-row.three { grid-template-columns: 1fr 1fr 1fr; }
.tool-row.three .btn { flex-direction: row; min-height: var(--btn-h); font-size: 15px; font-weight: var(--w-title); }
.hint-btn { justify-content: flex-start; }
.toggles { display: grid; gap: 8px; padding: 2px 0; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: var(--w-label); font-size: 14px; cursor: pointer; user-select: none; }
.toggle input { appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 11px; background: #737a88; position: relative; cursor: pointer; transition: background .2s; margin: 0; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked { background: var(--text); }          /* on: ink (crimson is for actions) */
.toggle input:checked::after { background: var(--panel); }
.toggle input:checked::after { transform: translateX(18px); }
/* light: an off track that shows against the panel (3.6:1, its knob 3.8:1 on it); an on track in ink, as in the dark
   (the review of C7: the light rule also caught the on state, so on and off were the same grey, 1.8:1) */
:root[data-theme="light"] .toggle input:not(:checked) { background: #7d8390; }
/* the music's level (js/toggles.js): its name and a bar; on a phone the bar is 44 px tall to touch */
.toggle-range { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: var(--w-label); font-size: 14px; }
.toggle-range input { flex: 0 1 150px; min-width: 96px; height: 28px; margin: 0; accent-color: var(--text); cursor: pointer; }
.side .toggle-range { font-size: 13.5px; font-weight: var(--w-meta); }
@media (pointer: coarse), (max-width: 720px) { .toggle-range input { height: 44px; } }
.fly .toggles, .menu .toggles { padding: 6px 10px 8px; }
.side .toggle { font-size: 13.5px; font-weight: var(--w-meta); }
/* Two players' "Turn after each move" (js/pages/play.js): on a phone its row is a whole tap tall, clear of the fold under it */
@media (pointer: coarse), (max-width: 720px) { .toggle.two-turn { min-height: 44px; } }
.result-card { animation: card-pop .28s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes card-pop { from { transform: scale(.85); opacity: 0; } }

.rules .rule { padding: 8px 0; border-top: 1px solid var(--line); }
.rules .rule:first-child { border-top: 0; padding-top: 2px; }
.rules .rule b { font-size: 13.5px; }
.rules .rule p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.rules .link { display: inline-block; margin-top: 6px; font-size: 13px; }

/* on small screens the Play button stays in reach while the list of masters scrolls */
@media (max-width: 980px) {
  .play-panel { overflow: visible; }
  .play-panel .panel-foot { position: sticky; bottom: 0; z-index: 5; border-radius: 0 0 var(--radius) var(--radius); }
}
@media (max-width: 720px) { .play-panel .panel-foot { bottom: calc(62px + env(safe-area-inset-bottom)); } }

/* Home: a door for each of the five sections */
.doors.five { grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }
.doors.five .door { min-height: 212px; padding: 18px; }
.doors.five .door h3 { font-size: 19px; }
.doors.five .door p { font-size: 13.5px; line-height: 1.45; }
.door.mans-d .tile { background: linear-gradient(135deg, #8fb0c2, #55798c); }
.door.open-d .tile { background: linear-gradient(135deg, #b79ad6, #7556a8); }
.doors.five .door .foot { font-size: 12.5px; font-weight: var(--w-meta); }

/* ---------- Play: medals, the class of player, the review ---------- */
.medal-flash { position: absolute; left: 50%; top: 7%; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 10px; max-width: 86%; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); animation: medal-in 2.7s var(--ease) forwards; pointer-events: none; }
.medal-flash .ico { width: 30px; height: 30px; flex: none; }
.medal-flash b { display: block; font-size: 16px; line-height: 1.15; }
.medal-flash small { display: block; font-size: 12px; font-weight: var(--w-meta); line-height: 1.25; }
@keyframes medal-in { 0% { opacity: 0; transform: translate(-50%, -14px) scale(.9); } 8%, 86% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -8px) scale(.98); } }
.result-card .risen { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text); font-weight: var(--w-label); font-size: 14px; margin: 0 0 10px; animation: rise-in .5s .2s var(--ease) both; }
.result-card .risen .ico { width: 20px; height: 20px; }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } }
.won-medals { display: grid; gap: 6px; margin: 0 0 12px; text-align: left; }
.won-medal { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--panel-2) 80%, transparent); text-decoration: none; animation: rise-in .5s .35s var(--ease) both; }
.result-card .won-medal .medal-plant { width: 28px; height: 28px; }
.result-card .won-medal b { font-size: 13.5px; }
.result-card .won-medal small { font-size: 12px; font-weight: var(--w-meta); }
.won-medal .ico { width: 24px; height: 24px; flex: none; color: var(--accent-hi); }
.won-medal b { display: block; font-size: 14.5px; }
.won-medal small { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.4; font-weight: var(--w-meta); }
.class-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 8px; border-radius: var(--radius-sm); background: var(--panel-2); text-decoration: none; font-size: 14px; }
.class-row .ico { width: 22px; height: 22px; flex: none; color: var(--accent-hi); }
.class-row small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.3; font-weight: var(--w-meta); }
.class-row .n { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: var(--w-label); white-space: nowrap; }
.review { display: flex; flex-direction: column; gap: 8px; }
.moment { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border: 0; border-radius: var(--radius-sm); background: var(--panel-2); cursor: pointer; border-left: 3px solid transparent; }
.moment b { font-size: 14px; }
.moment span { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.moment.on { border-left-color: var(--accent); background: var(--panel-3); }

/* ---------- Play: the game analysis (js/pages/play.js). The bar, the graph and the words for
   the moves are drawn by js/evalbar.js and styled in css/analysis.css; here is how they sit. ---------- */
.board-row { min-width: 0; }
.board-row .evalbar[hidden] { display: none; }
/* beside the board the bar takes 30px, so the two name bars move in to stand over the board */
@media (min-width: 721px) { .play-board.analysing .strip { margin-left: 30px; } }
/* on a phone the bar lies under the board */
@media (max-width: 720px) { .play .an-board .evalbar { order: 2; } }
.an-body { display: flex; flex-direction: column; gap: 10px; }
.an-body > * { flex-shrink: 0; margin: 0; }
/* The top of the panel keeps one size whatever the move: the graph (with the progress over it while the
   engine works), the move's card, the best line and the buttons. Only the move list below takes what is left. */
.an-top { position: relative; height: 64px; }
.an-wait { position: absolute; left: 8px; right: 8px; bottom: 6px; display: grid; gap: 4px; padding: 6px 8px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--panel) 88%, transparent); }
.an-wait .note { margin: 0; font-size: 12.5px; font-weight: var(--w-meta); }
.an-wait[hidden] { display: none; }
.an-graph .evalgraph { height: 64px; }
#anCard { height: 146px; overflow: hidden; }
#anCard .movecard { height: 100%; box-sizing: border-box; overflow-y: auto; scrollbar-width: thin; }
.movecard .mc-side { font-size: 11.5px; font-weight: var(--w-title); letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--panel); color: var(--text-2); }
.an-body > .an-tools { height: 40px; margin: 0; flex-wrap: nowrap; }
.an-tools .btn { min-height: 38px; white-space: nowrap; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .an-tools { gap: 6px; } .an-tools .btn { font-size: 13.5px; padding-inline: 8px; } }
/* the move list scrolls inside its own box (the one box on the site that does, the owner's choice, 28 Nov 2026, as on
   chess.com and lichess): the box keeps its size, and js/pages/play.js fitList keeps the move on the board in view */
.an-body > .an-list { position: relative; flex: 1 1 0; min-height: 150px; max-height: 360px; overflow-x: hidden; overflow-y: auto; padding: 6px; border-radius: var(--radius-sm); background: var(--panel-2); scrollbar-width: thin; scrollbar-gutter: stable; }
.an-body > .an-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .an-body > .an-list { overscroll-behavior: contain; } }   /* the wheel at the list's end does not run on into the page */
@media (max-width: 980px) { .an-body > .an-list { max-height: 264px; } }
/* a short panel (js/pages/play.js fitSay): the list gives up its room, down to the row of the move on the board */
.an-body.snug { gap: 6px; }
.an-body.snug > .an-list { min-height: 44px; }
/* while it is measured, nothing eases (app.css gives every change a .01 ms transition under reduced motion, so a size
   read at once would still be the old one) */
.an-body.fitting, .an-body.fitting * { transition: none !important; }
.an-says .review { padding-top: 2px; }
/* where the panel sits under the board, its buttons stay at its foot (not stuck over the move's card) */
@media (max-width: 980px) { .play-panel.an-panel .panel-foot { position: static; } }
/* on a phone the move's card comes first, right under the move strip, and the panel needs no title */
@media (max-width: 720px) {
  .play-panel.an-panel .panel-head { display: none; }
  .an-body > .an-top { order: -2; }
  .an-body > #anCard { order: -1; }
}
.an-note { font-size: 12px; color: var(--text-3); line-height: 1.4; font-weight: var(--w-meta); }
/* "Better: <move>" is a button: it shows the move on the board, and a second tap goes back */
.movecard .mc-better { display: block; }
.mc-better-btn { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.mc-better-btn:hover { border-color: var(--accent); }
.mc-better-btn[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }
.mc-better-btn .mc-show { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: var(--w-label); color: var(--accent-hi, var(--accent)); white-space: nowrap; }
.mc-better-btn .mc-show .ico { width: 16px; height: 16px; }

/* the board's colourings, as small swatches */
.board-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 4px; }
.swatch { display: grid; grid-template-columns: 14px 14px 1fr; align-items: center; gap: 0 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: none; cursor: pointer; font-size: 12px; font-weight: var(--w-meta); color: var(--text-2); text-align: left; }
.swatch i { width: 14px; height: 14px; display: block; }
.swatch i:first-child { border-radius: 3px 0 0 3px; } .swatch i:nth-child(2) { border-radius: 0 3px 3px 0; }
.swatch span { padding-left: 8px; line-height: 1.2; }
.swatch[aria-checked="true"] { border-color: var(--sec, var(--text-2)); box-shadow: inset 0 0 0 1px var(--sec, var(--text-2)); color: var(--text); }   /* chosen: the section's colour, or ink (crimson is for actions) */
.swatch.b-slate i:first-child { background: #ece7da; } .swatch.b-slate i:nth-child(2) { background: #8ba2ae; }
.swatch.b-garden i:first-child { background: #ece7da; } .swatch.b-garden i:nth-child(2) { background: #86a96f; }
.swatch.b-rose i:first-child { background: #f3ebe6; } .swatch.b-rose i:nth-child(2) { background: #c9a2a8; }
.swatch.b-plain i:first-child, .swatch.b-plain i:nth-child(2) { background: #e5d1aa; }
.fly .board-pick, .menu .board-pick { grid-template-columns: 1fr; }

/* Play stays simple: the switches and the rules are folded away until asked for */
.group.fold > summary, .group.rules > summary { padding: 9px 12px; font-size: 14px; }
.men-key { display: grid; gap: 8px; padding-bottom: 8px; }
.man-row { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.man-row .pic { width: 34px; height: 34px; }
.man-row b { color: var(--text); } .man-row i { color: var(--text-3); font-style: normal; }

/* a medal shows the plant it grows in the visitor's garden */
.medal-plant { flex: none; display: block; width: 34px; height: 34px; }
.medal-plant svg { display: block; width: 100%; height: 100%; }
.medal-flash .medal-plant { width: 38px; height: 38px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .55); }

/* review: Resign asks first; the folds never shrink to a sliver; the play bar stays in reach on phones */
.resign-ask { display: grid; gap: 10px; padding: 12px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.resign-ask b { font-size: 15px; }
/* "Yes, resign" is an outline, so that it is never a second red block beside the main button */
.game-body > .group, .game-body > .btn, .game-body > .tool-row, .game-body > .resign-ask, .game-body > .play-bar, .game-dock > * { flex-shrink: 0; }
.two-link { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--text-3); font-weight: var(--w-meta); }
.two-link .link { font-weight: var(--w-meta); }   /* a quieter row under the main button */
.result-card .fold-why { display: block; }
.result-card:not(.folded) .fold-why, .result-card .risen:not([hidden]) ~ * .fold-why { display: none; }   /* only when its own line is folded away */
.result-card .risen.calm { color: var(--text-2); font-weight: var(--w-meta); font-size: 13px; text-align: center; }   /* a win that does not clear him: why, calmly (not news) */
.pick-rule { margin: 0; text-align: center; font-size: 12.5px; line-height: 1.35; color: var(--text-3); }   /* what clears a master, over his Play (js/classes.js CLEAR_RULE) */
@media (max-width: 720px) {
  .play-bar { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; padding: 8px; margin: 0 -8px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px); box-shadow: 0 -6px 18px rgba(0, 0, 0, .18); }
}
/* The game's main controls (js/pages/play.js renderPanel). On a wide screen the row is no box of its own: Turn and
   Resign, then "Show me a move", stand in the panel as before. On a phone, while a game is going, they stand in one
   row just above the bar of sections at the foot (the site check, 29 Nov 2026: at 390x844 Resign started under that
   bar, at 360x780 below the screen): Turn, Show me a move, Resign, always in reach of the thumb. The board keeps its
   full width; the page keeps room at its foot for the row. --foot-bar: the foot bar's height (play.js fitDock). */
.game-dock { display: contents; }
/* the row itself: on a phone, and in a short window (a phone held sideways, 200% zoom). js/pages/play.js writes it in
   the order it is seen (Turn, the middle button, Resign), and the middle button has the same outline as the other two
   (it was the one filled button, the loudest, though one tap of it costs the clear: the review of 29 Nov 2026). */
@media (max-width: 720px), (orientation: landscape) and (max-height: 600px) {
  .game-dock.live { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
  .game-dock.live #flip { flex: none; width: 48px; }
  .game-dock.live .hint-btn { flex: 1.7 1 0; min-width: 0; justify-content: center; gap: 6px; padding: 0 8px; min-height: var(--btn-h); white-space: nowrap; overflow: hidden; }
  .game-dock.live .hint-btn .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* never past its edges */
  .game-dock.live .m-hide { display: none; }          /* "Peek (3 left)" */
  .game-dock.live #new { flex: 1 1 0; min-width: 0; }
  .game-dock.live .blind-note { flex: 1 1 100%; font-size: 12.5px; margin: 0; }
  .game-dock.live .resign-ask { flex: 1 1 100%; padding: 10px 12px; }
}
@media (min-width: 361px) { .game-dock.live .hint-btn { flex-grow: 2; } }   /* (at 375 px "Show me a move" lost its last letters at 1.7) */
@media (max-width: 360px) { .game-dock.live .hint-btn { font-size: 14px; padding: 0 6px; gap: 5px; } }
@media (max-width: 340px) { .game-dock.live .hint-btn .ico { display: none; } }        /* (the words, whole, before the bulb) */
/* "Show me a move" while the engine looks: the words stay, the bulb glows (a longer label spilled out of the button) */
.hint-btn.busy { pointer-events: none; }
.hint-btn.busy .ico { animation: hint-look .45s ease-in-out infinite alternate; }
@keyframes hint-look { to { transform: scale(1.2); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .hint-btn.busy .ico { animation: none; opacity: .55; } }
/* A phone held upright: the row begins with the game's status line, calm, one or two short lines; a shah and the notes
   (a refused move, the bare shah, a move taken back) stand out. The panel's own line, under the row there, stays for
   screen readers: it is the one that speaks (aria-live). */
.dock-status { display: none; }
@media (max-width: 720px) and (orientation: portrait), (max-width: 720px) and (min-height: 601px) {
  .game-dock.live > .dock-status { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; flex: 1 1 100%; margin: -2px 0 0; padding: 0 2px; font-size: 13.5px; line-height: 18px; font-weight: var(--w-label); color: var(--text-2); }
  .game-dock.live > .dock-status.noted { color: var(--text); }
  .game-dock.live > .dock-status.alert { color: #ff9a85; background: color-mix(in srgb, var(--red) 16%, transparent); border-radius: 6px; padding: 1px 8px; }
  :root[data-theme="light"] .game-dock.live > .dock-status.alert { color: var(--red); }
  .play:has(.game-dock.live) .game-body > p.status { position: absolute; width: 1px; height: 1px; min-height: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* on a phone held upright it stands on the foot bar */
@media (max-width: 720px) {
  .game-dock.live { position: fixed; z-index: 25; left: 0; right: 0; bottom: var(--foot-bar, calc(74px + env(safe-area-inset-bottom))); padding: 8px max(12px, env(safe-area-inset-left)); background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -10px 22px -14px rgba(0, 0, 0, .45); }
  :root[data-theme="light"] .game-dock.live { background: color-mix(in srgb, #e9e2d1 94%, transparent); border-top-color: rgba(60, 50, 30, .12); }
}
/* ...and the page makes room for it (the review of 29 Nov 2026). --dock-h: the row's height (js/pages/play.js fitDock).
   - the board is never taller than the room between the top bar and the row (svh: with the browser's own bars shown;
     on a short screen js/pages/play.js showBoard then puts its foot just above the row: the back rank was under it);
   - the room at the page's end is after the footer (its links were under the row, where a tap pressed Show me a move);
   - a link that takes the keyboard's focus is scrolled clear of the row and the foot bar;
   - a downward swipe from the board at the top of the page does not reload it (pull to refresh);
   - the page does not slide in under it: a sliding page carries the fixed row with it, off the screen for a moment. */
@media (max-width: 720px) and (orientation: portrait), (max-width: 720px) and (min-height: 601px) {
  .play:has(.game-dock.live) > .play-board.has-steps {
    --room: calc(100vh - var(--topbar-h, 49px) - 88px - var(--foot-bar, 74px) - 12px);      /* (88px: the row with one line of status; a second line never resizes the board) */
    --room: calc(100svh - var(--topbar-h, 49px) - 88px - var(--foot-bar, 74px) - 12px);
    max-width: min(100%, var(--room));
  }
  .main:has(.game-dock.live) { padding-bottom: calc(90px + var(--dock-h, 88px)); }
  :root:has(.game-dock.live) { scroll-padding-bottom: calc(var(--foot-bar, 74px) + var(--dock-h, 88px) + 8px); }
  :root:has(.game-dock.live), :root:has(.game-dock.live) body { overscroll-behavior-y: contain; }
  .page:has(.game-dock.live) { animation: none; }
}
/* in a short window it stays in the panel beside the board, never over it (see the short window above) */
@media (orientation: landscape) and (max-height: 600px) {
  .game-dock.live, :root[data-theme="light"] .game-dock.live { position: static; z-index: auto; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .play:has(.game-dock.live) { padding-bottom: 0; }
  .game-dock.live .hint-btn { font-size: 13.5px; padding: 0 6px; gap: 5px; }   /* "Show me a move", whole, in the column beside the board */
  .game-dock.live #hint .ico { display: none; }
  .game-dock.live #new { padding-inline: 10px; }
}

/* A game against a master kept in the browser (js/game-save.js): one small card, one tap from going on. On Play's
   page and on a master's page before a game; in the Play section's lapis, never crimson (the page's one crimson
   button stays Play). And the question before a new game takes its place. */
.kept-game { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--sec-play) 9%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sec-play) 40%, transparent); color: var(--text); text-decoration: none; text-align: left; }
.kept-game:hover { box-shadow: inset 0 0 0 1.5px var(--sec-play); }
.kept-game:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
/* the position itself, as the visitor sits (js/kept-card.js), then the words, the master's small face beside his name */
.kg-board { flex: none; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.kg-board svg.mini { width: 100%; height: 100%; }
.kg-board.kg-blind { border-radius: 50%; display: grid; background: var(--panel-3); }   /* a blindfold game: the master's face, never the men */
.kg-blind img, .kg-blind .tile-av { width: 100%; height: 100%; display: grid; object-fit: cover; }
.kg-face { flex: none; width: 20px; height: 20px; border-radius: 5px; overflow: hidden; display: grid; place-items: center; background: var(--panel-3); }
.kg-face img, .kg-face .tile-av { width: 100%; height: 100%; display: grid; object-fit: cover; }
.kg-face img { transform: scale(1.18); }
.kg-t { flex: 1; min-width: 0; display: grid; gap: 2px; line-height: 1.2; }
.kg-t b { font-size: 15px; font-weight: var(--w-title); }
.kg-t small { font-size: 12.5px; color: var(--text-2); font-weight: var(--w-meta); }
.kg-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.kg-who > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kg-turn .mine { color: var(--sec-play); font-weight: var(--w-label); }
:root[data-theme="light"] .kg-turn .mine { color: color-mix(in srgb, var(--sec-play) 75%, #000); }
.kept-game .chev { width: 18px; height: 18px; flex: none; color: var(--sec-play); }
.ps-kept { margin-bottom: 14px; max-width: 520px; }       /* one small card on Play's page, not a strip across it */
.kept-game .kg-go { flex: none; min-height: 40px; padding: 0 16px; pointer-events: none; }   /* (the card itself is the link) */
.panel-foot > .kept-game { margin: 0 0 10px; }            /* above Play on a master's page, in place of the clear rule */
.panel-foot > .kept-gone { margin: 0 0 8px; text-align: center; }
@media (max-width: 720px) { .panel-foot:has(> .kept-game) > .two-link { display: none; } }   /* (a phone: the foot sticks to the screen; Play stays in it) */
.replace-ask .muted { margin-top: -4px; font-size: 13px; }
/* the two answers name the masters: side by side when they fit, else one under the other, never a word to a line */
.replace-ask .ask-row { display: flex; flex-wrap: wrap; }
.replace-ask .ask-row .btn { flex: 1 1 auto; width: auto; }
.kept-gone { margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); font-weight: var(--w-meta); }   /* the game ended or was replaced in another tab */

/* Learn the pieces */
.learn-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.learn-dots span { width: 28px; height: 5px; border-radius: 999px; background: var(--panel-3); }
.learn-dots span.cur { background: color-mix(in srgb, var(--sec, var(--text-2)) 45%, var(--panel-3)); }
.learn-dots span.on { background: var(--sec, var(--text-2)); }   /* the steps: Learn's saffron (crimson is the Next beside them) */
/* the panel is only as tall as its step, so "Next step" is in sight without scrolling; the board fits under the heading */
.learn .learn-panel { height: auto; max-height: none; }
.learn .play-board { max-width: calc(100vh - 215px); }
@media (max-width: 980px) {
  .learn .play-board { max-width: min(100%, calc(100vh - 300px)); }
  .learn .learn-panel .panel-foot { position: static; }      /* under the lesson, never over it */
  .learn .learn-panel { scroll-margin-bottom: 84px; }
}
/* a short, wide window (a phone held sideways, a laptop at 200% zoom): the lesson's board stands on the left as tall as
   the window allows, as the game's and the mansuba's do, its title and steps beside it (the review of 30 Nov 2026: the
   board was 90 px at 844x390, 100 px at 640x400, and the crimson Next below the fold) */
@media (orientation: landscape) and (max-height: 600px) {
  .page:has(> .play.learn) {
    --bsz: max(200px, min(calc(100dvh - 34px), calc(100vw - var(--side-w, 72px) - 56px - 300px)));
    display: grid; grid-template-columns: var(--bsz) minmax(0, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "board head" "board panel"; column-gap: 18px; align-items: start;
  }
  .page:has(> .play.learn) > .page-head { grid-area: head; margin-bottom: 10px; }
  .page:has(> .play.learn) > .page-head .h-page { font-size: 24px; }
  .page > .play.learn { display: contents; }
  .play.learn > .play-board { grid-area: board; position: sticky; top: 22px; width: var(--bsz); max-width: none; margin: 0; }
  .play.learn > .learn-panel { grid-area: panel; }
}
/* (on a phone's width the bars of a phone stand at the top and the foot: the board between them, as the game's) */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 720px) {
  .page:has(> .play.learn) {
    --bsz: max(160px, min(calc(100dvh - var(--topbar-h, 49px) - var(--foot-bar, calc(74px + env(safe-area-inset-bottom))) - 12px), calc(100vw - 32px - 292px)));
    column-gap: 12px;
  }
  .play.learn > .play-board { top: calc(var(--topbar-h, 49px) + 6px); }
}
.learn-panel .status { font-weight: var(--w-label); font-size: 15px; margin: 0 0 14px; }
.learn-panel .status.good { color: #7cc48a; }
:root[data-theme="light"] .learn-panel .status.good { color: #2f7d43; }

/* the host's greeting on Play: small, and closed for good with one tap */
.host { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; margin-bottom: 16px; padding: 8px 8px 8px 10px; border-radius: var(--radius-sm); background: var(--panel-2); }
.host img { width: 48px; height: 48px; border-radius: 10px; box-shadow: 0 0 0 1.5px var(--gold); }
.host p { margin: 0; font-size: 14px; line-height: 1.35; }
.host small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; font-weight: var(--w-meta); }
.host-x { width: 30px; height: 30px; padding: 0; font-size: 20px; line-height: 1; }
/* the blindfold challenge, set apart below the ladder */
.blind-pick { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); border: 0; background: var(--panel-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.blind-pick:hover { background: color-mix(in srgb, var(--panel-3, var(--panel-2)) 50%, var(--panel-2)); }
.blind-pick[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.blind-pick { grid-template-columns: 72px 1fr; }
.blind-pick .av { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; }
.blind-pick .av img, .blind-pick .av .tile-av { width: 72px; height: 72px; display: block; object-fit: cover; }
.blind-pick .av img { transform: scale(1.12); }
.blind-pick b { display: block; font-size: 14.5px; }
.blind-pick small { display: block; color: var(--text-2); font-size: 12.5px; line-height: 1.35; margin: 2px 0 5px; font-weight: var(--w-meta); }

/* in the game: Flip and Resign, and the note while looking back (the move strip under the board steps through the moves) */
.play-bar { display: flex; gap: 8px; align-items: stretch; }
.play-bar .btn { min-height: var(--btn-h); padding: 0 6px; }
.play-bar .btn .ico { width: 20px; height: 20px; }
.play-bar #flip { flex: none; width: 44px; }
.play-bar #new { flex: 1; font-weight: var(--w-title); }
button.mv { border: 0; background: none; color: inherit; font: inherit; font-weight: var(--w-label); padding: 1px 4px; border-radius: 5px; cursor: pointer; }
button.mv:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
/* looking back at an earlier move: the banner and the frame round the board in the section's colour (Play's lapis), as
   the stepper marks the same place; a crimson frame stood right against the Red men (the review of C7) */
.viewing { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--sec, var(--text-2)) 12%, var(--panel)); border: 1px solid var(--sec, var(--text-2)); font-size: 13.5px; font-weight: var(--w-label); flex-shrink: 0; }
.board-box.past::after { content: ""; position: absolute; inset: -4px; border: 3px solid var(--sec, var(--text-2)); border-radius: 8px; pointer-events: none; z-index: 15; }

/* the visitor's own picture: a button under the board, and a small row to choose from */
.play-board .strip { position: relative; }
.strip .av-btn { padding: 0; border: 0; cursor: pointer; box-shadow: 0 0 0 1.5px transparent; transition: box-shadow .15s; }
.strip .av-btn:hover, .strip .av-btn[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent); }
.strip .bot-av img { transform: scale(1.18); }
.av-pop { position: absolute; left: 0; z-index: 40; padding: 8px 10px 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.av-pop > b { display: block; font-size: 12.5px; margin-bottom: 6px; color: var(--text-2); font-weight: var(--w-meta); }
#bottom .av-pop { bottom: calc(100% - 2px); }
#top .av-pop { top: calc(100% - 2px); }
.av-row { display: flex; gap: 6px; flex-wrap: wrap; }
.menu .av-row { padding: 2px 10px 6px; }
.av-opt { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 9px; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.av-opt .tile-av .man { width: 84%; height: 84%; }
.av-opt[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--sec, var(--text)); }
/* the men vanish in the blindfold game; the squares, the last move and the marks stay */
.board-box .pcs { transition: opacity .35s var(--ease); }
.board-box.blind .pcs { opacity: 0; }
.board-box.snap .pcs { transition: none; }      /* a blindfold game brought back (a reload): hidden at once, never faded */
.blind-note { margin: 0; text-align: center; }

/* a black man in a move list keeps a thin light edge on the dark panels (Play, Openings) */
.mv .man.black { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .85)); }
:root[data-theme="light"] .mv .man.black { filter: none; }

/* the light theme: the "thinking" label dark enough to read */

/* ---------- My games: the rows themselves are in css/games.css (added by js/pages/games.js) ---------- */
.result-card .kept { margin: 6px 0 12px; font-size: 13px; color: var(--text-2); text-align: center; }

/* ---------- one hint, the first time it matters (js/hints.js) ---------- */
.hint-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 6px 6px 6px 14px; border-left: 3px solid var(--sec, var(--text-2)); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--panel-2); font-size: 14px; }
.hint-line .hint-x { min-height: 30px; width: 30px; padding: 0; flex: none; }
.hint-line .hint-x .ico { width: 16px; height: 16px; }
.hint-line .hint-got { width: auto; padding: 0 12px; min-height: 34px; }
.hint-line.hint-has-got { align-items: flex-end; line-height: 1.45; padding: 10px 10px 10px 14px; }

/* ---------- the welcome page: a first move, then what is inside ---------- */
.ls-text { font-size: 17px !important; line-height: 1.5; font-weight: var(--w-meta) !important; }
@media (max-width: 860px) {
  /* one column: the board stays where it is after the first move. The buttons that the first move brings come
     under the board, not over it, and the line keeps room for two lines (the walkthrough: the board jumped 170px) */
  #wlActs { order: 2; margin-top: 16px; }
}

/* ---------- the profile ---------- */
/* the top: picture, name, "Your page as others see it" and the class; on a phone stacked evenly (P7, 30 Nov 2026) */
.pf-top { display: grid; grid-template-columns: 112px minmax(0, 1fr) minmax(0, auto); grid-template-areas: "pic name class" "pic acts class"; column-gap: 22px; row-gap: 8px; align-items: center; margin-bottom: 18px; }
.pf-top:not(:has(.pf-acts)) { grid-template-areas: "pic name class" "pic name class"; }
.pf-pic { grid-area: pic; width: 112px; height: 112px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 3px var(--accent); }
.pf-pic .tile-av { width: 100%; height: 100%; display: grid; }
.pf-name { grid-area: name; align-self: end; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.pf-top:not(:has(.pf-acts)) .pf-name { align-self: center; }
.pf-name-row { display: flex; gap: 8px; }
.pf-name input { flex: 1; width: 100%; min-width: 0; max-width: 320px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); font: var(--w-title) 20px/1 var(--font-display); }
.pf-name input:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 1px; }
/* a username that cannot be changed yet reads as plain text, with the date of the next change under it */
.pf-name input[readonly] { padding-left: 0; border-color: transparent; background: transparent; }
.pf-name input[readonly]:focus-visible { outline-offset: 3px; }
.pf-name .note { margin: 0; }
.pf-acts { grid-area: acts; align-self: start; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
/* the class reached, the next step smaller under it (P2) */
.pf-class { grid-area: class; display: grid; gap: 3px; margin: 0; min-width: 0; max-width: 300px; padding: 12px 16px; border-radius: var(--radius); background: var(--panel-2); }
.pf-class b { font: var(--w-title) 22px/1.2 var(--font-display); }
.pf-class small { font: var(--w-meta) 12.5px/1.35 var(--font); color: var(--text-2); }
.pf-sec { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.pf-sec > .h-sec { margin-bottom: 12px; }
.pf-choose { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.pf-men { gap: 8px; }
.pf-men .av-opt { width: 54px; height: 54px; }
/* the rating, a card per pool */
.pf-rate { display: grid; gap: 6px; align-content: start; padding: 14px 16px; }
.pf-rate-num { display: flex; align-items: baseline; gap: 10px; }
.pf-rate-num b { font: var(--w-display) 32px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pf-prov { font-size: 12px; font-weight: var(--w-label); color: var(--text-3); padding: 2px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); }
.pf-rate .note { margin: 0; }
.pf-rate-dl { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; }
.pf-rate-dl dt { font-size: 12px; color: var(--text-3); font-weight: var(--w-meta); }
.pf-rate-dl dd { margin: 0; font-size: 14.5px; font-weight: var(--w-label); }
.pf-spark { display: block; width: 100%; max-width: 220px; height: 40px; margin-top: 4px; color: var(--text-2); overflow: visible; }
.pf-spark-dot { fill: var(--accent); }
.pf-rate-note { margin: 10px 0 0; color: var(--text-3); }
@media (max-width: 720px) {
  .pf-top, .pf-top:not(:has(.pf-acts)) { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "pic name" "acts acts" "class class"; gap: 14px; }
  .pf-top:not(:has(.pf-acts)) { grid-template-areas: "pic name" "class class"; }
  .pf-name, .pf-top:not(:has(.pf-acts)) .pf-name { align-self: center; }
  .pf-pic { width: 84px; height: 84px; }
  .pf-class { max-width: none; }
  .pf-acts .btn { flex: 1 1 auto; justify-content: center; }
}

/* the daily mansuba's streak, on Home */
.streak { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; padding: 2px 9px 2px 6px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-size: 12.5px; font-weight: var(--w-title); white-space: nowrap; justify-self: start; }
.streak .ico { width: 14px; height: 14px; }

/* sharing a game: the link in a box, where the browser will not copy it itself */
.share-box { flex: 1 1 100%; min-width: 0; width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); color: var(--text); font: var(--w-meta) 12.5px/1 var(--font); }
.an-share { margin: 0; }


/* Choosing a master (js/pages/play.js): each group is one row that opens its masters in the side panel;
   the panel never scrolls (fitPick: the host's greeting steps aside, then the groups' short lines). */
.tier-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; color: var(--text); font: inherit; font-weight: var(--w-label); text-align: left; cursor: pointer; }
.tier-row:hover { background: color-mix(in srgb, var(--panel-3, var(--panel-2)) 50%, var(--panel-2)); }
.tier-row:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.tier-row.has-pick { box-shadow: inset 3px 0 0 var(--sec, var(--text-2)); }
.tier-row small { display: block; font-weight: var(--w-meta); font-size: 12px; color: var(--text-3); }
.tier-row .count { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-weight: var(--w-meta); white-space: nowrap; }
.tier-row .chev { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.pick-body.tight .tier-row small { display: none; }
.pick-body .host[hidden] { display: none; }
.pick-more-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: var(--w-label); color: var(--text-3); }
.pick-more-btn:hover { color: var(--text-2); }
.pick-more-btn .chev { width: 14px; height: 14px; }
.tier-blurb { margin: 0 0 12px; }
.pick-more-sheet { display: grid; gap: 10px; }
.pick-more-sheet p { margin: 0; }
.pick-more-sheet .likeness { font-size: 12.5px; color: var(--text-3); font-weight: var(--w-meta); }
.pick-body.tight .tier-row { padding-block: 7px; }
.pick-body.tight .blind-pick { grid-template-columns: 38px 1fr; gap: 10px; margin-top: 6px; padding: 7px 12px; }
.pick-body.tight .blind-pick .av, .pick-body.tight .blind-pick .av img, .pick-body.tight .blind-pick .av .tile-av { width: 38px; height: 38px; border-radius: 50%; }
.pick-body.tight .blind-pick small, .pick-body.tight .blind-pick .lvl { display: none; }

/* The analysis panel itself never scrolls (js/pages/play.js drawMore): only its move list does, inside its box (above);
   the rest of the game is in "More from this game", under it. */
.an-body { overflow: hidden; }
.ml-row { display: contents; }
.an-body > .an-more { flex: none; }
.an-sheet { display: grid; gap: 18px; }
.an-sheet section { display: grid; gap: 8px; }
.an-sheet h3 { margin: 0; }
.an-sheet .an-list.in-sheet { padding: 6px; border-radius: var(--radius-sm); background: var(--panel-2); }
.an-sheet .an-note { margin: 0; }
/* the leaderboard's empty card: its words and its button stood on the card's bare edge (the walkthrough, 27 Nov 2026) */
.lb-empty { display: grid; gap: 12px; justify-items: start; padding: 18px 20px; }
.lb-empty p { margin: 0; }
/* The result card at night: the frosted panel was a mid grey-green, and its smaller lines were weak on it (the
   walkthrough, 27 Nov 2026). It is nearly the panel's own dark now. */
:root:not([data-theme="light"]) .result-card.glass { background: color-mix(in srgb, var(--panel) 88%, transparent); }
/* While the result card is up it holds the one main button; the same action in the panel behind it steps back. */
.play:has(#result:not([hidden])) .play-panel .btn.primary { background: var(--panel-3); color: var(--text); box-shadow: none; }
/* the welcome page's quiet links (Skip to the site, Look around first) start on the title's left edge, not a button's padding in from it */
/* a phone: the top bar keeps its 2 px over the opponent's bar, so the bot's words never tuck under it (tests/game-voice.mjs) */
@media (max-width: 720px) { .play-board > .strip:first-child { padding-top: 2px; } }
