/* WrapGTO, the new look: "Carbon" (chosen by the owner 2026-11-11).

   CONTENTS
   1  Tokens: Carbon dark (the default) and its light mode (Ledger's colours, the same type and corners)
   2  Base: type, numbers, links, focus
   3  Controls: buttons, segmented switches, chips, fields
   4  The shell: rail, page header, body, side column
   5  Boxes, the line, the answer, numbers and bars
   6  The card face (unchanged: the owner keeps the cards as they are)
   7  The table
   8  My moves
   9  Dialogs, table setup, messages
   10 Small screens

   Rules: what is yours to do is shown inverted (dark mode) or on the highlighter yellow (light
   mode): --act. Colour says what a thing IS, never decoration (the owner, 2026-11-11: the first
   build was "a little bit too colorless. Like Fold should be some sort of really dark red and call
   should be a super dark green"): the three moves have their colours wherever they appear (--fold
   red, --call green, --raise amber: the buttons, the word on a seat's plate, the answer's bars), a
   grade has its own (green / amber / red), a result is green or red. A hidden card is an empty
   rectangle and a chip a flat disc, both in the page's own greys.
   Corners are 6 px; nothing is pill-shaped except the table itself. Numbers that are compared sit in
   the mono face. Motion: 0.16 s fades at most; nothing dims, blurs, bounces or loops. */

/* The fonts, served from this site (static/fonts/, SIL Open Font License): Inter = text, JetBrains Mono =
   numbers, Geist = the card faces. Variable files, latin + latin-ext. wg_pages.py adds ?v=<hash> to each URL. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/Inter-latin-ext.woff2?v=34b9c504cab7a73e") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/Inter-latin.woff2?v=3100e775e8616cd2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/static/fonts/JetBrainsMono-latin-ext.woff2?v=79bfdab9ba467e26") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/static/fonts/JetBrainsMono-latin.woff2?v=18be452724bfdc23") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/Geist-latin-ext.woff2?v=824f485b5d26e2f2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/static/fonts/Geist-latin.woff2?v=19f9c92546aa300c") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---- 1 Tokens ---------------------------------------------------------------------------------- */
:root {
  --bg: #0D0E10; --rail: #0A0B0C; --sur: #15171A; --sur2: #1C1F23; --surf: #111315;
  --line: #262A30; --line2: #3A3F47;
  --ink: #F2F3F5; --body: #C6CBD3; --mut: #9AA1AB; --mut2: #7C838D;
  --acc: #F2F3F5; --accink: #0D0E10;
  --on: #F2F3F5; --onink: #0D0E10;
  --act: #F2F3F5; --actink: #0D0E10; --actline: #F2F3F5;
  --felt: #121417; --feltline: #3A3F47; --back: #1C1F23; --backline: #5E6671;
  --chip: #E8EAED; --chip2: #8E96A1; --chip-line: #0D0E10;
  --good: #4CC38A; --bad: #F2555A; --warn: #D9A441;
  --bar: #F2F3F5; --track: #262A30;
  /* the three moves: a button (ground, edge, words), the word on a plate, a bar */
  --fold: #3D1216; --fold-line: #7A262D; --fold-ink: #F6D4D6; --fold-word: #E58A90; --fold-bar: #C4474F;
  --call: #0D3324; --call-line: #1F6B4B; --call-ink: #CFF1E0; --call-word: #6FD0A0; --call-bar: #3FA574;
  --raise: #3B2A0A; --raise-line: #7A5A16; --raise-ink: #F5E3B8; --raise-word: #E0B95F; --raise-bar: #C9982E;
  /* A STRATEGY CHART (every hand at once: Study's hold'em view, any 13 x 13 grid) uses the
     colours every solver uses (the owner, 2026-11-11: "the normal colors of blue for fold, green for
     call, and various shades of red for raising where deeper red is bigger raises"). A raise's shade
     runs from --sv-raise-lo (the smallest) to --sv-raise-hi (the biggest, all-in). The buttons and the
     words at the table keep the move colours above. */
  --sv-fold: #3F7FC4; --sv-call: #46AD63; --sv-raise-lo: #F2545A; --sv-raise-hi: #7A1B20; --sv-ink: #FFFFFF;
  --sv-off: #1A1C20; --sv-off-ink: #5E6671;
  --shade: rgba(0, 0, 0, 0.6);
  --rad: 6px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  --cardfont: Geist, "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4F2EC; --rail: #ECE9E0; --sur: #FFFFFF; --sur2: #F7F5EF; --surf: #F7F5EF;
  --line: #D8D4C8; --line2: #17191C;
  --ink: #17191C; --body: #33363B; --mut: #5E6168; --mut2: #6E7178;
  --acc: #17191C; --accink: #FFFFFF;
  --on: #17191C; --onink: #FFFFFF;
  --act: #F7D548; --actink: #17191C; --actline: #17191C;
  --felt: #E7E3D6; --feltline: #17191C; --back: #FFFFFF; --backline: #17191C;
  --chip: #17191C; --chip2: #5E6168; --chip-line: #F4F2EC;
  --good: #1B7F4B; --bad: #B3261E; --warn: #8A6410;
  --bar: #17191C; --track: #E7E3D6;
  --fold: #7A1D21; --fold-line: #5C1418; --fold-ink: #FFFFFF; --fold-word: #A3262B; --fold-bar: #B3393E;
  --call: #17573A; --call-line: #0F3F29; --call-ink: #FFFFFF; --call-word: #1B7F4B; --call-bar: #2E8F5E;
  --raise: #6E5010; --raise-line: #4F3A0B; --raise-ink: #FFFFFF; --raise-word: #8A6410; --raise-bar: #A67C1B;
  --sv-fold: #3F7FC4; --sv-call: #3FA45B; --sv-raise-lo: #EF4A50; --sv-raise-hi: #74181D; --sv-ink: #FFFFFF;
  --sv-off: #E7E4DC; --sv-off-ink: #9A968C;
  --shade: rgba(23, 25, 28, 0.45);
  color-scheme: light;
}

/* ---- 2 Base ------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: flex; background: var(--bg); color: var(--ink); font: 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p { margin: 0; }
a { color: var(--ink); text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mut { color: var(--mut); }
.up { color: var(--good); }
.dn { color: var(--bad); }
.pre { white-space: pre-line; }
.lbl { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--sur); padding: 8px 12px; border: 1px solid var(--line2); border-radius: var(--rad); }
.skip:focus { left: 8px; }
.cat-best, .cat-correct { color: var(--good); }
.cat-inaccuracy { color: var(--warn); }
.cat-wrong, .cat-blunder { color: var(--bad); }
.cat-best, .cat-blunder { font-weight: 600; }

/* ---- 3 Controls -------------------------------------------------------------------------------- */
.btn { border: 1px solid var(--line2); border-radius: var(--rad); background: var(--sur); color: var(--ink); padding: 6px 12px; min-height: 32px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover:not(:disabled) { background: var(--sur2); }
.btn.p { background: var(--acc); border-color: var(--acc); color: var(--accink); font-weight: 600; }
.btn.p:hover:not(:disabled) { background: var(--acc); opacity: 0.9; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn:disabled { border-color: var(--line); color: var(--mut2); background: var(--surf); cursor: default; }
.btn.p:disabled { background: var(--surf); }
.btn.fold { background: var(--fold); border-color: var(--fold-line); color: var(--fold-ink); }
.btn.call { background: var(--call); border-color: var(--call-line); color: var(--call-ink); }
.btn.raise { background: var(--raise); border-color: var(--raise-line); color: var(--raise-ink); }
.btn.fold:hover:not(:disabled) { background: color-mix(in srgb, var(--fold) 80%, var(--fold-bar)); }
.btn.call:hover:not(:disabled) { background: color-mix(in srgb, var(--call) 80%, var(--call-bar)); }
.btn.raise:hover:not(:disabled) { background: color-mix(in srgb, var(--raise) 80%, var(--raise-bar)); }
/* not your turn: each keeps a trace of its colour, flat and quiet (never a dimmed screen) */
.btn.fold:disabled { background: color-mix(in srgb, var(--fold) 55%, var(--sur)); border-color: color-mix(in srgb, var(--fold-line) 45%, var(--line)); color: var(--mut); }
.btn.call:disabled { background: color-mix(in srgb, var(--call) 55%, var(--sur)); border-color: color-mix(in srgb, var(--call-line) 45%, var(--line)); color: var(--mut); }
.btn.raise:disabled { background: color-mix(in srgb, var(--raise) 55%, var(--sur)); border-color: color-mix(in srgb, var(--raise-line) 45%, var(--line)); color: var(--mut); }
.btn.sq { padding: 0; width: 32px; }
.btn.big { flex: 1; height: 48px; font-size: 15px; font-weight: 600; }
.btn.link { border: 0; background: none; padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 2px; }
.key { font: 400 11px/1 var(--mono); opacity: 0.7; margin-left: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--rad); overflow: hidden; }
.seg button { border: 0; border-right: 1px solid var(--line); background: var(--sur); color: var(--mut); padding: 6px 12px; min-height: 30px; cursor: pointer; white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--on); color: var(--onink); font-weight: 600; }
.seg button:disabled { color: var(--mut2); cursor: default; opacity: 0.6; }
.seg button:focus-visible { outline-offset: -3px; }
.seg.sm button { padding: 3px 9px; min-height: 24px; font-size: 12px; }
.chip { border: 1px solid var(--line); border-radius: var(--rad); padding: 3px 8px; white-space: nowrap; background: var(--sur); }
/* a value in the header that can be changed right there (the ante) */
button.chip { font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted var(--mut2); text-underline-offset: 3px; }
button.chip:hover { border-color: var(--line2); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
input[type="number"], input[type="text"], select { border: 1px solid var(--line2); border-radius: var(--rad); background: var(--bg); padding: 5px 8px; min-height: 30px; }
input[type="number"] { width: 84px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--ink); margin: 0; }
input:disabled, select:disabled { color: var(--mut2); border-color: var(--line); }
[aria-invalid="true"] { border-color: var(--bad); }

/* ---- 4 The shell ------------------------------------------------------------------------------- */
/* the strategy chart (chart.js): every hand of a hold'em range, in the solver colours */
.ch-head .ch-count { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; }
.ch-head .ch-larger { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: var(--mut); }
.ch-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--body); }
.ch-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ch-key i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.ch-key b { font-weight: 500; color: var(--ink); }
.ch .k-fold { background: var(--sv-fold); }
.ch .k-call { background: var(--sv-call); }
.ch .k-raise { background: var(--sv-raise-lo); }
.ch-bar { position: relative; height: 10px; border-radius: 2px; overflow: hidden; background: var(--sv-off); }
.ch-bar .b { position: absolute; top: 0; bottom: 0; }
.ch-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ch-cell { position: relative; aspect-ratio: 1; background: var(--sv-off); overflow: hidden; }
.ch-cell .b { position: absolute; bottom: 0; }
.ch-cell .l { position: absolute; left: 2px; top: 1px; font: 600 9px/1 var(--mono); color: var(--sv-ink); letter-spacing: -0.02em; }
.ch-cell.off .l { color: var(--sv-off-ink); font-weight: 400; }
.ch-cell.me { outline: 2px solid var(--ink); outline-offset: -1px; z-index: 1; }
.ch-read { min-height: 2.8em; font-size: 12px; line-height: 1.4; margin: 0; }
.rate-btn { white-space: nowrap; }
.rate-row { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 500; }
.rate-in { display: inline-flex; align-items: center; gap: 6px; }
.rate-in input { width: 110px; }
.tick { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--mut); cursor: pointer; white-space: nowrap; }
.tick input { width: 15px; height: 15px; margin: 0; accent-color: var(--ink); }
.rail { width: 176px; flex: none; background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 10px; gap: 2px; }
.rail .brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 20px; font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.rail .brand img { width: 22px; height: 22px; flex: none; }
.on-light { display: none; }
:root[data-theme="light"] .on-light { display: block; }
:root[data-theme="light"] .on-dark { display: none; }
.rail a, .rail .soon, .rail-btn { display: block; padding: 9px 10px; border-radius: var(--rad); color: var(--mut); text-decoration: none; font-size: 14px; font-weight: 500; border: 0; background: none; text-align: left; }
.rail a:hover { color: var(--ink); }
.rail a.on { background: var(--sur); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line2); }
.rail .soon { color: var(--mut2); opacity: 0.55; cursor: default; }
.rail-gap { margin-top: auto; }
.rail-btn { cursor: pointer; font-size: 12px; }
.rail-btn:hover { color: var(--ink); }
.main { flex: 1; min-width: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.head { min-height: 56px; flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.head h1 { font-size: 19px; line-height: 1; letter-spacing: -0.01em; margin-right: 8px; }
.head .lbl { margin-left: 10px; }
.head .push { margin-left: auto; }
.body { flex: 1; min-height: 0; display: flex; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 10px 16px 16px; gap: 8px; }
.stage-top { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 26px; flex: none; }
.stage-note { text-align: center; min-height: 18px; margin: 0; }
/* the chart of every hand, standing where the table stands (Train's review on hold'em) */
.stage-chart { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; overflow: auto; }
.stage-chart .ch { flex: none; }
.stage-chart .ch-cell .l { font-size: 11px; left: 3px; top: 2px; }
/* Train's side column: the same boxes at the same sizes in every state (nothing moves when a hand ends) */
body[data-page="train"] .side .ln { min-height: 150px; }
body[data-page="train"] .side .an { flex: none; height: 336px; display: flex; flex-direction: column; }
@media (max-height: 899px) { body[data-page="train"] .side .an { height: 300px; } }
/* the chart's own box on the right (hold'em, a tall window): one size whatever it shows */
body[data-page="train"] .side .ch { flex: none; }
body[data-page="train"] .side .ch .ch-legend { height: 40px; overflow: hidden; align-content: flex-start; }
body[data-page="train"] .side .ch .ch-read { height: 4.2em; min-height: 0; overflow: hidden; }
/* a window under 1100 px tall with the chart in the side column (train.js: .side.ch-tight): the answer 300 px, the hand's
   actions at least 120 px, the chart's readout two lines -- room for the 13 x 13 grid from 900 px tall */
body[data-page="train"] .side.ch-tight .an { height: 300px; }
body[data-page="train"] .side.ch-tight .ln { min-height: 120px; }
body[data-page="train"] .side.ch-tight .ch .ch-read { height: 2.8em; }
/* your numbers in the rail on the left (a window wider than 1280 px) */
.rail { overflow-y: auto; scrollbar-width: none; }
.rail-slot { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); min-width: 0; }
.rail-slot .box { border: 0; background: none; border-radius: 0; }
.rail-slot .box-head { flex-direction: column; align-items: flex-start; gap: 8px; border-bottom: 0; padding: 10px 2px 4px; }
.rail-slot .kv { grid-template-columns: 1fr 1fr; padding: 8px 2px; gap: 10px 6px; }
.rail-slot .kv b { font-size: 16px; }
.rail-slot .bars { padding: 6px 2px; grid-template-columns: 64px 1fr 26px; gap: 6px 6px; font-size: 11px; }
.rail-slot .box-foot { border-top: 0; padding: 6px 2px; font-size: 11px; }
.rail-slot .box-foot > span { white-space: normal; }
.rail-slot .box + .box { border-top: 1px solid var(--line); margin-top: 6px; }
.rail-slot .box-line { padding: 10px 2px 4px; font-size: 12px; }
.rail-slot .hands { font-size: 11px; }
.rail-slot .hands { gap: 0 8px; }
.rail-slot .hands button > span:first-child { padding-left: 2px; }
.rail-slot .hands button > span:last-child { padding-right: 2px; }
.rail-slot .hands-none { padding: 2px 2px 8px; font-size: 11px; }
@media (max-width: 1280px) { .rail-slot { display: none; } }
body[data-page="train"] .side .an .an-body { flex: 1; min-height: 0; overflow-y: auto; }
@media (max-height: 739px) { body[data-page="train"] .side .an { height: 240px; } }
body[data-page="train"] .side .box-foot { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; }
body[data-page="train"] .side .hands { min-height: 108px; }
.hands-none { margin: 0; padding: 4px 12px 10px; font-size: 12px; }
.stage-note b { color: var(--ink); font-weight: 600; }
.stage-table { flex: 1; min-height: 0; position: relative; }
.stage-moves { flex: none; width: 100%; max-width: 680px; margin: 0 auto; }
.side { width: 380px; flex: none; border-left: 1px solid var(--line); background: var(--rail); padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }

/* ---- 5 Boxes, the line, the answer, numbers ---------------------------------------------------- */
.box { border: 1px solid var(--line); border-radius: var(--rad); background: var(--sur); flex: none; }
.box > h3, .box-head { margin: 0; padding: 9px 12px; font: 600 11px/1.2 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); border-bottom: 1px solid var(--line); }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.box-head h3 { font: inherit; letter-spacing: inherit; }
.box-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.box-foot > span { white-space: nowrap; }
.box-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 12px; }
.r { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }

.ln { display: flex; flex-direction: column; min-height: 200px; flex: 0 0 auto; max-height: 44vh; }
.ln.fill { flex: 1 1 auto; max-height: none; }
.ln-list { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 6px; }
.ln-st { padding: 6px 12px 3px; font: 500 11px/1.2 var(--mono); letter-spacing: 0.04em; color: var(--mut); border-top: 1px solid var(--line); text-transform: uppercase; }
.ln-st:first-child { border-top: 0; }
.ln-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 0 8px; padding: 3px 12px; width: 100%; border: 0; background: none; text-align: left; align-items: baseline; }
button.ln-row { cursor: pointer; }
button.ln-row:hover { background: var(--sur2); }
.ln-row.me { font-weight: 600; }
.ln-row.now, .ln-row.on { background: var(--act); color: var(--actink); }
.ln-row.now .mut, .ln-row.on .mut, .ln-row.now .ln-grade, .ln-row.on .ln-grade { color: inherit; }
button.ln-row.on:hover { background: var(--act); }
.ln-row.fresh .ln-grade { animation: fresh 1.2s ease-out 1; }
@keyframes fresh { 0%, 40% { background: var(--act); color: var(--actink); } 100% { background: transparent; } }
.ln-grade { padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.ln-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; }
.ln-nav { display: inline-flex; gap: 6px; }
.ln-nav .btn { min-height: 26px; width: 30px; font-size: 16px; line-height: 1; }

.an-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.an-verdict { font-size: 15px; font-weight: 600; }
/* the network's move as a headline (Study's answer): bigger, and coloured like the solver's chart (the
   owner, 2026-11-11: "'call' is green, 'raise' is red, and 'Fold' is blue like the solver ... the headline
   being so small it took me awhile even to see there was a headline") */
.an-verdict.mv { font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; padding: 2px 0 4px; }
.an-verdict.mv-fold { color: var(--sv-fold); }
.an-verdict.mv-call { color: var(--sv-call); }
.an-verdict.mv-raise { color: var(--sv-raise-lo); }
.an-moves { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.an-rows { display: grid; gap: 6px; }
.an-row { display: grid; grid-template-columns: minmax(96px, 1.1fr) minmax(40px, 1fr) 38px 78px; gap: 8px; align-items: center; }
.an-row.pick .an-l { font-weight: 600; }
.an-l { white-space: nowrap; }
.an-l .mut { font-weight: 400; font-size: 11px; display: block; line-height: 1.2; }
.an-p { text-align: right; }
.an-tag { font-size: 11px; white-space: nowrap; }
.an-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.an-facts > div { display: flex; flex-direction: column; gap: 1px; }
.an-facts b { font-size: 15px; font-weight: 600; }
.an-note { font-size: 12px; }

.track { height: 8px; background: var(--track); border-radius: 2px; overflow: hidden; display: block; }
.track > span { display: block; height: 8px; background: var(--bar); }
.track > .k-fold { background: var(--fold-bar); }
.track > .k-call { background: var(--call-bar); }
.track > .k-raise { background: var(--raise-bar); }
.track > .c-best { background: var(--good); }
.track > .c-correct { background: color-mix(in srgb, var(--good) 55%, var(--track)); }
.track > .c-inaccuracy { background: var(--warn); }
.track > .c-wrong { background: color-mix(in srgb, var(--bad) 60%, var(--track)); }
.track > .c-blunder { background: var(--bad); }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px; gap: 8px; }
.kv b { display: block; font: 600 19px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.kv span { font-size: 11px; color: var(--mut); }
.bars { padding: 0 12px 12px; display: grid; grid-template-columns: 92px 1fr 30px; row-gap: 6px; column-gap: 8px; align-items: center; }
.bars .num { text-align: right; }
.hands { display: grid; grid-template-columns: 1fr auto auto; gap: 0 14px; padding: 4px 0 8px; }
.hands button { display: contents; cursor: pointer; }
.hands button > span { padding: 3px 0; }
.hands button > span:first-child { padding-left: 12px; text-align: left; }
.hands button > span:last-child { padding-right: 12px; text-align: right; }
.hands button:hover > span { background: var(--sur2); }
.hands button:disabled { cursor: default; }
.hands button:disabled > span { color: var(--mut2); background: none; }
.hands button { border: 0; background: none; padding: 0; }

/* ---- 6 The card face --------------------------------------------------------------------------- */
.cards { display: inline-flex; gap: calc(var(--w) * 0.13); vertical-align: top; }
.cards.many { gap: 0; }
.cards.many .cd + .cd { margin-left: calc(var(--w) * -0.22); }
.cd { position: relative; display: inline-block; flex: none; width: var(--w); height: calc(var(--w) * 1.38); border-radius: calc(var(--w) * 0.11); color: #fff; font-family: var(--cardfont); background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.14) 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.cd .tl { position: absolute; left: 10%; top: 6%; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.cd i { font-style: normal; font-weight: 700; font-size: calc(var(--w) * 0.32); }
.cd em { font-style: normal; font-size: calc(var(--w) * 0.34); margin-top: calc(var(--w) * 0.02); }
.cd b { position: absolute; right: 10%; bottom: 5%; font-weight: 800; font-size: calc(var(--w) * 0.7); line-height: 0.9; opacity: 0.92; }
.cd.s { background-color: #3a4252; }
.cd.h { background-color: #cf3b4c; }
.cd.d { background-color: #2e6fd8; }
.cd.c { background-color: #21945a; }
.cd.slot { background: none; box-shadow: none; border: 1px dashed var(--mut2); }
.cd.bk { background: var(--back); box-shadow: inset 0 0 0 1px var(--backline); }
/* places that can be picked (Study's hand entry, Play's seats): see table.js "PICKING" */
.cd.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
.cd.next:not(.sel) { outline: 1px dashed var(--mut); outline-offset: 1px; }
.tb.pick-hole .tb-hand .cd, .tb.pick-hole .tb-hero-cards .cd, .tb.pick-board .tb-board .cd,
.tb.pick-seat .tb-plate, .tb.pick-stack .tb-plate .stack, .tb.pick-dealer .tb-d, .tb.pick-empty .tb-seat.empty .tb-plate, .tb.pick-pot .tb-pot { cursor: pointer; }
.tb.pick-stack .tb-plate .stack:hover { text-decoration: underline dotted; }
.tb-seat.vacant { display: none; }
.tb-seat.empty .tb-plate { background: none; border: 1px dashed var(--line2); color: var(--mut2); justify-content: center; }
.tb.pick-empty .tb-seat.empty .tb-plate:hover { color: var(--ink); border-color: var(--mut); }
[data-pick]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* a hand folded earlier and shown afterwards, and your own cards once you fold */
.cards.gone, .tb-hero-cards.gone { filter: grayscale(1); opacity: 0.38; }
/* chips: flat discs in the page's own tones, stacked; more chips for more money */
.chips { display: inline-flex; align-items: flex-end; gap: 1px; vertical-align: middle; flex: none; }
.chips i { display: flex; flex-direction: column-reverse; }
.chips b { display: block; width: 15px; height: 7px; border-radius: 50%; background: var(--chip); border: 1px solid var(--chip-line); box-sizing: content-box; }
.chips b + b { margin-bottom: -4px; }
.chips b:nth-child(even) { background: var(--chip2); }
.chips.pile b { width: 18px; height: 8px; }

/* ---- 7 The table ------------------------------------------------------------------------------- */
.tb { position: absolute; inset: 0; overflow: hidden; --cw: 40px; --step: 15px; --pw: 180px; }
.tb[data-hole="2"] { --step: 28px; --pw: 148px; }
.tb[data-hole="3"] { --step: 24px; --pw: 168px; }
.tb[data-hole="4"] { --step: 19px; --pw: 176px; }
.tb[data-hole="6"] { --step: 13px; --pw: 186px; }
.tb[data-hole="7"] { --step: 11px; --pw: 186px; }
.tb-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); transform-origin: center; }
.tb-felt { position: absolute; border-radius: 9999px; background: var(--felt); border: 1px solid var(--feltline); }
.tb-felt::after { content: ""; position: absolute; inset: 12px; border-radius: 9999px; border: 1px solid var(--line); }
.tb-pot { position: absolute; transform: translateX(-50%); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.tb-pot b { font-size: 19px; font-weight: 600; }
.tb-board { position: absolute; transform: translateX(-50%); display: flex; align-items: center; }
.tb-bn { position: absolute; right: 100%; margin-right: 10px; color: var(--mut); }
.tb-street { position: absolute; transform: translateX(-50%); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); white-space: nowrap; display: flex; gap: 10px; align-items: center; }
.tb-tag { border: 1px solid var(--line2); border-radius: 3px; padding: 1px 6px; color: var(--ink); }
.tb-fx { position: absolute; inset: 0; pointer-events: none; }
.tb-fx .chips { position: absolute; }
/* a seat: the tag (position, stack), its cards on the tag and taller than it, its place in front */
.tb-seat { position: absolute; transform: translate(-50%, -50%); }
.tb-seat.hero { transform: translate(-50%, 0); }
.tb-plate { width: var(--pw); height: 46px; border: 1px solid var(--line2); border-radius: var(--rad); background: var(--sur); padding: 7px 10px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.tb-seat.hero .tb-plate { width: 136px; }
.tb-plate .pos { font: 600 11px/1 var(--mono); letter-spacing: 0.04em; white-space: nowrap; }
.tb-plate .stack { font-size: 14px; line-height: 1; white-space: nowrap; }
.tb-seat.act .tb-plate { background: var(--act); color: var(--actink); border-color: var(--actline); }
.tb-seat.folded .tb-plate { background: var(--surf); border-color: var(--line); color: var(--mut2); }
.tb-seat.out .tb-plate { background: var(--surf); border-style: dashed; border-color: var(--line); color: var(--mut2); }
.tb-seat.win .tb-plate { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.tb-hand { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); --w: var(--cw); gap: 0; }
.tb-hand .cd + .cd { margin-left: calc(var(--step) - var(--cw)); }
.tb-fold { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut2); }
.tb-d { position: absolute; left: -8px; top: -8px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 700 10px/18px var(--mono); text-align: center; }
.tb-seat.hero .tb-d { left: -26px; top: 50%; margin-top: -9px; }
/* in front of the tag, toward the middle: the last move, the chips, the amount; afterwards the result */
.tb-front { position: absolute; left: 50%; transform: translateX(-50%); height: 20px; display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; line-height: 1; }
.tb-front.f-down { top: calc(100% + 9px); }
.tb-front.f-up { bottom: calc(100% + 9px); }
.tb-front.mine { transform: translate(-50%, -50%); }
.tb-say { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }
.tb-say.a-call { color: var(--call-word); }
.tb-say.a-raise { color: var(--raise-word); }
.tb-front .res { font-weight: 600; }
.tb-hero-cards { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tb-hero-cards .cards { --w: 48px; }
.tb-board .cards { --w: 36px; }
.tb-hero-labels { position: absolute; text-align: right; display: flex; flex-direction: column; gap: 4px; }
.tb-made { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-made .lbl { margin-right: 8px; }
.tb-made.strong .tb-made-t { font-weight: 600; }
/* upright phones: the same table, smaller tags and cards */
.tb.tall { --cw: 27px; --step: 6px; --pw: 100px; }
.tb.tall[data-hole="2"] { --step: 17px; --pw: 96px; }
.tb.tall[data-hole="6"], .tb.tall[data-hole="7"] { --step: 5px; }
.tb.tall .tb-plate { height: 36px; padding: 5px 7px; }
.tb.tall .tb-seat.hero .tb-plate { width: 132px; }
.tb.tall .tb-plate .pos { font-size: 10px; }
.tb.tall .tb-plate .stack { font-size: 12px; }
.tb.tall .tb-hand { right: 5px; }
.tb.tall .tb-fold { right: 7px; font-size: 10px; }
.tb.tall .tb-front { height: 16px; font-size: 11px; gap: 4px; }
.tb.tall .tb-front.f-down { top: calc(100% + 7px); }
.tb.tall .tb-front.f-up { bottom: calc(100% + 7px); }
.tb.tall .tb-say { font-size: 10px; }
.tb.tall .chips b { width: 10px; height: 5px; }
.tb.tall .tb-board .cards { --w: 26px; }
.tb.tall .tb-hero-cards .cards { --w: 40px; }
.tb.tall .tb-hero-labels { text-align: center; flex-direction: row; justify-content: center; gap: 12px; font-size: 12px; }
.tb.tall .tb-pot b { font-size: 16px; }

/* ---- 8 My moves -------------------------------------------------------------------------------- */
.mv { border: 1px solid var(--line); border-radius: var(--rad); background: var(--sur); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.mv-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; min-height: 21px; }
.mv-title { font-size: 15px; white-space: nowrap; }
.mv-ctx { color: var(--mut); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mv-size { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.mv-size.none > *, .mv-size.off > *, .mv-size.gone > * { visibility: hidden; }
.mv-presets { flex: none; max-width: 60%; overflow-x: auto; }
.mv-amount { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); border-radius: var(--rad); padding: 0 8px; background: var(--bg); height: 32px; flex: none; }
.mv-amount input { width: 58px; border: 0; outline: 0; text-align: right; background: none; padding: 0; min-height: 0; height: 28px; }
.mv-amount:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.mv-slider { flex: 1; min-width: 40px; height: 20px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; --fill: 0%; }
.mv-slider::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--ink) var(--fill), var(--mut2) var(--fill)); }
.mv-slider::-moz-range-track { height: 2px; background: var(--mut2); }
.mv-slider::-moz-range-progress { height: 2px; background: var(--ink); }
.mv-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 10px; height: 16px; margin-top: -7px; background: var(--ink); border-radius: 3px; border: 0; }
.mv-slider::-moz-range-thumb { width: 10px; height: 16px; background: var(--ink); border-radius: 3px; border: 0; }
.mv-slider:disabled { opacity: 0.4; }
.mv-btns, .mv-strip { display: flex; gap: 10px; }
.mv-strip .btn.big.p { flex: 2; }
.mv.busy .mv-title::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--mut); vertical-align: middle; }

/* ---- 9 Dialogs, table setup, messages ---------------------------------------------------------- */
.dlg { border: 1px solid var(--line2); border-radius: 8px; background: var(--sur); color: var(--ink); padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg.wide { width: min(640px, calc(100vw - 24px)); }
.dlg::backdrop { background: var(--shade); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none; }
.dlg-head h2 { font-size: 16px; }
.dlg-x { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--mut); padding: 2px 6px; border-radius: var(--rad); }
.dlg-body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; color: var(--body); }
.dlg-body b, .dlg-body h3 { color: var(--ink); }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex: none; }
.su { display: flex; flex-direction: column; gap: 2px; }
.su-h { font: 600 11px/1.2 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mut); padding: 10px 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.su-h:first-child { padding-top: 0; }
.su-row { display: grid; grid-template-columns: 190px 1fr; gap: 4px 14px; align-items: center; padding: 5px 0; }
.su-l { color: var(--ink); }
.su-c { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.su-c > span { display: inline-flex; align-items: center; gap: 6px; }
.su-help { grid-column: 2; font-size: 12px; }
.su-seats { display: grid; gap: 6px; }
.su-seat { display: grid; grid-template-columns: 120px 84px auto 84px; gap: 8px; align-items: center; }
.su-err { color: var(--bad); font-weight: 600; padding-top: 6px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: baseline; }
.keys kbd { font: 500 12px/1 var(--mono); border: 1px solid var(--line2); border-radius: 4px; padding: 2px 6px; background: var(--bg); color: var(--ink); }
.bands { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; width: min(480px, calc(100vw - 24px)); }
.toast { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 1px solid var(--line2); border-radius: var(--rad); background: var(--sur); padding: 10px 12px; }
.toast.bad { border-color: var(--bad); }
.toast-x { border: 0; background: none; cursor: pointer; color: var(--mut); font-size: 16px; line-height: 1; }

/* ---- 10 Small screens -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .rail { width: 132px; }
  .side { width: 340px; }
}
@media (max-width: 1040px) {
  .main { height: auto; min-height: 100dvh; }
  .body { flex-direction: column; }
  .stage-table { flex: none; height: min(62vw, 70dvh); }
  .side { width: auto; border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .ln { max-height: 320px; }
}
@media (max-width: 760px) {
  body { flex-direction: column; }
  .rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; width: auto; flex-direction: row; align-items: stretch; justify-content: space-around; padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)); border-right: 0; border-top: 1px solid var(--line); gap: 0; }
  .rail .brand, .rail-gap, .rail-btn { display: none; }
  .rail a[data-place="help"], .rail a[data-admin], .rail a[data-local] { display: none; }
  .rail a, .rail .soon { padding: 10px 6px; font-size: 13px; text-align: center; flex: 1; }
  .main { padding-bottom: 56px; }
  .head { padding: 8px 12px; gap: 6px 8px; }
  .head .lbl { display: none; }
  .head .push { order: 1; }
  .head .chips { order: 2; flex: 1 1 calc(100% - 110px); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .head #setup-btn { order: 3; }
  .stage { padding: 6px 10px 12px; gap: 6px; }
  .stage-note:empty { display: none; }
  .stage-table { height: min(128vw, 56dvh); }
  .btn, .seg button { min-height: 40px; }
  .seg.sm button { min-height: 32px; }
  .mv { padding: 10px 12px 12px; }
  .key { display: none; }
  .btn.big { font-size: 14px; padding: 6px 8px; min-width: 0; }
  .mv-size .mv-slider, .mv-size .btn.sq { display: none; }
  .mv-presets { max-width: none; flex: 1 1 0; min-width: 0; scrollbar-width: none; }
  .mv-amount { height: 40px; }
  .su-row { grid-template-columns: 1fr; }
  .su-help { grid-column: 1; }
  .toasts { bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
