@font-face{
  font-family:"Poppins"; font-weight:400; font-style:normal; font-display:swap;
  src:url("/static/fonts/poppins-400.woff2") format("woff2");
}
@font-face{
  font-family:"Poppins"; font-weight:600; font-style:normal; font-display:swap;
  src:url("/static/fonts/poppins-600.woff2") format("woff2");
}
@font-face{
  font-family:"Poppins"; font-weight:700; font-style:normal; font-display:swap;
  src:url("/static/fonts/poppins-700.woff2") format("woff2");
}
@font-face{
  font-family:"Poppins"; font-weight:800; font-style:normal; font-display:swap;
  src:url("/static/fonts/poppins-800.woff2") format("woff2");
}

:root{
  /* Motion (ZUS-Design-System §6, the twenty rules, applied 2026-11-15).
     Ease-out for anything arriving (rule 1), ease-in-out for anything
     already on screen that moves (rule 9). Presses shrink to 0.97 (rule 4)
     with the `scale` property, not `transform`, so it stacks on whatever
     transform a control already uses for its own layout (the rotated row
     pills, the centred icons). */
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --ease-exit: cubic-bezier(.4,0,1,1);
  --press-scale: .97;
  /* Text size, set per device by static/text-size.js (the A- / A+ on the
     home bar) for staff who need bigger type. Every font-size multiplies by
     it, so text grows and the boxes around it grow with it, while layout,
     spacing and images stay as designed. That is deliberately less than
     zooming the whole page, which overflows a phone at 130%. 0.9 is the
     default since 2026-11-10 and must match DEFAULT in text-size.js. */
  --text-scale:0.9;
  --navy:#223488;
  --blue:#283C9D;
  --tan:#A9835A;
  --tan-line:#D9A94A;
  --cream:#EFD9BB;
  --surface:#FFFFFF;
  --surface-page:#FAFAFA;
  --surface-card:#FFFFFF;
  --surface-tint:#F4F5F9;
  /* The one gradient in the app's chrome: navy brand surfaces only (buttons,
     icon tiles, banners). Top is --zus-blue-2, bottom --zus-blue, both from
     ZUS-Design-System.md — no new blue. Never on status tiles, KPI cards or
     chips: those animate background-color toward their alert colour, and a
     gradient paints over it (and v1 below showed why shine on status colours
     reads as clutter). Hover falls back to flat --blue, the top stop, so it
     still reads as "lighter". */
  --navy-fill:linear-gradient(180deg, #283C9D 0%, #16277A 100%);
  --ink:#181c30;
  --ink-soft:#4b4f70;
  --ink-faint:#767a99;
  --line:rgba(22,39,122,0.09);
  --shadow-card:0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.03);
  /* One size for every pinned bottom bar — the Update Checklist / Submit
     Stock Take bar (.sheet-bottom) and the Print Cart's panel footer
     (.cart-panel-footer). Kept as a token so tuning the
     checklist bar moves all of them together instead of each drifting on
     its own.

     8px, the outer step of the sheet rhythm (see .item-list): the frozen
     rows at the top of a sheet and this bar at the bottom bracket the list
     with the same air. It used to be an uneven 13/15, the larger half at
     the bottom so the button rode higher off the screen edge — that read
     as a slab of white once the rest of the page tightened up. The
     safe-area inset still adds underneath on a notched phone. */
  --frozen-bar-pad:8px 20px calc(8px + env(safe-area-inset-bottom));
  --over:#2a78d6;
  --under:#e34948;
  --over-bg:rgba(42,120,214,0.08);
  --under-bg:rgba(227,73,72,0.08);
  --match:#767a99;
  /* Status palette — fixed, never themed (same in light/dark, only used by MCX's
     expiry states). Text-safe ink shades are separate from the tint backgrounds
     since a couple of the raw hues (green, amber) aren't contrast-safe as text
     at small sizes. */
  --status-expired:#d03b3b;
  --status-soon-ink:#9a6a00;
  --status-soon:#fab219;
  --status-notchecked-ink:#63666f;
  /* "Good" is the hub navy, not green, since 2026-11-16. The user first
     asked for ZUS gold (green "affected the app's look"), then the same day:
     "standardize to blue, much better". Navy is already what OK and AVAIL
     pills are, so good reads as normal, and the coloured marks left (red,
     amber, grey) are the ones that need doing. */
  --status-ok-ink:#223488;
  --status-ok:#223488;
  --status-expired-bg:rgba(208,59,59,0.08);
  --status-soon-bg:rgba(250,178,25,0.16);
  --status-notchecked-bg:rgba(137,135,129,0.10);
  --status-ok-bg:rgba(34,52,136,0.10);
}
/* No @media (prefers-color-scheme: dark) block on purpose — the app stays
   white/light regardless of the device's system theme setting. There's no
   in-app dark-mode toggle either, so :root[data-theme="dark"] below is
   currently dormant (nothing sets that attribute) — left in place only in
   case a real toggle gets added later. */
:root[data-theme="dark"]{
  --navy:#93A7EF; --blue:#9DB0F5; --tan:#D8C09B; --tan-line:#C3AB85; --cream:#C3AB85;
  --surface:#0B2A52; --surface-page:#0A1E3C; --surface-card:#0F2E5C; --surface-tint:rgba(195,171,133,0.08);
  --ink:#F3ECDF; --ink-soft:#C8CBE6; --ink-faint:#8F94BC; --line:rgba(243,236,224,0.10);
  --shadow-card:0 1px 2px rgba(0,0,0,0.2), 0 2px 6px rgba(0,0,0,0.18);
  --over:#3987e5; --under:#e66767; --over-bg:rgba(57,135,229,0.14); --under-bg:rgba(230,103,103,0.14); --match:#8F94BC;
}
:root[data-theme="light"]{
  --navy:#223488; --blue:#283C9D; --tan:#A9835A; --tan-line:#D9A94A; --cream:#EFD9BB;
  --surface:#FFFFFF; --surface-page:#FAFAFA; --surface-card:#FFFFFF; --surface-tint:#F4F5F9;
  --ink:#181c30; --ink-soft:#4b4f70; --ink-faint:#767a99; --line:rgba(22,39,122,0.09);
  --shadow-card:0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.03);
  --over:#2a78d6; --under:#e34948; --over-bg:rgba(42,120,214,0.08); --under-bg:rgba(227,73,72,0.08); --match:#767a99;
}

*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%; overflow-x:hidden;}

/* Sliding page transitions (Hub <-> Checklist <-> Settings, etc.) via the
   browser's native cross-document View Transitions API — no custom JS or
   layout animation involved, since it's a real full page navigation
   animated by the browser itself between two document snapshots, not
   something layered on top of the DOM. Every page shares this stylesheet,
   so the whole app gets it uniformly (both documents have to opt in for a
   cross-document transition to run, which sharing the stylesheet
   guarantees).

   This is what makes tab switching feel instant, and it only works because
   it's the browser driving it: paired with the speculationrules prerender
   blocks in checklist.html/settings.html/home.html, Chrome has the
   destination fully rendered ahead of time and simply activates it, so the
   slide plays over a page that's already there. Do NOT replace this with a
   JS click-handler that animates the old page out and then sets
   location.href — that delays the navigation by the length of the exit
   animation and reintroduces exactly the "page has to load" stutter this
   avoids. On a browser without cross-document view transitions, these
   rules are simply ignored and navigation falls back to a plain instant
   page load — never a broken/half-animated state. */
@view-transition {
  navigation: auto;
}
::view-transition-group(root) {
  animation-duration: 0.32s;
  /* Rule 9 (2026-11-15): the views slide across, a move, so ease-in-out.
     Old and new run the same 320 ms side by side (rule 16); a shorter exit
     here would open a gap between them mid-slide. */
  animation-timing-function: cubic-bezier(.65,0,.35,1);
}
::view-transition-new(root) {
  animation-name: mcx-slide-in;
}
::view-transition-old(root) {
  animation-name: mcx-slide-out;
}
@keyframes mcx-slide-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes mcx-slide-out {
  from { transform: translateX(0); }
  to { transform: translateX(-30%); }
}
body{
  margin:0; background:var(--surface-page); color:var(--ink);
  font-family:"Poppins", ui-sans-serif, system-ui, sans-serif;
  font-weight:400; line-height:1.6; font-size:calc(15.5px * var(--text-scale)); -webkit-font-smoothing:antialiased;
}
a{color:var(--blue);}
button, input, select{font-family:inherit;}
button:focus-visible, input:focus-visible, a:focus-visible{outline:2px solid var(--blue); outline-offset:2px;}

/* ---------- brand mark ---------- */
.brand-mark{
  border-radius:14px; background:var(--navy-fill);
  display:flex; align-items:center; justify-content:center;
  flex:none;
  /* The tool icons take two colours: currentColor for the body of the mark,
     --icon-detail for the shape inside it. Set on the tile rather than the
     svg so the home dial can name its own pair — it draws a white mark, so
     it needs a dark detail where this one needs a light one. */
  color:var(--cream); --icon-detail:#fff;
}
.brand-mark svg{width:55%; height:55%;}
/* Each tool page's header wears the same illustrated card icon as the home
   dial (2026-10-29), on a small white tile like the dial's discs: the icons
   are navy and gold, drawn for white. A tool with no card icon yet falls back
   to its small mark, painted navy here. */
.brand-mark.brand-mark-card{
  background:#FFFFFF; color:var(--navy); --icon-detail:#FFFFFF;
  box-shadow:inset 0 0 0 1.5px var(--line), 0 1px 3px rgba(16,24,40,0.12);
}
.brand-mark.brand-mark-card svg.card-icon{width:86%; height:86%;}
.brand-mark img{width:55%; height:55%;}
/* The login card shows the real ZUS logomark, which is navy artwork on a
   transparent background — on .brand-mark's navy tile it would be navy on
   navy. Drop the tile there and let the mark sit on the card itself, and
   let it use the full square since the logo carries its own padding. The
   in-app headers keep the navy tile: those still hold the per-tool cream
   line icons, which need it for contrast. */
.auth-card .brand-mark{background:none; border-radius:0;}
.auth-card .brand-mark img{width:100%; height:100%; object-fit:contain;}

/* Launch splash — the ZUS logomark alone, centred, fading out to reveal the
   login card already rendered underneath.

   Driven entirely by CSS animation with no JS gate, deliberately: a splash
   that fails to dismiss is a barista locked out of the app at opening time,
   so there must be nothing to go wrong. If the stylesheet itself fails to
   load the overlay never paints at all and the login is simply visible,
   which is the right failure direction.

   It opens white and turns ZUS blue: .splash-fill sweeps the colour out
   from the centre while the logomark fades in over it, unmodified — the
   asset is the "light_background" brand variant, navy artwork meant for a
   light field, and it is shown as supplied.

   The original note here warned that a blue splash needs the dark-
   background knockout variant of the logo. That warning is correct and was
   tested the hard way: a CSS knockout was tried instead and produced a
   solid white blob (see .splash-logo). Read it as a standing constraint,
   not a suggestion — the fix is a second artwork file, not a filter.

   The starting white is #FFFFFF to match the manifest's background_color
   literally — that colour is what Android paints for the installed PWA's
   native launch screen before this one takes over, so it has to equal the
   *first frame* here or the handover flashes. It's the first frame that
   matters, not the end state: the blue arrives under our own animation,
   after the handover is done. A themeable var can't be used for either
   value for the same reason. */
.splash{
  position:fixed; inset:0; z-index:200; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  background:#FFFFFF;
  /* Hold 3s, then fade over .42s. The delay is the "how long is the logo
     up" dial — the fade is separate and shouldn't grow with it. It has to
     clear .splash-fill's sweep plus .splash-logo's fade (1.9s together)
     with time left over, or the splash starts dismissing itself before the
     mark has finished arriving and nobody ever sees it sitting still.
     Deliberately left at 3s while the sweep slowed from 1.4s to 1.9s: the
     hold is the total-length dial, and growing it in step would have made
     the whole splash longer when the ask was only for a slower wave. The
     still moment at the end absorbs the difference, 1.6s down to 1.1s. */
  animation:splash-out .42s ease 3s forwards;
}
/* The colour change itself: one disc of ZUS blue growing from the centre
   until it has covered the white field, in every direction at once. Runs
   once — it's a state change from white to blue, not a loop.

   Sized in vmax and scaled to 1, so at full size the disc has cleared the
   screen corners in portrait and landscape alike; no orientation leaves a
   white wedge in a corner. Scaling a fixed-size element rather than
   animating width/height keeps it on the compositor — this plays while the
   page underneath is still doing its first paint, which is exactly when
   layout-driven animation stutters. */
.splash-fill{
  position:absolute; left:50%; top:50%;
  width:150vmax; height:150vmax; margin:-75vmax 0 0 -75vmax;
  border-radius:50%; background:#16277A; pointer-events:none;
  transform:scale(0);
  animation:splash-fill 1.9s cubic-bezier(.33,0,.2,1) both;
}
@keyframes splash-fill{ from{ transform:scale(0); } to{ transform:scale(1); } }
/* Same padding compensation as .auth-card .brand-mark — the box is ~2x the
   mark you actually see, because the asset's transparent margin is part of
   the image.
   NO FILTER HERE — the asset renders exactly as supplied. A
   `brightness(0) invert(1)` knockout was tried to make a white-on-blue mark
   and produced a solid white blob: the logomark is not one flat colour on
   transparent, its face and beard are *opaque white* pixels inside the navy
   disc. brightness(0) crushes navy and white alike to black and invert(1)
   lifts the lot back to white, erasing every internal edge. Any recolouring
   filter has the same problem for the same reason. Making this mark work on
   a dark field needs a real knockout variant of the artwork, not CSS.

   z-index keeps it above the colour sweep. The fade runs alongside that
   sweep offset by 0.2s, roughly when the growing disc passes the logo's own
   width. Raising .splash-fill's duration means raising this in step — and
   .splash's 3s hold has to stay clear of both. */
.splash-logo{
  position:relative; z-index:1;
  width:240px; height:240px; max-width:62vw; max-height:62vw;
  animation:splash-logo-in 1.5s ease .27s both;
}
/* visibility (not just opacity) so the finished overlay stops taking taps. */
@keyframes splash-out{ to{ opacity:0; visibility:hidden; } }
/* A plain opacity fade — no scale. The mark used to pop in at .9 scale,
   which fought the disc expanding behind it; two things growing at once
   read as one thing wobbling. */
@keyframes splash-logo-in{ from{ opacity:0; } to{ opacity:1; } }
/* Drop the splash entirely rather than disabling its animation — with the
   animation removed it would never reach the hidden end state and would sit
   there permanently. */
@media (prefers-reduced-motion: reduce){
  .splash{display:none;}
}

/* ================= LOGIN / ADMIN LOGIN ================= */
/* `100dvh` after `100vh`, not instead of it: mobile Chrome counts the URL
   bar in `vh`, so a 100vh centred card is centred against a viewport taller
   than what's actually on screen — the hint and dev link end up under the
   fold on a short phone. `dvh` tracks the visible area. The `vh` line stays
   first as the fallback for anything that doesn't know `dvh`. */
.auth-page{
  min-height:100vh; min-height:100dvh;
  display:flex; align-items:center; justify-content:center;
  padding:
    calc(24px + env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  /* A soft wash of the same brand navy behind the card. White-on-#FAFAFA
     gave the card almost no edge, so it read as a flat page rather than a
     raised sheet. No new colour — it's --navy at a tenth opacity. */
  background:
    radial-gradient(1100px 620px at 50% -15%, rgba(34,52,136,0.10), transparent 70%),
    var(--surface-page);
}
.auth-card{
  width:100%; max-width:360px; background:var(--surface-card); border:1px solid var(--line);
  border-radius:16px; padding:38px 30px 32px;
  /* Two-layer: a hairline contact shadow plus a wide navy-tinted lift. The
     shared --shadow-card is tuned for cards sitting in a list; the login
     card is the only thing on screen and can carry more depth. */
  box-shadow:0 1px 2px rgba(16,24,40,0.04), 0 14px 38px -14px rgba(22,39,122,0.22);
  display:flex; flex-direction:column; align-items:center; gap:20px;
}
/* Logo, title and subtitle are one unit — grouping them lets the spacing
   inside the block be set directly instead of cancelling .auth-card's gap
   with the negative margin this used to need. */
.auth-head{display:flex; flex-direction:column; align-items:center; width:100%;}
/* The box is roughly 2x the mark you actually see: the supplied logomark
   is ~48% artwork inside its own transparent margin, so 128px here renders
   a visible mark near 61px (56px box -> ~27px, 88px -> ~42px, 96px -> ~46px).
   That padding is why this number looks so large next to the 20px title.
   Going much past this starts crowding the card rather than growing the
   logo — to get bigger than about 70px visible, crop the asset to its
   bounding box instead, then roughly halve this value. Note the splash
   uses the same file and would grow with it. */
.auth-card .brand-mark{width:128px; height:128px; margin-bottom:10px;}
/* The Outlet Hub lockup (shared/templates/_oh_lockup.html): the ZUS mark
   with "Outlet Hub" beside it, the shape of the ZUS COFFEE horizontal lockup.

   The PNG carries 25% empty margin on every side (design system §1), so the
   mark you see is half its image. The image box is therefore sized to the
   visible circle (--mark / 2) and the picture scaled up 2x inside it: only
   the transparent margin lands outside the box, so a bar that clips its
   contents clips nothing you can see, and nothing beside it is overlapped.
   (A negative margin did the same job until the Markout desktop bar clipped
   the head's left edge, 2026-11-03.) No padding is added, per §9.

   The words are #001688, the logo's own navy, not the UI's --navy: they are
   part of the lockup with the mark, and next to it the UI navy reads as a
   slightly different blue (§1, "Logo navy is not UI navy"). */
.oh-lockup{
  --mark:112px; --name:30px;
  display:flex; align-items:center; justify-content:center; gap:12px; margin:0;
}
.oh-lockup-mark{flex:none; width:calc(var(--mark) / 2); height:calc(var(--mark) / 2); transform:scale(2); display:block;}
.oh-lockup-name{
  font-family:"Poppins", ui-sans-serif, system-ui, sans-serif; font-weight:800;
  font-size:var(--name); line-height:1; letter-spacing:-0.015em; color:#001688; white-space:nowrap;
}
/* Room above and below the lockup, now that the mark no longer brings its
   own empty margin with it. */
.auth-head .oh-lockup{margin:8px 0 14px;}
.auth-head-compact .oh-lockup{margin:4px 0 14px;}
a.oh-lockup{text-decoration:none;}
.home-topbar .oh-lockup{justify-self:center;}
/* The outlet switch moved out of this bar on 2026-11-07 (into .home-outlet
   below it), so every bar now fits the full lockup on a phone. */
.desktop-brandbar .oh-lockup{flex:none; justify-content:flex-start;}
.auth-sub{
  font-size:calc(12.5px * var(--text-scale)); color:var(--ink-faint); text-align:center;
  margin:6px 0 0; max-width:30ch; line-height:1.5;
}
.field label{
  display:block; font-size:calc(11.5px * var(--text-scale)); font-weight:700; letter-spacing:0.05em; text-transform:uppercase;
  color:var(--ink-faint); margin-bottom:6px;
}
.field input, .field select{
  width:100%; padding:12px 14px; border-radius:10px; border:1.5px solid var(--line);
  background:var(--surface); color:var(--ink); font-size:calc(14.5px * var(--text-scale)); font-weight:500;
}
/* A select left to the browser draws its own grey box in the system font
   and sizes itself to its longest option, so an outlet list with
   "ZUS Coffee - Binjai 8 Premium SOHO" in it ran straight out of the card.
   appearance:none hands the box back to the rule above; the chevron is
   redrawn in navy because removing the native one removes the only cue
   that this is a dropdown, not a text field. */
.field select{
  appearance:none; -webkit-appearance:none;
  min-width:0; text-overflow:ellipsis; cursor:pointer;
  padding-right:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23223488' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center; background-size:12px 8px;
}
/* Login-only input treatment — scoped to .auth-card so the shared .field
   used elsewhere is unaffected. Size deliberately matches
   the shared .field input above (12px/14.5px): a 16px font would stop iOS
   Safari force-zooming on focus, but this app is Chrome/Android in
   practice and the bigger boxes threw off the card's proportions. If iOS
   ever matters here, fix the zoom with the viewport meta, not by inflating
   the fields. */
.auth-card .field input, .auth-card .field select{
  transition:border-color .15s ease, box-shadow .15s ease;
}
.auth-card .field select:focus{
  border-color:var(--blue); box-shadow:0 0 0 3px rgba(40,60,157,0.15); outline:none;
}
.auth-card .field input::placeholder{color:var(--ink-faint); opacity:0.75; font-weight:400;}
.auth-card .field input:focus{
  border-color:var(--blue); box-shadow:0 0 0 3px rgba(40,60,157,0.15);
}
/* The 3px ring is itself the focus indicator, so drop the global 2px
   outline here rather than painting both rings around one box. */
.auth-card .field input:focus-visible{outline:none;}
/* Chrome paints autofilled fields its own pale yellow, which on this card
   looks like an error state. Repaint via an inset shadow — background
   alone is ignored for autofill. */
.auth-card .field input:-webkit-autofill,
.auth-card .field input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--ink);
  -webkit-box-shadow:0 0 0 100px var(--surface) inset, 0 0 0 3px rgba(40,60,157,0.15);
  caret-color:var(--ink);
}
.auth-card .field input:-webkit-autofill:not(:focus){
  -webkit-box-shadow:0 0 0 100px var(--surface) inset;
}
.btn-primary{
  width:100%; padding:13px; border-radius:14px; border:none; color:#fff;
  font-weight:700; font-size:calc(14.5px * var(--text-scale)); cursor:pointer;
}
.btn-primary:hover{background:var(--blue);}
/* Size stays as the shared .btn-primary above — this only adds the press
   feedback and the disabled look used while submitting. */
/* A link styled as a button (Continue with Lark, Continue with Dev Login)
   needs what a <button> gets for free: block box, centred label, no
   underline. login.html's .btn-lark was never defined, so the Lark button
   would have shipped as underlined, left-aligned text inside a navy bar. */
a.btn-primary{display:block; box-sizing:border-box; text-align:center; text-decoration:none;}
.auth-card .btn-primary{
  box-shadow:0 8px 18px -10px rgba(34,52,136,0.65);
  transition:background .15s ease, transform .06s ease, box-shadow .15s ease;
}
.auth-card .btn-primary:active{transform:translateY(1px); box-shadow:0 4px 10px -8px rgba(34,52,136,0.65);}
/* Set while the form is submitting, so a slow network can't be double-
   posted by an impatient second tap. */
.auth-card .btn-primary[disabled]{opacity:0.6; cursor:default; transform:none;}
/* .btn-outline draws its border as an inset box-shadow, so the lift above
   (more specific) replaced it and left a borderless white button. Restore the
   border, and keep it flat — the lift is what marks the one primary action. */
.auth-form{width:100%; display:flex; flex-direction:column; gap:14px;}
.auth-hint{
  font-size:calc(11.5px * var(--text-scale)); color:var(--ink-faint); text-align:center;
  max-width:30ch; line-height:1.5; margin:0;
}
.auth-error{
  width:100%; background:var(--under-bg); color:var(--under); border:1px solid var(--under);
  border-radius:10px; padding:10px 12px; font-size:calc(13px * var(--text-scale)); font-weight:600; text-align:center;
}

/* ================= COUNT SHEET ================= */
.sheet-page{max-width:520px; margin:0 auto; min-height:100vh; display:flex; flex-direction:column;}
.sheet-header{
  padding:20px 20px 0; display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.sheet-header-brand{display:flex; align-items:center; gap:10px;}
.sheet-header-brand .brand-mark{width:34px; height:34px; border-radius:10px;}
.sheet-header-brand-text{font-weight:800; font-size:calc(14px * var(--text-scale)); color:var(--ink); line-height:1.15;}
/* .sheet-header-outlet and .sheet-outlet (the small tan "CODE · Name" label
   that sat under a page title) are gone — the outlet is no longer printed
   on any page body, only in the document <title>. Removed rather than left
   dormant so the next person doesn't restyle a label nothing renders. */
/* Same grouped-track look as STA's Bar/Store .tabs switch (one tinted
   capsule, flat segments packed inside it) rather than separate floating
   pills — see .sheet-header-links below for the track. */
.logout-link{
  font-size:calc(11.5px * var(--text-scale)); font-weight:700; color:var(--ink-soft); text-decoration:none;
  padding:7px 11px; border-radius:9px; background:transparent;
  transition:background-color .15s ease, color .15s ease, scale .1s var(--ease-out);
  white-space:nowrap;
}
.logout-link:active{background:rgba(0,0,0,0.06); scale:var(--press-scale);}
/* Armed "Log out?" (static/logout-confirm.js): amber, the colour every armed
   control in the app uses to say "the next tap does something". */
.logout-link.confirm, .logout-link.confirm:active{background:var(--status-soon); color:#3d2c00; font-weight:700;}
.logout-link.icon-link.confirm{width:auto; padding:7px 10px;}
/* MCX's Checklist/Settings tabs are <button>s, not links — they switch a view
   inside the same document rather than navigating. This class was written for
   <a> only, so without these resets a button gets the UA default border and
   system font and stops matching the links sitting beside it in the track. */
button.logout-link{
  border:none; font-family:inherit; line-height:inherit;
  -webkit-appearance:none; appearance:none; cursor:pointer;
}
/* Marks which of the header's own pages (Checklist/Settings) is the one
   currently open — same raised-segment look as .tab-link.active so it
   reads as "you are here," not just another link in the row. Hub and Log
   out never carry this since they're actions/exits, not pages you switch
   between. */
.logout-link.active{background:var(--surface-card); color:var(--navy); box-shadow:0 1px 2px rgba(16,24,40,0.06);}
.sheet-header-links{display:flex; align-items:center; gap:2px; background:var(--surface-tint); padding:3px; border-radius:12px;}
/* Markout's header on one line (2026-10-29; the switcher used to sit on a
   second row): mark, then the Checklist | Settings switch taking whatever
   width is left, then Hub and Log out as icon buttons. The switch is the
   flexible part because it is what a barista taps most; the two exits only
   need to be findable. */
.sheet-header-oneline{justify-content:flex-start; gap:10px;}
.sheet-header-oneline .brand-mark{width:34px; height:34px; border-radius:10px; flex-shrink:0;}
.sheet-header-views{flex:1; min-width:0;}
.sheet-header-views .logout-link{flex:1; text-align:center; min-width:0; overflow:hidden; text-overflow:ellipsis;}
/* Square icon buttons, the same height as a text segment beside them. */
.logout-link.icon-link{display:flex; align-items:center; justify-content:center; width:34px; padding:7px 0;}
.logout-link.icon-link svg{width:17px; height:17px;}

.sheet-top{padding:14px 20px 0;}
.sheet-title{font-weight:800; font-size:calc(20px * var(--text-scale)); color:var(--ink); margin:2px 0 2px;}
.sheet-period{font-size:calc(12.5px * var(--text-scale)); color:var(--ink-faint);}

/* The saved note ("3 item(s) updated.", "Updated 2 item(s)", "Submitted…")
   is navy on a navy tint in every tool since 2026-11-16 (the user: "colour
   are not standardize, set it to navy"). It used --over, STA's light
   "counted over" blue, which is not a brand colour and read as a link.
   --over itself stays: STA still needs it for over-count numbers. */
.flash{
  margin:14px 20px 0; padding:10px 14px; border-radius:10px; background:rgba(34,52,136,0.08); color:var(--navy);
  font-size:calc(13px * var(--text-scale)); font-weight:600;
}
#batch-status, #settings-batch-status{margin:6px 0 0;}
.flash-collapsible{
  max-height:60px; overflow:hidden;
  transition:opacity .3s ease, max-height .3s ease, margin-top .3s ease, padding-top .3s ease, padding-bottom .3s ease;
}
/* #batch-status{margin:10px 0 0} above is an ID rule, which used to beat
   this class's margin-top:0 on specificity alone — collapsed never
   actually reached 0, it always left a dead 10px gap. #batch-status.collapsed
   (ID+class) outranks the plain ID rule, so this now genuinely collapses. */
.flash-collapsible.collapsed, #batch-status.collapsed, #settings-batch-status.collapsed{
  opacity:0; max-height:0; margin-top:0; padding-top:0; padding-bottom:0; pointer-events:none;
}

.oo-install-banner{
  position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom));
  z-index:9999; display:flex; align-items:center; gap:10px; color:var(--cream); border-radius:12px;
  padding:12px 12px 12px 16px; box-shadow:0 4px 16px rgba(0,0,0,0.22);
  font-size:calc(13px * var(--text-scale)); line-height:1.4;
}
.oo-install-banner span{flex:1;}
.oo-install-banner b{color:#fff;}
.oo-install-install{
  flex-shrink:0; background:var(--cream); color:var(--navy); border:none; border-radius:8px;
  padding:8px 14px; font-weight:700; font-size:calc(13px * var(--text-scale)); font-family:inherit; cursor:pointer;
}
.oo-install-dismiss{
  flex-shrink:0; background:none; border:none; color:var(--cream); opacity:0.7;
  font-size:calc(20px * var(--text-scale)); line-height:1; padding:4px 2px; cursor:pointer;
}
.oo-install-dismiss:hover{opacity:1;}

.tabs{display:flex; gap:6px; margin:16px 20px 0; background:var(--surface-tint); padding:4px; border-radius:12px;}
.tab-link{
  flex:1; text-align:center; text-decoration:none; padding:9px 0; border-radius:9px;
  font-weight:700; font-size:calc(13.5px * var(--text-scale)); color:var(--ink-soft); display:flex; align-items:center; justify-content:center; gap:6px;
  border:none; background:transparent; font-family:inherit; cursor:pointer; transition:color .15s ease;
}
.tab-link .count-badge{
  font-size:calc(10.5px * var(--text-scale)); font-weight:700; padding:1px 6px; border-radius:999px;
  background:rgba(0,0,0,0.06); color:var(--ink-faint);
}
.tab-link.active{background:var(--surface-card); color:var(--navy); box-shadow:0 1px 2px rgba(16,24,40,0.06);}
.tab-link.active .count-badge{background:var(--navy); color:#fff;}

.sheet-progress{margin:14px 20px 4px; height:5px; border-radius:99px; background:var(--line); overflow:hidden;}
.sheet-progress-fill{height:100%; background:var(--navy); border-radius:99px;}
.progress-label{margin:6px 20px 0; font-size:calc(12px * var(--text-scale)); color:var(--ink-faint);}
.submitted-note{margin:4px 20px 0; font-size:calc(11.5px * var(--text-scale)); color:var(--over);}

/* Bar/Store switch — both panels sit in the DOM at once, side by side in a
   track twice the viewport width; switching tabs just translates the track
   instead of navigating, so it can slide like a swipeable page. */
.slide-viewport{overflow:hidden; position:relative;}
.slide-track{
  display:flex; width:200%; margin:0; border:none; padding:0;
  transition:transform .32s cubic-bezier(.4,0,.2,1); will-change:transform;
}
.slide-track.show-store{transform:translateX(-50%);}
.slide-panel{width:50%; flex:none; margin:0; border:none; padding:0; min-width:0;}

/* Shared by Markout Checklist and Digital Stock Take — filters .item-card
   below it live as the user types (see applyCardFilters in checklist.html,
   applyItemSearch in sheet.html), so they don't have to scroll the whole
   list to find one item. Reused (with an inline margin override) for DBI's
   outlet tables too — see dashboard.html/districts.html. */
.item-search{
  position:relative; margin:6px 20px 0; display:flex; align-items:center;
}
.item-search-icon{
  position:absolute; left:13px; width:16px; height:16px; color:var(--ink-faint); pointer-events:none;
}
.item-search-input{
  width:100%; padding:10px 36px 10px 38px; border-radius:12px; border:1.5px solid var(--line);
  background:var(--surface-card); color:var(--ink); font-size:calc(13.5px * var(--text-scale)); font-family:inherit;
}
.item-search-input:focus{border-color:var(--blue); outline:none; box-shadow:0 0 0 3px rgba(40,60,157,0.12);}
.item-search-clear{
  position:absolute; right:8px; width:24px; height:24px; border-radius:999px; border:none;
  background:var(--surface-tint); color:var(--ink-faint); font-size:15px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center; padding:0;
  opacity:0; pointer-events:none; transition:opacity .15s ease;
}
.item-search-clear.visible{opacity:1; pointer-events:auto;}
/* .item-card is shared with STA's count sheet (apps/sta/templates/sheet.html);
   both pages' live-search filtering use this same plain instant-hide
   toggle now. Markout Checklist tried several animated versions of this
   (sliding, FLIP-corrected sibling reflow, staggered/batched opacity
   fades) and every one of them read as jerky, so it's back to the same
   instant approach STA already used — .filter-hidden is a separate class
   name from STA's .search-hidden only so the two pages' JS never fight
   over the same class on a shared element, not because the behavior
   differs. */
.item-card.search-hidden, .item-card.filter-hidden{display:none;}
.item-search-empty{display:none; margin:16px 20px 0; padding:14px; text-align:center; font-size:calc(13px * var(--text-scale)); color:var(--ink-faint);}
.item-search-empty.visible{display:block;}

/* The sheet rhythm, shared by every page built on this layout — Markout
   Checklist, STA's count sheet, Store Auditing, Stock Receiving. One 6px
   step between everything in the list column (the frozen rows, the search
   box, every card), and 8px on the outer edges of the two frozen blocks
   that bracket it (see --frozen-bar-pad and .status-summary).

   These lists used to sit in three different gaps at once — 16px under the
   frozen rows, 14px above the first card, 8px between cards — which read as
   the list starting somewhere lower than where it actually starts, and left
   the frozen block floating above it rather than sitting on it.

   The bottom is the same 6px, but it has to be computed: .sheet-bottom is
   position:fixed (not sticky — more reliably stays put across mobile
   browsers than sticky does inside a flex-column layout) and so occupies no
   flow space, and this padding is what keeps the last card from scrolling
   underneath it. A hardcoded reserve is what was there before — 100px, i.e.
   whatever gap that happened to leave on each page — and it cannot stay
   right: the checklist's bar grows when the "N item(s) updated" note opens
   inside it, Stock Receiving's carries a second button, and every one grows
   by the safe-area inset on a notched phone. So static/frozen-bar.js
   measures the bar and publishes --frozen-bar-h.

   The fallback covers first paint, before the script has measured. */
.item-list{
  flex:1; display:flex; flex-direction:column; gap:6px;
  padding:6px 20px calc(var(--frozen-bar-h, 88px) + 6px);
}
.item-card{
  background:var(--surface-card); border:1px solid var(--line); border-radius:12px;
  padding:13px 14px; display:flex; flex-direction:column; gap:10px;
  /* Touch UI: a press-and-slight-move (normal on a real finger) would
     otherwise trigger the browser's native text-selection drag before our
     own tap/swipe JS gets a chance to claim the gesture. Form inputs are
     exempt from inherited user-select, so the date/number fields inside
     these cards still work normally. */
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none;
}
/* Markout Checklist only (.item-card is shared with STA's count sheet,
   which gets its own single ribbon — .item-count-ribbon below — instead of
   this two-sided one) — a stock-availability side tag. Not wired to real
   data yet, since nothing tracks stock-on-hand today; every card renders
   "available" until there's a real flag to key off. */
.item-card.has-availability{position:relative; padding:9px 26px 9px 34px; overflow:hidden;}
/* The vertical padding here is overridden for every sheet page by the one
   row-rhythm rule further down — see `.sheet-page .item-card` in the
   elevation section. Only the horizontal values (which reserve the two
   17px ribbons) are read from this rule in practice. */

/* EOD items (mother item "EOD" — always expire same day) wrap their row
   content in this so a left-to-right drag can slide it, independent of
   the ribbons anchored to the card's own edges. Plain transform + snap-back
   transition; JS decides whether the drag crossed the confirm threshold. */
/* No `gap` here on purpose: .save-status collapses to height:0 when idle,
   but a flex gap still reserves its space, which left ~6px of dead air
   under the item name and stopped the row reading as vertically centred in
   the card. .save-status.visible carries its own margin-top:6px, so
   spacing when it actually shows is unaffected. */
.swipe-surface{display:flex; flex-direction:column; position:relative; touch-action:pan-y; transition:transform .28s cubic-bezier(.4,0,.2,1);}
/* The spring-back animation is for letting go only. Left on while the finger
   drags, it made the card trail ~0.3 s behind the finger (2026-11-07). */
.swipe-surface.dragging{transition:none;}
/* The finger swipe (initSwipeV2 in apps/mcx/templates/checklist.html): a
   layer behind the card says what the swipe will do, between the two edge
   ribbons, tinted while swiping and solid once it counts. The surface gets
   the card's own white so the layer only shows where the card has moved. */
.item-card.swipe-v2 .swipe-surface{background:var(--surface-card); z-index:1;}
.swipe-reveal{
  position:absolute; top:0; bottom:0; left:17px; right:17px; z-index:0; pointer-events:none;
  display:flex; align-items:center; justify-content:space-between; padding:0 14px;
  font-size:calc(11.5px * var(--text-scale)); font-weight:800; text-transform:uppercase; letter-spacing:.04em;
  opacity:0; transition:opacity .12s ease, background-color .12s ease, color .12s ease;
}
.swipe-reveal span{opacity:0; transform:scale(.9); transition:opacity .12s ease, transform .15s ease;}
.item-card.swiping[data-swipe] .swipe-reveal{opacity:1;}
.item-card[data-swipe="today"] .swipe-reveal{background:var(--status-ok-bg); color:var(--status-ok-ink);}
.item-card[data-swipe="clear"] .swipe-reveal{background:var(--status-notchecked-bg); color:var(--status-notchecked-ink);}
.item-card[data-swipe="today"] .swipe-reveal-today,
.item-card[data-swipe="clear"] .swipe-reveal-clear{opacity:1; transform:none;}
.item-card.swipe-armed[data-swipe="today"] .swipe-reveal{background:var(--status-ok);}
.item-card.swipe-armed[data-swipe="clear"] .swipe-reveal{background:var(--status-notchecked-ink); color:#fff;}
.item-card.swipe-armed .swipe-reveal span{transform:scale(1.06);}
.swipe-reveal-clear{margin-left:auto;}
/* The hub's one micro-label style. Every tiny all-caps label on a card
   reads at exactly this size and weight: Markout's two edge ribbons (OOS /
   EOD / Available, Expired / Expiring / Missing / Perfect), STA's count
   ribbon, and the Bar/Store position tag under an item name.

   These four carried identical copies of these four declarations, which is
   how they stayed in sync by luck rather than by construction — nudging one
   left the others behind. Grouped rather than turned into a class on the
   markup, so nothing in the templates has to change and every existing
   selector keeps working.

   They still won't look the same size on screen, and that's expected: the
   three ribbons are rotated (writing-mode:vertical-rl) and reversed out
   white on saturated color, both of which read heavier than the position
   tag's grey-on-white. Same type, different context. */
.item-availability-ribbon,
.item-count-ribbon{
  font-size:calc(6.5px * var(--text-scale)); font-weight:800; text-transform:uppercase; letter-spacing:0.03em;
}
.item-availability-ribbon{
  z-index:2;
  position:absolute; top:0; left:0; bottom:0; width:17px;
  display:flex; align-items:center; justify-content:center;
  background:var(--navy); color:#fff; border:none; border-radius:0; padding:0;
  font-family:inherit;
  writing-mode:vertical-rl; transform:rotate(180deg); cursor:pointer;
}
/* AVAIL is navy, not green, since 2026-11-16 (the user: "avail and ok set
   to navy"). It's the normal state of nearly every row, and green on every
   row made the list loud; navy is the hub's own colour, so the coloured
   pills left are the ones that mean something needs doing.
   The right-hand pill (.item-expiry-ribbon: EXP / EXP-S / MISS / OK, and
   PRINT?) went on 2026-11-23, when the date box took its colour, and its
   styling went with it. Its button stays in the page, hidden (MARKOUT ROWS
   LOSE THE RIGHT PILL, near the end), because the scripts still read its
   class. */
.item-availability-ribbon.out-of-stock{background:var(--status-notchecked-ink);}
.item-availability-ribbon.eod{background:var(--status-soon); color:#fff;}
.item-availability-ribbon.confirm{background:var(--status-soon); color:#fff;}


/* STA count sheet only — one ribbon, not two, since there's a single signal
   (counted state) instead of MCX's independent availability+expiry pair.
   Same "color carries the signal, label is the double-check" convention:
   a barista scanning the list sees the same color here as in the matching
   frozen tile above (.status-tile.sta-*), and the same tokens the unit-box
   border/caption already use once a number's typed in, so nothing on this
   page teaches a new color meaning. */
.item-card.has-count-ribbon{position:relative; padding-right:28px; overflow:hidden;}
.item-count-ribbon{
  z-index:2;
  position:absolute; top:0; right:0; bottom:0; width:17px;
  display:flex; align-items:center; justify-content:center;
  color:#fff;
  writing-mode:vertical-rl; transition:background .3s ease;
}
.item-count-ribbon.not-counted{background:var(--status-notchecked-ink);}
.item-count-ribbon.counted{background:var(--status-ok);}
.item-count-ribbon.low{background:var(--status-expired);}
.item-name{font-weight:600; font-size:calc(14px * var(--text-scale)); color:var(--ink); line-height:1.3;}
.item-card.has-availability .item-name{font-size:calc(13px * var(--text-scale)); line-height:1.25;}

/* Compact multi-unit count boxes — one item can need 2-3 units (Carton,
   Piece, ml…) and stacking a full label+input+chip row per unit got
   bloated fast. Boxes sit side by side instead; the unit is a placeholder
   until typed, then a small ribbon tag confirms it so identity isn't lost
   once the placeholder is gone. */
.unit-box-row{display:flex; gap:8px; flex-wrap:wrap;}
.unit-box{flex:1 1 0; min-width:64px; position:relative; display:flex; flex-direction:column; align-items:center; gap:4px;}
.unit-ribbon{
  position:absolute; top:-8px; right:-4px; z-index:1;
  font-size:calc(8.5px * var(--text-scale)); font-weight:800; letter-spacing:0.03em;
  padding:2px 6px; border-radius:999px; background:var(--tan-line); color:#3a2c17;
  box-shadow:0 1px 3px rgba(16,24,40,0.15);
  opacity:0; transform:translateY(3px) scale(0.85);
  transition:opacity .18s ease, transform .18s ease; pointer-events:none;
}
.unit-ribbon.show{opacity:1; transform:translateY(0) scale(1);}
.unit-box-input{
  width:100%; padding:10px 4px 8px; border-radius:10px; border:1.5px solid var(--line);
  background:var(--surface); color:var(--ink); font-weight:700; font-size:calc(13px * var(--text-scale)); text-align:center;
  font-variant-numeric:tabular-nums; transition:border-color .15s ease, background-color .15s ease;
}
.unit-box-input::placeholder{
  color:var(--ink-faint); font-weight:700; text-transform:uppercase; font-size:calc(10px * var(--text-scale)); letter-spacing:0.04em;
}
.unit-box-input:focus{border-color:var(--blue); outline:none;}
.unit-box-input.state-counted{border-color:var(--status-ok);}
.unit-box-input.state-low{border-color:var(--status-expired); background:var(--status-expired-bg);}
.unit-box-caption{
  font-size:calc(9.5px * var(--text-scale)); font-weight:600; color:var(--ink-faint); white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.unit-box-caption.low{color:var(--status-expired); font-weight:800; text-transform:uppercase; letter-spacing:.03em;}
/* Setting low-stock levels (OM/OL): a "Low at" box under each unit, and
   Save Low Stock Levels in place of Submit. Hidden while counting. */
.low-level-input{
  display:none; width:100%; padding:6px 4px; border-radius:8px; border:1.5px dashed var(--status-expired);
  background:var(--surface); color:var(--status-expired); font-weight:800; text-align:center;
  font-size:max(16px, calc(13px * var(--text-scale))); font-variant-numeric:tabular-nums;
}
.low-level-input::placeholder{color:var(--status-expired); opacity:.55; font-size:11px; text-transform:uppercase; font-weight:700;}
body.setting-low .low-level-input{display:block;}
body.setting-low .unit-box-caption{display:none;}
.low-mode-toggle{
  margin-top:8px; padding:8px 14px; border-radius:999px; border:1.5px solid var(--status-expired);
  background:transparent; color:var(--status-expired); font-family:inherit; font-weight:800;
  font-size:calc(12px * var(--text-scale)); cursor:pointer;
}
body.setting-low .low-mode-toggle{background:var(--status-expired); color:#fff;}
/* StockTake's container boxes (2026-10-29): PCS counted box by box, the PCS
   box above showing their sum. The sum box is greyed and marked Σ so it is
   clearly worked out, not typed. */
.unit-box.summed .unit-box-input{background:var(--surface-tint); cursor:default;}
.unit-box.summed::after{
  content:"Σ"; position:absolute; top:-8px; left:-4px;
  padding:1px 6px; border-radius:999px; background:var(--navy); color:#fff;
  font-size:calc(9px * var(--text-scale)); font-weight:800;
}
.box-split{display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; margin-top:8px;}
.box-split-box{position:relative; display:flex; flex-direction:column; align-items:center; gap:3px; width:60px;}
.box-split-label{
  font-size:calc(9px * var(--text-scale)); font-weight:800; letter-spacing:0.04em; text-transform:uppercase;
  color:var(--tan);
}
.box-split-input{
  width:100%; padding:8px 4px; border-radius:10px; border:1.5px dashed var(--tan-line);
  background:var(--surface); color:var(--ink); font-weight:700; font-size:max(16px, calc(14px * var(--text-scale)));
  text-align:center; font-variant-numeric:tabular-nums;
}
.box-split-input:focus{border-style:solid; border-color:var(--blue); outline:none;}
.box-split-remove{
  position:absolute; top:6px; right:-7px; width:20px; height:20px; padding:0; border:none; border-radius:50%;
  background:var(--surface-tint); color:var(--ink-soft); font-size:14px; line-height:20px; cursor:pointer;
  box-shadow:0 1px 3px rgba(16,24,40,0.2);
}
.box-split-add{
  height:36px; padding:0 12px; border-radius:999px; border:1.5px dashed var(--tan-line);
  background:transparent; color:var(--tan); font-family:inherit; font-size:calc(11.5px * var(--text-scale)); font-weight:800;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.box-split-add:active{transform:scale(.96);}

.sheet-bottom{
  /* Shared with the panel footers — see --frozen-bar-pad in :root. */
  padding:var(--frozen-bar-pad);
  border-top:1px solid var(--line); background:var(--surface);
  position:fixed; left:0; right:0; bottom:0; z-index:10;
  max-width:520px; margin:0 auto;
}
.btn-submit{
  width:100%; padding:14px; border-radius:14px; border:none; color:#fff;
  font-weight:700; font-size:calc(14.5px * var(--text-scale)); cursor:pointer; transition:background-color .18s ease, scale .1s var(--ease-out);
}
.btn-submit:active:not(:disabled){scale:var(--press-scale);}
.btn-submit:hover{background:var(--blue);}

/* ================= SHARED BITS =================
   All that's left of the HQ dashboard styles (removed with HQ admin on
   2026-10-29): the empty-list line on Receiving's scan page. */
.empty-note{font-size:calc(13px * var(--text-scale)); color:var(--ink-faint); padding:20px 0; text-align:center;}

/* ================= HOME (hub landing screens) ================= */
/* Frozen brand bar across the top of the tool-selection screen. The
   full-colour "light_background" lockup, shown as supplied — same standing
   constraint as .splash-logo: brand artwork is used in the variant made for
   the field it sits on, never recoloured with a CSS filter. This bar is
   --surface-page, the app's light background, so it takes the colour file.
   A navy bar would need the white knockout export instead.

   z-index 20 clears the tool cards but stays under everything meant to cover
   the whole screen: side panel (95/96), install banner (9999), splash (200). */
.home-topbar{
  position:sticky; top:0; z-index:20;
  background:var(--surface-page);
  border-bottom:1px solid var(--line);
  /* Inset on the outer element so the background fills behind the status
     bar; on the inner row it would leave a transparent band up top. */
  padding-top:env(safe-area-inset-top);
}
/* 1fr auto 1fr, not flex space-between: the wordmark holds the true centre of
   the bar rather than the centre of the space "Log out" leaves over. */
.home-topbar-inner{
  max-width:720px; margin:0 auto;
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px;
  padding:11px calc(20px + env(safe-area-inset-right))
          11px calc(20px + env(safe-area-inset-left));
}
/* The outlet line under the bar: name first, code after, both one line. */
.home-outlet{
  max-width:720px; margin:0 auto; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:0 calc(20px + env(safe-area-inset-right)) 9px calc(20px + env(safe-area-inset-left));
  min-width:0;
}
.home-outlet-name{
  font-size:calc(13px * var(--text-scale)); font-weight:700; color:var(--navy);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;
}
.home-outlet-code{
  flex:none; font-size:calc(11px * var(--text-scale)); font-weight:700; color:var(--ink-faint);
  font-variant-numeric:tabular-nums; letter-spacing:.02em;
}
.home-outlet-change{
  flex:none; font-size:calc(11.5px * var(--text-scale)); font-weight:700; color:var(--blue);
  text-decoration:none; padding:4px 10px; border-radius:999px; background:var(--surface-tint);
}
.home-outlet-change:active{transform:scale(.96);}

/* ================= CHECKLIST (MCX) — shares .sheet-* / .item-card / .flash with STA ================= */
.status-chip{
  font-size:calc(10px * var(--text-scale)); font-weight:700; padding:2px 7px; border-radius:999px; white-space:nowrap;
  text-transform:uppercase; letter-spacing:0.02em; flex:none; overflow:hidden;
  margin-left:6px; opacity:1; transform:scale(1); max-width:160px;
  transition:opacity .32s ease, transform .32s var(--ease-out),
             max-width .34s cubic-bezier(.4,0,.2,1), padding .34s ease, margin-left .34s ease;
}
.status-chip.expired{color:var(--status-expired); background:var(--status-expired-bg);}
.status-chip.expiring-soon{color:var(--status-soon-ink); background:var(--status-soon-bg);}
.status-chip.not-yet-checked{color:var(--status-notchecked-ink); background:var(--status-notchecked-bg);}
.status-chip.ok{color:var(--status-ok-ink); background:var(--status-ok-bg);}

/* Any item with a border ribbon already telling the story (OK gets none —
   nothing to flag; Expired/Expiring Soon get the right-side ribbon above)
   collapses its inline chip away. Names stay pinned to one left-aligned
   column regardless of status, so the chip popping in/out (only for Not
   Yet Checked, which has no ribbon of its own) never moves the name. */
.item-info.chip-collapsed .status-chip{
  opacity:0; transform:scale(.4); max-width:0; padding-left:0; padding-right:0; margin-left:0;
  pointer-events:none;
}

.flash.error{background:var(--under-bg); color:var(--under);}

.frozen-summaries{
  position:sticky; top:0; z-index:5;
  background:var(--surface-page); box-shadow:0 6px 10px -8px rgba(16,24,40,0.18);
}
/* The block's bottom edge, wherever it falls — one row on STA's count sheet
   and Store Auditing, two on the Markout Checklist. Carried by whichever row
   is last rather than by .frozen-summaries itself, so the row keeps owning
   its own padding and the two cases don't need separate numbers. */
.frozen-summaries > :last-child{padding-bottom:8px;}
/* 8px on the frozen block's outer edges, 6px everywhere inside it. The
   row(s) are one object, and giving that object slightly more air above and
   below than its own tiles have between them is what separates it from the
   header above and the list below — at a flat 6px it ran into both. Where a
   second row follows (Markout Checklist's positions), the gap between them
   stays 6px so the two still read as a pair. */
.status-summary{
  display:grid; grid-template-columns:repeat(4,1fr); gap:6px;
  margin:0; padding:8px 20px 6px;
}
.status-tile{
  position:relative; border-radius:12px; padding:8px 6px 18px; text-align:center; transition:transform .15s ease, scale .1s var(--ease-out); cursor:pointer;
  min-height:49px; display:flex; align-items:center; justify-content:center;
}
.status-tile:active{scale:var(--press-scale);}
/* The count is the only element left in normal flow (the label is pinned
   absolute below), so it centers on the tile's full height, nudged down
   slightly off dead-center. */
.status-tile .count{font-size:calc(19px * var(--text-scale)); font-weight:800; line-height:1.1; font-variant-numeric:tabular-nums; transform:translateY(2px);}
.status-tile .label{
  position:absolute; left:6px; right:6px; bottom:6px;
  font-size:calc(7.5px * var(--text-scale)); font-weight:700; text-transform:uppercase; letter-spacing:0.01em; line-height:1.2; opacity:0.9;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
/* Baseline: every status tile sits at the app's standard blue (same as the
   position tiles below) when its count is 0 — nothing needs action, nothing
   to call out. Each status class only sets --alert-color (its "trouble"
   color, matching the card border ribbons/.item-expiry-ribbon), it does NOT
   set background directly — background comes from this shared rule so a
   tile always starts blue and only .alert-pulse (added when count >= 1)
   animates it toward --alert-color. Missing Date and OOS pulse grey. Missing
   Date was red like Expired for a while, and went back to grey on
   2026-11-02 (the user's call): red is kept for what has actually expired,
   so a shop with many undated items doesn't read as a wall of alarm. */
.status-tile{background:var(--blue); color:#fff;}
/* Markout's four tile labels (EXPIRED, EXPIRING SOON, MISSING DATE, OUT OF
   STOCK) match the row strips' labels (7.5px, extra-bold; the GROUPED LIST
   block at the end): the user's ask, 2026-11-10, so the same words read at
   the same size top and bottom. 8.5px was tried the same day and judged
   too big. Store Expiry Audit (.sea-page) shares it, same tiles. Markout only: STA and Store Expiry Audit
   tiles keep the shared 7.5px. */
.mcx-checklist-page .status-tile .label,
.sea-page .status-tile .label{font-size:calc(7.5px * var(--text-scale)); font-weight:800;}
.status-tile.expired{--alert-color:var(--status-expired);}
.status-tile.expiring-soon{--alert-color:var(--status-soon);}
.status-tile.not-yet-checked{--alert-color:var(--status-notchecked-ink);}
.status-tile.out-of-stock{--alert-color:var(--status-notchecked-ink);}
/* Loops the tile's background between blue and its own --alert-color for
   as long as its count stays >= 1. The color-change itself takes 3s, then
   holds for 5s before the next change starts (16s full cycle: 3s change +
   5s hold + 3s change back + 5s hold) — back-to-back 3s changes read as
   flashing/beeping, so the pause in between is what keeps it calm. */
.status-tile.alert-pulse{animation:statusAlertPulse 16s ease-in-out infinite;}
/* STA's frozen tiles (sheet.html) — same tile shell, and the same colors
   as .item-count-ribbon below (which itself reuses the unit-box caption's
   over/under/match tokens) so a color means the same thing whether it's a
   frozen tile, a card ribbon, or an input border. Not Counted uses the
   critical red rather than the neutral "no data" gray MCX uses for its
   equivalent (Not Yet Checked) — here it's the barista's punch list, not
   passive missing data, so it reads as the thing still needing action. */
.status-tile.sta-not-counted{background:var(--status-notchecked-ink); color:#fff;}
.status-tile.sta-counted{background:var(--status-ok);}
/* Low Stock: blue at rest like the other tiles in the app, pulsing red while
   anything is low (the same alert-pulse MCX's Expired tile uses). */
.status-tile.sta-low{background:var(--blue); color:#fff; --alert-color:var(--status-expired);}
.status-summary.sta-tiles{grid-template-columns:repeat(3,1fr);}
/* Tapping a tile filters the item list below down to that status (see
   applyCardFilters in checklist.html). Dim the tiles not selected so the
   active one reads as "this is what you're looking at," same idea as the
   old query-stack tabs but without a whole separate box to look at. */
.status-summary.filtering .status-tile{opacity:.45;}

/* Second frozen row on the Markout Checklist: today's date and the station
   filter in one box (2026-10-29; it replaced six station tiles that took
   turns showing the date). Same blue as the tiles above so the frozen block
   still reads as one piece. */
/* No bottom margin: as the frozen block's last child the wrap gets the
   block's 8px bottom edge as padding (.frozen-summaries > :last-child). */
.station-wrap{position:relative; margin:0 20px;}
.station-picker{
  position:relative; z-index:2; width:100%;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  min-height:46px; padding:0 14px; border:none; border-radius:12px;
  background:var(--blue); color:#fff; font-family:inherit; text-align:left; cursor:pointer;
  box-shadow:0 6px 12px -8px rgba(16,24,40,0.35), 0 2px 4px rgba(16,24,40,0.15);
  -webkit-tap-highlight-color:transparent; transition:transform .15s ease, background-color .15s ease, scale .1s var(--ease-out);
}
.station-picker:active{scale:var(--press-scale);}
.station-picker:focus-visible{outline:2px solid var(--navy); outline-offset:2px;}
/* A station is picked: the white inset ring an active tile gets. */
.station-picker.active{box-shadow:inset 0 0 0 2px rgba(255,255,255,0.85);}
/* Any filter on (a station, or a status tile): the box pulses blue -> red ->
   blue on the Expired tile's own 16s loop, and in the red half it reads
   "Filter On · <name>" instead of the date and station, then gives them back.
   Three animations, one timeline: statusAlertPulse's percentages are repeated
   in stationNoteIn/Out below, and checklist.html starts all three together.
   Keep the duration and the four percentages identical or they drift. */
.station-picker.filter-on{
  --alert-color:var(--status-expired);
  animation:statusAlertPulse 16s ease-in-out infinite;
}
.station-picker.filter-on > .station-date,
.station-picker.filter-on > .station-current{animation:stationNoteOut 16s ease-in-out infinite;}
.station-filter-note{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:6px;
  padding:0 14px; opacity:0; pointer-events:none; white-space:nowrap; overflow:hidden;
  font-size:calc(14px * var(--text-scale)); font-weight:700;
}
.station-filter-note svg{width:16px; height:16px; flex-shrink:0;}
.station-filter-note strong{font-weight:800; overflow:hidden; text-overflow:ellipsis;}
.station-filter-dot{opacity:.7;}
.station-picker.filter-on .station-filter-note{animation:stationNoteIn 16s ease-in-out infinite;}
.station-date{
  display:flex; align-items:center; gap:8px; flex-shrink:0;
  font-size:calc(14px * var(--text-scale)); font-weight:800; font-variant-numeric:tabular-nums;
}
.station-date svg{width:18px; height:18px; flex-shrink:0; opacity:.9;}
.station-current{display:flex; align-items:center; gap:8px; min-width:0;}
.station-current-name{
  font-size:calc(13px * var(--text-scale)); font-weight:700; color:rgba(255,255,255,0.9);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.station-current-count{
  flex-shrink:0; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,0.18);
  font-size:calc(12px * var(--text-scale)); font-weight:800; font-variant-numeric:tabular-nums;
}
.station-chevron{width:12px; height:8px; flex-shrink:0; transition:transform .18s ease;}
.station-picker.open .station-chevron{transform:rotate(180deg);}

/* The panel. Opens just under the box and dims everything else, the box
   included in the bright layer so it's clear what the panel belongs to.
   Raised elevation (design system §4), 16px corners, 48px rows for thumbs. */
.station-backdrop{
  position:fixed; inset:0; z-index:1; background:rgba(4,8,28,0.32);
  opacity:0; pointer-events:none; transition:opacity .18s ease;
}
.station-backdrop.open{opacity:1; pointer-events:auto;}
.station-menu{
  position:absolute; left:0; right:0; top:100%; z-index:3;   /* the wrap's 8px bottom padding is the gap */
  padding:6px; border-radius:16px; background:var(--surface-card); border:1px solid var(--line);
  box-shadow:0 12px 32px rgba(22,39,122,0.22), 0 2px 6px rgba(22,39,122,0.10);
  max-height:calc(100vh - 220px); overflow-y:auto; overscroll-behavior:contain;
  opacity:0; visibility:hidden; transform:translateY(-6px) scale(.95); transform-origin:top center;
  /* Closing: 160 ms, about 20% under the 200 ms open (rule 15), shrinking
     back up towards the banner that opened it (rules 11-12). */
  transition:opacity .16s var(--ease-exit), transform .16s var(--ease-exit), visibility 0s linear .16s;
}
.station-menu.open{opacity:1; visibility:visible; transform:none; transition:opacity .2s var(--ease-out), transform .2s var(--ease-out);}
.station-menu-head{
  padding:8px 12px 6px; font-size:calc(11px * var(--text-scale)); font-weight:700;
  letter-spacing:0.06em; text-transform:uppercase; color:var(--ink-faint);
}
.station-menu-sep{height:1px; margin:4px 12px; background:var(--line);}
.station-option{
  display:flex; align-items:center; gap:10px; width:100%; min-height:48px; padding:0 12px;
  border:none; border-radius:12px; background:transparent; color:var(--ink);
  font-family:inherit; font-size:calc(15px * var(--text-scale)); font-weight:600; text-align:left; cursor:pointer;
  -webkit-tap-highlight-color:transparent; transition:background-color .12s ease;
}
.station-option:active{background:var(--surface-tint);}
.station-option:focus-visible{outline:2px solid var(--navy); outline-offset:-2px;}
.station-option-name{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.station-option-count{
  flex-shrink:0; min-width:34px; padding:3px 9px; border-radius:999px; text-align:center;
  background:var(--surface-tint); color:var(--ink-soft);
  font-size:calc(12px * var(--text-scale)); font-weight:800; font-variant-numeric:tabular-nums;
}
.station-option-check{width:20px; height:20px; flex-shrink:0; color:var(--navy); visibility:hidden;}
.station-option[aria-selected="true"]{background:rgba(40,60,157,0.08); color:var(--navy); font-weight:800;}
.station-option[aria-selected="true"] .station-option-count{background:var(--navy); color:var(--surface-card);}
.station-option[aria-selected="true"] .station-option-check{visibility:visible;}

/* Tapping a status tile freezes the status tiles' pulse until the filter
   is cleared — .frozen-summaries carries the one flag. Picking a station
   doesn't: the station box pulses in step with them instead. Held state is the informative one: status tiles sit on their
   solid red/yellow/grey rather than mid-fade to blue.

   Freezing with `animation:none` is also what guarantees the two rows come
   back in phase. Every animation here is suppressed and then re-enabled in
   the same style recalculation when .filtering is removed, so they all
   restart from 0% on the same frame — whereas letting them keep running
   (or restarting them individually) is exactly what left them drifting
   apart after a filter was cleared. */
.frozen-summaries.filtering .status-tile.alert-pulse{
  animation:none; background:var(--alert-color);
}

/* Markout Checklist only: the status tiles sit a few px shorter, matching the
   shorter item cards above. Scoped to this page because .status-tile is
   shared with STA's count sheet and Store Auditing's checklist, which are
   not two rows deep and don't need the space back.

   Only the TOP padding comes off — the 18px bottom is the label's reserved
   strip, and trimming that would run the count into the label. The count's
   optical nudge drops 2px -> 1px over the same edit, which leaves its
   clearance above the label where it was before the tile shrank. */
.mcx-checklist-page .status-tile{min-height:45px; padding-top:5px;}
.mcx-checklist-page .status-tile .count{transform:translateY(1px);}

.item-row-main{display:flex; align-items:center; justify-content:space-between; gap:8px;}
.item-info{display:flex; align-items:center; justify-content:flex-start; min-width:0; flex:1;}
/* Markout: who set the date, on items with no opened shelf life (1500l,
   2026-11-11). Its own line under the name, so .item-info wraps. */
.item-info:has(.item-logged-by){flex-wrap:wrap;}
.item-logged-by{flex-basis:100%; margin-top:2px; font-size:calc(11.5px * var(--text-scale)); font-weight:500; color:var(--ink-faint); line-height:1.3;}
.item-logged-by[hidden]{display:none;}
.date-input-wrap{display:flex; gap:8px; align-items:center; flex:none;}
/* Shared by the Markout and Store Auditing checklists, and on both this
   button is the tallest thing in a row — its padding, not the item name and
   not the card's own, is what sets the row height and therefore how many
   items clear the frozen bars. The 5px was 8px, which put the button near
   35px; 5px puts it near 29px and takes the same 6px off every row.

   That is the floor, not a step on the way down. The usual comfortable
   touch target is 44px and this was already under it; what keeps it usable
   is that a miss here is cheap — it opens the wrong row's calendar, one tap
   to dismiss — unlike the 17px expiry ribbon beside it, where a miss arms a
   print label. Don't shave this further to buy rows. */
/* Data-entry boxes (date, PCS / PKT / CTN, STA counts) are a step smaller
   across the hub (user, 2026-11-04). The STA low-level box stays at 16px+:
   iPhones zoom the page into an input under 16px. */
.date-trigger{ border-radius:9px; border:1.5px solid var(--line);
  background:var(--surface); color:var(--ink); font-size:calc(12px * var(--text-scale)); font-weight:600; cursor:pointer;
}
.date-trigger.placeholder{color:var(--ink-faint); font-weight:400;}
.date-trigger.open, .date-trigger:focus{border-color:var(--blue); outline:none; box-shadow:0 0 0 3px rgba(40,60,157,0.12);}
.qty-input{
  flex:1 1 0; min-width:0; padding:5px 8px; border-radius:9px; border:1.5px solid var(--line);
  background:var(--surface); color:var(--ink); font-family:inherit; text-align:center;
  font-size:calc(12px * var(--text-scale)); font-weight:600; font-variant-numeric:tabular-nums;
  -moz-appearance:textfield; appearance:textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button{-webkit-appearance:none; margin:0;}
.qty-input::placeholder{color:var(--ink-faint); font-weight:400; letter-spacing:.04em;}
.qty-input:focus{border-color:var(--blue); outline:none; box-shadow:0 0 0 3px rgba(40,60,157,0.12);}
.save-status{
  font-size:calc(11px * var(--text-scale)); font-weight:600; color:var(--ink-faint); height:0; opacity:0; margin-top:0;
  overflow:hidden; transition:opacity .15s ease;
}
.save-status.visible{height:auto; opacity:1; margin-top:6px;}
.save-status.error{color:var(--under);}
.save-status.pending{color:var(--tan);}

.cal-backdrop{position:fixed; inset:0; background:rgba(10,20,50,0.28); z-index:90; opacity:0; pointer-events:none; transition:opacity .18s ease;}
.cal-backdrop.show{opacity:1; pointer-events:auto;}
/* Sized for a barista's thumb, not a mouse pointer: at the old 272px the
   day cells worked out to ~34px, well under a comfortable touch target and
   easy to fat-finger the wrong date on. 312px puts them at ~38px. The
   max-width still caps it on narrow phones, and openCalendar() in
   checklist.html measures the rendered popover rather than hardcoding these
   numbers, so the position clamp follows any future resize on its own. */
.cal-popover{
  position:fixed; z-index:91; width:312px;
  background:var(--surface-card); border:1px solid var(--line);
  opacity:0; pointer-events:none;
}
.cal-popover.show{opacity:1; pointer-events:auto;}
.cal-head{display:flex; align-items:center; justify-content:space-between;}
.cal-title{ color:var(--navy);}
.cal-nav{ padding:0; display:flex; align-items:center; justify-content:center;
  background:var(--surface-tint); color:var(--navy); border:none; font-weight:700; cursor:pointer;
}
.cal-nav:hover{background:var(--line);}
.cal-weekdays, .cal-days{display:grid; grid-template-columns:repeat(7,1fr); gap:3px;}
.cal-weekdays div{text-align:center; font-weight:700; color:var(--ink-faint); text-transform:uppercase;}
.cal-day{
  aspect-ratio:1; display:flex; align-items:center; justify-content:center; font-weight:600;
  color:var(--ink); background:transparent; border:none; padding:0; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.cal-day:hover{background:var(--surface-tint);}

/* The date picker, Markout and Store Expiry Audit (redesigned 2026-11-07, the
   user's ask: "good design and larger for big finger", then "opened on
   center", then the same for SEA). A dialog in the
   middle of the screen, as wide as a phone allows up to 380px, so each day is
   ~48px instead of ~38px. It names the item it is dating, because it covers
   the card. Past days are lighter but still tappable (an expired item gets a
   date too); today has a stronger outline. Picking a day closes it.
   These rules come after the original popover's above and replace them;
   neither page's script positions it any more. */
.cal-popover{
  left:50%; top:50%;
  width:min(380px, calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); overflow:auto;
  border-radius:20px; padding:16px; box-shadow:0 16px 40px rgba(16,24,40,0.20);
  transform:translate(-50%, -50%) scale(.95); transform-origin:center;
  transition:opacity .16s var(--ease-exit), transform .16s var(--ease-exit);
}
.cal-popover.show{transform:translate(-50%, -50%) scale(1); transition:opacity .2s var(--ease-out), transform .2s var(--ease-out);}
.cal-for{
  display:flex; flex-direction:column; gap:2px; margin-bottom:12px; padding-bottom:12px;
  border-bottom:1px solid var(--line);
}
.cal-for-label{
  font-size:calc(10.5px * var(--text-scale)); font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink-faint);
}
.cal-for-name{font-size:calc(16px * var(--text-scale)); font-weight:700; color:var(--ink); line-height:1.3;}
.cal-head{margin-bottom:8px;}
.cal-title{font-size:calc(17px * var(--text-scale)); font-weight:800;}
.cal-nav{width:44px; height:44px; border-radius:12px; font-size:24px;}
.cal-weekdays div{font-size:calc(11.5px * var(--text-scale)); padding:6px 0;}
.cal-days{gap:4px;}
.cal-day{min-height:44px; font-size:calc(17px * var(--text-scale)); border-radius:12px; transition:scale .1s var(--ease-out);}
.cal-day.past{color:var(--ink-faint);}
.cal-day:active{scale:var(--press-scale); background:var(--surface-tint);}
/* Markout: past the item's opened shelf life. Still drawn, so the month keeps
   its shape, but faded, struck through and not tappable. Opacity, not a fixed
   grey, so it reads the same in dark mode. */
.cal-day.beyond, .cal-day.beyond:active{opacity:.3; text-decoration:line-through; cursor:not-allowed; transform:none; background:transparent;}
.cal-nav:disabled{opacity:.35; cursor:not-allowed;}
.cal-for-limit{font-size:calc(13px * var(--text-scale)); font-weight:600; color:var(--ink-soft); margin-top:2px;}
.cal-day.today{box-shadow:inset 0 0 0 2px var(--tan-line); font-weight:800;}
.cal-day.selected{background:var(--navy-fill); color:#fff;}
/* Clear date: Store Expiry Audit's since 2026-11-04, Markout's too since
   2026-11-23 (the user: "every hub has a date clear button"). One rule for
   both, moved here from SEA's page. */
/* Under the calendar grid. Red text because it removes data, on a
   light tint rather than a solid fill: it's the rare action, not the main one. */
.cal-foot{display:flex;}
/* Full width and 44px tall since the picker went finger-sized (2026-11-07). */
.cal-clear{
  margin-top:12px; width:100%; height:44px; padding:0 10px; border:none; border-radius:14px; background:var(--surface-tint);
  color:var(--status-expired); font-family:inherit; font-size:calc(14px * var(--text-scale)); font-weight:700; cursor:pointer;
}
.cal-clear[hidden]{display:none;}
.cal-close{
  display:block; width:100%; height:48px; margin-top:12px; border:none; border-radius:14px;
  background:var(--surface-tint); color:var(--navy); font-family:inherit;
  font-size:calc(15px * var(--text-scale)); font-weight:700; cursor:pointer;
}
.mcx-checklist-page .item-card.has-availability{cursor:pointer;}
@media (prefers-reduced-motion: reduce){ .cal-popover{transition:opacity .18s ease;} }

/* Full-height slide-in-from-right panel shell, used by the print cart
   panel (see below). It was generalized when a second panel shared it;
   that panel has since gone, but the shell stays split out.
   Generalized after the second use rather than duplicated, since it's
   exactly the same shell both times: dim backdrop, panel slides in from
   the right, sticky head with a back button + title. */
.side-panel-backdrop{position:fixed; inset:0; background:rgba(10,20,50,0.32); z-index:95; opacity:0; pointer-events:none; transition:opacity .25s ease;}
.side-panel-backdrop.show{opacity:1; pointer-events:auto;}
.side-panel{
  position:fixed; top:0; right:0; bottom:0; width:100%; max-width:520px;
  background:var(--surface-page); z-index:96; overflow-y:auto;
  transform:translateX(100%); transition:transform .3s cubic-bezier(.4,0,.2,1);
  display:flex; flex-direction:column;
}
.side-panel.show{transform:translateX(0);}
/* Print Cart specifically (#print-cart-panel) uses this instead of the
   plain right-slide — it's a quick add-a-few-items-then-print action, so a
   bottom sheet (thumb-reachable, doesn't cover the whole screen) fits
   better than a full-height side panel. The plain right-slide above is
   what the shell does without this modifier. */
.side-panel.bottom-sheet{
  top:auto; left:0; right:0; width:auto; margin:0 auto;
  max-height:min(78vh, 640px); border-radius:20px 20px 0 0;
  transform:translateY(100%);
}
.side-panel.bottom-sheet.show{transform:translateY(0);}
.side-panel-head{
  display:flex; align-items:center; gap:12px; padding:16px 20px;
  border-bottom:1px solid var(--line); background:var(--surface);
  position:sticky; top:0; z-index:1;
}
.side-panel-back-btn{
  width:34px; height:34px; border-radius:9px; border:1px solid var(--line);
  background:var(--surface-card); display:flex; align-items:center; justify-content:center;
  cursor:pointer; padding:0; flex:none; color:var(--ink);
}
.side-panel-title{font-weight:800; font-size:calc(14px * var(--text-scale)); color:var(--ink-faint); min-width:0;}
.side-panel-subtitle{display:block; font-size:calc(16px * var(--text-scale)); font-weight:800; color:var(--ink); margin-top:1px;}
/* Reuses .item-card as-is (same background/border/radius/padding as the
   real checklist cards, so these look and size the same) — .position-card
   just adds the right-edge padding for .position-stack below, mirroring
   how .item-expiry-ribbon sits on the main list's cards, except this is 6
   tappable segments instead of one read-only status strip. */
/* Since 2026-11-19 the stations are a row of pills under the name (only the
   picked ones, plus "+ Add Station"), not a 6-chip column down the right
   edge, so the card is as tall as its content rather than 162px. */
.item-card.position-card{
  position:relative; padding:13px 14px; overflow:hidden;
  display:flex; flex-direction:column; justify-content:center;
}
.settings-item-name{font-size:calc(14px * var(--text-scale)); font-weight:700; color:var(--ink);}
.settings-save-tag{
  font-size:calc(11px * var(--text-scale)); font-weight:600; color:var(--ink-faint);
  height:0; opacity:0; overflow:hidden; margin-top:0; transition:opacity .15s ease;
}
.settings-save-tag.visible{height:auto; opacity:1; margin-top:4px;}
.settings-save-tag.error{color:var(--under); cursor:pointer;}
/* Uncommitted edit, same tan the checklist's pending rows use so the two
   views read the same way. */
.settings-save-tag.pending{color:var(--tan);}
/* The picked stations as pills (design system: category chip, selected =
   navy fill), in walking order, then the outline "+ Add Station" pill that
   opens the picker. Unpicked chips stay in the markup as the record of
   what's picked, hidden here. */
.position-stack{display:flex; flex-wrap:wrap; gap:6px; margin-top:10px;}
.position-chip, .position-add{
  min-height:32px; padding:6px 13px; border-radius:100px; cursor:pointer; font-family:inherit;
  font-size:calc(12px * var(--text-scale)); font-weight:700; line-height:1.2; white-space:nowrap;
}
.position-chip{display:none; border:1px solid var(--blue); background:var(--blue); color:#fff;}
.position-chip.active{display:inline-flex; align-items:center;}
.position-add{background:var(--surface-card); color:var(--blue); border:1px dashed var(--blue);}
.position-chip:focus-visible, .position-add:focus-visible{outline:2px solid var(--blue); outline-offset:2px;}

/* The station picker (2026-11-19): Remove's bottom sheet, with one tick row
   per station and the station's small print (POSITION_HINTS) under its name. */
.pick-sheet-help{font-size:calc(11.5px * var(--text-scale)); font-weight:600; color:var(--ink-soft); margin-top:2px;}
.pick-options{display:flex; flex-direction:column; gap:6px; overflow-y:auto; max-height:60dvh;}
.pick-option{
  position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left;
  min-height:52px; padding:9px 52px 9px 14px; border-radius:14px; cursor:pointer; font-family:inherit;
  background:var(--surface-tint); color:var(--navy); border:1.5px solid transparent;
  transition:background-color .15s ease, border-color .15s ease;
}
.pick-option.on{border-color:var(--blue); background:var(--surface-card);}
.pick-option-name{font-size:calc(14px * var(--text-scale)); font-weight:800;}
.pick-option-hint{font-size:calc(11.5px * var(--text-scale)); font-weight:600; color:var(--ink-soft);}
.pick-option-box{
  position:absolute; right:14px; top:50%; width:24px; height:24px; margin-top:-12px;
  border-radius:7px; border:1.5px solid var(--ink-faint); background:var(--surface-card);
  transition:background-color .15s ease, border-color .15s ease;
}
.pick-option.on .pick-option-box{background:var(--blue); border-color:var(--blue);}
.pick-option.on .pick-option-box::after{
  content:""; position:absolute; left:7px; top:3px; width:6px; height:11px;
  border:solid #fff; border-width:0 2.5px 2.5px 0; transform:rotate(45deg);
}
.pick-option:focus-visible{outline:2px solid var(--blue); outline-offset:2px;}
.station-pick-done{margin-top:4px;}
@media (prefers-reduced-motion: reduce){.pick-option, .pick-option-box{transition:none;}}

/* Settings: + Add New Item. Open to every outlet; collapsed behind one
   outline button (the design system's Outline variant) so the form only
   takes room when someone is actually adding. */
.add-item{margin:6px 20px 0;}
.add-item-toggle{
  width:100%; padding:10px 14px; border:none; border-radius:12px; cursor:pointer;
  background:var(--surface-card); color:var(--navy); box-shadow:inset 0 0 0 1.5px var(--navy);
  font-family:inherit; font-size:calc(13px * var(--text-scale)); font-weight:700;
}
.add-item-toggle.open{display:none;}
.add-item-form{
  display:none; flex-direction:column; gap:16px; padding:16px;
  background:var(--surface-card); border:1px solid var(--line); border-radius:14px;
}
.add-item-form.open{display:flex;}
.add-item-field{display:flex; flex-direction:column; gap:8px; min-width:0;}
/* 46px tall, 14px radius (design system §5). The 16px floor is for iPhone:
   Safari zooms the whole page into any field whose text is under 16px, and in
   the installed app there's no easy way back out of that zoom. */
.add-item-field input, .add-item-field select{
  width:100%; height:46px; padding:0 14px; border-radius:14px; border:1px solid var(--line);
  background:var(--surface-card); color:var(--ink); font-family:inherit;
  font-size:max(16px, calc(14px * var(--text-scale)));
  -webkit-appearance:none; appearance:none; margin:0;
}
.add-item-field input::placeholder{color:var(--ink-faint); opacity:.7;}
.add-item-field input:disabled{background:var(--surface-tint); cursor:not-allowed;}
.add-item-field input:focus, .add-item-field select:focus{
  border-color:var(--navy); outline:none; box-shadow:0 0 0 3px rgba(22,39,122,0.08);
}
/* The printed-sticker box (2026-11-02): two dates in, the shelf life out. A
   tinted panel so it reads as one step, separate from the fields below; it
   goes away for an EOD item, which has no shelf life. */
.add-item-sticker{display:flex; flex-direction:column; gap:10px; padding:12px; border-radius:14px; background:var(--surface-tint);}
.add-item-form.is-eod .add-item-sticker{display:none;}
.position-card.days-is-eod .edit-sticker{display:none;}
.add-item-sticker-result{margin:0; font-size:calc(12.5px * var(--text-scale)); font-weight:600; line-height:1.45; color:var(--ink);}
.add-item-sticker-result:empty{display:none;}
.add-item-sticker-result.ok{color:var(--status-ok-ink);}
.add-item-sticker-result.error{color:var(--under);}
/* worked out, not typed: looks like a value, not an empty box to fill */
.add-item-field input[readonly]{background:var(--surface-tint); color:var(--navy); font-weight:700;}
/* EOD switch: the whole row is the tap target, 48px tall. The real checkbox
   is kept (visually hidden) so the form, the keyboard and screen readers all
   still see a checkbox. */
.add-item-eod{
  position:relative; display:flex; align-items:center; gap:12px; min-height:48px;
  padding:10px 14px; border:1px solid var(--line); border-radius:14px; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.add-item-eod input{position:absolute; opacity:0; width:1px; height:1px; margin:0;}
.add-item-eod-switch{
  position:relative; flex-shrink:0; width:46px; height:28px; border-radius:999px;
  background:#C9CCDA; transition:background-color .18s ease;
}
.add-item-eod-switch::after{
  content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(16,24,40,0.25); transition:transform .18s ease;
}
.add-item-eod input:checked + .add-item-eod-switch{background:var(--status-soon);}
.add-item-eod input:checked + .add-item-eod-switch::after{transform:translateX(18px);}
.add-item-eod input:focus-visible + .add-item-eod-switch{outline:2px solid var(--navy); outline-offset:2px;}
.add-item-form.is-eod .add-item-eod{border-color:var(--status-soon);}
.add-item-actions{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.add-item-actions .btn-submit{height:48px; padding:0 16px;}
.add-item-actions .btn-submit:disabled{opacity:.6; cursor:default;}
.add-item-status{
  padding:8px 12px; border-radius:8px; background:var(--surface-tint);
  font-size:calc(12px * var(--text-scale)); font-weight:600; color:var(--ink-soft);
}
.add-item-status:empty{display:none;}
.add-item-status.error{color:var(--under); background:var(--under-bg);}
/* The name box in a card's Edit panel (OM/OL only). */
.item-rename-input{
  width:100%; padding:9px 11px; border-radius:10px; border:1.5px solid var(--line);
  background:var(--surface-card); color:var(--ink); font-family:inherit;
  font-size:max(16px, calc(13.5px * var(--text-scale)));  /* no iPhone zoom, see above */
}
.item-rename-input:focus{border-color:var(--blue); outline:none; box-shadow:0 0 0 3px rgba(40,60,157,0.12);}
.manage-note{margin:6px 2px 0; font-size:calc(11.5px * var(--text-scale)); line-height:1.45; color:var(--ink-faint);}

/* "New Item Added": the design system's status tag, with its New colour
   (gold-light fill). Fixed colours rather than tokens so the badge reads the
   same in dark mode, where --cream and --navy both shift. */
.new-item-tag{
  display:flex; align-items:center; gap:6px; margin-top:4px;
  font-size:calc(11px * var(--text-scale)); font-weight:600; color:var(--ink-faint);
}
.item-section.is-new .item-section-head{color:var(--tan);}
/* Removed items: struck through and red-framed, so they can't be mistaken
   for live items sitting above the real list. */
.item-section.is-removed .item-section-head{color:var(--under);}
.removed-card .settings-item-name{color:var(--ink-faint); text-decoration:line-through;}

/* New / Renamed / Removed frame (2026-11-19, the user: "more eye catching").
   It replaced a small badge beside the details: the card gets a 2px frame
   in the band's colour, and the word sits on the middle of its top edge,
   like a label on a box. New is ZUS gold, Renamed navy, Removed red. Fixed
   colours, as the badge had, so it reads the same in dark mode. ::after,
   because the Edit pop-up already uses the card's ::before for its header,
   and the frame stands down while that pop-up is open. */
:is(.item-card, .sea-recent-row)[data-frame]:not([data-edit-popup]){
  --frame:#C9A06A; --frame-ink:#223488;
  border:2px solid var(--frame); overflow:visible; position:relative;
  margin-top:calc(14px * var(--text-scale));
}
/* Room under the label. Scoped by the view's id so it outranks
   .sheet-page .item-card:not(.position-card)'s tighter padding further down,
   which the Removed card would otherwise get. */
#mcx-settings-view .item-card[data-frame]:not([data-edit-popup]){padding-top:20px;}
/* Store Audit Settings (2026-11-19): its New / Renamed / Removed rows were
   lines in one box; now each is its own framed card like Markout's. */
.sea-new-list:has(> [data-frame]){display:flex; flex-direction:column; gap:6px; padding:0; border:0; background:none;}
.sea-new-list > .sea-recent-row[data-frame]{border-radius:12px; background:var(--surface-card); padding:20px 14px 12px;}
.sea-new-list > .sea-recent-row[data-frame] + .sea-recent-row[data-frame]{border-top:2px solid var(--frame);}
:is(.item-card, .sea-recent-row)[data-frame="Renamed"]:not([data-edit-popup]){--frame:#223488; --frame-ink:#fff;}
:is(.item-card, .sea-recent-row)[data-frame="Removed"]:not([data-edit-popup]){--frame:#C62828; --frame-ink:#fff;}
:is(.item-card, .sea-recent-row)[data-frame]:not([data-edit-popup])::after{
  content:attr(data-frame); position:absolute; top:0; left:50%; transform:translate(-50%, -50%);
  padding:4px 14px; border-radius:100px; background:var(--frame); color:var(--frame-ink);
  font-size:calc(10.5px * var(--text-scale)); font-weight:800; letter-spacing:0.08em; text-transform:uppercase;
  white-space:nowrap; pointer-events:none;
}
:is(.item-card, .sea-recent-row)[data-frame="New"]:not([data-edit-popup])::after{background:#EFD9BB; box-shadow:inset 0 0 0 1.5px #C9A06A;}

/* ---- Markout Settings: lean rows (2026-11-19) ---------------------------
   The user: "Markout setting item list are too bloated". Each item was its
   own ~200px card: name, a days line, a stations row and an Edit / Remove
   row stacked. Now it is the checklist's grouped list: one card per class
   (.settings-rows) with thin hairline rows, and each row is two lines,
     name ................................ Edit  Remove
     Shelf life 3 days  [Display Chiller] [+ More Stations]
   New / Renamed rows keep their own framed card, so they still stand out.
   Not while the Edit pop-up is open: [data-edit-popup] keeps its own look. */
#mcx-settings-view .settings-rows{display:flex; flex-direction:column; gap:6px;}
#mcx-settings-view .settings-rows:not(:has(> [data-frame])){
  gap:0; background:var(--surface-card); border:1px solid var(--line); border-radius:12px;
}
#mcx-settings-view .settings-rows:not(:has(> [data-frame])) > .position-card:not([data-edit-popup]){
  background:transparent; border:0; border-radius:0; box-shadow:none;
}
#mcx-settings-view .settings-rows:not(:has(> [data-frame])) > .position-card + .position-card{border-top:1px solid var(--line);}
#mcx-settings-view .position-card:not([data-edit-popup]):not(.editing){
  display:grid; grid-template-columns:minmax(0, 1fr) auto; column-gap:12px; row-gap:6px;
  padding:10px 14px; min-height:0;
}
#mcx-settings-view .position-card:not([data-edit-popup]):not(.editing) > *{grid-column:1 / -1;}
#mcx-settings-view .position-card:not([data-edit-popup]):not(.editing) > .settings-item-name{
  grid-column:1; grid-row:1; align-self:center; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
#mcx-settings-view .position-card:not([data-edit-popup]):not(.editing) > .item-manage{grid-column:2; grid-row:1; margin:0; align-self:center;}
#mcx-settings-view .position-card:not([data-edit-popup]):not(.editing) > .settings-save-tag:not(.visible){display:none;}
#mcx-settings-view .position-card .position-stack{margin-top:0; gap:5px; align-items:center;}
#mcx-settings-view .position-card .position-stack .item-days-tag{margin:0 4px 0 0;}
#mcx-settings-view .position-card .position-chip,
#mcx-settings-view .position-card .position-add{min-height:26px; padding:3px 11px; font-size:calc(11.5px * var(--text-scale));}
.removed-hint{margin:6px 0 0; font-size:calc(11px * var(--text-scale)); color:var(--ink-faint);}

/* Edit (OM/OL) and Remove (everyone) under the item name. Text buttons, not
   filled ones, so 159 cards of them don't outweigh the station chips beside
   them. Hidden for staff on an item with no station left (nothing to remove). */
.item-manage{display:flex; gap:14px; margin-top:6px;}
.item-manage[hidden]{display:none;}

/* Remove's pop-up (2026-11-15): a bottom sheet, where a thumb already is,
   above the Save bar and tab bar but under the tutorial's coach marks
   (coach.css, 9000+), so a practice step can point into it. */
.remove-backdrop{position:fixed; inset:0; z-index:300; background:rgba(4,8,28,0.4);}
.remove-sheet{
  position:fixed; left:0; right:0; bottom:0; z-index:301;
  max-width:520px; margin:0 auto; padding:14px 16px calc(16px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column; gap:8px;
  background:var(--surface-card); border-radius:20px 20px 0 0;
  box-shadow:0 -12px 32px rgba(22,39,122,0.22);
  animation:removeSheetUp .18s var(--ease-out);
}
.remove-backdrop[hidden], .remove-sheet[hidden]{display:none;}
@keyframes removeSheetUp{from{transform:translateY(24px); opacity:0;} to{transform:none; opacity:1;}}
/* Closing (2026-11-15): it used to vanish. Back down the way it came,
   in 150 ms against the 180 ms entrance; mcx-checklist.js adds
   .closing and hides it when this ends. */
@keyframes removeSheetDown{to{transform:translateY(24px); opacity:0;}}
.remove-sheet.closing{animation:removeSheetDown .15s var(--ease-exit) forwards;}
.remove-backdrop.closing{animation:fadeOut .15s var(--ease-exit) forwards;}
@keyframes fadeOut{to{opacity:0;}}
@media (prefers-reduced-motion: reduce){.remove-sheet, .remove-sheet.closing, .remove-backdrop.closing{animation:none;}}
.remove-sheet-head{display:flex; flex-direction:column; gap:2px; padding:2px 4px 6px;}
.remove-sheet-kicker{font-size:calc(11px * var(--text-scale)); font-weight:800; letter-spacing:0.06em; text-transform:uppercase; color:var(--ink-faint);}
.remove-sheet-title{font-size:calc(16px * var(--text-scale)); font-weight:800; color:var(--ink);}
.remove-option{
  display:flex; flex-direction:column; align-items:flex-start; gap:3px; text-align:left;
  min-height:56px; padding:11px 14px; border-radius:14px; cursor:pointer; font-family:inherit;
  background:var(--surface-tint); color:var(--navy); border:1.5px solid transparent;
}
.remove-option-name{font-size:calc(14px * var(--text-scale)); font-weight:800;}
.remove-option-help{font-size:calc(11.5px * var(--text-scale)); font-weight:600; color:var(--ink-soft);}
.remove-option.danger{color:var(--under); border-color:rgba(200,40,40,0.25);}
.remove-option:disabled{opacity:0.5; cursor:default;}
.remove-option:focus-visible, .remove-sheet-cancel:focus-visible{outline:2px solid var(--blue); outline-offset:2px;}
.remove-sheet-cancel{
  min-height:48px; margin-top:2px; border:none; border-radius:14px; cursor:pointer; font-family:inherit;
  background:none; color:var(--ink-soft); font-size:calc(14px * var(--text-scale)); font-weight:700;
}
.item-manage-btn{
  padding:0; border:none; background:none; cursor:pointer; font-family:inherit;
  font-size:calc(11.5px * var(--text-scale)); font-weight:700; color:var(--blue);
}
.item-manage-btn.danger{color:var(--under);}
/* Edit as a pencil (2026-11-19), drawn like Store Audit's: no box, grey,
   the same line weight, a 32px tap area. */
.item-manage-btn.item-edit-pencil{display:inline-flex; align-items:center; justify-content:center; width:32px; height:28px; color:var(--ink-faint);}
.item-manage-btn.item-edit-pencil svg{width:19px; height:19px;}
.item-manage{align-items:center;}
.item-manage-btn.confirm{padding:2px 8px; border-radius:999px; background:var(--status-soon); color:#fff;}
/* The item's days line, and the in-card Days editor (2026-10-29). */
.item-days-tag{
  display:flex; align-items:center; gap:6px; margin-top:4px;
  font-size:calc(11px * var(--text-scale)); font-weight:600; color:var(--ink-faint);
}
.item-days-eod{
  padding:1px 7px; border-radius:999px; background:var(--status-soon); color:#fff;
  font-size:calc(10px * var(--text-scale)); font-weight:800; letter-spacing:0.04em;
}
/* Edit (2026-11-02): name, EOD and both day counts in one panel, replacing
   the separate Rename row and Days editor. The card's own name, days line and
   Edit/Remove buttons step aside while it is open, since the panel shows the
   same things as fields.

   The two day counts share a row only when each gets ~150px. Inside a
   card on a phone the panel is narrow (the station column takes the right
   side), "Opened Shelf Life" wrapped to two lines beside a one-line "Alert
   Days", and the two boxes sat at different heights (the user, 2026-11-02).
   auto-fit stacks them there instead, with no breakpoint to keep in step
   with the card width; align-items:end keeps the boxes level whenever they
   do share a row and one label wraps. */
.item-edit{display:none; flex-direction:column; gap:10px;}
.position-card.editing .item-edit{display:flex;}
.position-card.editing .item-manage,
.position-card.editing .item-days-tag,
.position-card.editing .settings-item-name{display:none;}
.item-days-eod-row{min-height:40px; padding:6px 10px;}
.position-card.days-is-eod .item-days-eod-row{border-color:var(--status-soon);}
.item-days-actions{display:flex; gap:14px;}

/* Print cart: double-tapping an item's expiry ribbon adds it here instead
   of printing immediately — a single barista tapping through a long
   checklist could otherwise fire off one print/API call per item, which
   doesn't scale. The cart batches every add into one deliberate "Print
   Cart" action. Sits frozen in .sheet-bottom next to Update Checklist
   (not a floating FAB) so it's pinned the same way; always rendered at a
   fixed size so the badge count changing doesn't reflow Update Checklist
   next to it. */
/* 6px, the inner step — the two buttons sit inside the bar the way tiles
   sit inside a frozen row, so they get the inner gap rather than the 8px
   the bar itself is padded with. */
.sheet-bottom-row{display:flex; gap:6px; align-items:stretch;}
.sheet-bottom-row .btn-submit{width:auto; flex:1;}

.print-cart-btn{
  position:relative; flex:none; width:52px; border-radius:14px; border:none; color:#fff; display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:background-color .18s ease;
}
.print-cart-btn:hover{background:var(--blue);}
.print-cart-btn svg{width:22px; height:22px;}
.print-cart-badge{
  position:absolute; top:-6px; right:-6px; min-width:20px; height:20px; padding:0 5px;
  border-radius:999px; background:var(--status-notchecked-ink); color:#fff;
  font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center;
  border:2px solid var(--surface);
}
/* Every EOD item needs a fresh label printed daily regardless — this adds
   all of them to the cart in one tap instead of hunting each one down and
   double-tapping its ribbon individually. Sits above the cart list so
   it's the first thing visible when the panel opens. */
.cart-add-eod-btn{
  margin:12px 20px 0; padding:10px; border-radius:10px; border:1.5px dashed var(--status-soon);
  background:var(--status-soon-bg); color:var(--status-soon-ink); font-family:inherit;
  font-size:calc(12.5px * var(--text-scale)); font-weight:700; cursor:pointer;
}
.cart-add-eod-btn:active{background:var(--status-soon);color:#fff;}
.cart-item-list{padding:6px 20px; display:flex; flex-direction:column; gap:6px;}
/* Same border-card language as the checklist's own item cards on both
   edges: left cancels the whole entry; right is a single grouped unit
   (.cart-qty-group) — the count as its own bordered card sitting flush
   against the +/− ribbon, rather than floating separately up by the item
   name. */
.cart-item-row{
  position:relative; overflow:hidden;
  padding:9px 62px 9px 30px; border-radius:12px; background:var(--surface-card); border:1px solid var(--line);
}
.cart-cancel-ribbon{
  position:absolute; top:0; left:0; bottom:0; width:22px;
  display:flex; align-items:center; justify-content:center;
  background:var(--status-expired); color:#fff; border:none; padding:0; font-family:inherit;
  font-size:calc(8px * var(--text-scale)); font-weight:800; text-transform:uppercase; letter-spacing:0.03em;
  writing-mode:vertical-rl; transform:rotate(180deg); cursor:pointer;
  transition:background-color .15s ease;
}
/* Armed (first tap) state — amber "tap again to confirm," same language
   as every other confirm action in this app, overriding the red. */
.cart-cancel-ribbon.confirm{background:var(--status-soon);}
.cart-qty-group{
  position:absolute; top:0; right:0; bottom:0; width:62px;
  display:flex; align-items:stretch; background:var(--surface-tint);
}
/* Independent quantity card — directly typeable, so printing 20 Curry
   Puffs doesn't mean tapping + twenty times. Sits flush against the +/−
   ribbon as one combined edge unit. */
.cart-qty-box{
  flex:0 0 36px; width:36px; text-align:center; padding:0;
  font-size:calc(15px * var(--text-scale)); font-weight:800; color:var(--ink); font-family:inherit;
  font-variant-numeric:tabular-nums; border:none; border-right:1px solid var(--line);
  background:var(--surface-card); -moz-appearance:textfield;
}
.cart-qty-box::-webkit-outer-spin-button, .cart-qty-box::-webkit-inner-spin-button{-webkit-appearance:none; margin:0;}
.cart-qty-box:focus{outline:none; background:var(--line);}
.cart-qty-ribbon{flex:1; display:flex; flex-direction:column;}
/* Font size matches the left Cancel ribbon's label (8px) for consistency
   — the button's own flex-filled box stays the real tap target, this is
   just glyph size. Green +/red − so the direction reads at a glance,
   same increase/decrease colors as the rest of the app's status palette. */
.cart-qty-btn{
  flex:1; border:none; background:transparent; font-family:inherit;
  font-size:calc(8px * var(--text-scale)); font-weight:800; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.cart-qty-btn.plus{color:var(--status-ok);}
.cart-qty-btn.minus{color:var(--status-expired);}
.cart-qty-btn:active{background:var(--line);}
.cart-qty-btn:first-child{border-bottom:1px solid var(--line);}
.cart-item-row-top{margin-bottom:6px;}
.cart-item-name{font-size:calc(13.5px * var(--text-scale)); font-weight:700; color:var(--ink); font-family:inherit;}
.cart-item-tcx{display:flex; flex-direction:column; gap:2px; font-size:calc(11.5px * var(--text-scale)); color:var(--ink-soft);}
.cart-item-tcx b{color:var(--ink-faint); margin-right:3px;}
.cart-empty-note{margin:16px 20px 24px; font-size:calc(12.5px * var(--text-scale)); color:var(--ink-faint); text-align:center;}
.cart-mock-note{margin:8px 20px 20px; font-size:calc(11px * var(--text-scale)); color:var(--ink-faint); text-align:center;}
.cart-panel-footer{position:sticky; bottom:0; padding:var(--frozen-bar-pad); border-top:1px solid var(--line); background:var(--surface);}
/* margin-top belongs on .visible, not here: with it on the base rule the
   hidden status line still contributed 8px even at height:0, making this
   footer 8px taller than .sheet-bottom despite sharing --frozen-bar-pad.
   Same trap as #batch-status.collapsed further up, which zeroes its own
   margin for exactly this reason. */
.cart-print-status{
  text-align:center; font-size:calc(12px * var(--text-scale)); font-weight:700; color:var(--status-ok-ink);
  margin-top:0; height:0; opacity:0; overflow:hidden; transition:opacity .2s ease;
}
.cart-print-status.visible{height:auto; opacity:1; margin-top:6px;}

/* ------------------------------------------------------------------
   Depth pass, v2. v1 put a gloss gradient on every colored surface
   (tiles, ribbons) as well as neutral ones (cards, inputs, tabs) — with
   4-8 different status colors visible on screen at once, that many
   competing shines read as cluttered/dated rather than "3D" (this is
   the classic reason flat design displaced skeuomorphism for anything
   information-dense: gloss on ONE hero button looks premium, gloss on
   a wall of different-colored status chips just fights itself).

   Fix: depth stays ONLY on neutral surfaces, where there's no color to
   clash with — card backgrounds, number inputs, the tab track. Every
   colored surface (frozen tiles, both ribbons) goes back to flat solid
   color, zero gradient, so a barista scanning statuses reads color
   only, not color-plus-shine. Tiles keep a plain (non-gradient)
   elevation shadow since they're still tappable buttons sitting on the
   page; the ribbons are thin accents already embedded inside an
   elevated card, so they get no shadow of their own — same as before
   this pass ever started. Pressed/filtering state on a tile now just
   drops its shadow (flush against the page) instead of an inset gloss.
   ------------------------------------------------------------------ */

/* One row rhythm for every outlet-facing list — Markout's checklist, Store
   Auditing's checklist, STA's count sheet, Stock Receiving's scan list.
   They had drifted to three different heights (13px base, 9px on
   .has-availability, and a Markout-only override), which read as three
   different apps when a barista moved between them in one shift.

   8.5/9 rather than a round number: the 0.5px extra underneath is a
   deliberate optical nudge, not a rounding artefact. The genuine off-centre
   bug was a phantom flex gap below .save-status, fixed at .swipe-surface
   above; this sits on top of that. Half-pixels are fine at the DPR of any
   phone or tablet this runs on.

   .position-card is excluded: it is a settings card with a min-height of
   132px and stacked position chips, not a list row, so this rhythm has
   nothing to say about it. */
.sheet-page .item-card:not(.position-card){padding-top:8.5px; padding-bottom:9px;}

.sheet-page .item-card{
  background:linear-gradient(180deg, #ffffff 0%, var(--surface-card) 65%);
  border-color:rgba(22,39,122,0.07);
  /* Deliberately understated: the cards are the page's background texture,
     not something to draw the eye, so the two cast layers stay well under
     the frozen tiles' elevation. The inset top highlight does most of the
     work of separating a card from the page. */
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -10px 14px -12px rgba(16,24,40,0.07) inset,
    0 8px 14px -10px rgba(16,24,40,0.14),
    0 2px 4px -2px rgba(16,24,40,0.08);
  transition:transform .12s ease, box-shadow .12s ease;
  -webkit-tap-highlight-color:transparent;
}
/* Excluded on the Markout Checklist: tapping a card there already arms the
   open gesture, which fades in the "Open?" pill and blurs the card behind
   it — a press bump on top of that just read as bumpy. STA's count sheet
   keeps it, since its cards have no tap gesture of their own and this is
   their only press feedback.

   MCX's Settings view is listed explicitly: it shares the checklist's
   document and therefore its .mcx-checklist-page body class, but its
   position cards have no open gesture of their own, so they want the bump
   for the same reason STA's do. */
body:not(.mcx-checklist-page) .sheet-page .item-card:active,
#mcx-settings-view .item-card:active{
  transform:translateY(1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 2px 5px -3px rgba(16,24,40,0.12);
}

/* MCX Checklist/Settings view switching. Both views are rendered into the
   same document and one is hidden, so moving between them is this class
   flip — no navigation, no second data fetch, and instant however many times
   it happens. display:none rather than visibility/opacity so the hidden
   view's own .sheet-bottom bar (each view has one) stops taking up space and
   stops intercepting taps meant for the visible view's bar. */
.mcx-view{display:none;}
body[data-view="checklist"] #mcx-checklist-view,
body[data-view="settings"] #mcx-settings-view{display:block;}

/* Markout Checklist "Needs Attention" — desktop only (2026-11-02). Expired,
   Expiring Soon and Missing Date each listed in full, in three columns, with
   the Markout list last on the right (the user's layout). The columns are
   one fixed block, each scrolling on its own, so all three stay on screen
   however far the long list is scrolled; the list keeps its 520px phone
   width, so it looks the same as on the barista's phone.

   1200px is where three columns of at least ~200px fit beside the list.
   Narrower, the panel is hidden and the page is the phone layout, where the
   tiles' filter does this job. --mcx-edge is the space either side of the
   whole arrangement, capped so a very wide monitor doesn't stretch the
   columns into long empty lines.

   The list is placed from the right (margin-right) and the columns from
   the left and right edges, all against the same viewport, so the 20px gap
   between them holds whether or not a scrollbar is showing. */
.attention-panel{display:none;}
.desktop-brandbar{display:none;}
@media (min-width:1200px){
  body.mcx-checklist-page[data-view="checklist"]{
    --mcx-edge:max(16px, calc((100vw - 1720px) / 2));
    --mcx-brandbar-h:60px;
  }
  /* The brand bar is fixed, so everything else starts below it: the page
     gets its height as top padding, the pinned tiles stick under it rather
     than at 0, and the columns' top edge lines up with the checklist's own
     header (the bar plus .sheet-header's 20px). */
  body.mcx-checklist-page[data-view="checklist"] .desktop-brandbar{
    display:flex; align-items:center; justify-content:space-between; gap:24px;
    position:fixed; top:0; left:0; right:0; z-index:8; height:var(--mcx-brandbar-h);
    padding:0 var(--mcx-edge); background:var(--surface-card); border-bottom:1px solid var(--line);
  }
  body.mcx-checklist-page[data-view="checklist"] .sheet-page{padding-top:var(--mcx-brandbar-h);}
  body.mcx-checklist-page[data-view="checklist"] .frozen-summaries{top:var(--mcx-brandbar-h);}
  body.mcx-checklist-page[data-view="checklist"] .attention-panel{top:calc(var(--mcx-brandbar-h) + 20px);}
  body.mcx-checklist-page[data-view="checklist"] .sheet-page{margin-left:auto; margin-right:var(--mcx-edge);}
  body.mcx-checklist-page[data-view="checklist"] #mcx-checklist-view .sheet-bottom{
    left:auto; right:var(--mcx-edge); width:520px; margin:0;
  }
  .attention-panel{
    display:flex; flex-direction:column; gap:16px;
    position:fixed; z-index:6; top:16px; bottom:16px;
    left:var(--mcx-edge); right:calc(var(--mcx-edge) + 520px + 20px);
  }
}
.attention-columns{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; flex:1; min-height:0;}

/* Quick tips card above the three lists. Every tip sits in the same grid
   cell, so the card is always as tall as the longest one and the lists
   below never jump when a short tip replaces a long one. */
.attention-tips{
  display:flex; align-items:center; gap:24px; padding:16px 20px; border-radius:16px;
}
.attention-tip-stack{flex:1; min-width:0; display:grid;}
.attention-tip{
  grid-area:1 / 1; display:flex; align-items:flex-start; gap:16px;
  opacity:0; visibility:hidden; transition:opacity .4s ease, visibility 0s linear .4s;
}
.attention-tip.active{opacity:1; visibility:visible; transition:opacity .4s ease;}
.attention-tip-icon{
  flex:none; width:40px; height:40px; border-radius:12px; display:grid; place-items:center;
}
.attention-tip-icon svg{width:20px; height:20px;}
.attention-tip-text{min-width:0;}
.attention-tip-label{
  display:block; font-size:calc(11px * var(--text-scale)); font-weight:500;
  letter-spacing:0.08em; text-transform:uppercase;
}
.attention-tip-title{margin:2px 0 0; font-size:calc(16px * var(--text-scale)); font-weight:600; line-height:1.3;}
.attention-tip-body{margin:4px 0 0; max-width:96ch; font-size:calc(13px * var(--text-scale)); line-height:1.45;}
.attention-tip-dots{flex:none; display:flex; align-items:center; gap:4px;}
/* 8px dots with a 16px hit area: the padding is clicked, the content box is
   what's painted. The current tip's dot stretches into a short navy bar. */
.attention-tip-dot{
  width:16px; height:16px; padding:4px; border:none; border-radius:999px; cursor:pointer;
  background:var(--ink-faint); background-clip:content-box;
  transition:width .2s ease, opacity .2s ease;
}
.attention-tip-dot:hover{opacity:.6;}
.attention-tip-dot.active{width:26px;}
.attention-tip-dot:focus-visible{outline:2px solid var(--navy); outline-offset:1px;}
@media (prefers-reduced-motion: reduce){
  .attention-tip, .attention-tip.active, .attention-tip-dot{transition:none;}
}
/* Quiet on purpose (the user's "vibe code" note, 2026-11-02): the first
   version boxed every row in its status tint with a thick coloured edge,
   pill badges and accent bars, and it read as generated. The design system
   asks for hairlines before shadows, grouped sections instead of borders on
   every row, and weights no heavier than 600 outside headings. Status colour
   is now only the dot, the count and the day headings. */
.attention-group{
  display:flex; flex-direction:column; min-height:0;
  background:var(--surface-card); border-radius:16px;
  overflow:hidden;
}
.attention-group.expired{--attention-ink:var(--status-expired); --attention-dot:var(--status-expired);}
.attention-group.expiring-soon{--attention-ink:var(--status-soon-ink); --attention-dot:var(--status-soon);}
.attention-group.not-yet-checked{--attention-ink:var(--ink-soft); --attention-dot:var(--status-notchecked-ink);}
.attention-group-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:16px 16px 12px;
}
.attention-group-title{
  display:flex; align-items:center; gap:8px; margin:0;
  font-size:calc(16px * var(--text-scale)); font-weight:600; line-height:1.3;
}
.attention-dot{ border-radius:50%; background:var(--attention-dot); flex:none;}
.attention-group-sub{margin:4px 0 0 16px; font-size:calc(11px * var(--text-scale)); font-weight:500;}
.attention-count{
  flex:none; font-size:calc(22px * var(--text-scale)); font-weight:600; line-height:1.1; font-variant-numeric:tabular-nums;
}
.attention-list{list-style:none; margin:0; padding:0 8px 12px; flex:1; min-height:0; overflow-y:auto;}
.attention-group.empty .attention-list{display:none;}
/* Day (or station) heading. Sticky inside its column, so a long day still
   says which day it is after its first rows have scrolled away. */
.attention-day-head{
  position:sticky; top:0; z-index:1;
  display:flex; justify-content:space-between; gap:8px;
  padding:12px 8px 4px; background:var(--surface-card);
  font-size:calc(11px * var(--text-scale)); font-weight:500; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--attention-ink);
}
.attention-day-count{color:var(--ink-faint); font-variant-numeric:tabular-nums; letter-spacing:0;}
.attention-rows{list-style:none; margin:0; padding:0;}
/* Missing Date's list has no day heading above it; this stands in for the
   heading's top padding so its first row doesn't touch the column header. */
.attention-rows:first-child{padding-top:8px;}
.attention-item{
  width:100%; display:flex; flex-direction:column; padding:8px; border:none; border-radius:8px;
  background:none; font:inherit; color:var(--ink); text-align:left; cursor:pointer;
  transition:background-color .15s ease;
}
.attention-item:hover{background:var(--surface-tint);}
.attention-item:focus-visible{outline:2px solid var(--navy); outline-offset:-2px;}
.attention-item-name{font-size:calc(13px * var(--text-scale)); font-weight:500; line-height:1.3; overflow-wrap:anywhere;}
.attention-item-meta{font-size:calc(11px * var(--text-scale)); font-weight:500; color:var(--ink-faint); line-height:1.45;}
.attention-empty{
  display:none; margin:0; padding:32px 16px; text-align:center;
  font-size:calc(13px * var(--text-scale)); color:var(--ink-faint);
}
.attention-group.empty .attention-empty{display:block;}
/* The card a panel click jumped to, ringed in navy for a moment so the eye
   lands on the right one among its neighbours. */
.item-card.attention-flash{animation:attentionFlash 1.8s ease;}
@keyframes attentionFlash{
  0%, 45%{box-shadow:0 0 0 3px var(--navy);}
  100%{box-shadow:0 0 0 3px transparent;}
}
@media (prefers-reduced-motion: reduce){
  .item-card.attention-flash{animation:none; box-shadow:0 0 0 3px var(--navy);}
}

/* Inputs stay recessed regardless of state — the colored border already
   carries the over/under/match signal, the well just needs to read as
   "this is where you type," consistently. */
.sheet-page .unit-box-input{
  background-color:var(--surface-page);
  box-shadow:0 1px 3px rgba(16,24,40,0.08) inset, 0 -1px 0 rgba(255,255,255,0.7);
}
.sheet-page .unit-box-input.state-low{box-shadow:0 1px 3px rgba(208,59,59,0.20) inset, 0 -1px 0 rgba(255,255,255,0.5);}
.sheet-page .unit-box-input.state-counted{box-shadow:0 1px 3px rgba(34,52,136,0.22) inset, 0 -1px 0 rgba(255,255,255,0.5);}

/* Bar/Store swap: the track reads recessed, the active tab pops raised
   off it — both neutral surfaces, no color involved. */
.sheet-page .tabs{box-shadow:0 1px 3px rgba(16,24,40,0.12) inset, 0 -1px 0 rgba(255,255,255,0.6) inset;}
.sheet-page .tab-link.active{
  background:linear-gradient(180deg, #ffffff 0%, var(--surface-card) 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 4px 8px -4px rgba(16,24,40,0.25),
    0 1px 2px rgba(16,24,40,0.10);
  -webkit-tap-highlight-color:transparent;
}

/* Frozen tiles (STA's sta-* and MCX's expired/expiring-soon/not-yet-
   checked/out-of-stock) — flat solid color (unchanged from the color
   rules above/elsewhere), just a plain elevation shadow, no gradient.
   Filtering an active tile drops the drop shadow instead of gaining a dark
   overlay — reads as pressed flush against the page — but keeps the white
   inset ring from the .filtering rules above. Clearing box-shadow outright
   here used to wipe that ring too, which left dimming the other tiles as
   the only sign a filter was on. */
.status-tile.sta-not-counted, .status-tile.sta-counted, .status-tile.sta-low,
.status-tile.expired, .status-tile.expiring-soon, .status-tile.not-yet-checked, .status-tile.out-of-stock{
  box-shadow:0 6px 12px -8px rgba(16,24,40,0.35), 0 2px 4px rgba(16,24,40,0.15);
  -webkit-tap-highlight-color:transparent;
}

/* Fires once whenever a tile's count actually changes (see setTileCount
   in checklist.html/sheet.html) — a quick scale bump so a live-updating
   number gets noticed, not just silently different next time you look.
   Keeps the .count rule's own translateY(2px) at both ends so it doesn't
   visibly jump when the animation starts/stops. */
@keyframes countPulse{
  0%{transform:translateY(2px) scale(1);}
  45%{transform:translateY(2px) scale(1.15);}
  100%{transform:translateY(2px) scale(1);}
}
.count.count-pulse{animation:countPulse .32s ease;}

/* Loop for .status-tile.alert-pulse above — smoothly crossfades the tile's
   background from the standard blue to its own --alert-color (red for
   Expired, yellow for Expiring Soon, grey for Missing Date/OOS) and back,
   for as long as its count stays >= 1. Percentages are fractions of the 16s
   animation duration: 0%-18.75% is the 3s change to --alert-color, that
   holds until 50% (5s), 50%-68.75% is the 3s change back to blue, that
   holds until 100% (5s). */
@keyframes stationNoteIn{
  0%{opacity:0;}
  18.75%{opacity:1;}
  50%{opacity:1;}
  68.75%{opacity:0;}
  100%{opacity:0;}
}
@keyframes stationNoteOut{
  0%{opacity:1;}
  18.75%{opacity:0;}
  50%{opacity:0;}
  68.75%{opacity:1;}
  100%{opacity:1;}
}
@keyframes statusAlertPulse{
  0%{background:var(--blue);}
  18.75%{background:var(--alert-color);}
  50%{background:var(--alert-color);}
  68.75%{background:var(--blue);}
  100%{background:var(--blue);}
}

/* ================= SCAN AN ITEM (Store Auditing checklist) =================
   The card above the item list where a scanned barcode either jumps to that
   item's batch cards or, for a code nobody has registered, opens the register
   form (see apps/sea/templates/checklist.html). Styled as its own
   surface rather than reusing .item-card: it isn't an item, and it must not
   be caught by the search filter or the status-tile filter that both operate
   on .item-card. */
.scan-card{
  margin:12px 20px 0; padding:12px 14px; border-radius:14px;
  background:var(--surface-card); border:1.5px solid var(--line);
  box-shadow:var(--shadow-card); display:flex; flex-direction:column; gap:9px;
}
.scan-card-head{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.scan-card-name{font-size:calc(13.5px * var(--text-scale)); font-weight:800; color:var(--ink); line-height:1.2;}
.scan-card-sub{font-size:calc(11px * var(--text-scale)); color:var(--ink-faint); margin-top:2px;}
.scan-camera-btn{
  flex:none; padding:9px 16px; border-radius:11px; border:none; color:#fff; font-size:calc(13px * var(--text-scale)); font-weight:700; cursor:pointer;
}
.scan-camera-btn:active{transform:scale(.96);}
/* Pinned variant: Store Auditing puts Scan in .sheet-bottom next to Update
   Store Audit, the same way MCX pins its print-cart button there — the scan
   card sits above a long checklist, so an in-card button scrolls out of reach
   exactly when staff are deep in the list working through boxes. Radius and
   full-height padding match the .btn-submit it sits beside; .sheet-bottom-row
   already stretches it to that height. */
.sheet-bottom-row .scan-camera-btn{border-radius:14px; padding:0 18px;}
.scan-camera-wrap{display:none;}
.scan-camera-wrap.visible{display:block;}
.scan-camera-wrap video{width:100%; border-radius:10px;}
.scan-camera-cancel{
  margin-top:6px; background:none; border:none; color:var(--ink-faint);
  font-size:calc(12px * var(--text-scale)); cursor:pointer;
}
.scan-code-input{
  width:100%; padding:10px 12px; border-radius:12px; border:1.5px solid var(--line);
  background:var(--surface-card); color:var(--ink); font-size:calc(13.5px * var(--text-scale)); font-family:inherit;
}
.scan-code-input:focus{border-color:var(--blue); outline:none; box-shadow:0 0 0 3px rgba(40,60,157,0.12);}
/* Register form: only shown for a code nobody has named yet. Tinted so it
   reads as a step the scan led to, not another permanent part of the card. */
.scan-register{
  display:none; flex-direction:column; gap:8px;
  padding:11px 12px; border-radius:12px; background:var(--surface-tint);
}
.scan-register.visible{display:flex;}
.scan-register-title{font-size:calc(13px * var(--text-scale)); font-weight:800; color:var(--navy);}
.scan-register-code{font-weight:600; color:var(--ink-soft); font-variant-numeric:tabular-nums; word-break:break-all;}
.scan-register-sub{font-size:calc(11.5px * var(--text-scale)); line-height:1.45; color:var(--ink-faint);}
.scan-register-actions{display:flex; justify-content:flex-end; align-items:center; gap:12px;}
.scan-register-cancel{
  background:none; border:none; color:var(--ink-faint);
  font-size:calc(12.5px * var(--text-scale)); font-weight:600; cursor:pointer; padding:6px 4px;
}
.scan-register .scan-camera-btn:disabled{opacity:.55;}
.scan-note{display:none; font-size:calc(11.5px * var(--text-scale)); line-height:1.45; color:var(--ink-faint);}
.scan-note.visible{display:block;}
.scan-note.warn{color:var(--status-soon-ink);}
.scan-note.ok{color:var(--status-ok-ink); font-weight:600;}
/* Camera scanning is a hard requirement in the shop, and its failures used
   to surface as 11.5px grey text nobody reads — which is exactly why a
   TLS-less server could break scanning for weeks without a single report.
   When the cause is something the staff member can actually fix (wrong
   URL, blocked permission, camera busy), it gets a real banner instead:
   full width, readable, and coloured like the rest of the app's trouble
   states. .scan-note.warn stays the quiet style for genuinely minor notes. */
.scan-note.alert{
  display:block; font-size:calc(13px * var(--text-scale)); font-weight:600; line-height:1.45;
  color:var(--status-expired); background:var(--status-expired-bg);
  border:1px solid var(--status-expired); border-radius:10px;
  padding:10px 12px; margin-top:8px;
}
/* Not the staff member's fault and not fixable on the spot (wrong browser,
   no camera hardware) — still visible, but amber rather than alarming. */
.scan-note.alert.soft{
  color:var(--status-soon-ink); background:var(--status-soon-bg); border-color:var(--status-soon);
}

/* ---- Rack scan (Stock Take) ---------------------------------------------
   Reading a whole shelf at once. The shutter sits inside the camera frame
   rather than under it: the staff member is looking at the video while
   lining the shelf up, and a control below the picture is a control they
   have to look away to find. */
.scan-rack-shoot{
  display:none; width:100%; margin-top:8px; padding:12px 16px;
  border:none; border-radius:12px; color:#fff; font-size:calc(14px * var(--text-scale)); font-weight:800; cursor:pointer;
}
.scan-rack-shoot:disabled{opacity:.55;}
.scan-rack-shoot:active{transform:scale(.98);}
/* Second button on the bottom row, so it reads as the alternative to Scan
   rather than a competitor to Submit — outlined against Scan's solid navy. */
.sheet-bottom-row .scan-rack-btn{
  background:var(--surface-card); color:var(--navy);
  box-shadow:inset 0 0 0 1.5px var(--navy);
}

/* The review panel. Everything the photo found, offered rather than applied
   — see the comment on #sta-rack-result in sheet.html for why a silent fill
   would have been the wrong call. */
.rack-result{
  margin-top:10px; padding:12px; border-radius:14px;
  background:var(--surface-card); border:1px solid var(--line);
}
.rack-result-head{display:flex; align-items:center; justify-content:space-between; gap:8px;}
.rack-result-title{font-size:calc(13.5px * var(--text-scale)); font-weight:800; color:var(--navy);}
.rack-result-close{
  flex:none; background:none; border:none; color:var(--ink-faint);
  font-size:calc(20px * var(--text-scale)); line-height:1; cursor:pointer; padding:0 4px;
}
.rack-result-note{
  margin:6px 0 10px; font-size:calc(11.5px * var(--text-scale)); line-height:1.45; color:var(--ink-faint);
}
.rack-result-rows{display:flex; flex-direction:column; gap:2px;}
.rack-row{display:flex; align-items:center; gap:10px; padding:8px 6px; border-radius:9px;}
.rack-row + .rack-row{border-top:1px solid var(--line);}
/* The position number is the whole point of this list, so it is a fixed-width
   chip rather than inline text — the digits line up down the left edge and the
   order reads as an order at a glance, which is what someone is checking
   against the shelf in front of them. */
.rack-row-pos{
  flex:none; width:24px; height:24px; border-radius:7px;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface-tint); color:var(--navy);
  font-size:calc(11.5px * var(--text-scale)); font-weight:800; font-variant-numeric:tabular-nums;
}
.rack-row-name{font-size:calc(13px * var(--text-scale)); font-weight:700; color:var(--ink); line-height:1.25; min-width:0;}
.rack-result-misses{margin-top:8px; display:flex; flex-direction:column; gap:4px;}
.rack-miss{margin:0; font-size:calc(11px * var(--text-scale)); line-height:1.45; color:var(--ink-faint);}
/* Capture-next and Save side by side: mapping a rack is normally several bays,
   so carrying on is at least as likely as finishing and neither should be the
   one you have to hunt for. Save is the filled one because it is the end of
   the job. */
.rack-result-actions{display:flex; gap:8px; margin-top:12px;}
.rack-result-more, .rack-result-apply{
  flex:1; padding:12px 10px; border-radius:12px; border:none;
  font-size:calc(13.5px * var(--text-scale)); font-weight:800; cursor:pointer;
}
.rack-result-more{
  background:var(--surface-card); color:var(--navy);
  box-shadow:inset 0 0 0 1.5px var(--navy);
}
.rack-result-apply{ color:#fff;}
.rack-result-more:active, .rack-result-apply:active{transform:scale(.98);}
.rack-result-apply:disabled{opacity:.55;}
/* Quiet, and last: starting over throws away every bay already walked, so it
   should never be the button a thumb finds by accident. */
.rack-result-reset{
  display:block; margin:8px auto 0; background:none; border:none;
  color:var(--ink-faint); font-size:calc(11.5px * var(--text-scale)); cursor:pointer;
}

/* Where did the date land? The applied card is usually below the fold, so it
   gets scrolled to and flashed — the tap happens up in the scan card, and
   without this the only feedback would be a line of text far from the change. */
.item-card.scan-flash{animation:scanFlash 1.4s ease;}
@keyframes scanFlash{
  0%{box-shadow:0 0 0 0 rgba(40,60,157,0.0);}
  15%{box-shadow:0 0 0 3px rgba(40,60,157,0.28);}
  70%{box-shadow:0 0 0 3px rgba(40,60,157,0.28);}
  100%{box-shadow:0 0 0 0 rgba(40,60,157,0.0);}
}

/* ============================================================
   Hub selection dial (home.html)

   The tool grid became a rotary dial in the bottom-right corner over
   full-bleed promo media. Geometry is driven by --dial-size alone: the
   radius, the marker and the corner overhang are all derived from it, so
   resizing the dial for a tablet is one number.

   The dial deliberately overhangs the corner. A circle fully on screen would
   either be small enough to be fiddly or large enough to cover the promo;
   overhanging keeps the ring big and thumb-sized while only spending the
   corner, and it reads as a physical control laid over the media.
   ============================================================ */
body.hub-body{
  /* Nothing on this screen scrolls: the stage is the viewport, and the dial
     is anchored to its corner. */
  min-height:100dvh; overflow:hidden;
}
/* The brand bar floats over the promo instead of sitting above it, so the
   video runs the full height of the screen and the bar becomes frosted glass
   over the top of it.

   A solid white bar, not glass. The frosted version was tried and read as
   milky over live video at every opacity that still kept the navy lockup
   legible — the logo's need for a pale field and the glass effect's need for
   transparency pull against each other, and the logo wins.

   Dropping backdrop-filter also drops the most expensive thing on this
   screen: blurring a moving video every frame, on a tablet, behind a dial
   being dragged.

   The video still runs full height underneath — the stage is the whole
   viewport and this bar simply sits on top of it. */
body.hub-body .home-topbar{
  position:fixed; top:0; left:0; right:0; z-index:20;
  background:#fff;
  border-bottom:1px solid var(--line);
}

/* The dial's card icons (2026-10-29, ZUS AutoStamp's style): every tool sits
   on a white disc like an app icon, because the icons are navy and gold and
   were drawn for white. The colours are the card-icon README's five, named
   once here and nowhere else. */
.card-icon{display:block;}
.card-icon .ic-navy{fill:#16277A;}
.card-icon .ic-navy2{fill:#283C9D;}
.card-icon .ic-gold{fill:#BE9E74;}
.card-icon .ic-goldlight{fill:#EFD9BB;}
.card-icon .ic-white{fill:#FFFFFF;}
.card-icon [class^="ic-line-"]{fill:none; stroke-linecap:round; stroke-linejoin:round;}
.card-icon .ic-line-white{stroke:#FFFFFF;}
.card-icon .ic-line-gold{stroke:#BE9E74;}
.card-icon .ic-line-navy{stroke:#16277A;}

/* ================= OUTLET PICKER =================
   Choose an Outlet / Set Up This Device (hub/templates/device_claim.html,
   shared/templates/_outlet_picker.html). Redesigned 2026-11-03.

   The card is the sign-in card, wider: names like "Binjai 8 Premium SOHO"
   fit on one line at 440px, and on a phone it still fills the screen inside
   the page's 20px gutter. */
/* min-width:0 is what lets the one-line name below take its ellipsis: a flex
   item won't shrink under its widest unbreakable line by default, so the
   card stretched past the screen's right edge to fit the whole name. */
.auth-card.auth-card-wide{max-width:440px; min-width:0; padding:28px 20px 24px; gap:16px;}
.auth-card-wide .auth-head{min-width:0;}
/* The ZUS mark at 88px (about 42px visible, see .auth-card .brand-mark): the
   sign-in screen's 128px is a welcome; here it only says where you are, and
   the list needs the height. */
.auth-head-compact .brand-mark{width:88px; height:88px; margin-bottom:2px;}
/* A long Lark name ("Mohamad Zulfaiz Bin Mohamad Rofi") on one line with an
   ellipsis, rather than wrapping the header into three lines. */
.auth-sub-one-line{max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.outlet-picker{width:100%; display:flex; flex-direction:column; gap:10px;}

/* The design system's search field: soft grey fill, no border, pill, a
   leading icon. A bordered box read as a form to fill in; this reads as
   "type to narrow the list". */
.outlet-search{
  display:flex; align-items:center; gap:10px; height:46px; padding:0 16px;
  border-radius:100px; background:var(--surface-tint); color:var(--ink-faint);
  border:1.5px solid transparent; transition:border-color .15s ease, box-shadow .15s ease;
}
.outlet-search:focus-within{border-color:var(--navy); box-shadow:0 0 0 3px rgba(34,52,136,0.08); background:var(--surface);}
.outlet-search svg{flex:none; width:18px; height:18px;}
.outlet-search input{
  flex:1; min-width:0; border:none; outline:none; background:none; padding:0;
  font:inherit; font-size:calc(14px * var(--text-scale)); color:var(--ink);
}
.outlet-search input::placeholder{color:var(--ink-faint); opacity:.8;}
.outlet-search input::-webkit-search-cancel-button{cursor:pointer;}

.outlet-count{margin:0 4px; font-size:calc(11px * var(--text-scale)); font-weight:500; color:var(--ink-faint);}

/* Rows separated by space, not a rule under every row (design system §9):
   each row is its own soft capsule, and only the picked one gets an edge. */
.outlet-list{
  width:100%; max-height:min(46vh, 420px); overflow-y:auto; overscroll-behavior:contain;
  display:flex; flex-direction:column; gap:4px; padding:2px;
  margin:0 -2px; width:calc(100% + 4px);
}
.outlet-option{
  position:relative; display:flex; align-items:center; gap:12px;
  padding:10px 12px 10px 14px; border-radius:14px; cursor:pointer;
  background:var(--surface); box-shadow:inset 0 0 0 1px var(--line);
  transition:background .12s ease, box-shadow .12s ease;
  text-align:left;
}
.outlet-option[hidden]{display:none;}
/* The radio stays in the page (keyboard and form validation need it) but out
   of sight — the whole row is the control, and the tick shows the choice. */
.outlet-option input{position:absolute; opacity:0; width:1px; height:1px; margin:0;}
.outlet-option:hover{background:var(--surface-tint);}
.outlet-option:active{transform:scale(.99);}
.outlet-option:has(input:checked){background:var(--surface-tint); box-shadow:inset 0 0 0 1.5px var(--navy);}
.outlet-option:has(input:focus-visible){outline:2px solid var(--blue); outline-offset:1px;}

.outlet-option-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px;}
.outlet-option-name{
  font-size:calc(14px * var(--text-scale)); font-weight:600; color:var(--ink); line-height:1.3;
  overflow-wrap:anywhere;
}
.outlet-option-code{
  font-size:calc(11.5px * var(--text-scale)); font-weight:500; color:var(--ink-faint);
  font-variant-numeric:tabular-nums; letter-spacing:.02em;
}
.outlet-option:has(input:checked) .outlet-option-name{color:var(--navy);}

/* The test outlet: cream "Test" tag, the design system's New colour, so it
   reads as "not a real shop" at a glance in a list of 1,100 real ones. */
.outlet-tag{
  flex:none; padding:3px 9px; border-radius:100px; background:var(--cream); color:var(--navy);
  font-size:calc(10px * var(--text-scale)); font-weight:700; letter-spacing:.04em; text-transform:uppercase;
}

/* An empty ring that fills navy with a white tick when the row is picked. */
.outlet-option-tick{
  flex:none; width:22px; height:22px; border-radius:50%;
  box-shadow:inset 0 0 0 1.5px rgba(34,52,136,0.22);
  background-position:center; background-repeat:no-repeat; background-size:12px 12px;
  transition:background-color .12s ease, box-shadow .12s ease;
}
.outlet-option:has(input:checked) .outlet-option-tick{
  background-color:var(--navy); box-shadow:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.3l2.4 2.4 5.2-5.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.outlet-empty{margin:0; padding:20px 14px; font-size:calc(13px * var(--text-scale)); color:var(--ink-faint); text-align:center;}

/* The confirm names the outlet ("Open IOI Mall Puchong"), so it can run
   long: one line with an ellipsis, never two. Greyed until a row is picked. */
.outlet-submit{margin-top:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.auth-card .outlet-submit[disabled]{opacity:1; background:#C9C9C9; box-shadow:none; color:#fff;}

/* ================= ITEM SECTIONS =================
   Station headings in the Markout Checklist and its Item Positions view: the
   name centred between two rules, so the list reads as one block per
   chiller rather than one long run of cards. */
.item-section{display:flex; flex-direction:column; gap:6px;}
.item-section + .item-section{margin-top:10px;}
.item-section-head{
  display:flex; align-items:center; gap:10px; margin:4px 2px 0;
  font-size:calc(11.5px * var(--text-scale)); font-weight:800; letter-spacing:0.06em; text-transform:uppercase;
  color:var(--navy);
}
/* A line on both sides, title centred: "—— COFFEE MACHINE ——" (the user's
   call, 2026-10-29). Reads as a divider between stations rather than a
   label for the cards under it. */
.item-section-head::before,
.item-section-head::after{content:""; flex:1; height:2px; border-radius:1px; background:var(--tan-line); opacity:0.55;}
/* Every card in the section filtered out (search, a status tile, a station
   tile): the heading goes too, rather than labelling an empty stretch. */
.item-section:not(:has(.item-card:not(.filter-hidden):not(.search-hidden))){display:none;}

/* Item class inside a station (2026-10-22): a quieter heading than the
   station's, no rule line, so the station still reads as the big divider.
   Same hide-when-empty rule as the section, so a search never leaves a
   "First Aid" label over nothing. */
.item-class-group{display:flex; flex-direction:column; gap:6px;}
.item-class-group + .item-class-group{margin-top:6px;}
.item-class-head{
  margin:2px 4px 0; font-size:calc(10.5px * var(--text-scale)); font-weight:700; letter-spacing:0.02em;
  color:var(--ink-faint);
}
/* "Coffee Machine –" before the class name: lighter, so the class still
   reads as the heading and the station as where it is. */
.item-class-station{font-weight:600; opacity:.75;}
.item-class-group:not(:has(.item-card:not(.filter-hidden):not(.search-hidden))){display:none;}

/* Dragging a card within its class in Settings (2026-10-29), to match the
   outlet's own shelf. The grip is the card's left edge, full height, so it is
   a big target that never overlaps the chips. touch-action:none on the grip
   only: a drag that starts there must not scroll the page, and a swipe that
   starts anywhere else still must. */
.item-card.position-card.sortable{padding-left:36px;}
/* Press-and-hold anywhere on the card picks it up (2026-11-07), so a long
   press must not open the phone's copy / look-up menu instead. */
.item-card.position-card.sortable{-webkit-touch-callout:none; -webkit-user-select:none; user-select:none;}
.drag-handle{
  position:absolute; top:0; left:0; bottom:0; width:32px; padding:0; border:none;
  background:transparent; color:var(--ink-faint); cursor:grab;
  display:flex; align-items:center; justify-content:center; touch-action:none;
}
.drag-handle svg{width:10px; height:16px;}
.position-card.dragging{
  z-index:5; box-shadow:0 8px 22px rgba(34,52,136,.22); border-color:var(--navy);
}
.position-card.dragging .drag-handle{color:var(--navy); cursor:grabbing;}
/* Pressing in while a hold is counting down (2026-11-07), so the barista sees
   it working; the card then lifts to scale(1.02) when the drag starts (set in
   dragTick). Only the transform eases: the drag itself writes transform every
   frame and must not lag. */
.position-card.sortable{transition:transform .25s ease;}
.position-card.sortable.hold-pending{transform:scale(.97);}
.position-card.sortable.dragging{transition:none;}
/* A search hides most of a class, and moving a card past cards you can't see
   would put it somewhere you didn't choose — so no dragging while searching. */
#mcx-settings-view.searching .drag-handle{visibility:hidden;}
.order-changed-tag{display:none; color:var(--tan);}
.item-class-group.order-changed .order-changed-tag{display:inline;}

/* ================= TEXT SIZE =================
   The A- / A+ in the outlet home bar (static/text-size.js). The bar itself
   is pinned at 100%: its side cells are ~70px on a phone, and a "Log out" or
   a pair of buttons grown to 140% would push the logo off centre or out of
   the bar, on the one screen where the control has to stay reachable. */
.home-topbar{--text-scale:1;}

.tutorial-main{
  display:flex; flex-direction:column; gap:16px;
  padding:16px 16px calc(32px + env(safe-area-inset-bottom));
}
.tutorial-section, .tutorial-menu{
  margin:0; background:var(--surface-card); border:1px solid var(--line); border-radius:16px;
  box-shadow:0 2px 8px rgba(22,39,122,0.06);
}
.tutorial-intro{display:flex; flex-direction:column; gap:4px; padding:4px 4px 0;}
.tutorial-intro-title{margin:0; font-size:calc(22px * var(--text-scale)); font-weight:600; line-height:1.25; color:var(--ink);}
.tutorial-intro-body{margin:0; font-size:calc(14px * var(--text-scale)); line-height:1.5; color:var(--ink-soft);}
.tutorial-part-of{
  font-size:calc(11px * var(--text-scale)); font-weight:500; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--ink-faint);
}

/* The menu: one card per group, a row per part. Rows are separated by a
   hairline inside the card, not a border round each one. */
.tutorial-group{display:flex; flex-direction:column; gap:8px;}
.tutorial-group-title{
  margin:0; padding:0 4px; font-size:calc(11px * var(--text-scale)); font-weight:500;
  letter-spacing:0.08em; text-transform:uppercase; color:var(--ink-faint);
}
.tutorial-menu{list-style:none; padding:4px 0; overflow:hidden;}
.tutorial-menu li + li .tutorial-menu-item{border-top:1px solid var(--line);}
.tutorial-menu-item{
  display:flex; align-items:center; gap:12px; min-height:60px; padding:10px 16px;
  text-decoration:none; color:var(--ink); -webkit-tap-highlight-color:transparent;
  transition:background-color .15s ease;
}
.tutorial-menu-item:hover, .tutorial-menu-item:active{background:var(--surface-tint);}
.tutorial-menu-item:focus-visible{outline:2px solid var(--navy); outline-offset:-2px;}
.tutorial-menu-num{
  flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center;
  background:var(--surface-tint); color:var(--navy);
  font-size:13px; font-weight:600; font-variant-numeric:tabular-nums;
}
.tutorial-menu-item.safety .tutorial-menu-num{background:var(--status-expired-bg); color:var(--status-expired);}
.tutorial-menu-text{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px;}
.tutorial-menu-title{font-size:calc(15px * var(--text-scale)); font-weight:600; line-height:1.3;}
.tutorial-menu-summary{font-size:calc(12px * var(--text-scale)); line-height:1.4; color:var(--ink-faint);}
/* Only on parts whose cartoon is in: the list says at a glance which parts
   have a video yet. */
.tutorial-menu-badge{
  flex:none; display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px;
  background:var(--surface-tint); color:var(--navy);
  font-size:calc(11px * var(--text-scale)); font-weight:600;
}
.tutorial-menu-badge svg{width:11px; height:11px;}
/* Progress (1500m): finished parts say Done in green, and the menu shows how
   many of the parts this person has done. */
.tutorial-menu-badge.done{background:var(--status-ok-bg); color:var(--status-ok-ink);}
/* Finished before the part changed (2026-11-19): ZUS gold, as on the New
   frame, so it reads as "something's new here", not as an error. */
.tutorial-menu-badge.updated{background:#EFD9BB; color:#223488;}
.tutorial-retake-note{
  margin:10px 0 0; padding:10px 12px; border-radius:12px; background:#EFD9BB; color:#223488;
  font-size:calc(13px * var(--text-scale)); font-weight:600; line-height:1.45;
}
.tutorial-progress{display:flex; flex-direction:column; gap:6px; margin:4px 4px 0; padding:12px 14px; border-radius:14px; background:var(--surface-tint);}
.tutorial-progress-text{font-size:calc(14px * var(--text-scale)); font-weight:700; color:var(--navy);}
.tutorial-progress.all-done .tutorial-progress-text{color:var(--status-ok-ink);}
.tutorial-progress-bar{height:8px; border-radius:99px; background:var(--line); overflow:hidden;}
.tutorial-progress-bar span{display:block; height:100%; border-radius:99px; background:var(--status-ok); transition:width .3s ease;}
.tutorial-done-tag{margin-left:6px; color:var(--status-ok-ink); font-weight:800;}
.tutorial-done-tag[hidden]{display:none;}
.tutorial-menu-chevron{flex:none; width:8px; height:14px; color:var(--ink-faint);}

/* The live practice (2026-11-11), in the spot the cartoon used to fill:
   a phone-shaped frame holding the real checklist with made-up items. Tall
   enough to work in, short enough that the page header and the start of the
   steps still show, so it fits the screen without scrolling the page. */
.tutorial-practice{display:flex; flex-direction:column; align-items:center; gap:6px; padding:0 12px;}
.tutorial-practice-frame{
  display:block; width:min(100%, 430px); height:min(66vh, 640px); min-height:420px;
  border:none; border-radius:20px; background:var(--surface-page);
  box-shadow:0 0 0 1px var(--line), 0 10px 26px rgba(16,24,40,0.14);
}
.tutorial-practice-box{display:flex; justify-content:center; width:100%;}
.tutorial-practice.wide .tutorial-practice-box{display:block; overflow:hidden; border-radius:14px;}
.tutorial-practice.wide .tutorial-practice-frame{
  width:1280px; height:800px; min-height:0; border-radius:0; transform-origin:0 0;
}
.tutorial-practice-note{margin:0; font-size:calc(12px * var(--text-scale)); color:var(--ink-faint); text-align:center;}
.tutorial-section{padding:16px;}
.tutorial-section-title{margin:0 0 12px; font-size:calc(16px * var(--text-scale)); font-weight:600; color:var(--ink);}

/* Previous / Next: two cards side by side, Next on the right and in navy,
   so working through the parts in order is one obvious tap each time. */
.tutorial-pager{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.tutorial-pager-link{
  display:flex; flex-direction:column; gap:2px; min-height:60px; padding:12px 16px;
  border-radius:14px; border:1px solid var(--line); background:var(--surface-card);
  text-decoration:none; color:var(--ink);
}
.tutorial-pager-link.next{grid-column:2; text-align:right; border-color:transparent; color:#fff;}
.tutorial-pager-label{font-size:calc(11px * var(--text-scale)); font-weight:500; letter-spacing:0.08em; text-transform:uppercase; opacity:.75;}
.tutorial-pager-title{font-size:calc(14px * var(--text-scale)); font-weight:600; line-height:1.3;}
/* Numbered with a counter rather than the list's own numbers, so the
   number can sit in a navy circle beside the text. The circle is placed
   absolutely in the step's left padding, not as a grid column: in a grid,
   the bold lead-in and the plain text after it each became their own cell,
   and the plain text was squeezed into the 24px number column, one word
   per line. */
.tutorial-steps{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; counter-reset:step;}
.tutorial-steps li{
  counter-increment:step; position:relative; padding-left:36px; min-height:24px;
  font-size:calc(14px * var(--text-scale)); line-height:1.5; color:var(--ink-soft);
}
.tutorial-steps li::before{
  content:counter(step); position:absolute; left:0; top:0;
  width:24px; height:24px; border-radius:50%; display:grid; place-items:center;
  background:var(--navy-fill); color:#fff; font-size:12px; font-weight:600;
}
.tutorial-steps strong{color:var(--ink); font-weight:600;}
.tutorial-safety{background:var(--status-expired-bg); border-color:rgba(208,59,59,0.25);}
.tutorial-safety .tutorial-section-title{color:var(--status-expired);}

/* ================= GROUPED LIST (Markout, ABP only for now) =================
   The user's ask, 2026-11-10: the checklist cards were too big, about 10
   items on a phone. Zooming out the way a spreadsheet does would shrink the
   date button too, so this changes the layout instead. Each item class becomes
   one card, and its items become thin rows split by hairlines. That is the
   same lean-list pattern as SEA Settings, and it brings a row down from ~54px
   to ~40px.

   The 29px date button is kept as it is (see .date-trigger): it is the row's
   touch target. What comes off is each card's own border, shadow, 6px gap and
   some padding.

   .item-class-rows is the wrapper round one class's cards. Without
   body.list-grouped it stacks them just as before. */
.item-class-rows{display:flex; flex-direction:column; gap:6px;}

body.list-grouped .item-class-rows{
  gap:0; overflow:hidden; border-radius:12px;
  background:var(--surface-card); border:1px solid rgba(22,39,122,0.07);
  box-shadow:0 1px 0 rgba(255,255,255,0.9) inset, 0 8px 14px -10px rgba(16,24,40,0.14), 0 2px 4px -2px rgba(16,24,40,0.08);
}
/* Every row loses the per-card frame. The vertical padding comes down from
   8.5/9 to 5.5/5.5, but not lower, so a two-line name still has room. */
body.list-grouped .sheet-page .item-class-rows > .item-card{
  border:none; border-radius:0; box-shadow:none; background:var(--surface-card);
  padding-top:5.5px; padding-bottom:5.5px;
}
/* A hairline above every row that has a visible row before it. Written with
   "~" rather than "+" so that a row hidden by search or a filter never leaves
   a line sitting on top of the box. */
body.list-grouped .item-class-rows > .item-card:not(.filter-hidden):not(.search-hidden) ~ .item-card{
  border-top:1px solid var(--line);
}
/* At ~40px a row is too short for the edge ribbons' full upright words
   ("Available" runs ~41px), so the grouped list shows short ones instead,
   picked by the ribbon's colour class (the user's labels, 2026-11-10): EXP,
   EXP-S, MISS, OK on the right; OOS, EOD, AVAIL on the left. Both greens
   (AVAIL, OK) began blank and were asked for the same day.

   Done in CSS on purpose: the script keeps writing the full words into the
   button (screen readers still hear them), and nothing in checklist.html had
   to change. The button's own text is hidden with font-size:0. The ::after
   brings back the size: 7.5px, one up from the hub's 6.5px micro-label (the
   user's call, 2026-11-10, after 8.5px read too big), and the same as the
   Markout tile labels above. Both strips use this one rule, so they always match. Capped so
   the largest text setting can't push a label past the row's height. */
body.list-grouped .item-class-rows .item-availability-ribbon{font-size:0;}
body.list-grouped .item-class-rows .item-availability-ribbon::after{
  font-size:min(calc(7.5px * var(--text-scale)), 8.5px); line-height:1.1; white-space:pre; text-align:center;
}
body.list-grouped .item-class-rows .item-availability-ribbon.out-of-stock::after{content:"OOS";}
body.list-grouped .item-class-rows .item-availability-ribbon.eod::after{content:"EOD";}
body.list-grouped .item-class-rows .item-availability-ribbon.available::after{content:"AVAIL";}
/* The "tap again to confirm" states. The colour class still shows where the
   item is now (the script swaps it only on the second tap), so the label
   names where it is going, as the full-size ribbons do. */
body.list-grouped .item-class-rows .item-availability-ribbon.confirm::after{content:"OOS?";}
body.list-grouped .item-class-rows .item-availability-ribbon.confirm.out-of-stock::after{content:"AVAIL?";}
body.list-grouped .item-class-rows .is-eod .item-availability-ribbon.confirm.out-of-stock::after{content:"EOD?";}
/* The box clips anything drawn outside a row, so the navy ring a panel click
   uses to point at a row is drawn inside it instead. */
body.list-grouped .item-class-rows > .item-card.attention-flash{animation:attentionFlashInset 1.8s ease;}
@keyframes attentionFlashInset{
  0%, 45%{box-shadow:inset 0 0 0 3px var(--navy);}
  100%{box-shadow:inset 0 0 0 3px transparent;}
}

/* ================= AUTOSAVE LINE (every tool, 2026-11-19) ================
   The user: "remove update button completely in every hub". Markout, its
   Settings, Store Expiry Audit, its Settings and StockTake all save by
   themselves now, and where the save button was sits one quiet line saying
   how that is going. It is still a <button> (so a failed save can be tapped
   to try again), but it must not look like one: no fill, no press, no
   hover, and nothing for a thumb to aim at until it turns red. Replaced the
   UNSAVED-EDIT PULSE that made Update Checklist blink while unsaved. */
.sheet-bottom-row .btn-submit.autosave-line,
.sheet-bottom-row .btn-submit.autosave-line:hover,
.sheet-bottom-row .btn-submit.autosave-line:disabled{
  /* Navy, and the size of the tab bar's tuck handle (112px wide), the
     user's ask (2026-11-19): small enough not to read as a button. The
     words are kept short to fit: "Autosave – ON", "3 changes", "Saving…",
     "Not saved · tap". The handle was 96px and went to 112px with
     "Autosave – ON", so the two still match when the pill flattens. */
  flex:0 0 auto; width:auto; min-width:112px; margin:0 auto; scale:1;
  background:var(--navy); color:#fff; cursor:default;
  border:0; border-radius:100px; padding:5px 14px; min-height:28px;
  font-size:calc(11.5px * var(--text-scale)); font-weight:700; letter-spacing:0.01em; line-height:1.2;
  animation:none; transition:background-color .15s ease, color .15s ease, border-radius .2s ease;
}
.sheet-bottom-row .btn-submit.autosave-line::before,
.sheet-bottom-row .btn-submit.autosave-line::after{display:none;}
/* Waiting: the same navy, the words in the handle's soft gold. */
.sheet-bottom-row .btn-submit.autosave-line.has-pending{color:#EFD9BB;}
.sheet-bottom-row .btn-submit.autosave-line.failed.has-pending{background:var(--under); color:#fff; cursor:pointer;}
.sheet-bottom-row .btn-submit.autosave-line:focus-visible{outline:2px solid var(--blue); outline-offset:1px;}
@media (prefers-reduced-motion: reduce){ .sheet-bottom-row .btn-submit.autosave-line{transition:none;} }

/* ================= SWIPE, GROUPED LIST (Markout, ABP only for now) ========
   The user, 2026-11-10: the Today / Clear swipe looked unfinished next to the
   rest of Markout. What was wrong with the old one, seen in a mid-swipe
   screenshot: the coloured layer showed above and below the sliding row (the
   surface was only as tall as its content, not the row), the label was
   covered as the row moved ("TODA"), the type was heavy capitals, and the
   tick was a typed character.

   Now: the row slides as one full-height piece between the two strips; a
   round badge with a line icon (calendar + tick, calendar + cross) grows in
   with the drag; the word fades in once there is room for it; at the point
   the swipe counts, the layer goes solid (green for Today, the MISS grey for
   Clear, the colour the strip will turn) and the badge pops. --swipe-p is the
   drag's progress, 0 to 1, set by initSwipeV2 in checklist.html. */

/* The surface stretches out to the strips and to the row's top and bottom,
   then pads back in, so its content doesn't move. The numbers are the row's
   own padding (5.5px, and 34px / 26px on the sides) less the 17px strips. */
body.list-grouped .item-class-rows .item-card.swiping .swipe-surface{
  box-shadow:0 0 0 1px var(--line), 0 6px 16px -6px rgba(16,24,40,0.28);
}
body.list-grouped .swipe-reveal{
  padding:0 10px; text-transform:none; letter-spacing:0;
  font-size:min(calc(12px * var(--text-scale)), 13px); font-weight:700;
}
/* The two sides are laid out the same, mirrored: badge at the outer edge,
   word inside it. */
body.list-grouped .swipe-reveal > span{display:flex; align-items:center; gap:6px; transform:none;}
body.list-grouped .item-card.swipe-armed .swipe-reveal span{transform:none;}
.swipe-ico{display:none;}
body.list-grouped .swipe-ico{
  display:flex; align-items:center; justify-content:center; flex:none;
  width:24px; height:24px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(16,24,40,0.18);
  opacity:calc(0.4 + 0.6 * var(--swipe-p, 0));
  transform:scale(calc(0.6 + 0.4 * var(--swipe-p, 0)));
  transition:transform .18s var(--ease-out);
}
body.list-grouped .swipe-ico svg{width:15px; height:15px;}
body.list-grouped .swipe-reveal-today .swipe-ico{color:var(--status-ok);}
body.list-grouped .swipe-reveal-clear .swipe-ico{color:var(--status-notchecked-ink);}
/* The word waits for the last fifth of the drag: earlier, the row still
   covers most of where it sits, and half a faded letter peeking out from
   under it looked broken. Opacity below 0 is read as 0. */
body.list-grouped .swipe-txt{font-weight:inherit; opacity:calc((var(--swipe-p, 0) - 0.8) * 5);}
body.list-grouped .item-card.swipe-armed .swipe-ico{opacity:1; transform:scale(1.1);}
body.list-grouped .item-card.swipe-armed .swipe-txt{opacity:1;}

/* ================= REORDER ON THE CHECKLIST (Markout, ABP only for now) ===
   Long press a row: a badge counts 3, 2, 1, Go (the user's idea, 2026-11-10),
   then the row lifts and follows the finger inside its class. Script:
   "Checklist: long press to reorder" in apps/mcx/templates/checklist.html.

   The held row's surface tints while the count runs, so the press reads as
   working before anything moves. Lifted, the row rises above its neighbours
   with a navy edge and a shadow, the same lift Settings' dragged card had. */
body.list-grouped .item-class-rows > .item-card.row-held .swipe-surface{background:var(--surface-tint);}
/* transition:none is the fix for "not smooth on mobile" (2026-11-10): every
   card carries a 0.12s transform transition for its press bump, and on the
   lifted row it made the row trail the finger, a frame behind all the way.
   Settings' dragged card already had the same rule. will-change lets the
   phone move the row on the GPU instead of repainting it each frame. */
body.list-grouped .item-class-rows > .item-card.row-dragging{
  transition:none; will-change:transform;
  z-index:4; border-radius:10px;
  box-shadow:0 0 0 1.5px var(--navy), 0 10px 24px -8px rgba(34,52,136,0.35);
}
.reorder-count{
  position:absolute; top:50%; left:50%; z-index:5; transform:translate(-50%, -50%);
  pointer-events:none;
}
.reorder-count span{
  display:flex; align-items:center; justify-content:center;
  min-width:30px; height:30px; padding:0 10px; border-radius:999px;
  background:var(--navy); color:#fff; font-weight:800; font-size:calc(15px * var(--text-scale));
  box-shadow:0 4px 12px rgba(34,52,136,0.35);
  animation:reorderCountPop .24s var(--ease-out);
}
/* "Go" is navy like 3, 2, 1 (green until 2026-11-16), swells and fades as the row lifts. */
.reorder-count.go span{background:var(--status-ok); animation:reorderCountGo .45s ease forwards;}
@keyframes reorderCountPop{
  0%{transform:scale(.95); opacity:0;}
  100%{transform:scale(1); opacity:1;}
}
@keyframes reorderCountGo{
  0%{transform:scale(.6); opacity:0;}
  35%{transform:scale(1.15); opacity:1;}
  100%{transform:scale(1.35); opacity:0;}
}

/* ================= DATE PICKER: DRAG TO CHANGE MONTH =================
   static/cal-swipe.js (2026-11-10). touch-action:none on the calendar's
   body, so a sideways drag is ours and not the browser's (no page pan, no
   back-swipe); taps on the days still work. The page behind can't scroll
   anyway while the picker is open. No text selection on a mouse drag. */
.cal-popover{-webkit-user-select:none; user-select:none;}
.cal-popover .cal-days, .cal-popover .cal-weekdays, .cal-popover .cal-head{touch-action:none;}

/* ================= FLOATING SAVE BUTTON (ABP only for now) =================
   The user, 2026-11-10: Update Checklist floats over the list instead of
   sitting in a white bar. The bar itself stays (fixed, same padding, still
   measured by frozen-bar.js, so the list's bottom space still lets the last
   row scroll clear of the button), but it has no background or top rule,
   and it lets taps fall through it to the rows underneath. The buttons
   themselves keep taking taps, and carry a drop shadow so they read as
   lifted off the page.

   Markout's checklist and Settings bars, and Store Expiry Audit's, all under
   body.list-grouped (the same ABP preview as the grouped list). */
body.list-grouped .sheet-bottom{
  background:transparent; border-top:none; pointer-events:none;
}
body.list-grouped .sheet-bottom > *{pointer-events:auto;}
body.list-grouped .sheet-bottom .sheet-bottom-row{pointer-events:none;}
body.list-grouped .sheet-bottom .sheet-bottom-row > *{pointer-events:auto;}
body.list-grouped .sheet-bottom .btn-submit,
body.list-grouped .sheet-bottom .print-cart-btn,
body.list-grouped .sheet-bottom .scan-camera-btn{
  box-shadow:0 10px 22px -8px rgba(16,24,40,0.55), 0 3px 8px rgba(16,24,40,0.18);
}
/* The note under the button ("2 item(s) updated.", "Update failed…"): its
   own background is only an 8% tint, which read fine on the white bar and
   nearly vanished over the list once the bar went see-through (the user,
   2026-11-10). Same tint, now over a solid card with the button's shadow,
   so it reads like a toast. Error keeps its red. */
body.list-grouped .sheet-bottom .flash{
  background:linear-gradient(rgba(34,52,136,0.08), rgba(34,52,136,0.08)), var(--surface-card);
  box-shadow:0 10px 22px -8px rgba(16,24,40,0.45), 0 3px 8px rgba(16,24,40,0.14);
}
body.list-grouped .sheet-bottom .flash.error{
  background:linear-gradient(var(--under-bg), var(--under-bg)), var(--surface-card);
}
/* Collapsed, it must leave no shadow behind either. */
body.list-grouped .sheet-bottom .flash.collapsed{box-shadow:none;}

/* Scrolling (body.is-scrolling, set by static/frozen-bar.js): the button row
   squeezes to a slim pill at the bottom, its words fading first so they never
   show squashed, then grows back with a little spring when scrolling stops.
   transform and opacity only, so it runs smoothly over a list in motion. */
body.list-grouped .sheet-bottom .sheet-bottom-row{
  transform-origin:50% 100%;
  transition:transform .32s var(--ease-in-out);
}
body.list-grouped .sheet-bottom .sheet-bottom-row > *{transition:color .12s ease;}
body.list-grouped .sheet-bottom .sheet-bottom-row > * > *{transition:opacity .12s ease;}
body.list-grouped.is-scrolling .sheet-bottom .sheet-bottom-row{
  transform:scale(.42, .16);
  transition:transform .2s ease;
}
body.list-grouped.is-scrolling .sheet-bottom .sheet-bottom-row > *{color:transparent;}
body.list-grouped.is-scrolling .sheet-bottom .sheet-bottom-row > * > *{opacity:0;}
/* The autosave pill (2026-11-19) is already the tab bar handle's width, so
   its row only flattens: 112 x 28 to 112 x 5, the handle's exact size (the
   user: the shrunk pill "doesn't match the shrunk bar pill"; the squeeze
   above made it 40px). Anything beside it (Print Cart, Scan) fades out
   meanwhile rather than squashing into a second little bar. */
body.list-grouped.is-scrolling .sheet-bottom .sheet-bottom-row:has(> .autosave-line){transform:scale(1, .18);}
/* Squashing a round-ended pill to 18% of its height squashes its ends too,
   into points, where the handle's ends are true half circles ("why their
   shape is not same"). So while it is flat its corners are pre-stretched
   the other way: 2.5px across by 14px down, which the 0.18 squash turns
   into 2.5px by 2.5px, the handle's own rounding. */
body.list-grouped.is-scrolling .sheet-bottom .sheet-bottom-row > .btn-submit.autosave-line{border-radius:2.5px / 14px; box-shadow:none;}
body.list-grouped .sheet-bottom .sheet-bottom-row:has(> .autosave-line) > :not(.autosave-line){transition:color .12s ease, opacity .12s ease;}
body.list-grouped.is-scrolling .sheet-bottom .sheet-bottom-row:has(> .autosave-line) > :not(.autosave-line){opacity:0;}
@media (prefers-reduced-motion: reduce){
  body.list-grouped .sheet-bottom .sheet-bottom-row,
  body.list-grouped.is-scrolling .sheet-bottom .sheet-bottom-row{transition:none;}
}

/* The row strips are pills, for good (the user, 2026-11-10: "make it
   permanent", after liking them as the slim shape they took while scrolling).
   Each is a rounded pill as long as its word (AVAIL / EOD / OOS on the left,
   EXP / EXP-S / MISS / OK on the right), centred in the row and inset from its
   edge, instead of a strip the full height of the row. Its height is its
   word's: the button's own text is font-size 0 and its ::after holds the short
   word (see GROUPED LIST above), so an auto height fits the word exactly.
   Still the tap targets for OOS and print, as the strips were.

   While the list scrolls (body.is-scrolling, static/frozen-bar.js) only the
   word fades, so the eye goes to the item names; the pill and its colour stay
   put, so the status still reads. Opacity only: the phone's graphics chip
   does it without a repaint. */
body.list-grouped .item-class-rows .item-availability-ribbon{
  top:50%; bottom:auto; width:10px; padding:0; border-radius:99px;
  box-shadow:0 1px 2px rgba(16,24,40,0.18);
  /* One length for every pill (the user, 2026-11-10: AVAIL came out longer
     than OK or MISS, since each fitted its own word). Sized for the longest
     word, AVAIL, at the label's size: 4.44 times it, with the same cap the
     label has (7.5px x text size, at most 8.5px), so it grows with the A+
     setting and AVAIL never spills. Shorter words sit centred. */
  height:min(calc(33.3px * var(--text-scale)), 38px);
  display:flex; align-items:center; justify-content:center;
}
/* 12px wide since the user found 15px "chubby" (2026-11-10); inset 7px so it
   stays centred where the 17px strip used to be. */
/* 10px since 2026-11-16 (the user: "make the pill thinner"), from 12px: the
   thinnest that still holds the label (at most 8.5px tall) at the largest
   text size. Inset 8px so the pill stays centred where it was. */
body.list-grouped .item-class-rows .item-availability-ribbon{left:8px; transform:translateY(-50%) rotate(180deg);}
body.list-grouped .item-class-rows .item-availability-ribbon::after{transition:opacity .15s ease;}
body.list-grouped.is-scrolling .item-class-rows .item-availability-ribbon::after{opacity:0;}
@media (prefers-reduced-motion: reduce){
  body.list-grouped .item-class-rows .item-availability-ribbon::after{transition:none;}
}

/* ================= BOTTOM TAB BAR (Markout, SEA, STA; ABP, phones) =======
   Home · Checklist · Settings · Search · How-to, fixed to the bottom of the
   screen (the user, 2026-11-10: the Instagram pattern, which staff already
   know, and where a thumb reaches). One macro draws it on every tool
   (shared/templates/_tabbar.html) and one script runs it (static/tabbar.js),
   switched on by body.has-tabbar: Markout and Store Expiry Audit with five
   tabs, StockTake with four (it has no Settings page). It replaces the top Checklist / Settings
   row on a phone, so the count tiles become the very top of the screen. The
   floating Update Checklist (or Save) sits just above it, and the list keeps
   room for both. Every width since 2026-11-10 (it was below 1200px only);
   on desktop it sits under the Markout column, see DESKTOP FOLLOWS THE
   PHONE. A
   tabs row that hid and came back on scroll lived here for a few hours the
   same day, before this replaced it. */
.tabbar{display:none;}
body.has-tabbar{--tabbar-h:calc(58px + env(safe-area-inset-bottom, 0px));}
body.has-tabbar .tabbar{
  display:grid; grid-auto-flow:column; grid-auto-columns:1fr; align-items:stretch;
  position:fixed; left:0; right:0; bottom:0; z-index:11; max-width:520px; margin:0 auto;
  height:var(--tabbar-h); padding:4px 4px env(safe-area-inset-bottom, 0px); box-sizing:border-box;
  background:var(--surface-card); border-top:1px solid var(--line);
  box-shadow:0 -6px 16px -10px rgba(16,24,40,0.25);
}
.tabbar-item{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  border:none; background:none; padding:0; margin:0; cursor:pointer; text-decoration:none;
  font-family:inherit; font-size:calc(10px * var(--text-scale)); font-weight:600; color:var(--ink-faint);
  -webkit-tap-highlight-color:transparent; outline:none;
}
.tabbar-item svg{width:22px; height:22px; transition:transform .2s var(--ease-out);}
.tabbar-item:focus-visible{box-shadow:inset 0 0 0 2px var(--navy); border-radius:12px;}
.tabbar-item.active{color:var(--navy); font-weight:800;}
.tabbar-item.active svg{transform:translateY(-1px) scale(1.06);}
/* The top row goes: the bar carries everything it had. */
body.has-tabbar .sheet-page > .sheet-header{display:none;}
/* The save button floats just above the bar, which takes the bottom edge
   and its safe area. */
body.has-tabbar .sheet-bottom{bottom:var(--tabbar-h); padding-bottom:8px;}
body.has-tabbar .item-list{padding-bottom:calc(var(--frozen-bar-h, 88px) + var(--tabbar-h) + 6px);}
/* Tucked on a scroll down (body.tabbar-tucked, set by the script after the
   bar's markup): the bar slides below the screen, leaving its ::before, a
   small soft-gold handle, just above the bottom edge (gold, not navy, so it
   can't be taken for the slim Update Checklist). Update Checklist moves down into
   the space. Transforms and opacity only. */
body.has-tabbar .tabbar{transition:transform .3s cubic-bezier(.2,.8,.2,1);}
body.has-tabbar .tabbar::before{
  content:""; position:absolute; left:50%; width:112px; height:5px; margin-left:-56px;
  top:calc(-14px - env(safe-area-inset-bottom, 0px)); border-radius:99px;
  background:#BE9E74; opacity:0; transition:opacity .2s ease;
}
body.has-tabbar.tabbar-tucked .tabbar{transform:translateY(100%);}
/* Soft gold, the card icons' badge gold (the user, 2026-11-10; it was
   grey): the bar's own colour, and still nothing like the navy of the
   slim Update Checklist above it. */
body.has-tabbar.tabbar-tucked .tabbar::before{opacity:.85;}
body.has-tabbar .sheet-bottom{transition:transform .3s cubic-bezier(.2,.8,.2,1);}
/* Down far enough that the button sits ~6px above the handle (the user
   found the first ~18px gap too big, 2026-11-10). The handle's top is 14px
   above the safe area; the bar's own 8px bottom padding is part of the sum. */
body.has-tabbar.tabbar-tucked .sheet-bottom{
  transform:translateY(calc(var(--tabbar-h) - 12px - env(safe-area-inset-bottom, 0px)));
}
@media (prefers-reduced-motion: reduce){
  body.has-tabbar .tabbar, body.has-tabbar .sheet-bottom, body.has-tabbar .tabbar::before{transition:none;}
}
@media (prefers-reduced-motion: reduce){
  .tabbar-item, .tabbar-item svg{transition:none;}
}

/* During a Today / Clear swipe the row's pills step aside (the user,
   2026-11-10): they fade out while the row slides, so the swipe's own colour
   and word are the only thing at the edges, and fade back in when it is let
   go, the right one already showing the row's new status (applyDateLocally
   sets it in the same moment the swipe ends). Opacity only. */

/* Full width for the swipe, now the strips are pills (the user, 2026-11-10:
   the Today / Clear colour stopped 17px short of each edge). The swipe layer
   and the sliding row were both sized to sit between the old full-height
   strips; with pills that fade out during a swipe, that left a white band at
   each edge. Both now run the card's whole width. The row's own padding
   (34px / 26px, which keeps clear of the pills) is cancelled out by a margin
   and put back as padding, so its content stays exactly where it was. */
body.list-grouped .item-class-rows .item-card.swipe-v2 .swipe-surface{
  margin:-5.5px -26px -5.5px -34px; padding:5.5px 26px 5.5px 34px;
}
body.list-grouped .item-class-rows .item-card .swipe-reveal{left:0; right:0;}

/* Smoother pill motion, everywhere (the user, 2026-11-10). One set of
   timings for every way a pill changes, overriding the quicker ones above:
   - the word (while scrolling): out in .22s, back in .35s on an ease-out;
   - the whole pill (during a swipe): out in .2s with a slight shrink, back in
     .35s growing to full size, so the new status eases in rather than pops;
   - the colour, when the status changes: a .4s blend.
   The shrink uses the separate `scale` property, which stacks on the pill's
   own centring transform instead of replacing it. Fade and scale only, so the
   phone's graphics chip runs it. */
body.list-grouped .item-class-rows .item-card .item-availability-ribbon{
  scale:1;
  transition:opacity .35s cubic-bezier(.2,.8,.2,1), scale .35s cubic-bezier(.2,.8,.2,1),
             background .4s ease, color .4s ease;
}
body.list-grouped .item-class-rows .item-card.swiping .item-availability-ribbon{
  opacity:0; scale:.8;
  transition:opacity .2s ease-out, scale .2s ease-out, background .4s ease, color .4s ease;
}
body.list-grouped .item-class-rows .item-card .item-availability-ribbon::after{
  transition:opacity .35s cubic-bezier(.2,.8,.2,1);
}
body.list-grouped.is-scrolling .item-class-rows .item-card .item-availability-ribbon::after{
  opacity:0; transition:opacity .22s ease-out;
}
@media (prefers-reduced-motion: reduce){
  body.list-grouped .item-class-rows .item-card .item-availability-ribbon,
  body.list-grouped .item-class-rows .item-card .item-availability-ribbon::after{transition:none;}
}

/* The tab bar's look, option C (the user's pick, 2026-11-10, "similar to
   socmed"): the hub's own illustrated card icons, big, no words, a gold dot
   under the current tab; the other tabs a little faded, still in colour. The
   words stay in the markup, visually hidden, for screen readers. */
.tabbar-item{gap:4px;}
/* 30px (34px read slightly big, the user, 2026-11-10). */
.tabbar-item .card-icon{width:30px; height:30px; transition:transform .2s var(--ease-out), opacity .2s ease;}
.tabbar-item:not(.active) .card-icon{opacity:.55;}
.tabbar-item.active .card-icon{transform:translateY(-1px) scale(1.06);}
.tabbar-label{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;
}
.tabbar-item::after{
  content:""; width:6px; height:6px; border-radius:50%; background:var(--tan, #BE9E74);
  opacity:0; transform:scale(.4); transition:opacity .2s ease, transform .2s ease;
}
.tabbar-item.active::after{opacity:1; transform:none;}

/* ================= STATION BANNERS (Markout, SEA; ABP) ======================
   Each station heading (Cashier, Display Chiller …; Freezer, Ambient) is a
   banner, the user's idea (2026-11-10): the station's name, today's date
   under it (the user picked the date over an item count), and its drawing
   big at the top-right corner, tilted and cut off by the edge. On the navy
   stage since 2026-11-16 (it was a cream stripe): THE NAVY STAGE below
   gives it the stage, the dots and the light, and recolours the drawing for
   navy. On a phone it pins just under the tiles (--frozen-h, measured by
   static/frozen-bar.js) while its station scrolls past; the next station's
   banner pushes it away, since a sticky element stays inside its section. So
   the class headings under it drop the repeated station name.

   The corner drawing (2026-11-16, the user: "half cut, like ZUS DNA"): ZUS
   DNA's answer-tile pattern, from OGR v2. It sits on a layer under the words
   (isolation + z-index -1) and the banner clips it, so the name is never
   covered; the right padding keeps the name clear of it. Pressing a
   Markout banner straightens it (ease-in-out, 290 ms, motion rule 9).
   rotate / translate rather than transform, so it stacks with the banner's
   own press scale. The red count that used to sit at the right went on
   2026-11-16 (the user: "not useful"; the tiles give the totals).

   Shaped like the "Go to station" pop-up's cards (the user, 2026-11-16:
   "it should look like when we press the filter"): 56px tall, 12px
   corners, no edge line, the name in title case at 15px bold, the drawing
   62px and cut 10px at the corner. The date line under the name stays: it
   says what the card doesn't (today, or "Filter On · ...").

   Without body.list-grouped only the name shows: the old ruled heading. */
.station-banner .sb-sub, .station-banner .sb-pic, .station-banner .sb-alert{display:none;}
.station-banner .sb-text{display:contents;}
body.list-grouped .item-section-head.station-banner{
  position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px;
  height:56px; margin:4px 0 0; padding:0 0 0 16px; overflow:hidden; box-sizing:border-box;
  border-radius:12px; background:var(--zus-stage);
  border:none; box-shadow:0 6px 12px -10px rgba(16,24,40,0.35);
  color:#fff; text-transform:none; letter-spacing:0; isolation:isolate;
}
body.list-grouped .item-section-head.station-banner:has(.sb-pic){padding-right:66px;}
/* Markout's filter banners and options have no drawing (the user, 2026-11-23):
   the same 16px on the right as on the left, not the drawing's 66px. */
body.list-grouped .item-section-head.station-banner:not(:has(.sb-pic)){padding-right:16px;}
body.list-grouped #station-menu .station-option:not(:has(.station-option-pic)){padding-right:12px;}
body.list-grouped .station-banner .sb-text{display:flex; flex-direction:column; gap:1px; min-width:0;}
body.list-grouped .station-banner .sb-name{
  font-size:calc(15px * var(--text-scale)); font-weight:700; text-transform:none; letter-spacing:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
body.list-grouped .station-banner .sb-sub{
  display:flex; align-items:center; gap:6px; min-width:0;
  font-size:calc(11px * var(--text-scale)); font-weight:700; color:#EFD9BB; font-variant-numeric:tabular-nums;
}
body.list-grouped .station-banner .sb-filter{display:none; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
body.list-grouped .banner-filter-on .station-banner .sb-date{display:none;}
body.list-grouped .banner-filter-on .station-banner .sb-filter{display:block;}
body.list-grouped .station-banner .sb-chevron{width:10px; height:7px; flex:none;}
body.list-grouped .station-banner .sb-pic{
  display:block; flex:none; position:absolute; top:-10px; right:-10px; z-index:-1;
  width:62px; height:62px; margin:0; rotate:-12deg; pointer-events:none;
  transition:rotate .29s var(--ease-in-out), translate .29s var(--ease-in-out);
}
body.list-grouped #mcx-checklist-view .station-banner:active .sb-pic{rotate:0deg; translate:-6px 6px;}
body.list-grouped .station-banner .sb-pic .card-icon{width:100%; height:100%;}
body.list-grouped #mcx-checklist-view .item-class-station{display:none;}
body.list-grouped #mcx-checklist-view .item-section-head.station-banner,
body.list-grouped.sea-page .item-section-head.station-banner{
  position:sticky; z-index:4;
}
/* A tiny gap between the tiles and the pinned banner on Markout (the
   user, 2026-11-10): flush, the two read as one block. It pins 4px lower,
   and a page-coloured shadow fills those 4px so the items scrolling
   underneath don't flicker through the gap. */
body.list-grouped #mcx-checklist-view .item-section-head.station-banner{
  top:calc(var(--mcx-brandbar-h, 0px) + var(--frozen-h, 0px) + 4px);
  box-shadow:0 -4px 0 0 var(--surface-page), 0 6px 12px -10px rgba(16,24,40,0.35);
}

/* ============ DESKTOP FOLLOWS THE PHONE (Markout, ABP; 1200px+) ============
   The tab bar, the pinned banners and the gap above were phone-only (below
   1200px) when they landed on 2026-11-10, so a laptop still showed the old
   top Checklist / Settings row. The user asked for the window to follow the
   phone the same day, so those rules now apply at every width. What is left
   here is only where the desktop layout differs: the Markout list is a 520px
   column on the right (beside the three Needs Attention lists), so the tab
   bar sits under that column, not centred; and the brand bar stays, since
   it is what names the app and outlet on a wide screen. */
@media (min-width:1200px){
  body.has-tabbar.mcx-checklist-page[data-view="checklist"] .tabbar{
    left:auto; right:var(--mcx-edge); width:520px; margin:0;
  }
}

/* ============ THE BANNER IS THE STATION PICKER (Markout, ABP) ===============
   The pinned station banner says where you are, and a tap on it opens the
   station list to jump elsewhere (2026-11-10). So the top box's date and
   station dropdown were doubled up and go: the tiles alone stay frozen, the
   date moves onto the banner. The list (#station-menu) is the same panel,
   still opening just under the tiles, i.e. over the pinned banner; in this
   layout it jumps rather than filters, so "All Stations" and the item
   counts are gone. Each row is a small navy card (THE NAVY STAGE below)
   with its station's drawing big at the corner, cut off by the card's edge
   like the banner's (2026-11-16); the red badge each row had went with the
   banner's count. */
body.list-grouped #mcx-checklist-view .station-banner{cursor:pointer; -webkit-tap-highlight-color:transparent; transition:transform .15s ease;}
body.list-grouped #mcx-checklist-view .station-banner:active{transform:scale(.985);}
body.list-grouped #mcx-checklist-view .station-banner:focus-visible{outline:2px solid var(--navy); outline-offset:2px;}
body.list-grouped #mcx-checklist-view .station-picker{display:none;}
body.list-grouped #station-menu .station-menu-head{font-size:0;}
body.list-grouped #station-menu .station-menu-head::after{content:"Go to station"; font-size:calc(11px * var(--text-scale));}
body.list-grouped #station-menu .station-option[data-value=""],
body.list-grouped #station-menu .station-menu-sep,
body.list-grouped #station-menu .station-option[data-empty],
body.list-grouped #station-menu .station-option-count{display:none;}
.station-option-pic, .station-option-alert{display:none;}
body.list-grouped #station-menu .station-option{
  min-height:56px; position:relative; isolation:isolate; overflow:hidden;
  padding-right:66px; margin-bottom:6px; color:#fff;
}
body.list-grouped #station-menu .station-option:last-child{margin-bottom:0;}
body.list-grouped #station-menu .station-option-pic{
  display:block; flex:none; position:absolute; top:-10px; right:-10px; z-index:-1;
  width:62px; height:62px; rotate:-12deg; pointer-events:none;
  transition:rotate .29s var(--ease-in-out), translate .29s var(--ease-in-out);
}
body.list-grouped #station-menu .station-option:is(:active, :focus-visible) .station-option-pic{rotate:0deg; translate:-5px 5px;}
body.list-grouped #station-menu .station-option-pic .card-icon{width:100%; height:100%;}
body.list-grouped #station-menu .station-option-check{color:#EFD9BB;}
/* With the box gone, the frozen block ended in its empty wrap, so 14px of
   white sat under the tiles (the row's 6px + the wrap's 8px) against 8px
   above them. The user asked for the same gap top and bottom (2026-11-10):
   the tiles row carries the block's 8px bottom edge, the empty wrap none.
   The station list still opens from the wrap, just under the tiles. */
body.list-grouped #mcx-checklist-view .status-summary{padding-bottom:8px;}
body.list-grouped #mcx-checklist-view .frozen-summaries > .station-wrap{padding-bottom:0;}

/* ================= MOTION RULES (2026-11-15) =================
   ZUS-Design-System §6, the twenty rules. What each piece below is for:

   rule 3   .row-in: the first ten Markout rows arrive 30 ms apart on load
            (mcx-checklist.js staggerRowsIn), so a long list doesn't
            appear as one slab. Only the first ten, so it never takes long.
   rule 8   .saved-pulse: one ring round Update Checklist when a save
            lands. Once, never a loop.
   rule 4   the row pills and tab bar shrink to 0.97 while pressed.
   rule 16/20  already met before this pass: Checklist <-> Settings slide
            through the View Transitions API (VIEW TRANSITIONS near the top
            of this file); only its easing changed.

   Reduced motion switches all of it off (the block at the end). */
@keyframes rowIn{from{opacity:0; translate:0 6px;} to{opacity:1; translate:0 0;}}
.item-card.row-in{animation:rowIn .26s var(--ease-out) both;}

@keyframes savedPulse{
  0%{box-shadow:0 0 0 0 rgba(31,157,85,.55);}
  100%{box-shadow:0 0 0 12px rgba(31,157,85,0);}
}
.btn-submit.saved-pulse{animation:savedPulse .5s var(--ease-out) 1;}

/* The row pills already use `scale` for their swipe fade (PILL MOTION
   above), at that rule's strength, so the press matches it and stays out of
   a swipe in progress. The transition here is the one used on the way in:
   100 ms to press, the pills' own .35s to come back. */
body.list-grouped .item-class-rows .item-card:not(.swiping) .item-availability-ribbon:active{
  scale:var(--press-scale);
  transition:opacity .35s var(--ease-out), scale .1s var(--ease-out), background .4s ease, color .4s ease;
}
.tabbar-item{transition:color .2s ease, scale .1s var(--ease-out);}
.tabbar-item:active{scale:var(--press-scale);}

@media (prefers-reduced-motion: reduce){
  .item-card.row-in, .btn-submit.saved-pulse{animation:none;}
  .status-tile:active, .station-picker:active, .cal-day:active, .logout-link:active,
  .btn-submit:active, .tabbar-item:active,
  body.list-grouped .item-class-rows .item-card:not(.swiping) .item-availability-ribbon:active{scale:none;}
  .station-menu, .station-menu.open, .cal-popover, .cal-popover.show{transition:opacity .01s;}
}

/* ================= TAP TARGETS (2026-11-15) =================
   Controls staff tap all day that measured under 44 px on a 390 px phone.
   Each gets an invisible pad (::before) so its touch area grows while the
   look stays exactly as designed:
   - the row pills, 12 px wide: into the empty card padding beside them
     (the card's overflow:hidden clips the outer side). Both sides are
     padded because the Available pill is drawn rotated 180°;
   - the search box's ×, 24 px;
   - Settings' Edit / Remove text buttons, 20 x 16 px. Their pads stop short
     of each other (gap 14 px, pads 6 px a side).
   Left alone on purpose: the Settings station chips (22 px each, the user's
   call, 2026-10-22; stacked with no gap, so a pad would steal the
   neighbour's taps) and the row's date button (the whole row opens the
   calendar anyway). */
body.list-grouped .item-class-rows .item-availability-ribbon::before{
  content:""; position:absolute; top:-4px; bottom:-4px; left:-16px; right:-16px;
}
.item-search-clear::before{content:""; position:absolute; inset:-10px;}
.item-manage-btn{position:relative;}
.item-manage-btn::before{content:""; position:absolute; inset:-12px -6px;}
.add-item-toggle{min-height:44px;}
/* The tucked bar's gold handle is the only way back to the bar, and it is
   5 px tall. Tucked, the strip between the slim save bar and the screen's
   bottom edge is ~20 px; the pad fills that strip, 160 px wide, and no more,
   so it never covers Update Checklist. */
body.has-tabbar.tabbar-tucked .tabbar::after{
  content:""; position:absolute; left:50%; width:160px; margin-left:-80px;
  top:calc(-18px - env(safe-area-inset-bottom, 0px)); height:calc(18px + env(safe-area-inset-bottom, 0px));
}

/* =====================================================================
   THE NAVY STAGE (2026-11-16)
   =====================================================================
   One day of the user's asks, in one place. The main screen's header got
   ZUS DNA's stage ("refer to ZUS DNA blue background, there is some
   effect, apply it"), the user liked it, and asked for the hub to follow
   it everywhere navy is a surface: the bars, the station banners and
   menu, the frozen tiles, the big buttons, and big curved headers on every
   tool page. This section was rewritten the same evening from the layers
   those asks left behind; only the final look is here.

   --zus-stage  the navy itself: a sky-blue glow low on the right and a
                warm gold glow at the top, on a navy glow that runs from
                the hub blue at the top-left into ZUS Elite navy (#051D3C,
                the design system's tier colour) at the edges.
   the dots     DNA's faint dot grid, fading out to the right (::before).
   the light    one soft band of light crossing every surface left to
                right, the same 7 s clock everywhere, so it reads as one
                light passing over the screen card by card (::after).

   Layers inside a box (each box is isolation:isolate and clips):
     ::before  the dots           z -1, first, so under the drawing
     drawing   corner picture     z -1
     ::after   the light          z -1, last, so it passes over the drawing
     words     normal flow, above all three.

   Drawn to stay cheap on outlet tablets (the user: "it's laggy", fixed the
   same day): the light moves by transform only, which the graphics chip
   does without repainting; no background-attachment:fixed (it repainted
   every card on every scroll frame), no filter: blur, no blend modes.

   A deliberate exception to the design system's "no decorative looping
   animation" (§9), as ZUS DNA itself is, asked for by the user. Reduced
   motion turns every moving part off (end of this section). */
:root{
  --zus-stage:
    radial-gradient(55% 140% at 90% 130%, rgba(29,192,242,.30), transparent 70%),
    radial-gradient(45% 120% at 38% -40%, rgba(193,143,89,.24), transparent 70%),
    radial-gradient(130% 170% at 12% 0%, #283C9D 0%, #1B2C95 45%, #051D3C 100%);
  --zus-stage-dots:radial-gradient(rgba(255,255,255,.13) 1px, transparent 1.2px);
}

/* -- the dots and the light, on every stage surface --
   Each surface's light layer is its own width and its band 20% of it, so
   across the full-width cards the bands line up into one light. The
   station banners also undo the old ruled heading's two tan lines
   (.item-section-head::before/::after: 2px tall, flex 1, tan, 55% opacity),
   which once squashed these layers into a thin gold line. */
body.list-grouped .item-section-head.station-banner::before,
body.list-grouped #station-menu .station-option::before,
.app-bar::before, .desktop-brandbar::before, .btn-submit::before{
  content:""; display:block; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:var(--zus-stage-dots); background-size:18px 18px;
  -webkit-mask-image:linear-gradient(100deg, #000 10%, transparent 85%);
          mask-image:linear-gradient(100deg, #000 10%, transparent 85%);
}
body.list-grouped .item-section-head.station-banner::after,
body.list-grouped #station-menu .station-option::after,
.app-bar::after, .desktop-brandbar::after, .btn-submit::after{
  content:""; display:block; position:absolute; top:0; bottom:0; left:0; right:0; width:auto; height:auto;
  z-index:-1; pointer-events:none;
  background:linear-gradient(100deg, transparent 0%, transparent 40%, rgba(255,255,255,.08) 46%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.08) 54%, transparent 60%, transparent 100%) no-repeat;
  background-size:100% 100%;
  transform:translate3d(-100%, 0, 0);
  animation:lightPass 7s cubic-bezier(.65,0,.35,1) 1.2s infinite;
}
body.list-grouped .item-section-head.station-banner::before,
body.list-grouped .item-section-head.station-banner::after{flex:none; height:auto; border-radius:0; opacity:1; background-color:transparent;}
@keyframes lightPass{
  0%{transform:translate3d(-100%, 0, 0);}
  35%, 100%{transform:translate3d(100%, 0, 0);}
}

/* -- the station drawings, recoloured for navy --
   The five card-icon colours turned over for a dark ground (the user:
   "design how the station illustrations fit that colour"): bodies white,
   secondary parts pale blue (--surface-blue), screens and holes the hub's
   mid blue so they read as windows, gold and gold-light unchanged. The
   Settings section icons (set-*) recolour the same way. */
:is(.station-banner, #station-menu) .card-icon .ic-navy{fill:#FFFFFF;}
:is(.station-banner, #station-menu) .card-icon .ic-navy2{fill:#DFEAF5;}
:is(.station-banner, #station-menu) .card-icon .ic-white{fill:#283C9D;}
:is(.station-banner, #station-menu) .card-icon .ic-line-white{stroke:#283C9D;}
:is(.station-banner, #station-menu) .card-icon .ic-line-navy{stroke:#FFFFFF;}

/* -- station banners and the "Go to station" menu rows --
   Their shape lives with the rest of them (STATION BANNERS, THE BANNER IS
   THE STATION PICKER); this is their navy. A pressed menu row darkens; the
   row you're on (aria-selected) keeps the stage, with a gold-light ring. */
body.list-grouped #station-menu .station-option:active{background:#16277A;}
body.list-grouped #station-menu .station-option,
body.list-grouped #station-menu .station-option[aria-selected="true"]{background:var(--zus-stage);}
body.list-grouped #station-menu .station-option[aria-selected="true"]{box-shadow:inset 0 0 0 2px #EFD9BB;}

/* -- the frozen status tiles --
   A tile at rest (count 0) is on the stage. A tile with something in it
   (.alert-pulse) keeps its own flat colour, because its pulse animates
   background-color, blue to red / amber / grey, and the stage would sit on
   top of it; the script adds and removes .alert-pulse as counts change.
   StockTake's grey Not Counted and green Counted keep theirs: they mean
   something. Every tile gets a light at the top-left and a darker corner
   over its colour, and the dots.

   The light crosses a row of tiles as ONE band: every tile's ::after is the
   same layer, as wide as the whole row (--cols tiles plus the 6px gaps of
   .status-summary) and shifted left by the tile's place in it (--i), so
   each tile shows its own slice of one band.

   Each tile's corner icon (shared/templates/_status_icons.html) is white
   at 24%, a quiet mark behind the number; it straightens while the tile is
   pressed and on the tile whose filter is on. */
.status-tile{isolation:isolate; overflow:hidden;}
.status-tile:not(.alert-pulse):not(.sta-not-counted):not(.sta-counted){background:var(--zus-stage);}
.status-tile::before{
  content:""; display:block; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:
    var(--zus-stage-dots),
    radial-gradient(120% 110% at 10% 0%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(110% 110% at 100% 100%, rgba(5,29,60,.38), transparent 65%);
  background-size:18px 18px, 100% 100%, 100% 100%;
}
.status-summary{--cols:4;}
.status-summary.sta-tiles{--cols:3;}
.status-summary .status-tile:nth-child(1){--i:0;}
.status-summary .status-tile:nth-child(2){--i:1;}
.status-summary .status-tile:nth-child(3){--i:2;}
.status-summary .status-tile:nth-child(4){--i:3;}
.status-tile::after{
  content:""; display:block; position:absolute; top:0; bottom:0; right:0; height:auto; z-index:-1; pointer-events:none;
  left:calc(var(--i, 0) * -1 * (100% + 6px));
  width:calc(var(--cols, 4) * 100% + (var(--cols, 4) - 1) * 6px);
  background:linear-gradient(100deg, transparent 0%, transparent 40%, rgba(255,255,255,.08) 46%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.08) 54%, transparent 60%, transparent 100%) no-repeat;
  background-size:100% 100%;
  transform:translate3d(-100%, 0, 0);
  animation:lightPass 7s cubic-bezier(.65,0,.35,1) 1.2s infinite;
}
.status-tile .tile-ico{
  position:absolute; top:-7px; right:-7px; z-index:-1;
  width:34px; height:34px; rotate:-12deg; color:#fff; opacity:.24; pointer-events:none;
  transition:rotate .29s var(--ease-in-out), translate .29s var(--ease-in-out);
}
.status-tile .tile-ico svg{display:block; width:100%; height:100%;}
.status-tile:active .tile-ico,
.status-summary.filtering .status-tile.active .tile-ico{rotate:0deg; translate:-4px 4px;}

/* -- the big buttons --
   Update Checklist / Store Audit, Save and Submit (.btn-submit) get the
   stage, the dots and the light; Print Cart, the scan and rack buttons, the
   tutorial's Next and SEA's primary buttons get the stage. The unsaved-edit
   pulse and the armed amber set the background over it. Hover on a laptop
   lightens to flat blue. Small navy marks (selected calendar day, step
   numbers, icon tiles) stay flat: at that size glows and dots are noise. */
.btn-primary, .btn-submit, .print-cart-btn, .scan-camera-btn, .scan-rack-shoot,
.rack-result-apply, .tutorial-pager-link.next, .sea-btn.primary{
  background:var(--zus-stage);
}
.btn-submit{position:relative; isolation:isolate; overflow:hidden;}
.btn-submit.confirm{background:var(--status-soon);}
.btn-primary:hover:not(:disabled), .btn-submit:hover:not(.confirm):not(:disabled), .print-cart-btn:hover:not(:disabled){background:var(--blue);}
/* Settings' Save, alone in its bar since Close went: a lone button fills
   the row, like Update Checklist. */
.sheet-bottom-row > .btn-submit:only-child{flex:1 1 100%; width:100%; max-width:none;}
/* Except the autosave line (2026-11-19): it hugs its words, centred, so it
   reads as a note and not as a full-width button. */
.sheet-bottom-row > .btn-submit.autosave-line:only-child{flex:0 1 auto; width:auto; margin:0 auto;}

/* =====================================================================
   THE MAIN SCREEN'S HEADER, AND THE BIG CURVED HEADER ON EVERY PAGE
   =====================================================================
   .hero-fx is the stage at full strength, behind the main screen's
   greeting (#home-hero) and every tool page's big header (.app-bar-big):
   the navy glow, three soft glows drifting slowly (blue / sky / gold, soft
   radial gradients rather than a blurred shape), DNA's dot grid panning one
   cell every 40 s, the light, and a still film grain. */
.hero-fx{
  position:absolute; inset:0; z-index:-1; overflow:hidden; border-radius:inherit; pointer-events:none;
  background:radial-gradient(120% 100% at 50% 0%, #283C9D 0%, #1B2C95 40%, #051D3C 100%);
}
.hero-blob{position:absolute; border-radius:50%;}
.hero-blob-1{width:300px; height:300px; top:-150px; left:-100px; background:radial-gradient(circle closest-side, rgba(40,60,157,1), rgba(40,60,157,0)); opacity:.6; animation:heroDrift1 22s ease-in-out infinite alternate;}
.hero-blob-2{width:240px; height:240px; top:0; right:-120px; background:radial-gradient(circle closest-side, rgba(29,192,242,1), rgba(29,192,242,0)); opacity:.22; animation:heroDrift2 26s ease-in-out infinite alternate;}
.hero-blob-3{width:240px; height:240px; bottom:-170px; left:18%; background:radial-gradient(circle closest-side, rgba(193,143,89,1), rgba(193,143,89,0)); opacity:.2; animation:heroDrift3 30s ease-in-out infinite alternate;}
@keyframes heroDrift1{to{transform:translate(90px, 50px) scale(1.15);}}
@keyframes heroDrift2{to{transform:translate(-80px, 30px) scale(.9);}}
@keyframes heroDrift3{to{transform:translate(70px, -40px) scale(1.1);}}
.hero-dots{
  position:absolute; inset:-24px;
  background-image:radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.2px); background-size:24px 24px;
  -webkit-mask-image:radial-gradient(90% 85% at 50% 15%, #000, transparent);
          mask-image:radial-gradient(90% 85% at 50% 15%, #000, transparent);
  animation:heroPan 40s linear infinite;
}
@keyframes heroPan{to{transform:translate(24px, 24px);}}
.hero-shine{
  position:absolute; top:0; bottom:0; left:0; right:0; width:auto; height:auto; pointer-events:none;
  background:linear-gradient(100deg, transparent 0%, transparent 40%, rgba(255,255,255,.08) 46%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.08) 54%, transparent 60%, transparent 100%) no-repeat;
  background-size:100% 100%;
  transform:translate3d(-100%, 0, 0);
  animation:lightPass 7s cubic-bezier(.65,0,.35,1) 1.2s infinite;
}
.hero-grain{
  position:absolute; inset:0; opacity:.05;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* -- the main screen's bar --
   See-through over the greeting header, whose stage starts at the top of
   the page behind the fixed bar, so the two read as one block; solid stage
   with dots once the page scrolls (body.home-scrolled, home.html), so the
   cards never show through. The install banner wears the same. */
body.hub-body.home-v2 .home-topbar{
  background:transparent; border-bottom-color:transparent;
  transition:background-color .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s var(--ease-out);
}
.oo-install-banner{background:var(--zus-stage-dots) 0 0 / 18px 18px, var(--zus-stage);}
body.home-v2 .home-outlet-name{color:#fff;}
body.home-v2 .home-outlet-code{color:rgba(255,255,255,.6);}
body.home-v2 .home-outlet-change{background:rgba(255,255,255,.14); color:#fff;}
body.home-v2 .home-topbar .logout-link{color:rgba(255,255,255,.85);}
body.home-v2 .home-topbar .logout-link:active{background:rgba(255,255,255,.12);}

/* -- the app bar's contents (shared/templates/_app_bar.html) --
   The user, 2026-11-16: no ZUS mark; "ZUS Outlet Hub" over the outlet's
   name on the left, A-/A+ beside Log out on the right. min-width:0 lets a
   long outlet name shorten with "…" instead of pushing the buttons off a
   phone. "ZUS Outlet Hub" goes back to the main screen on every page but
   that one. */
.home-bar2{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.home-brand{display:flex; flex-direction:column; gap:2px; min-width:0;}
.home-brand-name{
  font-family:"Poppins", ui-sans-serif, system-ui, sans-serif; font-weight:800;
  font-size:18px; line-height:1.1; letter-spacing:-0.015em; color:#fff; white-space:nowrap;
}
.home-bar2 .home-outlet{
  display:flex; align-items:center; justify-content:flex-start; gap:6px;
  max-width:none; margin:0; padding:0; min-width:0;
}
.home-bar-actions{display:flex; align-items:center; gap:6px; flex:none;}
a.home-brand-name:active{opacity:.7;}
/* Three cells (2026-11-20): A A | name + outlet | log out icon. The two
   side columns get the same minimum, so the name holds the true centre of
   the bar whatever sits either side of it. */
.home-bar3{display:grid; grid-template-columns:minmax(66px, 1fr) minmax(0, auto) minmax(66px, 1fr); gap:8px;}
.home-bar3 .home-brand{align-items:center; text-align:center;}
.home-bar3 .home-brand-name{font-size:16px;}
.home-bar3 .home-outlet{justify-content:center; max-width:100%;}
.home-bar3 .home-bar-actions{justify-self:end;}
.home-bar3 .logout-link.icon-link{width:36px; height:36px; padding:0; border-radius:999px;}
.home-bar3 .logout-link.icon-link svg{width:20px; height:20px;}
.home-bar3 .logout-link.icon-link.confirm{width:auto; height:auto; padding:7px 10px; border-radius:9px;}
/* Narrow phones: "Change ▾" shrinks to "▾" so the outlet's name keeps the
   room (it read "A…" at 320px). The link keeps its aria-label. */
@media (max-width:380px){
  .home-bar3 .home-outlet-change{font-size:0; padding:4px 8px;}
  .home-bar3 .home-outlet-change::after{content:"▾"; font-size:12px;}
}

/* -- the app bar on every signed-in page --
   In the page's flow, not fixed: it scrolls away, and the tool pages'
   frozen tiles (.frozen-summaries, sticky at top:0) pin to the very top as
   before. Markout at 1200px+ keeps its fixed .desktop-brandbar (its script
   measures that bar) with the same contents; the plain bar hides there. */
.app-bar{
  position:relative; isolation:isolate; overflow:hidden;
  background:var(--zus-stage); padding-top:env(safe-area-inset-top); --text-scale:1;
}
:is(.app-bar, .desktop-brandbar) .home-brand-name{color:#fff; text-decoration:none;}
:is(.app-bar, .desktop-brandbar) .home-outlet-name{color:#fff;}
:is(.app-bar, .desktop-brandbar) .home-outlet-code{color:rgba(255,255,255,.6);}
:is(.app-bar, .desktop-brandbar) .home-outlet-change{background:rgba(255,255,255,.14); color:#fff;}
:is(.app-bar, .desktop-brandbar) .logout-link{color:rgba(255,255,255,.85);}
:is(.app-bar, .desktop-brandbar) .logout-link:active{background:rgba(255,255,255,.12);}
@media (min-width:1200px){
  body.mcx-checklist-page[data-view="checklist"] .app-bar{display:none;}
  body.mcx-checklist-page[data-view="checklist"] .desktop-brandbar{
    background:var(--zus-stage); border-bottom:none; --text-scale:1; isolation:isolate; overflow:hidden;
  }
  .desktop-brandbar .home-bar2{max-width:none; width:100%; padding:0;}
}

/* -- the big, curved header (app_bar with a title) --
   The main screen's header on a tool page: the bar, then the date and the
   tool's name in large type where the main screen says "Good morning",
   rounded 28px at the bottom, on .hero-fx (so the slim bar's own dots and
   light switch off). Every signed-in page has one. Markout's Settings tab
   shares Markout's page, so it reads "Markout Checklist" too. */
.app-bar-big{border-radius:0 0 28px 28px; padding-bottom:22px; margin-bottom:4px;}
.app-bar-big::before, .app-bar-big::after{display:none;}
.app-bar-hero{max-width:720px; margin:0 auto; padding:6px calc(20px + env(safe-area-inset-right)) 0 calc(20px + env(safe-area-inset-left));}
.app-bar-date{margin:0; font-size:13px; font-weight:600; color:rgba(255,255,255,.7);}
.app-bar-title{margin:2px 0 0; font-size:24px; font-weight:700; line-height:1.15; color:#fff; letter-spacing:-0.01em;}
/* The outlet picker's card starts just under the header, not mid-screen. */
.app-bar-big ~ .auth-page{min-height:0; align-items:flex-start; padding-top:16px;}

/* =====================================================================
   SETTINGS (Markout Settings, Store Expiry Audit Settings), 2026-11-16
   =====================================================================
   - Each section is headed by the same banner as the checklists
     (.settings-banner): the name and its drawing (a station, or a set-*
     icon for New Item Added, Item Renamed, Item Removed, At more than one
     station). No date line or station menu here.
   - The banner is sticky inside its own section, so it stays at the top
     while its section scrolls past and the next one pushes it away.
   - "+ Add New Item" pins to the top above them (on the page's colour, so
     the list slides under it); the banners pin just below it
     (--settings-pin-h: its 44px plus 8px above and below). Not while it's
     open into the New Item form: pinned, a form that tall would cover the
     list, so it scrolls then and the banners pin at the very top. */
body.list-grouped{--settings-pin-h:60px;}
body.list-grouped .item-section-head.station-banner.settings-banner{margin:12px 0 8px; height:56px;}
body.list-grouped .settings-banner .order-changed-tag{color:#EFD9BB; font-size:calc(11px * var(--text-scale)); font-weight:700;}
body.list-grouped #mcx-settings-view .item-section-head.station-banner,
body.list-grouped .sea-set-section > .item-section-head.station-banner,
body.list-grouped .sea-new-section > .item-section-head.station-banner{
  position:sticky; top:var(--settings-pin-h); z-index:4;
}
body.list-grouped #mcx-settings-view .add-item:not(:has(.add-item-form.open)),
body.list-grouped .sheet-page > .add-item:not(:has(.add-item-form.open)){
  position:sticky; top:0; z-index:6;
  margin-top:0; padding:8px 0; background:var(--surface-page);
}
body.list-grouped #mcx-settings-view:has(.add-item-form.open) .item-section-head.station-banner,
body.list-grouped .sheet-page:has(> .add-item .add-item-form.open) .item-section-head.station-banner{top:0;}

/* -- the Edit card --
   The user: "when pressing Edit the card is so bloated, it looks like the
   old design". While editing, the station column steps aside so the form
   has the card's full width; fields 40px (text stays 16px: below that an
   iPhone zooms in on tap); Shelf Life and Alert Days share a row; Save
   (the stage) and Cancel (outlined) are real 44px buttons. */
.item-card.position-card.editing{padding:14px; min-height:0;}
.position-card.editing .position-stack{display:none;}
.position-card.editing .item-edit{gap:12px;}
.position-card.editing .add-item-field{gap:5px;}
.position-card.editing .add-item-field input,
.position-card.editing .add-item-field select{height:40px; padding:0 12px; border-radius:10px;}
.position-card.editing .item-days-eod-row{min-height:40px; padding:4px 10px; border-radius:10px;}
.position-card.editing .add-item-sticker{padding:10px; gap:8px; border-radius:12px;}
.position-card.editing .add-item-sticker-result{font-size:calc(11.5px * var(--text-scale)); line-height:1.35; margin:0;}
.position-card.editing .item-days-actions{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:2px;}
.position-card.editing .item-days-actions .item-manage-btn{
  display:flex; align-items:center; justify-content:center; min-height:44px; padding:0 14px;
  border-radius:12px; font-size:calc(14px * var(--text-scale)); font-weight:700;
}
.position-card.editing .item-manage-btn[data-action="edit-save"]{background:var(--zus-stage); color:#fff;}
.position-card.editing .item-manage-btn[data-action="edit-save"].confirm{background:var(--status-soon);}
.position-card.editing .item-manage-btn[data-action="edit-cancel"]{background:var(--surface-card); color:var(--navy); box-shadow:inset 0 0 0 1.5px var(--navy);}
/* Date fields have a large built-in minimum width; without this the two
   date boxes pushed the card (and Add New Item) past a phone's edge. */
.add-item-field input[type="date"]{min-width:0; max-width:100%;}

/* -- the tutorial's back button --
   Pinned at the bottom in Update Checklist's bar and style ("All Parts" on
   a part, "Back to Hub" on the menu). A link laid out like the button it
   looks like; the page keeps room so the bar never covers the last part or
   Previous / Next. */
.tutorial-page .tutorial-main{padding-bottom:calc(84px + env(safe-area-inset-bottom));}
.settings-page .hub-settings{padding-bottom:calc(84px + env(safe-area-inset-bottom));}
.tutorial-back-btn{
  display:flex; align-items:center; justify-content:center; gap:8px;
  color:#fff; text-decoration:none; box-sizing:border-box;
}
.tutorial-back-btn svg{width:8px; height:14px; flex:none;}
.tutorial-bottom{border-top:none; background:transparent;}

/* -- reduced motion: nothing on the stage moves -- */
@media (prefers-reduced-motion: reduce){
  body.list-grouped .item-section-head.station-banner::after,
  body.list-grouped #station-menu .station-option::after,
  .app-bar::after, .desktop-brandbar::after, .btn-submit::after,
  .status-tile::after, .hero-shine{display:none;}
  .hero-blob, .hero-dots{animation:none;}
  body.list-grouped .station-banner .sb-pic,
  body.list-grouped #station-menu .station-option-pic,
  .status-tile .tile-ico{transition:none;}
}

/* SEA's banners open "Go to station" too (2026-11-16): the same press, focus
   ring and corner-drawing nudge as Markout's (THE BANNER IS THE STATION
   PICKER), and the same zero gap under its tiles for the list's wrap. */
body.list-grouped.sea-page .station-banner[data-station-banner]{cursor:pointer; -webkit-tap-highlight-color:transparent; transition:transform .15s ease;}
body.list-grouped.sea-page .station-banner[data-station-banner]:active{transform:scale(.985);}
body.list-grouped.sea-page .station-banner[data-station-banner]:focus-visible{outline:2px solid var(--navy); outline-offset:2px;}
body.list-grouped.sea-page .station-banner[data-station-banner]:active .sb-pic{rotate:0deg; translate:-6px 6px;}
body.list-grouped.sea-page .frozen-summaries > .station-wrap{padding-bottom:0;}

/* ============ "GO TO STATION" POPS UP IN THE MIDDLE (2026-11-16) =========
   The user: "when we press the positioning filter, it pops up in the middle
   of the screen, like the calendar". On Markout and Store Expiry Audit the
   station list is now a centred pop-up like the date picker (.cal-popover):
   as wide as a phone allows up to 380px, rounded 20px, growing from 0.95
   in the middle (motion rule 10) and shrinking back on close, over the
   dimmed page. It was a panel dropping down under the tiles.

   It still lives inside the frozen tile block, which is its own layer
   (sticky, z-index 5) under the bottom bar and tab bar. While it's open
   that block is lifted above everything (95, over the calendar's 90/91
   pair), so the pop-up and its dim cover the whole screen, bars included. */
body.list-grouped #station-menu{
  position:fixed; left:50%; top:50%; right:auto;
  width:min(380px, calc(100vw - 24px)); max-height:calc(100dvh - 24px);
  padding:10px; border-radius:20px; box-shadow:0 16px 40px rgba(16,24,40,0.24);
  transform:translate(-50%, -50%) scale(.95); transform-origin:center;
}
body.list-grouped #station-menu.open{transform:translate(-50%, -50%) scale(1);}
body.list-grouped .frozen-summaries:has(#station-menu.open){z-index:95;}

/* SEA's pinned banner sits like Markout's (2026-11-16): 4px below the
   tiles rather than flush, with the page's colour filling those 4px so the
   rows scrolling underneath don't flicker through the gap. */
body.list-grouped.sea-page .item-section-head.station-banner{
  top:calc(var(--frozen-h, 0px) + 4px);
  box-shadow:0 -4px 0 0 var(--surface-page), 0 6px 12px -10px rgba(16,24,40,0.35);
}

/* ============ EDIT POP-UP (2026-11-16) ===================================
   The user: "when editing or adding there are two Save buttons, very
   confusing; make the selected item pop up and stop the page scrolling".
   static/edit-popup.js marks the open form [data-edit-popup] (Markout's Edit
   card and Add New Item, SEA's Add New Item and its row's edit) and the page
   html[data-edit-popup-open]. The form becomes a centred pop-up like the date picker
   (380px wide up to 420px, rounded 20px, over the same dim), the page behind
   stops scrolling, and the bottom bar with the page's Save is hidden, so
   the pop-up's own Save / Add Item is the only one.

   !important on the placement only: the cards' own rules (position:relative,
   overflow:hidden, margins) are more specific, and a pop-up has to win over
   all of them while it's open. */
.edit-popup-backdrop{
  position:fixed; inset:0; background:rgba(10,20,50,0.32);
  opacity:0; pointer-events:none; transition:opacity .16s var(--ease-exit);
}
html[data-edit-popup-open] .edit-popup-backdrop{opacity:1; pointer-events:auto; transition:opacity .2s var(--ease-out);}
html[data-edit-popup-open] body{overflow:hidden;}
html[data-edit-popup-open] .sheet-bottom{display:none;}
[data-edit-popup]{
  position:fixed !important; left:50% !important; top:50% !important; right:auto !important; bottom:auto !important; margin:0 !important;
  width:min(380px, calc(100vw - 24px)) !important; overflow:auto !important;
  border-radius:20px !important; background:var(--surface-card); box-shadow:0 16px 40px rgba(16,24,40,0.28) !important;
  /* Markout's Settings cards slide their transform for drag-and-drop
     (.position-card.sortable, 0.25 s). A running transition outranks even
     !important, so the card used to glide from its place in the list
     towards the middle instead of simply appearing there like the date
     picker. No transitions while it's the pop-up. */
  transition:none !important;
}
@keyframes editPopIn{from{opacity:0; scale:.95;}}
@media (prefers-reduced-motion: reduce){ [data-edit-popup]{animation:none;} }

/* ============ FASTER SETTINGS PAGES (2026-11-16) =========================
   The user: "check the apps again to improve speed and responsiveness".
   Markout Settings is the hub's heaviest page (~14,000 elements: every
   item's six station chips), Store Expiry Audit Settings next. Each section
   now lets the browser skip laying out and painting it until it's near the
   screen (content-visibility:auto); contain-intrinsic-size keeps a size for
   it meanwhile, remembered once it has been seen, so the scrollbar doesn't
   jump. A section's banner still pins inside it, as before.

   Not on the checklists: there, "Go to station" scrolls to a section by
   measuring the ones above it, and skipped sections would throw that off. */
body.list-grouped #mcx-settings-view .item-section,
body.list-grouped .sea-set-section{content-visibility:auto; contain-intrinsic-size:auto 900px;}
/* But never the section holding an open Edit pop-up: content-visibility
   boxes a section in (containment), and a pop-up inside a boxed section
   is placed and clipped by that section instead of the screen, and sits
   under the dim. That broke the Edit pop-up the day it shipped (the user
   found it, 2026-11-16). */
body.list-grouped #mcx-settings-view .item-section:has([data-edit-popup]),
body.list-grouped .sea-set-section:has([data-edit-popup]){content-visibility:visible;}

/* AVAIL and OK are a plain blue pill, no word (the user, 2026-11-16: "for
   avail and ok, only show the blue pill"). They're the normal state of
   nearly every row, so the word added nothing; the coloured pills that do
   need reading (EXP, EXP-S, MISS, OOS, EOD) keep theirs. An armed pill
   still asks its question (OOS? / PRINT?), and screen readers still hear
   the button's own text. */
body.list-grouped .item-class-rows .item-availability-ribbon.available:not(.confirm):not(.eod)::after{content:"";}

/* ============ THE EDIT POP-UP, REVAMPED (2026-11-16) =====================
   The user: "in Settings, make the edit pop-up on top, then revamp its
   looks to be more modern".

   On top: it sits just below the top of the screen instead of the middle.
   Typing a name opens the phone's keyboard over the bottom half, which hid
   a centred pop-up's Save; at the top, with its height held to the visible
   screen (dvh shrinks with the keyboard), the form scrolls inside it and
   the action bar stays reachable. It's also layered above every bar on the
   page (306 over the dim's 305).

   Modern: a navy header band (the hub's stage) naming what you're doing,
   "Edit Item" or the form's own "New Item", held at the top while the form
   scrolls; softer filled fields (pale, no hard border, 44px, 12px corners,
   a navy ring while typing); the EOD switch and the sticker box in the same
   style; and the actions in a bar pinned to the pop-up's bottom, Save /
   Add Item on the stage and Cancel outlined, 48px. Same for Markout's Edit
   card and both tools' Add New Item. */
.edit-popup-backdrop{z-index:305;}
[data-edit-popup]{
  top:max(12px, env(safe-area-inset-top)) !important; transform:translate(-50%, 0) !important;
  max-height:calc(100dvh - 24px - env(safe-area-inset-top)) !important;
  z-index:306 !important; padding:0 !important; overscroll-behavior:contain;
  animation:editDropIn .22s var(--ease-out);
}
@keyframes editDropIn{from{opacity:0; translate:0 -12px;}}
@media (prefers-reduced-motion: reduce){ [data-edit-popup]{animation:none;} }

/* -- the header band -- */
.position-card[data-edit-popup]::before{ top:0; z-index:3;
}

/* -- the body -- */
.position-card[data-edit-popup] .new-item-tag{margin:12px 18px 0;}
[data-edit-popup] .add-item-field input,
[data-edit-popup] .add-item-field select{ border:1px solid transparent; border-radius:12px; background:var(--surface-tint);
}
[data-edit-popup] .add-item-field input:focus,
[data-edit-popup] .add-item-field select:focus{
  background:#fff; border-color:var(--navy); box-shadow:0 0 0 3px rgba(22,39,122,.10); outline:none;
}
[data-edit-popup] .item-days-eod-row,
[data-edit-popup] .add-item-eod{ border:none; border-radius:12px; background:var(--surface-tint);}
[data-edit-popup] .add-item-sticker{background:#fff; border:1px solid var(--line); border-radius:14px;}

/* -- the action bar, pinned to the pop-up's bottom -- */
.position-card[data-edit-popup] .item-days-actions,
.add-item-form[data-edit-popup] .add-item-actions{
  position:sticky; bottom:0; z-index:3; display:grid; grid-template-columns:1fr 1fr;
  margin:6px 0 0;
  background:var(--surface-card); border-top:1px solid var(--line);
}
.position-card[data-edit-popup] .item-days-actions .item-manage-btn,
.add-item-form[data-edit-popup] .add-item-actions .btn-submit{ border-radius:14px; font-size:calc(15px * var(--text-scale));}
/* The main action on the right in every pop-up: Add Item already is, so
   Edit's Save moves there too (Cancel left, Save right). */
.position-card[data-edit-popup] .item-manage-btn[data-action="edit-save"]{order:2;}

/* ============ THE POP-UP, TRIMMED (2026-11-16) ===========================
   The user: "too bloated; remove the New / Renamed markers from the edit
   pop-up; make the Edit Item banner standard".
   - The New / Renamed markers stay on the cards in the list, not in Edit.
   - The header is the hub's standard banner, the same as the station
     banners and the "Go to station" cards: 56px, the stage with its dots,
     the title in 15px bold, a subtitle in the banner's small gold-light
     line (where a station banner shows the date).
   - Tighter: 10px between fields, 42px fields (text stays 16px so an iPhone
     doesn't zoom), a slimmer action bar. */
.position-card[data-edit-popup] .new-item-tag{display:none;}
.position-card[data-edit-popup]::before{ flex-direction:column; justify-content:center; gap:1px; box-sizing:border-box;
}
.position-card[data-edit-popup]::before{font-size:calc(15px * var(--text-scale)); font-weight:700; letter-spacing:0; line-height:1.2; color:#fff;}
.add-item-form[data-edit-popup]{gap:10px;}
.add-item-form[data-edit-popup] > :not(.add-item-head){margin-left:16px; margin-right:16px;}
[data-edit-popup] .add-item-field{gap:4px;}
[data-edit-popup] .add-item-field input,
[data-edit-popup] .add-item-field select{height:42px; padding:0 12px;}
[data-edit-popup] .item-days-eod-row,
[data-edit-popup] .add-item-eod{min-height:42px; padding:4px 10px;}
[data-edit-popup] .add-item-sticker{padding:10px; gap:8px;}
.position-card[data-edit-popup] .item-days-actions,
.add-item-form[data-edit-popup] .add-item-actions{gap:8px; margin-top:4px; padding:10px 16px calc(10px + env(safe-area-inset-bottom));}
.position-card[data-edit-popup] .item-days-actions{margin-left:-16px; margin-right:-16px;}
.add-item-form[data-edit-popup] .add-item-actions{margin-left:0; margin-right:0;}
.position-card[data-edit-popup] .item-days-actions .item-manage-btn,
.add-item-form[data-edit-popup] .add-item-actions .btn-submit{min-height:44px;}

/* ============ FILTER ON, AT A GLANCE (2026-11-16) ============
   The user: "when a barista presses a filter (Expired and the others) there
   is no indicator saying it's on". The old cue was a 2px white inner ring and
   the other tiles at 45%, which the tiles' own pulse animation could cover,
   and white-on-navy barely shows anyway.
   Now, on every page with these tiles (Markout, SEA, Staff Certificates):
   the tapped tile gets a gold ring with a soft halo, the others go pale and
   grey, and a line under the row says the list is filtered and how to undo it.
   !important beats the alert-pulse animation, which would otherwise keep the
   dimmed tiles at full strength. */
.status-summary.filtering .status-tile:not(.active){opacity:.38 !important; filter:saturate(.25);}
.status-summary.filtering .status-tile.active{
  opacity:1 !important;
  outline:3px solid #F2C14E; outline-offset:2px;
  box-shadow:0 0 0 7px rgba(242,193,78,.28) !important;
}
.status-summary.filtering::after{
  content:"Filter on · tap the gold tile again to show everything";
  grid-column:1 / -1;
  display:flex; align-items:center; justify-content:center; gap:6px;
  margin-top:4px; padding:6px 10px; border-radius:99px;
  /* Red stage (the user, 2026-11-16: "red, white text, dotted, light pass"):
     the hub navy stage's recipe in the Expired red. Layers, top first: the
     passing light, the dots, a soft top-left glow, then the red. The light
     is a background layer that slides (a pseudo-element can't hold its own
     moving layer); one thin strip, so it's cheap. Same 7s pass and curve as
     the tiles' light, so the two move together. */
  background:
    linear-gradient(100deg, transparent 40%, rgba(255,255,255,.10) 46%, rgba(255,255,255,.26) 50%, rgba(255,255,255,.10) 54%, transparent 60%) no-repeat,
    radial-gradient(rgba(255,255,255,.18) 1px, transparent 1.2px),
    radial-gradient(120% 140% at 10% 0%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(135deg, #E04848, var(--status-expired) 45%, #A8272B);
  background-size:300% 100%, 14px 14px, 100% 100%, 100% 100%;
  background-position:150% 0, 0 0, 0 0, 0 0;
  animation:filterLightPass 7s cubic-bezier(.65,0,.35,1) 1.2s infinite;
  color:#fff; box-shadow:0 2px 6px -2px rgba(160,30,35,.45);
  font-size:calc(11px * var(--text-scale)); font-weight:700; line-height:1.25; text-align:center;
  text-shadow:0 1px 1px rgba(0,0,0,.18);
}
@keyframes filterLightPass{
  0%{background-position:150% 0, 0 0, 0 0, 0 0;}
  35%, 100%{background-position:-50% 0, 0 0, 0 0, 0 0;}
}
@media (prefers-reduced-motion: reduce){ .status-summary.filtering::after{animation:none;} }

/* ============ NO BLUE TAP BOX (2026-11-16) ============
   The user: "when we press a button there's a blue box flashing". That's the
   phone browser's own tap highlight (Android Chrome paints a translucent
   blue box over anything tappable). Only some buttons turned it off, one by
   one; this turns it off for every element, once (the property inherits).
   Presses still show: every button shrinks a little when pressed.
   A focus ring stays for keyboards (:focus-visible above), never for a tap. */
html{-webkit-tap-highlight-color:transparent;}
:focus:not(:focus-visible){outline:none;}

/* ============ THE DESKTOP PANEL ON THE STAGE (2026-11-16) ============
   The user: "update the desktop design to match the new Markout styling,
   blue dotted, pass light". Markout's laptop side panel (Quick Tip, then
   Expired / Expiring Soon / Missing Date) was plain white cards. Now the tip
   card and each list's header sit on the hub's navy stage, the same as the
   app bar and station banners: the dots, and one light passing on the
   shared 7s clock. The lists themselves stay white, so the item names read
   as easily as before, and status colour stays on the dot, count and days. */
.attention-tips,
.attention-group-head{
  position:relative; isolation:isolate; overflow:hidden;
  background:var(--zus-stage-dots) 0 0 / 18px 18px, var(--zus-stage);
  border:none;
}
.attention-tips{box-shadow:0 8px 20px -10px rgba(5,29,60,.45);}
.attention-tips::after,
.attention-group-head::after{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(100deg, transparent 40%, rgba(255,255,255,.08) 46%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.08) 54%, transparent 60%) no-repeat;
  transform:translate3d(-100%, 0, 0);
  animation:lightPass 7s cubic-bezier(.65,0,.35,1) 1.2s infinite;
}
/* Tip card: white words on navy, the label in the banners' light gold. */
.attention-tip-title{color:#fff;}
.attention-tip-body{color:rgba(255,255,255,.82);}
.attention-tip-label{color:#EFD9BB;}
.attention-tip-icon{background:rgba(255,255,255,.14); color:#fff;}
.attention-tip.safety .attention-tip-label{color:#FFB3AE;}
.attention-tip.safety .attention-tip-icon{background:var(--status-expired); color:#fff;}
.attention-tip-dot{background-color:#fff; opacity:.35;}
.attention-tip-dot.active{background-color:#fff; opacity:1;}
.attention-tip-dot:focus-visible{outline-color:#fff;}
/* List headers: a station banner's look. The status dot keeps its colour,
   ringed white so red and amber still read on navy; the count is white. */
.attention-group{border:none; box-shadow:0 8px 20px -12px rgba(5,29,60,.35);}
.attention-group-head{border-bottom:none;}
.attention-group-title{color:#fff;}
.attention-group-sub{color:#EFD9BB;}
.attention-dot{width:10px; height:10px; box-shadow:0 0 0 2px rgba(255,255,255,.9);}
.attention-count{color:#fff;}
.attention-group.empty .attention-count{color:rgba(255,255,255,.55);}
@media (prefers-reduced-motion: reduce){
  .attention-tips::after, .attention-group-head::after{display:none;}
}

/* ============ ONE DATE BOX SIZE (2026-11-16) ============
   The user: "the date box is too big: 31-03-2028 is short but the box is so
   wide, lots of space beside the date. Make it shorter and standardize it."
   It was a fixed 116px, and on SEA and the laptop view it stretched further.
   Now one size everywhere, Markout, SEA, Staff Certificates: just wide
   enough for a full dd-mm-yyyy (10 digit-widths plus its padding), in ch so
   it grows with A- / A+. A short date ("16-11") sits centred in the same
   box, so the dates line up down the list.
   Narrower on 2026-11-23 (the user: "make the date box reduce the width"),
   from 10ch + 22px (~100px) to 9ch + 14px (~84px), with 3px side padding
   instead of 8px. Measured in Poppins at 12px: the widest things it holds
   are a full "31-03-2028" (69.7px, bold) and "Select date" (67.8px,
   regular; Bahasa's "Pilih tarikh" is shorter); both still fit with a few
   px spare, and the box still grows with A- / A+ since it is in ch. */
.date-input-wrap{width:auto;}
.date-trigger,
.sea-batch .date-trigger{
  flex:none; width:calc(9ch + 14px); box-sizing:border-box;
  padding:5px 3px; text-align:center; white-space:nowrap; font-variant-numeric:tabular-nums;
}

/* ============ NAVY, NOT GREEN (2026-11-16) ============
   "Good" (Today on the swipe, Go on a reorder, StockTake's Counted, Done in
   the tutorial, the main screen's New Items chip) is the hub navy, through
   the --status-ok tokens at the top (the user: "standardize to blue",
   after a short-lived gold). Words on a solid navy mark are white. */
.item-card.swipe-armed[data-swipe="today"] .swipe-reveal,
.status-tile.sta-counted,
.item-count-ribbon.counted,
.reorder-count.go span{color:#fff;}

/* ============ MARKOUT SETTINGS: THE EDIT SHEET (2026-11-19) ==============
   The user: "when press edit button in markout setting, the edit panel so
   bloated, modernize it". It was a 574px stack: a navy "Edit Item" band,
   a labelled box per field, the sticker's two dates always open, then
   Cancel and Save side by side.

   Now a bottom sheet, like Remove's and the station picker: a handle, the
   item's name with a ✕ (the old Cancel), and two grouped cards of 48px
   rows with hairlines between them (the design system's grouped section),
   label on the left, value on the right. The sticker dates fold under the
   shelf life's "Change". One full-width Save at the bottom.

   Only Markout's Edit (.position-card); Add New Item and Store Audit's
   pop-ups keep the drop-down style above. !important where the general
   [data-edit-popup] placement uses it. */
.position-card[data-edit-popup]{
  top:auto !important; bottom:0 !important; left:0 !important; right:0 !important;
  transform:none !important; width:auto !important; max-width:520px; margin:0 auto !important;
  max-height:calc(100dvh - 24px - env(safe-area-inset-top)) !important;
  border-radius:20px 20px 0 0 !important; box-shadow:0 -12px 32px rgba(22,39,122,0.22) !important;
  animation:esUp .22s var(--ease-out);
}
@keyframes esUp{from{transform:translateY(32px); opacity:0;}}
@media (prefers-reduced-motion: reduce){ .position-card[data-edit-popup]{animation:none;} }
/* The old "Edit Item" band becomes the sheet's handle. */
.position-card[data-edit-popup]::before{
  content:""; display:block; position:static; width:40px; height:5px; padding:0;
  margin:8px auto 0; border-radius:99px; background:#D7D7D7;
}
.position-card[data-edit-popup] .item-edit{padding:4px 16px 0; gap:12px;}

/* -- head: kicker, the item's name, ✕ -- */
.es-head{position:relative; display:flex; flex-direction:column; gap:1px; padding:6px 44px 2px 2px;}
.es-kicker{font-size:calc(11px * var(--text-scale)); font-weight:800; letter-spacing:0.06em; text-transform:uppercase; color:var(--ink-faint);}
.es-title{font-size:calc(17px * var(--text-scale)); font-weight:800; color:var(--ink); line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.es-close{
  position:absolute; top:4px; right:-4px; width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; padding:0; cursor:pointer;
  border:0; background:var(--surface-tint); color:var(--ink-soft);
}
.es-close svg{width:18px; height:18px;}
.es-close:focus-visible{outline:2px solid var(--blue); outline-offset:2px;}

/* -- a grouped card of thin rows -- */
.es-group{display:flex; flex-direction:column; background:var(--surface-tint); border-radius:14px; overflow:hidden;}
[data-edit-popup] .es-row{
  display:flex; align-items:center; gap:10px; min-height:48px; margin:0; padding:6px 14px;
  background:none; border:0; border-radius:0; box-sizing:border-box;
}
[data-edit-popup] .es-row + .es-row,
[data-edit-popup] .es-sticker + .es-row,
[data-edit-popup] .es-row + .es-sticker{border-top:1px solid var(--line);}
.es-label{flex:none; display:flex; flex-direction:column; gap:1px; font-size:calc(14px * var(--text-scale)); font-weight:600; color:var(--ink);}
.es-sub{font-size:calc(11.5px * var(--text-scale)); font-weight:500; color:var(--ink-faint);}

/* Values sit on the right, no box round them until they're being typed in.
   16px text so an iPhone doesn't zoom on focus. */
[data-edit-popup] .es-row input[type="text"],
[data-edit-popup] .es-row input[type="number"],
[data-edit-popup] .es-row select{
  min-width:0; height:36px; padding:0 8px; margin:0; border:1px solid transparent; border-radius:9px;
  background:transparent; font:inherit; font-size:16px; font-weight:600; color:var(--navy); text-align:right;
}
[data-edit-popup] .es-row .edit-name{flex:1;}
[data-edit-popup] .es-row input:focus,
[data-edit-popup] .es-row select:focus{background:#fff; border-color:var(--navy); outline:none;}
.es-select{flex:1; min-width:0; display:flex; align-items:center; justify-content:flex-end; gap:4px; color:var(--ink-faint);}
[data-edit-popup] .es-select select{flex:1; appearance:none; -webkit-appearance:none; text-align-last:right; padding-right:2px; cursor:pointer;}
.es-select svg{flex:none; width:11px; height:8px;}
.es-value{flex:1; display:flex; align-items:center; justify-content:flex-end; gap:4px;}
[data-edit-popup] .es-value input{width:64px;}
[data-edit-popup] .es-value input[readonly]{pointer-events:none;}
.es-unit{font-size:calc(13px * var(--text-scale)); font-weight:600; color:var(--ink-faint);}
.es-link{
  flex:none; padding:6px 2px 6px 8px; border:0; background:none; cursor:pointer; font:inherit;
  font-size:calc(13.5px * var(--text-scale)); font-weight:700; color:var(--blue);
}
.es-link:focus-visible{outline:2px solid var(--blue); outline-offset:2px; border-radius:6px;}

/* -- EOD switch on the right of its row -- */
[data-edit-popup] .es-row.add-item-eod{justify-content:space-between; cursor:pointer;}
[data-edit-popup] .es-row.add-item-eod .es-label{flex:1;}
.position-card.days-is-eod .es-days{display:none;}

/* -- sticker dates, folded under "Change" -- */
[data-edit-popup] .es-sticker{
  margin:0; padding:10px 14px 12px; gap:8px; border:0; border-radius:0; background:#fff;
}
[data-edit-popup] .es-sticker:not(.open){display:none;}
.es-sticker-help{font-size:calc(12px * var(--text-scale)); font-weight:600; color:var(--ink-soft);}
.es-dates{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.es-dates label{display:flex; flex-direction:column; gap:3px; min-width:0;}
.es-date-label{font-size:calc(11.5px * var(--text-scale)); font-weight:700; color:var(--ink-faint);}
[data-edit-popup] .es-dates input{
  width:100%; min-width:0; height:40px; padding:0 10px; box-sizing:border-box;
  border:1px solid var(--line); border-radius:10px; background:var(--surface-tint); font:inherit; font-size:15px; color:var(--ink);
}
[data-edit-popup] .es-sticker .add-item-sticker-result{margin:0; font-size:calc(12px * var(--text-scale)); line-height:1.4;}

/* -- one Save, full width, pinned to the sheet's bottom -- */
.position-card[data-edit-popup] .item-days-actions{grid-template-columns:1fr; border-top:0; margin-top:2px;}

/* Add New Item, the same sheet (2026-11-19, the user: "make add new item
   pop-up same style as edit"). Placement and handle as Edit's; the form's
   own insets and sticky action bar stay, with one Add Item instead of
   Cancel + Add Item (the ✕ is #add-item-cancel). */
#add-item-form[data-edit-popup]{
  top:auto !important; bottom:0 !important; left:0 !important; right:0 !important;
  transform:none !important; width:auto !important; max-width:520px; margin:0 auto !important;
  max-height:calc(100dvh - 24px - env(safe-area-inset-top)) !important;
  border-radius:20px 20px 0 0 !important; box-shadow:0 -12px 32px rgba(22,39,122,0.22) !important;
  animation:esUp .22s var(--ease-out); gap:12px;
}
@media (prefers-reduced-motion: reduce){ #add-item-form[data-edit-popup]{animation:none;} }
#add-item-form[data-edit-popup]::before{
  content:""; display:block; flex:none; width:40px; height:5px; margin:8px auto -4px; border-radius:99px; background:#D7D7D7;
}
#add-item-form[data-edit-popup] .es-head{margin-top:0;}
.add-item-form.is-eod .es-days{display:none;}
#add-item-form[data-edit-popup] .add-item-status:empty{display:none;}
#add-item-form[data-edit-popup] .add-item-actions{grid-template-columns:1fr; border-top:0; margin-top:0;}

/* Store Audit Settings (2026-11-19, the user: "make store audit add and
   edit pop-up same style"): its Add New Item and a row's Edit (rename and
   remove) are the same bottom sheet. The row's own content (grip, name,
   eye, Freezer / Ambient, pencil) hides while its Edit is the sheet. */
#sea-add-form[data-edit-popup],
.sea-set-row[data-edit-popup]{
  top:auto !important; bottom:0 !important; left:0 !important; right:0 !important;
  transform:none !important; width:auto !important; max-width:520px; margin:0 auto !important;
  max-height:calc(100dvh - 24px - env(safe-area-inset-top)) !important;
  border-radius:20px 20px 0 0 !important; box-shadow:0 -12px 32px rgba(22,39,122,0.22) !important;
  animation:esUp .22s var(--ease-out);
}
@media (prefers-reduced-motion: reduce){ #sea-add-form[data-edit-popup], .sea-set-row[data-edit-popup]{animation:none;} }
#sea-add-form[data-edit-popup]{gap:12px;}
#sea-add-form[data-edit-popup]::before,
.sea-set-row[data-edit-popup] .sea-edit::before{
  content:""; display:block; flex:none; width:40px; height:5px; margin:8px auto -4px; border-radius:99px; background:#D7D7D7;
}
#sea-add-form[data-edit-popup] .add-item-actions{grid-template-columns:1fr; border-top:0; margin-top:0;}
#sea-add-form[data-edit-popup] .es-row input[type="text"]{flex:1;}
#sea-add-form[data-edit-popup] .sea-note{margin:0;}
#sea-add-form[data-edit-popup] .es-value .sea-seg{flex:none;}

.sea-set-row[data-edit-popup]{padding:0 !important;}
.sea-set-row[data-edit-popup] > :not(.sea-edit){display:none !important;}
.sea-set-row[data-edit-popup] .sea-edit{
  display:flex; gap:12px; padding:0 16px calc(16px + env(safe-area-inset-bottom));
}
.sea-set-row[data-edit-popup] .es-row .sea-rename-input{flex:1;}
.sea-set-row[data-edit-popup] .sea-row-note{margin:-4px 2px 0; font-size:calc(12px * var(--text-scale)); color:var(--ink-faint);}
.sea-set-row[data-edit-popup] .sea-row-note.err{color:var(--under);}
.sea-set-row[data-edit-popup] .sea-rename-save{min-height:48px; border-radius:14px;}
.es-remove{
  min-height:44px; margin-top:-4px; border:0; border-radius:14px; background:none; cursor:pointer;
  font:inherit; font-size:calc(14px * var(--text-scale)); font-weight:700; color:var(--under);
}
.es-remove:disabled{opacity:.55;}
.es-remove:focus-visible{outline:2px solid var(--under); outline-offset:2px;}

/* Staff Certificates (2026-11-19, the user: "make staff certificates pop-up
   same style too"): the same bottom sheet. The form is short, so its Save
   isn't pinned; Remove This Person sits under it when editing. Date rows
   show the date on the right like the other values. */
#sct-form[data-edit-popup]{
  top:auto !important; bottom:0 !important; left:0 !important; right:0 !important;
  transform:none !important; width:auto !important; max-width:520px; margin:0 auto !important;
  max-height:calc(100dvh - 24px - env(safe-area-inset-top)) !important;
  border-radius:20px 20px 0 0 !important; box-shadow:0 -12px 32px rgba(22,39,122,0.22) !important;
  animation:esUp .22s var(--ease-out); gap:12px; padding-bottom:calc(10px + env(safe-area-inset-bottom)) !important;
}
@media (prefers-reduced-motion: reduce){ #sct-form[data-edit-popup]{animation:none;} }
#sct-form[data-edit-popup]::before{
  content:""; display:block; flex:none; width:40px; height:5px; margin:8px auto -4px; border-radius:99px; background:#D7D7D7;
}
#sct-form[data-edit-popup] .add-item-actions{position:static; grid-template-columns:1fr; border-top:0; margin:0 16px; padding:0;}
#sct-form[data-edit-popup] .es-row input[type="text"]{flex:1;}
#sct-form[data-edit-popup] .sct-note{margin:0;}
#sct-form[data-edit-popup] .sct-remove{margin-top:-6px; text-decoration:none; font-size:calc(14px * var(--text-scale));}
#sct-form[data-edit-popup] .sct-remove.armed{color:#fff;}
[data-edit-popup] .es-row input[type="date"]{
  flex:1; min-width:0; height:36px; padding:0 8px; margin:0; border:1px solid transparent; border-radius:9px;
  background:transparent; font:inherit; font-size:16px; font-weight:600; color:var(--navy); text-align:right;
}
[data-edit-popup] .es-row input[type="date"]:focus{background:#fff; border-color:var(--navy); outline:none;}

/* =====================================================================
   HOME DIAL (2026-11-20)
   =====================================================================
   The main screen as one full navy stage, nothing scrolls: the greeting
   and announcement cards at the top, the selected tool's name above the
   dial, the dial in the bottom-right corner (hub/templates/_hub_dial.html,
   static/hub-dial.js). The HOD wanted the first dial back under the new
   announcements; the user picked this from a mockup
   (docs/previews/home-dial-mockup.html).

   hub-dial.js sizes the dial, the needle, the icons and the tool name's
   position in px from the real layout, so this section holds only looks.

   .snug / .compact on #home-stage (set by hub-dial.js when the room under
   the cards is short): snug drops the date line and the tool description,
   compact also trims each card to its heading and button. */
body.home-dial{background:#051D3C;}
.home-stage{position:fixed; inset:0; overflow:clip; isolation:isolate; color:#fff;}
.home-stage > .hero-fx{border-radius:0;}
/* Full screen, the dots run down to the dial instead of fading out under
   the greeting the way they do in a short header. */
.home-stage .hero-dots{
  -webkit-mask-image:radial-gradient(120% 100% at 30% 30%, #000 30%, transparent);
          mask-image:radial-gradient(120% 100% at 30% 30%, #000 30%, transparent);
}

/* -- the red glow (2026-11-20) --
   Two still glows in Expired red: one in the top-left corner, one the same
   size in the bottom-right, behind the dial. The user liked the red of the
   aurora that was here earlier the same day (red, amber and grey taking
   turns with the navy, top and bottom) but not the aurora itself, so the
   red stays and nothing moves. Plain gradients with no animation: they
   are painted once and cost nothing after that.
   Later the same day the user asked for a smaller bottom-right glow and a
   softer edge on both. A two-stop gradient fades in a straight line, which
   the eye reads as a rim where it reaches the navy; the extra stops ease it
   out instead, like a light falling off. The bottom one is ~80% the size. */
.home-stage .hero-glow{position:absolute; left:0; right:0; height:58%; pointer-events:none;}
.home-stage .hero-glow-top{top:0; background:radial-gradient(80% 75% at 18% 0%,
  rgba(208,59,59,.72) 0%, rgba(208,59,59,.56) 16%, rgba(208,59,59,.36) 32%,
  rgba(208,59,59,.19) 48%, rgba(208,59,59,.08) 64%, rgba(208,59,59,.02) 80%, transparent 92%);}
.home-stage .hero-glow-bottom{bottom:0; background:radial-gradient(64% 60% at 82% 100%,
  rgba(208,59,59,.72) 0%, rgba(208,59,59,.56) 16%, rgba(208,59,59,.36) 32%,
  rgba(208,59,59,.19) 48%, rgba(208,59,59,.08) 64%, rgba(208,59,59,.02) 80%, transparent 92%);}

.home-greet{padding:calc(var(--home-topbar-h, 0px) + 6px) calc(20px + env(safe-area-inset-right)) 0 calc(20px + env(safe-area-inset-left));}
.home-greet-date{margin:0; font-size:calc(13px * var(--text-scale)); font-weight:600; color:rgba(255,255,255,.7);}
.home-greet-hi{margin:2px 0 0; font-size:calc(24px * var(--text-scale)); font-weight:700; line-height:1.2; color:#fff;}
.home-ann-label{margin:14px 0 0; font-size:calc(12px * var(--text-scale)); font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.7);}
.ann-none .home-ann-label{display:none;}

/* -- the selected tool, sitting on the dial's top edge -- */
.hub-detail{position:absolute; left:0; z-index:2; padding-left:calc(20px + env(safe-area-inset-left)); pointer-events:none;}
.hub-tool-name{
  margin:0; font-size:calc(clamp(24px, 7.4vw, 34px) * var(--text-scale)); font-weight:800;
  line-height:1.08; letter-spacing:-0.02em; color:#fff; text-wrap:balance;
}
.hub-tool-name.locked{opacity:.5;}
.hub-tool-meta{margin:6px 0 0; font-size:calc(12.5px * var(--text-scale)); line-height:1.45; color:rgba(255,255,255,.8); max-width:32ch;}
.hub-tool-cadence{
  font-size:calc(10px * var(--text-scale)); font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:#fff; background:rgba(255,255,255,.22); border-radius:99px; padding:2px 7px; margin-right:7px; white-space:nowrap;
}
.hub-tool-meta.locked{color:#fff; font-weight:600;}
.hub-tool-meta.locked .hub-tool-cadence{background:#EFD9BB; color:#223488;}

/* -- the dial: a see-through disc --
   No frosted blur (backdrop-filter): the stage behind it moves, so the
   blur had to be redone every frame, the costliest thing on the screen
   (2026-11-20, "heavy"). A slightly stronger white fill instead. Its own
   light sweep went too (it repainted the disc every frame); the stage's
   passing light shows through the see-through disc anyway. */
.hub-dial{
  position:absolute; z-index:3; border-radius:50%;
  margin-right:env(safe-area-inset-right); margin-bottom:env(safe-area-inset-bottom);
  background:radial-gradient(circle at 50% 50%, rgba(255,255,255,.17) 0%, rgba(255,255,255,.09) 58%, rgba(255,255,255,.03) 72%, transparent 73%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.2);
  touch-action:none; outline:none; -webkit-tap-highlight-color:transparent;
}
.hub-dial:focus-visible{box-shadow:inset 0 0 0 2px #fff;}
/* The needle never moves (hub-dial.js sets its one angle). */
.hub-dial-marker{position:absolute; left:50%; top:50%; width:0; height:0; z-index:1;}
.hub-dial-needle{position:absolute; left:50%; top:50%; overflow:visible; pointer-events:none; filter:drop-shadow(0 1px 3px rgba(0,0,0,.45));}
.hub-dial-needle path{fill:#fff;}
.hub-dial-ring{position:absolute; inset:0;}
/* The ring and each icon's counter-turn ease together, same time and same
   curve, so the icons glide round without twisting. While a finger drags
   there's no easing: the ring follows the finger 1:1. */
.hub-dial-ring.animating, .hub-dial-ring.animating .hub-dial-item-inner{transition:transform .45s cubic-bezier(.22,.9,.24,1);}
.hub-dial-item{
  position:absolute; left:50%; top:50%; border:0; padding:0; cursor:pointer; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:#fff; box-shadow:0 4px 14px rgba(4,8,28,.35); opacity:.72;
  -webkit-tap-highlight-color:transparent; outline:none;
  /* Fades only. No scale and no hop (the user: no jumping). */
  transition:opacity .2s ease, box-shadow .2s ease;
}
.hub-dial-item:focus-visible{box-shadow:0 0 0 2px #fff;}
.hub-dial-item-inner{display:flex; align-items:center; justify-content:center; width:78%; height:78%;}
.hub-dial-item-inner svg{width:100%; height:100%;}
.hub-dial-item.selected{opacity:1; box-shadow:0 0 0 3px #EFD9BB, 0 4px 14px rgba(4,8,28,.35);}
.hub-dial-item.disabled{opacity:.4;}
.hub-dial-item.disabled .card-icon{filter:grayscale(1);}
.hub-dial-item.disabled.selected{opacity:.6;}
/* A small shake when a tool that's still being built is tapped, so the tap
   doesn't look ignored. translate, so it doesn't fight the size and
   position hub-dial.js sets. */
.hub-dial.nudge{animation:hubDialNudge .4s ease;}
@keyframes hubDialNudge{0%, 100%{translate:0 0;} 25%{translate:-6px 0;} 60%{translate:4px 0;}}

/* -- opening a slow tool -- */
.hub-opening{
  position:fixed; inset:0; z-index:50; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px;
  padding:0 24px; text-align:center; color:#fff; background:rgba(10,20,64,.9); animation:hubOpenVeil .2s ease-out both;
}
.hub-opening[hidden]{display:none;}
@keyframes hubOpenVeil{from{opacity:0;} to{opacity:1;}}
.hub-opening-ring{width:56px; height:56px; border-radius:50%; border:5px solid rgba(255,255,255,.16); border-top-color:#D9A94A; border-right-color:#D9A94A; animation:hubOpenSpin .9s linear infinite;}
@keyframes hubOpenSpin{to{transform:rotate(360deg);}}
.hub-opening-name{margin:0; font-size:clamp(20px, 6vw, 28px); font-weight:800;}

/* -- the announcement cards on the stage (_announcements.html) --
   The id outranks the cards' Tailwind classes (announcements.css loads
   after this file). The row sits in the flow under the greeting. */
#home-stage #ann{margin-top:0;}

/* -- snug and compact (small phones) -- */
#home-stage.snug .home-greet{padding-top:calc(var(--home-topbar-h, 0px) + 2px);}
#home-stage.snug .home-greet-date{display:none;}
#home-stage.snug .home-greet-hi{font-size:calc(19px * var(--text-scale));}
#home-stage.snug .home-ann-label{margin-top:8px;}
#home-stage.snug .hub-tool-name{font-size:calc(22px * var(--text-scale));}
#home-stage.snug .hub-tool-desc{display:none;}
#home-stage.snug .ann-body{display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;}
#home-stage.snug .ann-lines > li:nth-child(n+2){display:none;}
#home-stage.compact .ann-body, #home-stage.compact .ann-lines{display:none;}
#home-stage.compact .ann-card{padding-bottom:12px;}
#home-stage.compact .ann-action{min-height:38px;}

@media (prefers-reduced-motion:reduce){
  .hub-opening, .hub-opening-ring{animation:none;}
  .hub-dial-ring.animating, .hub-dial-ring.animating .hub-dial-item-inner{transition:none;}
  .hub-dial.nudge{animation:none;}
}

/* ============ THE DATE BOX TAKES THE PILL'S COLOUR (2026-11-23) ============
   The user: "for expired item, missing, expiring soon, their date box follow
   pill colour". The pill on the row's right edge already says the status, but
   the eye lands on the date, so the date box now says it too: red for
   Expired, amber for Expiring Soon, grey for Missing. OK rows keep the plain
   box, so only the rows that need doing stand out.
   Keyed off the row's status chip, not the pill: the pill turns amber while a
   print is being armed ("PRINT?"), and the date box shouldn't flicker with it.
   The chip is set by the server and by every local date change in
   mcx-checklist.js, so the box follows a swipe or a new date straight away.
   Amber text uses the darker --status-soon-ink, since #fab219 on white is too
   faint to read. Left blue while the calendar is open, as before.
   Markout only ([data-master-id]): Store Audit cards share these classes, but
   each of their batches already carries its own colour (.sea-batch.expired). */
/* Same day, later (the user: "make it similar to its pill, it standardize ...
   no lining, text are white"): not a tint with a coloured line any more, but
   the pill itself: its solid colour, white text, no visible line. The border
   stays at 1.5px in the same colour rather than going away, so the box keeps
   its exact size and the dates still line up down the list. The placeholder
   ("Select date" on a Missing row) is white too. */
.item-card[data-master-id]:has(.status-chip.expired) .date-trigger:not(.open){
  color:#fff; border-color:var(--status-expired); background:var(--status-expired);
}
/* Later still (the user: "making missing and expiring soon red ... red draws
   the barista's eye, and makes the app less like a kiddo app"): one colour,
   red, for every row that needs doing, instead of red + amber + grey. Two
   strengths, so the row still says how urgent it is (the user's pick over
   all-solid): Expired stays the solid red box above; Expiring Soon and
   Missing are a white box with a red line and red text. #d03b3b on white is
   ~4.9:1, readable at 12px. (Dark mode is dormant, see :root[data-theme].)
   Missing keeps its lighter "Select date" weight, which also tells it apart
   from an Expiring Soon date. Markout only: SEA and Staff Certificates keep
   their own colours. */
/* Same day, last (the user: "expiring soon maintain yellow back"): Expiring
   Soon goes back to the solid amber box, so only Missing keeps the red
   outline. Red now means "act now" (solid: throw it out; outline: no date
   yet), and amber means "use it first". */
.item-card[data-master-id]:has(.status-chip.expiring-soon) .date-trigger:not(.open){
  color:#fff; border-color:var(--status-soon); background:var(--status-soon);
}
/* No date = solid red with white "Select date" (2026-11-23, the user: "make
   the missing date box on rows full red too"), Out Of Stock or not. An Out
   Of Stock row with no date isn't counted as Missing (the hub's rule,
   2026-11-16), but its box still asks for a date the same way (the user:
   "why Pilih Tarikh for OOS still red lining ... I want full colour").
   Only the no-date box: an Out Of Stock row whose date is fine stays plain
   (the user, the same day: an OOS item with a good date going red was a
   bug), and an expired / expiring one keeps its own colour. */
.item-card[data-master-id]:has(.status-chip.not-yet-checked) .date-trigger:not(.open){
  color:#fff; border-color:var(--status-expired); background:var(--status-expired);
}
.item-card[data-master-id] .date-trigger{transition:color .3s ease, border-color .3s ease, background .3s ease;}

/* ============ LANGUAGE PICKER + HUB SETTINGS (2026-11-23) ============
   The user: "making OH can switch to Bahasa .. their first time use are
   language selection first .. in dial create setting tap, place language and
   text size in there". /language is the first-use screen (sign-in's card,
   two big choices); /settings is the Settings slot on the home dial, one
   card per setting like the rest of the hub. Text size left the top bar for
   it (the user's call), so the bar's left cell is now empty and only holds
   the logo's true centre. */
.lang-pick-title{font-weight:700; color:var(--ink);}
.lang-pick-title span{font-weight:600; color:var(--ink-soft);}
.lang-pick{display:flex; flex-direction:column; gap:12px; width:100%;}
.lang-pick-btn{
  display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%;
  padding:14px 16px; border-radius:14px; border:1px solid var(--line); background:var(--surface-card);
  color:var(--ink); font-family:inherit; text-align:left; cursor:pointer;
  transition:scale .1s ease, border-color .2s ease;
}
.lang-pick-btn:active{scale:.97;}
.lang-pick-btn:focus-visible{outline:none; border-color:var(--navy); box-shadow:0 0 0 3px rgba(22,39,122,.12);}
.lang-pick-name{font-size:calc(17px * var(--text-scale)); font-weight:700; color:var(--navy);}
.lang-pick-note{font-size:calc(12.5px * var(--text-scale)); color:var(--ink-soft);}

.hub-settings{max-width:560px; margin:0 auto; padding:16px 16px calc(24px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:16px;}
.hub-set-card{
  background:var(--surface-card); border:1px solid rgba(22,39,122,0.07); border-radius:14px; padding:16px;
  box-shadow:0 8px 14px -10px rgba(16,24,40,0.14), 0 2px 4px -2px rgba(16,24,40,0.08);
}
.hub-set-head{margin:0 0 12px; font-size:calc(15px * var(--text-scale)); font-weight:700; color:var(--ink);}
.hub-set-options{display:flex; flex-direction:column; margin:0;}
.hub-set-option{
  display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px;
  padding:0 4px; border:0; border-top:1px solid var(--line); background:none; font-family:inherit;
  font-size:calc(15px * var(--text-scale)); font-weight:600; color:var(--ink); text-align:left; cursor:pointer;
}
.hub-set-option:first-child{border-top:0;}
.hub-set-option:active{scale:.97;}
.hub-set-tick{width:22px; height:22px; color:var(--navy); opacity:0; transition:opacity .2s ease;}
.hub-set-option.on{color:var(--navy);}
.hub-set-option.on .hub-set-tick{opacity:1;}
.hub-set-note{margin:8px 0 0; font-size:calc(12.5px * var(--text-scale)); color:var(--status-ok-ink); font-weight:600;}
.hub-set-size{display:flex; align-items:center; justify-content:space-between; gap:12px;}
.hub-set-step{
  width:52px; height:44px; border-radius:14px; border:1px solid var(--line); background:var(--surface-tint);
  color:var(--navy); font-family:inherit; font-weight:800; font-size:14px; cursor:pointer;
}
.hub-set-step.big{font-size:22px;}
.hub-set-step:active{scale:.97;}
.hub-set-step:disabled{opacity:.35; cursor:default; scale:none;}
.hub-set-pct{font-size:calc(20px * var(--text-scale)); font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums;}
.hub-set-preview{margin:12px 0 0; font-size:calc(14px * var(--text-scale)); color:var(--ink-soft); line-height:1.5;}
@media (prefers-reduced-motion: reduce){
  .lang-pick-btn, .hub-set-option, .hub-set-step{transition:none;}
  .lang-pick-btn:active, .hub-set-option:active, .hub-set-step:active{scale:none;}
}
/* The frame's word in the reader's language (2026-11-23): data-frame stays
   "New" / "Renamed" / "Removed" for the colours above; data-frame-label is
   what's written, where a page sets it (Markout Settings). */
:is(.item-card, .sea-recent-row)[data-frame][data-frame-label]:not([data-edit-popup])::after{content:attr(data-frame-label);}

/* ============ MARKOUT ROWS LOSE THE RIGHT PILL (2026-11-23) ============
   The user: "right pill doesn't need it, since the date box already has the
   colour ... the colour draws so much attention". Since the date box took
   the pill's colour (above), the pill said the same thing twice, and two
   solid marks per row pulled the eye off the item name. So on Markout rows
   only ([data-master-id] + has-availability: Settings rows have no pills,
   and Store Expiry Audit keeps its pill, as its batches have no coloured
   date box) the expiry pill is hidden. The left pill (AVAIL / OOS / EOD)
   stays: nothing else on the row says availability.
   Hidden, not deleted from the template: mcx-checklist.js keeps setting its
   class on every date change, and it is the Print Cart's tap target. Print
   is off (MCX_PRINT_ENABLED); when it comes back it needs a new trigger,
   since a display:none button can't be tapped.
   The row's right padding (26px, kept clear for the pill) comes down to
   14px, and the swipe surface's matching margin with it, so the date box
   sits nearer the edge. Then 8px (the user: "make the date box slightly to
   the right"): the same 8px the left pill sits from the row's left edge,
   so the row is framed evenly at both ends. */
/* Store Expiry Audit too, since 2026-11-23 (the user: "standardize to SEA
   and SC"): its batch date boxes now carry the colour (apps/sea). Its JS
   still reads the hidden pill's class for the filters (cardIsMissing etc.),
   so the pill stays in the page, hidden. */
:is(.item-card.has-availability[data-master-id], body.sea-page .item-card.has-availability) > .item-expiry-ribbon{display:none;}
body.list-grouped .item-class-rows > :is(.item-card.has-availability[data-master-id], .item-card.has-availability[data-item-id]){padding-right:8px;}
body.list-grouped .item-class-rows .item-card.swipe-v2:is([data-master-id], [data-item-id]) .swipe-surface{margin-right:-8px; padding-right:8px;}

/* ============ MARKOUT'S FROZEN TILES: STILL, AND MISSING AS AN OUTLINE (2026-11-23) ============
   The user: "stop making them blinking", and "the Tiada Tarikh box on the
   frozen top should follow the current Pilih Tarikh styling".
   Still: a tile with something in it no longer loops navy -> its colour ->
   navy every 16s; it simply holds its colour (Expired solid red, Expiring
   Soon solid amber, Out Of Stock grey), the same as a filter already did
   (.frozen-summaries.filtering above). A tile at 0 stays on the navy stage.
   The Save button and the station banner's "Filter On" still pulse, each
   on its own clock (the code that lined them up with the tiles went with
   the tiles' pulse).
   Missing Date: solid red, like Expired, and it sits right after Expired
   (the user, later the same day: "change from red lining to full red for
   missing at the top frozen, place missing beside Exp"). This overrides the
   2026-11-02 call (above) that kept red for Expired only: both tiles are
   what to act on now, so they lead the row together. A white tile with a
   red line was tried first and dropped. The rows' Missing date box keeps
   its red line.
   Store Expiry Audit and Staff Certificates too, since later the same day
   (the user: "standardize to SEA and SC"). */
:is(.mcx-checklist-page, .sea-page, .sct-page) .status-tile.alert-pulse{animation:none; background:var(--alert-color);}
:is(.mcx-checklist-page, .sea-page, .sct-page) .status-tile.not-yet-checked{--alert-color:var(--status-expired);}

/* ============ MISSING IS RED EVERYWHERE (2026-11-23) ============
   The user: "standardize it to all", after the Missing tile and the rows'
   Missing date box went solid red. The places still drawing Missing in the
   old grey follow:
   - the status chip (laptop view);
   - the laptop's Needs Attention list: its Missing group's dot and words
     (the group also moved next to Expired, checklist.html);
   - swipe-left Clear: its reveal is the colour the row is about to turn,
     which is now red. Light red while dragging, solid red once it counts.
   Out Of Stock keeps its grey (pill and tile): it isn't Missing. */
.status-chip.not-yet-checked{color:var(--status-expired); background:var(--status-expired-bg);}
.attention-group.not-yet-checked{--attention-ink:var(--status-expired); --attention-dot:var(--status-expired);}
.item-card[data-swipe="clear"] .swipe-reveal{background:var(--status-expired-bg); color:var(--status-expired);}
.item-card.swipe-armed[data-swipe="clear"] .swipe-reveal{background:var(--status-expired); color:#fff;}
body.list-grouped .swipe-reveal-clear .swipe-ico{color:var(--status-expired);}
/* The icon sits on a white badge (.swipe-ico), so it stays red when the
   swipe counts. It was white for an hour on 2026-11-23 and vanished, white
   on white (the user: "when sliding clear, the icon is missing"). */
