/*
 * THE NEW UI'S ONE STYLESHEET. Every screen is drawn by it and nothing else
 * (docs/log/ORPHANED-RULES-2026-09-13.md: a page drawing markup whose sheet it
 * never loads is how 754 cells went wrong while every check was green).
 *
 * THE LOOK IS THE TUI'S (owner, 2026-09-16, "make it all so"): one monospace
 * face, square 1px borders, tight spacing, the TUI's colours -- at every width,
 * with the app's own responsive rules kept (panels fill the space, columns drop
 * by width). A corner is never rounded; the only radius left is a true circle.
 *
 * The TUI's rules on glass (docs/log/NEW-UI-2026-09-13.md):
 * - colour only for grades, status words, results and "you";
 * - titles in the border; no decoration;
 * - proportional type for reading, tabular figures for numbers;
 * - 44px for a control that stands alone and 36px for a row in a dense table,
 *   on a coarse pointer only (docs/log/TABLET-2026-09-13.md); a rule about a
 *   component sits on the component, never on a frame class
 *   (docs/log/TOUCH-PHONE-2026-09-13.md).
 *
 * NO COLOUR IS NAMED HERE except the defaults below. The palette comes from
 * `@osb/client` (`theme.js` sets every role's variable); the defaults are
 * Clubhouse's hex, so a page draws correctly before the palette is applied.
 */
:root {

  --bg: #121212;
  --surface: #1c1c1c;
  --surface2: #262626;
  --selected: #3a3a3a;
  --border: #444444;
  --border-strong: #767676;
  --text: #e4e4e4;
  --muted: #bcbcbc;
  --faint: #9e9e9e;
  --accent: #5fafff;
  --on-accent: #121212;
  --good: #5fd787;
  --warn: #d7af5f;
  --danger: #ff8787;
  --grade20: #ff8787;
  --grade30: #ff8700;
  --grade40: #ffd700;
  --grade50: #5fd787;
  --grade60: #5fd7d7;
  --grade70: #5fafff;
  --grade80: #af87ff;

  --touch-lg: 44px;
  --touch-sm: 36px;
  --gutter: 10px;

  color-scheme: dark;
  /* ONE MONOSPACE FACE (owner, 2026-09-16: "make it all so" -- the TUI's look is the look, at every width). */
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font: 13.5px/1.4 var(--mono);
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
/* THE PAGE ITSELF NEVER SCROLLS, AND ITS HEIGHT IS MEASURED (owner, 2026-09-20,
   on a phone: a dead black band under the nav bar every time, and scrolling it
   away carried the nav bar off the bottom where it could not be reached).
   `100dvh` did not fix it -- iOS Safari does not report it reliably while the
   toolbars are animating, and a percentage height resolves against the viewport
   with the chrome HIDDEN, so either way the document stood taller than the
   screen. `--app-h` is `visualViewport.height`, set inline in `index.html`
   before first paint: what is actually visible, reported rather than inferred.
   `main.content` is the only thing that scrolls. */
html, body { margin: 0; height: var(--app-h, 100dvh); overflow: hidden; overscroll-behavior: none; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.num, .code, .count, .standing, .date { font-variant-numeric: tabular-nums; }
/* A hyphenated word wraps as one word (`ui/h.js`, row 554). */
span.nobr { white-space: nowrap; }
.faint { color: var(--faint); }
.muted { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--danger); }
.warn { color: var(--warn); }

/* ---- the shell: top line, content, menu line ---- */

.shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "top" "main" "menus";
  height: var(--app-h, 100dvh);
}
.shell.bare { grid-template-rows: 1fr; grid-template-areas: "main"; }

main.content {
  grid-area: main;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: 10px 18px;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

header.top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: calc(6px + env(safe-area-inset-top)) 6px;
  padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-width: 0;
  position: relative;
}
/* A sim's place (round 16 #23, `chrome.js` simRail): on the bar's bottom border, so nothing below it moves. */
header.top .sim-rail { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
header.top .sim-rail > span { display: block; height: 100%; background: var(--accent); transition: width 0.15s linear; }
.club { display: flex; align-items: center; gap: 8px; min-height: var(--touch-lg); flex: none; }
.club .code {
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; padding: 3px 6px; border-radius: 0; letter-spacing: 0.02em;
}
.club .clubname { font-weight: 650; white-space: nowrap; display: none; }
.where { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.where .standing { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where .date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.where .date.long { display: none; }
.where .date.short { display: flex; gap: 4px; min-width: 0; }   /* October puts the series' day in .div */
.where .date.short .div { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.go { display: flex; gap: 6px; flex: none; }

nav.menus {
  grid-area: menus;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}
.menu {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 6px;
  background: none; border: 0; border-top: 2px solid transparent;
  color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap;
  cursor: pointer;
}
.menu.on { color: var(--accent); border-top-color: var(--accent); }
.menu.open { color: var(--text); background: var(--selected); }

/* One line: a phone on its side (the chrome must not take a quarter of it)
   and any window wide enough to hold the menus beside the club. */
@media (max-height: 500px) and (pointer: coarse), (min-width: 900px) {
  .shell { grid-template-rows: auto 1fr; grid-template-columns: auto 1fr; grid-template-areas: "menus top" "main main"; }
  .shell.bare { grid-template-columns: 1fr; grid-template-areas: "main"; }
  nav.menus {
    display: flex; border-top: 0; border-bottom: 1px solid var(--border);
    padding-bottom: 0; padding-top: env(safe-area-inset-top); padding-left: max(6px, env(safe-area-inset-left));
  }
  .menu { min-height: 0; border-top: 0; border-bottom: 2px solid transparent; padding: 0 12px; }
  .menu.on { border-bottom-color: var(--accent); }
  header.top { border-bottom: 1px solid var(--border); padding-left: 12px; }
  .where { flex-direction: row; align-items: center; justify-content: flex-end; gap: 14px; }
}
@media (min-width: 700px) and (max-width: 899px), (min-width: 1100px) {
  .club .clubname { display: inline; }
}
/* A phone on its side has the menus on the club's line: the club's code alone. */
@media (max-height: 500px) and (pointer: coarse) { .club .clubname { display: none; } }
@media (min-width: 700px) {
  .where .date.short { display: none; }
  .where .date.long { display: inline; }
}

/* ---- buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 0;
  background: var(--surface2); color: var(--text);
  font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* Something needs an answer before the day can move: the same amber the Needs you count wears, on the button
   that will take you to it. The WORD does not change, because a longer word moves the buttons beside it. */
.btn.primary.blocked { background: var(--warn); border-color: var(--warn); color: #1a1a1a; }
.btn:disabled { opacity: 0.5; cursor: default; }
@media (pointer: coarse) {
  .btn { min-height: var(--touch-lg); }
  .menu { min-height: 52px; }
}

/* ---- the menu sheet ---- */

.scrim { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 60%, transparent); z-index: 10; }
.sheet {
  position: absolute; left: 8px; right: 8px;
  bottom: calc(60px + env(safe-area-inset-bottom));
  max-height: 72dvh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0;
  padding: 8px 0;
}
.sheet h2 { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 16px; }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet a { display: flex; align-items: center; min-height: 40px; padding: 0 16px; font-size: 16px; }
.sheet a.on { color: var(--accent); font-weight: 650; }
.sheet a.unbuilt { color: var(--faint); }
.sheet .sim-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 0 16px; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.sheet .sim-choice .aside { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* ONE LINE ON A PHONE TOO (the owner, 10-11; the fan walk at 375, 11-09: "To Last day of the regular season" took two lines beside
   its date): the choice's words give way with an ellipsis, its date never; the whole words are the button's own. */
.sheet .sim-choice .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (pointer: coarse) { .sheet .sim-choice { min-height: var(--touch-lg); } }
/* To a date (DNB 710): the row reads as the choices above it, the date field and Sim at its end. */
.sheet .sim-date { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 16px; font-size: 16px; }
.sheet .sim-date label { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; white-space: nowrap; }
.sheet .sim-date input { font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text); background: var(--surface); border: 1px solid var(--border); padding: 2px 4px; min-width: 0; }
.sheet .sim-date button { font: inherit; font-size: 16px; font-weight: 650; color: var(--accent); background: none; border: 0; padding: 0 4px; min-height: 40px; cursor: pointer; }
@media (pointer: coarse) { .sheet .sim-date, .sheet .sim-date button { min-height: var(--touch-lg); } }
.btn.sim .caret { color: var(--muted); }
/* The day button is a glyph, so it needs a floor of its own rather than a word's width. */
.btn.simday { min-width: var(--touch-lg); justify-content: center; font-size: 17px; }
/* Play and Next are the same four characters; the floor keeps the box still if a translation is not. */
.btn.continue { min-width: 5.5ch; justify-content: center; }
/* THE SIM CONTROL IS ONE BUTTON FOR A FINGER, TWO FOR A POINTER (owner, 2026-09-18: "sim day/sim separation should
   only be a thing for mobile version"). Keyed on the POINTER, not the width: a narrow desktop window keeps both
   buttons, and a tablet on a keyboard is never handed a long press. `chrome.js` asks this same query before it arms
   the press, so the hidden button and the live gesture cannot disagree. */
@media (pointer: coarse) {
}
/* A menu item's letter (plan decision 21): the key that opens it, underlined in its name. */
/* A menu letter is a keyboard cue, so it is drawn only where there is a keyboard (owner, 2026-09-15: no hotkey cues on touch). */
u.letter { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .sheet u.letter { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; } }
@media (pointer: coarse) { .sheet a { min-height: var(--touch-lg); } }
@media (max-height: 500px) and (pointer: coarse), (min-width: 900px) {
  .sheet { top: calc(52px + env(safe-area-inset-top)); bottom: auto; right: auto; width: 300px; max-height: calc(100dvh - 70px); }
  /* THE SIM SHEET'S CHOICES ON ONE LINE (the owner, 10-11): at 300px "To Rosters expand to 28" and "To Last day of the regular
     season" took two lines each on a desktop window (the fan walk, 11-09). It is as wide as its longest choice, from 300px. */
  .sheet.sim-sheet { width: max-content; min-width: 300px; max-width: calc(100vw - 24px); }
  .sheet.sim-sheet .sim-choice .label { white-space: nowrap; }
}

/* ---- content ---- */

.screen { display: flex; flex-direction: column; gap: 14px; min-height: 100%; container: screen / inline-size; }
/* The part of a screen that takes the room left, so its panels reach the foot of the frame. */
.fill { flex: 1 1 auto; }

.notice { color: var(--warn); margin-bottom: 12px; }
.quiet { color: var(--faint); }

nav.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; }
/* On a phone a tab row WRAPS rather than scrolling: a scrolled row hides labels off the edge, and the TUI never
   hides one. (The monospace face made the Lineups row 369px in a 351px pane; sideways scrolling was always wrong.) */
@media (max-width: 520px) { nav.tabs { overflow-x: visible; flex-wrap: wrap; row-gap: 2px; } }
.tab {
  display: inline-flex; align-items: center; padding: 0 8px; min-height: 34px;
  color: var(--muted); font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
@media (pointer: coarse) { .tab { min-height: var(--touch-lg); } }

/* A panel: its title and count sit in the top border, so a title costs no row. */
.panel {
  position: relative;
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 16px 12px 10px;
  margin-top: 9px;
  min-width: 0;
}
.panel.mine { border-color: var(--border-strong); }
.panel > header.edge {
  position: absolute; top: -0.75em; left: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  pointer-events: none; line-height: 1.4;
}
.panel > header.edge h2, .panel > header.edge .count { background: var(--bg); padding: 0 6px; white-space: nowrap; }
.panel > header.edge h2 { font-size: 15px; font-weight: 650; color: var(--accent); overflow: hidden; text-overflow: ellipsis; }
.panel > header.edge .count { font-size: 13px; color: var(--faint); }

.panes { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); grid-auto-rows: minmax(min-content, 1fr); }

/*
 * ONE RESPONSIVE PAGE (plan decision 14). A grid of panels has no breakpoint of
 * its own: `auto-fit` takes as many across as hold the panel's minimum. Where a
 * screen has two compositions (one league or both, one table or two, the moves
 * behind a button or beside the sheet), both are drawn and a query on the
 * SCREEN's width chooses, so a resize restyles and never redraws. Each query's
 * width is the point where the second composition's panels reach their minimum.
 */
.when-wide, .when-roomy { display: none; }
/* Leaders: two league panels at 340px and a gap. */
.panes.leagues > .panel:not(.chosen) { display: none; }
@container screen (min-width: 696px) {
  .when-wide { display: block; }
  .when-narrow { display: none; }
  .panes.leagues > .panel:not(.chosen) { display: block; }
}
/* Rosters: eleven tabs where they fit (measured 1080px), a picker where not. */
@container screen (min-width: 1136px) {
  .when-roomy { display: block; }
  .when-cramped { display: none; }
}
/* Two tables side by side only at 640px each, where a table still keeps its salary: the sweep found a
   second pane at 560px hid 158 cells of the first (THRU, salary, B/T), trading a column for a table. */
.panes.roster { grid-template-columns: repeat(auto-fit, minmax(min(100%, 640px), 1fr)); }
.panes.roster > .panel:nth-child(2) { display: none; }
@container screen (min-width: 1296px) { .panes.roster > .panel:nth-child(2) { display: block; } }
/* Standings: a division panel is 480px before a second sits beside it, so a new column costs it only STRK. */
.panes.divisions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
/* Home: a grid of equal cells, at most three across, rows sharing the screen (owner, 2026-09-14). Five panels leave
   a row short, so the last spans the cells its row leaves: two of two, or two of three. */
.panes.home { grid-template-columns: repeat(auto-fit, minmax(max(min(100%, 400px), calc((100% - 32px) / 3)), 1fr)); }
@container screen (min-width: 816px) { .panes.home > .panel:last-child { grid-column: span 2; } }
@container screen (min-width: 1232px) { .panes.home > .panel:last-child { grid-column: span 2; } }
/* A row of tabs that would be cut off becomes a picker (a player's five views need 372px). */
.when-tabs { display: none; }
@container screen (min-width: 372px) { .when-tabs { display: block; } .when-picker { display: none; } }
/* A player: the moves beside the sheet once the sheet keeps one panel at 330px beside them. */
.moves-panel { display: none; }
@container screen (min-width: 680px) {
  .player-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 16px; }
  .moves-panel { display: block; margin-top: 9px; }
  .moves-btn, .moves-scrim { display: none; }
}
/* Rosters: the panes share the width, as the TUI's 140x40 frame does, so each table has its columns. */
.panes.roster { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

/* ---- the table ---- */

table.t { width: 100%; border-collapse: collapse; }
table.t th {
  font-size: 11.5px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.04em;
  text-align: left; padding: 0 6px 4px; white-space: nowrap;
}
table.t td { padding: 3px 6px; white-space: nowrap; width: 1%; }
table.t th:first-child, table.t td:first-child { padding-left: 0; }
/* The last column meets the panel's edge (a task sheet's man row sat inside the choices under it, 2nd gui at 375, 09-28). */
table.t th:last-child, table.t td:last-child { padding-right: 0; }
table.t .num { text-align: right; }
/* A column of signs sits centred (`ColumnKind` 'mark', through `alignOf`): a status, a selection dot. */
table.t .mid { text-align: center; }
/* The one column that takes the room left. Only a name may be cut, never a figure. */
table.t td.flex { width: auto; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
/*
 * A MAN'S CAREER GRID PACKS ITS NUMBERS (the owner, 2026-09-22: *"it feels like there's more horizontal spacing between
 * the stats columns"*). The grid has no flexible column, so a 100%-wide table shared its slack across every column and
 * G, AB, H and RBI sat a column-width apart. The slack sits AFTER LVL, the second column (the owner, 2026-09-26, row 82:
 * *"Why is there such a huge gap between year and level? ... Reduce gap between first and second columns"*): YEAR and
 * LVL read together, the figures together at the right, as in the TUI. The grid says it is one (`TableNode.spacing`
 * 'figures', row 87 step 2), and `render.js` drops its columns by the same spacing.
 */
table.t.sp-figures td:nth-child(2), table.t.sp-figures th:nth-child(2) { width: auto; }
/* One character between figures, as the TUI draws them, not twelve pixels. */
table.t.sp-figures td, table.t.sp-figures th { padding-inline: 4px; }
table.t.sp-figures td:first-child, table.t.sp-figures th:first-child { padding-left: 0; }
table.t.sp-figures td:last-child, table.t.sp-figures th:last-child { padding-right: 0; }
table.t tr.you .name { color: var(--accent); font-weight: 650; }
table.t tr.tap { cursor: pointer; }
/*
 * THE ACTIONS VIEW, WHERE "CAN I DO THIS?" IS THE WHOLE QUESTION. A pressable row gets a chevron and the
 * text's own colour; a refused one keeps its reason in warn and no mark. Without this an available command
 * and a refused one were the same grey line on a phone, because `cursor: pointer` says nothing to a finger.
 */
table.t.acts tr.tap td:last-child::after { content: '\203A'; float: right; color: var(--muted); padding-left: 10px; }
table.t.acts tr.tap td { color: var(--text); }
/* An empty cell in an Actions row claims no width, so a lone refusal's reason starts at the panel's edge
   instead of being pushed right by a blank column that is only there for the rows that need it. */
/* No head row means no row above the first one, so it separates itself from nothing. */
table.t.nohead tbody tr:first-child { border-top: none; }
/* A facts table with its figures on the right: each row its own line (`render.js` `ownRows`, row 553). */
table.t.ownrow, table.t.ownrow > tbody { display: block; }
table.t.ownrow > tbody > tr { display: flex; align-items: baseline; column-gap: 12px; }
/* The table's flex cell takes the row's room and cuts last; the other keeps its own width; the value ends at the right edge. */
table.t.ownrow > tbody > tr > td { display: block; flex: none; width: auto; white-space: nowrap; }
table.t.ownrow > tbody > tr > td.flex { flex: 1 1 auto; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; }
table.t.ownrow > tbody > tr > td:last-child { margin-left: auto; }
table.t.acts td.blank { width: 0; min-width: 0; padding-left: 0; padding-right: 0; }
table.t tr.tap:active td { background: var(--selected); }
table.t td.figure { font-weight: 650; }
/* Words that may wrap in a one-line table rather than push it past its panel (an injury's description). */
table.t td.wrap { white-space: normal; min-width: 8em; width: auto; }
/* ...BUT NEVER THE NAME'S ROOM (row 86's reinstatement sheet at 375, 2nd gui): `width: auto` shared the table's slack with the
   flex name, so a MOVE column took 180px for "designate him" and every name read "J. Cr…". Beside a name a wrapping cell
   takes the least it can (its longest word, or 8em) and wraps; the name keeps the room. */
table.t tr:has(> td.flex) > td.wrap:not(.flex) { width: 1%; }
/* A SHUT CONTROL (`Row.shut`, shared 4c786f02) keeps an open one's height, so nothing under it moves when it shuts
   (the owner's rule: nothing pressed repeatedly moves). No cursor and no :active: it is not tappable. */
@media (pointer: coarse) { table.t tr.tap td, table.t tr.shut td { height: var(--touch-sm); } }

/* Columns drop as the PANEL narrows, each at its own width (`hide` in ui.js). */
@container (max-width: 700px) { .h700 { display: none; } }
@container (max-width: 640px) { .h640 { display: none; } }
@container (max-width: 600px) { .h600 { display: none; } }
@container (max-width: 560px) { .h560 { display: none; } }
@container (max-width: 520px) { .h520 { display: none; } }
@container (max-width: 480px) { .h480 { display: none; } }
@container (max-width: 400px) { .h400 { display: none; } }
@container (max-width: 300px) { .h300 { display: none; } }

/* Under a mouse the rows close up; a finger keeps its floor (TABLET-2026-09-13). */
@media (pointer: fine) {
  table.t td { padding-block: 1px; }
  table.t th { padding-bottom: 2px; }
  .panel { padding-block: 14px 8px; }
  ul.bars { gap: 1px; }
  dl.facts { gap: 2px; }
  ul.news li { padding: 1px 0; }
}

/* ---- leaders ---- */

.blocks { display: grid; gap: 16px 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.block h3 { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.block thead { display: none; }

/* ---- leagues ---- */

ul.leagues { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
/* A save is ONE tappable row, name over its record (the owner, 2026-09-23: no Open button, no rule under the title). */
ul.leagues > li { display: block; }
.league { display: grid; gap: 2px; width: 100%; min-width: 0; padding: 8px 10px; margin: 0 -10px; text-align: left;
  background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; text-decoration: none; }
.league:hover, .league:focus-visible { background: var(--selected); outline: none; }
@media (pointer: coarse) { .league { min-height: var(--touch-lg); } }
/* A save's DELETE sits beside its row, never in it (the owner, 11-30): the row stays the one tap that opens; Delete is quiet text at
   the right, a touch target of its own, and it always asks first. */
ul.leagues > li.with-delete { display: flex; align-items: center; gap: 4px; }
ul.leagues > li.with-delete > .league { flex: 1; min-width: 0; margin-right: 0; }
.league-delete { flex: none; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 8px 6px; }
.league-delete:hover, .league-delete:focus-visible { color: var(--danger, var(--text)); outline: none; text-decoration: underline; }
@media (pointer: coarse) { .league-delete { min-height: var(--touch-lg); } }
ul.leagues.settings-row { margin: 4px 10px; }
.settings-screen .back-link { display: inline-block; padding: 8px 0 4px; color: var(--accent); text-decoration: none; }
/* One line each, the button always at the right (the owner's start screen, 2026-09-21): a long club name ends in … */
.league .name, .league .muted { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.league .muted { font-weight: 400; }
/* The real seasons: a year and its Play, many rows, so they are denser than a saved league's row. */
ul.seasons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
/* A club to choose: its name, and under it what the job is like (the wage bill against the budget, the market). */
/* The one legend over the club list: what the two figures are, said once rather than on every button. */
p.legend { margin: 2px 0 10px; color: var(--muted); font-size: 12.5px; }
p.legend .faint { color: var(--faint); }
button.club-choice { flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px; height: auto; min-height: var(--touch-lg); }
/* One club a row on a phone: two columns cut the facts line ("· big m…") at 375px. */
@media (max-width: 520px) { ul.clubs { grid-template-columns: 1fr; } }
button.club-choice .club-name { font-weight: 650; }
button.club-choice .club-facts { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
button.club-choice .club-facts.over { color: var(--warn); }
/* The club's four units as grades (the owner's outlook "on the club picker", 2026-09-21), one quiet line. */
button.club-choice .club-outlook { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
button.club-choice .club-units { display: block; font-size: 12px; font-variant-numeric: tabular-nums; }
/* Every line wraps rather than running off a phone's edge (seen at 375: the record and the bullpen cut). */
button.club-choice > span { white-space: normal; text-align: left; max-width: 100%; }
/* Settings' band words (DNB 733 (a)): a figure in its colour, its word beside it. */
table.t.bands { width: auto; margin-top: 10px; }
table.t.bands td { padding: 1px 12px 1px 0; }
li.season { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 0; }
li.season .name { font-weight: 650; font-variant-numeric: tabular-nums; }
.panel p.quiet + ul.leagues { margin-top: 14px; }

/* ---- grades: colour for grades only ---- */

.grade { font-weight: 700; font-variant-numeric: tabular-nums; }
.g20 { color: var(--grade20); } .g30 { color: var(--grade30); } .g40 { color: var(--grade40); }
.g50 { color: var(--grade50); } .g60 { color: var(--grade60); } .g70 { color: var(--grade70); } .g80 { color: var(--grade80); }
.status { font-weight: 600; font-size: 13px; }
.status.bad { color: var(--danger); font-weight: 700; }
.status.warn { color: var(--warn); }

/* ---- a player ---- */

.player-head { max-width: 760px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "line grades"; align-items: center; gap: 2px 12px; }
.player-head h1 { grid-area: name; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-head .line { grid-area: line; }
.player-head .grades { grid-area: grades; justify-self: end; }
.player-head .moves-btn { grid-area: act; justify-self: end; }
.player-head h1 { font-size: 20px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.player-head .grades { display: flex; align-items: baseline; gap: 6px; font-size: 18px; }
.player-head .grades .faint { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.player-head .grades .grade + .faint { margin-left: 8px; }

.player-body { display: flex; flex-direction: column; }
.sheet-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }

ul.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
li.rating { display: grid; grid-template-columns: minmax(0, 1fr) 84px 2em 3em; align-items: center; column-gap: 10px; }
li.rating .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A phone's panel: a shorter bar, so the rating's name is not the part cut off. */
@container (max-width: 400px) { li.rating { grid-template-columns: minmax(0, 1fr) 56px 1.8em 2.8em; column-gap: 8px; } }
li.rating .grade { text-align: right; }
li.rating .ceiling { font-size: 13px; font-variant-numeric: tabular-nums; }
.bar { display: block; height: 10px; background: var(--surface2); border-radius: 0; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--accent); }
/* A fraction has no grade band, so it takes its own text's tone (Front office's patience). */
.bar .fill.f-good { background: var(--good); } .bar .fill.f-warn { background: var(--warn); } .bar .fill.f-bad { background: var(--danger); }
/* A RATING'S BAR IN ITS GRADE'S COLOUR (the owner, 2026-09-26: "if they're a rating, they should be colored"). These
   were `.b20` .. `.b80`, one class, and `.bar .fill` above (two) outranked them, so every rating bar drew in the accent;
   the band's class names the fill, so the rule names the fill too. A bar that is not a rating (Front office's patience,
   a fraction) keeps its own tone, above. */
.bar .fill.b20 { background: var(--grade20); } .bar .fill.b30 { background: var(--grade30); } .bar .fill.b40 { background: var(--grade40); }
.bar .fill.b50 { background: var(--grade50); } .bar .fill.b60 { background: var(--grade60); } .bar .fill.b70 { background: var(--grade70); }
.bar .fill.b80 { background: var(--grade80); }

dl.facts { margin: 0; display: grid; gap: 4px; }
.fact { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); column-gap: 12px; }
.fact dd { margin: 0; font-variant-numeric: tabular-nums; }
.fact dd.bad { color: var(--danger); }

ul.moves { list-style: none; margin: 0; padding: 0; }
button.move {
  display: flex; align-items: center; width: 100%; min-height: 36px; padding: 0 16px;
  background: none; border: 0; text-align: left; font-size: 15px; cursor: pointer;
}
.moves-panel button.move { padding: 0; }
button.move:active { background: var(--selected); }
@media (pointer: coarse) { button.move { min-height: var(--touch-lg); } }
.confirm { padding: 8px 16px; display: grid; gap: 12px; }
.moves-panel .confirm { padding: 0; }
.confirm .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- a picker: one list's choice on a narrow screen, where tabs would run off the edge ---- */

details.picker { position: relative; justify-self: start; }
details.picker > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 0;
  font-weight: 650; cursor: pointer;
}
details.picker > summary::-webkit-details-marker { display: none; }
details.picker > summary::after { content: ""; border: 5px solid transparent; border-top-color: var(--muted); margin-top: 5px; }
details.picker[open] > summary { background: var(--selected); }
details.picker ul {
  position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 220px; max-height: 60dvh; overflow-y: auto;
  list-style: none; margin: 0; padding: 6px 0;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0;
}
details.picker a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; padding: 0 14px; }
details.picker a.on { color: var(--accent); font-weight: 650; }
details.picker a .count { color: var(--faint); font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { details.picker > summary, details.picker a { min-height: var(--touch-lg); } }

/* A long list filters itself (controls.js `FILTER_AT`): the field sits at the top of the list and STAYS there while
   the list scrolls under it, because a filter that scrolls away is a filter you cannot reach from row ninety. */
details.picker li.filter-row { position: sticky; top: -6px; z-index: 1; padding: 6px 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
details.picker input.filter {
  width: 100%; min-height: var(--touch); padding: 0 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit;
}
details.picker input.filter:focus { outline: none; border-color: var(--accent); }
details.picker li.off { display: none; }
details.picker li.none { padding: 8px 14px; color: var(--muted); }

/* ---- home ---- */

ul.tasks, ul.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
button.task {
  display: grid; width: 100%; gap: 1px; padding: 6px 0; min-height: 36px;
  background: none; border: 0; text-align: left; cursor: pointer;
}
button.task .title { font-weight: 650; }
@media (pointer: coarse) { button.task { min-height: var(--touch-lg); } }
ul.news li { padding: 3px 0; }
ul.news .org { color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
ul.news .org.you { color: var(--accent); }
.result { font-weight: 650; }
.sheet .story { padding: 0 16px 8px; color: var(--muted); }
.fact dt.faint { color: var(--faint); }

.more { margin-top: 6px; display: inline-block; }

/* ---- colours (the Leagues screen) ---- */

ul.choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
button.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 36px; padding: 0 10px; background: none; border: 1px solid transparent; border-radius: 0;
  text-align: left; cursor: pointer;
}
button.choice.on { border-color: var(--accent); color: var(--accent); font-weight: 650; }
@media (pointer: coarse) { button.choice { min-height: var(--touch-lg); } }
button.choice .aside { display: inline-flex; align-items: center; gap: 10px; }
.swatch { display: inline-flex; gap: 2px; }
.swatch .chip { width: 12px; height: 12px; border-radius: 0; box-shadow: inset 0 0 0 1px var(--border); }

/* ---- tree screens (view/render.js) ---- */

button.tab { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; cursor: pointer; }
.vpane { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vpane > .panel { flex: 1 1 auto; }
.vpane > details.picker, .vpane > nav.tabs { align-self: flex-start; }
button.choice-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 36px; padding: 0 14px; background: none; border: 0; font: inherit; text-align: left; cursor: pointer;
}
button.choice-row.on { color: var(--accent); font-weight: 650; }
button.choice-row .count { color: var(--faint); font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { button.choice-row { min-height: var(--touch-lg); } }
table.t tr.sel td { background: var(--selected); }
/* WHAT A ROW OPENS, IN PLACE (Row.unfold: an Inbox message's body under its row, the owner's option A). It reads as
   part of the row above it: no rule between them, no ground of its own (a lighter box read as detached, driven at 375), and indented to where the row's
   subject starts after the unread mark (18px, measured at 375), the text wrapping to the panel's width. */
table.t tbody tr.unfold { border-top: 0; }
table.t tr.unfold td.unfold { white-space: normal; padding: 0 10px 10px 18px; border-top: 0; }
table.t tr.unfold td.unfold p { margin: 4px 0; max-width: 72ch; }
table.t tr.unfold td.unfold table.t { margin-top: 4px; }
/* Unread mail on the Inbox tab: a dot, never a count. */
nav.menus a.menu .unread-dot { color: var(--accent); font-size: .7em; margin-left: 4px; vertical-align: super; }
table.t tr.you td .name { color: var(--accent); font-weight: 650; }
/* A pane's tabs must all show whole (owner, plan decision 16): no scrolling row, tight spacing, spread across the pane. */
/* Where even the shortest labels do not fit (an upright 320px phone), the row WRAPS to a second line, every tab still
   whole; never a scroll and never a clipped label. Measured 2026-09-14: ten tabs need 363px, a 320px phone's pane has 288. */
nav.tabs.fit { overflow: visible; flex-wrap: wrap; gap: 0 2px; margin-inline: 0; justify-content: flex-start; align-self: stretch !important; }
nav.tabs.fit .tab { padding: 0 5px; flex: 0 1 auto; white-space: nowrap; }


/* ---- tree screens: one line of tabs, the table scrolls, the column set in the border (owner, 2026-09-14) ---- */

/* A pane's tabs: one line, each tab taking its share of the row; a narrow pane shrinks the type, never wraps. */
nav.tabs.fit { flex-wrap: nowrap; gap: 0; }
nav.tabs.fit .tab { flex: 1 1 auto; justify-content: center; padding: 0 3px; min-height: var(--touch-lg); }
.vpane { container-type: inline-size; }
@container (max-width: 520px) { nav.tabs.fit .tab { font-size: 12.5px; padding: 0 1px; letter-spacing: -0.01em; } }
/* A monospace face is wider than the proportional one these tiers were measured with: the Lineups tabs wanted 369px
   in a 351px pane at 375px (the width sweep, 2026-09-16). One tighter tier, still one line, still every label whole. */
@container (max-width: 400px) { nav.tabs.fit .tab { font-size: 11.5px; padding: 0; letter-spacing: -0.02em; } }

/* A fixed screen keeps to the window: rows scroll inside their panel, the heading row stays. */
main.content:has(> .screen.fixed) { overflow: hidden; display: flex; flex-direction: column; }
.screen.fixed { height: 100%; min-height: 0; }
/* A notice at a fixed screen's foot (main.js draw): the screen takes what is left, the notice keeps its own height. */
main.content:has(> .screen.fixed) > .screen.fixed { flex: 1 1 0; height: auto; }
main.content > .screen.fixed + .notice { flex: none; margin: 8px 0 0; }
/* Only the part that fills may give up height: a tab row never shrinks under the panels (seen cut on Standings at 375px). */
.screen.fixed > :not(.fill) { flex-shrink: 0; }
.screen.fixed > .fill, .screen.fixed .vpane { min-height: 0; }
.screen.fixed .vpanes { grid-auto-rows: minmax(0, 1fr); }
.screen.fixed .panel { display: flex; flex-direction: column; min-height: 0; }
.panel > .vscroll { min-height: 0; }
.screen.fixed .panel > .vscroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.screen.fixed table.t thead th { position: sticky; top: 0; z-index: 1; background: var(--bg); }

/* The screen's own picker in a panel's top-right border: "Ratings ▾". */
.panel > header.edge .edge-control { pointer-events: auto; background: var(--bg); padding: 0 4px; }

/* THE TIPS SHEET'S RULES ARE GONE with the sheet (owner, 2026-09-18). Its ⓘ door, the anchored box, the phone's
   bottom-sheet form and the close button it grew tonight all existed to make ONE list of a panel's words reachable.
   A word now explains itself where it is drawn -- `.tip-bubble`, at the foot of this file -- so there is nothing
   left for a door to open. The rule the sheet taught, kept because the bubble obeys it too: NEVER OVER THE THING IT
   EXPLAINS. Measured here on Rosters, the sheet covered 20 elements including every one of `Pos Name C/S P/M E/C
   OVR`, which are precisely the headings its tips existed to explain. */
.edge-control details.picker > summary { min-height: 0; padding: 0 6px; border: 0; font-size: 13px; font-weight: 650; color: var(--muted); gap: 4px; }
.edge-control details.picker > summary::after { border-width: 4px; margin-top: 4px; }
.edge-control details.picker ul { left: auto; right: 0; min-width: 160px; }
/* A PICKER IN THE BORDER IS ONE LINE, as the title is (round 17 #4): the draft's "The class", "Every position ▾" and
   "OVR · POT ▾" held 333 of a 375 border's 333px (DNB 768) and both pickers wrapped onto a second line over the table. Where
   they do not fit, each label gives way to an ellipsis, its ▾ kept; only the label clips, so the open list is never cut. */
.panel > header.edge .edge-control { min-width: 0; }
.panel > header.edge .edge-control details.picker { max-width: 100%; }
.edge-control details.picker > summary { white-space: nowrap; max-width: 100%; }
.edge-control details.picker > summary .choice-current { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* The column dropdown keeps its whole label: it names the columns on show ("OVR · POT"); the title and a list's picker give. */
.panel > header.edge .edge-control.edge-part { flex-shrink: 0; }
/* THE STEPPER (DNB 728, Schedule's month): "‹ July 2026 ›" in the border, the picker's type; the arrows square, bare, and a
   finger's height on touch. A shut end is the disabled half opacity every button wears. */
.stepper { display: inline-flex; align-items: center; gap: 0; font-size: 13px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.stepper .step { min-height: 0; min-width: 0; padding: 0 3px; border: 0; border-radius: 0; background: none; color: var(--accent); font: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.stepper .step:disabled { opacity: 0.5; cursor: default; color: var(--faint, var(--muted)); }
.stepper .step-current { padding: 0 2px; }
/* On touch the arrow's tap area reaches past its glyph (`::before`, as the border picker's does) rather than widening the
   border, which at 375 already holds the scope, the month and the columns. */
.stepper .step { position: relative; }
@media (pointer: coarse) { .stepper .step::before { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: var(--touch-lg); transform: translateY(-50%); } }
@media (pointer: coarse) { .edge-control details.picker > summary { min-height: 32px; } }
/* The scroll bar takes its own room, so it never sits over the last column (seen over POT at 375px). */
.screen.fixed .panel > .vscroll { scrollbar-gutter: stable; scrollbar-width: thin; }
/* At the smallest supported width the top line's buttons close up, so the date is not cut (375px). */
@media (max-width: 400px) {
  header.top { gap: 8px; padding-inline: 10px; }
  .go { gap: 4px; }
  .go .btn { padding: 0 9px; }
}
/* A touch screen's scroll bar floats over content and ignores the gutter: the last column keeps clear of it. */
.screen.fixed .panel > .vscroll table.t td:last-child, .screen.fixed .panel > .vscroll table.t th:last-child { padding-right: 8px; }
.start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 12px 0 4px; }
.start .more { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---- equal cells that fill the screen (owner, 2026-09-14) ----
   A grid of panels: rows share the height, each panel fills its cell and scrolls inside itself. A row never
   goes under 220px; where the rows would, the grid scrolls as a whole (a phone's five or six panels). */
.screen.fixed > .panes.grid { grid-auto-rows: minmax(220px, 1fr); overflow-y: auto; overscroll-behavior: contain; align-content: stretch; }
.panes.grid > .panel { display: flex; flex-direction: column; min-height: 0; margin-top: 9px; }
.panes.grid > .panel > .vscroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; }
.screen.fixed > .panes.grid { padding-top: 0; }

/* A panel's title as its pane's picker ("Active ▾"), top-left in the border. */
.panel > header.edge .edge-title details.picker > summary { font-size: 15px; font-weight: 650; color: var(--accent); padding: 0 4px; }
.panel > header.edge .edge-title details.picker ul { left: 0; right: auto; }
/* A control drawn in the border line is thin; its tap area is not (44px on a coarse pointer). */
.edge-control details.picker > summary { position: relative; }
@media (pointer: coarse) {
  .edge-control details.picker > summary { min-height: 0; }
  .edge-control details.picker > summary::before { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: var(--touch-lg); transform: translateY(-50%); }
}

/* ---- sortable columns (owner, 2026-09-14) ---- */
table.t .sortable { cursor: pointer; user-select: none; }
table.t .sortable:hover, table.t .sorted { color: var(--text); }
table.t .sorted::after { content: " ▼"; font-size: 9px; }
table.t .sorted[data-dir="asc"]::after { content: " ▲"; }
/* A FIGURE COLUMN'S ARROW TAKES NO WIDTH (2nd shared on 2nd gui's Rule 5 board at 375: "POT ▼" made a two-digit column as
   wide as its heading plus an arrow, and two names lost their last letter beside it). Over a right-aligned heading the
   arrow is a zero-width box drawn into the cell's right padding, so the column is as wide as its heading's word; the
   terminal counts it one character, a phone's pixels are dearer. Not `position: absolute`: a fixed screen's headings are
   sticky (above), and a positioned heading would stop sticking. */
table.t th.num.sorted::after { display: inline-block; width: 0; margin-left: 1px; content: "▼"; }
table.t th.num.sorted[data-dir="asc"]::after { content: "▲"; }
@media (pointer: coarse) { table.t th.sortable { height: 30px; vertical-align: bottom; } }
/* A name and its status word share a cell: the NAME gives way, never the status (seen "Casey Goodwin t…" at 375px). */
/* A short form's tail a cut never eats (main.js `wearShort`): the head gives way with its ellipsis, the tail keeps its width
   and its leading space ("Angel Bas… +3"). */
table.t td [data-short]:has(> .short-tail) { display: flex; min-width: 0; }
table.t td .short-head { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.t td .short-tail { flex: none; white-space: pre; }
table.t td.flex .pair { display: flex; align-items: baseline; gap: 0.3em; min-width: 0; }
table.t td.flex .pair > .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.t td.flex .pair > .status { flex: none; }
/* ...BUT THE NAME NEVER GOES TO NOTHING (2nd shared, row 150 at 375: "they asked for h" with no name at all beside it).
   A status is a short mark; a long one ("they asked for him") would take the whole cell under the rule above. It may
   take the cell less a 9ch name (an initial and most of a surname), and never under 3ch, so "IL" or "DFA" stays whole
   in the narrowest cell. Not in a `wrap` cell: a refusal's way out carries its consequences there as a sentence
   (`client/src/view/refusal.ts`), which must never be cut. */
table.t td.flex:not(.wrap) .pair > .status:not(.faint) { max-width: max(3ch, 100% - 9ch - 0.3em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A COLUMN THE TREE MARKS `wrap` WRAPS ITS NAME TOO (waivers at 375: "Claim Tanner Banks: choose who ma…" beside its
   "10 of 29"; the claims column is `wrap: true` and only a bare cell honoured it). The status keeps its place whole. */
table.t td.flex.wrap .pair > .name { white-space: normal; overflow: visible; text-overflow: clip; }
/* A FAINT "AFTER" IS THE PART THAT GIVES WAY. Needs You leads with the task's title and the story rides after it,
   faint (shared 51edc1e2). Under the rule above, written for a name beside a short status mark, the story never
   shrank and the title shrank to nothing: at 375 the line read "Detroit Kestrels 97 farmhands could be ta…" with no
   title at all. Faint trailing text now shrinks first, and the name only once it is gone. A status mark is not faint
   and keeps the rule above. */
table.t td.flex .pair > .status.faint { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ...EXCEPT IN A `wrap` CELL, where the faint words are a reason and must be read whole: a refused choice's "off the
   40-man: waivers first", the owner's own question on row 86 #2, was cut to "off the 40-man: w…" at 375 while its
   label wrapped. There the pair wraps as two units: the label, then the reason whole on the next line if it will not
   fit beside it. */
table.t td.flex.wrap .pair { flex-wrap: wrap; }
table.t td.flex.wrap .pair > .status.faint { flex: 0 1 auto; white-space: normal; overflow: visible; text-overflow: clip; }

/* ---- tree screens: rules every tree needs (Schedule and News, 2026-09-14) ---- */
/* A screen whose body is one panel fills the screen, as a grid's panels do (owner, 2026-09-14). */
.screen.fixed > section.panel { flex: 1 1 auto; }
/* Tones on a cell's words: "you" is the accent, a strong figure is heavier. */
table.t td span.you { color: var(--accent); }
table.t td span.warn { color: var(--warn); }
table.t td span.figure { font-weight: 650; }
/* A row whose words wrap reads from its first line: every cell sits on the same baseline. */
.screen.fixed table.t td { vertical-align: baseline; }
/* A grade drawn as a bar in a cell (Text.bar): the bar, the figure, the ceiling, in fixed tracks so bars line up. */
table.t td span.gbar { display: inline-grid; grid-template-columns: 84px 2em 3em; align-items: center; column-gap: 10px; }
@container (max-width: 400px) { table.t td span.gbar { grid-template-columns: 56px 1.8em 2.8em; column-gap: 8px; } }
table.t td span.gbar .grade { text-align: right; }
table.t td span.gbar .ceiling { font-size: 13px; font-variant-numeric: tabular-nums; text-align: left; }
/* Rows at least as tall as their tallest whole panel, then stretched to fill; a table's panel keeps a 220px floor and
   scrolls inside itself. Inner scroll returns only where the window is too short (optimization, 2026-09-14). */
.screen.fixed > .panes.grid { grid-auto-rows: minmax(auto, 1fr); }
.screen.fixed > .panes.grid > .panel { min-height: 220px; }
.screen.fixed > .panes.grid > .panel.whole { min-height: auto; }
.screen.fixed > .panes.grid > .panel.whole > .vscroll { min-height: auto; overflow-y: visible; }
/*
 * **BUT A DESKTOP PAGE NEVER SCROLLS** (the owner, 2026-09-21: *"the full screen desktop view should not scroll"*).
 * A whole panel held its row at its content's height, so four wrapping headlines in News made the grid taller than
 * the window and the whole page scrolled, cutting the top row's titles. Where the grid has columns, a whole panel
 * is a cell like the rest: it takes its share and scrolls inside itself if its words run long. One column (a
 * phone) keeps the rule above, where the grid scrolls as a whole anyway.
 */
@media (min-width: 760px) {
  .screen.fixed > .panes.grid > .panel.whole { min-height: 0; }
  .screen.fixed > .panes.grid > .panel.whole > .vscroll { min-height: 0; overflow-y: auto; }
}
/* A screen's heading: the name large, the facts beside it (player page). */
header.screen-head h1 { margin: 0; font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.2; }
header.screen-head p.line { margin: 2px 0 0; color: var(--text); }
header.screen-head p.line .grade { font-size: 20px; font-weight: 700; }
header.screen-head p.line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
header.screen-head p.line .faint:not(:first-child) { margin-left: 8px; }
/* A secondary panel's button: hidden until the grid is one column (render.js); its panel opens as a sheet from the foot. */
details.secondary { display: none; }
/*
 * `secondary: 'always'` -- the owner's modal: behind a button at EVERY width, not only where the grid is one
 * column. The width-conditional version stays exactly as it was for `'whenNarrow'`, which is what the
 * ballgame's play-by-play log uses and depends on.
 */
details.secondary.always { display: block; }
.panel.secondary.always { display: none; }
/*
 * EXCEPT THE ONE INSIDE THE MODAL. The panel is drawn twice -- once in the body, once in the sheet -- and
 * hiding "the always-secondary panel" hid both, so the modal opened as an empty 26px box over a dimmed
 * page. It photographed as a working modal; only opening it showed there was nothing in it.
 */
.secondary-sheet > .panel.secondary.always { display: block; }
details.secondary > summary { list-style: none; display: inline-flex; min-height: var(--touch-lg); }
details.secondary > summary::-webkit-details-marker { display: none; }
/*
 * A MODAL, NOT A DRAWER STUCK TO THE BOTTOM EDGE (the owner, 2026-09-20: "Modal is opening at the bottom").
 * It sits in the middle of the window over a dimmed page, so it reads as the thing you are now looking at
 * rather than as a tray that slid up under the screen you were on.
 */
details.secondary[open]::before { content: ""; position: fixed; inset: 0; z-index: 19; background: rgba(0, 0, 0, 0.55); }
/*
 * THE BUTTON STAYS ON TOP OF ITS OWN SCRIM, so the thing that opened it is the thing that closes it. A
 * `<details>` toggles from its summary and nothing else; with the scrim over it there was no way out of the
 * modal at all -- the same trap as the view picker vanishing, one size down.
 */
/* The open summary stays UNDER the scrim: the sheet is centred, not anchored to it, so lifting it above
   punched the button through the middle of the sheet and across the form. The sheet closes with its own ✕. */
details.secondary[open] > summary.btn { position: relative; z-index: 18; }
details.secondary[open] > .secondary-sheet > .sheet-close {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  min-width: var(--touch); min-height: var(--touch);
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer;
}
details.secondary:not([open]) > .secondary-sheet > .sheet-close { display: none; }
details.secondary[open] > .secondary-sheet { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: 80dvh; overflow-y: auto; z-index: 20; background: var(--bg);
  padding: 8px 16px 16px; border: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
/* Under the panels, and the button is the width of the screen: it is a way OUT of this page, not a chip on it. */
.screen.fixed > .secondaries { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
/*
 * A MODAL TRIGGER IS AS WIDE AS THE BUTTONS IT SITS AMONG. The full width was scoped to the screen-level
 * list, so the moment the extension's button moved into the Actions panel (shared `e37b8830`, the owner's
 * *"put it in actions panel"*) it drew 169px wide beside three 329px siblings -- in the panel he asked for
 * and visibly not one of them. The rule belongs to the button, not to one of the two places it can live.
 */
.screen.fixed > .secondaries > details.secondary > summary.btn,
.vstack > details.secondary > summary.btn { width: 100%; justify-content: center; }
/* A struck value: a day-to-day man's healthy grade beside today's (plan decision 19); the meaning never rests on the strike alone. */
.struck { text-decoration: line-through; color: var(--faint); }
span.spans { white-space: nowrap; }
th .order-short { display: none; }
@container (max-width: 60ch) { th .order-long { display: none; } th .order-short { display: inline; } }
/* ---- the ballgame (a still first: docs/log/BALLGAME-VIEW-2026-09-14.md) ---- */
.scene .bug { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-variant-numeric: tabular-nums; }
.scene .bug .club { display: inline-flex; gap: 8px; align-items: baseline; min-height: 0; }
/* `min-height: 0`: the top bar's `.club` (above) is a 44px touch target, and the bug's clubs share the class, so on a phone each
   club stood 44px tall inside the one-line bug and the scores rode above the inning (2nd gui, game-day #2's drive at 375). */
.scene .bug .club .abbr { color: var(--muted); font-weight: 650; }
.scene .bug .runs { font-size: 26px; }
.scene .bug .inning { font-weight: 650; }
.scene .bug .inning-short { display: none; font-weight: 650; }
.scene .bug .outs { display: inline-flex; gap: 5px; }
.scene .bug .out { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--muted); }
/* The last play's words, kept until the next pitch: quieter than a live call, never a panel. */
/* AN ORDER FIELD DRAWN AS A TABLE: the move controls are a trailing column that never drops, so they must
   stay narrow and side by side. Left to the button's own layout they wrapped one per line and every row of the
   pitching staff was three lines tall on a phone -- a table whose rows are taller than the list it replaced.
   `white-space: nowrap` on the cell, not a width: the cell is as wide as two buttons and no wider. */
.form-field.order.as-table td.extra { white-space: nowrap; padding-left: 2px; vertical-align: middle; }
.form-field.order.as-table td.extra .arrows { display: flex; gap: 2px; justify-content: flex-end; }
.form-field.order.as-table td.extra button.move { width: auto; min-width: 22px; padding: 0 4px; justify-content: center; font-size: 13px; }
.form-field.order.as-table td.extra .why { display: block; color: var(--warn); font-size: 11px; text-align: right; }

/* THE LINEUP CARD (the owner, 2026-09-21, tools/ui/mocks/lineup3.html). Nothing here is a word: an invalid card
   is a red panel, a hole a red row, a man out of position his POS in amber. */
.panel.alarm { border-color: var(--danger); }
.panel.alarm > header.edge h2, .panel.alarm > header.edge .edge-title summary { color: var(--danger); }
table.t tr.marked td { background: color-mix(in srgb, var(--danger) 10%, transparent); }
/* POS is its own control, drawn as the text it holds: no box, no caret, the row's own height -- a row with a
   control in it is exactly as tall as the rows round it (the owner's rule about row heights, 2026-09-20). */
.form-field.order.as-table td .form-choice.cellpick > summary { min-height: 0; padding: 0; border: 0; background: none; gap: 0; }
.form-field.order.as-table td .form-choice.cellpick > summary::after { display: none; }
.form-field.order.as-table td .form-choice.cellpick .choice-current { font-weight: 650; }
.form-field.order.as-table td .form-choice.cellpick .choice-current.you { color: var(--accent); }
.form-field.order.as-table td .form-choice.cellpick .choice-current.warn { color: var(--warn); }
.form-field.order.as-table td .form-choice.cellpick .choice-current.bad { color: var(--danger); }
.form-field.order.as-table td .form-choice.cellpick .choice-current.faint { color: var(--faint); }
/*
 * EVERY PICKER IS THE SAME VERTICAL LIST, FROM ONE PLACE (the owner, 2026-09-22: *"it should always be a vertical
 * list ... visual consistency is a huge part of UX"*, then *"it should literally be a re-usable component ... so that
 * we only need to change it in one place"*). Every picker in the app is already ONE builder -- `render.js` `choiceOf`
 * -- and what had drifted was here: the position menu carried its own rules and drew a 3-wide grid of the diamond's
 * codes, the only dropdown in the app shaped differently. There is now one rule set for a picker inside a table cell
 * or an order row (`.cellpick`, given by `cellChoiceCls`), and the man's own name (`.man`, which grows with the row).
 * A position he plays is still drawn in the accent, and the one he holds is still marked.
 */
@media (pointer: coarse) { .form-field.order.as-table td .form-choice.cellpick > summary { min-height: 0; } }
.scene p.caption.last { color: var(--muted); }
/* The earlier lines of the same turn (a called steal above the batter's result): the same line, one step quieter. */
.scene p.caption.last.before { margin-bottom: 0; color: var(--faint); }
.scene p.caption.last.before + p.caption.last { margin-top: 4px; }
/* THE PICTURE. It takes the width it is given and keeps a broadcast's shape, so one responsive GUI means one
   picture that is genuinely a different frame at each size rather than a phone frame in a big window -- the
   camera solves its focal length from the canvas, and a fixed-width canvas was how this lane's own harness
   spent an afternoon re-measuring a phone. The height is capped so the bar and the caption are never pushed
   off a short landscape phone, where the chrome is already 25% of the screen. */
/* Square at every width (STYLE-GUIDE: "A corner is never rounded"; DNB 732: 8px above 480 px, so 1280 drew it rounded). */
.scene canvas.pic { display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 52vh; margin: 8px 0; border-radius: 0; background: #0d1117; }
@media (max-width: 420px) { .scene canvas.pic { aspect-ratio: 4 / 3; max-height: 44vh; } }

/* WHO IS BATTING AND WHO IS PITCHING ARE NEVER BEHIND THE CALLS (game design, round 11, at 375: "you are choosing
   steal, bunt and hit-and-run without seeing who is at the plate"). Measured on a played game at 375: the sticky
   `Your calls` panel stood from y 314 to 671 and the two man-cards sat at 453-613 -- drawn, and painted over, the
   SAME failure the turn caption had this morning and the same fix. A phone cannot hold the bug, the caption, both
   cards, the whole picture AND nine calls; the picture is the one of them that degrades gracefully, because its
   top half still shows the play, so it goes last and everything that is a FACT stays above it.
   THE ORDER IS THE RESULT AND THEN THE MEN, and the third attempt is what settled it. Putting the cards ABOVE the
   caption kept them clear on all six plays of a run -- and left the caption 15px, so the turn's result was behind
   the bar every time, which is the thing the owner ruled this morning must stay on screen. What actually fixed the
   cards was halving their height (side by side, below), not moving them: with that, the result keeps its place and
   both men clear the bar on an ordinary two-line turn.
   Narrow only: on a screen with room the order he approved is unchanged (the bug above, the caption and the cards
   below the picture). */
@media (max-width: 420px) {
  .scene { display: flex; flex-direction: column; }
  .scene > .bug { order: 0 }
  .scene > p { order: 1 }
  .scene > .cards { order: 2 }
  .scene > canvas.pic { order: 3 }
}
.scene .bug .out.on { background: var(--warn); border-color: var(--warn); }
.scene .bug .diamond { position: relative; width: 38px; height: 26px; display: inline-block; }
/* The count the picture is drawing (`picture.js` liveCount): it stands for the served one while it shows. */
.scene .bug:has(> .count.live) > .count:not(.live) { display: none; }
.scene .bug .count.live { color: var(--warn); font-weight: 700; }
.scene .bug .base { position: absolute; width: 10px; height: 10px; border: 1.5px solid var(--muted); transform: rotate(45deg); }
.scene .bug .base.on { background: var(--accent); border-color: var(--accent); }
.scene .bug .base.b2 { left: 14px; top: 0; }
.scene .bug .base.b3 { left: 1px; top: 12px; }
.scene .bug .base.b1 { left: 27px; top: 12px; }
.scene p.caption, .scene p.halfover, .scene p.final { margin: 18px 0 8px; font-size: 20px; font-weight: 650; line-height: 1.35; }
.scene p.halfover { text-transform: uppercase; color: var(--accent); letter-spacing: 0.02em; }
.scene dl.matchup { margin-top: 14px; }
.gamebar { display: flex; flex-direction: column; gap: 12px; }
.gamebar p.bar-note { margin: 0; }
.gamebar .turn { min-height: 52px; font-size: 18px; }
.gamebar .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gamebar .acts.standing { padding-top: 8px; border-top: 1px solid var(--border); }
.gamebar button.act { display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch-lg); padding: 0 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 0; font: inherit; cursor: pointer; }
.gamebar button.act .digit { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 13px; display: none; }
.gamebar button.act.shut { color: var(--faint); }
.gamebar button.act.armed { border-color: var(--accent); }
.gamebar .choice-sheet ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gamebar .choice-sheet button.act { width: 100%; justify-content: flex-start; }
.gamebar button.act .of { color: var(--muted); font-size: 13px; }
.panel .vstack > p { margin: 0 0 6px; }
.scene .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 16px; }
.scene .mancard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 0; cursor: pointer; }
.scene .mancard .name { font-size: 18px; }
.scene .mancard .facts { color: var(--muted); }
/* Where the scene has room (a desktop), the still is drawn large: the bug, the diamond and the cards. */
section.panel:has(> .vscroll > .scene) { container-type: inline-size; }
@container (min-width: 44ch) {
  .scene .bug { gap: 14px 28px; }
  .scene .bug .runs { font-size: 40px; }
  .scene .bug .club .abbr, .scene .bug .inning { font-size: 20px; }
  .scene .bug .out { width: 16px; height: 16px; }
  .scene .bug .diamond { width: 76px; height: 52px; }
  .scene .bug .base { width: 20px; height: 20px; }
  .scene .bug .base.b2 { left: 28px; top: 0; }
  .scene .bug .base.b3 { left: 2px; top: 24px; }
  .scene .bug .base.b1 { left: 54px; top: 24px; }
  .scene p.caption, .scene p.halfover, .scene p.final { font-size: 26px; margin: 28px 0 12px; }
  .scene .mancard .name { font-size: 22px; }
}
.scene .mancard .grade-line .grade, .scene .mancard .grade-line .spans { font-size: 20px; font-weight: 700; }

/* SIDE BY SIDE ON A PHONE, because stacked only the batter cleared the calls panel: 220px a card is `auto-fit`'s
   floor and two of those do not fit 375, so the pitcher stayed underneath it. They are two facts of the same kind,
   read together, and the TUI gives them a column each. AFTER the base rules deliberately: the same selector inside
   a media query does not outrank one that comes later in the file, which is how the first attempt lost. */
@media (max-width: 420px) {
  .scene .cards { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
  /* Tried and REVERTED, recorded so nobody spends the hour again: flowing a card's facts inline (`flex-direction:
     row; flex-wrap: wrap`) to make it two lines. At 161px a column, "Matt McLain" and "2B · bats R, throws R" do
     not share a line, so the card wrapped to four anyway and measured 125-148px -- the same as stacked. The cards
     cannot be made to fit by styling; what is left is a choice about WHAT a phone shows, which is the owner's. */
  .scene .mancard { padding: 8px 10px; gap: 2px; }
  .scene .mancard .name { font-size: 16px; }
}

/* A menu button beside a thing's name (the player page's Actions, nodes.ts MenuNode): its list drops beneath it,
   over the page, and scrolls when long. */
.screen-head .menu-wrap { position: relative; display: inline-block; margin-top: 8px; }
.menu-button .caret { color: var(--muted); }
.menu-button.shut { color: var(--faint); }
.menu-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; width: min(320px, calc(100vw - 32px)); max-height: min(60vh, 520px); overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 0; box-shadow: 0 8px 24px rgb(0 0 0 / 0.4); }
.menu-list ul { list-style: none; margin: 0; padding: 0; }
.menu-list .menu-of { margin: 4px 8px 6px; color: var(--muted); font-size: 13px; }
.menu-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 0; background: none; color: var(--accent); font: inherit; text-align: left; cursor: pointer; }
.menu-row:hover { background: var(--surface2); }
.menu-row .digit { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 13px; min-width: 1ch; display: none; }
/* A move's help, under its name (decision 22): the row becomes two lines, the name still first. The help sits
   TIGHT under its own label and the air goes after it, so the eye never reads a sentence as the next move's
   (found by looking at 375px, 2026-09-16). The row's gap is horizontal only, or it would push them apart. */
.menu-row { flex-wrap: wrap; row-gap: 0; column-gap: 10px; align-items: baseline; padding-bottom: 8px; }
/* A digit is a keyboard's cue: drawn only where there is a mouse, never on touch (owner, 2026-09-15). */
@media (hover: hover) and (pointer: fine) { .gamebar button.act .digit, .menu-row .digit { display: inline; } }
.menu-row .label { flex: 1; }
@media (hover: hover) and (pointer: fine) { .menu-row u.letter { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; } }
.menu-row .caret { color: var(--muted); }
.menu-row.shut { color: var(--faint); }
.menu-list .menu-close { margin: 6px 4px 2px; }
@media (pointer: coarse) { .menu-row { min-height: var(--touch-lg); } }

/* THE SUB SCREEN (render.js subsOf): four groups, 2×2 where there is room, the lineup first on one column. */
.subs { display: flex; flex-direction: column; gap: 12px; }
.subs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.subs-prompt { margin: 0; font-weight: 600; }
.subs-prompt.why { color: var(--faint); font-weight: 400; }
.subs-prompt.forced { color: var(--danger); }
.subs-grid { display: grid; grid-template-columns: 1fr; gap: 12px 16px; }
.subs-grid .lineup { order: 1; } .subs-grid .batters { order: 2; } .subs-grid .mound { order: 3; } .subs-grid .pitchers { order: 4; }
@container (min-width: 88ch) {
  .subs-grid { grid-template-columns: 1fr 1fr; }
  .subs-grid .batters { order: 1; } .subs-grid .pitchers { order: 2; } .subs-grid .lineup { order: 3; } .subs-grid .mound { order: 4; }
}
.subs-group h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.subs-men { display: flex; flex-direction: column; gap: 4px; }
.subman { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--border); border-left-width: 3px; border-radius: 0; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.subman .top { display: flex; align-items: baseline; gap: 8px; }
.subman .order, .subman .pos { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.2ch; }
.subman .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subman .hands { color: var(--muted); }
.subman .sub-line { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.subman .marked-word { color: var(--accent); font-weight: 600; }
.subman.playing { background: var(--surface2); }
.subman.picked { border-color: var(--accent); background: var(--selected); }
.subman.marked { border-left-color: var(--accent); }
/* A man who may not enter (resting tonight, hurt, gone) reads SHUT, a step below a man with no door open this pitch
   (`:disabled`): his grade keeps its own colour, so `--faint` text alone left the four resting starters the brightest rows
   on the screen (driven at 375, 10-03, after franchise's 1fad158f9 served them). 0.45 is `.form-send.shut`'s. */
.subman.barred, .subman.used { color: var(--faint); cursor: default; opacity: 0.45; }
.subman:disabled { opacity: 0.7; }
@media (pointer: coarse) { .subman { min-height: var(--touch-lg); } }

/* A FORM (render.js formOf): an order's rows with their pickers and ↑ ↓, the session's why beneath a marked row. */
.form { display: flex; flex-direction: column; gap: 12px; }
.form-field h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.form-field .help { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.form-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.form-row { display: grid; grid-template-columns: 2ch minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); }
.form-row.marked { border-color: var(--warn); }
.form-row .cells { display: flex; gap: 6px; min-width: 0; }
.form-row .form-choice.cellpick { flex: none; }
.form-row .form-choice.man { flex: 1; min-width: 0; }
.form-row .why { grid-column: 2 / -1; color: var(--warn); font-size: 13px; }
.form-row .moves { display: flex; gap: 4px; }
.form-row .btn.move { min-width: 36px; padding: 0 8px; }
.form-choice > summary { display: flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 0 8px; border-radius: 0; cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-choice > summary::-webkit-details-marker { display: none; }
.form-row .form-choice .choice-label { display: none; }
.form-choice .choice-current { color: var(--text); }
.form-choice.cellpick .choice-current { color: var(--accent); font-weight: 650; }
.form-choice ul { max-height: 50dvh; overflow-y: auto; }
.form-choice .choice-row .detail { color: var(--muted); font-size: 13px; }
/* A shut option or button: greyed, pressable for its tip only (render.js `choiceOf`, `aria-disabled`). */
button.choice-row.shut { color: var(--faint); cursor: default; }
button.choice-row.shut .detail { margin-left: auto; font-size: 12px; }
button.form-send.shut { opacity: 0.45; cursor: default; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-foot p { margin: 0; }
.form.pending { opacity: 0.85; }
@media (pointer: coarse) { .form-choice > summary, .form-row .btn.move { min-height: var(--touch-lg); } }

/* Choose your club (screens/club.js). */
.club-group h3 { margin: 12px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.clubs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16ch), 1fr)); gap: 6px; }
.club-choice { width: 100%; justify-content: flex-start; }
.club-choice.on { border-color: var(--accent); color: var(--accent); }
.form-field.range label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.form-field.range .band { color: var(--muted); }
.form-field.range .range-words { flex-basis: 100%; }
/* A dial on one fixed line: its name left, the short band word right, never wrapping, so the slider below holds still. */
.form-field.range .range-words.oneline { display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; }
/* A band with no short word yet keeps two lines' height, always, so the slider below holds still. */
.form-field.range .range-words.banded { min-height: 2lh; }
/* THE SLIDER, a row of blocks (the owner, 2026-09-26; `ui/controls.js` slider). The row is 36px tall to the finger and
   draws 18px of blocks; a vertical swipe that starts on it still scrolls the page (pan-y). */
.form-field.range .slider { flex-basis: 100%; display: flex; gap: 3px; height: 18px; padding: 9px 0; box-sizing: content-box;
  cursor: pointer; touch-action: pan-y; user-select: none; }
.slider .block { flex: 1 1 0; min-width: 0; background: var(--surface2); }
.slider.fill-neutral .block.on { background: var(--accent); }
.slider.fill-thirds .block.on.t0 { background: var(--danger); }
.slider.fill-thirds .block.on.t1 { background: var(--warn); }
.slider.fill-thirds .block.on.t2 { background: var(--good); }
/* A block the field cannot take now (past the club's room, or past a split already whole): drawn, not filled; a tap on
   it says why (row 81). */
.slider .block.na { background: transparent; box-shadow: inset 0 0 0 1px var(--surface2); }
.slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* THE TIP BUBBLE (tips.js): hover on a pointer, a long press on a finger (owner, 2026-09-18). One element on the
   body, positioned in script, because the words that most need explaining sit inside tables that scroll and a
   pseudo-element would be clipped by its own scroll container. */
.tip-bubble { position: fixed; z-index: 60; max-width: min(320px, calc(100vw - 16px)); padding: 8px 10px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 8px 20px -8px rgb(0 0 0 / 0.65); font-size: 13px; line-height: 1.45; pointer-events: none; }
/* NOTHING IS UNDERLINED FOR HAVING AN EXPLANATION (the owner, 2026-09-20: *"I DONT WANT UNDERLINES UNDER
   HOVERABLE ITEMS. YOU MADE THAT CHOICE"* -- and he had already settled the affordance: a tip is a hover on a
   pointer and a long press on a finger, with no inline mark). The dotted underline was mine and unasked for,
   and it made one panel draw two kinds of row: Assignment and Availability wore it while Club, Salary and
   Health, which explain themselves too, did not. The cursor still changes on a pointer, which costs no ink. */
@media (hover: hover) {
  [data-tip] { cursor: help; }
  th[data-tip].sortable { cursor: pointer; }
}
html.no-tips .tip-bubble { display: none; }
html.no-tips [data-tip] { cursor: inherit; }

/* A PANEL THAT SUMMARISES A SCREEN (render.js panelOf): its TITLE is the way through, not the whole panel -- the
   rows below it do things of their own. Styled as the title still, with a chevron, rather than as a button: it is
   the heading you were already reading, and one more button in a panel border is one more thing to parse. */
.panel > header.edge h2.summarises { margin: 0; }
.panel > header.edge .panel-to { color: inherit; text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; }
.panel > header.edge .panel-to .caret { color: var(--muted); }
.panel > header.edge .panel-to:hover, .panel > header.edge .panel-to:focus-visible { color: var(--accent); }
.panel > header.edge .panel-to:hover .caret, .panel > header.edge .panel-to:focus-visible .caret { color: var(--accent); }
/* A finger needs the app's floor on it; the heading's own box is shorter than that. */
@media (pointer: coarse) { .panel > header.edge .panel-to { min-height: var(--touch); align-items: center; } }
/* Where the title is already a picker (Home), the way through is its own small control in the border. */
.panel > header.edge .edge-to .panel-to { font-size: 13px; font-weight: 650; color: var(--muted); }
.panel > header.edge .edge-to .panel-to:hover, .panel > header.edge .edge-to .panel-to:focus-visible { color: var(--accent); }

/* THE ACTIONS PAGE (render.js actionsPage; owner, 2026-09-18). The page is the full command set; the row context
   menu will be the fast path into it. Room under each move for the two sentences the session already serves --
   what it does, and why a shut one is shut -- which the dropdown it replaces had nowhere to put. */
.actions-page { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.actions-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 12px; }
.actions-head h1 { grid-column: 2; margin: 0; font-size: 20px; }
.actions-head .line { grid-column: 2; margin: 0; color: var(--muted); font-size: 13px; }
.actions-back { grid-row: 1 / span 2; align-self: center; min-height: var(--touch); padding: 0 12px; }
.actions-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.action-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; min-height: var(--touch);
  padding: 10px 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.action-row .label { grid-column: 1; font-weight: 650; }
.action-row .caret { grid-column: 2; grid-row: 1; color: var(--muted); }
/* Why a shut move is shut sits under its name, full width: the reason it cannot be made, said once (what a move DOES is its
   tip, DNB 733 (b)). */
.action-row .shut-why { grid-column: 1 / -1; font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--warn, var(--muted)); }
.action-row.shut { cursor: not-allowed; }
.action-row.shut .label { color: var(--faint); }
.action-row:not(.shut):hover, .action-row:not(.shut):focus-visible { border-color: var(--accent); }

/* THE ROW CONTEXT MENU (main.js rowMenuSheet): the fast path into the Actions page. A short list in the served
   order, each move with what it does as its tip, and always a way through to the full set. */
.sheet.row-menu ul { list-style: none; margin: 0; padding: 0; }
.sheet.row-menu .menu-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; width: 100%; gap: 2px 8px; min-height: var(--touch); padding: 10px 14px;
  border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sheet.row-menu .menu-row .label { font-weight: 650; }
/* A family's ▸ on the move's own line (it fell under the name once the help sentence left, DNB 733 (b)). */
.sheet.row-menu .menu-row .caret { grid-column: 2; grid-row: 1; color: var(--muted); }
.sheet.row-menu .menu-row:hover, .sheet.row-menu .menu-row:focus-visible { background: var(--surface); }
.sheet.row-menu .row-menu-more { width: 100%; min-height: var(--touch); margin-top: 4px; border-top: 1px solid var(--border); }

/* A TYPED VALUE (render.js case 'value'): the free-agent offer's salary. The UNIT sits INSIDE the field, because a
   unit in its own column costs width a salary needs at 393px and reads as a separate fact rather than part of the
   number. Text, not number: a half-typed "2." is a real state and a number input has to lie about it. */
/* The label on its own line, so it is not jammed against the box it names. */
.form-field.value label { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.form-field.value .value-box { display: inline-flex; align-items: center; gap: 4px; min-height: var(--touch);
  padding: 0 10px; border: 1px solid var(--border); background: var(--bg); }
.form-field.value .value-box:focus-within { border-color: var(--accent); }
.form-field.value .unit { color: var(--muted); }
.form-field.value .form-value { min-width: 0; width: 10ch; min-height: var(--touch); border: 0; background: none;
  color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.form-field.value .form-value:focus { outline: none; }
/* Words, not a number (Find a player's name): the box takes the row, as a line of text wants. */
.form-field.value.text label { align-items: stretch; }
.form-field.value.text .value-box { display: flex; }
.form-field.value.text .form-value { width: 100%; flex: 1; }
/* The session's own words on a value it will not take; nothing while nothing has been asserted. */
.form-field.value .help.invalid { color: var(--warn, var(--muted)); }
/* A form that assembles a command rather than being the state: its one press. */
.form-submit { margin-top: 12px; }
/* The start screen's form (shared's newLeagueScreen) already spaces its rows; Start sits where the hand-built one did. */
.new-league .form-submit { margin-top: 0; }
.form-send { width: 100%; min-height: var(--touch-lg, var(--touch)); }
.form-send[disabled] { opacity: 0.5; cursor: not-allowed; }

/* WHAT THIS TABLE IS NOT SHOWING (render.js `dropLine`). A column dropped by a container query used to vanish in
   silence -- measured at 393px, Standings hid L10 and STRK on all six divisions with nothing saying so, so a player
   on a phone could not know they exist. The chips are shown by the SAME queries that do the hiding, so the mark and
   the column can never disagree, and each carries its column's own tip. */
.table-wrap { display: contents; }
p.dropmarks { margin: 4px 0 0; font-size: 12px; color: var(--faint); }
p.dropmarks .dm-label { color: var(--faint); }
p.dropmarks .dm { color: var(--muted); }
/* An omit column `squeezeOmits` (main.js) took to keep a name whole: gone, and said on the table's own Not shown line. */
table.t .omit-squeezed { display: none !important; }
p.dropmarks.squeezing { display: block !important; }
p.dropmarks .dm.squeezed { display: inline !important; }
/* How many rows this list is not showing (`TableNode.more`). A count, not a control: where the rest lives is the
   panel's own way through (`summarises`). */
p.morecount { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

/* The screen's view picker when no panel border claimed it (a body of bare controls). */
.loose-views { display: flex; justify-content: flex-end; margin: 0 0 10px; }

/*
 * A CHOICE FIELD IS A ROW: its name on the left, the current value in a dropdown on the right (the owner,
 * 2026-09-20, of availability sitting among Club / Salary / Contract ends -- "Availability <THE CURRENT
 * AVAILABILITY CHOICE>"). The left column starts at the width the facts' labels use, so a picker among facts
 * lines up with them, and grows for a longer name rather than colliding with its own value.
 */
/*
 * **IT LINES UP WITH THE FACTS OR IT IS NOT ONE OF THEM.** `factsTable` gives its label column `width: 16`
 * (`screens/contracts.ts:43`) and no gap, so the value starts exactly sixteen characters in. A picker in that
 * panel has to start there too -- the owner, 2026-09-20, of a 4px drift and a 2px height difference: *"why
 * the fuck do they look different? They have different spacing, and they're not aligned."* Guessing 13ch and
 * adding a gap put the value four pixels past the column it was meant to join.
 */
/*
 * **THE SAME BOX AS A FACTS ROW, MEASURED FROM ONE.** A facts row is `line-height 18.9px + 3px padding top
 * and bottom = 25px` (`table.t td`). This carried `line-height: 21px` and no padding, which came to 21 --
 * four pixels short, and visible as soon as the two sit in one panel. The owner, having had to ask six
 * times: *"i distinctly remember screaming at you multiple times to make all these rows the same size."*
 * So it takes the cell's padding and inherits the cell's line-height rather than naming a number of its own;
 * a number of its own is what put it four pixels out twice.
 */
.form-field.choice.as-row { display: grid; grid-template-columns: minmax(16ch, max-content) 1fr; align-items: baseline; column-gap: 0; padding-block: 3px; }
/* ONE LINE A LABEL (the owner, 10-11: one line everywhere): a label over 16 characters, Front office's "Play-by-play kept", took a
   second line in a panel with room to spare (the fan walk, 11-09); its column grows for it, the rest keep 16ch. */
.form-field.choice.as-row > .field-label { white-space: nowrap; padding-right: 1ch; }
.form-field.choice.as-row > .field-label { color: var(--faint); }

/*
 * A CHOICE ROW LOOKS LIKE THE ROWS BESIDE IT (the owner, 2026-09-20: "the dropdown should look like the
 * other rows but with a down arrow. It should literally look like summary"). So no box, no border, no
 * background: the current value in the value column in the text's own colour, and a caret after it. The
 * whole thing is still the control -- it just stops announcing itself as one.
 */
.form-field.choice.as-row > details.picker > summary, td > details.picker.rowpick > summary { min-height: 0; padding: 0; border: 0; background: none; color: var(--text); font-weight: inherit; gap: 6px; }
.form-field.choice.as-row > details.picker[open] > summary, td > details.picker.rowpick[open] > summary { background: none; }
/* A cell holding a row's picker lets its list out. The value column of a facts table is the flex column, and
   `td.flex` is `overflow: hidden` for a name's ellipsis -- which clipped the open list to the row's 25px, so
   Witt's Availability opened to nothing (2nd gui at 375, fc072ebaf). */
table.t td.flex:has(> details.rowpick) { overflow: visible; }
/* EVERY ROW AS TIGHT AS THE FACTS (the owner, 2026-09-28, of a form's choice rows sitting 37px apart under facts 25px
   apart: *"Every row as tight as facts. i don't even understand the point of this question."*). Two choice rows in a
   row take none of the form's 12px gap, so New league, pregame and What your staff handles step 25px as a facts table
   does. The finger's target is the whole row, as a table row's is (main.js, "A ROW THAT HOLDS ONE PICKER"), so the
   padded hit box the picker carried on a coarse pointer (35px, which fitted only the old 37px pitch) is gone. */
.form > .form-field.choice.as-row + .form-field.choice.as-row { margin-top: -12px; }
.form-field.choice.as-row { cursor: pointer; }
/*
 * **AND IT IS THE SAME HEIGHT AS THEM, WHICH BEATS THE TOUCH FLOOR HERE.** This carried
 * `min-height: var(--touch)` on a coarse pointer. That variable was undefined, so the declaration was
 * dropped and the row happened to match the facts -- which is what the owner asked for six times and finally
 * got. Defining `--touch` on 2026-09-20 made the rule REAL, and the row grew to 36px while `Club`, `Salary`
 * and `Health` above it stayed at 21: *"i distinctly remember screaming at you multiple times to make all
 * these rows the same size. after 6 times, you finally did. And now you undid the change."*
 *
 * He never asked for a touch floor here. He asked for a row that looks like the rows beside it, and a row
 * taller than its neighbours is not one of them. The tap target is not lost -- the whole row is the control,
 * and the facts rows it matches are the app's own rhythm.
 */
.form-field.choice.as-row > details.picker > summary { min-height: 0; }

/*
 * WHAT YOUR STAFF HANDLES IS LABEL LEFT, CHOICE RIGHT (the owner, 2026-09-21: *"What your staff handles should be
 * left and right aligned"*). A list of the same question asked of many systems, with nothing beside it to line up
 * with, so the choice sits at the panel's right edge rather than at the facts column. Its menu opens leftward so
 * it stays on screen.
 */
.form[data-of="delegation"] > .form-field.choice.as-row { grid-template-columns: 1fr auto; column-gap: 12px; }
.form[data-of="delegation"] > .form-field.choice.as-row > details.picker { justify-self: end; }
.form[data-of="delegation"] > .form-field.choice.as-row > details.picker ul { left: auto; right: 0; }
/* A choice held by another (Minor leagues, while the staff runs something that needs it) is the same row, its value
   where its neighbours' values are but muted, with no ▾ (16px keeps it in line: the caret's 10 and the gap's 6) and
   the why as its tip. */
.form-field.choice.as-row.fixed { cursor: default; }
.form-field.choice.as-row.fixed > .choice-current { color: var(--muted); }
.form[data-of="delegation"] > .form-field.choice.as-row.fixed > .choice-current { justify-self: end; padding-right: 16px; }

/*
 * A MODAL IS ONE BOX, NOT THREE (the owner, 2026-09-20: "this modal is gnarly. box in box in box"). The
 * sheet drew a border, the panel inside it drew another, and each batch inside THAT drew a third, so a
 * player looking at four buttons was looking at four nested rectangles to find them.
 *
 * The sheet IS the outer box: the panel it holds loses its own border and padding, and the batches inside
 * keep only their titles and the space between them. Nothing is regrouped -- the boxes stop being drawn.
 */
/*
 * THE DECISION MODAL IS CENTRED, NOT A BOTTOM SHEET (the owner, 2026-09-20: *"Modal is opening at the
 * bottom"*, of the last one that did). `.sheet` is the menu drawer and belongs above the nav bar; a decision
 * is the thing you came to do, so it sits where the other modals he approved sit, and its panel sheds its own
 * border for the same reason they do -- *"this modal is gnarly. box in box in box"*.
 */
/* The move's own "are you sure" (`main.js` confirmSheet) is a modal too, so it is centred and padded the same way. */
.sheet.decisions, .sheet.moves-sheet {
  position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: 80dvh; overflow-y: auto; z-index: 20; padding: 14px 16px;
}
.sheet.decisions .panel { border: 0; padding: 0; margin-top: 0; }
.sheet.decisions .sim-blocked { margin: 0 40px 8px 0; color: var(--warn); font-weight: 650; }
/* An answer in flight, or a league that has moved under the modal: dimmed until the redraw replaces it (round 16 #21).
   The CONTENT dims and the box stays opaque: a 14 s draft pick from Needs you (game design, 2026-09-26: the sheet stays
   up until the answer returns) showed Home through a see-through box, its lines over the sheet's. A confirm inside the
   Needs you sheet is dimmed by it already, so only the moves sheet's own confirm dims its content. */
.sheet.decisions.held > *, .sheet.moves-sheet > .confirm-body.held > * { opacity: 0.45; transition: opacity 0.12s; }
.sheet.decisions.held, .confirm-body.held { cursor: progress; }
/* the turn in flight (main.js `turnHeld`): the same held look, so a tap that cannot be taken does not look like a frozen game */
.gamebar button.primary.turn.held { opacity: 1; cursor: progress; animation: turn-held 0.12s ease 0.15s forwards; }
/* dimmed only once the turn has been away 150 ms: a turn back in 30 ms (most, in a real league) would otherwise flicker every tap */
@keyframes turn-held { to { opacity: 0.45; } }
.sheet.decisions .sheet-close, .sheet.moves-sheet > .sheet-close {
  position: absolute; top: 6px; right: 6px; z-index: 1;
  min-width: var(--touch); min-height: var(--touch);
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer;
}
.sheet.decisions .sheet-close:hover, .sheet.moves-sheet > .sheet-close:hover { color: var(--text); }
/* The confirm's question stops short of its ✕ (DNB 733 (c)). */
.sheet.moves-sheet > .confirm-body > h2 { margin-right: 36px; }
/* THE SHEET'S FIRST LINE STOPS SHORT OF THE ✕ (row 86, 2nd shared's sheet: a task opens with its title or its man in the
   body's first line, where the old sheet had a short "NEEDS YOU" chip; "Your turn in the international signing window"
   ran under the ✕ at 375). The ✕ is absolute at the top right, 22px wide at 6px in (measured; its `min-width:
   var(--touch)` names a variable nothing defines), so it reaches 12px into the content box; the first line stops 6px
   short of it. */
.sheet.decisions .panel > .vscroll > .vstack > :first-child { padding-right: 18px; }
/* The question sits under the options it is about, separated by a rule rather than by a second box. */
.sheet.decisions .confirm-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.sheet.decisions .confirm-body h2, .sheet.moves-sheet .confirm-body h2 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.sheet.decisions .confirm-body .acts, .sheet.moves-sheet .confirm-body .acts { display: flex; gap: 8px; margin-top: 10px; }
.sheet.decisions .confirm-body .acts .btn, .sheet.moves-sheet .confirm-body .acts .btn { flex: 1; justify-content: center; }
.sheet.decisions .panel > header.edge { position: static; margin-bottom: 8px; }
.sheet.decisions .panel > header.edge h2 { padding-left: 0; font-size: 17px; }

/*
 * A REFUSAL AND ITS WAYS OUT (shared's `refusalNode`), in the decision modal's box. Each way out is its name with
 * its cost UNDER it, never beside it: side by side, the shared name-and-status rule let the cost squeeze the name to
 * nothing ("Designate for assignment" drew as an empty ellipsis at 393px).
 */
.sheet.refusal { padding-right: 44px; }
.sheet.refusal .panel { border: 0; padding: 0; margin-top: 0; }
.sheet.refusal table.t td { padding-block: 8px; }
.sheet.refusal table.t td.flex .pair { flex-direction: column; align-items: flex-start; gap: 2px; }
.sheet.refusal table.t td.flex .pair > .name { white-space: normal; overflow: visible; }
.sheet.refusal table.t td.flex .pair > .status { white-space: normal; font-size: 13px; font-weight: 400; color: var(--muted); }
.sheet.refusal table.t td.flex .pair > .status.warn { color: var(--warn); }
.secondary-sheet > .panel { border: 0; padding: 0; margin-top: 0; }
.secondary-sheet > .panel > header.edge { position: static; margin-bottom: 8px; }
.secondary-sheet > .panel > header.edge h2 { padding-left: 0; font-size: 17px; }
.secondary-sheet .panel .panel { border: 0; padding: 4px 0 0; margin-top: 14px; }
.secondary-sheet .panel .panel > header.edge { position: static; margin-bottom: 6px; }
.secondary-sheet .panel .panel > header.edge h2 { padding-left: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }

/* A level you cannot send him to stays on the list and says so, rather than not being there. */
button.choice-row.shut { color: var(--faint); cursor: not-allowed; }
button.choice-row.shut .detail { color: var(--warn); }

/* A label and its figure in a heading are one unit: the line breaks between pairs, never inside one. */
.screen-head .line .spans { white-space: nowrap; }

/* THE DEPTH CHART (the owner, 2026-09-21): one table per position, a rule between positions and none between a
   starter's backups -- "Do not use lines between backup players. it makes it hard to parse". */
.vstack > table.t[class*="depth-"], .vstack > .table-wrap { margin: 0; }
.vstack > table.t + table.t { border-top: 1px solid var(--border); }
/* IN A TASK SHEET a man's facts belong to his row, so no rule parts them; the rule stays where the choices begin. And a
   headed table under a rule (PUT IN, RECALL) gets room above its headings, which sat against the rule (2nd gui at 375,
   row 86's sheets, 09-28). */
.sheet.decisions .vstack > table.t[data-table="decision-man"] + table.t[data-table="decision-facts"] { border-top: 0; }
.sheet.decisions .vstack > table.t + table.t:not(.nohead) > thead th { padding-top: 10px; }
.vstack > table.t tbody tr td { border-top: 0; border-bottom: 0; }
/* A mark that is a control (Text.act): a ✕ or a rule icon, drawn as the glyph it is. */
button.cellact { background: none; border: 0; padding: 0 3px; margin: 0; font: inherit; color: inherit; cursor: pointer; min-width: 18px; }
/* ON A FINGER ITS TARGET IS BIGGER THAN ITS GLYPH. Rule 5's ☐ measured 18x19 at 375 (2026-09-23), under the 36px
   floor, in a row whose every other tap opens the man. An invisible box around the glyph takes the tap and moves
   nothing, so the row keeps its height and the mark stays where the finger found it. */
@media (pointer: coarse) {
  button.cellact { position: relative; }
  /* Leaning right: Rule 5's mark sits at the panel's left edge, where a box reaching left is outside the table. */
  button.cellact::after { content: ''; position: absolute; inset: -10px -14px -10px -4px; }
}
/*
 * A CONTROL COLUMN'S CELL IS A BUTTON THAT READS AS ONE (row 117, the owner, 2026-09-28: "stepper B look good"; row 87,
 * alignment by kind). A `kind: 'control'` column holds a step or a switch pressed on its own, the offer's − and +, so its
 * live cell is drawn with the .btn look, square, and a shut one (a Text with no `act`) keeps the same box, faint, so a
 * step at the end of its range reads as shut and nothing under the finger moves. Keyed on the column's KIND, never a
 * screen: the ✕ and rule marks above are `act` texts in other kinds and keep their bare glyph.
 */
td.k-control > button.cellact, td.k-control > span {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 32px; min-width: 32px; padding: 0 8px; border: 1px solid var(--border-strong); white-space: nowrap;
}
td.k-control > button.cellact { background: var(--surface2); color: var(--text); font-weight: 600; }
td.k-control > span { border-color: var(--border); }
td.k-control > span:empty { display: none; }
@media (pointer: coarse) {
  /* 44 on a finger, as .btn is (a phone's touch target; game design, 09-28): the visible square IS the target, since
     two sit side by side and a row sits under a row, where any invisible margin would reach into a neighbour. */
  td.k-control > button.cellact, td.k-control > span { min-height: var(--touch-lg); min-width: var(--touch-lg); }
  /* Its own box is the target: the glyph's wider invisible box would reach into the button beside it. */
  td.k-control > button.cellact::after { content: none; }
}

/* FATIGUE IS THREE BARS STACKED (the owner, 2026-09-21: "three horizontal bars ... I meant stacked vertically"):
   empty ones on top, the filled ones below, like a battery running down. Drawn from the mark's three parts
   (health.ts statusMark); a terminal keeps the glyphs side by side. A dropdown's row draws the same mark (row 102's starter). */
span.spans.status, td.k-mark span.spans, .choice-row .detail span.spans { display: inline-flex; flex-direction: column; gap: 2px; vertical-align: middle; font-size: 0; }
span.spans.status { margin-left: 5px; }
span.spans.status > span, td.k-mark span.spans > span, .choice-row .detail span.spans > span { display: block; width: 11px; height: 3px; background: currentColor; }
span.spans.status > span.faint, td.k-mark span.spans > span.faint, .choice-row .detail span.spans > span.faint { background: transparent; box-shadow: inset 0 0 0 1px currentColor; opacity: 0.8; }
/* A column of marks (the owner, 2026-09-21, a man's status: "it should be another column"): centred by its kind (`.mid`),
   and sat in the middle of its row. Keyed on the KIND, never the key: a rule on `c-stat` centred any column named `stat`. */
table.t td.k-mark, table.t th.k-mark { vertical-align: middle; padding-inline: 1px; }

/* A RATING CARD'S GRADES SIT TIGHT: seven two-digit grades beside a name at 393px (the owner asked for more rating
   columns, SPD among them) left the name 78px with 6px of air each side of every figure. 2px keeps "Spencer Torkelson"
   whole. The card says it is one (`TableNode.spacing` 'grades', row 87 step 2): the Lineups card, tonight's card on the
   pregame and the pitching staff card, wherever they are drawn. */
table.t.sp-grades td, table.t.sp-grades th { padding-inline: 2px; }

/* THE SIM NEVER MOVES (the owner, 2026-09-20: a button pressed repeatedly must never move). The standing row carries
   the defensive dials only while we pitch, so Sim sat third in the field and first at the plate -- x 221 against
   x 23 at 375px, found by the critic and measured. Pinned to the row's right end, it stands in one place. */
.gamebar .acts.standing { display: flex; }
.gamebar .acts.standing > button.k-sim { margin-left: auto; }

/* THE BROADCAST'S MODES AND LAYOUT A (the owner, 2026-09-23: "fine. layout A.", tools/ui/mocks/ballgame-options.html).
   The switch is 3D (the TUI renderer's cameras), 2D (its top view) and Text (no picture); it is this device's choice.
   On a wide screen the ballgame keeps the order he approved and only gains the switch. */
.scene { position: relative; }
.scene .modes { display: inline-flex; border: 1px solid var(--border); background: rgb(10 10 10 / 0.82); }
.scene .modes button.mode { background: none; border: 0; color: var(--faint); font: inherit; font-size: 12px; padding: 4px 9px; min-height: 28px; cursor: pointer; }
.scene .modes button.mode.on { color: var(--on-accent); background: var(--accent); font-weight: 700; }
/* Wide: in the flow under the picture, right-aligned, so it never sits on the score (measured: at 1280 the scene's column
   is narrow enough that a switch floated top-right covered the inning). A phone floats it ON the picture, below. */
.scene > .modes { display: flex; width: max-content; margin: 6px 0 0 auto; }
.scene ol.inning { display: none; }
.gamebar .fold { display: none; }
@media (pointer: coarse) { .scene .modes button.mode { min-height: 36px; padding: 0 12px; } }

/* THE PRE-GAME HAS NO TOP BAR, AT EVERY WIDTH (the owner, 2026-09-27, OWNER-DECISIONS `034b7f422`: "5 hide top bar in pre
   game"; DNB 729: it was hidden only at 480 px and under, so at 1280 the bar's Play sat over the pre-game's own). Its "Play
   ball" is the one Play (2nd gui's first hour, #9). Keyed on the pre-game's own send, "Play ball" (`game.start`), so the
   finish, whose top bar carries Next (row 114), keeps it. The menus are their own line (`menuLine`), so they stay; where
   they share the top line (900 px and up) the bar keeps its place, empty, so the menus keep their height. Letting the
   staff play it instead is the ballgame's own Sim, or Home's. */
html[data-screen="game"]:has(button.form-send[data-intents*="game.start"]) .shell > header.top { visibility: hidden; }

@media (max-width: 480px) {
  /* NO TOP BAR IN A GAME: the picture takes the top of the screen, and the bottom nav stays. */
  /* The whole game once it is under way, its substitutions and its finish included (<html data-screen> says where the app
     is). */
  html[data-screen="game"]:not(:has(button.form-send)) .shell > header.top { display: none; }
  /* On a phone the pre-game's bar gives its line back too (DNB 729's rule above, the line and all). */
  html[data-screen="game"]:has(button.form-send[data-intents*="game.start"]) .shell > header.top { display: none; }
  section.panel:has(> .vscroll > .scene) { border: 0; padding: 0; margin: 0; }
  section.panel:has(> .vscroll > .scene) > header.edge { display: none; }
  /* The picture edge to edge, with the score bug and the switch on it as a broadcast has them. */
  /* Edge to edge: out through `main.content`'s gutter (--gutter; a notch's safe area is not drawn into). */
  .scene.pictured > canvas.pic { order: -1; margin: 0 calc(-1 * var(--gutter)); border-radius: 0; aspect-ratio: 4 / 3; max-height: none;
    width: calc(100% + 2 * var(--gutter)); }
  .shell:has(.scene) > main.content { padding-top: 0; }
  /* The bug is ONE line on the picture, as a broadcast's is: the clubs, the inning, the outs, the bases and the count. */
  .scene.pictured > .bug { position: absolute; top: 6px; left: 6px; z-index: 2; flex-wrap: nowrap; gap: 5px; padding: 3px 7px;
    background: rgb(10 10 10 / 0.82); border: 1px solid #333; font-size: 12px; white-space: nowrap; }
  .scene.pictured > .bug .club { gap: 4px; }
  .scene.pictured > .bug .runs { font-size: 15px; }
  .scene.pictured > .bug .out { width: 7px; height: 7px; }
  .scene.pictured > .bug .outs { gap: 3px; }
  .scene.pictured > .bug .diamond { width: 22px; height: 15px; }
  .scene.pictured > .bug .base { width: 6px; height: 6px; }
  .scene.pictured > .bug .base.b2 { left: 8px; top: 0; }
  .scene.pictured > .bug .base.b3 { left: 1px; top: 7px; }
  .scene.pictured > .bug .base.b1 { left: 15px; top: 7px; }
  .scene.pictured > .bug .count { color: var(--warn); font-weight: 700; }
  .scene.pictured > .bug .count.live { font-size: 15px; }
  .scene.pictured > .bug .inning { display: none; }
  .scene.pictured > .bug .inning-short { display: inline; }
  .scene.pictured > .modes { position: absolute; top: 6px; right: 6px; z-index: 2; margin: 0; }
  .scene.pictured > .modes button.mode { font-size: 11px; padding: 0 6px; }
  .scene.unpictured > .modes { order: -2; align-self: flex-end; margin: 8px 10px 0; }
  .scene.unpictured > .bug { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); }
  /* The play's words: the picture carries its own one-line ticker, and the inning below carries the rest. */
  .scene > p.caption { display: none; }
  .scene > p.halfover, .scene > p.final { margin: 8px 12px; font-size: 16px; }
  /* The two men, one line each. */
  .scene .cards { grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-bottom: 1px solid var(--border); }
  .scene .mancard { flex-direction: row; align-items: baseline; gap: 6px; padding: 6px 10px; border: 0; white-space: nowrap; overflow: hidden; min-width: 0; }
  .scene .mancard + .mancard { border-left: 1px solid var(--border); }
  /* The label leaves the line (game design, 2026-09-26, on the owner's "no word where a shape or position says it"): the
     left card is the batter and the right the pitcher, each label its card's tip, and the name takes the room -- at 375
     "At bat" and "Pitching" cut every name ("B. Buxt...", "D. Ly..."); without them both full names fit. */
  .scene .mancard .facts, .scene .mancard .label { display: none; }
  .scene .mancard .name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .scene .mancard .grade-line { margin-left: auto; }
  /* The inning so far, one line a play, newest first. */
  .scene ol.inning { display: block; order: 5; list-style: none; margin: 0; padding: 6px 12px; }
  .scene ol.inning li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--faint); padding: 3px 0; font-size: 13px; }
  .scene ol.inning li.turn { color: var(--text); }
  /* The calls folded: Coach's call, then Calls, Sim and Subs, each one tap away. */
  section.panel.bar-panel > header.edge { display: none; }
  /* The folded calls fit, so their panel does not scroll, and its box must not clip the Calls sheet that rises over
     the picture (measured: the sheet at y 161-608 showed only its last row, the rest cut by this .vscroll). */
  /* One class more than render.js's generated `.screen.fixed > .panes.grid.vpN > .panel.bar-panel > .vscroll`. */
  .screen.fixed > .panes.grid.fill > section.panel.bar-panel > .vscroll { overflow: visible; overflow-y: visible; }
  .gamebar > .acts, .gamebar > .acts.standing { display: none; }
  .gamebar .fold { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; position: relative; }
  .gamebar .fold > button.act, details.calls-fold > summary.act { justify-content: center; width: 100%; min-height: 44px; }
  details.calls-fold > summary { list-style: none; display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
  details.calls-fold > summary::-webkit-details-marker { display: none; }
  details.calls-fold[open] > summary { background: var(--selected); }
  details.calls-fold > summary.armed { border-color: var(--accent); }
  details.calls-fold[open] > ul { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 6; margin: 0; padding: 8px;
    list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow: auto;
    background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 -18px 30px rgb(0 0 0 / 0.5); }
  details.calls-fold[open] > ul button.act { width: 100%; justify-content: flex-start; }
  /* TEXT IS MOCKUP B: with no picture there is room, so every call is on the screen at once and nothing folds. */
  .shell:has(.scene.unpictured) .gamebar > .acts, .shell:has(.scene.unpictured) .gamebar > .acts.standing { display: flex; }
  .shell:has(.scene.unpictured) .gamebar .fold { display: none; }
}

/* THE BALLGAME AT 375, THE PICTURE FIRST (the owner, 2026-09-26: "The mock is way better ... we should definitely use
   the mock", `tools/ui/shots/ballgame-mock`; row 100). The picture as tall as the screen allows up to 3:4 -- taller, the
   TUI renderer draws the men enormous (a 617px canvas was a 125x97 grid) -- and the inning is ONE line, the newest play,
   whose tap is the play-by-play (main.js), so that sheet's own button goes. The calls keep their two rows ("Substitutions"
   alone needs 132px); the nav stays. */
@media (max-width: 480px) {
  .scene.pictured > canvas.pic { aspect-ratio: auto; height: 133.34vw; flex: 0 1 auto; min-height: 0; }
  /* THE PICTURE GIVES WAY, NOTHING ELSE DOES (2nd gui, 10-12, at 375x667). Its height was the window less a guess at the
     rest (71 + 116 + 30 + 34 + 8 px); measured, the rest is 136 for the bar and 41 for the cards, and the inning line
     comes and goes, so the pinned bar covered the cards by 3px and the whole inning line by 33. Now the pane is a column
     and only the picture shrinks (every box between it and the pane lets it, `min-height: 0`), so whatever the scene
     holds below it -- the men, the inning, a half's end -- stops above the bar. Where there is room (375x812) nothing
     shrinks: the picture keeps its 3:4 and the bar its place. */
  .screen.fixed > .panes.grid.fill:has(> section.panel > .vscroll > .scene.pictured) { display: flex; flex-direction: column; }
  .screen.fixed > .panes.grid.fill > section.panel:has(> .vscroll > .scene.pictured) { flex: 0 1 auto; min-height: 0; }
  .screen.fixed > .panes.grid.fill > section.panel:has(> .vscroll > .scene.pictured) > .vscroll { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; }
  .scene.pictured { flex: 0 1 auto; min-height: 0; }
  .scene.pictured > :not(canvas.pic) { flex-shrink: 0; }
  .scene.pictured ol.inning { padding: 0 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
  .scene.pictured ol.inning li { padding: 7px 0; }
  .scene.pictured ol.inning li:nth-child(n + 2) { display: none; }
  /* THE › STAYS WHEN THE LINE IS CUT (game day round #10: at the final, "…grounds out, the second…" lost it with the text):
     the line stops short of a gutter and the mark sits in it, outside the ellipsis. */
  .scene.pictured ol.inning li:first-child { position: relative; padding-right: 2ch; }
  .scene.pictured ol.inning li:first-child::after { content: "›"; color: var(--accent); position: absolute; right: 0.5ch; }
  .shell:has(.scene.pictured) .screen.fixed > .secondaries { margin: 0; height: 0; }
  .shell:has(.scene.pictured) .screen.fixed > .secondaries > details.secondary > summary { display: none; }
}

/* A tappable row is a button (accessibility, the owner's "make it so", 2026-09-21): the keyboard's place is drawn. */
tr.tap[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* THE BATTING ORDERS (the owner, 2026-09-23: "b and c are fine", tools/ui/mocks/ballgame-lineups.html): two cards side
   by side, the man at bat marked. In the flow on a wide screen and in Text; over the picture on a phone. */
.scene .bug[data-orders] { cursor: pointer; }
.scene .orders { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.scene .lcard { background: rgb(10 10 10 / 0.88); border: 1px solid var(--border-strong); font-size: 12px; line-height: 1.3; min-width: 0; }
.scene .lcard .lt { padding: 3px 7px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--accent); }
.scene .lcard .batting { color: var(--faint); font-weight: 400; }
.scene .lcard ol { list-style: none; margin: 0; padding: 2px 0; }
.scene .lcard li { display: flex; gap: 5px; padding: 1px 7px; white-space: nowrap; }
.scene .lcard li.at { background: var(--accent); color: var(--on-accent); }
.scene .lcard .n { color: var(--faint); width: 1ch; } .scene .lcard .p { color: var(--muted); width: 2.4ch; }
.scene .lcard li.at .n, .scene .lcard li.at .p { color: var(--on-accent); }
.scene .lcard .m { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.scene .lcard .hd { color: var(--faint); }
@media (max-width: 480px) {
  .scene.pictured > .orders { position: absolute; top: 40px; left: 0; right: 0; z-index: 3; margin: 0; }
  .scene .lcard { font-size: 11px; }
  .scene.unpictured > .orders { order: 1; margin: 6px 10px; }
}

/* The ratings card (docs/RATINGS-DESIGN.md §2): a part indented under its parent, and a heading line with a
   right-hand side ("Scouted ●●●●○", "OVR|POT 75|75"). */
.indent1 { padding-left: 10px; }
.indent2 { padding-left: 20px; }
/* The name's line: the name wraps inside its own space, the aside keeps the right, never a row of its own. */
.screen-head .head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.screen-head .head-row.first { align-items: flex-start; }
.screen-head .head-row.first h1 { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.screen-head .head-row > :last-child { flex: none; white-space: nowrap; }
/* "Scouted" over its dots, the two small lines exactly the name's line (26px type on a 31.2px line). */
.screen-head .aside .spans { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; line-height: 15.6px; }
/* The ratings card's tables: headings as written ("Now|Pot", "vs L"), and a bar that fills its own column. */
table.t[data-table^="card-"] th { text-transform: none; letter-spacing: normal; }
table.t[data-table^="card-"] td.k-bar span.gbar { display: block; }
table.t[data-table^="card-"] td.k-bar .bar { display: block; width: 100%; }
table.t td span.gbar.np { grid-template-columns: 84px auto; }
@container (max-width: 400px) { table.t td span.gbar.np { grid-template-columns: 56px auto; } }
/* One set of columns at one set of x in every panel of the card: fixed layout, the same widths everywhere. */
table.t[data-table^="card-"] { table-layout: fixed; width: 100%; }
/* In px, not ch: a fixed table takes its widths from its first row, and a heading's smaller type makes a smaller ch,
   so a headed and a headless table would put the same "13ch" at two different x. Measured on the body type (8.13px a
   character at 13.5px) plus the cells' padding: 13 characters, "70|70" bold, "share", "98-101". */
table.t[data-table^="card-"] td, table.t[data-table^="card-"] th { padding-inline: 4px; }
table.t[data-table^="card-"] td:first-child, table.t[data-table^="card-"] th:first-child { padding-left: 0; }
table.t[data-table^="card-"] td:last-child, table.t[data-table^="card-"] th:last-child { padding-right: 0; }
/* 112: "Steal success" (13 x 8.13 = 106) is the widest name a grade table draws. */
table.t[data-table^="card-"] .c-label { width: 112px; }
table.t[data-table^="card-"] .c-np { width: 55px; }
table.t[data-table^="card-"] .c-c1 { width: 49px; }
/* 60: "98-101" (6 x 8.13 = 49) plus the cell's padding; at 53 it overflowed, so a pitch's range was not right-aligned. */
table.t[data-table^="card-"] .c-c2 { width: 60px; }
/* His club's code chip on the name's line, the top bar's sign; the name wraps inside its own space before it. */
.screen-head .head-row.first .head-club { flex: none; align-self: flex-start; margin-top: 4px; background: var(--accent); color: var(--on-accent);
  font-weight: 700; padding: 3px 6px; letter-spacing: 0.02em; font-size: 13.5px; line-height: 1.2; }
/* Fielding's subheads (Infield, Outfield, Catcher) belong to the rows BELOW them: the gap goes above (game design). */
table.t[data-table^="card-"] + p { margin: 12px 0 2px; }
