/* Fleet Web, the page rebuilt around the objects: a rail of pages on the left (bottom tabs on a
   phone), one page at a time, a URL for every page and every object.

   The look is carried over from the old page, which Michael liked: one dark palette, the accent blue
   for actions, green/amber/red only for state, one hue per player carried through its rail, its name
   and its seats, IBM Plex Sans with Plex Mono for numbers and the console, tabular numerals
   everywhere a number can change under the eye. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #0f1218;
  --bg-panel: #161a23;
  --bg-row: #1a1f2a;
  --bg-raised: #202634;
  --bg-rail: #0b0e13;
  --text: #e8eaf0;
  --text-dim: #8f97aa;
  --text-faint: #5f6678;
  --border: #262c3a;
  --border-strong: #343c4e;
  --accent: #5b8cff;
  --accent-soft: rgba(91, 140, 255, 0.16);
  --ok: #3ecf8e;
  --ok-soft: rgba(62, 207, 142, 0.16);
  --warn: #e6b450;
  --warn-soft: rgba(230, 180, 80, 0.16);
  --err: #ef5b5b;
  --err-soft: rgba(239, 91, 91, 0.16);
  --on-solid: #fff;                    /* text on a solid accent or danger button */
  --ink: #10131a;                      /* dark text on a light disc or a card face */
  --card-face: #f3f4f7;
  --black: #000;
  --suit-spade: #1c1f26;
  --suit-heart: #e0453f;
  --suit-club: #2fa84f;
  --suit-diamond: #3b82c9;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "Cascadia Mono", monospace;
  --radius: 10px;
  --radius-small: 7px;
  --rail: 194px;
  --player: var(--accent);
  --shadow-raised: 0 6px 24px rgba(0, 0, 0, 0.5);   /* a toast: raised over the page */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.35;
}
body { display: flex; overflow: hidden; }
b, strong { font-weight: 600; }
.dim { color: var(--text-dim); }
.num { font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
h1, h2, h3 { margin: 0; }

/* ---- the rail of pages ---- */
.rail {
  flex: 0 0 var(--rail);
  background: var(--bg-rail);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 2px;
}
.rail-head { display: flex; align-items: center; gap: 9px; padding: 4px 8px 14px; }
.rail-head img { width: 20px; height: 20px; }
.rail-head b { font-size: 14px; letter-spacing: 0.2px; }
.rail-link {
  all: unset;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-small);
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 400;
}
.rail-link:hover { color: var(--text); background: var(--bg-panel); }
.rail-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rail-link.on { color: var(--text); background: var(--bg-panel); box-shadow: inset 2px 0 0 var(--accent); }
.rail-link .glyph { width: 16px; text-align: center; opacity: 0.85; }
.rail-link[hidden] { display: none; }   /* an entry the person may not open */
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.conn { display: flex; align-items: center; gap: 7px; padding: 8px 10px; color: var(--text-faint); font-size: 11px; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--err); box-shadow: 0 0 6px currentColor; }
.conn-dot.live { background: var(--ok); }

/* ---- the page beside it ---- */
.page { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.page-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-rail);
}
.page-title { font-size: 15px; font-weight: 600; }
/* the club's issues (Michael 21.11): the count pill is a button that opens their list. One line per issue: the dot, what is wrong, what to do (dim), since when (right) */
.issues-pill { border: 0; font-family: inherit; cursor: pointer; flex: 0 0 auto; }
.issues { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.issue { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.issue > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.issue > .num { margin-left: auto; flex: 0 0 auto; font-size: 11px; }
.issue-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.issue-dot.err { background: var(--err); }
.issue.acked { opacity: 0.5; }
.issue-text a { color: var(--accent); text-decoration: none; }
.issue-text a:hover { text-decoration: underline; }
.page-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 20px 30px; display: flex; flex-direction: column; gap: 12px; }
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-dim);
  text-align: center;
}
.page-body > .empty { flex: 1 1 auto; }
.empty-line { font-size: 14px; color: var(--text-dim); margin: 0; }
.panel .empty { padding: 20px; border-style: dashed; }

/* ---- buttons, selects, fields ---- */
.btn {
  all: unset;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-small);
  background: var(--bg-raised);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
}
.btn:hover { filter: brightness(1.14); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: 0.4; cursor: default; filter: none; }
.btn-primary { background: var(--accent); color: var(--on-solid); }
/* the tinted buttons: dark text on a saturated fill rendered smudged at small sizes; a soft fill with the
   colour as the text is crisp, and reads as the modern 'tonal' button */
.btn-ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }
.btn-warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.btn { -webkit-font-smoothing: antialiased; }
.btn-ghost { background: transparent; border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--bg-raised); border-color: var(--text-dim); filter: none; }
.btn-accent { background: var(--accent-soft); color: var(--accent); }
.btn-accent:hover { background: var(--accent); color: var(--on-solid); filter: none; }
.btn-link { background: transparent; color: var(--text-dim); padding: 4px 6px; font-weight: 400; }
.btn-link:hover { color: var(--text); filter: none; }
.btn-link.danger:hover { color: var(--err); }
.btn-small { padding: 4px 10px; font-size: 11px; }

.field, select.field, input.field {
  font: inherit;
  font-size: 12px;
  padding: 6px 9px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
}
select.field option { background: var(--bg-panel); color: var(--text); }
.field:focus { border-color: var(--accent); outline: none; }
label.pick { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.7px; }

/* ---- the needs-attention strip (the update in flight on Machines) ---- */
.attn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 12px;
  border-radius: var(--radius-small);
  background: var(--err-soft);
  border: 1px solid color-mix(in srgb, var(--err) 35%, transparent);
  font-size: 12px;
}
.attn-item.warning { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.attn-item .what { font-weight: 600; }
.attn-item .count { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.attn-item .btn { padding: 3px 9px; font-size: 11px; }

.initial {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: var(--player);
  color: var(--ink);                    /* every hue in the set is light enough to read dark text on */
  font-size: 11px; font-weight: 600;
}
.who { display: flex; flex-direction: column; gap: 1px; }
.where { display: flex; flex-direction: column; gap: 3px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.busy::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity: 0.25; } to { opacity: 1; } }

.cards { display: flex; gap: 3px; }
.card {
  width: 22px; height: 30px;
  border-radius: 4px;
  background: var(--card-face);
  color: var(--suit-spade);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  box-shadow: var(--shadow-raised);
}
.card.placeholder { background: var(--bg-row); border: 1px dashed var(--border-strong); box-shadow: none; }
.card .s { font-size: 10px; }
.suit-S { color: var(--suit-spade); } .suit-H { color: var(--suit-heart); }
.suit-C { color: var(--suit-club); } .suit-D { color: var(--suit-diamond); }

/* figures in a column line up whatever they say: tabular digits, and a nought keeps the room a sign takes */
.num { font-variant-numeric: tabular-nums; }

.controls { display: flex; align-items: center; gap: 6px; }
:root { --hue-1: #5b8cff; --hue-2: #3ecf8e; --hue-3: #e6b450; --hue-4: #c77dff; --hue-5: #ff8a65; --hue-6: #4dd0e1; --hue-7: #f06292; --hue-8: #aed581; --hue-9: #ffd54f; --hue-10: #90a4ae; }   /* a player's colour (hueOf) */
/* a narrow window scrolls the list, heading and all, rather than cutting its last columns off */
.list-scroll { overflow-x: auto; }
.field-tiny { padding: 1px 4px; font-size: 11px; height: 20px; width: auto; text-transform: none; letter-spacing: 0; }
select.field.field-tiny { padding: 0 4px; height: 22px; line-height: 20px; font-size: 11px; }   /* the field's own padding clipped the text to dashes */
/* ---- a panel on an object's own page (never .card: that is a playing card) ---- */
.panel {
  padding: 13px 15px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel + .panel { margin-top: 12px; }
/* every panel head is underlined the same way, and the first row under it brings no line of its own */
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.panel-head + .kv, .panel-head + * > .kv:first-child { border-top: 0; }
/* a panel's second, rarer action lives under its rows as a quiet link, never as a second head button */
.panel-foot { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--border); }
.panel-head b { font-size: 13px; }
/* HOTFIX 21.11: a panel's one state line (the problem) sits right under the head, full width, red */
.panel p { margin: 0; }
.kv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; min-height: 34px; box-sizing: border-box; border-top: 1px dashed var(--border); }
.kv.err-line > .dim:first-child { color: var(--err); }
.kv:first-of-type { border-top: 0; }
/* a label on the left, its value on the right, in one column down the panel: how settings read */
.kv > b:last-child, .kv > .num:last-child, .kv > a:last-child, .kv > .pill:last-child, .kv > code:last-child { margin-left: auto; text-align: right; }
.kv > select.field:last-child { margin-left: auto; width: auto; }
/* the Formats help: one row per kind of line, the line itself with its labels lit, what it gives on the right */
.dialog-ask.dialog-help { width: min(1000px, 100%); }
/* the Formats help: a kind on the left; on the right one code line, then what it gives, dim, under it */
.fmt-list { display: flex; flex-direction: column; margin: 2px 0 8px; }
.fmt-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 6px 0; }
.fmt-row:first-child { padding-top: 2px; }
.fmt-code { display: block; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-small);
  font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.fmt-code .lbl { color: var(--accent); font-weight: 600; }
.fmt-code .sep { color: var(--text-faint); margin: 0 6px; }
.fmt-code i { color: var(--text-dim); font-style: italic; }
.kv > .secret { margin-left: auto; }
.kv a { color: var(--accent); text-decoration: none; font-weight: 600; }
.kv a:hover { text-decoration: underline; }

/* ---- the Machines page: a panel per machine, its devices inside it; the kind tag names the piece ---- */
.panel.attn { border-color: color-mix(in srgb, var(--err) 50%, transparent); }
.panel .dim.low { color: var(--warn); }
.device {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 10px;
  background: var(--bg-row);
  border: 1px solid var(--border);
  border-left: 3px solid var(--player);
  border-radius: var(--radius-small);
}

/* ---- Take over: the device's own screen, here ---- */
.takeover { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.takeover-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.takeover-bar .field { flex: 1 1 220px; max-width: 420px; }
.vnc-wrap { position: relative; flex: 1 1 auto; min-height: 360px; display: flex; }
.vnc { flex: 1 1 auto; background: var(--black); border-radius: var(--radius); outline: none; }
.vnc-veil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); color: var(--warn); border-radius: var(--radius); pointer-events: none; }
.vnc-veil.err { color: var(--err); }
.vnc-veil[hidden] { display: none; }
.takeover:fullscreen, .takeover-full { position: fixed; inset: 0; z-index: 50; padding: 8px; background: var(--bg); }
.takeover:fullscreen .vnc, .takeover-full .vnc { border-radius: 0; }
.recording-frame img { max-width: 100%; border-radius: var(--radius-small); }

/* ---- Settings: tabs over one compact panel, values on the kv's own right edge ---- */
.settings-page { max-width: 640px; }

/* ---- the decision ladder: one rung per row, "else" between them ---- */
.ladder { display: flex; flex-direction: column; }
.ladder-step {
  display: grid;
  grid-template-columns: 22px minmax(80px, 0.6fr) minmax(110px, 1fr) minmax(0, 1.8fr);
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.ladder-no {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 600;
}
.ladder-name { font-weight: 600; }
.ladder-else { margin-left: 10px; padding-left: 9px; border-left: 2px solid var(--border); font-size: 11px; line-height: 14px; color: var(--text-dim); }
.ladder-with { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: flex-end; }
.ladder-knob { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.ladder-knob .field { width: auto; }
/* narrow (a dialog, a record column): the knobs go under the rung, one line each */
.ladder { container-type: inline-size; }
@container (max-width: 560px) {
  .ladder-step { grid-template-columns: 22px minmax(80px, auto) 1fr; }
  .ladder-with { grid-column: 2 / -1; justify-content: flex-start; }
}

/* ---- two ways to do one thing, in a dialog ---- */
.tabs { display: flex; gap: 16px; margin: 2px 0 6px; }   /* underlined tabs, so the first one starts on the title's own edge with nothing to clip */
.tab {
  all: unset;
  cursor: pointer;
  padding: 6px 0;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 transparent;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- dialogs ---- */
.veil {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}
.dialog {
  width: min(520px, 100%);
  max-height: 100%;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* head and foot stay put; the body is the only part that scrolls */
.dialog-head { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.dialog-head h2 { flex: 1 1 auto; margin: 0; font-weight: 600; }
.dialog-x {
  flex: 0 0 auto; width: 28px; height: 28px; margin: -4px -6px -4px 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--text-dim);
  font-size: 13px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.dialog-x:hover { color: var(--text); background: var(--bg-raised); }
.dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.dialog-body thead th { position: sticky; top: 0; background: var(--bg-panel); z-index: 1; }
.dialog .foot { flex: 0 0 auto; }
/* the small questions */
.dialog-ask { width: min(420px, 100%); }
.ask-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text); }
.btn-danger-solid { background: var(--err); color: var(--on-solid); }
.veil-ask { z-index: 50; }
.dialog h2 { font-size: 15px; }
/* Every group of rows in a dialog keeps one rhythm, whether it is the dialog's own rows, a tab's
   pane or what Advanced hides: the gap belongs to the container, and a pane that was a plain block
   had its fields touching while the ones beside it were spaced. */
.dialog .rows { display: flex; flex-direction: column; gap: 10px; }
.dialog .line { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 12px; }
/* A row whose label is longer than the label column: the label goes above its field rather than
   breaking in half, and its unit stays on the field's own line. */
.dialog .line.stacked { grid-template-columns: 1fr; gap: 4px; }
.dialog .line.stacked > label { white-space: nowrap; }
.dialog .line > label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.7px; }
.dialog .line .with { display: flex; align-items: center; gap: 8px; }
.dialog .line .with .pill { flex: 0 0 auto; }
/* The badge sits under its field, and Optional sits under the badge, looking the same distance from
   it. Measured to ink rather than to boxes: below the badge the eye stops at Optional's glyphs, which
   its own padding and leading push about 3px further down, so that gap is set 3px tighter. */
.dialog .line .with .field { flex: 1 1 auto; min-width: 0; }
.dialog .line .with .with-grow { flex: 1 1 auto; min-width: 0; display: flex; }
.dialog .line .with .with-grow .field { width: 100%; }
/* an error line belongs to the field above it, not to the spacing of the rows: it sits close under
   it and takes no room while hidden, so a dialog is the same height with and without one */
.dialog .err { font-size: 12px; color: var(--err); margin-top: -8px; line-height: 1.3; }
.dialog .err[hidden] { display: none; }
.dialog .rows > .err, .dialog-body > .err { margin-top: -8px; }
/* a prompt (one field, then buttons) keeps its buttons close: the field and the answer are one thing */
.dialog-ask .dialog-body { gap: 10px; }
.dialog-ask .foot { margin-top: -2px; }
.dialog .foot { display: flex; align-items: center; gap: 8px; }
/* Seat players: several players ticked, seated at one table in one go (Michael 07.11) */
.dialog .pick-list { display: grid; gap: 6px; max-height: 168px; overflow-y: auto; }

/* ---- checkboxes and log lists ---- */
.check { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 12px; }
.check input { accent-color: var(--accent); width: 14px; height: 14px; }
.log { display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); font-size: 11.5px; }

/* ---- the one toast (UI.md 3.6): a success above an error, bottom centre, above every dialog ---- */
.note-box {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: min(560px, calc(100vw - 32px));
  z-index: 60;                          /* above every dialog and veil: a note answers whatever is open */
}
.note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-raised);
}
.note.err { border-color: var(--err); color: var(--err); padding-right: 8px; }
.note-text { overflow: hidden; text-overflow: ellipsis; }
.note-x { flex: 0 0 auto; border: 0; background: none; padding: 2px 4px; color: var(--text-dim); font-size: 11px; cursor: pointer; }
.note-x:hover { color: var(--err); }

/* ---- a player's record page ---- */
.record {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--player);
  border-radius: var(--radius);
}
.record-id { display: flex; align-items: center; gap: 12px; }
.record-id .initial { width: 28px; height: 28px; flex-basis: 28px; font-size: 13px; }
.record > .swatch { display: none; }
.record-cols > .panel + .panel { margin-top: 0; }
.record-name { font-size: 15px; font-weight: 600; margin: 0; }
.record-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: stretch; }
.pending { opacity: 0.75; }
/* Advanced: the two fields nobody fills in, out of the way until they are wanted */
/* the optional part of a form: a quiet disclosure right under the last field, its rows inset when open */
.advanced { margin-top: -3px; }
.advanced > summary { cursor: pointer; color: var(--text-dim); font-size: 12px; padding: 2px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before { content: "›"; display: inline-block; transition: transform 0.15s; font-size: 14px; line-height: 1; }
.advanced[open] > summary::before { transform: rotate(90deg); }
.advanced > summary:hover { color: var(--text); }
.advanced[open] > .rows { margin-top: 8px; padding: 10px 12px; background: var(--bg-raised); border-radius: 8px; }
.mono { font-family: var(--mono); }
.secret { font-family: var(--mono); letter-spacing: 1px; margin-left: 8px; color: var(--text-dim); }
/* the dots are the button that shows the password, as the pool's held secrets are */
/* the call-to-action bar, above every page */
.choice { display: flex; gap: 16px; align-items: center; min-height: 30px; }   /* as tall as a field, so the rows read as one column */
.choice label { display: flex; gap: 6px; align-items: center; color: var(--text); cursor: pointer; }

/* the record's Activity: the lines about one player, newest at the bottom */

/* the drawer: the Fleet's, the Engine's and the Host's lines under every page, like an editor's bottom console */
.drawer { flex: 0 0 auto; border-top: 1px solid var(--border); background: var(--bg-panel); }
.drawer-bar { display: flex; align-items: center; gap: 10px; padding: 4px 12px; }
.drawer-body { user-select: text; max-height: 220px; overflow-y: auto; padding: 4px 12px 8px; font-size: 12px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* R5.8 / R5.10 / R5.29: the drawer as a status strip with a pin; kinds as chips; a fixed height when open */
.drawer-bar { padding: 3px 12px; min-height: 30px; }
.drawer-title { font-size: 12px; }
.pin { background: transparent; border: 1px solid transparent; border-radius: var(--radius-small); padding: 2px 6px; cursor: pointer; opacity: 0.55; font-size: 13px; }
.pin:hover { opacity: 1; background: var(--bg-raised); }
.pin.on { opacity: 1; border-color: var(--accent); }
.drawer-body { height: 220px; max-height: none; }
/* R5.19: no browser spinner on number fields */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.flag { margin-right: 6px; vertical-align: -2px; border-radius: 2px; }   /* the flag before its country, one gap everywhere */
.flag-none { display: inline-block; width: 16px; height: 12px; margin-right: 6px; border-radius: var(--radius-small); background: var(--bg-raised); vertical-align: -2px; }
/* the country picker: a select underneath, a flagged button on top, a flagged list under that */
.cpick { position: relative; display: flex; flex: 1 1 auto; min-width: 0; }
.cpick .cpick-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cpick-btn { display: flex; align-items: center; width: 100%; text-align: left; cursor: pointer; }
.cpick-btn .cpick-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpick-caret { color: var(--text-dim); font-size: 10px; margin-left: 8px; }
.cpick.open .cpick-btn { border-color: var(--accent); }
.cpick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--bg-panel); border: 1px solid var(--border-strong);
  border-radius: var(--radius-small); box-shadow: var(--shadow-raised); padding: 6px; min-width: 200px; }
.cpick-find { width: 100%; box-sizing: border-box; font: inherit; font-size: 12px; padding: 5px 8px; margin-bottom: 4px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-small); }
.cpick-find:focus { outline: none; border-color: var(--accent); }
.cpick-rows { max-height: 240px; overflow-y: auto; }
.cpick-row { display: flex; align-items: center; padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.cpick-row:hover { background: var(--bg-raised); }
.cpick-row.off { color: var(--text-dim); opacity: 0.45; cursor: not-allowed; }   /* a country the creation VPN has no server in */
.cpick-row.off:hover { background: transparent; }
.cpick-divider { border-top: 1px solid var(--border); margin: 4px 2px; }
.cpick-row.on { background: var(--accent-soft); color: var(--text); }
.cpick-small .cpick-btn { padding: 0 6px; height: 22px; font-size: 11px; }
.cpick-small .cpick-row { padding: 4px 6px; font-size: 11px; }
.record-id .flag { width: 20px; height: 15px; margin-left: 2px; }
/* the one destructive thing on a record: red, full width, last in its panel */
.record-cols > .panel { display: flex; flex-direction: column; }   /* so a panel's last thing can sit in its corner */
/* a delete you should rarely press: quiet until the pointer is on it, then it says what it is */
.btn-danger { background: transparent; color: var(--text-dim); border: 1px solid transparent; font-weight: 400; font-size: 12px; padding: 4px 8px; display: inline-flex; align-items: center; gap: 6px; }
.btn-danger:hover { color: var(--err); border-color: var(--err); background: var(--err-soft); }
.dialog.dialog-wide { width: min(1100px, 100%); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
/* the word list of a name list (UI.md 4.1, A.wordList): chips with a ✕, an added word in the accent */
.word-list .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; max-height: 320px; overflow-y: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 999px;
  background: var(--bg-raised); color: var(--text); font-size: 13px; }
.chip.added { background: var(--accent-soft); color: var(--accent); }
.chip[hidden] { display: none; }
.chip-x { all: unset; cursor: pointer; padding: 0 6px; color: var(--text-dim); font-size: 11px; }
.chip-x:hover { color: var(--err); }
.dialog-ask.dialog-help { width: min(860px, 100%); }
.results { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.result-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-head { margin: 0; font-size: 13px; font-weight: 600; }
.err-text { color: var(--err); }
.err-line { padding-left: 14px; position: relative; }
.err-line::before { content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--err); }
.copyable { cursor: pointer; }
.copyable:hover { color: var(--accent); }
/* a label with something beside it reads as a label all the same: the (i) took it out of the grid's
   own column, and it was the only line in a dialog not written in the label's hand. */
.dialog .line > .with > label { font-size: 11px; color: var(--text-dim); text-transform: uppercase;
                                letter-spacing: 0.7px; white-space: nowrap; }
/* a sentence row (A.financeRows): a money rule said as one sentence, its values inline. On a panel
   it is one line ending in an ellipsis; in a dialog its dropdowns sit in the words and it may wrap.
   A part that counts only while a count is above nought is greyed, never hidden. */
.sentence .say-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sentence .say.off, .sentence .say.off .num { color: var(--text-dim); }
.dialog .line.sentence { display: flex; align-items: center; min-height: 34px; }
.dialog .line.sentence .say-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; white-space: normal; overflow: visible; }
.dialog .line.sentence .say { display: inline-flex; align-items: center; gap: 6px; }
.dialog .line.sentence select.field { width: auto; }
/* under a player's pill: what its table state means, and the one thing to press about it */
/* a club's Tables (FLEET-FR-061+062): the heading and the rows on one grid, one line each; figures right,
   the target's minus and plus around a fixed-width figure, the pills last */
:root { --table-cols: minmax(110px, 1.4fr) 44px 104px 56px 64px 104px minmax(130px, 1fr) 52px 60px 112px 112px; }
.table-head, .table-row { display: grid; grid-template-columns: var(--table-cols); align-items: center; gap: 10px; }
.table-head { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.7px;
              padding: 6px 0; border-bottom: 1px solid var(--border); }
.table-row { padding: 6px 0; border-top: 1px dashed var(--border); white-space: nowrap; min-height: 36px; box-sizing: border-box; }   /* one height (UI.md names none: the middle of what the pages had): a pill or a button in a cell sets none */
.table-head + .table-row { border-top: 0; }
.table-row.here { outline: 1px solid var(--accent); outline-offset: -1px; }   /* the row the address names (UI.md 4) */
.table-row > *, .table-head > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-row a:not(.btn) { color: var(--accent); text-decoration: none; }   /* a link in any list: the app's link look (QA-2) */
.table-row a:not(.btn):hover { text-decoration: underline; }
.table-head > :nth-child(3), .table-row > :nth-child(3), .table-head > :nth-child(4), .table-row > :nth-child(4),
.table-head > :nth-child(8), .table-row > :nth-child(8), .table-head > :nth-child(9), .table-row > :nth-child(9) { text-align: right; }
.table-head > :nth-child(6) { text-align: center; }
.list-scroll .ct-panel { min-width: 1170px; }
/* FLEET-FR-086: the Tables page has a Facts column after Profile; Actual and In Flight move one to the right */
:root { --ct-cols: minmax(110px, 1.4fr) 44px 104px 56px 64px 104px minmax(130px, 1fr) 80px 52px 60px 112px 112px; }
.table-head.ct-row, .table-row.ct-row { grid-template-columns: var(--ct-cols); }
:root { --pl-cols: minmax(190px, 1.5fr) 190px 104px 96px minmax(150px, 1.3fr) 150px; }
.table-head.pl-row, .table-row.pl-row { grid-template-columns: var(--pl-cols); }
.pl-seat { padding-left: 20px; }   /* a seat line stands under its player's name */
:root { --mb-cols: minmax(200px, 1.6fr) minmax(90px, 1fr) minmax(150px, 1.2fr) minmax(120px, 1fr) 96px 160px; }
.table-head.mb-row, .table-row.mb-row { grid-template-columns: var(--mb-cols); }
:root { --ns-cols: minmax(200px, 1.4fr) minmax(140px, 1fr) 60px; --wl-cols: minmax(180px, 1.4fr) 110px 110px 80px; }
.table-head.ns-row, .table-row.ns-row { grid-template-columns: var(--ns-cols); }
.table-head.wl-row, .table-row.wl-row { grid-template-columns: var(--wl-cols); }
/* text left, a number right by its class .num, never by its place (UI.md 4, 6) */
:is(.pl-row, .mb-row, .ns-row, .wl-row) > * { text-align: left; }
:is(.pl-row, .mb-row, .ns-row, .wl-row) > .num { text-align: right; }
.np-names { padding: 8px 0; line-height: 1.8; white-space: normal; }
.table-head.ct-row > :nth-child(8), .table-row.ct-row > :nth-child(8) { text-align: left; }
.table-head.ct-row > :nth-child(10), .table-row.ct-row > :nth-child(10) { text-align: right; }
.table-row.ct-review, .table-row.ct-review b { color: var(--text-dim); }
.ct-head .pill.on { box-shadow: inset 0 0 0 1px var(--warn); }
.ct-row .tm-target { justify-content: center; overflow: visible; }
.ct-num { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.ct-num.just-read { color: var(--ok); transition: color 0.3s; }
.ct-cell .ct-profile { width: 100%; max-width: 100%; }
.ct-head { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; }
.ct-head .just-read { color: var(--ok); transition: color 0.3s; }
.ct-link { cursor: pointer; }
.ct-requests { max-height: 50vh; overflow-y: auto; }
.ct-request > .pill, .ct-request > .dim.num { flex: 0 0 auto; }
/* a club's Players (FLEET-FR-061+062 phase B): the same grid language as its Tables, its own columns;
   chips, tables, watching and the Clear button right */
/* the P&L's sparkline: the window in slices, up in green, down in red, the latest slice solid */
.spark { flex: 0 0 auto; vertical-align: middle; overflow: visible; }
.spark .axis { stroke: var(--border-strong); stroke-width: 1; }   /* the line is the chart: it shows with one bar or none */
.spark rect { opacity: 0.9; }
.spark rect.last { opacity: 1; }
.spark rect.up, .spark circle.up { fill: var(--ok); }
.spark rect.down, .spark circle.down { fill: var(--err); }
.spark rect.last { opacity: 1; }
.spark rect:hover { opacity: 1; }
/* Settings, Creation VPN: a long config file name gives way, the row stays one line */
.kv .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ---- Tables page ---- */
.tm-target { display: flex; align-items: center; gap: 6px; }

/* 19.11 Sign-up VPN card */
.kv.vpn-last, .kv.vpn-secret { flex-wrap: nowrap; }
.kv.vpn-last > b, .kv.vpn-secret > b { margin-left: auto; text-align: right; }
.ask-text { white-space: pre-line; }   /* 19.11: a line break in a question */

.btn-small { white-space: nowrap; }   /* hotfix 20.11: never wrap a small button */
/* hotfix 20.11: a solid button is as tall as an outlined one beside it */
.btn:not(.btn-ghost):not(.btn-link) { border: 1px solid transparent; }
/* hotfix 20.11: the Sign-up VPN's Country picker: as wide as the longest country name, no wider */
/* a club's Members (FLEET-FR-065, MEMBERS.md M10): filters, headline figures, the charts (Apache ECharts takes its
   colours from these tokens at draw time), one-line lists and the members table on the same grid language */
:root { --cm-cols: minmax(190px, 1.5fr) 100px 92px 104px 104px 104px 104px 84px 96px;
        --series-1: #5b8cff; --series-2: #f2914f; --series-3: #3fc0d6; --series-4: #ee77a8;
        --series-5: #a98bf0; --series-6: #d6b647; --series-7: #78bdf0; --series-8: #9aa6bb; }
.cm-fresh { flex: 1 1 200px; min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-all > * + * { margin-top: 12px; }
.cm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.cm-bar .field { width: auto; }
.cm-bar .ellipsis, .cm-picks .ellipsis { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); background: var(--bg-panel);
              border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cm-figures > div { padding: 10px 14px; min-width: 0; box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border); }
.cm-figures > .cm-wide { grid-column: span 2; }
.cm-figure { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-label { display: block; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-up { color: var(--ok); }
.cm-down { color: var(--err); }
.cm-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cm-pair > .panel { margin-top: 0; min-width: 0; }
.cm-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 24px; }
.cm-chart { width: 100%; height: 300px; min-width: 0; }
.cm-chart.cm-short { height: 190px; }
.cm-chart > .empty { height: 100%; box-sizing: border-box; }
.cm-line { display: flex; align-items: center; gap: 10px; min-height: 30px; border-top: 1px dashed var(--border); white-space: nowrap; min-width: 0; }
.cm-label + .cm-line, .panel-head + .cm-line { border-top: 0; }
.cm-line > .pill { align-self: center; flex: 0 0 auto; }
.cm-line > .ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cm-link { all: unset; cursor: pointer; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cm-link:hover { color: var(--accent); }
.cm-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.table-head.cm-row, .table-row.cm-row { grid-template-columns: var(--cm-cols); }
.table-head.cm-row > *, .table-row.cm-row > * { text-align: left; }
.table-head.cm-row > :nth-child(5), .table-row.cm-row > :nth-child(5), .table-head.cm-row > :nth-child(6), .table-row.cm-row > :nth-child(6),
.table-head.cm-row > :nth-child(8), .table-row.cm-row > :nth-child(8) { text-align: right; }
.table-row.cm-row { cursor: pointer; }
.table-row.cm-row:hover { background: var(--bg-row); }
.table-row.cm-left { opacity: 0.5; }
.cm-sort { cursor: pointer; user-select: none; }
.cm-sort:hover { color: var(--text); }
.cm-who { display: flex; align-items: center; gap: 6px; }
.cm-who > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cm-who > .pill { flex: 0 0 auto; align-self: center; }
.list-scroll .cm-table { min-width: 1060px; }
:root { --cm-ses-cols: minmax(110px, 1fr) minmax(110px, 1fr) 80px 70px minmax(120px, 1fr); --cm-led-cols: minmax(110px, 1fr) minmax(110px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr); }
.table-head.cm-ses, .table-row.cm-ses { grid-template-columns: var(--cm-ses-cols); }
.table-head.cm-led, .table-row.cm-led { grid-template-columns: var(--cm-led-cols); }
.table-head.cm-ses > *, .table-row.cm-ses > *, .table-head.cm-led > *, .table-row.cm-led > * { text-align: left; }
.table-head.cm-ses > :nth-child(n+3), .table-row.cm-ses > :nth-child(n+3), .table-head.cm-led > :nth-child(n+3), .table-row.cm-led > :nth-child(n+3) { text-align: right; }
.dialog .cm-picks { max-height: 50vh; padding-right: 10px; }
.cm-key { display: flex; gap: 14px; font-size: 11px; color: var(--text-dim); }
.cm-key i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: var(--border-strong); }
.cm-key .cm-sent { background: var(--series-2); }
.cm-key .cm-claimed { background: var(--series-3); }
.cm-key .cm-open { background: var(--warn); }
.cm-tip-head { font-weight: 600; margin-bottom: 4px; }
.cm-tip-row { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.cm-tip-row > i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }
.cm-tip-row > span { flex: 1 1 auto; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-tip-row > b { margin-left: 12px; }
.table-row.marked { background: var(--accent-soft); }

/* FLEET-FR-073: Club Settings, Club Roles -- one card per role, its state in the pill and the card's edge */
/* Club Settings: the role icon badge before the player's name */

/* Club Settings, Members: label and value on one line, a full-width slider under them */

/* History & Logs (FLEET-FR-082, DESIGN s11-12): drawn cards, action chips, the board, net in bb, the drawn table */
:root { --felt: #14553a; --felt-deep: #0c3a27; --felt-edge: #3a2a1c; --card-back: #2d4f9e; --card-back-line: #4a6fc4;
        --shade: rgba(0, 0, 0, 0.45); --shade-soft: rgba(0, 0, 0, 0.35); --slot: rgba(255, 255, 255, 0.05);
        --slot-line: rgba(255, 255, 255, 0.18); }
.pcards { display: inline-flex; gap: 3px; flex: 0 0 auto; }
.pcard { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 22px; height: 30px;
         border-radius: 4px; background: var(--card-face); color: var(--suit-spade); line-height: 1; font-weight: 700;
         box-shadow: 0 1px 3px var(--shade); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.pcard > b { font-size: 12px; font-weight: 700; letter-spacing: -0.5px; }
.pcard > i { font-style: normal; font-size: 11px; }
.pcard.sm { width: 18px; height: 25px; border-radius: 3px; }
.pcard.sm > b { font-size: 11px; }
.pcard.sm > i { font-size: 9px; }
.pcard.lg { width: 34px; height: 47px; border-radius: 5px; }
.pcard.lg > b { font-size: 17px; }
.pcard.lg > i { font-size: 15px; }
.pcard.back { background: repeating-linear-gradient(45deg, var(--card-back) 0 4px, var(--card-back-line) 4px 6px); border: 2px solid var(--card-face); }
.pcard.slot { background: var(--slot); border: 1px dashed var(--slot-line); box-shadow: none; }
.deck-two .pcard.suit-C { color: var(--suit-spade); }
.deck-two .pcard.suit-D { color: var(--suit-heart); }
.achip { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px;
         white-space: nowrap; border: 1px solid var(--border-strong); background: var(--bg-raised); color: var(--text);
         font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.achip.fold { color: var(--text-dim); background: transparent; border-color: var(--border); }
.achip.call { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.achip.bet { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.achip.allin { color: var(--err); background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 45%, transparent); font-weight: 600; }
.achip-who { color: var(--text-dim); max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.net { font-variant-numeric: tabular-nums; white-space: pre; }
.net.up { color: var(--ok); }
.net.down { color: var(--err); }
.board { display: inline-flex; gap: 8px; align-items: flex-start; }
.board-street { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.board-pot { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ptable { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 300px; }
.ptable.small { min-height: 0; aspect-ratio: 3 / 2; }
.felt { position: absolute; inset: 13% 10%; border-radius: 50%; border: 8px solid var(--felt-edge);
        background: radial-gradient(ellipse at center, var(--felt) 0%, var(--felt-deep) 100%); box-shadow: inset 0 0 30px var(--shade); }
.ptable.small .felt { border-width: 4px; }
.felt-mid { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); display: flex; flex-direction: column;
            align-items: center; gap: 6px; }
.ptable-pot { font-size: 12px; font-weight: 600; color: var(--text); background: var(--shade-soft); padding: 2px 10px;
              border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptable.small .ptable-pot { font-size: 11px; padding: 1px 7px; }
.pseat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
         width: 118px; z-index: 1; }
.ptable.small .pseat { width: 74px; }
.pseat-cards { display: flex; justify-content: center; min-height: 47px; align-items: flex-end; margin-bottom: -10px; }
.ptable.small .pseat-cards { min-height: 25px; margin-bottom: -6px; }
.pseat-box { position: relative; width: 100%; padding: 4px 8px 5px; border-radius: var(--radius-small); background: var(--bg-raised);
             border: 1px solid var(--border-strong); display: flex; flex-direction: column; align-items: center; overflow: hidden;
             box-shadow: 0 2px 8px var(--shade); }
.ptable.small .pseat-box { padding: 2px 4px 3px; }
.pseat-name { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pseat-stack { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptable.small .pseat-name, .ptable.small .pseat-stack { font-size: 11px; }
.pseat.ours .pseat-box { border-color: var(--accent); }
.pseat.acting .pseat-box { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft), 0 2px 8px var(--shade); }
.pseat.won .pseat-box { border-color: var(--ok); }
.pseat.folded { opacity: 0.45; }
.pseat.out .pseat-name { color: var(--text-dim); }
.pseat-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--warn); transform-origin: left;
               animation: pseat-drain 15s linear forwards; }
@keyframes pseat-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.pseat-act { margin-top: 2px; }
.pbet { position: absolute; transform: translate(-50%, -50%); font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap;
        background: var(--shade); padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }

/* Live tables (FR-082): Club > Live's grid of small boards, a table's page with its tabs, the drawn table and its actions */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.live-tile { margin-top: 0; cursor: pointer; min-width: 0; }
.live-tile:hover { border-color: var(--border-strong); background: var(--bg-row); }
.live-tile .panel-head { gap: 8px; }
.live-foot { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.lv-head { display: flex; flex-direction: column; min-width: 0; }
.live-felt { margin-top: 0; padding: 8px; }

/* FLEET-FR-082: Fleet > Engine and Fleet > Activity (engine.js, activity.js), on the Members page's grid language:
   one line per call or event, figures right, the request and the answer as monospace blocks */
.table-head.en-row, .table-row.en-row { grid-template-columns: 124px minmax(80px, 0.9fr) minmax(110px, 1.2fr) 60px minmax(96px, 0.9fr) 128px 72px 60px minmax(110px, 1.1fr); }
.table-head.en-row > *, .table-row.en-row > * { text-align: left; }
.table-head.en-row > :nth-child(7), .table-row.en-row > :nth-child(7) { text-align: right; }
.table-row.en-row { cursor: pointer; }
.table-row.en-row:hover { background: var(--bg-row); }
.list-scroll .en-table { min-width: 980px; }
.list-scroll .ac-table { min-width: 820px; }
.en-more, .ac-more { min-height: 24px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; }
.en-find { width: 160px; }
.en-facts .kv { flex-wrap: nowrap; }
.en-facts .kv > b, .en-facts .kv > .cm-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.en-code { margin: 0; padding: 10px 12px; max-height: 320px; overflow: auto; font-family: var(--mono); font-size: 11.5px; line-height: 1.45;
           white-space: pre-wrap; word-break: break-all; background: var(--bg-row); border: 1px solid var(--border); border-radius: var(--radius-small); cursor: pointer; }
.en-code:hover { border-color: var(--border-strong); }
.en-answers > .panel { margin-top: 0; min-width: 0; }
.en-replay-foot { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-answers .panel-head > .pill { align-self: center; }
.cm-chart.ac-chart { height: 240px; }

/* Hands (FR-082, DESIGN s12): Club > Hands, Table > Hands, a past hand's decision card (FLEET-FR-096) */
:root { --hd-cols: 104px minmax(110px, 1fr) 44px 124px 72px 56px minmax(90px, 1fr) 84px minmax(130px, 1.3fr);
        --hd-gcols: minmax(150px, 1.6fr) repeat(7, minmax(72px, 1fr)); }
.hd > * + * { margin-top: 12px; }
.hd > .hd-left { margin-top: 6px; font-size: 11px; }
.hd-bar .hd-find { width: 150px; }
.hd-flags { display: flex; align-items: center; gap: 4px; }
.hd-flag { font: inherit; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap;
           background: transparent; color: var(--text-dim); border: 1px solid var(--border-strong); }
.hd-flag:hover { color: var(--text); }
.hd-flag.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.hd-flag:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hd-tile { cursor: pointer; }
.hd-tile:hover { background: var(--bg-row); }
.hd-export { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; }
.list-scroll .hd-table { min-width: 1000px; }
.table-head.hd-row, .table-row.hd-row { grid-template-columns: var(--hd-cols); }
.table-head.hd-row > *, .table-row.hd-row > * { text-align: left; }
.table-head.hd-row > :nth-child(5), .table-row.hd-row > :nth-child(5), .table-head.hd-row > :nth-child(6), .table-row.hd-row > :nth-child(6),
.table-head.hd-row > :nth-child(8), .table-row.hd-row > :nth-child(8) { text-align: right; }
.table-row.hd-row { cursor: pointer; padding: 4px 0; }
.table-row.hd-row .board { gap: 4px; }
.table-row.hd-row:hover, .table-row.hd-pick:hover { background: var(--bg-row); }
.table-head.hd-grow, .table-row.hd-grow { grid-template-columns: var(--hd-gcols); }
.table-head.hd-grow > *, .table-row.hd-grow > * { text-align: right; }
.table-head.hd-grow > :first-child, .table-row.hd-grow > :first-child { text-align: left; }
.table-row.hd-pick { cursor: pointer; }
.hd-dec { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; padding: 10px 0 6px; border-top: 1px dashed var(--border); }
.hd-dec .kv { flex-wrap: nowrap; }
.hd-kv { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 12px; }
.hd-probs { width: 100%; height: 170px; }
.hd-probs > .empty { height: 100%; box-sizing: border-box; padding: 12px; }
.hd-images { display: flex; gap: 10px; overflow-x: auto; padding: 6px 0 4px; }
.hd-images a { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; max-width: 160px; font-size: 11px; color: var(--text-dim); text-decoration: none; }
.hd-images a:hover { color: var(--accent); }
.hd-images img { height: 90px; max-width: 160px; object-fit: cover; border-radius: var(--radius-small); border: 1px solid var(--border); background: var(--bg-raised); }
@media (max-width: 900px) { .hd-dec { grid-template-columns: minmax(0, 1fr); } }

/* ---- Machines (FLEET-FR-085): needs you, services, meters, chart, device rows ---- */
.attn-item .what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mx-svc { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 0; border-top: 1px dashed var(--border); white-space: nowrap; }
.mx-svc:first-of-type { border-top: 0; }
.cm-figures.mx-silent { opacity: 0.45; }
.mx-chart-head { display: flex; align-items: center; gap: 10px; font-size: 12px; white-space: nowrap; }
.mx-chart { height: 140px; min-width: 0; }
/* the devices: the shared list row (UI.md 4 "List and row"), its player's colour the first cell's mark, its buttons on the right */
:root { --mx-cols: minmax(110px, 0.9fr) 92px minmax(110px, 1fr) minmax(110px, 1fr) minmax(150px, 1.2fr) minmax(110px, 1fr) 184px; }
.table-head.mx-row, .table-row.mx-row { grid-template-columns: var(--mx-cols); }
.table-head.mx-row > *, .table-row.mx-row > * { text-align: left; }
.table-row.mx-row a { color: var(--accent); text-decoration: none; }
.table-row.mx-row a:hover { text-decoration: underline; }
.mx-first { display: flex; align-items: center; gap: 8px; padding-left: 8px; border-left: 2px solid var(--player); }
.mx-first > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mx-role { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-dim); }
.mx-role svg { width: 13px; height: 13px; flex: none; }
.mx-acts { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.mx-name { padding: 0; color: var(--text); font-size: 13px; font-weight: 600; }
.mx-name:hover { color: var(--accent); }
/* FLEET-FR-114: the three status cards are the tabs (UI.md 4): a whole panel is the one link, the tab in hand underlined */
.mx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.mx-cards > .mx-card { margin-top: 0; min-width: 0; color: inherit; text-decoration: none; }
.mx-card:hover { border-color: var(--border-strong); }
.mx-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mx-card.on { box-shadow: inset 0 -2px 0 var(--accent); }
.mx-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.mx-figs > div { min-width: 0; }
.mx-card.silent .mx-figs { opacity: 0.45; }
.mx-count { min-height: 20px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* FLEET-FR-088: a fault's clip and a device's screen */
.clip-view { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.clip-big { width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--radius-small); border: 1px solid var(--border); background: var(--bg-raised); }
.clip-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.clip-thumb { flex: 0 0 auto; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--bg-raised); cursor: pointer; }
.clip-thumb.on { border-color: var(--accent); }
.clip-thumb img { display: block; height: 54px; width: 96px; object-fit: cover; border-radius: var(--radius-small); }
.clip-link { white-space: nowrap; }
.ac-what { display: flex; align-items: center; gap: 8px; min-width: 0; }
.warn-text { color: var(--warn); }
/* ---- Table view (FLEET-FR-096): one stage for a live table and a past hand (table_stage.js), the big drawn table,
   its motion, the VPIP badge, the transport bar, the Actions log, the decision card and the result ---- */
:root { --white: #fff; --raise: #ff8a3d; --show: #c79bff; --card-face-lo: #dde1e9; --felt-hi: #1e7d52;
        --felt-mid: #155f3f; --felt-lo: #0b3a26; --rail-hi: #5e3e24; --rail-mid: #3a2615; --rail-lo: #24170c;
        --seat-hi: #283042; --seat-lo: #1a1f2b; --seat-stack: #cfd6e4; --dealer-lo: #d7dbe3; --chip-red: #d0453e;
        --chip-red-edge: #7d1f1b; --chip-green: #2f8f5a; --chip-green-edge: #154a2d; --chip-black: #3b4252;
        --chip-black-edge: #14171e; --chip-gold: #e0a93b; --chip-gold-edge: #7a5714; --chip-stripe: #f4efe2;
        --cue-text: #dff3ff; --cue-dot: #8fd3ff; --vpip-fire-a: #ff8a1f; --vpip-fire-b: #e3271e;
        --vpip-fire-text: #fff4de; --vpip-fire-icon: #ffe08a; --vpip-warm-a: #f0b23e; --vpip-warm-b: #d97a1c;
        --vpip-warm-text: #fff7e6; --vpip-warm-icon: #fff3c9; --vpip-cool-a: #3fb7a6; --vpip-cool-b: #2b7f9e;
        --vpip-cool-text: #eafffb; --vpip-cool-icon: #dffcf6; --vpip-ice-a: #48bdf0; --vpip-ice-b: #2a5fd0;
        --vpip-ice-text: #eefaff; }

/* Action chips: each kind its own colour and icon, so a chip reads without its word */
.achip { gap: 4px; padding: 0 8px 0 6px; }
.achip-ico { width: 11px; height: 11px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8;
             stroke-linecap: round; stroke-linejoin: round; }
.achip.allin .achip-ico { fill: currentColor; stroke-width: 0.8; }
.achip.check { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.achip.raise { color: var(--raise); background: rgba(255, 138, 61, 0.16); border-color: rgba(255, 138, 61, 0.45); font-weight: 600; }
.achip.post { color: var(--text-dim); background: transparent; border-style: dashed; }
.achip.show { color: var(--show); background: rgba(199, 155, 255, 0.14); border-color: rgba(199, 155, 255, 0.4); }

/* The big cards (the suit letter drawn from data-s) */
.pcard.xl { position: relative; display: block; width: 56px; height: 78px; border-radius: 7px;
            background: linear-gradient(160deg, var(--white) 0%, var(--card-face) 65%, var(--card-face-lo) 100%);
            box-shadow: 0 4px 12px var(--shade), inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.pcard.xl > b { position: absolute; left: 6px; top: 5px; font-size: 23px; line-height: 1; letter-spacing: -1.5px; }
.pcard.xl::after { content: attr(data-s); position: absolute; left: 7px; top: 29px; font-size: 14px; line-height: 1; }
.pcard.xl > i { position: absolute; right: 5px; bottom: 4px; font-size: 32px; line-height: 1; }
.pcard.xl.back { border: 3px solid var(--card-face);
                 background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.22) 0 14%, transparent 15%),
                             repeating-linear-gradient(45deg, var(--card-back) 0 5px, var(--card-back-line) 5px 7px); }
.pcard.xl.slot { background: rgba(255, 255, 255, 0.04); border: 1.5px dashed rgba(255, 255, 255, 0.16); box-shadow: none; }

/* The big table: felt and rail, street and stakes written on the felt, seats, bets, the pot, the button as a disc on
   the felt beside its seat, and the table's corners (hand id, seated or date, buttons). Moves are in container units
   of the table (cqw / cqh), so it is a size container. */
.ptable.big { aspect-ratio: 16 / 8.8; min-height: 460px; container-type: size; }
.ptable.big .board { gap: 12px; }
.ptable.big .board .pcards { gap: 6px; }
.ptable.big .felt { inset: 11% 8%; border: 14px solid transparent;
                    background: radial-gradient(ellipse at 50% 42%, var(--felt-hi) 0%, var(--felt-mid) 48%, var(--felt-lo) 100%) padding-box,
                                linear-gradient(180deg, var(--rail-hi) 0%, var(--rail-mid) 55%, var(--rail-lo) 100%) border-box;
                    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55), 0 14px 40px rgba(0, 0, 0, 0.5); }
.ptable.big .felt::before { content: ""; position: absolute; inset: 9% 7%; border-radius: 50%;
                            border: 1px solid rgba(255, 255, 255, 0.07); pointer-events: none; }
.ptable.big .felt-mid { top: 48%; gap: 10px; }
.felt-street { font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.felt-label { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255, 255, 255, 0.2);
              white-space: nowrap; }
.ptable.big .ptable-pot { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; padding: 4px 16px; background: rgba(0, 0, 0, 0.45); }
.ptable-pot.none { visibility: hidden; }     /* a pot of 0 keeps its place, so the board does not move when it comes */
.ptable.big .pseat { width: 168px; }
.ptable.big .pseat-cards { min-height: 78px; margin-bottom: -16px; }
.ptable.big .pseat-cards .pcards { gap: 0; }
.ptable.big .pseat-cards .pcard:first-child { transform: rotate(-5deg) translateX(4px); }
.ptable.big .pseat-cards .pcard:last-child:not(:first-child) { transform: rotate(5deg) translateX(-4px); }
/* the seat box: the VPIP badge left, name and stack beside it; the box hugs them and stays centred on its seat */
.ptable.big .pseat-box { border-radius: 10px; background: linear-gradient(180deg, var(--seat-hi) 0%, var(--seat-lo) 100%); }
.ptable.big .pseat-box.has-vpip { flex-direction: row; justify-content: center; gap: 9px; width: auto; min-width: 112px; max-width: 100%;
                                  padding: 7px 14px 8px 8px; }
.pseat-id { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.ptable.big .pseat-box.has-vpip .pseat-id { align-items: flex-start; }
.ptable.big .pseat-name { font-size: 15px; }
.ptable.big .pseat-stack { font-size: 14px; font-weight: 600; color: var(--seat-stack); }
.ptable.big .pseat-act { margin-top: 5px; }
.ptable.big .pseat-act .achip { height: 24px; font-size: 12.5px; }
.ptable.big .pseat-act .achip-ico { width: 12px; height: 12px; }
.ptable.big .pbet { font-size: 13px; padding: 3px 10px 3px 6px; display: inline-flex; align-items: center; gap: 6px; }
.pdealer { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; z-index: 1;
           background: radial-gradient(circle at 35% 30%, var(--white) 0%, var(--dealer-lo) 100%); color: var(--ink); font-size: 13px; font-weight: 800;
           display: inline-flex; align-items: center; justify-content: center;
           box-shadow: 0 2px 6px var(--shade), inset 0 0 0 2px rgba(0, 0, 0, 0.12); }
.ptable.small .pdealer { width: 15px; height: 15px; font-size: 8px; }
.ptable-corner { position: absolute; top: 2px; z-index: 2; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ptable-corner.tl { left: 4px; }
.ptable-corner.tr { right: 4px; }
.pt-hand, .pt-seated { padding: 3px 10px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--border-strong);
                       color: var(--text-dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-hand b, .pt-seated b { color: var(--text); }

/* Chip stacks on bets (their height follows the amount: c1 one chip ... c6 a tower) and a pile by the pot */
.pchips { position: relative; display: inline-block; width: 16px; height: 9px; flex: 0 0 auto; margin-top: -2px; }
.pchips > b, .ppile > b { position: absolute; left: 0; width: 16px; height: 7px; border-radius: 50%;
                          background: linear-gradient(90deg, var(--chip) 0 18%, var(--chip-stripe) 18% 28%, var(--chip) 28% 72%, var(--chip-stripe) 72% 82%, var(--chip) 82%);
                          box-shadow: 0 1.5px 0 var(--chip-edge), 0 2px 3px rgba(0, 0, 0, 0.45); }
.pchips > b:last-child, .ppile > b:last-child { background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.35) 0 22%, transparent 24%),
                                               radial-gradient(ellipse at 50% 50%, var(--chip) 0 52%, var(--chip-stripe) 53% 62%, var(--chip) 63%); }
.pchips { --chip: var(--chip-red); --chip-edge: var(--chip-red-edge); }
.pchips.c3, .pchips.c4 { --chip: var(--chip-green); --chip-edge: var(--chip-green-edge); }
.pchips.c5, .pchips.c6 { --chip: var(--chip-black); --chip-edge: var(--chip-black-edge); }
.pchips > b:nth-child(1) { bottom: 0; }
.pchips > b:nth-child(2) { bottom: 3px; }
.pchips > b:nth-child(3) { bottom: 6px; }
.pchips > b:nth-child(4) { bottom: 9px; }
.pchips > b:nth-child(5) { bottom: 12px; }
.pchips > b:nth-child(6) { bottom: 15px; }
.ppile { position: relative; display: inline-block; width: 26px; height: 13px; flex: 0 0 auto; --chip: var(--chip-gold); --chip-edge: var(--chip-gold-edge); }
.ppile > b:nth-child(1) { left: 0; bottom: 0; --chip: var(--chip-red); --chip-edge: var(--chip-red-edge); }
.ppile > b:nth-child(2) { left: 10px; bottom: 0; --chip: var(--chip-green); --chip-edge: var(--chip-green-edge); }
.ppile > b:nth-child(3) { left: 5px; bottom: 5px; }

/* The VPIP badge (ClubGG's own badge as the eye reads it), four steps cold to hot, each with its icon: ice snowflake,
   cool drop, warm sun, fire flame; a badge never read is an empty one, so every seat box is laid out alike */
.pvp { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; flex-direction: column; align-items: center;
       justify-content: center; gap: 1px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--white); }
.pvp > b { font-size: 11px; font-weight: 800; letter-spacing: -0.3px; }
.pvp > svg { width: 13px; height: 13px; flex: 0 0 auto; }
.pvp.fire { background: linear-gradient(150deg, var(--vpip-fire-a) 0%, var(--vpip-fire-b) 100%); color: var(--vpip-fire-text);
            box-shadow: 0 0 10px rgba(255, 110, 20, 0.65), inset 0 0 0 1px rgba(255, 220, 150, 0.4); }
.pvp.fire > svg { fill: var(--vpip-fire-icon); transform-origin: 50% 100%; animation: vpip-flame 0.9s ease-in-out infinite alternate; }
.pvp.warm { background: linear-gradient(150deg, var(--vpip-warm-a) 0%, var(--vpip-warm-b) 100%); color: var(--vpip-warm-text); box-shadow: inset 0 0 0 1px rgba(255, 235, 180, 0.35); }
.pvp.warm > svg { fill: var(--vpip-warm-icon); stroke: var(--vpip-warm-icon); stroke-width: 1.1; stroke-linecap: round; }
.pvp.cool { background: linear-gradient(150deg, var(--vpip-cool-a) 0%, var(--vpip-cool-b) 100%); color: var(--vpip-cool-text); box-shadow: inset 0 0 0 1px rgba(210, 255, 245, 0.3); }
.pvp.cool > svg { fill: var(--vpip-cool-icon); }
.pvp.ice { background: linear-gradient(150deg, var(--vpip-ice-a) 0%, var(--vpip-ice-b) 100%); color: var(--vpip-ice-text);
           box-shadow: 0 0 10px rgba(90, 185, 255, 0.6), inset 0 0 0 1px rgba(220, 245, 255, 0.45); }
.pvp.ice > svg { fill: none; stroke: var(--vpip-ice-text); stroke-width: 1.2; stroke-linecap: round; animation: vpip-frost 8s linear infinite; }
.pvp.none { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: var(--text-faint); }
@keyframes vpip-flame { from { transform: scale(0.95, 0.92) rotate(-4deg); } to { transform: scale(1.12, 1.22) rotate(4deg); } }
@keyframes vpip-frost { to { transform: rotate(360deg); } }

/* The table's motion. Every cue keys to an event time through a negative animation-delay (tableHtml), so the feed's
   redraws continue it instead of restarting it. Transform and opacity only.
   New hand: the "New hand #id" pill over the board, the rail glows, a sheen sweeps the felt, the hole cards fly from
   the middle to each seat in deal order, the button slides from its old seat. */
.felt-cue { position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none;
            padding: 6px 18px; border-radius: 999px; background: rgba(10, 14, 20, 0.78); border: 1px solid rgba(140, 210, 255, 0.55);
            color: var(--cue-text); font-size: 14px; font-weight: 600; letter-spacing: 0.5px; white-space: nowrap;
            animation: cue-pop 1.5s ease-out both; animation-delay: var(--fresh, 0s); }
.ptable.small .felt-cue { font-size: 11px; padding: 2px 9px; top: 30%; }
.ptable.big .felt-cue { top: 47%; padding: 7px 20px 7px 16px; display: inline-flex; align-items: center; gap: 8px;
                        background: rgba(10, 16, 24, 0.82); backdrop-filter: blur(4px);
                        box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45), 0 0 20px rgba(120, 200, 255, 0.18); }
.ptable.big .felt-cue::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cue-dot);
                                box-shadow: 0 0 8px var(--cue-dot); }
.ptable.big .felt-cue b { color: var(--white); }
.ptable.fresh .felt::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; pointer-events: none;
                             border: 3px solid rgba(140, 210, 255, 0.75); animation: cue-ring 0.9s ease-out both;
                             animation-delay: var(--fresh, 0s); }
.ptable.big.fresh .felt::after { inset: -15px; border: 2px solid rgba(150, 215, 255, 0.5);
                                 box-shadow: 0 0 26px rgba(120, 200, 255, 0.35), inset 0 0 16px rgba(120, 200, 255, 0.25);
                                 animation: rail-glow 1.2s ease-out both; animation-delay: var(--fresh, 0s); }
.ptable.fresh .pseat-cards .pcard { animation: deal-in 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2) both; animation-delay: var(--fresh, 0s); }
.ptable.fresh .pseat-cards .pcard + .pcard { animation-delay: calc(var(--fresh, 0s) + 0.08s); }
.ptable.big.fresh .pseat-cards .pcard { animation: deal-fly 0.5s cubic-bezier(0.25, 0.75, 0.35, 1) both;
                                        animation-delay: calc(var(--fresh, 0s) + var(--d1, 0s)); }
.ptable.big.fresh .pseat-cards .pcard + .pcard { animation-delay: calc(var(--fresh, 0s) + var(--d2, 0.07s)); }
.felt-sheen { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; }
.felt-sheen::before { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 30%;
                      background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.09) 45%, rgba(255, 255, 255, 0.13) 50%, transparent 100%);
                      animation: felt-sheen 1.1s cubic-bezier(0.4, 0, 0.3, 1) both; animation-delay: var(--fresh, 0s); }
.ptable.big .pdealer.slide { animation: dealer-slide 0.6s cubic-bezier(0.3, 0.7, 0.3, 1) both; animation-delay: var(--da, 0s); }
@keyframes cue-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
                     14% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
                     24% { transform: translate(-50%, -50%) scale(1); }
                     75% { opacity: 1; transform: translate(-50%, -50%); }
                     100% { opacity: 0; transform: translate(-50%, -70%); } }
@keyframes cue-ring { from { opacity: 1; transform: scale(0.97); } to { opacity: 0; transform: scale(1.05); } }
@keyframes rail-glow { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes deal-in { from { opacity: 0; transform: translateY(-28px) scale(0.5) rotate(-14deg); } }
@keyframes deal-fly { 0% { opacity: 0; translate: var(--dx, 0) var(--dy, 0); rotate: -180deg; scale: 0.55; }
                      15% { opacity: 1; }
                      60% { translate: calc(var(--dx, 0px) * 0.3) calc(var(--dy, 0px) * 0.3 - 22px); rotate: -25deg; scale: 0.95; }
                      100% { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; } }
@keyframes felt-sheen { from { opacity: 0; translate: -110% 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { opacity: 0; translate: 340% 0; } }
@keyframes dealer-slide { from { translate: var(--bx, 0) var(--by, 0); } }

/* The board: new cards flip in one after another, the turn and the river with a short glow; the street word on the
   felt cross-fades */
.ptable.big .bflip { position: relative; display: block; perspective: 700px; }
.ptable.big .bflip > .pcard { animation: board-flip 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--bd, 0s); }
.ptable.big .bflip.glow::after { content: ""; position: absolute; inset: 0; border-radius: 7px; pointer-events: none;
                                 box-shadow: 0 0 22px 5px rgba(255, 214, 130, 0.5); animation: card-glow 0.9s ease-out both;
                                 animation-delay: calc(var(--bd, 0s) + 0.15s); }
.felt-street.swap { display: grid; }
.felt-street.swap > b { grid-area: 1 / 1; justify-self: center; font-weight: inherit;
                        animation: street-in 0.5s ease-out both; animation-delay: var(--sa, 0s); }
.felt-street.swap > b.was { animation-name: street-out; }
@keyframes board-flip { 0% { opacity: 0; transform: rotateY(-95deg) translateY(-12px); }
                        45% { opacity: 1; transform: rotateY(0deg) translateY(-5px); }
                        100% { opacity: 1; transform: none; } }
@keyframes card-glow { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes street-in { from { opacity: 0; translate: 0 6px; } }
@keyframes street-out { to { opacity: 0; translate: 0 -6px; } }

/* Chips and seats: a bet slides out from its seat, a street's bets slide into the pot and the pot bumps; the seat to
   act pulses beside its draining bar, an action chip pops in, folded cards slide toward the middle and fade */
.ptable.big .pbet.slide { animation: bet-slide 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--ba, 0s); }
.ptable.big .pbet.gone { pointer-events: none; animation: bet-collect 0.5s cubic-bezier(0.5, 0, 0.6, 1) both; animation-delay: var(--ca, 0s); }
.ptable.big .ptable-pot.bump { animation: pot-bump 0.4s ease-out both; animation-delay: calc(var(--ca, 0s) + 0.4s); }
.ptable.big .pseat.acting .pseat-box::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
                                               box-shadow: inset 0 0 0 1.5px var(--warn), inset 0 0 18px color-mix(in srgb, var(--warn) 40%, transparent);
                                               animation: seat-pulse 1.6s ease-in-out infinite; animation-delay: var(--turn, 0s); }
.ptable.big .pseat-act.pop { animation: act-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; animation-delay: var(--aa, 0s); }
.ptable.big .pfold .pcard { animation: fold-away 0.55s ease-in both; animation-delay: var(--fa, 0s); }
@keyframes bet-slide { 0% { opacity: 0; translate: var(--sx, 0) var(--sy, 0); scale: 0.8; } 30% { opacity: 1; } }
@keyframes bet-collect { 80% { opacity: 1; } to { opacity: 0; translate: var(--px, 0) var(--py, 0); scale: 0.7; } }
@keyframes pot-bump { 40% { scale: 1.1; } }
@keyframes seat-pulse { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes act-pop { from { opacity: 0; scale: 0.6; translate: 0 -5px; } }
@keyframes fold-away { to { opacity: 0; translate: calc(var(--dx, 0px) * 0.3) calc(var(--dy, 0px) * 0.3); scale: 0.7; } }

/* The result on the felt: winners glow, "+$X" rises under the seat, the pot slides to the winner */
.ptable.big .pseat.won .pseat-box { border-color: var(--ok);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 35%, transparent), 0 0 24px color-mix(in srgb, var(--ok) 40%, transparent), 0 2px 8px var(--shade); }
.pwon { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; background: rgba(0, 0, 0, 0.55); }
.ptable.big .pseat-act.rise { animation: win-rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1.2) both; animation-delay: calc(var(--wa, 0s) + 0.55s); }
.ptable.big .pseat.winning .pseat-box { animation: win-glow 1s ease-out both; animation-delay: calc(var(--wa, 0s) + 0.5s); }
.pwin { position: absolute; transform: translate(-50%, -50%); z-index: 2; pointer-events: none;
        animation: pot-go 0.7s cubic-bezier(0.45, 0, 0.3, 1) both; animation-delay: calc(var(--wa, 0s) + 0.1s); }
.pwin .ppile { scale: 1.3; }
@keyframes win-rise { from { opacity: 0; translate: 0 12px; scale: 0.8; } }
@keyframes win-glow { from { opacity: 0.6; } 30% { opacity: 1; scale: 1.04; } to { opacity: 1; scale: 1; } }
@keyframes pot-go { 0% { opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; translate: var(--wx, 0) var(--wy, 0); } 100% { opacity: 0; translate: var(--wx, 0) var(--wy, 0); } }

/* The stage: the table panel (the felt, the transport bar under it) and the Actions log beside it fill the height
   under the page head, so the page never scrolls and nothing moves between live and a past hand; the table keeps its
   proportions, sized by the smaller of the width and the height left, centred; only the log's body scrolls. Below
   1000px wide the page stacks and scrolls. */
.stage-host { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.stage { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr); gap: 12px; }
.stage > .panel { margin-top: 0; min-height: 0; min-width: 0; }
.stage-main { display: flex; flex-direction: column; padding: 8px; }
.stage-felt { flex: 1 1 auto; min-height: 0; container-type: size; display: flex; align-items: center; justify-content: center; padding-bottom: 34px; }
/* the seats are fixed in px and sit on the rail (centres at 11/89 % of the height, 9/91 % of the width), so the
   table leaves room for half a seat beyond its box: 120px seat height over 0.78 of it (the bottom seat's action chip
   hangs into the 34px under it), 168px seat width over 0.82. The action chip hangs under the seat's box without
   adding to the seat's height, so a seat does not move when its chip comes or goes. */
.stage .ptable.big { flex: 0 0 auto; min-height: 0;
                     width: min(100cqw, (100cqw - 168px) / 0.82, max(240px, (100cqh - 120px) / 0.78) * 16 / 8.8); }
.stage .ptable.big .pseat-act { position: absolute; left: 0; right: 0; top: 100%; display: flex; justify-content: center; }
.stage-past .pseat-timer { display: none; }
.stage-past .ptable-corner.tl { max-width: calc(100% - 300px); flex-wrap: wrap; }

/* The transport bar, the same height in both modes: live = Previous hand, the street progress, the Live pill (it
   carries the freshness: Live 1.2 s, Stale, Lost view, Recovering); a past hand = Previous hand, step back / play /
   step forward, the scrubber with a tick per street, where, Next hand or Live */
.stage-bar { flex: 0 0 44px; display: flex; align-items: center; gap: 10px; padding: 6px 4px 0; border-top: 1px dashed var(--border); min-width: 0; }
.st-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; flex: 0 0 auto;
          font: inherit; font-size: 12px; font-weight: 600; color: var(--text); background: var(--bg-raised); border: 1px solid var(--border-strong);
          cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.st-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.st-btn:active:not(:disabled) { transform: scale(0.96); }
.st-btn:disabled { opacity: 0.4; cursor: default; }
.st-btn:focus-visible, .st-live:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-icon { width: 30px; padding: 0; justify-content: center; }
.st-play { width: 36px; height: 34px; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.st-ico { width: 12px; height: 12px; fill: currentColor; flex: 0 0 auto; }
.st-steps { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.st-progress { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; overflow: hidden;
               font-size: 11px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-faint); }
.st-prog { opacity: 0.45; transition: opacity 0.3s, color 0.3s; }
.st-prog.on { opacity: 1; color: var(--text-dim); }
.st-prog.now { color: var(--text); }
.st-sep { width: 18px; height: 1px; background: var(--border-strong); flex: 0 0 auto; }
.st-live { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 14px; border-radius: 999px; flex: 0 0 auto;
           font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase;
           color: var(--err); background: var(--err-soft); border: 1px solid color-mix(in srgb, var(--err) 45%, transparent); }
.st-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: st-blink 1.6s ease-in-out infinite; }
button.st-live { cursor: pointer; transition: transform 0.1s, background 0.15s; }
button.st-live:hover { background: color-mix(in srgb, var(--err) 28%, transparent); }
button.st-live:active { transform: scale(0.96); }
.st-live.on { min-width: 118px; justify-content: center; font-variant-numeric: tabular-nums; }
.st-age { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: 0.9; }
.st-live.on.warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.st-live.on.err { color: var(--text-dim); background: transparent; border-color: var(--border-strong); }
.st-live.on.err::before { animation: none; opacity: 0.5; }
@keyframes st-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.st-scrub { position: relative; flex: 1 1 auto; min-width: 80px; display: flex; align-items: center; }
.st-scrub input { width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; }
.st-ticks { position: absolute; left: 8px; right: 8px; top: 50%; height: 14px; margin-top: -7px; pointer-events: none; }
.st-tick { position: absolute; top: 0; width: 2px; height: 14px; margin-left: -1px; border-radius: 1px; background: var(--text-dim); opacity: 0.6; }
.st-where { flex: 0 0 110px; font-size: 12px; color: var(--text-dim); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* A past hand's corner buttons: Copy link, Back to live with where the live table is now (hand and street), and a taped
   hand's "Saving this hand" (History has not stored it yet) */
.pt-btn { font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap;
          color: var(--text-dim); background: var(--bg-raised); border: 1px solid var(--border-strong); transition: color 0.15s, border-color 0.15s, transform 0.1s; }
.pt-btn:hover { color: var(--text); border-color: var(--accent); }
.pt-btn:active, .pt-back:active { transform: scale(0.96); }
.pt-back { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px 0 12px; border-radius: 999px; cursor: pointer;
           font: inherit; font-size: 12px; font-weight: 600; color: var(--err); background: var(--err-soft);
           border: 1px solid color-mix(in srgb, var(--err) 45%, transparent); transition: background 0.15s, transform 0.1s; }
.pt-back::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: st-blink 1.6s ease-in-out infinite; }
.pt-back:hover { background: color-mix(in srgb, var(--err) 28%, transparent); }
.pt-tick { font-weight: 600; color: var(--text-dim); }
.pt-tick:empty { display: none; }
.pt-saving { padding: 3px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; color: var(--warn); background: var(--warn-soft);
             border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }

/* The Actions log: per street a header with the whole board so far (the earlier streets' cards dimmed), then one row
   per action, the player's full name left and the action's chip right */
.lv-log { margin-top: 0; display: flex; flex-direction: column; min-width: 0; }
.stage .lv-log-body { position: relative; flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.lv-st { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding-bottom: 5px; border-bottom: 1px dashed var(--border);
         font-size: 11px; font-weight: 600; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-dim); }
.lv-log-body > .lv-st:first-child { margin-top: 2px; }
.lv-board { display: inline-flex; align-items: center; gap: 6px; }
.lv-old { opacity: 0.4; }
.lv-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.lv-who { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.lv-row.ours .lv-who { color: var(--accent); }
.lv-row .achip { height: 23px; font-size: 12px; }
.lv-none { padding: 12px 0; }
/* a past hand: the rows are steps (the current one lit), our decisions carry the accent dot and open their card under
   the row; the Result section closes the log */
.st-row { cursor: pointer; border-radius: 6px; padding-left: 6px; padding-right: 6px; transition: background 0.15s; }
.st-row:hover { background: var(--bg-row); }
.st-row.on { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.st-our .lv-who::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.st-card { margin: 4px 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg-raised); border: 1px solid var(--border-strong); }
.st-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.st-card .hd-dec { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0; border-top: 0; }
.st-card .hd-probs { height: 150px; }
.st-res-head { display: flex; align-items: center; margin-top: 14px; padding-top: 4px; padding-bottom: 5px; }
.st-res-head.on { box-shadow: inset 2px 0 0 var(--accent); }
.st-pot { font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-dim); }
.st-res .pcards { flex: 0 0 auto; margin-left: auto; }
.st-res .net { flex: 0 0 auto; min-width: 64px; text-align: right; font-size: 13px; font-weight: 600; }

@media (max-width: 1000px) {
  .stage-host { flex: 0 0 auto; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .stage-felt { container-type: normal; display: block; }
  .stage .ptable.big { width: 100%; }
  .stage .lv-log-body { flex: none; max-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
  .felt-cue, .ptable.fresh .felt::after, .ptable.fresh .pseat-cards .pcard { animation-duration: 0.01s; }
  .felt-sheen, .ptable.big .pbet.gone, .ptable.big .pfold, .pwin { display: none; }
  .ptable.big.fresh .felt::after, .ptable.big.fresh .pseat-cards .pcard, .ptable.big .pdealer.slide, .ptable.big .bflip > .pcard,
  .ptable.big .bflip.glow::after, .felt-street.swap > b, .ptable.big .pbet.slide, .ptable.big .ptable-pot.bump,
  .ptable.big .pseat.acting .pseat-box::before, .ptable.big .pseat-act.pop, .ptable.big .pseat-act.rise, .ptable.big .pseat.winning .pseat-box,
  .st-live::before, .pt-back::before, .pvp.fire > svg, .pvp.ice > svg { animation: none; }
  .felt-street.swap > b.was, .ptable.big .bflip.glow::after, .ptable.big.fresh .felt::after { opacity: 0; }
}
/* Michael 25.11: an action button whose request is on its way (app.js click guard) */
button.is-busy { opacity: 0.6; cursor: progress; }

/* FLEET-FR-101: Settings > Users and My Account */
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; font-size: 13px; padding: 6px 0 10px; }
.rail-me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* FLEET-FR-100 Cashier: the rail's count, the history's columns, the two screenshots side by side (a plain container:
   the phone layout stacks them) */
.rail-count { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 600; line-height: 18px;
              text-align: center; font-variant-numeric: tabular-nums; background: var(--warn-soft); color: var(--warn); }
.rail-count[hidden] { display: none; }
/* FLEET-FR-114: the Machines entry's dot, red or yellow as its Needs You is (design 2) */
.rail-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rail-dot.err { background: var(--err); }
.rail-dot.warn { background: var(--warn); }
.rail-dot[hidden] { display: none; }
:root { --cs-cols: 104px minmax(140px, 1.3fr) 56px 76px 104px 76px minmax(80px, 0.8fr) 132px minmax(90px, 0.8fr) 136px; }
.table-head.cs-row, .table-row.cs-row { grid-template-columns: var(--cs-cols); }
.table-head.cs-row > *, .table-row.cs-row > * { text-align: left; }
.table-head.cs-row > :nth-child(5), .table-row.cs-row > :nth-child(5) { text-align: right; }
.table-row.cs-row, .cm-line.cs-line { cursor: pointer; }
.table-row.cs-row:hover, .cm-line.cs-line:hover { background: var(--bg-row); }
.table-row.cs-bad { box-shadow: inset 2px 0 0 var(--err); }
.list-scroll .cs-table { min-width: 1160px; }
.dialog .cs-picks { max-height: 40vh; padding-right: 10px; }
.cs-review > .cm-bar { margin-bottom: 8px; }
.cs-shots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 12px 0; }
.cs-shots figure { margin: 0; min-width: 0; }
.cs-shot { margin-top: 4px; min-height: 120px; display: flex; align-items: center; justify-content: center;
           border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--bg-row); overflow: hidden; }
.cs-shot img { display: block; width: 100%; height: auto; }
.cs-shot a { display: block; width: 100%; }
.cs-acts { padding-top: 10px; border-top: 1px dashed var(--border); }
.cs-acts > .field { flex: 1 1 200px; width: auto; }
.cs-gap { flex: 1; }
:root { --cb-cols: minmax(180px, 1.4fr) 110px 110px 110px minmax(170px, 1fr); }
.table-head.cb-row, .table-row.cb-row { grid-template-columns: var(--cb-cols); }
.table-head.cb-row > *, .table-row.cb-row > * { text-align: left; }
.table-head.cb-row > :nth-child(2), .table-row.cb-row > :nth-child(2) { text-align: right; }
.list-scroll .cb-table { min-width: 820px; }
.cb-tick { display: inline-block; width: 13px; flex: 0 0 auto; }
/* FLEET-FR-100 Cashier, the Humans tab: the Balances table */
:root { --cs-bal-cols: minmax(180px, 1.6fr) 120px 120px 120px 120px; }
.table-head.cs-bal, .table-row.cs-bal { grid-template-columns: var(--cs-bal-cols); }
.table-head.cs-bal > *, .table-row.cs-bal > * { text-align: left; }
.table-head.cs-bal > :nth-child(n+2), .table-row.cs-bal > :nth-child(n+2) { text-align: right; }
.table-row.cs-bal { cursor: pointer; }
.table-row.cs-bal:hover { background: var(--bg-row); }
.list-scroll .cs-bal-table { min-width: 700px; }

/* ---- the shared kit (UI.md 4 and 4.1): the eight controls and the one Activity row ---- */
.ok-text { color: var(--ok); }
.toggle {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 16px;
  margin: 0;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: background 0.15s ease;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  transition: left 0.15s ease;
}
.toggle:checked { background: var(--accent); }
.toggle:checked::after { left: 16px; }
.toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle:disabled { opacity: 0.5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-small); overflow: hidden; }
.seg-opt { border: 0; background: none; color: var(--text-dim); font: inherit; font-size: 12px; padding: 6px 12px; cursor: pointer; text-decoration: none; }
.seg-opt + .seg-opt { border-left: 1px solid var(--border-strong); }
.seg-opt:hover { color: var(--text); }
.seg-opt.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.range { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.range input[type="range"] { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); }
.range-value { flex: 0 0 auto; min-width: 64px; text-align: right; }
.number { display: inline-flex; align-items: center; gap: 6px; }
.number .field { width: 120px; text-align: right; }
.file-pick { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.optional { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.optional.off > :not(.toggle) { opacity: 0.45; pointer-events: none; }
.kv-stamp { font-size: 11px; }
:root { --ac-cols: 128px minmax(110px, 0.8fr) minmax(180px, 1.6fr) minmax(90px, 0.8fr) minmax(80px, 0.6fr); }
.table-head.ac-row, .table-row.ac-row { grid-template-columns: var(--ac-cols); }
.table-row.ac-row { font-family: var(--mono); font-size: 11.5px; min-height: 30px; }   /* a log's one height, denser than a list */
.table-row.ac-row a { color: var(--accent); text-decoration: none; }
.table-row.ac-row a:hover { text-decoration: underline; }
.table-head.ac-row > :nth-child(4), .table-row.ac-row > :nth-child(4) { text-align: right; }
.table-row.ac-compact { padding: 4px 0; }
/* the shell head: the club's name and its id under the Fleet's own (UI.md 6) */
.club-head { display: flex; align-items: center; gap: 6px; padding: 0 8px 12px; min-width: 0; font-size: 12px; }
.club-head-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.club-head-id { flex: 0 0 auto; font-size: 11px; color: var(--text-dim); }
.club-head .issues-pill { flex: 0 0 auto; }
:root { --us-cols: minmax(120px, 1.4fr) minmax(70px, 100px) minmax(80px, 100px) minmax(90px, 110px) minmax(100px, 130px) 64px; }   /* fits a 900 px window */
.table-head.us-row, .table-row.us-row { grid-template-columns: var(--us-cols); }
.table-head.us-row > :last-child, .table-row.us-row > :last-child { text-align: right; }
:root { --st-list-cols: minmax(140px, 1fr) minmax(0, 2fr) 80px; --tk-cols: minmax(140px, 1.4fr) 100px 130px 80px;
  --br-cols: minmax(160px, 2fr) 120px 130px 90px; --hr-cols: minmax(0, 1fr) minmax(0, 1fr); }
.table-head.st-list, .table-row.st-list { grid-template-columns: var(--st-list-cols); }
.table-head.tk-row, .table-row.tk-row { grid-template-columns: var(--tk-cols); }
.table-head.br-row, .table-row.br-row { grid-template-columns: var(--br-cols); }
.table-row.hr-row { grid-template-columns: var(--hr-cols); }
.table-row.st-list > .controls, .table-row.tk-row > .controls, .table-row.br-row > .controls { justify-content: flex-end; }
.table-head.st-list > :last-child, .table-head.tk-row > :last-child, .table-head.br-row > :last-child { text-align: right; }
/* FLEET-FR-117: Settings > Chat and Emojis, Categories -- name, when, lines, chance, Lines */
:root { --cc-cols: 96px minmax(0, 1fr) 76px 104px 84px; }
.table-head.cc-row, .table-row.cc-row { grid-template-columns: var(--cc-cols); }
.table-row.cc-row > span.dim { overflow: hidden; text-overflow: ellipsis; }

/* ---- the setup wizard (FLEET-FR-113, UI.md 1.5): ONE set of classes for the sign-in page's Hello and Your account
   and for #setup in the app (setup.js). Full screen on --bg, one question per screen, the column 520 px. The phone's
   rules (the bars hidden, the column) are in phone.css; no motion under prefers-reduced-motion. ---- */
.wiz {
  position: fixed; inset: 0; z-index: 20;
  display: grid; grid-template-rows: auto 1fr auto;
  background: radial-gradient(1100px 520px at 50% -12%, var(--accent-soft), transparent 70%), var(--bg);
  color: var(--text);
}
.wiz.is-welcome { background: radial-gradient(900px 520px at 50% 40%, var(--accent-soft), transparent 70%), radial-gradient(700px 400px at 50% 70%, var(--ok-soft), transparent 70%), var(--bg); }
.wiz-top { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(14px, 4vw, 40px); }
.wiz-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.wiz-brand-mark { width: 20px; height: 20px; border-radius: var(--radius-small); display: grid; place-items: center; background: var(--accent-soft); }
.wiz-brand-mark i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.wiz-top-note { font-size: 11px; color: var(--text-faint); letter-spacing: 0.7px; text-transform: uppercase; }
.wiz-stage { overflow-y: auto; overflow-x: hidden; }
.wiz-stage-in { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100%; padding: 0 clamp(14px, 4vw, 40px); }
.wiz-screen { grid-area: 1 / 1; display: none; flex-direction: column; justify-content: center; width: 100%; max-width: 520px; margin: 0 auto; padding: 20px 0 40px; min-height: 100%; }
.wiz-screen.wide { max-width: 640px; }
.wiz-screen.active, .wiz-screen.out-l, .wiz-screen.out-r { display: flex; }
.wiz-screen.out-l, .wiz-screen.out-r { pointer-events: none; }
.wiz-screen.out-l { animation: wiz-out-l 0.22s ease-in forwards; }
.wiz-screen.out-r { animation: wiz-out-r 0.22s ease-in forwards; }
.wiz-screen.in-r { animation: wiz-in-r 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wiz-screen.in-l { animation: wiz-in-l 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wiz-screen.in-r .wiz-stg, .wiz-screen.in-l .wiz-stg, .wiz-rise { animation: wiz-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes wiz-out-l { to { opacity: 0; transform: translateX(-28px); } }
@keyframes wiz-out-r { to { opacity: 0; transform: translateX(28px); } }
@keyframes wiz-in-r { from { opacity: 0; transform: translateX(28px); } }
@keyframes wiz-in-l { from { opacity: 0; transform: translateX(-28px); } }
@keyframes wiz-rise { from { opacity: 0; transform: translateY(8px); } }

.wiz-foot { width: 100%; max-width: 640px; margin: 0 auto; padding: 20px clamp(14px, 4vw, 40px) 30px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.wiz-foot-l { justify-self: start; }
.wiz-foot-r { justify-self: end; display: flex; align-items: center; gap: 6px; }
.wiz-dots { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.wiz-dots li { width: 6px; height: 6px; border-radius: 999px; background: var(--border-strong); transition: width 0.35s ease, background-color 0.35s ease; }
.wiz-dots li.done { background: color-mix(in srgb, var(--accent) 55%, var(--border-strong)); }
.wiz-dots li.now { width: 20px; background: var(--accent); }

/* one question: a large light headline, one short line under it */
.wiz-title.wiz-title-slant { margin-left: -0.15em; }   /* HOTFIX 27.11: Y, T, V, W start further in */
.wiz-title { margin: 0 0 0 -0.06em; /* HOTFIX 27.11 (Michael): in line with the text under it */ font-size: clamp(30px, 5vw, 40px); line-height: 1.1; font-weight: 400; letter-spacing: -0.02em; }
.wiz-lead { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-dim); }
.wiz-lead b { color: var(--text); font-weight: 600; }
.wiz-form { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.wiz-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.wiz .line.stacked { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wiz .line.stacked > label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.7px; }
.wiz .line .with { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wiz .line .with > .field, .wiz .line .with > .number, .wiz .line .with > .cpick { flex: 1 1 auto; min-width: 0; width: 100%; }
.wiz .line .err { font-size: 12px; color: var(--err); }
.wiz .field { min-height: 44px; padding: 8px 12px; font-size: 14px; background: var(--bg-panel); }
.wiz .field:disabled, .wiz .seg-opt:disabled { opacity: 0.5; }
.wiz .number .field { width: 100%; text-align: left; font-family: var(--mono); letter-spacing: 1px; }
.btn-go { min-width: 148px; min-height: 44px; padding: 10px 20px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* a status line: the Host's report, a check, a mailbox's read */
.wiz-status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); min-height: 20px; }
.wiz-status.ok { color: var(--ok); }
.wiz-status.err { color: var(--err); }
.wiz-status.warn { color: var(--warn); }
.wiz-led { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--text-faint); }
.wiz-led.ok { background: var(--ok); }
.wiz-led.hold { background: var(--warn); }
.wiz-led.warn { background: var(--warn); animation: wiz-breathe 1.6s ease-in-out infinite; }
@keyframes wiz-breathe { 0%, 100% { box-shadow: 0 0 0 0 var(--warn-soft); } 50% { box-shadow: 0 0 0 6px var(--warn-soft); } }
.wiz-box { margin-top: 20px; padding: 14px; border-radius: var(--radius-small); background: var(--bg-panel); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.wiz-box.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.wiz-box.err { border-color: color-mix(in srgb, var(--err) 45%, var(--border)); }
.wiz-box.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.wiz-join { display: block; width: 100%; text-align: left; padding: 14px; border-radius: var(--radius-small); background: var(--bg-panel); border: 1px solid var(--border-strong); color: var(--text);
            font-family: var(--mono); font-size: 13px; line-height: 1.6; word-break: break-all; white-space: pre-wrap; cursor: pointer; }
.wiz-join:hover { border-color: var(--accent); }
.wiz-skip { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--text-faint); }
.wiz-skip .btn-link { color: var(--accent); padding: 4px 6px 4px 0; }

/* the icons of a line or a status */
.wiz-spin { width: 18px; height: 18px; flex: 0 0 auto; animation: wiz-turn 0.9s linear infinite; }
.wiz-spin .trk { fill: none; stroke: var(--accent-soft); stroke-width: 2; }
.wiz-spin .arc { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
@keyframes wiz-turn { to { transform: rotate(360deg); } }
.wiz-ico-ok .c { fill: var(--ok-soft); }
.wiz-ico-ok .t { fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wiz-ico-err .c { fill: var(--err-soft); }
.wiz-ico-err .t { fill: none; stroke: var(--err); stroke-width: 2; stroke-linecap: round; }
.wiz-ico-wait { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }

/* Hello (its layout is login.html's) and Welcome: the one button under the words */
.wiz-go-wrap { margin-top: 40px; }

/* Two mailboxes: a card each */
.wiz-cards { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.wiz-card { min-width: 0; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.wiz-card.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.wiz-card.err { border-color: color-mix(in srgb, var(--err) 50%, var(--border)); }
.wiz-card-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.wiz-card-head b { font-size: 14px; }
.wiz-card-head span { font-size: 11px; color: var(--text-faint); }
.wiz-card .field { background: var(--bg); }

/* Building your club: the lines (A.setupLines) and the one card where the person acts (A.managersCard) */
.wiz-build { margin: 40px 0 0; padding: 0; list-style: none; }
.wiz-line { position: relative; display: flex; gap: 14px; padding: 6px 0; }
.wiz-line::after { content: ""; position: absolute; left: 10px; top: 32px; bottom: -6px; width: 1px; background: var(--border); }
.wiz-line:last-child::after { display: none; }
.wiz-line[data-state="done"]::after { background: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.wiz-line-ico { width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; }
.wiz-line-ico svg { width: 20px; height: 20px; }
.wiz-line-body { flex: 1; min-width: 0; }
.wiz-line-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-height: 20px; }
.wiz-line-txt { font-size: 14px; color: var(--text-faint); }
.wiz-line-meta { margin-left: auto; font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.wiz-line[data-state="running"] .wiz-line-txt, .wiz-line[data-state="failed"] .wiz-line-txt { color: var(--text); }
.wiz-line[data-state="done"] .wiz-line-txt, .wiz-line[data-state="running"] .wiz-line-meta, .wiz-line[data-state="done"] .wiz-line-meta { color: var(--text-dim); }
.wiz-line-fail { margin-top: 6px; font-size: 13px; }
.wiz-next { margin-top: 6px; font-size: 13px; }    /* the server's next step or note (failure review) */
.wiz-line-acts { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wiz-you { margin-top: 10px; padding: 20px; border-radius: var(--radius); background: linear-gradient(180deg, var(--accent-soft), transparent 140%), var(--bg-panel);
           border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border)); }
.wiz-you-tag { font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.7px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.wiz-you p { margin: 10px 0 14px; font-size: 14px; line-height: 1.5; }
.wiz-you-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: wiz-call 1.6s ease-out infinite; }
@keyframes wiz-call { 0% { box-shadow: 0 0 0 0 var(--accent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* Welcome */
.wiz-welcome { text-align: center; align-items: center; }
.wiz-eyebrow { font-size: 12px; color: var(--text-dim); letter-spacing: 2.4px; text-transform: uppercase; }
.wiz-club { margin-top: 14px; font-size: clamp(48px, 10vw, 88px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; overflow-wrap: anywhere; }
.wiz-screen.in-r .wiz-club { animation: wiz-grand 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both 0.12s; }
@keyframes wiz-grand { from { opacity: 0; transform: translateY(14px) scale(0.96); filter: blur(6px); } }
.wiz-clubid { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--text-faint); letter-spacing: 1px; }
.wiz-stats { margin-top: 30px; display: inline-flex; align-items: center; gap: 14px; padding: 10px 20px; border-radius: 999px; background: var(--bg-panel); border: 1px solid var(--border); font-size: 14px; color: var(--text-dim); }
.wiz-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.wiz-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 21; }

/* the sign-in page (login.html): its rules for the shared classes; its <style> holds its layout classes only (UI.md 4) */
body.sign-in-body { display: block; overflow: auto; }
.sign-in-line .field, .wiz-steps .field { width: 100%; }
.sign-in .btn-primary { width: 100%; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .wiz, .wiz *, .wiz *::before, .wiz *::after { animation: none !important; transition: none !important; }
  .wiz-confetti { display: none; }
}
/* HOTFIX 27.11 (Michael): the Your-turn card as numbered steps, a small Done at the bottom left */
.wiz-you-steps { margin: 14px 0 18px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
.wiz-you-steps li { padding-left: 4px; }
.wiz-you .btn-go { min-width: 96px; min-height: 36px; padding: 8px 18px; font-size: 13px; }
