/* Plain, calm working screens for a meeting room. Self-hosted IBM Plex Sans Thai Looped (OFL, see fonts/OFL.txt). */

@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-400-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-500-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-600-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-700-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai Looped";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-thai-looped-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Tokens. Light theme, chosen for daylight halls and projectors.
   ========================================================================== */

:root {
  /* palette */
  --paper: #F6F3EC;
  --surface: #FFFFFF;
  --hairline: #DCD5C8;
  --ink: #1C2230;
  --ink-2: #4A5262;            /* secondary ink: 7:1 on paper, 7.6:1 on surface */
  --shell: #22314A;            /* console top bar, display header band, phone header */
  --shell-ink: #F4F0E6;
  --shell-ink-2: #C9C3B5;      /* secondary text on the shell: 7.9:1 */
  --must: #2C4F86;             /* answer colours: none reads as good or bad, always paired with a shape */
  --nice: #8F5A0E;             /* white on it 5.6:1 */
  --unsure: #5E6878;
  --missing: #7B7466;          /* hollow mark: 4.4:1 on paper, 4.8:1 on white */
  --danger: #A23B2A;
  --ok: #2F6B4C;
  --warn: #8A5A00;
  --trial: #F3D98B;
  --focus: #C98A00;
  --select: #E8DDBF;
  --wash: #EFEADF;             /* quiet fill for selected and hover states */
  /* the four result classes (release 6.2): distinct, none red or green; the strong colour carries white text at
     7:1 or more (brown 5.6:1) and reads at 4.5:1 or more on its own light fill and on the paper */
  --cls-all_must: #2C4F86;  --cls-all_must-bg: #E4EBF6;
  --cls-all_nice: #8F5A0E;  --cls-all_nice-bg: #F7ECDB;
  --cls-mixed: #6A3D8C;     --cls-mixed-bg: #EFE7F6;
  --cls-incomplete: #4A5262; --cls-incomplete-bg: #E8EAEE;

  /* type */
  --font: "IBM Plex Sans Thai Looped", "Leelawadee UI", "Noto Sans Thai Looped", "Noto Sans Thai", Tahoma, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: 1.75rem;
  --step-4: 2.25rem;

  /* spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(28, 34, 48, 0.08), 0 4px 12px rgba(28, 34, 48, 0.06);
  --rail-w: 360px;

  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--must);
  caret-color: var(--must);
}

* { box-sizing: border-box; }
html { scrollbar-color: #B9B1A2 var(--paper); }
::selection { background: var(--select); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #B9B1A2; border-radius: 6px; border: 2px solid var(--paper); }
::-webkit-scrollbar-track { background: var(--paper); }

body {
  margin: 0;
  font-size: var(--step-0);
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 { line-height: 1.3; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-3); font-weight: 700; }
h2 { font-size: var(--step-2); font-weight: 600; }
h3 { font-size: var(--step-1); font-weight: 600; margin-top: var(--s-4); }
p { margin: var(--s-2) 0; }
a { color: var(--must); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
}

:focus-visible { outline: 3px solid var(--shell); outline-offset: 2px; box-shadow: 0 0 0 2px var(--surface); }
.topbar :focus-visible, .phone-bar :focus-visible, .display-head :focus-visible, .bar :focus-visible {
  outline-color: var(--focus); box-shadow: none; }

/* ==========================================================================
   Controls
   ========================================================================== */

button, select, input, textarea { font: inherit; color: inherit; }

button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px;
  padding: var(--s-2) var(--s-4);
  margin: var(--s-1) var(--s-2) var(--s-1) 0;
  border: 1px solid var(--shell);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--shell);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 120ms ease-out, box-shadow 120ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
  /* Z1: the wash is for outline buttons only; filled buttons keep their fill (a slight shade) and light text. */
  button:hover:not(:disabled):not(.primary):not(.on):not(.selected):not(.danger) { background: var(--wash); }
  button.danger:hover:not(:disabled):not(.primary):not(.on):not(.selected) { background: #F7E7E3; }
  button.primary:hover:not(:disabled), button.on:hover:not(:disabled) { background: #2E4262; color: var(--shell-ink); }
  .phone-bar button:hover:not(:disabled):not(.primary):not(.on):not(.selected) { background: rgba(255, 255, 255, 0.14); }
  .choice:hover:not(.selected) { background: var(--wash); }
      }
button.primary, button.on { background: var(--shell); color: var(--shell-ink); }
button.danger { border-color: var(--danger); color: var(--danger); }
button.small { min-height: 36px; padding: var(--s-1) var(--s-3); font-size: var(--step--1); }
button.link { border: 0; background: none; padding: var(--s-1) 0; text-decoration: underline; text-underline-offset: 0.2em; }
button.wide { width: 100%; }
button.secondary { border: 1px solid var(--shell); background: var(--surface); color: var(--shell); }
button:disabled, button:disabled.primary, button:disabled.on, button:disabled.danger {
  opacity: 1; cursor: default; color: #646B78; background: var(--paper); border-color: var(--hairline); }
.choice:disabled .icon { color: #646B78; }

input, select, textarea {
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  border: 1px solid #857D6F;           /* 3.9:1 on white */
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 100%;
}
input::placeholder, textarea::placeholder { color: #6A7080; }      /* 4.9:1 on surface */
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 1.2rem; height: 1.2rem; margin: 0 var(--s-2) 0 0; vertical-align: middle; }
textarea { width: 100%; resize: vertical; }
fieldset { border: 1px solid var(--hairline); border-radius: var(--radius); margin: var(--s-3) 0; padding: var(--s-2) var(--s-4) var(--s-3); }
legend { font-weight: 600; padding: 0 var(--s-1); }

.field { display: block; margin: var(--s-3) 0; }
.field input:not([type]), .field select, .field textarea { width: 100%; }
.field-label { display: block; font-weight: 600; margin-bottom: var(--s-1); }
.hint { display: block; color: var(--ink-2); font-size: var(--step--1); margin: var(--s-1) 0; }
.muted { color: var(--ink-2); font-size: var(--step--1); }
.inline { display: inline-flex; align-items: center; margin: var(--s-1) var(--s-4) var(--s-1) 0; }
.type-choice { display: flex; align-items: flex-start; gap: var(--s-1); margin: var(--s-2) 0; }
.type-choice input { margin-top: 0.3rem; }
.sub, .module { margin: var(--s-2) 0 var(--s-2) var(--s-5); }
.module { display: grid; gap: var(--s-1); }

.notice { background: var(--wash); border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--s-2) var(--s-3); }
.warn { color: var(--warn); font-weight: 600; }
.message { display: none; }
.message.show { display: block; background: var(--wash); border: 1px solid var(--hairline); border-radius: var(--radius); padding: var(--s-2) var(--s-3); }
.trial { display: inline-block; background: var(--trial); color: var(--ink); padding: 0 var(--s-2); border-radius: 4px; font-weight: 600; font-size: var(--step--1); margin-left: var(--s-2); }
.trial-band { background: var(--trial); color: var(--ink); font-weight: 600; padding: var(--s-1) var(--s-4); }
.trial-band[hidden] { display: none; }

.icon { flex: none; display: inline-block; vertical-align: middle; }

/* seat tokens: one square per seat of the roster, grouped by answer */
.tokens { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); vertical-align: middle; }
.tok-group { display: inline-flex; align-items: center; gap: 3px; }
.tok-group .icon { width: 0.9em; height: 0.9em; margin-right: 2px; }
.tok { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 2px; background: currentColor; }
.tok-must { color: var(--must); }
.tok-nice { color: var(--nice); }
.tok-unsure { color: var(--unsure); }
.tok-done { color: var(--shell); }
.tok-missing { color: var(--missing); }
.tok-missing .tok { background: transparent; border: 2px solid var(--missing); }

/* ==========================================================================
   Operator pages
   ========================================================================== */

.bar, .topbar { background: var(--shell); color: var(--shell-ink); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) var(--s-5); }
.bar h1 { font-size: var(--step-1); font-weight: 600; }
.conn { font-size: var(--step--1); color: var(--shell-ink-2); }
.conn.conn-lost { color: #FFD7CC; font-weight: 600; }

body.console-body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body.console-body > #app { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.topbar { flex: none; z-index: 20; }
.topbar-row { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-2) var(--s-5); min-height: 52px; }
.room-code-top { font-size: var(--step-3); font-weight: 700; letter-spacing: 0.08em; line-height: 1.1; }
.topbar-stage { color: var(--shell-ink-2); white-space: nowrap; }
.topbar-family { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--shell-ink); }
.topbar-family:focus-visible { white-space: normal; }
.topbar .conn { white-space: nowrap; }
.topbar-link { color: var(--shell-ink); white-space: nowrap; }

.console-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.rail { overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--hairline); background: #FBF9F4; padding: var(--s-3) var(--s-4) 6rem; }
main.console { overflow-y: auto; overflow-x: hidden; padding: 0 var(--s-5) 6rem; min-width: 0; }

.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: var(--s-4) var(--s-5); margin: var(--s-4) 0; }
.rail .panel { padding: var(--s-3) var(--s-4); margin: 0 0 var(--s-3); }
.rail .panel h2 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.panel > h2 { margin-bottom: var(--s-2); }
.family { margin: var(--s-2) 0; }
.family-main { font-weight: 600; }
.family-extra { color: var(--ink-2); }

.join-url { font-weight: 600; letter-spacing: 0.02em; word-break: break-all; }
.qr { width: 150px; height: 150px; display: block; margin: var(--s-2) 0; border: 1px solid var(--hairline); border-radius: var(--radius); background: #fff; }
.request-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: var(--s-3) 0; }
.request-row > span, .request-row > p { flex-basis: 100%; margin: 0; }
.request-row > .field { margin: 0; }
.request-row > button { margin: 0; }
.request-row > button.primary { margin-inline-end: 16px; }
.request-row > .request-reject { margin-inline-start: auto; margin-block-start: 16px; }

/* seats: compact rows, actions under each row */
table.seats, table.seats tbody { display: block; width: 100%; }
table.seats thead { display: none; }
table.seats tr { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto auto; align-items: center; column-gap: var(--s-2);
  padding: var(--s-2) 0; border-top: 1px solid var(--hairline); }
table.seats td { padding: 0; }
table.seats td.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s-1); }
table.seats td.actions:empty { display: none; }
table.seats td.actions button { min-height: 34px; padding: 2px var(--s-2); font-size: var(--step--1); margin: var(--s-1) 0 0; }
table.seats tr.void td { color: var(--ink-2); }
.seat-label { font-weight: 700; }
.code { font-weight: 700; letter-spacing: 0.12em; }
[data-testid="seat-progress"] { color: var(--ink-2); }

.confirm { border: 1px solid var(--shell); border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin: var(--s-2) 0; background: var(--surface); box-shadow: var(--shadow); }
.confirm-list { margin: var(--s-1) 0 var(--s-2); padding-left: 1.4rem; }
.entry { border: 1px solid var(--shell); border-radius: var(--radius); padding: var(--s-3); margin-top: var(--s-3); background: var(--surface); }
.entry-item { border-top: 1px solid var(--hairline); padding: var(--s-2) 0; }
.small-choice { min-height: 36px; padding: 2px var(--s-3); }
.small-choice.selected { background: var(--shell); color: var(--shell-ink); }

/* round chips */
.round-list { display: flex; flex-wrap: wrap; gap: var(--s-1); padding: var(--s-3) 0 var(--s-2); }
.round-chip { min-height: 34px; padding: 2px var(--s-3); margin: 0; font-size: var(--step--1); font-weight: 500;
  border-color: var(--hairline); color: var(--ink); }
.round-chip.selected { background: var(--shell); color: var(--shell-ink); border-color: var(--shell); }
.round-chip.phase-done, .round-chip.phase-skipped, .round-chip.phase-aborted { color: var(--ink-2); }
main.console > section.panel:first-child { margin-top: var(--s-2); }
main.console .panel.round { padding-top: 0; }

/* round workspace: the header stays while the item list scrolls */
.round-head { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--hairline);
  margin: 0 calc(-1 * var(--s-5)) var(--s-3); padding: var(--s-3) var(--s-5) var(--s-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.round-head-title { display: flex; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.phase { font-weight: 600; color: var(--ink-2); margin: 0; }
.phase-voting, .phase-listing { color: var(--must); }
.phase-revealed { color: var(--ok); }
.progress { display: flex; align-items: center; gap: var(--s-3); font-size: var(--step-1); font-weight: 600; margin: var(--s-1) 0; }
.moves { display: flex; flex-wrap: wrap; align-items: center; }

ol.items { list-style: none; counter-reset: item; padding: 0; margin: 0; }
li.item { counter-increment: item; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: var(--s-2);
  padding: var(--s-3) 0; border-top: 1px solid var(--hairline); }
li.item::before { content: counter(item); grid-row: 1 / span 20; color: var(--ink-2); font-size: var(--step--1); padding-top: 0.15rem; text-align: right; }
li.item > * { grid-column: 2; }
li.item.status-excluded .item-text, li.item.status-locked_out .item-text { color: var(--ink-2); text-decoration: line-through; }
.item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.card-id { color: var(--ink-2); font-size: var(--step--1); letter-spacing: 0.04em; }
.item-text { font-weight: 600; }
.tag { display: inline-block; border: 1px solid var(--hairline); border-radius: 999px; padding: 0 var(--s-2); font-size: 0.8rem; color: var(--ink-2); }
.condition { color: var(--warn); font-size: var(--step--1); margin: var(--s-1) 0; }
.members { margin: var(--s-1) 0; padding-left: 1.2rem; color: var(--ink-2); }
.item-status { margin: var(--s-1) 0; font-size: var(--step--1); color: var(--ink-2); }
.item-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-1) 0; }
.item-controls input, .item-controls select { min-height: 38px; }
.tally-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin: var(--s-1) 0; }
.tally-row .tokens { font-size: 1.05rem; }
.tally { font-weight: 600; margin: 0; }
.decision { color: var(--ok); margin: var(--s-1) 0; }
.decision-form { border: 1px solid var(--shell); border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin: var(--s-2) 0; background: #FBF9F4; }
.radios { display: flex; flex-wrap: wrap; }
.bulk-box { border-top: 1px solid var(--hairline); margin-top: var(--s-4); padding-top: var(--s-3); }
.bulk-box ul { padding-left: 1.2rem; }
.pool h3 { margin-top: var(--s-2); }
.proposals { list-style: none; padding: 0; margin: 0; }
.proposal { border-top: 1px solid var(--hairline); padding: var(--s-3) 0; }
.proposal-text { font-weight: 700; }
.proposal-controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-2); align-items: start; }
.proposal-controls button { justify-self: start; }
.suggestions ul { margin: var(--s-1) 0; padding-left: 1.2rem; }
.end { margin-top: var(--s-3); }
.display-panel button { min-height: 36px; padding: 2px var(--s-3); font-size: var(--step--1); }

/* fixed message bar over the main column */
.op-bar { display: none; position: fixed; left: var(--rail-w); right: 0; bottom: 0; z-index: 30; padding: var(--s-3) var(--s-5);
  font-weight: 600; background: var(--surface); color: var(--ink); border-top: 1px solid var(--hairline); box-shadow: 0 -4px 12px rgba(28, 34, 48, 0.08); }
.op-bar.show { display: block; }
.op-bar.error { color: var(--danger); background: #FBEDEA; }
.op-bar.ok { color: var(--ok); background: #EAF3EE; }
.op-bar.busy { color: var(--ink-2); }

/* home */
main.home-layout { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
  gap: var(--s-5); align-items: start; padding: var(--s-4) var(--s-5) 6rem; }
main.home-layout .panel { margin: 0; }
main.message-page { padding: var(--s-6); max-width: 46rem; }
body:not(.console-body) main.home-layout ~ .op-bar, main.home-layout ~ .op-bar { left: 0; }
.rooms { list-style: none; padding: 0; margin: 0; }
.rooms li { padding: var(--s-2) 0; border-top: 1px solid var(--hairline); }
.room-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s-5); }
.room-form > h2, .room-form > fieldset, .room-form > [data-testid="forced-note"], .room-form > button { grid-column: 1 / -1; }
.room-form > button { justify-self: start; }

/* one column, rail first, below 1024px */
@media (max-width: 1023px) {
  body.console-body { height: auto; overflow: visible; }
  .console-layout { display: block; }
  .rail { border-right: 0; overflow: visible; padding-bottom: var(--s-3); }
  main.console { overflow: visible; }
  .op-bar { left: 0; }
  .topbar { position: sticky; top: 0; }
  .round-head { top: 0; }
}
@media (max-width: 900px) {
  main.home-layout, .room-form { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Phone
   ========================================================================== */

body.phone-body { font-size: 1.125rem; }                        /* 18px; html.large raises the root */
html.large { font-size: 18.7px; }                              /* phone text at least 21px */
.phone-body main.phone { padding: var(--s-1) var(--s-3) var(--s-2); max-width: 40rem; margin: 0 auto; }
.phone-bar { display: flex; align-items: center; gap: var(--s-2); flex-wrap: nowrap; background: var(--shell); color: var(--shell-ink);
  padding: 0.15rem var(--s-3); min-height: 44px; }
.phone-bar strong { white-space: nowrap; font-size: 1rem; }
.phone-bar button.small { background: transparent; color: var(--shell-ink); border-color: #7D8AA0; min-height: 48px; margin: 0;
  font-size: 0.8rem; white-space: nowrap; }
.phone-bar .conn { flex: 1; min-width: 0; text-align: right; font-size: 0.75rem; color: var(--shell-ink-2); white-space: nowrap; overflow: hidden; }
.family-phone { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 0 var(--s-3); font-size: 0.85rem; }
.family-phone summary, details.reentry summary { list-style: none; display: flex; align-items: center; gap: var(--s-1); cursor: pointer; min-height: 48px; }
.family-phone summary::-webkit-details-marker, details.reentry summary::-webkit-details-marker { display: none; }
.family-phone summary .icon, details.reentry summary .icon { transition: transform 120ms ease-out; color: var(--ink-2); }
.family-phone[open] summary .icon, details.reentry[open] summary .icon { transform: rotate(90deg); }
.family-phone .summary-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.family-phone[open] .summary-text { white-space: normal; overflow: visible; }
.big { font-size: 1.3rem; line-height: 1.4; }
.round-title { margin: 0; font-size: 1.05rem; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin: 0; }
button.propose-more { min-height: 44px; margin: 0; padding: 2px var(--s-2); font-size: 0.8rem; white-space: nowrap; }
.ballot-progress { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.unsent { color: var(--danger); font-weight: 700; }
.question { margin: 0.15rem 0; font-size: 0.85rem; color: var(--ink-2); }
.ballot-item { margin: 0.1rem 0 0.2rem; font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.choices { display: flex; flex-direction: column; gap: 4px; }
.choice { width: 100%; min-height: 56px; margin: 0; justify-content: flex-start; gap: var(--s-3); padding: var(--s-1) var(--s-4);
  font-size: 1.1rem; font-weight: 700; text-align: left; background: var(--surface); border: 2px solid; border-radius: var(--radius-lg); }
.choice .choice-label { flex: 1; }
.choice-must { border-color: var(--must); color: var(--must); }
.choice-nice { border-color: var(--nice); color: var(--nice); }
.choice-unsure { border-color: var(--unsure); color: var(--unsure); }
.choice.selected { color: #fff; }
.choice.selected .icon { color: #fff; }
.choice-must.selected { background: var(--must); }
.choice-nice.selected { background: var(--nice); }
.choice-unsure.selected { background: var(--unsure); }
.sent-status { margin: 0; min-height: 1.3em; font-size: 0.85rem; color: var(--ok); }
.nav { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--s-2); }
.nav button { margin: 0; padding: var(--s-1) var(--s-2); white-space: nowrap; min-height: 48px; }
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s-2); }
.seat-button { font-size: 1.4rem; font-weight: 700; min-height: 64px; margin: 0; letter-spacing: 0.04em; }
details.reentry { margin-top: var(--s-5); border-top: 1px solid var(--hairline); padding-top: var(--s-2); }
.review { padding-left: 1.4rem; }
.review-item { width: 100%; justify-content: flex-start; text-align: left; color: var(--ink); border-color: var(--hairline); min-height: 48px; }
.review-item.unanswered { border: 2px solid var(--danger); }
.results { list-style: none; padding: 0; }
.results li { border-top: 1px solid var(--hairline); padding: var(--s-2) 0; }
.result-text { font-weight: 700; }
.mine { display: flex; align-items: center; gap: var(--s-2); color: var(--ink); }
.result-counts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-1); }
.result-note { font-weight: 700; color: var(--shell); margin: var(--s-1) 0 var(--s-2); }
.intro { padding: var(--s-4) 0; }
.propose { margin-top: var(--s-3); }

/* ==========================================================================
   Big screen
   ========================================================================== */

/* The picture is drawn in a frame (on the public page, the window) and sized in the frame's units: --fh and
   --fw are 1% of the frame's height and width, or of the window's where container units are missing. */
body.display-body { background: var(--paper); overflow: hidden; }
.display-frame { container-type: size; container-name: display; width: 100%; overflow: hidden; }
body.display-body .display-frame { height: 100vh; height: 100dvh; }
.display-root { --fh: 1vh; --fw: 1vw; display: flex; flex-direction: column; height: 100%;
  font-size: clamp(16px, calc(2.4 * var(--fh)), 30px); }
@supports (height: 1cqh) {
  .display-root { --fh: 1cqh; --fw: 1cqw; }
}
/* the staff page's frame takes the height above its dock; with letterbox the frame keeps 16:9 inside that
   area, which takes the shell colour; the letterbox note is one small centred line */
.staff-display .display-frame { height: calc(100vh - var(--dock-total)); height: calc(100dvh - var(--dock-total)); }
.staff-display.letterbox { background: var(--shell); }
.staff-display.letterbox .display-frame { aspect-ratio: 16 / 9; width: min(100%, calc((100dvh - var(--dock-total)) * 16 / 9));
  height: auto; margin: auto; }
.letterbox-note { color: var(--shell-ink-2); font-size: 0.8125rem; text-align: center; }
.display-head { flex: none; background: var(--shell); color: var(--shell-ink); }
.display-head .family { margin: 0; padding: calc(0.6 * var(--fh)) calc(2 * var(--fw)); font-size: clamp(14px, calc(2.2 * var(--fh)), 26px); line-height: 1.4; }
.display-head .family-extra { color: var(--shell-ink-2); }
.display-head .trial-band { padding: calc(0.3 * var(--fh)) calc(2 * var(--fw)); font-size: clamp(13px, calc(1.9 * var(--fh)), 22px); }
.stage { flex: 1; min-height: 0; overflow: hidden; width: 100%; padding: calc(1.2 * var(--fh)) calc(2 * var(--fw)) 0; }
.display-foot { flex: none; display: flex; justify-content: space-between; align-items: center; padding: calc(0.4 * var(--fh)) calc(2 * var(--fw)); font-size: clamp(12px, calc(1.7 * var(--fh)), 20px);
  color: var(--ink-2); border-top: 1px solid var(--hairline); line-height: 1.6; }
.display-foot .conn { color: var(--ink-2); }
.page-label { font-weight: 700; color: var(--ink); }
.center { text-align: center; }
.lobby { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: calc(1 * var(--fh)); }
.lobby .room-code { font-size: clamp(48px, calc(13 * var(--fh)), 150px); font-weight: 700; letter-spacing: 0.14em; margin: 0; color: var(--shell); line-height: 1.1; }
.qr-big { width: calc(40 * var(--fh)); height: calc(40 * var(--fh)); background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius); }
.display-root .big { font-size: clamp(20px, calc(3.6 * var(--fh)), 44px); }
.d-page { display: flex; flex-direction: column; height: 100%; }
.d-title { flex: none; font-size: clamp(24px, calc(4.6 * var(--fh)), 56px); color: var(--shell); line-height: 1.25; margin: 0 0 calc(0.6 * var(--fh)); }
.d-progress-row { flex: none; display: flex; align-items: center; gap: calc(1.2 * var(--fw)); font-size: clamp(16px, calc(3 * var(--fh)), 36px); }
.d-progress-row .tokens { font-size: 1.1em; }
.d-progress { font-weight: 600; margin: calc(0.4 * var(--fh)) 0 calc(0.8 * var(--fh)); }
.d-list { display: grid; grid-template-columns: 1fr 1fr; gap: calc(0.4 * var(--fh)) calc(2.5 * var(--fw)); align-content: start; }
.d-item { border-top: 1px solid var(--hairline); padding: calc(0.6 * var(--fh)) 0; }
.d-text { font-size: clamp(20px, calc(3.6 * var(--fh)), 44px); font-weight: 600; line-height: 1.28; }
.d-item.compact .d-text { font-size: clamp(19px, calc(3.2 * var(--fh)), 38px); }
.d-members { font-size: clamp(15px, calc(2.6 * var(--fh)), 30px); color: var(--ink-2); line-height: 1.35; }
.d-result { display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.4 * var(--fh)) calc(1 * var(--fw)); margin-top: calc(0.3 * var(--fh)); }
.d-result .tokens { font-size: clamp(14px, calc(2.6 * var(--fh)), 30px); }
.d-item.compact .d-result .tokens { font-size: clamp(11px, calc(1.8 * var(--fh)), 22px); }
.d-counts { font-size: clamp(16px, calc(2.7 * var(--fh)), 32px); color: var(--ink-2); line-height: 1.35; }
.r-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 3fr 2fr; gap: calc(2.5 * var(--fw)); }
.r-main, .r-side { display: flex; flex-direction: column; min-height: 0; }
.r-side { border-left: 1px solid var(--hairline); padding-left: calc(2 * var(--fw)); }
.r-list { flex: 1; min-height: 0; overflow: hidden; }
.d-main-head, .d-side-head { font-size: clamp(17px, calc(2.9 * var(--fh)), 34px); font-weight: 700; line-height: 1.3; padding-bottom: calc(0.4 * var(--fh));
  border-bottom: 2px solid var(--shell); margin: 0 0 calc(0.4 * var(--fh)); }
.d-side-head { margin-top: calc(0.8 * var(--fh)); }
.d-columns { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: calc(2.5 * var(--fw)); }
.d-col h2 { font-size: clamp(17px, calc(2.9 * var(--fh)), 34px); border-bottom: 2px solid var(--shell); padding-bottom: calc(0.4 * var(--fh)); }

/* ==========================================================================
   Layer of finishing rules, part 1
   ========================================================================== */

/* each seat's mark is its answer's own shape; same box for all */
.tokens .icon { width: 1em; height: 1em; }
.tok-group { gap: 2px; }
.tok-missing .icon { color: var(--missing); }

/* touch feedback on press only, never a fill like the selected state */
.choice:active:not(.selected) { border-width: 4px; }

/* phone text floors and touch targets */
body.phone-body .question { font-size: var(--step-0); color: var(--ink); font-weight: 500; }
body.phone-body .ballot-progress,
body.phone-body .family-phone,
body.phone-body .sent-status,
body.phone-body .result-counts .tally-line { font-size: var(--step-0); }
body.phone-body .result-counts .tally-line { color: var(--ink); }
body.phone-body .phone-bar button.small { font-size: 0.9375rem; border-width: 2px; }
body.phone-body .phone-bar .conn { font-size: var(--step--1); text-overflow: ellipsis; }
body.phone-body .choice { font-size: var(--step-1); }
body.phone-body button, body.phone-body input, body.phone-body select, body.phone-body textarea { min-height: 48px; }
body.phone-body button.propose-more { min-height: 44px; font-size: var(--step--1); }
body.phone-body button.choice { min-height: 56px; }

/* the ended screens are a deliberate final state */
.final-band { min-height: 44px; }
.final-state { display: flex; align-items: center; justify-content: center; min-height: 70vh; text-align: center; }
.final-text { font-size: var(--step-3); font-weight: 700; color: var(--shell); margin: 0; }
.display-root .final-state { height: 100%; min-height: 0; }
.display-root .final-text { font-size: clamp(32px, calc(7 * var(--fh)), 84px); }

/* a saved decision in ink, its outcome in a neutral outlined chip */
.decision { color: var(--ink); }
.outcome-chip { display: inline-block; font-weight: 600; border: 1px solid var(--ink-2); border-radius: 999px; padding: 0 var(--s-2); line-height: 1.5; }

/* a selected chip always uses the shell ink, whatever its phase */
.round-list .round-chip.selected, .round-list .round-chip.selected .chip-phase { color: var(--shell-ink); }

/* compact chips, the phase lighter, the current or next round stands out */
.rounds-panel .visually-quiet { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.round-list { gap: 4px; padding: var(--s-2) 0; }
.round-chip { min-height: 32px; padding: 0 var(--s-2); font-size: 0.8125rem; }
.chip-phase { color: var(--ink-2); font-weight: 400; }
.round-chip.next:not(.selected) { border: 2px solid var(--shell); font-weight: 700; }

/* main-column panels are flat sections; inner areas tinted, no extra border */
main.console .panel { background: transparent; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; padding: var(--s-4) 0; margin: 0; }
main.console .panel.rounds-panel { border-top: 0; padding: 0; }
main.console .panel.round { background: var(--surface); padding: 0 var(--s-4) var(--s-4); margin: 0 calc(-1 * var(--s-4)); }
main.console .confirm, main.console .decision-form, main.console .entry, .rail .confirm, .rail .entry {
  border: 0; box-shadow: none; background: var(--wash); border-radius: var(--radius); }

/* one-row round header, phase as a pill, shadow only when stuck */
.round-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-4); row-gap: var(--s-1);
  margin: 0 calc(-1 * var(--s-4)) var(--s-2); padding: var(--s-2) var(--s-4); border-radius: 0; transition: box-shadow 160ms ease-out; }
.round-head.stuck { box-shadow: 0 6px 12px -6px rgba(28, 34, 48, 0.22); }
.round-head .progress { margin: 0; font-size: var(--step-0); }
.round-head .moves { flex-basis: 100%; }
.round-head .moves button { margin-top: 0; margin-bottom: 0; }
.phase { display: inline-block; font-weight: 700; color: var(--ink); background: var(--wash); border-radius: 999px; padding: 0 var(--s-3); }
.phase-voting, .phase-listing { background: #DCE5F2; color: var(--ink); }
.phase-closed { background: #ECE6D6; color: var(--ink); }
.phase-revealed { background: #DDEBE2; color: var(--ink); }
.pending-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 var(--s-2);
  border-radius: 999px; background: var(--danger); color: #fff; font-weight: 700; text-decoration: none; }

/* item rows on a grid, status and controls beside the text */
li.item { grid-template-columns: 2rem minmax(0, 1fr) minmax(200px, 0.55fr); padding: var(--s-2) 0; align-items: start; }
li.item > * { grid-column: 2; }
li.item > .item-status { grid-column: 3; grid-row: 1; margin: 0; text-align: right; }
li.item > .item-controls { grid-column: 3; justify-content: flex-end; }
li.item > .tally-row, li.item > .decision, li.item > .decision-form, li.item > .item-controls:has(textarea) { grid-column: 2 / -1; }
.tally-row .tokens { font-size: 18px; }
.tally-row .decision-open { margin: 0 0 0 auto; min-height: 36px; padding: 0 var(--s-3); }
.tally { color: var(--ink); font-weight: 500; }
.class-phrase.discussion { font-weight: 700; color: var(--warn); }

/* a field a refusal named */
.invalid, [aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: var(--radius); }

/* compact seat actions, vacant seats quieter */
table.seats tr.free td { color: var(--ink-2); }
table.seats td.actions button { border: 0; background: none; min-height: 32px; padding: 0 var(--s-2) 0 0; margin: 0 var(--s-2) 0 0;
  text-decoration: underline; text-underline-offset: 0.2em; font-weight: 500; color: var(--shell); }
table.seats td.actions button.danger { color: var(--danger); margin-left: auto; }

/* rail order (the DOM is unchanged): facts, big screen, join, seats; after the end, exports first */
.rail { display: flex; flex-direction: column; }
.rail > .facts { order: 1; }
.rail > .display-panel { order: 2; }
.rail > .join-panel { order: 3; }
.rail > .seats-panel { order: 4; }
.rail > .exports-panel { order: 5; }
.rail[data-ended="1"] > .exports-panel { order: 0; }

/* a quieter way back, a brighter stage */
.topbar-link { font-weight: 400; text-decoration: none; }
.topbar-link:focus-visible { text-decoration: underline; }
@media (hover: hover) and (pointer: fine) { .topbar-link:hover { text-decoration: underline; } }
.topbar-stage { color: var(--shell-ink); }

/* below 1024px the rail comes first only while no round is active */
@media (max-width: 1023px) {
  .console-layout { display: flex; flex-direction: column; }
  .console-layout[data-active="1"] > main.console { order: -1; }
}

/* display: count line, tokens, page label, header, headings,
   lobby, down then across, display groups, decisions view */
.tally-line .tally-tail { font-weight: 400; color: var(--ink-2); }
.d-counts { color: var(--ink); font-weight: 600; font-size: clamp(18px, calc(3 * var(--fh)), 34px); }
.d-item.compact .d-counts { font-size: clamp(16px, calc(2.6 * var(--fh)), 30px); }
.d-result .tokens { font-size: clamp(18px, calc(3.4 * var(--fh)), 40px); gap: calc(1.2 * var(--fw)); }
.d-item.compact .d-result .tokens { font-size: clamp(14px, calc(2.4 * var(--fh)), 28px); }
.d-title-row { flex: none; display: flex; align-items: baseline; gap: calc(2 * var(--fw)); }
.d-title-row .d-title { flex: 1; min-width: 0; }
.page-label { font-size: clamp(18px, calc(3 * var(--fh)), 36px); font-weight: 700; color: var(--shell); white-space: nowrap; }
.display-head .family { font-size: clamp(16px, calc(2.6 * var(--fh)), 30px); }
.display-head .trial-band { font-size: clamp(16px, calc(2.4 * var(--fh)), 28px); font-weight: 700; color: var(--ink); }
.d-main-head, .d-side-head, .d-col h2 { color: var(--shell); font-weight: 700; border-bottom-width: 3px; }
.d-main-head { font-size: clamp(20px, calc(3.6 * var(--fh)), 44px); }
.d-side-head { font-size: clamp(19px, calc(3.2 * var(--fh)), 38px); }
.qr-big { width: auto; height: min(calc(34 * var(--fh)), calc(40 * var(--fw))); min-height: calc(24 * var(--fh)); aspect-ratio: 1; }
.lobby .typed-join { font-size: calc(2.6 * var(--fh)); }
.lobby .join-line { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1em; font-size: calc(6 * var(--fh)); line-height: 1.17; }
.lobby .join-line p { margin: 0; overflow-wrap: anywhere; }
.display-head .family.main-only .family-extra { display: none; }
.d-list { display: block; columns: 2; column-gap: calc(2.5 * var(--fw)); }
.d-list .d-item { break-inside: avoid; }
.d-members { color: var(--ink); font-weight: 500; }
.d-group { margin-bottom: calc(1 * var(--fh)); }
.d-empty { font-size: clamp(15px, calc(2.4 * var(--fh)), 28px); color: var(--ink-2); margin: calc(0.3 * var(--fh)) 0 calc(0.6 * var(--fh)); }
.d-empty-strip { flex: none; display: flex; gap: calc(3 * var(--fw)); padding: calc(0.4 * var(--fh)) 0 calc(0.8 * var(--fh)); }
.d-empty-strip .d-group { display: flex; align-items: baseline; gap: calc(1 * var(--fw)); margin: 0; }
.d-empty-strip .d-side-head { margin: 0; border-bottom: 0; }
.r-grid.single { grid-template-columns: 1fr; }
.display-root.decisions-stage .stage { background: var(--surface); }
.decisions-view .d-title-row { background: var(--shell); margin: calc(-1.2 * var(--fh)) calc(-2 * var(--fw)) calc(1 * var(--fh)); padding: calc(0.8 * var(--fh)) calc(2 * var(--fw)); }
.decisions-view .d-title, .decisions-view .page-label { color: var(--shell-ink); }
.decisions-view .d-columns { display: flex; gap: calc(2.5 * var(--fw)); }
.decisions-view .d-col { flex: 1 1 0; min-width: 0; }
.decisions-view .d-col.empty { flex: 0 0 auto; max-width: 22%; }
.bin-chip { display: inline-block; background: var(--shell); color: var(--shell-ink); border: 0; border-radius: var(--radius);
  padding: calc(0.2 * var(--fh)) calc(1 * var(--fw)); margin-bottom: calc(0.8 * var(--fh)); }

/* honour reduced motion; keep tokens visible in forced colours */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .tok { border: 1px solid CanvasText; }
}

/* When both unanimous groups are empty the discussion group takes the width, read
   down then across in two columns (measured; overflow shows as extra width). */
.r-grid.single .r-list { columns: 2; column-fill: auto; column-gap: calc(3 * var(--fw)); }
.r-grid.single .d-item { break-inside: avoid; }
.r-grid.single .d-main-head { break-after: avoid; }
.d-result .tokens { gap: calc(0.8 * var(--fw)); }
.tokens .icon { margin: 0 -0.08em; }

/* two-line chips (title, then the phase, lighter) so all rounds fit in two rows at 1366 */
.round-chip { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.25; padding: 2px var(--s-2); min-height: 36px; }
.round-chip .chip-phase { font-size: 0.75rem; }

/* The floors of the finishing rules: reclaim height from spacing, never from text */
.phone-body main.phone { padding-top: 0; }
body.phone-body .question { margin: 0.05rem 0; }
body.phone-body .sent-status { min-height: 1.2em; line-height: 1.2; }
body.phone-body .ballot-item { margin: 0.05rem 0 0.15rem; }

/* room for Thai tone marks and lower vowels inside each line box on the display */
.d-text { line-height: 1.36; }
.d-title { line-height: 1.36; }
.d-counts, .d-members { line-height: 1.42; }
.display-head .family { line-height: 1.45; }
.tokens .icon { margin: 0; }

/* the bins' heading chips keep light text on the shell fill */
.decisions-view .d-col h2.bin-chip { color: var(--shell-ink); border-bottom: 0; }

/* ==========================================================================
   Layer of finishing rules, part 2
   ========================================================================== */

/* The item being judged is the largest text; the round title quieter.
   The larger item applies where the floors allow it (normal text, or tall screens). */
.round-title { color: var(--ink-2); font-weight: 600; }
html:not(.large) body.phone-body .ballot-item { font-size: 1.25rem; line-height: 1.35; }
@media (min-height: 700px) { body.phone-body .ballot-item { font-size: var(--step-2); line-height: 1.35; } }
/* (On short screens the large setting keeps 1.15rem of a 18.7px root, 21.5px, still above normal's 20px) */
html:not(.large) body.phone-body .ballot-progress { margin-bottom: 0.2rem; }
html:not(.large) body.phone-body .question { margin: 0.2rem 0 0.15rem; }

/* Phone notices sit in the page flow under the propose box they are about, 8px from their neighbours */
body.phone-body .phone-notice.show { position: static; margin: 8px 0;
  padding: var(--s-2) var(--s-3); border-radius: var(--radius);
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); font-weight: 600; }
body.phone-body .phone-notice.error { background: #FBEDEA; color: var(--danger); border-color: var(--danger); }

/* Display connection lost: the footer band turns danger, same height */
.display-foot:has(.conn.conn-lost) { background: var(--danger); border-top-color: var(--danger); }
.display-foot .conn.conn-lost { color: #fff; font-weight: 700; }
.display-foot .conn { margin-left: auto; }        /* Status keeps its side when the page label is hidden */
.page-label[hidden] { display: none; }

/* Missing is a dashed hollow square in the missing colour */
.tok-missing .icon, .tally-piece.tok-missing .icon { color: var(--missing); }

/* Shapes before each answer's count piece; the text stays in the line's colour */
.tally-piece { color: inherit; white-space: nowrap; }
.tally-piece .icon { width: 0.85em; height: 0.85em; margin-right: 0.2em; vertical-align: -0.08em; }
.tally-piece.tok-must .icon { color: var(--must); }
.tally-piece.tok-nice .icon { color: var(--nice); }
.tally-piece.tok-unsure .icon { color: var(--unsure); }

/* The discussion class in ink on a neutral pill; unanimous classes quieter. No --warn next to tokens. */
.class-phrase { color: var(--ink-2); font-weight: 400; }
.class-phrase.discussion { color: var(--ink); font-weight: 700; background: var(--wash); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 0 var(--s-2); }

/* Link style only for the direct action buttons; the void confirm spans the row with normal buttons */
table.seats td.actions button { border: 1px solid var(--shell); background: var(--surface); text-decoration: none; min-height: 36px; padding: 0 var(--s-3); }
table.seats td.actions > button { border: 0; background: none; min-height: 32px; padding: 0 var(--s-2) 0 0;
  text-decoration: underline; text-underline-offset: 0.2em; }
table.seats td.actions > button.danger { color: var(--danger); }
table.seats td.actions .confirm { flex-basis: 100%; }
table.seats td.actions .confirm button.danger { border-color: var(--danger); color: var(--danger); }

/* Hover never replaces a selected or "on" fill */
@media (hover: hover) and (pointer: fine) {
  /* the generic selected rule never matches an answer button; answers keep their own colour below. */
  button.selected:hover:not(:disabled):not(.choice), .round-list .round-chip.selected:hover { background: var(--shell); }
  .choice-must.selected:hover { background: var(--must); }
  .choice-nice.selected:hover { background: var(--nice); }
  .choice-unsure.selected:hover { background: var(--unsure); }
}
.round-list .round-chip.selected { background: var(--shell); border-color: var(--shell); }

/* Editable item rows: controls on one line under the text, the status once */
li.item.editable > .item-status { display: none; }
li.item.editable > .item-controls { grid-column: 2 / -1; justify-content: flex-start; flex-wrap: nowrap; }
li.item.editable > .item-controls input { flex: 1; min-width: 0; }

/* Disabled fields use explicit colours too */
input:disabled, select:disabled, textarea:disabled { color: #646B78; background: var(--paper); border-color: var(--hairline); opacity: 1; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: 1; accent-color: #646B78; }
label:has(> input:disabled) { color: #646B78; }

/* Display legibility */
.d-empty { color: var(--ink); font-weight: 500; font-size: clamp(18px, calc(3 * var(--fh)), 34px); }
.d-empty-strip .d-group, .d-empty-strip .d-col { display: flex; align-items: baseline; gap: calc(1 * var(--fw)); }
.d-text { font-weight: 700; }
.d-counts { font-weight: 500; font-size: clamp(18px, calc(3 * var(--fh)), 34px); }
.d-item.compact .d-result .tokens { font-size: clamp(16px, calc(2.9 * var(--fh)), 32px); }
.display-head .family { text-wrap: balance; }

/* The discussion heading across both columns */
.d-group.wide { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.d-group.wide > .r-list { flex: 1; min-height: 0; }
.r-grid.single .r-main { display: flex; flex-direction: column; }

/* Tighter decision rows; empty bins in the strip */
.decisions-view .d-item { padding: calc(0.25 * var(--fh)) 0; }
.decisions-view .d-item .d-text { font-size: clamp(18px, calc(3.2 * var(--fh)), 38px); line-height: 1.3; }
.decisions-view .d-empty-strip { gap: calc(3 * var(--fw)); }
.decisions-view .d-empty-strip .bin-chip { margin: 0; }

/* A wider rail on wide screens; a seat's actions on one line */
@media (min-width: 1280px) { :root { --rail-w: 400px; } }
table.seats td.actions { flex-wrap: nowrap; }
table.seats td.actions > button { font-size: 0.8125rem; white-space: nowrap; }
table.seats td.actions:has(.confirm) { flex-wrap: wrap; }

/* Readable chips, visible borders */
.round-chip { border-color: #857D6F; }
.round-chip .chip-title { font-size: 0.875rem; }
.round-chip .chip-phase { font-size: 0.8125rem; }

/* The way back looks like a link */
.topbar-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.topbar-link:focus-visible { text-decoration-thickness: 2px; }
@media (hover: hover) and (pointer: fine) { .topbar-link:hover { text-decoration-thickness: 2px; } }

/* The pending badge in the shell colour, at the right end of the header row */
.pending-badge { background: var(--shell); margin-left: auto; }
#proposals { scroll-margin-top: var(--s-6); }

/* Console connection lost as a visible pill */
.topbar .conn.conn-lost { background: var(--danger); color: #fff; font-weight: 700; padding: 0 var(--s-2); border-radius: 999px; }

/* No sticking while a phase confirm is open */
.round-head.confirming { position: static; }

/* Excluded and locked-out items without strike-through; a gap before tags */
li.item.status-excluded .item-text, li.item.status-locked_out .item-text { text-decoration: none; color: var(--ink-2); }
.tag { margin-left: var(--s-2); }

/* Phone instructions at 1rem */
body.phone-body .hint, body.phone-body .muted { font-size: var(--step-0); }

/* Press feedback without layout change */
.choice:active:not(.selected) { border-width: 2px; box-shadow: inset 0 0 0 2px currentColor; }

/* Invalid and focused: both the red outline and the shell halo */
.invalid:focus-visible, [aria-invalid="true"]:focus-visible { outline: 3px solid var(--danger); outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px var(--shell); }

/* The round panel's slab aligned with the content edge */
main.console .panel.round { margin: 0; padding: 0 0 var(--s-4); }
.round-head { margin: 0 0 var(--s-2); padding-left: 0; padding-right: 0; }

/* Forced colours: marks follow the system colours (no forced-color-adjust none) */
@media (forced-colors: active) {
  .tokens .icon, .tally-piece .icon { forced-color-adjust: auto; }
}

/* An 8px gap between the answers where the floors allow it (normal text) */
html:not(.large) body.phone-body .choices { gap: 8px; }

/* Z2: the unsent count sits in the flow under the sent line (below the answers), 8px above and below */
body.phone-body .unsent-box { position: static; margin: 8px 0;
  padding: var(--s-2) var(--s-3); border-radius: var(--radius); background: #FBEDEA; border: 1px solid var(--danger);
  color: var(--ink); font-size: var(--step-0); }
body.phone-body .unsent-box .unsent { color: var(--danger); font-weight: 700; }
/* the progress line is never cut */
body.phone-body .ballot-progress { white-space: normal; overflow: visible; }
/* each half stays whole, so the line can only break at the " · " separator */
body.phone-body .ballot-progress .bp-part { white-space: nowrap; }

/* the phone has no floating boxes; the former floating host (div.phone-float) and its rules are gone */

/* ==========================================================================
   Spacing and clipping: S1 to S4 and S-short below
   ========================================================================== */
/* S1 phone: a 16px gutter for everything, 12px under the family band, 8px around the sent line */
.phone-body main.phone { padding: 12px 16px var(--s-2); }
.phone-bar { padding-left: 16px; padding-right: 16px; }
.family-phone, .inapp-banner { padding-left: 16px; padding-right: 16px; }
body.phone-body .sent-status { margin: 8px 0; }
html.large body.phone-body .choices { gap: 8px; }
/* the connection word never breaks and is never cut; narrow screens make room with a tighter
   text-size button, and below 360px wide the header keeps its normal-text sizes in large text */
body.phone-body .phone-bar .conn { white-space: nowrap; overflow: visible; text-overflow: clip; }
@media (max-width: 400px) { body.phone-body .phone-bar button.small { padding-left: 8px; padding-right: 8px; } }
@media (max-width: 359px) {
  html.large body.phone-body .phone-bar strong { font-size: 16px; }
  html.large body.phone-body .phone-bar button.small { font-size: 15px; }
  html.large body.phone-body .phone-bar .conn { font-size: 14px; }
}

/* S2 console: right-aligned row statuses and row controls keep 16px from the row's right edge */
li.item, .proposal { padding-right: 16px; }
/* the round panel is a filled box: its text keeps 16px from the box edges */
main.console .panel.round { padding: 0 16px 16px; }
main.console .round-head + * { margin-top: 12px; }
main.console .round-head + ol.items { margin-top: 12px; }
.entry [data-testid="entry-close"] { margin-top: 8px; }
/* a seat row with the extra entry button wraps its actions instead of running out of the rail */
table.seats td.actions { flex-wrap: wrap; row-gap: 8px; }
/* S4: selects in the proposal controls get a full line so their text is never cut */
.proposal-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.proposal-controls > select { grid-column: 1 / -1; }

/* S3 display: an overscan safe area (3.6 --fw at the sides, about 3.4 --fh at the top and 3.2 --fh at the bottom for text; 2.4 --fw at the sides in a frame narrower than 3:2, by the aspect rule at the end of this section); bands keep their full-width fill */
.display-head .family { padding: calc(3.4 * var(--fh)) calc(3.6 * var(--fw)) calc(0.6 * var(--fh)); }
.display-head .trial-band { padding: calc(0.3 * var(--fh)) calc(3.6 * var(--fw)); }
.stage { padding: calc(2.4 * var(--fh)) calc(3.6 * var(--fw)) 0; }          /* 1.6 --fh between the band and the title's text box (the Thai glyphs rise about 0.74 --fh above the line box) */
.display-foot { padding: calc(0.4 * var(--fh)) calc(3.6 * var(--fw)) calc(3.2 * var(--fh)); }

/* S-short: on phone screens up to 600px tall the ballot screen keeps these floors:
   family band to title 8px, 6px above and below the sent line, answers 8px apart (both text sizes).
   Room comes from 52px answer buttons (still above the 48px touch floor). */
@media (max-height: 600px) {
  .phone-body main.phone:has(.choices) { padding-top: 8px; }
  body.phone-body main.phone:has(.choices) .sent-status { margin: 6px 0; }
  body.phone-body button.choice { min-height: 52px; }
}

/* the decisions title band is full-bleed again: it starts at the stage top (no overlap with the trial band)
   and keeps its text at the stage's side padding (3.6 --fw; 2.4 --fw in a frame narrower than 3:2) */
.decisions-view .d-title-row { margin: calc(-2.4 * var(--fh)) calc(-3.6 * var(--fw)) calc(1 * var(--fh)); padding: calc(0.8 * var(--fh)) calc(3.6 * var(--fw)); }
/* the top-level phone message (join and re-entry errors) sits on the 16px gutter, 8px from what is above and below */
body.phone-body #app > p.message.show { margin: 8px 16px; }
/* the header is as tall in large text as in normal text (fixed vertical padding, not rem-based) */
body.phone-body .phone-bar { padding-top: 3px; padding-bottom: 3px; }
/* at 320px in large text: the propose button and the connection-lost line keep the normal-text
   size up to 340px wide, so the title row keeps the 16px gutter and the answers stay above the fold */
@media (max-width: 340px) {
  html.large body.phone-body button.propose-more { font-size: 14px; padding-left: 6px; padding-right: 6px; }
  html.large body.phone-body .ballot-progress { font-size: 16px; }
}
/* the right column's first heading has its heavy rule on the same line as the left one (main 3.6 --fh vs side
   3.2 --fh type at line-height 1.3 differ by 0.52 --fh); the doubled rule itself is handled by the hairline rule below */
.r-side .r-list > .d-group:first-child > .d-side-head { margin-top: calc(0.52 * var(--fh)); }
/* items carry their hairline at the bottom, never at the top, so no item drawn right under a heading (in any column,
   including the second column of a heading that spans both) doubles the heading's heavy rule */
.d-item { border-top: 0; border-bottom: 1px solid var(--hairline); }
/* 8px between the title row (round title and propose button) and the progress line text; the box gap is 10px
   because the Thai glyphs rise about 2px above their line box */
body.phone-body .title-row { margin-bottom: 10px; }
/* the family band's text keeps 8px (10px of box, for the glyphs above the line box) from the header above and
   from its own bottom border, collapsed and open;
   the summary row keeps its 48px tap height (border-box, so the padding sits inside it) */
.family-phone summary { padding: 10px 0; }
.family-phone[open] { padding-bottom: 10px; }
/* the "(... N ...)" tail of the tally legend never breaks */
.tally-line .tally-tail { white-space: nowrap; }
/* wrapped rows of round chips (and of the round's move buttons) sit at least 8px apart */
.round-list, .moves { row-gap: 8px; }
/* on the decisions view each item's ink (the tallest stacked tone marks, which rise about 8px above the
   line box) clears the hairline of the item above by at least 0.6 --fh (pixel scan) */
.decisions-view .d-item { padding-top: calc(1.9 * var(--fh)); }
/* release 6.2: in a portrait frame the results' items keep less room above them (the frame's height unit is large
   there; the type follows the frame's width, so the marks above the line need only about 1 --fh); placed before the
   rule below, which it outweighs by its selector */
.display-root.r-portrait .results-view .r-grid .d-item { padding-top: calc(1 * var(--fh)); }
/* the same for the items of the results view (all its layouts sit in .r-grid) */
.r-grid .d-item { padding-top: calc(1.9 * var(--fh)); }
/* the decisions column chips hold their text centred, its ink at least 0.4 --fh from the chip's top and bottom
   edges (Thai marks above take the top padding; the line box below already leaves room) */
.decisions-view .d-col h2.bin-chip { line-height: 1.05; padding: calc(1.35 * var(--fh)) calc(1 * var(--fw)) 0; }
/* the decisions title's ink sits at least 1.6 --fh under the top edge of its dark band */
.decisions-view .d-title-row { padding-top: calc(2.6 * var(--fh)); }

/* release 6.2: the results view fits its frame. Its type follows the smaller of the frame's two sides (--fm), so a
   portrait frame no longer makes it grow; the item's text and its result share a line when they fit; in a portrait
   frame the header is compact and the count line keeps to one line. Each answer group has its own colour (none
   reads as good or bad), on its heading and as a bar at the side of its items. */
.display-root { --fm: min(var(--fh), var(--fw)); }
.results-view .d-title { font-size: clamp(20px, calc(3.6 * var(--fm)), 48px); }
.results-view .r-grid .d-item { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: calc(1.6 * var(--fm));
  padding-bottom: calc(0.4 * var(--fm)); padding-left: calc(1.2 * var(--fm)); border-left: calc(0.6 * var(--fm)) solid var(--hairline); }
.results-view .d-text, .results-view .d-item.compact .d-text { font-size: clamp(16px, calc(3 * var(--fm)), 40px); line-height: 1.25; }
.results-view .d-result { margin-top: 0; }
.results-view .d-counts, .results-view .d-item.compact .d-counts { font-size: clamp(14px, calc(2.3 * var(--fm)), 28px); }
.results-view .d-result .tokens, .results-view .d-item.compact .d-result .tokens { font-size: clamp(14px, calc(2.4 * var(--fm)), 30px); }
.results-view .d-main-head, .results-view .d-side-head { font-size: clamp(16px, calc(2.8 * var(--fm)), 36px); margin-top: calc(0.6 * var(--fm)); padding: calc(0.3 * var(--fm)) calc(1 * var(--fm)); }
.results-view .d-empty { font-size: clamp(14px, calc(2.4 * var(--fm)), 30px); }
.results-view .page-label { font-size: clamp(16px, calc(2.6 * var(--fm)), 32px); }
.display-root.r-portrait .display-head .family { font-size: clamp(13px, calc(2 * var(--fm)), 22px); padding-top: calc(1.2 * var(--fh)); }
.display-root.r-portrait .results-view .d-counts { white-space: nowrap; }
.display-root.r-portrait .results-view .r-grid.single .r-list { columns: auto; }
.d-group.col-all_must > h2 { color: var(--cls-all_must); background: var(--cls-all_must-bg); border-bottom-color: var(--cls-all_must); }
.d-group.col-all_nice > h2 { color: var(--cls-all_nice); background: var(--cls-all_nice-bg); border-bottom-color: var(--cls-all_nice); }
.d-group.col-mixed > h2 { color: var(--cls-mixed); background: var(--cls-mixed-bg); border-bottom-color: var(--cls-mixed); }
.d-group.col-incomplete > h2 { color: var(--cls-incomplete); background: var(--cls-incomplete-bg); border-bottom-color: var(--cls-incomplete); }
.results-view .d-group.col-all_must .d-item { border-left-color: var(--cls-all_must); }
.results-view .d-group.col-all_nice .d-item { border-left-color: var(--cls-all_nice); }
.results-view .d-group.col-mixed .d-item { border-left-color: var(--cls-mixed); }
.results-view .d-group.col-incomplete .d-item { border-left-color: var(--cls-incomplete); }

/* The aspect rule: in a frame narrower than 3:2 the sides keep 2.4 --fw instead of 3.6, and the decisions band
   still runs from edge to edge of the stage. It acts on every picture. It stands after every other rule of the
   big screen, so that it wins over the safe area above at the same weight. Both forms hold the same rules: the
   frame's aspect, and the window's where container units are missing. */
@container display (max-aspect-ratio: 3/2) {
  .display-head .family, .display-head .trial-band, .stage, .display-foot, .decisions-view .d-title-row {
    padding-left: calc(2.4 * var(--fw)); padding-right: calc(2.4 * var(--fw)); }
  .decisions-view .d-title-row { margin-left: calc(-2.4 * var(--fw)); margin-right: calc(-2.4 * var(--fw)); }
}
@supports not (height: 1cqh) {
  @media (max-aspect-ratio: 3/2) {
    .display-head .family, .display-head .trial-band, .stage, .display-foot, .decisions-view .d-title-row {
      padding-left: calc(2.4 * var(--fw)); padding-right: calc(2.4 * var(--fw)); }
    .decisions-view .d-title-row { margin-left: calc(-2.4 * var(--fw)); margin-right: calc(-2.4 * var(--fw)); }
  }
}

/* ==========================================================================
   Staff pages of the hosted service at phone width
   ========================================================================== */

/* the console's top bar wraps instead of widening the page */
.topbar-row { flex-wrap: wrap; row-gap: var(--s-2); }
.topbar-row > * { min-width: 0; }
.topbar-link { display: inline-flex; align-items: center; min-height: 44px; white-space: normal; }
.bar { flex-wrap: wrap; row-gap: var(--s-2); }
@media (max-width: 700px) {
  .topbar-row { gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-3); }
  .topbar-family { flex-basis: 100%; order: 5; }
  .topbar .conn { white-space: normal; flex-basis: 100%; order: 6; }
}

/* controls of the sign-in, setup, admin and my-rooms pages are at least 44px high */
body.touch-staff button,
body.touch-staff select,
body.touch-staff input:not([type="checkbox"]):not([type="radio"]),
body.touch-staff .rooms a,
body.touch-staff a.room-link { min-height: 44px; }
body.touch-staff .rooms a,
body.touch-staff a.room-link { display: inline-flex; align-items: center; }
body.touch-staff label.inline,
body.touch-staff label.type-choice { display: flex; align-items: center; min-height: 44px; }

/* accounts and rooms of the admin page are stacked cards */
.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-card { border-top: 1px solid var(--hairline); padding: var(--s-3) 0; }
.admin-card .card-title { font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.admin-card .card-facts { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin: var(--s-1) 0 0; }
.admin-card .card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
.admin-card .card-actions .field { margin: 0; }
.admin-column { min-width: 0; }
.code-box { margin: var(--s-3) var(--s-5); padding: var(--s-3) var(--s-4); border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--surface); overflow-wrap: anywhere; }
.code-box[hidden] { display: none; }
.maintenance-banner { margin: 0; padding: var(--s-2) var(--s-5); background: #FBEDEA; }
.maintenance-banner[hidden] { display: none; }

/* the check page keeps 16px from the screen edges */
main.check-page { padding-left: 16px; padding-right: 16px; }

/* ==========================================================================
   Staff room app: dock, strip, switch, frames, hold, bands and the QR pages
   ========================================================================== */
/* the tokens of the staff pages; the phone's pages do not take them. The rail is 340px from 1024 to 1279 px and
   400px from 1280 px. */
body.console-body, body.print-body {
  --rail-w: 340px;
  --topbar-h: 56px;
  --tabs-h: 48px;
  --dock-h: 56px;
  --band-h: 52px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --dock-total: calc(var(--dock-h) + var(--safe-b));
  --on-shell-line: #7D8AA0;      /* outline of buttons on the shell */
  --hold-fill: #F3DAD4;          /* --danger text on it: 4.9:1 */
}
@media (min-width: 1280px) { body.console-body { --rail-w: 400px; } }
@media (max-width: 599px) { body.console-body { --topbar-h: 52px; } }

/* the dock of Control and the strip of the Display and QR views: fixed at the bottom, in the shell colour */
.staff-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--dock-total);
  padding: 6px max(16px, var(--safe-r)) calc(6px + var(--safe-b)) max(16px, var(--safe-l));
  background: var(--shell); color: var(--shell-ink); display: flex; flex-direction: row; align-items: center; gap: 8px; }
.console-layout { padding-bottom: var(--dock-total); }
.dock-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; margin: 0;
  border: 1px solid var(--on-shell-line); border-radius: 6px; background: transparent; color: var(--shell-ink);
  font-weight: 600; font-size: 0.9375rem; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.dock-btn .icon { width: 20px; height: 20px; flex: none; }
.dock-btn.primary { background: var(--shell-ink); color: var(--shell); }
.dock-btn:active:not(:disabled) { box-shadow: inset 0 0 0 2px var(--shell-ink); }
.dock-btn:disabled { color: #8C96A8; border-color: #4A5874; background: transparent; }
.dock-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dock-btn .label-short { display: none; }
@media (max-width: 1099px) {
  .staff-dock.strip .dock-btn .label-long { display: none; }
  .staff-dock.strip .dock-btn .label-short { display: inline; }
}
.dock-seg { display: inline-flex; }
.dock-seg .dock-btn { border-radius: 0; }
.dock-seg .dock-btn:first-child { border-radius: 6px 0 0 6px; }
.dock-seg .dock-btn:last-child { border-radius: 0 6px 6px 0; }
.dock-seg .dock-btn[aria-pressed="true"] { background: var(--shell-ink); color: var(--shell); }
.dock-pages { display: inline-flex; align-items: center; gap: 4px; }
.dock-pages .dock-btn { width: 44px; padding: 0; justify-content: center; }
.dock-pages .dock-page-label { min-width: 72px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1099px) { .dock-pages .dock-page-label { min-width: 56px; } }
.dock-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--shell-ink); color: var(--shell); font-weight: 700; font-size: 0.8125rem; }
.dock-badge[hidden] { display: none; }
.dock-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--trial); flex: none; }
.dock-btn.next { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.2; }
.dock-btn.next .next-title { font-weight: 400; font-size: 0.8125rem; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1279px) { .dock-btn.next .next-title { max-width: 14ch; } }
.staff-dock .op-bar { left: 0; bottom: var(--dock-total); }
@media (min-width: 1024px) { .staff-dock .op-bar { left: var(--rail-w); } }
.op-bar.info { color: var(--ink); background: var(--wash); }
.op-bar.switch-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.op-bar.switch-ask button { min-height: 44px; margin: 0; }

/* the message band of the strip, directly above it, two lines at most */
.strip-msg { position: fixed; left: 0; right: 0; bottom: var(--dock-total); z-index: 41; padding: 10px 16px;
  font-weight: 600; font-size: 1rem; background: var(--surface); color: var(--ink); border-top: 1px solid var(--hairline);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.strip-msg:not(.show) { display: none; }
.strip-msg.error { color: var(--danger); background: #FBEDEA; }
.strip-msg.ok { color: var(--ok); background: #EAF3EE; }
.strip-msg.busy { color: var(--ink-2); }
.strip-msg.info { color: var(--ink); background: var(--wash); }

/* the popovers of the strip */
.strip-pop { position: fixed; z-index: 42; width: min(520px, calc(100vw - 32px)); overflow-y: auto; padding: 16px; font-size: 1rem;
  background: var(--surface); border: 1px solid var(--shell); border-radius: 10px; box-shadow: var(--shadow); }
.strip-pop.confirm-pop { bottom: calc(var(--dock-total) + 8px); left: 50%; transform: translateX(-50%);
  max-height: calc(100vh - var(--dock-total) - 24px); max-height: calc(100dvh - var(--dock-total) - 24px); }
.strip-pop.seats-pop { top: calc(8px + var(--safe-t)); left: 16px;
  max-height: calc(100vh - var(--dock-total) - 24px - var(--safe-t)); max-height: calc(100dvh - var(--dock-total) - 24px - var(--safe-t)); }
.strip-pop button { min-height: 48px; }
.strip-pop .pop-actions { display: flex; justify-content: space-between; gap: 8px; }

/* the blank while views change: the shell colour, no text, no transition */
.switch-blank { position: fixed; inset: 0; z-index: 100; background: var(--shell); transition: none; }

/* the frame of a lost session or room, in place of the view */
.session-frame { max-width: 32rem; margin: 0 auto; padding: var(--s-6) 16px calc(var(--dock-total) + var(--s-6));
  display: flex; flex-direction: column; align-items: stretch; gap: var(--s-4); }
.session-frame-text, .session-frame .notice { font-size: 1.125rem; margin: 0; }
.session-frame .primary { min-height: 48px; }

/* the Display view rotates nothing: in portrait on a touch device a prompt takes the picture's place */
.rotate-prompt { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  .staff-display .rotate-prompt { display: flex; align-items: center; justify-content: center; text-align: center;
    height: calc(100vh - var(--dock-total)); height: calc(100dvh - var(--dock-total)); padding: 0 24px;
    background: var(--shell); color: var(--shell-ink); font-size: 1.5rem; }
  .staff-display:has(.rotate-prompt) .display-frame { display: none; }
}

/* the quick decision drawer over the top of the frame */
.qd { position: fixed; top: 0; left: 0; right: 0; z-index: 45; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  max-height: calc((100vh - var(--dock-total)) * 0.34); max-height: calc((100dvh - var(--dock-total)) * 0.34);
  padding: calc(8px + var(--safe-t)) 16px 8px; background: var(--surface); border-bottom: 1px solid var(--hairline);
  box-shadow: 0 6px 16px rgba(28, 34, 48, 0.12); }
.qd.qd-tall { max-height: calc((100vh - var(--dock-total)) * 0.45); max-height: calc((100dvh - var(--dock-total)) * 0.45); }
.qd-chips { display: flex; gap: 8px; height: 56px; overflow-x: auto; scroll-snap-type: x proximity; }
.qd-chip { min-height: 52px; max-width: 32ch; padding: 4px 12px; border: 1px solid #857D6F; border-radius: 10px;
  background: var(--surface); color: var(--ink); display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; scroll-snap-align: start; flex: none; }
.qd-chip .chip-line1 { font-size: 0.9375rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qd-chip .chip-line2 { font-size: 0.8125rem; font-weight: 600; }
.qd-chip .chip-later { color: var(--warn); }
.qd-chip[aria-pressed="true"] { background: var(--shell); color: var(--shell-ink); }
.qd-chip.on-screen { outline: 2px solid var(--shell); outline-offset: 2px; }
.qd-page { flex: none; align-self: center; font-size: 0.8125rem; color: var(--ink-2); }

/* two or three choices of which one is chosen */
.seg { display: inline-flex; flex-wrap: wrap; }
.seg button { min-height: 48px; min-width: 88px; margin: 0; border: 1px solid var(--shell); border-radius: 0; font-weight: 600;
  font-size: 1rem; background: var(--surface); color: var(--shell); }
.seg button + button { border-left-width: 0; }
.seg button:first-child { border-radius: 6px 0 0 6px; }
.seg button:last-child { border-radius: 0 6px 6px 0; }
.seg button[aria-pressed="true"] { background: var(--shell); color: var(--shell-ink); }

/* the button that is held for 2 seconds: the fill grows while the class holding is set (the script times the hold) */
.hold-btn { display: block; position: relative; overflow: hidden; width: 100%; max-width: 28rem; min-height: 56px;
  border: 2px solid var(--danger); border-radius: 6px; background: var(--surface); color: var(--danger); font-weight: 700;
  font-size: 1.0625rem; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hold-btn .hold-fill { position: absolute; inset: 0; background: var(--hold-fill); transform-origin: left; transform: scaleX(0);
  transition: transform 150ms ease-out; }
.hold-btn .hold-label { position: relative; }
.hold-btn.holding .hold-fill { animation: hold-fill 2000ms linear forwards; transition: none; }
.hold-btn.done { background: var(--danger); color: #fff; }
.hold-btn.done .hold-fill { display: none; }
.hold-btn:disabled { color: #646B78; border-color: var(--hairline); background: var(--paper); }
@keyframes hold-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* with reduced motion the fill still shows the hold, in four steps */
@media (prefers-reduced-motion: reduce) {
  .hold-btn.holding .hold-fill { animation: hold-fill 2000ms steps(4) forwards !important; }
}

/* the band line under the top bar, its overlay list, the top-bar menu and the class chip */
.band { display: flex; align-items: center; gap: 12px; min-height: var(--band-h); padding: 4px 16px; font-weight: 600; font-size: 1rem; }
.band button { min-height: 44px; margin: 0; }
.band .band-more { margin-left: auto; }
.band-info { background: var(--wash); color: var(--ink); }
.band-attn { background: #FBEDEA; color: var(--danger); border-bottom: 1px solid #E9C3BB; }
.band-list, .top-menu { position: absolute; z-index: 35; background: var(--surface); box-shadow: var(--shadow); border-radius: 10px;
  max-height: 50vh; overflow-y: auto; }
.top-menu { right: 16px; width: min(320px, calc(100vw - 32px)); }
.top-menu .top-menu-row { min-height: 48px; }
.class-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 600; font-size: 0.8125rem; white-space: nowrap; }
.class-chip.class-real { border: 1px solid var(--shell-ink-2); color: var(--shell-ink); }
.class-chip.class-pilot { background: var(--trial); color: var(--ink); }
.class-chip.class-test { background: var(--wash); color: var(--ink); }

/* tabs of the one-column Control */
.tabs { position: sticky; top: var(--topbar-h); z-index: 15; display: flex; height: var(--tabs-h); background: var(--surface);
  border-bottom: 1px solid var(--hairline); }
.tabs .tab { flex: 1; min-height: 48px; margin: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink-2);
  font-weight: 600; font-size: 0.9375rem; }
.tabs .tab[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--shell); }
@media (max-width: 399px) { .tabs .tab { font-size: 0.8125rem; line-height: 1.2; white-space: normal; } }

/* My rooms: a row per room; the card disclosure; the code panel; the dashboard table */
.room-row { display: grid; grid-template-columns: 7ch minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 16px; border-bottom: 1px solid var(--hairline); color: var(--ink); text-decoration: none; }
.room-row .room-row-code { font-size: 1.125rem; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .room-row { grid-template-columns: 7ch minmax(0, 1fr); } }
.room-row.unfinished .phase { color: var(--warn); font-weight: 600; }
.cards-toggle { display: block; width: 100%; min-height: 48px; background: var(--wash); color: var(--ink); font-weight: 600; text-align: left; }
.cards-toggle .warn-part { color: var(--warn); }
.code-once { background: var(--wash); padding: 16px; border-radius: 10px; }
.code-once .code-value { font-size: 1.75rem; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); position: sticky; top: var(--topbar-h); background: var(--paper); }
.dash-table td { padding: 10px 12px; vertical-align: top; }
.dash-table td:first-child a { display: inline-flex; min-height: 44px; align-items: center; }

/* touch targets of the room app: every staff control at least 44 x 44 */
body.touch-staff .display-panel button,
body.touch-staff table.seats td.actions > button,
body.touch-staff table.seats td.actions button,
body.touch-staff .round-list .round-chip,
body.touch-staff button.small,
body.touch-staff .small-choice,
body.touch-staff .item-controls input,
body.touch-staff .tally-row .decision-open,
body.touch-staff a.button-link { min-height: 44px; min-width: 44px; }
body.touch-staff label:has(> input[type="radio"]),
body.touch-staff label:has(> input[type="checkbox"]) { min-height: 44px; display: inline-flex; align-items: center; }
body.touch-staff summary { min-height: 44px; }
a.button-link { display: inline-flex; align-items: center; padding: 0 var(--s-3); border: 1px solid var(--shell); border-radius: var(--radius);
  color: var(--shell); background: var(--surface); text-decoration: none; font-weight: 600; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s-2) 0; }
.qr-actions button { margin: 0; }

/* the QR view: the frame above the strip, paper, the QR on white with a hairline */
.staff-qr { background: var(--paper); }
.qr-frame { container-type: size; width: 100%; height: calc(100vh - var(--dock-total)); height: calc(100dvh - var(--dock-total));
  overflow: hidden; }
.qr-view { --qh: 1vh; --qw: 1vw; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(0.6 * var(--qh)); padding: calc(1 * var(--qh)) 16px; text-align: center; line-height: 1.2; }
@supports (height: 1cqh) { .qr-view { --qh: 1cqh; --qw: 1cqw; } }
.qr-view .qr-prompt, .qr-view .qr-room-code, .qr-view .qr-typed, .qr-view .qr-window, .qr-view .qr-joined, .qr-view .qr-conn, .qr-join-line .qr-short, .qr-join-line .qr-pin { margin: 0; }
.qr-prompt { font-size: clamp(1.5rem, calc(4 * var(--qh)), 2.25rem); font-weight: 700; color: var(--ink); }
.qr-square { width: min(calc(64 * var(--qh)), calc(86 * var(--qw))); aspect-ratio: 1; flex: 0 1 auto; min-height: 0; background: #fff;
  border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; }
.qr-square .qr-code { width: 100%; height: 100%; display: block; }
.qr-square .qr-closed, .qr-square .qr-error { padding: 16px; font-size: 1.25rem; color: var(--ink); }
.qr-room-code { font-size: 1.5rem; }
.qr-room-value { font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.qr-typed { font-size: 1.125rem; color: var(--ink-2); }
.qr-join-line { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1em; font-size: 1.75rem; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.qr-join-line .qr-short, .qr-join-line .qr-pin { overflow-wrap: anywhere; }
.qr-window, .qr-joined { font-size: 1.125rem; }
.qr-conn { color: var(--danger); font-weight: 600; }
@media (orientation: portrait) {
  .qr-square { width: min(calc(100 * var(--qw) - 32px), calc(100 * var(--qh) - 16rem)); }
}

/* the page to print the QR: on screen scaled to the window with its toolbar; printed on A4, black on white */
body.print-body { background: #fff; color: #000; }
main.print-qr { max-width: 46rem; margin: 0 auto; padding: 16px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 8px; }
.print-app, .print-prompt, .print-room-code, .print-typed, .print-validity, .print-time, .print-short, .print-pin, main.print-qr .notice, main.print-qr .qr-closed { margin: 0; }
.print-toolbar { align-self: stretch; display: flex; justify-content: flex-end; gap: 8px; }
.print-toolbar button { min-height: 44px; margin: 0; }
.print-app { font-size: 1rem; }
.print-prompt { font-size: 1.5rem; font-weight: 700; }
.print-square { width: min(120mm, 90vw); aspect-ratio: 1; }
.print-square .qr-code { width: 100%; height: 100%; display: block; }
.print-room-code { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.print-join-line { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 1em; font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.print-validity { font-size: 0.9rem; max-width: 40rem; }
.print-time { align-self: flex-end; font-size: 0.8rem; }
@page { size: A4 portrait; margin: 15mm; }
@media print {
  .print-toolbar { display: none; }
  body.print-body, main.print-qr { background: #fff; color: #000; }
  main.print-qr { max-width: none; padding: 0; }
  .print-prompt { font-size: 20pt; }
  .print-square { width: 120mm; }
  .print-room-code { font-size: 28pt; }
  .print-typed { font-size: 14pt; }
  .print-join-line { font-size: 24pt; }
  .print-validity { font-size: 12pt; }
  .print-time { font-size: 10pt; }
}

/* ==========================================================================
   Phone header with the connection indicator, the in-app browser banner, the PIN field,
   the re-entry digits, proposal records and the use of a phone for another person
   ========================================================================== */
/* The header keeps one fixed height in every state and both text sizes: the 48px button plus 3px above and below. */
body.phone-body .phone-bar { height: 54px; }
.phone-bar .indicator { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end;
  justify-content: center; color: var(--shell-ink-2); }
.phone-bar .indicator .ind-line { display: block; height: 20px; line-height: 20px; font-size: 14px; white-space: nowrap;
  text-align: right; max-width: 100%; }
html.large .phone-bar .indicator .ind-line { height: 21px; line-height: 21px; font-size: 15px; }
.phone-bar .head-short { display: none; }
/* below 380px (480px in large text): a tighter text-size button, and only the seat label (or no title) on the left */
@media (max-width: 379px) {
  body.phone-body .phone-bar button.small { padding-left: 6px; padding-right: 6px; }
  .phone-bar .head-long { display: none; }
  .phone-bar .head-short { display: inline; }
}
@media (max-width: 479px) {
  html.large body.phone-body .phone-bar button.small { padding-left: 6px; padding-right: 6px; }
  html.large .phone-bar .head-long { display: none; }
  html.large .phone-bar .head-short { display: inline; }
}
@media (max-width: 359px) { html.large .phone-bar .indicator .ind-line { font-size: 14px; } }
.phone-bar .indicator[data-state="lost"] .ind-state { color: #FFD7CC; font-weight: 600; }
.inapp-banner { margin: 0; padding-top: 8px; padding-bottom: 8px; background: #FFF4D6; color: var(--ink);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inapp-banner p { margin: 0; flex: 1 1 12rem; }
body.phone-body #join-pin { height: 48px; font-size: 28px; text-align: center; width: 8em; letter-spacing: 0.2em; }
.match-digits { font-size: 56px; line-height: 1.1; font-weight: 700; letter-spacing: 0.15em; margin: 8px 0; }
.proposal-record.dead { color: var(--danger); }
.proposal-record.pending { color: var(--ink-2); }
.other-person { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.other-confirm { display: flex; flex-wrap: wrap; gap: 8px; }
.other-confirm p { flex-basis: 100%; margin: 0; }
body.phone-body button.link-button { background: transparent; border: 0; text-decoration: underline; color: var(--ink-2);
  min-height: 48px; align-self: flex-start; padding-left: 0; }
.check-page h1.warn { color: var(--danger); }

/* Console: the offline band and its paper rule, inside the sticky top bar */
.offline-banner, .offline-paper { margin: 0; padding: var(--s-2) var(--s-5); background: var(--danger); color: #fff;
  font-weight: 600; }
.offline-paper { background: #FBEDEA; color: var(--danger); }

/* ==========================================================================
   Control view: top bar, band line, tabs, panels, moves, worklist, end summary and end-done block
   ========================================================================== */
/* the fixed parts take one row each; the columns scroll between them and the dock */
body.console-body .control-top, body.console-body .band, body.console-body .band-list-place,
body.console-body .tabs { flex: none; }
body.console-body .control-top { position: relative; z-index: 20; }
body.console-body .control-top .topbar-row { flex-wrap: nowrap; gap: 12px; height: var(--topbar-h); min-height: 0;
  padding: 0 max(16px, var(--safe-r)) 0 max(16px, var(--safe-l)); padding-top: var(--safe-t); }
body.console-body .control-top .room-code-top, body.console-body .control-top .class-chip,
body.console-body .control-top .conn, body.console-body .topbar-chip, body.console-body .top-more { flex: none; }
body.console-body .control-top .room-code-top { font-variant-numeric: tabular-nums; }
body.console-body .topbar-phase { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 8px; overflow: hidden; }
body.console-body .topbar-phase .phase { flex: none; margin: 0; }
body.console-body .topbar-round { min-width: 0; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.console-body .control-top .conn { display: inline-flex; align-items: center; gap: 6px; }
body.console-body .conn-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--ok); flex: none; }
body.console-body .conn.conn-lost .conn-dot { background: #FFD7CC; }
body.console-body .topbar-chip { min-height: 44px; margin: 0; padding: 0 12px; border: 1px solid var(--on-shell-line);
  border-radius: 999px; background: transparent; color: var(--shell-ink); font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
body.console-body .top-more { margin: 0 0 0 auto; min-width: 44px; min-height: 44px; padding: 0 8px; display: inline-flex;
  align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--on-shell-line); border-radius: 6px;
  background: transparent; color: var(--shell-ink); }
body.console-body .top-more .icon { width: 20px; height: 20px; }
body.console-body .top-more-badge { display: none; }
body.console-body .band-chip { display: none; }
body.console-body .top-menu { top: 100%; padding: 8px; color: var(--ink); }
body.console-body .top-menu .top-menu-row { display: flex; align-items: center; gap: 12px; margin: 0; padding: 4px 8px; }
body.console-body .top-menu .top-menu-row button { margin: 0 0 0 auto; }
body.console-body .top-menu .private-confirm { margin: 8px 0; box-shadow: none; }
/* 600 to 1023 px: the pill without the round title, the count as a badge on the menu button */
@media (max-width: 1023px) {
  body.console-body .topbar-round, body.console-body .reason-later-chip { display: none; }
  body.console-body .top-more-badge { display: inline-flex; }
}
/* under 600 px: the phase is in the menu; the connection is its dot and its time; under 400 px the dot alone */
@media (max-width: 599px) {
  body.console-body .control-top .room-code-top { font-size: 1.25rem; }
  body.console-body .topbar-phase { display: none; }
  body.console-body .control-top .conn-word { display: none; }
}
@media (max-width: 399px) {
  body.console-body .control-top .conn-time { display: none; }
}

/* the band line: one message, with the count of the others at the right end */
body.console-body .band:empty { display: none; }
body.console-body .band-first { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
body.console-body .band-first > *, body.console-body .band-text { min-width: 0; margin: 0; }
body.console-body .band-first { overflow: hidden; }
body.console-body .band-text, body.console-body .band-first .offline-banner, body.console-body .band .private-banner > span {
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; min-width: 0; line-height: 1.35; }
body.console-body .band .private-banner button, body.console-body .band .band-more { flex: none; }
body.console-body .band .offline-banner, body.console-body .band .offline-paper { padding: 0; background: transparent; color: inherit; }
body.console-body .band .offline-paper { display: none; }
body.console-body .band .private-banner { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
body.console-body .band .private-banner button { margin-left: auto; }
body.console-body .band-link, body.console-body .band-badge { margin: 0; min-height: 44px; padding: 0 12px; border: 1px solid currentColor;
  border-radius: 6px; background: transparent; color: inherit; font-weight: 600; text-align: left; }
body.console-body .band-ellipsis { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.console-body .band-list-place { position: relative; height: 0; z-index: 35; }
body.console-body .band-list { top: 0; left: 16px; right: 16px; padding: 8px; color: var(--ink); }
body.console-body .band-list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: 8px;
  min-height: 48px; font-weight: 600; }
body.console-body .band-list-row button { margin: 0; }
body.console-body .band-list .offline-banner, body.console-body .band-list .offline-paper { padding: 0; background: transparent; color: var(--danger); }
body.console-body .claim-burst-box { flex-direction: column; align-items: flex-start; }
body.console-body .claim-burst-box p { margin: 0; }
body.console-body .take-confirm { margin: 0; box-shadow: none; }
/* under 500 px of height the band is not a row: its first message is a chip at the right end of the top bar */
@media (max-height: 499px) {
  body.console-body .band { display: none; }
  body.console-body .band-chip { display: inline-block; flex: 0 1 auto; min-width: 0; max-width: 40vw; min-height: 44px; margin: 0;
    padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--on-shell-line);
    border-radius: 6px; background: transparent; color: var(--shell-ink); font-weight: 600; }
}

/* tabs: only in the one-column layout; each shows the panels of its own name */
body.console-body .tabs .tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 4px; }
body.console-body .tabs .tab .dock-badge { flex: none; }
@media (min-width: 1024px) {
  body.console-body .tabs { display: none; }
}
@media (max-width: 1023px) {
  body.console-body .tabs { top: var(--topbar-h); }
  body.console-body .console-layout[data-tab="rounds"] :is(.rail, main.console) > .panel:not([data-tab="rounds"]),
  body.console-body .console-layout[data-tab="seats"] :is(.rail, main.console) > .panel:not([data-tab="seats"]),
  body.console-body .console-layout[data-tab="proposals"] :is(.rail, main.console) > .panel:not([data-tab="proposals"]),
  body.console-body .console-layout[data-tab="room"] :is(.rail, main.console) > .panel:not([data-tab="room"]),
  body.console-body .console-layout:not([data-tab="rounds"]) main.console > .reason-later-row { display: none; }
  body.console-body .console-layout[data-end="1"][data-tab="room"] .rail > .panel { display: none; }
  body.console-body .rail { padding-top: 0; background: transparent; }
  body.console-body .round-head { top: calc(var(--topbar-h) + var(--tabs-h)); }
}
/* the round header is sticky only where the screen is tall enough, and never on a phone */
@media (max-height: 699px) {
  body.console-body .round-head { position: static; }
}
@media (max-width: 599px) {
  body.console-body .round-head { position: static; }
}
/* the rail of an ended room starts with the room panel */
body.console-body .rail[data-ended="1"] { display: flex; flex-direction: column; }
body.console-body .rail[data-ended="1"] > .room-panel { order: -1; }

/* every staff control at least 44 x 44; inputs at least 16 px (no zoom in Safari); a visible pressed state */
body.console-body button, body.console-body a.button-link, body.console-body select { -webkit-tap-highlight-color: transparent; }
body.console-body button:active:not(:disabled) { box-shadow: inset 0 0 0 2px currentColor; }
body.console-body input:not([type="checkbox"]):not([type="radio"]), body.console-body select, body.console-body textarea { font-size: max(16px, 1rem); }
body.touch-staff .pending-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
body.touch-staff .top-menu a.button-link { display: flex; }
body.touch-staff .worklist button, body.touch-staff .end-flow-panel button, body.touch-staff .link-panel button,
body.touch-staff .join-panel button, body.touch-staff .reason-later-row button { min-height: 44px; min-width: 44px; }

/* the round workspace: the reason-later row, the round chooser, the moves and their confirmation, the card lists */
body.console-body .reason-later-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin: var(--s-2) 0; padding: 4px 0; font-weight: 600; }
body.console-body .reason-later-row button { margin: 0; }
body.console-body .round-select-native { display: none; }
@media (max-width: 767px) {
  body.console-body .round-list { display: none; }
  body.console-body .round-select-native { display: block; width: 100%; min-height: 48px; margin: var(--s-2) 0; }
}
body.console-body .moves { flex-direction: column; align-items: stretch; gap: 8px; }
body.console-body .move-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
body.console-body .move-buttons button { margin: 0; }
body.console-body .move-confirm { margin: 0; }
body.console-body .confirm-actions { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
body.console-body .confirm-actions button { margin: 0; }
@media (max-width: 599px) {
  body.console-body .move-buttons { flex-direction: column; }
  body.console-body .move-buttons button { width: 100%; }
}
body.console-body .cards-closed { margin: var(--s-3) 0; }
body.console-body .cards-closed p { margin: 0 0 var(--s-2); }
body.console-body .cards-toggle { margin: var(--s-2) 0; border: 1px solid var(--hairline); border-radius: 6px; }
body.console-body .reason-later-mark { color: var(--warn); font-weight: 600; }
body.console-body .decision-form .form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-3); }
body.console-body .decision-form .form-actions button { margin: 0; }
body.console-body .decision-form .dissent-box[hidden] { display: none; }

/* the worklist of reasons given later */
body.console-body .worklist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.console-body .worklist-head h2 { margin: 0; }
body.console-body .worklist-head button { margin: 0; }
body.console-body .worklist-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
body.console-body .worklist-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px;
  border-top: 1px solid var(--hairline); }
body.console-body .worklist-row.selected { background: var(--wash); }
body.console-body .worklist-text { flex: 1 1 16rem; margin: 0; min-width: 0; overflow-wrap: anywhere; }
body.console-body .worklist-row .decision-form { flex-basis: 100%; }

/* the link for a separate screen: shown only after a tap, as text or as a QR */
body.console-body .link-create { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.console-body .link-create button { margin: 0; }
body.console-body .link-once { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: var(--s-2); }
body.console-body .link-once button { margin: 0; text-align: left; }
body.console-body .link-shown { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
body.console-body .link-qr { width: min(240px, 100%); background: #fff; }
body.console-body .link-qr svg { display: block; width: 100%; height: auto; }

/* the room panel: the family lines behind a disclosure; the end-done block first after the end */
body.console-body .family-disclosure summary { display: flex; align-items: center; cursor: pointer; overflow-wrap: anywhere; }
body.console-body .room-panel h3 { margin: var(--s-3) 0 var(--s-1); }
body.console-body .room-panel > button { margin: 0 8px 8px 0; }
body.console-body .end-done { margin: 0 0 var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--hairline); }
body.console-body .end-done h3 { margin-top: 0; }
body.console-body .end-done p { margin: 0 0 var(--s-1); }

/* the end summary: one column in place of the main column (the Room tab in one column) */
body.console-body .end-flow-panel { max-width: 46rem; }
body.console-body .end-attn { margin: 0 calc(-1 * var(--s-5)) var(--s-3); padding: 10px var(--s-5); font-weight: 600; }
body.console-body .end-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.console-body .end-head h2 { margin: 0; }
body.console-body .end-head button { margin: 0; }
body.console-body .end-summary p { margin: 0 0 var(--s-1); }
body.console-body .slot-line { min-height: 1.5em; }
body.console-body .end-list { list-style: none; margin: 0 0 var(--s-2); padding: 0; }
body.console-body .end-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 6px 0;
  border-top: 1px solid var(--hairline); }
body.console-body .end-row-text { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
body.console-body .end-row button { margin: 0; }
body.console-body .end-form-host { flex-basis: 100%; }
body.console-body .end-confirm-all { margin: var(--s-1) 0 var(--s-2); }
body.console-body .end-states { border: 0; margin: var(--s-3) 0; padding: 0; }
body.console-body .end-states legend { font-weight: 600; margin-bottom: var(--s-1); }
body.touch-staff .end-states .end-state-row { display: flex; align-items: flex-start; gap: 12px; min-height: 56px; padding: 6px 0; }
body.console-body .end-state-row input { margin-top: 4px; }
body.console-body .end-state-text { display: flex; flex-direction: column; }
body.console-body .end-state-label { font-weight: 600; }
body.console-body .end-reason-box[hidden] { display: none; }
body.console-body .end-reason-box .field input { width: 100%; }
body.console-body .end-hold { margin: var(--s-4) 0 var(--s-2); }
body.console-body .end-hold[hidden] { display: none; }
body.console-body .end-hold p { margin: 0 0 var(--s-2); }
body.console-body .end-irreversible { color: var(--ink); }

/* the conflict panel of a decision, in the drawer and in the Control form */
body.console-body .conflict-panel { padding: 12px; border-radius: 6px; margin: 0 0 var(--s-2); }
body.console-body .conflict-panel p { margin: 0; }
body.console-body .conflict-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; color: var(--ink); }
body.console-body .conflict-head { font-weight: 700; }
body.console-body .conflict-label { color: var(--ink-2); }
body.console-body .conflict-value { overflow-wrap: anywhere; }
body.console-body .conflict-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
body.console-body .conflict-choices button { margin: 0; min-height: 44px; }
body.console-body .conflict-confirm-text { flex-basis: 100%; }

/* the drawer's controls and the strip popovers' controls: 44 px and more */
body.console-body .qd button, body.console-body .qd input:not([type="checkbox"]):not([type="radio"]),
body.console-body .strip-pop input:not([type="checkbox"]):not([type="radio"]) { min-height: 44px; }

/* the Display view's strip, its seats popover and the quick decision drawer */
.staff-dock.strip .strip-fill { flex: 1 1 auto; }
.qd > .qd-head, .qd > .qd-chips, .qd > .qd-row, .qd > .conflict-panel, .qd > .qd-msg { flex: none; }
.qd-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.qd-head .qd-title { margin: 0; font-size: 1rem; }
.qd-row { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.qd-item .qd-item-text { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 899px) { .qd-item { flex-wrap: wrap; } }
.qd-reason-row input { flex: 1 1 auto; min-width: 0; min-height: 44px; font-size: 1rem; }
.qd-label { font-weight: 600; }
.pop-qr { width: 200px; height: 200px; }
.pop-join-line { font-size: 1.5rem; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 0 24px; }
.staff-dock.strip .strip-admin { border-color: transparent; }
@media (min-width: 1100px) and (max-width: 1279px) { .staff-dock.strip .strip-admin .label-long, .staff-dock.strip [data-testid=fullscreen-button] .label-long { display: none; } }
@media (max-width: 1099px) { .staff-dock.strip.with-icons .next-title { display: none; } }
/* the drawer's item row on one line from 900 px: the outcome, the basis text and the dissent question keep their
   width, the outcome's buttons do not wrap, and the item's text gives way; under 900 px the row splits (above) */
.qd-item > .seg, .qd-item > .qd-basis-text, .qd-item > .qd-dissent { flex: none; }
.qd-item > .seg { flex-wrap: nowrap; }
.qd-item > .qd-item-text { flex: 0 1 auto; min-width: 0; }
.qd-dissent { display: flex; align-items: center; gap: 8px; }

/* My groups: the page is one column, 64rem at most, centred; the room row */
main.my-groups { grid-template-columns: minmax(0, 64rem); justify-content: center; }
.my-groups-list section > h2 { margin: var(--s-4) 0 var(--s-1); }
.room-row { grid-template-columns: 10ch minmax(0, 1fr) auto auto auto; }
.room-row .class-chip.class-real { color: var(--ink); border-color: var(--ink-2); }
@media (max-width: 767px) {
  .room-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .room-row-main { display: contents; }
  .room-row-code { order: 1; }
  .room-row-title { order: 2; flex: 1 1 0; min-width: 0; }
  .room-row .muted { order: 3; flex: 0 0 100%; }
  .room-row .class-chip, .room-row .phase { order: 4; }
  .room-row .icon { order: 5; margin-left: auto; }
}
body.touch-staff label.class-choice { min-height: 56px; }

/* ==========================================================================
   Admin page: the shell band and its two tabs, the dashboard of rooms with its action row, the step-up panel
   ========================================================================== */
/* the band, the tabs and the maintenance line keep their height; the tab's content scrolls under them (from 1024 px) */
body.console-body .admin-bar, body.console-body .admin-tabs, body.console-body .maintenance-banner { flex: none; }
.admin-bar .account-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.admin-bar .account-line button { margin: 0; }
body.console-body .admin-tabs { position: static; display: flex; }
.admin-tabs .tab { padding: 0 16px; }
main.admin-main { flex: 1; min-height: 0; overflow: auto; padding: 16px 16px 6rem; }
@media (max-width: 1023px) { main.admin-main { overflow: visible; } }
.admin-tab { min-width: 0; }

/* the filter row, the connection line and the states of the list */
.dash-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin: 0 0 8px; }
.dash-filter { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.dash-filter .field-label { margin-bottom: 4px; font-size: 0.875rem; }
.dash-filter select { max-width: 100%; }
.dash-precreate { margin: 0 0 0 auto; max-width: 100%; }
.dash-conn { margin: 0 0 8px; color: var(--ink-2); font-size: 0.875rem; }
.dash-conn.conn-lost { color: var(--danger); font-weight: 600; }
.dash-empty { margin: 16px 0; }

/* the table from 1024 px: its header stays at the top of the scrolling area under the band */
.dash-table th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
main.admin-main .dash-table th { top: 0; z-index: 1; }
.dash-table td { border-bottom: 1px solid var(--hairline); overflow-wrap: anywhere; }
.dash-table td.dash-manage-cell { text-align: right; }
.dash-table td.dash-time { overflow-wrap: normal; }
.dash-manage-btn { white-space: nowrap; }
/* the outlined chip of a real room in ink on the page (the chip's own colours are those of the dark top bar) */
.dash-table .class-chip.class-real, .dash-row .class-chip.class-real { color: var(--ink); border-color: var(--ink-2); }
.dash-link { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; min-width: 44px;
  color: var(--ink); text-decoration: none; }
.dash-code { font-size: 1.125rem; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.dash-title { overflow-wrap: anywhere; }
.cell-main, .cell-sub { display: block; }
.cell-sub { color: var(--ink-2); font-size: 0.875rem; }
.dash-activity.silent .cell-main, .dash-activity.silent .cell-sub { color: var(--warn); font-weight: 600; }
.dash-manage-btn { margin: 0; }
.manage-tr > td { padding: 0; }

/* one row per room under 1024 px: code, title and class; owner and status; activity, joined, rounds, end, archive */
.dash-row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 64px; padding: 10px 0;
  border-bottom: 1px solid var(--hairline); }
.dash-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; overflow-wrap: anywhere; }
.dash-row .dash-manage-btn { align-self: flex-start; }

/* the action row of a room: a tinted area under its row, its parts wrapping */
.dash-manage { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; padding: 12px 16px; background: var(--wash);
  border-bottom: 1px solid var(--hairline); min-width: 0; }
.dash-part { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.dash-part button, .dash-part a.button-link { margin: 0; }
.dash-class, .dash-reason { flex-basis: 100%; }
.dash-in-control { font-weight: 600; }
.dash-confirm { flex-basis: 100%; margin: 0; }
.dash-confirm button { margin: 4px 8px 0 0; }
.dash-class-choice { flex-basis: 100%; min-width: 0; margin: 0; background: var(--surface); }
/* one class per line, the radio beside its word and hint */
body.touch-staff .dash-class-choice label.class-choice { display: flex; align-items: flex-start; min-height: 44px; margin: 8px 0; }
.dash-class-choice label.class-choice > span { min-width: 0; overflow-wrap: anywhere; }
.dash-reassign { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; flex-basis: 100%; }
.dash-reassign .field { margin: 0; max-width: 100%; }
.dash-reason-text { flex-basis: 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.slot-room { flex-basis: 100%; }
.slot-room:empty, .slot-download:empty { display: none; }
.dash-form { margin: 0; }
/* the form's fields take the width of its column, never the intrinsic width of a control (a select's longest
   option, a date or time input), so the column never grows past the panel */
.dash-form .room-form > * { min-width: 0; }
.dash-form .field input, .dash-form .field select { width: 100%; min-width: 0; }

/* the step-up panel, in place above the action that needs it */
.step-up { flex-basis: 100%; max-width: 32rem; margin: 8px 0; padding: 12px 16px; border: 1px solid var(--shell);
  border-radius: var(--radius); background: var(--surface); }
.step-up-title { margin: 0 0 8px; font-size: 1rem; }
.step-up-input { width: 9ch; font-size: 16px; font-variant-numeric: tabular-nums; }
.step-up-error { margin: 8px 0 0; color: var(--danger); font-weight: 600; }
.step-up-error:empty { display: none; }
.step-up-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.step-up-actions button { margin: 0; }

/* ==========================================================================
   Admin page: the Accounts tab and its code panel; the sign-in page; the setup page
   ========================================================================== */
/* the create form: its fields and its button on one line where they fit, wrapping below */
.accounts-create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin: 0 0 16px; }
.accounts-create .field { flex: 1 1 14rem; min-width: 0; max-width: 24rem; margin: 0; }
.accounts-create .field input { width: 100%; }
.accounts-create button { margin: 0; max-width: 100%; white-space: normal; }
.accounts-create .step-up { flex-basis: 100%; }
.accounts-status { margin: 0 0 8px; color: var(--ink-2); font-size: 0.875rem; }
.accounts-status[hidden] { display: none; }

/* the code panel: a tinted area of the page, the code large, its groups as the server wrote them */
.code-once { margin: 0 0 16px; max-width: 40rem; }
.code-once[hidden] { display: none; }
.code-once .code-once-title { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.code-once .code-value { margin: 0 0 8px; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.code-once .hint { margin: 0 0 8px; }
.code-once .code-reset-note { margin: 0 0 8px; font-weight: 600; }
.code-once button { margin: 8px 0 0; }

/* the accounts as a table from 1024 px */
.accounts-table { width: 100%; border-collapse: collapse; }
.accounts-table th { text-align: left; padding: 10px 12px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2);
  border-bottom: 1px solid var(--hairline); }
.accounts-table td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid var(--hairline); overflow-wrap: anywhere; }
.accounts-table td.account-id { font-weight: 700; letter-spacing: .04em; }
.accounts-table td.account-time { overflow-wrap: normal; }
.accounts-table td.account-manage-cell { text-align: right; }
.accounts-table .account-actions-tr > td { padding: 0; }
.account-manage { margin: 0; }

/* one row per account under 1024 px: account and name; role and status; last sign-in; actions */
.account-row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0;
  border-bottom: 1px solid var(--hairline); min-width: 0; }
.account-row .account-line { margin: 0; overflow-wrap: anywhere; }
.account-row .account-head { font-weight: 600; }
.account-row .account-manage { align-self: flex-start; }

/* the actions of an account and their confirmation, in a tinted area under its row */
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; background: var(--wash);
  border-bottom: 1px solid var(--hairline); min-width: 0; }
.account-actions button { margin: 0; max-width: 100%; white-space: normal; }
.accounts-confirm { flex-basis: 100%; min-width: 0; margin: 0; }
.accounts-confirm .account-ask-text, .accounts-confirm .warn { margin: 0 0 8px; overflow-wrap: anywhere; }
.accounts-confirm .confirm-actions { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.accounts-confirm .confirm-actions button { margin: 0; }

/* sign-in and setup: the shell band, then one centred column on the paper */
body.console-body .signin-bar, body.console-body .setup-bar { flex: none; min-height: 52px; padding: 8px 16px; }
body.console-body main.signin-main, body.console-body main.setup-main { flex: 1; min-height: 0; overflow-y: auto;
  padding: 32px 16px 48px; }
@media (max-width: 599px) {
  body.console-body main.signin-main, body.console-body main.setup-main { padding-top: 16px; }
}
.signin-column { max-width: 28rem; margin: 0 auto; }
.setup-column { max-width: 32rem; margin: 0 auto; }
.signin-column .signin-note { margin: 0 0 8px; }
.signin-column .field input { width: 100%; }
.signin-column .signin-totp-field[hidden] { display: none; }
.signin-column .signin-submit { width: 100%; min-height: 48px; margin: 8px 0 0; }
.signin-column .signin-message { margin: 8px 0 0; }
.signin-column .signin-message.error { color: var(--danger); font-weight: 600; }
.setup-column .setup-step { margin: 0 0 24px; }
.setup-column .setup-code-panel { margin: 0; }
.setup-column .setup-noted { margin: 8px 0 0; }
.setup-column .setup-qr { box-sizing: content-box; width: 240px; height: 240px; max-width: 100%; margin: 8px 0; background: #fff; border: 1px solid var(--hairline); }
.setup-column .setup-qr svg { display: block; width: 100%; height: 100%; }
.setup-column .setup-secret { font-weight: 600; font-size: 1.125rem; letter-spacing: .08em; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.setup-column .field input { max-width: 12rem; font-variant-numeric: tabular-nums; }
.setup-column .setup-finish { min-height: 48px; margin: 8px 0 0; }
.setup-column .setup-message { margin: 8px 0 0; color: var(--danger); font-weight: 600; }

/* ==========================================================================
   Records of ended rooms: the supervisor's storage line, record block and chip; the admin's chip, room panel and
   download section
   ========================================================================== */
/* S0: the storage line keeps one line of height while it is empty, so the end summary does not move when it fills. */
body.console-body .archive-class-line { min-height: 1.5em; }
/* S0: the small second line under the storage line. */
body.console-body .archive-class-hint { margin: 0; }

/* S1: the block reserves the height of its tallest working, retrying, conflict or failed state: 4 lines below 480 px. */
body.console-body .archive-block { min-height: calc(4 * 1.5em); line-height: 1.5; }
/* S1: 3 lines from 480 px. */
@media (min-width: 480px) { body.console-body .archive-block { min-height: calc(3 * 1.5em); } }
/* S1: line 1 as a section heading of the end-done block, lines 2 and 3 at body size with no extra gap. */
body.console-body .archive-block .archive-title { margin: 0; font-size: var(--step-0); font-weight: 600; }
body.console-body .archive-block .archive-line { margin: 0; min-height: 1.5em; }
/* S1: the receipt digits in a larger tabular figure, two groups of four kept apart. */
body.console-body .archive-receipt-digits { font-size: var(--step-1); font-variant-numeric: tabular-nums;
  font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
/* S1: the receipt hint in small text, the only line that may wrap past the reserved height. */
body.console-body .archive-receipt-hint { margin: 0; }

/* S2: the chip is one line of 28 px that never changes the row's height. */
.archive-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 var(--s-2);
  border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
/* S2: stored, sent: the ink colour with the check shape. */
.archive-chip-ink { color: var(--ink); border: 1px solid transparent; }
/* S2: working, none and stored on this machine: a neutral outline. */
.archive-chip-neutral { color: var(--ink); border: 1px solid var(--ink-2); }
/* S2: retrying, conflict, failed and a mismatch: danger text on paper with the hollow square shape. */
.archive-chip-danger { color: var(--danger); background: var(--paper); border: 1px solid currentColor; }

/* S3: the chip and the number of the stored version in the dashboard's cell, on one line that never grows the row */
.slot-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; white-space: nowrap; vertical-align: middle; }
.archive-cell-version { font-size: 0.8125rem; color: var(--ink-2); white-space: nowrap; }
/* in the list rows under 1024 px the cell takes a line of its own at the end of the facts, one chip high, so the facts
   before it wrap the same in every state of the record */
.dash-row .slot-cell { flex: 1 0 100%; min-height: 28px; }

/* S4: the action that opens the panel; the panel under it in the action row, without a box of its own */
.archive-open { margin: 0; }
.archive-panel-box { min-width: 0; }
.archive-panel { margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--hairline); min-width: 0; overflow-wrap: anywhere; }
.archive-panel-title { margin: 0 0 4px; font-size: var(--step-1); }
.archive-class-note { margin: 0 0 4px; }
.archive-staging-line { margin: 0 0 4px; }
.archive-staging-line[hidden] { display: none; }
/* the message line at the top of the panel keeps its height */
.archive-msg { min-height: 1.5em; margin: 0 0 8px; }
.archive-msg[data-kind="error"], .archive-progress[data-kind="error"], .archive-download-line[data-kind="error"] {
  color: var(--danger); font-weight: 600; }
/* one column below 1024 px, versions first; from 1024 px the versions on the left and the forms on the right */
.archive-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 24px; }
@media (min-width: 1024px) { .archive-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.archive-versions, .archive-forms { min-width: 0; }
/* the loading state: skeleton lines of the content's line height */
.archive-skeleton { height: 1.5em; margin: 0 0 4px; border-radius: 4px; background: var(--hairline); }
/* a version is a plain list row with a hairline under it */
.archive-version { padding: 8px 0; border-bottom: 1px solid var(--hairline); min-width: 0; }
.archive-version-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.archive-version-title { font-weight: 600; min-width: 0; }
/* the state of a version: a word in an outline, danger text on paper for retrying, conflict and failed */
.archive-state { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--s-2); border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; color: var(--ink); border: 1px solid var(--ink-2); }
.archive-state-ink { border-color: transparent; }
.archive-state-danger { color: var(--danger); background: var(--paper); border-color: currentColor; }
.archive-line { margin: 2px 0; }
.archive-reason { white-space: pre-wrap; }
/* hashes and version ids whole, selectable, wrapping anywhere, in tabular figures of the page's own face */
.archive-hex { font-size: 0.875rem; font-variant-numeric: tabular-nums; letter-spacing: .02em;
  overflow-wrap: anywhere; word-break: break-all; user-select: text; -webkit-user-select: text; }
.archive-files { list-style: none; margin: 4px 0 0; padding: 0; }
.archive-file { display: flex; flex-wrap: wrap; gap: 0 12px; padding: 4px 0; border-top: 1px solid var(--hairline); min-width: 0; }
.archive-file-main { min-width: 0; overflow-wrap: anywhere; }
.archive-files-toggle, .archive-stop { margin: 8px 0 0; }
.archive-stop-form { margin: 8px 0 0; }
/* the forms: each part after a hairline */
.archive-part { padding: 0 0 16px; min-width: 0; }
.archive-part + .archive-part { padding-top: 12px; border-top: 1px solid var(--hairline); }
.archive-part-title { margin: 0 0 4px; font-size: var(--step-0); font-weight: 600; }
.archive-field { margin: 8px 0; }
.archive-field input[type="text"], .archive-field textarea { width: 100%; }
.archive-file-input { width: 100%; min-height: 44px; }
.archive-send, .archive-download-room, .archive-download-button { margin: 4px 0 0; max-width: 100%; white-space: normal; }
/* the progress and status lines keep one line of height in every state */
.archive-progress, .archive-download-line { min-height: 1.5em; margin: 8px 0 0; }
.archive-check { display: flex; align-items: center; gap: var(--s-1); min-height: 44px; margin: 0; }
.archive-busy-line { display: flex; align-items: center; min-height: 44px; margin: 4px 0 0; }
.archive-confirm { margin: 8px 0 0; }
/* a confirmation's cancel and its action placed apart */
.archive-apart { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.archive-apart button { margin: 0; }
/* the delete section: a hairline and a 24 px gap above it; its button in danger text on paper with its word */
.archive-part.archive-delete { margin-top: 24px; }
.archive-delete button.danger:not(:disabled) { background: var(--paper); }
.archive-code-input { max-width: 12rem; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; }

/* S5: the download section under the filter row, its status line under the button and the list of deletions */
.slot-download { margin: 0 0 12px; }
.archive-download { padding: 0 0 12px; border-bottom: 1px solid var(--hairline); min-width: 0; overflow-wrap: anywhere; }
.archive-download-title { margin: 0 0 4px; font-size: var(--step-1); }
.archive-deletions { margin: 12px 0 0; }
.archive-deletions:empty { display: none; }

/* S1: the block is one grid cell that holds the lines shown and, invisible in the same place, the lines of working,
   retrying, conflict and failed; the block is as high as the tallest of them at its own width (in the narrow rail as
   on a phone), so a change between those states moves nothing below it. */
body.console-body .archive-block { display: grid; grid-template-columns: minmax(0, 1fr); }
body.console-body .archive-block > .archive-lines { grid-area: 1 / 1; min-width: 0; }
body.console-body .archive-block > .archive-reserve { visibility: hidden; }

/* S2: from 768 px, where the room's title and meta line share one column of the row, the chip stands at the end of
   the title's line on one line of its own height, and the title gives way to it (two lines at most); the meta line wraps
   below at the column's full width. No chip word changes the row's height. The slot stays at the end of the meta line
   in the document, so the row is read in the same order. */
@media (min-width: 768px) {
  .room-row .room-row-main { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; min-width: 0; }
  .room-row .room-row-title { order: -3; flex: 1 1 0; min-width: 0; white-space: normal; overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .room-row .room-row-main > .muted { display: contents; }
  .room-row .room-row-main [data-slot="archive-cell"] { order: -2; flex: none; display: inline-flex; white-space: nowrap; }
  .room-row .room-row-main::after { content: ""; order: -1; flex: 0 0 100%; height: 0; }
}

/* The admin's dashboard from 1024 px, where its rooms are a table in a column that scrolls under the band. */
@media (min-width: 1024px) {
  /* The message bar takes its own place under the scrolling column while it shows a message, so the column ends
     above the bar and a control scrolled into view never lies under it; a control brought into view stops 8 px
     above the column's bottom edge, so a fraction of a pixel of a row's position never reaches the bar. */
  main.admin-main ~ .op-bar { position: static; flex: none; }
  main.admin-main { scroll-padding-bottom: 8px; }
  /* A room code stays on one line in the first column, which is at least as wide as a code of six of the widest
     letters, so the letters of a code never give its row another line. */
  .dash-table .dash-code { white-space: nowrap; overflow-wrap: normal; min-width: 7.25rem; }
  /* The archive cell: the chip on its own line and the line of the stored version under it, a line that keeps its
     height when there is no version yet; the cell is as wide as the widest chip, so no state of a room's record
     widens the column or gives the row another line. */
  .dash-table .slot-cell { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 8.25rem;
    min-height: 3.125rem; }
}

/* ==========================================================================
   The staff pages' layout and the forms' messages
   ========================================================================== */
/* A refusal that concerns one field stands under that field, in the danger colour; an empty place takes no room */
.field-error { display: block; margin: var(--s-1) 0 0; color: var(--danger); font-weight: 600; font-size: var(--step--1); }
.field-error:empty { margin: 0; }

/* The choices of the room form (record class, household type, living arrangement, the calibration and module
   boxes) stand one under the other with one left edge; each radio or box is level with the first line of its own text
   (the line is 1.5em high, the box 1.2rem) */
body.touch-staff .room-form label.type-choice,
body.touch-staff .room-form label.inline { display: flex; align-items: flex-start; gap: var(--s-2); margin: var(--s-1) 0; }
body.touch-staff .room-form label.type-choice > input,
body.touch-staff .room-form label.inline > input { flex: none; margin: calc((1.5em - 1.2rem) / 2) 0 0; }

/* The room form is one column as wide as a field may be (45rem); its fields take that column's width, the
   seats box included; the panel around it is as wide as the form */
.room-form { grid-template-columns: minmax(0, 1fr); max-width: 45rem; }
.room-form .field input:not([type="checkbox"]):not([type="radio"]), .room-form .field select { width: 100%; }
.form-panel { max-width: calc(45rem + 2 * var(--s-5) + 2px); }

/* A select is as high as an input and a button beside it (its own line height made it 3 px taller) */
body.touch-staff select { height: 44px; }

/* The create form of the accounts: its fields' tops level (a hint under one field moves no other field); from
   600 px one grid whose rows are the labels, the fields, the hints and the messages, so both fields and the button
   share one top and one height */
.accounts-create { align-items: flex-start; }
@media (min-width: 600px) {
  .accounts-create { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 24rem) auto; column-gap: 16px;
    align-items: start; justify-content: start; }
  .accounts-create > .field { display: contents; }
  .accounts-create > .field > .field-label { grid-row: 2; margin: 0 0 var(--s-1); }
  .accounts-create > .field > input { grid-row: 3; }
  .accounts-create > .field > .hint { grid-row: 4; }
  .accounts-create > .field > .field-error { grid-row: 5; }
  .accounts-create > .field:nth-child(1 of .field) > * { grid-column: 1; }
  .accounts-create > .field:nth-child(2 of .field) > * { grid-column: 2; }
  .accounts-create > button { grid-row: 3; grid-column: 3; }
  .accounts-create > .step-up { grid-row: 1; grid-column: 1 / -1; }
}

/* On wide windows no text field or button stretches: a field at most 45rem, a text area at most 56.25rem, a
   button at most 37.5rem; the admin's two tabs as wide as their texts; a table as wide as its content needs */
body.console-body input:not([type="checkbox"]):not([type="radio"]), body.console-body select { max-width: min(100%, 45rem); }
body.console-body textarea { max-width: min(100%, 56.25rem); }
body.console-body button, main.check-page button { max-width: min(100%, 37.5rem); }
body.console-body .admin-tabs .tab { flex: none; }
.accounts-table, .dash-table { width: auto; max-width: 100%; }
/* the accounts' table keeps a reading width (its names wrap between words); an account's actions and a room's action
   row do not widen their table */
.accounts-table { max-width: min(100%, 64rem); }
.account-actions { max-width: 64rem; }
.dash-table .dash-manage { max-width: 70rem; }

/* A control in a row of a table stands level with the row's first text line: its cell gives up the padding
   that the control's own height takes (44 px = the 24 px line and the 10 px paddings) */
.accounts-table td.account-manage-cell, .dash-table td.dash-manage-cell { padding-top: 0; padding-bottom: 0; }
/* with a mouse (a fine pointer) a control in a table row, in the header band or in a seat's row is one 2rem line high
   and its cell keeps 6 px above and below, so its centre and the row's first text line meet; a touch layout keeps its
   44 px targets */
@media (pointer: fine) {
  body.touch-staff .accounts-table .account-manage, body.touch-staff .dash-table .dash-manage-btn,
  body.touch-staff .bar .account-line button, body.touch-staff table.seats td.actions button {
    min-height: 2rem; padding-top: 0; padding-bottom: 0; }
  .accounts-table td.account-manage-cell, .dash-table td.dash-manage-cell { padding-top: 6px; padding-bottom: 6px; }
}
/* the header band: the account line and its sign-out on one centred line on every staff page */
.bar .account-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.bar .account-line button { margin: 0; }

/* No word, name, account id or room code is broken in the middle: a cell or a line of a room breaks between
   words only (a word longer than its whole line still breaks), and an action's word never breaks */
.accounts-table td, .dash-table td, .dash-title, .dash-line { overflow-wrap: break-word; }
.account-manage, .dash-manage-btn { white-space: nowrap; }

/* The dashboard. Its head line (the connection and the pre-create button) and its filters each one line from
   740 px (a 768 px window less a scroll bar); the download block's lines in the small size, its button beside them, so
   that the filters and the block take at most a third of the window */
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 4px; }
.dash-head .dash-conn { margin: 0; }
.dash-head .dash-precreate { margin: 0; }
@media (min-width: 740px) {
  .dash-filters { margin: 0 0 8px; }
  .dash-filters .dash-filter select { max-width: 15rem; }
  .slot-download { margin: 0 0 8px; }
  .archive-download { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start;
    padding-bottom: 8px; }
  .archive-download .archive-download-title { font-size: var(--step-0); }
  .archive-download > * { grid-column: 1; }
  .archive-download > .archive-download-button { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .archive-download .archive-download-facts { display: flex; flex-wrap: wrap; column-gap: 16px; }
  .archive-download .archive-line { margin: 0; font-size: var(--step--1); }
  .archive-download .archive-download-line { grid-column: 1 / -1; margin: 4px 0 0; font-size: var(--step--1); }
}
/* a room under 1600 px is a compact row: its code, title (two lines at most) and class on the first line; its owner and
   status, then its facts and record, on the next; [manage] at the right. The record keeps the width of its widest chip
   and the line of its stored version (12.5rem) on its line, so no state of the record wraps the facts before it */
@media (min-width: 1024px) {
  .dash-row { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) auto; grid-template-areas: "a a m" "b c m";
    column-gap: 16px; row-gap: 4px; align-items: start; }
  .dash-row > .dash-line:nth-child(1) { grid-area: a; flex-wrap: nowrap; }
  .dash-row > .dash-line:nth-child(2) { grid-area: b; }
  .dash-row > .dash-line:nth-child(3) { grid-area: c; }
  .dash-row > .dash-manage-btn { grid-area: m; }
  .dash-row .dash-link { flex: 1 1 auto; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 12px; min-width: 0; }
  .dash-row .dash-line .class-chip { flex: none; }
  .dash-row .slot-cell { flex: none; min-width: 12.5rem; min-height: 28px; }
}
/* with a mouse the compact row's link and [manage] are one line high, as the controls of a table row */
@media (min-width: 1024px) and (pointer: fine) {
  .dash-row .dash-link { min-height: 2rem; }
  body.touch-staff .dash-row .dash-manage-btn { min-height: 2rem; padding-top: 0; padding-bottom: 0; }
}
/* a long room title: in the compact row two lines at most, its full text the link's title; in the table (from 1600 px)
   whole, in a column of 16rem; the other lines of a cell at most 8rem wide (they break between words), the cells 8 px
   apart, so that the ten columns stay inside 85 per cent of the window */
/* Below 768 px the compact row shows the whole title (a touch screen shows no title attribute) */
@media (min-width: 768px) {
  .dash-row .dash-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
}
.dash-table .dash-link { max-width: 16rem; }
.dash-table .cell-main, .dash-table .cell-sub { max-width: 8rem; }
.dash-table th, .dash-table td { padding-left: 8px; padding-right: 8px; }
.dash-table td:first-child a.dash-link { align-items: flex-start; }

/* My groups: the list starts right under the new-room button whatever its length (a long title takes two
   lines at most in the room row from 768 px, above; its full text is the row's title) */
main.my-groups { align-content: start; row-gap: var(--s-4); }
.my-groups-list > section:first-child > h2 { margin-top: 0; }

/* The room page's top bar and band line: the phase pill and the round title keep a line as high as their
   glyphs, and the band's text keeps room for them inside its clipping box */
body.console-body .topbar-phase { line-height: 1.7; }
body.console-body .band-text, body.console-body .band-first .offline-banner, body.console-body .band .private-banner > span {
  padding-top: 3px; padding-bottom: 3px; }
/* a long item text keeps the title column: the item's head does not wrap the text under its code */
.item-head { flex-wrap: nowrap; }
.item-head > .item-text { min-width: 0; }
/* From 1600 px the dashboard's table header sticks to the very top of the scrolling
   column, over its 16 px padding, so no part of a scrolled row shows above it; at the column's top it stands where it
   always stood */
main.admin-main .dash-table th { top: -16px; }
/* In the accounts' table the role, the account's status and the last sign-in keep each phrase on one line; the
   name's cell takes the wrapping (between words) */
.accounts-table td:nth-child(3), .accounts-table td:nth-child(4), .accounts-table td.account-time { white-space: nowrap; }
/* The create form of the accounts from 1024 px: the id's column as wide as its hint, the hint on one line, and a
   refusal under a field running from that field's left edge to the form's right edge */
@media (min-width: 1024px) {
  .accounts-create { grid-template-columns: auto minmax(0, 24rem) auto; }
  .accounts-create > .field:nth-child(1 of .field) > .hint { white-space: nowrap; }
  .accounts-create > .field:nth-child(1 of .field) > .field-error { grid-column: 1 / -1; }
  .accounts-create > .field:nth-child(2 of .field) > .field-error { grid-column: 2 / -1; }
}

/* ==========================================================================
   Release 6.2: the decision sheet, the class colours of the staff pages, the proposals in the fewest buttons
   ========================================================================== */
.class-tag { display: inline-block; border-radius: 999px; padding: 0 10px; font-size: 0.875rem; font-weight: 700; color: #fff; }
.class-tag.cls-all_must, .class-phrase.cls-all_must { background: var(--cls-all_must); }
.class-tag.cls-all_nice, .class-phrase.cls-all_nice { background: var(--cls-all_nice); }
.class-tag.cls-mixed, .class-phrase.cls-mixed { background: var(--cls-mixed); }
.class-tag.cls-incomplete, .class-phrase.cls-incomplete { background: var(--cls-incomplete); }
.class-phrase.cls-all_must, .class-phrase.cls-all_nice, .class-phrase.cls-mixed, .class-phrase.cls-incomplete,
.class-phrase.discussion.cls-mixed, .class-phrase.discussion.cls-incomplete {
  color: #fff; font-weight: 700; border: 0; border-radius: 999px; padding: 0 10px; }
.decision-sheet { display: flex; flex-direction: column; gap: 16px; }
.sheet-sec h3 { margin: 0 0 8px; font-size: 1.0625rem; }
.sheet-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sheet-item { border-left: 6px solid var(--hairline); border-radius: 6px; padding: 6px 10px; background: var(--surface); }
.sheet-item.cls-all_must { border-left-color: var(--cls-all_must); background: var(--cls-all_must-bg); }
.sheet-item.cls-all_nice { border-left-color: var(--cls-all_nice); background: var(--cls-all_nice-bg); }
.sheet-item.cls-mixed { border-left-color: var(--cls-mixed); background: var(--cls-mixed-bg); }
.sheet-item.cls-incomplete { border-left-color: var(--cls-incomplete); background: var(--cls-incomplete-bg); }
.sheet-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sheet-item-text { flex: 1 1 14ch; min-width: 0; font-weight: 600; color: var(--ink); }
.sheet-members { font-weight: 400; color: var(--ink-2); }
.sheet-taps { display: inline-flex; gap: 6px; }
.sheet-taps .tap { min-height: 44px; min-width: 76px; }
.sheet-result { display: inline-flex; align-items: center; gap: 6px; }
.sheet-members-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.sheet-members-pick .hint { flex-basis: 100%; margin: 0; }
.sheet-members-pick button[aria-pressed="true"], .member-out button.chosen { background: var(--shell); color: var(--shell-ink); }
.sheet-count { font-weight: 700; margin: 0 0 8px; }
.sheet-timeout .confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sheet-timeout .confirm p { flex-basis: 100%; margin: 0; }
button.link-like { background: none; border: 0; text-decoration: underline; color: var(--shell); min-height: 36px; padding: 0 6px; }
.done-missing { flex-basis: 100%; margin: 6px 0 0; font-weight: 700; }
.more-moves { display: inline-block; }
.more-moves > summary { cursor: pointer; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; }
.more-moves[open] { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.group-done { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.group-done-line { margin: 0; font-weight: 600; }
.ai-texts .member-tick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.member-out { display: inline-flex; gap: 6px; margin-left: 12px; }
.proposal-controls.two { display: flex; flex-wrap: wrap; gap: 8px; }
/* the sheet of the big-screen view covers the screen above the dock (release 6.2) */
.qd { bottom: var(--dock-total); max-height: none; padding-bottom: 24px; }
.qd.qd-tall { max-height: none; }
.qd > .decision-sheet { flex: none; }

/* ==========================================================================
   The grouping helper and the notes on proposals
   ========================================================================== */
/* The helper's block of the proposals tab: its lines one spacing apart, its press as wide as its text; the label of
   each suggestion of the system (and the mark of a proposal with a note); the texts of a group as a short list, each
   proposal's note and its trigram suggestion on lines of their own; the buttons of a group on one line. A group is a
   row of the proposals' list (.proposal) and takes its rules. */
.ai-box { display: grid; gap: var(--s-2); margin: var(--s-3) 0; }
.ai-box > button { justify-self: start; }
.ai-badge { display: inline-block; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.ai-texts { margin: var(--s-1) 0; padding-left: 1.2rem; }
.ai-texts .ai-note { display: block; }
.ai-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
/* A proposal's note: its label, the field, the line of characters left and the save button, one under the other */
.note-box { display: grid; gap: var(--s-1); margin-top: var(--s-2); }
.note-box > button { justify-self: start; }

/* ==========================================================================
   The leftovers of the pages' layout
   ========================================================================== */
/* The room's class line and its button on one line, centred on each other;
   with a mouse (a fine pointer) the button is one 2rem line high, the height of its line, at every width, as the seat
   buttons are (the rule "with a mouse (a fine pointer) a control in a table row ..." above); touch layouts keep 44 px */
.dash-manage .dash-class { align-items: center; }
@media (pointer: fine) {
  body.touch-staff .dash-manage .dash-class > button { min-height: 2rem; padding-top: 0; padding-bottom: 0; }
}

/* The check box of the owner change's confirmation level with the first line of its text */
body.touch-staff .dash-reassign label.inline { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; }
body.touch-staff .dash-reassign label.inline > input { flex: none; margin: calc((1.5em - 1.2rem) / 2) 0 0; }
/* Every other radio and check box of the staff pages that stands in its own label (the decision form's choices
   and members, the items without objection and their confirmation in the room and in the quick decisions, the end
   flow's ticks, the record panel's boxes) is level with the first line of its own text when that text wraps: the
   label is a grid of the box and its text, the box at the top of the text's first line (the line is 1.5em high, the
   box 1.2rem), and a text of one line still stands centred in the label's 44 px. The labels that a rule of their own
   lays out (the room form, the owner change, the class choices, the end states) keep their flex row; the box's top
   margin is the same there. */
body.touch-staff label:has(> input[type="radio"]),
body.touch-staff label:has(> input[type="checkbox"]) { display: inline-grid; grid-template-columns: auto minmax(0, 1fr);
  align-content: center; align-items: start; }
body.touch-staff label > input[type="radio"],
body.touch-staff label > input[type="checkbox"] { margin-top: calc((1.5em - 1.2rem) / 2); }
/* the quick decisions also stand on the Display view, whose page is of class touch-staff only when the room app opened
   on its control view first: there the same grid and box */
.qd-bulk label:has(> input[type="checkbox"]) { display: inline-grid; grid-template-columns: auto minmax(0, 1fr);
  align-content: center; align-items: start; }
.qd-bulk label > input[type="checkbox"] { margin-top: calc((1.5em - 1.2rem) / 2); }

/* A hash or a version id of the record panel and of its file rows is never broken inside itself: it
   stands whole on one line where it fits (the versions take the wider column of the record panel from 1024 px); where
   it does not, and for a file's hash always (as before), the page shows its first 12 characters and a mark "…"
   (admin-archive.js, fitHex). The rest stays in the element's text, clipped to no width, and the value's title holds
   it whole; a click or a long press on the value selects the whole value (user-select: all), and a copy of a
   selection that holds it takes it whole (admin-archive.js, copyWhole). A file row breaks only between its parts. */
.hex-value { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; overflow-wrap: normal;
  word-break: normal; vertical-align: bottom; -webkit-user-select: all; user-select: all; }
.hex-value.hex-short > .hex-rest { display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; }
.hex-value.hex-short::after { content: "\2026"; }
@media (min-width: 1024px) { .archive-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }

/* The controls of a seat's row one under the other with one left edge; the void, the dangerous one, set apart
   by a gap above it */
table.seats td.actions, table.seats td.actions:has(.confirm) { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; }
table.seats td.actions > button.danger { margin-left: 0; margin-top: var(--s-2); }
table.seats td.actions > .confirm { align-self: stretch; }

/* The manage row of a room: its actions in a grid of equal cells, as many to a line as the width holds
   (the action groups are not boxes of their own), every question, the step-up panel, the class part, the end reason
   and the record panel on full lines of their own under the action that opened them */
.dash-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); align-items: center; }
.dash-manage > .dash-part:not(.dash-class):not(.dash-reason) { display: contents; }
.dash-manage > .dash-part > a.button-link { justify-content: center; }
.dash-manage > .dash-class, .dash-manage > .dash-reason, .dash-manage > .slot-room, .dash-manage .dash-confirm,
.dash-manage .dash-reassign, .dash-manage .step-up, .dash-manage .dash-in-control { grid-column: 1 / -1; }

/* The owner change reads as one unit: the label over its select, then the confirmation beside the save
   button (with no confirmation, the save button beside the select). flex-wrap: nowrap changes nothing drawn (the box
   is a grid now); it ends the wrap of the earlier flex rule (.dash-reassign, above), which the layout instrument's
   kind 7 reads to measure a row of controls that wraps, a measure that does not apply to a grid */
.dash-reassign { display: grid; grid-template-columns: minmax(0, max-content) auto; align-items: end; gap: 8px 16px;
  max-width: 45rem; flex-wrap: nowrap; }
.dash-reassign > .field { grid-column: 1 / -1; }
.dash-reassign:not(:has(> label.inline)) > .field { grid-column: auto; }
.dash-reassign > label.inline { align-self: center; }

/* The set-up page in the sign-in page's reading width, its notice centred in it */
.setup-column { max-width: 28rem; }
.setup-column > [data-testid="setup-no-link"] { text-align: center; }

/* The account rows of the list below 1024 px one gap apart, the step-up panel keeping its own margin */
.accounts-rows { display: flex; flex-direction: column; row-gap: var(--s-2); }

/* A name that cannot fit its cell breaks inside the name's cell, so the accounts table never grows wider than
   its column; names that fit keep every word whole */
.accounts-table td:nth-child(2) { overflow-wrap: anywhere; }

/* The participant's household line shows whole while the phone waits; while the round is voting it is two lines
   at most (the household type whole), its toggle still opening the rest */
body.phone-body .family-phone:not([open]) .summary-text { white-space: normal; overflow: visible; text-overflow: clip; }
body.phone-body:has([data-testid="phone-phase"][data-phase="voting"]) .family-phone:not([open]) .summary-text {
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* A break that the page puts between two chips of the list of rounds (to even its lines) is a flex line of
   its own, 0 px high, with the list's 8 px row gap on each side of it; every chip after a break rises by one row gap
   (its line is that much lower), so that balanced lines stand one row gap (8 px) apart, as the lines of the wrap do,
   and the list is as high as a wrap of the same lines */
.round-list > .round-break { flex-basis: 100%; height: 0; margin: 0; }
.round-list > .round-break ~ .round-chip { margin-top: -8px; }
/* The panels of the console's main column one spacing apart everywhere (their hairline, no gap): the list of
   rounds keeps its select's margin inside its own panel, so that margin does not open a gap after it below 768 px */
main.console > .panel.rounds-panel { display: flow-root; }

