/* The Scheduler as someone who works the schedule sees it (its stage 1; the scored comparison of 2026-11-24, agreed
   by the owner that day): My shifts with the answer line, the week as a list and a column of My hours, My requests
   and the open shifts they can take; Team week's toolbar with Filter & view; on a phone, four tabs, the week strip and
   a Request time off button always in reach; the read-only shift as a drawer (a bottom sheet on a phone); and My
   workspace › My schedule, made of the same pieces (public/js/app/scheduler-agent.js). Sizes are tokens.css's steps
   (test/design-tokens.test.js); colors are the palette's, in light and in dark. Words always carry the meaning: no
   color stands alone (WCAG 2.1 AA 1.4.1). */

/* ---------- The frame ---------- */
.sch-agent-head { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-150) var(--space-400); margin:0 0 var(--space-250); border-bottom:1px solid var(--line); }
.sch-agent-title { margin:0 0 var(--space-150); }
.sch-agent-title h1 { margin:0; color:var(--ink); font:var(--weight-bold) var(--text-3xl)/var(--leading-tight) var(--font-ui); letter-spacing:-.01em; }
.sch-agent-where { display:none; margin:var(--space-25) 0 0; color:var(--muted); font-size:var(--text-xs); }
.sch-agent-tabs { display:flex; gap:var(--space-25); align-self:flex-end; }
.sch-agent-tabs.is-phone { display:none; }
.sch-agent-tabs button { position:relative; min-height:var(--control-height-lg); padding:var(--space-100) var(--space-150); border:0; background:none; color:var(--muted); font:var(--weight-medium) var(--text-md) var(--font-ui); white-space:nowrap; cursor:pointer; }
.sch-agent-tabs button:hover { color:var(--ink); }
.sch-agent-tabs button[aria-selected="true"] { color:var(--ink); font-weight:var(--weight-semibold); }
.sch-agent-tabs button[aria-selected="true"]::after { content:""; position:absolute; left:var(--space-100); right:var(--space-100); bottom:-1px; height:3px; border-radius:var(--radius-xs) var(--radius-xs) 0 0; background:var(--spruce); }
.sch-agent-tabs button:focus-visible { outline:2px solid var(--spruce); outline-offset:-2px; border-radius:var(--radius-sm); }
.sch-agent-request { margin:0 0 var(--space-150) auto; }
.sch-grow { flex:1 1 auto; }
.sch-sticky { display:none; }
.sch-date-proxy { position:absolute; width:1px; height:1px; margin:0; padding:0; border:0; opacity:0; pointer-events:none; }
.sch-date-proxy.is-shown { position:static; width:auto; height:auto; opacity:1; pointer-events:auto; margin:var(--space-100) 0; padding:var(--space-75) var(--space-100); border:1px solid var(--control-border); border-radius:var(--radius-lg); background:var(--field-bg, var(--surface)); color:var(--ink); }

/* ---------- The answer line ---------- */
.sch-answer { margin:0 0 var(--space-250); }
.sch-answer-title { display:flex; align-items:center; gap:var(--space-150); margin:0; color:var(--ink); font:var(--weight-semibold) var(--text-3xl)/var(--leading-tight) var(--font-ui); letter-spacing:-.01em; overflow-wrap:break-word; }
.sch-answer-sub { margin:var(--space-75) 0 0; color:var(--ink-2); font-size:var(--text-md); line-height:var(--leading-normal); overflow-wrap:break-word; }
.sch-answer-dot { display:inline-block; flex:0 0 auto; width:12px; height:12px; border-radius:var(--radius-round); background:var(--muted); }
.sch-answer-dot.is-on { background:var(--good); box-shadow:0 0 0 4px var(--good-soft); }
.sch-answer-dot.is-next { background:var(--saffron); }
.sch-answer-dot.is-off { background:transparent; box-shadow:inset 0 0 0 2px var(--muted); }

/* ---------- The toolbars ---------- */
.sch-agent-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100) var(--space-150); margin:0 0 var(--space-200); }
.sch-range-button { display:inline-flex; align-items:center; gap:var(--space-75); min-height:var(--control-height); padding:0 var(--space-150); border:1px solid var(--control-border); border-radius:var(--radius-lg); background:var(--surface); color:var(--ink); font:var(--weight-semibold) var(--text-md) var(--font-ui); white-space:nowrap; cursor:pointer; }
.sch-range-button:hover { background:var(--hover-bg); }
.sch-range-button .sch-chevron, .sch-tool .sch-chevron { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; }
.sch-agent-toolbar .sch-nav { align-self:auto; }
.sch-agent-toolbar .sch-nav-button { min-height:var(--control-height); }
.sch-seg-wrap { display:inline-flex; align-items:center; gap:var(--space-75); }
.sch-seg-label { color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-seg { display:inline-flex; border:1px solid var(--control-border); border-radius:var(--radius-lg); overflow:hidden; }
.sch-seg button { min-height:var(--control-height); padding:0 var(--space-150); border:0; background:var(--surface); color:var(--ink-2); font:var(--weight-medium) var(--text-sm) var(--font-ui); cursor:pointer; white-space:nowrap; }
.sch-seg button + button { border-left:1px solid var(--control-border); }
.sch-seg button:hover { background:var(--hover-bg); }
.sch-seg button[aria-pressed="true"] { background:var(--spruce-pale); color:var(--ink); font-weight:var(--weight-semibold); box-shadow:inset 0 -2px 0 var(--spruce); }
.sch-filter-wrap { position:relative; }
.sch-popover { position:absolute; right:0; top:calc(100% + var(--space-75)); z-index:var(--z-popover); width:min(340px, calc(100vw - 2 * var(--viewport-gap))); max-height:70vh; overflow:auto; padding:var(--space-200); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); box-shadow:var(--shadow-pop); }
.sch-popover fieldset { margin:0 0 var(--space-200); padding:0; border:0; min-width:0; }
.sch-popover legend { margin:0 0 var(--space-75); padding:0; color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; }
.sch-popover .sch-check { min-height:32px; align-items:center; }
.sch-popover .sch-filter-list { max-height:none; }
/* A long list's "Show all 8" (staff-finish.js fsFoldList) and the list's Clear sit side by side: apart, not "8Clear". */
.sch-popover .fs-show-all { margin-right:var(--space-200); }
.sch-radios { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50) var(--space-150); margin-top:var(--space-100); }
.sch-radios-label { width:100%; color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-popover-actions { display:flex; align-items:center; justify-content:space-between; gap:var(--space-150); }
.sch-active-filters { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75); margin:calc(-1 * var(--space-100)) 0 var(--space-150); }
.sch-filter-chip { display:inline-flex; align-items:center; gap:var(--space-50); padding:var(--space-25) var(--space-25) var(--space-25) var(--space-150); border:1px solid var(--accent-border, var(--line)); border-radius:var(--radius-pill); background:var(--spruce-pale); color:var(--ink); font-size:var(--text-sm); white-space:nowrap; }
.sch-filter-chip button { display:inline-grid; place-items:center; width:28px; height:28px; border:0; border-radius:var(--radius-round); background:none; color:var(--ink-2); font-size:var(--text-lg); cursor:pointer; }
.sch-filter-chip button:hover { background:var(--hover-bg); }

/* ---------- My shifts: the list and its column ---------- */
.sch-mine-columns { display:grid; grid-template-columns:minmax(0, 1fr) 320px; gap:var(--space-400); align-items:start; }
.sch-days { margin:0; padding:0; list-style:none; border-top:1px solid var(--line); }
.sch-day { display:grid; grid-template-columns:170px minmax(0, 1fr); gap:var(--space-150) var(--space-250); min-height:56px; padding:var(--space-150) var(--space-150); border-bottom:1px solid var(--line); }
.sch-day.is-today { background:color-mix(in srgb, var(--saffron-pale) 55%, var(--surface)); box-shadow:inset 3px 0 0 var(--saffron); }
.sch-day.is-past { color:var(--muted); }
.sch-day-when { display:flex; flex-wrap:wrap; align-content:flex-start; align-items:center; gap:var(--space-50) var(--space-75); padding-top:var(--space-75); }
.sch-day-when b { color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-semibold); white-space:nowrap; }
.sch-day.is-past .sch-day-when b { color:var(--ink-2); }
.sch-day-tag { display:inline-flex; padding:0 var(--space-75); border-radius:var(--radius-pill); font-size:var(--text-xs); font-weight:var(--weight-semibold); line-height:var(--leading-normal); white-space:nowrap; }
.sch-day-tag.is-today { background:var(--saffron-pale); color:var(--warn-ink); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--saffron) 50%, transparent); }
.sch-day-tag.is-holiday { background:var(--terra-pale); color:var(--bad); }
.sch-day-what { display:grid; gap:var(--space-50); min-width:0; }
.sch-day-shift { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--space-25) var(--space-150); width:100%; min-height:var(--control-height); padding:var(--space-75) var(--space-100); border:0; border-radius:var(--radius-lg); background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.sch-day-shift:hover { background:var(--hover-bg-subtle); }
.sch-day-shift:focus-visible { outline:2px solid var(--spruce); outline-offset:1px; }
.sch-day-time { color:var(--ink); font-size:var(--text-lg); font-weight:var(--weight-semibold); }
.sch-day-meta { color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:break-word; }
.sch-tag { display:inline-flex; align-items:center; padding:0 var(--space-75); border-radius:var(--radius-pill); font-size:var(--text-xs); font-weight:var(--weight-semibold); line-height:var(--leading-normal); white-space:nowrap; }
.sch-tag.is-on { background:var(--good-soft); color:var(--good); }
.sch-tag.is-new { background:var(--spruce-pale); color:var(--ink); }
/* What a publish changed of the person's own shift, in words ("Changed · was 9a – 5:30p"): wraps between words. */
.sch-tag.is-changed { background:var(--spruce-pale); color:var(--ink); box-shadow:inset 0 0 0 1px var(--spruce); white-space:normal; }
.sch-day-off { margin:0; padding:var(--space-75) var(--space-100); color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:break-word; }
.sch-day-off b { color:var(--ink); font-weight:var(--weight-semibold); }
.sch-day-note { display:flex; align-items:flex-start; gap:var(--space-75); margin:0; padding:0 var(--space-100); color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:break-word; }
.sch-day-note svg { flex:0 0 auto; width:16px; height:16px; margin-top:var(--space-25); fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.sch-day-note.is-problem { color:var(--bad); font-weight:var(--weight-medium); }
.sch-day-note.is-holiday { color:var(--ink); }
.sch-day-note.is-holiday::before { content:""; flex:0 0 auto; width:4px; align-self:stretch; border-radius:var(--radius-xs); background:var(--terra); }
.sch-day-note.is-visit { color:var(--ink); }
.sch-day-note.is-removed, .sch-day-note.is-changed { color:var(--ink); }
.sch-ws-gone { margin:var(--space-50) 0 0; padding:0; list-style:none; display:grid; gap:var(--space-25); }
.sch-also { margin:var(--space-25) 0 0; padding:0 var(--space-100); color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:break-word; }
.sch-also span { color:var(--muted); font-weight:var(--weight-semibold); }
.sch-earlier, .sch-done, .sch-why { margin:0 0 var(--space-150); }
.sch-earlier > summary, .sch-done > summary, .sch-why > summary { display:inline-flex; align-items:center; min-height:var(--control-height); padding:0 var(--space-100); border-radius:var(--radius-md); color:var(--spruce); font-size:var(--text-sm); font-weight:var(--weight-semibold); cursor:pointer; }
.sch-earlier > summary:hover, .sch-done > summary:hover, .sch-why > summary:hover { background:var(--hover-bg-subtle); }
.sch-earlier[open] > .sch-days { margin-bottom:var(--space-150); }
.sch-not-published { margin:var(--space-200) 0 0; padding:var(--space-150) var(--space-200); border:1px dashed var(--line); border-radius:var(--radius-lg); color:var(--ink-2); font-size:var(--text-md); overflow-wrap:break-word; }

.sch-agent-side { display:grid; gap:var(--space-200); min-width:0; }
.sch-card { margin:0; padding:var(--space-200); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); min-width:0; }
.sch-card-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-100); margin:0 0 var(--space-100); }
.sch-card-head h2, .sch-card > h3 { margin:0; color:var(--ink); font:var(--weight-semibold) var(--text-lg)/var(--leading-tight) var(--font-ui); }
.sch-hours-period .custom-select-wrapper { width:auto; }
.sch-hours-period select { min-height:var(--control-height-sm); }
.sch-hours-figure { display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--space-100); margin:0 0 var(--space-100); }
.sch-hours-figure b { color:var(--ink); font-size:var(--text-2xl); font-weight:var(--weight-bold); white-space:nowrap; }
.sch-hours-figure span { color:var(--muted); font-size:var(--text-sm); }
.sch-hours-bar { height:8px; border-radius:var(--radius-pill); background:var(--surface-2, var(--line)); overflow:hidden; }
.sch-hours-bar i { display:block; height:100%; border-radius:var(--radius-pill); background:var(--spruce); }
.sch-hours-bar.is-over i { background:var(--bad); }
.sch-hours-said { margin:var(--space-75) 0 0; color:var(--ink-2); font-size:var(--text-sm); font-weight:var(--weight-medium); }
.sch-hours-said.is-over { color:var(--bad); }
.sch-reqs, .sch-opens, .sch-why-list, .sch-plain, .sch-also-list, .sch-ws-next { margin:0; padding:0; list-style:none; display:grid; gap:var(--space-50); }
.sch-req, .sch-open { display:flex; align-items:center; gap:var(--space-100); min-width:0; padding:var(--space-50) 0; border-bottom:1px solid var(--line); }
.sch-req:last-child, .sch-open:last-child { border-bottom:0; }
.sch-req-what, .sch-open-what { display:grid; flex:1 1 auto; gap:var(--space-25); min-width:0; padding:var(--space-50) var(--space-75); border:0; border-radius:var(--radius-md); background:none; color:var(--ink); font:inherit; text-align:left; }
button.sch-req-what, button.sch-open-what { cursor:pointer; }
button.sch-req-what:hover, button.sch-open-what:hover { background:var(--hover-bg-subtle); }
.sch-req-what b, .sch-open-what b { color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); overflow-wrap:break-word; }
.sch-req-what small, .sch-open-what small { color:var(--ink-2); font-size:var(--text-xs); overflow-wrap:break-word; }
.sch-req.is-done .sch-req-what small { color:var(--ink-2); }
.sch-req.is-declined .sch-req-what small, .sch-req.is-denied .sch-req-what small, .sch-req.is-overtime-denied .sch-req-what small { color:var(--bad); }
.sch-open-ot { color:var(--warn-ink) !important; font-weight:var(--weight-semibold); }
.sch-when { white-space:nowrap; }
.sch-open-asked { color:var(--ink-2); font-size:var(--text-xs); font-weight:var(--weight-semibold); white-space:nowrap; }
.sch-req .sch-mini, .sch-open .sch-mini { flex:0 0 auto; min-height:var(--control-height-sm); }
.sch-why-list li { display:grid; gap:var(--space-25); padding:var(--space-75) var(--space-100); border-radius:var(--radius-md); background:var(--surface-2, var(--paper)); }
.sch-why-list b { color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-why-list small { color:var(--ink-2); font-size:var(--text-xs); }
.sch-plain li { color:var(--ink); font-size:var(--text-sm); overflow-wrap:break-word; }
.sch-sub { margin:var(--space-200) 0 var(--space-75); color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; }

/* ---------- Team week: what the agent's grid says ---------- */
.sch-team .sch-grid-wrap { margin-top:0; }
.sch-chip.is-mine { box-shadow:inset 0 0 0 2px var(--ink); }
.sch-chip.is-mine .sch-chip-who { font-weight:var(--weight-bold); }
.sch-chip-asking { display:inline-flex; padding:0 var(--space-75); border-radius:var(--radius-pill); background:var(--surface); color:var(--ink); font-size:var(--text-2xs); font-style:normal; font-weight:var(--weight-bold); white-space:nowrap; box-shadow:inset 0 0 0 1px currentColor; }
.sch-chip-asking.is-mine { background:var(--spruce); color:var(--brand-ink); box-shadow:none; }
.sch-chip-note { display:flex; align-items:flex-start; gap:var(--space-50); font-size:var(--text-2xs); font-weight:var(--weight-bold); white-space:normal; overflow-wrap:normal; }
.sch-chip-note svg { flex:0 0 auto; width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:2.2; }
.sch-row.is-you .sch-row-head b { color:var(--ink); }
.sch-row.is-you .sch-row-head { box-shadow:inset 3px 0 0 var(--spruce); }
.sch-month-stat.is-mine { color:var(--ink); font-weight:var(--weight-semibold); }

/* ---------- The read-only shift: a drawer at the side, a sheet on a phone ---------- */
.modal-backdrop.open:has(> .modal.is-drawer) { place-items:stretch end; padding:0; }
.modal.is-drawer { display:flex; flex-direction:column; width:min(400px, 100%); max-height:100dvh; height:100dvh; border-radius:0; border-width:0 0 0 1px; }
.modal.is-drawer #schReadOnlyBody { flex:1 1 auto; }
.modal.is-drawer .sch-modal-actions { position:sticky; bottom:calc(-1 * var(--space-300)); display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); margin:var(--space-250) calc(-1 * var(--space-300)) calc(-1 * var(--space-300)); padding:var(--space-150) var(--space-300); border-top:1px solid var(--line); background:var(--surface); }
.sch-drawer-say { display:flex; flex-wrap:wrap; gap:var(--space-50) var(--space-100); margin:var(--space-200) 0 0; padding:var(--space-150); border-radius:var(--radius-lg); background:var(--surface-2, var(--paper)); color:var(--ink); font-size:var(--text-sm); overflow-wrap:break-word; }
.sch-drawer-say b { font-weight:var(--weight-semibold); }
.sch-drawer-say .sch-open-ot { width:100%; }
.sch-also-list li { display:grid; gap:var(--space-25); padding:var(--space-75) 0; border-bottom:1px solid var(--line); }
.sch-also-list b { color:var(--ink); font-size:var(--text-sm); }
.sch-also-list span { color:var(--ink-2); font-size:var(--text-xs); }
.sch-to-who { margin:var(--space-150) 0 0; color:var(--ink-2); font-size:var(--text-sm); }

/* ---------- The drawer beside the grid (the Scheduler's stage 4) ----------
   400 px down the window's right, from under the app's top bar to the foot of the window; the grid narrows beside it
   (its chips step down to initials) and stays in reach. Needs you, a shift or a time off, one at a time. */
.sch-drawer { position:fixed; top:var(--sch-sticky-top, var(--topbar-height)); right:0; bottom:0; z-index:var(--z-drawer); width:min(400px, 100vw); display:flex; }
.sch-drawer[hidden] { display:none; }
.sch-drawer .sch-drawer-panel { position:relative; display:flex; flex-direction:column; width:100%; max-width:none; max-height:none; height:100%; margin:0; overflow-y:auto; border-width:0 0 0 1px; border-radius:0; box-shadow:-12px 0 32px rgba(20, 23, 21, .1); }
/* Its head stays at the top while its body scrolls: the close button, and the title it is about. */
.sch-drawer .sch-drawer-panel { padding-top:0; }
.sch-drawer-top { position:sticky; top:0; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:var(--space-100); min-height:48px; margin:0 calc(-1 * var(--space-300)); padding:var(--space-100) var(--space-300) 0; background:var(--surface); }
.sch-drawer-top .modal-close { position:static; }
.sch-drawer .sch-modal-head { position:sticky; top:48px; z-index:3; display:block; margin:0 calc(-1 * var(--space-300)) var(--space-100); padding:0 var(--space-300) var(--space-150); border-bottom:1px solid var(--line); background:var(--surface); }
.sch-drawer .sch-modal-head h2 { margin:var(--space-50) 0 0; color:var(--ink); font:var(--weight-semibold) var(--text-xl)/var(--leading-tight) var(--font-ui); overflow-wrap:normal; word-break:normal; }
.sch-drawer .sch-modal-head h2:focus { outline:none; }
.sch-drawer .sch-modal-head h2:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; }
.sch-drawer :is(.sch-drawer-section, .sch-needs-sub) { scroll-margin-top:150px; }
.sch-drawer .sch-form-row-2 { align-items:start; }
.sch-form-open .sch-check { margin-top:var(--space-200); }
.sch-modal .sch-apc label.sch-check.sch-apc-tick { margin-top:var(--space-50); }
.sch-drawer-sub { margin:var(--space-25) 0 0; color:var(--ink-2); font-size:var(--text-sm); }
.sch-drawer .sch-form { flex:1 0 auto; display:flex; flex-direction:column; }
.sch-drawer .sch-form-row-2 { grid-template-columns:1fr 1fr; }
.sch-drawer-section { margin:var(--space-200) 0 var(--space-75); color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-semibold); }
.sch-drawer-actions { position:sticky; bottom:calc(-1 * var(--space-300)); display:grid; gap:var(--space-75); margin:auto calc(-1 * var(--space-300)) calc(-1 * var(--space-300)); padding:var(--space-150) var(--space-300) var(--space-200); border-top:1px solid var(--line); background:var(--surface); }
.sch-drawer-buttons { display:flex; flex-wrap:wrap; gap:var(--space-100); }
.sch-publish-words { margin:0; color:var(--ink-2); font-size:var(--text-xs); }
.sch-drawer-links { display:flex; flex-wrap:wrap; gap:var(--space-50) var(--space-150); }
.sch-drawer-links .is-danger { color:var(--bad); }
.sch-form-open { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-100) var(--space-200); }
.sch-form-open[hidden] { display:none; }
/* An open shift's pick-up requests are cards of their own: no box around them. */
.sch-drawer .sch-requests { margin-top:0; padding:0; border:0; border-radius:0; }
.sch-drawer .sch-requests .sch-drawer-section { margin-top:var(--space-100); }
.sch-history summary { cursor:pointer; color:var(--ink); font-weight:var(--weight-semibold); }
.sch-history-lines { margin:var(--space-75) 0; padding-left:var(--space-250); color:var(--ink-2); font-size:var(--text-sm); }
.sch-frame.has-drawer { margin-right:calc(400px - var(--space-500) + var(--space-200)); }
/* Beside the drawer, compact: a 120 px row head and seven days of at least 84 px fit in the 758 px left at 1440, with
   the chips' words a size smaller so a time stays whole ("10a – 6:30p"). Narrower, the grid is its own box (below). */
.sch-frame.has-drawer .sch-grid { grid-template-columns:120px repeat(var(--sch-days, 7), minmax(84px, 1fr)); }
.sch-frame.has-drawer .sch-grid.is-day { grid-template-columns:120px minmax(240px, 1fr); }
.sch-frame.has-drawer .sch-chip { font-size:var(--text-2xs); padding-left:var(--space-75); padding-right:var(--space-50); }
.sch-frame.has-drawer .sch-row-head { padding-left:var(--space-100); padding-right:var(--space-100); }
/* A position's whole name is in its row head's hover text beside the drawer, as on a phone: its short name keeps the
   row head to a line or two. */
.sch-frame.has-drawer .sch-row-full { display:none; }
.sch-chip.is-ringed { outline:3px solid var(--spruce); outline-offset:1px; }
.sch-cell:focus-visible { outline:2px solid var(--spruce); outline-offset:-2px; }
/* While dragging, the cell says what a drop there would make: OK, Overlap or Over the line (in words). */
.sch-cell.is-drop-target[data-sch-drop]::after { content:attr(data-sch-drop); display:block; margin-top:var(--space-25); color:var(--ink); font-size:var(--text-2xs); font-weight:var(--weight-bold); }
.sch-cell.is-drop-target[data-sch-drop="Overlap"]::after, .sch-cell.is-drop-target[data-sch-drop="Over the line"]::after { color:var(--bad); }

/* The requests, as Approvals cards: Needs you, the shift drawer, My workspace › Approvals. */
.sch-apc { display:grid; gap:var(--space-50); margin:0 0 var(--space-100); padding:var(--space-150); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); }
.sch-apc-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:var(--space-50) var(--space-100); }
.sch-apc-who { color:var(--ink); font-size:var(--text-md); overflow-wrap:normal; word-break:normal; }
.sch-apc-line { margin:0; color:var(--ink-2); font-size:var(--text-sm); }
.sch-apc-rule { display:flex; align-items:flex-start; gap:var(--space-50); margin:0; color:var(--warn-ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-apc-rule svg, .sch-problem > svg { flex:0 0 auto; width:16px; height:16px; margin-top:var(--space-25); fill:none; stroke:currentColor; stroke-width:1.8; }
.sch-apc-tick { font-size:var(--text-sm); }
.sch-apc-actions, .sch-deny-actions, .sch-problem-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); }
.sch-apc-more[hidden] { display:none; }
.sch-needs-filter { display:inline-flex; margin:var(--space-100) 0 var(--space-50); }
.sch-needs-sub { margin:var(--space-150) 0 var(--space-75); color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-hint-line { margin:var(--space-50) 0 var(--space-100); color:var(--ink-2); font-size:var(--text-sm); }
.sch-needs-foot { margin:var(--space-250) 0 0; font-size:var(--text-xs); }
.sch-problem-list { display:grid; gap:var(--space-100); margin:0; padding:0; list-style:none; }
.sch-problem { display:flex; gap:var(--space-100); padding:var(--space-150); border:1px solid var(--line); border-radius:var(--radius-lg); color:var(--warn-ink); }
.sch-problem p { margin:0 0 var(--space-75); color:var(--ink); font-size:var(--text-sm); }
.sch-problem.is-closed { color:var(--bad); }

/* Fix gaps: who could take it, under the four headings. */
.sch-fix { margin:0 0 var(--space-150); padding:0 0 var(--space-100); border-bottom:1px solid var(--line); }
.sch-fix[hidden] { display:none; }
/* "Founders Day: the desk is open (Priya Shah said so, …). Take it back", in the drawer of a shift that day. */
.sch-desk-open { flex-wrap:wrap; align-items:center; margin-top:var(--space-150); padding:0; }
.sch-desk-open[hidden] { display:none; }
.sch-fit-head { margin:var(--space-150) 0 var(--space-50); color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-fit-head small { color:var(--muted); font-weight:var(--weight-medium); }
.sch-fit-list { margin:0; padding:0; list-style:none; }
.sch-fit-row { display:flex; align-items:center; justify-content:space-between; gap:var(--space-100); padding:var(--space-50) 0; border-bottom:1px solid var(--line); }
.sch-fit-who { display:grid; min-width:0; }
.sch-fit-who b { color:var(--ink); font-size:var(--text-sm); }
.sch-fit-who small { color:var(--ink-2); font-size:var(--text-xs); }
.sch-fit-pick { flex:0 0 auto; }
.sch-fit-more summary { cursor:pointer; padding:var(--space-50) 0; color:var(--ink-2); font-size:var(--text-sm); }

/* The quick-add beside an empty cell, and the chip's menu. */
.sch-quick { position:fixed; z-index:var(--z-popover); width:320px; max-height:calc(100dvh - 16px); overflow-y:auto; padding:var(--space-200); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); box-shadow:var(--shadow-pop); }
.sch-quick-form { display:grid; gap:var(--space-100); }
.sch-quick-title { margin:0; color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-semibold); }
.sch-quick-open { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-100) var(--space-150); }
.sch-quick-open[hidden] { display:none; }
.sch-quick-warn { margin:0; color:var(--warn-ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-quick-actions { display:flex; align-items:center; gap:var(--space-150); }
.sch-chip-menu { position:fixed; z-index:var(--z-popover); display:grid; min-width:200px; }

/* ---------- My workspace › My schedule ---------- */
.sch-ws { display:grid; gap:var(--space-200); }
.sch-ws .sch-answer { margin:0; }
.sch-ws .sch-answer-title { font-size:var(--text-xl); }
.sch-ws .sch-answer-sub { font-size:var(--text-sm); }
.sch-ws-part h3 { margin:0 0 var(--space-75); color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-semibold); }
.sch-ws-next li { display:grid; gap:var(--space-25); }
.sch-ws .sch-day-time { font-size:var(--text-md); }
.sch-ws .sch-card { padding:var(--space-150); }

/* ---------- Narrower, then a phone ---------- */
@media (max-width: 1100px) {
  .sch-mine-columns { grid-template-columns:minmax(0, 1fr); }
  .sch-agent-side { grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  /* The breadcrumb repeats the title: the line under it names the workspace and the zone instead. */
  body:has(#schedulingView.active-view .sch-agent) .page-frame-bar { display:none; }
  .sch-agent-head { align-items:stretch; gap:var(--space-100); margin-bottom:var(--space-150); border-bottom:0; }
  .sch-agent-title { margin:0; }
  .sch-agent-title h1 { font-size:var(--text-2xl); }
  .sch-agent-where { display:block; }
  .sch-agent-tabs { display:none; }
  .sch-agent-tabs.is-phone { display:flex; width:100%; gap:var(--space-50); overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; border-bottom:1px solid var(--line); }
  .sch-agent-tabs.is-phone button { flex:1 0 auto; min-height:var(--control-height-lg); padding:0 var(--space-100); }
  .sch-agent-request { display:none; }
  /* Kept at the foot of the screen, outside the view (scheduler-agent.js), while the agent's Scheduler is the page on
     screen; the page leaves room under its last row for it. */
  body:has(#schedulingView.active-view .sch-agent) .sch-sticky:not([hidden]) { position:fixed; left:0; right:0; bottom:0; z-index:var(--z-page); display:block; padding:var(--space-100) var(--viewport-gap) calc(var(--space-100) + env(safe-area-inset-bottom, 0px)); border-top:1px solid var(--line); background:var(--surface); box-shadow:0 -4px 16px rgba(0, 0, 0, .06); }
  #schedulingView.active-view .sch-agent { padding-bottom:var(--space-1000); }
  .sch-sticky .create-button { display:flex; justify-content:center; width:100%; min-height:48px; }
  .sch-answer.is-card { display:grid; gap:var(--space-25); width:100%; margin:var(--space-150) 0; padding:var(--space-200); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .sch-answer.is-card.is-on { border-color:color-mix(in srgb, var(--good) 40%, var(--line)); }
  .sch-answer-eyebrow { display:flex; align-items:center; gap:var(--space-75); color:var(--ink-2); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.08em; }
  .sch-answer-eyebrow .sch-answer-dot { width:10px; height:10px; }
  .sch-answer-big { color:var(--ink); font-size:var(--text-3xl); font-weight:var(--weight-semibold); line-height:var(--leading-tight); }
  .sch-answer-where { color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-medium); }
  .sch-answer-when, .sch-answer-oncall { color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:break-word; }
  .sch-answer-oncall { margin-top:var(--space-50); padding-top:var(--space-75); border-top:1px solid var(--line); }
  .sch-strip { margin:0 0 var(--space-150); }
  .sch-strip-ctl { display:flex; align-items:center; gap:var(--space-50); margin-bottom:var(--space-100); }
  .sch-strip-ctl .sch-range-button { flex:1 1 auto; justify-content:center; min-height:var(--control-height-lg); }
  .sch-strip-arrow, .sch-strip-today { min-width:var(--control-height-lg); min-height:var(--control-height-lg); padding:0 var(--space-100); border:1px solid var(--control-border); border-radius:var(--radius-lg); background:var(--surface); color:var(--ink); font:var(--weight-semibold) var(--text-md) var(--font-ui); cursor:pointer; }
  .sch-strip-days { display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:var(--space-50); }
  .sch-strip-day { position:relative; display:grid; justify-items:center; align-content:start; gap:var(--space-25); min-height:64px; padding:var(--space-50) 0; border:1px solid transparent; border-radius:var(--radius-lg); background:none; color:var(--ink); font:inherit; cursor:pointer; }
  .sch-strip-day span { color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-semibold); }
  .sch-strip-day b { font-size:var(--text-lg); font-weight:var(--weight-semibold); }
  .sch-strip-day em { color:var(--ink-2); font-size:var(--text-2xs); font-style:normal; font-weight:var(--weight-semibold); }
  .sch-strip-dot { width:6px; height:6px; border-radius:var(--radius-round); background:transparent; }
  .sch-strip-day.is-work .sch-strip-dot { background:var(--spruce); }
  .sch-strip-day.is-asked:not(.is-work) .sch-strip-dot { background:transparent; box-shadow:inset 0 0 0 1.5px var(--spruce); }
  .sch-strip-day.is-today { border-color:var(--saffron); background:color-mix(in srgb, var(--saffron-pale) 60%, var(--surface)); }
  .sch-strip-day.is-holiday em { color:var(--bad); }
  .sch-strip-day.is-past { color:var(--muted); }
  .sch-strip-day[aria-pressed="true"] { border-color:var(--spruce); box-shadow:inset 0 0 0 1px var(--spruce); }
  .sch-phone-list .sch-days { border-top:0; }
  .sch-day { grid-template-columns:minmax(0, 1fr); gap:var(--space-50); min-height:64px; padding:var(--space-100) var(--space-50); }
  .sch-day-when { padding-top:0; }
  .sch-day-shift { padding:var(--space-50) 0; min-height:var(--control-height-lg); }
  .sch-day-time { font-size:var(--text-md); }
  .sch-day-note, .sch-day-off, .sch-also { padding-left:0; padding-right:0; }
  .sch-card.is-phone, .sch-agent-side.is-phone > .sch-card:not([hidden]) { margin-top:var(--space-200); }
  .sch-phone-part { display:grid; gap:var(--space-100); margin-top:var(--space-150); }
  .sch-opens.is-phone .sch-open { align-items:stretch; flex-wrap:wrap; }
  .sch-open.is-picked { background:var(--spruce-pale); border-radius:var(--radius-md); }
  .sch-open-what[aria-pressed="true"] b::before { content:"✓ "; }
  .sch-req .sch-mini, .sch-open .sch-mini, .sch-team-row, .sch-earlier > summary, .sch-done > summary, .sch-why > summary { min-height:var(--control-height-lg); }
  /* My hours' period choice (a custom select: tickets.js enhanceDropdown) is a 44 px target too. */
  .sch-hours-period select, .sch-hours-period .custom-select-trigger { min-height:var(--control-height-lg); }
  .sch-team-day { margin:var(--space-100) 0 var(--space-50); color:var(--ink); font-size:var(--text-lg); font-weight:var(--weight-semibold); }
  .sch-team-group h3 { margin:var(--space-150) 0 var(--space-50); color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; }
  .sch-team-group ul { margin:0; padding:0; list-style:none; display:grid; gap:var(--space-25); }
  .sch-team-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--space-25) var(--space-150); width:100%; padding:var(--space-75) var(--space-150); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--surface); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
  .sch-team-row b { font-size:var(--text-md); font-weight:var(--weight-semibold); }
  .sch-team-row span { color:var(--ink-2); font-size:var(--text-sm); }
  .sch-team-row.is-mine { box-shadow:inset 3px 0 0 var(--spruce); }
  .sch-team-row.is-open { border-style:dashed; background:color-mix(in srgb, var(--saffron-pale) 45%, var(--surface)); }
  /* The shift opens as a sheet from the foot of the screen. */
  .modal-backdrop.open:has(> .modal.is-drawer) { place-items:end stretch; }
  .modal.is-drawer { width:100%; height:auto; max-height:88dvh; border-width:1px 0 0; border-radius:var(--radius-xl) var(--radius-xl) 0 0; }
  .modal.is-drawer .sch-modal-actions .save-button, .modal.is-drawer .sch-modal-actions .outline-button { min-height:var(--control-height-lg); }
  /* Asking for time off is a full-screen sheet from the button at the foot of the screen (scheduling.js schOpenTimeOff). */
  .modal-backdrop.open:has(> .modal.is-sheet) { place-items:stretch; padding:0; }
  .modal.is-sheet { width:100%; max-width:none; height:100dvh; max-height:100dvh; margin:0; border-width:0; border-radius:0; overflow-y:auto; }
  .modal.is-sheet .save-button, .modal.is-sheet .outline-button { min-height:var(--control-height-lg); }
}
@media print {
  .sch-agent-tabs, .sch-agent-request, .sch-agent-toolbar, .sch-sticky, .sch-agent-side { display:none !important; }
  .sch-mine-columns { grid-template-columns:1fr; }
  .sch-earlier { display:block; }
}

/* ---------- The scheduler's frame (the Scheduler's stage 2) ---------- */
/* For the people who build the schedule (public/js/app/scheduler-frame.js): the title row with its tabs and "+ New
   shift", the status line (Needs you, Your changes), one toolbar that wraps when narrow, and the grid across the page.
   The grid scrolls with the page: no box of its own while seven days fit, its day header sticking under the app's top
   bar and its row heads at the left (the owner's answer to question 5, changing docs/adr/0085). Pills are hidden at
   zero; every word stays whole. */
.sch-frame { --sch-sticky-top:var(--topbar-height); }
/* On a wide screen .main-content's overflow-x:hidden made it a scroll box that never scrolls, so nothing in it could
   stick to the window (the ticket list's fix, ticket-list.css): the top bar and the grid's day header stick again. */
.main-content:has(#schedulingView.active-view .sch-frame) { overflow-x:clip; overflow-y:visible; }
.sch-title-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:var(--space-100) var(--space-400); margin:0 0 var(--space-200); border-bottom:1px solid var(--line); }
.sch-title { margin:0 0 var(--space-150); }
.sch-title h1 { margin:0; color:var(--ink); font:var(--weight-bold) var(--text-3xl)/var(--leading-tight) var(--font-ui); letter-spacing:-.01em; }
.sch-where { display:none; margin:var(--space-25) 0 0; color:var(--muted); font-size:var(--text-xs); }
.sch-frame .sch-title-tabs { display:flex; align-self:flex-end; gap:var(--space-25); margin:0; padding:0; border:0; background:none; }
.sch-frame .sch-title-tabs button { position:relative; min-height:var(--control-height-lg); padding:var(--space-100) var(--space-150); border:0; border-radius:0; background:none; color:var(--muted); font:var(--weight-medium) var(--text-md) var(--font-ui); white-space:nowrap; cursor:pointer; }
.sch-frame .sch-title-tabs button:hover { color:var(--ink); }
.sch-frame .sch-title-tabs button.active { color:var(--ink); font-weight:var(--weight-semibold); }
.sch-frame .sch-title-tabs button.active::after { content:""; position:absolute; left:var(--space-100); right:var(--space-100); bottom:-1px; height:3px; border-radius:var(--radius-xs) var(--radius-xs) 0 0; background:var(--spruce); }
.sch-frame .sch-title-tabs button:focus-visible { outline:2px solid var(--spruce); outline-offset:-2px; border-radius:var(--radius-sm); }
/* "+ New shift ▾": one outline split button; its menu adds an open shift or time off. */
.sch-split { display:inline-flex; align-items:stretch; align-self:center; margin:0 0 var(--space-150); }
.sch-split[hidden] { display:none; }
.sch-split .sch-split-main { min-height:var(--control-height); border-top-right-radius:0; border-bottom-right-radius:0; }
.sch-split .sch-split-more { display:inline-grid; place-items:center; min-width:var(--control-height); min-height:var(--control-height); padding:0 var(--space-75); border-left-width:0; border-top-left-radius:0; border-bottom-left-radius:0; }
.sch-split .sch-split-more .sch-chevron { width:14px; height:14px; }
.sch-split .sch-more-menu { top:calc(100% + var(--space-50)); }
.sch-more-menu .is-danger { color:var(--bad); }

/* The status line: what needs you, and your changes, in one card. */
.sch-status { display:flex; flex-wrap:wrap; margin:0 0 var(--space-150); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); }
/* Each half's label sits on the left of its items, so the line is one 48 px card when both fit (1440 px); the items
   go under the label only when they don't fit beside it. */
/* (Its pills, gaps and sides a step tighter than a toolbar's, so both halves fit side by side at 1440 px: the
   whole-branch review measured 67 px for the agreed 48.) */
.sch-status-half { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50) var(--space-100); min-width:0; padding:var(--space-75) var(--space-100) var(--space-100); }
.sch-status-needs { flex:1 1 440px; }
.sch-status-changes { flex:0 1 auto; border-left:1px solid var(--line); }
.sch-status-label { color:var(--ink-2); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; }
.sch-needs-items, .sch-changes { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-75); min-width:0; }
.sch-status .sch-pill { padding:0 var(--space-100); }
.sch-pill-wrap, .sch-visits { position:relative; display:inline-flex; }
.sch-pill { display:inline-flex; align-items:center; gap:var(--space-75); min-height:var(--control-height-sm); padding:0 var(--space-150); border:1px solid var(--control-border); border-radius:var(--radius-pill); background:var(--surface); color:var(--ink); font:var(--weight-semibold) var(--text-sm) var(--font-ui); white-space:nowrap; cursor:pointer; }
.sch-pill:hover { background:var(--hover-bg); }
.sch-pill:focus-visible, .sch-visits-link:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; }
.sch-pill svg, .sch-visits-link svg { width:16px; height:16px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.sch-pill.is-warn svg { color:var(--warn-ink); }
.sch-pill[aria-pressed="true"], .sch-pill[aria-expanded="true"] { border-color:var(--spruce); background:var(--spruce-pale); box-shadow:inset 0 0 0 1px var(--spruce); }
.sch-calm { color:var(--muted); font-size:var(--text-sm); }
.sch-visits-link { display:inline-flex; align-items:center; gap:var(--space-50); min-height:var(--control-height-sm); padding:0 var(--space-75); border:0; border-radius:var(--radius-md); background:none; color:var(--spruce); font:var(--weight-semibold) var(--text-sm) var(--font-ui); white-space:nowrap; cursor:pointer; }
.sch-visits-link:hover { background:var(--hover-bg-subtle); text-decoration:underline; }
.sch-pill-menu, .sch-visits-panel { position:absolute; left:0; top:calc(100% + var(--space-75)); z-index:var(--z-popover); display:grid; gap:var(--space-25); width:min(360px, calc(100vw - 2 * var(--viewport-gap))); max-height:60vh; overflow:auto; padding:var(--space-100); border:1px solid var(--line); border-radius:var(--radius-xl); background:var(--surface); box-shadow:var(--shadow-pop); }
.sch-pill-menu button { display:grid; gap:var(--space-25); width:100%; min-height:var(--control-height); padding:var(--space-75) var(--space-100); border:0; border-radius:var(--radius-md); background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.sch-pill-menu button:hover, .sch-pill-menu button:focus-visible { background:var(--hover-bg); }
.sch-pill-menu b { font-size:var(--text-sm); font-weight:var(--weight-semibold); overflow-wrap:normal; word-break:normal; }
.sch-pill-menu small { color:var(--ink-2); font-size:var(--text-xs); }
.sch-pill-menu .sch-pill-menu-all { color:var(--spruce); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-visits-panel { padding:var(--space-150) var(--space-200); }
.sch-visits-panel h3 { margin:0 0 var(--space-100); color:var(--ink); font-size:var(--text-md); }
.sch-visits-panel h4 { margin:var(--space-150) 0 var(--space-75); color:var(--muted); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; }
.sch-swatch { display:inline-block; flex:0 0 auto; width:14px; height:14px; border:1.5px dashed var(--ink-2); border-radius:var(--radius-xs); }
.sch-changes-words { display:grid; line-height:var(--leading-tight); }
.sch-changes-words b { color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-changes-words small { color:var(--muted); font-size:var(--text-xs); }
.sch-changes .save-button { padding:var(--space-75) var(--space-150); }

/* The toolbar: one row at 1440 px; Filter & view, Select and More wrap to a second row when it doesn't fit. */
/* (A step closer, and the range a size smaller, so it is one row at 1280 px too: the whole-branch review.) */
.sch-frame-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-100) var(--space-100); margin:0 0 var(--space-150); }
.sch-frame-toolbar .sch-seg button { padding:0 var(--space-100); }
.sch-frame-toolbar .sch-toolbar-end .sch-tool { padding-left:var(--space-100); padding-right:var(--space-100); }
.sch-toolbar-start, .sch-toolbar-end { display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--space-100); }
.sch-frame-toolbar .sch-range-button { font-size:var(--text-md); }
.sch-frame-toolbar .sch-nav { align-self:auto; }
.sch-frame-toolbar .sch-nav-button, .sch-frame-toolbar .sch-tool { min-height:var(--control-height); }
.sch-frame-toolbar .sch-tool { display:inline-flex; align-items:center; gap:var(--space-50); }
.sch-frame-popover .sch-radios + .sch-radios { margin-top:var(--space-150); }
.sch-frame .sch-active-filters { margin:0 0 var(--space-150); }
.sch-filter-count { color:var(--ink-2); font-size:var(--text-sm); }
.sch-hint-once { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); margin:0 0 var(--space-150); padding:var(--space-50) var(--space-150); border:1px solid color-mix(in srgb, var(--spruce) 30%, var(--line)); border-radius:var(--radius-lg); background:var(--spruce-pale); color:var(--ink); font-size:var(--text-sm); }
.sch-hint-once[hidden], .sch-phone-note { display:none; }
.sch-hint-once kbd, .sch-help kbd { padding:0 var(--space-50); border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--surface); font:var(--weight-semibold) var(--text-xs) var(--font-ui); }
.sch-help { display:grid; grid-template-columns:minmax(0, 12rem) minmax(0, 1fr); gap:var(--space-150) var(--space-200); margin:var(--space-200) 0 0; font-size:var(--text-md); }
.sch-help dt { color:var(--ink); font-weight:var(--weight-semibold); }
.sch-help dd { margin:0; color:var(--ink-2); }

/* The grid across the page, scrolling with it. When seven days don't fit (a narrower laptop, the drawer open at 1280 px)
   it scrolls sideways in its own box; its day header can't stick to the page from inside that box, so a copy of it does
   (scheduler-frame.js schSyncFloatHead; the whole-branch review): fixed under the top bar (and an outage banner that
   stays with it), as wide as the box, moved with its sideways scroll, so which column is which day is always on screen. */
.sch-frame .sch-grid-wrap { overflow:visible; }
.sch-frame .sch-grid-wrap.is-scrolling { overflow-x:auto; --sch-sticky-top:0px; }
.sch-float-head { position:fixed; top:var(--sch-page-top, var(--topbar-height)); z-index:var(--z-page); overflow:hidden; border:1px solid var(--line); border-top:0; border-radius:0 0 var(--radius-lg) var(--radius-lg); background:var(--surface); box-shadow:0 4px 12px rgba(0, 0, 0, .08); pointer-events:auto; }
.sch-float-head[hidden] { display:none; }
.sch-float-head > .sch-grid { min-width:0; }
.sch-float-head .sch-row.sch-head > * { position:static; }
.sch-frame .sch-head > * { position:sticky; top:var(--sch-sticky-top, var(--topbar-height)); z-index:3; }
.sch-frame .sch-head > .sch-corner { left:0; z-index:4; }
.sch-frame .sch-head > :first-child { border-top-left-radius:var(--radius-xl); }
.sch-frame .sch-head > :last-child { border-top-right-radius:var(--radius-xl); }
.sch-frame .sch-row-head { position:sticky; left:0; z-index:2; }
.sch-frame .sch-grid.is-compact .sch-cell { min-height:44px; padding:var(--space-50); gap:var(--space-50); }
.sch-frame .sch-grid.is-compact .sch-chip { min-height:0; padding-top:var(--space-25); padding-bottom:var(--space-25); }
.sch-frame .sch-grid.is-compact .sch-row-head { padding-top:var(--space-75); padding-bottom:var(--space-75); }

/* Changes that wait for publishing (the Scheduler's stage 3). A change is dashed, as a new shift is, and says so in a
   word (New, Changed, Removed); a removed shift's time is struck through and the chip is quieter, never by color alone. */
.sch-chip.is-removed { background:var(--surface-2, var(--paper)); color:var(--ink-2); }
.sch-chip.is-removed .sch-chip-who, .sch-chip.is-removed .sch-chip-time { color:var(--ink-2); }
.sch-chip.is-removed s { text-decoration-thickness:1.5px; }
.sch-as-people { display:inline-flex; align-items:center; gap:var(--space-50); }
.sch-as-people svg, .sch-as-people-line svg { width:16px; height:16px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.sch-as-people[aria-pressed="true"] { border-color:var(--spruce); background:var(--spruce-pale); color:var(--ink); box-shadow:inset 0 0 0 1px var(--spruce); }
.sch-as-people-line { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); margin:0 0 var(--space-150); padding:var(--space-100) var(--space-150); border:1px solid color-mix(in srgb, var(--spruce) 30%, var(--line)); border-radius:var(--radius-lg); background:var(--spruce-pale); color:var(--ink); font-size:var(--text-sm); }
.sch-as-people-line[hidden] { display:none; }
.sch-bulk-group { display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--space-50); }
.sch-form-change { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); margin:0 0 var(--space-150); padding:var(--space-100) var(--space-150); border:1.5px dashed var(--ink-2); border-radius:var(--radius-lg); background:var(--surface); color:var(--ink); font-size:var(--text-sm); }
.sch-form-change[hidden] { display:none; }
.sch-form-change p { flex:1 1 280px; margin:0; overflow-wrap:normal; word-break:normal; }
/* A removed shift's person, day, time and breaks are read only until it is kept: Add a break and Repeat shifts look it. */
.sch-add-break:disabled, .sch-toggle:has(input:disabled) { opacity:.5; cursor:default; }
/* Review & publish: a centered sheet, 640 px, the grid behind it; on a phone the whole screen. */
.sch-review-modal { width:min(640px, calc(100vw - 2 * var(--viewport-gap))); max-width:640px; }
.sch-review { display:grid; gap:var(--space-150); max-height:min(62vh, 640px); overflow:auto; margin:var(--space-150) 0 0; padding-right:var(--space-50); }
/* What the review covers, and what the dry run answers: drawn apart, so a radio keeps the keyboard as the answer is read. */
.sch-review-head, .sch-review-result { display:grid; gap:var(--space-150); min-width:0; }
.sch-review-head:empty, .sch-review-result:empty { display:none; }
.sch-review-range { display:grid; gap:var(--space-50); margin:0; padding:0; border:0; }
.sch-review-range legend { margin:0 0 var(--space-50); color:var(--ink-2); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; }
.sch-modal .sch-review-range label.sch-check { align-items:center; min-height:var(--control-height-sm); margin:0; }
.sch-modal .sch-review-range label.sch-check input { margin-top:0; }
.sch-review-scope { margin:0; }
.sch-review-notice { margin:0; padding:var(--space-100) var(--space-150); border:1px solid color-mix(in srgb, var(--warn-ink) 40%, var(--line)); border-radius:var(--radius-lg); background:var(--warn-bg, var(--surface-2)); color:var(--ink); font-size:var(--text-sm); }
.sch-review-part h3 { margin:0 0 var(--space-75); color:var(--ink); font-size:var(--text-md); }
.sch-review-part.is-check h3 { color:var(--warn-ink); }
.sch-review-told, .sch-review-plain, .sch-review-past, .sch-review-changes { display:grid; gap:var(--space-75); margin:0; padding:0; list-style:none; }
.sch-review-told > li { display:grid; gap:var(--space-25); padding:var(--space-75) var(--space-100); border:1px solid var(--line); border-radius:var(--radius-md); }
.sch-review-told > li > b { color:var(--ink); }
.sch-review-how { color:var(--ink-2); font-size:var(--text-xs); }
.sch-review-told ul { display:grid; gap:var(--space-25); margin:var(--space-25) 0 0; padding:0; list-style:none; font-size:var(--text-sm); }
.sch-review-told ul li { display:grid; grid-template-columns:5.25rem minmax(0, 1fr); align-items:baseline; gap:var(--space-50) var(--space-100); overflow-wrap:normal; word-break:normal; }
.sch-review-more summary { color:var(--spruce); font-size:var(--text-sm); font-weight:var(--weight-semibold); cursor:pointer; }
.sch-review-kind { display:inline-flex; min-width:4.6rem; color:var(--ink); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; }
.sch-review-kind.is-removed { color:var(--bad); }
.sch-review-plain li { display:flex; align-items:flex-start; gap:var(--space-75); font-size:var(--text-sm); }
.sch-review-plain svg { width:14px; height:14px; flex:0 0 auto; margin-top:var(--space-25); fill:none; stroke:var(--warn-ink); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sch-review-past li { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-100); font-size:var(--text-sm); }
.sch-review-past li span { flex:1 1 260px; }
.sch-review-others { margin:0 0 var(--space-75); color:var(--ink); font-size:var(--text-sm); font-weight:var(--weight-semibold); }
.sch-review-change { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:var(--space-50) var(--space-100); align-items:baseline; padding:var(--space-50) 0; border-bottom:1px solid var(--line); font-size:var(--text-sm); }
.sch-review-what { display:grid; overflow-wrap:normal; word-break:normal; }
.sch-review-what small { color:var(--ink-2); font-size:var(--text-xs); }
.sch-review-by { color:var(--ink-2); font-size:var(--text-xs); white-space:nowrap; }
.sch-review-by.is-other { color:var(--ink); font-weight:var(--weight-semibold); }
.sch-review-actions { flex-wrap:wrap; }
.sch-review-discard { color:var(--bad); }

/* ---------- The Scheduler's stage 5 ---------- */
/* Build a week: a centered dialog, 640 px; the preview under the choices says what it does before anything is written. */
#schBuildModal .sch-modal { width:min(640px, calc(100vw - 2 * var(--viewport-gap))); max-width:640px; }
.sch-build { display:grid; gap:var(--space-150); margin:var(--space-150) 0 0; }
.sch-build-fields { display:grid; gap:var(--space-150); min-width:0; }
.sch-build-radios { display:grid; gap:var(--space-50); margin:0; padding:0; border:0; }
.sch-build-radios legend { margin:0 0 var(--space-50); color:var(--ink-2); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; }
.sch-build-choice { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-50) var(--space-150); min-width:0; }
.sch-modal .sch-build-choice label.sch-check { align-items:center; min-height:var(--control-height-sm); margin:0; }
.sch-modal .sch-build-choice label.sch-check input { margin-top:0; }
.sch-build-choice .sch-field.sch-inline { margin:0; min-width:min(100%, 16rem); }
.sch-build-what { color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:normal; word-break:normal; }
.sch-build-note { margin:0; font-size:var(--text-sm); }
.sch-build-preview { display:grid; gap:var(--space-75); padding:var(--space-150); border:1px dashed var(--ink-2); border-radius:var(--radius-lg); background:var(--surface); color:var(--ink); font-size:var(--text-sm); }
.sch-build-preview p { margin:0; overflow-wrap:normal; word-break:normal; }
.sch-build-range { color:var(--ink); font-size:var(--text-md); }
.sch-build-watch { color:var(--ink); font-weight:var(--weight-medium); }
/* Manage weekly templates: the drawer's list, each with Use…, Edit and Delete. */
.sch-templates { display:grid; gap:var(--space-150); }
.sch-templates[hidden] { display:none; }
.sch-templates p { margin:0; }
.sch-template-list { display:grid; gap:0; margin:0; padding:0; list-style:none; }
.sch-template-item { display:grid; gap:var(--space-75); padding:var(--space-150) 0; border-bottom:1px solid var(--line); }
.sch-template-words { display:grid; gap:var(--space-25); overflow-wrap:normal; word-break:normal; }
.sch-template-words b { color:var(--ink); font-size:var(--text-md); }
.sch-template-words small { color:var(--ink-2); font-size:var(--text-sm); }
.sch-template-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); }
.sch-template-actions .is-danger { color:var(--bad); }
/* The Day timeline: the day's title, its summary and who is on now over an hour line; a row a position (or person),
   each shift a bar (the grid's own chip) in its lane, its breaks gaps that say Break; a Now line down every row. */
.sch-tl { display:grid; gap:var(--space-150); }
.sch-tl-top { display:grid; gap:var(--space-50); padding:var(--space-150) var(--space-200) 0; }
.sch-tl-title { margin:0; color:var(--ink); font:var(--weight-semibold) var(--text-xl)/var(--leading-tight) var(--font-ui); }
.sch-tl-title:focus { outline:none; }
.sch-tl-title:focus-visible { outline:2px solid var(--spruce); outline-offset:2px; }
.sch-tl-summary, .sch-tl-on { margin:0; color:var(--ink-2); font-size:var(--text-sm); overflow-wrap:normal; word-break:normal; }
.sch-tl-on { color:var(--ink); }
#schGrid > .sch-tl-on { margin:0; padding:var(--space-150) var(--space-150) var(--space-100); border-bottom:1px solid var(--line); }
.sch-tl-closed { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-75) var(--space-150); margin:var(--space-50) 0 0; }
.sch-tl-closed-actions { display:inline-flex; flex-wrap:wrap; gap:var(--space-75); }
.sch-grid.sch-tl-grid { grid-template-columns:196px minmax(480px, 1fr); }
.sch-tl-corner { align-content:center; }
.sch-tl-scale { position:relative; min-height:40px; border-bottom:1px solid var(--line); background:var(--surface-2, var(--paper)); }
.sch-tl-hour { position:absolute; bottom:var(--space-50); transform:translateX(-50%); color:var(--ink-2); font-size:var(--text-2xs); font-variant-numeric:tabular-nums; white-space:nowrap; }
.sch-tl-hour:first-child { transform:none; padding-left:var(--space-50); }
.sch-tl-hour:last-of-type { transform:translateX(-100%); padding-right:var(--space-50); }
.sch-tl-track { --sch-lane-height:44px; display:block; min-height:calc(var(--sch-lanes, 1) * var(--sch-lane-height) + var(--space-100)); padding:0; background-image:linear-gradient(to right, var(--line) 1px, transparent 1px); background-size:calc(100% / var(--sch-tl-hours, 16)) 100%; }
.sch-tl.is-compact .sch-tl-track { --sch-lane-height:36px; }
.sch-tl-track.is-holiday { background-image:linear-gradient(to right, var(--line) 1px, transparent 1px), repeating-linear-gradient(135deg, var(--sch-hatch) 0 2px, transparent 2px 8px); background-size:calc(100% / var(--sch-tl-hours, 16)) 100%, auto; }
.sch-tl-slot { position:absolute; top:calc(var(--space-50) + var(--sch-lane, 0) * var(--sch-lane-height)); height:calc(var(--sch-lane-height) - var(--space-50)); min-width:6px; }
.sch-tl-slot > .sch-chip { display:flex; flex-wrap:wrap; align-items:center; align-content:center; gap:0 var(--space-75); height:100%; min-height:0; overflow:hidden; }
/* A name too long for its bar steps down to "Elena N.", then initials (scheduler-day.js), never "…" (test/no-ellipsis). */
.sch-tl-slot > .sch-chip .sch-chip-who { overflow:hidden; white-space:nowrap; max-width:100%; }
.sch-tl-slot > .sch-chip .sch-chip-time { white-space:nowrap; }
.sch-tl-break { position:absolute; top:1px; bottom:1px; display:flex; align-items:flex-end; justify-content:center; overflow:hidden; border-left:1px dashed var(--ink-2); border-right:1px dashed var(--ink-2); background:repeating-linear-gradient(135deg, color-mix(in srgb, var(--surface) 70%, transparent) 0 3px, color-mix(in srgb, var(--surface-2, var(--paper)) 90%, transparent) 3px 6px); color:var(--ink-2); font-size:var(--text-2xs); font-weight:var(--weight-semibold); pointer-events:none; container-type:inline-size; }
.sch-tl-break span { padding-bottom:1px; }
/* A break too narrow for its word keeps its dashed, hatched gap and no cut word ("Bre"). */
@container (max-width: 34px) { .sch-tl-break span { display:none; } }
.sch-tl-cont { position:absolute; top:-2px; padding:0 var(--space-25); border-radius:var(--radius-sm); background:var(--surface); color:var(--ink-2); font-size:var(--text-2xs); white-space:nowrap; pointer-events:none; }
.sch-tl-cont.is-earlier { left:var(--space-50); }
.sch-tl-cont.is-later { right:var(--space-50); }
.sch-tl-now { position:absolute; top:0; bottom:0; z-index:2; width:2px; margin-left:-1px; background:var(--good); pointer-events:none; }
.sch-tl-scale .sch-tl-now span { position:absolute; top:var(--space-25); left:var(--space-50); padding:0 var(--space-50); border-radius:var(--radius-sm); background:var(--good); color:var(--sch-now-ink); font-size:var(--text-2xs); font-weight:var(--weight-bold); white-space:nowrap; }
.sch-tl-busy { position:absolute; top:calc(var(--space-50) + var(--sch-lane, 0) * var(--sch-lane-height)); height:calc(var(--sch-lane-height) - var(--space-50)); display:flex; align-items:center; overflow:hidden; padding:0 var(--space-75); border:1px dashed var(--ink-2); border-radius:var(--radius-md); background:repeating-linear-gradient(135deg, var(--surface-2, var(--paper)) 0 4px, var(--surface) 4px 8px); color:var(--ink-2); font-size:var(--text-xs); white-space:nowrap; }
.sch-dot-visit { background:var(--ink-2); }
.sch-tl-away { display:flex; flex-wrap:wrap; gap:var(--space-50); }
.sch-tl-away .sch-chip { width:auto; }
.sch-tl-grid .sch-fold-line { grid-column:1 / -1; }
/* Month: each day as its week's header counts it, the closed day's name, and who is away. */
.sch-month-counts { color:var(--ink); font-variant-numeric:tabular-nums; overflow-wrap:normal; word-break:normal; }
.sch-month-away { color:var(--ink-2); overflow-wrap:normal; word-break:normal; }
/* People's hours bar: published solid, a change not published dashed beyond it, the line ticked; Over is said in words. */
.sch-hours-line { position:relative; flex-basis:100%; display:block; height:6px; margin-top:var(--space-50); border-radius:var(--radius-pill); background:var(--surface-2, var(--line)); }
.sch-hours-line i { position:absolute; top:0; bottom:0; left:0; border-radius:var(--radius-pill); }
.sch-hours-published { background:var(--spruce); }
.sch-hours-planned { box-sizing:border-box; border:1px dashed var(--spruce); background:var(--spruce-pale); }
.sch-hours-line.is-over .sch-hours-published { background:var(--bad); }
.sch-hours-tick { position:absolute; top:-3px; bottom:-3px; width:2px; margin-left:-1px; background:var(--ink); }
/* The On-call tab, led by On call now: a card a group, with its backup, who is next and four weeks coming up. */
.oc-section { margin:0 0 var(--space-100); color:var(--ink); font-size:var(--text-lg); }
.oc-coming { margin:var(--space-150) 0 0; color:var(--ink-2); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.06em; text-transform:uppercase; }
.oc-now-card .oc-next { font-size:var(--text-sm); }
.oc-now-card .oc-next li span { min-width:0; flex:1 1 13rem; color:var(--ink-2); font-variant-numeric:tabular-nums; }
.oc-now-card .oc-next li small { color:var(--ink-2); font-size:var(--text-xs); }
#schOncallTab .oc-now { grid-template-columns:repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.oc-now-card .oc-next li { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:0 var(--space-150); padding:var(--space-25) 0; border-bottom:1px solid var(--line); }
.oc-now-card .oc-next li small { grid-column:1 / -1; }
.oc-now-card .oc-next li b { text-align:right; }
/* Month: Today in a word with the week's green bar, never a yellow tint. */
#schGrid .sch-month-day.is-today { border-color:var(--line-strong, var(--line)); background:var(--surface); box-shadow:inset 0 3px 0 var(--good); }
.sch-month-today { margin-left:var(--space-50); color:var(--good); font-size:var(--text-2xs); font-weight:var(--weight-bold); letter-spacing:.04em; text-transform:uppercase; }
.sch-report-full { display:block; color:var(--ink-2); font-size:var(--text-xs); font-weight:var(--weight-medium); }
/* Reports: each bar marked at the period's line (a bar past it is red, and Overtime weeks says so in words); a heat
   cell says "Nobody on" or "Thin" as well as its color; the time off chosen by status. */
.sch-bar-line { position:absolute; top:0; bottom:0; z-index:1; width:2px; margin-left:-1px; background:var(--ink); }
.sch-bar.is-over i { background:color-mix(in srgb, var(--bad) 30%, var(--surface)); }
.sch-heat td .sch-heat-word { display:block; color:var(--ink); font-size:var(--text-2xs); font-weight:var(--weight-semibold); white-space:nowrap; }
#schReportTimeOff .panel-heading { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:var(--space-100) var(--space-150); }
#schReportTimeOff .panel-heading .sch-field { margin:0; }
@media (max-width: 640px) {
  /* The whole screen: the backdrop's own gutter goes, so the sheet starts at the left edge and nothing is cut at the
     right (the review sheet's too). */
  #schBuildModal.modal-backdrop, .modal-backdrop:has(> .sch-review-modal) { padding:0; }
  #schBuildModal .sch-modal { width:100%; max-width:none; min-height:100dvh; margin:0; border-radius:0; }
  #schBuildModal :is(.sch-check, .save-button, .outline-button, .custom-select-trigger, select, .modal-close) { min-height:var(--control-height-lg); }
  #schBuildModal .modal-close { width:var(--control-height-lg); }
  .sch-build .sch-form-row-2 { grid-template-columns:1fr; }
  .sch-template-actions :is(.outline-button, .nt-link) { display:inline-flex; align-items:center; min-height:var(--control-height-lg); }
}

/* A phone: the title row's tabs scroll sideways, the status line stacks, the toolbar wraps, every target is 44 px; the
   week scrolls sideways in its own box (building a week belongs on a larger screen, and the page says so). */
@media (max-width: 640px) {
  body:has(#schedulingView.active-view .sch-frame) .page-frame-bar { display:none; }
  .sch-where { display:block; }
  .sch-title-row { align-items:center; gap:var(--space-100); margin-bottom:var(--space-150); border-bottom:0; }
  .sch-title { margin:0; }
  .sch-title h1 { font-size:var(--text-2xl); }
  .sch-title-row .sch-grow { display:none; }
  .sch-split { order:2; margin:0 0 0 auto; }
  .sch-frame .sch-title-tabs { order:3; width:100%; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:none; border-bottom:1px solid var(--line); }
  .sch-status { flex-direction:column; }
  .sch-status-half { padding:var(--space-100) var(--space-150); }
  .sch-status-needs { flex-basis:auto; }
  .sch-status-changes { border-left:0; border-top:1px solid var(--line); }
  .sch-frame-toolbar { gap:var(--space-100); }
  .sch-toolbar-end { width:100%; }
  .sch-frame .sch-popover { position:fixed; left:var(--viewport-gap); right:var(--viewport-gap); top:auto; bottom:var(--space-200); width:auto; max-height:75vh; }
  .sch-pill-menu, .sch-visits-panel { position:fixed; left:var(--viewport-gap); right:var(--viewport-gap); top:auto; bottom:var(--space-200); width:auto; }
  .sch-phone-note { display:block; margin:0 0 var(--space-100); color:var(--ink-2); font-size:var(--text-sm); }
  /* A scheduler's phone in Day view (scheduler-frame.js schPhoneDayHtml): two buttons for the status line, the week
     strip, and the day as a list by position, each row the whole width with Assign beside an open one. */
  .sch-status.is-phone-acts { display:grid; gap:var(--space-75); padding:0; border:0; background:none; box-shadow:none; }
  .sch-phone-acts { display:flex; flex-wrap:wrap; gap:var(--space-75); }
  .sch-phone-acts .sch-pill { min-height:var(--control-height-lg); padding:0 var(--space-150); font-size:var(--text-md); }
  .sch-phone-acts .sch-calm { display:inline-flex; align-items:center; min-height:var(--control-height-lg); }
  .sch-phone-review .sch-swatch { flex:0 0 auto; }
  .sch-phone-day-title { margin:var(--space-150) 0 var(--space-50); color:var(--ink); font-size:var(--text-md); font-weight:var(--weight-semibold); overflow-wrap:break-word; }
  .sch-phone-row { display:flex; align-items:stretch; gap:var(--space-50); }
  .sch-phone-row .sch-team-row { flex:1 1 auto; min-width:0; }
  .sch-phone-row .sch-team-row.is-new, .sch-phone-row .sch-team-row.is-changed { border-style:dashed; }
  .sch-phone-row .sch-team-row.is-removed b { text-decoration:line-through; }
  .sch-phone-assign { flex:0 0 auto; min-height:var(--control-height-lg); min-width:var(--control-height-lg); }
  /* No dragging on a phone: the tip is for a larger screen. A position's whole name is in its row head's hover text
     there; here its short name alone keeps the row head to a line or two. */
  .sch-frame .sch-hint-once { display:none; }
  .sch-frame .sch-row-full { display:none; }
  .sch-frame .sch-grid-wrap { overflow-x:auto; --sch-sticky-top:0px; }
  .sch-frame .sch-grid { grid-template-columns:120px repeat(var(--sch-days, 7), minmax(120px, 1fr)); }
  .sch-frame .sch-grid.is-day { grid-template-columns:120px minmax(220px, 1fr); }
  .sch-frame :is(.sch-pill, .sch-visits-link, .sch-tool, .sch-nav-button, .sch-range-button, .sch-seg button, .sch-split .outline-button, .sch-title-tabs button, .sch-fold-line, .sch-day-head, .sch-corner-how, .sch-changes .save-button, .sch-changes .nt-link, .sch-filter-chip button, .sch-pill-menu button, .sch-chip, .sch-hint-once .nt-link) { min-height:var(--control-height-lg); }
  /* Filter & view: each choice a 44 px row, and its links (Show all, each list's Clear, Clear filters) and Done 44 px
     boxes: a link is drawn inline, so it takes the height as a box of its own. */
  .sch-frame .sch-popover .sch-check { min-height:var(--control-height-lg); }
  .sch-frame .sch-popover :is(.nt-link, .fs-show-all, .outline-button) { display:inline-flex; align-items:center; min-height:var(--control-height-lg); }
  .sch-help { grid-template-columns:minmax(0, 1fr); gap:var(--space-50); }
  .sch-help dd { margin-bottom:var(--space-100); }
  /* Review & publish fills the screen, and each choice and button in it is a 44 px target. */
  .sch-review-modal { width:100vw; max-width:none; min-height:100dvh; margin:0; border-radius:0; }
  .sch-review { max-height:none; }
  .sch-modal .sch-review-range label.sch-check, .sch-review-actions :is(button, .nt-link), .sch-review-past :is(button, .nt-link), .sch-as-people-line .nt-link, .sch-form-change :is(button, .nt-link) { min-height:var(--control-height-lg); }
  .sch-review-change { grid-template-columns:minmax(0, 1fr); }
  .sch-review-modal > .modal-close { width:var(--control-height-lg); height:var(--control-height-lg); }
  .sch-review-more summary { display:flex; align-items:center; min-height:var(--control-height-lg); }
  /* The drawer is the whole screen on a phone, over the top bar, and the grid keeps its width under it; the quick-add
     sits across the foot of the screen. Every button and choice in them is a 44 px target. */
  .sch-drawer { top:0; z-index:var(--z-dialog); width:100vw; }
  /* "Needs you · 8" says it: the line's own label goes. */
  .sch-status-needs:has(.sch-needs-all) .sch-status-label { display:none; }
  .sch-frame.has-drawer { margin-right:0; }
  .sch-drawer .sch-form-row-2 { grid-template-columns:1fr; }
  .sch-drawer :is(.save-button, .outline-button, .nt-link, .modal-close, .sch-seg-button), .sch-apc :is(.save-button, .outline-button, .nt-link), .sch-quick :is(.save-button, .outline-button, .nt-link), .sch-drawer .sch-check, .sch-fit-more summary, .sch-history summary, .sch-chip-menu button { min-height:var(--control-height-lg); }
  .sch-drawer .nt-link, .sch-quick .nt-link { display:inline-flex; align-items:center; }
  .sch-drawer :is(.custom-select-trigger, input:not([type="checkbox"]):not([type="radio"]), textarea, .sch-add-break, .sch-mini), .sch-quick :is(.custom-select-trigger, input:not([type="checkbox"]):not([type="radio"])) { min-height:var(--control-height-lg); }
  .sch-drawer .sch-mini { min-width:var(--control-height-lg); }
  /* A break's × is that wide too: its column grows with it, so the row stays inside the drawer (no sideways scroll). */
  .sch-drawer .sch-break-row { grid-template-columns:70px minmax(0, 1fr) auto var(--control-height-lg); }
  /* The panel's sides are 16 px on a phone (its foot 20 px): its sticky top, title and footer reach its edges with
     those, never the laptop's 24 px, so nothing sticks out and nothing scrolls sideways. */
  .sch-drawer .sch-drawer-panel { padding-left:var(--space-200); padding-right:var(--space-200); padding-bottom:var(--space-250); }
  .sch-drawer-top, .sch-drawer .sch-modal-head { margin-left:calc(-1 * var(--space-200)); margin-right:calc(-1 * var(--space-200)); padding-left:var(--space-200); padding-right:var(--space-200); }
  .sch-drawer-actions { bottom:calc(-1 * var(--space-250)); margin:auto calc(-1 * var(--space-200)) calc(-1 * var(--space-250)); padding-left:var(--space-200); padding-right:var(--space-200); }
  .sch-drawer .modal-close { min-width:var(--control-height-lg); }
  .sch-quick.is-sheet { left:var(--viewport-gap); right:var(--viewport-gap); bottom:var(--space-200); top:auto; width:auto; max-height:80dvh; }
}
@media print {
  .sch-status, .sch-frame-toolbar, .sch-hint-once, .sch-split, .sch-active-filters, .sch-phone-note, .sch-drawer, .sch-quick, .sch-chip-menu { display:none !important; }
  .sch-frame.has-drawer { margin-right:0; }
  .sch-frame .sch-head > * { position:static; }
}

