/* Lists: library, one list, editor, share code, results, scanner, streamer mode.
   Colours and sizes come from tokens.css; app.css has the shared parts (sheets, rows, dots). */

/* Header while a list plays: "N of M" instead of the icons */
.nav-start { display: flex; gap: 4px; }
.top { position: relative; }
#ask.in-list .nav-start, #ask.in-list #btn-settings { visibility: hidden; }
.list-progress {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.list-progress.on-verdict { position: static; transform: none; flex: none; margin-top: 8px; }
.segs { display: flex; gap: 3px; width: var(--progress-w, 220px); }
@media (max-width: 427.98px) { .segs { --progress-w: 180px; } }
.seg { flex: 1; height: 5px; border-radius: 3px; background: var(--ring-track); }
.seg.current { background: var(--ink); }
.seg.yes { background: var(--yes); }
.seg.no { background: var(--no); }
.seg.abstain { background: #9499A2; }
.segs.thin { height: 4px; border-radius: 2px; background: var(--ring-track); overflow: hidden; }
.seg-fill { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.seg-label { font-size: calc(13rem / 17); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.on-verdict .seg { background: rgba(255, 255, 255, 0.3); }
.on-verdict .seg.yes, .on-verdict .seg.no, .on-verdict .seg.abstain { background: rgba(255, 255, 255, 0.72); }
.on-verdict .seg.current { background: #fff; }
.on-verdict .segs.thin { background: rgba(255, 255, 255, 0.3); }
.on-verdict .seg-fill { background: #fff; }
.on-verdict .seg-label { color: #fff; }
.result.between .link-btn { display: none; }

/* Sheet bars and buttons */
.glass.primary { background: var(--ink); color: var(--background); box-shadow: none; }
.glass:disabled { opacity: 0.4; }
.big-pill {
  min-height: 54px; padding: 0 26px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 1rem; font-weight: 700; white-space: nowrap;
}
.big-pill svg { flex: none; width: 18px; height: 18px; stroke-width: 2.3; }
.big-pill.primary { background: var(--ink); color: var(--background); }
.big-pill.secondary { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.big-pill.secondary.danger { color: var(--danger); }
.big-pill.small { min-height: 46px; font-size: calc(16rem / 17); }
.big-pill:disabled { opacity: 0.4; cursor: default; }
.big-pill:not(:disabled):active { transform: scale(0.98); }
.footnote.center { text-align: center; }
.footnote.warn { color: var(--warning-text); font-weight: 600; }

/* Library: rows that open their list show a chevron (iOS disclosure indicator); Edit shows a delete
   control at the start of each row instead. Right-click and long-press open the row's menu. */
.lists-body { position: relative; }
.lists-group { margin-top: 4px; }
.list-row { position: relative; display: flex; align-items: center; }
.list-row + .list-row::before { content: ""; position: absolute; top: 0; inset-inline-start: 20px; inset-inline-end: 16px; height: 1px; background: var(--line); }
.list-row:has(> .list-open:active), .list-row.menu-open { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.list-open { flex: 1; min-width: 0; min-height: 68px; padding: 12px 0; padding-inline: 20px 16px; display: flex; align-items: center; gap: 12px; text-align: start; }
.list-row.editing .list-open { padding-inline-start: 0; }
.list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.list-name { font-size: 1rem; line-height: max(1.3, var(--lh)); font-weight: 400; overflow-wrap: anywhere; }
.list-meta { font-size: calc(13rem / 17); line-height: 1.35; color: var(--muted); }
.chevron { flex: none; width: calc(14rem / 17); height: calc(14rem / 17); color: var(--muted); stroke-width: 3; }
[dir="rtl"] .chevron { transform: scaleX(-1); }
@media (hover: hover) { .list-open:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); } }
/* Edit mode: the red minus (24 visual, 44 to tap) – deleting still asks first */
.list-del { flex: none; width: 44px; height: 44px; margin-inline: 8px 2px; border-radius: 50%; display: grid; place-items: center; }
.list-del svg { width: 24px; height: 24px; stroke: none; }
.list-del .del-disc { fill: var(--danger); }
.list-del .del-bar { fill: #fff; }

/* ⋯ menus (lists.manage.menu): label first, icon at the end, a 6 pt gap before Delete, a light dim behind */
:root { --menu-dim: #00000012; }
@media (prefers-color-scheme: dark) { :root { --menu-dim: #00000047; } }
.sheet-panel:has(.more-menu) { position: relative; }
.sheet-panel:has(.more-menu)::after { content: ""; position: absolute; inset: 0; z-index: 4; background: var(--menu-dim); pointer-events: none; animation: fade 0.15s ease-out; }
.more-menu { inset-inline-start: auto; width: 250px; min-width: 0; padding: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22); }
@media (min-width: 700px) { .more-menu { width: 260px; } }
.more-menu button { justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 18px; border-radius: 0; font-size: 1rem; font-weight: 500; }
.more-menu button + button { border-top: 1px solid var(--line); }
.more-menu button.danger { border-top: 6px solid var(--background); }
.more-menu button:hover, .more-menu button:focus-visible { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.more-menu button svg { order: 1; width: 19px; height: 19px; stroke-width: 1.9; }
.more-menu button:disabled { opacity: 0.4; }
#list-more svg { width: 20px; height: 20px; }
#list-more[aria-expanded="true"] { background: var(--ring-track); }
.lists-empty { gap: 12px; }
.lists-empty .empty-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }

/* One list */
.eyebrow { margin: 10px 4px 0; font-size: calc(15rem / 17); font-weight: 700; color: var(--accent); }
.list-title { margin-bottom: 4px; overflow-wrap: anywhere; }
.list-detail-meta { margin: 0 4px 16px; font-size: calc(15rem / 17); line-height: 1.4; color: var(--muted); }
.q-list { list-style: none; margin: 0; padding: 0; }
.q-list li { position: relative; display: flex; gap: 12px; padding: 12px 20px; font-size: calc(16rem / 17); line-height: max(1.35, var(--lh)); }
.q-list li + li::before { content: ""; position: absolute; top: 0; inset-inline-start: 50px; inset-inline-end: 20px; height: 1px; background: var(--line); }
.q-n { flex: none; min-width: 18px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.q-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* One field filling its group: the group doesn't clip, so the browser's focus ring shows around it */
.who-group { margin-top: 16px; overflow: visible; }
.who { width: 100%; min-height: 54px; padding: 0 20px; border: 0; border-radius: inherit; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; }
.who::placeholder { color: var(--placeholder); opacity: 1; }
.list-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.list-actions .text-btn { align-self: center; }
.list-actions + .terms-line { margin: 14px 4px 0; } /* a shared list on a device that hasn't accepted the terms */

/* Editor */
.ed-name-group { margin-top: 6px; overflow: visible; }
.ed-name { width: 100%; padding: 16px 20px; border: 0; border-radius: inherit; background: transparent; color: var(--ink); font: inherit; font-size: calc(26rem / 17); font-weight: 800; }
.ed-name::placeholder, .ed-row textarea::placeholder { color: var(--placeholder); opacity: 1; }
.ed-head { display: flex; justify-content: space-between; margin: 22px 20px 8px; font-size: calc(15rem / 17); font-weight: 700; color: var(--muted); }
.ed-count { font-variant-numeric: tabular-nums; }
.ed-questions { margin-top: 0; }
.ed-row { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 6px 10px 6px 16px; background: var(--card); }
.ed-row + .ed-row::before { content: ""; position: absolute; top: 0; inset-inline-start: 46px; inset-inline-end: 10px; height: 1px; background: var(--line); }
/* The row being edited gets a light accent tint – no ring, so nothing to clip at the group's corners */
.ed-row:focus-within { background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.ed-row:focus-within + .ed-row::before, .ed-row:focus-within::before { display: none; }
.ed-row.dragging { z-index: 2; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); border-radius: 16px; }
.ed-n { flex: none; min-width: 20px; padding-top: 9px; font-size: calc(14rem / 17); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ed-row textarea {
  flex: 1; min-width: 0; margin: 0; padding: 8px 0; border: 0; resize: none; overflow: hidden;
  background: transparent; color: var(--ink); font: inherit; font-size: calc(16rem / 17); line-height: max(1.35, var(--lh));
  overflow-wrap: anywhere;
}
.ed-counter { flex: none; align-self: flex-end; padding-bottom: 10px; font-size: calc(12rem / 17); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.ed-del { position: relative; flex: none; width: 30px; height: 30px; margin-top: 4px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); visibility: hidden; }
.ed-del svg { width: 16px; height: 16px; stroke-width: 2.4; }
.ed-row:focus-within .ed-del { visibility: visible; }
@media (hover: hover) { .ed-row:hover .ed-del { visibility: visible; } .ed-del:hover { background: var(--background); color: var(--danger); } }
.ed-handle { position: relative; flex: none; width: 30px; height: 38px; margin-inline-start: 4px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); cursor: grab; touch-action: none; }
.ed-handle svg { width: 18px; height: 18px; stroke-width: 2.2; }
.ed-handle[aria-expanded="true"] { background: var(--ring-track); }
/* ✕ and the handle: 30 px to see, 44 px to tap */
.ed-del::after, .ed-handle::after { content: ""; position: absolute; inset: -7px; }
.ed-handle::after { inset: -3px -7px; }
#editor-body { position: relative; } /* holds the handle's Move up / Move down menu */
.ed-add { position: relative; width: 100%; min-height: 52px; padding: 0 20px; display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: calc(16rem / 17); font-weight: 700; }
.ed-add::before { content: ""; position: absolute; top: 0; inset-inline-start: 46px; inset-inline-end: 20px; height: 1px; background: var(--line); }
.ed-add svg { width: 18px; height: 18px; stroke-width: 2.4; }
.ed-add:disabled { opacity: 0.4; }
.ed-capacity { flex: none; padding: 12px 20px calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid var(--line); background: var(--background); }
.cap-bar { position: relative; height: 8px; border-radius: 4px; background: var(--ring-track); }
.cap-fill { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 0; border-radius: 4px; background: var(--ink); transition: width 0.2s; }
.cap-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-inline-start: -1px; background: var(--muted); border-radius: 1px; }
.ed-capacity.warn .cap-fill { background: var(--warning); }
.cap-text { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: min(calc(13rem / 17), calc(13px * 23 / 17)); } /* a bottom bar: grows up to xxxLarge */
.cap-label { font-weight: 700; }
.cap-sub { color: var(--muted); text-align: end; }
.ed-capacity.over .cap-label { color: var(--warning-text); }

/* Share list: the code is always dark on white */
.share { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 6px 4px 10px; text-align: center; }
.qr-card { flex: none; width: min(100%, 340px); padding: 12px; border-radius: var(--radius-group); background: #fff; }
@media (max-height: 719.98px) { .qr-card { width: min(100%, 250px); } }
.qr-card svg { display: block; width: 100%; height: auto; stroke: none; }
.share-head { align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 520px; text-align: start; }
.share-info { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 520px; }
.share-name { margin: 0; font-family: var(--font-title); font-size: var(--type-sheet-title); line-height: max(1.15, var(--lh)); font-weight: var(--weight-sheet-title); overflow-wrap: anywhere; }
.share-meta { margin: 0; font-size: calc(15rem / 17); color: var(--muted); }
.share-texts { display: flex; flex-direction: column; gap: 4px; }
.share-texts strong { font-size: 1rem; }
.share-texts span { font-size: calc(14rem / 17); line-height: 1.4; color: var(--muted); }
.chat-note { margin: 0; color: var(--muted); font-size: calc(13rem / 17); line-height: 1.4; font-weight: 700; }
.share-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.share-actions .big-pill { flex: 1 1 150px; max-width: 260px; }

/* Results: what you see is the shared card */
.res { display: grid; gap: 14px; padding: calc(env(safe-area-inset-top) + 20px) 0 10px; }
.res-summary { display: flex; flex-direction: column; gap: 6px; }
.res-date { display: flex; align-items: center; gap: 8px; font-size: calc(14rem / 17); font-weight: 700; color: var(--muted); }
.mini-mark { width: 22px; height: 22px; overflow: visible; }
.mini-mark .mark-ring { stroke-width: 9; }
.mini-mark .half-yes { fill: var(--yes-top); stroke: none; }
.mini-mark .half-no { fill: var(--no-top); stroke: none; }
.res-title { margin: 0 0 4px; font-family: var(--font-title); font-size: var(--type-sheet-title); line-height: max(1.15, var(--lh)); font-weight: var(--weight-sheet-title); overflow-wrap: anywhere; }
.res-by { margin: 0; font-size: 1rem; color: var(--muted); }
.res-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 10px; border-radius: var(--radius-group); background: var(--card); min-width: 0; }
.tile-top { display: flex; align-items: center; gap: 6px; }
.tile-top b { font-size: calc(30rem / 17); line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile .dot { width: calc(12rem / 17); height: calc(12rem / 17); margin: 0; }
.tile-label { font-size: calc(13rem / 17); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.yes .tile-label { color: var(--yes-text); }
.tile.no .tile-label { color: var(--no-text); }
.tile.abstain .tile-label { color: var(--abstain-text); }
.res-rows { margin-top: 4px; }
.res-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 16px; }
.res-row + .res-row::before { content: ""; position: absolute; top: 0; inset-inline-start: calc(26px + 10rem / 17); inset-inline-end: 16px; height: 1px; background: var(--line); }
.res-row .dot { align-self: flex-start; margin: calc(16rem / 17 * max(1.3, var(--lh)) / 2 - 5rem / 17) 0 0; } /* on the first line, as History's */
.res-q { flex: 1; min-width: 0; font-size: calc(16rem / 17); line-height: max(1.3, var(--lh)); font-weight: 400; overflow-wrap: anywhere; }
.res-time { flex: none; font-size: calc(13rem / 17); font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
/* A round from a result link: the other answer under each question */
.res-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-main, .res-main + .res-time { align-self: baseline; } /* the time on the question's line */
.res-other { display: flex; align-items: center; gap: 6px; font-size: calc(13rem / 17); font-weight: 500; color: var(--muted); }
.res-row .res-other .dot { align-self: center; width: calc(8rem / 17); height: calc(8rem / 17); margin: 0; }
.res-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.res-actions .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.res-actions .pair .big-pill { padding: 0 18px; }
/* lists.js measures the label: cut, not spilled (with room above and below for tall scripts) */
.res-actions .pair .big-pill span { min-width: 0; padding-block: 6px; overflow: hidden; text-overflow: ellipsis; }
.res-actions.stack .pair { grid-template-columns: minmax(0, 1fr); }
.res-actions .text-btn { align-self: center; }

/* Wide windows: share list and results side by side in a wider panel */
@media (min-width: 1000px) {
  .wide-panel .sheet-panel { width: min(1080px, 100%); height: auto; max-height: min(var(--sheet-max-height), calc(100dvh - 80px)); }
  .share { display: grid; grid-template-columns: auto minmax(0, 460px); grid-template-areas: "card head" "card info"; align-content: center; justify-content: center; column-gap: 56px; row-gap: 22px; text-align: start; padding: 10px 20px 30px; }
  .share .qr-card { grid-area: card; align-self: center; width: min(46vh, 460px); padding: 18px; }
  .share-head { grid-area: head; align-self: end; align-items: flex-start; }
  .share-info { grid-area: info; align-self: start; align-items: flex-start; max-width: 460px; }
  .share-meta { font-size: calc(18rem / 17); }
  .share-actions { justify-content: flex-start; }
  .res { grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); grid-template-areas: "summary rows" "actions rows"; align-content: start; column-gap: 32px; padding: 30px 16px 16px; }
  .res-summary { grid-area: summary; }
  .res-rows { grid-area: rows; margin-top: 0; align-self: start; }
  .res-actions { grid-area: actions; align-self: start; }
}

/* Scanner */
.scanner .sheet-panel { position: relative; background: #000; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .sheet-bar { z-index: 1; }
.scan-frame { position: absolute; left: 50%; top: 45%; width: min(70vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 32px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35); }
.scan-hint { position: absolute; left: 24px; right: 24px; bottom: calc(env(safe-area-inset-bottom) + 48px); margin: 0; text-align: center; font-size: 1rem; font-weight: 700; }

/* Alert: pills like the designer's alerts – grey, ink for the main action, red for Delete */
#alert .modal-actions { gap: 10px; justify-content: stretch; }
#alert .modal-actions .text-btn { flex: 1; min-height: 44px; padding: 6px 12px; border-radius: 999px; background: var(--fill); color: var(--ink); font-size: calc(16rem / 17); font-weight: 700; }
#alert .modal-actions .text-btn.strong { background: var(--ink); color: var(--background); }
#alert .modal-actions .text-btn.danger { background: var(--danger-fill); color: #fff; }
#alert .modal-card { padding-bottom: 18px; }
.alert-input { width: 100%; min-height: 46px; margin: 0 0 14px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--background); color: var(--ink); font: inherit; font-size: 1rem; }
.text-btn.strong { font-weight: 700; }
.modal-actions.single { justify-content: center; }

/* ---------- Streamer mode ----------
   A fixed 1920 × 1080 stage that scales to the window (OBS browser source or a second screen):
   big type, YES / NO beside the clock, no navigation. 1 --u = 1 px of the 1920 × 1080 design. */
html.stream { --u: min(calc(100vw / 1920), calc(100dvh / 1080)); background: #000; }
html.stream body { background: #000; }
html.stream #ask {
  width: calc(1920 * var(--u)); max-width: none; height: calc(1080 * var(--u)); min-height: 0;
  margin: calc((100dvh - 1080 * var(--u)) / 2) auto 0;
  padding: calc(56 * var(--u)) calc(110 * var(--u)) calc(70 * var(--u));
  gap: calc(28 * var(--u));
  background: var(--background);
  overflow: hidden;
  --arrangement: flank;
  --grid-cols: calc(440 * var(--u)) calc(520 * var(--u)) calc(440 * var(--u));
  --grid-cols-abs: calc(440 * var(--u)) calc(520 * var(--u)) calc(440 * var(--u));
  --grid-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  --grid-rows-abs: minmax(0, 1fr) auto auto minmax(0, 1fr);
  --grid-areas: ". . ." "yes clock no" ". . .";
  --grid-areas-abs: ". . ." "yes clock no" "yes abs no" ". . .";
  --grid-col-gap: calc(64 * var(--u));
  --grid-row-gap: calc(28 * var(--u));
  --abs-dir: row; --abs-gap: calc(12 * var(--u)); --abs-nudge: 0;
  /* While a question runs the clock is the biggest thing on the stage, the question second, YES and NO third. The
     ring takes the height left, as on a phone held sideways: the abstain button and a long question take room from it. */
  --ring-size: calc(520 * var(--u)); --ring-stroke: calc(30 * var(--u));
  --ring-cap: calc(100cqh - var(--pill) - var(--clock-gap) - 2 * var(--grid-row-gap));
  --stage-container: size; --stage-flex: 1 1 0px;
  --clock: calc(150 * var(--u)); --caption: calc(28 * var(--u)); --clock-gap: calc(24 * var(--u));
  --q: calc(56 * var(--u)); --q-pad-v: calc(8 * var(--u)); --q-pad-h: 0px; --q-radius: calc(32 * var(--u)); --q-max-w: calc(1500 * var(--u));
  --hint: calc(20 * var(--u)); --hint-gap: calc(10 * var(--u));
  --pill: calc(72 * var(--u)); --pill-font: calc(24 * var(--u)); --pill-min: calc(260 * var(--u)); --pill-pad-h: calc(36 * var(--u));
  --ans-radius: calc(48 * var(--u)); --sym-box: calc(120 * var(--u)); --label: calc(48 * var(--u));
  --abs-h: calc(132 * var(--u)); --abs-radius: calc(40 * var(--u)); --abs-sym-box: calc(56 * var(--u)); --abs-label: calc(26 * var(--u));
  --header: calc(56 * var(--u)); --k-ring: 1; --k-ans: 1; --k-stroke: 1;
  /* Derived again here: :root worked them out from its own sizes, and that is what #ask would inherit. */
  --ring-base: min(var(--ring-size), var(--ring-cap)); --ring-eff: calc(var(--ring-base) * var(--k-ring));
}
html.stream.with-abs #ask { --ring-cap: calc(100cqh - var(--pill) - var(--clock-gap) - var(--abs-h) - 3 * var(--grid-row-gap)); }
html.stream .top .nav-start, html.stream .top #btn-settings { visibility: hidden; }
html.stream .segs { --progress-w: calc(520 * var(--u)); gap: calc(5 * var(--u)); }
html.stream .seg { height: calc(8 * var(--u)); border-radius: calc(4 * var(--u)); }
html.stream .seg-label { font-size: calc(22 * var(--u)); }
html.stream .key { min-width: calc(44 * var(--u)); height: calc(44 * var(--u)); font-size: calc(20 * var(--u)); border-radius: calc(12 * var(--u)); padding: 0 calc(12 * var(--u)); }
html.stream .answer .key { margin-top: calc(24 * var(--u)); }
html.stream .result {
  inset: auto; left: calc((100vw - 1920 * var(--u)) / 2); top: calc((100dvh - 1080 * var(--u)) / 2);
  width: calc(1920 * var(--u)); height: calc(1080 * var(--u)); overflow: hidden;
  --r-icon: calc(220 * var(--u)); --r-icon-long: calc(180 * var(--u)); --r-title: calc(230 * var(--u)); --r-time: calc(110 * var(--u)); --r-q: calc(38 * var(--u));
  --r-detail: calc(30 * var(--u)); --r-gap: calc(28 * var(--u)); --r-pad: calc(120 * var(--u)); --r-bottom: calc(70 * var(--u));
  --r-max-w: calc(1400 * var(--u));
  --r-btn: calc(72 * var(--u)); --r-btn-font: calc(24 * var(--u)); --r-btn-max-w: calc(420 * var(--u)); /* Next question, as Start */
}
html.stream .result h1 { max-width: calc(1680 * var(--u)); }
/* The app's name, small and quiet in the stage's corner (Settings → Other screens): a frosted capsule, so the mark's
   halves show on the verdict's colour too. At the top, where Settings is on the screen at home – YES and NO reach down
   to the bottom. */
html.stream .stream-brand {
  position: fixed; z-index: 15;
  inset-inline-end: calc((100vw - 1920 * var(--u)) / 2 + 110 * var(--u));
  top: calc((100dvh - 1080 * var(--u)) / 2 + 54 * var(--u));
  display: flex; align-items: center; gap: calc(14 * var(--u));
  padding: calc(8 * var(--u)) calc(22 * var(--u)) calc(8 * var(--u)) calc(10 * var(--u));
  border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  color: var(--ink); font-size: calc(26 * var(--u)); font-weight: 600; pointer-events: none;
}
html.stream .stream-brand .mini-mark { width: calc(44 * var(--u)); height: calc(44 * var(--u)); }
html:not(.stream) .stream-brand { display: none; }
html.stream-results #list-results { background: #000; padding: 0; align-items: center; justify-content: center; }
html.stream-results #list-results .sheet-panel {
  width: calc(1920 * var(--u)); height: calc(1080 * var(--u)); max-width: none; max-height: none; border-radius: 0; box-shadow: none; flex: none; animation: none;
}
html.stream-results #results-body { padding: calc(80 * var(--u)) calc(110 * var(--u)); overflow: hidden; }
html.stream-results .res {
  height: 100%; padding: 0; grid-template-columns: calc(560 * var(--u)) minmax(0, 1fr); grid-template-areas: "summary rows" "actions rows";
  column-gap: calc(70 * var(--u)); row-gap: calc(30 * var(--u)); align-content: start;
}
html.stream-results .res-summary { grid-area: summary; gap: calc(10 * var(--u)); }
html.stream-results .res-rows { grid-area: rows; margin: 0; display: grid; grid-auto-rows: calc(min(66, 900 / var(--rows, 12)) * var(--u)); }
/* Only Done shows, with its Esc – the way out, as Stop is on the running screen. */
html.stream-results .res-actions { grid-area: actions; margin: 0; align-items: flex-start; }
html.stream-results .res-actions .pair { display: flex; }
html.stream-results .res-actions .big-pill:not(.res-done), html.stream-results .res-actions .pair:not(:has(.res-done)) { display: none; }
html.stream-results .res-actions .res-done { min-height: calc(72 * var(--u)); min-width: calc(260 * var(--u)); padding: 0 calc(36 * var(--u)); gap: calc(8 * var(--u)); font-size: calc(24 * var(--u)); }
html.stream-results .res-date { font-size: calc(26 * var(--u)); gap: calc(12 * var(--u)); }
html.stream-results .mini-mark { width: calc(36 * var(--u)); height: calc(36 * var(--u)); }
html.stream-results .res-title { margin-top: calc(4 * var(--u)); font-family: var(--font); font-size: calc(72 * var(--u)); font-weight: 800; } /* the big screen's own title, under the date */
html.stream-results .res-by { font-size: calc(30 * var(--u)); }
html.stream-results .res-tiles { gap: calc(16 * var(--u)); margin-top: calc(20 * var(--u)); }
html.stream-results .tile { padding: calc(18 * var(--u)); border-radius: calc(28 * var(--u)); }
html.stream-results .tile-top b { font-size: calc(64 * var(--u)); }
html.stream-results .tile .dot { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
html.stream-results .tile-label { font-size: calc(24 * var(--u)); }
html.stream-results .res-row { padding: 0 calc(24 * var(--u)); gap: calc(18 * var(--u)); }
html.stream-results .res-row .dot { align-self: center; width: calc(18 * var(--u)); height: calc(18 * var(--u)); margin: 0; }
html.stream-results .res-q { font-size: calc(min(30, 560 / var(--rows, 12)) * var(--u)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.stream-results .res-time { font-size: calc(min(26, 480 / var(--rows, 12)) * var(--u)); }
html.stream-results .res-row + .res-row::before { inset-inline-start: calc(60 * var(--u)); inset-inline-end: calc(24 * var(--u)); }
