@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/lato-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url("/fonts/lato-latin-900-normal.woff2") format("woff2"); }
/* ==========================================================================
   Aspen Template Manager — shared prototype theme  (issue #47, LOCKED)
   Brand source: goaspen.com Elementor kit (verified 2026-08-28)
     primary #00043A · secondary/accent #FFBC00 · text #000814 · Lato
   Locked by review feedback 2026-08-28:
     LIGHT = "Midnight" — navy shell, warm-stone neutrals, gold signals
     DARK  = "Graphite" — charcoal, amber signals, zero blue
     Styled scrollbars in both themes.
   Every prototype MUST inline this file verbatim before its own styles.
   Prototype-specific styles may ADD rules but never redefine these tokens.
   Load Lato via Google Fonts (allowed on the artifact CSP):
     https://fonts.googleapis.com/css2?family=Lato:wght@400;700;800;900&display=swap
   ========================================================================== */

/* ---- Design tokens: light = Midnight (default) ---- */
:root {
  /* Brand constants */
  --brand-navy: #00043A;
  --brand-gold: #FFBC00;
  --brand-gold-300: #FFD45A;
  --brand-ink: #000814;

  /* Surfaces & text (warm-stone neutrals — deliberately not blue-grey) */
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-sunken: #ECEAE3;
  --border: #DAD7CE;
  --border-strong: #A9A497;
  --text: #10121C;
  --text-secondary: #4C4F5C;
  --text-muted: #767A87;

  /* Interactive */
  --link: #274690;
  --focus-ring: #B98900;
  --selection-bg: #FFF3CC;

  /* Shell (navy in light / charcoal in dark) */
  --shell-bg: #00043A;
  --shell-bg-raised: #0A1150;
  --shell-border: #1B2260;
  --shell-text: #C9CDE8;
  --shell-text-active: #FFFFFF;
  --shell-marker: var(--brand-gold);

  /* Buttons */
  --btn-primary-bg: #00043A;  --btn-primary-fg: #FFFFFF;  --btn-primary-hover: #141B66;
  --btn-accent-bg: #FFBC00;   --btn-accent-fg: #000814;   --btn-accent-hover: #FFD45A;

  /* Matrix cells */
  --check: #8A6D00;
  --check-off: #C4C0B4;

  /* Scrollbars */
  --scrollbar-track: #ECEAE3;
  --scrollbar-thumb: #A9A497;
  --scrollbar-thumb-hover: #B98900;

  /* Status */
  --ok: #1E7B45;      --ok-bg: #E5F5EB;
  --warn: #9A6A00;    --warn-bg: #FFF4D6;
  --danger: #B42318;  --danger-bg: #FDEEEC;
  --draft: #5A5D66;   --draft-bg: #ECECEA;
  --published: #1E7B45; --published-bg: #E5F5EB;

  /* Typography */
  --font-sans: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Consolas", "SF Mono", ui-monospace, monospace;
  --fs-xs: 0.75rem;   /* 12 — table meta, badges */
  --fs-sm: 0.8125rem; /* 13 — dense table body */
  --fs-md: 0.875rem;  /* 14 — default UI */
  --fs-lg: 1rem;      /* 16 — section titles */
  --fs-xl: 1.25rem;   /* 20 — page titles */
  --fs-2xl: 1.5rem;   /* 24 — screen titles */

  /* Spacing (4px scale), radii */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --radius-sm: 4px; --radius-md: 6px; --radius-lg: 10px; --radius-pill: 999px;

  /* Layout */
  --shell-sidebar-w: 232px;
  --shell-topbar-h: 52px;
  --content-max-w: 1280px;
}

/* ---- Dark = Graphite ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121316; --surface: #1B1D21; --surface-sunken: #0C0D0F;
    --border: #33363C; --border-strong: #4C505A;
    --text: #ECEAE4; --text-secondary: #B3B2AA; --text-muted: #83837C;
    --link: #FFCF40; --focus-ring: #FFBC00; --selection-bg: #3A3010;
    --shell-bg: #0C0D0F; --shell-bg-raised: #1B1D21; --shell-border: #26282D;
    --shell-text: #B9BAB2; --shell-text-active: #FFFFFF;
    --btn-primary-bg: #ECEAE4; --btn-primary-fg: #121316; --btn-primary-hover: #FFFFFF;
    --btn-accent-bg: #FFBC00; --btn-accent-fg: #141000; --btn-accent-hover: #FFD45A;
    --check: #FFD45A; --check-off: #4C505A;
    --scrollbar-track: #0C0D0F; --scrollbar-thumb: #4C505A; --scrollbar-thumb-hover: #FFBC00;
    --ok: #57D98A; --ok-bg: #14351F; --warn: #FFCF40; --warn-bg: #3A2E08;
    --danger: #FF8A7E; --danger-bg: #421511;
    --draft: #AEB0B8; --draft-bg: #2A2C33; --published: #57D98A; --published-bg: #14351F;
  }
}
:root[data-theme="dark"] {
  --bg: #121316; --surface: #1B1D21; --surface-sunken: #0C0D0F;
  --border: #33363C; --border-strong: #4C505A;
  --text: #ECEAE4; --text-secondary: #B3B2AA; --text-muted: #83837C;
  --link: #FFCF40; --focus-ring: #FFBC00; --selection-bg: #3A3010;
  --shell-bg: #0C0D0F; --shell-bg-raised: #1B1D21; --shell-border: #26282D;
  --shell-text: #B9BAB2; --shell-text-active: #FFFFFF;
  --btn-primary-bg: #ECEAE4; --btn-primary-fg: #121316; --btn-primary-hover: #FFFFFF;
  --btn-accent-bg: #FFBC00; --btn-accent-fg: #141000; --btn-accent-hover: #FFD45A;
  --check: #FFD45A; --check-off: #4C505A;
  --scrollbar-track: #0C0D0F; --scrollbar-thumb: #4C505A; --scrollbar-thumb-hover: #FFBC00;
  --ok: #57D98A; --ok-bg: #14351F; --warn: #FFCF40; --warn-bg: #3A2E08;
  --danger: #FF8A7E; --danger-bg: #421511;
  --draft: #AEB0B8; --draft-bg: #2A2C33; --published: #57D98A; --published-bg: #14351F;
}

/* ---- Scrollbars (styled in both themes; thumb goes gold on hover) ---- */
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-pill);
  border: 2px solid var(--scrollbar-track);
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
::-webkit-scrollbar-corner { background: var(--scrollbar-track); }

/* ---- Base ---- */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  margin: 0;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; margin: 0; color: var(--text); }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
::selection { background: var(--selection-bg); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }

/* ---- App shell ---- */
.shell { display: flex; min-height: 100vh; }
.shell-sidebar {
  width: var(--shell-sidebar-w); flex: 0 0 auto;
  background: var(--shell-bg); color: var(--shell-text);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--shell-border);
}
.shell-logo {
  display: flex; align-items: center; gap: 10px;
  padding: var(--sp-4); height: var(--shell-topbar-h); box-sizing: border-box;
  border-bottom: 1px solid var(--shell-border);
}
.shell-logo img, .shell-logo svg { height: 26px; display: block; }
.shell-logo .app-name {
  color: #fff; font-weight: 800; font-size: var(--fs-md);
  letter-spacing: 0.01em; white-space: nowrap;
}
.shell-nav { padding: var(--sp-2) 0; flex: 1; overflow-y: auto; }
.shell-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px var(--sp-4); color: var(--shell-text);
  font-weight: 700; font-size: var(--fs-md);
  border-left: 3px solid transparent; text-decoration: none;
}
.shell-nav a:hover { color: var(--shell-text-active); background: var(--shell-bg-raised); text-decoration: none; }
.shell-nav a.active {
  color: var(--shell-text-active); background: var(--shell-bg-raised);
  border-left-color: var(--shell-marker);
}
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shell-topbar {
  height: var(--shell-topbar-h); box-sizing: border-box; flex: 0 0 auto;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-6); background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.shell-content { padding: var(--sp-6); flex: 1; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 var(--fs-md) var(--font-sans);
  padding: 7px 14px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer;
  background: var(--surface); color: var(--text);
}
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.btn-primary:hover { background: var(--btn-primary-hover); }
.btn-accent { background: var(--btn-accent-bg); color: var(--btn-accent-fg); }
.btn-accent:hover { background: var(--btn-accent-hover); }
.btn-secondary { border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-sunken); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-sunken); color: var(--text); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---- Inputs ---- */
.input, .select, textarea.input {
  font: 400 var(--fs-md) var(--font-sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 7px 10px; box-sizing: border-box;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--focus-ring); outline: none;
  box-shadow: 0 0 0 3px var(--selection-bg);
}
.field-label { display: block; font-weight: 700; font-size: var(--fs-sm); margin-bottom: 4px; color: var(--text-secondary); }

/* ---- Cards / panels ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card-header {
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--sp-3); font-weight: 800;
}
.card-body { padding: var(--sp-4); }

/* ---- Badges (Template lifecycle vocabulary is fixed) ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase;
  letter-spacing: 0.04em; padding: 2px 8px; border-radius: var(--radius-pill);
}
.badge-draft { color: var(--draft); background: var(--draft-bg); }
.badge-published { color: var(--published); background: var(--published-bg); }
.badge-deleted { color: var(--danger); background: var(--danger-bg); }
.badge-warn { color: var(--warn); background: var(--warn-bg); }
.badge-info { color: var(--text-secondary); background: var(--surface-sunken); }
.badge-version { color: var(--text-secondary); background: var(--surface-sunken); text-transform: none; font-family: var(--font-mono); }

/* ---- Tables (dense data grids) ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
table.data th {
  text-align: left; font-weight: 800; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  background: var(--surface-sunken); padding: 8px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data td { padding: 7px 12px; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--selection-bg); }

/* ---- Tier matrix grid ----
   Sticky header row + sticky first column. Past ~4-5 tier columns the grid
   scrolls horizontally (prototype #32's measured limit) — sticky col keeps
   Component names readable while tiers scroll. */
.matrix-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); max-height: 70vh; }
table.matrix { border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
table.matrix th, table.matrix td { border-bottom: 1px solid var(--border); padding: 6px 10px; text-align: center; }
table.matrix thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-sunken);
  font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-secondary); min-width: 84px;
}
table.matrix th.rowhead, table.matrix td.rowhead {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  text-align: left; min-width: 220px; font-weight: 400;
}
table.matrix thead th.rowhead { z-index: 3; background: var(--surface-sunken); }
table.matrix tr.section-row td {
  background: var(--surface-sunken); text-align: left; font-weight: 800;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary);
}
table.matrix td.cell-on { color: var(--check); font-weight: 800; }
table.matrix td.cell-off { color: var(--check-off); }

/* ---- Empty / loading / error states (first-class, per #46) ---- */
.state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); padding: var(--sp-10); text-align: center; color: var(--text-muted);
}
.state .state-title { font-weight: 800; font-size: var(--fs-lg); color: var(--text); }
.state-error .state-title { color: var(--danger); }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--brand-gold);
  animation: aspen-spin 0.8s linear infinite;
}
@keyframes aspen-spin { to { transform: rotate(360deg); } }

/* ---- Toolbar / page header pattern ---- */
.page-header { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.page-header .spacer { flex: 1; }
.breadcrumbs { font-size: var(--fs-sm); color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); }

/* ---- Aspen logo mark (inline SVG helper class) ---- */
.aspen-mark { color: var(--brand-gold); }

/* Dialog primitive rules (#42 rev 8 shell-wide scroll lock + the host-level layer).
   Project stylesheet: never part of the replicated theme (aspen-theme.css). Uses theme tokens. */

html.dialog-open { overflow: hidden; }
body.dialog-open {
  position: fixed;
  left: 0;
  right: 0;
  overflow: hidden;
  /* the measured scrollbar width, so desktop content never shifts when the scrollbar goes away */
  padding-right: var(--dialog-sbw, 0px);
}

.dialog-host { position: relative; z-index: 1000; }

/* The layer is the backdrop. Later layers paint above earlier ones (DOM order).
   touch-action: none here does not reach the body: touch-action intersects only up to the nearest
   scroll container, and .dialog-body is one. */
.dialog-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(0 8 20 / 0.55);
  touch-action: none;
  overscroll-behavior: contain;
}

.dialog-card {
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: 100%;
  background: var(--surface, #fff);
  color: var(--text, #10121c);
  border: 1px solid var(--border, #dad7ce);
  border-radius: var(--radius-lg, 10px);
  overflow: hidden;
  touch-action: auto;
  overscroll-behavior: contain;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #dad7ce);
}
.dialog-title { margin: 0; font-size: 1.125rem; }
.dialog-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-body {
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-card :focus-visible { outline: 2px solid var(--focus-ring, #b98900); outline-offset: 2px; }

/* Phones: a full-screen sheet. */
@media (max-width: 600px) {
  .dialog-layer { padding: 0; }
  .dialog-card { width: 100%; height: 100%; border-radius: 0; border: 0; }
}

/* Shell additions (#75). Project stylesheet: never part of the replicated theme (aspen-theme.css).
   Theme tokens only; the shell, sidebar, topbar and responsive rules themselves live in the theme. */

.shell-topbar .spacer { flex: 1; }
.shell-title { color: var(--text); }
.shell-user { font-size: var(--fs-sm); color: var(--text-secondary); white-space: nowrap; }

/* Account menu: the topbar name opens one Sign out action. */
.shell-account { position: relative; min-width: 0; }
button.shell-user {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-sans); font-weight: 700; background: transparent; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px 10px;
}
button.shell-user::after { content: "▾"; font-size: var(--fs-xs); }
button.shell-user:hover, button.shell-user[aria-expanded="true"] { background: var(--surface-sunken); color: var(--text); }
.shell-menu {
  position: absolute; right: 0; top: calc(100% + var(--sp-1)); z-index: 50; min-width: 160px; max-width: calc(100vw - 24px);
  box-sizing: border-box; padding: var(--sp-1); background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
}
.shell-menu[hidden] { display: none; }
.shell-menu-item {
  display: block; width: 100%; box-sizing: border-box; text-align: left; min-height: 36px; cursor: pointer;
  font: 700 var(--fs-sm) var(--font-sans); color: var(--text); background: transparent;
  border: 0; border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3);
}
.shell-menu-item:hover { background: var(--surface-sunken); }
.shell-menu-error { margin: var(--sp-1) 0 0; padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); color: var(--danger); }
.shell-menu-error[hidden] { display: none; }
@media (max-width: 600px) {
  .shell-menu-item { min-height: 44px; }
}

.toolbtn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-secondary);
  font: 700 var(--fs-xs) var(--font-sans); border-radius: var(--radius-md); padding: 4px 10px; cursor: pointer;
}
.toolbtn:hover { background: var(--surface-sunken); color: var(--text); }

.shell-content { /* width caps (--content-max-w) belong to each surface's own container */ max-width: 100%; box-sizing: border-box; min-width: 0; }
.shell-live { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--text-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--surface-sunken);
  padding: 10px 12px; margin-bottom: var(--sp-3); font-size: var(--fs-sm);
  color: var(--text-secondary); line-height: 1.5; overflow-wrap: anywhere;
}
.callout-warn { border-left-color: var(--warn); }

/* Standing notices : the freeze / not-authoritative banners, above the content. */
.shell-notices { padding: var(--sp-3) var(--sp-4) 0; }
.shell-notices[hidden] { display: none; }
.shell-notices .notice { margin-bottom: var(--sp-2); }
.notice-link { color: var(--link); font-weight: 700; text-decoration: underline; }
.notice-has-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.notice-has-actions .notice-text { flex: 1 1 260px; min-width: 0; color: var(--text); }
.notice-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.notice-actions .btn { min-height: 36px; white-space: nowrap; }
.notice-actions .btn[aria-disabled="true"] { cursor: progress; }
/* The accessibility floor: 44px targets below 600px (#57's Stay signed in is the first action a notice carries on a phone). */
@media (max-width: 599px) {
  .notice-actions .btn { min-height: 44px; }
}
@media (max-width: 900px) {
  .shell-notices { padding: 8px 12px 0; }
}

/* Responsive shell, ported from the #46 whole-app template (the theme carries no media rules):
   below 900px the sidebar becomes a row and its nav scrolls sideways inside itself. */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .shell-sidebar {
    width: auto; min-width: 0; max-width: 100%; flex-direction: row; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--shell-border);
  }
  .shell-logo { border-bottom: 0; height: auto; padding: 8px 12px; flex: 0 0 auto; }
  .shell-nav { display: flex; flex: 1; min-width: 0; overflow-x: auto; padding: 0 6px; scrollbar-width: none; }
  .shell-nav a { white-space: nowrap; padding: 12px 10px; font-size: var(--fs-sm); }
  .shell-topbar { height: auto; min-height: 0; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .shell-content { padding: 12px 12px 32px; }
}
@media (max-width: 600px) {
  .breadcrumbs { font-size: var(--fs-xs); }
}

/* The theme's --text-muted misses 4.5:1 on the topbar (a finding on #83): the crumb a route sets uses the next token up. */
.shell-crumb { color: var(--text-secondary); }

/* The leave guard: what leaving would lose, then the two choices. Tokens only. */
.leave-confirm { display: grid; gap: var(--sp-3); }
.leave-confirm .leave-lead { margin: 0; color: var(--text); }
.leave-confirm .leave-lost { margin: 0; padding: var(--sp-3) var(--sp-4) var(--sp-3) calc(var(--sp-4) + 14px); border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: var(--radius-md); background: var(--warn-bg); color: var(--text); font-size: var(--fs-sm); }
.leave-confirm .leave-lost li { margin: 3px 0; overflow-wrap: anywhere; }
.leave-confirm .leave-more { list-style: none; margin-left: -14px; color: var(--text-secondary); }
/* a custom confirm (the upload link's, #82; #22 rev 6): the consequence as a warn callout, and the danger verb drawn the prototype's way: the theme's .btn-danger is white on --danger, 2.29:1 in Graphite (a canonical theme defect, never edited here), so it is the light red with the red text and edge */
.leave-confirm .leave-callout { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: var(--radius-md); background: var(--warn-bg); font-size: var(--fs-sm); line-height: 1.5; }
.leave-confirm .leave-hint { margin: 0; }
.leave-confirm .btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.leave-confirm .btn-danger:hover { background: var(--surface); }
.leave-confirm .btn-secondary { border-color: var(--text-secondary); }
.leave-confirm .leave-foot { display: flex; gap: var(--sp-2); justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) {
  .leave-confirm .leave-foot { justify-content: stretch; }
  .leave-confirm .leave-foot .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
}

/* Pending and blocked controls (the Responsiveness rule): aria-disabled, never disabled, so the text keeps its contrast. */
[aria-busy="true"] { cursor: progress; }
.btn[aria-disabled="true"]:not([aria-busy="true"]) { cursor: not-allowed; }
/* A skeleton holds a view's place while its read runs: shape only, no text to measure. */
.sk-bar { display: block; height: 12px; border-radius: 4px; background: var(--surface-sunken); animation: sk-pulse 1.4s ease-in-out infinite; }
.sk-bar.sk-wide { width: 70%; }
.sk-bar.sk-mid { width: 40%; }
@keyframes sk-pulse { 50% { opacity: .55; } }
.shell-frame-bar { margin: 0 0 var(--sp-3); max-width: 720px; }
@media (prefers-reduced-motion: reduce) { .sk-bar { animation: none; } }

/* The Field Rep's page (#58), ported from #20 round 1 rev 6 (prototype/20-field-rep-mobile-flow @ 0aa8b5b; #28's surfaces/fieldrep @ 15281bf): the page head
   with the Task ID, the plain state cards, and the call as a full-bleed viewfinder with the status strip on top and the round Leave under it. Phone-first: every
   control is at least 48px tall. This sheet only ADDS rules; the theme's tokens are used as they are. Local tokens use the theme's three-selector dark pattern. */
:root { --scrim: rgba(0, 4, 58, 0.8); --scrim-text: #FFFFFF; --scrim-line: rgba(255, 255, 255, 0.35); --gutter-l: max(16px, env(safe-area-inset-left, 0px)); --gutter-r: max(16px, env(safe-area-inset-right, 0px)); --safe-b: env(safe-area-inset-bottom, 0px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --scrim: rgba(12, 13, 15, 0.82); --scrim-line: rgba(255, 255, 255, 0.3); } }
:root[data-theme="dark"] { --scrim: rgba(12, 13, 15, 0.82); --scrim-line: rgba(255, 255, 255, 0.3); }

.fr { flex: 1; min-width: 0; min-height: 100vh; min-height: 100dvh; position: relative; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.fr .pagehead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 2px var(--gutter-r) 2px var(--gutter-l); box-sizing: border-box; }
.fr .pagehead .task { min-width: 0; font-weight: 800; font-size: var(--fs-md); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr .sbody { margin: 6px 0 10px; color: var(--text); font-size: var(--fs-md); line-height: 1.5; }
.fr .a-body { margin: 0 var(--gutter-r) var(--sp-4) var(--gutter-l); padding: var(--sp-4); max-width: 560px; }
.fr .state.sblock { display: grid; gap: 10px; align-items: start; text-align: left; padding: 8px 0 4px; }
.fr .state.sblock .state-title { font: 800 var(--fs-xl) var(--font-sans); line-height: 1.2; text-wrap: balance; color: var(--text); }
.fr .state.sblock .sbody { margin: 0; }
.fr .pre-actions { display: grid; gap: 10px; margin-top: 14px; }
.fr .btn, .fr-leave .btn { min-height: 48px; padding: 8px 16px; gap: 8px; }
.fr .btn-big, .fr-leave .btn-big { width: 100%; justify-content: center; min-height: 52px; font-size: var(--fs-lg); }
.fr-leave .btn-leave { background: var(--danger-bg); border-color: var(--danger); color: var(--text); } /* --text on --danger-bg with a --danger border, never white on --danger */
.fr-leave .btn-secondary { border-color: var(--text-secondary); }
.fr-leave .dialog-close { min-width: 48px; min-height: 48px; } /* #20's .layer-x: 48px, a step above the dialog primitive's 44 */
.fr-leave .foot-2 { display: grid; gap: 10px; margin-top: 14px; }

/* the call: a full-bleed viewfinder on the shell navy, the strip on top, the round Leave under it */
.fr .a-stage { position: relative; flex: 1; height: calc(100vh - 48px); height: calc(100dvh - 48px); min-height: 480px; background: var(--shell-bg); overflow: hidden; }
.fr .fr-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--shell-bg-raised); }
.fr .a-top { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: grid; gap: 8px; }
.fr .strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 7px 10px; border-radius: var(--radius-md); font: 700 var(--fs-xs) var(--font-sans); }
.fr .strip-onfeed { background: var(--scrim); color: var(--scrim-text); }
.fr .strip-i { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fr .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.fr .dot-ok { background: var(--ok); }
.fr .banner { display: block; padding: 8px 12px; border-radius: var(--radius-md); background: var(--scrim); color: var(--scrim-text); border-left: 4px solid var(--danger); font-size: var(--fs-sm); line-height: 1.4; }
.fr .banner-warn { background: var(--warn-bg); color: var(--text); border-left-color: var(--warn); }
.fr .banner .solo-left { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fr .a-bottom { position: absolute; left: 0; right: 0; bottom: calc(20px + var(--safe-b)); display: flex; justify-content: center; gap: 24px; z-index: 3; }
.fr .ctl { display: inline-flex; align-items: center; gap: 12px; font: 700 var(--fs-md) var(--font-sans); cursor: pointer; }
.fr .ctl-round { flex-direction: column; gap: 6px; min-width: 76px; min-height: 48px; padding: 4px 2px 6px; border: 0; background: transparent; color: var(--scrim-text); }
.fr .ctl-round .ctl-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--danger-bg); color: var(--danger); border: 2px solid var(--danger); }
.fr .ctl-round .ctl-txt { display: flex; flex-direction: column; align-items: center; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--scrim); }
.fr .ctl-round .ctl-txt b { font-size: var(--fs-sm); }
.fr .ctl-round .ctl-txt small { display: none; }
.fr .ctl-round:focus-visible { outline: 2px solid var(--brand-gold); outline-offset: 2px; border-radius: var(--radius-lg); }
@media (min-width: 769px) {
  .fr .a-stage { max-width: 560px; width: 100%; margin: 0 auto; box-shadow: 0 0 0 1px var(--border); }
}

/* The door states (#62): before the door opens, after it closed, and the wait to be let in. Ported from #20 rev 6's `before` and `doorclosed` scenes (the .eta line and the .snote under the words). */
.fr .eta { margin: 0; color: var(--text); font-weight: 700; font-size: var(--fs-md); }
.fr .snote { margin: 6px 0 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.45; }
.fr .state.sblock .eta { margin-top: 2px; }

/* The set-up check (#63), ported from #20 rev 6's A Steps (prototype/20-field-rep-mobile-flow @ 0aa8b5b; #28's surfaces/fieldrep @ 15281bf with its 2026-10-28 sideways test): a step bar on top,
   one thing per screen in a card, the live preview, Switch camera, the sideways test and the one primary. The sheet only ADDS rules and the theme's tokens are used as they are. */
.fr h1 { margin: 0; font-size: var(--fs-xl); line-height: 1.2; text-wrap: balance; }
.fr .a-wrap { max-width: 520px; width: 100%; margin: 0 auto; padding: 8px var(--gutter-r) calc(24px + var(--safe-b)) var(--gutter-l); box-sizing: border-box; }
.fr .a-wrap .a-body { margin: 0; max-width: none; padding: 18px 16px; }
.fr .a-dots { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 4px; }
.fr .a-dots li { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 10px var(--font-sans); color: var(--text-secondary); text-align: center; }
.fr .a-dots li::before { content: ''; display: block; width: 100%; height: 5px; border-radius: 3px; background: var(--border); }
.fr .a-dots li.done::before { background: var(--ok); }
.fr .a-dots li.now::before { background: var(--brand-gold); }
.fr .a-dots li.now { color: var(--text); }
.fr .a-dots li span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr .how { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius-md); background: var(--warn-bg); color: var(--text); font-size: var(--fs-sm); line-height: 1.45; }
.fr .permbig { display: grid; gap: 8px; }
.fr .permbig-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface-sunken); color: var(--text); margin-bottom: 4px; }
.fr .permbig-icon svg { width: 32px; height: 32px; }
.fr .permbig-btns { display: grid; gap: 10px; margin-top: 10px; }
.fr .btn-ghost { border-color: transparent; }
.fr .btn[disabled] { opacity: 0.6; cursor: default; }
.fr .lite { color: var(--text-secondary); }
.fr .preview { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--shell-bg); color: var(--scrim-text); }
.fr .preview-tall { width: 100%; aspect-ratio: 3 / 4; max-height: 34vh; max-height: 34dvh; margin: 10px 0 4px; }
.fr .preview-cap { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.fr .fpill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--radius-pill); background: var(--scrim); color: var(--scrim-text); font: 800 var(--fs-xs) var(--font-sans); letter-spacing: 0.04em; }
.fr .checkpanel { display: grid; gap: 10px; margin: 12px 0; }
.fr .ctl-wide { width: 100%; min-height: 56px; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-align: left; box-sizing: border-box; }
.fr .ctl-wide svg { flex: 0 0 auto; }
.fr .ctl-wide .ctl-txt { display: flex; flex-direction: column; }
.fr .ctl-wide .ctl-txt small { color: var(--text-secondary); font-weight: 400; font-size: var(--fs-sm); }
.fr .ctl-wide:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.fr .a-sticky { position: sticky; bottom: calc(8px + var(--safe-b)); z-index: 5; padding: 8px 0 0; background: var(--surface); }
.fr .rot-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; color: inherit; }
.fr .rot-anim { display: block; transform-origin: 50% 50%; animation: rot-turn 2.4s ease-in-out infinite; }
.fr .rot-static { display: none; }
@keyframes rot-turn { 0%, 18% { transform: rotate(0deg); } 45%, 75% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
.fr .turnstep { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-sunken); color: var(--text); text-align: left; }
.fr .turnstep-head { display: flex; align-items: center; gap: 12px; }
.fr .turnstep-title { font-size: var(--fs-md); color: var(--text); }
.fr .turnstep-line { margin: 2px 0 0; font-size: var(--fs-md); line-height: 1.4; color: var(--text-secondary); }
.fr .turnstep-passed, .fr .turnstep-already { background: var(--ok-bg); border-color: var(--ok); }
.fr .turnstep-passed .turnstep-line, .fr .turnstep-already .turnstep-line { color: var(--ok); font-weight: 700; }
.fr .turnstep-hint { background: var(--warn-bg); border-color: var(--warn); }
.fr .turnhint { text-align: left; color: var(--text); }
.fr .turnhint-title { display: block; font-size: var(--fs-md); color: var(--text); }
.fr .turnhint-steps { margin: 6px 0 10px; padding-left: 18px; font-size: var(--fs-md); line-height: 1.5; color: var(--text); }
.fr .turnhint-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.fr .turnhint-btn { flex: 1 1 120px; min-height: 48px; min-width: 44px; }
.fr-chooser .radios { display: grid; gap: 6px; }
.fr-chooser .radio { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: var(--radius-md); border: 1px solid var(--border); cursor: pointer; }
.fr-chooser .radio input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fr-chooser .radio.is-on { border-color: var(--border-strong); background: var(--surface-sunken); }
.fr-chooser .radio:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.fr-chooser .radio-mark { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--border-strong); display: inline-grid; place-items: center; box-sizing: border-box; }
.fr-chooser .radio.is-on .radio-mark { border-color: var(--check); }
.fr-chooser .radio.is-on .radio-mark::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--check); }
.fr-chooser .layer-foot { margin-top: 14px; }
@media (min-width: 768px) {
  .fr h1 { font-size: var(--fs-2xl); }
  .fr .a-wrap { max-width: 560px; }
}
@media (min-width: 1440px) {
  .fr .a-wrap { max-width: 600px; }
}
@media (prefers-reduced-motion: reduce) {
  .fr .rot-anim { animation: none; display: none; }
  .fr .rot-static { display: block; }
}

/* The call fits a phone in landscape (#66; #28 seam, owner ruling 2026-10-29): 844 × 390, 896 × 414, and 844 × 310 / 896 × 330 with Safari's bars up. The 480px stage minimum is for a portrait
   window; here the stage takes whatever the slim header leaves, nothing scrolls, and Leave sits over the feed at its lower right, clear of the notch (env(safe-area-inset-right)) and above the home
   indicator. Only the call is arranged here: the set-up check and the door pages may scroll. */
@media (orientation: landscape) and (max-height: 500px) {
  .fr .pagehead { min-height: 44px; }
  .fr .a-stage { min-height: 0; height: calc(100vh - 44px); height: calc(100dvh - 44px); max-width: none; width: 100%; margin: 0; box-shadow: none; }
  .fr .a-top { top: 6px; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); gap: 6px; }
  .fr .a-bottom { left: auto; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(8px + var(--safe-b)); }
}
/* What the Field Rep sees of a capture (#67), ported from #20 rev 6 (owner item 3 / ADR-0002 as amended 2026-10-21; prototype/20-field-rep-mobile-flow @ 0aa8b5b `.capb`, `.bar`, `.a-cap`): "Hold still" while
   a picture is taken, one upload bar per Picture (oldest at the top, a saved one leaves after 2 s), and the ruled words when a capture could not be taken. A status over the feed, never a control. */
.fr .a-cap { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); z-index: 4; display: grid; gap: 8px; pointer-events: none; }
.fr .a-cap:empty { display: none; }
.fr .capb { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); }
.fr .capb-title { font-weight: 800; font-size: var(--fs-lg); display: flex; align-items: center; gap: 6px; }
.fr .capb-body { margin: 0; font-size: var(--fs-sm); line-height: 1.4; }
.fr .capb-gold { border-left-color: var(--brand-gold); }
.fr .capb-warn { border-left-color: var(--warn); }
.fr .capb-onfeed { background: var(--scrim); color: var(--scrim-text); border-color: var(--scrim-line); }
.fr .capb-onfeed.capb-gold { border-left-color: var(--brand-gold); }
.fr .capb-onfeed.capb-warn { background: var(--scrim); border-left-color: var(--warn); }
.fr .capb-onfeed.capb-plain { border-left-color: var(--ok); }
.fr .bar { height: 8px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.fr .capb-onfeed .bar { background: var(--scrim-line); }
.fr .bar i { display: block; height: 100%; background: var(--text-secondary); transition: width 0.15s linear; }
.fr .capb-onfeed .bar i { background: var(--scrim-text); }
.fr .sending { font-weight: 700; } /* "N pictures are still sending. Keep this page open until they finish." in the Leave confirm */
@media (prefers-reduced-motion: reduce) { .fr .bar i { transition: none; } }

/* The phone's own small bars in the strip (#79; #20 rev 6's `.sig.onfeed`, ADR-0006): LiveKit's ConnectionQuality, the word beside the bars, on the strip's scrim. Unknown is dashed and neutral, Lost has its cross. */
.fr .strip .conn { font-weight: 700; font-size: var(--fs-xs); }
.fr .strip-onfeed .bars i { background: var(--scrim-line); opacity: 1; }
.fr .strip-onfeed .bars i.on { background: var(--scrim-text); }
.fr .strip-onfeed .bars-poor i.on { background: var(--warn); }
.fr .strip-onfeed .bars-lost i { background: var(--scrim-line); opacity: 0.6; }
.fr .strip-onfeed .bars-lost::after { color: var(--scrim-text); }
.fr .strip-onfeed .bars-unknown i { background: transparent; border: 1px dashed var(--scrim-line); }
/* What the Coordinator asks of the phone during the call (#80), ported from #20 rev 6 (prototype/20-field-rep-mobile-flow @ 0aa8b5b `.camnote`, `.rot-full`, `.rot-frame`): the camera switch's notice under the status strip, and the full-screen
   "Turn your phone sideways" prompt with the pulsing gold frame around it. The prompt's scrim sits at z-index 6 and the frame at 7, above it, and the frame never takes a tap. The portrait-lock hint (about 5 s in) is inside the prompt. */
.fr .camnote-slot:empty { display: none; }
.fr .camnote { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-md); background: var(--scrim); color: var(--scrim-text); border-left: 4px solid var(--brand-gold); font-size: var(--fs-sm); font-weight: 700; line-height: 1.4; }
.fr .camnote svg { flex: 0 0 auto; }
.fr .rot-layer:empty { display: none; }
.fr .rot-title { font-weight: 800; min-width: 0; }
.fr .rot-full { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; box-sizing: border-box; overflow-y: auto; text-align: center; background: var(--scrim); color: var(--scrim-text); }
.fr .rot-full .rot-title { margin: 6px 0 0; font-size: var(--fs-xl); line-height: 1.2; text-wrap: balance; color: var(--scrim-text); }
.fr .rot-full .rot-body { margin: 0; max-width: 320px; font-size: var(--fs-md); line-height: 1.45; }
.fr .rot-full .rot-hint { max-width: 320px; margin: 0; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--scrim-line); border-left: 4px solid var(--warn); color: var(--scrim-text); }
.fr .rot-full .rot-hint .turnhint-title, .fr .rot-full .rot-hint .turnhint-steps { color: var(--scrim-text); }
.fr .rot-full .rot-hint .turnhint-steps { margin-bottom: 0; text-align: left; }
.fr .rot-full .rot-dismiss { width: 100%; max-width: 320px; margin-top: 8px; min-height: 48px; }
.fr .rot-frame { position: absolute; inset: 0; z-index: 7; pointer-events: none; box-sizing: border-box; border: 4px solid var(--brand-gold); animation: rot-pulse 1.1s ease-in-out infinite; }
@keyframes rot-pulse { 0%, 100% { opacity: 0.35; border-width: 4px; } 50% { opacity: 1; border-width: 9px; } }
@media (prefers-reduced-motion: reduce) {
  .fr .rot-frame { animation: none; opacity: 1; border-width: 6px; }
}
/* "Share your location" (#96, ADR-0002 amendment 2026-11-10; prototype/28-whole-app @ 374b039, fieldrep `locPrompt`): the Coordinator's location request in the sideways prompt's look (the scrim, the pulsing gold frame, the vibration). A pin instead of the
   turning phone; Share location is the one primary (one tap, because iOS wants the gesture for the browser's own prompt) and Dismiss sits under it. Blocked: the settings steps in the hint card, Try again, Dismiss. */
.fr .rot-full.has-hint { justify-content: flex-start; gap: 8px; padding-top: 16px; }
.fr .loc-icon svg { width: 72px; height: 72px; }
.fr .rot-full .loc-dismiss { margin-top: 0; }
.fr .rot-full .lochint { margin-top: 4px; }
@media (orientation: landscape) and (max-height: 500px) {
  .fr .loc-icon svg { width: 40px; height: 40px; }
  .fr .loc-full { gap: 8px; }
}

/* The Participant's page (#87), ported from #21 round 1 rev 7's home E (prototype/21-participant-view @ f177025; #28's surfaces/participant @ 15281bf with its 2026-10-28 Pictures strip and 2026-10-29 breakpoint):
   A's centred card for the landing and every pre-call state, A's theatre for the call on a phone, D's grid for the call on a desktop, and a phone in landscape arranged for landscape. Everything is scoped under `.pv`
   and its tokens are `--pv-*`, so the Field Rep's sheet (`.fr`, `--scrim`) is untouched. The sheet only ADDS rules; the theme's tokens are used as they are. Theme pairs avoided: no --text-muted as text, no --warn
   text on --warn-bg, no white on --danger. The call is one DOM that these rules arrange by the window, so turning or resizing never restarts the stream. */
.pv {
  --pv-gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --pv-gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --pv-safe-b: env(safe-area-inset-bottom, 0px);
  --head-gap: 12px; /* the clear gap under the header before the card or the call (review 2026-10-23); 16px from 768px */
  --pv-scrim: color-mix(in srgb, var(--shell-bg) 78%, transparent);
  --pv-scrim-strong: color-mix(in srgb, var(--shell-bg) 88%, transparent);
  --pv-on-scrim: var(--shell-text-active);
  --pv-tag-bg: var(--surface-sunken);
  --pv-tag-border: var(--border-strong);
  --pv-tag-fg: var(--text);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  box-sizing: border-box;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pv { --pv-on-scrim: var(--text); }
}
:root[data-theme="dark"] .pv { --pv-on-scrim: var(--text); }
@media (min-width: 768px) { .pv { --head-gap: 16px; } }
.pv[data-scene="call"] { height: 100vh; height: 100svh; min-height: 0; overflow: hidden; }
.pv .sr-only, .pv-announce { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pv .mono { font-family: var(--font-mono); font-size: 0.92em; }
.pv .lite { color: var(--text-secondary); font-weight: 400; }
.pv h1 { margin: 4px 0 0; font-size: var(--fs-2xl); line-height: 1.15; text-wrap: balance; }
.pv p { margin: 0; }
.pv .sbody { max-width: 62ch; color: var(--text); }
.pv .snote { color: var(--text-secondary); font-size: var(--fs-sm); max-width: 62ch; }
.pv .err { color: var(--danger); font-size: var(--fs-sm); font-weight: 700; }
.pv .field-label .lite { display: block; font-size: var(--fs-xs); margin-top: 2px; }
.pv .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.pv .dot-ok { background: var(--ok); } .pv .dot-warn { background: var(--warn); } .pv .dot-danger { background: var(--danger); } .pv .dot-gold { background: var(--brand-gold); }
/* one pill scale: every pill and step chip is --fs-xs 700 with 4px 10px padding; solid fill only for the in-call LIVE and Recording indicators */
.pv .rolepill, .pv .fpill, .pv .a-sess, .pv .steps li { font: 700 var(--fs-xs) var(--font-sans); }
.pv .rolepill, .pv .fpill, .pv .a-sess { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); line-height: 1.35; }
.pv .rolepill { background: var(--pv-tag-bg); color: var(--pv-tag-fg); border: 1px solid var(--pv-tag-border); }
.pv .fpill { background: var(--pv-scrim); color: var(--pv-on-scrim); }

/* the page header on every screen, the call included: the Task ID alone and the theme switch (ported as is from approved #20 rev 6) */
.pv .pagehead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 2px var(--pv-gutter-r) 2px var(--pv-gutter-l); box-sizing: border-box; margin-bottom: var(--head-gap); flex: 0 0 auto; }
.pv .pagehead .task { min-width: 0; font-weight: 800; font-size: var(--fs-md); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv .theme-sw { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; background: var(--surface-sunken); }
.pv .tsw { font: 700 var(--fs-xs) var(--font-sans); padding: 8px 12px; min-height: 44px; min-width: 44px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); cursor: pointer; }
.pv .tsw:hover { color: var(--text); }
.pv .tsw:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.pv .tsw.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
@media (max-width: 339px) { .pv .tsw { padding: 8px 7px; } }
@media (max-width: 309px) { .pv .pagehead { flex-wrap: wrap; } .pv .pagehead .task { flex: 1 1 100%; } .pv .theme-sw { margin-left: auto; } }

/* the card: the landing, every pre-call state and the endings */
.pv .nocam { font-size: var(--fs-sm); color: var(--text); line-height: 1.4; max-width: 62ch; }
.pv .a-prejoin { flex: 1; display: grid; place-items: center; padding: 8px 16px 24px; box-sizing: border-box; }
.pv .a-card { width: min(480px, 100%); box-sizing: border-box; padding: 24px; display: grid; gap: 12px; align-content: start; }
.pv .tone-danger { border-color: var(--danger); }
.pv .state.sblock { padding: var(--sp-4) 0; gap: var(--sp-3); color: var(--text); display: grid; align-items: start; }
.pv .state.sblock .state-title { font-size: var(--fs-xl); text-wrap: balance; }
.pv .eta { color: var(--text); font-weight: 700; }
.pv .steps { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: st; }
.pv .steps li { counter-increment: st; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-secondary); }
.pv .steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-sunken); color: var(--text); font-size: 11px; }
.pv .steps li.now { color: var(--text); border-color: var(--brand-gold); background: var(--selection-bg); }
.pv .steps li.now::before { background: var(--brand-gold); color: var(--brand-ink); }
.pv .steps li.done { color: var(--text-secondary); }
.pv .steps li.done::before { content: "✓"; background: var(--surface-sunken); color: var(--text); }
.pv .landing-body { display: grid; gap: 10px; }
.pv .landing-form { display: grid; gap: 10px; margin-top: var(--sp-4); }
.pv .landing-form .input { width: 100%; min-height: 44px; font-size: var(--fs-lg); box-sizing: border-box; }
.pv .continue { min-height: 48px; justify-content: center; font-size: var(--fs-lg); }
.pv .pre-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: var(--sp-4); } /* centred (owner review 2026-10-23) */
.pv .btn { min-height: 44px; }
.pv .micpre { display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); font-size: var(--fs-sm); color: var(--text); max-width: 100%; box-sizing: border-box; }
.pv .micpre-ok { background: var(--ok-bg); border: 1px solid var(--ok); }
.pv .micpre-fail { background: var(--warn-bg); border: 1px solid var(--warn); } /* --text on --warn-bg, never --warn text */
.pv .micpre-btn { min-height: 44px; gap: 8px; }
.pv .micpre-btn span { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.pv .micpre-btn small { font-weight: 400; color: var(--text-secondary); }
.pv .pv-ghostwrap { display: grid; gap: 12px; align-content: start; width: min(720px, 100%); margin: 0 auto; padding: 0 16px 24px; box-sizing: border-box; flex: 1; }
.pv .pv-ghosts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pv .d-tile-ghost { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); min-height: 88px; text-align: center; }
.pv .d-tile-ghost small { color: var(--text-secondary); font-size: var(--fs-xs); }
.pv .d-tile-ghost .avatar { background: var(--surface-sunken); color: var(--text-secondary); border: 2px dashed var(--border-strong); box-sizing: border-box; }
.pv .pv-ghostwrap .a-prejoin { padding: 0; }

/* the microphone and Leave */
.pv .micbtn { display: inline-flex; align-items: center; gap: 10px; border: 2px solid transparent; border-radius: var(--radius-pill); cursor: pointer; font: 700 var(--fs-md) var(--font-sans); }
.pv .micbtn-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.pv .micbtn-txt small { font-size: var(--fs-xs); font-weight: 400; }
.pv .micbtn.is-off { background: var(--btn-primary-bg); color: var(--btn-primary-fg); }
.pv .micbtn.is-off:hover { background: var(--btn-primary-hover); }
.pv .micbtn.is-live { background: var(--btn-accent-bg); color: var(--btn-accent-fg); border-color: var(--brand-gold-300); box-shadow: 0 0 0 4px var(--selection-bg); }
.pv .micbtn.is-live:hover { background: var(--btn-accent-hover); }
.pv .micbtn.is-failed { border-color: var(--warn); }
.pv .micbtn-round { width: 76px; height: 76px; border-radius: 50%; flex-direction: column; justify-content: center; gap: 2px; padding: 0; box-sizing: border-box; }
.pv .micbtn-round .micbtn-txt { align-items: center; }
.pv .micbtn-round .micbtn-txt b { font-size: 11px; }
.pv .micbtn-round .micbtn-txt small { display: none; }
.pv .micbtn-round.is-off, .pv .micbtn-round.is-off:hover { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.pv .micbtn-round.is-off.is-failed, .pv .micbtn-round.is-off.is-failed:hover { border-color: var(--warn); }
.pv .micbtn-round.is-failed { width: auto; min-width: 76px; padding: 0 18px; border-radius: 38px; } /* the fix-named button widens to a 76px-tall pill so the words fit; Unmute / Mute stays a circle */
.pv .micbtn-round.is-failed .micbtn-txt b { white-space: nowrap; }
.pv .leavebtn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--danger); background: var(--danger-bg); color: var(--text); cursor: pointer; font: 700 var(--fs-md) var(--font-sans); }
.pv .leavebtn:hover { border-width: 2px; }
.pv .leavebtn-round { width: 60px; height: 60px; border-radius: 50%; flex-direction: column; gap: 1px; padding: 0; font-size: 11px; box-sizing: border-box; }
.pv .micbtn:focus-visible, .pv .leavebtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* the people */
.pv .avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--shell-bg-raised); color: var(--shell-text-active); font: 800 var(--fs-xs) var(--font-sans); flex: 0 0 auto; }
.pv .avatar-lg { width: 54px; height: 54px; font-size: var(--fs-lg); }
.pv .speak { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.pv .speak i { width: 3px; background: var(--brand-gold); border-radius: 2px; animation: pv-bar 0.9s ease-in-out infinite; height: 40%; }
.pv .speak i:nth-child(2) { animation-delay: 0.15s; height: 100%; } .pv .speak i:nth-child(3) { animation-delay: 0.3s; height: 65%; }
@keyframes pv-bar { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
.pv .pv-people { list-style: none; margin: 0; padding: 0; }
.pv .mrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pv .mname { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.pv .mname small { color: var(--text-secondary); font-size: var(--fs-xs); }
.pv .mstate { position: relative; display: inline-flex; align-items: center; min-width: 22px; justify-content: flex-end; color: var(--text-secondary); }
.pv .mstate svg { width: 16px; height: 16px; }
.pv .is-away .avatar { opacity: 0.55; } /* the Coordinator while their connection is down: the avatar dims, the words stay full contrast */
.pv [data-member="rep"] { display: none; } /* the Field Rep is the feed */

/* the in-call status banners: a warn status with no action in it */
.pv .banners { display: grid; gap: 8px; }
.pv .banners:empty { display: none; }
.pv .reconnect { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); color: var(--text); border-left: 3px solid var(--warn); border-radius: var(--radius-md); font-size: var(--fs-sm); box-shadow: 0 6px 20px rgba(0, 8, 20, 0.28); }
.pv .reconnect.solo, .pv .reconnect.micfail, .pv .reconnect.coordlost { background: var(--warn-bg); }
.pv .solo-left { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* a refused "Allow microphone" tap under a hard block: the sentence pulses once, a held ring under reduced motion */
.pv .reconnect.micfail.nudge, .pv .micpre-fail.nudge { outline: 3px solid transparent; outline-offset: 2px; animation: pv-nudge 0.7s ease-out 1; }
@keyframes pv-nudge { 0%, 100% { outline-color: transparent; transform: scale(1); } 30% { outline-color: var(--warn); transform: scale(1.025); } }
@media (prefers-reduced-motion: reduce) {
  .pv .speak i { animation: none; }
  .pv .reconnect.micfail.nudge, .pv .micpre-fail.nudge { animation: none; outline-color: var(--warn); }
}

/* the feed */
.pv .pv-feedbox { position: relative; min-height: 0; min-width: 0; background: var(--shell-bg); overflow: hidden; }
.pv .pv-feed { position: absolute; inset: 0; background: var(--shell-bg-raised); }
.pv .pv-feed[hidden], .pv .pv-feedoff[hidden], .pv .feed-cap[hidden] { display: none; }
.pv .pv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--shell-bg-raised); }
.pv .pv-feedoff { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; padding: 16px; text-align: center; background: var(--shell-bg); color: var(--shell-text-active); }
.pv .pv-feedoff b { font-size: var(--fs-md); }
.pv .pv-feedoff small { font-size: var(--fs-sm); }
.pv .feed-top { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.pv .feed-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; display: flex; flex-direction: column; gap: 1px; background: linear-gradient(to top, var(--pv-scrim-strong), transparent); color: var(--pv-on-scrim); pointer-events: none; }
.pv .feed-cap b { font-size: var(--fs-md); }
/* in A's theatre the pills and the caption sit above the round controls, clear of the status row (#21 rev 7's `.a-stage .feed-top`, `.feed-cap`) */
.pv .feed-top { top: auto; bottom: 104px; left: auto; right: 12px; justify-content: flex-end; }
.pv .feed-cap { bottom: 100px; background: none; padding: 0 14px; text-shadow: 0 1px 3px rgb(0 0 0 / 0.55); }
.pv .d-expand { display: none; position: absolute; top: 10px; right: 10px; z-index: 2; min-height: 32px; padding: 4px 12px; border: 0; border-radius: var(--radius-pill); background: var(--brand-gold); color: var(--brand-ink); font: 700 var(--fs-xs) var(--font-sans); cursor: pointer; }

/* the call: theatre on a phone upright (the default), the grid on a desktop, a phone in landscape arranged for landscape. The feed fits the visible screen with nothing to scroll to. */
.pv .pv-call { flex: 1; min-height: 0; position: relative; display: grid; background: var(--shell-bg); overflow: hidden; }
.pv .pv-call { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.pv .pv-stage { display: contents; }
.pv .pv-feedbox { grid-area: 1 / 1; }
.pv .pv-status { grid-area: 1 / 1; align-self: start; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 12px 0; pointer-events: none; }
.pv .pv-status > * { pointer-events: auto; }
.pv .a-sess { color: var(--pv-on-scrim); background: var(--pv-scrim); display: block; min-width: 0; white-space: normal; max-width: 34ch; border-radius: var(--radius-md); }
.pv .pv-own { flex: 0 0 auto; display: inline-flex; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--pv-scrim); color: var(--pv-on-scrim); }
.pv .pv-people { grid-area: 1 / 1; align-self: start; z-index: 2; margin-top: 76px; padding: 0 12px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.pv .pv-people .mrow { display: inline-flex; gap: 6px; padding: 3px 10px 3px 3px; border-radius: var(--radius-pill); background: var(--pv-scrim); color: var(--pv-on-scrim); font: 700 var(--fs-xs) var(--font-sans); border: 2px solid transparent; }
.pv .pv-people .mrow.is-speaking { border-color: var(--brand-gold); }
.pv .pv-people .avatar { width: 24px; height: 24px; font-size: 10px; background: var(--shell-border); }
.pv .pv-people .mname { flex: 0 1 auto; }
.pv .pv-people .mname small { display: none; }
.pv .pv-people .mstate { min-width: 0; color: inherit; }
.pv .pv-people .mstate:empty { display: none; }
.pv .pv-people .speak { height: 12px; }
.pv .banners { grid-area: 1 / 1; align-self: end; z-index: 3; margin: 0 16px 152px; }
.pv .pv-dock { grid-area: 1 / 1; align-self: end; justify-self: center; z-index: 3; display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.pv .pv-pics { grid-area: 2 / 1; background: var(--surface); color: var(--text); border-top: 1px solid var(--border); padding: 8px var(--pv-gutter-r) calc(8px + var(--pv-safe-b)) var(--pv-gutter-l); display: grid; gap: 6px; min-width: 0; }
.pv .pv-pics[hidden] { display: none; }
.pv .pv-pics-title { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--text); line-height: 20px; }
.pv .pv-pics-n { margin-left: 4px; color: var(--text-secondary); font-weight: 400; }
.pv .pv-pics-empty { margin: 0; display: flex; align-items: center; min-height: 64px; padding: 0 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); font-size: var(--fs-sm); color: var(--text-secondary); }
.pv .pv-pics-row { list-style: none; margin: -3px; padding: 3px 3px 6px; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; }
.pv .pv-pic { flex: 0 0 148px; display: grid; grid-template-rows: auto 1fr; width: 148px; min-width: 44px; min-height: 44px; padding: 0; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; cursor: pointer; scroll-snap-align: start; }
.pv .pv-pic:hover { border-color: var(--text-secondary); }
.pv .pv-pic:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pv .pv-pic-img { position: relative; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 8px; background: var(--surface-sunken); color: var(--text); overflow: hidden; }
.pv .pv-pic-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv .pv-pic-time { position: relative; font-size: var(--fs-sm); font-weight: 700; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--pv-scrim); color: var(--pv-on-scrim); }
.pv .pv-pic-saving { position: relative; margin-left: auto; font-size: var(--fs-xs); font-weight: 700; color: var(--text); }
.pv .pv-pic-target { padding: 6px 8px 8px; font-size: var(--fs-xs); line-height: 1.3; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pv-viewer .pv-viewer-body { display: grid; gap: 10px; }
.pv-viewer .pv-viewer-img { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto; border-radius: var(--radius-md); }
.pv-viewer .layer-foot { display: grid; margin-top: 6px; }
.pv-viewer .btn-big, .pv-leave .btn-big { width: 100%; justify-content: center; min-height: 52px; font-size: var(--fs-lg); }

/* a desktop: from 768px wide and about 600px tall (owner ruling 2026-10-29, amending #21's single 768px breakpoint): D's call grid, three columns, the Field Rep's feed the big tile (two by two) and everyone else a tile beside and under it; the Pictures strip under the grid, the dock below */
@media (min-width: 768px) and (min-height: 600px) {
  .pv .pv-call { margin: 0 8px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface-sunken); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; min-height: 420px; }
  .pv .pv-status { grid-area: 1 / 1; position: static; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--border); align-items: center; }
  .pv .a-sess { background: transparent; color: var(--text); padding: 0; font-weight: 400; font-size: var(--fs-sm); max-width: none; }
  .pv .pv-own { background: transparent; color: var(--text); padding: 0; }
  .pv .pv-stage { display: grid; grid-area: 2 / 1; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(120px, 1fr); gap: 8px; padding: 8px; box-sizing: border-box; min-height: 0; overflow: auto; }
  .pv .pv-feedbox { grid-column: 1 / 3; grid-row: 1 / 3; border-radius: var(--radius-lg); min-height: 200px; }
  .pv .d-expand { display: inline-flex; align-items: center; }
  .pv .feed-top { top: 12px; bottom: auto; left: 12px; right: auto; justify-content: flex-start; }
  .pv .feed-cap { bottom: 0; background: linear-gradient(to top, var(--pv-scrim-strong), transparent); padding: 28px 14px 12px; text-shadow: none; }
  .pv .pv-people { display: contents; }
  .pv .pv-people .mrow { position: relative; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; text-align: center; gap: 4px; padding: 10px; min-width: 0; background: var(--surface); color: var(--text); border: 2px solid var(--border); border-radius: var(--radius-lg); font: inherit; }
  .pv .pv-people .mrow.is-me { background: var(--selection-bg); }
  .pv .pv-people .mrow.is-speaking { border-color: var(--brand-gold); }
  .pv .pv-people .avatar { width: 54px; height: 54px; font-size: var(--fs-lg); background: var(--shell-bg-raised); }
  .pv .pv-people .mname { flex: 0 0 100%; align-items: center; }
  .pv .pv-people .mname small { display: block; }
  .pv .pv-people .mname b { font-size: var(--fs-md); }
  .pv .pv-people .mstate { position: absolute; top: 8px; right: 8px; }
  .pv .banners { grid-area: 2 / 1; align-self: start; margin: 16px 20px 0; }
  .pv .pv-pics { grid-area: 3 / 1; border-top: 1px solid var(--border); }
  .pv .pv-dock { grid-area: 4 / 1; align-self: auto; justify-self: stretch; justify-content: center; margin: 0; padding: 10px 12px 12px; background: var(--surface); border-top: 1px solid var(--border); }
  .pv .pv-call.is-expanded .pv-feedbox { grid-column: 1 / -1; grid-row: 1 / -1; }
  .pv .pv-call.is-expanded .pv-people .mrow { display: none; }
  .pv .pv-dock .micbtn-round.is-off { background: var(--surface-sunken); }
}

/* a phone in landscape keeps A's theatre arranged for landscape (owner ruling 2026-10-29): the feed fills the height, the people and the Pictures strip sit in a narrow column beside it, the controls over the feed */
@media (orientation: landscape) and (max-width: 767px), (orientation: landscape) and (max-height: 599px) {
  .pv { --head-gap: 4px; }
  .pv .pagehead { min-height: 44px; }
  .pv .pv-call { grid-template-columns: minmax(0, 1fr) clamp(188px, 30vw, 248px); grid-template-rows: auto minmax(0, 1fr); }
  .pv .pv-feedbox { grid-area: 1 / 1 / 3 / 2; }
  .pv .pv-status { grid-area: 1 / 1 / 2 / 2; padding: 8px 10px 0; }
  .pv .a-sess { font-size: 11px; max-width: 30ch; padding: 3px 8px; }
  .pv .banners { grid-area: 1 / 1 / 3 / 2; align-self: start; margin: 52px 12px 0; }
  .pv .pv-dock { grid-area: 1 / 1 / 3 / 2; align-self: end; justify-self: end; margin: 0 max(16px, env(safe-area-inset-right, 0px)) 8px 0; gap: 12px; }
  .pv .pv-people { grid-area: 1 / 2; align-self: stretch; margin: 0; padding: 8px 10px; gap: 4px; flex-direction: column; flex-wrap: nowrap; background: var(--surface); color: var(--text); overflow: auto; max-height: 44vh; max-height: 44svh; pointer-events: auto; }
  .pv .pv-people .mrow { display: flex; padding: 3px 4px; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-sm); border-radius: var(--radius-md); border: 1px solid transparent; }
  .pv .pv-people .mrow.is-speaking { border-color: var(--brand-gold); background: var(--selection-bg); }
  .pv .pv-people .mname small { display: block; }
  .pv .pv-people .mname b { font-size: var(--fs-sm); }
  .pv .pv-people .mstate { color: var(--text-secondary); }
  .pv .pv-pics { grid-area: 2 / 2; border-top: 0; border-left: 1px solid var(--border); padding: 8px 10px; align-content: start; overflow: hidden; min-height: 0; }
  .pv .pv-pics-row { padding-bottom: 4px; }
  .pv .micbtn-round { width: 60px; height: 60px; }
  .pv .micbtn-round.is-failed { min-width: 60px; border-radius: 30px; padding: 0 14px; }
  .pv .leavebtn-round { width: 52px; height: 52px; }
  .pv .feed-top { top: auto; bottom: 10px; left: 12px; right: auto; justify-content: flex-start; }
  .pv .feed-cap { bottom: 46px; padding: 0 12px; }
}

/* the Leave confirm and the enlargement: the shape ported from approved #20 rev 6 through the dialog primitive: a bottom sheet on a phone, a centred dialog from 600px; Leave is --text on --danger-bg, never white on --danger */
.pv-leave .btn, .pv-viewer .btn { min-height: 48px; padding: 8px 16px; gap: 8px; }
.pv-leave .btn-leave { background: var(--danger-bg); border-color: var(--danger); color: var(--text); }
.pv-leave .btn-leave:hover { border-width: 2px; }
.pv-leave .btn-secondary { border-color: var(--text-secondary); }
.pv-leave .foot-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pv-leave .sbody { max-width: none; }

@media (max-width: 600px) {
  .pv .btn, .pv .input, .pv .micpre-btn, .pv .d-expand { min-height: 44px; }
  .pv .micbtn, .pv [data-primary].btn { min-height: 48px; }
  .pv .micbtn-round { min-height: 76px; }
  .pv .a-card { padding: 16px; gap: 8px; }
  .pv .a-card .sblock { padding: var(--sp-2) 0; }
  .pv .a-card .pre-actions { margin-top: var(--sp-2); }
  .pv .a-card .micpre-fail .dot { display: none; }
  .pv .pv-dock { gap: 16px; }
}
@media (max-width: 359px) {
  .pv .a-card { padding: 14px 12px; gap: 6px; }
  .pv .a-card .sblock { padding: var(--sp-1) 0; }
  .pv .a-card .micpre { padding: 8px 10px; }
}

/* the Field Rep is the feed, in every arrangement: its entry stays in the list for the record and is not drawn (after the arrangements, so none of them shows it again) */
.pv .pv-people .mrow[data-member="rep"] { display: none; }

/* The door and the Guests dialog (#62), ported from #22 round 1 rev 6 (prototype/22-guest-links-admission @ 11947f4): the door card, the one-line door form, the list of who has opened a link, and
   the live screen's strip. This sheet only ADDS rules and never redefines a theme token. A secondary button's edge is drawn in --text-secondary, as the prototype does (the theme's own edge is
   under 3:1). The responsive queries live here (conventions rule 5). */
.gx-dialog { width: min(720px, 100%); }
.gx { display: grid; gap: var(--sp-3); min-width: 0; }
.gx .btn-secondary { border-color: var(--text-secondary); }
.gx-q .gx-hr-a .btn-secondary { border-color: var(--text-secondary); }
.gx .btn-sm { min-height: 36px; }
.gx .gx-state { display: grid; justify-items: center; gap: 8px; padding: var(--sp-5) var(--sp-3); text-align: center; }
.gx .gx-alert { margin: 0; }

.gx-door { display: grid; gap: 8px; padding: var(--sp-3) var(--sp-4); min-width: 0; }
.gx-door .gx-door-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gx-door h3, .gx-q h3 { margin: 0; font-size: var(--fs-md); font-weight: 800; }
.gx-door .gx-door-h .lite { font-size: var(--fs-sm); }
.gx-door .gx-door-l { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text); }
.gx-door .gx-door-a { display: flex; flex-wrap: wrap; gap: 6px; }

.gx-q { display: grid; gap: 8px; min-width: 0; }
.gx-q .gx-q-h { display: flex; align-items: center; gap: 8px; }
.gx-q .cnt { display: inline-grid; place-items: center; min-width: 1.6em; margin-left: 8px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--surface-sunken); border: 1px solid var(--border); font: 700 var(--fs-xs) var(--font-sans); color: var(--text); }
.gx-q .gx-hl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gx-q .gx-hr { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); min-width: 0; }
.gx-q .gx-hr-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.gx-q .gx-hr-n { font-weight: 700; overflow-wrap: anywhere; }
.gx-q .gx-hr-note, .gx-q .gx-empty, .gx-q .gx-names { margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.45; overflow-wrap: anywhere; }
.gx-q .gx-names { font-size: var(--fs-xs); }
.gx-q .chip { display: inline-flex; align-items: center; padding: 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--text-secondary); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); }

/* admission (#64), ported from #22 rev 6 (11947f4): the row's buttons and hint, auto-admit, the removal confirm, the knock cards over the video and the top bar's count */
.gx-q .gx-hr-a { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.gx-hint { font-style: italic; }
.gx-q .chip-warn { background: var(--warn-bg); border-color: transparent; }
.gx-q .chip-ok { border-color: var(--ok); }
.gx-q .gx-hr[data-arrival=waiting] { border-color: var(--border-strong); }
.gx-q .gx-autos { display: grid; gap: 6px; }
.gx-tog { display: grid; gap: 2px; }
.gx-tog-l { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; font-weight: 700; font-size: var(--fs-sm); }
.gx-tog-l input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gx-tog-b { position: relative; flex: none; box-sizing: border-box; width: 34px; height: 20px; border-radius: var(--radius-pill); background: var(--text-secondary); transition: background 160ms; }
.gx-tog-b::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: transform 160ms; }
.gx-tog-l input:checked + .gx-tog-b { background: var(--brand-gold); }
.gx-tog-l input:checked + .gx-tog-b::after { transform: translateX(14px); background: var(--brand-ink); }
.gx-tog-l input:focus-visible + .gx-tog-b { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.gx-tog-l input:disabled ~ span { color: var(--text-secondary); }
.gx-tog-line { margin: 0; padding-left: 44px; font-size: var(--fs-sm); color: var(--text-secondary); }
.gx .gx-notice { margin: 0; padding: 8px 12px; border-radius: var(--radius-md); background: var(--surface-sunken); border: 1px solid var(--border); font-size: var(--fs-sm); }
.gx-confirm { width: min(520px, 100%); }
.gx-cf { display: grid; gap: var(--sp-3); font-size: var(--fs-md); line-height: 1.5; }
.gx-cf p { margin: 0; max-width: 60ch; }
.gx-cf .gx-callout { padding: 10px 14px; border-left: 4px solid var(--danger); border-radius: var(--radius-md); background: var(--surface-sunken); }
.gx-cf .btn-secondary { border-color: var(--text-secondary); }
/* the theme's .btn-danger is #fff on --danger, 2.29:1 in Graphite (a canonical theme defect, never edited here): the removal confirm's button takes the ink on the light red there */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gx-cf .btn-danger { color: var(--brand-ink); } }
:root[data-theme="dark"] .gx-cf .btn-danger { color: var(--brand-ink); }
.gx-cf-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* the knock cards over the video (#22 rev 6, #19 rev 4): over the stage's video, bottom-right, two at once, above 768px; in the page's flow under the stage at 768px and narrower, where the video is too small to hold
   them (#19's lesson: they must never cover the rail's Room control), and one at 600px and narrower. */
.gx-knocks { display: grid; gap: 8px; z-index: 6; }
.stage-video > .gx-knocks { position: absolute; right: var(--sp-3); bottom: var(--sp-3); width: min(380px, calc(100% - 2 * var(--sp-3))); max-height: calc(100% - 2 * var(--sp-3)); overflow-y: auto; }
.live > .gx-knocks { margin: 0; }
.gx-knocks[hidden] { display: none; }
.gx-knock { display: grid; gap: 4px; padding: 10px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md); box-shadow: var(--shadow); min-width: 0; }
.gx-knock .gx-hr-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.gx-knock .gx-hr-n { font-weight: 700; overflow-wrap: anywhere; }
.gx-knock .gx-hr-note { margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.45; overflow-wrap: anywhere; }
.gx-knock .gx-hr-a { display: flex; gap: 6px; flex-wrap: wrap; }
.gx-knock .chip { display: inline-flex; align-items: center; padding: 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--text-secondary); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); }
.gx-knock .btn-secondary { border-color: var(--text-secondary); }
.gx-knock .btn-sm { min-height: 36px; }
.gx-knock-done { border-left-color: var(--border-strong); }
.gx-knock .gx-knock-err { color: var(--danger); font-weight: 700; }

/* the top bar's count: plain text that follows the door and opens nothing */
.tb-cnt { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: var(--fs-sm); color: var(--text); }
.tb-cnt .cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); font: 700 var(--fs-xs) var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text); }
.tb-cnt .cnt-on { border-color: var(--brand-gold); box-shadow: inset 0 0 0 1px var(--brand-gold); }

/* the Session page's Guests card: the door's one-line form on a sunken strip */
.gx-dline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 6px 0 2px; padding: 8px 12px; border-radius: var(--radius-md); background: var(--surface-sunken); font-size: var(--fs-sm); color: var(--text); }
.gx-dline .btn-secondary { border-color: var(--text-secondary); }
.gx-dline .btn-sm { min-height: 32px; }

/* the live screen: the strip above the video (who is at the door, and the one way into the Guests dialog) and the door's standing notices beside the solo warning */
.live .gx-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font-size: var(--fs-sm); min-width: 0; }
.live .gx-strip[hidden] { display: none; }
.live .gx-strip .gx-strip-t { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.live .gx-strip .btn-secondary { border-color: var(--text-secondary); }
.live .gx-strip .btn-sm, .live .notice .btn-sm { min-height: 32px; }
.live .notice .notice-a { flex: 0 0 auto; display: inline-flex; gap: 6px; }

/* the Upload link card (#82), ported from #22 rev 6's `.lc-upload`: the same card as the guest links, with the one-time reveal as an ok callout and the request form's expiry as one select. */
.gx-up { display: grid; gap: 8px; padding: var(--sp-3) var(--sp-4); min-width: 0; }
.gx-up > * { min-width: 0; }
.gx-up .gx-up-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gx-up h3 { margin: 0; font-size: var(--fs-md); font-weight: 800; }
.gx-up .gx-up-h .lite { font-size: var(--fs-sm); color: var(--text-secondary); }
.gx-up .chip { display: inline-flex; align-items: center; padding: 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--text-secondary); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); }
.gx-up .chip::before { content: ""; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--border-strong); flex: none; }
.gx-up .chip-ok { border-color: var(--ok); }
.gx-up .chip-ok::before { background: var(--ok); }
.gx-up .chip[data-upload-chip=unavailable]::before, .gx-up .chip[data-upload-chip=expired]::before, .gx-up .chip[data-upload-chip=revoked]::before { display: none; }
.gx-up .gx-sees { margin: 0; font-size: var(--fs-sm); color: var(--text); max-width: 72ch; line-height: 1.5; overflow-wrap: anywhere; }
.gx-up .gx-k { display: inline-block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); font-weight: 700; margin-right: 6px; }
.gx-up .gx-a, .gx-v .gx-a { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-note { margin: 0; border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); background: var(--surface); color: var(--text); line-height: 1.5; }
.gx-note p { margin: 0; }
.gx-note-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.gx-ureveal { display: grid; gap: 8px; }
.gx-v { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.gx-v > * { min-width: 0; }
.gx-lval { font-size: var(--fs-sm); padding: 6px 10px; background: var(--surface-sunken); border-radius: var(--radius-md); overflow-wrap: anywhere; user-select: all; }
.gx-ufield { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--fs-sm); }
.gx-ufield label { font-weight: 700; }
.gx-ufield .select { min-height: 34px; font-size: var(--fs-sm); }
.gx-ufield .gx-until { flex: 1 1 200px; min-width: 0; color: var(--text-secondary); }
.gx-ufield .gx-until b { color: var(--text); }
.gx-cf .gx-info { padding: 10px 14px; border: 1px solid var(--border); border-left: 4px solid var(--link); border-radius: var(--radius-md); background: var(--surface); }
/* the upload link's confirms (#22 rev 6's note-danger and its danger button): the consequence on the light red, the verb in red on the light red with a red edge (the theme's own is 2.29:1 in Graphite, see above) */
.gx-cf[data-confirm^="upload"] .gx-callout-danger { background: var(--danger-bg); }
:root:root .gx-cf[data-confirm^="upload"] .btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
:root:root .gx-cf[data-confirm^="upload"] .btn-danger:hover { background: var(--surface); }
.gx-cf .lite { color: var(--text-secondary); font-size: var(--fs-sm); }

@media (max-width: 600px) {
  .gx .btn-sm, .gx-dline .btn-sm, .live .gx-strip .btn-sm, .live .notice .btn-sm, .gx-knock .btn-sm, .gx-cf .btn { min-height: 44px; }
  .gx-tog-l { min-height: 44px; }
  .gx-ufield .select { min-height: 44px; }
  .gx-cf-foot .btn { flex: 1 1 auto; justify-content: center; }
  .gx-dline .btn, .gx-door .gx-door-a .btn { flex: 1 1 auto; }
  .gx-up .gx-a .btn { flex: 1 1 auto; }
}
@media (pointer: coarse) {
  .gx-ufield .select { min-height: 44px; }
  .gx .btn-sm, .gx-dline .btn-sm, .live .gx-strip .btn-sm, .live .notice .btn-sm, .gx-knock .btn-sm, .gx-cf .btn { min-height: 44px; }
  .gx-tog-l { min-height: 44px; }
}

/* the guest link cards, the Replace confirm and the replaced-link notice (#88), ported from #22 rev 6's `.lc`, `.ack`, `.cf-*` and the rotated notice (prototype/22-guest-links-admission @ 11947f4). */
.gx-lc { display: grid; gap: 8px; padding: var(--sp-3) var(--sp-4); min-width: 0; }
.gx-lc > * { min-width: 0; }
.gx-lc .gx-lc-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gx-lc h3 { margin: 0; font-size: var(--fs-md); font-weight: 800; }
.gx-lc .gx-lc-h .lite { font-size: var(--fs-sm); color: var(--text-secondary); }
.gx-lc .chip { display: inline-flex; align-items: center; padding: 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--text-secondary); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); }
.gx-lc .gx-sees { margin: 0; font-size: var(--fs-sm); color: var(--text); max-width: 72ch; line-height: 1.5; overflow-wrap: anywhere; }
.gx-lc .gx-k { display: inline-block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); font-weight: 700; margin-right: 6px; }
.gx-lc .gx-a { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-lc .gx-v { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.gx-lc .gx-v > * { min-width: 0; }
.gx-lc .gx-lval { font-size: var(--fs-sm); padding: 6px 10px; background: var(--surface-sunken); border-radius: var(--radius-md); overflow-wrap: anywhere; user-select: all; }
.gx-lc .gx-dead { text-decoration: line-through; color: var(--text-secondary); overflow-wrap: anywhere; }
.gx-lc .gx-old .gx-dead { font-size: var(--fs-sm); margin-right: 4px; }
.gx-lc .btn-secondary { border-color: var(--text-secondary); }
.gx-invite { margin: 0; max-width: 72ch; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-secondary); }
.gx-invite .gx-invite-b { color: var(--text); }

/* a button gated by the Session's state keeps a focusable wrapper whose tooltip shows on focus or hover; the control itself stays legible (TM's pattern) */
.gx-tt { position: relative; display: inline-flex; border-radius: var(--radius-md); }
.gx-tt:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.gx-tt .gx-tip { position: absolute; z-index: 5; left: 0; top: calc(100% + 6px); width: max-content; max-width: min(280px, 80vw); padding: 6px 10px; border-radius: var(--radius-md); background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: var(--fs-sm); display: none; }
.gx-tt:hover .gx-tip, .gx-tt:focus .gx-tip, .gx-tt:focus-within .gx-tip { display: block; }

/* the Replace confirm: the consequence in a warn callout, the soft note, and the acknowledgment that unlocks the button */
.gx-cf .gx-callout-warn { display: grid; gap: 6px; border-left-color: var(--warn); background: var(--warn-bg); }
.gx-cf .gx-callout-warn p { margin: 0; }
.gx-cf .gx-soft { border-left-color: var(--link); }
.gx-cf .gx-soft p { margin: 0; }
.gx-ack { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; padding: 8px 0; position: relative; min-height: 32px; }
.gx-ack input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gx-ack .gx-box { width: 20px; height: 20px; flex: none; border: 2px solid var(--text-secondary); border-radius: var(--radius-sm); background: var(--surface); display: grid; place-items: center; box-sizing: border-box; }
.gx-ack input:checked + .gx-box { background: var(--brand-gold); border-color: var(--brand-gold); }
.gx-ack input:checked + .gx-box::after { content: "✓"; color: var(--brand-ink); font: 800 13px var(--font-sans); line-height: 1; }
.gx-ack input:focus-visible + .gx-box { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
:root:root .gx-cf[data-confirm="rotate"] .btn-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
/* locked until the acknowledgment is ticked: still legible (the prototype's gated control), with a dashed edge and no hover, never faded below 4.5:1 */
:root:root .gx-cf[data-confirm="rotate"] .btn-danger:disabled { background: var(--surface-sunken); color: var(--text); border: 1px dashed var(--text-secondary); opacity: 1; cursor: not-allowed; }
@media (max-width: 600px) {
  .gx-lc .gx-a .btn { flex: 1 1 auto; }
  .gx-lc .gx-a .gx-tt { flex: 1 1 auto; }
  .gx-lc .gx-a .gx-tt .btn { width: 100%; }
  .gx-ack { min-height: 44px; align-items: center; }
}

/* The Coordinator's home (#24 round 5, C) and the dead-end cards, ported from the approved prototype's stylesheet (#28 round 4 @ 15281bf,
   surfaces/home/prototype.css): this sheet only ADDS rules and never redefines a theme token outside its own breakpoints. Text colours are
   --text and --text-secondary only (--text-muted and --warn are never text, conventions rule 7). The local tokens (chip families, the scrim)
   use the theme's three-selector dark pattern. The responsive queries live here, in the project's own stylesheet (conventions rule 5). */
:root {
  --tag-live-bg: var(--brand-gold); --tag-live-fg: var(--brand-ink);
  --tag-between-bg: var(--surface); --tag-between-border: var(--border-strong); --tag-between-fg: var(--text);
  --tag-sched-bg: var(--surface); --tag-sched-border: var(--border); --tag-sched-fg: var(--text);
  --tag-complete-bg: var(--ok-bg); --tag-complete-border: var(--ok-bg); --tag-complete-fg: var(--text);
  --tag-cancel-bg: transparent; --tag-cancel-border: var(--border-strong); --tag-cancel-fg: var(--text-secondary);
  --waiting-bg: var(--warn-bg); --waiting-border: var(--warn); /* must-act: someone at the door */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tag-between-border: var(--text-secondary); }
}
:root[data-theme="dark"] { --tag-between-border: var(--text-secondary); }

.shell-content { display: flex; flex-direction: column; }
.mono { font-family: var(--font-mono); }
.meta { color: var(--text-secondary); font-size: var(--fs-xs); }
.ico { display: inline-flex; line-height: 0; color: currentColor; flex: 0 0 auto; }
kbd { font: 700 var(--fs-xs) var(--font-mono); padding: 0 5px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
/* every secondary button's edge is --text-secondary, as approved #22 rev 6 / #23 rev 7 draw it (the theme's --border-strong edge measures 2.1-2.5:1) */
.home .btn-secondary, .gate .btn-secondary { border-color: var(--text-secondary); }

/* one chip scale: solid fill only for "live" */
.chip, .cnt { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; line-height: 1.4; border-radius: var(--radius-pill); border: 1px solid transparent; font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; }
.chip-live { background: var(--tag-live-bg); border-color: var(--tag-live-bg); color: var(--tag-live-fg); }
.chip-between { background: var(--tag-between-bg); border-color: var(--tag-between-border); color: var(--tag-between-fg); }
.chip-sched { background: var(--tag-sched-bg); border-color: var(--tag-sched-border); color: var(--tag-sched-fg); }
.chip-complete { background: var(--tag-complete-bg); border-color: var(--tag-complete-border); color: var(--tag-complete-fg); }
.chip-cancelled { background: var(--tag-cancel-bg); border-color: var(--tag-cancel-border); border-style: dotted; color: var(--tag-cancel-fg); }
.room { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; line-height: 1.4; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; }
.room.live { background: var(--brand-gold); border-color: var(--brand-gold); color: var(--brand-ink); }
.room.door { background: var(--waiting-bg); border-color: var(--waiting-border); color: var(--text); }
.room.door-ro { background: var(--surface); border-style: dashed; border-color: var(--text-secondary); color: var(--text); }
.cnt { background: var(--surface-sunken); color: var(--text); font-family: var(--font-mono); border-color: var(--border); }
.sid { font-size: var(--fs-xs); color: var(--text-secondary); }
.asof { display: block; font-size: var(--fs-xs); color: var(--text-secondary); font-style: italic; }
.act { font-size: var(--fs-sm); padding: 6px 14px; min-height: 36px; white-space: nowrap; justify-content: center; }

/* the home: page head, sections, Processing Hub */
.home { flex: 1; min-width: 0; width: 100%; margin: 0 auto; display: grid; gap: var(--sp-5); align-content: start; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--sp-3); }
.page-head h1 { margin: 0; font-size: var(--fs-2xl); }
.sec { display: grid; gap: var(--sp-2); min-width: 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.sec-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.ph-slot:empty { display: none; }
.ph-strip { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius-md); font-size: var(--fs-sm); color: var(--text); } /* a fact, not a warning */
.ph-note { margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); min-width: 0; flex: 1 1 220px; }
.ph-out { text-decoration: none; min-height: 36px; }
.ph-out .ico { color: var(--text-secondary); }
.vc-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: var(--sp-2); }

/* C: the column is 1040px; Find a Session is left-aligned and runs the column's width (the whole-app ruling replacing round 5's 720px, centred) */
.v-c { max-width: 1040px; }
.v-c > .sec-find { box-sizing: border-box; width: 100%; }

/* the live sections: Live now, Guests waiting and the lead's group, as C's compact rows (the host adds no box, so each section is a row of the page's grid) */
.live-host { display: contents; }
.sec-hint { flex-basis: 100%; color: var(--text-secondary); font-size: var(--fs-xs); }
.nothing { margin: 0; padding: var(--sp-4); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-secondary); font-size: var(--fs-md); background: var(--surface); }
.lrows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.lrows + .lrows { margin-top: var(--sp-2); }
.lrow { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(150px, auto) auto; gap: 6px 16px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); }
.lrow:first-child { border-top: 0; }
.lrow.grow { border-radius: 0; background: var(--waiting-bg); }
.lrow.grow:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.lrow.grow:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.lrow.grow:only-child { border-radius: var(--radius-lg); }
.lrow-main { display: grid; gap: 3px; min-width: 0; }
.lrow-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; }
.lrow-long { display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--text-secondary); min-width: 0; }
.lrow.grow .lrow-long > *, .lrow.grow .asof { color: var(--text); }
.lrow-act { display: flex; justify-content: flex-end; }
.r-title { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.r-title b { font-size: var(--fs-md); }
.r-place { color: var(--text); }
.r-coord { font-weight: 700; font-size: var(--fs-sm); }
.r-who, .r-long, .g-sess, .g-long, .g-where { font-size: var(--fs-sm); color: var(--text-secondary); }
.lrow.grow .g-sess, .lrow.grow .g-long, .lrow.grow .g-where { color: var(--text); }
.r-door, .r-odoor { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 700; padding: 1px 7px; border-radius: var(--radius-pill); color: var(--text); }
.r-door { background: var(--waiting-bg); border: 1px solid var(--waiting-border); }
.r-odoor { background: var(--surface); border: 1px dashed var(--text-secondary); } /* another Coordinator's door: read only */
.g-setup { font-size: var(--fs-xs); font-weight: 700; padding: 1px 7px; border-radius: var(--radius-sm); border: 1px solid var(--text-secondary); color: var(--text); background: var(--surface); }
.g-fallback { font-size: var(--fs-xs); font-weight: 700; color: var(--text); }

/* a lead's Join confirm */
.hm-confirm { width: min(480px, 100%); }
.hm-cf { display: grid; gap: var(--sp-3); font-size: var(--fs-md); line-height: 1.5; }
.hm-cf .cf-line { margin: 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.hm-cf .cf-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: var(--fs-sm); line-height: 1.45; }
.hm-cf .btn-secondary { border-color: var(--text-secondary); }
.hm-cf-problem { margin: 0; padding: 8px 12px; border-left: 4px solid var(--danger); background: var(--surface-sunken); border-radius: var(--radius-md); font-size: var(--fs-sm); }
.hm-cf-problem[hidden] { display: none; }
.hm-cf-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.hm-cf-foot .btn { min-height: 40px; }

/* Find a Session: one box, the count line, at most 10 results */
.find { display: grid; gap: 6px; min-width: 0; }
.search { position: relative; display: flex; align-items: center; min-width: 0; scroll-margin-top: calc(var(--shell-topbar-h, 52px) + 8px); }
.search-ico { position: absolute; left: 11px; color: var(--text-secondary); pointer-events: none; }
.search-input { width: 100%; min-height: 40px; padding-left: 32px; padding-right: 40px; }
.search .act-x { position: absolute; right: 2px; min-height: 36px; min-width: 36px; padding: 0; font-size: 18px; }
.search .act-x[hidden] { display: none; }
/* the box has its own clear control; the browser's is hidden so there is one */
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search-count { margin: 0; color: var(--text-secondary); font-size: var(--fs-xs); }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.results[hidden] { display: none; }
.res { box-sizing: border-box; width: 100%; display: grid; gap: 3px; text-align: left; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font: 400 var(--fs-sm) var(--font-sans); cursor: pointer; min-width: 0; }
.res:hover { background: var(--surface-sunken); }
.res-first { border-color: var(--brand-gold); background: var(--selection-bg); } /* what Enter opens: one outline */
.res-top, .res-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.res-task { font-size: var(--fs-md); }
.res-place, .res-last { color: var(--text-secondary); }
.res-place { color: var(--text); }
.res-exact { font-size: var(--fs-xs); font-weight: 700; color: var(--text); }
/* "Visit N of M": a small neutral marker when the Job has more than one visit */
.res-visit { display: inline-flex; align-items: center; padding: 0 6px; line-height: 1.5; border: 1px solid var(--text-secondary); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; }

/* the card: the two dead ends, inside the shell, one shape */
.gate { min-height: calc(100vh - 200px); display: grid; place-items: center; align-content: center; gap: var(--sp-3); padding: var(--sp-4) 0; }
.gate-in { min-height: auto; padding-top: var(--sp-8); }
.gate-in .ph-strip { width: min(460px, 100%); box-sizing: border-box; }
.gate-card { box-sizing: border-box; width: min(460px, 100%); padding: var(--sp-6) var(--sp-6) var(--sp-5); display: grid; gap: var(--sp-3); }
.gate-title { margin: 0; font-size: var(--fs-2xl); text-wrap: balance; }
.gate-card p { margin: 0; font-size: var(--fs-md); line-height: 1.5; }
.gate-card .gate-meta { color: var(--text-secondary); font-size: var(--fs-sm); }
.gate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-2); }
.gate-primary { min-height: 44px; padding: 0 18px; justify-content: center; text-decoration: none; }
.gate-secondary { min-height: 44px; justify-content: center; text-decoration: none; }
.gate-find { display: grid; gap: 6px; padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.gate-find h2 { margin: 0; font-size: var(--fs-md); }

/* loading / error: the theme's .state uses --text-muted, so it is scoped here (a recorded theme finding) */
.home .state { color: var(--text-secondary); padding: var(--sp-6); gap: 8px; font-size: var(--fs-sm); }
.home .state .state-title { color: var(--text); }
.session-stub-card { display: grid; gap: var(--sp-3); padding: var(--sp-5); justify-items: start; }
.session-stub-card p { margin: 0; }

@media (max-width: 1280px) {
  :root { --content-max-w: 100%; }
}
@media (max-width: 900px) {
  :root { --shell-topbar-h: 48px; }
  /* C's rows fold: the Room chip and the times join the main cell, the action takes its own column */
  .lrow { grid-template-columns: minmax(0, 1fr) auto; }
  .lrow-room, .lrow-main, .lrow-long { grid-column: 1; }
  .lrow-long { display: flex; flex-wrap: wrap; gap: 2px 10px; }
  .lrow-act { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
@media (max-width: 768px) {
  .shell-content { padding: var(--sp-3); }
}
@media (max-width: 600px) {
  .home .btn, .home .act, .home .res, .gate .btn, .gate .res, .home .search-input, .gate .search-input { min-height: 44px; }
  .home [data-primary], .gate [data-primary] { min-height: 48px; }
  .search .act-x { min-width: 44px; min-height: 44px; }
  .hm-cf-foot .btn { min-height: 44px; flex: 1 1 auto; justify-content: center; }
  .lrow { grid-template-columns: 1fr; padding: 10px 12px; }
  .lrow-act { justify-content: stretch; grid-column: 1; grid-row: auto; }
  .lrow-act .btn { width: 100%; }
  .page-head h1 { font-size: var(--fs-xl); }
  .gate-card { padding: var(--sp-5) var(--sp-4) var(--sp-4); }
  .gate-actions .btn { flex: 1 1 100%; }
}

/* The signal bars (ADR-0006, #79), ported from #19 round 1 rev 4 (prototype/19-live-session-screen @ 018e4fa: `.conn`, `.bars`) and #20 round 1 rev 6 (`.sig`). Four bars from LiveKit's ConnectionQuality; the Field Rep's large
   with the received resolution beside them, the page's own small. Lost gets a cross, Unknown is dashed and neutral. The word is text in the host's ink. Only tokens: --ok, --warn, --danger, --border-strong. */
.conn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: 700 var(--fs-xs) var(--font-sans); color: inherit; min-width: 0; }
.conn.lg { font-size: var(--fs-sm); }
.conn.sm { font-weight: 400; }
.conn-who, .conn-res { font-weight: 400; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; flex: 0 0 auto; position: relative; }
.bars.sm { height: 11px; gap: 1px; }
.bars i { display: block; width: 4px; border-radius: 1px; background: var(--border-strong); opacity: 0.45; }
.bars.sm i { width: 3px; }
.bars i:nth-child(1) { height: 25%; } .bars i:nth-child(2) { height: 50%; } .bars i:nth-child(3) { height: 75%; } .bars i:nth-child(4) { height: 100%; }
.bars i.on { opacity: 1; background: var(--ok); }
.bars-poor i.on { background: var(--warn); }
.bars-lost i { background: var(--danger); opacity: 0.3; }
.bars-lost::after { content: "✕"; position: absolute; inset: -3px -2px; display: grid; place-items: center; font: 800 12px/1 var(--font-sans); color: var(--danger); }
.bars-unknown i { background: transparent; border: 1px dashed var(--border-strong); box-sizing: border-box; opacity: 0.7; }
.conn[hidden] { display: none; }

/* The Coordinator's live screen, the tracer (#58): ported from #19 round 1 rev 4, arrangement B's frame (prototype/19-live-session-screen @ 018e4fa
   and #28's surfaces/live @ 15281bf). This sheet only ADDS rules and never redefines a theme token. Text colours are --text and --text-secondary,
   or the shell family on the navy stage. The responsive queries live here (conventions rule 5). */

.live-wrap { min-width: 0; }
.live { display: grid; gap: var(--sp-3); min-width: 0;
  /* the video's height cap (#19: the stage never pushes the controls off screen); with the Pictures board and the picker still to come it keeps the approved D1 value */
  --stage-max-h: min(calc(100vh - 340px), 50vh, 1080px); }
.live .page-head { align-items: center; }
.live .page-head .spacer { flex: 1 1 0; }
.live .head-chip { display: inline-flex; }

/* the stage: a true 16:9 video area on the shell navy, capped at 1920 x 1080 (owner ruling 2026-10-15) */
.live .stage { display: flex; flex-direction: column; background: var(--shell-bg); color: var(--shell-text); border-radius: var(--radius-lg); overflow: hidden; min-width: 0; }
.live .stage-video { position: relative; box-sizing: border-box; width: min(100%, calc(var(--stage-max-h) * 16 / 9), 1920px); max-width: 100%; max-height: 1080px; aspect-ratio: 16 / 9; margin: 0 auto;
  background: var(--shell-bg-raised); background-image: radial-gradient(ellipse at 50% 40%, var(--shell-bg-raised) 0%, var(--shell-bg) 85%);
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-3); overflow: hidden; }
.live .stage-feed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.live .stage-feed[hidden] { display: none; }
.live .stage-top { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--shell-text-active); }
.live .stage-top .spacer, .live .rail .spacer { flex: 1 1 0; min-width: 0; }
.live .live-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-sm); background: var(--brand-gold); color: var(--brand-ink); font: 800 var(--fs-xs) var(--font-sans); letter-spacing: 0.08em; }
.live .live-chip.off { background: var(--shell-bg-raised); color: var(--shell-text-active); border: 1px solid var(--shell-border); }
.live .stage-who { font-weight: 700; }
.live .cam-chip { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--shell-border); border-radius: var(--radius-pill); color: var(--shell-text-active); font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; background: rgb(0 0 0 / 0.25); }
.live .cam-chip[hidden] { display: none; }
.live .room-timer { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; color: var(--shell-text-active); font: 700 var(--fs-sm) var(--font-mono); font-variant-numeric: tabular-nums; }
.live .room-timer .lbl { font: 700 var(--fs-xs) var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--shell-text); }
.live .room-timer.idle .rt-val { font: 400 var(--fs-sm) var(--font-sans); }
.live .pillar { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); aspect-ratio: 9 / 16; height: 100%; border-left: 1px dashed var(--shell-border); border-right: 1px dashed var(--shell-border); background: rgb(255 255 255 / 0.03); pointer-events: none; }
.live .pillar[hidden] { display: none; }

/* the stage's own words when there is no video: one block, its own text per state */
.live .stage-centre { position: relative; z-index: 1; align-self: center; display: grid; justify-items: center; gap: 8px; }
.live .stage-centre:empty { display: none; }
.live .stage-state { display: grid; justify-items: center; gap: 4px; text-align: center; max-width: 44ch; padding: 10px 14px; border-radius: var(--radius-md); background: var(--shell-bg); color: var(--shell-text-active); }
.live .ss-glyph { display: inline-block; font: 800 18px/1 var(--font-sans); color: var(--brand-gold); }
.live .ss-glyph::before { content: attr(data-glyph); }
.live .ss-lost .ss-glyph, .live .ss-unreachable .ss-glyph, .live .ss-removed .ss-glyph { color: var(--danger); }
.live .ss-title { font-size: var(--fs-md); }
.live .ss-text { font-size: var(--fs-xs); color: var(--shell-text); line-height: 1.45; }
.live .stage[data-state="paused"] .stage-video { background-image: none; }
.live .stage[data-state="frozen"] .stage-video .stage-state { background: rgb(0 8 20 / 0.82); }
.live .stage[data-state="frozen"] .ss-glyph { color: var(--brand-gold); }
.live .live-toast { max-width: 44ch; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font-size: var(--fs-sm); line-height: 1.4; text-align: center; box-shadow: var(--shadow, 0 6px 18px rgb(0 0 0 / 0.3)); }
.live .stage[data-state="unreachable"] .stage-video { background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgb(255 255 255 / 0.04) 14px 16px); }

/* the rail under the video: who is on the call, and the Room control */
.live .rail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 8px var(--sp-4); border-top: 1px solid var(--shell-border); color: var(--shell-text-active); font-size: var(--fs-sm); min-width: 0; }
.live .rail-cmds { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; margin-left: auto; }
.live .rail-conn { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 4px 12px; min-width: 0; } /* the signal bars (#79): the Field Rep's, then the Coordinator's own */
.live .rail-conn .conn { color: var(--shell-text-active); }
.live .room-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.live .room-ctl .btn { white-space: nowrap; }
/* a surface-filled secondary on the navy: its own ground, legible in both themes */
.live .stage .btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--text-secondary); }
.live .stage .btn[disabled] { background: var(--surface-sunken); color: var(--text-secondary); border: 1px dashed var(--border-strong); }
/* #38 seam (recorded defect, owner 2026-11-03: "the Midnight Start Room 1 button doesn't look like a button"): in Midnight the primary button token (--btn-primary-bg
   #00043A) is the stage's own navy (--shell-bg #00043A), so only the label showed. A primary on the stage takes the brand gold with dark text (#000814 on #FFBC00),
   in both themes, as the phone's Continue does. Start Room is the only primary on the stage. */
.live .stage .btn-primary { background: var(--brand-gold); color: var(--brand-ink); border: 1px solid var(--brand-gold); }
.live .stage .btn-primary:hover { background: var(--brand-gold-300); border-color: var(--brand-gold-300); }
.live .stage .btn-primary[disabled] { background: var(--surface-sunken); color: var(--text-secondary); border: 1px dashed var(--border-strong); }

/* the standing notices above the stage (#19 rev 4, ported from the prototype's .shell-notices .notice): the solo warning is one. It is --text-secondary on --surface-sunken with a warn
   rule, and the ! is --warn-glyph, never --warn on --warn-bg. */
.live .live-notices { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.live .live-notices:empty { display: none; }
/* Processing Hub's changes since the last Room (#72; prototype.css `.resumed`): a quiet band over the video, never a standing notice (it does not shrink the video) */
.live .ph-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; padding: 8px 12px; background: var(--selection-bg); border: 1px solid var(--brand-gold); border-radius: var(--radius-md); font-size: var(--fs-sm); line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.live .ph-banner[hidden] { display: none; }
.live .ph-banner .ph-banner-t { flex: 1 1 320px; min-width: 0; }
.live .ph-banner .ph-banner-act { margin-left: auto; min-height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); }
.live .ph-banner .ph-banner-act[aria-pressed="true"] { border-color: var(--link); }
@media (pointer: coarse), (max-width: 600px) { .live .ph-banner .ph-banner-act { min-height: 44px; } }
.live .notice { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--surface-sunken); color: var(--text-secondary); padding: 10px 12px; font-size: var(--fs-sm); line-height: 1.5; overflow-wrap: anywhere; }
.live .notice b { color: var(--text); }
.live { --warn-glyph: color-mix(in srgb, var(--warn) 85%, var(--text)); } /* the ! glyph of the warn recipe (prototype.css, #8) */
.live .notice .warn-glyph { font-weight: 800; color: var(--warn-glyph); flex: 0 0 auto; }
.live .notice .notice-t { flex: 1 1 320px; min-width: 0; }
/* the solo line on the stage (ADR-0008, 2026-10-23): slim, at the video's foot, the countdown in mono */
.live .solo-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; margin: 0 auto; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--shell-bg); border: 1px solid var(--warn); color: var(--shell-text-active); font: 700 var(--fs-xs) var(--font-sans); max-width: 100%; position: relative; z-index: 1; }
.live .solo-line[hidden] { display: none; }
.live .solo-left { font-variant-numeric: tabular-nums; }

.live .live-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--danger-bg); color: var(--text); border: 1px solid var(--danger); border-left-width: 4px; font-size: var(--fs-sm); font-weight: 700; }
.live .live-alert[hidden] { display: none; }
.live .live-status { margin: 0; min-height: 1.2em; }

/* the guest links: shown and copyable */
.live .live-links { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); min-width: 0; }
.live .live-links h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.live .link-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; min-width: 0; }
.live .link-label { font-weight: 700; }
.live .link-value { min-width: 0; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--surface-sunken); border: 1px solid var(--border); color: var(--text); font-size: var(--fs-xs); overflow-wrap: anywhere; user-select: all; }
.live .link-hint { margin: 0; }

@media (max-width: 768px) {
  .live { --stage-max-h: 60vh; }
}
@media (max-width: 600px) {
  .live .stage-top { gap: 6px; }
  .live .room-timer { font-size: var(--fs-xs); }
  .live .cam-chip { display: none; }
  .live .stage-state { padding: 6px 10px; max-width: 100%; }
  .live .ss-text { display: none; } /* phone: the title says it; the words stay in the stage's label for a screen reader (the block is a status) */
  .live .rail { gap: 6px 10px; padding: 8px 10px; }
  .live .solo-line { font-size: 11px; padding: 3px 8px; }
  .live .btn { min-height: 44px; }
  .live .link-row { grid-template-columns: minmax(0, 1fr) auto; }
  .live .link-label { grid-column: 1 / -1; }
}
@media (pointer: coarse) {
  .live .btn { min-height: 44px; }
}

/* Picture capture (#67): Take Picture, the capture card and the Pictures in Unfiled. Ported from #19 rev 4 (`.capture`, the Saving… placeholder, `.tile`, `.pgrid`; prototype/19-live-session-screen @ 018e4fa)
   and #28 round 4's capture card (owner 2026-10-29; prototype/28-whole-app @ 15281bf, surfaces/live). The board's sections, filing and the viewer are #70's; here every Picture is in Unfiled. */
.live .capture { min-height: 48px; padding: 0 22px; font-size: var(--fs-md); flex: 0 0 auto; white-space: nowrap; }
.live .capture[hidden] { display: none; }
/* #38 seam: a gold accent button on the stage keeps its ground in both themes (the theme's accent token is gold with dark text); the disabled look is the stage's own (legible, dashed) */
.live .stage .btn-accent { background: var(--btn-accent-bg); color: var(--btn-accent-fg); border: 1px solid var(--btn-accent-bg); }
.live .stage .btn-accent[disabled] { background: var(--surface-sunken); color: var(--text-secondary); border: 1px dashed var(--border-strong); opacity: 1; }
.live .stage .btn-accent:hover:not([disabled]) { background: var(--btn-accent-hover); border-color: var(--btn-accent-hover); }

.live .cap-anchor { position: relative; z-index: 4; height: 0; width: min(100%, calc(var(--stage-max-h) * 16 / 9), 1920px); max-width: 100%; margin: 0 auto; pointer-events: none; }
.live .cap-card { position: absolute; right: var(--sp-3); bottom: var(--sp-3); width: 172px; display: grid; grid-template-rows: auto 1fr; padding: 0; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; cursor: pointer; box-shadow: var(--shadow, 0 6px 18px rgb(0 0 0 / 0.3)); pointer-events: auto; opacity: 1; transition: opacity 0.4s ease; }
.live .cap-card:hover { border-color: var(--text-secondary); }
.live .cap-card:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.live .cap-card.out { opacity: 0; pointer-events: none; }
.live .cap-img { display: flex; align-items: center; height: 40px; padding: 0 8px; background-color: var(--surface-sunken); background-image: repeating-linear-gradient(45deg, transparent 0 7px, var(--border) 7px 9px); }
.live .cap-time { font-size: var(--fs-sm); font-weight: 700; color: var(--text); background: var(--surface); padding: 0 6px; border-radius: var(--radius-sm); }
.live .cap-target { padding: 6px 8px 8px; font-size: var(--fs-xs); line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }

/* Take Picture while the camera is paused (ADR-0002, 2026-10-23): disabled, the ruled words wrap inside the button */
.live .capture.paused { white-space: normal; text-align: center; font-size: var(--fs-sm); padding: 6px 14px; max-width: 26ch; line-height: 1.3; }
/* the permanent "from video" mark on a tile (ADR-0002, 2026-10-21): the interface only, never in the image */
.live .tag-video { display: inline-block; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; }

.live .live-pics { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); min-width: 0; }
.live .pics-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.live .pics-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.live .pics-where { font-weight: 700; color: var(--text); }
.live .pics-count { margin-left: auto; }
.live .pics-empty { margin: 0; }
.live .pics-empty[hidden] { display: none; }
.live .pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.live .pgrid:empty { display: none; }
.live .tile { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; box-sizing: border-box; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); text-align: left; overflow: hidden; font: inherit; }
.live .tile[tabindex="0"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.live .thumb-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-sunken); }
.live .thumb { aspect-ratio: 4 / 3; background-color: var(--surface-sunken); background-image: repeating-linear-gradient(45deg, transparent 0 7px, var(--border) 7px 9px); }
.live .tile.ghost { border-style: dashed; border-color: var(--border-strong); }
.live .ghost-thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-sunken); }
.live .tile .seq, .live .tile .tile-time { color: var(--text); }
.live .tile.ghost .seq, .live .tile.ghost .saving, .live .tile.ghost .tile-prov { color: var(--text-secondary); }
.live .tile.ghost .saving { font: 700 var(--fs-xs) var(--font-sans); }
.live .tile-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 4px; padding: 3px 6px 0; font-size: var(--fs-xs); min-width: 0; }
.live .tile-prov { padding: 0 6px 4px; font-size: var(--fs-xs); min-width: 0; }
.live .tile-cap { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-style: italic; }
.live .spinner.sm { width: 12px; height: 12px; border-width: 2px; }

@media (max-width: 600px) {
  .live .capture { padding: 0 14px; }
  .live .capture.paused { max-width: 196px; font-size: var(--fs-xs); padding: 4px 10px; }
  .live .cap-card { width: 148px; }
}
@media (prefers-reduced-motion: reduce) { .live .cap-card { transition: none; } }

/* The two columns (#81; #19's layout D1, ported from prototype.css `.v-d1`): the video and what is filed on the left, the Target card, or the Session log pane over it, on the right, sticky and scrolling by
   itself. The column widths are the prototype's (420px, 380px to 1280px, 340px to 1024px, 520px from 1800px, 28% from 2200px). Below 769px it is one column again, in the order the single column had. */
.live .live-cols { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: var(--sp-4); align-items: start; min-width: 0; }
.live .live-left { display: grid; gap: var(--sp-3); min-width: 0; align-content: start; }
.live .live-right { position: sticky; top: var(--sp-3); max-height: var(--right-h, calc(100vh - var(--shell-topbar-h, 52px) - 88px)); overflow-y: auto; min-width: 0; display: grid; gap: var(--sp-3); align-content: start; }
@media (min-width: 1800px) { .live .live-cols { grid-template-columns: minmax(0, 1fr) 520px; } }
@media (min-width: 2200px) { .live .live-cols { grid-template-columns: minmax(0, 1fr) min(28%, 760px); } }
@media (max-width: 1280px) { .live .live-cols { grid-template-columns: minmax(0, 1fr) 380px; } }
@media (max-width: 1024px) { .live .live-cols { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 768px) {
  .live .live-cols { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .live .live-left, .live .live-right { display: contents; }
  .live .stage { order: 1; }
  .live .gx-knocks { order: 2; }
  .live .target-card { order: 3; }
  .live .live-pics { order: 4; }
  .live .live-status { order: 5; }
  .live .live-links { order: 6; }
}

/* The people tiles in the rail (#81; #19 rev 3: icon badges, rev 4: capped at three plus "+n more", the tiles give way before the rail takes a third row): `.mtile` ported from prototype.css */
.live .rail-people { display: contents; }
.live .mtiles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.live .mtile { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 1px; align-items: center; padding: 4px 8px 4px 4px; border-radius: var(--radius-md); background: var(--shell-bg-raised); color: var(--shell-text-active); border: 1px solid var(--shell-border); font-size: var(--fs-xs); min-width: 0; max-width: 100%; }
.live .mt-vid { width: 40px; height: 28px; border-radius: 3px; background: var(--shell-bg); background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgb(255 255 255 / 0.06) 5px 6px); grid-row: 1 / span 2; }
.live .mt-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.live .mt-role { color: var(--shell-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live .mtile:has(.mt-stat) { grid-template-columns: auto minmax(0, 1fr) auto; }
.live .mt-stat { grid-column: 3; grid-row: 1 / span 2; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--warn); background: var(--warn-bg); color: var(--text); }
.live .mt-stat svg { display: block; }
.live .mt-more { white-space: nowrap; }
.live .rail.rail-tighter .mt-vid { display: none; }
.live .rail.rail-tighter .mtile { grid-template-columns: minmax(0, 1fr); padding: 2px 8px; }
.live .rail.rail-tighter .mtile:has(.mt-stat) { grid-template-columns: minmax(0, 1fr) auto; }
.live .rail.rail-tighter .mt-stat { grid-column: 2; }
.live .rail.rail-tightest .mt-name, .live .rail.rail-tightest .mt-role { max-width: 76px; }
.live .rail.rail-tighter .stage-target { flex-basis: 120px; } /* where the next Picture goes gives way to the commands, so the rail keeps its two rows */
@media (max-width: 600px) {
  .live .mt-name { max-width: 110px; }
  .live .mtile { padding: 2px 6px 2px 2px; }
  .live .mt-vid { width: 32px; height: 22px; }
}

/* The Session log button and the pane (#81; #19 rev 4, #26 rev 6's live mode): the pane stands in the right column over the Target card, which is covered while it is open and back, untouched, when it closes.
   Its own rules are #26's (`.sl`, in the Session page's sheet); these are the frame: a card that clips at its border, the legend giving way before the feed, the feed scrolling by itself. */
.live .btn-log { white-space: nowrap; }
.live .live-log[hidden] { display: none; }
.live .live-right[data-pane="open"] { display: flex; flex-direction: column; gap: var(--sp-3); height: var(--right-h, calc(100vh - var(--shell-topbar-h, 52px) - 88px)); overflow: hidden; }
.live .live-right[data-pane="open"] .live-log { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.live .live-right[data-pane="open"] .target-card, .live .live-right[data-pane="open"] .mini-band { display: none; }
.live .sl-pane { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-3) var(--sp-4); box-sizing: border-box; min-width: 0; overflow: hidden; --ring-c: var(--link); }
:root[data-theme="dark"] .live .sl-pane { --ring-c: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .live .sl-pane { --ring-c: var(--text); } }
.live .sl-pane .pane-h { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.live .sl-pane .pane-h h3 { margin: 0; font-size: var(--fs-md); }
.live .sl-pane .pane-h .x { margin-left: auto; min-width: 32px; justify-content: center; font-size: var(--fs-lg); line-height: 1; }
.live .sl-pane .pane-h, .live .sl-pane .flt, .live .sl-pane .pane-f { flex: 0 0 auto; }
.live .sl-pane .lgd { flex: 0 1 auto; min-height: 34px; overflow-y: auto; }
.live .sl-pane .pane-l { flex: 1 1 auto; overflow-y: auto; min-height: 120px; }
.live .sl-pane .pane-l:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.live .sl-pane .pane-f { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 6px; border-top: 1px solid var(--border); }
.live .sl-pane .rh { background: var(--surface); }
.live .sl-pane .flt-tog { display: none; white-space: nowrap; }
@media (max-width: 899px) {
  .live .sl-pane .flt-c .flt-tog { display: inline-flex; }
  .live .sl-pane .flt-c .fgrp { display: none; }
  .live .sl-pane .flt-c.is-open .fgrp { display: flex; }
}
@media (max-width: 768px) {
  /* one column: the pane is a full-screen sheet over the page, with the gold rule on its top edge (#26's phone rule) */
  .live .live-right[data-pane="open"] { display: contents; }
  .live .live-right[data-pane="open"] .live-log { position: fixed; inset: 0; z-index: 40; flex: none; display: flex; background: var(--surface); }
  .live .live-right[data-pane="open"] .sl-pane { border: 0; border-radius: 0; border-top: 3px solid var(--brand-gold); padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); }
  .live .sl-pane .pane-l { min-height: 0; }
}
@media (max-width: 600px) {
  .live .sl-pane .btn, .live .sl-pane .fchip, .live .sl-pane .rh-b, .live .sl-pane .lgd summary, .live .sl-pane .anc-b { min-height: 44px; }
  .live .sl-pane .anc-b { min-width: 44px; justify-content: center; }
  .live .sl-pane .btn.x { min-width: 44px; }
  .live .sl-pane .srch .input { min-height: 44px; }
}

/* The mini feed (#81; #28 round 3, owner-ruled 2026-10-28): a small 16:9 copy of the live video at the top of the sticky right column while the main video is out of view; it is a button back to the video.
   The band spans the column and covers what scrolls under it, so nothing of the Target card shows beside or through it. */
.live .mini-band { position: sticky; top: 0; z-index: 3; box-sizing: border-box; width: 100%; padding: 0 0 var(--sp-3); margin: 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.live .mini-band[hidden] { display: none; }
.live .mini-feed { position: relative; display: flex; flex-direction: column; justify-content: flex-start; box-sizing: border-box; width: min(100%, 240px); aspect-ratio: 16 / 9; margin: 0; padding: 8px 10px; border: 1px solid var(--shell-border); border-radius: var(--radius-lg); background: var(--shell-bg); color: var(--shell-text-active); font: 700 var(--fs-xs) var(--font-sans); text-align: left; cursor: pointer; overflow: hidden; }
.live .mini-feed:hover { border-color: var(--brand-gold); }
.live .mini-feed:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.live .mf-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; pointer-events: none; }
.live .mf-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.live .mf-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--shell-text-active); text-shadow: 0 0 4px var(--shell-bg); }
@media (max-width: 768px) { .live .mini-band { display: none; } }

/* The shell's icon rail on this screen (#19's responsive contract, conventions rule 5: a surface redefines the shell's layout tokens inside its own breakpoints; prototype.css @media (max-width: 1280px)):
   from 901px to 1280px the sidebar is the 60px rail, the mark alone and the letter tiles, so the two columns keep a video worth watching at 1024 and 1280. The labels stay for assistive technology (clipped,
   not removed). The scope is the live screen's own page; every other page keeps the 232px sidebar. */
@media (min-width: 901px) and (max-width: 1280px) {
  :root:has([data-live]) { --shell-sidebar-w: 60px; }
  :root:has([data-live]) .shell-logo .app-name { display: none; }
  :root:has([data-live]) .shell-logo img { width: 24px; object-fit: cover; object-position: left; }
  :root:has([data-live]) .shell-nav .nav-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  :root:has([data-live]) .shell-nav a { justify-content: center; padding-left: 0; padding-right: 3px; }
}
@media (min-width: 901px) and (max-width: 1024px) {
  :root:has([data-live]) .shell-content { padding: var(--sp-4); }
}

/* Wrapping up a call (#83): the "required shots still missing" line at a Room's start and the once-only upload offer, ported from #19 rev 4 (`.missing-line`, `.offer-card`, `.note`;
   prototype/19-live-session-screen @ 018e4fa) in the standing-notice recipe this sheet already uses (--text on --surface-sunken with a rule), and End call's overlay (`.ec-*`), which lives in the dialog host. */
.live .live-wrapup { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.live .live-wrapup:empty { display: none; }
.live .link-btn { display: inline; padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.live .link-btn:hover { color: var(--link-hover, var(--link)); }
.live .link-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.live .missing-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px 6px 12px; border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--surface-sunken); color: var(--text); font-size: var(--fs-sm); line-height: 1.45; }
.live .missing-line .warn-glyph { font-weight: 800; color: var(--warn-glyph); flex: 0 0 auto; }
.live .missing-line .ml-t { flex: 1 1 240px; min-width: 0; }
.live .missing-line .ml-x { margin-left: auto; min-width: 32px; justify-content: center; }
.live .offer-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-left: 4px solid var(--link); border-radius: var(--radius-md); background: var(--surface); color: var(--text); font-size: var(--fs-sm); line-height: 1.45; }
.live .offer-card p { margin: 0; flex: 1 1 320px; min-width: 0; max-width: 70ch; }
.live .offer-acts { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; }
.live .offer-card .btn-secondary { border-color: var(--text-secondary); }

.endcall-dialog { width: min(560px, 100%); }
.endcall-dialog .ec-body { display: grid; gap: var(--sp-3); font-size: var(--fs-sm); line-height: 1.5; }
.endcall-dialog .ec-lead { margin: 0; max-width: 60ch; }
.endcall-dialog .ec-list { display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.endcall-dialog .ec-unit { display: grid; gap: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-sunken); }
.endcall-dialog .ec-cat { display: grid; gap: 4px; padding-left: 10px; border-left: 2px solid var(--border-strong); }
.endcall-dialog .ec-catname { font-weight: 700; color: var(--text-secondary); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; }
.endcall-dialog .ec-comp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.endcall-dialog .ec-compname { font-weight: 700; }
.endcall-dialog .ec-slot { font: 400 var(--fs-xs) var(--font-sans); color: var(--text); padding: 1px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); white-space: nowrap; }
.endcall-dialog .ec-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.endcall-dialog .btn-secondary { border-color: var(--text-secondary); }

@media (max-width: 600px) {
  .live .offer-card .btn, .live .offer-acts { flex: 1 1 auto; }
  .live .offer-card .btn { justify-content: center; }
  .live .missing-line .ml-x { min-width: 44px; min-height: 44px; }
  .endcall-dialog .ec-foot .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
}
@media (pointer: coarse) {
  .endcall-dialog .btn { min-height: 44px; }
}

/* Recording ranges (#74, ADR-0005): the Record control beside Take Picture and the ranges list under the stage. Ported from #19 rev 4 (`.rec-ctl`, `.rec-live`, `.ranges`, `.rg-row`; prototype/19-live-session-screen @ 018e4fa).
   "● Record · ‹armed target›" (owner 2026-10-23: no arrow); while a range is open, "● Recording mm:ss · target", Stop, and "● New range · ‹armed›" when the armed target differs. */
.live .rec-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; color: var(--shell-text-active); font-size: var(--fs-sm); }
.live .rec-ctl[hidden] { display: none; }
.live .rec-dot { color: var(--danger); font-size: 12px; line-height: 1; font-style: normal; }
.live .rec-dot::before { content: "●"; }
.live .rec-start .rec-dot, .live .rec-new .rec-dot { margin-right: 6px; }
.live .rec-tgt { display: inline-flex; align-items: baseline; min-width: 0; max-width: 12ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live .rec-tgt b { font-family: var(--font-mono); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.live .rec-sep { white-space: pre; }
.live .rec-live { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--shell-bg); border: 1px solid var(--danger); font: 700 var(--fs-xs) var(--font-sans); letter-spacing: 0.04em; white-space: nowrap; max-width: 100%; min-width: 0; }
.live .rec-live .rec-elapsed { font-variant-numeric: tabular-nums; }
.live .rec-live .rec-target { font-weight: 400; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 22ch; }
.live .rec-start, .live .rec-stop, .live .rec-new { white-space: nowrap; }
/* "New range" is a ghost on the stage's navy: the theme's ghost is for the page's ground, so it takes the rail's own text and edge */
.live .stage .btn-ghost.rec-new { background: transparent; color: var(--shell-text-active); border: 1px solid var(--shell-border); }
.live .stage .btn-ghost.rec-new:hover { background: var(--shell-bg-raised); }
/* the rail keeps its two rows: the open range's pill gives up its path (the full path is in its title and the list) before the commands wrap onto a third */
@media (max-width: 1600px) { .live .rec-live .rec-target, .live .rec-ctl:has(.rec-live) .rec-new .rec-tgt { display: none; } }
@media (min-width: 601px) and (max-width: 1024px) { .live .rec-start, .live .rec-stop, .live .rec-new { padding-inline: 8px; } .live .rec-start .rec-dot, .live .rec-new .rec-dot { margin-right: 4px; } .live .rail-cmds { column-gap: 4px; } .live .rail-cmds .capture { padding: 0 16px; } }
@media (max-width: 1024px) { .live .rec-tgt { display: none; } } /* the foot stays one row on a 1024 x 768 laptop: the target is in the button's name and title */

.live .ranges { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); min-width: 0; }
.live .rg-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 4px 10px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-md); }
.live .rg-head:hover { background: var(--surface-sunken); }
.live .rg-head:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.live .rg-head .twisty { width: 20px; display: inline-grid; place-items: center; color: var(--text-secondary); font-size: 12px; }
.live .rg-title { font-weight: 800; font-size: var(--fs-sm); }
.live .rg-list, .live .rg-earlier { border-top: 1px solid var(--border); }
.live .rg-earlier { padding: 6px 0 0; }
.live .rg-earlier .lvl-key { display: inline-block; padding: 4px 12px; }
.live .rg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 12px; border-top: 1px solid var(--border); font-size: var(--fs-sm); min-width: 0; scroll-margin: 12px; }
.live .rg-list .rg-row:first-child { border-top: 0; }
.live .rg-row.rg-open { background: var(--selection-bg); }
/* #19 rev 3 (#26's ruling 2026-10-26): the row an anchor-chip jump landed on keeps a gold edge until another range is picked; it rings on arrival (.ring) */
.live .rg-row.is-sel { box-shadow: inset 3px 0 0 var(--brand-gold); }
.live .rg-row:focus { outline: none; }
.live .rg-row:focus-visible, .live .rg-row.ring { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.live .rg-span { white-space: nowrap; font-size: var(--fs-xs); }
.live .rg-target { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.live .rg-row .spacer { flex: 1 1 0; }
.live .rg-empty { padding: 8px 12px; margin: 0; }
.live .rg-tag { display: inline-block; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; line-height: 1.5; }
.live .rg-tag-rec { border-color: var(--danger); }
.live .rg-tag-pending { background: var(--warn-bg); border-color: var(--warn); }
.live .rg-tag-tomb { background: transparent; border-style: dotted; color: var(--text-secondary); }
.live .rg-row .act { white-space: nowrap; }
@media (max-width: 768px) { .live .ranges { order: 3; } }
@media (max-width: 600px) {
  .live .rec-ctl .rec-word, .live .rec-tgt, .live .rec-live .rec-target { display: none; } /* phone width: the Record control is its glyph alone, 44 x 44, named for assistive tech */
  .live .rec-start, .live .rec-stop, .live .rec-new { min-width: 44px; padding: 0 12px; }
  .live .rec-start .rec-dot, .live .rec-new .rec-dot { margin-right: 0; }
  .live .rg-head { min-height: 44px; }
}
@media (pointer: coarse) { .live .rg-head { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .live .rg-row.ring { transition: none; } }
/* the bars give way before the tiles do (#79): when the rail is tight the own bars drop their word (the name stays in the tooltip and the accessible name), then the lead words go */
.live .rail.rail-tighter .rail-conn .conn.sm .conn-txt { display: none; }
.live .rail.rail-tightest .rail-conn .conn-who { display: none; }
.live .rail.rail-tightest .rail-conn .conn.lg .conn-q { display: none; } /* at the tightest the Field Rep's word goes too: the bars, the resolution and the accessible name stay */
.live .rail.rail-tightest .rail-present { display: none; }

/* The Field Rep's phone controls (#80, ADR-0002; #19 rev 4's `.fr-ctl`, `.btn-cam`, `.btn-rot`): a labelled group of two secondary buttons in the rail, a divider apart from the Record, Take Picture, Session log and Room controls. Each is an icon plus the short
   label ("Camera", "Sideways") at every width, never icon-only. "Asked…" is a pressed state with the gold edge. The camera menu is a fixed box (placed by phone-controls.ts) so the stage's own clipping never cuts it. */
.live .fr-ctl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; padding-right: 10px; border-right: 1px solid var(--shell-border); }
.live .fr-ctl[hidden] { display: none; }
.live .fr-ctl .btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.live .fr-ctl .btn-rot.asked, .live .fr-ctl .btn-loc.asked { background: var(--selection-bg); border-color: var(--brand-gold); color: var(--text); }
/* "Asked…" is disabled (ruled) but it is a status, not a control that is unavailable: it keeps its full colour (the theme's 0.45 would measure 2.96:1) */
.live .fr-ctl .btn-rot.asked[disabled], .live .fr-ctl .btn-loc.asked[disabled] { opacity: 1; cursor: default; }
/* A phone control that is off keeps full opacity (the theme's 0.45 measures 2.06:1 on the rail): it reads as off by its secondary text colour, a dashed edge and its tooltip's reason. */
.live .fr-ctl .btn[disabled]:not(.asked) { opacity: 1; color: var(--text-secondary); border-style: dashed; }
.live .fr-ctl .fr-ico { display: inline-grid; place-items: center; }
.live .fr-ctl .fr-ico svg { display: block; }
.live .fr-ctl .asked .fr-ico { color: var(--brand-gold); }
.live .fr-menu { position: fixed; z-index: 30; display: grid; gap: 2px; min-width: 170px; max-width: calc(100vw - 16px); padding: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow, 0 6px 18px rgb(0 0 0 / 0.3)); }
.live .fr-menu[hidden] { display: none; }
.live .fr-menu-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.live .fr-menu-item:hover { background: var(--surface-sunken); }
.live .fr-menu-item:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.live .fr-menu-mark { width: 16px; height: 16px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--border-strong); box-sizing: border-box; display: inline-grid; place-items: center; }
.live .fr-menu-item[aria-checked="true"] .fr-menu-mark { border-color: var(--check); }
.live .fr-menu-item[aria-checked="true"] .fr-menu-mark::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--check); }
.live .fr-menu-item[aria-checked="true"] { font-weight: 700; }
@media (max-width: 600px) { .live .fr-ctl .btn, .live .fr-menu-item { min-height: 44px; } }
/* The rail holds two rows at 1024 (owner 2026-10-26): with the phone controls (#80) the commands need the same compaction the Record and Take Picture buttons already take (#74). */
@media (min-width: 601px) and (max-width: 1100px) {
  .live .fr-ctl { gap: 4px; }
  .live .fr-ctl .btn { padding-inline: 6px; gap: 4px; }
  .live .rail-cmds .btn-log, .live .rail-cmds .btn-end { padding-inline: 8px; }
  .live .rail-cmds .capture { padding: 0 12px; }
  /* With the phone controls the commands fill a row, so the tiles give way once more at the tightest tier: the count ("n on the call") goes (the tiles say it) and names and roles shorten further, whole in the tooltip. */
  .live .rail.rail-tightest .rail-present { display: none; }
  .live .fr-ctl { padding-right: 6px; }
  .live .rail.rail-tightest .mt-name, .live .rail.rail-tightest .mt-role { max-width: 54px; }
}
/* Above 1100px the commands row also holds the Record control's open-range pill and "New range", so the phone controls stay compact there too (#80). */
@media (min-width: 1101px) {
  .live .fr-ctl { gap: 4px; }
  .live .fr-ctl .btn { padding-inline: 8px; gap: 5px; }
}
@media (min-width: 601px) { .live .rail.rail-tightest .rail-present { display: none; } }
/* At the tightest tier (1024 with three people, the bars and the phone controls) the next-Picture line gives up its label and shrinks to its path (ellipsized, the whole of it in the tooltip) so it keeps the first row (#80). */
@media (min-width: 601px) and (max-width: 1100px) {
  .live .rail.rail-tightest .stage-target { flex: 1 1 60px; min-width: 0; flex-wrap: nowrap; }
  .live .rail.rail-tightest .stage-target .lvl-key { display: none; }
  .live .rail.rail-tightest .stage-target .tc-next-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (min-width: 601px) and (max-width: 1100px) {
  /* ... and the tiles lose their role line (the whole "name · role" stays in the tooltip) so three tiles, "+n more", the bars and the next-Picture path share the first row. */
  .live .rail.rail-tightest .mt-role { display: none; }
  .live .rail.rail-tightest .mt-name { max-width: 64px; }
}
/* The third phone control (Location, #96) at the rail's tightest tier (three people on the call): the phone controls sit in the commands' row there, so the group and the commands take their smallest padding to keep the two rows (owner ruling 2026-10-26); the labels and icons stay. */
@media (min-width: 601px) {
  .live .rail.rail-tightest .fr-ctl { gap: 2px; padding-right: 2px; }
  .live .rail.rail-tightest .fr-ctl .btn { padding-inline: 3px; gap: 3px; font-size: var(--fs-xs); }
  .live .rail.rail-tightest .rail-cmds { gap: 4px; }
  .live .rail.rail-tightest .rail-cmds .btn-log, .live .rail.rail-tightest .rail-cmds .btn-end { padding-inline: 4px; }
  .live .rail.rail-tightest .rail-cmds .capture { padding: 0 4px; }
  .live .rail.rail-tightest .rail-cmds .rec-start .rec-dot, .live .rail.rail-tightest .rail-cmds .rec-new .rec-dot { margin-right: 2px; }
  .live .rail.rail-tightest .rail-cmds .rec-start, .live .rail.rail-tightest .rail-cmds .rec-stop, .live .rail.rail-tightest .rail-cmds .rec-new { padding-inline: 4px; }
}

/* The Target card (#69): the picker of #8 round 2 rev 10, arrangement D1 (prototype/8-categorization-panel-r2 @ ec720b8, prototypes/8-categorization-panel-r2/prototype.css; ported via
   apps/web/src/organizing/reference/prototype.css). Class names carry a `tc-` prefix so nothing here can leak into another surface. This sheet only ADDS rules and never redefines a
   theme token. Armed is gold (a 2px outline outside the pill, the Armed pill and bar); selected is the primary fill; a count is the sunken chip. The card is a column with a fixed ceiling:
   the header, the armed bar, the search box and the action bar never scroll away, the levels between them do (the action bar is pinned to the card's foot). */

.live .target-card { display: flex; flex-direction: column; gap: 0; padding: 0; min-width: 0; max-height: min(560px, 70vh); overflow: hidden; }
.live .tc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: var(--sp-3) var(--sp-4) var(--sp-2); min-width: 0; }
.live .tc-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.live .tc-head .spacer { flex: 1 1 0; }
.live .tc-where { color: var(--text-secondary); }

.live .tc-armbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 var(--sp-4) var(--sp-2); padding: 8px 10px; border-radius: var(--radius-md); background: var(--brand-gold); border: 1px solid var(--brand-gold); color: var(--brand-ink); font-size: var(--fs-sm); min-width: 0; }
.live .tc-armbar.idle { background: var(--surface-sunken); border-color: var(--border); color: var(--text); }
.live .tc-armbar .ico { color: var(--brand-ink); }
.live .tc-armbar.idle .ico { color: var(--text-secondary); }
.live .tc-arm-path { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.live .tc-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-pill); font: 800 var(--fs-xs) var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.live .tc-armed-pill { background: var(--brand-ink); color: var(--brand-gold); }

.live .tc-search-wrap { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid var(--border); }
.live .tc-search { display: flex; align-items: center; gap: 6px; padding: 8px var(--sp-4); border-bottom: 1px solid var(--border); min-width: 0; }
.live .tc-search-ico { color: var(--text-secondary); flex: 0 0 auto; }
.live .tc-search-input { flex: 1 1 0; min-width: 0; min-height: 36px; font-size: var(--fs-sm); }
.live .tc-search-input::-webkit-search-cancel-button { display: none; }
.live .tc-search-count { padding: 6px var(--sp-4); font-size: var(--fs-xs); color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.live .tc-search-count[hidden], .live .tc-search-x[hidden] { display: none; }
.live .tc-search-count kbd { font: 700 var(--fs-xs) var(--font-mono); padding: 0 4px; border: 1px solid var(--border-strong); border-radius: 3px; }

.live .tc-levels { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.live .tc-state { margin: 8px var(--sp-4); padding: 8px 10px; font-size: var(--fs-sm); color: var(--text); }
.live .tc-section { border-bottom: 1px solid var(--border); min-width: 0; }
.live .tc-lvl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 2px var(--sp-4) 2px 10px; min-height: 36px; min-width: 0; }
.live .tc-toggle { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 2px 6px 2px 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; cursor: pointer; flex: 0 0 auto; }
.live .tc-toggle:hover { background: var(--surface-sunken); }
.live .tc-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.live .tc-twisty { width: 22px; height: 22px; display: inline-grid; place-items: center; color: var(--text-secondary); font-size: 12px; flex: 0 0 auto; }
.live .tc-lvl-key { font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.live .tc-lvl-sum { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; font-size: var(--fs-sm); color: var(--text); }
.live .tc-lvl-sum .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live .tc-rows-meta { min-width: 0; overflow-wrap: anywhere; }
.live .tc-lvl-body { min-width: 0; }

.live .tc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px var(--sp-4) 10px; min-width: 0; }
.live .tc-chip, .live .tc-slot { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; min-width: 0; max-width: 100%; box-sizing: border-box; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 700 var(--fs-sm) var(--font-sans); cursor: pointer; }
.live .tc-slot { font-size: var(--fs-xs); gap: 5px; padding: 2px 8px; }
.live .tc-chip .nm, .live .tc-slot .nm { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live .tc-chip .ico, .live .tc-slot .ico, .live .tc-chip .tc-cnt, .live .tc-slot .tc-cnt, .live .tc-tag, .live .tc-armed-tag, .live .tc-req { flex: 0 0 auto; }
.live .tc-chip:hover, .live .tc-slot:hover { background: var(--surface-sunken); }
.live .tc-chip:focus-visible, .live .tc-slot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.live .tc-chip.on, .live .tc-slot.on { background: var(--btn-primary-bg); color: var(--btn-primary-fg); border-color: var(--btn-primary-bg); }
.live .tc-chip.on .ico, .live .tc-slot.on .ico { color: var(--brand-gold); }
.live .tc-chip.armed, .live .tc-slot.armed { outline: 2px solid var(--brand-gold); outline-offset: 2px; border-color: var(--brand-gold); }
.live .tc-chip.omitted { border-style: dashed; cursor: default; color: var(--text-secondary); background: var(--surface-sunken); }
.live .tc-cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 1px 7px; line-height: 1.4; border-radius: var(--radius-pill); border: 1px solid transparent; background: var(--surface-sunken); color: var(--text); font: 700 var(--fs-xs) var(--font-mono); }
.live .tc-cnt.zero { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.live .tc-slot .tc-cnt { min-width: 18px; padding: 0 5px; }
.live .tc-chip.on .tc-cnt, .live .tc-slot.on .tc-cnt { background: var(--surface); color: var(--text); border-color: transparent; }
.live .tc-tag, .live .tc-armed-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: var(--radius-sm); font: 800 var(--fs-xs) var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.live .tc-tag { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.live .tc-armed-tag { background: var(--brand-gold); color: var(--brand-ink); }
/* "required · 0": the word, then the count (the prototype's `.req::before` middot) */
.live .tc-req { font: 400 var(--fs-xs) var(--font-sans); color: var(--text-secondary); white-space: nowrap; }
.live .tc-slot .tc-req::before { content: '·'; margin-right: 5px; }
.live .tc-slot .tc-req::after { content: '·'; margin-left: 5px; }
.live .tc-slot.on .tc-req { color: var(--btn-primary-fg); }
.live .tc-nomatch, .live .tc-slot-none { padding: 6px 0; min-width: 0; overflow-wrap: anywhere; }

.live .tc-table { margin: 2px var(--sp-4) 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; min-width: 0; }
.live .tc-trow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 4px 8px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; min-width: 0; }
.live .tc-trow:last-child { border-bottom: 0; }
.live .tc-trow.armed { background: var(--selection-bg); border-left-color: var(--brand-gold); }

/* the pinned action bar: always the card's last row, never scrolled away */
.live .tc-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px var(--sp-4); background: var(--surface-sunken); border-top: 1px solid var(--border); min-width: 0; flex: 0 0 auto; }
.live .tc-act-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; flex: 1 1 240px; }
.live .tc-act-sel b { min-width: 0; overflow-wrap: anywhere; }
.live .tc-act-btns { display: flex; align-items: center; gap: 6px; }
.live .tc-arm-btn { min-height: 40px; }
/* a Task ID's Arm button is off: legible and dashed, as the stage's disabled accent is, never the faded primary (4.5:1 on the bar) */
.live .tc-arm-btn[disabled] { background: var(--surface-sunken); color: var(--text-secondary); border: 1px dashed var(--border-strong); opacity: 1; cursor: not-allowed; }
.live .tc-guide { flex-basis: 100%; font-style: italic; }
.live .tc-why { flex: 1 1 100%; margin: 0; }

@media (max-width: 600px) {
  .live .target-card .btn, .live .target-card button { min-height: 44px; min-width: 44px; }

  .live .tc-chip, .live .tc-slot { min-height: 44px; }
  .live .tc-toggle { min-height: 44px; }
  .live .target-card { max-height: min(520px, 72vh); }
}
@media (pointer: coarse) {
  .live .target-card .btn, .live .tc-chip, .live .tc-slot, .live .tc-toggle { min-height: 44px; }
}

/* hierarchy editing (#71): the "+ Level" pill, the inline form, the quiet x, Show removed and a tombstone with its Restore (prototype.css: .pchip.add, .add-form, .act-x, .pchip.tomb, .btn-restore) */
.live .tc-removed-tgl { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px; font-size: var(--fs-sm); color: var(--text); cursor: pointer; }
.live .tc-removed-tgl input { width: 16px; height: 16px; margin: 0; }
.live .tc-chip.tc-add { border-style: dashed; color: var(--link); background: transparent; }
.live .tc-chip.tc-add:hover { background: var(--surface-sunken); }
.live .tc-chip.tomb { border-style: dotted; cursor: default; color: var(--text-secondary); background: transparent; flex-wrap: wrap; }
.live .tc-chip.tomb:hover { background: transparent; }
.live .tc-chip.tomb s { color: var(--text-secondary); }
.live .tc-chip.tomb .meta { white-space: nowrap; }
.live .tc-tag.tag-tomb { background: transparent; border-style: dotted; color: var(--text-secondary); }
.live .tc-trow.tomb { border-left: 3px dotted var(--border-strong); color: var(--text-secondary); }
.live .tc-trow.tomb s { color: var(--text-secondary); }
.live .tc-trow.tomb .tomb-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.live .tc-restore { font-size: var(--fs-xs); padding: 4px 8px; min-height: 32px; border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); flex: 0 0 auto; }
.live .tc-restore:hover, .live .tc-restore:focus-visible { border-color: var(--link); color: var(--link); }
.live .tc-x { width: 32px; min-width: 32px; padding: 0; justify-content: center; font: 400 18px/1 var(--font-sans); color: var(--text-secondary); border: 1px solid transparent; }
.live .tc-x:hover, .live .tc-x:focus-visible { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.live .tc-add-row { flex: 0 0 auto; }
.live .tc-add-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 var(--sp-4) 10px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface-sunken); border: 1px dashed var(--border-strong); font-size: var(--fs-sm); color: var(--text); min-width: 0; }
.live .tc-add-input { flex: 1 1 160px; min-width: 0; min-height: 36px; font-size: var(--fs-sm); }
.live .tc-add-error { flex: 1 1 100%; margin: 0; color: var(--danger); font-weight: 700; }

/* the Undo / Restore toast (the prototype's `.toast`): bottom-centre, 8 s for an Undo, a plain sentence for a refusal. */
.live .edit-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md); box-shadow: var(--shadow); font-size: var(--fs-sm); max-width: min(560px, 92vw); box-sizing: border-box; }
.live .edit-toast[hidden] { display: none; }
.live .edit-toast .btn { padding: 4px 12px; min-height: 32px; white-space: nowrap; font-weight: 800; flex: 0 0 auto; }
.live .edit-toast .et-msg { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .live .tc-removed-tgl, .live .tc-ph-toggle, .live .tc-add-input, .live .tc-restore, .live .tc-x, .live .edit-toast .btn { min-height: 44px; }
  .live .tc-x { width: 44px; min-width: 44px; }
  .live .edit-toast .btn { min-width: 44px; }
  .live .edit-toast { left: 16px; right: 16px; transform: none; max-width: none; flex-wrap: wrap; }
}
@media (pointer: coarse) {
  .live .tc-removed-tgl, .live .tc-ph-toggle, .live .tc-restore, .live .tc-x, .live .edit-toast .btn { min-height: 44px; }
}

/* the stage's foot: where the next Picture goes (#19 rev 4's `.stage-target`) and where a filed Picture's tile says it went */
.live .stage-target { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; flex: 1 1 200px; color: var(--shell-text-active); font-size: var(--fs-sm); }
.live .stage-target .lvl-key { color: var(--shell-text); font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; }
.live .stage-target b { font: 700 var(--fs-sm) var(--font-mono); overflow-wrap: anywhere; min-width: 0; }
.live .tile-cap:not(.unf) { font-style: normal; color: var(--text); }

/* Processing Hub's changes (#72; prototype.css: .tag-ph, .tag-omit, the "PH · n edits" button of the panel's tools): read-only tags on what the last refresh touched, the filter beside Show removed, the omitted pill's words */
.live .tc-filter { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.live .tc-tag.tag-ph { text-transform: none; letter-spacing: 0; font-family: var(--font-mono); font-weight: 700; background: var(--surface); color: var(--text); }
.live .tc-ph-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px; font-size: var(--fs-sm); border: 1px solid var(--border); }
.live .tc-ph-toggle.on { border-color: var(--link); background: var(--selection-bg); color: var(--text); }
.live .tc-ph-toggle .tag { font: 700 var(--fs-xs) var(--font-mono); padding: 0 5px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.live .tc-chip.omitted .tc-tag { border-style: dashed; background: var(--surface-sunken); color: var(--text-secondary); text-transform: none; letter-spacing: 0; font-weight: 700; }
.live .tc-chip.has-ph { flex-wrap: wrap; border-radius: var(--radius-md); } /* a Processing Hub tag never squeezes the name: it wraps under it on a narrow card */

/* Done marks and earlier visits (#73): #8 round 2 rev 10 (prototype/8-categorization-panel-r2 @ ec720b8, prototype.css `.done-mark`, `.done-btn`, `.clear-done`, `.tag-visit`, `.tile.ro`, `.earlier-part`, `.ph-link`) and #23 rev 7. This sheet only ADDS
   names and never redefines a theme token; each rule sits under the surface that draws it (the live screen, the Pictures board, End call's overlay). */

/* the done mark (owner ruling 2026-10-15): glyph + word, --text-secondary, no fill (a note, never a state chip); an earlier visit's is greyed by a dotted rule under it and stays --text-secondary (4.5:1 or better).
   On a selected (navy) pill it takes the pill's ink; on the stage's navy foot, the foot's own secondary ink. */
.live .done-mark, .pb .done-mark, .endcall-dialog .done-mark { display: inline-flex; align-items: center; gap: 3px; font: 400 var(--fs-xs) var(--font-sans); color: var(--text-secondary); white-space: nowrap; flex: 0 0 auto; }
.live .done-mark .glyph, .pb .done-mark .glyph, .endcall-dialog .done-mark .glyph { font-weight: 800; }
.live .done-mark.earlier, .pb .done-mark.earlier, .endcall-dialog .done-mark.earlier { border-bottom: 1px dotted var(--border-strong); font-style: italic; }
.live .tc-chip.on .done-mark { color: var(--btn-primary-fg); }
.live .stage-target .done-mark { color: var(--shell-text); }
.live .stage-target .done-mark.earlier { border-bottom-color: var(--shell-text); }

/* the toggle in a node's action bar, and the two "Clear done marks (n)" buttons (the action bar's and the card header's) */
.live .done-btn { min-height: 40px; gap: 6px; }
.live .done-btn .glyph, .live .clear-done .glyph { font-weight: 800; color: var(--text-secondary); }
.live .done-btn.on { background: var(--surface-sunken); border-color: var(--border-strong); }
.live .done-btn.on .glyph { color: var(--text); }
.live .clear-done .glyph { margin-right: 4px; }
.live .clear-done[hidden] { display: none; }
@media (pointer: coarse) {
  .live .done-btn, .live .clear-done { min-height: 44px; }
}

/* End call's overlay: a done Component is still listed, with its mark, and the line says what earlier visits took */
.endcall-dialog .ec-earlier { margin: 0; }

/* an earlier visit's Picture: dashed, greyed, read-only, tagged "Visit 1 · 9 Oct" on a line of its own under "#n" */
.pb .tag-visit { background: var(--surface); border-color: var(--border); color: var(--text-secondary); font-family: var(--font-mono); }
.pb .tile-bar .tag-visit { flex-basis: 100%; }
.pb .tile.earlier { border-style: dashed; }
.pb .tile.earlier .thumb-img, .pb .tile.earlier .thumb { opacity: 0.45; }
.pb .tile.earlier .tile-bar .seq, .pb .tile.earlier .tile-prov { color: var(--text-secondary); }

/* the "From earlier visits" part at the foot of Unfiled, with the Processing Hub note and its link */
.pb .earlier-part { margin-top: 10px; padding-top: 6px; border-top: 1px dashed var(--border-strong); }
.pb .earlier-part .pgroup-head { min-height: 36px; }
.pb .earlier-part .pgroup-head .meta { flex-basis: 100%; }
.pb .earlier-part.open .pgroup-head { margin-bottom: 8px; }
.pb .ph-link { color: var(--link); font-weight: 700; text-decoration: underline; }
@media (max-width: 600px), (pointer: coarse) {
  .pb .earlier-part .sec-head.sub { min-height: 44px; }
  .pb .ph-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
}

/* the action bar now holds up to four buttons (Arm this, Mark done, Clear done marks, the quiet x): they wrap rather than squeeze "Arm this" onto two lines */
.live .tc-act-btns { flex-wrap: wrap; }
.live .tc-arm-btn { white-space: nowrap; }

/* The Pictures board (#70): #8 round 2 rev 10 (prototype/8-categorization-panel-r2 @ ec720b8, prototypes/8-categorization-panel-r2/prototype.css, ported via apps/web/src/organizing/reference/prototype.css),
   the board's rules only: sections, sub-sections, tiles, the selection bar, the ring, the Move to... list. Everything sits under `.pb` so nothing leaks into another surface, and the sheet only ADDS
   names (it never redefines a theme token). Tokens the prototype added for itself (`--sel-ring`, `--ring-ink`, the tag family) are declared here on `.pb` with the theme's three-selector dark pattern. */
.pb { --sel-ring: var(--link); --ring-ink: var(--link); --tag-ph-bg: var(--surface); --tag-ph-border: var(--border-strong); --tag-ph-fg: var(--text); --tag-tomb-fg: var(--text-secondary); overflow-anchor: none; min-width: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pb { --tag-ph-border: var(--text-secondary); --sel-ring: var(--text); --ring-ink: var(--text); }
}
:root[data-theme="dark"] .pb { --tag-ph-border: var(--text-secondary); --sel-ring: var(--text); --ring-ink: var(--text); }

.pb .lvl-key { font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.pb .tag, .pb .cnt, .pb .armed-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; line-height: 1.4; border-radius: var(--radius-pill); border: 1px solid transparent; font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; flex: 0 0 auto; }
.pb .tag { border-color: var(--border-strong); background: var(--surface-sunken); color: var(--text); }
.pb .tag-ph { background: var(--tag-ph-bg); border-color: var(--tag-ph-border); color: var(--tag-ph-fg); font-family: var(--font-mono); }
.pb .tag-upload { background: var(--surface); border-color: var(--border-strong); border-style: double; color: var(--text); }
.pb .tag-video { background: var(--surface-sunken); border-radius: var(--radius-sm); }
.pb .cnt { min-width: 22px; justify-content: center; background: var(--surface-sunken); color: var(--text); font-family: var(--font-mono); }
.pb .cnt.zero { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.pb .armed-tag { border-radius: var(--radius-sm); background: var(--brand-gold); border-color: var(--brand-gold); color: var(--brand-ink); font-weight: 800; letter-spacing: 0.08em; }
.pb .req { font: 400 var(--fs-xs) var(--font-sans); color: var(--text-secondary); white-space: nowrap; flex: 0 0 auto; }
.pb .req::before { content: "·"; margin-right: 5px; }
.pb .sec-head .req::before, .pb .pgroup-head .req::before { content: none; }
.pb kbd { font: 700 var(--fs-xs) var(--font-mono); padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--radius-sm); color: var(--text); }
.pb .spinner.sm { width: 12px; height: 12px; border-width: 2px; }

/* the tools row and the notice with its one Undo ("Move back", 8 s) */
.pb .pb-tools { display: flex; justify-content: flex-end; padding: 0 0 4px; }
.pb .pb-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text); font-size: var(--fs-sm); }
.pb .pb-notice span { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.pb .pb-hint { margin: 0 0 8px; }

/* toolbar shape: the hint is its own row; the actions sit directly below it, left-aligned, at every width */
.pb .sel-bar { display: grid; gap: 6px; padding: 8px 14px; margin: 0 0 4px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-sunken); font-size: var(--fs-sm); }
.pb .sel-bar.empty { background: transparent; }
.pb .sel-hint { color: var(--text-secondary); font-size: var(--fs-xs); }
.pb .sel-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; min-height: 32px; }
.pb .sel-actions .btn { padding: 5px 10px; font-size: var(--fs-sm); }
.pb .sel-count { font-weight: 700; color: var(--text); }
.pb .sel-bar.empty .sel-count { font-weight: 400; color: var(--text-secondary); }

/* sections: collapsible, the header a toggle button with the count; the selected target's section first, tinted */
.pb .pgroup { padding: 0 14px 0; border: 1px solid var(--border); border-radius: var(--radius-md); margin: 0 0 8px; background: var(--surface); min-width: 0; }
.pb .pgroup.open { padding-bottom: 12px; }
.pb .pgroup.focus { background: var(--selection-bg); }
.pb .pgroup-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; }
.pb .pgroup.open > .pgroup-head { margin-bottom: 4px; }
.pb .sec-head { display: flex; align-items: center; gap: 8px; min-height: 40px; min-width: 0; max-width: 100%; padding: 4px 6px 4px 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pb .sec-head:hover { background: var(--surface-sunken); }
.pb .pgroup.focus .sec-head:hover { background: var(--surface); }
.pb .sec-head:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pb .sec-head .twisty { width: 24px; height: 24px; display: inline-grid; place-items: center; color: var(--text-secondary); font-size: 12px; flex: 0 0 auto; }
.pb .pgroup-title { font-weight: 800; font-size: var(--fs-sm); overflow-wrap: anywhere; min-width: 0; }
.pb .pgroup.unf .pgroup-title { font-style: italic; }
.pb .pgroup .state { padding: var(--sp-3); color: var(--text); }
.pb .pgroup .state .btn { margin-left: 8px; }
.pb > .state { padding: var(--sp-3); color: var(--text); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }
.pb .uploads { margin-top: 10px; }
.pb .uploads .pgroup-head { min-height: 32px; margin-bottom: 8px; }
.pb .uploads .pgroup-head .meta { flex-basis: 100%; }
.pb .sec-saving { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface-sunken); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; flex: 0 0 auto; }

/* nested sub-sections: a Unit holds "On the Unit" and its Categories, a Category its Components or rows, a Component or row its slots */
.pb .subgroups { display: grid; gap: 10px; }
.pb .subgroups.d2, .pb .subgroups.d3 { gap: 6px; }
.pb .subgroup { min-width: 0; }
.pb .subgroup.d2, .pb .subgroup.d3 { padding-left: 10px; border-left: 2px solid var(--border); }
.pb .sec-head.sub { min-height: 36px; width: 100%; max-width: none; border-bottom: 1px solid var(--border); border-radius: 0; padding-left: 0; flex-wrap: wrap; }
.pb .sec-head.sub .pgroup-title, .pb .sub-title { font-weight: 700; font-size: var(--fs-sm); }
.pb .subgroup.d2 .sec-head.sub, .pb .subgroup.d3 .sec-head.sub { min-height: 32px; }
.pb .subgroup.d3 .sub-title { font-weight: 400; }
.pb .subgroup.open > .sec-head.sub { margin-bottom: 6px; }
.pb .subgroup.peek > .sec-head.sub { background: var(--selection-bg); }
.pb .peek-note { font-style: italic; }
.pb .sub-title.plain { font-style: italic; }
.pb .sub-empty { padding: 2px 0 6px; }

/* drop targets: a drop on a section or sub-section files there; one that cannot take Pictures is hatched */
.pb .drop-hover { box-shadow: inset 0 0 0 2px var(--link); background: var(--selection-bg); }
.pb .drop-refuse { box-shadow: inset 0 0 0 2px var(--danger); background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-sunken) 6px 8px); cursor: not-allowed; }

/* the grid and the tiles */
.pb .pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.pb .pgroup.focus .pgrid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.pb .tile { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; box-sizing: border-box; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text); text-align: left; overflow: hidden; cursor: grab; font: inherit; }
.pb .tile:hover { border-color: var(--border-strong); }
.pb .tile[role="button"]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.pb .tile.sel { border-color: var(--sel-ring); outline: 2px solid var(--sel-ring); outline-offset: 2px; }
.pb .tile.dragging { opacity: 0.5; }
.pb .tile.ro { cursor: default; }
.pb .tile.upload { border-style: dashed; }
.pb .thumb-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-sunken); }
.pb .thumb { aspect-ratio: 4 / 3; background-color: var(--surface-sunken); background-image: repeating-linear-gradient(45deg, transparent 0 7px, var(--border) 7px 9px); }
.pb .tile-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 4px; padding: 3px 6px 0; font-size: var(--fs-xs); min-width: 0; }
.pb .tile-bar .seq { font-weight: 700; color: var(--text); }
.pb .tile-bar .tile-time { color: var(--text); }
.pb .tile .tag { display: inline-block; flex: 0 1 auto; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; line-height: 1.5; }
.pb .tile-bar .tag-upload { flex-basis: 100%; }
.pb .tile-prov { padding: 1px 6px 5px; font-size: var(--fs-xs); line-height: 1.25; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; overflow-wrap: anywhere; }
.pb .tile-prov.unf { font-style: italic; }
.pb .sel-mark { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--btn-primary-bg); color: var(--btn-primary-fg); font: 800 12px var(--font-sans); }
.pb .tile.ghost { cursor: default; border-style: dashed; border-color: var(--border-strong); }
.pb .ghost-thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface-sunken); }
.pb .tile.ghost .seq, .pb .tile.ghost .saving, .pb .tile.ghost .tile-prov { color: var(--text-secondary); }
.pb .tile.ghost .saving { font: 700 var(--fs-xs) var(--font-sans); }
.pb .tile.ins-before { box-shadow: -5px 0 0 0 var(--link); }
.pb .tile.ins-after { box-shadow: 5px 0 0 0 var(--link); }

/* the caption: the slot's name, read-only; or the label, editable in place (a dashed underline and a pencil say so). Never a path: the sub-section headers carry it, the tooltip has it in full. */
.pb .cap-wrap { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; min-width: 0; }
.pb .tile-cap { display: inline-block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 700; font-style: normal; }
.pb .tile-cap.unf { color: var(--text-secondary); font-style: italic; font-weight: 400; }
.pb .tile-cap.label { border-bottom: 1px dashed var(--border-strong); padding: 1px 2px; border-radius: 2px; }
.pb .tile-cap.label.ro { border-bottom: 0; color: var(--text-secondary); }
.pb .tile-cap.label[contenteditable]:hover { background: var(--surface-sunken); cursor: text; }
.pb .tile-cap.label[contenteditable]:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; background: var(--surface); border-bottom-style: solid; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.pb .cap-edit { color: var(--text-secondary); font-size: 11px; flex: 0 0 auto; }
.pb .tile.ro .tile-cap, .pb .tile.ghost .tile-cap { color: var(--text-secondary); }

/* the locator ring: 2px, 3px outside, one ink no state uses, one 0.9 s entrance; it clears on the next pointer or focus, or after a few seconds */
.pb .ring { outline: 2px solid var(--ring-ink); outline-offset: 3px; animation: pb-ring-in 0.9s ease-out 1; }
@keyframes pb-ring-in { from { outline-color: transparent; outline-offset: 9px; } to { outline-offset: 3px; } }
.pb .ring:focus-visible, .pb .tile.sel:focus-visible { outline-color: var(--focus-ring); }
@media (prefers-reduced-motion: reduce) { .pb .ring { animation: none; } }

@media (max-width: 1024px) {
  .pb .pgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .pb .pgroup.focus .pgrid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}
/* below 600px every control is a 44px target, the editable label too */
@media (max-width: 600px) {
  .pb .btn, .pb .act, .pb .sec-head, .pb .subgroup .sec-head.sub, .pb .subgroup.d2 .sec-head.sub, .pb .subgroup.d3 .sec-head.sub { min-height: 44px; }
  .pb .tile { min-height: 44px; }
  .pb .pgrid, .pb .pgroup.focus .pgrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .pb .cap-wrap:has(.tile-cap.label[contenteditable]) { display: flex; width: 100%; }
  .pb .tile-cap.label[contenteditable] { display: block; flex: 1 1 auto; min-width: 44px; min-height: 44px; box-sizing: border-box; padding: 12px 2px; }
  .pb .subgroup.d2, .pb .subgroup.d3 { padding-left: 6px; }
  .pb .pgroup { padding-left: 8px; padding-right: 8px; }
}

/* the Move to... dialog (the dialog host's card; the list is the prototype's) */
.move-dialog .move-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.move-dialog .move-list { overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--radius-md); min-height: 0; max-height: 52vh; }
.move-dialog .move-opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text); font: 400 var(--fs-sm) var(--font-sans); text-align: left; cursor: pointer; }
.move-dialog .move-opt:hover { background: var(--surface-sunken); }
.move-dialog .move-opt.hi { background: var(--selection-bg); box-shadow: inset 3px 0 0 var(--brand-gold); }
.move-dialog .move-opt:last-child { border-bottom: 0; }
.move-dialog .move-opt .lvl-key { font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); flex: 0 0 auto; }
.move-dialog .move-empty { padding: var(--sp-4); color: var(--text-secondary); font-size: var(--fs-sm); text-align: center; }
@media (max-width: 600px) { .move-dialog .move-opt { min-height: 44px; } .move-dialog .input { min-height: 44px; } }

/* An omitted node in the board (#72; prototype.css .tag-omit, .pchip.omitted): greyed, labelled, never a drop target */
.pb .tag-omit { background: var(--surface-sunken); border-color: var(--border); border-style: dashed; color: var(--text-secondary); }
.pb .subgroup.omitted > .sec-head { color: var(--text-secondary); }

/* The Recordings tab (#77): #25 round 1 rev 10's arrangement C (prototype/25-post-session-stub @ 0b61394, prototype.css lines 27-33, 72-78, 119-148, 227-259, 316-352, 444-471),
   ported under .rc and .range-modal. Project stylesheet: it adds rules and never redefines a theme token. Text is --text and --text-secondary only (--text-muted is never text);
   a warn fill carries --text. The responsive queries live here (conventions rule 5). */
.rc { display: grid; gap: var(--sp-3); min-width: 0; }
.rc .lite, .range-modal .lite { color: var(--text-secondary); font-weight: 400; }
.rc .mono, .range-modal .mono { font-family: var(--font-mono); font-size: 0.92em; }
.rc .card { min-width: 0; }
.rc .card-header .lite { font-weight: 400; }
.rc .state, .range-modal .state { color: var(--text-secondary); }
.rc .state p, .range-modal .state p { max-width: 52ch; }

/* pills: outlined, hue on the border and dot, text always --text; solid fill only where the person must act */
.rc .pill, .range-modal .pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--radius-pill); font: 700 var(--fs-xs) var(--font-sans); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); white-space: nowrap; line-height: 1.5; vertical-align: middle; }
.rc .pill::before, .range-modal .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex: none; }
.rc .pill-ok, .range-modal .pill-ok { border-color: var(--ok); }
.rc .pill-ok::before, .range-modal .pill-ok::before { background: var(--ok); }
.rc .pill-plain::before, .rc .pill-room::before, .rc .pill-pending::before, .rc .pill-act::before, .range-modal .pill-pending::before { display: none; }
.rc .pill-room { font-family: var(--font-mono); font-weight: 400; }
.rc .pill-act { border-color: transparent; }
.rc .pill-act-warn { background: var(--warn-bg); }
.pdot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--brand-gold); box-sizing: border-box; animation: aspen-spin 0.9s linear infinite; flex: none; }
@media (prefers-reduced-motion: reduce) { .pdot, .range-modal .spinner { animation: none; } }

.rc .search { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); min-width: 0; }
.rc .search-ico { color: var(--text-secondary); flex: 0 0 auto; display: inline-flex; }
.rc .search-input { flex: 1 1 0; min-width: 0; min-height: 36px; font-size: var(--fs-sm); }
.rc .search-input::-webkit-search-cancel-button { display: none; }
.rc .search .act-x { min-height: 32px; min-width: 32px; padding: 0 8px; }

/* the target: the name, with where it sits beneath */
.rc .target, .range-modal .target { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.rc .t-name, .range-modal .t-name { font-size: var(--fs-md); }
.rc .t-lvl { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); font-weight: 700; }
.range-modal .t-path { font-size: var(--fs-sm); font-weight: 400; }

/* the filter tools: search, dated Room chips in one sideways row, "Showing ... · Show all" */
.rc .c-tools { display: grid; min-width: 0; border-bottom: 1px solid var(--border); }
.rc .c-tools .search { border-bottom: 0; }
.rc .c-rf { padding: 4px var(--sp-4) var(--sp-2); min-width: 0; border-top: 1px solid var(--border); }
.rc .b-rf { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 2px var(--sp-4) 4px; margin: 0 calc(-1 * var(--sp-4)); position: relative; }
.rc .b-rf.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.rc .b-rf.fade-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
.rc .b-rf.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.rc .chip, .range-modal .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 400 var(--fs-sm) var(--font-sans); cursor: pointer; min-height: 32px; }
.rc .b-rf .chip { flex: 0 0 auto; min-width: 32px; justify-content: center; white-space: nowrap; }
.rc .b-rf .chip[aria-pressed="true"], .range-modal .chip[aria-pressed="true"] { background: var(--selection-bg); border-color: var(--sel-ring); box-shadow: inset 0 0 0 1px var(--sel-ring); font-weight: 700; }
.rc .b-rfl { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 6px var(--sp-4); font-size: var(--fs-xs); color: var(--text-secondary); border-top: 1px solid var(--border); }
.rc .b-rfl .btn-sm { padding-top: 2px; padding-bottom: 2px; }

/* the list is one grid: every row (and the column head) takes its tracks from .clist, so each column is one straight line */
.rc .c-rline { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; padding: 4px var(--sp-4); background: var(--surface-sunken); border-bottom: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-secondary); }
.rc .c-rline b { color: var(--text); }
.rc .rh-warn { background: var(--warn-bg); color: var(--text); padding: 1px 8px; border-radius: var(--radius-sm); border-left: 4px solid var(--warn); font-weight: 700; }
.rc .c-rline:last-child { border-bottom: 0; }
.rc .clist { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr) max-content max-content max-content; column-gap: 14px; }
.rc .chead, .rc .crow { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.rc .chead { padding: 6px var(--sp-4); border-bottom: 1px solid var(--border); font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.rc .crow { gap: 6px 14px; align-items: center; width: 100%; text-align: left; padding: 9px var(--sp-4); border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: 400 var(--fs-sm) var(--font-sans); cursor: pointer; min-height: 44px; box-sizing: border-box; }
.rc .crow-nt { border-bottom-style: dashed; }
.rc .crow:last-child { border-bottom: 0; }
.rc .crow:hover { background: var(--selection-bg); }
.rc .crow.is-sel { background: var(--selection-bg); box-shadow: inset 4px 0 0 var(--sel-ring); }
.rc .cr-room { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.rc .cr-target { display: grid; gap: 1px; min-width: 0; }
.rc .cr-path { font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc .cr-stop { display: grid; gap: 1px; white-space: nowrap; }
.rc .cr-pic { white-space: nowrap; }
.rc .cr-st { display: flex; justify-content: flex-start; min-width: 0; }

/* the range's modal: centred at every width above 599px, full-screen below; the dialog host owns the scrim, the scroll lock, the focus trap and Esc */
.dialog-card.range-modal { width: min(760px, 100%); }
.range-modal .dialog-body { padding: var(--sp-5); }
.range-modal .rdetail { position: relative; display: grid; gap: var(--sp-3); min-width: 0; }
.range-modal .rd-close { position: absolute; top: 0; right: 0; min-height: 32px; }
.range-modal .rd-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; padding-right: 96px; }
.range-modal .rd-id { font-size: var(--fs-xs); color: var(--text-secondary); margin-bottom: 4px; }
.range-modal .rd-title { font-weight: 400; margin: 0; }
.range-modal .rd-title:focus { outline: none; }
.range-modal .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; margin: 0; }
.range-modal .kv div { display: grid; gap: 2px; min-width: 0; }
.range-modal .kv dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); font-weight: 700; }
.range-modal .kv dd { margin: 0; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.range-modal h4.rd-h { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.range-modal h4.rd-h .lite { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); }
.range-modal .cliplist, .range-modal .unclist { display: grid; gap: 6px; padding-left: 0; margin: 0; list-style: none; font-size: var(--fs-sm); }
.range-modal .cliplist li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 6px 10px; background: var(--surface-sunken); border-radius: var(--radius-md); overflow-wrap: anywhere; }
.range-modal .unclist li { display: flex; gap: 8px; align-items: center; }
.range-modal .rd-note { font-size: var(--fs-sm); margin: 0; }
.range-modal .lg { display: inline-block; width: 16px; height: 9px; border-radius: 2px; flex: none; box-sizing: border-box; }
.range-modal .lg-unc { background: repeating-linear-gradient(135deg, var(--danger) 0 3px, transparent 3px 6px); }
.range-modal .state-pending { background: var(--surface-sunken); border-radius: var(--radius-lg); padding: var(--sp-6); margin-top: var(--sp-3); }

/* the player: the screen on the shell navy, Play (the first stop after the title), the scrub bar over the range's time, one chip per clip */
.range-modal .player { display: grid; gap: 8px; }
.range-modal .screen { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: var(--shell-bg); color: #fff; display: grid; place-items: center; }
.range-modal .screen .frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--shell-bg); }
.range-modal .screen .scrim { position: absolute; left: 0; right: 0; top: 0; padding: 6px 10px; font-size: var(--fs-xs); background: color-mix(in srgb, var(--shell-bg) 78%, transparent); color: #fff; z-index: 1; }
.range-modal .screen .scrim[hidden] { display: none; }
.range-modal .screen .playbtn { position: relative; z-index: 2; }
.range-modal .player.is-playing .playbtn { opacity: 0.85; }
.range-modal .screen .tc { position: absolute; right: 10px; bottom: 8px; padding: 2px 8px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--shell-bg) 78%, transparent); color: #fff; font-size: var(--fs-xs); z-index: 1; }
.range-modal .scrub { position: relative; height: 18px; border-radius: var(--radius-sm); background: var(--surface-sunken); overflow: hidden; }
.range-modal .sc-seg { position: absolute; top: 0; bottom: 0; background: var(--ok); opacity: 0.55; }
.range-modal .sc-seg.is-cur { opacity: 1; }
.range-modal .sc-unc { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--danger) 0 3px, transparent 3px 6px); }
.range-modal .sc-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand-gold); box-shadow: 0 0 0 1px var(--shell-bg); pointer-events: none; }
.range-modal .clips { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 599px) {
  .rc .clist { grid-template-columns: minmax(0, 1fr); }
  .rc .chead { display: none; }
  .rc .crow { grid-template-columns: minmax(0, 1fr) auto; }
  .rc .cr-room { grid-column: 1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .rc .cr-st { grid-column: 2; grid-row: 1; justify-self: end; }
  .rc .cr-time { grid-column: 1; }
  .rc .cr-target { grid-column: 1 / -1; }
  .rc .cr-stop { grid-column: 1; display: flex; gap: 0 6px; flex-wrap: wrap; }
  .rc .cr-pic { grid-column: 2; justify-self: end; }
  .rc .btn, .rc .chip, .rc .crow, .rc .search-input, .range-modal .btn, .range-modal .chip { min-height: 44px; }
  .rc .b-rf .chip { min-width: 44px; }
  .rc .search .act-x { min-height: 44px; min-width: 44px; }
  .range-modal .kv { grid-template-columns: 1fr; }
  .range-modal .rd-head { padding-right: 0; padding-top: 44px; }
  .dialog-card.range-modal { width: 100%; }
  .range-modal .dialog-body { padding: var(--sp-4) var(--sp-4) var(--sp-6); }
}

/* a timeout is an ordinary end: the plain tone, no fill */
.rc .rh-neutral { color: var(--text-secondary); }

/* The Session page (#53): the header and tabs from #25 rev 10 (prototype/25-post-session-stub @ 0b61394, prototype.css lines 62-66, 105-109,
   118-139, 212-218, 378-390) and the Overview from #23 rev 7 (@ 402f9d4), ported as the #25 page scopes it under .ov. Project stylesheet: it adds
   rules and never redefines a theme token. Text is --text and --text-secondary only (--text-muted is never text, conventions rule 7); a warn
   or danger fill carries --text. Local tokens use the theme's three-selector dark pattern. The responsive queries live here (conventions rule 5). */
:root {
  --scrim-page: color-mix(in srgb, var(--shell-bg) 42%, transparent);
  --shadow: 0 8px 32px color-mix(in srgb, var(--shell-bg) 28%, transparent);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow: 0 8px 32px color-mix(in srgb, var(--shell-bg) 60%, transparent); } }
:root[data-theme="dark"] { --shadow: 0 8px 32px color-mix(in srgb, var(--shell-bg) 60%, transparent); }

.ps-wrap { display: grid; gap: var(--sp-3); min-width: 0; }
.ps { display: block; }
.ps .lite, .ps-wrap .lite { color: var(--text-secondary); font-weight: 400; }
.ps .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ps .card { min-width: 0; }
.ps h1 { font-size: var(--fs-xl); line-height: 1.2; margin: 0; text-wrap: balance; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ps .btn-secondary { border-color: var(--text-secondary); }
.ps-status { margin: 0 0 var(--sp-3); padding: 8px 12px; border: 1px solid var(--border); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md); background: var(--surface); font-size: var(--fs-sm); color: var(--text); }

/* pills: one scale, outlined, hue on the border and dot, text always --text; solid fill only where the person must act */
.ps .pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--radius-pill); font: 700 var(--fs-xs) var(--font-sans); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); white-space: nowrap; line-height: 1.5; vertical-align: middle; }
.ps .pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex: none; }
.ps .pill-ok { border-color: var(--ok); } .ps .pill-ok::before { background: var(--ok); }
.ps .pill-plain::before, .ps .pill-act::before { display: none; }
.ps .pill-act { border-color: transparent; }
.ps .pill-act-warn { background: var(--warn-bg); }
.ps .pill-act .g { font-weight: 800; }

/* the header */
.sh { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: flex-start; justify-content: space-between; margin-bottom: var(--sp-5); }
.sh-l { min-width: 0; flex: 1 1 360px; display: grid; gap: 6px; }
.sh-eyebrow { font-size: var(--fs-sm); color: var(--text-secondary); }
.sh-line { margin: 0; color: var(--text); max-width: 72ch; font-size: var(--fs-md); }
.sh-line.lite { color: var(--text-secondary); }
.sh-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sh-a .btn { text-decoration: none; }
.sh-refuse { flex-basis: 100%; margin: 0; }
.notice-warn { padding: 10px 12px; background: var(--warn-bg); color: var(--text); border-radius: var(--radius-md); font-size: var(--fs-sm); max-width: none; }

/* the tab strip */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); overflow-x: auto; margin-bottom: var(--sp-4); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; padding: 8px 14px; min-height: 40px; color: var(--text-secondary); font-weight: 700; font-size: var(--fs-md); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand-gold); }

/* the confirms: they mount in the dialog host, so these are not scoped under .ps */
.dlg-body { display: grid; gap: var(--sp-3); padding: var(--sp-4); }
.dlg-body p { margin: 0; font-size: var(--fs-md); max-width: 60ch; }
.dlg-safe { color: var(--text-secondary); }
.dlg-reason { display: grid; gap: 6px; margin: 0; }
.dlg-reason textarea { width: 100%; box-sizing: border-box; min-height: 56px; resize: vertical; }
.ack { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; font-size: var(--fs-md); }
.ack input { appearance: auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand-gold); flex: none; cursor: pointer; }
.ack-live { display: block; font-size: var(--fs-sm); color: var(--text-secondary); margin-top: 2px; }
.dlg-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dlg-a .btn { min-height: 40px; }
.dlg-body .btn-secondary { border-color: var(--text-secondary); }
.dlg-body .field-error { margin: 0; color: var(--text); background: var(--danger-bg); padding: 8px 10px; border-radius: var(--radius-md); font-size: var(--fs-sm); font-weight: 700; }
.dlg-why[hidden] { display: none; }
.dlg-body .field-error[hidden] { display: none; }

/* ---- the Overview, scoped under .ov ---- */
.ov { display: grid; gap: var(--sp-3); min-width: 0; }
.ov .arrival-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-secondary); font-size: var(--fs-sm); }
.ov .arrival-sub .ico { color: var(--brand-gold); }
.ov .ico { display: inline-flex; align-items: center; }
.ov .summary { color: var(--text-secondary); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ov .summary b { color: var(--text); }
.ov .lvl-key { font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.ov .spacer { flex: 1; }
.ov .banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1px solid var(--border-strong); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md); background: var(--surface); font-size: var(--fs-sm); color: var(--text); }
.ov .banner .ico { color: var(--brand-gold); margin-top: 3px; }
.ov .facts { margin: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.ov .fact dt { color: var(--text-secondary); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.ov .fact dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.ov .facts-row { grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; align-items: baseline; }
.ov .facts-row .fact { display: contents; }
.ov .facts-row dd { padding-right: var(--sp-3); }
@media (min-width: 1025px) { .ov .facts-row { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); } }
.ov .facts-strip { padding: var(--sp-3) var(--sp-4); display: grid; gap: 10px; }
.ov .handoff { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text); font-size: var(--fs-xs); }
.ov .handoff .ico { color: var(--text-secondary); }
.ov .link-out { color: var(--link); font-weight: 700; text-decoration: underline; display: inline-flex; align-items: center; gap: 4px; }
.ov .fact-btn { display: inline; padding: 0; border: 0; background: transparent; color: var(--link); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; border-radius: var(--radius-sm); }
.ov .fact-btn:hover { color: var(--text); }
.ov .fact-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* one chip scale: --fs-xs, one padding, one line-height; solid fill only for "you must act" */
.ov .tag, .ov .chip, .ov .rchip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; line-height: 1.4; border-radius: var(--radius-pill); border: 1px solid transparent; font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; }
.ov .tag-ph { background: var(--surface-sunken); border-color: var(--border-strong); color: var(--text); }
.ov .tag-ph .ico { color: var(--brand-gold); }
.ov .tag-adhoc { background: var(--surface); border-style: dashed; border-color: var(--border-strong); color: var(--text); }
.ov .tag-tomb, .ov .tag-omitted { background: transparent; border-style: dotted; border-color: var(--border-strong); color: var(--text-secondary); }
.ov .tag-quick { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.ov .tag-quick .ico { color: var(--brand-gold); }
.ov .chipset { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.ov .chip { border-radius: var(--radius-sm); border-color: var(--border); background: var(--surface-sunken); color: var(--text); font-family: var(--font-mono); }
.ov .chip-untyped { background: var(--surface); border-color: var(--border-strong); border-style: dashed; color: var(--text); font-family: var(--font-sans); }
.ov .chip-typed { background: var(--surface-sunken); border-color: var(--border-strong); color: var(--text); font-family: var(--font-sans); }
.ov .chip-typed .ico { color: var(--ok); }
.ov .chip-visit { background: var(--surface-sunken); border-color: var(--border-strong); color: var(--text); font-family: var(--font-sans); }
.ov .done-mark { display: inline-flex; align-items: center; gap: 3px; font: 400 var(--fs-xs) var(--font-sans); color: var(--text-secondary); white-space: nowrap; }
.ov .done-mark .glyph { font-weight: 800; }
.ov .done-earlier { border-style: dotted; font-style: italic; }
.ov .rchip { border-radius: var(--radius-sm); border-color: var(--border-strong); color: var(--text); font-family: var(--font-mono); }
.ov .rchip.live { background: var(--brand-gold); border-color: var(--brand-gold); color: var(--brand-ink); }
.ov .uname { font-weight: 700; font-size: var(--fs-md); color: var(--text); }
.ov .act { font-size: var(--fs-xs); padding: 4px 10px; min-height: 32px; white-space: nowrap; }
.ov .act-x { width: 32px; min-width: 32px; padding: 0; justify-content: center; font: 400 18px/1 var(--font-sans); color: var(--text-secondary); border: 1px solid transparent; }
.ov .tgl { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 8px; font-size: var(--fs-sm); font-weight: 400; color: var(--text); cursor: pointer; }
.ov .tgl[aria-pressed="true"] { background: var(--surface-sunken); color: var(--text); }
.ov .board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ov .manifest-wrap { display: grid; gap: var(--sp-3); min-width: 0; }
.ov .legend { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-secondary); font-size: var(--fs-sm); margin: 0; }
.ov .legend summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 32px; box-sizing: border-box; font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.ov .legend summary::-webkit-details-marker { display: none; }
.ov .legend summary::before { content: "▸"; font-size: 11px; }
.ov .legend[open] summary::before { content: "▾"; }
.ov .legend-rules { list-style: none; display: grid; gap: 5px; margin: 0; padding: 0 10px 10px; }
.ov .legend-rule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.4; }
.ov .legend-rule > :first-child { flex: 0 0 auto; }
/* the Guests card (#22 rev 6) sits between the facts and the manifest */
.ov .gsum { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-4); align-items: flex-start; justify-content: space-between; padding: var(--sp-3) var(--sp-4); min-width: 0; }
.ov .gs-l { display: grid; gap: 8px; flex: 1 1 320px; min-width: 0; font-size: var(--fs-sm); }
.ov .gs-l h3 { font-size: var(--fs-md); margin: 0; }
.ov .gs-l p { margin: 0; }
.ov .gs-a { display: flex; align-items: center; flex: 0 0 auto; }
.ov .gs-a .btn { flex: none; white-space: nowrap; }
.ov .gs-a .btn[disabled] { opacity: 1; cursor: not-allowed; background: var(--surface-sunken); color: var(--text-secondary); border: 1px dashed var(--border-strong); }

/* C: the manifest table. One left bar per Unit row, one shape in the State column, Locations fold, the search above */
.ov .table-wrap { overflow: hidden; position: relative; } /* positioned, so the visually hidden "Actions" header text is clipped with the table and never widens the page */
.ov .search-wrap { display: flex; flex-direction: column; min-width: 0; }
.ov .msearch { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); min-width: 0; scroll-margin-top: calc(var(--shell-topbar-h, 52px) + 8px); }
.ov .msearch .search-ico { color: var(--text-secondary); flex: 0 0 auto; display: inline-flex; }
.ov .msearch .search-input { flex: 1 1 0; min-width: 0; min-height: 36px; font-size: var(--fs-sm); }
.ov .msearch .search-input::-webkit-search-cancel-button { display: none; }
.ov .msearch .act-x { min-height: 32px; min-width: 32px; padding: 0 8px; }
.ov .search-count { padding: 6px 12px; font-size: var(--fs-xs); color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.ov table.manifest th { color: var(--text-secondary); } /* the theme's th uses --text-muted (4.28:1 on sunken): scoped here, a recorded theme finding */
.ov table.manifest td { vertical-align: top; }
.ov table.manifest tr.unit:hover td { background: transparent; }
.ov table.manifest tr.unit td:first-child { box-shadow: inset 3px 0 0 var(--brand-gold); }
.ov table.manifest tr.unit[data-state="untyped"] td:first-child, .ov table.manifest tr.unit[data-state="omitted"] td:first-child, .ov table.manifest tr.unit.tomb td:first-child { box-shadow: inset 3px 0 0 var(--border-strong); }
.ov table.manifest tr.unit.ring td { background: var(--selection-bg); }
.ov table.manifest tr.unit.ring { outline: none; }
.ov table.manifest tr.unit.tomb td, .ov table.manifest tr.unit.omitted td { color: var(--text-secondary); }
.ov table.manifest tr.unit.omitted .uname { color: var(--text-secondary); }
.ov table.manifest td.td-state > .tag, .ov table.manifest td.td-state > .chip { border-radius: var(--radius-sm); }
.ov table.manifest tr.loc-tr th { text-align: left; background: var(--surface-sunken); color: var(--text); font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; padding: 4px 12px; }
.ov .loc-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ov .loc-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px 0 0; border: 0; background: transparent; color: var(--text); font: 700 var(--fs-sm) var(--font-sans); cursor: pointer; border-radius: var(--radius-sm); text-align: left; }
.ov .loc-toggle:hover { background: var(--surface); }
.ov .twisty { width: 24px; height: 24px; border: 0; background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; border-radius: var(--radius-sm); flex: 0 0 auto; }
.ov .twisty:hover { background: var(--surface-sunken); color: var(--text); }
.ov .loc-toggle .twisty { pointer-events: none; display: inline-grid; place-items: center; }
.ov .twisty-gap { display: inline-block; width: 24px; flex: 0 0 auto; }
.ov table.manifest tr.sub-tr td { padding: 0 12px 8px 44px; border-bottom: 1px solid var(--border); }
.ov table.manifest td.td-act { text-align: right; white-space: nowrap; }
.ov table.manifest td.td-check .cov { display: inline-flex; flex-wrap: wrap; gap: 0 4px; }
.ov .td-unit-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ov .td-fold { display: none; }
.ov .meta { color: var(--text-secondary); font-size: var(--fs-xs); }
/* the checklist under a typed Unit: Categories and their Components; omitted greyed and dotted */
.ov .cats { display: grid; gap: 6px; margin: 6px 0 4px; }
.ov .cat { padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.ov .cat-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ov .cat-name { font-weight: 800; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.ov .comps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ov .comp { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); padding: 1px 7px; border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text); min-height: 24px; }
.ov .comp.omitted, .ov .cat.omitted { color: var(--text-secondary); background: transparent; border: 1px dotted var(--border-strong); }
.ov .cat.omitted .cat-name { color: var(--text-secondary); }
.ov tr.unit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }


/* ---- adding, removing and restoring Units (#54, from #23 rev 7's prototype.css lines 92-95, 207-218, 235-251, 313, 377-379, 412-429) ---- */
.ov .banner-notice { background: var(--warn-bg); border: 1px solid var(--warn); }
.ov .banner-notice .ico { color: var(--text); }
.ov .hint { color: var(--text-secondary); font-size: var(--fs-xs); }
.ov .pchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 700 var(--fs-sm) var(--font-sans); cursor: pointer; max-width: 100%; }
.ov .pchip:hover:not([disabled]) { background: var(--surface-sunken); }
.ov .pchip.add { border-style: dashed; }
.ov .add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 32px; }
.ov .act-x:hover:not([disabled]), .ov .act-x:focus-visible { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.ov .btn-secondary { border-color: var(--text-secondary); }
.ov .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 6px 0; padding: 10px 12px; border-radius: var(--radius-md); font-size: var(--fs-sm); color: var(--text); }
.ov .setup { flex-direction: column; align-items: stretch; background: var(--surface-sunken); border: 1px dashed var(--border-strong); gap: 10px; }
.ov .setup-title { font-size: var(--fs-md); }
.ov .setup-fields { display: grid; grid-template-columns: minmax(160px, 240px); gap: 10px; align-items: end; }
.ov .setup-fields:has(.fld-loc) { grid-template-columns: minmax(160px, 240px) minmax(200px, 320px); }
.ov .setup-fields .fld { display: grid; gap: 4px; min-width: 0; }
.ov .setup-fields .field-label { margin: 0; }
.ov .setup-fields .select, .ov .setup-fields .input { width: 100%; min-height: 36px; }
.ov .setup-lg .setup-fields { grid-template-columns: 1fr 1fr; }
.ov .setup-lg .setup-fields:not(:has(.fld-loc)) { grid-template-columns: minmax(160px, 320px); }
.ov .setup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ov .setup-actions .hint { flex-basis: 100%; }
.ov .refusal { flex-direction: column; align-items: stretch; background: var(--danger-bg); border: 1px solid var(--danger); }
.ov .rm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ov table.manifest tr.add-tr td { padding: 8px 12px; background: var(--surface); }
.ov table.manifest tr.add-tr .setup, .ov table.manifest tr.add-tr .refusal { margin: 0; }
.ov table.manifest tr.sub-tr .refusal { margin: 0 0 6px; }
.ov .link-out { color: var(--link); font-weight: 700; text-decoration: underline; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.ps .toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md); box-shadow: var(--shadow); font-size: var(--fs-sm); max-width: min(560px, calc(100vw - 32px)); }
.ps .toast .btn { padding: 4px 12px; font-size: var(--fs-sm); min-height: 32px; white-space: nowrap; }
/* the phone's add: a bottom sheet in the dialog host (S23): a 44px field, Location rows of 44px, a sticky footer with the 48px primary */
.dialog-layer:has(.sheet-form) { align-items: flex-end; padding: 0; }
.dialog-card.add-sheet { width: 100%; max-height: 92vh; height: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 0; }
.add-sheet .dialog-body { padding: 0; display: flex; flex-direction: column; min-height: 0; }
.sheet-form { display: flex; flex-direction: column; min-height: 0; }
.sheet-form .sheet-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--sp-3) var(--sp-4); display: grid; gap: var(--sp-3); }
.sheet-form .fld { display: grid; gap: 4px; }
.sheet-form .input { min-height: 44px; }
.sheet-form .hint { margin: 0; color: var(--text-secondary); font-size: var(--fs-xs); }
.sheet-group { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; min-width: 0; }
.sheet-group legend { font: 700 var(--fs-sm) var(--font-sans); color: var(--text-secondary); padding: 0; margin-bottom: 4px; }
.sheet-opt { display: grid; grid-template-columns: 22px 1fr; gap: 0 10px; align-items: center; min-height: 44px; padding: 6px 8px; border-radius: var(--radius-md); border: 1px solid transparent; font-size: var(--fs-md); cursor: pointer; }
.sheet-opt:hover { background: var(--surface-sunken); }
.sheet-opt.on { background: var(--selection-bg); border-color: var(--brand-gold); }
.sheet-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-gold); }
.sheet-foot { position: sticky; bottom: 0; display: flex; gap: 8px; flex-wrap: wrap; padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--surface); }
.sheet-foot .setup-primary { min-height: 48px; flex: 1 1 auto; }
.sheet-foot .btn-ghost { min-height: 48px; }
.sheet-form .btn-secondary { border-color: var(--text-secondary); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .ov table.manifest .fold { display: none; }   /* the secondary columns fold into the Unit cell: the table never scrolls sideways */
  .ov .td-fold { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; }
  .ov table.manifest tr.sub-tr td { padding-left: 12px; }
}
@media (max-width: 599px) {
  .tabs { mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .tab { min-height: 44px; }
  .sh-a { width: 100%; } .sh-a .btn { flex: 1 1 auto; justify-content: center; }
  .ps .btn, .ps a.btn { min-height: 44px; }
  .ps .btn-primary[data-primary] { min-height: 48px; }
  .ov .act, .ov .tgl, .ov .twisty, .ov .legend summary, .ov .link-out, .ov .loc-toggle, .ov .search-input, .ov .fact-btn { min-height: 44px; }
  .ov .fact-btn { display: inline-flex; align-items: center; min-width: 44px; }
  .ov .twisty { min-width: 44px; }
  .ov .act-x { min-width: 44px; width: 44px; height: auto; }
  .ov .msearch .act-x { min-width: 44px; }
  .ov .msearch .search-input { min-height: 44px; }
  .ov .act { min-width: 44px; padding: 6px 12px; height: auto; }
  .ov .comp { min-height: 28px; flex-wrap: wrap; }
  .ov .facts-row { grid-template-columns: max-content minmax(0, 1fr); }
  .ov table.manifest td.td-act { white-space: normal; }
  .ov .gs-a .btn { min-height: 44px; }
  .ov .pchip, .ov .link-out, .ov .rm-actions .btn { min-height: 44px; }
  .ov .setup-fields, .ov .setup-fields:has(.fld-loc), .ov .setup-lg .setup-fields { grid-template-columns: 1fr; }
  .ov .setup .input, .ov .setup .select, .ov .setup-fields .input, .ov .setup-fields .select { min-height: 44px; }
  .ov .setup-actions .btn { min-height: 44px; }
  .ps .toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .ps .toast .btn { min-height: 44px; }
  /* the confirms are full-screen below 600px */
  .dialog-layer:has(.dlg-body) { padding: 0; }
  .dialog-card:has(.dlg-body) { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
  .ack { min-height: 44px; box-sizing: border-box; align-items: center; }
  .dlg-a .btn { flex: 1 1 auto; justify-content: center; min-height: 48px; }
}

/* ---- the Session log tab (#55, from #26 rev 6's prototype.css: chips, marks, the feed, the filters, the legend, the rail, B's two columns) ---- */
:root { --ring-c: var(--link); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ring-c: var(--text); } }
:root[data-theme="dark"] { --ring-c: var(--text); }
.sl { min-width: 0; }
.sl .state { color: var(--text-secondary); }
.sl .state p { max-width: 56ch; margin: 0; }
.sl .card { min-width: 0; }
.sl .fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 700 var(--fs-xs) var(--font-sans); cursor: pointer; min-height: 32px; white-space: nowrap; }
.sl .fchip:hover { background: var(--surface-sunken); }
.sl .fchip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sl .fchip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sl .fchip .cnt { font-weight: 400; font-variant-numeric: tabular-nums; display: inline; padding: 0; border: 0; background: transparent; color: inherit; }
.sl .endchip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); color: var(--text-secondary); font: 700 var(--fs-xs) var(--font-sans); white-space: nowrap; }
.sl .endchip.warn { background: var(--warn-bg); border-color: transparent; color: var(--text); } /* the warning tone is --text on --warn-bg, never --warn text */
.sl .livechip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--brand-gold); color: var(--brand-ink); font: 800 var(--fs-xs) var(--font-sans); letter-spacing: 0.04em; white-space: nowrap; }
.sl .mono { font-family: var(--font-mono); font-size: 0.92em; }
.sl .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sl .lite { color: var(--text-secondary); font-weight: 400; }
.sl .mk { display: inline-block; width: 16px; text-align: center; color: var(--text-secondary); font-size: var(--fs-sm); }
.sl s.dead { color: var(--text-secondary); text-decoration-color: var(--text-secondary); }
.sl .btn-sm { padding: 4px 10px; font-size: var(--fs-sm); min-height: 32px; }

.sl .b-cols { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.sl .b-side, .sl .b-main { min-width: 0; }
.sl .b-sticky { position: sticky; top: var(--sp-4); display: grid; gap: var(--sp-3); }
.sl .lh { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin: 0 0 var(--sp-2); }
.sl .lh h3 { margin: 0; font-size: var(--fs-md); }
.sl .cnt-l { font-size: var(--fs-sm); white-space: nowrap; }

.sl .flt { display: grid; gap: 8px; }
.sl .srch-row { display: flex; gap: 8px; align-items: center; }
.sl .srch { display: block; flex: 1 1 auto; min-width: 0; }
.sl .srch .input { width: 100%; min-height: 36px; box-sizing: border-box; }
.sl .fgrp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sl .fgrp-a { gap: 8px; }
.sl .fgrp-a:empty { display: none; }

.sl .lgd { padding: 0; font-size: var(--fs-sm); display: block; margin: 0; min-width: 0; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
.sl .lgd summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 14px; min-height: 32px; box-sizing: border-box; font: 700 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); background: var(--surface); border-radius: var(--radius-lg); }
.sl .lgd summary:hover { color: var(--text); }
.sl .lgd summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.sl .lgd summary::-webkit-details-marker { display: none; }
.sl .lgd summary::before { content: "▸"; font-size: 11px; }
.sl .lgd[open] summary::before { content: "▾"; }
.sl .lgd ul { list-style: none; padding: 2px var(--sp-4) var(--sp-3); margin: 0; display: grid; gap: 4px; }
.sl .lgd li { display: flex; gap: 6px; align-items: baseline; }
.sl .lgd li.lgd-flow { display: block; line-height: 1.7; }
.sl .rail { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-sm); margin: 0; }
.sl .rail-a { color: var(--link); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.sl .rail-a:hover { text-decoration: underline; }
.sl .rail-a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.sl .dh { font: 800 var(--fs-xs) var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); padding: var(--sp-3) 0 4px; }
.sl .rh { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--border); padding: 2px 0; scroll-margin-top: 8px; }
.sl .rh-b { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 4px; border: 0; background: transparent; color: var(--text); font: 400 var(--fs-sm) var(--font-sans); cursor: pointer; border-radius: var(--radius-sm); min-height: 32px; text-align: left; }
.sl .rh-b:hover { background: var(--surface-sunken); }
.sl .rh-b:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sl .rh-car { width: 12px; color: var(--text-secondary); }
.sl .rh-c { margin-left: auto; font-size: var(--fs-xs); white-space: nowrap; }
.sl .evl { list-style: none; padding: 0; margin: 0 0 var(--sp-2); }
.sl .evl.is-folded { display: none; }
.sl .ev { display: grid; grid-template-columns: 62px 18px minmax(0, 1fr); gap: 2px 8px; align-items: baseline; padding: 4px 4px; font-size: var(--fs-sm); line-height: 1.45; border-bottom: 1px solid var(--border); scroll-margin: 8px; }
.sl .ev:last-child { border-bottom: 0; }
.sl .ev-t { color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl .ev-x { min-width: 0; overflow-wrap: anywhere; }
.sl .ev-x b { font-weight: 700; }
.sl .ring { outline: 2px solid var(--ring-c); outline-offset: 3px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: no-preference) { .sl .ring { transition: outline-color 200ms ease-in; } }

@media (max-width: 1023px) {
  .sl .b-cols { grid-template-columns: 1fr; }
  .sl .b-sticky { position: static; }
}
@media (max-width: 599px) {
  .sl .btn, .sl .fchip, .sl .rail-a, .sl .rh-b, .sl .lgd summary { min-height: 44px; }
  .sl .srch .input { min-height: 44px; }
}
.sl .anc { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); font: 700 var(--fs-xs) var(--font-sans); color: var(--text); white-space: nowrap; line-height: 1.6; }
.sl .anc-b { display: inline-flex; align-items: center; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; border-radius: var(--radius-pill); text-decoration: none; }
.sl .anc-b:hover .anc, .sl .anc-b:focus-visible .anc { background: var(--surface-sunken); border-color: var(--link); color: var(--link); }
.sl .anc-b:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* The Coordinator shell's additions (#52): project stylesheet, never part of the replicated theme. Theme tokens only.
   Ported from the approved shell (#23 rev 7 as #28 carries it): the nav's letter tiles, the topbar title as a route link, and the
   Midnight · Graphite · System switch. The responsive shell rules themselves are shell.css's. */
.shell-nav .nav-ico {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-sm);
  background: var(--shell-bg-raised); color: var(--shell-text-active); font: 800 var(--fs-xs) var(--font-sans);
}
.shell-nav a.active .nav-ico { background: var(--brand-gold); color: var(--brand-ink); }
.shell-logo img { height: 26px; width: auto; display: block; }

.shell-topbar { gap: var(--sp-3); }
.breadcrumbs { flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; color: var(--text-secondary); }
.shell-title a { color: var(--text); font-weight: 800; text-decoration: none; }
.shell-title a:hover { text-decoration: underline; }
.shell-crumb { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.shell-topbar .spacer { flex: 0 0 0; }
.shell-status { flex: 0 0 auto; margin-left: auto; }
.shell-status[hidden] { display: none; }
.shell-status + .theme-sw { margin-left: 0; }

.theme-sw { display: inline-flex; flex: 0 0 auto; margin-left: auto; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; background: var(--surface-sunken); }
.tsw { font: 700 var(--fs-xs) var(--font-sans); padding: 4px 10px; min-height: 26px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.tsw:hover { color: var(--text); }
.tsw:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.tsw.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px color-mix(in srgb, var(--brand-ink) 14%, transparent); }
.theme-sw + .shell-account { margin-left: 0; }

@media (max-width: 440px) {
  /* the title takes its own row, so the theme switch and the account menu keep their 44px targets and the crumb is not squeezed away */
  .breadcrumbs { flex: 1 1 100%; }
}
@media (max-width: 600px) {
  .shell-topbar .tsw { min-height: 44px; min-width: 44px; padding: 8px 12px; }
  .shell-topbar .theme-sw { margin-left: 0; padding: 1px; }
  .shell-title a { display: inline-flex; align-items: center; min-height: 44px; }
  button.shell-user { min-height: 44px; }
}

/* Below 900px the sidebar is a row and the active link is marked underneath it, as the approved shell draws it. */
@media (max-width: 900px) {
  .shell-nav a { border-left: 0; border-bottom: 3px solid transparent; justify-content: flex-start; }
  .shell-nav a.active { border-bottom-color: var(--shell-marker); }
}

/* The shortcuts help (#89) and the topbar's "?" button. Theme tokens only. */
.kbd-dialog { max-width: 640px; }
.kbd-help { display: grid; gap: 12px; }
.kbd-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.kbd-table th, .kbd-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.kbd-table th { font-weight: 700; color: var(--text-secondary); font-size: 0.8125rem; }
.kbd-keys { white-space: nowrap; }
.kbd-help kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px; text-align: center; font: inherit; font-weight: 700; font-size: 0.8125rem;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-sunken); color: var(--text);
}
.shell-shortcuts { min-width: 44px; min-height: 44px; font-weight: 700; }
@media (max-width: 600px) {
  .kbd-table th, .kbd-table td { padding: 8px 6px; }
  .kbd-keys { white-space: normal; }
}
.kbd-where, .kbd-note { color: var(--text-secondary); }

/* The signed-out page: one centred card on the stone page. Theme tokens only. */

.si-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font-sans); }
.si-page, .si-page * { box-sizing: border-box; }
.si-page h1 { font-size: var(--fs-2xl); line-height: 1.2; margin: 0; }
.si-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--sp-8) var(--sp-4); gap: var(--sp-4); }
.si-card {
  width: 100%; max-width: 420px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-8);
}
.si-card h1 { margin-top: var(--sp-5); }
.si-eyebrow { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); font-weight: 700; margin-bottom: 4px; }
.si-name { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; font-size: var(--fs-xl); letter-spacing: -.01em; color: var(--text); }
.si-name::before { content: ""; width: 12px; height: 12px; flex: 0 0 auto; background: var(--brand-gold); border-radius: 2px; }
.si-lead { margin: var(--sp-2) 0 0; color: var(--text-secondary); font-size: var(--fs-md); max-width: 46ch; }
.si-actions { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); align-items: flex-start; }
.si-cta { min-height: 40px; padding: 9px 18px; font-size: var(--fs-md); gap: 10px; text-decoration: none; white-space: nowrap; }
.si-cta:hover, .si-cta:focus { text-decoration: none; }
.si-ms { width: 18px; height: 18px; flex: 0 0 auto; }
.si-alt { font-size: var(--fs-sm); color: var(--link); text-decoration: underline; font-weight: 700; }
.si-foot { font-size: var(--fs-xs); color: var(--text-secondary); text-align: center; }

.si-notice {
  margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); max-width: 52ch;
  border: 1px solid var(--border); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md);
  background: var(--surface-sunken); color: var(--text); font-size: var(--fs-sm);
}
.si-notice.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.si-notice b { display: block; margin-bottom: 2px; font-size: var(--fs-md); color: var(--text); }
.si-notice p { margin: 0; }
.si-reason { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-secondary); }
.si-account { font-family: var(--font-mono); font-size: .95em; color: var(--text); word-break: break-all; }

@media (max-width: 600px) {
  .si-card { padding: var(--sp-5); }
  .si-actions { align-items: stretch; }
  .si-cta { min-height: 44px; justify-content: center; }
  .si-alt { text-align: center; }
}

/* The expired-session dialog over the inert shell. */
.dialog-card.si-dlg { width: min(560px, 100%); }
.si-dlg .dialog-title { font-size: var(--fs-lg); }
.si-expired, .si-expired * { box-sizing: border-box; }
.si-expired p { margin: 0 0 var(--sp-3); }
.si-unsaved {
  margin: var(--sp-3) 0; padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md);
  background: var(--surface-sunken); color: var(--text); font-size: var(--fs-sm);
}
.si-unsaved b { display: block; margin-bottom: 2px; font-size: var(--fs-md); }
.si-unsaved p { margin: 0; }
.si-unsaved details { margin-top: 6px; }
.si-unsaved summary { cursor: pointer; color: var(--link); font-weight: 700; }
.si-unsaved ol { margin: 6px 0 0; padding-left: 20px; }
.si-unsaved li { margin: 2px 0; overflow-wrap: anywhere; }
.si-expired .si-clean { color: var(--text-secondary); }
.si-xfoot { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-4); }
.si-xfoot .si-copy { min-height: 40px; }
@media (max-width: 600px) {
  .si-xfoot { flex-wrap: wrap; }
  .si-xfoot .si-cta { flex: 1 1 100%; order: -1; justify-content: center; min-height: 48px; }
  .si-xfoot .si-copy { flex: 1 1 100%; justify-content: center; min-height: 44px; }
}

/* The Field Rep's upload page (#84), translated from the approved prototype #34 round 1 rev 5 (prototype/34-field-rep-upload-page @ 0bb5949, prototypes/34-field-rep-upload-page/prototype.css) with the prototype
   furniture left out. It loads after the theme, which is never edited, and only adds rules. Every rule is scoped under `.up` (the page's container and its sheet layer) because the web app's stylesheets are one
   cascade: the page's tokens are `--up-*`, so nothing here changes the Coordinator's screens or the Field Rep's call. Phone-first, reusing #20's mobile recipes: every control is at least 48px tall at every
   width, the primary action 52px, the theme switch's options 44px. The responsive queries live here (ui-conventions rule 5). */

/* local tokens (S12): the thumbnail art from the shell family (navy in Midnight, charcoal in Graphite), in the theme's three-selector dark pattern; the theme's own tokens are never redefined. */
:root { --up-art-bg: #0A1150; --up-art-1: #070C3E; --up-art-2: #3C4488; --up-art-3: #5561AD; --up-art-text: #FFFFFF; --up-meter: #4C4F5C; --up-scrim: rgba(0, 8, 20, 0.45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --up-art-bg: #1B1D21; --up-art-1: #121316; --up-art-2: #4C505A; --up-art-3: #6B7080; --up-meter: #B3B2AA; --up-scrim: rgba(0, 0, 0, 0.55); } }
:root[data-theme="dark"] { --up-art-bg: #1B1D21; --up-art-1: #121316; --up-art-2: #4C505A; --up-art-3: #6B7080; --up-meter: #B3B2AA; --up-scrim: rgba(0, 0, 0, 0.55); }

/* the page: one guest surface, no shell */
.up-root { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
/* ---- surface ---- */
.up .up-main { flex: 1; min-width: 0; position: relative; padding-left: var(--gutter-l); padding-right: var(--gutter-r); box-sizing: border-box; }
.up h1 { font-size: var(--fs-xl); line-height: 1.2; text-wrap: balance; }
.up h2 { font-size: var(--fs-lg); text-wrap: balance; }
.up h3 { font-size: var(--fs-md); }
.up .lite { font-weight: 400; color: var(--text-secondary); }
.up .eyebrow { margin: 0 0 6px; font-size: var(--fs-sm); color: var(--text); font-weight: 700; }
.up .eyebrow .lite { font-weight: 400; }

/* the page header: ONLY the Task ID (ruling 4) and the theme switch (ruling 10) — no site, no Coordinator name, no "Upload link from".
   It fits any width (owner review 2026-10-22): the switch sits beside the Task ID while there is room and wraps onto its own row under it
   when there is not (an in-app browser such as Teams' gives the page less than the phone's width; below ~330px the two no longer share a
   row). The header never grows past the page, so nothing scrolls sideways. */
.up .pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-height: 48px; min-width: 0; max-width: 100%; }
.up .pagehead .task { font-weight: 800; font-size: var(--fs-md); color: var(--text); white-space: nowrap; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* the theme switch, as #8 rev 10 ships it (ported from Processing Hub's prototype #6): the pill is --surface-sunken inside a --border
   ring; the chosen option is raised (--surface, --text, a soft shadow), the others plain --text-secondary. 6.76:1 / 18.66:1 in Midnight,
   9.13:1 / 14.03:1 in Graphite. Every option is a 44px target at every width: this is a phone page. */
.up .theme-sw { display: inline-flex; flex: 0 1 auto; max-width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 2px; background: var(--surface-sunken); }
.up .tsw { font: 700 var(--fs-xs) var(--font-sans); padding: 8px 12px; min-height: 44px; min-width: 44px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.up .tsw:hover { color: var(--text); }
.up .tsw:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.up .tsw.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
.up .sbody { margin: 6px 0 10px; color: var(--text); font-size: var(--fs-md); line-height: 1.5; }
.up .snote { margin: 10px 0 0; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.45; }
.up .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.up .dot-ok { background: var(--ok); }
.up .dot-warn { background: var(--warn); }
.up .dot-danger { background: var(--danger); }
.up .dot-gold { background: var(--brand-gold); }
.up .spinner { flex: 0 0 auto; }
.up .spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.up .state { color: var(--text); }
.up .state.sblock { padding: 8px 0 4px; gap: 10px; align-items: flex-start; text-align: left; }
.up .state.sblock .state-title { font-size: var(--fs-xl); text-wrap: balance; line-height: 1.2; }
.up .state.sblock .sbody { margin: 0; }
.up .state-danger .state-title { color: var(--danger); }
.up .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.up .mono { font-family: var(--font-mono); }
.up .tnum { font-variant-numeric: tabular-nums; }
.up .vis-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* ---- controls: 48px everywhere, 52px primary ---- */
.up .btn,
.up .layer .btn { min-height: 48px; padding: 8px 16px; gap: 8px; }
.up .btn-sm { min-height: 44px; padding: 6px 12px; font-size: var(--fs-sm); }
.up .btn-big,
.up .layer .btn-big { width: 100%; justify-content: center; min-height: 52px; font-size: var(--fs-lg); }
.up .btn svg,
.up .layer .btn svg { flex: 0 0 auto; }
.up .btn small { font-weight: 400; font-size: var(--fs-sm); opacity: 0.85; }
.up .btn-ghost,
.up .layer .btn-ghost { border-color: transparent; }
.up .btn[disabled],
.up .layer .btn[disabled] { opacity: 1; color: var(--text-secondary); background: var(--surface-sunken); border-color: var(--border); cursor: not-allowed; }
.up .btn-secondary { background: var(--surface); }
.up input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }


/* the pick block: one primary (camera roll) and two camera taps. No limits line: a limit is shown only inside the refusal of the file
   that hit it (owner review 2026-10-21) */
.up .pick { display: grid; gap: 10px; }
.up .pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.up .pick .btn-secondary { justify-content: center; min-height: 48px; }


/* the link line inside the card: until when it works (the Task ID is the page header) */
.up .linkhead { display: grid; gap: 2px; }
.up .linkhead .until { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-secondary); }


/* ---- notices (facts, S28): neutral surface, glyph + words; the Wi-Fi suggestion is advice, not a warning ---- */
.up .notice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--text); font-size: var(--fs-sm); line-height: 1.45; border-left: 4px solid var(--border-strong); }
.up .notice svg { flex: 0 0 auto; margin-top: 1px; }
.up .notice b { font-weight: 700; }
.up .notice-resume { border-left-color: var(--brand-gold); background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.up .banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--warn-bg); color: var(--text); font-size: var(--fs-sm); line-height: 1.4; border-left: 4px solid var(--warn); }
.up .banner-danger { background: var(--danger-bg); border-left-color: var(--danger); }
.up .banner .spinner { margin-top: 1px; }


/* ---- the overall progress: one strip for the batch (S5), numbers as data (S13) ---- */
.up .overall { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.up .overall-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: var(--fs-md); }
.up .overall-title .lite { font-size: var(--fs-sm); }
.up .overall-meta { font-size: var(--fs-sm); color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.up .bar { height: 8px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.up .bar i { display: block; height: 100%; background: var(--up-meter); transition: width 0.15s linear; }
.up .bar-gold i { background: var(--brand-gold); }
.up .overall.is-paused .bar i { background: var(--border-strong); }


/* ---- file rows (the Send step, and the status row inside a file's sheet): thumb · name + meta · status; refused rows tint and name the limit (S26 in place) ---- */
.up .flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.up .frow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 8px 8px 8px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
.up .frow-refused { background: var(--danger-bg); border-color: var(--danger); }
.up .frow-rejected { border-color: var(--danger); }

/* the fifth state (ruling 8): a stopped row is --warn-bg with --text copy (never --warn text on it); once the link is dead it reads
   "Not sent" and takes the refusal's tint */
.up .frow-stalled { background: var(--warn-bg); border-color: var(--warn); }
.up .frow-stalled.frow-dead { background: var(--danger-bg); border-color: var(--danger); }
.up .frow-stalled .bar i { background: var(--border-strong); }
.up .frow-accepted .fstat { color: var(--ok); font-weight: 700; }
.up .fthumb { width: 56px; height: 56px; border-radius: var(--radius-md); overflow: hidden; background: var(--up-art-bg); color: var(--up-art-text); display: grid; place-items: center; flex: 0 0 auto; position: relative; }
.up .fthumb img,
.up .fthumb svg.art { width: 100%; height: 100%; object-fit: cover; display: block; }
.up .fthumb .kind { position: absolute; right: 3px; bottom: 3px; padding: 1px 5px; border-radius: var(--radius-sm); background: var(--up-scrim); color: var(--up-art-text); font: 800 10px var(--font-sans); letter-spacing: 0.04em; }
.up .fthumb-other { background: var(--surface-sunken); color: var(--text-secondary); }
.up .fthumb-other svg { width: 26px; height: 26px; }
.up .ftxt { display: grid; gap: 2px; min-width: 0; }
.up .fname { font-weight: 700; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up .fmeta { font-size: var(--fs-xs); color: var(--text-secondary); }
.up .fstat { font-size: var(--fs-sm); color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.35; }
.up .fstat svg { flex: 0 0 auto; }
.up .fstat-ok { color: var(--ok); font-weight: 700; }
.up .fstat-danger { color: var(--danger); font-weight: 700; }
.upeason,
.up .flimit,
.up .fstall { font-size: var(--fs-sm); color: var(--text); line-height: 1.4; }
.upeason b,
.up .flimit b,
.up .frow-dead .fstall b { color: var(--danger); }
.up .fstall b { color: var(--text); }
.up .frow .bar { margin-top: 4px; }
.up .fwifi { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--text); font-weight: 700; }
.up .fwifi svg { color: var(--text-secondary); }
.up .facts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.up .facts .btn-sm { min-width: 44px; justify-content: center; }
.up .frow-group { margin: 8px 0 2px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); font-weight: 800; }


/* ---- the visit confirmation ("what you sent this visit"): counts as data, then the tiles ---- */
.up .receipt { display: grid; gap: 10px; }
.up .receipt-head { display: grid; gap: 2px; }
.up .receipt-head .lite { font-size: var(--fs-sm); }
.up .counts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: var(--fs-sm); color: var(--text); }
.up .counts span { display: inline-flex; align-items: center; gap: 5px; }
.up .counts b { font-weight: 800; font-size: var(--fs-md); }
.up .rlist { list-style: none; margin: 0; padding: 0; display: grid; }
.up .rrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.up .rrow:first-child { border-top: 0; }
.up .rrow .rname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up .rrow .rwhen { color: var(--text-secondary); white-space: nowrap; font-size: var(--fs-xs); padding-top: 2px; }
.up .rrow .rtxt { min-width: 0; display: grid; gap: 1px; }
.up .rrow .rsub { color: var(--text-secondary); font-size: var(--fs-xs); }
.up .rrow .rsub.is-reason { color: var(--text); }
.up .rrow .rsub.is-reason b { color: var(--danger); }
.up .rmark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.up .rmark-ok { color: var(--ok); }
.up .rmark-danger { color: var(--danger); }
.up .rmark-wait { color: var(--text-secondary); }
.up .rmark svg { width: 18px; height: 18px; }
.up .receipt-empty { margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); }


/* ---- B — Steps ---- */
.up .b-wrap { max-width: 520px; margin: 0 auto; padding: 4px 0 40px; box-sizing: border-box; display: grid; gap: 12px; }
.up .b-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.up .b-steps li { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 700 10px var(--font-sans); color: var(--text-secondary); text-align: center; }
.up .b-steps li::before { content: ''; display: block; width: 100%; height: 5px; border-radius: 3px; background: var(--border); }
.up .b-steps li.done::before { background: var(--ok); }
.up .b-steps li.now::before { background: var(--brand-gold); }
.up .b-steps li.now { color: var(--text); }
.up .b-body { padding: 18px 16px; display: grid; gap: 12px; }
.up .b-body .pick { margin-top: 4px; }
.up .b-sticky { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 5; padding: 8px 0 0; background: var(--bg); display: grid; gap: 8px; }
.up .b-row { display: flex; gap: 8px; }
.up .b-row .btn { flex: 1; justify-content: center; }
.up .b-big { display: grid; gap: 4px; padding: 16px; }
.up .b-big .pct { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.up .b-big .lite { font-size: var(--fs-sm); }


/* ---- tiles and the detail sheet (from round 1's C Grid), on Check and Sent ---- */

/* tiles ≥ 132px so the pill always fits: 2 across at 360, 3 from 600, 4 from 768 */
.up .grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.up .b-body .grid { margin-top: 2px; }
.up .tile { position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--up-art-bg); color: var(--up-art-text); border: 0; padding: 0; cursor: pointer; display: block; width: 100%; text-align: left; font: 400 var(--fs-xs) var(--font-sans); }
.up .tile img,
.up .tile svg.art { width: 100%; height: 100%; object-fit: cover; display: block; }
.up .tile-other { background: var(--surface-sunken); color: var(--text-secondary); display: grid; place-items: center; }
.up .tile-other svg { width: 32px; height: 32px; }
.up .tile .tname { position: absolute; left: 0; right: 0; top: 0; padding: 4px 6px; background: var(--up-scrim); color: var(--up-art-text); font-weight: 700; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up .tile-other .tname { background: var(--surface); color: var(--text); }
.up .tile .tpill { position: absolute; left: 6px; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font: 800 10px var(--font-sans); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up .tile .tpill svg { width: 12px; height: 12px; flex: 0 0 auto; }
.up .tile .tpill-ok { color: var(--ok); }
.up .tile .tpill-danger { color: var(--danger); }
.up .tile-refused,
.up .tile-rejected,
.up .tile-stalled.tile-dead { outline: 3px solid var(--danger); outline-offset: -3px; }
.up .tile-stalled { outline: 3px solid var(--warn); outline-offset: -3px; }
.up .tile .tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--up-scrim); }
.up .tile .tbar i { display: block; height: 100%; background: var(--brand-gold); }
.up .tile.is-paused .tbar i,
.up .tile-stalled .tbar i { background: var(--up-art-3); }
.up .tile:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.up .c-pickrow { display: grid; gap: 10px; }
.up .tdetail { display: grid; gap: 10px; }
.up .tdetail .fthumb { width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 34vh; }
.up .tdetail .frow { grid-template-columns: minmax(0, 1fr); }
.up .tdetail dl { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; font-size: var(--fs-sm); }
.up .tdetail dt { color: var(--text-secondary); font-weight: 700; }
.up .tdetail dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }


/* ---- the toast: a short word that fades by itself (S32) ---- */
.up .toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45; padding: 10px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-left: 4px solid var(--brand-gold); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0, 8, 20, 0.25); font-size: var(--fs-sm); max-width: min(440px, calc(100vw - 32px)); box-sizing: border-box; display: flex; align-items: center; gap: 10px; }
.up .toast .btn-sm { min-height: 44px; }


/* ---- the layer: one dialog family (S34), bottom sheet on a phone (S23), page locked and inert behind it (S35) ---- */
.up .layer-back { position: fixed; inset: 0; z-index: 60; background: var(--up-scrim); touch-action: none; }
.up .layer { position: fixed; z-index: 61; display: flex; flex-direction: column; background: var(--surface); color: var(--text); box-sizing: border-box; }
.up .layer-sheet { left: 0; right: 0; bottom: 0; max-height: 92vh; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0, 8, 20, 0.35); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.up .layer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 8px 4px 16px; }
.up .layer-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up .layer-x { min-width: 48px; min-height: 48px; justify-content: center; font-size: 26px; line-height: 1; padding: 0; }
.up .layer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 10px; display: grid; gap: 10px; align-content: start; }
.up .layer-foot { position: sticky; bottom: 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--border); display: grid; gap: 8px; }
.up .layer :focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.up .c-grip { display: block; width: 40px; height: 5px; margin: 0 auto 4px; border-radius: 3px; background: var(--border-strong); }


/* ---- responsive (360 is primary, desktop is the exception) ---- */
@media (max-width: 599px) {

.up .toast { left: 16px; right: 16px; transform: none; max-width: none; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
.up .pick-row { grid-template-columns: 1fr; }
.up .pick-row .btn-secondary { min-height: 48px; }
.up .frow { grid-template-columns: 56px minmax(0, 1fr); }
.up .frow .facts { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}
@media (min-width: 600px) {
.up .layer-sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100vw - 32px)); max-height: min(84vh, 720px); border-radius: var(--radius-lg); border: 1px solid var(--border-strong); box-shadow: 0 12px 32px rgba(0, 8, 20, 0.3); padding-left: 0; padding-right: 0; }
.up .c-grip { display: none; }

  /* the centred dialog is translated, and sticky is computed before the transform; the body scrolls, so the foot can be static here */
.up .layer-foot { position: static; }
}
@media (min-width: 768px) {
.up h1 { font-size: var(--fs-2xl); }
.up .b-wrap { max-width: 600px; }
.up .b-sticky { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 1280px) {
.up .b-wrap { max-width: 640px; }
}
@media (prefers-reduced-motion: reduce) {
.up *,
.up *::before,
.up *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}
.up .up-main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
