/* The table screen: a cypherpunk terminal (CLAUDE.md, "Goal, look, stack"), from design/phone.html and
   design/desktop.html. Dark background, monospace, text cards with colored suits, no avatars,
   no animation. Phone first; from 1024px wide, the desktop layout with the side panel.
   On a phone the screen never scrolls: the header at the top, the board, the player's own hand,
   the buttons, and the links in one block at the bottom, and the seats in between, which scroll
   on their own when a small phone cannot show them all (design/phone-fit/). */

:root {
  --bg: #0a0c0b;
  --text: #d9e1dc;
  --bright: #eef2ef;
  --dim: #8b988f;
  --faint: #5d6962;
  --line: #1f2923;
  --edge: #3a4a40;
  --ghost: #26312b;
  --accent: #7ee2a8;
  --accent-bg: #111a15;
  --accent-ink: #06140c;
  --win-bg: #153524;
  --red-suit: #ff8a66;
  --warn: #ff5d5d;
  --warn-bg: #2a1212;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  /* The player's own cards and FOLD/CALL/RAISE (a tall phone's are bigger): the room the bottom block keeps on a phone comes from them. */
  --hole-h: 68px;
  --button-h: 48px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 13px; }
body { min-height: 100vh; min-height: 100dvh; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
a:hover { color: #b6f3cf; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--edge); border-radius: 0; touch-action: manipulation; }
button:disabled { cursor: default; color: var(--faint); border-color: var(--ghost); }
input, select { background: var(--accent-bg); border: 1px solid var(--edge); border-radius: 0; color: var(--bright); padding: 0 8px; height: 36px; }
input:focus, select:focus, button:focus-visible { outline: 1px solid var(--accent); outline-offset: 0; }
.hidden { display: none !important; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.accent { color: var(--accent); }
.bright { color: var(--bright); }
.red { color: var(--red-suit); }
.linkish { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; height: auto; font-size: 12px; }
.linkish.dim { color: var(--dim); }

/* ---- Front pages (new table, join) ---- */

.front { max-width: 440px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 18px; }
.front h1 { margin: 0; font-size: 16px; color: var(--accent); font-weight: 700; word-break: break-all; }
.front p { margin: 0; line-height: 1.5; }
.front .panel { border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.front .label { font-size: 11px; color: var(--dim); text-transform: uppercase; }
.front .field { display: flex; flex-direction: column; gap: 6px; }
.front .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.front .row input { width: 100px; }
.front .row input.wide { flex: 1 1 160px; width: auto; min-width: 0; }
.front input.name { width: 100%; font-size: 16px; height: 44px; }
.front .big { height: 52px; font-size: 14px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.front .big:disabled { background: transparent; color: var(--faint); }
.front .small { font-size: 12px; color: var(--dim); line-height: 1.5; }
.front .error { color: var(--warn); font-size: 12px; }
/* (Pass A3) A name box's message lines take no room until they say something (the smallest iPhones' room goes to the line under it). */
.front .panel > .error:empty, .front .panel > .said:empty { display: none; }
/* The Daily Deal's own words on its landing (a run on another device, a busy server, a day turned): plain, never red. */
.front .said { color: var(--text); font-size: 12px; }
/* (Pass A4, the owner's brief of 2026-10-25: a quieter name screen) Under the name box, only "No account, no password." (dim);
   once saved "✓ Your scorecard and edge are saved with Face ID"; "New phone? Get them back" only where the keyboard cannot offer
   the saved passkeys; and "your nostr id: npub1…" (smaller, dim). Each a line of its own, whole pixels high; what a tap says
   under them; and the plain choice a bring-back may ask first (pass A1): its two buttons apart, a finger's height. */
.front .key { display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 17px; }
.front .key .first { color: var(--dim); }
.front .key .saved-line { color: var(--text); }
.front .key .back-line { display: flex; }
.front .key .back-line .linkish { line-height: 17px; text-align: left; }
.front .key .back-line .linkish:disabled { color: var(--faint); text-decoration: none; }
.front .key .npub { color: var(--dim); font-size: 11px; line-height: 16px; }
/* (Pass A5, the owner's brief of 2026-10-28: "invisible but findable") The nostr id line is the way in to linking the player's own
   Nostr id: the same line, a quiet tap (a dotted underline), on its one line as before; where it is no tap (a browser that keeps
   nothing) or waits for the player's Nostr app, plain dim words. */
.front .key .npub-line { display: flex; }
.front .key .npub.linkish { text-align: left; text-decoration-style: dotted; text-underline-offset: 2px; }
.front .key .npub.linkish:disabled { color: var(--dim); text-decoration: none; }
/* (Pass A5's cut, the owner's call of 2026-10-28) A browser signed in with Nostr before: its first line, "Signed in with Nostr as
   npub….", a quiet tap the same way (the way back to this browser's own scorecard). */
.front .key .first .out { text-align: left; line-height: 17px; text-decoration-style: dotted; text-underline-offset: 2px; }
.front .key .away, .front .key .said:empty { display: none; }
.front .key .choice { display: flex; flex-direction: column; gap: 8px; }
.front .key .choice .small { line-height: 17px; }
.front .key .choice .row { gap: 20px; }
.front .key .choice button:not(.linkish) { height: 40px; padding: 0 18px; }
.front .key .choice .linkish { min-height: 32px; }
/* (Pass A5) The Nostr app's link asked in the lines' place: its status and approval lines take no room until they say something; the
   input and its tap as tall as the choice's buttons; "not now" on the left, a finger's height. */
.front .key .choice .small:empty { display: none; }
.front .key .choice .row input.wide { height: 40px; }
.front .key .choice > .linkish { align-self: flex-start; }
.front .key .choice a.linkish { display: inline-flex; align-items: center; }
/* (The reviewer of 6223f6d, rider 1) While the choice is open, what is under it hides (the Daily Deal's last line; the Nostr
   box, until pass A5's cut), so it fits the smallest iPhones with nothing above it moving; and a short screen (an iPhone SE, 548 high in Safari)
   has tighter room around the name box, as the page loads and after. */
.front.choosing > .key ~ * { display: none; }
@media (max-height: 600px) {
  .front { padding-top: 16px; padding-bottom: 12px; gap: 12px; }
  .front .panel { padding: 12px; gap: 10px; }
  .front .key { gap: 4px; }
}
.front .symbols { letter-spacing: 1px; }
.front .legend { color: var(--dim); font-size: 12px; line-height: 1.5; }
/* The day's number at a run's end, big (pass D6); (pass L1) which way it went beside it. */
.front .number { font-size: 34px; font-weight: 700; color: var(--accent); line-height: 1; }
.front .number .beside { margin-left: 12px; font-size: 14px; font-weight: 400; color: var(--text); }
/* (Pass L2, the owner's brief of 2026-10-24: the "Today's run" screen wrapped on narrow iPhones) Each of its lines on
   one line, in smaller text when long (--len: its length; its room: the panel's); the day's number keeps two fifths of
   the width at most, the words beside it the rest. */
.front .panel.run-end { container-type: inline-size; }
.front .panel.run-end .fit { white-space: nowrap; font-size: min(13px, 100cqw / (var(--len, 1) * 0.63)); }
.front .panel.run-end .legend.fit { font-size: min(12px, 100cqw / (var(--len, 1) * 0.63)); }
.front .panel.run-end .number { display: flex; align-items: baseline; white-space: nowrap; }
.front .panel.run-end .number .num.fit { font-size: min(34px, 45cqw / (var(--len, 1) * 0.63)); }
.front .panel.run-end .number .beside.fit { font-size: min(14px, (55cqw - 12px) / (var(--len, 1) * 0.63)); }

/* ---- The table screen ---- */

.game { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 520px; margin: 0 auto; }
.main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 0; }
.top { flex: none; padding: 8px 16px 6px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.top .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { font-weight: 700; font-size: 14px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* The fairness badge; on a phone, tapping it opens the fairness list. */
.badge { font-size: 11px; padding: 2px 8px; border: 1px solid var(--accent); color: var(--accent); white-space: nowrap; height: auto; flex: none; }
.badge::after { content: " ›"; }
.badge.bad { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.badge.dim { color: var(--dim); border-color: var(--edge); }
.sub { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { color: var(--warn); font-size: 12px; }
/* Nothing wrong (a Daily Deal run signing in again after a pause: pass D4): the table's own colors; red is for what only a cheating server could cause. */
.status.calm { color: var(--dim); }
.top-actions { display: none; gap: 8px; }

/* Seats as rows (phone), scrolling on their own if the phone is too small to show them all. The
   rows take the room to spare, up to 44 high each, every row an equal share (never less than a line),
   so no empty band sits above the board, and a hand shown at the showdown keeps its row's size: no
   row moves (server pass C). A shown hand takes a second line where the rows are at least
   --shown-h high (render.ts measures it); on a phone too small for that, one line. */
.seat-rows { flex: 1 1 auto; min-height: 96px; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 4px; display: flex; flex-direction: column; gap: 1px; --shown-h: 32px; }
.seat-rows > * { flex: none; }
.seat-rows > .seat-row:not(.head) { flex: 1 1 0; max-height: 44px; min-height: 24px; }
.seat-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 76px 92px; gap: 8px; height: 24px; align-items: center; }
.seat-row.head { height: auto; color: var(--dim); font-size: 10px; padding: 4px 0 2px; position: sticky; top: 0; z-index: 1; background: var(--bg); }
.seat-row > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-row .num { color: var(--dim); }
.seat-row .stack, .seat-row .act { text-align: right; }
.seat-row.out { color: var(--faint); }
.seat-row.out .num { color: var(--faint); }
.seat-row.empty { color: var(--ghost); }
.seat-row.self { background: var(--accent-bg); outline: 1px solid var(--accent); }
.seat-row.self .num, .seat-row.self .name { color: var(--accent); font-weight: 700; }
/* A seat's name and its tags ("you", D, WIN, "remove"): a long name is cut short, never a tag. */
.seat-row .name, .seat-box .name { display: flex; align-items: baseline; min-width: 0; }
.seat-row .name > *, .seat-box .name > * { flex: none; }
.seat-row .name > .nm, .seat-box .name > .nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* This player's own seat: the name it typed, and a small "you". */
.you-tag { color: var(--accent); border: 1px solid var(--accent); padding: 0 3px; font-size: 10px; font-weight: 400; margin-left: 6px; line-height: 1.2; }
.dimmed .you-tag { color: var(--dim); border-color: var(--edge); }
/* (Pass K1) The ♛ right after the name, the week its player wears it: in the accent, a little larger than the name (the
   symbol fonts draw it small), on a line no taller than the name's. */
.crown-tag { color: var(--accent); font-weight: 400; font-size: 15px; margin-left: 4px; line-height: 1; }
.dimmed .crown-tag { color: var(--dim); }
.seat-row.turn .act { color: var(--accent); }
.seat-row .linkish, .seat-box .linkish { font-size: inherit; }
.rm { margin-left: 6px; } /* "remove", after a bot's name or "bot" */
/* Long words get smaller text so they fit their column, never cut off: render.ts sets --len, their
   length; a monospace character is about 0.6 of the text's size wide. */
.seat-row .stack { --room: 76px; }
.seat-row .act { --room: 92px; }
.fit { font-size: min(1em, var(--room) / (var(--len, 1) * 0.61)); }
.dealer { color: var(--bg); background: var(--text); padding: 0 4px; font-size: 10px; margin-left: 4px; font-weight: 400; }

/* The end of a hand (design/end-of-hand-*.html): a shown hand's cards and what it makes, each
   winner highlighted with "WIN" and what it won, this player's own row dimmed if it did not win.
   A shown hand keeps its row's size (above): its cards in the action column; on a second line, what
   it makes, across the name and stack columns (the longest, "board: three of a kind", fits there at
   320 wide), and a winner's gain under its cards. Rows too short for two lines keep one (`.tight`). */
.seat-row.shown:not(.tight) { grid-template-rows: 16px 14px; row-gap: 1px; align-content: center; }
.seat-row.shown:not(.tight) > :nth-child(-n + 4) { grid-row: 1; }
.seat-row .hand-name { grid-row: 2; grid-column: 2 / 4; font-size: 11px; line-height: 14px; color: var(--dim); font-weight: 400; }
.seat-row .gain { grid-row: 2; grid-column: 4; text-align: right; font-size: 11px; line-height: 14px; }
.hand-cards { font-weight: 700; }
.plus { color: var(--accent); font-weight: 700; }
.win-tag { color: var(--accent-ink); background: var(--accent); padding: 0 4px; font-size: 10px; font-weight: 700; margin-left: 4px; }
.seat-row.self.dimmed { outline-color: var(--edge); }
.seat-row.self.dimmed .num, .seat-row.self.dimmed .name, .seat-row.self.dimmed .stack { color: var(--dim); }
.seat-row.self.dimmed .act { color: var(--faint); }
.seat-row.win { background: var(--win-bg); outline: 1px solid var(--accent); }
.seat-row.win .num { color: var(--accent); }
.seat-row.win .name, .seat-row.win .stack { color: var(--bright); }
.seat-row.win .name { font-weight: 700; }
.seat-row.win .hand-name { color: var(--accent); }
.result-pause .seat-row:not(.win) .dealer, .result-pause .seat-box:not(.win) .dealer { background: var(--dim); }

/* Seats as boxes around the board (desktop). */
.felt { display: none; }
/* A box too narrow for two things side by side (eight seats on an iPad on its side) puts the second on a line of its own, right-aligned, and grows: nothing is cut off or sticks out. */
.seat-box { width: 220px; min-height: 86px; border: 1px solid var(--edge); padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between; }
.seat-box .line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; align-items: center; }
.seat-box .line > :last-child:not(:first-child) { margin-left: auto; }
.seat-box .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-box .who { color: var(--dim); font-size: 11px; white-space: nowrap; }
.seat-box .act { color: var(--bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-box.out { border-color: var(--line); color: var(--faint); }
.seat-box.out .act, .seat-box.out .who { color: var(--faint); }
.seat-box.empty { border: 1px dashed var(--ghost); color: var(--ghost); }
.seat-box.self { border: 2px solid var(--accent); background: var(--accent-bg); }
.seat-box.self .name { color: var(--accent); }
.seat-box.turn .act { color: var(--accent); }
.seat-box .hand-name { font-size: 11px; color: var(--dim); }
.seat-box.self.dimmed { border-color: var(--edge); }
.seat-box.self.dimmed .name, .seat-box.self.dimmed .act { color: var(--dim); }
.seat-box.win { border-color: var(--accent); background: var(--win-bg); }
.seat-box.win .name { color: var(--bright); }
.seat-box.win .hand-name { color: var(--accent); }

/* The board. */
.board-area { padding: 8px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.board-head { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; }
.pot b { color: var(--text); font-size: 13px; }
.cards { display: flex; gap: 8px; }
.card { width: 52px; height: 60px; border: 1px solid var(--edge); display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 18px; font-weight: 700; color: var(--bright); line-height: 1.1; }
.card .suit { font-size: 16px; }
.card.red { color: var(--red-suit); }
.card.best { border: 2px solid var(--accent); }
.card.faded { border-color: var(--ghost); color: var(--faint); }
.card.slot { border: 1px dashed var(--ghost); color: var(--edge); font-weight: 400; font-size: 13px; }
.card.hole { width: 52px; height: var(--hole-h); border: 2px solid var(--accent); font-size: 20px; }
.card.hole .suit { font-size: 18px; }
.card.hole.slot { border: 1px dashed var(--ghost); }

/* The hand log (the side panel; on a phone, "log" opens it over the screen). */
.log-lines .you, .side .log-lines .summary { color: var(--accent); }

/* On a phone, the board, the player's own hand, the actions, and the links: one block at the
   bottom of the screen, never covered; side by side (hand and actions) on a wide screen. */
.bottom { flex: none; background: var(--bg); display: flex; flex-direction: column; }
/* On a phone the player's own hand and the actions keep, at every moment of a hand, the room they
   take on the player's turn (two cards; the turn line, the bet sizes, and the buttons): the seats
   get the same room whatever the moment, so their rows never change size or move, a showdown
   included (server pass C: it gave that room back to the seats, and the board slid down). */
.play { display: flex; flex-direction: column; min-height: calc(var(--hole-h) + var(--button-h) + 104px); }
.play > .actions { flex: 1 0 auto; }
/* Someone watching (no seat) has no hand or turn: that room goes to the seats. Only the room of the
   result's three lines is kept, empty during the hand (on a phone, below; render.ts), so nothing moves
   when they come. */
.game.watching .play { min-height: 0; }
.outcome.kept { display: none; }

/* The player's own hand. */
.me { padding: 8px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.me .words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me .label { color: var(--dim); font-size: 11px; line-height: 13px; }
/* (Pass B1, the owner's brief of 2026-11-05: "vs bots") At a table of bots the player's own running total takes the place of
   the small label: dim, on one line, its height the label's own (13 pixels whatever the font), so nothing moves whether it
   shows or not; smaller text only where it would not fit beside the two cards (their room: the width less the margins, the
   two cards, and the gaps; a monospace character 0.64 of its size, as WebKit draws it). */
.me .label.vs-bots { white-space: nowrap; font-size: min(11px, (100vw - 158px) / (var(--len, 1) * 0.64)); }
.me .name { font-weight: 500; }
.me .detail { color: var(--dim); font-size: 12px; }
.me.folded .card.hole:not(.slot) { border: 1px solid var(--edge); color: var(--dim); }
/* After a fold: "folded" by the dimmed cards, and under them, across the whole width, what they
   would have made ("would have had: full house"), on one line even on a 320-wide phone. Before
   the flop the line is empty but keeps its place, so nothing moves when the flop comes. */
.me.folded { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 4px; }
.me.folded .words { display: contents; }
.me.folded .cards { grid-row: 1 / 3; }
.me.folded .label { align-self: end; }
.me.folded .name { align-self: start; color: var(--dim); }
.me.folded .detail { grid-column: 1 / -1; color: var(--dim); font-size: min(11px, (100vw - 32px) / (var(--len, 1) * 0.61)); white-space: nowrap; } /* (pass D7: "… (all on the board)" is longer; smaller only where it would not fit, a 320-wide screen) */
.me.folded .detail:empty::before { content: "\a0"; }

/* The action bar. */
.actions { padding: 8px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
/* The bet sizes and the amount box. The box's text is 16 pixels everywhere (an iPhone zooms in on a
   box with smaller text when it is tapped), and the box is wide enough for a whole stack of 7 digits
   ("9,999,999") from 375 wide; a longer amount scrolls inside it. Tapped, it starts empty, with the
   amount it held showing faintly until something is typed (render.ts). */
.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) var(--box-w, 104px); gap: 6px; }
.presets button { height: 36px; font-size: 12px; padding: 0 2px; }
.presets button.on { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.presets input { height: 36px; width: 100%; text-align: right; font-size: 16px; padding: 0 6px; min-width: 0; }
.presets input::placeholder { color: var(--faint); }
.buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.buttons button { height: var(--button-h); font-size: 14px; font-weight: 700; padding: 1px 6px; container-type: inline-size; }
/* A long amount on BET, RAISE, or CALL gets smaller text so it shows in full (its room: the button's width inside). */
.buttons .fit { --room: 100cqw; }
/* CALL … ALL-IN: "CALL" on the first line, the amount and ALL-IN together on the second, with
   smaller text only when they do not fit it at full size (--len: their length). */
.buttons .fit.all-in { display: block; white-space: nowrap; }
.buttons .call { color: var(--bright); border-color: var(--text); }
.buttons .raise { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* Folding when checking is free: "FOLD?" and, under it, inside the button at every width, why it asks
   again; in the table's own colors (red is for what only a cheating server could cause). */
.buttons .fold.armed { color: var(--bright); border-color: var(--bright); line-height: 1.15; }
.buttons .fold .sure { display: block; font-size: min(11px, 100cqw / 8); font-weight: 400; color: var(--accent); white-space: nowrap; }
.buttons button:disabled, .buttons .raise:disabled { background: transparent; color: var(--faint); border-color: var(--ghost); }
.waiting { color: var(--dim); font-size: 12px; min-height: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.waiting button { height: 36px; padding: 0 14px; font-size: 12px; }
.waiting button.go { color: var(--accent); border-color: var(--accent); }
/* "share" at a Daily Deal run's end (pass D5): a little lower than the other buttons there, so the result's three lines and it fit the room the turn's buttons keep (nothing moves); tapped over 44 high like them. */
.waiting button.share { height: 30px; }
/* (Pass D7, the playtests) A run's end line says what the mirror shows from when too: beside
   "share", on two lines at most (28 high in its 30), in smaller text when long (two lines of a
   monospace character 0.6 of the text's size, with a little to spare for where the words wrap), so
   the row is no taller than "share" and nothing moves. */
.game.daily .waiting { container-type: inline-size; }
.waiting .end-line { flex: 1 1 0; min-width: 0; line-height: 14px; font-size: min(11px, (100cqw - 82px) * 2 * 0.9 / (var(--len, 1) * 0.6)); }
.waiting .turn-now { color: var(--accent); font-weight: 700; font-size: 14px; }
.outcome { display: flex; flex-direction: column; gap: 4px; }
.outcome .title { font-size: 15px; font-weight: 700; color: var(--text); }
.outcome .headline { font-size: 18px; font-weight: 700; color: var(--accent); }
.outcome .detail { font-size: 13px; color: var(--text); }
.outcome .line { font-size: 12px; color: var(--dim); }

/* Tap areas (CLAUDE.md, "The phone fit"): a button or box under 44 high is tapped over 44, by an
   invisible strip above and below it that reaches no other control; how it looks and the layout
   stay the same. The badge's strip runs from the top of the screen down over the line under it. */
.badge, .presets button, .presets .amount, .waiting button, .side button { position: relative; }
.badge::before, .presets button::before, .presets .amount::before, .waiting button::before, .side button::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 22px); bottom: calc(50% - 22px); }
.badge::before { top: -9px; bottom: auto; height: 44px; }
.presets .amount { display: block; min-width: 0; }
.presets .amount input { position: relative; } /* above its label's strip: a tap on the box itself places the cursor */

/* The links under the actions (phone): one line, at the bottom of the screen. */
.links { display: flex; justify-content: space-between; gap: 8px; padding: 0 16px 4px; padding-bottom: max(4px, env(safe-area-inset-bottom)); font-size: 12px; white-space: nowrap; }
.links button { background: none; border: none; padding: 6px 0; color: var(--dim); height: auto; text-decoration: underline; }
.links button.armed { color: var(--bright); } /* "leave?": a second tap leaves */
/* A Daily Deal run (pass D3): no invite link, check data, or copied results; the links row holds log,
   results, and (pass D4) pause, which keeps its place when it is not offered, so the two beside it never move. */
.game.daily .friend-only { display: none; }
.game.daily .links { justify-content: center; gap: 40px; }
.game:not(.daily) .daily-only { display: none; }
.daily-only.unseen { visibility: hidden; }
/* "pause" has the room of its longest words ("cancel pause"), so "log" and "results" stay put when it changes. */
.links .daily-only { min-width: 21ch; text-align: left; } /* (its longest words, "pause after this hand" from pass D7: the links beside it never move as its words change) */
.links .daily-only:disabled { color: var(--faint); }
/* (Pass L1, the owner's brief of 2026-10-22) Under a Daily Deal run's links, once the run is over: when
   the next deal opens and from when the mirror shows all of it, one short line ("new deal 5 am CT ·
   mirror 5:15 am CT"), in smaller text when long (a zone with no short name). Its room is kept, empty,
   at every moment of the run, so nothing moves when it comes: the seat rows give it up. It takes the
   bottom margin the links had. Not at a friends' table. Beside "share" instead: on a wide screen (no
   links row), and on a phone 600 high or less (an iPhone SE, 548 in Safari: its six seats already
   scroll a little, and with less room its own row would scroll into view at its turn, moving them). */
.end-foot { display: none; }
@media (max-width: 1023px) and (min-height: 601px) {
  .game.daily .links { padding-bottom: 0; }
  .game.daily .end-foot { display: block; padding: 0 16px; padding-bottom: max(4px, env(safe-area-inset-bottom)); color: var(--dim); text-align: center; white-space: nowrap; line-height: 13px; font-size: min(11px, (100vw - 32px) / (var(--len, 1) * 0.62)); }
  .game.daily .end-foot:empty::before { content: "\a0"; }
  .game.daily .waiting .end-line { display: none; }
}
/* (Pass A4, the owner's brief of 2026-10-25: "one tap at the moment of pride") The one quiet line, a link in the accent: on one
   line, or, long (how to turn a passkey app on), on two at most in smaller text (--len: its length). "Keep this scorecard: Face
   ID" beside "share" at a run's end on a phone over 600 high, the row no taller than "share" (nothing moves). On a phone 600 high
   or less (an iPhone SE, 548 in Safari: "share" has the next deal's line beside it, and the six seats already scroll) it is at
   the top of "results" instead, in the row of "close" (taking no room: the scorecard still fits with nothing to scroll; never
   under 8 pixels there, 320 wide); on a wide screen, at the top of the results beside the table. "Keep tonight's results: Face ID" under
   "share" in tonight's results in the table's place (a list with room: it wraps). Each tapped over 44 high, reaching no other
   control. (A monospace character is 0.6 of its size wide; 0.8 of the room, for where the words wrap.) */
.keep { text-align: left; }
.keep:disabled { color: var(--faint); text-decoration: none; }
.waiting .keep-end, .side .keep-top { display: none; }
@media (max-width: 1023px) and (min-height: 601px) {
  .game.daily .waiting .keep-end { display: block; flex: 1 1 0; min-width: 0; height: 30px; padding: 0; line-height: 14px; font-size: min(12px, (100cqw - 82px) * 2 * 0.8 / (var(--len, 1) * 0.6)); }
}
@media (max-width: 1023px) and (max-height: 600px) {
  .game.panel-open .side-scroll { position: relative; }
  .game.daily.panel-open.show-results .side .keep-top { display: block; position: absolute; top: 16px; left: 98px; right: 20px; height: 36px; line-height: 17px; text-align: right; font-size: clamp(8px, (100vw - 118px) * 2 * 0.8 / (var(--len, 1) * 0.6), 12px); }
}
@media (min-width: 1024px) {
  .game.daily .side .keep-top { display: block; align-self: flex-start; line-height: 17px; }
}
.side .keep-night { align-self: flex-start; margin-top: 10px; line-height: 17px; } /* (its tap strip clear of "share"'s: 18 between them) */
/* What a run's symbols mean, above its hands (a whole number of pixels high: the rows under it stay sharp). */
.side .note.legend { line-height: 18px; white-space: nowrap; }
/* A Daily Deal hand's end carries the run's score ("you win 1,050 · score +5,250"): on its one line at
   every width, a long one in smaller text (its room: the bottom block's width; --len: its length; a
   bold character is up to 0.62 of the text's size wide on an iPhone, a little wider than in Chrome). */
.game.daily .outcome { container-type: inline-size; }
.game.daily .outcome .headline.fit { font-size: min(18px, 100cqw / (var(--len, 1) * 0.63)); white-space: nowrap; }
.game.daily .outcome .detail.fit { font-size: min(13px, 100cqw / (var(--len, 1) * 0.63)); white-space: nowrap; }
/* A run's end (pass D6): the day's number, big ("+14"), and beside it, on the same line, (pass L1)
   which way it went ("beat par", "beat par 3 days in a row"; it was the run's symbols). Under it the
   run's 20 symbols on their own line, then the place and the edge in one short line ("top 12% · edge
   +9"; its room kept when empty). With "share" they take no more room than a hand's end does (the
   board and the seats stay where they are). A long number ("-12,000") gets smaller text: it has two
   fifths of the width, the words beside it the rest (smaller too when long). */
.game.daily .outcome .headline.number { display: flex; align-items: baseline; gap: 14px; line-height: 36px; white-space: nowrap; }
.game.daily .outcome .headline.number .num.fit { font-size: min(30px, 40cqw / (var(--len, 1) * 0.63)); }
.game.daily .outcome .headline.number .beside { font-weight: 400; color: var(--text); line-height: 1; }
.game.daily .outcome .headline.number .beside.fit { font-size: min(13px, (60cqw - 14px) / (var(--len, 1) * 0.63)); }
.game.daily .outcome .headline.number .num .unit { font-size: 0.5em; line-height: 1; } /* (pass D7: "+14 BB", its unit smaller; pass L1: its own line no taller than the number's) */
.game.daily .outcome .detail.marks { font-size: 15px; line-height: 17px; white-space: nowrap; letter-spacing: 1px; }
.game.daily .outcome .detail.standing { line-height: 16px; }
.game.daily .outcome .detail.standing:empty::before { content: "\a0"; }
/* (Pass D8) The room the last hand's "would have had" line kept under the player's cards (over by
   then) goes to the run's end, so the bottom block keeps the room the turn's buttons keep, and nothing moves. */
.game.daily.run-end .me.folded .detail { display: none; }
.game.daily.run-end .outcome { gap: 3px; }
/* The symbols counted ("▲ beat par 7 · ▼ missed 9 · ■ matched 4"): on its one line at every width (its room: the list's). */
.side .session-rows { container-type: inline-size; }
.side .note.legend.fit { font-size: min(12px, 100cqw / (var(--len, 1) * 0.63)); }
/* (The lines above a run's hands: a whole number of pixels high each, like the legend, so the rows under them stay sharp.) */
.side .session-rows .note { line-height: 18px; }
/* (Pass L1, the owner's brief of 2026-10-22) The top of a finished run's results, as a golf scorecard:
   each label on the left, its number on the right, brighter and a little bigger; the lines under it
   dim, each on one line (smaller text when long); the chips under the score on the right, under its
   number. A whole number of pixels high each, so the rows under them stay sharp. */
.side .session-rows .card-row { align-items: baseline; line-height: 22px; }
.side .session-rows .card-row > :first-child { color: var(--dim); }
.side .session-rows .card-row .card-value { color: var(--bright); font-size: 16px; font-weight: 700; }
.side .session-rows .card-row .card-value.soon { color: var(--dim); font-size: 12px; font-weight: 400; } /* (no edge yet: when it shows) */
.side .session-rows .card-row + .card-under { margin-top: -4px; }
.side .session-rows .card-under { text-align: right; } /* (pass L2: how the day was scored, under the chips, on the right too) */
.side .session-rows .card-under.fit, .side .session-rows .card-line.fit { white-space: nowrap; font-size: min(12px, 100cqw / (var(--len, 1) * 0.63)); }
/* (Pass L2, the owner's brief of 2026-10-24) SCORE and EDGE in the style of the table's own labels (YOUR
   HAND, BOARD, POT: 11 pixels, dim), each number bold on the right; a thin rule between the score, the
   edge, and the hands; the hands under HAND and BB VS PAR, in blocks of 5, each ▲ in the accent. Whole
   pixels high, so the rows stay sharp, and the card fits the SE's list with nothing to scroll. */
.side .session-rows .card-row .card-label { font-size: 11px; color: var(--dim); }
.side .session-rows .card-part + .card-part { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
.side .session-rows .card-head { font-size: 11px; color: var(--dim); line-height: 18px; }
.side .session-rows .hand-block + .hand-block { margin-top: 5px; }
.side .session-rows .hand-row { line-height: 15px; }
/* (On a phone 600 high or less, an iPhone SE, 548 in Safari: the card a little tighter, so its 20 hands fit with nothing to scroll.) */
@media (max-width: 1023px) and (max-height: 600px) {
  .game.panel-open .side .session-section { padding-top: 14px; }
  .side .session-rows .card-part + .card-part { margin-top: 4px; padding-top: 3px; }
  .side .session-rows .hand-block + .hand-block { margin-top: 4px; }
  .side .session-rows .hand-row { line-height: 13px; }
}
.up { color: var(--accent); }
/* The mirror (pass D6): each hand in a few lines, the first a little brighter; a list like the log's. */
.side .mirror-rows { display: flex; flex-direction: column; gap: 14px; }
.side .mirror-hand { display: flex; flex-direction: column; gap: 3px; }
.side .mirror-hand .first { color: var(--text); }
/* (The mirror pass, the owner's report of 2026-11-06) Yesterday's mirror on today's page: at the run's end its link under
   today's list, then its list; on the landing (and its end screen) its link beside the page's name, in the name's own line
   (nothing moves), its list over the page as a list opens over the table, "close" at the top. */
.side .yesterday-part .yesterday { align-self: flex-start; line-height: 17px; }
.front .title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; container-type: inline-size; }
/* (Pass T3, the mirror pass's rider R1) The name keeps its one line beside the link at every number to come: from ryvl daily
   #100 (2027-01-22) it would not fit whole at 320 wide. Its words (`fit`: --len characters) are drawn smaller only where they
   would not fit, and only as much as they need: the room is the row (100cqw) less the gap and the link, whose 18 characters at
   12px are 13.5 of the name's own (`ch`: the h1's font, the same letters at 16px), each character at most 0.63 of the text's
   size. The h1 keeps its 16px line, and the words' own line is never taller than their size (line-height 1: WebKit rounds a
   smaller font's height up, half a pixel taller at #100), so the line keeps its height and baseline: nothing beside it or
   under it moves. */
.front .title-row h1 .fit { white-space: nowrap; line-height: 1; font-size: min(1em, (100cqw - 12px - 13.5ch) / (var(--len, 1) * 0.63)); }
.front .title-row .yesterday { flex: none; position: relative; line-height: 12px; } /* (shorter than the name's line, under its baseline too: the line holds its height) */
.front .title-row .yesterday::before { content: ""; position: absolute; left: -8px; right: -8px; top: calc(50% - 22px); bottom: calc(50% - 22px); }
.side.yesterday-mirror { display: flex; flex-direction: column; position: fixed; inset: 0; background: var(--bg); z-index: 10; border: none; }
.side.yesterday-mirror .side-scroll { width: 100%; max-width: 440px; margin: 0 auto; }
.side.yesterday-mirror .close { display: block; flex: none; margin: 16px 20px 0; height: 36px; align-self: flex-start; padding: 0 14px; font-size: 12px; }
/* (Pass V1, match play: the owner's brief of 2026-11-09, his "Go, as shown") The MATCH part of a mirror's list, in the results
   card's own look (its label, its bold number, its thin rules, its blocks of 5). Each hand a row of its own to tap: the hand,
   the player's number, the friend's, and who won it (won in the accent, halved dim), the open one a little brighter, its lines
   under it. A row's tap is its own line: the side's taller tap strips (below) would reach the rows around it. "ask a friend"
   in the accent, as "share" is. On the landing, the ask from a match link sits in the place of its first lines: both in one
   grid cell, so the cell is as tall as the taller (the first lines: the ask is shorter at every width), and nothing under it
   moves when it comes or goes. */
.side .yesterday-part .match-part { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
/* (A long name: the result drawn smaller, only as much as it needs, beside RESULT, about 52 pixels with the gap.) */
.side .match-part .card-row .card-value.fit { white-space: nowrap; font-size: min(16px, (100cqw - 52px) / (var(--len, 1) * 0.63)); }
.side .match-part .match-ask-friend { align-self: flex-start; padding: 0 18px; color: var(--accent); border-color: var(--accent); }
.side .match-part .match-head,
.side .match-part .match-row { display: grid; grid-template-columns: minmax(0, 1fr) 5ch 7ch 8ch; column-gap: 1ch; }
.side .match-part .match-head { font-size: 11px; color: var(--dim); line-height: 18px; }
.side .match-part .match-head .them { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .match-part .num { text-align: right; }
.side .match-part .match-row { width: 100%; height: auto; padding: 0; border: none; background: none; color: var(--text); text-align: left; font-size: 12px; line-height: 20px; }
.side .match-part .match-row::before { content: none; }
.side .match-part .match-row .word { padding-left: 2ch; }
.side .match-part .match-row.open { color: var(--bright); }
/* (Pass W1's rider, from the owner's first real match of 2026-11-11) TOTAL under hand #20: each column's sum, in the rows' grid,
   a thin rule above it; the sums bold, as the card's numbers; a long sum smaller, never wider than its column (5ch and 7ch of
   the row's 12 pixels: 60 and 84 pixels over its length, --len), so it never wraps; the row one line high whatever the sums. */
.side .match-part .match-total { display: grid; grid-template-columns: minmax(0, 1fr) 5ch 7ch 8ch; column-gap: 1ch; font-size: 12px; line-height: 20px; color: var(--bright); border-top: 1px solid var(--line); margin-top: 5px; }
.side .match-part .match-total .total-label { font-size: 11px; color: var(--dim); }
.side .match-part .match-total .num { font-weight: 700; white-space: nowrap; }
.side .match-part .match-total .total-you { font-size: min(12px, calc(60px / var(--len, 1))); }
.side .match-part .match-total .total-them { font-size: min(12px, calc(84px / var(--len, 1))); }
.side .match-part .match-open { margin: 2px 0 8px 2ch; }
.side .match-part .match-stop { align-self: flex-start; }
.side .match-part .match-question { display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.match-answers { display: flex; align-items: center; gap: 18px; }
.side .match-part .match-answers button:not(.linkish) { height: 32px; padding: 0 14px; font-size: 12px; }
.front .match-stack { display: grid; }
.front .match-stack > * { grid-area: 1 / 1; min-width: 0; }
.front .match-stack.asking > p.dim { visibility: hidden; }
.front .match-ask { display: flex; flex-direction: column; gap: 10px; }
.front .match-ask .match-yes { height: 36px; padding: 0 16px; color: var(--accent); border-color: var(--accent); }
.front .match-ask .linkish { font-size: 12px; }

/* The side panel: log, fairness, session (desktop), or one of them over the screen (phone). They
   scroll; a notice shows under them, in a place of its own, so it never covers a warning. */
.side { display: none; }
.side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.side section { padding: 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.side .head { font-size: 11px; color: var(--dim); display: flex; justify-content: space-between; }
.side .pair { display: flex; justify-content: space-between; gap: 12px; }
.side .pair > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side .pair > :last-child { white-space: nowrap; }
.side .ok { color: var(--accent); }
.side .bad { color: var(--warn); }
.side .warning { color: var(--warn); border: 1px solid var(--warn); background: var(--warn-bg); padding: 8px; line-height: 1.45; }
.side .note { color: var(--dim); line-height: 1.45; }
.side .log-lines { display: flex; flex-direction: column; gap: 5px; color: var(--dim); }
.side button.wide { margin-top: 6px; height: 36px; font-size: 12px; }
.side .close { display: none; }
/* On a phone, a list open over the table: on this player's turn, its clock on top, a tap back to the table. */
.side .turn-bar { flex: none; height: 44px; margin: 0; padding: 0 20px; border: none; border-bottom: 1px solid var(--line); background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A line of the fairness list: the hand's number keeps its room; a warning wraps beside it, never cut off. */
/* (Pass L2, the owner's brief of 2026-10-24) The fairness list's top in plain words: TODAY'S CARDS (a Daily
   Deal run) and YOUR HANDS, labels in the style of the table's own (YOUR HAND, BOARD, POT); each hand's
   own line only once "show each hand" is tapped, in place. */
.side .fair-part { display: flex; flex-direction: column; gap: 4px; }
.side .fair-warnings:empty, .side .fair-notes:empty { display: none; } /* (no gap of their own while there is nothing to say) */
.side .fair-label { font-size: 11px; color: var(--dim); }
.side .each-hand { align-self: flex-start; margin: 2px 0 8px; } /* (room under it: its tap strip, 44 high, reaches no other control) */
.side .fair-list .pair > :first-child { white-space: normal; flex: none; }
.side .fair-list .pair > .bad { white-space: normal; min-width: 0; }

.game.panel-open .side { display: flex; flex-direction: column; position: fixed; inset: 0; background: var(--bg); z-index: 10; }
.game.panel-open .side .close { display: block; flex: none; margin: 16px 20px 0; height: 36px; align-self: flex-start; padding: 0 14px; font-size: 12px; } /* (the mirror pass: flex none, or a list longer than the screen squeezed it to its words' height) */
.game.panel-open .side section { display: none; }
.game.panel-open.show-fairness .side .fair-section,
.game.panel-open.show-results .side .session-section,
.game.panel-open.show-mirror .side .match-section,
.game.panel-open.show-mirror .side .mirror-section,
.game.panel-open.show-log .side .log-section { display: flex; }

/* A short message, shown for 5 seconds, in a place of its own: it covers nothing (CLAUDE.md, "The
   page"). On a wide screen, and under a list opened over a phone's screen, it shows under the side
   panel's list; on a phone it takes the place of the table's name and the line under it (below). */
.toast { background: var(--accent-bg); border: 1px solid var(--edge); color: var(--text); overflow-wrap: anywhere; }
.side .toast { flex: none; border-width: 1px 0 0; padding: 12px 20px; padding-bottom: max(12px, env(safe-area-inset-bottom)); font-size: 12px; line-height: 1.4; }
.top .toast { display: none; }

/* Copying fallback: the text to select by hand. */
.copy-box { position: fixed; inset: 0; background: var(--bg); z-index: 30; padding: 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.copy-box textarea { flex-grow: 1; background: var(--accent-bg); color: var(--bright); border: 1px solid var(--edge); font-family: var(--mono); font-size: 12px; padding: 8px; }
.copy-box button { height: 40px; }

/* Phones zoom in on a box whose text is smaller than 16px when it is tapped: keep them at 16px,
   the amount box too, at any length (a long amount scrolls inside it). */
@media (pointer: coarse) {
  input, select, .presets input { font-size: 16px; }
}

/* A tall phone (the Plus and Pro Max sizes): the room to spare goes to roomier seats, bigger cards, and taller buttons. */
@media (max-width: 1023px) and (min-height: 720px) {
  .seat-row { height: 28px; }
  .seat-rows > .seat-row:not(.head) { min-height: 28px; }
  :root { --hole-h: 80px; --button-h: 52px; }
  .card { width: 56px; height: 72px; font-size: 20px; }
  .card .suit { font-size: 18px; }
  .card.hole { width: 60px; font-size: 22px; }
  .card.hole .suit { font-size: 20px; }
  .me .label.vs-bots { font-size: min(11px, (100vw - 174px) / (var(--len, 1) * 0.64)); } /* (pass B1: the bigger cards' room) */
}

@media (max-width: 360px) {
  .seat-row { grid-template-columns: 20px minmax(0, 1fr) 64px 80px; gap: 6px; }
  .seat-row .stack { --room: 64px; }
  .seat-row .act { --room: 80px; }
  .card { width: 46px; height: 56px; }
  .presets { --box-w: 88px; }
}
@media (max-width: 340px) {
  .presets { --box-w: 72px; }
  .presets button { font-size: 11px; } /* ("all-in" on one line) */
}

/* ---- Desktop ---- */

@media (min-width: 1024px) {
  .game { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: 100vh; min-height: 640px; }
  .top { height: 60px; padding: 0 24px; flex-direction: row; align-items: center; justify-content: space-between; gap: 18px; }
  .top .row1 { gap: 18px; }
  .top .row1 .badge { display: none; }
  .brand { font-size: 16px; }
  .top .titles { display: flex; align-items: baseline; gap: 18px; min-width: 0; flex: 1 1 auto; }
  .top .sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .top .row1 { min-width: 0; flex: 0 1 auto; }
  .top-actions { display: flex; }
  .top-actions button { height: 36px; padding: 0 14px; font-size: 12px; white-space: nowrap; }
  .top-actions button.quiet, .top-actions button.daily-only { color: var(--dim); border-color: var(--ghost); }
  .top-actions button.armed { color: var(--bright); border-color: var(--bright); } /* "tap again to leave" */
  .side .turn-bar { display: none; } /* (the table is always in sight beside the list) */
  .seat-box .seat-no { color: var(--dim); font-weight: 400; margin-right: 8px; }
  .seat-rows, .links { display: none; }
  .badge::after { content: none; }
  .felt { display: flex; flex-grow: 1; padding: 28px 32px; flex-direction: column; justify-content: space-between; align-items: center; gap: 20px; min-height: 0; }
  .felt .ring { display: flex; gap: 16px; justify-content: center; width: 100%; }
  .felt .ring .seat-box { flex: 0 1 220px; min-width: 0; }
  .felt .board-area { border: none; padding: 0; align-items: center; gap: 14px; }
  .felt .board-head { justify-content: center; font-size: 12px; }
  .felt .pot b { color: var(--bright); font-size: 18px; }
  .felt .card { width: 70px; height: 96px; font-size: 26px; }
  .felt .card .suit { font-size: 22px; }
  .felt .card.slot { font-size: 13px; }
  .phone-board { display: none; }
  .bottom { min-height: 132px; padding: 0 24px; border-top: 1px solid var(--line); flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
  .bottom .me { padding: 0; border: none; }
  .bottom .me.folded { flex-shrink: 0; } /* the "would have had" line keeps its one line; the actions (no buttons after a fold) make room */
  .play { display: contents; }
  .bottom .card.hole { width: 64px; height: 88px; font-size: 24px; }
  .bottom .card.hole .suit { font-size: 20px; }
  .bottom .me .words { gap: 4px; }
  .bottom .actions { flex: 0 1 auto; margin: 0; border: none; padding: 12px 0; width: 460px; gap: 8px; }
  .bottom .presets button, .bottom .presets input { height: 34px; }
  .bottom .presets { --box-w: 128px; }
  .bottom .buttons button { height: 48px; }
  .side { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-height: 0; }
  .game.panel-open .side { position: static; }
  .game.panel-open .side section { display: flex; }
  .game.panel-open .side .close { display: none; }
}

@media (max-width: 1023px) {
  /* The seat rows grow while hands are shown and shrink back as the next hand starts: a seat's
     "remove" or "+ bot" would move under a finger aimed at another's. Hidden then, keeping their room. */
  .game.showdown .seat-row .linkish { visibility: hidden; }
  /* Someone watching: the result's three lines, empty, keep their room (above). */
  .outcome.kept { display: flex; visibility: hidden; }
  .outcome.kept > div::before { content: "\a0"; }
  /* The header as a grid: the table's name and the badge, the line under them, the connection. A
     notice takes the place of the name and the line under it, beside the badge, reaching into the
     header's margins (three short lines fit); a longer one makes the header taller. It never covers
     the badge or the connection line. A narrow inner margin: 34 characters fit one line on a
     375-wide phone beside the badge's longest words ("Sit down with 100 to 10,000 chips."). */
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; }
  .top .titles, .top .row1 { display: contents; }
  .top .brand { grid-area: 1 / 1; align-self: center; }
  .top .badge { grid-area: 1 / 2; align-self: start; }
  .top .sub { grid-area: 2 / 1 / 3 / 3; }
  .top .status { grid-area: 3 / 1 / 4 / 3; margin-top: 2px; }
  .top .toast { grid-area: 1 / 1 / 3 / 2; display: flex; align-items: center; min-width: 0; margin: -7px 0 -6px; padding: 2px 4px; font-size: 11px; line-height: 13px; }
  .top .status:not(.hidden) ~ .toast { margin-bottom: -2px; }
  .top:has(> .toast:not(.hidden)) :is(.brand, .sub) { visibility: hidden; }
  .game.panel-open .top .toast { display: none; }
  .side .toast { display: none; }
  .game.panel-open .side .toast { display: block; }
}

/* (Pass B1, the owner's brief of 2026-11-05: "vs bots") On top of tonight's results in the table's place after leaving a table of
   bots: the session's swing, bigger (the accent when up), and the all-time total under it, dim; each on one line, smaller text
   only where too long for it (the longest numbers on a 320-wide screen). */
.side .vs-bots-top { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; container-type: inline-size; }
.side .vs-bots-top .swing { font-size: min(18px, 100cqw / (var(--len, 1) * 0.64)); font-weight: 700; line-height: 22px; color: var(--text); white-space: nowrap; }
.side .vs-bots-top .swing.up { color: var(--accent); }
.side .vs-bots-top .total { font-size: min(12px, 100cqw / (var(--len, 1) * 0.64)); line-height: 16px; color: var(--dim); white-space: nowrap; }
/* (Pass N1) Tonight's results. (Pass S1 part 2) The biggest pot's line and the best hand's each on one
   line, no cards: who won it cut short when long, the amount, the hand's words, and the tag whole. (Pass
   M1) The tag right after the player's own name, the names on either side of it each cut short. */
/* (Pass D8) A player's line in the results: its name cut short when long, never its tags ("you", "bot"), as at the table. */
.side .session-rows .pair > .who { display: flex; align-items: baseline; }
.side .session-rows .pair > .who .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.side .session-rows .pair > .who .you-tag, .side .session-rows .pair > .who .faint { flex: none; white-space: pre; }
/* (Pass M1, the owner's brief of 2026-10-26: it ran past a 320-wide screen's edge) A result with a part in hands with a warning,
   "+3,450 (⚠ -1,200)": in smaller text only when too long for the line beside the gap (the longest numbers on a 320-wide screen). */
.side .session-rows .pair > .bad.fit { font-size: min(12px, (100cqw - 12px) / (var(--len, 1) * 0.63)); }
.side .night-extra > :first-child { flex: none; }
.side .night-extra > :last-child { display: flex; justify-content: flex-end; align-items: baseline; min-width: 0; }
.side .night-extra .nm { overflow: hidden; text-overflow: ellipsis; white-space: pre; min-width: 0; } /* (pass M1: "pre" keeps the space of " and jessica" after the tag) */
/* (Pass U1, the outside testers' finding of 2026-10-26) Until the table is first shown, only the header and its status line:
   an empty table read "blinds 0/0" and "You are watching." for as long as a server never answered. */
.game.no-table .main > :not(.top) { visibility: hidden; }
/* (Pass U1, the owner's note of 2026-10-27) The other names cut short first, the player's own only once they are.
   (Pass U2, from pass U1's review: at 320 wide a long other name first shrank to nothing, and the line began "and") The first
   name never under its first letter and "…" (`--least`: 2 characters, 1 for a one-letter name). */
.side .night-extra .nm:not(.mine) { flex-shrink: 1000000; }
.side .night-extra .nm.first:not(.mine) { min-width: calc(var(--least, 2) * 1ch); }
.side .night-extra .of, .side .night-extra .you-tag { flex: none; white-space: pre; }
.side .back-to-table { display: none; }
/* In the place of the table, at every width: after the player's own leave ("back to the table" over
   them), or once the table closed. Only tonight's results, over the whole screen, never beside it. */
.game.night-over .main { display: none; }
.game.night-over .side { display: flex; flex-direction: column; position: fixed; inset: 0; background: var(--bg); z-index: 10; border-left: none; }
.game.night-over .side section { display: none; }
.game.night-over .side .session-section { display: flex; }
.game.night-over .side .close, .game.night-over .side .turn-bar { display: none; }
.game.night-left .side .back-to-table { display: block; margin: 16px 20px 0; height: 36px; align-self: flex-start; padding: 0 14px; font-size: 12px; }
.game.night-over .side-scroll { width: 100%; max-width: 560px; margin: 0 auto; }
.game.night-over .side .toast { display: block; }
