:root{
  /* Layout: one phone-width column. Big-title header, a soft green "this month" card, a calendar card, then the day's work as time cards.
     Look: green-tinted page, white cards with a hairline edge, green only on main buttons, picked choices and icons. Status = coloured dot + word. */
  --bg-0:#EAF0EC;
  --card-0:#FFFFFF;
  --card-2-0:#EFF4F1;
  --ink-0:#13201B;
  --muted-0:#5F6C67;
  --hair-0:#DCE4DF;
  --line-0:#D9DFDB;
  --accent-0:#0B6E4F;
  --accent-ink-0:#FFFFFF;
  --accent-soft-0:#DDF0E7;
  --accent-mid-0:#BFE0CF;
  /* Button shades, deep to pale, each a clear step lighter: green 1 accent, 2 accent-2, 3 accent-3, 4 accent-soft; red 1 bad, 2 bad-2, 3 bad-3, 4 bad-4.
     Words: white on 1 and 2, ink on 3, coloured on 4. Two buttons side by side are one colour in two shades (1 and 2) or green and red
     in the same shade, never e.g. red 1 with green 4: the main answer 1, its partner 2 of the same colour; Keep / Cancel / Back next to red 1 is green 1. */
  --accent-2-0:#3E8166;
  --accent-3-0:#97CFB4;
  --warn-0:#9A5405;
  --warn-soft-0:#FBEBD5;
  --bad-0:#B42318;
  --bad-ink-0:#FFFFFF;
  --bad-soft-0:#FCE4E0;
  --bad-2-0:#D73946;
  --bad-3-0:#F3A9AF;
  --bad-4-0:#FDE7E9;
  --scrim:rgb(10 20 16 / .45);
  --spin:var(--card-0);
  --shadow-x:,0 1px 3px rgb(16 32 26 / .05);
  --dim-ink:rgb(10 20 16);--dim-max:45%;
  --display:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang HK","Noto Sans TC","Microsoft JhengHei",sans-serif;
  --body:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang HK","Noto Sans TC","Microsoft JhengHei",sans-serif;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg-0:#0D1311; --card-0:#161E1B; --card-2-0:#1D2723; --ink-0:#E5ECE8; --muted-0:#98A6A0; --hair-0:#27322E; --line-0:#34413B;
    --accent-0:#3DBE95; --accent-ink-0:#04241A; --accent-soft-0:#143A2E; --accent-mid-0:#1F4A3B; --accent-2-0:#2FA07C; --accent-3-0:#1C4B3C;
    --warn-0:#EDA54F; --warn-soft-0:#3A2A12; --bad-0:#F1877C; --bad-ink-0:#2A0D0A; --bad-soft-0:#3D1D1A; --bad-2-0:#E0675D; --bad-3-0:#5E262C; --bad-4-0:#3D1D1F;
    --scrim:rgb(0 0 0 / .62);
    --spin:var(--ink-0);
    --shadow-x:,0 0 transparent; --dim-ink:#000;--dim-max:62%; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg-0:#0D1311; --card-0:#161E1B; --card-2-0:#1D2723; --ink-0:#E5ECE8; --muted-0:#98A6A0; --hair-0:#27322E; --line-0:#34413B;
  --accent-0:#3DBE95; --accent-ink-0:#04241A; --accent-soft-0:#143A2E; --accent-mid-0:#1F4A3B; --accent-2-0:#2FA07C; --accent-3-0:#1C4B3C;
  --warn-0:#EDA54F; --warn-soft-0:#3A2A12; --bad-0:#F1877C; --bad-ink-0:#2A0D0A; --bad-soft-0:#3D1D1A; --bad-2-0:#E0675D; --bad-3-0:#5E262C; --bad-4-0:#3D1D1F;
  --scrim:rgb(0 0 0 / .62);
  --spin:var(--ink-0);
  --shadow-x:,0 0 transparent; --dim-ink:#000;--dim-max:62%; color-scheme:dark;
}
/* Pop-up dim (Ariel 2026-11-27): no see-through layer over the page; while a pop-up is open the page's own colours turn darker
   (html.dim, set by shell.js dimSync), like a normal background change, so the phone's top bar follows them as one piece. Each
   colour above is its -0 value mixed toward the dim colour by --dimp; a pop-up sets its own --dimp, so it keeps its colours
   (html.dim2: a small check box is on top, so the pop-up under it darkens too; html.dimw: the loading ring darkens everything).
   The camera, the full-screen picture, the green bar and the loading line sit above a pop-up, so they keep their colours too.
   The strip pinned along the top (.pagetop) has its own --dimp too: Safari paints its top bar from that strip one frame late, so
   everything else starts its fade one frame after the strip (--lead, the length of one frame, measured by shell.js) and the bar
   and the page show the same colour on every frame. */
@property --dimp{syntax:'<percentage>';inherits:true;initial-value:0%}
:root,.modal,.delpop,.pagetop,.camx,.rcfull,.toast,.ld{
  --bg:color-mix(in srgb,var(--bg-0),var(--dim-ink) var(--dimp));
  --card:color-mix(in srgb,var(--card-0),var(--dim-ink) var(--dimp));
  --card-2:color-mix(in srgb,var(--card-2-0),var(--dim-ink) var(--dimp));
  --ink:color-mix(in srgb,var(--ink-0),var(--dim-ink) var(--dimp));
  --muted:color-mix(in srgb,var(--muted-0),var(--dim-ink) var(--dimp));
  --hair:color-mix(in srgb,var(--hair-0),var(--dim-ink) var(--dimp));
  --line:color-mix(in srgb,var(--line-0),var(--dim-ink) var(--dimp));
  --accent:color-mix(in srgb,var(--accent-0),var(--dim-ink) var(--dimp));
  --accent-ink:color-mix(in srgb,var(--accent-ink-0),var(--dim-ink) var(--dimp));
  --accent-soft:color-mix(in srgb,var(--accent-soft-0),var(--dim-ink) var(--dimp));
  --accent-mid:color-mix(in srgb,var(--accent-mid-0),var(--dim-ink) var(--dimp));
  --accent-2:color-mix(in srgb,var(--accent-2-0),var(--dim-ink) var(--dimp));
  --accent-3:color-mix(in srgb,var(--accent-3-0),var(--dim-ink) var(--dimp));
  --warn:color-mix(in srgb,var(--warn-0),var(--dim-ink) var(--dimp));
  --warn-soft:color-mix(in srgb,var(--warn-soft-0),var(--dim-ink) var(--dimp));
  --bad:color-mix(in srgb,var(--bad-0),var(--dim-ink) var(--dimp));
  --bad-ink:color-mix(in srgb,var(--bad-ink-0),var(--dim-ink) var(--dimp));
  --bad-soft:color-mix(in srgb,var(--bad-soft-0),var(--dim-ink) var(--dimp));
  --bad-2:color-mix(in srgb,var(--bad-2-0),var(--dim-ink) var(--dimp));
  --bad-3:color-mix(in srgb,var(--bad-3-0),var(--dim-ink) var(--dimp));
  --bad-4:color-mix(in srgb,var(--bad-4-0),var(--dim-ink) var(--dimp));
  --shadow:0 0 0 1px var(--hair)var(--shadow-x);
  transition:--dimp .2s ease-out var(--lead,17ms);
}
.pagetop{transition-delay:0s}
:root{--page-bg:var(--bg)}
.modal,.delpop,.pagetop,.camx,.rcfull,.toast,.ld{--dimp:0%}
:root.dim,:root.dimw,:root.dim2 .modal,:root.dimw .modal,:root.dimw .delpop,:root.dimw .camx,:root.dimw .rcfull,:root.dimw .toast,:root.dim .pagetop,:root.dimw .pagetop{--dimp:var(--dim-max)}
/* Design kit: every text size, weight, corner and gap on the page comes from here.
   Text: xxs 10 (only the times in the Calendar week boxes on a phone, Ariel 2026-11-24) / xs 12 (caps, tags, tab names) / sm 14 (grey lines, labels, small buttons) / md 16 (body, buttons, inputs)
         lg 20 (card and pop-up titles) / xl 28 (page titles, medium numbers) / num 48 (the one big number on a screen).
   Weight: 400 or 700 only. Corners: sm 8 (inside a group) / md 12 (buttons, boxes, choices) / lg 20 (cards, pop-ups) / round.
   Gaps and padding: 0 1 2 4 8 12 16 20 24 32 40 48 56 only. Colours: the tokens above only.
   Need something new? Ask Ariel first, then add it here. */
:root{
  --fs-xxs:10px;--fs-xs:12px;--fs-sm:14px;--fs-md:16px;--fs-lg:20px;--fs-xl:28px;--fs-num:48px;--fs-in:16px;
  --r-sm:8px;--r-md:12px;--r-lg:20px;--r-round:999px;
  /* The full-screen scanner's four corners (white in light and dark, on the camera picture). */
  --cam-line:#FFFFFF;
  /* The full-screen receipt picture (Ariel 2026-11-26): plain dark grey, its bar and buttons one step lighter, the picked look two. */
  --view:#2C2C2E;--view-2:#3A3A3C;--view-3:#636366;
  /* Outside the crop box: black at 56%, the same as CaptureShelf's crop (Ariel 2026-11-29). */
  --crop-shade:rgb(0 0 0 / .56);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scrollbar-gutter:stable}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:var(--fs-md);line-height:1.45;-webkit-tap-highlight-color:transparent}
body.locked{overflow:hidden}
/* The page's own background pinned along the top edge (index.html .pagetop), under the clock on a phone app. On a phone it is at least
   12px, because iPhone Safari colours its top bar from a page element pinned there (not from a ::before); so the bar follows the page
   as it darkens under a pop-up (html.dim) and comes back. It sits above the pop-ups' tap layers and the loading ring (both
   clear), which Safari would read instead; the camera's dark strip (.barstrip) stays above it. */
.pagetop{position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:55;background:var(--bg);pointer-events:none}
/* What shows on the strip is the page's colour of this frame (the strip's own colour, one frame early, is only for Safari to read). */
.pagetop::after{content:"";position:absolute;inset:0;background:var(--page-bg)}
@media (max-width:639px){.pagetop{height:max(12px,env(safe-area-inset-top,0px))}}
/* One edge: --g is the space beside cards, --cp the padding inside them. Page titles start on the cards' outer edge. */
:root{--g:16px;--cp:16px}
/* Small phone (under 360 wide): every text size one step down, in proportion to the narrower screen. Tiny 12 stays (easy to read), typing boxes stay 16 (--fs-in, so the iPhone does not zoom in). */
@media (max-width:359px){:root{--g:12px;--cp:12px;--fs-sm:13px;--fs-md:15px;--fs-lg:18px;--fs-xl:24px;--fs-num:40px}}
.wrap{max-width:560px;margin-inline:auto;padding-left:max(var(--g),env(safe-area-inset-left,0px));padding-right:max(var(--g),env(safe-area-inset-right,0px))}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
button{font:inherit;color:inherit;-webkit-appearance:none;appearance:none}
h1,h2,h3{font-family:var(--display);font-weight:700;text-wrap:balance;margin:0;line-height:1.15}
p{margin:0}
.i{flex:none;display:block}
.label{font-size:var(--fs-sm);font-weight:400;color:var(--muted)}
/* Section label above each block: small capitals on the left, a number or buttons on the right */
.blk{display:flex;flex-direction:column;gap:8px;min-width:0}

/* Header */
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--bg)}
.top .wrap{display:flex;align-items:center;gap:12px;padding-block:16px 12px}
.ttl{flex:1;min-width:0}
.tdate{flex:none;font-size:var(--fs-md);color:var(--muted);white-space:nowrap}
@media (max-width:359px){.tdate{font-size:var(--fs-sm)}}
.mebtn{margin-right:calc(var(--cp) - 6px)}
.ttl small{display:block;font-size:var(--fs-sm);color:var(--muted);font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ttl h1{font-size:var(--fs-xl);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mebtn{border:0;background:none;padding:0;cursor:pointer;border-radius:50%;flex:none}
.mebtn .av{background:var(--card);box-shadow:var(--shadow)}   /* white like the round buttons, so it stands out from the page */
main.wrap{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;padding-block:8px 40px}
main.wrap.withbar{padding-bottom:calc(116px + env(safe-area-inset-bottom,0px))}

.av{flex:none;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:var(--fs-sm);background:var(--accent-soft);color:var(--accent)}
.av.lg{width:56px;height:56px;font-size:var(--fs-md)}

/* Buttons and chips */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:var(--r-md);border:0;background:var(--card-2);color:var(--ink);font-weight:700;font-size:var(--fs-md);padding:12px 16px;min-height:48px;cursor:pointer}
.btn.primary{background:var(--accent);color:var(--accent-ink)}
.btn.danger{background:var(--bad);color:var(--bad-ink)}
.btn.quiet{background:transparent;color:var(--bad);min-height:48px}
/* The button shades (see the kit at the top). */
.btn.g2{background:var(--accent-2);color:var(--accent-ink)}
.btn.g4{background:var(--accent-soft);color:var(--accent)}
.btn.r2{background:var(--bad-2);color:var(--bad-ink)}
.btn.sm{min-height:40px;padding:8px 16px;font-size:var(--fs-sm);border-radius:var(--r-md)}
.btn.full{width:100%}
.btn.big{min-height:56px;font-size:var(--fs-md);border-radius:var(--r-md)}
.btn:disabled{opacity:.4;cursor:not-allowed}
/* A main button that can't be pressed yet stays outlined, so it doesn't look broken. */
.btn.primary:disabled{opacity:1;background:var(--hair);color:color-mix(in srgb,var(--muted) 70%,transparent);box-shadow:none}
.iconbtn{flex:none;width:40px;height:40px;border-radius:50%;border:0;background:var(--card);box-shadow:var(--shadow);color:var(--ink);display:grid;place-items:center;cursor:pointer}
/* Calendar */
.card{background:var(--card);border-radius:var(--r-lg);padding:16px calc(var(--cp) - 8px) 12px;box-shadow:var(--shadow)}
.wd{font-size:var(--fs-xs);font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);text-align:center;padding:0 0 8px}
/* Month name and arrows inside the calendar card */
.mhead{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:0 0 12px 8px}
.mhead b{font-size:var(--fs-lg);font-weight:700;letter-spacing:-.01em}
.mhead .arr{display:flex;gap:2px}
.mbtn{width:40px;height:40px;border:0;border-radius:50%;background:none;color:var(--accent);display:grid;place-items:center;cursor:pointer}
.mbtn:hover{background:var(--card-2)}
.mbtn:disabled{color:var(--hair);background:none;cursor:default}
.cd{border:0;background:transparent;height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;color:var(--ink);padding:0}
.cd span{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:400;font-size:var(--fs-md);font-variant-numeric:tabular-nums}
.cd:disabled{color:color-mix(in srgb,var(--muted) 35%,transparent);cursor:default}
.cd.today span{color:var(--accent);font-weight:700}
.cd.sel span{background:var(--accent);color:var(--accent-ink);font-weight:700}
/* A public holiday: a red date; picked, a red circle. */
.cd.hol span{color:var(--bad);font-weight:700}
.cd.hol.sel span{background:var(--bad);color:var(--bad-ink)}
/* Week grid (Calendar tab): ‹ week › on a top line the same height as the day card's title, so both cards line up;
   then weekdays and dates, then one row per person with a box of time worked per day. */
.card.wk{padding:0 0 calc(var(--cp) - 8px)}
.wkhd{display:flex;align-items:center;justify-content:center;gap:4px;padding:16px var(--cp) 12px;border-bottom:1px solid var(--hair)}
.wkhd b{font-size:var(--fs-lg);font-weight:700;letter-spacing:-.01em;font-variant-numeric:tabular-nums;text-align:center}
.wkhd .mbtn{flex:none;margin-block:-8px}
.wkg{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));padding:12px calc(var(--cp) - 8px) 0}
.wkg.team{grid-template-columns:auto repeat(7,minmax(0,1fr));padding-inline:var(--cp)}
/* The month of days in a pop-up: the pop-up already has the side space. */
.panel .wkg{padding:0}
.wkr{display:contents}
.wkwho{display:grid;place-items:center;border:0;background:none;font:inherit;color:inherit;padding:0 4px 0 0;cursor:pointer}
.wkc{border:0;background:none;color:var(--ink);font:inherit;padding:8px 4px;min-height:56px;display:grid;place-items:center;cursor:pointer;min-width:0}
span.wkc{cursor:default}
.wkc b{width:100%;max-width:56px;min-height:40px;border-radius:var(--r-sm);background:var(--accent-soft);padding:4px 0;display:grid;align-content:center;justify-items:center;font-size:var(--fs-xs);font-weight:400;line-height:1.3;font-variant-numeric:tabular-nums;white-space:nowrap}
.wkc b.w{background:var(--warn-soft);color:var(--warn);font-weight:700}
.wkc b.p{background:var(--card-2);color:var(--muted);box-shadow:inset 0 0 0 1px var(--line)}
/* The Leave card: Left / Used / Days a year as big numbers, the carried-over note under them. */
.lvsum{display:grid;gap:8px;padding:16px var(--cp)}
.lvsum .stats{padding:0}
.lvsum+.row{border-top:1px solid var(--hair)}
.lhead .lvt{display:flex;align-items:center;gap:8px;min-width:0}
.lvt .mbtn{flex:none;margin-block:-8px}
/* One leave in a pop-up: plain lines, no boxes. */
/* The days-left line in Ask for leave takes no room while it has no words. */
.lvuse:empty{display:none}
.wkc.sel b{box-shadow:inset 0 0 0 1.5px var(--accent)}
@media (hover:hover){.wkc:hover b,.wkwho:hover .av{box-shadow:inset 0 0 0 1.5px var(--accent)}}
@media (max-width:359px){.wkc{padding-inline:2px}.wkwho{padding-right:2px}}
/* Ariel 2026-11-24: on a phone "09:00" touched the box edge; smaller times there (the Mac has room). */
@media (max-width:439px){.wkc b{font-size:var(--fs-xxs)}}
.wkg .emptyday{grid-column:1/-1;background:none;box-shadow:none;border-radius:0;padding:12px 8px}
.backnote{display:flex;gap:8px;align-items:center;background:var(--bad-soft);color:var(--bad);border-radius:var(--r-md);padding:8px 12px;font-size:var(--fs-sm);overflow-wrap:anywhere}
.emptyday{display:flex;align-items:center;gap:12px;color:var(--muted);background:var(--card);border-radius:var(--r-lg);padding:16px var(--cp);box-shadow:var(--shadow);font-size:var(--fs-sm)}
.list .emptyday{background:none;box-shadow:none;border-radius:0}
.alert{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:0;background:var(--bad);color:var(--bad-ink);border-radius:var(--r-md);padding:16px 16px;cursor:pointer;font-size:var(--fs-md)}
.alert span{flex:1}
/* Notes that stay at the top of the page until sorted: a save waiting for a connection (amber), a save the Sheet said no to (red). */
.notes{display:flex;flex-direction:column;gap:8px}
.alert.note{cursor:default;font-weight:700}
.alert.note.w{background:var(--warn);color:var(--card)}
.addhand{display:flex;align-items:center;gap:8px;width:100%;min-height:52px;margin-top:auto;border:0;border-top:1px solid var(--hair);background:transparent;color:var(--accent);font:inherit;font-weight:700;font-size:var(--fs-md);border-radius:0 0 var(--r-lg) var(--r-lg);padding:0 var(--cp);cursor:pointer;text-align:left}
.addhand:hover{background:var(--card-2)}
/* Only the last button in a card gets the card's round bottom corners. */
.list .addhand:not(:last-child){border-radius:0}
/* An empty list (just its title and Add): one line between them, not two. */
.lhead+.addhand{border-top:0}
/* Show more and Show less side by side at the bottom of a long list. */
.morebar{display:flex;margin-top:auto}.morebar .addhand{flex:1;margin-top:0;border-radius:0}.morebar .addhand+.addhand{border-left:1px solid var(--hair)}
/* Safari copies the bottom bar's colour from this bar's own background, so that stays the light card colour (no dark bottom bar under a
   pop-up); what you see is the cover under the buttons, which darkens with the page. */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:6;background:var(--card-0);border-top:1px solid var(--hair);padding-bottom:env(safe-area-inset-bottom,0px)}
.tabbar::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--card)}
/* While typing on a phone the keyboard is up: hide the tab bar so it doesn't ride on top of the keyboard. */
@media (pointer:coarse){.typing .tabbar{display:none}}
.tabbar .wrap{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
.tabbar button{border:0;background:none;padding:8px 0 12px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:var(--fs-xs);font-weight:700;color:var(--muted);position:relative;cursor:pointer}
/* Like iPhone tab bars: the other tabs fade back (lighter grey, plain text), so the green one you're on stands out. */
.tabbar button:not([aria-current="page"]){font-weight:400}
.tabbar button:not([aria-current="page"])>:not(.tbadge){opacity:.6}
/* New answers on Requests: a small red number at the icon's top right, gone once Requests is opened. */
.tbadge{position:absolute;top:4px;left:calc(50% + 6px);min-width:20px;height:20px;padding:0 4px;border-radius:var(--r-sm);background:var(--bad);color:var(--bad-ink);font-size:var(--fs-xs);font-weight:700;line-height:20px;text-align:center;font-variant-numeric:tabular-nums}
.nitem .tbadge{position:static;margin-left:auto}
/* Staff Requests: a red number on the top-right corner of Accepted / Declined (floats; the word stays where it is) */
.segc button:has(.tbadge){position:relative;overflow:visible}
.segc .tbadge{top:-8px;right:0;left:auto}
.tabbar button[aria-current="page"]{color:var(--accent)}

/* Pop-up: a sheet from the bottom on phones, a centred box on wider screens */
.modal{position:fixed;inset:0;z-index:20;display:flex;align-items:flex-end;justify-content:center}
/* Animations only on .enter (the first draw), so redraws while it is open don't replay them. */
.scrim{position:absolute;inset:0}
.modal.enter .panel{animation:rise .26s cubic-bezier(.2,.8,.2,1)}
.panel{position:relative;width:100%;max-width:560px;max-height:calc(100% - 44px - env(safe-area-inset-top,0px));display:flex;flex-direction:column;background:var(--card);border-radius:var(--r-lg) var(--r-lg) 0 0;box-shadow:0 -10px 40px -10px var(--scrim)}
.panel.tall{height:calc(100% - 44px - env(safe-area-inset-top,0px))}
.panel-head{display:flex;align-items:center;gap:12px;padding:24px max(16px,env(safe-area-inset-right,0px)) 4px max(16px,env(safe-area-inset-left,0px))}
.panel-head h2{flex:1;min-width:0;font-size:var(--fs-xl);letter-spacing:-.01em;line-height:1.2}
.panel-head h2 small{display:block;margin-top:4px;font-size:var(--fs-sm);font-weight:400;letter-spacing:0;color:var(--muted)}
.panel-head .iconbtn{width:40px;height:40px;box-shadow:none;background:var(--card-2)}
.panel-head .iconbtn.del{color:var(--bad)}
.panel-body{flex:1;overflow-y:auto;overscroll-behavior:contain;display:grid;align-content:start;gap:12px;padding:4px max(16px,env(safe-area-inset-right,0px)) 16px max(16px,env(safe-area-inset-left,0px))}
.panel-foot{display:grid;gap:8px;padding:12px max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));border-top:1px solid var(--hair)}
/* Typing in a pop-up on a phone (Ariel 2026-11-30: "ensure the size or height of the overlay not moving then only text and stuff
   slide a bit"). The pop-up keeps its place and size and the keyboard covers its lower part, buttons included. While a box in it
   has the keyboard (html.kb, shell.js kbGo) the middle gets room at its end as tall as the part the keyboard covers (--kbr), so
   every box can be slid above the keyboard; only a pop-up shorter than that grows upward. --kbl: the screen's height in fixed
   points, so a passing screen size moves nothing. --kbp: the pop-up's height held still while kbAway adds room. .shot: the
   copy of the middle that lies over it while the app is left and just after (kbShot), a still picture.
   A finger on the title, the buttons or the dark part slides nothing. */
@media (max-width:639px){
  .panel:focus{outline:none}
  .modal .scrim,.modal .panel-head,.modal .panel-foot{touch-action:none}
  html.kb .modal{bottom:auto;height:var(--kbl)}
  html.kb .modal .panel-body::after{content:"";height:var(--kbr)}
  html.kbe .modal .panel{height:var(--kbp)}
  .modal .panel-body.shot{position:absolute;touch-action:none}
  .modal .panel-body.shot *{animation:none!important;transition:none!important}
}
.panel-body:has(>.btn.quiet:only-child){padding-bottom:8px}
/* A red text button last has its own space under its words, so the edge under it is smaller and the buttons sit in the middle. */
.panel-foot:has(>.btn.quiet:last-child){padding-top:20px;padding-bottom:calc(4px + env(safe-area-inset-bottom,0px))}
@media (min-width:640px){
  .modal{align-items:center;padding:24px}
  .panel,.panel.tall{border-radius:var(--r-lg);height:auto;max-height:min(780px,100%);box-shadow:0 30px 80px -20px var(--scrim)}
  /* Account holds only a name, Language and Log out: a narrower pop-up (Ariel 2026-11-27) */
  .panel:has(.me-card){max-width:400px}
  .modal.enter .panel{animation:pop .2s ease-out}
  /* Computer: more room around and between the parts of a pop-up */
  .panel-head{padding:24px 24px 8px}
  .panel-body{padding:8px 24px 24px}
  .panel-foot{padding:24px}
  /* A red text button last in a pop-up has its own space inside, so the edge under it is smaller. */
  .panel-foot:has(>.btn.quiet:last-child){padding-top:24px;padding-bottom:8px}
  .panel-body:has(>.btn.quiet:only-child){padding-bottom:16px}
  .panel .fsheet .label{margin-top:24px}
  .panel .fsheet>.label:first-child{margin-top:0}
}
@keyframes rise{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@keyframes pop{from{transform:scale(.97);opacity:0}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
/* Closing (shell.js leaveCopy): the sheet slides down while the page's colours come back; a computer's box and the small check box
   fade out a little smaller. A copy of the closed pop-up plays it, so the page under it works at once. */
.modal.enter.hold .panel,.delpop.enter.hold .delbox{animation-play-state:paused}
.modal.leave .panel{animation:sink .22s cubic-bezier(.4,0,1,1) forwards}
@media (min-width:640px){.modal.leave .panel{animation:shrink .18s ease-in forwards}}
.delpop.leave .delbox{animation:shrink .15s ease-in forwards}
@keyframes sink{to{transform:translateY(100%)}}
@keyframes shrink{to{transform:scale(.97);opacity:0}}

/* Work form */
.segc{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));background:var(--card-2);border-radius:var(--r-md);padding:4px;gap:4px}
.segc button{border:0;background:transparent;border-radius:var(--r-sm);padding:0 4px;font-weight:700;font-size:var(--fs-sm);color:var(--ink);cursor:pointer;min-height:44px}
/* A picked choice looks the same everywhere: white, green text, green edge. */
/* Regular shift days: MON TUE WED, written like the calendar's day names. */
.segc.days button{font-size:var(--fs-xs);letter-spacing:.04em;text-transform:uppercase;padding:0 2px}
/* Smallest phones: the 7 days sit side by side with no gap, so each stays big enough to tap (40 wide at 320). */
@media (max-width:359px){.segc.days{gap:0}}
.segc button[aria-pressed="true"]{background:var(--card);color:var(--accent);box-shadow:inset 0 0 0 1.5px var(--accent)}
/* Team switch sits on the page: a grey track with the picked side in white, kept quiet so the list below leads. */
.tsw{background:var(--hair)}
.tsw button[aria-pressed="true"]{color:var(--ink);box-shadow:var(--shadow)}
@media (max-width:399px){.places{grid-template-columns:1fr}}
.fsheet{display:flex;flex-direction:column;min-width:0}
.fsheet .label{display:block;margin:16px 0 8px}
.fsheet>.label:first-child{margin-top:0}
/* Start and Finish: two boxes side by side, tap either to change it. */
.tpair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fsheet .tpair:not(:first-child){margin-top:16px}
.fsheet .segc+.tbox{margin-top:12px}
.tbox{display:flex;flex-direction:column;gap:2px;border-radius:var(--r-md);box-shadow:inset 0 0 0 1px var(--line);background:var(--card);padding:12px 16px;cursor:pointer;min-width:0}
.tbox span{font-size:var(--fs-sm);color:var(--muted)}
.tbox input{border:0;background:transparent;color:var(--ink);font:700 var(--fs-xl) var(--body);padding:0;min-height:34px;width:100%;min-width:0;font-variant-numeric:tabular-nums;text-align:left}
.tbox input:focus{outline:none;color:var(--accent)}
.tbox:focus-within{box-shadow:inset 0 0 0 2px var(--accent)}
.tbox b{font:700 var(--fs-xl) var(--body);color:var(--muted);min-height:34px;line-height:34px}
.fsheet .hint{margin:12px 0 0;text-align:left}
/* "Verify you are human" box (Cloudflare) under the code box, when the server asks for it (login.js humanBox): out of
   sight (taking no room) while Cloudflare checks quietly, shown all at once with its gap only when it needs a tap. */
.human:not(.on){position:absolute;visibility:hidden;pointer-events:none}
.fsheet .human{margin-top:12px}
.fsheet textarea.fin{margin-top:8px;resize:none}
.fsheet .fin+.fin{margin-top:8px}
.sites+.fin,.fin.ro+.fin,.label~.list.nb.ticks+.fin{margin-top:8px}
/* Four or more places or roles: the line with the picked one is a button; opened, its list sits right under the label like any other box. */
button.fin.ro{cursor:pointer;text-align:left}
.label+.list.nb.ticks{margin-top:0}
.fin.ro{display:flex;align-items:center;gap:8px;background:var(--card-2);box-shadow:none}
.fin.ro.mute{color:var(--muted)}
.phere{margin-top:8px}
.srow{display:flex;gap:8px}.srow .fin{flex:1;min-width:0}.srow .btn:disabled{opacity:1;color:color-mix(in srgb,var(--muted) 70%,transparent)}
/* Safari puts a contact-card button inside name and address boxes; this app never fills them from Contacts */
input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none}
.pfind,.pmap{margin-top:8px}
.pmap{margin-bottom:0;margin-left:0;margin-right:0;border-radius:var(--r-md);overflow:hidden;background:var(--card-2)}
.pmap iframe{display:block;width:100%;aspect-ratio:2/1;border:0;pointer-events:none;background:var(--card-2)}
@media (min-width:640px){.pmap iframe{aspect-ratio:3/1}}   /* shorter in the wide pop-up, so "Is this the right place?" stays in view */
/* The map's cover (see .rcth::after) lies over the map only, not the words under it (their colours darken by themselves). */
.pmap{position:relative}
.pmap::after{bottom:auto;aspect-ratio:2/1}
@media (min-width:640px){.pmap::after{aspect-ratio:3/1}}
.pmap figcaption{display:grid;gap:2px;padding:12px 16px}
.pmap b{font-size:var(--fs-md);overflow-wrap:anywhere}
.pmap small{font-size:var(--fs-sm);color:var(--muted)}
.brkoth{display:grid;place-items:center;min-height:44px;border-radius:var(--r-sm);box-shadow:inset 0 0 0 1.5px var(--accent);background:var(--card);min-width:0;color:var(--accent);cursor:text}
/* Typed minutes keep their unit: "40m", centred, on one baseline. The text is md so iPhone doesn't zoom in when typing,
   drawn at sm size (14/16) to match the other break choices. The box is exactly as wide as the digits typed (--d). */
.brkv{display:flex;align-items:baseline;transform:scale(.875);font:700 var(--fs-md)/1.2 var(--body)}
.brkoth input{width:calc(var(--d,1)*1ch);flex:none;min-width:1ch;padding:0;border:0;background:transparent;color:var(--accent);font:inherit;font-size:var(--fs-in);text-align:center;outline:none;box-shadow:none;border-radius:0}
.brkoth input:placeholder-shown{width:4ch}
.brkoth input:placeholder-shown+span{display:none}
.brkoth input::placeholder{color:var(--muted);font-weight:400;opacity:.7}
.brkoth:focus-within{box-shadow:inset 0 0 0 2px var(--accent)}
.fin{width:100%;border:0;background:var(--card);color:var(--ink);border-radius:var(--r-md);padding:12px 16px;font:inherit;font-size:var(--fs-in);min-height:48px;box-shadow:inset 0 0 0 1px var(--line)}
.fin:focus{outline:none;box-shadow:inset 0 0 0 2px var(--accent)}
.fin.bad{box-shadow:inset 0 0 0 2px var(--bad)}
.fin::placeholder{color:var(--muted)}
textarea.fin{resize:vertical;min-height:72px}
/* Pop-up warnings: one red line, under the wrong box (which turns red) or above the button; the pop-up never changes size */
.tbox.bad,.fsheet .fin.bad,.segc.bad,.sites.bad,.payfield.bad{box-shadow:inset 0 0 0 2px var(--bad)}
.tbox.bad span{color:var(--bad)}
.label.bad{color:var(--bad)}
.ferr-at{display:flex;gap:8px;align-items:center;margin:0 0 8px;color:var(--bad);background:var(--bad-soft);border-radius:var(--r-md);padding:12px 12px;font-size:var(--fs-sm);font-weight:700}
.ferr-at .i{flex:none}
/* No location: Try again, and going on without it, right under the red line */
.geobox{margin-top:16px}
.geobox .ferr-at{margin:0}
/* A red box under the place buttons (far from the picked place): it sits close under them, like a warning over its box. */
.geobox.under{margin-top:8px}
.geobox .ferr-at span{white-space:pre-line}
.samebtn{justify-self:start;display:inline-flex;align-items:center;gap:8px;border:0;background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:var(--fs-sm);border-radius:var(--r-md);min-height:40px;padding:8px 16px;cursor:pointer}
.payfield{display:flex;align-items:center;gap:8px;border-radius:var(--r-md);padding:16px;background:var(--card);box-shadow:inset 0 0 0 1px var(--line);cursor:text}
.payfield:focus-within{box-shadow:inset 0 0 0 2px var(--accent)}
.payfield span{font:700 var(--fs-xl) var(--display);color:var(--muted)}
.payfield input{flex:1;width:0;min-width:0;border:0;background:transparent;font:700 var(--fs-xl) var(--display);color:var(--ink);padding:0;text-indent:.25px;min-height:34px;font-variant-numeric:tabular-nums}
/* Safari: after the HK$ label the first digit's left edge lands exactly on a screen pixel and draws flat; a quarter-pixel nudge keeps the 0 round on both sides. */
/* Safari on a computer at normal zoom drops the top hairline of bold 20px text (00:32 looks flat on top); a .375px nudge down keeps it whole. New bold 20px text goes in this list (the screen check flags it). */
.mhead b,.wkhd b,.lhead b,.dnum b,.delbox b,.list.nb .pn b,.list.nb .amt{transform:translateY(.375px)}
.payfield input:focus{outline:none}
.payfield input::placeholder{color:var(--muted);opacity:.4}
.cc-act{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cc-act .btn{white-space:nowrap}

/* Lists */
.list{background:var(--card);border-radius:var(--r-lg);box-shadow:var(--shadow);overflow:hidden}
.row{display:flex;align-items:center;gap:12px;width:100%;padding:16px var(--cp);border:0;background:none;text-align:left;cursor:pointer;color:var(--ink)}
.row+.row{border-top:1px solid var(--hair)}
/* The full-time Monthly pay row under the work roles: a solid mid green, so it stands apart from the roles and from the page. */
.row.hi{background:var(--accent-mid);border-top:0}
/* Title row on top of every list card: same size as the calendar card title */
.lhead{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:16px var(--cp) 12px;border-bottom:1px solid var(--hair)}
.lhead b{min-width:0;font-size:var(--fs-lg);font-weight:700;letter-spacing:-.01em}
.lhead span{flex:none;font-weight:700;font-variant-numeric:tabular-nums}
.lhead .soft{font-weight:400;font-size:var(--fs-sm);color:var(--muted)}
.pn{flex:1;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:2px;line-height:1.3}
@media (max-width:359px){.list .row>.av{display:none}.list.nb .row{min-height:40px}}   /* without the round picture a pop-up row would shrink to one text line, too small to tap */
.pn small{font-size:var(--fs-sm);color:var(--muted)}
/* Long names stay on one line and end in "…" instead of wrapping. */
.pn b,.pn small,.lhead b,.pk>span,.sites b,.sites small,.segc button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.amt{font-family:var(--display);font-weight:700;font-size:var(--fs-md);font-variant-numeric:tabular-nums}
.row > .i:last-child{color:var(--muted)}
div.row{cursor:default}
.row>.amt{flex:none}
@media (max-width:639px){.tm{display:inline-flex;flex-direction:column;align-items:flex-end;line-height:1.2}.tm .tmd{display:none}}
/* "Missing" (no pay typed yet) on the right is a status, not a number: one small grey word, so the job name keeps its room. */
.amt .nopay,.amt .aside{font-family:var(--body);font-weight:400;font-size:var(--fs-sm);color:var(--muted)}
/* Pop-up times row: the plan on the right, small, with Late under it. */
.amt .aside{display:block;text-align:right}
.amt .aside.w{color:var(--warn)}
.amt.g,.stats b.g{color:var(--accent)}
.pn small.w{color:var(--warn)}
/* Date on the left of a work row: day number over the weekday */
.dnum{flex:none;width:42px;display:grid;justify-items:center;line-height:1.2}
.dnum b{font:700 var(--fs-lg)/1.2 var(--display);font-variant-numeric:tabular-nums}
.dnum small{font-size:var(--fs-xs);color:var(--muted)}
.dnum.mo b{font-size:var(--fs-md)}
.row .nochev{display:flex;visibility:hidden}
/* Big numbers on top of a screen: 2 or 3 tiles, the number over a grey word */
/* Two equal halves; a big number (like HK$180,000) takes the room it needs, and if both no longer fit side by side the second goes underneath. */
.stats{display:flex;flex-wrap:wrap;gap:8px 24px;padding:0 8px 4px}
.stats>div{display:grid;gap:4px;flex:1 1 0;min-width:max-content}
.stats b{font:700 var(--fs-xl)/1.1 var(--display);font-variant-numeric:tabular-nums;word-break:keep-all}
.stats span{font-size:var(--fs-sm);color:var(--muted)}
.mpaid{display:flex;align-items:center;gap:4px;min-height:48px;padding:0 0 0 8px}
/* Pay: the next step under the month (left, like the numbers), and a note under Mark as paid */
.hint.mnote{text-align:left;padding:0 8px;margin:8px 0 4px}
.bnote{margin:8px 0 0}

.login{display:grid;align-content:center;min-height:100vh;min-height:100dvh;max-width:440px;padding-block:24px}
.lg-top{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:8px}
.lg-top h1{flex:1 1 auto;min-width:0;font-size:var(--fs-xl);letter-spacing:-.01em}
.login .logo{width:44px;height:44px;border-radius:var(--r-md);box-shadow:none}
@media (max-width:439px){.login .logo{display:none}}
.logo{width:60px;height:60px;border-radius:var(--r-md);background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;box-shadow:0 12px 24px -12px var(--accent)}
.login .intro{color:var(--muted);margin:8px 0 8px}
/* Language box in Account and its small menu: the menu opens upward, its bottom line (中文) on the box, so it never covers Log out (Ariel 2026-11-27) */
.lpick{position:relative}
.lbox{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;border:0;background:var(--card-2);border-radius:var(--r-md);padding:0 12px 0 16px;font:inherit;font-size:var(--fs-md);font-weight:700;color:var(--ink);cursor:pointer;text-align:left}
.lbox svg{color:var(--muted);flex:none}
.lshut{position:fixed;inset:0;z-index:2}
.lmenu{position:absolute;right:0;bottom:0;z-index:3;width:min(180px,100%);display:grid;background:var(--card);border-radius:var(--r-md);padding:4px;box-shadow:0 0 0 1px var(--hair),0 30px 80px -20px var(--scrim)}
.lmi{display:flex;align-items:center;gap:8px;min-height:44px;border:0;background:none;border-radius:var(--r-sm);padding:0 12px 0 calc(12px + 16px + 8px);font:inherit;font-size:var(--fs-md);color:var(--ink);cursor:pointer;text-align:left}
.lmi[aria-checked="true"]{padding-left:12px;color:var(--accent);font-weight:700;background:var(--card-2)}
.panel-body:has(.lmenu){overflow:visible}
.me-card{display:flex;align-items:center;gap:12px;background:var(--card-2);border-radius:var(--r-md);padding:16px}
.me-card div{display:grid;line-height:1.3}
.me-card small{color:var(--muted);font-size:var(--fs-sm)}
.hint{font-size:var(--fs-sm);color:var(--muted);text-align:center}

/* Floating banner at the top for a few seconds: soft green when done, soft red for a problem that isn't about one box. */
.toast{position:fixed;left:50%;top:calc(12px + env(safe-area-inset-top,0px));transform:translateX(-50%);z-index:30;pointer-events:none;display:flex;align-items:center;gap:8px;width:min(520px,calc(100% - 32px));background:var(--accent);color:var(--accent-ink);padding:12px 16px;border-radius:var(--r-md);font-size:var(--fs-md);font-weight:700;box-shadow:0 14px 30px -12px var(--scrim);animation:drop .22s ease-out}
.toast .i{flex:none}
/* The Undo bar: the same green note, with an Undo button at its end (the shortcut beside it on a computer). */
.toast.undo{pointer-events:auto;padding:8px 8px 8px 16px}   /* 2026-11-17 (Ariel): Undo and × sit with room above and below, not touching the bar's edge; the bar keeps its height */
.toast.undo span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.toast.undo .who{flex:none;overflow:visible}
@media (max-width:359px){.toast.undo .who{display:none}}   /* the smallest phone: just "Accepted", the name is in the pop-up they just closed */
@media (pointer:coarse){.toast.undo{font-size:var(--fs-sm)}}   /* a phone fits the words, Undo and × on one line */
.toast.undo .iconbtn{background:none;box-shadow:none;color:inherit;width:32px;height:32px}
.toast.undo .btn{flex:none;min-height:32px;padding:4px 12px;border-radius:var(--r-sm);background:var(--card);color:var(--ink);font-size:var(--fs-sm)}
.toast.undo kbd{font:inherit;font-weight:400;color:var(--muted)}
@media (hover:none){.toast.undo kbd{display:none}}
.toast.bad{background:var(--bad);color:var(--bad-ink)}
.toast.warn{background:var(--warn);color:var(--card)}   /* solid, so a message never melts into the page */
@keyframes drop{from{opacity:0;transform:translate(-50%,-10px)}to{opacity:1;transform:translate(-50%,0)}}
/* Computer: sidebar on the left; at 1100px and wider, two columns. Same rows and buttons as the phone. */
.sgrid{display:grid;gap:24px;min-width:0}
.stack{display:grid;gap:24px;align-content:start;min-width:0}
/* Person page: on phone the left column opens up so Profile can sit under the work list. */
@media (max-width:1099px){.stack.pleft{display:contents}.pleft>.blk+.blk{order:1}}
@media (min-width:720px) and (min-height:500px){
  /* Sign-in on a computer: as wide as the pop-ups, with more room inside */
  .login{max-width:560px}
  .lgbox{gap:16px;padding:40px}
  .login .logo{width:56px;height:56px}
  .desk{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100vh}
  .side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:4px;padding:24px 16px 16px;background:var(--card);border-right:1px solid var(--hair)}
  .brand{display:flex;align-items:center;gap:12px;padding:0 8px 20px;font-family:var(--display);font-weight:700;font-size:var(--fs-md);line-height:1.2}
  .logo.sm{flex:none;width:38px;height:38px;border-radius:var(--r-md);box-shadow:none}
  .side nav{display:grid;gap:4px}
  .nitem{display:flex;align-items:center;gap:12px;width:100%;border:0;background:none;border-radius:var(--r-md);padding:12px 12px;font-weight:700;font-size:var(--fs-md);color:var(--muted);cursor:pointer;text-align:left}
  .nitem:hover{background:var(--card-2);color:var(--ink)}
  .nitem[aria-current="page"]{background:var(--accent-soft);color:var(--accent)}
  /* Same as the phone tab bar: the other items fade back (lighter grey, plain text); hovering one brings it back. */
  .side nav:has([aria-current]) .nitem:not([aria-current]):not(:hover){font-weight:400}
  .side nav:has([aria-current]) .nitem:not([aria-current]):not(:hover)>:not(.tbadge){opacity:.6}
  .side-foot{margin-top:auto;display:grid;gap:12px;padding-top:16px;border-top:1px solid var(--hair)}
  .me-row{display:flex;align-items:center;gap:12px;min-width:0;width:100%;border:0;background:none;border-radius:var(--r-md);padding:8px;cursor:pointer;text-align:left;color:var(--ink)}
  .me-row:hover{background:var(--card-2)}
  .me-row>.i{margin-left:auto;color:var(--muted)}
  .me-row div{display:grid;line-height:1.3;min-width:0}
  .me-row b{overflow-wrap:anywhere;line-height:1.25}
  .me-row small{color:var(--muted);font-size:var(--fs-sm)}
  .desk{--g:0px;--cp:20px}
  .dmain{width:100%;max-width:1080px;margin-inline:auto;padding:24px 56px 56px;display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-content:start}
  .dhead{position:relative;display:flex;align-items:center;gap:16px;min-height:60px}
  /* Back arrow hangs left of the title, so the title still lines up with the cards */
  .dhead>.iconbtn{position:absolute;right:calc(100% + 12px)}
  .dhead .ttl h1{font-size:var(--fs-xl)}
  /* Team: one centred column, People | Places switch beside the title */
  .dmain.one{max-width:720px}
  .dhead .tsw{margin-left:auto;display:inline-grid;grid-template-columns:repeat(var(--n,2),minmax(0,1fr))}
  .dhead .tsw button{padding:0 24px}
}
@media (min-width:720px) and (min-height:500px) and (max-width:1099px){
  .desk{grid-template-columns:208px minmax(0,1fr)}
  .dmain{max-width:720px;padding:24px 56px 48px}
}
@media (min-width:1100px){
  /* Two equal columns (Clock: now | today, Calendar: month | day); each card ends after its last row */
  .sgrid,.ckgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
  .card.mon{display:flex;flex-direction:column}
  .r{text-align:right;justify-self:end}
}
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
/* Clock tab: one centred card (status, big time, place · work line, Clock in or out), then today's work. */
.ckgrid{display:grid;gap:24px}
.ck{background:var(--card);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:16px var(--cp) var(--cp);display:flex;flex-direction:column;gap:12px;min-width:0}
.pill{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--fs-sm);font-weight:700}
.pill i{width:8px;height:8px;border-radius:50%;background:currentColor}
.pill.on{color:var(--accent)}
.ck-big{padding:0 0 4px;display:grid;gap:8px}
.ck-big b{font:700 var(--fs-num)/1 var(--display);letter-spacing:-.02em;font-variant-numeric:tabular-nums;transform:translateY(.375px);clip-path:inset(-.25em .8em);margin-inline:-1.25em}
/* the bars bigNum() puts around the clock digits are trimmed off here; the negative side margins give the space back, so the digits sit where they did */
.ck-big small{color:var(--muted);font-size:var(--fs-md)}
.ck label.label{margin-top:8px}
.ck.ctr{align-items:center;text-align:center;padding-block:24px var(--cp)}
.ck.ctr .btn{align-self:stretch}
/* Place · work under the big time; tap to change it */
.pickline{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-height:44px;border:0;background:none;border-radius:var(--r-md);padding:8px 12px;color:var(--accent);font-weight:700;font-size:var(--fs-md);cursor:pointer}
.pickline span{min-width:0}
.pk{display:inline-flex;min-width:0;max-width:100%}
@media (max-width:639px){.pk{flex-direction:column;align-items:center}.pk .pkd{display:none}.pk span+span{font-weight:400}.pk>span{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center}}
.pickline:hover{background:var(--card-2)}
/* Pills: short words side by side in a card (a person's roles). Tap one to open it; the outlined last one adds. */
.pills{display:flex;flex-wrap:wrap;gap:8px;padding:16px var(--cp)}
.pills button{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:40px;border:0;border-radius:var(--r-round);background:var(--accent-soft);color:var(--accent);font:inherit;font-weight:700;font-size:var(--fs-sm);padding:8px 16px;cursor:pointer}
.pills span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pills .add{background:transparent;box-shadow:inset 0 0 0 1px var(--line)}
.sites{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));gap:4px;background:var(--card-2);border-radius:var(--r-md);padding:4px}
.sites button{border:0;border-radius:var(--r-sm);background:transparent;padding:8px 4px;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;cursor:pointer;min-width:0}
.sites b{max-width:100%;font-size:var(--fs-sm);line-height:1.2;text-align:center}
.sites small{max-width:100%;font-size:var(--fs-xs);color:var(--muted);line-height:1.2;text-align:center}
.sites button[aria-pressed="true"]{background:var(--card);color:var(--accent);box-shadow:inset 0 0 0 1.5px var(--accent)}
.btn.wide{width:100%;min-height:56px;font-size:var(--fs-md);font-weight:700;margin-top:8px}
.linkbtn{border:0;background:none;color:var(--accent);font-weight:700;font-size:var(--fs-sm);padding:12px 4px;cursor:pointer;text-align:center}
.linkbtn:hover{text-decoration:underline}
.linkbtn:disabled{color:var(--muted);cursor:default;text-decoration:none}
.linkbtn.danger{color:var(--bad)}
/* Delete check: a small centred box over the edit pop-up */
.delpop{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:16px}
.delbox{position:relative;width:min(340px,100%);display:grid;gap:8px;text-align:center;background:var(--card);border-radius:var(--r-lg);padding:24px 16px 16px;box-shadow:0 30px 80px -20px var(--scrim)}
/* It pops in only when it first shows (.enter), never again when the page is drawn again */
.delpop.enter .delbox{animation:pop .18s ease-out}
.delbox b{font-size:var(--fs-lg)}
.delbox span{font-size:var(--fs-sm);color:var(--muted)}
.delbox .cc-act{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
/* Which shifts (Only this shift / All future …): the title left and the round close button right, like a pop-up's head; tick one
   answer, then the one button under them. The rows sit between hairlines, a size smaller than a pop-up's own lists. */
.delbox .cc-act.col{grid-template-columns:minmax(0,1fr)}
.delbox .list.nb.ticks{margin-top:4px}
.delbox .list.nb.ticks .row{padding:12px 0}
.delbox .list.nb.ticks .row:last-child{margin-bottom:0}
.delbox .list.nb.ticks .row+.row{border-top:1px solid var(--hair)}
.delbox .list.nb .pn b{font-size:var(--fs-md)}
.delbox .list.nb .pn small{font-size:var(--fs-sm)}
/* The box's grey words rule (.delbox span) is for the line under its title only, not the names or ticks in a list. */
.delbox .tickrow .pn{color:var(--ink)}
.delbox .tickrow .pn small{color:var(--muted)}
.delbox .tick{color:var(--accent-ink)}
.delbox.red .tick{color:var(--bad-ink)}
.delbox.red .tickrow[aria-pressed="true"] .tick{background:var(--bad)}
.delbox.pick{text-align:left;padding-top:16px}
.delbox .bhead{display:flex;align-items:flex-start;gap:12px}
.delbox .bhead b{flex:1;min-width:0;padding-top:8px;line-height:1.2}
.delbox .bhead small{display:block;margin-top:4px;font-size:var(--fs-sm);font-weight:400;color:var(--muted)}
.delbox .bhead .iconbtn{box-shadow:none;background:var(--card-2)}
/* With an X, the X sits in the middle of the title and grey line, like the big pop-ups' heading. */
.delbox .bhead:has(.iconbtn){align-items:center}
.delbox .bhead:has(.iconbtn) b{padding-top:0}
/* Tick list in the box: the same 24 above the first row and above the button. */
.delbox .list.nb.ticks .row:first-child{padding-top:12px}
.delbox .list.nb.ticks+.cc-act{margin-top:4px}
/* Someone else's work (boss): rows straight on the pop-up, no card and no lines, bigger text */
.list.nb{background:none;box-shadow:none;border-radius:0;overflow:visible;display:grid;gap:20px;margin-top:12px}
.list.nb .row{padding:0;border-top:0}
.list.nb .pn{gap:4px}
.list.nb .pn b{font-size:var(--fs-lg);white-space:normal;overflow-wrap:anywhere}
.list.nb .pn small{font-size:var(--fs-md);white-space:normal;overflow-wrap:anywhere}
.list.nb .amt{font-size:var(--fs-lg)}
.list.nb+.fsheet,.fsheet:has(>.list.nb.ticks:last-child)+.fsheet{margin-top:12px}
/* Tick one or more (Add role): a round tick before the name, filled green when picked. The last row adds a new one: a green plus where the ticks are.
   One even gap between the rows, and no extra space at the list's top or bottom, so it sits like any other box in the pop-up. */
.list.nb.ticks{gap:0}
.list.nb.ticks .row{padding:12px 0}
.list.nb.ticks .row:first-child{padding-top:0}
/* Right under the pop-up's title the first role gets a little air, so it is about as far from the title as the roles are from each other. */
.panel-body>.list.nb.ticks:first-child .row:first-child{padding-top:8px}
/* The last row keeps its full tap height (padding) but takes it back with a negative margin, so nothing below moves. */
.list.nb.ticks .row:last-child{margin-bottom:-12px}
.tickrow.new{color:var(--accent)}
.tickrow.new .tick{box-shadow:none;color:inherit}
.list.nb .tickrow.new .pn b{font-size:var(--fs-md)}
.tick{width:24px;height:24px;border-radius:var(--r-round);box-shadow:inset 0 0 0 1.5px var(--line);display:grid;place-items:center;flex:none;color:var(--accent-ink)}
.tickrow[aria-pressed="true"] .tick{background:var(--accent);box-shadow:none}
/* An answer under the pop-up's title: the status dot and words, then the boss's reason on its own line (red when declined or taken off, wraps when long). */
.panel-head h2 .pill{display:flex;margin-top:8px;letter-spacing:0;line-height:1.45}
.pill.no{color:var(--bad)}
.pill.pend{color:var(--warn)}
.panel-head h2 small.why{font-size:var(--fs-md);line-height:1.45;color:var(--ink);overflow-wrap:anywhere}
.panel-head h2 .pill.no+small.why{color:var(--bad)}
/* What an accepted OT gives (pay or extra leave): a green box with the amount in green, so it stands out from the details. */
.list.nb .row.got{padding:12px 16px;border-radius:var(--r-md);background:var(--accent-soft);cursor:default}
.list.nb .got .pn b{font-size:var(--fs-md);color:var(--accent)}
.list.nb .got .pn small{font-size:var(--fs-sm)}
.list.nb .got .amt{font-size:var(--fs-xl);color:var(--accent)}
.panel-body>:first-child{margin-top:0}
/* Details whose first group has a small label (Time …): the label keeps the same gap from the date line as the groups have from each other (20). */
.panel-body>.list.nb:first-child:has(>.row:first-child>.pn>.label){margin-top:12px}
@media (min-width:640px){.panel-body>.list.nb:first-child:has(>.row:first-child>.pn>.label){margin-top:4px}}
/* Pay rate row: the HK$ box and the / hour | / job buttons are both 56px, as tall as the Save button, and line up top and bottom */
.tpair .payfield{padding:0 16px;align-self:center}
.tpair .payfield input{min-height:56px}
.tpair:has(.payfield) .segc button{min-height:56px}
/* "Pay rate" sits as close to its row as every other label sits to its box (8px, not 8 + 16) */
.fsheet .label+.tpair{margin-top:0}
/* The line under the pay rate row sits as close as a label sits to its box */
.fsheet .tpair:has(.payfield)+.hint{margin-top:8px}
/* A box to type in gets the same room from the title as from the buttons, so it doesn't crowd the title */
.delbox .fin{margin-top:12px}
/* Ask to delete: the Reason title sits close under the question, on the left over its box like every form; its red Required isn't greyed */
.delbox .label{text-align:left}
.delbox .label+.fin{margin-top:0}
.delbox .req{color:inherit}
/* Login */
.lgbox{display:grid;gap:12px;background:var(--card);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:24px}
.lg-sent{color:var(--muted);overflow-wrap:anywhere}
.lg-sent b{color:var(--ink)}
.fin.code{font:700 var(--fs-xl) var(--display);letter-spacing:.3em;text-align:center}
.lg-alt{display:flex;justify-content:space-between;flex-wrap:wrap}
/* Waiting for the Google Sheet: a thin moving bar at the top. */
.ld{position:fixed;left:0;right:0;top:env(safe-area-inset-top,0px);height:3px;z-index:61;overflow:hidden;pointer-events:none}
/* While the camera or the full-screen picture is open, the phone's top and bottom bars take its dark grey (shell.js): a thin strip of
   that colour at each edge. The loading line stays above it. (Pop-ups need none: the page's own colours darken, see html.dim.) */
.barstrip{position:fixed;left:0;right:0;z-index:60;pointer-events:none}
.barstrip.top{top:0;height:max(12px,env(safe-area-inset-top,0px))}
.barstrip.bot{bottom:0;height:max(12px,env(safe-area-inset-bottom,0px))}
.ld::after{content:"";position:absolute;inset:0 auto 0 0;width:40%;background:var(--accent);animation:ld 1s ease-in-out infinite}
@keyframes ld{from{transform:translateX(-100%)}to{transform:translateX(260%)}}
/* Wait look (CaptureShelf's): dimmed screen, a faint ring with a short bright arc turning round it */
.wait{position:fixed;inset:0;z-index:50;display:grid;place-items:center;animation:fade .2s ease-out}
.wait>div{display:flex;flex-direction:column;align-items:center;gap:16px}
/* The page behind darkens by its own colours (html.dimw), so the ring needs no cover of its own. */
.wait b{color:var(--spin);font-size:var(--fs-lg);font-weight:700;transform:translateY(.375px)}
.wait.out{opacity:0;transition:opacity .2s ease-out}
body:has(.wait) .ld{display:none}
.wait svg{width:56px;height:56px;animation:spin .9s linear infinite}
.wait circle{fill:none;stroke:var(--spin);stroke-width:4;stroke-linecap:round}
.wait .trk{opacity:.25}
.wait .arc{stroke-dasharray:28 100;transform:rotate(-90deg);transform-origin:center}
@keyframes spin{to{transform:rotate(360deg)}}
/* On a computer the ring and words grow (CaptureShelf sizes its ring to what's under it) */
@media (min-width:1100px){.wait svg{width:80px;height:80px}}
body.busy [data-act]{cursor:progress}
/* Small phones or big text: long names wrap. */
@media (max-width:359px){
  .ttl h1{white-space:normal;overflow-wrap:anywhere}
}
/* Waiting for a supervisor or the boss: the same note in orange. */
.backnote.w{background:var(--warn-soft);color:var(--warn)}
/* Clock times staff can't change on the spot: the same big boxes, filled grey, nothing to type in. "Change times" sits under them. */
.tbox.ro{background:var(--card-2);box-shadow:none;cursor:default}
.tbox.ro b{color:var(--ink)}
.fsheet .samebtn{align-self:flex-start;margin-top:8px}
.segc button:disabled{cursor:default}
.segc button:disabled:not([aria-pressed="true"]){color:var(--muted)}
/* QR clock-in. The screen left at a place: its name on top, the clock on the left and the QR on the right (stacked when narrow). */
.qrs{width:100%;max-width:1080px;margin-inline:auto;padding:24px max(24px,env(safe-area-inset-right,0px)) 40px max(24px,env(safe-area-inset-left,0px));display:grid;gap:24px}
.qrs .qrtop{display:flex;align-items:center;gap:12px}
.qrs .linkbtn{justify-self:start}
@media (min-width:720px){.qrs .sgrid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
/* The QR itself is always dark on light, so every phone camera reads it. */
.qrimg{display:block;width:100%;max-width:400px;height:auto;border-radius:var(--r-md);background:var(--card);color:var(--ink)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .qrimg{background:var(--ink);color:var(--card)}}
:root[data-theme="dark"] .qrimg{background:var(--ink);color:var(--card)}
/* The QR icon beside a place's name. */
.panel-head .qrgo{color:var(--accent)}
/* The scanner that Clock in opens at a QR place: full screen, like the iPhone's Code Scanner. The camera picture fills the
   screen (only what shows on screen is read), four corners sit in the middle, the words sit at the bottom.
   Two fingers on it zoom, not the page. */
.camx{position:fixed;inset:0;z-index:40;background:var(--view);overflow:hidden;touch-action:none}
/* Until the camera's first picture is there it is not shown at all, so the page goes straight to the picture. */
.camx.off{visibility:hidden}
.camv{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;transform:scale(var(--camz,1));transition:filter .3s ease,transform .3s ease}
/* The camera's ×: a little down from the phone's top bar, so it never looks stuck to it (Ariel 2026-11-27). */
.camx>.iconbtn{position:absolute;z-index:1;top:calc(24px + env(safe-area-inset-top,0px));right:max(16px,env(safe-area-inset-right,0px))}
/* Four corners. They follow a QR code in the moving picture; when it is caught the picture stops and blurs, only the
   code stays sharp, and the code with its corners glides to the middle while the corners fade; then it closes. */
.camq{--qs:min(64vw,64vh);position:absolute;inset:0;pointer-events:none;transition:transform .45s cubic-bezier(.2,.8,.2,1)}
.camq i{position:absolute;width:40px;height:40px;border:4px solid var(--cam-line);transition:left .2s ease,top .2s ease,width .2s ease,height .2s ease,opacity .2s ease}
.camq i:nth-child(2){left:calc(50% - var(--qs)/2);top:calc(50% - var(--qs)/2);border-right:0;border-bottom:0;border-top-left-radius:var(--r-lg)}
.camq i:nth-child(3){left:calc(50% + var(--qs)/2 - 40px);top:calc(50% - var(--qs)/2);border-left:0;border-bottom:0;border-top-right-radius:var(--r-lg)}
.camq i:nth-child(4){left:calc(50% + var(--qs)/2 - 40px);top:calc(50% + var(--qs)/2 - 40px);border-left:0;border-top:0;border-bottom-right-radius:var(--r-lg)}
.camq i:nth-child(5){left:calc(50% - var(--qs)/2);top:calc(50% + var(--qs)/2 - 40px);border-right:0;border-top:0;border-bottom-left-radius:var(--r-lg)}
.camq.hit i{width:24px;height:24px}
.camq.hit i:nth-child(2){border-top-left-radius:var(--r-md)}
.camq.hit i:nth-child(3){border-top-right-radius:var(--r-md)}
.camq.hit i:nth-child(4){border-bottom-right-radius:var(--r-md)}
.camq.hit i:nth-child(5){border-bottom-left-radius:var(--r-md)}
.camc{position:absolute;display:block}
/* Blurred, the picture grows a little so its blurred edges stay off the screen. */
.camx.lock .camv{filter:blur(16px) brightness(.85);transform:scale(calc(var(--camz,1)*1.1))}
.camx.lock .camtip,.camx.lock>.iconbtn{opacity:0;transition:opacity .2s ease}
.camq.go i{opacity:0;transition-delay:.3s}
/* The words at the bottom: which place to scan, or what went wrong. */
.camx .camtip{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(32px + env(safe-area-inset-bottom,0px));width:min(520px,calc(100% - 32px));margin:0;padding:12px 16px;border-radius:var(--r-md);background:var(--card);color:var(--ink);font-size:var(--fs-sm);text-align:center}
.camx .camtip.ferr-at{justify-content:center;background:var(--bad-soft);color:var(--bad)}
/* Receipt scanner: the paper's outline on the moving picture, the round button to take it at once (its ring fills while the paper is
   held still; full: taken), a white flash when it is taken. Original / Black & white at the top left; Photos · Scan · Files at the bottom. */
.rcq{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:0;transition:opacity .2s ease}
.rcq.on{opacity:1}
.rcq path{fill:var(--accent);fill-opacity:.2;stroke:var(--accent);stroke-width:4;stroke-linejoin:round;transition:fill-opacity .2s ease}
.rcq.hold path{fill-opacity:.4}
.rcq path.rcp,.rcq.hold path.rcp{fill:none;stroke-width:8;stroke-linecap:round}
.rcx .camtip{bottom:calc(128px + env(safe-area-inset-bottom,0px))}
.rcshut{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(32px + env(safe-area-inset-bottom,0px));width:72px;height:72px;padding:4px;border:4px solid transparent;border-radius:50%;background:transparent;cursor:pointer}
.rcshut i{display:block;width:100%;height:100%;border-radius:50%;background:var(--cam-line)}
.rcring{position:absolute;inset:-4px;width:72px;height:72px;overflow:visible;transform:rotate(-90deg);pointer-events:none}
.rcring circle{fill:none;stroke:var(--cam-line);stroke-width:6}
.rcx.snap::after{content:"";position:absolute;inset:0;background:var(--cam-line);animation:rcsnap .3s ease-out forwards}
@keyframes rcsnap{from{opacity:.85}to{opacity:0}}
/* Claim pop-up: receipt tiles (pictures with a cross, and the Add tile); one claim's pictures, tap for full screen. */
.rcgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.rcgrid.one{grid-template-columns:minmax(0,1fr)}
.rcgrid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.rcgrid.two .rcadd{aspect-ratio:auto;min-height:112px;font-size:var(--fs-md)}
.rcth{position:relative;aspect-ratio:3/4;border-radius:var(--r-md);overflow:hidden;background:var(--card-2);box-shadow:var(--shadow)}
.rcth img{display:block;width:100%;height:100%;object-fit:cover;object-position:top;cursor:zoom-in}
/* Pictures aren't colours, so a pop-up's darkening (html.dim, --dimp) doesn't reach them: a cover of the dim colour, as deep as the
   colours round it are mixed, fades in over each one with them (Ariel 2026-11-27: the receipts stayed bright under the Add box). */
.rcth::after,.rcpic:not(.wait)::after,.pmap::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:color-mix(in srgb,transparent,var(--dim-ink) var(--dimp))}
/* The cross on a picture: a 32 round mark in a 40 square to tap, part of the picture's tile (tapping the rest shows it full screen). */
.rcdel{position:absolute;top:0;right:0;width:40px;height:40px;padding:4px;border:0;background:transparent;color:var(--cam-line);cursor:pointer}
.rcdel i{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:var(--scrim)}
.rcadd{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;aspect-ratio:3/4;padding:4px;border:0;border-radius:var(--r-md);background:var(--card-2);color:var(--accent);font:inherit;font-weight:700;font-size:var(--fs-xs);cursor:pointer}
.rcgrid.one .rcadd{aspect-ratio:auto;min-height:112px;padding:12px;font-size:var(--fs-md)}
.rcadd small{font-weight:400;font-size:var(--fs-sm);color:var(--muted)}
.rcpics{display:grid;gap:8px}
.rcpics.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.rcpic{position:relative;display:block;width:100%;height:280px;padding:0;border:0;border-radius:var(--r-md);overflow:hidden;background:var(--card-2);box-shadow:var(--shadow);cursor:zoom-in}
.rcpics.two .rcpic{height:200px}
.rcpic img{display:block;width:100%;height:100%;object-fit:contain}
.rcpic.wait{display:grid;place-items:center;padding:16px;color:var(--muted);font:inherit;font-size:var(--fs-sm);text-align:center;cursor:default}
button.rcpic.wait{cursor:pointer}
/* A picture still loading: a soft light stripe moves across its box, like the loading line at the top (same moving bar, @keyframes ld).
   In the full-screen picture the stripe passes over the picture shown while the other look comes. With less motion asked, a still box. */
/* A picture still coming: its box dims, with the app's loading ring in the middle (the full-screen wait's ring, smaller). */
.picwait{display:grid;place-items:center;cursor:default;background:color-mix(in srgb,var(--card-2),var(--dim-ink) var(--dim-max))}
/* Full screen, while the other look comes: only the picture dims (Ariel 2026-11-30: the whole grey area turning lighter and dim looked odd). */
.rcstage.picwait{background:none}
.rcstage.picwait img{filter:brightness(calc(100% - var(--dim-max)))}
.picwait svg{position:relative;z-index:2;width:40px;height:40px;animation:spin .9s linear infinite}
.rcth.picwait svg{width:24px;height:24px}
.rcstage.picwait svg{position:absolute;left:50%;top:50%;width:56px;height:56px;margin:-28px 0 0 -28px}
.picwait circle{fill:none;stroke:var(--spin);stroke-width:4;stroke-linecap:round}
.picwait .trk{opacity:.25}
.picwait .arc{stroke-dasharray:28 100;transform:rotate(-90deg);transform-origin:center}
.rcadd:disabled{cursor:default}
/* Full screen picture: grey, a bar (look, Download, cross), the picture fitted below it; zoomed with a transform (claims.js clBig). */
.rcfull{position:fixed;inset:0;z-index:35;display:flex;flex-direction:column;background:var(--view)}
/* A closed camera (.camgone: only its picture is left) or full-screen picture fades out over 0.2s (shell.js leaveFade) while its strips go from dark grey (--from) to the
   page's colours (--to) by the same amount (--gone, 0 to 1) on every frame. Like .pagetop: Safari paints its bar from the strip's own
   colour one frame late, so that runs one frame (--lead) early, and the cover on it (what you see) runs with the screen. */
@property --gone{syntax:'<number>';inherits:true;initial-value:0}
.camgone,.rcfull.gone{opacity:calc(1 - var(--gone))}
.camgone.go,.rcfull.gone.go{animation:gone .2s ease-out var(--lead,17ms) both}
.camgone{position:fixed;inset:0;z-index:40;background:var(--view);overflow:hidden;pointer-events:none}
.camgone>:not(.camv){display:none}
.barstrip.mix,.barstrip.mix::after{background:color-mix(in srgb,var(--from),var(--to) calc(var(--gone)*100%))}
.barstrip.mix::after{content:"";position:absolute;inset:0}
.barstrip.mix.go{animation:gone .2s ease-out both}
.barstrip.mix.go::after{animation:gone .2s ease-out var(--lead,17ms) both}
/* Opening is the same the other way round: the camera or full-screen picture is see-through until the strip code has seen it
   (shown), then fades in (in, go) while the strips go from the bars' colours now (--from) to dark grey (--to). */
.camx:not(.shown),.rcfull:not(.shown){opacity:0}
.camx.in,.rcfull.in{opacity:var(--gone)}
.camx.in.go,.rcfull.in.go{animation:gone .2s ease-out var(--lead,17ms) both}
@keyframes gone{from{--gone:0}to{--gone:1}}
.rcbar{display:flex;align-items:center;gap:8px;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px))}
.rcbar>:first-child{margin-right:auto}
.rcbar .segc{width:min(280px,calc(100% - 96px));background:var(--view-2)}
.rcbar .segc button{color:var(--cam-line)}
.rcbar .segc button[aria-pressed="true"]{background:var(--view-3);color:var(--cam-line);box-shadow:none}
.rcbar .iconbtn{background:var(--view-2);box-shadow:none;color:var(--cam-line)}
.rcstage{position:relative;flex:1;min-height:0;margin:0 16px calc(16px + env(safe-area-inset-bottom,0px));overflow:hidden;touch-action:none}
.rcstage img{position:absolute;left:0;top:0;max-width:none;transform-origin:0 0;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:zoom-in}
.rcfull.zoomed .rcstage img{cursor:grab}
/* Crop and Rotate under a scan in their own claim, and the crop screen in the same grey (claims.js clCrop): the kept camera picture, its
   corners and side dots to drag, a round magnifier with a cross over the spot under the finger, then Cancel / Whole picture / Done. */
.rcfull [hidden]{display:none}
.rcfoot{display:flex;justify-content:space-around;gap:8px;width:100%;max-width:400px;margin:0 auto;padding:0 16px calc(12px + env(safe-area-inset-bottom,0px))}
.rcfoot button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 16px;border:0;background:transparent;color:var(--cam-line);font:inherit;font-size:var(--fs-sm);cursor:pointer}
.rcfoot button[data-c="ok"]{font-weight:700}
.rcstage:has(+.rcfoot){margin-bottom:12px}
.rccrop{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;padding-top:calc(12px + env(safe-area-inset-top,0px))}
.rccrop .rcstage{margin:0 0 12px}
.rccrop .rcstage img{cursor:default}
/* The page flying between the view and the camera picture (clCrop fly): placed by a perspective transform from its top left. */
.rcfly{position:absolute;left:0;top:0;z-index:2;max-width:none;transform-origin:0 0;pointer-events:none}
.rccq{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.rccq path{fill:none;stroke:var(--accent)}
.rccq .rcsh{fill:var(--crop-shade);fill-rule:evenodd;stroke:none}
.rccq .rcol{stroke-width:2}
.rccq .rcgr{stroke-width:1;stroke-dasharray:6 6}
.rccq .rchd{stroke-width:6;stroke-linejoin:miter}
.rcmag{position:absolute;top:8px;left:8px;width:112px;height:112px;border-radius:50%;border:4px solid var(--cam-line);pointer-events:none}
.rcmag.r{left:auto;right:8px}
