/* loop.cafe209.my — the pages. Every colour, typeface, corner and border comes from theme.css.
   To change the look, theme.css is the current cafe209.my look (ruled 14 Nov 2026: no new design). Do not put colours here.
   Three fixed exceptions, the same in every theme: the QR's white tile, the receipt's paper, the camera view. */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
html,body{margin:0;background:var(--b-screen)}
body{color:var(--b-ink);font-family:var(--f-body);font-weight:var(--body-weight);font-size:15px;line-height:1.5;-webkit-tap-highlight-color:transparent;min-height:100vh;min-height:100dvh}
[hidden]{display:none!important}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
a{color:var(--b-link)}
:focus-visible{outline:2px solid var(--b-rule);outline-offset:2px}
.col{width:100%;max-width:430px;margin:0 auto}

/* top bar */
.bar{position:sticky;top:0;z-index:5;background:var(--b-bar);border-bottom:var(--bw) solid var(--b-bar-line)}
.bar .col{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:13px max(16px,env(safe-area-inset-right,0px)) 13px max(16px,env(safe-area-inset-left,0px))}

/* a screen */
.scr{padding:20px max(16px,env(safe-area-inset-right,0px)) 40px max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:14px}
.scr>*{min-width:0}
h1{font-family:var(--f-head);font-weight:var(--head-weight);font-style:var(--head-style);text-transform:var(--head-case);letter-spacing:var(--head-track);font-size:var(--head-size);text-shadow:var(--head-shadow);color:var(--b-head);line-height:1.15;margin:0;text-wrap:balance}
p{margin:0;color:var(--b-soft)}
.sec{font-family:var(--f-label);font-weight:600;font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--b-soft);margin-top:6px}
.err{color:var(--b-warn);font-weight:600;font-size:14px}
.err:empty{display:none}
.ok{color:var(--b-good);font-weight:600}
.center{text-align:center}

/* buttons */
.btn{display:block;width:100%;text-align:center;text-decoration:none;background:var(--b-accent);color:var(--b-on-accent);font-family:var(--f-label);font-weight:var(--btn-weight);font-size:var(--btn-size);text-transform:var(--btn-case);letter-spacing:var(--btn-track);line-height:1.3;padding:15px 13px;border-radius:var(--r-btn);border:var(--bw) solid var(--b-accent);outline:var(--ring-w) solid var(--b-ring);outline-offset:-5px}
.btn:disabled{opacity:.5;cursor:default}
.btn.ghost{background:transparent;color:var(--b-ghost);border-color:var(--b-ghost-line);outline-width:0}
.btn.wa{background:var(--b-wa);color:var(--b-on-wa);border-color:var(--b-wa)}
.btn.sm{display:inline-block;width:auto;padding:10px 16px;align-self:flex-start}
.btn:focus-visible{outline:2px solid var(--b-rule);outline-offset:2px}
.lnk{text-wrap:balance;font-size:14px;color:var(--b-link);font-weight:600;text-align:center;text-decoration:underline;text-underline-offset:3px;background:none;border:0;padding:8px;align-self:center}
.row{display:flex;gap:8px} .row>*{min-width:0} .grow{flex:1}
.acts{display:flex;gap:8px;flex-wrap:wrap}
.acts .btn{flex:1;min-width:104px}

/* forms: 16px inputs so iPhones do not zoom */
.form{display:contents}
.fld{display:flex;flex-direction:column;gap:6px}
.fld label{font-family:var(--f-label);font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--b-soft)}
.inp{width:100%;background:var(--b-surface);border:var(--bw) solid var(--b-line);border-radius:var(--r-box);padding:13px 12px;font-size:16px;color:var(--b-ink)}
.inp::placeholder{color:var(--b-soft);opacity:.7}
.inp.cc{width:86px;flex:none}
.inp.pin{font-family:var(--f-mono);font-size:30px;letter-spacing:.5em;text-align:center;padding-left:calc(12px + .5em)}

/* boxes */
.tip{font-size:13.5px;color:var(--b-tint-fg);background:var(--b-tint);border-radius:var(--r-box);padding:11px 12px}
.remind{border:var(--remind-border);background:var(--b-surface);border-radius:var(--r-box);padding:13px;display:flex;flex-direction:column;gap:9px}
.remind b{font-weight:700;font-size:15.5px;color:var(--b-ink)}
.code{font-family:var(--f-mono);font-size:32px;letter-spacing:.22em;font-weight:600;text-align:center;background:var(--b-surface);border:1px dashed var(--b-code-line);border-radius:var(--r-box);padding:16px 8px;color:var(--b-ink);user-select:all}
.steps{display:flex;flex-direction:column;gap:6px;font-size:14px}
.steps div{display:flex;gap:8px;align-items:baseline} .steps i{font-style:normal;font-weight:700;color:var(--b-good);width:14px;flex:none}
.steps .wait i{color:var(--b-soft)}

/* state pills */
.pill{display:inline-flex;align-items:center;gap:5px;font-family:var(--f-label);font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;border-radius:var(--r-pill);padding:3px 9px;border:1px solid transparent;white-space:nowrap;line-height:1.4}
.pill.act,.pill.rdy{background:var(--b-act-bg);color:var(--b-act-fg)}
.pill.act::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.pill.pen{background:var(--b-pen-bg);color:var(--b-pen-fg)}
.pill.chk{background:transparent;color:var(--b-chk-fg);border:1px dashed var(--b-chk-line)}
.pill.exp{background:var(--b-exp-bg);color:var(--b-exp-fg)}

/* the Loop card */
.card{position:relative;border-radius:var(--r-card);padding:var(--card-pt) 16px 16px;background:var(--b-card);color:var(--b-card-fg);border:var(--card-bw) solid var(--b-card-line);outline:var(--card-ring-w) solid var(--b-rule);outline-offset:-6px;display:flex;flex-direction:column;gap:12px;text-align:left;width:100%}
.card::before,.card::after{content:"";position:absolute;top:46px;width:var(--notch);height:var(--notch);border-radius:50%;background:var(--b-screen)}
.card::before{left:calc(var(--notch) / -2)} .card::after{right:calc(var(--notch) / -2)}
.card.pend{background:var(--b-pend-bg);color:var(--b-pend-fg);border:var(--bw) dashed var(--b-pend-line);outline-width:0}
.card.off{background:var(--b-off-bg);color:var(--b-off-fg);border:var(--bw) solid var(--b-off-line);outline-width:0}
.card .top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.plan{white-space:nowrap;font-family:var(--f-plan);font-weight:var(--plan-weight);font-style:var(--plan-style);font-size:var(--plan-size);letter-spacing:var(--plan-track);text-shadow:var(--head-shadow);line-height:1}
.no{font-family:var(--f-mono);font-size:12.5px;margin-top:5px}
.cups{display:flex;gap:6px;flex-wrap:wrap}
.cups i{width:22px;height:22px;border-radius:var(--r-cup);border:1.5px solid currentColor}
.cups i.used{background:currentColor;opacity:.35}
.days{display:grid;grid-template-columns:repeat(15,1fr);gap:3px}
.days i{height:12px;border-radius:calc(var(--r-box) / 4);border:1px solid currentColor;opacity:.7}
.days i.used{background:currentColor;opacity:.35}
.days i.today{background:currentColor;opacity:1}
.big{font-family:var(--f-plan);font-weight:var(--plan-weight);font-style:var(--plan-style);font-size:20px;line-height:1.2}
.meta{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;font-size:12px}
.meta span{display:block;font-family:var(--f-label);font-size:10.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;opacity:.85}
.meta b{font-weight:600;font-size:14px;font-variant-numeric:tabular-nums}
.card .btn{background:var(--b-card-btn);color:var(--b-card-btn-fg);border-color:var(--b-card-btn);outline-color:var(--b-card-btn-fg)}
.card .btn.ghost{background:transparent;color:inherit;border-color:currentColor;outline-width:0}
.card.pend .btn{background:var(--b-accent);color:var(--b-on-accent);border-color:var(--b-accent);outline-color:var(--b-ring)}
.card.pend p{color:var(--b-soft)}

/* the QR: always dark on its own white tile, in every theme */
.qrbox{background:var(--b-surface);border-radius:var(--r-box);padding:18px 16px;display:flex;flex-direction:column;align-items:center;gap:12px;border:var(--bw) solid var(--b-line)}
.qrtile{background:#ffffff;width:100%;max-width:264px;border-radius:4px;padding:14px}
.qrtile canvas{width:100%;height:auto;display:block;image-rendering:pixelated}
.mcode{font-family:var(--f-mono);font-size:28px;letter-spacing:.2em;font-weight:600;color:var(--b-ink)}
.tick{font-size:13px;color:var(--b-soft);display:flex;align-items:center;gap:8px}
.tick i{width:64px;height:6px;border-radius:3px;border:1px solid var(--b-line);position:relative;overflow:hidden}
.tick i::after{content:"";position:absolute;inset:0;right:calc(100% - var(--left,100%));background:var(--b-good)}

/* upload */
.drop{border:1.5px dashed var(--b-code-line);border-radius:var(--r-box);background:var(--b-surface);padding:24px 14px;text-align:center;display:flex;flex-direction:column;gap:12px;align-items:center;color:var(--b-ink)}
.drop .row{flex-wrap:wrap;justify-content:center}
.cam{width:44px;height:34px;border:2px solid var(--b-code-line);border-radius:8px;position:relative}
.cam::after{content:"";position:absolute;inset:7px 12px;border:2px solid var(--b-code-line);border-radius:50%}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* lists and the receipt */
.list{background:var(--b-surface);border:var(--bw) solid var(--b-line);border-radius:var(--r-box);overflow:hidden}
.li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px;border-top:1px solid var(--b-line);font-size:14.5px}
.li:first-child{border-top:0} .li small{display:block;color:var(--b-soft);font-size:12.5px} .li .r{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.li b{font-weight:600}
.plans{display:flex;flex-direction:column;gap:10px}
.planopt{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;background:var(--b-surface);border:var(--bw) solid var(--b-line);border-radius:var(--r-box);padding:14px;width:100%}
.planopt[aria-pressed="true"]{border-color:var(--b-rule);background:var(--b-tint);color:var(--b-tint-fg)}
.planopt .plan{font-size:calc(var(--plan-size) * .8)} .planopt small{display:block;color:inherit;opacity:.8;font-size:13px;margin-top:4px}
.planopt .price{font-family:var(--f-label);font-weight:600;font-size:16px;white-space:nowrap}
.rcpt{background:#ffffff;color:#2a2622;border-radius:4px;padding:14px;font-family:var(--f-mono);font-size:12.5px;line-height:1.6}
.rcpt .c{text-align:center} .rcpt hr{border:0;border-top:1px dashed #b9b2a6;margin:8px 0} .rcpt .t{display:flex;justify-content:space-between;gap:8px}
.photo{width:100%;border-radius:var(--r-box);border:var(--bw) solid var(--b-line);display:block}

/* crew page */
.view{aspect-ratio:4/3;border-radius:var(--r-box);background:#000;position:relative;overflow:hidden;display:grid;place-items:center;color:#fff;font-size:13px}
.view video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.view::after{content:"";position:absolute;inset:18% 24%;border:2px solid #fff;border-radius:12px;opacity:.9;pointer-events:none}
.chips{display:flex;gap:7px;flex-wrap:wrap}
.chips button{font-family:var(--f-label);font-weight:600;font-size:13.5px;border:var(--bw) solid var(--b-line);background:var(--b-surface);color:var(--b-ink);border-radius:var(--r-pill);padding:10px 14px}
.chips button[aria-pressed="true"]{background:var(--b-accent);border-color:var(--b-accent);color:var(--b-on-accent)}
.found{background:var(--b-surface);border:var(--bw) solid var(--b-good);border-radius:var(--r-box);padding:13px}
.found b{font-size:17px;color:var(--b-ink)}
.tabs{display:flex;gap:6px}
.tabs button{flex:1;font-family:var(--f-label);font-weight:600;font-size:12.5px;letter-spacing:.06em;text-transform:uppercase;padding:11px 6px;background:transparent;border:var(--bw) solid var(--b-line);border-radius:var(--r-btn);color:var(--b-soft)}
.tabs button[aria-selected="true"]{background:var(--b-tint);color:var(--b-tint-fg);border-color:var(--b-tint)}

@media (prefers-reduced-motion: reduce){ *{scroll-behavior:auto!important;transition:none!important;animation:none!important} }
.note{font-size:12.5px;line-height:1.5;color:var(--b-soft);border-top:1px solid var(--b-line);padding-top:12px;display:flex;flex-direction:column;gap:6px}.note b{color:var(--b-ink);font-weight:600}.note p{margin:0}
.mono{font-family:var(--f-mono);letter-spacing:.08em}

/* picking old cards to move (ruling 24) */
.pick{display:flex;gap:10px;align-items:center;padding:12px 14px;border:1px solid var(--b-line);border-radius:12px;font-size:15px}
.pick input{width:20px;height:20px;flex:none}
.kbox{display:flex;flex-direction:column;gap:12px}
.kcard{border:1px solid var(--b-line);border-radius:12px;padding:12px 14px;background:var(--b-surface);display:flex;flex-direction:column;gap:4px}
.kcard p{margin:0;font-size:14px;color:var(--b-soft)}
.mwords{font-family:var(--f-mono);font-size:19px;letter-spacing:.06em;font-weight:600;color:var(--b-ink);border:1px dashed var(--b-line);border-radius:12px;padding:14px;text-align:center;overflow-wrap:anywhere}

/* the account card and the coming-soon note (15 Nov 2026). Colours from theme.css only: the card wears the Loop card's own colours. */
.mcard{border-radius:var(--r-card);padding:18px;background:var(--b-card);color:var(--b-card-fg);border:var(--card-bw) solid var(--b-card-line);display:flex;flex-direction:column;gap:10px;position:relative;overflow:hidden}
.mcard::after{content:"";position:absolute;right:-56px;top:-84px;width:120px;height:120px;border-radius:50%;border:1.5px solid currentColor;opacity:.18;pointer-events:none}
.mcard.calm{background:var(--b-tint);color:var(--b-tint-fg);border-color:var(--b-line)}
.mlabel{display:block;font-family:var(--f-label);font-size:10.5px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;opacity:.85}
.mcard p{color:inherit;margin:0}
.mname{font-family:var(--f-plan);font-weight:var(--plan-weight);font-size:24px;line-height:1.15;overflow-wrap:anywhere}
.mrow{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-top:2px;border-top:1px solid currentColor;border-top-color:color-mix(in srgb,currentColor 25%,transparent);padding-top:10px}
.mrow .r{text-align:right}
.mrow p{line-height:28px;margin-top:2px}
.mcard .mcode{color:inherit;font-size:22px}
.mvia{font-weight:600;font-size:17px}
.soon{background:var(--b-surface);border:1px dashed var(--b-code-line);border-radius:var(--r-box);padding:13px;display:flex;flex-direction:column;gap:9px;align-items:flex-start}
.soon b{font-weight:700;font-size:15.5px;color:var(--b-ink)}

/* ===== Motion and touch (15 Nov 2026) — the one shared section for how the pages FEEL. Patterns follow the ISL clock-in
   site (Design Book 13.1 / 13.3 / 13.4 / 13.13). Helpers are in motion.js. Colours come from theme.css tokens only.
   Everything here stops under prefers-reduced-motion (block at the end). ===== */
:root{--spring:cubic-bezier(.34,1.56,.64,1);--eout:cubic-bezier(.2,.8,.2,1);--sheet:cubic-bezier(.32,.72,0,1);--snap:cubic-bezier(.22,1,.36,1);--dim:color-mix(in srgb,var(--b-ink) 50%,transparent);--lift:color-mix(in srgb,var(--b-ink) 24%,transparent)}
html{overscroll-behavior-y:contain;overflow-x:clip}

/* press: sinks to 96 % at once, springs back in .26 s */
.btn,.lnk,.planopt,.pick,.chips button,.tabs button,.brand,.bar-out,.acct,a.li,.edit summary{transition:transform .26s var(--spring),filter .15s,opacity .2s,background-color .2s,border-color .2s,color .2s}
.prs{transform:scale(.96);filter:brightness(.93);transition:transform .09s ease-out,filter .09s}
.lnk.prs{filter:none;opacity:.6}

/* a button while its request runs: a ring and no second tap */
.is-busy{cursor:progress}
.btn.is-busy:disabled{opacity:.8}
.is-busy::before,.m-ring,.live{content:"";display:inline-block;width:.95em;height:.95em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:m-spin .7s linear infinite;vertical-align:-.12em;flex:none}
.is-busy::before{margin-right:8px}
@keyframes m-spin{to{transform:rotate(360deg)}}

/* the thin line under the header while a slow request runs */
.m-net{position:fixed;left:0;right:0;top:0;height:3px;z-index:60;overflow:hidden;opacity:0;transition:opacity .2s;pointer-events:none}
.m-net.on{opacity:1}
.m-net::after{content:"";position:absolute;left:0;top:0;bottom:0;width:38%;background:var(--b-accent);border-radius:3px;animation:m-slide 1.1s ease-in-out infinite}
@keyframes m-slide{from{transform:translateX(-100%)}to{transform:translateX(265%)}}

/* screens: deeper = slides in from the right, back = from the left, same level = a soft rise */
.scr.m-push{animation:m-push .26s var(--eout)}
.scr.m-pop{animation:m-pop .2s var(--eout)}
.scr.m-rise{animation:m-rise .26s var(--eout)}
@keyframes m-push{from{opacity:.25;transform:translateX(22%)}}
@keyframes m-pop{from{opacity:.4;transform:translateX(-12%)}}
@keyframes m-rise{from{opacity:0;transform:translateY(8px)}}
.scr.m-stagger>*{animation:m-rise .22s var(--eout) both;animation-delay:calc(var(--i,0) * 25ms)}

/* skeletons */
.sk{display:block;position:relative;overflow:hidden;border:1px solid var(--b-line);border-radius:var(--r-box);background:var(--b-surface)}
.sk::after,.qrtile.loading::after{content:"";position:absolute;top:0;bottom:0;left:0;width:60%;background:linear-gradient(90deg,transparent,var(--b-frame),transparent);animation:m-shim 1.2s linear infinite;will-change:transform}
.sk.h1{height:28px;width:62%}.sk.line{height:16px;width:88%}.sk.line.s{height:12px;width:34%;margin-top:6px}.sk.btn{height:50px}.sk.row{height:58px}
.sk.card{height:212px;border-radius:var(--r-card)}.sk.card.dt{height:150px}.sk.qr{height:388px}.sk.tabs{height:42px}.sk.tip{height:44px}.sk.lnk{height:20px;width:34%;align-self:center;margin:8px 0}
i.sk:nth-of-type(2n){opacity:.8}i.sk:nth-of-type(3n){opacity:.65}
@keyframes m-shim{from{transform:translateX(-100%)}to{transform:translateX(170%)}}

/* the waiting page, alive: a spinning ring in the waiting row, a ping each time we look, a tick when the message arrives */
.steps .wait i{display:inline-flex;align-items:center;justify-content:center}
.steps .wait i.live{width:12px;height:12px;border:2px solid var(--b-soft);border-right-color:transparent}
.steps .wait.ping i.live{animation:m-spin .7s linear infinite,m-ping .5s var(--eout)}
@keyframes m-ping{from{transform:scale(1.5)}}
.steps .got i{animation:m-pop-in .3s var(--spring)}
@keyframes m-pop-in{from{transform:scale(.4);opacity:0}}

/* the QR: the tile shimmers until the code is drawn, a new code fades in, the timer runs smoothly */
.qrtile.loading{aspect-ratio:1/1;border-radius:4px;position:relative;overflow:hidden}
.qrtile.loading canvas{opacity:0}
.m-swap{animation:m-swap .3s var(--eout)}
@keyframes m-swap{from{opacity:.2;transform:scale(.97)}}
.tick i::after{inset:0;right:0;transform-origin:0 50%;transform:scaleX(var(--p,1));transition:transform 1s linear}

/* success: the tick draws */
.m-tick{width:72px;height:72px;align-self:center;display:block}
.m-tick.sm{width:44px;height:44px;align-self:flex-start;margin-bottom:6px}
.m-tick circle{fill:none;stroke:var(--b-good);stroke-width:3;stroke-dasharray:202;stroke-dashoffset:202;animation:m-draw .4s .05s var(--eout) forwards}
.m-tick path{fill:none;stroke:var(--b-good);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:44;stroke-dashoffset:44;animation:m-draw .3s .38s var(--eout) forwards}
@keyframes m-draw{to{stroke-dashoffset:0}}
.m-done{animation:m-rise .3s .1s var(--eout) both}
.cups i.m-fill{animation:m-pop-in .3s var(--spring)}

/* errors arrive, a wrong PIN shakes */
.err:not(:empty){animation:m-rise .22s var(--eout)}
.inp.shake{animation:m-shake .35s}
@keyframes m-shake{25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}

/* toasts (ISL 13.4): ink, card-coloured text, radius 10, a round icon, slide in .26 s */
.m-toasts{position:fixed;left:16px;right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:90;max-width:398px;margin:0 auto;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.m-toast{pointer-events:auto;display:flex;align-items:center;gap:12px;background:var(--b-ink);color:var(--b-screen);border-radius:10px;padding:11px 14px;font-weight:600;font-size:15px;line-height:1.3;box-shadow:0 10px 28px var(--lift);min-height:50px;transform:translateY(130%);opacity:0;transition:transform .26s var(--snap),opacity .2s}
.m-toast.on{transform:none;opacity:1}
.m-toast .ti{width:28px;height:28px;border-radius:50%;background:var(--b-good);color:var(--b-on-accent);display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:800;flex:none}
.m-toast.warn .ti{background:var(--b-warn)}
.m-toast .tx{flex:1;min-width:0}

/* the bottom drawer (ISL 13.3): rises over a 50 % ink dim, top corners 16, 44x5 handle, at most 88 % of the screen */
.dr-lock{overflow:hidden}
.dr{position:fixed;inset:0;z-index:80}
.dr-dim{position:absolute;inset:0;background:var(--dim);opacity:0;transition:opacity .26s var(--sheet)}
.dr-sh{position:absolute;left:0;right:0;bottom:0;max-width:430px;margin:0 auto;background:var(--b-surface);color:var(--b-ink);border-radius:16px 16px 0 0;box-shadow:0 -14px 44px var(--lift);padding:0 16px calc(16px + env(safe-area-inset-bottom,0px));max-height:88%;overflow:auto;display:flex;flex-direction:column;gap:12px;transform:translateY(105%);transition:transform .26s var(--sheet)}
.dr.on .dr-dim{opacity:1}
.dr.on .dr-sh{transform:none}
.dr.off{pointer-events:none}
.dr-sh.drag{transition:none}
.dr-sh.warn{border-top:4px solid var(--b-warn)}
.dr-grab{touch-action:none;padding:8px 0 2px;display:flex;justify-content:center;cursor:grab}
.dr-grab span{width:44px;height:5px;border-radius:999px;background:var(--b-line)}
.dr-t{touch-action:none;font-family:var(--f-head);font-weight:var(--head-weight);font-size:19px;line-height:1.25;margin:0;color:var(--b-head)}
.dr-p{margin:0;font-size:14.5px}

/* pull down to refresh */
.m-ptr{position:fixed;left:50%;top:52px;z-index:40;width:36px;height:36px;border-radius:50%;background:var(--b-surface);border:1px solid var(--b-line);box-shadow:0 4px 14px var(--lift);display:flex;align-items:center;justify-content:center;opacity:0;transform:translate(-50%,-8px);transition:transform .26s var(--spring),opacity .2s;pointer-events:none;color:var(--b-accent)}
.m-ptr.pulling{transition:none}
.m-ptr i{width:16px;height:16px;border:2.5px solid currentColor;border-right-color:transparent;border-radius:50%}
.m-ptr.hold{opacity:1;transform:translate(-50%,40px)}
.m-ptr.hold i{animation:m-spin .7s linear infinite}

/* an item that has been dealt with slides away */
.m-out{opacity:0;transform:translateX(-28px) scale(.98);transition:transform .2s ease-in,opacity .2s}

/* the receipt being read: the photo you just took with a scan line, and a bar */
.reading{display:flex;gap:12px;align-items:center;background:var(--b-surface);border:var(--bw) solid var(--b-line);border-radius:var(--r-box);padding:10px;animation:m-rise .22s var(--eout)}
.reading .thumb{width:64px;height:84px;border-radius:8px;background:var(--b-tint) center/cover no-repeat;position:relative;overflow:hidden;flex:none}
.reading .thumb::after{content:"";position:absolute;left:0;right:0;top:4px;height:3px;background:var(--b-accent);opacity:.85;animation:m-scan 1.4s ease-in-out infinite alternate}
@keyframes m-scan{to{transform:translateY(73px)}}
.reading .rt{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.reading .rt b{font-size:14.5px}
.reading .bar2{height:6px;border-radius:3px;border:1px solid var(--b-line);position:relative;overflow:hidden}
.reading .bar2::after{content:"";position:absolute;left:0;top:0;bottom:0;width:40%;background:var(--b-good);animation:m-slide 1.2s ease-in-out infinite}
label.btn.is-busy{pointer-events:none;opacity:.8}

/* the camera frame: a green flash when a QR is read */
.view{transition:box-shadow .2s}
.view.hit{box-shadow:0 0 0 4px var(--b-good)}
.view .m-ring{margin-right:8px}

/* the receipt photo: a shimmering box until it has loaded, then it fades in */
.phbox{min-height:220px;border-radius:var(--r-box);overflow:hidden}
.photo.m-load{opacity:0;transition:opacity .3s}
.photo.m-load.ok{opacity:1}

/* the new screen's heading takes focus for screen readers; no ring on it */
#view:focus,#view h1:focus{outline:none}

/* a box that appears after a tap eases in */
.m-in{animation:m-rise .24s var(--eout)}

@media (prefers-reduced-motion: reduce){
  .prs{transform:none;filter:none}
  .m-tick circle,.m-tick path{stroke-dashoffset:0}
  .dr-sh,.dr-dim,.m-toast,.m-ptr{transition:none}
  .m-out{transform:none}
  .sk{background:var(--b-tint)}
  .sk::after,.qrtile.loading::after{display:none}
  .qrtile.loading{background:var(--b-tint)}
  .tick i::after{transition:none}
  .photo.m-load{opacity:1}
}

/* ---- UX rework 15 Nov 2026: button ranking, the alert role, the crew help (DESIGN_SPEC.md) ---- */

/* sub-heading (the alert, the crew help card; the crew link form already uses a bare h2) */
h2{font-family:var(--f-head);font-weight:var(--head-weight);font-size:18px;line-height:1.25;color:var(--b-head);margin:0;text-wrap:balance}

/* ALERT: the one must-do on a screen. The loudest box, but small: it is a notice, not general info. Never dismissible. Never for ordinary info. */
.alert{background:var(--b-surface);border:2px solid var(--b-warn);border-left-width:6px;border-radius:var(--r-box);padding:9px 10px 9px 9px;display:flex;flex-direction:column;gap:4px}
.alert .tag{font-family:var(--f-label);font-weight:700;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--b-warn)}
.alert h2{font-size:14px;line-height:1.25}
.alert p{font-size:12px;line-height:1.4}
.alert .btn{display:inline-flex;align-items:center;justify-content:center;width:auto;align-self:flex-start;min-height:44px;margin-top:2px;padding:0 20px;font-size:13px}

/* old-card screen: two equal choice rows (reuses .planopt) */
a.planopt{text-decoration:none;color:var(--b-ink)}
a.planopt b{display:block;font-size:15.5px;font-weight:700}
.planopt .go{flex:none;color:var(--b-link);font-weight:700;font-size:22px;line-height:1}

/* touch targets: at least 44 px */
.btn.sm{padding:12px 16px;min-height:44px}                                                    /* CHANGED: was padding:10px 16px (40 px) */
.lnk{min-height:44px;padding:10px 8px;display:inline-flex;align-items:center;justify-content:center} /* CHANGED: was padding:8px (37 px) */
.chips button{min-height:44px}                                                                /* CHANGED: was 42 px */
.tabs button{min-height:44px}                                                                 /* CHANGED: was 42 px */
label.chk,label.tick{display:flex;gap:10px;align-items:flex-start;min-height:44px;padding-top:10px}
label.chk input,label.tick input{width:20px;height:20px;flex:none;margin:0}

/* crew tabs: the selected tab must show without colour alone */
.tabs button[aria-selected="true"]{background:var(--b-surface);color:var(--b-ink);border-color:var(--b-rule);box-shadow:inset 0 -3px 0 var(--b-rule)} /* CHANGED: was linen fill, taupe text, linen edge */

/* focus that shows on the matcha card (umber on matcha is 1.54:1) */
.card .btn:focus-visible{outline-color:var(--b-card-fg)}
.card.pend .btn:focus-visible,.card.off .btn:focus-visible{outline-color:var(--b-rule)}

/* OK text: green on oat is 3.38:1; matcha is 9.72:1 */
.ok{color:var(--b-card)}                                                                      /* CHANGED: was var(--b-good) */

/* crew Scan: help launcher + help card */
.guide{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.gtiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.gtile{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:56px;padding:10px 10px 10px 12px;text-align:left;background:var(--b-surface);color:var(--b-ink);border:var(--bw) solid var(--b-line);border-radius:var(--r-box);font-family:var(--f-label);font-weight:600;font-size:13.5px;line-height:1.3}
.gtile::after{content:"\203A";flex:none;color:var(--b-link);font-size:20px;line-height:1}
.gdlg{width:min(398px,calc(100vw - 32px));max-height:85dvh;overflow:auto;overscroll-behavior:contain;margin:auto;border:0;border-radius:var(--r-card);background:var(--b-surface);color:var(--b-ink);padding:0}
.gdlg .gbody{padding:18px 16px 16px;display:flex;flex-direction:column;gap:14px}
.gdlg.gfall{position:fixed;inset:16px;margin:auto;height:fit-content;z-index:85;box-shadow:0 14px 44px var(--lift)}
.gdlg::backdrop{background:var(--b-ink);opacity:.55}
.gdlg h2:focus{outline:none}
.gdlg .lead{font-size:14px}
.gsteps{list-style:none;margin:0;padding:0;counter-reset:g;display:flex;flex-direction:column;gap:12px}
.gsteps li{counter-increment:g;display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;align-items:start;font-size:14.5px;line-height:1.45;color:var(--b-ink)}
.gsteps li::before{content:counter(g);width:28px;height:28px;margin-top:-3px;border-radius:50%;background:var(--b-tint);color:var(--b-ink);font-family:var(--f-label);font-weight:700;font-size:13px;display:grid;place-items:center}
.gdlg .btns{display:flex;flex-direction:column;gap:8px;position:sticky;bottom:0;background:var(--b-surface);padding-top:8px}
.gdlg .never,.gdlg .ifs{font-size:14px;color:var(--b-ink)}
.gdlg .never{border-left:3px solid var(--b-warn);padding-left:10px}
.gdlg .ifs{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px;color:var(--b-soft)}
.gdlg .ifs .lnk{display:inline;min-height:0;padding:0;font-size:inherit;text-align:left}
.gdlg .ifh{font-family:var(--f-label);font-weight:600;font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--b-soft);margin-bottom:-6px}

/* ---- Header and account page, 15 Nov 2026 (HEADER_ACCOUNT_SPEC.md) ---- */

/* row 1: the sticky bar */
.bar{padding-top:env(safe-area-inset-top,0px)}                                  /* ADDED to .bar */
.bar .col{min-height:52px;padding-top:4px;padding-bottom:4px}                   /* CHANGED: was 13px top and bottom (about 55 px tall) */
.brand{display:inline-flex;align-items:center;gap:8px;min-height:44px;flex:0 1 auto;min-width:0;text-decoration:none;color:var(--b-bar-fg)}
.brand img{height:24px;width:auto;display:block;flex:none}
.bar-out{flex:none;min-height:44px;min-width:44px;padding:0 2px;margin-right:-2px;background:none;border:0;font-family:var(--f-label);font-size:13.5px;font-weight:600;color:var(--b-link);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}

/* row 2: the account button. Not sticky: it slides away under the bar */
.acct-row{background:var(--b-bar);border-bottom:var(--bw) solid var(--b-bar-line)}
.acct{display:flex;align-items:center;gap:10px;min-height:52px;padding:6px max(16px,env(safe-area-inset-right,0px)) 6px max(16px,env(safe-area-inset-left,0px));text-decoration:none;color:var(--b-bar-fg)}
.acct:focus-visible{outline-offset:-3px}
.av{flex:none;width:32px;height:32px;border-radius:50%;background:var(--b-card);color:var(--b-card-fg);display:grid;place-items:center;font-family:var(--f-head);font-weight:700;font-size:15px;line-height:1;overflow:hidden}
.acct-id{flex:1;min-width:0;display:flex;flex-direction:column}
.acct-n{min-width:0;font-weight:600;font-size:15px;line-height:1.45;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acct-c{font-size:12px;line-height:1.35;color:var(--b-bar-soft);white-space:nowrap}
.acct-c b{font-family:var(--f-mono);font-weight:600;letter-spacing:.12em;color:var(--b-bar-fg);margin-left:3px}
.acct-go{flex:none;font-family:var(--f-label);font-size:13px;font-weight:600;color:var(--b-link);white-space:nowrap}

/* account page */
.lnk.back{align-self:flex-start;padding-left:0;margin:-10px 0 -8px}
.li .k{color:var(--b-soft);font-size:13.5px;flex:none}
.li .v{font-weight:600;text-align:right;min-width:0;overflow-wrap:anywhere}
a.li{text-decoration:none;color:var(--b-ink);min-height:56px}
a.li:focus-visible{outline-offset:-3px}
.li .mid{flex:1;min-width:0}
.li .r .pill{margin-bottom:3px}
.li .go{flex:none;color:var(--b-link);font-weight:700;font-size:20px;line-height:1}
.edit{background:var(--b-surface);border:var(--bw) solid var(--b-line);border-radius:var(--r-box)}
.edit summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:52px;padding:8px 12px;cursor:pointer;font-size:14.5px;border-radius:var(--r-box)}
.edit summary::-webkit-details-marker{display:none}
.edit summary:focus-visible{outline-offset:-3px}
.edit .k{color:var(--b-soft);font-size:13.5px;flex:none;min-width:44px}
.edit .v{flex:1;min-width:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.edit .chg{flex:none;color:var(--b-link);font-weight:600;font-size:13.5px;text-decoration:underline;text-underline-offset:3px}
.edit .chg .c,.edit[open] .chg .o{display:none}
.edit[open] .chg .c{display:inline}
.edit[open] summary{border-bottom:1px solid var(--b-line);border-radius:var(--r-box) var(--r-box) 0 0}
.edit .body{padding:12px;display:flex;flex-direction:column;gap:10px}
.gap{margin-top:10px}

/* press feel for the new rows: a dip in opacity, no shrinking of a full-width row */
.brand.prs,.bar-out.prs,.acct.prs,a.li.prs,.edit summary.prs{transform:none;filter:none;opacity:.6}

/* ---- the flow build, 15 Nov 2026 (FLOW_AUDIT.md): small pieces the two specs do not draw ---- */
.scr{position:relative}
.upd{font-size:12px;color:var(--b-soft)}
.upd.top{position:absolute;top:3px;right:max(16px,env(safe-area-inset-right,0px));line-height:1.2}      /* the mark does not move the page */
.pline{font-weight:600;color:var(--b-ink);font-size:14.5px}
.sechead{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:6px}
.sechead .sec{margin:0}
.sechead .lnk{padding:10px 0 10px 12px}
.hint{font-size:13px;color:var(--b-soft)}
.acts.add .btn{min-width:140px}
@media (max-width:359px){.acts.add{flex-direction:column}.acts.add .btn{min-width:0}}
.stepno{font-family:var(--f-label);font-weight:600;font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--b-soft)}
.muted{color:var(--b-soft);font-size:13.5px}
.qa{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;font-size:13.5px;color:var(--b-soft)}
.qa b{color:var(--b-ink)}
.stack{display:flex;flex-direction:column;gap:14px}
.stack>*{min-width:0}

.lnk.two{flex-direction:column;gap:0;line-height:1.3;text-align:center}
.lnk.two span{display:block}

/* ---- the crew page, tight (body.crew in crew.html; the guest page is not touched). Primary buttons keep 44 px; tabs, tiles and "How?" are 40 px. ---- */
body.crew .scr{padding:10px max(16px,env(safe-area-inset-right,0px)) 24px max(16px,env(safe-area-inset-left,0px));gap:8px}
body.crew .view{aspect-ratio:auto;height:120px}
body.crew .btn{padding:11px 12px;min-height:44px}
body.crew .btn.sm{padding:10px 14px;min-height:44px}
body.crew .inp{padding:9px 12px}
body.crew .fld{gap:4px}
body.crew .fld label{font-size:11.5px}
body.crew .tabs button{min-height:40px;padding:8px 6px}
body.crew .sec{margin-top:2px}
body.crew .sechead{margin-top:0}
body.crew .lnk{min-height:40px;padding:6px 8px}
body.crew .sechead .lnk{padding:6px 0 6px 12px}
body.crew .li{padding:8px 10px;gap:8px}
body.crew .remind{padding:9px;gap:6px}
body.crew .remind b{font-size:14.5px}
body.crew .remind .pick{padding:8px 10px}
body.crew .found{padding:10px}
body.crew .found b{font-size:15.5px}
body.crew .list{border-radius:var(--r-box)}
body.crew label.chk,body.crew label.tick{min-height:40px;padding-top:6px}
body.crew .guide{gap:6px;margin-top:0}
body.crew .gtiles{gap:6px}
body.crew .gtile{min-height:40px;padding:6px 8px 6px 10px;font-size:12px;line-height:1.25}
body.crew .qa{gap:6px;font-size:12.5px}
body.crew .muted{font-size:12.5px}
body.crew .hint{font-size:12.5px}
body.crew .tip{padding:8px 10px}
body.crew .gdlg .gbody{padding:14px 14px 10px;gap:10px}
body.crew .gdlg h2{font-size:16px}
body.crew .gdlg .lead{font-size:13px}
body.crew .gsteps{gap:8px}
body.crew .gsteps li{font-size:13px;gap:8px;line-height:1.4}
body.crew .gsteps li::before{width:24px;height:24px;font-size:12px;margin-top:-1px}
body.crew .gsteps li{grid-template-columns:24px minmax(0,1fr)}
body.crew .gdlg .never,body.crew .gdlg .ifs{font-size:12.5px}
body.crew .gdlg .btns .lnk{min-height:44px}
body.crew .sechead{margin:-6px 0 -4px}
body.crew .remind p,body.crew .li small,body.crew .found p{font-size:13px;line-height:1.35}
body.crew .remind .chk,body.crew .remind label.chk span{font-size:13px;line-height:1.35}
body.crew .remind .sec{margin-top:0}
body.crew .remind{gap:5px}
body.crew .remind .btn.sm{padding:8px 14px}
body.crew .remind .fld{gap:3px}
body.crew .li .lnk{display:block;min-height:40px;padding:4px 0;text-align:left}
body.crew .pick{font-size:13.5px;line-height:1.3;padding:7px 10px;gap:8px}

/* ---- round 3, A: header V5. Logo left, the division name centred, Sign out right. Three columns, so the word is centred whatever the sides weigh. ---- */
.bar .col{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}
.brand{justify-self:start}
.bar-out{justify-self:end}
.division{font-family:var(--f-label);font-weight:700;font-size:11.5px;letter-spacing:.14em;color:var(--b-bar-fg);white-space:nowrap;text-align:center;min-width:0;overflow:hidden;text-overflow:ellipsis}
/* the crew bar is longer ("CREW · LOOP COFFEE"): on a narrow phone give the centre the room that is left, tighten its letters, and cut it with an ellipsis before Sign out is touched */
body.crew .bar .col{grid-template-columns:minmax(max-content,1fr) minmax(0,auto) minmax(max-content,1fr)}  /* the sides never get narrower than the logo and Sign out; the centre word gives way first */
body.crew .division{font-size:10.5px;letter-spacing:.08em}                /* the crew word is longer (CREW · LOOP COFFEE), so a touch smaller keeps a clear gap to Sign out at 375 */
@media (max-width:359px){body.crew .bar .col{gap:6px}body.crew .brand img{height:20px}body.crew .division{font-size:10px;letter-spacing:.02em}}

/* ---- round 3, B: the crew Scan screen ---- */
body.crew .guide>.sec{text-align:center}
.qa-d{background:var(--b-surface);border:var(--bw) solid var(--b-line);border-radius:var(--r-box)}
.qa-d summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:6px 10px;font-family:var(--f-label);font-weight:600;font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--b-soft);border-radius:var(--r-box)}
.qa-d summary::-webkit-details-marker{display:none}
.qa-d summary::after{content:"\203A";font-size:16px;line-height:1;transform:rotate(90deg);color:var(--b-link)}
.qa-d[open] summary::after{transform:rotate(-90deg)}
.qa-d[open] summary{border-bottom:1px solid var(--b-line);border-radius:var(--r-box) var(--r-box) 0 0}
.qa-d summary:focus-visible{outline-offset:-3px}
.qa-d .qa{padding:10px}
.view.nocam::after{display:none}
.view.nocam>span{padding:0 14px;text-align:center}

/* ---- round 3, C: the account page, compact. Only the matcha card (.mcard) keeps its size and fonts. ---- */
#view[data-s="me"]{gap:8px;padding-top:12px}
#view[data-s="me"] h1{font-size:18px}
#view[data-s="me"]>p{font-size:12.5px;line-height:1.4}
#view[data-s="me"] .sec{font-size:10.5px;margin-top:2px}
#view[data-s="me"] .list .li{padding:7px 10px;font-size:13px}
#view[data-s="me"] .li .k{font-size:12.5px}
#view[data-s="me"] a.li{min-height:44px}
#view[data-s="me"] .li small{font-size:11.5px}
#view[data-s="me"] .li .go{font-size:18px}
#view[data-s="me"] .li .r .pill{font-size:10px;padding:2px 7px;margin-bottom:2px}
#view[data-s="me"] .edit summary{min-height:44px;padding:6px 10px;font-size:13px}
#view[data-s="me"] .edit .body{padding:10px;gap:8px}
#view[data-s="me"] .soon{padding:10px;gap:6px}
#view[data-s="me"] .soon b{font-size:13.5px}
#view[data-s="me"] .soon p{font-size:12.5px;line-height:1.4}
#view[data-s="me"] .tip{font-size:12px;padding:8px 10px}
#view[data-s="me"] .stack{gap:8px}
#view[data-s="me"] .remind{padding:10px;gap:6px}
#view[data-s="me"] .remind b{font-size:13.5px}
#view[data-s="me"] .remind p{font-size:12px}
#view[data-s="me"] .btn{padding:11px 12px;font-size:13px;min-height:44px}
#view[data-s="me"] .lnk{min-height:40px;font-size:13px}
#view[data-s="me"] .lnk.back{min-height:40px;margin:-6px 0 -6px}
#view[data-s="me"] .inp{padding:10px 12px}
#view[data-s="me"] .gap{margin-top:2px}
#view[data-s="me"] .stack>p{font-size:12.5px;line-height:1.4}
#view[data-s="me"] .stack .lnk{min-height:40px}

/* card tile. Everything that styles a card tile is in this one block (kept together with cardTile() in app.js). */
.lr{font-family:var(--f-label);font-size:11.5px;font-weight:600;line-height:1.25;padding:3px 9px;border-radius:var(--r-pill);text-align:center;flex:0 1 auto;min-width:0}
.lr.ok{background:var(--b-ok-bg);color:var(--b-ok-fg)}
.lr.amber{background:var(--b-amber-bg);color:var(--b-amber-fg)}
.pill.amb{background:var(--b-amber-bg);color:var(--b-amber-fg)}
.card .top>.pill{flex:none}
/* home: a small tile, four rows that are the same in every state and every plan (a compact tile is .card.eq) */
.card.eq{padding:11px 12px;gap:8px}
.card.eq .top{min-height:34px;align-items:flex-start}
.card.eq .plan{font-size:19px;line-height:1}
.card.eq .no{font-size:11px;line-height:1.2;margin-top:1px}
.card.eq .line2{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:28px}
.card.eq .big{font-size:16.5px;line-height:1.1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card.eq .dates{flex:none;display:flex;flex-direction:column;align-items:flex-end;font-size:10.5px;line-height:13px;opacity:.85;white-space:nowrap}   /* Start and Expiry, two stacked lines, right of the main line */
.card.eq .track{height:12px;display:flex;align-items:center;gap:8px}
.card.eq .cups{gap:4px;flex-wrap:nowrap}
.card.eq .cups i{width:12px;height:12px;border-width:1.5px}
.card.eq .pbar{flex:1;min-width:0;height:6px;box-sizing:border-box;border-radius:3px;border:1.5px solid currentColor;position:relative;overflow:hidden}   /* the days bar: outline like an empty cup, filled part like a used cup (35%) */
.card.eq .pbar i{position:absolute;left:0;top:0;bottom:0;width:calc(var(--p,0) * 100%);background:currentColor;opacity:.35}
.card.eq .pbar.done{opacity:.35}   /* an ended card: the whole bar is used, drawn as quiet as a used cup */
.card.eq .pbar.done i{opacity:1}
.card.eq .dleft{flex:none;font-size:12px;line-height:12px;font-weight:600;white-space:nowrap}   /* "12 days left", right edge = the right edge of the Start and Expiry lines */
.card.eq .acts{gap:8px;flex-wrap:nowrap}
.card.eq .btn{padding:0 10px;min-height:44px;font-size:13px;display:flex;align-items:center;justify-content:center;min-width:0}   /* 44 px: a real tap target (Andrew, 15 Nov); the crew and account pages keep their 40 px */
@media (max-width:359px){.card.eq .big{font-size:13.5px}}   /* at 320 the longest line plus the dates with a year (Expiry 1 May 2027) must stay on one row: the main line gives way, the dates do not move */
/* end card tile */
