/* ===== Kitchen Jarvis — 应用样式 ===== */
:root{
  /* Stone grey, deep navy and near-black (2026-10 palette). The roster's
     groups bring the colour — wood for the kitchen, fresh greens, pink and
     coral for the floor (js/roster.js POSITIONS); the app around them stays
     quiet. */
  --paper:#F3F3F1; --paper-2:#F8F8F6; --card:#FFFFFF;
  /* Both ink tints clear 4.5:1 on paper — --ink-faint is used on
     interactive text ("Forgot password?"). */
  --ink:#1C1F26; --ink-soft:#5E626A; --ink-faint:#686C73;
  --line:rgba(28,31,38,.10); --line-2:rgba(28,31,38,.06);
  --accent:#1F2A44; --accent-soft:#E4E7EE; --accent-ink:#1F2A44;
  /* -ink is the readable text colour ON the matching -soft tint. It exists so
     no rule has to hardcode "the dark version of amber" — that is precisely the
     value that has to flip when the tint goes dark. */
  --green:#3A7D5C; --green-soft:#E4EEE8; --green-ink:#2F6249;
  --red:#B8483D; --red-soft:#F5E3E0; --red-ink:#9E3D33;
  --amber:#C9962E; --amber-soft:#F3ECDC; --amber-ink:#7A5A12;
  --blue:#3F5F8F; --blue-soft:#E6EBF3; --blue-ink:#2F4B75;
  --violet:#5E5A8C; --violet-soft:#EAE9F2;
  --teal:#3D6E6A; --teal-soft:#E2EEEC;
  --radius:18px; --radius-lg:26px;
  --shadow:0 1px 2px rgba(33,30,27,.05), 0 16px 36px -20px rgba(33,30,27,.22);
  --shadow-soft:0 1px 2px rgba(33,30,27,.04), 0 8px 22px -16px rgba(33,30,27,.18);
  --sidebar:248px;
  /* Motion: strong custom easing curves (built-in CSS easings are too weak) */
  --ease-out:cubic-bezier(0.23,1,0.32,1);
  --ease-in-out:cubic-bezier(0.77,0,0.175,1);
}

/* ---------- dark mode ----------
   Every colour in this file already goes through a token, so the dark theme is
   the token block again with different values — no per-component overrides.

   One rule, keyed on an attribute, rather than a @media copy plus an override
   copy: the tiny script in index.html resolves "auto" against the OS before
   first paint and writes the attribute, so there is exactly one place a colour
   is defined. (No JS, no app at all — this file is never the fallback.)

   Three things are deliberately not just "inverted":
   · The -soft tints are re-mixed rather than darkened. A pale tint darkened by
     a filter goes muddy and the status colours stop being distinguishable,
     which is the one thing they exist to do.
   · The accent lightens (#1F2A44 -> #A9B8D6). Navy at its light-mode
     value is under 2:1 on a dark ground; it carries the primary button and the
     active nav item, so it has to clear 4.5:1.
   · --ink-grad inverts outright. It paints the primary button and the active
     nav pill, so leaving it near-black hides the main action on a dark page. */
:root[data-theme="dark"]{
  --paper:#141820; --paper-2:#181D26; --card:#1C2230;
  --ink:#E8E4DC; --ink-soft:#A3AAB5; --ink-faint:#8E96A3;
  --line:rgba(232,228,220,.13); --line-2:rgba(232,228,220,.07);
  --accent:#A9B8D6; --accent-soft:#262F44; --accent-ink:#C3CEE3;
  --green:#7FB396; --green-soft:#1E2E26; --green-ink:#9CCBB0;
  --red:#E58A7E; --red-soft:#33211F; --red-ink:#F2A79D;
  --amber:#E2B05A; --amber-soft:#302818; --amber-ink:#EDC47C;
  --blue:#8FA9D6; --blue-soft:#1F2840; --blue-ink:#AFC3E6;
  --violet:#A79FD6; --violet-soft:#26233A;
  --teal:#7DBDB5; --teal-soft:#16302E;
  --fp-floor:#1A1F29; --fp-floor-2:#222835; --fp-wall:#3E4A5C;
  --ink-grad:linear-gradient(152deg,#EEF0F4,#D3D8E1);
  --green-grad:linear-gradient(140deg,#8CC2A3,#6FA588);
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 16px 36px -20px rgba(0,0,0,.7);
  --shadow-soft:0 1px 2px rgba(0,0,0,.3), 0 8px 22px -16px rgba(0,0,0,.55);
  color-scheme:dark;
}
*{box-sizing:border-box;margin:0;padding:0}
/* The document element stays the scroll container. Putting height:100% on the
   body as well (with overflow-x:hidden further down) made the BODY the scroller,
   which on iOS means the URL bar never collapses and the scroll position is not
   restored on back. min-height keeps the full-height login page working. */
html{height:100%}
body{min-height:100%}
body{
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--paper); color:var(--ink); line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.serif{font-family:"Playfair Display",serif}

/* ---------- per-language typography ----------
   Pin ONE script-appropriate family per language. Latin glyphs come from Inter;
   Han / Hangul / Thai glyphs then resolve from a single family, so the characters
   a Traditional string shares with Simplified never split across two different
   fonts — the whole line renders in one consistent typeface. */
html[lang="zh-CN"] body{font-family:"Inter","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",sans-serif}
html[lang="zh-CN"] .serif{font-family:"Playfair Display","PingFang SC","Microsoft YaHei","Noto Sans SC",serif}
html[lang="zh-TW"] body{font-family:"Inter","PingFang TC","Hiragino Sans CNS","Microsoft JhengHei","Noto Sans TC",sans-serif}
html[lang="zh-TW"] .serif{font-family:"Playfair Display","PingFang TC","Microsoft JhengHei","Noto Sans TC",serif}
html[lang="ko"] body{font-family:"Inter","Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR",sans-serif}
html[lang="ko"] .serif{font-family:"Playfair Display","Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR",serif}
html[lang="th"] body{font-family:"Inter","Sukhumvit Set","Thonburi","Leelawadee UI","Noto Sans Thai",sans-serif}
html[lang="th"] .serif{font-family:"Playfair Display","Sukhumvit Set","Thonburi","Leelawadee UI","Noto Sans Thai",serif}
/* Vietnamese is Latin-script; Inter already carries the diacritics. */
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select,textarea{font-family:inherit;font-size:16px}
img{max-width:100%;display:block}
.hidden{display:none !important}

/* ---------- buttons (>=48px touch) ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:48px;padding:0 22px;border-radius:14px;font-weight:600;font-size:15px;
  white-space:nowrap;transition:transform .16s var(--ease-out), box-shadow .2s, background .2s, opacity .2s;}
.btn:active{transform:scale(.97)}
.btn-dark{background:var(--ink);color:var(--paper);box-shadow:var(--shadow-soft)}
@media (hover:hover) and (pointer:fine){ .btn-dark:hover{transform:translateY(-1px)} }
.btn-accent{background:var(--accent);color:#fff;box-shadow:var(--shadow-soft)}
.btn-ghost{background:var(--card);border:1px solid var(--line)}
.btn-ghost:hover{background:var(--paper-2)}
.btn-danger{background:var(--red);color:#fff}
.btn-green{background:var(--green);color:#fff}
.btn-sm{min-height:48px;padding:0 16px;font-size:14px;border-radius:12px}
.btn-block{display:flex;width:100%}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}

/* ---------- generic ---------- */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-soft)}
.muted{color:var(--ink-soft)}
.faint{color:var(--ink-faint)}
.row{display:flex;gap:14px}
.col{display:flex;flex-direction:column;gap:14px}
.between{justify-content:space-between}
.center{align-items:center}
.wrap{flex-wrap:wrap}
.grow{flex:1}
.gap8{gap:8px}.gap6{gap:6px}
.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt24{margin-top:24px}
.tag{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);font-weight:700}

.pill{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;padding:5px 11px;border-radius:999px;white-space:nowrap}
.pill.ok{background:var(--green-soft);color:var(--green)}
.pill.warn{background:var(--amber-soft);color:var(--amber-ink)}
.pill.danger{background:var(--red-soft);color:var(--red)}
.pill.info{background:var(--blue-soft);color:var(--blue)}
.pill.ghost{background:var(--paper-2);color:var(--ink-soft);border:1px solid var(--line)}

.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.field label{font-size:13px;font-weight:600;color:var(--ink-soft)}
.input{height:48px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:var(--paper-2);width:100%;color:var(--ink)}
textarea.input{height:auto;padding:12px 14px;resize:vertical;min-height:80px}
.input:focus{outline:none;border-color:var(--accent);background:var(--card)}
/* iOS gives date and time fields a fixed minimum width of their own, so two
   side by side ran past the edge of a phone-width form and the whole sheet
   panned sideways. Let them shrink like any other field. */
.row > .grow{min-width:0}
input.input[type=date], input.input[type=time], input.input[type=datetime-local], input.input[type=month]{
  min-width:0;-webkit-appearance:none;appearance:none;text-align:left}
.input::-webkit-date-and-time-value{text-align:left}
/* The show / hide eye inside a password field (js/util.js dressPasswords). */
.pw-wrap{position:relative;display:block}
.pw-wrap > .input{padding-right:50px}
.pw-eye{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:40px;height:40px;min-height:0;padding:0;
  display:grid;place-items:center;border:none;border-radius:10px;background:none;color:var(--ink-faint);cursor:pointer}
.pw-eye .ic{width:20px;height:20px}
.pw-eye:hover, .pw-eye[aria-pressed="true"]{color:var(--ink-soft)}
.pw-eye:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
select.input{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236F655B' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center}
/* Room for the arrow, so a long option never runs under it. */
select.input{padding-right:38px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
/* The arrow is drawn in the right padding; a compact row that sets its own
   padding (tasks: Repeat, Link an SOP) put the arrow over the words. Whatever
   the padding elsewhere, a dropdown keeps room for its arrow. */
select.input:not([multiple]){padding-right:32px!important;background-position:right 12px center!important}

.disclaimer{font-size:12.5px;color:var(--ink-soft);background:var(--paper-2);border:1px dashed var(--line);border-radius:12px;padding:11px 14px;display:flex;gap:9px;align-items:flex-start}
.disclaimer>span{flex-shrink:0;display:inline-flex;align-items:center;margin-top:1px}
.disclaimer .ic{width:16px;height:16px;color:var(--ink-faint)}
/* Most notes are an icon then a sentence with a bold word or a link in it.
   As flex items, every bare run of text and every <b> became its own column
   on a phone. The icon hangs in the margin instead and the sentence flows. */
.disclaimer:has(> span:first-child){display:block;position:relative;padding-left:39px}
.disclaimer:has(> span:first-child) > span:first-child{position:absolute;left:14px;top:11px}
/* display above beat the hidden attribute: "必须拍照" showed on a delivery with nothing wrong */
.disclaimer[hidden]{display:none!important}

.alert{display:flex;gap:11px;align-items:flex-start;padding:13px 15px;border-radius:14px;border:1px solid;font-size:14px}
.alert.red{background:var(--red-soft);border-color:color-mix(in srgb,var(--red) 35%,transparent);color:var(--red-ink)}
.alert.green{background:var(--green-soft);border-color:color-mix(in srgb,var(--green) 35%,transparent);color:var(--green-ink)}
.alert.amber{background:var(--amber-soft);border-color:color-mix(in srgb,var(--amber) 40%,transparent);color:var(--amber-ink)}
.alert.info{background:var(--blue-soft);border-color:color-mix(in srgb,var(--blue) 35%,transparent);color:var(--blue-ink)}

/* ---------- login ---------- */
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:
  radial-gradient(900px 520px at 12% -8%, rgba(31,42,68,.10), transparent 55%),
  radial-gradient(900px 520px at 90% 108%, rgba(47,143,91,.10), transparent 55%),
  linear-gradient(180deg, var(--paper-2), var(--paper))}
.login-card{width:100%;max-width:440px;padding:54px 30px 26px;border-radius:24px;
  box-shadow:0 2px 6px rgba(33,30,27,.06), 0 30px 60px -28px rgba(33,30,27,.30);
  animation:pop .4s var(--ease-out)}
.login-logo{width:54px;height:54px;border-radius:16px;color:var(--paper);
  /* Both ends of the gradient and the glow follow the brand — a hardcoded
     second stop leaves one orange corner on a venue that is not orange. */
  background:linear-gradient(150deg,var(--accent),var(--accent-ink));
  box-shadow:0 8px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent);
  display:grid;place-items:center;font-weight:900;font-size:27px;font-family:"Playfair Display",serif}
.role-pick{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:18px 0}
.role-pick button{padding:14px 8px;border-radius:14px;border:1px solid var(--line);background:var(--paper-2);
  font-weight:600;font-size:13.5px;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:48px}
.role-pick button .em{font-size:22px;display:inline-flex}
.role-pick button .ic{width:22px;height:22px}
.preview-box b .ic{width:16px;height:16px;vertical-align:-3px;margin-right:2px}
.preview-box .btn .ic{width:16px;height:16px}
.role-pick button.sel{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.seed-hint{font-size:12px;color:var(--ink-soft);background:var(--paper-2);border-radius:12px;padding:10px 12px;margin-top:14px}
.seed-hint code{background:var(--card);border:1px solid var(--line);border-radius:6px;padding:1px 6px;font-size:12px}

/* ---------- app shell ---------- */
.shell{display:grid;grid-template-columns:var(--sidebar) 1fr;min-height:100vh}
.sidebar{background:var(--paper-2);border-right:1px solid var(--line-2);padding:20px 16px;display:flex;flex-direction:column;gap:6px;position:sticky;top:0;height:100vh;overflow:auto}
.side-brand{display:flex;align-items:center;gap:10px;padding:6px 8px 16px}
.side-brand .logo{width:36px;height:36px;border-radius:11px;background:var(--ink);color:var(--paper);display:grid;place-items:center;font-weight:900;font-family:"Playfair Display",serif}
.side-brand .logo .ic{width:21px;height:21px;stroke-width:1.7}
/* An owner's logo is a button: the mark in the corner is the one place it shows
   on every screen, so it is where they look to change it. The camera badge only
   shows on hover / focus so the sidebar isn't wearing an icon it doesn't need. */
.side-brand .logo.has-img{overflow:hidden;padding:0}
.logo-btn{position:relative;border:none;padding:0;cursor:pointer;font:inherit;overflow:hidden}
.logo-edit{position:absolute;inset:0;display:grid;place-items:center;opacity:0;
  background:color-mix(in srgb,var(--ink) 62%,transparent);color:#fff;transition:opacity .18s}
.logo-edit .ic{width:16px;height:16px}
.logo-btn:focus-visible .logo-edit{opacity:1}
@media (hover:hover) and (pointer:fine){ .logo-btn:hover .logo-edit{opacity:1} }
@media (hover:none){ .logo-btn .logo-edit{opacity:0} }
/* A venue called "My Kitchen · Melbourne" wrapped to three lines and shoved the
   fold button off the row. One line, elided. */
.side-brand b{font-size:16px;font-family:"Playfair Display",serif;letter-spacing:-.01em;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-brand small{display:block;font-size:12px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-item{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:12px;font-weight:600;font-size:14.5px;color:var(--ink-soft);min-height:48px;transition:background .15s}
.nav-item .em{font-size:18px;width:22px;text-align:center}
.nav-item:hover{background:var(--card)}
.nav-item.active{background:var(--ink);color:var(--paper)}
.nav-item .badge{margin-left:auto;background:var(--red);color:#fff;font-size:12px;font-weight:700;border-radius:999px;padding:1px 7px;min-width:18px;text-align:center}
.nav-item.active .badge{background:var(--accent)}
.nav-sep{margin:14px 12px 6px;padding-top:12px;border-top:1px solid var(--line-2);
  font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint)}
.side-foot{margin-top:auto;padding-top:14px;border-top:1px solid var(--line-2)}

.main{display:flex;flex-direction:column;min-width:0}
.topbar{position:sticky;top:0;z-index:20;background:color-mix(in srgb,var(--paper) 85%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--line-2);
  display:flex;align-items:center;gap:14px;padding:14px 26px;min-height:64px}
.topbar h1{font-size:20px;font-weight:800}
.topbar .sub{font-size:12.5px;color:var(--ink-soft)}
.topbar-title{min-width:0}
.topbar-title h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:10px;flex-shrink:0}
.content{padding:26px;max-width:1180px;width:100%;margin:0;flex:1}   /* beside the menu, not floating in the middle of a wide screen */

/* network light */
.netlight{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--ink-soft);
  background:var(--card);border:1px solid var(--line);border-radius:999px;padding:7px 13px;min-height:40px}
.netlight .lamp{width:10px;height:10px;border-radius:50%;transition:background .3s, box-shadow .3s}
.netlight.online .lamp{background:var(--green);box-shadow:0 0 0 4px rgba(47,143,91,.16)}
.netlight.offline .lamp{background:var(--amber);box-shadow:0 0 0 4px rgba(224,161,27,.2)}
/* On phones, collapse the status pill to just its dot so the language switch fits */
@media(max-width:560px){ .topbar .netlight{font-size:0;gap:0;padding:11px} }
.netlight.syncing .lamp{background:var(--blue);box-shadow:0 0 0 4px rgba(43,91,181,.18)}

.who{display:flex;align-items:center;gap:9px}
.who .ava{width:36px;height:36px;border-radius:11px;background:var(--accent-soft);color:var(--accent-ink);display:grid;place-items:center;font-weight:700}

/* ---------- dashboard bits ---------- */
.grid{display:grid;gap:16px}
.g2{grid-template-columns:1fr 1fr}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}
.stat{padding:18px 20px}
.stat .k{font-size:12.5px;color:var(--ink-soft);display:flex;align-items:center;gap:6px}
.stat .v{font-family:"Playfair Display",serif;font-size:30px;font-weight:900;margin-top:6px}
.stat .v small{font-size:14px;color:var(--ink-soft);font-weight:400;font-family:"Inter"}
.delta{font-size:12.5px;font-weight:600;margin-top:2px}
.delta.up{color:var(--green)}.delta.down{color:var(--red)}.delta.flat{color:var(--ink-soft)}
.bar{height:8px;background:var(--line);border-radius:99px;overflow:hidden;margin-top:10px}
.bar i{display:block;height:100%;background:var(--accent);border-radius:99px;transition:width .4s}

/* flex-start + gap, not space-between: a leading icon is its own flex item, and
   space-between would shove it to one end and the words to the other. The
   trailing hint that space-between used to place is pushed right explicitly. */
.section-title{font-size:13px;font-weight:700;letter-spacing:.03em;color:var(--ink-soft);margin:4px 0 12px;text-transform:uppercase;display:flex;align-items:center;justify-content:flex-start;gap:7px}
.section-title>span:last-child,.section-title>b:last-child{margin-left:auto}
.section-title>span.st-count{margin-left:0}
.section-title>.ic{width:16px;height:16px;flex-shrink:0;color:var(--ink-faint)}
/* On a phone there is no room for a title and its hint side by side — both end
   up four words tall. The hint drops onto its own line instead. */
@media(max-width:560px){
  .section-title{flex-wrap:wrap}
  .section-title>span:last-child,.section-title>b:last-child{margin-left:0;flex-basis:100%}
  .section-title>span.st-count{flex-basis:auto}
}

.list{display:flex;flex-direction:column}
.li{display:flex;align-items:center;gap:13px;padding:13px 4px;border-bottom:1px solid var(--line-2)}
.li:last-child{border-bottom:none}
.li .ava{width:40px;height:40px;border-radius:12px;background:var(--accent-soft);color:var(--accent-ink);display:grid;place-items:center;font-weight:700;font-size:14px;flex-shrink:0}
.li .meta{flex:1;min-width:0}
.li .meta b{font-size:14.5px;font-weight:600;display:block}
.li .meta span{font-size:12.5px;color:var(--ink-soft)}

.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap;gap:12px}
.section-head h2{font-size:22px;font-weight:800}
.section-head p{font-size:13.5px;color:var(--ink-soft)}

/* ---------- POS ---------- */
.pos{display:grid;grid-template-columns:1fr 360px;gap:18px;align-items:start}
.menu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.menu-item{padding:16px 14px;text-align:left;border-radius:16px;border:1px solid var(--line);background:var(--card);min-height:84px;display:flex;flex-direction:column;justify-content:space-between;transition:transform .12s,border-color .15s}
.menu-item:hover{border-color:var(--accent);transform:translateY(-2px)}
.menu-item .nm{font-weight:700;font-size:15px}
.menu-item .pr{color:var(--accent);font-weight:700;margin-top:8px}
.cat-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.cat-tabs button{min-height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:var(--card);font-weight:600;font-size:13.5px}
.cat-tabs button.active{background:var(--ink);color:var(--paper)}
.cart{position:sticky;top:84px}
.cart-lines{max-height:46vh;overflow:auto;margin:4px 0}
.cart-line{display:flex;gap:10px;padding:11px 2px;border-bottom:1px solid var(--line-2);align-items:flex-start}
.cart-line .qty{display:flex;align-items:center;gap:8px}
.cart-line .qty button{width:30px;height:30px;border-radius:8px;border:1px solid var(--line);background:var(--paper-2);font-weight:700;font-size:16px}
.cart-line .note{font-size:12px;color:var(--accent);margin-top:2px;cursor:pointer}
.cart-total{display:flex;justify-content:space-between;align-items:baseline;margin:14px 0;font-weight:700}
.cart-total .v{font-family:"Playfair Display",serif;font-size:26px}

/* cash counter */
.cash-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.denom{background:var(--paper-2);border:1px solid var(--line-2);border-radius:14px;padding:12px;text-align:center}
.denom b{font-size:17px;display:block}
.denom .ct{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px}
.denom .ct button{width:34px;height:34px;border-radius:9px;background:var(--card);border:1px solid var(--line);font-weight:700;font-size:17px}
.denom .ct span{min-width:24px;font-weight:700;font-size:16px}
.denom .ct .cash-input{width:46px;height:34px;text-align:center;font-weight:700;font-size:16px;border:1px solid var(--line);border-radius:9px;background:var(--card);padding:0;-moz-appearance:textfield}
.denom .ct .cash-input::-webkit-outer-spin-button,.denom .ct .cash-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.denom .ct .cash-input:focus{outline:none;border-color:var(--accent)}
.total-box{background:var(--ink);color:var(--paper);border-radius:16px;padding:16px 20px;display:flex;align-items:baseline;justify-content:space-between;margin-top:12px}
.total-box .v{font-family:"Playfair Display",serif;font-size:28px;font-weight:900}

/* ---------- KDS ---------- */
.kds-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.ticket{border-radius:18px;border:1px solid var(--line);background:var(--card);overflow:hidden;box-shadow:var(--shadow-soft)}
.ticket-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--ink);color:var(--paper)}
.ticket-head .t{font-weight:800}
.ticket-head .timer{font-family:"Playfair Display",serif;font-weight:700}
.ticket.warn .ticket-head{background:var(--accent)}
.ticket.late .ticket-head{background:var(--red)}
.ticket-body{padding:14px 16px}
.ticket-line{display:flex;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid var(--line-2);font-size:15px}
.ticket-line:last-child{border-bottom:none}
.ticket-line .q{font-weight:800;color:var(--accent);min-width:30px}
.ticket-line .note{display:block;font-size:12.5px;color:var(--red);font-weight:600}

/* ---------- roster ---------- */
.roster{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.roster .hd{font-size:12px;color:var(--ink-soft);text-align:center;font-weight:700;padding-bottom:4px}
.roster .cell{background:var(--paper-2);border:1px solid var(--line-2);border-radius:12px;min-height:118px;padding:8px;cursor:pointer;transition:border-color .15s}
.roster .cell:hover{border-color:var(--accent)}
.roster .cell .d{font-weight:700;font-size:13px;color:var(--ink-soft);display:flex;justify-content:space-between}
.roster .cell.wknd .d{color:var(--accent)}
.shift-chip{display:block;margin-top:5px;padding:4px 7px;border-radius:8px;font-size:12px;font-weight:600;line-height:1.35;position:relative}
.shift-chip.a{background:var(--blue-soft);color:var(--blue)}
.shift-chip.b{background:var(--accent-soft);color:var(--accent-ink)}
.shift-chip.x{background:var(--red-soft);color:var(--red)}
.shift-chip.breach{background:var(--red-soft);color:var(--red);outline:2px solid var(--red)}
.shift-chip .rm{position:absolute;right:4px;top:3px;opacity:.5;cursor:pointer}

/* ---------- tasks ---------- */
.task-item{display:flex;gap:13px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--card);margin-bottom:10px}
.task-check{width:30px;height:30px;border-radius:9px;border:2px solid var(--line);display:grid;place-items:center;cursor:pointer;flex-shrink:0;font-size:16px;color:#fff}
.task-check.done{background:var(--green);border-color:var(--green)}
/* The tick is a real button now (it was a div, so a keyboard could not reach it
   and a screen reader did not know it could be pressed). The box stays 30px;
   the finger target around it is 44px, for gloved and wet hands. */
.task-check{position:relative;padding:0}
.task-check::after{content:"";position:absolute;inset:-7px}
.task-check:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.task-item.done{opacity:.7}
.thumb{width:44px;height:44px;border-radius:10px;object-fit:cover;border:1px solid var(--line)}

/* A collapsible .alert: the marker sits inline with the headline so a folded
   block reads as one line, not as a heading with a stray triangle. */
details.alert>summary{display:flex;align-items:flex-start;gap:10px;cursor:pointer;list-style:none;
  font-weight:600}
details.alert>summary::-webkit-details-marker{display:none}
details.alert>summary::after{content:'▸';margin-left:auto;opacity:.55;transition:transform .18s var(--ease-out)}
details.alert[open]>summary::after{transform:rotate(90deg)}
details.alert>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
.fc-how-body{margin-top:8px;padding-left:28px}
details.disclaimer>summary{cursor:pointer;list-style:none}
details.disclaimer>summary::-webkit-details-marker{display:none}
details.disclaimer>summary::after{content:'▸';margin-left:6px;opacity:.55;display:inline-block;
  transition:transform .18s var(--ease-out)}
details.disclaimer[open]>summary::after{transform:rotate(90deg)}

/* ---------- modal / toast ---------- */
/* The page behind a sheet must not scroll — see U.modal(). */
body.modal-open{overflow:hidden}
/* Above the assistant panel and its button (300/301): a modal is a blocking
   dialog, so nothing may sit on top of it. Only showed up once the assistant
   started opening one of its own. */
.modal-back{position:fixed;inset:0;background:rgba(33,30,27,.42);backdrop-filter:blur(2px);display:grid;place-items:center;z-index:400;padding:20px;animation:fade .2s}
.modal{background:var(--card);border-radius:22px;box-shadow:var(--shadow);width:100%;max-width:460px;max-height:88vh;overflow:auto;overflow-x:hidden;animation:pop .24s var(--ease-out)}
.modal.wide{max-width:680px}
/* Rostering preferences on a computer: room for the whole week and for the
   team side by side, not a phone-width column in the middle of the screen. */
@media (min-width:900px){
  .modal.wide:has(#pf_skills){max-width:min(1080px, 94vw)}
  .modal.wide #pf_skills{display:grid;grid-template-columns:repeat(auto-fill,minmax(440px,1fr));gap:0 28px}
  .modal.wide .dm-table .input.dm{max-width:64px;height:38px}
}
.modal-head{padding:20px 22px 0;display:flex;justify-content:space-between;align-items:flex-start}
.modal-head h3{font-size:18px;font-weight:800}
.modal-body{padding:16px 22px 22px}
/* Desktop: the buttons sit at the foot of the dialog, after the body. */
.modal > .modal-actions{padding:0 22px 22px;gap:10px;flex-wrap:wrap}
.modal:has(> .modal-actions) > .modal-body{padding-bottom:16px}
/* Two fields side by side line their boxes up along the bottom, even when one
   label runs to two lines. */
.row > .field{justify-content:flex-end}
.x{font-size:24px;line-height:1;color:var(--ink-soft);cursor:pointer;background:none}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes pop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.toast-wrap{pointer-events:none;position:fixed;bottom:22px;left:16px;right:16px;z-index:600;display:flex;flex-direction:column;gap:8px;align-items:center}
.toast{background:var(--ink);color:var(--paper);padding:12px 18px;border-radius:999px;font-size:14px;font-weight:500;box-shadow:var(--shadow);animation:pop .22s var(--ease-out);max-width:min(440px, 100%);
  transition:opacity .25s, transform .25s var(--ease-out)}
.toast.out{opacity:0;transform:translateY(6px) scale(.97)}
/* Done / went wrong / heads up: a light card, dark words, a coloured mark. */
.toast.green,.toast.red,.toast.amber{display:flex;align-items:center;gap:10px;padding:10px 18px 10px 10px;border-radius:18px;
  background:var(--card);color:var(--ink);font-weight:600;font-size:15px;
  box-shadow:0 0 0 .5px var(--line), 0 10px 30px rgba(33,30,27,.16), 0 2px 6px rgba(33,30,27,.08)}
.toast-mark{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;color:#fff}
.toast-mark svg{width:16px;height:16px;stroke-width:2.6}
.toast.green .toast-mark{background:var(--green)}
.toast.red .toast-mark{background:var(--red)}
.toast.amber .toast-mark{background:var(--amber)}
.toast-msg{min-width:0}
/* An Undo on the toast: the toast takes taps for it (the wrap itself doesn't). */
.toast.has-undo{pointer-events:auto;display:flex;align-items:center;gap:10px}
.toast-undo{flex:none;margin-left:auto;border:0;border-radius:999px;padding:7px 14px;font:inherit;font-size:14px;font-weight:700;cursor:pointer;
  background:var(--accent-soft, rgba(0,0,0,.08));color:var(--accent-ink, var(--ink))}
.toast:not(.green):not(.red):not(.amber) .toast-undo{background:rgba(255,255,255,.18);color:inherit}

.clickable{text-decoration:none;color:inherit;cursor:pointer;transition:transform .14s var(--ease-out),box-shadow .2s}
@media (hover:hover) and (pointer:fine){ .clickable:hover{transform:translateY(-2px);box-shadow:var(--shadow)} }
.clickable:active{transform:scale(.99)}

/* ---------- 顾客端扫码点餐 ---------- */
.cust-wrap{max-width:560px;margin:0 auto;min-height:100vh;background:var(--paper);padding-bottom:90px}
.cust-head{position:sticky;top:0;z-index:10;background:var(--ink);color:var(--paper);padding:18px 20px;border-radius:0 0 22px 22px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.cust-head .btn-ghost{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.25);color:var(--paper);flex:none}
.cust-brand{font-family:"Playfair Display",serif;font-weight:900;font-size:22px}
.cust-table{font-size:13px;opacity:.8;margin-top:2px}
.cust-cats{position:sticky;top:0;display:flex;gap:8px;overflow-x:auto;padding:14px 16px;background:var(--paper);z-index:9}
.cust-cats button{flex:0 0 auto;min-height:42px;padding:0 16px;border-radius:999px;border:1px solid var(--line);background:var(--card);font-weight:600;font-size:14px;white-space:nowrap}
.cust-cats button.active{background:var(--ink);color:var(--paper)}
.cust-menu{padding:4px 16px}
.cust-item{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:14px 16px;margin-bottom:10px}
.cust-item .ci-info b{font-size:16px;display:block}
.ci-price{color:var(--accent);font-weight:700;font-size:15px}
.ci-add{flex:0 0 auto;width:42px;height:42px;border-radius:12px;background:var(--accent);color:#fff;font-size:24px;font-weight:700;line-height:1}
.cust-bar{position:fixed;bottom:0;left:0;right:0;max-width:560px;margin:0 auto;padding:12px 16px env(safe-area-inset-bottom);transition:transform .12s;pointer-events:none}
.cust-bar.show{pointer-events:auto}
.cust-cart-btn{display:none}
.cust-bar.show .cust-cart-btn{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;background:var(--ink);color:var(--paper);min-height:56px;border-radius:16px;padding:0 20px;font-size:16px;font-weight:700;box-shadow:var(--shadow)}
.cust-cart-btn .go{background:var(--accent);padding:8px 16px;border-radius:999px;font-size:14px}
.cust-lines{max-height:48vh;overflow:auto}
.cust-line{display:flex;gap:10px;align-items:flex-start;padding:12px 2px;border-bottom:1px solid var(--line-2)}
.cust-line .qty{display:flex;align-items:center;gap:10px}
.cust-line .qty button{width:34px;height:34px;border-radius:9px;border:1px solid var(--line);background:var(--paper-2);font-size:18px;font-weight:700}
.ci-note{font-size:12.5px;color:var(--accent);margin-top:3px}
.ci-note.add-note{cursor:pointer;opacity:.85}
.cust-done{text-align:center;padding:60px 20px}
.cust-done .em{font-size:56px}
.cust-done h2{font-size:24px;margin-top:10px}
.cust-done .stars [data-star]{transition:opacity .12s,transform .12s}
.cust-done .stars [data-star]:active{transform:scale(1.2)}
@keyframes urgePulse{0%,100%{box-shadow:0 0 0 0 rgba(216,69,60,.0)}50%{box-shadow:0 0 0 6px rgba(216,69,60,.18)}}
.urge-flash{animation:urgePulse 1.1s ease-in-out infinite}

/* ---------- login: divider + Google button ---------- */
.or-divider{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--ink-faint);font-size:12.5px}
.or-divider::before,.or-divider::after{content:"";flex:1;height:1px;background:var(--line)}
.btn-google{gap:10px;font-weight:600}
.btn-google svg{flex:0 0 auto}

/* ---------- KPI callout (large stat) ---------- */
.kpi-callout{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
  background:var(--ink-grad);color:var(--paper);border-radius:var(--radius-lg);
  padding:26px 30px;box-shadow:var(--shadow)}
.kpi-main{display:flex;flex-direction:column;gap:2px;min-width:200px}
.kpi-label{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:color-mix(in srgb,var(--paper) 72%,transparent)}
.kpi-value{font-family:"Playfair Display",serif;font-weight:900;font-size:clamp(40px,7vw,64px);line-height:1.02}
.kpi-sub{font-size:13px;color:color-mix(in srgb,var(--paper) 76%,transparent);margin-top:4px}
.kpi-side{display:flex;gap:12px;flex-wrap:wrap}
.kpi-mini{background:color-mix(in srgb,var(--paper) 12%,transparent);border-radius:14px;padding:12px 16px;min-width:120px}
.kpi-mini span{display:block;font-size:12px;color:color-mix(in srgb,var(--paper) 72%,transparent)}
.kpi-mini b{font-family:"Playfair Display",serif;font-size:24px;color:var(--paper)}

/* ---------- menu item image (POS) ---------- */
.menu-item.has-img{padding-top:0;overflow:hidden}
.menu-item .mi-img{width:calc(100% + 28px);height:84px;object-fit:cover;margin:-1px -14px 8px;border-bottom:1px solid var(--line)}

/* ---------- menu admin grid ---------- */
.menu-admin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.menu-admin-card{overflow:hidden;display:flex;flex-direction:column}
.ma-thumb{height:130px;background:var(--paper-2);display:grid;place-items:center;overflow:hidden}
.ma-thumb img{width:100%;height:100%;object-fit:cover}
.ma-noimg{font-size:38px;opacity:.4}
.ma-body{padding:14px 16px}
.ma-body b{font-size:15px}

/* ---------- image upload drop ---------- */
.img-drop{display:block;cursor:pointer}
.img-preview{border:1.5px dashed var(--line);border-radius:14px;min-height:120px;display:grid;place-items:center;
  background:var(--paper-2);color:var(--ink-soft);font-size:13.5px;overflow:hidden;text-align:center;padding:10px}
.img-preview img{width:100%;max-height:200px;object-fit:contain;border-radius:10px}
.img-drop:hover .img-preview{border-color:var(--accent)}
/* A photo the delivery can't be signed without. The border alone would be a
   colour-only signal, so the label above it says "required" in words too. */
.img-drop.needs .img-preview{border-color:var(--red);border-style:solid;background:var(--red-soft)}

/* Category shelves. A horizontal strip that scrolls on its own rather than
   wrapping into three rows on a phone and pushing the stock off the screen. */
.catbar{display:flex;gap:6px;overflow-x:auto;padding:12px 0 4px;scrollbar-width:none}
.catbar::-webkit-scrollbar{display:none}
.catchip{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);
  background:var(--paper);color:var(--ink);border-radius:999px;padding:6px 13px;font-size:13px;
  font-weight:600;cursor:pointer;white-space:nowrap}
.catchip:hover{border-color:var(--accent)}
.catchip.on{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.catchip.ghost{font-weight:500;color:var(--ink-soft);border-style:dashed}
.catchip-n{font-size:12px;font-weight:600;opacity:.65}

/* Branch switcher in the sidebar header. Styled to read as the venue's subtitle
   rather than as a form control — it sits where the role name used to. */
.branch-pick{appearance:none;-webkit-appearance:none;border:none;background:transparent;
  color:var(--ink-soft);font:inherit;font-size:12px;font-weight:600;padding:1px 16px 1px 0;
  max-width:100%;cursor:pointer;border-radius:6px;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-faint) 50%),linear-gradient(135deg,var(--ink-faint) 50%,transparent 50%);
  background-position:calc(100% - 6px) 55%, calc(100% - 2px) 55%;
  background-size:4px 4px, 4px 4px; background-repeat:no-repeat}
.branch-pick:hover{color:var(--accent-ink);background-color:var(--accent-soft)}
.branch-pick:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
body.side-mini .branch-pick{display:none}

/* Signature pad. `touch-action:none` is what stops a finger stroke scrolling
   the page instead of drawing — without it the pad is unusable on the tablet
   it exists for. */
.sigpad{border:1.5px dashed var(--line);border-radius:14px;background:var(--paper-2);height:130px;overflow:hidden}
.sigpad canvas{width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}
.sigpad img{width:100%;height:100%;object-fit:contain}
/* Tap the box, sign full screen (U.signatureTap). */
.sig-tapbox{cursor:pointer;display:flex;align-items:center;justify-content:center}
.sig-tapnote{font-size:15px;font-weight:600;color:var(--ink-soft)}
.sig-full{position:fixed;inset:0;z-index:700;background:var(--card);display:flex;flex-direction:column;
  padding:max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom))}
.sig-full-bar{display:flex;align-items:center;gap:8px;padding:6px 0 12px;font-size:17px}
.sig-full-pad{flex:1;height:auto !important;min-height:240px;border-width:2px}
.sig-full-hint{text-align:center;font-size:13px;color:var(--ink-soft);padding-top:8px}

/* ---------- onboarding checklist ---------- */
.onb-item{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line-2)}
.onb-item:last-of-type{border-bottom:none}
.onb-ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-size:16px;flex-shrink:0;
  background:var(--paper-2);border:1px solid var(--line)}
.onb-item.done .onb-ic{background:var(--green);color:#fff;border-color:var(--green);font-weight:800}

/* ---------- customer menu image ---------- */
.cust-item .ci-img{width:64px;height:64px;border-radius:12px;object-fit:cover;flex:0 0 auto;border:1px solid var(--line)}

.lang-toggle{position:fixed;left:14px;bottom:14px;z-index:300;background:var(--ink);color:var(--paper);border:none;border-radius:999px;padding:9px 15px;font-size:13px;font-weight:600;box-shadow:var(--shadow);opacity:.88;min-height:auto}
.lang-toggle:hover{opacity:1;transform:translateY(-1px)}
@media(max-width:720px){.lang-toggle{bottom:78px}}

.empty{text-align:center;color:var(--ink-soft);padding:40px 20px}
.empty .em{font-size:40px;opacity:.5}

/* offline banner */
.offbar{background:var(--amber-soft);color:var(--amber-ink);text-align:center;font-size:13px;font-weight:600;padding:8px;border-bottom:1px solid color-mix(in srgb,var(--amber) 40%,transparent)}

/* mobile nav */
.mobile-nav{display:none}
.navsheet-back{display:none}

/* ---------- "More" sheet (phones only) ----------
   The pages the bottom bar has no room for. The sidebar that carries them is
   hidden under 720px, so without this they have no entry point on a phone. */
@media(max-width:720px){
  .navsheet-back:not(.hidden){display:flex;position:fixed;inset:0;z-index:40;align-items:flex-end;
    background:rgba(33,30,27,.4);backdrop-filter:blur(2px);animation:fade .2s ease}
  /* The grip stays put at the top; only the list under it scrolls. */
  .navsheet{width:100%;max-height:82vh;display:flex;flex-direction:column;overflow:hidden;background:var(--card);
    border-radius:26px 26px 0 0;padding-top:8px;
    box-shadow:0 -10px 40px -18px rgba(33,30,27,.5);animation:sheetUp .26s var(--ease-out)}
  .navsheet-grip{flex:0 0 auto;width:40px;height:4px;border-radius:99px;background:var(--line);margin:6px auto 8px}
  .navsheet-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    padding:6px 16px calc(18px + env(safe-area-inset-bottom))}
  .navsheet-list{display:flex;flex-direction:column}
  /* Held to be moved (router.js sheetReorder): lifted, and not a link to select. */
  .navsheet-list .ns-item{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
  .ns-item.ns-dragging{transform:scale(1.03);background:var(--card);box-shadow:var(--shadow);border-radius:14px;position:relative;z-index:2}
  .ns-item{display:flex;align-items:center;gap:14px;min-height:56px;padding:8px 4px;
    font-size:15px;font-weight:600;border-bottom:1px solid var(--line-2)}
  .ns-item:last-child{border-bottom:none}
  .ns-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;flex-shrink:0;
    background:var(--tone-soft,var(--paper-2));color:var(--tone,var(--ink-soft))}
  .ns-ic .ic{width:20px;height:20px}
  .ns-item.on{color:var(--accent)}
  .ns-badge{margin-left:auto;background:var(--red);color:#fff;font-size:12px;font-weight:800;
    border-radius:999px;padding:2px 8px;min-width:22px;text-align:center}
  .navsheet-foot{display:flex;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
  .navsheet-foot .ic{width:17px;height:17px}
}
/* Delete my account: under the account buttons in the sidebar and the More
   sheet. Easy to find, never the thing a thumb lands on by accident. */
.del-acct{display:block;text-align:center;font-size:12px;font-weight:600;margin-top:10px;text-decoration:underline}
.del-acct:hover{color:var(--red)}
@keyframes sheetUp{from{transform:translateY(18px);opacity:.4}to{transform:none;opacity:1}}
@media(max-width:720px){
  .shell{grid-template-columns:1fr}
  .sidebar{display:none}
  .pos{grid-template-columns:1fr}
  .cart{position:static}
  .g3,.g4{grid-template-columns:1fr 1fr}
  .content{padding:18px 16px 90px}
  .topbar{padding:12px 16px}
  .roster{grid-template-columns:repeat(7,1fr);gap:4px}
  .roster .cell{min-height:84px;padding:5px}
  .cash-grid{grid-template-columns:1fr 1fr}
  .mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:30;background:var(--card);border-top:1px solid var(--line);justify-content:space-around;padding:6px 4px env(safe-area-inset-bottom)}
  .mobile-nav a,.mobile-nav button{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-weight:600;color:var(--ink-soft);padding:6px 10px;min-width:56px;min-height:48px;justify-content:center}
  .mobile-nav a.active,.mobile-nav button.active{color:var(--accent)}
  .mobile-nav a .em,.mobile-nav button .em{font-size:20px;position:relative}
  .mn-badge{position:absolute;top:-5px;left:12px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;
    background:var(--red);color:#fff;font-size:12px;font-weight:800;line-height:16px;text-align:center;
    border:1.5px solid var(--card)}
}
@media(max-width:520px){.g2,.g3,.g4{grid-template-columns:1fr}.cash-grid{grid-template-columns:1fr 1fr}.role-pick{grid-template-columns:1fr}}

/* ===== System language switch (英 / 中) ===== */
.lang-switch{display:inline-flex;gap:0;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:var(--card);flex-shrink:0}
.lang-switch button{appearance:none;border:none;background:transparent;cursor:pointer;font:inherit;font-size:13px;font-weight:600;color:var(--ink-soft);padding:6px 14px;min-height:36px;line-height:1}
.lang-switch button.active{background:var(--accent);color:#fff}
.lang-switch button:not(.active):hover{background:var(--paper-2)}
.login-card .lang-switch{position:absolute;top:16px;right:16px}
/* ---------- simplified owner home ("Today") — action-first, low-clutter ---------- */
.today-label{font-size:12.5px;font-weight:700;color:var(--ink-soft);letter-spacing:.05em;text-transform:uppercase;margin:2px 0 12px}
.today-acts{display:flex;flex-direction:column;gap:12px}
.today-act{display:flex;align-items:center;gap:14px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;transition:transform .16s var(--ease-out),box-shadow .2s}
@media (hover:hover) and (pointer:fine){ .today-act:hover{transform:translateY(-2px);box-shadow:var(--shadow-soft)} }
.today-act-ic{width:46px;height:46px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0}
.today-act-body{flex:1;min-width:0}
.today-act-body b{display:block;font-size:16px;font-weight:700;color:var(--ink)}
.today-act-body span{display:block;font-size:13.5px;color:var(--ink-soft);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.today-act-n{background:var(--ink);color:var(--paper);font-size:14px;font-weight:800;min-width:26px;height:26px;border-radius:999px;display:flex;align-items:center;justify-content:center;padding:0 8px;flex-shrink:0}
.today-act-chev{color:var(--ink-faint);font-size:22px;flex-shrink:0}
.ic{width:20px;height:20px;flex-shrink:0;vertical-align:-4px}
.btn .ic{width:16px;height:16px;vertical-align:0}
.today-act-ic .ic{width:24px;height:24px}
.today-clear-ic .ic{width:26px;height:26px}
.today-foot-head .ic{width:16px;height:16px;color:var(--green);flex-shrink:0}
.today-clear{display:flex;flex-direction:column;align-items:center;text-align:center;padding:40px 24px;gap:5px}
.today-clear-ic{width:56px;height:56px;border-radius:50%;background:var(--green-soft);color:var(--green);font-size:28px;display:flex;align-items:center;justify-content:center;margin-bottom:6px}
.today-clear b{font-size:18px;color:var(--ink)}
.today-clear span{font-size:14px;color:var(--ink-soft)}
.today-foot{margin-top:26px;padding-top:18px;border-top:1px solid var(--line)}
.today-foot-head{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--ink-soft);margin-bottom:14px}
.today-foot-metrics{display:flex;flex-wrap:wrap;gap:10px}
.today-foot-metrics a{display:flex;flex-direction:column;gap:2px;background:var(--paper-2);border:1px solid var(--line-2);border-radius:14px;padding:10px 16px;min-width:92px}
.today-foot-metrics a span{font-size:12px;color:var(--ink-faint)}
.today-foot-metrics a b{font-size:17px;font-weight:800;color:var(--ink)}
@media (hover:hover) and (pointer:fine){ .today-foot-metrics a:hover{background:var(--card);border-color:var(--line)} }

/* compact summary strip — replaces stacked stat cards across pages */
/* Cells grow into the row they land on, so a wrapped last cell fills the width
   instead of sitting there as a narrow orphan. A fixed column count can't do
   this — it would leave the same gap at some other width. */
.statline{display:flex;flex-wrap:wrap;gap:10px;margin:4px 0 18px}
.statcell{flex:1 1 96px;display:flex;flex-direction:column;gap:1px;background:var(--paper-2);border:1px solid var(--line-2);border-radius:12px;padding:8px 16px;min-width:0}
.statcell b{font-size:18px;font-weight:800;color:var(--ink);line-height:1.1}
.statcell i{font-size:12px;color:var(--ink-faint);font-style:normal}
/* A figure never breaks across lines ("$120.0 / 0"): a cell too narrow for
   its number moves to the next row instead. */
.statcell b{white-space:nowrap;font-variant-numeric:tabular-nums}
.statcell{min-width:max-content}
@media (max-width:600px){ .statcell{padding:10px 14px} .statcell i{line-height:1.3} }
@media (hover:hover) and (pointer:fine){ .statcell.warn:hover{background:var(--card)} }
/* The roster's three counts: one short row of buttons, number and word side
   by side, each going to what it counts. */
.rs-stats{gap:8px;margin:2px 0 12px;flex-wrap:nowrap}
.rs-stats .statcell{flex:1 1 0;min-width:0;flex-direction:row;align-items:baseline;justify-content:center;gap:5px;
  padding:7px 8px;font:inherit;color:inherit;cursor:pointer;text-align:center}
.rs-stats .statcell b{font-size:15px}
.rs-stats .statcell b .ic{width:15px;height:15px;vertical-align:-2px}
.rs-stats .statcell i{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.rs-stats .statdays span+span{margin-left:3px}
.rs-gaps{margin-bottom:12px}
.rs-gaps{padding:10px 12px}
.rs-gapdays{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.rs-gapdays .btn{background:var(--card);min-height:0;height:auto;padding:4px 9px;font-size:12.5px;border-radius:999px;box-shadow:none}
.rs-send{display:flex;align-items:center;gap:10px;padding:10px 12px;margin-bottom:12px;border-radius:var(--radius);
  background:var(--card);border:1px solid var(--line)}
.rs-send.is-due{border-color:color-mix(in srgb, var(--red) 45%, var(--line));background:color-mix(in srgb, var(--red) 6%, var(--card))}
.rs-send-ic{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;flex:none;background:var(--green-soft,var(--paper-2));color:var(--green)}
.rs-send.is-due .rs-send-ic{background:color-mix(in srgb, var(--red) 14%, transparent);color:var(--red)}
.rs-send b{display:block;font-size:14px}
.rs-send .faint{display:block;font-size:12px}
.rs-send .btn{flex:none}

/* staff home — today's shift + the one action (clock in) */
.staff-today{display:flex;flex-direction:column;align-items:flex-start;padding:22px 22px 24px}
.staff-today-top{display:flex;align-items:center;justify-content:space-between;width:100%;gap:10px}
.staff-today-label{font-size:12.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--accent)}
.staff-today-date{font-size:13px;color:var(--ink-faint)}
.staff-today-time{font-family:"Playfair Display",serif;font-weight:900;font-size:clamp(30px,7vw,42px);line-height:1.15;color:var(--ink);margin:8px 0 16px}   /* the clock button sits right under it */
.staff-today-hrs{font-size:14px;color:var(--ink-soft);margin-bottom:16px}
.staff-clock-btn{min-height:54px;font-size:17px;padding:0 40px;width:100%;max-width:300px}
.staff-today-status{font-size:15px;padding:10px 0}
/* "Today you're on": the person's group, opening / closing, their shifts. */
.duty-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:-6px 0 14px;font-size:13px}
.duty-card .duty-line{margin:0}
.duty-card{margin-bottom:16px}
/* Home's one-line shift card (roster.js homeShift): the time first, then the
   position and open / close, with Clock on at the right edge. */
.home-shift{display:flex;align-items:center;gap:12px;padding:12px 14px;margin-bottom:14px}
.hs-main{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.hs-k{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:var(--accent)}
.hs-t{font-size:16px;font-weight:800;font-variant-numeric:tabular-nums}
.hs-chips{display:flex;flex-wrap:wrap;gap:4px;width:100%}
.hs-chips:empty{display:none}
.hs-chips .duty-chip{font-size:12px;padding:2px 8px}
.hs-sub{font-size:12.5px;width:100%}
.home-shift .btn{flex:none}
.duty-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:999px;border:1px solid;font-weight:700;font-size:13px}
.duty-time{font-weight:700;font-variant-numeric:tabular-nums;color:var(--ink-soft)}
.staff-today-status.ok{color:var(--green)}
.staff-today-status.late{color:var(--red)}

/* Language <select> — replaces the old EN|中 toggle; scales to N languages */
.lang-select{appearance:none;-webkit-appearance:none;border:1px solid var(--line);border-radius:999px;
  background:var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236F655B' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  color:var(--ink);font:inherit;font-size:13px;font-weight:600;padding:8px 32px 8px 14px;min-height:36px;cursor:pointer;flex-shrink:0}
.lang-select:hover{background-color:var(--paper-2)}
.login-card .lang-select{position:absolute;top:16px;right:16px;z-index:2}
.login-card{position:relative}

/* ===== Login tabs (Sign in / Apply) ===== */
.login-tabs{display:flex;gap:6px;background:var(--paper-2);border:1px solid var(--line);border-radius:12px;padding:4px}
.login-tabs button{flex:1;appearance:none;border:none;background:transparent;cursor:pointer;font:inherit;font-size:13px;font-weight:600;color:var(--ink-soft);padding:9px 8px;border-radius:9px;line-height:1.2}
.login-tabs button.active{background:var(--card);color:var(--ink);box-shadow:var(--shadow-soft)}

/* ===== Approved-restaurant logo strip on login ===== */
.logo-strip{margin-top:16px;border-top:1px solid var(--line-2);padding-top:12px}
.logo-strip>.faint{font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.logo-strip-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.logo-strip-row img{width:38px;height:38px;border-radius:10px;object-fit:cover;border:1px solid var(--line);background:var(--card)}

/* ===== Restaurant logo in Super Admin lists ===== */
.kit-logo{width:40px;height:40px;border-radius:12px;object-fit:cover;border:1px solid var(--line);flex-shrink:0}

/* ===== Role segmented control (owner: change role) ===== */
.role-seg{display:flex;gap:8px;margin-top:6px}
.role-seg button{flex:1;appearance:none;border:1px solid var(--line);background:var(--paper-2);cursor:pointer;font:inherit;font-size:14px;font-weight:600;color:var(--ink-soft);padding:14px 8px;border-radius:14px}
.role-seg button.active{border-color:var(--ink);background:var(--ink);color:var(--paper)}

/* ===== AI assistant (floating chat) ===== */
.ai-fab{position:fixed;right:18px;bottom:18px;z-index:300;width:56px;height:56px;border-radius:50%;
  background:var(--ink);color:var(--paper);font-size:24px;box-shadow:var(--shadow);display:grid;place-items:center;
  border:none;cursor:pointer;transition:transform .15s,background .2s}
.ai-fab:hover{transform:translateY(-2px)}
.ai-fab.open{background:var(--accent)}
.ai-fab .ic{width:24px;height:24px;stroke-width:2}
/* On a phone the bottom bar already carries AI, so the floating button was a
   second door to the same room — one that sat on top of the content on every
   single page. Desktop keeps it; there the sidebar link is further away. */
/* The assistant used to be desktop-only. It cannot be: the guided onboarding
   conversation is for someone's first morning, and that person is holding a
   phone. So it stays — lifted clear of the bottom nav rather than hidden. */
@media(max-width:720px){.ai-fab{bottom:calc(72px + env(safe-area-inset-bottom));width:50px;height:50px}}
.ai-panel{position:fixed;right:18px;bottom:84px;z-index:301;width:min(380px,calc(100vw - 36px));max-height:min(560px,calc(100vh - 120px));
  background:var(--card);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);
  display:none;flex-direction:column;overflow:hidden;animation:pop .2s ease}
.ai-panel.show{display:flex}
@media(max-width:720px){.ai-panel{bottom:140px;right:12px;left:12px;width:auto}}
.ai-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:var(--paper-2);border-bottom:1px solid var(--line-2)}
.ai-head b{font-size:15px}
.ai-x{font-size:22px;line-height:1;color:var(--ink-soft);background:none;cursor:pointer}
.ai-log{flex:1;overflow:auto;padding:14px 14px 4px;display:flex;flex-direction:column;gap:10px}
.ai-msg{max-width:88%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;word-wrap:break-word;overflow-wrap:anywhere}
.ai-msg.bot{background:var(--paper-2);border:1px solid var(--line-2);align-self:flex-start;border-bottom-left-radius:5px}
/* A guided-onboarding bubble carries a form, not a sentence — it gets the whole
   panel width, and its own inline validation line. */
.ai-msg.ai-form{max-width:100%;width:100%}
.ai-msg.ai-form .field{margin-bottom:8px}
.ob-warn{color:var(--red);font-size:12px;margin-top:6px}
/* Signature pad. touch-action:none so a finger drawing a signature draws
   instead of scrolling the modal out from under it. Always white with dark
   ink: it becomes a page on paper, dark mode or not. */
.sig-pad{display:block;width:100%;height:190px;border:1.5px dashed var(--line);border-radius:14px;background:#fff;touch-action:none;cursor:crosshair}
.sig-decl{background:var(--paper-2);border:1px solid var(--line-2);border-radius:14px;padding:14px 16px}
.ai-msg.user{background:var(--ink);color:var(--paper);align-self:flex-end;border-bottom-right-radius:5px}
.ai-msg b{font-weight:700}
.ai-jump{display:inline-block;margin-top:6px;color:var(--accent);font-weight:700;cursor:pointer}
.ai-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.ai-chip{background:var(--card);border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:12.5px;font-weight:600;color:var(--ink);cursor:pointer}
.ai-chip:hover{border-color:var(--accent);color:var(--accent-ink)}
.ai-input-row{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--line-2)}
.ai-input-row .input{height:44px}
.ai-input-row .btn{min-height:44px;padding:0 16px}
.ai-dots{display:inline-flex;gap:4px}
.ai-dots i{width:6px;height:6px;border-radius:50%;background:var(--ink-faint);animation:aiBlink 1s infinite}
.ai-dots i:nth-child(2){animation-delay:.2s}.ai-dots i:nth-child(3){animation-delay:.4s}
@keyframes aiBlink{0%,100%{opacity:.3}50%{opacity:1}}

/* The assistant as the app's home screen rather than a corner panel: the
   conversation fills the page and the composer sits at the bottom of it.
   It reuses .ai-log / .ai-msg / .ai-input-row wholesale — only the frame and
   the reading width differ, because a message that is comfortable in a 380px
   panel runs the full width of a desktop and stops being readable. */
.ai-page{display:flex;flex-direction:column;height:100%;min-height:min(70vh,680px);
  background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius);overflow:hidden}
.ai-page .ai-log{flex:1;padding:20px 20px 8px;gap:12px}
.ai-page .ai-msg{max-width:min(68ch,86%)}
.ai-page .ai-input-row{padding:14px 18px}
/* Suggestions after a replayed conversation — a hint, not a message, so it
   carries no bubble and sits flush with the thread. */
.ai-page .ai-suggest{align-self:flex-start;max-width:100%}
.ai-page .ai-suggest .ai-chips{margin-top:0}

/* On the assistant's own page the shell stops scrolling and the conversation
   scrolls inside it. Without this the thread grows the page, the composer
   rides down with it, and answering a long conversation means scrolling to the
   bottom to find the box. `min-height:0` on each flex link is what lets the
   log shrink instead of pushing the composer off. */
body.ai-fullpage .main{height:100vh;overflow:hidden}
body.ai-fullpage .content{display:flex;min-height:0;overflow:hidden}
body.ai-fullpage .ai-page{flex:1;min-height:0;height:auto}
@media(max-width:720px){
  /* dvh, because the phone's address bar collapsing must not leave the composer
     under the fold. The bottom bar still needs its own room. */
  body.ai-fullpage .main{height:100dvh}
  body.ai-fullpage .content{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
}
@media(max-width:720px){
  /* Edge to edge on a phone, and tall enough that the keyboard opening does not
     leave the conversation as a two-line slot. */
  .ai-page{border:none;border-radius:0;min-height:calc(100vh - 210px);background:transparent}
  .ai-page .ai-log{padding:6px 2px 4px}
  .ai-page .ai-msg{max-width:92%}
  .ai-page .ai-input-row{padding:12px 2px}
}

/* A supplier whose docket the reader has learned. */
.sup-learned{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:var(--green-soft);color:var(--ink);grid-column:1/-1}
.sup-learned > .ic{color:var(--green)}
.sup-learned div{flex:1;display:flex;flex-direction:column;font-size:13px}
.sup-learned span{color:var(--ink-soft);font-size:12px}

/* Cash-up: one row per note and coin. The ones that stay in the till as the
   float are marked, so the person counting can see which pile is which. */
.cu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px 14px}
.cu-row{display:grid;grid-template-columns:52px 1fr 76px;align-items:center;gap:8px;padding:4px 0}
.cu-den{font-weight:700;font-variant-numeric:tabular-nums}
.cu-row.keep .cu-den{color:var(--green)}
.cu-legend{color:var(--green);font-weight:600}
/* A phone counts two piles side by side, so the whole drawer fits in a thumb's
   reach instead of eleven rows of scrolling. The subtotal sits under the box. */
@media(max-width:560px){
  .cu-grid{grid-template-columns:1fr 1fr;gap:4px 12px}
  .cu-row{grid-template-columns:42px 1fr;gap:6px;padding:2px 0}
  .cu-sub{grid-column:2;text-align:left;font-size:12px;margin-top:-2px}
  .cu-sub:empty{display:none}
}
.cu-row .input{padding:8px 10px}
.cu-sub{font-size:12.5px;color:var(--ink-soft);text-align:right;font-variant-numeric:tabular-nums}

/* The home page: the dashboard on top and the conversation under it. The chat
   is a fixed-height panel, so a long thread scrolls inside it and the numbers
   above stay where they are. */
.home-chat{margin-top:22px}
.home-chat-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 2px 10px}
.home-chat-head b{font-size:15px}
.home-chat-head .faint{font-size:12.5px;flex-basis:100%;margin-left:26px;margin-top:-4px}
.home-chat .ai-page{height:min(62vh,560px);min-height:360px}
.home-fold{display:none}
.home-chat-size{display:none}
/* A computer has the width for both: the numbers on the left, the conversation
   a column beside them that stays put while the numbers scroll. */
@media(min-width:1200px){
  .home-split{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:22px;align-items:start}
  .home-chat{margin-top:0;position:sticky;top:84px;height:calc(100vh - 120px);display:flex;flex-direction:column}
  /* A preview or offline bar above the topbar pushes the column down until it scrolls away. */
  .main:has(> .offbar:not(.hidden)) .home-chat{height:calc(100vh - 160px)}
  .home-chat-head .faint{display:none}
  #homeChat{flex:1;min-height:0;display:flex}
  .home-chat .ai-page{flex:1;height:auto;min-height:0}
  .home-chat .ai-page .ai-log{padding:14px 14px 6px}
  .home-chat .ai-page .ai-msg{max-width:92%}
  .home-chat .ai-page .ai-input-row{padding:10px 10px}
  .home-split.chat-wide{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)}
  .home-chat-size{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;width:32px;height:32px;
    border:1px solid var(--line-2);border-radius:10px;background:var(--card);color:var(--ink-soft);cursor:pointer;padding:0}
  .home-chat-size:hover{color:var(--accent);border-color:var(--accent)}
  .home-chat-size .ic{width:16px;height:16px}
}
@media(max-width:720px){
  /* Phone: the chat is the home screen; the numbers are one tap away. */
  .home-fold{display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border-radius:var(--radius);
    border:1px solid var(--line-2);background:var(--card);font-weight:600;font-size:14px;color:var(--ink);cursor:pointer}
  .home-fold span{flex:1;text-align:left}
  /* The numbers open downward, so the arrow points down; open, it points up. */
  .home-fold .ic:last-child{transform:rotate(90deg);transition:transform .2s}
  .show-dash .home-fold .ic:last-child{transform:rotate(-90deg)}
  .home-dash{display:none}
  .show-dash > .home-dash{display:block;margin-top:10px}
  .home-chat{margin-top:10px}
  .home-chat-head .faint{display:none}
  .home-chat .ai-page{height:calc(100dvh - 300px - env(safe-area-inset-bottom));min-height:300px;border:1px solid var(--line-2);border-radius:var(--radius);background:var(--card)}
  .home-chat .ai-page .ai-log{padding:12px 12px 4px}
  .home-chat .ai-page .ai-input-row{padding:10px 10px}
}

/* ===== Dashboard v2 (icons, charts, count-up) ===== */
.ic{width:18px;height:18px;flex:0 0 auto;vertical-align:-3px}
.pad20{padding:20px}
.ds-hero{display:grid;grid-template-columns:1.1fr 1fr;gap:24px;padding:24px;background:
  radial-gradient(120% 140% at 100% 0%, rgba(31,42,68,.07), transparent 55%), var(--card)}
.ds-hero-label{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:var(--ink-soft)}
.ds-hero-value{font-family:"Playfair Display",serif;font-weight:900;font-size:46px;line-height:1.05;display:block;margin:4px 0 2px;letter-spacing:-.5px}
.ds-hero-sub{font-size:13px;color:var(--ink-faint)}
.ds-mini-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.ds-mini{flex:1 1 120px;background:var(--paper-2);border:1px solid var(--line-2);border-radius:12px;padding:10px 12px}
.ds-mini span{display:block;font-size:12px;color:var(--ink-soft)}
.ds-mini b{font-size:17px}
.ds-hero-chart{display:flex;flex-direction:column;justify-content:flex-end}
.ds-chart-cap{font-size:12px;font-weight:600;color:var(--ink-soft);margin-bottom:8px}
.ds-bars{display:flex;align-items:flex-end;gap:8px;height:96px}
.ds-bar-wrap{flex:1;height:100%;display:flex;align-items:flex-end}
.ds-bar{width:100%;height:0;min-height:3px;border-radius:6px 6px 3px 3px;background:linear-gradient(180deg,var(--accent),#e08a5a);
  transition:height .55s var(--ease-out)}
.ds-bar-wrap:last-child .ds-bar{background:linear-gradient(180deg,var(--ink),#4a443d)}
.ds-bars-x{display:flex;gap:8px;margin-top:6px}
.ds-bars-x span{flex:1;text-align:center;font-size:12px;color:var(--ink-faint)}
.ds-tile{display:flex;align-items:center;gap:14px;padding:16px 18px}
.ds-ico{width:42px;height:42px;flex:0 0 auto;border-radius:13px;background:var(--accent-soft);color:var(--accent-ink);display:grid;place-items:center}
.ds-ico .ic{width:21px;height:21px}
.ds-tile-body{display:flex;flex-direction:column;min-width:0}
.ds-tile-label{font-size:12.5px;color:var(--ink-soft);font-weight:500}
.ds-tile-val{font-family:"Playfair Display",serif;font-weight:900;font-size:26px;line-height:1.15}
.ds-tile-val small{font-size:14px;font-family:inherit}
.ds-tile-delta{font-size:12px;color:var(--ink-faint);font-weight:600}
.ds-tile-delta.up{color:var(--green)}.ds-tile-delta.down{color:var(--red)}
.bestlist{display:flex;flex-direction:column;gap:12px;margin-top:6px}
.bestrow{display:grid;grid-template-columns:120px 1fr 28px;align-items:center;gap:12px}
.bestnm{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.besttrack{height:10px;background:var(--paper-2);border-radius:99px;overflow:hidden}
.bestfill{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,var(--accent),#e08a5a);transition:width .6s var(--ease-out)}
.bestq{font-weight:800;font-size:14px;text-align:right;font-family:"Playfair Display",serif}
.gauge-val{font-family:"Playfair Display",serif;font-weight:900;font-size:34px;margin:6px 0 10px}
.gauge-val small{font-size:16px}
.gauge{position:relative;height:14px;background:var(--paper-2);border-radius:99px;overflow:hidden}
.gauge-fill{height:100%;width:0;border-radius:99px;transition:width .6s var(--ease-out)}
.gauge-line{position:absolute;top:-3px;width:2px;height:20px;background:var(--ink);border-radius:2px}
.gauge-legend{display:flex;justify-content:space-between;font-size:12px;color:var(--ink-soft);margin-top:8px}
/* An item can carry a photo of the actual thing. Small, square, and never
   required — the name is still the item, the picture only makes it faster to
   find on a shelf you're standing in front of. */
.itm-nm{display:inline-flex;align-items:center;gap:8px}
.itm-ph{width:30px;height:30px;border-radius:8px;object-fit:cover;flex:none;background:var(--paper-2)}
.ds-li-ic .itm-ph{width:100%;height:100%;border-radius:inherit}
.ds-li-ic{width:40px;height:40px;flex:0 0 auto;border-radius:12px;background:var(--accent-soft);color:var(--accent-ink);display:grid;place-items:center}
.ds-li-ic .ic{width:20px;height:20px}
/* Severity as a tinted chip rather than a 🔴/🟠/🔵 emoji: an emoji circle is
   colour and nothing else, and it renders differently on every OS. */
.ds-li-ic.sev-red{background:var(--red-soft);color:var(--red-ink)}
.ds-li-ic.sev-amber{background:var(--amber-soft);color:var(--amber-ink)}
.ds-li-ic.sev-info{background:var(--blue-soft);color:var(--blue-ink)}
@media(max-width:720px){ .ds-hero{grid-template-columns:1fr} }

/* ===== Accessibility: respect reduced motion (keep opacity, drop movement) ===== */
@media (prefers-reduced-motion: reduce){
  *{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.05ms !important;scroll-behavior:auto !important}
  .btn:active{transform:none}
  .clickable:hover,.clickable:active,.btn-dark:hover{transform:none}
  @keyframes pop{from{opacity:0}to{opacity:1}}
  .urge-flash{animation:none}
}

/* ===== Nav icons (SVG replaces emoji) ===== */
.nav-item .em{display:inline-flex;align-items:center;justify-content:center;width:22px}
.nav-item .em svg{width:19px;height:19px}
.mobile-nav a .em{display:inline-flex;align-items:center;justify-content:center}
.mobile-nav a .em svg{width:22px;height:22px}

/* ===== Membership / loyalty / QR ===== */
.mem-box{margin-bottom:12px}
.mem-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line-2);border-radius:14px;background:var(--accent-soft)}
.earn-hint{font-size:12.5px}
.qr{display:block;border-radius:10px}
.qr-fallback{display:flex;align-items:center;justify-content:center;border:2px dashed var(--line);border-radius:12px;background:#fff;text-align:center;padding:8px}
.qr-fallback span{font-family:ui-monospace,Menlo,monospace;font-weight:700;font-size:18px;letter-spacing:2px;word-break:break-all}
.mem-detail{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}
.qr-wrap{display:flex;flex-direction:column;align-items:center;gap:6px}
.qr-code{font-family:ui-monospace,Menlo,monospace;font-weight:700;letter-spacing:2px;font-size:14px}
.mem-detail .kv{background:var(--paper);border:1px solid var(--line-2);border-radius:11px;padding:8px 12px;min-width:78px}
.mem-detail .kv .muted{font-size:12px}
.mem-detail .kv b{font-size:16px;display:block;margin-top:2px}
@media(max-width:520px){.mem-detail{flex-direction:column;align-items:stretch}}

/* ===== Design polish pass (cohesive across all portals) ===== */
/* Smooth page transition on every navigation */
@keyframes viewIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.view-enter{animation:viewIn .30s var(--ease-out)}

/* Interactive list rows feel responsive (subtle, even on static lists) */
.li{padding:13px 10px;margin:0 -2px;border-radius:12px;transition:background .15s}
@media (hover:hover) and (pointer:fine){ .li:hover{background:var(--paper-2)} }

/* Stat tiles: aligned figures + a clearer interactive cue when clickable */
.stat .v{font-variant-numeric:tabular-nums;letter-spacing:-.4px}
.ds-tile-val,.ds-hero-value{font-variant-numeric:tabular-nums}
.stat.clickable:hover{border-color:var(--accent)}

/* Cards that act as buttons get a hairline accent on hover */
@media (hover:hover) and (pointer:fine){
  .card.clickable:hover,.menu-item:hover{border-color:var(--accent)}
}

/* Refined empty states — a soft "drop-zone" panel instead of bare text */
.empty{border:1.5px dashed var(--line);border-radius:16px;background:var(--paper-2)}
.empty .em{font-size:34px;opacity:.6;display:inline-grid;place-items:center;width:64px;height:64px;
  margin:0 auto 6px;border-radius:50%;background:var(--card);box-shadow:var(--shadow-soft)}
.empty .em .ic{width:28px;height:28px;color:var(--ink-faint)}
.empty p{font-size:13.5px}

/* Sidebar: clearer active state + crisper icons */
.nav-item{transition:background .15s,color .15s}
.nav-item.active{box-shadow:var(--shadow-soft)}
.nav-item .em svg{transition:transform .15s}
@media (hover:hover) and (pointer:fine){ .nav-item:hover .em svg{transform:scale(1.08)} }

/* Accessible keyboard focus everywhere */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:8px}
.input:focus-visible{outline:none}

/* Honor reduced-motion */
@media (prefers-reduced-motion:reduce){
  .view-enter{animation:none}
  .nav-item:hover .em svg{transform:none}
}

/* ===== Sold-out / 86 states ===== */
.menu-item.is-soldout{opacity:.5;cursor:not-allowed;filter:grayscale(.5)}
.menu-item.is-soldout .pr{color:var(--red);font-weight:700}
.menu-admin-card.is-soldout{opacity:.7}
.ma-thumb{position:relative}
.soldout-tag{position:absolute;top:8px;left:8px;background:var(--red);color:#fff;font-size:12px;font-weight:700;
  padding:3px 9px;border-radius:999px;letter-spacing:.02em}
.cust-item.is-soldout{opacity:.55}
.cust-item.is-soldout .ci-price{color:var(--red);font-weight:700}
.ci-sold{font-size:12px;font-weight:700;color:var(--red);padding:0 10px;white-space:nowrap}

/* ===== Receipt / print ===== */
.receipt{font-family:ui-monospace,Menlo,Consolas,monospace;max-width:300px;margin:0 auto;color:#111}
.rc-head{text-align:center;margin-bottom:10px}
.rc-head b{font-family:"Playfair Display",serif;font-size:20px;display:block}
.rc-sub{font-size:12px;color:var(--ink-soft)}
.rc-meta{font-size:12px;color:var(--ink-soft);text-align:center;border-bottom:1px dashed var(--line);padding-bottom:10px;margin-bottom:10px;line-height:1.5}
.rc-row{display:flex;justify-content:space-between;font-size:13px;gap:10px;padding:2px 0}
.rc-row i{color:var(--ink-soft);font-style:italic}
.rc-items{border-bottom:1px dashed var(--line);padding-bottom:8px;margin-bottom:8px}
.rc-grand{font-weight:800;font-size:15px;border-top:1px solid var(--line);margin-top:6px;padding-top:6px}
.rc-member{margin-top:12px;padding:9px 10px;background:var(--accent-soft);border-radius:10px;font-size:12.5px;text-align:center}
.rc-foot{text-align:center;font-size:12px;color:var(--ink-soft);margin-top:12px}

#print-area{display:none}
@media print{
  /* Paper is white whatever the screen is doing. Without this a venue printing
     a docket in dark mode gets light-on-dark tokens on white paper — a page
     that looks blank. */
  :root{
    --paper:#FFFFFF; --paper-2:#F8F6F2; --card:#FFFFFF;
    --ink:#1C1F26; --ink-soft:#5E626A; --ink-faint:#686C73;
    --line:rgba(28,31,38,.18); --line-2:rgba(28,31,38,.10);
    --accent:#1F2A44; --accent-soft:#E4E7EE; --accent-ink:#1F2A44;
    --green:#3A7D5C; --green-soft:#E4EEE8; --green-ink:#2F6249;
    --red:#B8483D; --red-soft:#F5E3E0; --red-ink:#9E3D33;
    --amber:#C9962E; --amber-soft:#F3ECDC; --amber-ink:#7A5A12;
    --blue:#3F5F8F; --blue-soft:#E6EBF3; --blue-ink:#2F4B75;
    color-scheme:light;
  }
  body{background:#fff}
  body *{visibility:hidden}
  #print-area, #print-area *{visibility:visible}
  #print-area{display:block;position:absolute;left:0;top:0;width:100%;padding:10px}
  .receipt{max-width:none}
}

/* ============================================================
   ===== Visual refresh v2 — cohesive premium pass (all portals) =====
   Elevates the shared design tokens + key components. Structure-safe:
   overrides only finish (depth, gradients, motion), not layout.
   ============================================================ */
:root{
  /* Layered, softer-yet-present shadows = real depth */
  --shadow:0 1px 2px rgba(33,30,27,.06), 0 6px 16px -6px rgba(33,30,27,.12), 0 28px 52px -30px rgba(33,30,27,.32);
  --shadow-soft:0 1px 2px rgba(33,30,27,.05), 0 8px 20px -14px rgba(33,30,27,.22);
  /* Derived from --accent so a venue's own colour reaches the primary buttons
     and the sign-in mark. Hardcoded stops here meant the brand applied to
     tags and avatars but every main button stayed the default orange. */
  --accent-grad:linear-gradient(140deg, var(--accent), var(--accent-ink));
  --ink-grad:linear-gradient(152deg,#2A3550,#1A2338);
  --green-grad:linear-gradient(140deg,#45906B,#337353);
}

/* Page: a whisper of warmth instead of a flat fill */
body{
  background:
    radial-gradient(1100px 620px at 6% -8%, rgba(31,42,68,.045), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(58,125,92,.035), transparent 55%),
    var(--paper);
  background-attachment:fixed;
}

/* Buttons: gradient primaries + a smoother, more tactile lift */
.btn{font-weight:650;letter-spacing:.01em}
.btn-dark{background:var(--ink-grad)}
.btn-accent{background:var(--accent-grad)}
.btn-green{background:var(--green-grad)}
@media (hover:hover) and (pointer:fine){
  .btn-dark:hover,.btn-accent:hover,.btn-green:hover{transform:translateY(-1.5px);box-shadow:0 12px 26px -12px rgba(33,30,27,.5)}
}

/* Cards: a touch more lift + responsive hover */
.card{transition:box-shadow .22s var(--ease-out),transform .22s var(--ease-out),border-color .2s}

/* Inputs: rounded a hair more + a soft focus ring */
.input{border-radius:13px;transition:border-color .15s,background .15s,box-shadow .18s}
.input:focus{box-shadow:0 0 0 3px var(--accent-soft)}

/* Sidebar active + brand mark = the gradient ink */
.nav-item.active{background:var(--ink-grad)}
.side-brand .logo{background:var(--ink-grad);box-shadow:0 6px 16px -8px rgba(33,30,27,.5)}

/* Crisper headings */
.topbar h1,.section-head h2{letter-spacing:-.015em}

/* Login: richer brand mark + deeper card */
.login-logo{background:var(--accent-grad);box-shadow:0 12px 26px -10px color-mix(in srgb, var(--accent) 55%, transparent)}
.login-card{border-radius:26px}

/* Stat / dashboard tiles: gentle hover so cards feel alive */
@media (hover:hover) and (pointer:fine){
  .stat:hover,.ds-tile:hover{box-shadow:var(--shadow-soft)}
}

/* ===== 全能助手 · AI Admin agent ===== */
.ai-admin{max-width:720px;margin:0 auto;display:flex;flex-direction:column;height:calc(100vh - 140px);min-height:420px}
.aa-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:14px;border-bottom:1px solid var(--line-2);margin-bottom:14px}
.aa-orb{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-size:20px;
  background:var(--ink-grad);color:var(--paper);box-shadow:var(--shadow-soft)}
.aa-log{flex:1;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:4px 2px 10px}
.aa-msg{max-width:86%;padding:13px 16px;border-radius:16px;font-size:14.5px;line-height:1.6;word-wrap:break-word;overflow-wrap:anywhere}
.aa-msg.bot{align-self:flex-start;background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow-soft);border-bottom-left-radius:6px}
.aa-msg.user{align-self:flex-end;background:var(--ink);color:var(--paper);border-bottom-right-radius:6px}
.aa-msg b{font-weight:700}
.aa-confirm{font-size:14.5px}
.aa-chips{display:flex;gap:8px;flex-wrap:wrap;padding:10px 0}
.aa-chip{font-size:13px;padding:8px 13px;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--ink-soft);white-space:nowrap}
.aa-chip:hover{border-color:var(--accent);color:var(--accent-ink)}
.aa-input{display:flex;gap:8px;align-items:center;padding-top:10px;border-top:1px solid var(--line-2)}
.aa-input .input{flex:1;height:50px;border-radius:14px}
.aa-input .btn{height:50px;width:50px;padding:0;border-radius:14px;flex:none}
@media(max-width:520px){ .ai-admin{height:calc(100vh - 170px)} }

/* ==========================================================================
   Stock · deliveries · training · rostering — components added with the
   time-saving back-of-house rebuild.
   ========================================================================== */

/* ---------- overflow menu (⋯) ----------
   The occasional actions, folded away so the everyday one can lead. <details>
   does the open/close, so there is no state to keep and nothing to unbind. */
.omenu{position:relative;flex-shrink:0}
.omenu>summary{list-style:none;padding:0 14px}
.omenu>summary::-webkit-details-marker{display:none}
.omenu>summary .ic{width:19px;height:19px}
.omenu[open]>summary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.omenu-pop{position:absolute;right:0;top:calc(100% + 6px);z-index:25;min-width:200px;padding:6px;
  background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);
  display:flex;flex-direction:column;animation:pop .16s var(--ease-out)}
.omenu-pop button{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:0 12px;
  border-radius:11px;font-size:14px;font-weight:600;text-align:left;color:var(--ink)}
.omenu-pop button:hover{background:var(--paper-2)}
.omenu-pop .ic{width:18px;height:18px;color:var(--ink-soft);flex-shrink:0}

/* ---------- tab bar (Stock page) ----------
   A fade on the right edge is the only honest signal that a scroller has more
   in it — a tab cut off mid-word just looks like a rendering fault. */
.tabbar{position:relative;display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line-2);margin-bottom:4px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.tabbar::-webkit-scrollbar{display:none}
.tabbar .tab{display:inline-flex;align-items:center;gap:7px;appearance:none;border:none;background:transparent;font:inherit;font-size:14px;font-weight:600;color:var(--ink-soft);
  padding:11px 15px;min-height:46px;border-radius:12px 12px 0 0;border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap}
.tabbar .tab .ic{width:17px;height:17px}
/* Hover only where there is a pointer: on a phone :hover sticks to wherever
   the finger last was, and after the page redraws that is a different tab —
   a grey box on one tab while another is selected. */
@media (hover:hover) and (pointer:fine){ .tabbar .tab:hover{background:var(--paper-2);color:var(--ink)} }
.tabbar .tab.active{color:var(--ink);border-bottom-color:var(--accent);background:var(--card)}
/* A page's own buttons under its tabs (Stock): they differ from tab to tab, and
   above the tabs they pushed the tab bar up and down on every switch. */
.tab-actions{margin:14px 0 2px}
.tab-actions:empty{display:none}
/* Every stock tab starts the same distance under the tabs (or its buttons). */
#stockBody > :first-child{margin-top:16px!important}
/* Buttons on the left here, so the ⋯ menu opens rightward, onto the screen. */
.tab-actions .omenu-pop{right:auto;left:0}
.tab-actions{align-items:center}
/* The row's last control sits at the right end: kitchen / list after Add items,
   Export after the period switch. */
.tab-actions > :last-child:not(:first-child){margin-left:auto}
@media (max-width:430px){
  /* One row on a phone: the switch drops its icons to fit beside Add items. */
  .tab-actions{flex-wrap:nowrap}
  .tab-actions .viewswitch button{padding:0 12px;min-height:44px}
  .tab-actions .viewswitch button .ic{display:none}
}

/* ---------- data tables ---------- */
/* Wide tables scroll inside their own box so the page itself never scrolls sideways. */
.tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -4px;padding:0 4px}
table.dtable{border-collapse:separate;border-spacing:0;width:100%;min-width:520px;font-size:13.5px}
.dtable th,.dtable td{padding:10px 12px;border-bottom:1px solid var(--line-2);vertical-align:top;text-align:left}
.dtable thead th{font-size:12px;font-weight:700;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;
  background:var(--paper-2);position:sticky;top:0;z-index:1}
.dtable tbody tr:last-child td{border-bottom:none}
.dtable tfoot td{padding:10px 12px;border-top:2px solid var(--line);font-weight:700}
.dtable .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.dtable .input{height:38px;padding:6px 10px;font-size:13.5px}
@media (hover:hover) and (pointer:fine){ .dtable tbody tr:hover{background:var(--paper-2)} }

/* Entry tables (stocktake, waste) are filled in on a phone while walking the
   shelves, so on a narrow screen they stack instead of scrolling sideways —
   sideways-scrolling to reach the box you have to type in is the wrong
   interaction. The label spans are plain text nodes so they translate like
   everything else; they're redundant with the header on desktop, hence hidden. */
.dtable .cell-l{display:none}
/* Rostering preferences: how many people per shift, all seven days in view —
   inside the sheet, without scrolling sideways. */
table.dm-table{min-width:0;table-layout:fixed}
.dm-table th,.dm-table td{padding:6px 2px}
.dm-table th:first-child,.dm-table td:first-child{width:72px;padding-left:4px}
.dm-table thead th.num{text-align:center;letter-spacing:0}
.dm-table td.num{text-align:center}
.dm-table .input.dm{width:100%;max-width:46px;height:34px;padding:4px 2px;text-align:center}
.dm-table tr.dm-slot td{padding-top:12px;border-bottom:none;font-size:13px}
.grp-dot{width:12px;height:12px;border-radius:50%;flex:none}
.pos-cat{margin-bottom:12px}
.pos-cat-name{font-size:12px;font-weight:700;letter-spacing:.03em;margin-bottom:6px}
.pos-chip{gap:6px}
.pos-chip .grp-dot{width:9px;height:9px}
.grp-block{padding:8px 0 10px;border-bottom:1px solid var(--line-2);margin-bottom:8px}
.grp-members{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:8px 0 0 18px}
.grp-members .sl-who{margin:0}
.grp-add{width:auto;height:30px;padding:2px 8px;font-size:12.5px}
.grp-pick{width:auto;height:32px;padding:4px 8px;font-size:13px}
.dm-table td:first-child b{font-size:12px}
@media(max-width:520px){
  table.dtable.entry{min-width:0}
  .dtable.entry, .dtable.entry tbody, .dtable.entry tr, .dtable.entry td{display:block;width:100%}
  .dtable.entry thead{display:none}
  .dtable.entry tbody tr{border-bottom:1px solid var(--line-2);padding:10px 0}
  .dtable.entry tbody tr:last-child{border-bottom:none}
  .dtable.entry td{border-bottom:none;padding:3px 0;text-align:left}
  .dtable.entry td.num{text-align:left}
  .dtable.entry .cell-l{display:block;font-size:12px;font-weight:600;color:var(--ink-soft);margin-bottom:3px}
  .dtable.entry td .input{width:100%;text-align:left!important}
}
.linkish{appearance:none;border:none;background:transparent;padding:0;font:inherit;cursor:pointer}

/* ---------- roster grid ---------- */
.rgrid-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.rgrid{border-collapse:separate;border-spacing:0;width:100%;min-width:780px;font-size:12.5px}
.rgrid th,.rgrid td{border-bottom:1px solid var(--line-2);border-right:1px solid var(--line-2);padding:6px 8px;vertical-align:top}
.rgrid thead th{background:var(--paper-2);position:sticky;top:0;z-index:3;text-align:center;font-weight:700;white-space:nowrap}
.rgrid .rg-date{font-weight:500;font-size:12px;color:var(--ink-faint)}
/* Running cost under the dish cost card editor. */
.dm-total{padding:10px 14px;border-radius:12px;background:var(--paper-2);
  border:1px solid var(--line-2);font-size:13.5px;color:var(--ink-soft)}

/* Running total under the stocktake table — the gap as it is being typed. */
.stk-running{margin-top:10px;padding:10px 14px;border-radius:12px;background:var(--paper-2);
  border:1px solid var(--line-2);font-size:13px;color:var(--ink-soft)}
.stk-running.short{background:var(--red-soft);border-color:var(--red);color:var(--red-ink)}
.stk-running.over{background:var(--green-soft);border-color:var(--green);color:var(--green-ink)}

/* A public holiday is information, not a status, so it takes the module's
   own colour rather than a warning colour. */
.rgrid .rg-hol{display:inline-block;max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-weight:700;font-size:12px;color:var(--accent-ink);background:var(--accent-soft);
  border-radius:6px;padding:1px 6px;margin-top:3px}
.rgrid td.rg-cell.hol{background:color-mix(in srgb, var(--accent-soft) 45%, transparent)}
.rgrid td.rg-cell.hol.today{background:var(--accent-soft)}
.rgrid th.rg-name,.rgrid td.rg-name{position:sticky;left:0;background:var(--card);z-index:2;text-align:left;min-width:150px;max-width:172px}
.rgrid thead th.rg-name{z-index:4;background:var(--paper-2)}
.rgrid td.rg-cell{min-width:90px;cursor:pointer}
.rgrid td.rg-cell.today{background:var(--accent-soft)}
.rgrid td.rg-cell:hover{background:var(--paper-2)}
.rgrid td.rg-cell.dragover{outline:2px dashed var(--accent);outline-offset:-2px}
.rgrid tr.rg-bandrow td{padding:7px 10px;font-weight:800;letter-spacing:.3px}
.rgrid tr.rg-bandrow{cursor:pointer}
.rgrid .rg-fold{display:inline-grid;vertical-align:-3px;margin-right:4px;transition:transform .18s}
.rgrid .rg-fold .ic{width:14px;height:14px}
.rgrid tr.rg-bandrow.shut .rg-fold{transform:rotate(-90deg)}
@keyframes rgFlash{0%,60%{box-shadow:inset 0 0 0 2px var(--red)}100%{box-shadow:none}}
.rgrid .rg-flash{animation:rgFlash 1.6s ease-out}
/* Add shift: the time doesn't suit this person — pops up, closes with Got it. */
.sh-clash{font-size:13px;align-items:center;animation:pop .24s var(--ease-out)}
.sh-clash .sh-who{display:block;margin-bottom:2px}
.sh-clash .sh-gotit{flex:none;align-self:center}
.rgrid tr.rg-bandrow td.rg-bandday{text-align:center;font-size:12px;white-space:nowrap}
/* A person's week, under their name — the name column stays put while the days scroll. */
.rg-person .rg-hrs{display:block;font-size:12px;font-weight:800;color:var(--ink);font-variant-numeric:tabular-nums;margin:1px 0}
.rg-person{display:flex;align-items:center;gap:7px}
.rg-person .ava{width:26px;height:26px;font-size:13px;flex:none}
.rg-person b{display:block;font-size:12.5px}
.rg-person .faint{font-size:12px}
.rg-chip{display:inline-flex;align-items:center;gap:5px;margin:2px;padding:3px 8px;border-radius:8px;font-weight:700;white-space:nowrap;border:1px solid;cursor:grab;line-height:1.3}
.rg-chip .rg-x{cursor:pointer;opacity:.5;font-weight:800}
.dr-on .rg-chip{cursor:pointer}
.rg-chip .rg-x:hover{opacity:1}
.rg-empty{color:var(--ink-faint);font-size:12px}
/* What the person said they can work that day, above any shift in the cell. */
.rg-av{display:block;font-size:12px;line-height:1.3;margin-bottom:3px;white-space:nowrap;font-variant-numeric:tabular-nums}
.rg-av i{font-style:normal;opacity:.8}
.rg-av.ok{color:var(--violet)}   /* not green: green is the front-of-house shifts */
.rg-av.off{color:var(--ink-faint)}
/* The roster by shift: how many are on, against how many were asked for, and who. */
.sl-grid td.sl-cell{vertical-align:top}
.sl-count{font-size:13px;margin-bottom:5px;font-variant-numeric:tabular-nums}
.sl-count b{font-size:17px}
.sl-count span{color:var(--ink-faint)}
.sl-cell.short .sl-count b{color:var(--red)}
.sl-grid td.sl-off{color:var(--ink-faint);text-align:center;background:var(--paper-2);cursor:default}
.sl-who{display:inline-block;margin:0 4px 4px 0;padding:2px 8px;border-radius:999px;border:1px solid;font-size:12px;font-weight:600;white-space:nowrap}
.sl-key{display:inline-block;width:9px;height:9px;border-radius:50%;margin:0 4px 0 10px;vertical-align:0}
/* Shift times: one shift a block — its name, then when it starts and ends. */
.slot-edit{padding:10px 0 12px;border-bottom:1px solid var(--line-2);margin-bottom:10px}
.slot-for{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;font-size:12.5px}
.chip-toggle{border:1px solid var(--line-2);background:var(--card);color:var(--ink-soft);border-radius:999px;padding:4px 11px;font-size:12.5px;font-weight:600;cursor:pointer}
.chip-toggle.on{background:var(--gc, var(--accent));border-color:var(--gc, var(--accent));color:#fff}
/* AI auto-roster at work: the button spins and the roster is covered. */
@keyframes spinner{to{transform:rotate(360deg)}}
.spinner{display:inline-block;width:15px;height:15px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spinner .7s linear infinite;vertical-align:-2px}
#rsAuto:disabled{opacity:1;cursor:progress}
.card:has(> .rg-busy){position:relative}
.rg-busy{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;gap:10px;border-radius:inherit;
  background:color-mix(in srgb, var(--card) 78%, transparent);color:var(--ink);font-size:15px}
.rg-busy .spinner{width:22px;height:22px;color:var(--accent)}
.rs-done{margin:0 4px 12px}

/* ---------- week switcher ---------- */
/* nowrap: the arrows are square and fixed, the week label takes what is left.
   With flex-wrap the two text pills queued up and folded onto three rows. */
.weekbar{display:flex;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);
  border-radius:var(--radius);padding:10px 14px;margin-bottom:4px}
.weekbar-arrow{width:48px;min-width:48px;padding:0;flex-shrink:0}
.weekbar-arrow .ic{width:20px;height:20px}
.weekbar-mid{flex:1;min-width:0;text-align:center;line-height:1.35}
.weekbar-mid b{display:block;font-size:15px}
.weekbar-mid .faint{font-size:12px}

/* ---------- skills ---------- */
.skill-row{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line-2)}
.skill-row:last-child{border-bottom:none}
.skill-row>b{min-width:110px;font-size:14px;padding-top:5px}
.skill-chip{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--ink-soft);
  border:1px solid var(--line);background:var(--card);border-radius:999px;padding:6px 11px;min-height:36px;cursor:pointer;white-space:nowrap}
.skill-chip input{width:16px;height:16px;margin:0}
.skill-chip:has(input:checked){border-color:var(--accent);background:var(--accent-soft);color:var(--accent-ink)}

/* ---------- SOP steps ---------- */
.sop-video{position:relative;padding-top:56.25%;border-radius:12px;overflow:hidden;background:#000}
.sop-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.sop-steps{margin:14px 0 0;padding-left:22px;display:flex;flex-direction:column;gap:10px}
.sop-steps li{font-size:14.5px;line-height:1.6;padding-left:4px}
.sop-steps li::marker{font-weight:800;color:var(--accent)}

/* ==========================================================================
   Fluid layout — the app should be usable at any window width, not just at
   the two old breakpoints. Grids reflow on available space, the sidebar
   narrows before it disappears, and nothing pushes the page sideways.
   ========================================================================== */
/* Only the body: an overflow on <html> stops it propagating to the viewport and
   hands the scrolling to <body> instead. See the html/body rules at the top. */
body{overflow-x:hidden}
img,svg,video{max-width:100%}
.content{max-width:min(1180px, 100%)}
/* The roster is seven days wide: on a big screen it takes the whole width
   rather than a 1180px column that has to be scrolled sideways. */
.content:has(#rosterGrid), .content:has(> .home-split){max-width:none}   /* the roster and the home use the whole width */
/* Break only words that genuinely don't fit — never mid-word on ordinary text. */
.card,.li,.alert,.aa-msg{overflow-wrap:break-word}
.dtable td,.dtable th{overflow-wrap:normal}
.section-head{flex-wrap:wrap;gap:12px}

/* Stat/tile grids size themselves to the space they're given rather than to a
   fixed column count, so every width in between the breakpoints looks right. */
@media(min-width:521px){
  .g2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
  .g3{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
  .g4{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
}

/* Tablet / small laptop: keep the sidebar, just make it slimmer. */
@media(min-width:721px) and (max-width:1180px){
  :root{--sidebar:210px}
  .nav-item{font-size:13.5px;gap:9px;padding:10px}
  .content{padding:20px}
  .topbar{padding:12px 20px}
}
/* Narrow desktop windows: collapse to an icon rail rather than squeezing the
   labels into an unreadable column. Nav labels are bare text nodes, so they are
   hidden with font-size:0 and the icon's size is restored on the child.
   Every rule is skipped once the owner has pressed » to keep the menu open
   (body.side-full) — an explicit choice always beats the automatic one. */
@media(min-width:721px) and (max-width:1000px){
  body:not(.side-full){--sidebar:72px}
  body:not(.side-full) .sidebar{padding:16px 8px;align-items:center;overflow-x:hidden}
  body:not(.side-full) .nav-item{position:relative;justify-content:center;padding:11px 0;width:100%;font-size:0;gap:0}
  /* Folded to an icon rail there is no room for the word — the rule stays. */
  body:not(.side-full) .nav-sep{font-size:0;margin:12px 6px 8px;padding-top:10px}
  body:not(.side-full) .nav-item .em{font-size:18px;width:auto}
  body:not(.side-full) .nav-item .badge{position:absolute;top:4px;right:8px;font-size:12px;padding:0 5px;min-width:16px}
  body:not(.side-full) .side-brand{padding:6px 0 16px;justify-content:center}
  body:not(.side-full) .side-brand div{display:none}
  body:not(.side-full) .side-foot .who div{display:none}
  body:not(.side-full) .side-foot .who{justify-content:center}
  body:not(.side-full) .side-foot .row{flex-direction:column;gap:6px}
  body:not(.side-full) .side-foot .btn{font-size:0;padding:0;min-width:44px}
  /* The label is hidden with font-size:0, so the folded button needs a glyph of
     its own. ::first-letter can't supply one — these buttons are flex
     containers and ::first-letter only applies to block containers, which left
     them rendering as two blank pills. */
  body:not(.side-full) #pwBtn::before{content:'🔑';font-size:15px}
  body:not(.side-full) #logoutBtn::before{content:'⏻';font-size:16px;font-weight:700}
  /* Explicitly opened at this width: the labels come back and the content just
     gets a little narrower. */
  body.side-full{--sidebar:210px}
  body.side-full .nav-item{font-size:13.5px;gap:9px;padding:10px}
}
@media(max-width:720px){
  /* The bar used to be 90px of a 812px screen carrying one clipped marketing
     line. It is now the iOS pattern: a slim persistent title, with the page's
     own large heading scrolling underneath it. */
  .topbar{min-height:52px;padding:8px 14px;gap:10px}
  .topbar h1{font-size:17px}
  .weekbar{padding:10px}
  .modal{width:min(560px,94vw)}
}
@media(max-width:520px){
  .content{padding:16px 12px 90px}
  .section-head h2{font-size:20px}
  .stat .v{font-size:25px}
  /* Only once they actually scroll do the two chip rows get their edge fade —
     a tab or a category clipped mid-word otherwise reads as a rendering fault. */
  /* Every tab and category on show: a row that scrolls sideways hid half the
     Stock tabs and the category Edit button, with nothing to say they were there. */
  .tabbar,.catbar{flex-wrap:wrap;overflow:visible}
  .tabbar .tab{padding:10px 12px;font-size:13px}
  /* Switch + primary + ⋯ come to 364px at 375px wide, so the menu dropped to a
     line of its own. Eight pixels off each side of the switch and they fit. */
  .viewswitch button{padding:0 11px}
  .omenu>summary{padding:0 11px}
  .skill-row>b{min-width:100%}
}

/* ---------- local preview entry on the login page ---------- */
.preview-box{margin-top:14px;padding:14px 16px;border:1px dashed var(--line);border-radius:16px;background:var(--paper-2)}
.preview-box b{font-size:13.5px;display:block}
.preview-box p{font-size:12.5px;color:var(--ink-soft);margin:4px 0 10px;line-height:1.5}
.preview-box .btn{flex:1;min-width:96px}

/* ===== The row of ways to show one screen (Blocks / Floor / List) ===== */
.home-switch{display:flex;justify-content:flex-end;margin-bottom:4px}
.viewswitch{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;background:var(--card);flex-shrink:0}
.viewswitch button{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:13.5px;font-weight:600;color:var(--ink-soft);padding:0 14px;min-height:48px;line-height:1;white-space:nowrap;transition:background .2s,color .2s}
.viewswitch button .ic{width:17px;height:17px}
.viewswitch button.on{background:var(--ink);color:var(--paper)}

/* A docket can take as many photos as it takes: two pages of invoice and a
   picture of the broken crate is three, and picking one of them is how the
   evidence for a claim goes missing. */
.shots{display:flex;flex-wrap:wrap;gap:8px;padding:8px;border:1px dashed var(--line);
  border-radius:var(--radius);background:var(--paper-2);min-height:66px;align-items:center}
.shots.needs{border-color:var(--red);background:var(--red-soft)}
.shot{position:relative;width:74px;height:74px;flex:none}
.shot img{width:100%;height:100%;object-fit:cover;border-radius:10px;display:block}
.shot-x{position:absolute;top:-7px;right:-7px;width:24px;height:24px;border-radius:999px;
  background:var(--ink);color:var(--paper);font-size:15px;line-height:1;
  display:grid;place-items:center;border:2px solid var(--paper);box-shadow:var(--shadow-soft)}
.shot-empty{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink-faint);padding:0 4px}
.shot-empty .ic{width:16px;height:16px}

/* Waiting deliveries, grouped by week. The date column is the point of the
   block, so it leads the row instead of hiding in the second line. */
.dlv-week + .dlv-week{margin-top:10px}
.dlv-week-head{display:flex;align-items:baseline;gap:8px;padding:10px 0 2px;
  font-size:13px;font-weight:800;letter-spacing:-.01em}
.dlv-week-head span{font-size:12px;font-weight:600;color:var(--ink-faint)}
.dlv-week-head.late{color:var(--red)}
.dlv-when{flex:none;min-width:92px;font-size:12.5px;font-weight:700;line-height:1.25;color:var(--ink-soft)}
.dlv-when i{display:block;font-style:normal;font-size:12px;font-weight:600;color:var(--ink-faint)}
.dlv-when.now{color:var(--accent-ink)}
.dlv-when.late{color:var(--red)}
/* The check-in sheet's top: move the day, or drop the order. */
.dlv-plan{border:1px solid var(--line);border-radius:14px;padding:10px 12px 8px;margin-bottom:12px}
.dlv-plan-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
.dlv-plan-row .field{margin:0;flex:1 1 140px;min-width:0}
.dlv-plan-del{color:var(--red);margin-left:auto}
.dlv-plan-why{font-size:12px;margin-top:6px}
/* Item form: pick the item's icon. */
.emo-pick{display:flex;flex-wrap:wrap;gap:6px;max-height:132px;overflow-y:auto;padding:2px}
.emo-chip{flex:none;width:40px;height:40px;border-radius:11px;border:1px solid var(--line);background:var(--card);font-size:21px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0}
.emo-chip.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.emo-auto{width:auto;padding:0 10px;display:flex;gap:6px;align-items:center}
.emo-auto i{font-style:normal;font-size:12.5px;font-weight:700;color:var(--ink-soft)}
.emo-type-row{margin-top:8px;width:100%}
.emo-type{width:100%;text-align:center;font-size:15px}
.emo-type.bad{border-color:var(--red);box-shadow:0 0 0 2px color-mix(in srgb, var(--red) 25%, transparent)}
.sc-pic-btn{border:0;padding:0;cursor:pointer;font:inherit;font-size:24px;color:inherit}
.sc-pic-btn:active{transform:scale(.94)}
.ico-sheet{display:flex;flex-direction:column;align-items:center;gap:10px}
.ico-now{width:88px;height:88px;border-radius:18px;background:var(--paper-2);display:grid;place-items:center;font-size:44px;overflow:hidden}
.ico-now img{width:100%;height:100%;object-fit:cover}
.ico-name{font-weight:700;text-align:center}
.ico-name .nm-sub{display:block;font-weight:500;font-size:13px;color:var(--ink-faint)}
.ico-photo{justify-content:center}
.ico-or{font-size:12.5px;margin-top:4px}
.ico-grid{max-height:none;justify-content:center}
.itm-del,.sheet-del{margin-top:22px;padding-top:14px;border-top:1px solid var(--line);display:flex;justify-content:center}
.itm-del .btn,.sheet-del .btn{color:var(--red)}
.itm-del{gap:10px;flex-wrap:wrap}
.gst-line{margin:-6px 0 12px;font-size:13px;line-height:1.6}
/* GST: three equal columns that never wrap. Wrapped onto a second row, the
   sliding thumb (one row only) covered both rows as one big blob; now a long
   label breaks into two lines inside its own column instead. */
.viewswitch.gst-pick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;border-radius:18px}
.viewswitch.vs-fit.gst-pick > button{display:flex;align-items:center;justify-content:center;text-align:center;
  white-space:normal;overflow:visible;line-height:1.25;min-height:52px;padding:6px 8px;border-radius:15px;font-size:13px}
.viewswitch.gst-pick > .vs-thumb{border-radius:15px}
.gst-mark{font-style:normal;font-size:10.5px;font-weight:700;padding:0 5px;border-radius:999px;background:var(--amber-soft);color:var(--amber-ink);white-space:nowrap}
.itm-del .btn.itm-dup{color:var(--ink-soft)}
.cm-empties{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0 10px;font-size:13px}
.cm-empties .btn{color:var(--red)}
/* Internal / external supplier: a small coloured tag after the name. */
/* Tags: one look for all of them (分类, 内部/外部, 短期/中期/长期, 肉商…);
   the colour is automatic or picked, and a tap changes it. */
.tagc{display:inline-flex;align-items:center;flex:none;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:700;line-height:1.55;vertical-align:middle;white-space:nowrap;cursor:pointer;font-style:normal}
.tagc-green{background:var(--green-soft);color:var(--green-ink)}
.tagc-blue{background:var(--blue-soft);color:var(--blue-ink)}
.tagc-amber{background:var(--amber-soft);color:var(--amber-ink)}
.tagc-teal{background:var(--teal-soft);color:var(--teal)}
.tagc-violet{background:var(--violet-soft);color:var(--violet)}
.tagc-red{background:var(--red-soft);color:var(--red-ink)}
.tagc-grey{background:var(--paper-2);color:var(--ink-soft)}
.sup-scope{margin-left:6px}
.kind-tag{margin-right:6px}
.cat-head-tag{font-size:13px;padding:2px 10px}
.cat-mgr-tag{font-size:13.5px;padding:2px 10px}
.skind-tag{margin-right:2px}
.tag-sheet-now{display:flex;justify-content:center;padding:6px 0 14px}
.tag-sheet-now .tagc{font-size:16px;padding:4px 14px}
.tag-swatches{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.tag-sw{border:1px solid var(--line);background:var(--card);border-radius:12px;padding:8px 10px;cursor:pointer}
.tag-sw.on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
.tag-sw .tagc{font-size:13px;pointer-events:none}
.cat-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;vertical-align:middle}
.cat-dot.tagc-green{background:var(--green)}.cat-dot.tagc-blue{background:var(--blue)}.cat-dot.tagc-amber{background:var(--amber)}
.cat-dot.tagc-teal{background:var(--teal)}.cat-dot.tagc-violet{background:var(--violet)}.cat-dot.tagc-red{background:var(--red)}.cat-dot.tagc-grey{background:var(--ink-faint)}
.sup-scope-pick button{gap:6px}
.sup-scope-pick .sup-scope{margin-left:0}
/* Item form: shelf life beside its unit; the type above flashes when it follows. */
.sl-row #i_sl{flex:1;min-width:0}
.sl-row #i_slU{flex:none;width:auto}
.sl-hint{font-size:12px;margin-top:5px;line-height:1.45}
#i_k.flash{animation:kindflash .9s var(--ease-out)}
@keyframes kindflash{0%{box-shadow:0 0 0 3px var(--accent)}100%{box-shadow:0 0 0 0 transparent}}
/* Splitting one category into two. */
.split-names{display:flex;gap:10px}
.split-names .field{flex:1;min-width:0;margin-bottom:8px}
.split-count{font-size:13px;margin-bottom:8px}
.split-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.split-row.unsure .split-nm{color:var(--amber)}
.split-pic{flex:none;width:34px;height:34px;border-radius:9px;background:var(--paper-2);display:grid;place-items:center;font-size:18px;overflow:hidden}
.split-pic img{width:100%;height:100%;object-fit:cover}
.split-nm{flex:1;min-width:0;font-size:14px;line-height:1.25}
.split-nm .nm-sub{display:block;font-weight:500;font-size:12px;color:var(--ink-faint)}
.split-seg{flex:none;display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.split-seg button{border:0;background:transparent;color:var(--ink-soft);font:inherit;font-size:13px;font-weight:600;padding:6px 11px;cursor:pointer}
.split-seg button.on{background:var(--accent);color:var(--paper)}
@media(max-width:560px){ .dlv-when{min-width:74px;font-size:12px} }

/* ===== Calendar (owner) =====
   A month you can read at arm's length. The grid is the whole page: no side
   panel, no agenda column — a cell is a day, a chip is a thing happening, and
   tapping the number puts something new on that day. */
.cal-bar{display:flex;align-items:center;gap:8px;margin:16px 0 10px}
.cal-title{font-family:"Playfair Display",serif;font-size:22px;font-weight:900;letter-spacing:-.01em;
  min-width:190px;text-align:center}
.cal-bar #calToday{margin-left:auto}
/* The calendars, as a phone's calendar app lists them: a tick in each one's
   own colour shows it, an empty box hides it. */
.cal-layers{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0 2px 12px}
.cal-layer{display:inline-flex;align-items:center;gap:7px;padding:4px 0;border:0;background:none;font:inherit;
  font-size:13px;font-weight:600;color:var(--ink);cursor:pointer}
.cal-layer i{width:18px;height:18px;border-radius:5px;display:grid;place-items:center;flex:none;
  border:2px solid var(--tone,var(--line));background:transparent;color:#fff;transition:background .15s}
.cal-layer i .ic{width:12px;height:12px;opacity:0}
.cal-layer.on i{background:var(--tone,var(--accent))}
.cal-layer.on i .ic{opacity:1}
.cal-layer:not(.on) span{color:var(--ink-faint)}

.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--line);
  border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-soft)}
.cal-dow{background:var(--paper-2);padding:8px 10px;font-size:12px;font-weight:800;letter-spacing:.05em;
  text-transform:uppercase;color:var(--ink-faint)}
.cal-cell{background:var(--card);min-height:116px;padding:6px 6px 8px;display:flex;flex-direction:column;gap:4px;
  /* Grid items refuse to shrink under their content by default, which on a
     phone pushed Saturday and Sunday off the edge of the month. */
  min-width:0}
.cal-off{background:var(--paper-2)}
/* Today is a ring on the date, not a tinted cell: a whole coloured column reads
   as "something is wrong here" on a calendar. */
.cal-cell.is-today .cal-day{background:var(--ink);color:var(--paper)}
.cal-day{align-self:flex-start;min-width:26px;height:26px;border-radius:50%;font:inherit;font-size:13px;
  font-weight:700;color:var(--ink-soft);display:grid;place-items:center;
  transition:background .16s,color .16s}
@media (hover:hover) and (pointer:fine){ .cal-day:hover{background:var(--paper-2);color:var(--ink)} }
.cal-items{display:flex;flex-direction:column;gap:3px;overflow:hidden}
.cal-chip{display:flex;align-items:center;gap:5px;width:100%;min-width:0;padding:3px 6px;border-radius:7px;
  font:inherit;font-size:12px;font-weight:700;line-height:1.3;text-align:left;color:var(--tone,var(--ink));
  background:var(--tone-soft,var(--paper-2));border:1px solid transparent;transition:border-color .16s}
.cal-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.cal-chip .ic{width:12px;height:12px;flex:none}
.cal-more{align-self:flex-start;padding:1px 7px;border-radius:999px;border:0;background:var(--paper-2);
  color:var(--ink-soft);font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.cal-dayall{display:flex;flex-direction:column;gap:6px}
.cal-dayall .cal-chip{font-size:14px;padding:8px 10px}
.cal-dayall .cal-chip span{white-space:normal;-webkit-line-clamp:unset;display:block}
.cal-dayall .cal-chip .ic{display:block;width:16px;height:16px}
@media (hover:hover) and (pointer:fine){ .cal-chip:hover{border-color:var(--tone,var(--line))} }

/* On a phone seven columns of 116px is a wall of nothing. Keep the grid — the
   month shape is the point — but let a day be as tall as what's in it. */
@media(max-width:700px){
  .cal-cell{min-height:74px;padding:4px 3px 6px}
  .cal-day{min-width:22px;height:22px;font-size:12px}
  .cal-chip{padding:2px 4px;font-size:12px;gap:3px}
  .cal-chip .ic{display:none}
  .cal-dow{padding:6px 4px;font-size:12px;text-align:center}
  .cal-title{font-size:18px;min-width:0;flex:1}
  /* The calendars to show or hide: one row that slides sideways, not three
     rows of ticks above the month. */
  .cal-layers{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -16px 10px;padding:0 16px;gap:6px 12px}
  .cal-layers::-webkit-scrollbar{display:none}
  .cal-layer{flex:none;white-space:nowrap}
}

/* ===== The restaurant floor (owner home) =====
   Rooms you walk into instead of a list you read. Flat vector, no assets. */
:root{
  --fp-floor:#E8DFCC; --fp-floor-2:#DFD4BD; --fp-wall:#3C4A3E;
}
.fp-hello{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-top:8px}
.fp-hello h2{font-size:30px;line-height:1.15;letter-spacing:-.02em}
.fp-hello .fp-count{font-size:15px;color:var(--ink-soft);margin-top:6px;font-weight:600}
.fp-hello .btn{margin-left:auto}

/* progress across the six rooms */
.fp-prog{margin-top:16px;padding:14px 18px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.fp-prog-copy{display:flex;align-items:baseline;gap:10px;flex-shrink:0}
.fp-prog-copy span{font-size:12.5px;color:var(--ink-soft)}
.fp-prog-copy strong{font-size:17px}
.fp-prog-track{flex:1;min-width:140px;height:9px;border-radius:999px;background:var(--paper);overflow:hidden}
.fp-prog-track span{display:block;height:100%;border-radius:999px;
  background:linear-gradient(90deg,var(--accent),#E4A15C);transition:width .7s var(--ease-out)}
.fp-prog-goal{font-size:12px;color:var(--ink-faint);flex-shrink:0}

/* the room itself */
/* A quiet tile grid, not a 45° chequerboard — the chequer reads as the
   transparency placeholder every image editor uses, i.e. as a broken asset. */
.fp-floor{position:relative;margin-top:16px;padding:68px 20px 30px;border-radius:var(--radius-lg);
  border:5px solid var(--fp-wall);
  background-color:var(--fp-floor);
  background-image:
    repeating-linear-gradient(90deg,var(--fp-floor-2) 0 1px,transparent 1px 46px),
    repeating-linear-gradient(0deg,var(--fp-floor-2) 0 1px,transparent 1px 46px);
  box-shadow:var(--shadow)}
.fp-floor-label{position:absolute;top:14px;left:18px;right:18px;max-width:max-content;background:var(--card);border-radius:14px;
  padding:8px 14px;box-shadow:var(--shadow-soft);line-height:1.3}
.fp-floor-label span{display:block;font-size:13.5px;font-weight:700}
.fp-floor-label small{font-size:12px;color:var(--ink-soft)}

.fp-rooms{display:grid;grid-template-columns:repeat(3,1fr);gap:122px 18px}

/* a room card */
.rm{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  min-height:132px;padding:16px 12px;border-radius:16px;text-align:center;
  background:var(--card);border:2px solid var(--line);
  transition:transform .18s var(--ease-out), box-shadow .2s, border-color .2s}
.rm b{font-size:14.5px;font-weight:700}
.rm small{font-size:12px;color:var(--ink-soft)}
/* Same icon chip as the room's block on the home screen — one module, one look. */
.rm-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;margin-bottom:3px;
  background:var(--tone-soft,var(--paper-2));color:var(--tone,var(--ink))}
.rm-ic .ic{width:23px;height:23px}
.rm:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){ .rm:hover{transform:translateY(-2px);box-shadow:var(--shadow)} }
/* a room that wants you gets its own colour on the wall; a clear one goes quiet */
.rm-live{border-color:color-mix(in srgb,var(--tone,var(--accent)) 55%,transparent)}
.rm-done{opacity:.75}
.rm-done .rm-ic{background:var(--paper-2);color:var(--ink-faint)}
/* Three states, the same three the home blocks use: clear · worth a look ·
   do it today. Never the room's own colour — that is identity, not status. */
.rm-badge{position:absolute;top:-11px;right:-9px;min-width:26px;height:26px;padding:0 7px;border-radius:999px;
  color:#fff;font-size:13px;font-weight:800;line-height:26px;text-align:center;
  box-shadow:0 2px 6px -1px rgba(33,30,27,.35)}
.rm-badge .ic{width:15px;height:15px;stroke-width:3;vertical-align:middle;margin-top:-2px}
.rm.is-ok .rm-badge,.rm-badge.ok{background:var(--green)}
.rm.is-warm .rm-badge{background:var(--amber);color:#4a3405}
.rm.is-hot .rm-badge{background:var(--red)}

/* the boss stands in the middle and points at the first room */
.fp-boss{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  display:flex;flex-direction:column;align-items:center;pointer-events:none;z-index:2}
.fp-think{background:var(--card);border-radius:999px;padding:6px 14px;font-size:12px;font-weight:600;
  box-shadow:var(--shadow-soft);white-space:nowrap;max-width:270px;overflow:hidden;text-overflow:ellipsis;
  margin-bottom:6px;animation:fpBob 3.2s var(--ease-in-out) infinite}
@keyframes fpBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
.fp-body{display:flex;align-items:center;justify-content:center;width:52px;height:38px;margin-top:-2px;
  border-radius:12px 12px 8px 8px;background:var(--fp-wall);color:var(--paper);
  font-size:12px;font-weight:800;letter-spacing:.06em;
  box-shadow:0 6px 12px -6px rgba(33,30,27,.5)}
/* the one line of context under the floor */
.fp-insight{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:16px;padding:16px 18px;
  border-radius:var(--radius);background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow-soft)}
.fp-insight-ic{flex-shrink:0;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;
  background:var(--accent-soft);color:var(--accent-ink)}
.fp-insight-ic .ic{width:20px;height:20px}

/* Legal/plumbing copy that has to exist but does not have to be on the home
   screen every single visit. */
.disclaimer-fold{font-size:12.5px;color:var(--ink-soft);background:var(--paper-2);
  border:1px dashed var(--line);border-radius:12px;padding:10px 14px}
.disclaimer-fold summary{cursor:pointer;font-weight:600;list-style:none}
.disclaimer-fold summary::-webkit-details-marker{display:none}
.disclaimer-fold summary::after{content:' ›';display:inline-block;transition:transform .2s}
.disclaimer-fold[open] summary::after{transform:rotate(90deg)}
.disclaimer-fold p{margin-top:8px;line-height:1.55}
.fp-insight div{flex:1;min-width:200px}
.fp-insight b{font-size:13.5px}
.fp-insight p{font-size:13px;color:var(--ink-soft);margin-top:3px;line-height:1.5}

@media(max-width:720px){
  .fp-hello h2{font-size:24px}
  .fp-hello .btn{margin-left:0;width:100%}
  .fp-floor{padding:86px 14px 26px}
  .fp-rooms{gap:112px 12px}
}
@media(max-width:560px){
  .fp-rooms{grid-template-columns:repeat(2,1fr);gap:14px}
  .rm{min-height:112px;padding:14px 8px}
  .rm b{font-size:13px}
  .rm small{font-size:12px}
  .rm-em{font-size:23px}
  /* two columns leaves no middle aisle — the boss stands at the door instead */
  .fp-boss{position:static;transform:none;flex-direction:row;align-items:center;gap:10px;
    margin-top:18px;justify-content:center}
  .fp-think{margin-bottom:0;order:3;max-width:none}
  .fp-body{width:40px;height:30px;margin-top:0}
  .fp-deco{display:none}
  .fp-prog-goal{display:none}
}

/* ==========================================================================
   Collapsible sidebar
   The « button folds the menu down to an icon rail and back. It's a per-device
   preference, not a per-page one: the class is set on <body> before the shell
   paints, so the menu never renders wide and then snaps narrow.
   Below 881px the sidebar is replaced by the bottom bar, so the button goes.
   ========================================================================== */
.side-toggle{margin-left:auto;flex:none;width:28px;height:28px;border-radius:9px;
  border:1px solid var(--line);background:var(--card);color:var(--ink-soft);
  display:grid;place-items:center;transition:background .15s,color .15s,border-color .15s}
.side-toggle::before{content:'«';font-size:14px;font-weight:800;line-height:1}
.side-toggle:hover{background:var(--ink);color:var(--paper);border-color:var(--ink)}
body.side-mini .side-toggle::before{content:'»'}

@media(min-width:721px){
  body.side-mini{--sidebar:76px}
  body.side-mini .sidebar{padding:16px 8px;align-items:center;overflow-x:hidden}
  body.side-mini .side-brand{flex-direction:column;gap:9px;padding:6px 0 14px;justify-content:center}
  body.side-mini .side-brand div{display:none}
  body.side-mini .side-toggle{margin:0}
  /* Same trick as the automatic rail above: the nav label is a bare text node. */
  body.side-mini .nav-item{position:relative;justify-content:center;padding:11px 0;width:100%;font-size:0;gap:0}
  body.side-mini .nav-sep{font-size:0;margin:12px 6px 8px;padding-top:10px}
  body.side-mini .nav-item .em{font-size:18px;width:auto}
  body.side-mini .nav-item .badge{position:absolute;top:4px;right:8px;font-size:12px;padding:0 5px;min-width:16px}
  body.side-mini .side-foot .who div{display:none}
  body.side-mini .side-foot .who{justify-content:center}
  body.side-mini .side-foot .row{flex-direction:column;gap:6px}
  body.side-mini .side-foot .btn{font-size:0;padding:0;min-width:44px}
  /* Same as the automatic rail: a glyph via ::before, because ::first-letter
     does nothing on a flex container. */
  body.side-mini #pwBtn::before{content:'🔑';font-size:15px}
  body.side-mini #logoutBtn::before{content:'⏻';font-size:16px;font-weight:700}
}
@media(max-width:720px){ .side-toggle{display:none} }

/* ==========================================================================
   Home tiles — the springboard
   Every page in the app as a tile the owner can add, drop and re-order, the
   way a tablet home screen works. Edit mode wobbles the tiles and puts a −
   on each one; the rest of the time a tile is just a big tap target.
   ========================================================================== */
.tiles-wrap{margin-top:8px}
/* Greeting, today's count and Edit on one line — the springboard used to stack
   a greeting, a "Your home screen" heading and a hint before the first block. */
/* The greeting can sit on a photo of the venue's own kitchen. With no photo
   this is the plain two-line header it has always been — the band only exists
   once somebody uploads one. */
.tiles-head{display:flex;align-items:flex-end;gap:12px;margin-bottom:16px}
.tiles-head.has-hero{position:relative;overflow:hidden;border-radius:var(--radius-lg);
  padding:26px 22px;min-height:150px;align-items:flex-end;
  background:var(--paper-2);box-shadow:var(--shadow-soft)}
.tiles-head.has-hero::before{content:"";position:absolute;inset:0;z-index:0;
  background-image:var(--hero);background-size:cover;background-position:center}
/* The text has to stay readable over whatever photo they picked, so the page
   colour is washed across it from the left rather than dimming the whole image. */
.tiles-head.has-hero::after{content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(90deg,var(--paper) 8%,color-mix(in srgb,var(--paper) 72%,transparent) 46%,transparent 92%)}
.tiles-head.has-hero>*{position:relative;z-index:2}
@media(max-width:560px){
  .tiles-head.has-hero{padding:18px 16px;min-height:132px}
  .tiles-head.has-hero::after{background:linear-gradient(90deg,var(--paper) 20%,color-mix(in srgb,var(--paper) 82%,transparent) 70%,color-mix(in srgb,var(--paper) 40%,transparent) 100%)}
}
.tiles-head h2{font-size:30px;line-height:1.15;letter-spacing:-.02em}
.tiles-head .fp-count{font-size:15px;color:var(--ink-soft);margin-top:6px;font-weight:600}
.tiles-head .btn{margin-left:auto;flex:none}
@media(max-width:560px){ .tiles-head h2{font-size:24px} .tiles-head .fp-count{font-size:13.5px} }

/* Two up on a phone, so a block is a comfortable thumb target and has room for
   its own status line — a 4-across springboard of tiny icons reads as a launcher,
   not as the six things the venue has to get done today. */
.tiles-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;align-items:stretch;max-width:1160px}
.tile{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:10px;
  padding:16px 16px 14px;min-height:132px;border-radius:var(--radius-lg);text-align:left;
  background:var(--card);border:1px solid var(--line);box-shadow:var(--shadow-soft);
  font:inherit;color:inherit;-webkit-tap-highlight-color:transparent;
  transition:transform .18s var(--ease-out),box-shadow .18s,border-color .2s}
.tile-ic{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;
  background:var(--tone-soft,var(--paper-2));color:var(--tone,var(--ink));flex-shrink:0}
.tile-ic .ic{width:26px;height:26px}
.tile-label{font-size:15px;font-weight:700;line-height:1.25}
/* The number is the thing you cross the kitchen to read, so it gets the size and
   a line of its own; the unit under it says what it counts. "All clear" is a
   real state and takes the same slot rather than leaving a hole. */
.tile-n{margin-top:auto;font-size:30px;font-weight:900;font-family:"Playfair Display",serif;
  line-height:1.05;letter-spacing:-.01em}
.tile-unit{font-size:12.5px;font-weight:600;color:var(--ink-soft);line-height:1.2;margin-top:3px}
.tile-n.tile-ok{font-size:24px;color:var(--green);margin-bottom:18px}
.tile-n.tile-quiet{font-size:22px;color:var(--ink-soft)}
/* Who is on today, on the roster block: round faces, overlapping a little. */
.tile-crew{margin-top:auto;display:flex;gap:4px;padding-right:18px;max-width:100%;overflow:hidden}
/* Each face with the person's first name small under it, so the block says
   who, not just how many. */
.tile-mate{display:flex;flex-direction:column;align-items:center;gap:2px;width:34px;flex:none}
.tile-mate small{font-size:12px;font-weight:700;color:var(--ink-soft);line-height:1.1;max-width:100%;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tile-face{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;flex:none;
  background:var(--tone-soft,var(--accent-soft));color:var(--tone,var(--accent-ink));
  font-size:13.5px;font-weight:800;border:2px solid var(--card)}
.tile-face .ravatar{width:100%;height:100%}
/* Role avatars (MKR.ui.roleAvatar): the figure and its circle take the
   person's roster-group colours; the shirt, hat and apron are white. */
.ravatar{display:inline-block;width:32px;height:32px;border-radius:50%;overflow:hidden;flex:none;vertical-align:middle}
.ravatar svg{display:block;width:100%;height:100%}
.ravatar .ra-b{fill:var(--ra-b)} .ravatar .ra-f{fill:var(--ra-f)} .ravatar .ra-w{fill:#FFFFFF}
.ravatar .ra-hat{stroke:var(--ra-f);stroke-width:.9}
.ravatar .ra-s{fill:none;stroke:var(--ra-f);stroke-width:1.4;stroke-linecap:round}
.ravatar .ra-ws{fill:none;stroke:#FFFFFF;stroke-width:1.6;stroke-linecap:round}
.rg-person .ravatar{width:32px;height:32px}
/* Skills as words under a name on the roster ("Opens", "Closes"). */
.rg-tags{display:flex;flex-wrap:wrap;gap:3px;margin-top:3px}
.skill-tag{font-size:12px;font-weight:600;line-height:1.5;padding:0 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent-ink);white-space:nowrap}
.tile-face.tile-more{background:var(--paper-2);color:var(--ink-soft);font-size:12.5px}
/* A card with a number on it is not obviously a door. The chevron is the whole
   difference between "here is a statistic" and "tap here to deal with it". */
.tile-go{position:absolute;right:14px;bottom:20px;font-size:20px;line-height:1;
  color:var(--ink-faint);transition:transform .18s var(--ease-out),color .18s}
.tile:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){ .tile:hover .tile-go{transform:translateX(3px);color:var(--tone,var(--ink-soft))} }
.tile-n,.tile-unit{padding-right:20px}

/* Under the blocks: what today looks like on the left, the verbs on the right.
   The blocks say what needs you; these two say what is going on and what you
   can start. */
.home-panels{display:grid;gap:16px;max-width:1160px;margin-top:16px}
.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);padding:15px 18px 8px}
.panel-head{font-size:15px;font-weight:800;letter-spacing:-.01em;margin-bottom:2px}

/* Across, not down: five short columns read in one sweep where five stacked
   rows made the owner scan a list to find the one number they came for. */
.ov-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));padding:8px 0 14px}
.ov{display:flex;align-items:center;gap:12px;padding:8px 16px 8px 0;color:inherit}
.ov+.ov{border-left:1px solid var(--line-2);padding-left:16px}
.ov-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;flex:none;
  background:var(--tone-soft,var(--paper-2));color:var(--tone,var(--ink))}
.ov-ic .ic{width:22px;height:22px}
.ov-label{display:block;font-size:13px;font-weight:600;color:var(--ink-soft);line-height:1.25}
.ov-n{font-family:"Playfair Display",serif;font-size:26px;font-weight:900;line-height:1.15}
@media(max-width:560px){ .ov+.ov{border-left:none;padding-left:0} }

/* Quick actions — icon over label, so four of them fit a phone two-up without
   the words wrapping. */
.qa-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;padding-bottom:10px}
.qa{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  padding:15px 8px;border-radius:var(--radius);background:var(--paper-2);border:1px solid transparent;
  font-weight:700;font-size:13px;text-align:center;color:inherit;line-height:1.2;
  transition:transform .18s var(--ease-out),background .18s,border-color .18s}
.qa-ic{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;flex:none;
  background:var(--tone-soft,var(--accent-soft));color:var(--tone,var(--accent-ink))}
.qa-ic .ic{width:20px;height:20px}
.qa:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){ .qa:hover{background:var(--card);border-color:var(--line)} }

.home-foot{text-align:center;color:var(--ink-faint);font-size:12px;margin:22px 0 76px}
.home-ver{display:block;margin-top:4px;font-size:11.5px;font-variant-numeric:tabular-nums;user-select:text;-webkit-user-select:text}
@media(max-width:720px){ .home-foot{margin-bottom:22px} }
@media (hover:hover) and (pointer:fine){ .tile:hover{transform:translateY(-3px);box-shadow:var(--shadow)} }

/* One module, one colour — set once here, read by the icon chip and the border. */
.t-blue{--tone:var(--blue);--tone-soft:var(--blue-soft)}
.t-green{--tone:var(--green);--tone-soft:var(--green-soft)}
.t-amber{--tone:var(--amber-ink);--tone-soft:var(--amber-soft)}
.t-red{--tone:var(--red);--tone-soft:var(--red-soft)}
.t-violet{--tone:var(--violet);--tone-soft:var(--violet-soft)}
.t-teal{--tone:var(--teal);--tone-soft:var(--teal-soft)}
.t-accent{--tone:var(--accent-ink);--tone-soft:var(--accent-soft)}
.t-ink{--tone:var(--ink-soft);--tone-soft:var(--paper-2)}

/* Three states, the same three everywhere: clear · worth a look · do it today.
   They colour the NUMBER, not the whole card: a wall of tinted cards is a wall,
   and the one that actually wants you today stops standing out. Identity is the
   icon chip, status is the number, and nothing else carries either. */
.tile.is-warm .tile-n{color:var(--amber-ink)}
.tile.is-hot  .tile-n{color:var(--red)}
.tile.is-hot{border-color:color-mix(in srgb,var(--red) 34%,transparent)}

/* edit mode */
/* A finger on a block scrolls the page, arranging or not: touch-action:none
   on every block while arranging left a screen of blocks that could not be
   scrolled at all. Holding a block still picks it up (tiles.js enableDrag). */
.tiles-edit .tile{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.tiles-edit .tile{animation:tile-wobble .28s ease-in-out infinite alternate}
.tiles-edit .tile:nth-child(even){animation-delay:-.14s}
.tiles-edit .tile-add{animation:none}
@keyframes tile-wobble{ from{transform:rotate(-1.1deg)} to{transform:rotate(1.1deg)} }
@media (prefers-reduced-motion:reduce){ .tiles-edit .tile{animation:none} }
.tile-x{position:absolute;top:-9px;left:-9px;z-index:3;width:28px;height:28px;border-radius:999px;
  background:var(--ink);color:var(--paper);line-height:1;
  display:grid;place-items:center;border:2px solid var(--paper);box-shadow:var(--shadow-soft)}
.tile-x .ic{width:16px;height:16px;stroke-width:2.6}
/* Same badge, other corner: one to take the block off, one to give it a
   picture. Only ever visible while arranging. */
.tile-cam{position:absolute;top:-9px;right:-9px;z-index:3;width:28px;height:28px;border-radius:999px;
  background:var(--card);color:var(--ink);line-height:1;
  display:grid;place-items:center;border:2px solid var(--paper);box-shadow:var(--shadow-soft)}
.tile-cam .ic{width:15px;height:15px;stroke-width:2.2}
.tile-artx{right:24px;background:var(--red-soft);color:var(--red)}

/* The venue's own picture on a block: a watermark behind the number, never in
   front of it. Bottom-right, because that corner is the only one that carries
   nothing — the chevron sits above it and the number runs along the left. */
.tile.has-art::after{content:"";position:absolute;right:0;bottom:0;width:56%;height:64%;
  background-image:var(--art);background-size:cover;background-position:center;
  border-radius:0 0 var(--radius-lg) 0;opacity:.16;pointer-events:none;
  -webkit-mask-image:linear-gradient(300deg,#000 30%,transparent 78%);
          mask-image:linear-gradient(300deg,#000 30%,transparent 78%)}
:root[data-theme="dark"] .tile.has-art::after{opacity:.22}
.tile-dragging{opacity:.95;z-index:5;animation:none!important;transform:scale(1.04);box-shadow:var(--shadow)}
.tile-add{align-items:center;justify-content:center;background:transparent;box-shadow:none;
  border:2px dashed var(--line);color:var(--ink-faint)}
.tile-add .tile-ic{background:transparent}
.tile-add .tile-label{font-size:13px}
.tiles-empty{padding:26px 18px;border-radius:var(--radius);background:var(--paper-2);
  border:1px dashed var(--line);text-align:center;font-size:13.5px;color:var(--ink-soft)}
/* The picker is a chooser, not a dashboard — icon and name only, packed tighter. */
.tiles-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.tiles-pick .tile{min-height:96px;padding:14px 10px;align-items:center;text-align:center;gap:8px}
.tiles-pick .tile-ic{width:44px;height:44px;border-radius:14px}
.tiles-pick .tile-label{font-size:12.5px}
@media(max-width:560px){
  .tiles-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .tile{min-height:124px;padding:14px 13px 12px;border-radius:22px}
  .tile-ic{width:46px;height:46px;border-radius:50%}
  .tile-label{font-size:14px}
}

/* ==========================================================================
   Kitchen room — the same daily checklist drawn as the kitchen
   Stations along the wall, a dot per outstanding job. Tap the station, tick
   the job. Identical data to the list; no points, no walking about.
   ========================================================================== */
/* Stock · kitchen view (js/kitchen-game.js): one summary card, then the
   shelves as a grouped list — what each holds and what needs topping up. */
.kv{margin-top:14px}
.kv-bar{display:block;height:6px;border-radius:99px;background:color-mix(in srgb,var(--ink) 8%,transparent);overflow:hidden}
.kv-bar i{display:block;height:100%;border-radius:inherit;background:var(--green);transition:width .4s var(--ease-out)}
.kv-sum{background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius-lg);padding:16px 18px 18px;box-shadow:var(--shadow-soft)}
.kv-sum-n{display:flex;align-items:baseline;gap:8px}
.kv-sum-n b{font-size:34px;font-weight:800;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.kv-sum-n span{font-size:15px;font-weight:600;color:var(--ink-soft)}
.kv-sum.hot .kv-sum-n b{color:var(--red)}
.kv-sum.ok .kv-sum-n b{color:var(--green)}
.kv-sum-of{font-size:13px;color:var(--ink-soft);margin:6px 0 10px}
.kv-head{display:flex;align-items:center;justify-content:space-between;margin:22px 4px 8px}
.kv-head > span{font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-soft)}
.kv-edit{display:inline-flex;align-items:center;gap:6px;border:none;background:none;padding:6px 4px;min-height:0;
  font:inherit;font-size:14px;font-weight:600;color:var(--accent-ink);cursor:pointer}
.kv-edit .ic{width:15px;height:15px}
.kv-group{background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-soft)}
.kv-row{display:flex;align-items:center;gap:14px;width:100%;padding:14px 14px 14px 16px;border:none;background:none;
  font:inherit;color:var(--ink);text-align:left;cursor:pointer;position:relative;-webkit-tap-highlight-color:transparent}
.kv-row + .kv-row::before{content:"";position:absolute;top:0;left:70px;right:0;border-top:1px solid var(--line-2)}
.kv-row:active{background:var(--paper-2)}
@media (hover:hover) and (pointer:fine){ .kv-row:hover{background:var(--paper-2)} }
.kv-row-ic{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;flex:none;
  background:var(--tone-soft,var(--paper-2));color:var(--tone,var(--ink-soft))}
.kv-row-ic .ic{width:21px;height:21px}
.kv-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.kv-row-main b{font-size:15.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kv-row-main small{font-size:12.5px;color:var(--ink-soft)}
.kv-row-main .kv-bar{height:4px;margin-top:6px;max-width:180px}
.kv-row.live .kv-bar i{background:color-mix(in srgb,var(--green) 85%,transparent)}
.kv-state{display:inline-flex;align-items:center;gap:4px;flex:none;font-size:12.5px;font-weight:700;
  padding:5px 10px;border-radius:99px;white-space:nowrap}
.kv-state.hot{background:var(--red-soft);color:var(--red)}
.kv-state.ok{background:var(--green-soft);color:var(--green)}
.kv-state .ic{width:13px;height:13px;stroke-width:3}
.kv-go{width:16px;height:16px;flex:none;color:var(--ink-faint)}
.kv-hint{font-size:12.5px;color:var(--ink-faint);margin:10px 4px 0}
.kv-list .li{cursor:pointer}
/* Stock · Edit shelves: the items to move, one ticked row each. */
.cm-items{max-height:260px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
  border:1px solid var(--line-2);border-radius:var(--radius);background:var(--card)}
.cm-item{display:flex;align-items:center;gap:12px;min-height:46px;padding:8px 14px;cursor:pointer}
.cm-item + .cm-item{border-top:1px solid var(--line-2)}
.cm-item input{width:20px;height:20px;flex:none;margin:0}
.cm-item b{flex:1;min-width:0;font-size:14.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cm-item span{flex:none;font-size:12.5px;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kv-tick{width:30px;height:30px;flex:none;border-radius:10px;border:2px solid var(--line);
  display:grid;place-items:center}
.kv-tick.on{background:var(--green);border-color:var(--green);color:#fff}

/* ==========================================================================
   Purchases — the wall of dockets
   A purchase is the piece of paper that came with the delivery, so it's drawn
   as one: off-white stock, monospace, dashed rules, a torn bottom edge. The
   card in the wall is the same component as the full-size one, just clipped to
   its first few lines.
   ========================================================================== */
.dkt-filters{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.dkt-filters .input{flex:1 1 190px;min-width:0}
.dkt-wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:22px 18px;
  margin-top:18px;align-items:start}
.dkt-card{display:block;width:100%;padding:0;border:none;background:none;text-align:left;
  font:inherit;color:inherit;cursor:pointer}
.dkt-card .dkt{transition:transform .18s var(--ease-out),box-shadow .18s}
@media (hover:hover) and (pointer:fine){ .dkt-card:hover .dkt{transform:translateY(-4px) rotate(-.35deg);box-shadow:var(--shadow)} }
.dkt-card:active .dkt{transform:translateY(0) scale(.99)}
.dkt-none{padding:26px 18px;text-align:center;color:var(--ink-soft);font-size:13.5px}

.dkt{position:relative;max-width:340px;margin:0 auto;padding:18px 18px 20px;
  background:#FFFDF7;border-radius:5px 5px 0 0;box-shadow:var(--shadow-soft);
  font-family:ui-monospace,Menlo,Consolas,monospace;color:#211E1B}
/* the torn-off bottom edge */
.dkt::after{content:"";position:absolute;left:0;right:0;bottom:-9px;height:10px;
  background:linear-gradient(-45deg,#FFFDF7 34%,transparent 34%) 0 0/13px 10px repeat-x,
             linear-gradient(45deg,#FFFDF7 34%,transparent 34%) 0 0/13px 10px repeat-x}
.dkt-head{text-align:center;padding-bottom:12px}
.dkt-head b{display:block;font-family:"Playfair Display",serif;font-size:16px;line-height:1.25;letter-spacing:.01em}
.dkt-head span{display:block;margin-top:3px;font-size:9px;letter-spacing:.16em;text-transform:uppercase;color:#9A8F84}
.dkt-meta{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px}
.dkt-meta span{display:block;font-size:8.5px;letter-spacing:.1em;text-transform:uppercase;color:#9A8F84}
.dkt-meta b{font-size:11.5px;font-weight:700;line-height:1.3;word-break:break-word}
.dkt-rule{border-top:1px dashed #CDC2B4;margin:12px 0}
.dkt-line + .dkt-line{margin-top:10px}
.dkt-line-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12.5px}
.dkt-line-top b{font-weight:700;white-space:nowrap}
.dkt-name{font-weight:700;line-height:1.3}
.dkt-line-sub{display:flex;justify-content:space-between;align-items:baseline;gap:8px;
  font-size:10px;color:#8A8078;margin-top:2px;flex-wrap:wrap}
.dkt-move{white-space:nowrap}
.dkt-move.up{color:var(--red);font-weight:700}
.dkt-move.down{color:var(--green);font-weight:700}
.dkt-more{margin-top:9px;text-align:center;font-size:10px;color:#8A8078}
.dkt-sum div{display:flex;justify-content:space-between;gap:12px;font-size:11.5px;padding:1.5px 0}
.dkt-sum .dkt-total{margin-top:7px;padding-top:7px;border-top:1.5px solid #211E1B;font-size:14px;font-weight:800}
.dkt-note{margin-top:11px;padding:7px 9px;border-radius:7px;background:var(--amber-soft);
  font-size:10.5px;line-height:1.45}
.dkt-foot{margin-top:13px;text-align:center;font-size:9px;line-height:1.6;color:#9A8F84}
.dkt-photo img{display:block;width:100%;border-radius:12px;margin-top:10px;border:1px solid var(--line)}
.dkt-runtotal{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;
  padding:11px 15px;border-radius:14px;background:var(--paper-2);border:1px solid var(--line)}
.dkt-runtotal b{font-size:17px}
@media(max-width:560px){
  .dkt-wall{grid-template-columns:1fr;gap:24px}
  .dkt{max-width:none}
}

/* Price watch — the movers table */
.pw-cheap{margin-top:4px;font-size:12px;color:var(--green);font-weight:600}
.pw-worse{color:var(--red)}
.pw-better{color:var(--green)}
.pw-spark{width:72px}
.spark{display:block;overflow:visible}

/* Supplier cards — the page you open with the phone already in your hand */
/* Suppliers · master–detail. The list is the lookup, the panel is the supplier.
   Past three or four suppliers a wall of cards stops being scannable, and the
   panel can hold everything about one of them without any card growing taller
   than its neighbours. */
.sup-split{display:grid;grid-template-columns:minmax(300px,4fr) 6fr;gap:16px;align-items:start}
.sup-list{padding:0;overflow:hidden}
.sup-search{display:flex;gap:8px;padding:14px 16px 10px}
.sup-search .input{min-height:40px;font-size:13.5px}
.sup-search #supQ{flex:1;min-width:0}
.sup-search #supF{flex:0 0 auto;width:auto;max-width:46%}
.sup-count{padding:0 16px 8px;font-size:12px;color:var(--ink-faint)}
/* A row, not a table: the master column is narrow by definition and four
   columns truncate in it. Name and last delivery are the two facts you scan
   for; who to ask and which days ride under the name. */
.sup-rows{display:flex;flex-direction:column}
.sup-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;font:inherit;color:inherit;
  padding:11px 16px;background:none;border:none;border-top:1px solid var(--line-2);cursor:pointer}
.sup-row:first-child{border-top:1px solid var(--line)}
.sup-row .grow{flex:1;min-width:0}
.sup-row b{display:inline;font-size:13.5px;font-weight:700}
.sup-row i{display:block;font-style:normal;font-size:12px;color:var(--ink-faint);margin-top:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sup-row .pill{margin-left:7px;font-size:12px}
.sup-row-last{flex:none;text-align:right}
.sup-row-last b{font-size:12.5px;font-weight:600;color:var(--ink-soft)}
.sup-row-last i{font-size:12px;margin-top:1px}
.sup-row:hover{background:var(--paper-2)}
.sup-row.on{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--accent)}
.sup-row.on b{color:var(--ink)}
.sup-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.sup-foot{padding:11px 16px;border-top:1px solid var(--line-2);font-size:12px;color:var(--ink-faint)}
.sup-detail{padding:20px}
.sup-d-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.sup-d-head h3{margin:0;font-size:19px;letter-spacing:-.01em}
.sup-d-head .btn{margin-left:auto;flex:none}
/* Facts on the left, the four counts on the right — the panel is wide enough
   that stacking them would leave half of it empty. */
.sup-d-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:18px;align-items:start}
.sup-d-stats{margin-top:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sup-d-stats span{flex:none}
.sup-last{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px;padding:12px 14px;
  border:1px solid var(--line);border-radius:var(--radius);background:var(--paper-2)}
.sup-last span{display:block;font-size:12px;color:var(--ink-faint)}
.sup-last b{font-size:13px}
.sup-last-amt{margin-left:auto;font-family:"Playfair Display",serif;font-size:17px}
@media(max-width:720px){
  .sup-split{grid-template-columns:1fr}
  .sup-d-grid{grid-template-columns:1fr}
  .sup-d-stats{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:520px){ .sup-d-stats{grid-template-columns:1fr 1fr} .sup-search{flex-wrap:wrap} .sup-search #supF{max-width:100%} }

.sup-grid{display:grid;gap:16px;align-items:start;
  grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}
.sup-card{display:flex;flex-direction:column}
.sup-actions{margin-top:auto;padding-top:14px}
.sup-actions .btn{flex:1 1 auto}
.sup-links{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.sup-links .btn{min-height:40px}
.sup-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}
.sup-fact span{display:block;font-size:12px;color:var(--ink-faint)}
.sup-fact b{font-size:13px;font-weight:600;line-height:1.35;word-break:break-word}
.sup-stats{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.sup-stats span{flex:1 1 92px;background:var(--paper-2);border:1px solid var(--line);border-radius:14px;
  padding:9px 12px;display:flex;flex-direction:column;gap:1px}
.sup-stats b{font-size:16px;line-height:1.2}
.sup-stats i{font-style:normal;font-size:12px;color:var(--ink-faint)}
.sup-stats .hot{background:var(--red-soft);border-color:color-mix(in srgb,var(--red) 35%,transparent)}
.sup-stats .hot b{color:var(--red)}
.sup-items{margin-top:16px;display:flex;flex-wrap:wrap;gap:7px}
.sup-items-h{flex:1 0 100%;font-size:12px;color:var(--ink-faint);margin-bottom:2px}

/* A chip: a small tappable label. Used for linked items and day pickers. */
.chip{font:inherit;font-size:12.5px;font-weight:600;line-height:1;padding:8px 11px;border-radius:999px;
  border:1px solid var(--line);background:var(--card);color:var(--ink);cursor:pointer;
  transition:background .15s,color .15s,border-color .15s,transform .15s}
.chip i{font-style:normal;font-weight:500;color:var(--ink-faint);margin-left:3px}
.chip:active{transform:scale(.96)}
@media (hover:hover) and (pointer:fine){ .chip:hover{border-color:var(--ink)} }
.chip.on{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.chip.on i{color:color-mix(in srgb,var(--paper) 72%,transparent)}
.chip-hot{background:var(--amber-soft);border-color:color-mix(in srgb,var(--amber) 40%,transparent);color:var(--amber-ink)}
.chip-hot i{color:var(--amber-ink);opacity:.8}
.daypick{display:flex;gap:6px;flex-wrap:wrap}
@media(max-width:520px){ .sup-facts{grid-template-columns:1fr} }

/* Forecast — showing the working */
.fc-formula{display:block;margin:8px 0;padding:8px 11px;border-radius:9px;background:color-mix(in srgb,var(--card) 55%,transparent);
  font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.5}
.fc-worked{margin-top:16px;padding:18px;border-radius:var(--radius);background:var(--card);
  border:1px solid var(--line);box-shadow:var(--shadow-soft)}
.fc-worked>b{font-size:14px}
.fc-worked p{margin-top:12px;font-size:13.5px;color:var(--ink-soft)}
.fc-sum{display:flex;align-items:stretch;gap:10px;flex-wrap:wrap;margin-top:12px}
.fc-sum span{flex:1 1 120px;background:var(--paper-2);border:1px solid var(--line);border-radius:14px;padding:10px 13px}
.fc-sum i{display:block;font-style:normal;font-size:12px;color:var(--ink-faint);line-height:1.35}
.fc-sum b{font-size:16px}
.fc-sum em{display:flex;align-items:center;font-style:normal;font-weight:800;font-size:17px;color:var(--ink-faint)}
.fc-sum .hot{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 35%,transparent)}
.fc-sum .hot b{color:var(--accent-ink)}
@media(max-width:560px){ .fc-sum span{flex:1 1 100%} .fc-sum em{justify-content:center} }

/* Adding stock in bulk — paste the list, check the table */
.bulk-ta{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13.5px;line-height:1.6;
  min-height:150px;resize:vertical;margin-top:12px}
.bulk-common{margin-top:16px;padding:12px 14px;border-radius:14px;background:var(--paper-2);
  border:1px solid var(--line)}
.bulk-common summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--ink-soft)}
.bulk-common[open] summary{margin-bottom:12px}
.bulk-common>div{margin-top:10px}
.bulk-group{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.bulk-group>span{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);
  width:100%;margin-bottom:-2px}
.bulk-group .chip{font-size:12px;padding:7px 10px}
.bulk-prev table{min-width:660px}
.bulk-prev td:first-child{min-width:170px}
.bulk-prev .input{min-height:42px;padding:8px 10px;font-size:13px}
.bulk-prev .input.num{text-align:right}
.bulk-bad .input[data-f="name"]{border-color:var(--red);background:var(--red-soft)}

/* Delivery ⇄ docket: the same event seen from either end */
.dkt-flag{margin-top:3px;font-size:10px;font-weight:700;color:var(--red)}
.dkt-stamp{margin-top:12px;padding:8px 10px;border-radius:8px;border:1.5px dashed rgba(47,143,91,.5);
  background:color-mix(in srgb,var(--green-soft) 70%,transparent);text-align:center}
.dkt-stamp b{display:block;font-size:10.5px;letter-spacing:.04em;color:#1d6a40}
.dkt-stamp span{display:block;margin-top:2px;font-size:9.5px;color:#4b7c60;line-height:1.4}
.dkt-stamp.plain{border-color:rgba(33,30,27,.18);background:rgba(33,30,27,.03)}
.dkt-stamp.plain b{color:var(--ink-soft)}
.dkt-stamp.plain span{color:var(--ink-faint)}
.dlv-amt{white-space:nowrap;font-size:14px}
/* The back-door checklist: a tick per line, and a camera per line for the one
   that arrived broken. A ticked row dims a little so what's left stands out. */
.dc-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:8px;font-size:13px;color:var(--ink-soft)}
/* One line per item (11-26, staff: "像数钱一样快"): name, 订购 3 包, ✓ ✗.
   The boxes for what came open only under a ✗. */
.dc-how{font-size:12.5px;margin:-2px 0 6px}
.dc-list{border-top:1px solid var(--line)}
.dc-row{border-bottom:1px solid var(--line)}
.dc-line{display:flex;align-items:center;gap:10px;padding:8px 0;min-height:52px}
.dc-main{flex:1;min-width:0;cursor:pointer}
.dc-name b{display:block;font-size:15px;line-height:1.25;overflow-wrap:anywhere}
.dc-name .nm-sub{display:block;font-weight:400;font-size:12px;color:var(--ink-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dc-sum{font-size:12.5px;color:var(--amber-ink,#9a5b00);font-weight:600;margin-top:2px}
.dc-sum:empty{display:none}
.dc-qty{margin-top:3px;font-size:13px;color:var(--ink-soft)}
.dc-qty .dc-ord{font-size:18px;color:var(--ink)}
.dc-qty .dc-u{font-size:14px;color:var(--ink)}
.dc-pr{display:inline-block;white-space:nowrap;font-size:11.5px;color:var(--ink-faint);margin-left:6px}
.dc-tick,.dc-x{flex:none;width:42px;height:42px;border-radius:12px;border:2px solid var(--line);background:var(--card);color:var(--ink-faint);display:grid;place-items:center;cursor:pointer;padding:0}
.dc-tick .ic,.dc-x .ic{width:20px;height:20px;stroke-width:3}
.dc-row.dc-ok .dc-tick{background:var(--green);border-color:var(--green);color:#fff}
.dc-row.dc-bad .dc-x{background:var(--red,#c0392b);border-color:var(--red,#c0392b);color:#fff}
.dc-row.dc-ok .dc-name b{color:var(--ink-soft)}
.dc-fix{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;padding:2px 0 12px}
.dc-fix[hidden]{display:none}
.dc-f{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--ink-soft)}
.dc-f > span:first-child{white-space:nowrap}
.dc-f .input{width:auto;padding:6px 8px;min-height:38px}
.dc-f .dc-rec{width:72px;text-align:right;font-size:16px}
.dc-f .dc-price{width:80px;text-align:right}
.dc-f .dc-basis{width:auto;min-width:60px}
.dc-f .dc-cond{min-width:110px}
.dc-conv{font-size:11.5px;white-space:nowrap}
/* 📷 on every line: a photo of that one item. Once taken it shows the photo. */
.dc-cam{flex:none;position:relative}
.dc-cam-pick{width:38px;height:42px;border-radius:12px;border:1.5px dashed var(--line);color:var(--ink-faint);display:grid;place-items:center;cursor:pointer;overflow:hidden}
.dc-cam-pick .ic{width:18px;height:18px}
.dc-cam.has .dc-cam-pick{border-style:solid}
.dc-cam.has .dc-cam-pick > .ic{display:none}
/* ↻ turn a photo 90° clockwise (11-26: retaking an upside-down one drove
   staff mad). On an item's photo, and on each photo at the top. */
.dc-rot,.shot-rot{position:absolute;display:grid;place-items:center;padding:0;border-radius:999px;
  background:var(--ink);color:var(--paper);border:2px solid var(--paper);box-shadow:var(--shadow-soft);cursor:pointer}
.dc-rot{width:24px;height:24px;right:-8px;bottom:-8px}
.dc-rot[hidden]{display:none}
.dc-rot .ic{width:13px;height:13px;stroke-width:2.6}
.shot-rot{width:28px;height:28px;right:-7px;bottom:-7px}
.shot-rot .ic{width:15px;height:15px;stroke-width:2.6}
.dc-thumb:empty{display:none}
.dc-cam .dc-thumb img{width:38px;height:42px;object-fit:cover;border-radius:0}
.dc-thumb img,.dc-thumb-img{width:36px;height:36px;object-fit:cover;border-radius:8px;display:block}
.dc-thumb-img{margin-top:6px}

/* Skill glyphs (can open / can close / kitchen / bar / shift lead) — inline with
   the name they sit next to, so a roster row reads as one line. */
.skill-ic{width:15px;height:15px;vertical-align:-2px;color:var(--ink-soft)}
.skill-chip .skill-ic{margin:0 2px}
.rg-name .skill-ic{width:13px;height:13px;opacity:.75}
.skill-emo{font-size:14px;line-height:1;vertical-align:-1px;margin-right:1px;font-style:normal}
.rg-name .skill-emo{font-size:12.5px}
.skill-chip .skill-emo{font-size:15px}

/* Icons that sit inline with a label rather than in a chip of their own —
   stat-card keys, supplier buttons, chat, the AI send button. */
.stat .k .ic{width:15px;height:15px;flex-shrink:0}
.btn .ic{width:17px;height:17px;flex-shrink:0}
.tab .ic{width:16px;height:16px}
.pill .ic{width:13px;height:13px}
.ai-head .ic,.aa-head .ic{width:17px;height:17px}
.ai-input-row .btn .ic{width:18px;height:18px}
.ai-msg .ic,.aa-msg .ic{width:14px;height:14px;vertical-align:-2px}
.dkt-flag .ic,.dkt-stamp .ic{width:12px;height:12px;vertical-align:-1px}
.li .meta .ic,.meta span .ic{width:13px;height:13px;vertical-align:-2px}
.offbar .ic{width:15px;height:15px;vertical-align:-3px;margin-right:3px}
.img-preview .ic{width:22px;height:22px;margin-bottom:4px}
.ai-chip .ic{width:13px;height:13px}

/* Rating: five icons filled to the score, rather than a repeated ★ character —
   a text star can't be styled per-state and reads as noise to a screen reader. */
.stars{display:inline-flex;gap:1px;vertical-align:-2px}
.stars .ic{width:14px;height:14px;color:var(--line)}
.stars .on .ic{color:var(--amber);fill:var(--amber)}
/* Leaderboard rank: one medal icon plus the number. */
.bestnm .ic,.li b .ic{width:14px;height:14px;vertical-align:-2px}
.onb-ic .ic{width:17px;height:17px}
.task-check .ic,.kv-tick .ic{width:15px;height:15px;stroke-width:3}
.aa-orb .ic{width:21px;height:21px}
.role-seg .ic{width:16px;height:16px}
/* A draft the assistant filled in from one sentence — an SOS, a task. It sits in
   an .ai-form bubble, so it already has the panel's full width. */
.ai-card{margin-top:10px;padding:12px 12px 10px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.ai-card-head{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.ai-card-note{font-size:12px;margin-top:6px}
/* The camera beside the assistant's input — owner and manager only — and the
   photo it sends, shown small in the bubble and on the filing card. */
.ai-attach{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;height:44px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink-soft);cursor:pointer}
.ai-attach:hover{color:var(--accent);border-color:var(--accent)}
.ai-attach .ic{width:20px;height:20px}
.ai-att{display:block;max-width:180px;max-height:140px;border-radius:10px;margin:2px 0 8px;object-fit:cover}

/* Sidebar footer: "Change password" and "Log out" do not fit side by side in
   a 248px sidebar, which pushed "Log out" off the edge. Stack them. */
.row:has(> #pwBtn){flex-wrap:wrap}
#pwBtn,#logoutBtn{flex:1 1 100%}

/* "Photo" / "Add photo" buttons are a <label> wrapping a hidden file input.
   `hidden` is display:none, which also takes the input out of the tab order, so
   nobody on a keyboard could attach a photo. Keep it invisible but reachable,
   and show the focus on the button it sits in. */
label.btn{position:relative}
label.btn > input[type="file"][hidden]{display:block !important;position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
label.btn:focus-within{outline:3px solid var(--accent);outline-offset:2px}

/* Read by screen readers, not shown. */
.sr-only{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- first-run guide: one question per screen ---------- */
.guide{max-width:560px;margin:8px auto 40px}
.guide-top{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px}
.guide-phase{font-weight:700;letter-spacing:.02em}
.guide .bar{margin:8px 0 22px}
.guide-hero{font-size:44px;line-height:1;margin:18px 0 12px;letter-spacing:6px}
.guide-q{font-size:26px;line-height:1.2;margin:0 0 6px;letter-spacing:-.01em}
.guide-sub{color:var(--ink-soft);margin:0 0 18px;font-size:14.5px;line-height:1.5}
.guide-prep{padding:16px 18px}
.guide-li{display:flex;gap:12px;align-items:flex-start;padding:8px 0;font-size:14.5px}
.guide-li > span{font-size:20px;line-height:1.2;flex:none;width:26px;text-align:center}
.guide-actions{display:flex;gap:10px;margin-top:22px;flex-wrap:wrap}
.guide-actions .btn{min-height:48px}
.guide-photo{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1.5px dashed var(--line);border-radius:14px;margin-bottom:16px;font-size:13.5px}
.guide-photo .faint{font-size:12px;margin-top:2px}
.guide-have{font-size:13px;color:var(--ink-soft);margin:0 0 12px;display:flex;gap:6px;align-items:center}
.guide-logo .img-preview{height:88px}
.guide-nudge{display:flex;align-items:center;gap:14px;padding:14px 18px;margin-bottom:16px;border-color:var(--amber);background:var(--amber-soft)}
.guide-nudge-ic{font-size:24px}
@media (max-width:520px){ .guide-photo{flex-wrap:wrap} .guide-q{font-size:23px} }
.guide .rep-row .input.grow{min-width:150px}
.guide .btn-link{background:none;border:none;box-shadow:none;color:var(--ink-soft);text-decoration:underline;padding:8px 0;min-height:44px;cursor:pointer}
.guide-tries{display:grid;gap:10px}
.guide-try{display:flex;align-items:center;gap:14px;padding:16px 18px;text-align:left;font:inherit;font-size:15px;color:var(--ink);cursor:pointer;min-height:60px}
.guide-try > span{font-size:24px}
.guide-try:hover{border-color:var(--accent)}
.guide-try:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.ob-prep > div:not(.faint){font-size:13.5px;padding:2px 0}
a.ai-chip{text-decoration:none;display:inline-flex;align-items:center}

/* ---------- assistant: voice ---------- */
.ai-input-row .input{flex:1 1 auto;min-width:0}
.ai-mic{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;height:44px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink-soft);cursor:pointer;padding:0}
.ai-mic .ic{width:20px;height:20px}
.ai-mic:hover{color:var(--accent);border-color:var(--accent)}
.ai-mic:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.ai-mic.listening{color:#fff;background:var(--red);border-color:var(--red);animation:mic-pulse 1.2s ease-in-out infinite}
.ai-mic.speaking{color:#fff;background:var(--accent);border-color:var(--accent)}
@keyframes mic-pulse{0%,100%{box-shadow:0 0 0 0 rgba(216,69,60,.45)}50%{box-shadow:0 0 0 8px rgba(216,69,60,0)}}
@media (prefers-reduced-motion: reduce){ .ai-mic.listening{animation:none} }
@media (max-width:420px){ .ai-input-row{gap:6px} .ai-mic,.ai-attach{flex-basis:40px;height:40px} }

/* ---------- wide tables become cards on a phone ---------- */
@media (max-width:600px){
  /* Forecast: the item across the top, then three figures side by side, with
     days of cover as a bar — two weeks fills it. */
  .dtable.stack.fc-table tr{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px 12px}
  .fc-table td:nth-child(1){grid-column:1/-1}
  .fc-table td:nth-child(1) .faint{font-size:12px!important;margin-top:2px}
  .fc-table td:nth-child(4) b{font-size:20px}
  /* Prices: name and the move on top, this period's price big beneath, last
     period's and the cost to you as the small print. */
  .dtable.stack.pw-table tr{grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"item move" "this cost" "prev spark";gap:8px 14px;padding:16px 2px}
  .pw-table td:nth-child(1){grid-area:item;grid-column:auto!important}
  .pw-table td:nth-child(2){grid-area:prev}
  .pw-table td:nth-child(3){grid-area:this}
  .pw-table td:nth-child(3) b{font-size:20px}
  .pw-table td:nth-child(4){grid-area:move;align-self:start}
  .pw-table td:nth-child(4)::before, .pw-table td:nth-child(6)::before{display:none!important}
  .pw-table td:nth-child(5){grid-area:cost;text-align:right!important}
  .pw-table td:nth-child(6){grid-area:spark;justify-self:end;align-self:end}
  .pw-table td:nth-child(1) b{font-size:16px}
  .tablewrap:has(> table.dtable.stack){overflow:visible}
  .dtable.stack, .dtable.stack tbody{display:block;width:100%;min-width:0!important}
  .dtable.stack tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  .dtable.stack td{overflow-wrap:anywhere}
  .dtable.stack thead{display:none}
  .dtable.stack tr{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;padding:14px 2px;border-bottom:1px solid var(--line-2)}
  .dtable.stack tr:last-child{border-bottom:none}
  .dtable.stack td{display:block;padding:0;border:none;text-align:left;min-width:0;width:auto!important}
  .dtable.stack td:first-child{grid-column:1/-1}
  .dtable.stack td[data-label]:not([data-label=""]):not(:first-child)::before{content:attr(data-label);display:block;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:4px}
  .dtable.stack td .input, .dtable.stack td select{width:100%;max-width:none;text-align:left!important}
  .dtable.stack td:last-child:empty{display:none}
}

/* ---------- phone: sheets rise from the bottom ---------- */
@media (max-width:600px){
  .modal-back{place-items:end center;padding:0}
  .modal,.modal.wide{max-width:none;border-radius:22px 22px 0 0;max-height:94vh;animation:sheet-up .26s var(--ease-out);
    padding-bottom:env(safe-area-inset-bottom,0px)}
  /* A tall sheet stops short of the status bar and the Dynamic Island: 94vh
     ran its title up under the clock on a notched iPhone. */
  .modal,.modal.wide{max-height:calc(100dvh - max(env(safe-area-inset-top,0px), 20px) - 12px)}
  /* The sheet is a column: the title, the form scrolling under it, and the
     buttons fixed at the foot — just clear of the home indicator. Nothing in
     the form can scroll beneath them, because they are not in the scroller. */
  .modal:has(> .modal-actions){display:flex;flex-direction:column;overflow:hidden;padding-bottom:0}
  .modal:has(> .modal-actions) > .modal-head{flex:none;padding-bottom:12px;border-bottom:1px solid var(--line-2)}
  .modal:has(> .modal-actions) > .modal-head + .modal-body{padding-top:14px}
  .modal:has(> .modal-actions) > .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
  .modal > .modal-actions{flex:none;background:var(--card);margin:0;
    padding:10px 22px max(12px, calc(env(safe-area-inset-bottom,0px) - 10px));flex-wrap:nowrap}
  .modal .modal-actions .btn{flex:1 1 0;min-height:48px}
}
@keyframes sheet-up{from{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}
@media (prefers-reduced-motion: reduce){ .modal{animation:none} }


/* ============================================================
   ===== Glass — the navigation layer as a translucent material =====
   Apple's rule for Liquid Glass, applied here: glass is for the chrome that
   floats ABOVE the content — the top bar, the tab bar, sheets, the floating
   button, toasts, the view switch — never for the content itself. Cards, lists
   and forms stay solid, because text read at arm's length in a busy kitchen
   must not sit on something that changes colour as the page scrolls under it.
   · Bigger surfaces are thicker: sheets blur harder and are more opaque than bars.
   · Colour lives on solid layers: status toasts and the preview banner stay solid.
   · Controls on glass (inputs, the language select) stay solid — never glass on glass.
   · Everything falls back to solid for Reduce Transparency, Increase Contrast,
     and browsers without backdrop-filter.
   ============================================================ */
:root{
  --glass:rgba(255,252,247,.56);                 /* bars */
  --glass-thick:rgba(255,252,247,.97);           /* sheets: thick enough that the page behind never reads through their text */
  --glass-blur:blur(22px) saturate(180%);
  --glass-blur-thick:blur(36px) saturate(190%);
  --glass-rim:rgba(255,255,255,.85);             /* the bright top edge where light catches */
  --glass-edge:rgba(33,30,27,.09);               /* hairline that separates it from white */
  --glass-shadow:0 1px 1px rgba(33,30,27,.04), 0 12px 32px -14px rgba(33,30,27,.28);
  --glass-lens:color-mix(in srgb, var(--ink) 86%, transparent);   /* dark lens: FAB, toast */
  --glass-pill:color-mix(in srgb, var(--accent) 15%, transparent); /* selected tab */
  --glass-liquid:rgba(255,253,250,.14);          /* the tab bar: clearer than the other bars */
  --glass-blur-liquid:blur(10px) saturate(220%) brightness(1.08);
  --glass-sheen:rgba(255,255,255,.40);           /* light across the top half */
  --nav-float:max(10px, calc(env(safe-area-inset-bottom) - 18px)); /* capsule's gap to the bottom: just above the home indicator */
}
:root[data-theme="dark"]{
  --glass:rgba(38,36,42,.55);
  --glass-thick:rgba(34,33,39,.97);
  --glass-rim:rgba(255,255,255,.12);
  --glass-edge:rgba(0,0,0,.45);
  --glass-shadow:0 1px 1px rgba(0,0,0,.35), 0 14px 34px -14px rgba(0,0,0,.75);
  --glass-pill:color-mix(in srgb, var(--accent) 24%, transparent);
  --glass-liquid:rgba(40,38,44,.30);
  --glass-blur-liquid:blur(16px) saturate(190%) brightness(.92);
  --glass-sheen:rgba(255,255,255,.07);
}

/* Solid when the person or the device asks for it. `mkr-solid` is set by the
   iOS app from the system's Reduce Transparency switch, which WebKit does not
   expose as a media query. */
@media (prefers-reduced-transparency: reduce){
  :root, :root[data-theme="dark"]{ --glass:var(--card); --glass-thick:var(--card); --glass-liquid:var(--card); --glass-sheen:transparent; --glass-blur-liquid:none; --glass-blur:none; --glass-blur-thick:none; --glass-lens:var(--ink) }
}
html.mkr-solid, html.mkr-solid[data-theme="dark"]{ --glass:var(--card); --glass-thick:var(--card); --glass-liquid:var(--card); --glass-sheen:transparent; --glass-blur-liquid:none; --glass-blur:none; --glass-blur-thick:none; --glass-lens:var(--ink) }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root, :root[data-theme="dark"]{ --glass:var(--card); --glass-thick:var(--card); --glass-liquid:var(--card); --glass-sheen:transparent; --glass-blur-liquid:none; --glass-lens:var(--ink) }
}
@media (prefers-contrast: more){
  :root, :root[data-theme="dark"]{ --glass:var(--card); --glass-thick:var(--card); --glass-liquid:var(--card); --glass-sheen:transparent; --glass-blur-liquid:none; --glass-blur:none; --glass-blur-thick:none;
    --glass-lens:var(--ink); --glass-edge:var(--ink-soft); --glass-rim:transparent }
}
html.mkr-contrast, html.mkr-contrast[data-theme="dark"]{ --glass:var(--card); --glass-thick:var(--card); --glass-liquid:var(--card); --glass-sheen:transparent; --glass-blur-liquid:none; --glass-blur:none; --glass-blur-thick:none;
  --glass-lens:var(--ink); --glass-edge:var(--ink-soft); --glass-rim:transparent }

/* Something for the glass to catch: the page's warm wash, a touch stronger. */
body{
  background:
    radial-gradient(900px 560px at 0% -6%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%),
    radial-gradient(820px 520px at 100% 8%, color-mix(in srgb, var(--green) 8%, transparent), transparent 58%),
    radial-gradient(760px 520px at 50% 108%, color-mix(in srgb, var(--amber) 8%, transparent), transparent 60%),
    var(--paper);
  background-attachment:fixed;
}

/* ---- Top bar: a glass strip the page scrolls under ---- */
.topbar{
  background:var(--glass);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  border-bottom:0;
  box-shadow:inset 0 -1px 0 var(--glass-edge);
}
.topbar h1{letter-spacing:-.02em}

/* ---- View switch (Floor / Blocks / List): a glass track, the choice solid on it ---- */
.viewswitch{
  background:var(--glass);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-edge);
  box-shadow:inset 0 1px 0 var(--glass-rim), var(--glass-shadow);
  padding:3px; gap:2px;
}
.viewswitch button{border-radius:999px;min-height:42px}
.viewswitch button.on{background:var(--ink-grad);box-shadow:0 4px 12px -6px rgba(33,30,27,.5)}

/* ---- Floating button: a dark lens ---- */
.ai-fab{
  background:var(--glass-lens);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 .5px rgba(255,255,255,.14), var(--glass-shadow);
}
.ai-fab.open{background:var(--accent)}
.ai-fab:active{transform:scale(.94);transition:transform .1s ease-out}

/* ---- Toasts: plain messages are a lens; status colours stay solid ---- */
.toast:not(.green):not(.red):not(.amber){
  background:var(--glass-lens);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18), var(--glass-shadow);
}

/* ---- Dialogs: thick glass; the fields and the scrim stay as they were ---- */
/* Sheets are near-solid and carry no backdrop blur: on iOS a blurred box with
   a scrolling inside paints the part scrolled past as blank, leaving a big
   empty band at the top of a long list. The dimmed backdrop does the blurring. */
.modal{
  background:var(--glass-thick);
  box-shadow:inset 0 1px 0 var(--glass-rim), 0 0 0 .5px var(--glass-edge), var(--shadow);
}
.modal-back{background:rgba(33,30,27,.32);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
/* One thing on screen at a time: the floating button showed through open dialogs. */
body.modal-open .ai-fab{display:none}
/* The assistant, come along to the page it opened: what it said about it, and
   the voice conversation's button (js/assistant.js guideTo). */
.ai-guide{position:fixed;left:12px;right:12px;bottom:22px;z-index:299;display:none;flex-direction:column;gap:10px;padding:12px 14px;
  border-radius:18px;background:var(--card);border:1px solid var(--line);box-shadow:0 12px 32px -10px rgba(0,0,0,.35);color:var(--ink)}
.ai-guide.show{display:flex}
.ai-guide-text{font-size:14px;line-height:1.5;max-height:6em;overflow:auto;-webkit-overflow-scrolling:touch}
.ai-guide-text:empty{display:none}
.ai-guide-row{display:flex;align-items:center;gap:8px}
.ai-guide-row button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 14px;border-radius:99px;border:1px solid var(--line);
  background:var(--paper-2);color:var(--ink);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;white-space:nowrap}
.ai-guide-row button[hidden]{display:none}
.ai-guide-row .ic{width:17px;height:17px}
.ai-guide-mic.listening{background:var(--red);border-color:var(--red);color:#fff;animation:mic-pulse 1.2s ease-in-out infinite}
.ai-guide-mic.speaking{background:var(--accent);border-color:var(--accent);color:#fff}
.ai-guide-row .ai-guide-x{margin-left:auto;width:40px;padding:0;justify-content:center;font-size:20px;line-height:1}
@media(min-width:721px){ .ai-guide{left:auto;right:18px;width:min(400px,calc(100vw - 36px))} }
@media(max-width:720px){ .ai-guide{bottom:calc(var(--nav-float) + 76px)} }
@media (prefers-reduced-motion: reduce){ .ai-guide-mic.listening{animation:none} }
body.ai-guiding .ai-fab, body.modal-open .ai-guide{display:none}
/* Showing how: the button to press, circled. Neither takes a tap — the page
   under them works as it always does. */
.ai-ring{position:fixed;z-index:10050;pointer-events:none;border:3px solid var(--accent);border-radius:14px;
  box-shadow:0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);animation:ai-ring 1.4s ease-in-out infinite;
  transition:left .18s ease-out, top .18s ease-out, width .18s ease-out, height .18s ease-out}
@keyframes ai-ring{50%{box-shadow:0 0 0 11px color-mix(in srgb, var(--accent) 0%, transparent)}}
.ai-ring-tip{position:fixed;z-index:10051;pointer-events:none;max-width:min(300px, calc(100vw - 24px));padding:10px 12px;border-radius:12px;
  background:#211E1B;color:#fff;font-size:14px;line-height:1.45;box-shadow:0 10px 26px rgba(0,0,0,.35)}
.ai-ring-tip b{color:#F2A97E;margin-right:7px;font-weight:700}
.ai-ring[hidden], .ai-ring-tip[hidden]{display:none}
@media (prefers-reduced-motion: reduce){ .ai-ring{animation:none;transition:none} }

@media (max-width:720px){
  /* ---- Tab bar: a floating Liquid Glass capsule, as on iOS 26 ----
     Clearer than the other bars so the page reads through it as it scrolls
     under: a thin tint, a strong blur that lifts the colour behind, a bright
     rim along the top, a softer one along the bottom, and a sheen across the
     upper half where the light lands. */
  .mobile-nav{
    left:12px; right:12px; bottom:var(--nav-float);
    padding:5px; border-radius:32px; border-top:0;
    justify-content:space-between;
    background:var(--glass-liquid);
    -webkit-backdrop-filter:var(--glass-blur-liquid); backdrop-filter:var(--glass-blur-liquid);
    box-shadow:
      inset 0 1px 0 var(--glass-rim),
      inset 0 -1px 0 color-mix(in srgb, var(--glass-rim) 45%, transparent),
      inset 0 0 0 .5px color-mix(in srgb, var(--glass-rim) 50%, transparent),
      0 0 0 .5px var(--glass-edge), var(--glass-shadow);
    isolation:isolate;
  }
  .mobile-nav::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1;
    background:linear-gradient(to bottom, var(--glass-sheen) 0%, transparent 55%)}
  .mobile-nav a,.mobile-nav button{
    flex:1 1 0; min-width:0; min-height:52px; padding:5px 4px; border-radius:27px;
    transition:background .2s var(--ease-out), color .2s, transform .1s ease-out;
  }
  /* The selected tab sits in a lens of brighter glass, tinted by the accent. */
  .mobile-nav a.active,.mobile-nav button.active{background:var(--glass-pill);color:var(--accent-ink);font-weight:700;
    box-shadow:inset 0 1px 0 color-mix(in srgb, var(--glass-rim) 70%, transparent), inset 0 0 0 .5px color-mix(in srgb, var(--glass-rim) 40%, transparent)}
  :root[data-theme="dark"] .mobile-nav a.active,:root[data-theme="dark"] .mobile-nav button.active{color:var(--accent)}
  /* Feedback on the press itself, not on release. */
  .mobile-nav a:active,.mobile-nav button:active{transform:scale(.94)}

  /* The scroll edge under the capsule, as iOS 26 draws it: nothing shows in
     the strip between the capsule and the bottom of the screen, and the page
     fades out as it slides under the glass rather than ending in sharp text. */
  /* Only the strip under the capsule is filled — behind the capsule itself the
     page has to show, or the glass is just a white slab. */
  .shell:has(> .mobile-nav)::after{content:"";position:fixed;left:0;right:0;bottom:0;z-index:29;pointer-events:none;
    height:calc(var(--nav-float) + 22px);
    background:linear-gradient(to top, var(--paper) 0, var(--paper) var(--nav-float), color-mix(in srgb, var(--paper) 0%, transparent))}
  html.mkr-kb .shell::after{display:none}

  /* Room under the page for the capsule (its height is 64px). */
  .content{padding-bottom:calc(var(--nav-float) + 84px)}
  body.ai-fullpage .content{padding-bottom:calc(var(--nav-float) + 70px)}
  .ai-fab{bottom:calc(var(--nav-float) + 76px)}
  .toast-wrap{bottom:calc(var(--nav-float) + 76px)}

  /* ---- The More sheet: thick glass, floating clear of the screen edges ---- */
  /* Rises from the bottom edge like every other sheet, not floating above it. */
  .navsheet{
    margin:0; width:100%; border-radius:22px 22px 0 0;
    background:var(--glass-thick);
    box-shadow:inset 0 1px 0 var(--glass-rim), 0 0 0 .5px var(--glass-edge), 0 -10px 40px -18px rgba(33,30,27,.5);
  }
  .navsheet-body{padding-bottom:max(14px, env(safe-area-inset-bottom))}
  /* Change password / Log out: two rows at the foot, like Settings, not two
     pill buttons side by side. */
  .navsheet-foot{flex-direction:column;gap:0;margin-top:8px;padding-top:0;border-top:none;
    background:color-mix(in srgb,var(--ink) 4%,transparent);border-radius:16px;overflow:hidden}
  .navsheet-foot .btn{justify-content:flex-start;gap:14px;width:100%;min-height:50px;padding:0 16px;border:none;border-radius:0;
    background:none;box-shadow:none;font-size:15px;font-weight:600}
  .navsheet-foot .btn + .btn{border-top:1px solid var(--line-2)}
  .navsheet-foot .btn .ic{width:19px;height:19px}
  .navsheet-foot #logoutBtnM{color:var(--red)}
  .navsheet-back:not(.hidden){background:rgba(33,30,27,.30);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
  .ns-item{border-bottom-color:var(--glass-edge)}
  .ns-item:active{transform:scale(.985)}
  /* The floating button sat on top of the open sheet, over its rows. */
  body:has(.navsheet-back:not(.hidden)) .ai-fab{display:none}
}

@media (max-width:600px){
  /* The button bar is the sheet's own material, not a second layer on it. */
  .modal > .modal-actions{background:transparent}
}

/* ---- Large titles (js/router.js largeTitle): the top bar's small title stays
   out of the way while the page's own heading says the same thing, and fades
   in once that heading has scrolled up under the bar. ---- */
.topbar-title h1{transition:opacity .22s var(--ease-out), transform .22s var(--ease-out)}
.topbar.large-title:not(.scrolled-title) .topbar-title h1{opacity:0;transform:translateY(6px)}
@media (prefers-reduced-motion: reduce){ .topbar.large-title:not(.scrolled-title) .topbar-title h1{transform:none} }

/* A logo image (the venue's, or the app's own) fills the tile edge to edge. */
.login-logo:has(img){background:none;padding:0;overflow:hidden;box-shadow:0 10px 22px -12px rgba(33,30,27,.45)}

/* The need the assistant offers to pass on to the team: what it heard, set
   apart so the owner can see exactly what would be sent before saying yes. */
.ai-need{display:flex;gap:10px;align-items:flex-start;margin-top:10px;padding:10px 12px;border-radius:12px;
  background:var(--card);border:1px solid var(--line-2)}
.ai-need > .ic{color:var(--accent);flex:0 0 auto;margin-top:2px}
.ai-need span{display:flex;flex-direction:column;gap:2px;font-weight:600}
.ai-need small{font-weight:400;color:var(--ink-soft);font-size:12.5px}
.napp-chat .ai-need{border:none;border-radius:14px}
/* The conversation a request came from, on the super admin's Requests page. */
.req-convo{margin-top:6px;font-size:12.5px}
.req-convo summary{cursor:pointer;color:var(--accent-ink);font-weight:600}
.req-convo p{margin:4px 0 0;padding:6px 10px;border-radius:10px;background:var(--paper-2);white-space:pre-wrap}
.req-convo p.user{background:var(--accent-soft)}

/* Starting a restaurant by chatting (js/signup-chat.js). On the website it
   sits in the sign-in card's tab; the iOS app gives it the chat screen. */
.su-web .ai-page{height:min(520px,64vh);min-height:360px;margin-top:16px}
.su-web .ai-log{padding:14px 12px 6px}
.su-sum{margin-top:8px;display:flex;flex-direction:column;gap:2px;background:var(--card);border-radius:12px;padding:6px 12px;border:1px solid var(--line-2)}
.su-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;font-size:13.5px}
.su-row + .su-row{border-top:1px solid var(--line-2)}
.su-row span{color:var(--ink-soft);flex:0 0 auto}
.su-row b{text-align:right;overflow-wrap:anywhere}
.ai-chip.su-go{background:var(--accent);border-color:var(--accent);color:#fff}
.su-swatch{display:inline-block;width:14px;height:14px;border-radius:50%;vertical-align:-2px;margin-left:2px;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.su-logo{width:34px;height:34px;object-fit:contain;border-radius:8px;background:#fff;vertical-align:middle}
.napp-mark.has-logo{background:#fff}
.napp-mark.has-logo img{width:100%;height:100%;object-fit:contain}
/* A choice that can be one of several: picked ones fill in and carry a tick. */
.ai-chip.su-pick.on{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink)}
.ai-chip.su-pick.on::before{content:"✓ ";font-weight:700}
/* An answer can be changed: a pencil in front of it, and the answer it
   replaced stays in the thread, crossed out. */
.ai-msg.user[data-step]{position:relative}
.su-edit{position:absolute;right:calc(100% + 6px);top:50%;transform:translateY(-50%);width:30px;height:30px;
  display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:50%;
  background:var(--paper-2);color:var(--ink-soft);cursor:pointer;min-height:0}
.su-edit .ic{width:15px;height:15px}
.su-edit:active{transform:translateY(-50%) scale(.92)}
/* Changing an answer: the bubble itself becomes the field. */
.ai-msg.user.su-editing{width:min(100%,340px)}
.su-editing .su-edit{display:none}
.su-ed{display:flex;align-items:center;gap:6px}
.su-ed .input{flex:1;min-width:0;height:38px;padding:0 10px;border-radius:10px;background:#fff;color:var(--ink)}
.su-ed button{flex:0 0 auto;width:34px;height:34px;min-height:0;padding:0;border:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.su-ed .ic{width:17px;height:17px}
.su-ed-ok{background:#fff;color:var(--accent-ink)}
.su-ed-x{background:rgba(255,255,255,.28);color:inherit}
.su-ed-msg{margin-top:6px;font-size:12.5px;line-height:1.35}
.su-ed-pick{margin:6px 6px 0 0;padding:5px 12px;border:none;border-radius:99px;background:#fff;color:var(--accent-ink);font-weight:600;font-size:12.5px;cursor:pointer}
.su-eye{flex:0 0 auto;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;
  padding:0;border:none;border-radius:50%;background:transparent;color:var(--ink-soft);cursor:pointer;min-height:0}
.su-eye[hidden]{display:none}
.su-eye[aria-pressed="true"]{color:var(--accent)}
.su-eye .ic{width:20px;height:20px}
.napp-chat .ai-chip.su-pick.on{background:var(--accent-soft);box-shadow:0 0 0 1.5px var(--accent)}
.ai-chip:disabled{opacity:.55;pointer-events:none}
/* Clocking on and the day's checklist, live inside a chat message (js/chat-widgets.js). */
.ai-widget{margin-top:8px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px}
.cw-clock{display:flex;flex-direction:column;gap:8px}
.cw-clock.off{gap:2px}
.cw-clock > b{font-size:15px;display:flex;align-items:center;gap:6px}
.cw-status{font-size:14px;font-weight:600}
.cw-status.ok{color:var(--green)}
.cw-status.late{color:var(--red)}
.cw-head{display:flex;justify-content:space-between;align-items:baseline}
.cw-tasks .bar{margin:6px 0 4px}
.cw-task{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.cw-task:last-of-type{border-bottom:none}
.cw-task .grow{min-width:0}
.cw-task .grow b{font-size:14px;overflow-wrap:anywhere}
.cw-task .grow .faint{font-size:12px}
.cw-task.done .grow b{text-decoration:line-through;color:var(--ink-faint)}
.cw-temp{width:72px;flex:0 0 auto;text-align:right}
.cw-cam{flex:0 0 auto;cursor:pointer}
.cw-cam.need{border-color:var(--accent);color:var(--accent)}
.cw-thumb{width:40px;height:40px;object-fit:cover;border-radius:8px;flex:0 0 auto}
.cw-warn{margin-top:6px;color:var(--red)}
/* A shelf photo's count in the chat: one line per item, the figure to check on the right. */
.ai-count-row{align-items:center;padding:4px 0;border-bottom:1px solid var(--line)}
.ai-count-row label{font-size:13.5px;min-width:0;overflow-wrap:anywhere}
.ai-count-row .input{width:92px;flex:0 0 auto;text-align:right}
/* The owner's set-up chat (js/owner-setup.js): one row per part of the app,
   tapped on or off — a chip is too small to say what each one does. */
.os-parts{display:flex;flex-direction:column;gap:6px;margin:4px 0 8px}
.os-part{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:9px 12px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);font:inherit;cursor:pointer}
.os-part .grow{display:flex;flex-direction:column;gap:1px;min-width:0}
.os-part .grow b{font-size:14px}
.os-part .grow .faint{font-size:12px;line-height:1.35}
.os-ic{font-size:20px;flex:0 0 auto}
.os-tick{width:22px;height:22px;border-radius:50%;border:1.5px solid var(--line);flex:0 0 auto;display:grid;place-items:center;color:transparent}
.os-tick .ic{width:14px;height:14px;stroke-width:3}
.os-part.on{border-color:var(--accent);background:var(--accent-soft)}
.os-part.on .os-tick{background:var(--accent);border-color:var(--accent);color:#fff}
.os-part:disabled{opacity:.7;cursor:default}
.os-ups{display:flex;flex-direction:column;gap:6px;margin:4px 0 8px}
.os-up{padding:9px 12px;border-radius:12px;border:1px solid var(--line);background:var(--card)}
.os-up-top{display:flex;align-items:center;gap:10px}
.os-up-top .grow{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
.os-up-top .grow b{font-size:14px}
.os-up-top .grow .faint{font-size:12px;line-height:1.35}
.os-up-btn{flex:0 0 auto;cursor:pointer;white-space:nowrap}
.os-up-list{list-style:none;margin:0;padding:0}
.os-up-list:not(:empty){margin-top:8px;border-top:1px solid var(--line);padding-top:6px}
.os-up-list li{display:flex;align-items:center;gap:8px;font-size:13px;padding:3px 0}
.os-up-list li .grow{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.os-up-list li.up{opacity:.6}
.os-up-x{border:0;background:none;color:var(--muted,#888);padding:2px;cursor:pointer;display:grid;place-items:center}
.os-up-x .ic{width:14px;height:14px}
.ai-form .os-text, .ai-form .os-more{width:100%;margin:2px 0 6px}
/* One row per person: name and email take the room, access and job sit after. */
.os-people{display:flex;flex-direction:column;gap:8px;margin:4px 0 6px}
.os-person{display:grid;grid-template-columns:1fr 1fr auto;gap:8px 6px;align-items:center;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--card)}
.os-person .os-pf{grid-column:1;grid-row:1}.os-person .os-pl{grid-column:2;grid-row:1}.os-person .os-px{grid-column:3;grid-row:1}
.os-person .os-pp{grid-column:1 / -1;grid-row:2}.os-person .os-pe{grid-column:1 / -1;grid-row:3}
.os-person .input{min-width:0;padding:8px 10px;font-size:14px}
/* Access: a two-way switch. Job: chips in one row that scrolls sideways. */
.os-seg{grid-column:1 / -1;justify-self:start;display:inline-flex;gap:2px;padding:3px;border-radius:999px;background:var(--paper-2)}
.os-seg button{min-height:34px;padding:0 16px;border:none;border-radius:999px;background:transparent;color:var(--ink-soft);
  font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;transition:background .18s var(--ease-out),color .18s}
.os-seg button.on{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(33,30,27,.16)}
.os-jobs{grid-column:1 / -1;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0 -8px;padding:0 8px 2px;
  -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.os-jobs::-webkit-scrollbar{display:none}
.os-job{flex:0 0 auto;min-height:34px;padding:0 13px;border:1px solid var(--line);border-radius:999px;background:var(--card);
  color:var(--ink);font:inherit;font-size:13.5px;font-weight:500;white-space:nowrap;cursor:pointer;
  transition:background .18s var(--ease-out),border-color .18s,color .18s}
.os-job.on{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.os-seg button:active,.os-job:active{transform:scale(.96)}
.os-person:not(.is-mgr) .os-all{display:none}
/* The step's own button is not one more chip: the picked job chips are the
   accent colour, so "Next step" is the ink of every other main button. */
.ai-chip.su-go.os-ok, .napp-chat .ai-chip.su-go.os-ok{background:var(--ink);border-color:var(--ink);color:var(--paper)}
/* An invite link to pass on: who it is for, the link, a button to send it. */
.ai-need.os-link{display:block}
.os-link-url{display:block;margin:4px 0 8px;font-size:12.5px;line-height:1.4;color:var(--ink-soft);word-break:break-all}
.os-paste{margin:6px 0;font-size:13px}.os-paste summary{cursor:pointer;color:var(--ink-soft)}
.os-paste .os-text{margin-top:6px}
.ai-form textarea.os-text{resize:vertical;min-height:84px;font-family:inherit;line-height:1.5}
.napp-chat .ai-chip.su-go{background:var(--accent);color:#fff}
.napp-back{width:38px;height:38px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;border:none;background:transparent;color:var(--accent);padding:0;cursor:pointer}
.napp-back .ic{width:24px;height:24px;stroke-width:2.2}
.napp-chat .su-sum{border:none}

/* Start-up: the venue's logo and a welcome, until the first screen is drawn. */
.boot{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:var(--paper);padding:24px;text-align:center;animation:bootIn .4s var(--ease-out)}
.boot-mark{width:92px;height:92px;border-radius:24px;overflow:hidden;background:#fff;margin-bottom:10px;
  box-shadow:0 0 0 .5px rgba(0,0,0,.08), 0 14px 34px -14px rgba(0,0,0,.3)}
.boot-mark img{width:100%;height:100%;object-fit:cover;display:block}
.boot-hi{font-size:26px;font-weight:700;letter-spacing:-.4px;color:var(--ink)}
.boot-sub{font-size:15px;color:var(--ink-soft)}
.boot-dots{display:inline-flex;gap:5px;margin-top:18px}
.boot-dots i{width:6px;height:6px;border-radius:50%;background:var(--ink-faint);animation:aiBlink 1s infinite}
.boot-dots i:nth-child(2){animation-delay:.2s}.boot-dots i:nth-child(3){animation-delay:.4s}
@keyframes bootIn{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: reduce){ .boot{animation:none} .boot-dots i{animation:none} }

/* ===== The iOS app (html.mkr-native, js/native-app.js) =====
   One screen, drawn the way iOS 26 draws a messaging app: a white page, the
   conversation running edge to edge, and the chrome — the venue bar on top,
   the composer below — as Liquid Glass floating over it, so messages slide
   underneath and show through. Glass only on chrome, never glass on glass:
   the field inside the composer and the rows inside the sheet stay solid.
   Reduce Transparency / Increase Contrast turn the glass solid (mkr-solid /
   mkr-contrast, set by NativeFeel.swift). */
html.mkr-native{
  --paper:#FFFFFF; --paper-2:#F2F2F7; --card:#FFFFFF;
  --n-fill:#E9E9EB;                       /* system grey: bot bubble, inputs */
  --n-sep:rgba(60,60,67,.18);
  --n-glass:rgba(255,255,255,.62);
  --n-glass-thick:rgba(250,250,252,.82);
  --n-glass-blur:blur(24px) saturate(190%);
  --n-glass-rim:inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 .5px rgba(255,255,255,.7);
  --n-glass-edge:0 0 0 .5px rgba(0,0,0,.07);
  --n-glass-lift:0 8px 28px -10px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.06);
}
html.mkr-native[data-theme="dark"]{
  --paper:#000000; --paper-2:#1C1C1E; --card:#1C1C1E;
  --n-fill:#26252A; --n-sep:rgba(84,84,88,.6);
  --n-glass:rgba(40,40,44,.58); --n-glass-thick:rgba(30,30,33,.86);
  --n-glass-rim:inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 .5px rgba(255,255,255,.08);
  --n-glass-edge:0 0 0 .5px rgba(0,0,0,.5);
  --n-glass-lift:0 8px 28px -10px rgba(0,0,0,.7);
}
html.mkr-native.mkr-solid, html.mkr-native.mkr-contrast{ --n-glass:var(--card); --n-glass-thick:var(--card); --n-glass-blur:none }
html.mkr-native, html.mkr-native body{background:var(--paper);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Hiragino Sans GB",system-ui,sans-serif;-webkit-font-smoothing:antialiased}
html.mkr-native .ai-fab, html.mkr-native .ai-panel{display:none !important}
/* Only the full-screen chat (.napp, the sign-up conversation) locks the page:
   it scrolls its own thread. Every page in the shell scrolls the document,
   same as the website — a lock here left long pages like Add people stuck. */
html.mkr-native:has(.napp), html.mkr-native:has(.napp) body{height:100%;overflow:hidden}

/* "Easier on a computer" — advice at the top of a wide page, never a link out
   (js/native-app.js desktopNote). */
.desk-note{display:flex;align-items:flex-start;gap:10px;margin:0 0 14px;padding:11px 12px;border-radius:14px;
  background:var(--blue-soft);color:var(--blue);font-size:13.5px;line-height:1.4}
.desk-note > .ic{width:20px;height:20px;flex:0 0 auto;margin-top:1px}
.desk-note b{display:block;font-weight:600}
.desk-note .grow > div{color:var(--ink-soft);margin-top:2px}
.desk-note .grow > div b{display:inline;color:var(--ink)}
.desk-note-x{border:none;background:none;color:inherit;font-size:22px;line-height:1;padding:0 2px;min-height:0;cursor:pointer;opacity:.7}

/* The shared recipe: translucent fill, blur + saturation behind it, a bright
   rim where the light catches, a hairline, and a soft lift off the page. */
.napp-glass, .napp-bar, .napp-sheet{
  background:var(--n-glass);-webkit-backdrop-filter:var(--n-glass-blur);backdrop-filter:var(--n-glass-blur);
  box-shadow:var(--n-glass-rim), var(--n-glass-edge), var(--n-glass-lift)}

.napp{position:fixed;inset:0;background:var(--paper)}
/* The scroll edge: where the thread runs under the bars it fades and blurs
   out, the way iOS 26 does it, instead of showing sharp text in the gaps
   between the floating glass pieces. */
.napp::before,.napp::after{content:"";position:absolute;left:0;right:0;z-index:2;pointer-events:none;
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.napp::before{top:0;height:84px;
  background:linear-gradient(to bottom, var(--paper) 30%, color-mix(in srgb, var(--paper) 0%, transparent));
  -webkit-mask-image:linear-gradient(to bottom,#000 55%,transparent);mask-image:linear-gradient(to bottom,#000 55%,transparent)}
.napp::after{bottom:0;height:calc(78px + env(safe-area-inset-bottom));
  background:linear-gradient(to top, var(--paper) 35%, color-mix(in srgb, var(--paper) 0%, transparent));
  -webkit-mask-image:linear-gradient(to top,#000 55%,transparent);mask-image:linear-gradient(to top,#000 55%,transparent)}
html.mkr-kb .napp::after{height:72px}
/* Venue bar: a glass capsule floating at the top. */
.napp-bar{position:absolute;top:6px;left:10px;right:10px;z-index:3;display:flex;align-items:center;gap:10px;
  padding:6px 6px 6px 7px;border-radius:26px}
.napp-mark{width:38px;height:38px;border-radius:12px;overflow:hidden;flex:0 0 auto;background:#fff;box-shadow:0 0 0 .5px rgba(0,0,0,.1)}
.napp-mark img{width:100%;height:100%;object-fit:cover;display:block}
.napp-title{flex:1;min-width:0;line-height:1.15}
.napp-title b{display:block;font-size:16px;font-weight:600;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.napp-title .netlight{font-size:12px;gap:5px;padding:0;margin-top:2px;min-height:0;height:auto;line-height:1.2;background:none;border:none;box-shadow:none;color:var(--ink-soft)}
.napp-title .netlight .lamp{width:6px;height:6px;box-shadow:none !important}
.napp-sub{display:flex;align-items:center;gap:4px;margin-top:2px;font-size:12px;font-weight:500;color:var(--accent-ink);min-width:0}
.napp-sub span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.napp-sub .ic{width:13px;height:13px;flex:0 0 auto}
.napp-ava{width:38px;height:38px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;
  background:color-mix(in srgb, var(--accent) 14%, transparent);color:var(--accent-ink);font-weight:600;font-size:14px;border:none;cursor:pointer;padding:0}
.napp-ava:active{transform:scale(.92)}
.napp-ava.big{width:56px;height:56px;font-size:20px}
.napp-note{position:absolute;top:70px;left:50%;transform:translateX(-50%);z-index:3;display:flex;align-items:center;gap:6px;white-space:nowrap;
  font-size:12px;font-weight:600;padding:5px 12px;border-radius:99px;color:var(--accent-ink);
  background:var(--n-glass);-webkit-backdrop-filter:var(--n-glass-blur);backdrop-filter:var(--n-glass-blur);box-shadow:var(--n-glass-rim), var(--n-glass-edge)}
.napp-note.warn{color:var(--amber-ink)}
.napp-note.warn:not(.hidden) ~ .napp-note{display:none}
.napp-note.hidden{display:none}
.napp-note .ic{width:14px;height:14px}

/* The conversation runs the full height; the glass sits over its ends. */
.napp-chat{position:absolute;inset:0;display:flex;flex-direction:column}
.napp-chat .ai-page{flex:1;min-height:0;height:auto;border:none;border-radius:0;background:transparent;position:relative}
.napp-chat .ai-page .ai-log{position:absolute;inset:0;padding:80px 14px calc(68px + env(safe-area-inset-bottom));gap:6px;overflow:auto;-webkit-overflow-scrolling:touch}
.napp:has(.napp-note:not(.hidden)) .napp-chat .ai-page .ai-log{padding-top:110px}
.napp-chat .ai-msg{max-width:80%;font-size:16.5px;line-height:1.34;letter-spacing:-.2px;padding:8px 13px;border-radius:20px;border:none;box-shadow:none}
.napp-chat .ai-msg.bot{background:var(--n-fill);color:var(--ink);border-bottom-left-radius:6px}
.napp-chat .ai-msg.user{background:var(--accent);color:#fff;border-bottom-right-radius:6px;margin-top:6px}
.napp-chat .ai-msg.ai-form{max-width:100%}
.napp-chat .ai-msg b{font-weight:600}
/* A card in a bubble is a small grouped form: white on the grey bubble. */
.napp-chat .ai-card{border:none;border-radius:14px;background:var(--card);padding:12px}
.napp-chat .ai-card .input{background:var(--paper-2);border:none;border-radius:10px;height:42px;font-size:16px}
.napp-chat .ai-card .btn{border-radius:12px;min-height:40px}
.napp-chat .ai-chips{gap:6px;margin-top:10px}
.napp-chat .ai-chip{font-size:14.5px;font-weight:500;padding:8px 14px;border:none;border-radius:99px;
  background:var(--card);color:var(--accent-ink);box-shadow:0 0 0 .5px rgba(0,0,0,.06)}
.napp-chat .ai-chip:active{transform:scale(.96)}
.napp-chat .ai-suggest .ai-chip{background:var(--n-fill)}
.napp-chat .ai-jump{color:var(--accent-ink)}
/* A page link leaves the app for the website — say so. */
.napp-chat .ai-jump::after{content:"\00a0\2197\FE0E";font-weight:600}

/* Composer, drawn like Messages: a round glass "+" (camera / photos) and a
   glass capsule beside it holding the field, with the mic at its right end.
   Once there is something typed, the mic gives way to a round send arrow
   inside the capsule. It floats over the bottom of the thread, sitting on the
   home indicator — or on the keyboard, which the app shrinks the page above.
   (js/native-app.js wraps the field, mic and send into .napp-field.) */
.napp-chat .ai-page .ai-input-row{position:absolute;left:12px;right:12px;bottom:calc(6px + env(safe-area-inset-bottom));z-index:3;
  gap:8px;align-items:flex-end;padding:0;border-top:none;border-radius:0;
  background:none;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
html.mkr-kb .napp-chat .ai-page .ai-input-row{bottom:8px}
.napp-chat .ai-attach, .napp-field{
  background:var(--n-glass);-webkit-backdrop-filter:var(--n-glass-blur);backdrop-filter:var(--n-glass-blur);
  box-shadow:var(--n-glass-rim), var(--n-glass-edge), 0 6px 20px -8px rgba(0,0,0,.16)}
.napp-chat .ai-attach{flex:0 0 44px;width:44px;height:44px;border:none;border-radius:50%;color:var(--ink)}
.napp-chat .ai-attach .ic{width:22px;height:22px;stroke-width:2.2}
.napp-chat .ai-attach:active{transform:scale(.92)}
.napp-field{flex:1;min-width:0;display:flex;align-items:center;gap:2px;min-height:44px;border-radius:22px;padding:3px 4px 3px 16px}
.napp-field .input{flex:1;min-width:0;height:38px;padding:0;border:none;border-radius:0;background:transparent;box-shadow:none;font-size:17px;letter-spacing:-.3px}
.napp-field .input:focus{background:transparent;box-shadow:none}
.napp-field .input::placeholder{color:rgba(60,60,67,.45)}
.napp-field .ai-mic{flex:0 0 36px;width:36px;height:36px;border:none;border-radius:50%;background:transparent;color:rgba(60,60,67,.6);padding:0}
.napp-field .ai-mic .ic{width:21px;height:21px}
.napp-field .ai-mic.listening{color:#fff;background:#FF3B30}
.napp-field .ai-mic.speaking{color:#fff;background:var(--accent)}
.napp-field .btn{display:none;flex:0 0 32px;width:32px;min-height:32px;height:32px;padding:0;margin:0 2px;border-radius:50%;
  background:var(--accent);color:#fff;border:none;box-shadow:none;place-items:center}
.napp-field .btn .ic{width:18px;height:18px;stroke-width:2.6}
.napp-field .btn:active{transform:scale(.9)}
.ai-input-row.has-text .napp-field .btn{display:grid;animation:nappPop .18s var(--ease-out)}
.ai-input-row.has-text .napp-field .ai-mic{display:none}
@keyframes nappPop{from{transform:scale(.4);opacity:0}to{transform:none;opacity:1}}

/* Account sheet: thick glass, grouped white rows, like Settings. */
/* Every sheet rises from the bottom edge and sits on it — this one too. */
.napp-sheet-back{position:fixed;inset:0;z-index:50;display:flex;align-items:flex-end;padding:0;
  background:rgba(0,0,0,.18);animation:nappFade .2s ease}
.napp-sheet-back.hidden{display:none}
.napp-sheet{width:100%;max-height:88%;overflow:auto;background:var(--paper);border-radius:22px 22px 0 0;
  -webkit-backdrop-filter:none;backdrop-filter:none;
  padding:8px 14px max(16px, env(safe-area-inset-bottom));animation:nappUp .38s var(--ease-out)}
@keyframes nappUp{from{transform:translateY(105%)}to{transform:none}}
@keyframes nappFade{from{opacity:0}to{opacity:1}}
.napp-grip{width:36px;height:5px;border-radius:99px;background:rgba(0,0,0,.18);margin:2px auto 12px}
.napp-who{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:4px 4px 16px}
.napp-who b{font-size:20px;font-weight:600;letter-spacing:-.3px}
.napp-who .faint{font-size:13.5px;margin-top:1px}
.napp-group{background:var(--card);border-radius:20px;overflow:hidden;margin-bottom:12px}
.napp-row{display:flex;align-items:center;gap:12px;width:100%;min-height:50px;padding:0 16px;border:none;background:none;
  font:inherit;font-size:17px;letter-spacing:-.3px;color:var(--ink);text-align:left;cursor:pointer;position:relative}
.napp-row:active{background:rgba(0,0,0,.05)}
.napp-row + .napp-row::before{content:"";position:absolute;top:0;left:50px;right:0;border-top:.5px solid var(--n-sep)}
.napp-row > .ic:first-child{width:22px;height:22px;color:var(--accent)}
.napp-row span{flex:1}
.napp-row > .ic:last-child:not(:first-child){width:15px;height:15px;color:rgba(60,60,67,.3)}
.napp-row select{border:none;background:none;font:inherit;font-size:17px;color:var(--ink-soft);text-align:right;max-width:52%;position:static;appearance:none;-webkit-appearance:none;box-shadow:none;padding:0;height:auto}
.napp-row.danger, .napp-row.danger .ic{color:#FF3B30 !important}
.napp-switch{appearance:none;-webkit-appearance:none;width:51px;height:31px;border-radius:99px;background:rgba(120,120,128,.16);position:relative;transition:background .2s;flex:0 0 auto;margin:0;cursor:pointer}
.napp-switch::after{content:"";position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 3px 8px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.16);transition:transform .25s var(--ease-out)}
.napp-switch:checked{background:#34C759}
.napp-switch:checked::after{transform:translateX(20px)}
.napp-del{display:block;margin:2px auto 0;border:none;background:none;font:inherit;font-size:14px;color:var(--ink-faint);cursor:pointer}

/* Sign-in: a white first screen with the mark as an app icon, an iOS
   segmented control, filled fields and capsule buttons. */
html.mkr-native .login-wrap{display:block;min-height:100%;height:100%;overflow:auto;padding:0;background:var(--paper)}
html.mkr-native .login-card{max-width:none;min-height:100%;border-radius:0;box-shadow:none;border:none;background:var(--paper);
  padding:60px 20px calc(28px + env(safe-area-inset-bottom));animation:none}
html.mkr-native .login-card .lang-select{top:10px;right:14px;border:none;border-radius:99px;font-size:15px;
  background-color:var(--n-glass);-webkit-backdrop-filter:var(--n-glass-blur);backdrop-filter:var(--n-glass-blur);box-shadow:var(--n-glass-rim), var(--n-glass-edge), 0 4px 14px -6px rgba(0,0,0,.15)}
html.mkr-native .login-card > .row.center{flex-direction:column;text-align:center;gap:14px;margin-bottom:6px}
html.mkr-native .login-card > .row.center b{font-family:inherit !important;font-size:30px !important;font-weight:700;letter-spacing:-.6px !important}
html.mkr-native .login-logo{width:84px;height:84px;border-radius:22px;background:#fff !important;
  box-shadow:0 0 0 .5px rgba(0,0,0,.08), 0 10px 30px -12px rgba(0,0,0,.28) !important}
html.mkr-native .login-tabs, html.mkr-native .seed-hint{display:none}
html.mkr-native .role-pick{display:flex;gap:0;padding:2px;margin:26px 0 20px;background:rgba(118,118,128,.12);border-radius:9px}
html.mkr-native .role-pick button{flex:1;flex-direction:row;justify-content:center;gap:6px;padding:7px 4px;min-height:0;border:none;border-radius:7px;
  background:transparent;font-size:14px;font-weight:500;color:var(--ink);box-shadow:none}
html.mkr-native .role-pick button .em, html.mkr-native .role-pick button .ic{display:none}
html.mkr-native .role-pick button.sel{background:var(--card);font-weight:600;box-shadow:0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04)}
html.mkr-native .login-card .field label{font-size:13px;font-weight:500;color:var(--ink-soft);margin-left:4px}
html.mkr-native .login-card .input{height:50px;font-size:17px;border-radius:14px;background:var(--paper-2);border:none;box-shadow:none}
html.mkr-native .login-card .input:focus{background:var(--paper-2);box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent)}
html.mkr-native .login-card .btn-block{height:54px;border-radius:15px;font-size:17px;font-weight:600}
html.mkr-native .login-card .btn-block:active{transform:scale(.98)}
html.mkr-native .preview-box{margin-top:26px;background:transparent;border:none;padding:0;text-align:center}
html.mkr-native .preview-box p{display:none}
html.mkr-native .preview-box > b{display:block;font-size:13px;color:var(--ink-soft);font-weight:500;margin-bottom:10px}
html.mkr-native .preview-box .row{justify-content:center;gap:10px;flex-wrap:nowrap}
html.mkr-native .preview-box .row .btn{flex:1 1 0;min-width:0;padding:0 8px;gap:6px}
html.mkr-native .preview-box .btn{border:none;border-radius:14px;background:var(--paper-2);font-weight:500;box-shadow:none}
.native-apply{text-align:center;margin-top:10px;font-size:13px;font-weight:600}

/* ===== Phone home: the assistant OR the workbench, never one under the other =====
   With the workbench folded the conversation is the whole home screen — the
   shell stops scrolling and the composer sits just above the tab bar, like
   the assistant's own page. Opened, the workbench takes the screen and scrolls;
   the chat steps aside rather than trailing at the bottom of a long page. */
@media(max-width:720px){
  .show-dash > .home-chat{display:none}
  body:has(.home-split:not(.show-dash)) .main{height:100dvh;overflow:hidden}
  body:has(.home-split:not(.show-dash)) .content{display:flex;flex-direction:column;min-height:0;overflow:hidden;
    padding-bottom:calc(var(--nav-float) + 72px)}
  .home-split:not(.show-dash){flex:1;min-height:0;display:flex;flex-direction:column}
  .home-split:not(.show-dash) > .home-chat{flex:1;min-height:0;display:flex;flex-direction:column}
  .home-split:not(.show-dash) #homeChat{flex:1;min-height:0;display:flex}
  .home-split:not(.show-dash) .home-chat .ai-page{flex:1;height:auto;min-height:0}
  /* The conversation gets the whole screen: no top bar saying "Home" over it
     and no heading inside it — the Dashboard row is the only thing above. The
     bar comes back with the workbench and on every other page. */
  body:has(.home-split:not(.show-dash)) .topbar{display:none}
  .home-split:not(.show-dash) .home-chat-head{display:none}
  .home-split:not(.show-dash) > .home-chat{margin-top:8px}
  /* No tab bar under the conversation either: the Dashboard row is the way
     out, and the bar comes back with the workbench (in the iPhone app the
     native bar follows the same rule — js/native-app.js). The composer drops
     to the bottom edge, just clear of the home indicator. */
  body:has(.home-split:not(.show-dash)) .mobile-nav{display:none}
  .shell:has(.home-split:not(.show-dash))::after{display:none}
  body:has(.home-split:not(.show-dash)) .content{padding-bottom:max(10px, env(safe-area-inset-bottom))}

  /* The conversation, drawn like Messages: no box around it, filled bubbles,
     and a composer of round buttons beside a capsule field. */
  .home-chat .ai-page{border:none;border-radius:0;background:transparent}
  .home-chat .ai-page .ai-log, .ai-page .ai-log{padding:8px 2px 6px;gap:8px}
  .ai-page .ai-msg{font-size:15.5px;line-height:1.42;padding:9px 14px;border-radius:20px;max-width:84%}
  .ai-page .ai-msg.bot{background:var(--paper-2);border:none;border-bottom-left-radius:6px}
  .ai-page .ai-msg.user{border-bottom-right-radius:6px}
  .ai-page .ai-msg.ai-form{max-width:100%}
  .ai-page .ai-chip:not(.su-go){border:none;background:var(--paper-2);padding:8px 14px;font-size:13.5px}
  .ai-page .ai-msg.bot .ai-chip:not(.su-go){background:var(--card)}
  .home-chat .ai-page .ai-input-row, .ai-page .ai-input-row{border-top:none;padding:8px 0 4px;gap:8px;align-items:center}
  .ai-page .ai-attach, .ai-page .ai-mic{flex:0 0 42px;width:42px;height:42px;border:none;border-radius:50%;background:var(--paper-2);color:var(--ink-soft)}
  .ai-page .ai-mic.listening{color:#fff;background:var(--red)}
  .ai-page .ai-mic.speaking{color:#fff;background:var(--accent)}
  .ai-page .ai-input-row .input{height:44px;border:none;border-radius:22px;background:var(--paper-2);padding:0 16px;font-size:16px}
  .ai-page .ai-input-row .input:focus{background:var(--paper-2);box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent)}
  .ai-page .ai-input-row .btn{flex:0 0 44px;width:44px;min-height:44px;height:44px;padding:0;border-radius:50%;display:grid;place-items:center}
  .home-chat-head{margin:6px 2px 4px}
}

/* ===== Purchases: six months of spend, dockets by month, a docket to swipe ===== */
.dkt-chart{background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius-lg);padding:16px 16px 12px;box-shadow:var(--shadow-soft)}
/* Where the money went: a ring of what each item (or category) cost, the
   total and the docket count in its middle, the amounts beside it. */
.dkt-pie-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.dkt-pie-head b{font-size:15px}
.dkt-pie-by{display:inline-flex;background:var(--line-2);border-radius:999px;padding:3px}
.dkt-pie-by button{border:0;background:none;font:inherit;font-size:13px;padding:5px 12px;border-radius:999px;color:var(--ink-soft);cursor:pointer}
.dkt-pie-by button.on{background:var(--card);color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.dkt-pie{display:flex;align-items:center;gap:20px}
.dkt-pie-ring{position:relative;flex:0 0 156px;width:156px;height:156px}
.dkt-pie-ring svg{width:100%;height:100%}
.dkt-pie-mid{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.dkt-pie-mid b{font-size:19px;font-variant-numeric:tabular-nums}
.dkt-pie-mid span{font-size:12px;color:var(--ink-soft)}
.dkt-pie-keys{list-style:none;margin:0;padding:0;flex:1;min-width:0;display:grid;gap:7px}
.dkt-pie-keys li{display:grid;grid-template-columns:10px 1fr auto 36px;align-items:center;gap:8px;font-size:13.5px}
.dkt-pie-keys i{width:10px;height:10px;border-radius:3px}
.dkt-pie-keys span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dkt-pie-keys b{font-variant-numeric:tabular-nums;font-weight:600}
.dkt-pie-keys em{font-style:normal;color:var(--ink-soft);text-align:right;font-variant-numeric:tabular-nums}
.dkt-pie-none{padding:18px 0;text-align:center}
@media (max-width:560px){
  .dkt-pie{flex-direction:column;align-items:stretch}
  .dkt-pie-ring{align-self:center}
}
.dkt-chart-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.dkt-chart-now span{display:block;font-size:13px;color:var(--ink-soft);font-weight:600}
.dkt-chart-now b{display:block;font-size:30px;font-weight:800;letter-spacing:-.02em;line-height:1.1;margin-top:2px}
.dkt-delta{display:flex;flex-direction:column;align-items:flex-end;font-size:15px;font-weight:800;padding:4px 10px;border-radius:12px}
.dkt-delta small{font-size:12px;font-weight:600;opacity:.8}
.dkt-delta.up{background:var(--red-soft);color:var(--red)}
.dkt-delta.down{background:var(--green-soft);color:var(--green)}
.dkt-bars{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;height:150px;margin-top:14px}
.dkt-bar{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;min-height:0;padding:0;border:none;background:none;font:inherit;cursor:pointer}
.dkt-bar:disabled{cursor:default}
.dkt-bar-v{font-size:12px;font-weight:700;color:var(--ink-soft);white-space:nowrap;height:14px}
.dkt-bar-col{flex:1;width:100%;max-width:38px;display:flex;align-items:flex-end;border-radius:8px;background:color-mix(in srgb,var(--ink) 5%,transparent)}
.dkt-bar-col i{display:block;width:100%;border-radius:8px;background:color-mix(in srgb,var(--accent) 45%,transparent);transition:height .4s var(--ease-out)}
.dkt-bar.now .dkt-bar-col i, .dkt-bar.on .dkt-bar-col i{background:var(--accent)}
.dkt-bar.on em{color:var(--accent-ink);font-weight:800}
.dkt-bar em{font-style:normal;font-size:12px;font-weight:600;color:var(--ink-soft)}
.dkt-chart-foot{display:flex;justify-content:space-between;gap:10px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line-2);font-size:12.5px;color:var(--ink-soft)}
.dkt-wall.dkt-rows{display:block;background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius-lg);overflow:hidden;margin-top:14px}
.dkt-month{display:flex;justify-content:space-between;align-items:baseline;padding:12px 16px 6px;background:var(--paper-2);
  font-size:13px;font-weight:700;color:var(--ink-soft)}
.dkt-month b{color:var(--ink);font-variant-numeric:tabular-nums}
.dkt-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px 12px 16px;border:none;background:none;font:inherit;color:var(--ink);text-align:left;cursor:pointer}
.dkt-row + .dkt-row{border-top:1px solid var(--line-2)}
.dkt-row:active{background:var(--paper-2)}
.dkt-row-ic{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:10px;background:var(--paper-2);color:var(--ink-soft)}
.dkt-row-ic.bad{background:var(--amber-soft,#FBF1DA);color:var(--amber,#B7791F)}
.dkt-row-ic .ic{width:18px;height:18px}
.dkt-row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.dkt-row-main b{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dkt-row-main small{font-size:12.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dkt-row-amt{flex:none;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.dkt-go{width:15px;height:15px;flex:none;color:var(--ink-faint)}
.dkt-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:-4px 0 12px;font-size:13.5px;font-weight:700;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.dkt-step{display:grid;place-items:center;width:38px;height:38px;min-height:0;padding:0;border:1px solid var(--line-2);border-radius:50%;background:var(--card);color:var(--ink);cursor:pointer}
.dkt-step:disabled{opacity:.3;cursor:default}
.dkt-step .ic{width:17px;height:17px}
.dkt-page.from-right{animation:dktIn .22s var(--ease-out)}
.dkt-page.from-left{animation:dktInL .22s var(--ease-out)}
@keyframes dktIn{from{transform:translateX(24px);opacity:.3}to{transform:none;opacity:1}}
@keyframes dktInL{from{transform:translateX(-24px);opacity:.3}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){ .dkt-page.from-right,.dkt-page.from-left{animation:none} }
@media (max-width:720px){
  /* The month filter is the bar chart now; supplier and search share a row. */
  .dkt-filters{flex-wrap:nowrap;gap:8px;margin-top:14px}
  .dkt-filters #fMon{display:none}
  .dkt-filters .input{flex:1 1 0;height:44px;font-size:15px}
}

/* Forecast: days of cover as a bar (two weeks fills it). */
.fc-cover{display:block;height:5px;border-radius:99px;margin-top:6px;background:color-mix(in srgb,var(--ink) 8%,transparent);overflow:hidden;min-width:44px}
.fc-cover i{display:block;height:100%;border-radius:inherit;background:var(--green)}
.fc-cover.mid i{background:var(--amber)}
.fc-cover.short i{background:var(--red)}

/* New delivery: on a phone each line is one row — item, quantity, remove —
   instead of a table wider than the sheet. */
@media (max-width:600px){
  .dl-table, .dl-table tbody{display:block;width:100%;min-width:0!important}
  .dl-table thead{display:none}
  .dl-table tr{display:flex;align-items:center;gap:8px;padding:6px 0;border:none}
  .dl-table td{display:block;padding:0!important;border:none!important}
  .dl-table td:first-child{flex:1;min-width:0}
  .dl-table td:nth-child(2){flex:0 0 84px}
  .dl-table td:nth-child(2) .input{padding:0 10px}
  .dl-table td:last-child .btn{width:44px;padding:0}
}

/* ===== Suppliers as a contact book ===== */
.sup-ava{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:50%;
  background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent-ink);font-size:14px;font-weight:700;letter-spacing:.02em}
.sup-ava.big{width:56px;height:56px;font-size:19px}
.sup-d-head{align-items:center}
.sup-d-name{min-width:0}
.sup-d-name h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sup-d-name span{display:block;font-size:13.5px;color:var(--ink-soft);margin-top:2px}
.sup-acts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:2px 0 16px}
.sup-acts a, .sup-acts button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 4px;min-height:0;
  border:none;border-radius:14px;background:var(--paper-2);color:var(--accent-ink);font:inherit;font-size:12px;font-weight:600;text-decoration:none;cursor:pointer}
.sup-acts span{display:grid;place-items:center}
.sup-acts .ic{width:21px;height:21px}
.sup-acts button:disabled{opacity:.7}
/* 拍供货单: what was read, matched, before anything is written. */
.tl-row{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid var(--line-2)}
.tl-row:last-child{border-bottom:0}
.tl-row.tl-off .tl-read, .tl-row.tl-off .tl-price{opacity:.45}
.tl-tick input{width:20px;height:20px;margin:2px 0 0;accent-color:var(--accent)}
.tl-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.tl-read{font-size:14.5px;overflow-wrap:anywhere}
.tl-price{font-size:13px;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.tl-pick{height:38px;font-size:14px}
.sup-acts a:active, .sup-acts button:active{transform:scale(.96)}
/* The phone/email pill buttons say the same as the round actions. */
.sup-acts ~ .sup-links a[href^="tel:"], .sup-acts ~ .sup-links a[href^="mailto:"]{display:none}
.sup-letter{position:sticky;top:0;z-index:1;padding:6px 16px;font-size:12.5px;font-weight:800;color:var(--ink-soft);
  background:var(--paper-2);border-top:1px solid var(--line-2)}
@media (max-width:720px){
  /* The list is the page; a supplier opens as a card over it. */
  .sup-split{display:block}
  .sup-split > .sup-detail{display:none}
  .sup-row{gap:12px;padding:10px 16px;min-height:60px}
  .sup-row:first-child, .sup-letter + .sup-row{border-top:none}
  .sup-row b{font-size:15.5px}
  .sup-row i{font-size:12.5px}
  .sup-row.on{background:none;box-shadow:none}
  .sup-count, .sup-foot{display:none}
  /* Contact card: the facts as a grouped list, a label over each value. */
  .sup-sheet .sup-facts{grid-template-columns:1fr;gap:0;background:var(--paper-2);border-radius:14px;overflow:hidden}
  .sup-sheet .sup-fact{padding:10px 14px}
  .sup-sheet .sup-fact + .sup-fact{border-top:1px solid var(--line-2)}
  .sup-sheet .sup-fact b{font-size:15px}
  .sup-sheet .modal-head h3{visibility:hidden}
}

/* A page heading with its buttons beside it (Points settings, Float rules,
   AI auto-roster + ⋯): on a phone they sit at the right of the title, and the
   line under the title runs full width beneath both — not on rows of their own. */
@media (max-width:600px){
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px}
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > div:first-child{display:contents}
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > div:first-child > h2{grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > div:first-child > p{grid-column:1 / -1;grid-row:2}
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > :last-child{grid-column:2;grid-row:1;flex-wrap:nowrap;gap:6px}
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > :last-child .btn,
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > .btn:last-child{min-height:40px;padding:0 13px;font-size:13.5px}
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > :last-child summary.btn{width:40px;padding:0;justify-content:center}
}

/* Settings on a phone: a list of sections, one opened at a time (owner.js settingsIndex). */
.set-index{background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-soft)}
.set-row{display:flex;align-items:center;gap:14px;width:100%;min-height:56px;padding:8px 14px 8px 14px;border:none;background:none;
  font:inherit;font-size:16px;font-weight:600;color:var(--ink);text-align:left;cursor:pointer;position:relative}
.set-row + .set-row::before{content:"";position:absolute;top:0;left:62px;right:0;border-top:1px solid var(--line-2)}
.set-row:active{background:var(--paper-2)}
.set-ic{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:9px;background:var(--accent);color:#fff}
.set-ic .ic{width:19px;height:19px}
.set-row:nth-child(6n+2) .set-ic{background:#5E8BD8}
.set-row:nth-child(6n+3) .set-ic{background:#4FAE7B}
.set-row:nth-child(6n+4) .set-ic{background:#8E7CC3}
.set-row:nth-child(6n+5) .set-ic{background:#D9A23A}
.set-row:nth-child(6n+6) .set-ic{background:#6B7280}
.set-name{flex:1;min-width:0}
.set-go{width:15px;height:15px;color:var(--ink-faint)}
.set-back{display:inline-flex;align-items:center;gap:4px;margin:0 0 12px -6px;padding:6px 8px;min-height:0;border:none;background:none;
  font:inherit;font-size:16px;font-weight:600;color:var(--accent-ink);cursor:pointer}
.set-back .ic{width:20px;height:20px}
.set-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px}
.set-bar[hidden]{display:none}
.set-bar .set-back{margin:0 0 0 -6px}

/* Availability: a day per line — the day, then one segmented control. */
#avlist{display:flex;flex-direction:column}
.av-row{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:8px 10px;padding:10px 0}
.av-row + .av-row{border-top:1px solid var(--line-2)}
.av-day{font-size:15px;font-weight:700}
.av-segs{display:flex;padding:3px;border-radius:12px;background:color-mix(in srgb,var(--ink) 6%,transparent);gap:2px}
.av-seg{flex:1 1 0;min-width:0;min-height:38px;padding:0 4px;border:none;border-radius:9px;background:none;
  font:inherit;font-size:14px;font-weight:600;color:var(--ink-soft);cursor:pointer;display:grid;place-items:center}
.av-seg .ic{width:17px;height:17px}
.av-seg.on{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.av-seg.on:not(.off){color:var(--accent-ink)}
/* Availability from the venue's own shifts: a chip each, several can be on. */
.av-chips{display:flex;flex-wrap:wrap;gap:6px}
.av-chip{min-height:36px;padding:4px 12px;border-radius:999px;border:1px solid var(--line-2);background:var(--card);color:var(--ink-soft);
  font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px}
.av-chip span{font-weight:500;font-size:12px;opacity:.8;font-variant-numeric:tabular-nums}
.av-chip .ic{width:16px;height:16px}
.av-chip.on{background:var(--accent);border-color:var(--accent);color:#fff}
.av-chip.off.on{background:var(--ink-soft);border-color:var(--ink-soft)}
.av-own{display:none;grid-column:2;align-items:center;gap:8px}
.av-row.is-custom .av-own{display:flex}
.av-own .input{flex:1;min-width:0;height:40px}

/* Switch view: managers or staff, then the person. */
.sw-roles{width:100%}
.sw-roles button{flex:1;justify-content:center}
.sw-people{background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-soft)}
.sw-person{display:flex;align-items:center;gap:12px;width:100%;min-height:62px;padding:10px 16px;border:none;background:none;font:inherit;color:var(--ink);text-align:left;cursor:pointer}
.sw-person + .sw-person{border-top:1px solid var(--line-2)}
.sw-person:active{background:var(--paper-2)}
.sw-p-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.sw-p-main b{font-size:15.5px;font-weight:700}
.sw-p-main small{font-size:12.5px;color:var(--ink-soft)}
.sw-go{width:18px;height:18px;color:var(--ink-faint)}

/* Home floor (js/game-map.js): drawn as the stock kitchen view is. */
.gm-row{text-decoration:none}
.kv-state.warm{background:var(--amber-soft);color:var(--amber-ink)}
.fp .gm-sum{margin-top:14px}
.fp-hello .btn-accent{white-space:nowrap}
@media (max-width:600px){
  .fp-hello{flex-direction:column;align-items:stretch;gap:12px}
  .fp-hello .btn-accent{width:100%;justify-content:center}
  .fp-insight{flex-wrap:wrap}
}

/* My calendar: what is yours — your shifts, a job with your name on it — is outlined. */
.cal-chip.cal-mine{box-shadow:inset 0 0 0 1.5px var(--tone,var(--accent));font-weight:700}
.cal-day:disabled{cursor:default;opacity:1}

/* Sign-up chat: Google is a plain white button with the G, like everywhere else. */
.ai-chip.su-google{background:var(--card)!important;color:var(--ink)!important;font-weight:600;display:inline-flex;align-items:center;gap:8px;
  box-shadow:0 0 0 1px var(--line)!important}

/* The venue's logo at the left of the top bar on a phone, on every page —
   the bar was empty there until the page title scrolled up into it. */
.topbar-mark{display:none}
@media (max-width:720px){
  .topbar-title{display:flex;align-items:center;gap:10px}
  .topbar-mark{display:block;width:34px;height:34px;flex:none;border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 0 0 .5px rgba(0,0,0,.1)}
  .topbar-mark img{width:100%;height:100%;object-fit:cover;display:block}
}

/* Share sheet (U.share): the link, then the apps as a grid of icons. */
.sh-link{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 14px;border-radius:14px;background:var(--paper-2);margin-bottom:16px}
.sh-link span{flex:1;min-width:0;font-size:13px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sh-link .btn{flex:none;min-height:38px}
.sh-link .btn.is-copied{background:var(--green);color:#fff}
.sh-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 8px}
.sh-app{display:flex;flex-direction:column;align-items:center;gap:6px;padding:0;min-height:0;border:none;background:none;
  font:inherit;font-size:12px;font-weight:600;color:var(--ink);text-decoration:none;cursor:pointer;text-align:center}
.sh-app span:last-child{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sh-ic{display:grid;place-items:center;width:54px;height:54px;border-radius:15px;box-shadow:0 2px 6px rgba(0,0,0,.12)}
.sh-app:active .sh-ic{transform:scale(.92)}

/* ===== The venue's colour, everywhere it should show =====
   --accent comes from the venue's logo (js/brand.js), already checked to carry
   white text. Bubbles, selections, today, sheets and the top bar take it —
   tinted, never loud — so the app looks like this restaurant's own. */
:root{
  --brand-wash: color-mix(in srgb, var(--accent) 6%, var(--paper));   /* top bar, sheets */
  --brand-tint: color-mix(in srgb, var(--accent) 10%, var(--card));   /* fills inside sheets */
}
.topbar{background:var(--glass-bar)}
.napp-sheet{background:var(--brand-wash)!important}
.navsheet-foot, .sh-link{background:var(--brand-tint)!important}
/* Later in the file than the scrims' own rules, so no !important: that would
   outrank the colour fade the sheets open with (below). */
.modal-back, .navsheet-back:not(.hidden){background:color-mix(in srgb, var(--accent) 18%, rgba(33,30,27,.32))}
/* What you said, in the venue's colour. */
.ai-msg.user{background:var(--accent);color:#fff}
.ai-msg.user a, .ai-msg.user .ai-jump{color:#fff}
/* What is chosen. */
.viewswitch button.on{background:var(--accent)!important;color:#fff!important;box-shadow:0 4px 12px -6px color-mix(in srgb, var(--accent) 60%, transparent)!important}
.catchip.on{background:var(--accent);border-color:var(--accent);color:#fff}
.cal-cell.is-today .cal-day{background:var(--accent);color:#fff}
.av-seg.on{color:var(--accent-ink)}
.set-row:nth-child(n) .set-ic{background:var(--accent)}
.set-row:nth-child(2n) .set-ic{background:color-mix(in srgb, var(--accent) 70%, #1f2937)}
/* The app mark in the top bar sits on the venue's soft colour. */
.topbar-mark{background:var(--accent-soft)}
/* On a phone the top bar always says which page this is, next to the logo —
   it used to stay blank until the page's own heading scrolled up into it. */
@media (max-width:720px){
  .topbar.large-title:not(.scrolled-title) .topbar-title h1{opacity:1;transform:none}
}

/* Switch view: on a phone the role buttons go under the venue's name — side by
   side they left the name a one-letter column. */
@media (max-width:600px){
  .sv-li{flex-wrap:wrap}
  .sv-li .sv-roles{flex-basis:100%;min-width:0}
  .sv-li .sv-roles .btn{flex:1 1 0;min-width:0;justify-content:center}
}

/* ===== Sheets: Liquid Glass =====
   Everything that slides up over the page — every dialog, and the More
   sheet — is glass tinted with the venue's colour, the page blurred through
   it. Thick, so the text behind never reads through the text on it; the
   fields and grouped rows on it stay solid (never glass on glass).
   Three WebKit rules decide how it is built:
   · The blur is a layer of its own (::before) beside the part that scrolls,
     never on a box with a scroller inside: iOS paints the scrolled-past part
     of a blurred scroller blank. So a dialog never scrolls itself — its body
     does, under a title and buttons that stay put.
   · Nothing over the page may blur, fade (opacity) or filter while a sheet is
     up, or the sheet's blur sees only that layer instead of the page. The
     scrim tints without blurring and fades its colour, not its opacity; the
     sheet rises and sinks without fading.
   · Reduce Transparency, Increase Contrast and no backdrop-filter: solid. */
:root{
  /* Thin enough that the page shows through as colour and shape; the blur,
     not the tint, is what keeps the text behind from reading through. */
  --glass-sheet:color-mix(in srgb, var(--brand-wash) 52%, transparent);
  --glass-blur-sheet:blur(30px) saturate(210%) brightness(1.04);
  --glass-bar:color-mix(in srgb, var(--brand-wash) 58%, transparent);   /* the top bar */
  --glass-scrim:color-mix(in srgb, var(--accent) 8%, rgba(33,30,27,.16));
}
:root[data-theme="dark"]{ --glass-sheet:color-mix(in srgb, var(--brand-wash) 62%, transparent); --glass-blur-sheet:blur(30px) saturate(180%) brightness(.9);
  --glass-bar:color-mix(in srgb, var(--brand-wash) 66%, transparent); --glass-scrim:rgba(0,0,0,.34) }
@media (prefers-reduced-transparency: reduce){ :root, :root[data-theme="dark"]{ --glass-sheet:var(--brand-wash); --glass-blur-sheet:none; --glass-bar:var(--brand-wash) } }
@media (prefers-contrast: more){ :root, :root[data-theme="dark"]{ --glass-sheet:var(--brand-wash); --glass-blur-sheet:none; --glass-bar:var(--brand-wash) } }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){ :root, :root[data-theme="dark"]{ --glass-sheet:var(--brand-wash); --glass-bar:var(--brand-wash) } }
html.mkr-solid, html.mkr-solid[data-theme="dark"], html.mkr-contrast, html.mkr-contrast[data-theme="dark"]{ --glass-sheet:var(--brand-wash); --glass-blur-sheet:none; --glass-bar:var(--brand-wash) }

.modal, .navsheet{position:relative;isolation:isolate;background:transparent!important}
.modal::before, .navsheet::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;
  /* Light lands on the top edge and falls across the upper part, as on the tab bar. */
  background:linear-gradient(to bottom, var(--glass-sheen), transparent 140px), var(--glass-sheet);
  -webkit-backdrop-filter:var(--glass-blur-sheet); backdrop-filter:var(--glass-blur-sheet);
  box-shadow:inset 0 1px 0 var(--glass-rim), inset 0 0 0 .5px color-mix(in srgb, var(--glass-rim) 55%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--glass-rim) 30%, transparent)}

/* A dialog is a column: the title, the body scrolling under it, the buttons. */
.modal{display:flex;flex-direction:column;overflow:hidden}
.modal > .modal-head, .modal > .modal-actions{flex:none}
.modal > .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}

/* The scrim: a tint, no blur, faded by its colour. */
.modal-back, .navsheet-back:not(.hidden){-webkit-backdrop-filter:none;backdrop-filter:none;animation:scrimIn .22s ease}
@keyframes scrimIn{from{background-color:transparent}}

/* In and out by movement alone. */
.modal{animation:glassPop .24s var(--ease-out)}
@keyframes glassPop{from{transform:translateY(14px) scale(.97)}to{transform:none}}
@keyframes glassRise{from{transform:translateY(100%)}to{transform:none}}
@media (max-width:600px){ .modal, .modal.wide{animation:glassRise .34s var(--ease-out)} }
@media (max-width:720px){ .navsheet{animation:glassRise .34s var(--ease-out)} }
.modal-back.closing{background-color:transparent!important;transition:background-color .2s ease;pointer-events:none}
.modal-back.closing .modal{transform:translateY(14px) scale(.97);opacity:0;transition:transform .2s ease-in, opacity .2s ease-in}
@media (max-width:600px){ .modal-back.closing .modal{transform:translateY(100%);opacity:1;transition:transform .22s cubic-bezier(.4,0,1,1)} }
@media (prefers-reduced-motion: reduce){
  .modal, .modal.wide, .navsheet{animation:none}
  .modal-back.closing .modal{transform:none;opacity:0;transition:opacity .15s}
}

/* ===== Page changes =====
   MKR.util.morph (js/util.js) keeps the old page up while the next one is
   drawn, then fades the new one in over it, in place. The old page stays solid
   underneath — fading both at once left a moment where neither was, and the
   page dipped. Nothing is lifted out as its own layer: a bar taken out on its
   own is pictured without its glass blur and flickered, while inside the one
   picture anything that hasn't changed (the top bar, the tabs) simply holds
   still. */
::view-transition-old(root), ::view-transition-new(root){mix-blend-mode:normal}
::view-transition-old(root){animation:none}
::view-transition-new(root){animation:vtIn .2s ease-out both}
@keyframes vtIn{from{opacity:0}}
@media (prefers-reduced-motion: reduce){
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*){animation:none!important}
}

/* Scan a list (stock → add in bulk): busy while the phone reads the photo. */
.bulk-scan.is-busy{opacity:.6;pointer-events:none}
/* The page under a sheet is dimmed only a little, so the glass has colour to
   carry; a heavy scrim left it nothing but its own tint. */
.modal-back, .navsheet-back:not(.hidden){background:var(--glass-scrim)}
/* iPhone app: the phone draws the tab bar (js/native-app.js MKR.nativeTabs);
   the web one stays in the page, unseen, as what that bar reads from. */
html.mkr-native-tabs .mobile-nav{visibility:hidden!important;pointer-events:none!important}

/* Delivery log: the amount, any claim and the status sit together at the end
   of the row; on a phone they go under the supplier, so the name keeps the
   width instead of breaking a word to a line. */
.dlv-end{display:flex;align-items:center;gap:8px;flex:0 0 auto}
/* A row's own buttons: the camera (with how many photos it has) and, while
   it is on its way, the ✓ that signs it in as all received. */
.dlv-tool{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;
  border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink-soft);cursor:pointer}
.dlv-tool svg{width:20px;height:20px}
.dlv-tool i{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;
  background:var(--ink);color:#fff;font-size:10px;font-style:normal;font-weight:700;line-height:16px;text-align:center}
.dlv-tick{border-color:var(--green);color:var(--green)}
.dlv-tick:disabled{opacity:.5}
.dlv-due{padding:10px 14px}
.dlv-due-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.dlv-due-head .faint{font-size:12.5px}
.dlv-due-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.dlv-due-row .meta{flex:1;min-width:0}
.dlv-due-row .meta span.dlv-late,.dlv-late{color:var(--red);font-weight:600}
button.dlv-paid{cursor:pointer;border:0;font-family:inherit}
@media (max-width:600px){
  .dlv-li, .dlv-week .li{flex-wrap:wrap}
  .dlv-li .dlv-end{flex-basis:100%;padding-left:53px;flex-wrap:wrap}
  .dlv-week .li .dlv-end{flex-basis:100%;justify-content:flex-end;flex-wrap:wrap}
}
/* A page heading with two or more buttons: on a phone the buttons take their
   own row under the title and share it, rather than squeezing the title down
   to its first letter. One button still sits beside the title. */
@media (max-width:720px){
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > .row:last-child:has(> .btn + .btn){grid-column:1 / -1;grid-row:3;margin-top:8px}
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > .row:last-child:has(> .btn + .btn) > .btn{flex:1 1 0;min-width:0}
}


/* ===== Switches that slide (js/util.js) =====
   One thumb carries the choice and slides between the options; the buttons go
   clear over it. Held and dragged, the thumb turns into a glass lens — clear,
   bright-rimmed, a size larger — and the option under it lifts, then it
   settles on the nearest one in the venue's colour. */
/* The switch takes the finger: a sideways drag on it moves the thumb, never scrolls. */
.viewswitch{position:relative;isolation:isolate;touch-action:none}
.vs-thumb{position:absolute;top:3px;bottom:3px;left:0;z-index:0;border-radius:999px;pointer-events:none;
  background:var(--accent);box-shadow:0 4px 12px -6px color-mix(in srgb, var(--accent) 60%, transparent);
  transition:transform .3s cubic-bezier(.25,.8,.25,1), width .3s cubic-bezier(.25,.8,.25,1),
    background .25s, box-shadow .25s, scale .25s cubic-bezier(.3,1.35,.45,1), opacity .2s}
.viewswitch.has-thumb > button{position:relative;z-index:1;background:transparent!important;box-shadow:none!important;
  transition:color .25s, transform .25s cubic-bezier(.3,1.35,.45,1)}
.viewswitch.has-thumb > button.on{color:#fff!important}
.vs-thumb.lens{scale:1.14;background:rgba(255,255,255,.3);
  -webkit-backdrop-filter:blur(1px) saturate(190%) brightness(1.1); backdrop-filter:blur(1px) saturate(190%) brightness(1.1);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 1px rgba(255,255,255,.5), inset 0 0 0 .5px rgba(255,255,255,.7),
    0 8px 22px -8px rgba(33,30,27,.45)}
/* As specific as the .on rule above: held, the option the thumb left is plain
   grey like the rest, not white text on the light track (a washed-out ghost). */
.viewswitch.has-thumb.dragging > button{color:var(--ink-soft)!important}
.viewswitch.has-thumb.dragging > button.under{color:var(--ink)!important;transform:scale(1.08)}
:root[data-theme="dark"] .vs-thumb.lens{background:rgba(255,255,255,.14)}
@media (prefers-reduced-motion: reduce){ .vs-thumb{transition:opacity .2s} }

/* Language, with the account rows (More sheet, sidebar foot) — not in the top bar. */
.acct-lang{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:600;color:var(--ink-soft);margin-bottom:10px}
.acct-lang > span{display:inline-flex;align-items:center;gap:8px}
.acct-lang .ic{width:17px;height:17px}
@media (max-width:720px){
  .navsheet-foot .acct-lang{margin:0;min-height:50px;padding:0 16px;color:var(--ink);font-size:15px;border-bottom:1px solid var(--line-2)}
  .navsheet-foot .acct-lang .ic{width:19px;height:19px}
  .navsheet-foot .acct-lang > span{gap:14px}
}
/* Super admin, one restaurant: four counts — two by two on a phone. */
.sa-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.sa-stats .statcell{min-width:0}
@media (max-width:600px){ .sa-stats{grid-template-columns:repeat(2,minmax(0,1fr))} }
.section-head h2 .pill{font-size:12px;vertical-align:4px;margin-left:4px}
/* …and its name, which can be long, gets the whole width on a phone: the
   buttons go on the row under it. */
@media (max-width:720px){
  .section-head.sa-head{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
  .section-head.sa-head > div:first-child{display:block!important}
  .section-head.sa-head h2{white-space:normal!important;overflow:visible!important}
  .section-head.sa-head > .row{display:flex;gap:8px}
  .section-head.sa-head > .row > .btn{flex:1 1 0;min-height:44px}
}
/* Home, list view: the four "running fine" numbers share one row on a phone. */
@media (max-width:600px){
  .today-foot-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .today-foot-metrics a{min-width:0;padding:9px 10px;border-radius:12px}
  .today-foot-metrics a span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .today-foot-metrics a b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
/* A page's tabs on a phone: one row that scrolls sideways, the tab you are on
   underlined — not three ragged rows. Fades at the right edge to say there is
   more. */
@media (max-width:600px){
  .tabbar{flex-wrap:nowrap;gap:2px;overflow-x:auto;overflow-y:hidden;
    -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 28px), transparent);mask-image:linear-gradient(to right, #000 calc(100% - 28px), transparent)}
  .tabbar .tab{flex:0 0 auto;padding:10px 12px;min-height:44px;background:transparent!important}
  .tabbar .tab.active{background:transparent!important}
  .tabbar.at-end{-webkit-mask-image:none;mask-image:none}
}

/* ===== Pickers (js/util.js) =====
   On a phone a <select> is a button in its place; a tap opens a sheet of the
   options. The button keeps the select's own look (its classes come across). */
select.pick-native{display:none!important}
.pick-btn{display:flex;align-items:center;text-align:left;cursor:pointer;font:inherit;color:var(--ink);min-width:0}
.pick-btn.input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236F655B' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:38px}
.pick-btn .pick-val{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pick-btn:disabled{opacity:.55;cursor:default}
.pick-list{display:flex;flex-direction:column;background:color-mix(in srgb, var(--card) 88%, transparent);border-radius:16px;overflow:hidden;margin-bottom:6px}
.pick-opt{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:0 16px;border:none;background:none;
  font:inherit;font-size:16px;color:var(--ink);text-align:left;cursor:pointer;border-bottom:1px solid var(--line-2)}
.pick-opt:last-child{border-bottom:none}
.pick-opt:active{background:var(--paper-2)}
.pick-opt.on{color:var(--accent);font-weight:650}
.pick-opt .ic{width:19px;height:19px;color:var(--accent);flex:none}
.pick-opt:disabled{color:var(--ink-faint)}
.pick-group{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint);padding:14px 16px 6px}

/* Photos: a thumbnail big enough to see what it is, and a tap shows it whole. */
.thumb{cursor:zoom-in}
.task-item img.thumb{width:60px;height:60px;border-radius:12px;flex:none;box-shadow:0 1px 3px rgba(33,30,27,.12)}
.photo-view{position:fixed;inset:0;z-index:600;display:grid;place-items:center;padding:max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:rgba(12,10,9,.92);animation:fade .2s ease;cursor:zoom-out;touch-action:none;overflow:hidden;-webkit-user-select:none;user-select:none}
.photo-view img{transform-origin:center center;will-change:transform;cursor:zoom-in;-webkit-touch-callout:none}
.photo-view.zoomed img{cursor:grab}
.photo-zoom{position:absolute;right:14px;bottom:max(18px, env(safe-area-inset-bottom));display:flex;gap:8px}
.photo-zoom button{width:44px;height:44px;border-radius:50%;border:none;background:rgba(255,255,255,.16);color:#fff;font-size:24px;line-height:1;display:grid;place-items:center;cursor:pointer}
.photo-hint{position:absolute;left:50%;bottom:max(26px, env(safe-area-inset-bottom));transform:translateX(-50%);padding:7px 14px;border-radius:999px;background:rgba(255,255,255,.14);color:#fff;font-size:13px;pointer-events:none;transition:opacity .4s;white-space:nowrap}
.photo-hint.gone{opacity:0}
img[data-zoom]{cursor:zoom-in}
.photo-view img{max-width:100%;max-height:100%;object-fit:contain;border-radius:12px;box-shadow:0 20px 60px -20px rgba(0,0,0,.6);animation:pop .22s var(--ease-out)}
.photo-view.out{opacity:0;transition:opacity .2s}
.photo-x{position:absolute;top:max(14px, env(safe-area-inset-top));right:14px;width:40px;height:40px;border-radius:50%;border:none;
  background:rgba(255,255,255,.16);color:#fff;font-size:24px;line-height:1;display:grid;place-items:center;cursor:pointer}
/* The page never pans sideways on a phone: a row that scrolls sideways (tabs,
   chips) scrolls inside itself, and anything a few pixels too wide is cut off
   rather than letting a swipe drag the whole page. */
@media (max-width:720px){ .main, .content{overflow-x:clip} }


/* ===== The guide (js/tour.js) =====
   The screen dims around the one thing being explained; a card beside it. */
.tour{position:fixed;inset:0;z-index:800;animation:fade .25s ease}
.tour.out{opacity:0;transition:opacity .2s}
.tour-hole{position:fixed;left:50%;top:50%;width:0;height:0;border-radius:16px;pointer-events:none;
  box-shadow:0 0 0 200vmax rgba(14,11,9,.62);
  /* No slide between steps: the dim around it is one screen-sized shadow, and
     moving it repaints the whole screen every frame — the guide stuttered. */
  transition:none}
.tour-hole.on{outline:2px solid rgba(255,255,255,.95);outline-offset:2px}
.tour-card{position:fixed;left:16px;right:16px;max-width:400px;margin:0 auto;padding:18px 18px 14px;border-radius:22px;
  background:var(--card);color:var(--ink);box-shadow:0 24px 60px -18px rgba(0,0,0,.55), inset 0 1px 0 var(--glass-rim);
  transition:opacity .14s ease}
.tour-card.swap{opacity:0}
.tour-n{font-size:12px;font-weight:700;letter-spacing:.04em;color:var(--accent)}
.tour-t{font-size:19px;font-weight:800;margin:4px 0 6px;letter-spacing:-.01em}
.tour-p{font-size:15px;line-height:1.5;color:var(--ink-soft);margin:0}
.tour-act{display:flex;align-items:center;gap:8px;margin-top:16px}
.tour-act .grow{flex:1}
.tour-skip{border:none;background:none;font:inherit;font-size:14px;font-weight:600;color:var(--ink-faint);padding:8px 2px;cursor:pointer}
.tour-act .btn{min-height:44px}
.tour-next{min-width:96px}
/* While the guide points at the tab bar, it is the page's own (the iPhone app's
   native bar steps aside), and it shows even under the home chat. */
@media (max-width:720px){
  html.mkr-tour-nav .mobile-nav{display:flex!important;visibility:visible!important;pointer-events:none!important}
  .navsheet-foot .acct-guide{justify-content:flex-start}
}
/* Under the guide's dim nothing needs to be glass: the blur behind the sheet,
   the bars and the tab bar is the heaviest thing on the screen, and it is all
   covered anyway. Solid while the guide is up. */
html.mkr-touring .navsheet::before, html.mkr-touring .modal::before{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--brand-wash)}
html.mkr-touring .topbar, html.mkr-touring .mobile-nav{-webkit-backdrop-filter:none;backdrop-filter:none}
html.mkr-touring .mobile-nav{background:var(--card)}



/* ===== Settings (js/prefs.js) ===== grouped rows, as in iOS Settings. */
.pf-label{font-size:12.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-faint);margin:22px 4px 8px}
.pf-group{margin-bottom:4px}
.pf-row{position:relative;text-decoration:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.pf-row .set-name{flex:1;min-width:0;display:flex;flex-direction:column;font-size:15.5px;font-weight:600}
.pf-row .set-name small{font-size:12.5px;font-weight:500;color:var(--ink-soft);margin-top:1px}
.pf-row .lang-select{flex:none}
/* Notifications: an on/off switch per kind, as in iOS Settings. */
.pf-bare + .pf-row::before, .pf-row + .pf-bare::before{left:14px}
.pf-state{display:inline-flex;align-items:center;gap:5px;flex:none;font-size:14px;font-weight:600;color:var(--green-ink)}
.pf-state .ic{width:16px;height:16px}
.pf-dim{opacity:.55}
.pf-switch{appearance:none;-webkit-appearance:none;flex:none;position:relative;width:51px;height:31px;margin:0;border-radius:999px;
  background:var(--line);cursor:pointer;transition:background .2s}
.pf-switch::after{content:"";position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.04);transition:transform .22s var(--ease-out)}
.pf-switch:checked{background:var(--green)}
.pf-switch:checked::after{transform:translateX(20px)}
.pf-switch:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.pf-danger, .pf-danger .set-name{color:var(--red)}
.pf-danger .set-ic{background:var(--red)!important}
.pf-theme{flex:none}
.pf-theme button{min-height:34px;padding:0 12px;font-size:13px}
.side-foot .who{margin-bottom:0}
/* Your name at the foot of the menu opens My profile. */
a.who{color:inherit;text-decoration:none;border-radius:12px;padding:6px;margin:-6px;transition:background .15s}
a.who:hover, a.who.on{background:color-mix(in srgb, var(--accent) 16%, transparent);color:var(--ink)}   /* a tint of the menu under it, so the name stays readable in dark mode and with any brand colour */

/* Phone home, workbench open: the Dashboard row is the only header (as in the
   chat), and Floor / Blocks / List is one full-width switch under it, three
   equal parts — not a second bar plus a switch hanging off the right edge. */
@media (max-width:720px){
  body:has(.home-split.show-dash) .topbar{display:none}
  .home-split.show-dash .home-switch{display:block;margin:12px 0 18px}
  .home-split.show-dash .home-switch .viewswitch{display:flex;width:100%}
  .home-split.show-dash .home-switch .viewswitch button{flex:1 1 0;justify-content:center;min-width:0}
}

/* ===== A venue's own colours (js/brand.js) =====
   With a logo uploaded the app wears up to three of its colours: the main one
   (--accent) on whatever is selected — the tab you are on, the switch, badges;
   the second on the buttons and your own chat bubbles; the third, faintly,
   behind the page. Without one, the app keeps its own dark buttons. */
html.mkr-branded .btn-dark{background:var(--brand-2);color:var(--brand-2-text);
  box-shadow:0 6px 16px -10px color-mix(in srgb, var(--brand-2) 70%, transparent)}
html.mkr-branded .ai-msg.user{background:var(--brand-2);color:var(--brand-2-text)}
html.mkr-branded .ai-msg.user a, html.mkr-branded .ai-msg.user .ai-jump{color:var(--brand-2-text)}
html.mkr-branded .nav-item.active{background:var(--accent);color:#fff}
html.mkr-branded body{
  background:
    radial-gradient(900px 560px at 0% -6%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%),
    radial-gradient(820px 520px at 100% 8%, color-mix(in srgb, var(--brand-2) 10%, transparent), transparent 58%),
    radial-gradient(760px 520px at 50% 108%, color-mix(in srgb, var(--brand-3) 12%, transparent), transparent 60%),
    var(--paper);
  background-attachment:fixed;
}
html.mkr-branded .login-wrap{background:
  radial-gradient(900px 520px at 12% -8%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 55%),
  radial-gradient(900px 520px at 90% 108%, color-mix(in srgb, var(--brand-3) 12%, transparent), transparent 55%),
  linear-gradient(180deg, var(--paper-2), var(--paper))}

/* The alerts bell, top right of every page (js/router.js shell). On a phone
   it takes the place of the connection light, which only shows when there is
   something to say — offline, or catching up (js/net.js). */
.topbar-title{display:flex;align-items:center;gap:10px}
.topbar-right{display:flex;align-items:center;gap:10px}
@media (max-width:720px){ .topbar-right:has(.topbar-bell) .netlight.online{display:none} }
.topbar-bell{position:relative;display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:12px;
  color:var(--ink);background:var(--card);box-shadow:0 0 0 .5px var(--line), 0 1px 3px rgba(33,30,27,.06);text-decoration:none}
.topbar-bell .ic{width:20px;height:20px}
.topbar-bell.on{background:var(--accent-soft);color:var(--accent-ink)}
.topbar-bell:active{transform:scale(.94)}
/* The count sits on the bell's shoulder, inside the button — not hanging off
   its corner over the edge. */
.tb-badge{position:absolute;top:3px;left:50%;margin-left:1px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;
  background:var(--red);color:#fff;font-size:12px;font-weight:800;line-height:13px;text-align:center;border:2px solid var(--card)}
/* The Dashboard row is the phone's; anywhere wider it must not exist at all —
   on a computer it would take the home grid's first cell and push the chat
   down a row, below the screen. */
.home-top{display:none}
@media (max-width:720px){
  .home-top{display:flex;align-items:stretch;gap:8px}
  .home-top .home-fold{flex:1;min-width:0}
  .home-top .topbar-bell{display:grid;width:46px;height:auto;min-height:44px;border-radius:var(--radius)}
}

/* New delivery (js/deliveries.js newModal): the lines as rows of equal height. */
.dl-new label .faint{font-weight:500}
.dl-head{display:flex;justify-content:space-between;padding:0 62px 6px 2px;font-size:12.5px;font-weight:600;color:var(--ink-soft)}
.dl-lines{display:flex;flex-direction:column;gap:8px}
.dl-row{display:flex;align-items:center;gap:8px}
.dl-row .dl-item{flex:1;min-width:0;height:48px}
.dl-row .dl-ord{flex:none;width:76px;height:48px;text-align:center;padding:0 8px}
.dl-del{flex:none;display:grid;place-items:center;width:44px;height:48px;border:none;border-radius:12px;background:transparent;color:var(--ink-faint);cursor:pointer}
.dl-del .ic{width:18px;height:18px}
.dl-del:active{background:var(--red-soft);color:var(--red)}
.dl-add{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:46px;margin:10px 0 14px;
  border:1.5px dashed var(--line);border-radius:14px;background:transparent;font:inherit;font-size:14.5px;font-weight:600;color:var(--accent-ink);cursor:pointer}
.dl-add .ic{width:17px;height:17px}

/* Counting-up numbers (js/util.js): fixed-width digits, so the number doesn't
   jitter sideways as it runs. */
.odo-run{font-variant-numeric:tabular-nums;white-space:nowrap}

/* The page's add button, top right beside the title (js/util.js). Anything
   else the header carries goes on a line of its own underneath. */
.section-head.has-corner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:12px;row-gap:4px}
/* The title shares the top line with the button, at the button's height, and
   the line under it runs the full width — so a tab with no add button (Prices,
   Counts) has the same header as one with, and nothing below it moves. */
.section-head.has-corner > div:first-child{display:contents}
.section-head.has-corner > div:first-child > h2{grid-column:1;grid-row:1;min-height:40px;display:flex;align-items:center;min-width:0}
.section-head.has-corner > div:first-child > :not(h2){grid-column:1 / -1}
.section-head.has-corner > :not(:first-child):not(.sh-corner){grid-column:1 / -1;margin-top:8px}
.section-head.has-corner > .row:empty{display:none}
.sh-corner{grid-column:2;grid-row:1;display:flex;align-items:center;gap:8px}
.sh-corner .omenu summary{min-height:36px;padding:0 10px}
/* A switch left on its own in a row runs the full width, in equal parts. */
.tab-actions > .viewswitch:only-child{display:flex;width:100%}
/* A page's own switch (calendar.js tabs()) never grows past the screen: one
   wider than the phone dragged the whole page sideways and clipped its last
   option. The options share the width and a long word ends in "…". */
.tab-actions > .viewswitch.vs-fit{max-width:100%;min-width:0}
.viewswitch.vs-fit > button{flex:1 1 auto;min-width:0;display:block;text-align:center;
  overflow:hidden;text-overflow:ellipsis;padding:0 8px;line-height:44px;min-height:0}
@media (max-width:430px){ .viewswitch.vs-fit > button{padding:0 6px;font-size:13px} }
.tab-actions > .viewswitch:only-child > button{flex:1 1 0;justify-content:center}
.sh-add{white-space:nowrap}

/* Small square icon buttons for row actions (rename, remove). */
.icon-btn{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);
  background:var(--card);color:var(--ink-soft);cursor:pointer;flex:none}
.icon-btn .ic{width:18px;height:18px}
.icon-btn.danger{color:var(--red)}
.icon-btn:active{transform:scale(.94)}
/* A ⋯ menu as a sheet: the icon leads each row. */
.pick-opt.pick-act{justify-content:flex-start;gap:12px}
.pick-opt.pick-act .ic{width:20px;height:20px;color:var(--ink-soft)}


/* ===== Restaurant settings → Features & access (views/owner.js settings) =====
   One row per feature: its name, then On · Managers · Staff in fixed columns,
   so a glance down a column answers "what can staff see". */
.mod-table{margin:0 -4px 14px}
.mod-table:last-child{margin-bottom:0}
.mod-row{display:grid;grid-template-columns:minmax(0,1fr) 58px 64px 52px;align-items:center;column-gap:4px;padding:10px 4px;border-top:1px solid var(--line-2)}
.mod-row.mod-head{border-top:none;padding:4px 4px 6px;font-size:12px;font-weight:700;color:var(--ink-faint);letter-spacing:.02em}
.mod-row.mod-head .mod-name{font-size:12.5px;text-transform:uppercase;letter-spacing:.05em}
.mod-name{min-width:0;display:flex;flex-direction:column;gap:4px}
.mod-name b{font-size:14.5px;font-weight:600;line-height:1.3}
.mod-row.off .mod-name b{color:var(--ink-soft)}
.mod-cell{display:flex;justify-content:center;align-items:center;text-align:center}
.mod-tick{width:22px;height:22px;margin:0;accent-color:var(--accent);cursor:pointer}
.mod-tick:disabled{opacity:.3;cursor:default}
.mod-row .pf-switch{transform:scale(.85)}
.mod-fam-name{border:0;background:none;padding:0;font:inherit;color:inherit;text-align:left;cursor:pointer}
.mod-fam-name b{display:flex;align-items:center;gap:4px}
.mod-chev{display:inline-flex;transition:transform .15s}
.mod-chev .ic{width:16px;height:16px}
.mod-chev.open{transform:rotate(90deg)}
.mod-fam-sum{font-size:12.5px;padding-left:20px}
.mod-kids>.mod-row{padding-left:24px;background:var(--paper-2)}
.mod-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0 0 12px;padding:4px;border-radius:12px;background:var(--paper-2);border:1px solid var(--line-2)}
.mod-tabs button{border:0;background:none;border-radius:9px;padding:9px 8px;font:inherit;font-size:13.5px;font-weight:600;line-height:1.25;color:var(--ink-soft);cursor:pointer}
.mod-tabs button.on{background:var(--card);color:var(--ink);box-shadow:var(--shadow-soft)}
.mod-hidden{display:flex;flex-wrap:wrap;gap:4px}
.mod-note{font-size:12px;line-height:1.35}
.mod-people{align-self:flex-start;display:inline-flex;align-items:center;gap:4px;border:0;background:none;padding:2px 0;font:inherit;font-size:12.5px;font-weight:600;color:var(--ink-soft);cursor:pointer}
.mod-people svg{width:14px;height:14px}
.mod-people{flex-wrap:wrap;text-align:left}
.mod-who{color:var(--ink);font-weight:500;margin-right:6px}
.mod-people > span:last-child{text-decoration:underline;text-underline-offset:2px}

/* Swipe from the left edge to go back (js/swipe-back.js, iOS app): what is
   leaving casts a shadow on what it uncovers, as an iOS page does. */
.swipe-back-on{box-shadow:-10px 0 28px -8px rgba(0,0,0,.28)}
/* Pull to refresh (js/pull-refresh.js): a round button that comes down with
   the finger, turns once it is far enough to count, and spins while fetching. */
.ptr{position:fixed;left:50%;top:calc(env(safe-area-inset-top) + 8px);z-index:60;width:38px;height:38px;margin-left:-19px;
  border-radius:50%;background:var(--card);box-shadow:var(--shadow);display:grid;place-items:center;color:var(--ink-soft);
  opacity:0;pointer-events:none;transition:opacity .15s, transform .2s}
.ptr.on{opacity:1;transition:opacity .15s}
.ptr.ready{color:var(--accent)}
.ptr .ic{width:20px;height:20px}
.ptr.spin .ic{animation:ptr-spin .8s linear infinite}
@keyframes ptr-spin{to{transform:rotate(360deg)}}

/* ===== Under the clock (iOS app) =====
   The page runs up under the status bar (WebViewController pins the web view
   to the top of the screen). Everything in the page starts below the clock;
   the band behind the clock is the top bar's own glass over the same page
   background, so the two read as one bar for any venue's colours. A page
   without a top bar (the chat, sign-in) simply continues up under it. */
html.mkr-native body{padding-top:env(safe-area-inset-top)}
html.mkr-native .topbar{top:env(safe-area-inset-top)}
html.mkr-native .napp{top:env(safe-area-inset-top)}
html.mkr-native body::before{content:"";position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top);
  z-index:21;pointer-events:none}
html.mkr-native.mkr-bar body::before{background:var(--glass-bar);
  -webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur)}
/* Screens sized to the whole screen are now the screen less the clock. */
html.mkr-native .login-wrap, html.mkr-native .shell, html.mkr-native .boot{min-height:calc(100dvh - env(safe-area-inset-top))}
html.mkr-native body.ai-fullpage .main{height:calc(100dvh - env(safe-area-inset-top))}
/* A full-screen chat clips .main, which makes .main the top bar's sticky box:
   the clock's offset above was then counted twice — the bar sat a clock's
   height low, over the conversation's own header, with a blank band above. */
html.mkr-native body.ai-fullpage .topbar{top:0}
@media (max-width:720px){
  html.mkr-native body:has(.home-split:not(.show-dash)) .main{height:calc(100dvh - env(safe-area-inset-top))}
}

/* The join page on a phone: the form near the top, not in the middle of a
   screen the keyboard is about to cover half of. */
@media (max-width:560px){
  .join-wrap{place-items:start center;padding-top:max(20px, env(safe-area-inset-top))}
  .join-wrap .login-card{margin-bottom:45vh}       /* room to scroll the last field above the keyboard */
}

/* The guide's "Ask the assistant" step can be tried for real (js/tour.js):
   taps reach the box in the hole, and while typing the guide steps aside. */
.tour.tour-live{pointer-events:none}
.tour.tour-live .tour-card{pointer-events:auto}
.tour.tour-typing .tour-card{opacity:0;pointer-events:none}
.tour.tour-typing .tour-hole{box-shadow:none;outline-color:transparent}

/* Starter chat, "When you can work" (js/onboard-chat.js): a row per day, four
   choices each, the one picked filled in. */
.ob-week{display:flex;flex-direction:column;gap:6px}
.ob-dayrow{display:flex;align-items:center;gap:8px}
.ob-dayname{flex:0 0 34px;font-size:13.5px;font-weight:700;color:var(--ink)}
.ob-slots{flex:1;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;min-width:0}
.ob-slot{min-height:36px;padding:0 2px;border-radius:10px;border:1px solid var(--line);background:var(--card);
  font:inherit;font-size:12.5px;font-weight:600;color:var(--ink-soft);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ob-slot.on{background:var(--accent);border-color:var(--accent);color:#fff}
.ob-slot[data-s="off"].on{background:var(--paper-2);border-color:var(--line);color:var(--ink-faint)}

/* The bell: every item opens the page it is about (views/owner.js alerts). */
.al-go{color:inherit;text-decoration:none;cursor:pointer;min-width:0}
.al-go:active{opacity:.7}
.al-arrow{font-weight:700;opacity:.6;margin-left:2px}

/* A grid column or a select never wider than the screen: a long option
   ("团队主管 —— 管排班、库存和团队") used to push the Add people card past the
   right edge on a phone, fields and all. */
.grid > *{min-width:0}
select.input{max-width:100%;min-width:0;text-overflow:ellipsis}

/* Rostering: tap a day (js/roster-view.js dayModal) — a row per person, their
   word on that day, what they're already on, and a button per shift. */
.rg-dayhead{cursor:pointer;text-decoration:underline dotted;text-underline-offset:4px}
.dayroster{display:flex;flex-direction:column;gap:10px}
.dr-row{padding:10px 0;border-top:1px solid var(--line-2)}
.dr-row:first-of-type{border-top:none}
.dr-row.dr-dim .dr-who b{color:var(--ink-soft)}
.dr-who{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.dr-on{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.dr-slots{display:flex;flex-wrap:wrap;gap:6px}
/* A banner directly under the clock (preview, offline, viewing as someone):
   the strip is that banner's colour, so the two read as one band. */
html.mkr-native.mkr-banner-top body::before{background:var(--clock-bg);-webkit-backdrop-filter:none;backdrop-filter:none}

/* Documents to sign (js/staff-docs.js) */
.doc-text{max-height:42vh;overflow:auto;padding:12px 14px;border:1px solid var(--line-2);border-radius:12px;background:var(--paper-2);font-size:14px;line-height:1.6;margin-bottom:10px}
.doc-img{display:block;max-width:100%;border-radius:10px;border:1px solid var(--line-2);margin-bottom:10px}

/* Signup chat: how far along, and the voice button (js/signup-chat.js). */
.su-bar{display:flex;gap:4px;margin-top:5px}
.su-bar i{flex:1;height:3px;border-radius:2px;background:var(--line-2);overflow:hidden}
.su-bar b{display:block;height:100%;background:var(--accent);border-radius:2px;transition:width .35s}
.su-grp{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent-ink);margin-bottom:4px}
.su-top{display:flex;align-items:center;gap:10px;margin-top:12px}
.su-prog{flex:1;min-width:0}
.su-ptxt{font-size:12.5px;font-weight:600;color:var(--accent-ink)}
.su-voice{flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;border:none;border-radius:99px;padding:8px 12px;
  font-size:13px;font-weight:600;background:var(--accent-soft);color:var(--accent-ink);cursor:pointer;white-space:nowrap}
.su-voice .ic{width:16px;height:16px}
.su-voice[hidden]{display:none}
.su-voice:disabled{opacity:.4}
.su-voice.on{background:var(--red);color:#fff;animation:mic-pulse 1.2s ease-in-out infinite}
@media (prefers-reduced-motion: reduce){ .su-voice.on{animation:none} .su-bar b{transition:none} }

/* A link that belongs in the app, opened in a phone's browser (js/app.js
   appDoor): a holding card over everything while it is handed across. */
.app-door{position:fixed;inset:0;z-index:900;display:grid;place-items:center;padding:24px;background:var(--paper)}
.app-door-card{width:100%;max-width:360px;display:grid;gap:12px;justify-items:center;text-align:center}
.app-door-card img{border-radius:18px;margin-bottom:4px}
.app-door-card > b{font-size:20px;letter-spacing:-.2px}
.app-door-card p{margin:0 0 6px;color:var(--ink-soft);font-size:14.5px;line-height:1.5}

/* A number or email with its one-tap actions (U.contact). */
.ct{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}
.ct-acts{display:inline-flex;flex-wrap:wrap;gap:4px}
.ct-btn{display:inline-flex;align-items:center;gap:3px;padding:3px 9px;border-radius:999px;border:1px solid var(--line-2);
  background:var(--card);color:var(--ink);font-size:12px;font-weight:600;text-decoration:none;cursor:pointer;white-space:nowrap;line-height:1.4}
.ct-btn:hover{border-color:var(--accent);color:var(--accent)}

/* "A new version is ready": the tab was opened before the last update. */
.update-bar{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:9999;
  padding:12px 20px;border-radius:999px;border:none;background:var(--accent);color:#fff;font-weight:700;font-size:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.25);cursor:pointer}
.update-bar{max-width:calc(100vw - 32px);line-height:1.35;text-align:center}
/* A release that names the oldest version still allowed (<meta name="mkr-web-min">):
   anything older is covered, and the only thing to do is update. */
.update-wall{position:fixed;inset:0;z-index:10000;background:rgba(15,18,24,.72);display:flex;align-items:center;justify-content:center;padding:16px}
.update-wall-card{background:var(--card);color:var(--ink);border-radius:18px;padding:22px 20px;max-width:380px;width:100%;box-shadow:0 20px 50px rgba(0,0,0,.35)}
.update-wall-card b{display:block;font-size:18px;margin-bottom:8px}
.update-wall-card p{margin:0 0 16px;font-size:14.5px;line-height:1.5;color:var(--ink-soft)}
.update-wall-card .btn{width:100%;min-height:48px;font-size:16px}

/* Who ticked a task off, and when. */
.task-by b{color:var(--ink);font-weight:700}
#tDay{margin-bottom:16px}

/* Starter-details deadline on My profile — the date is the headline */
.onb-due{display:flex;gap:18px;align-items:stretch;margin-bottom:16px;padding:16px 18px;border-radius:16px;
  border:2px solid var(--amber,#d9a43a);background:color-mix(in srgb,var(--amber,#d9a43a) 14%,transparent)}
.onb-due .onb-date{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:130px;padding:10px 14px;
  border-radius:12px;background:var(--amber,#d9a43a);color:#1d1606;text-align:center}
.onb-due .onb-k{font-size:12px;font-weight:600;opacity:.8}
.onb-due .onb-date b{font-size:28px;line-height:1.15;font-weight:800;white-space:nowrap}
.onb-due .onb-left{font-size:14px;font-weight:700;margin-top:2px}
.onb-due .onb-body{flex:1;display:flex;flex-direction:column;justify-content:center;gap:6px;font-size:15px}
.onb-due .onb-body > b{font-size:17px}
.onb-due .onb-bar{height:8px;border-radius:99px;background:color-mix(in srgb,currentColor 15%,transparent);overflow:hidden}
.onb-due .onb-bar i{display:block;height:100%;background:var(--amber,#d9a43a)}
.onb-due .onb-why{font-size:13px;opacity:.8}
.onb-due.soon,.onb-due.late{border-color:var(--red,#e5484d);background:color-mix(in srgb,var(--red,#e5484d) 14%,transparent)}
.onb-due.soon .onb-date,.onb-due.late .onb-date{background:var(--red,#e5484d);color:#fff}
.onb-due.soon .onb-bar i,.onb-due.late .onb-bar i{background:var(--red,#e5484d)}
@media (max-width:600px){.onb-due{flex-direction:column}.onb-due .onb-date{flex-direction:row;gap:10px;flex-wrap:wrap}}

/* Add task: who it's for, ticked */
.ta-list{display:flex;flex-direction:column;border:1px solid var(--line,rgba(127,127,127,.25));border-radius:12px;max-height:260px;overflow:auto}
.ta-row{display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;font-size:15px;border-top:1px solid var(--line,rgba(127,127,127,.18))}
.ta-row:first-child{border-top:0}
.ta-row input{width:18px;height:18px;accent-color:var(--accent,#8b1a1a);flex:none}
.ta-row.ta-all{font-weight:600}
.ta-row.ta-daily{border:1px solid var(--line,rgba(127,127,127,.25));border-radius:12px}
.task-tools .btn-icon{padding:0 10px}
/* Task rows: time first, then the note and photos under the name */
.task-time{display:inline-block;font-variant-numeric:tabular-nums;font-weight:700;font-size:12.5px;padding:1px 7px;margin-right:8px;border-radius:6px;
  background:color-mix(in srgb,var(--accent,#8b1a1a) 18%,transparent);vertical-align:1px}
.task-note{margin-top:6px;font-size:13px;padding:6px 10px;border-radius:8px;background:color-mix(in srgb,currentColor 7%,transparent);white-space:pre-wrap}
.task-photos{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.task-photos .thumb{width:56px;height:56px;object-fit:cover;border-radius:8px;cursor:zoom-in}
.task-tools{flex-wrap:wrap;justify-content:flex-end}
@media (max-width:600px){.task-tools .btn span{display:none}}
/* Setup chat — the restaurant in detail (js/owner-setup.js) */
.os-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media (max-width:560px){.os-two{grid-template-columns:1fr}}
.os-sub{font-size:12.5px;font-weight:700;color:var(--muted,#888);margin:10px 0 4px}
.os-hours{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.os-hrow{display:grid;grid-template-columns:44px 74px 1fr;align-items:center;gap:8px;padding:6px 8px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.os-hrow.shut{opacity:.65}
.os-hday{font-size:14px}
.os-htog{font:inherit;font-size:12.5px;padding:5px 8px;border-radius:99px;border:1px solid var(--line);background:transparent;color:var(--muted,#888);cursor:pointer}
.os-htog.on{background:var(--accent-soft);border-color:var(--accent);color:var(--ink)}
.os-hranges{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.os-hr{display:inline-flex;align-items:center;gap:4px}
.os-hr .input,.os-shead .input[type=time]{width:auto;min-width:0;height:34px;padding:0 6px}
.os-hx,.os-hadd,.os-dcopy{font:inherit;font-size:12px;border:0;background:transparent;color:var(--accent);cursor:pointer;padding:4px}
.os-shifts{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}
.os-shift{border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--card);display:flex;flex-direction:column;gap:6px}
.os-shead{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.os-prog{display:flex;align-items:center;gap:8px;margin:6px 0 2px;font-size:12.5px;font-weight:600;color:var(--accent,currentColor)}
.os-progbar{flex:0 0 64px;height:5px;border-radius:99px;background:var(--line-2);overflow:hidden}
.os-progbar i{display:block;height:100%;border-radius:inherit;background:currentColor;transition:width .3s}
.os-shead .os-slw{flex:1 1 140px;position:relative;display:block;margin:0}
.os-shead .os-sl{width:100%;height:34px;padding-right:32px}
.os-slpen{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;color:var(--ink-faint);pointer-events:none}
.os-slpen svg{width:15px;height:15px}
.os-srow{display:flex;align-items:flex-start;gap:8px}
.os-srow > .faint{flex:none;width:52px;font-size:12px;padding-top:6px}
.os-srow .ai-chips{margin:0;gap:4px}
.os-dchip{font:inherit;font-size:12.5px;padding:4px 9px;border-radius:99px;border:1px solid var(--line);background:transparent;color:var(--ink);cursor:pointer}
.os-dchip.on{background:var(--accent);border-color:var(--accent);color:#fff}
.os-dwrap{overflow-x:auto;max-width:100%}
.os-dem{border-collapse:collapse;font-size:13px;min-width:100%}
.os-dem th{font-weight:600;font-size:12px;padding:4px 2px;color:var(--muted,#888)}
.os-dem td{padding:2px;text-align:center}
.os-dem td.os-dg{text-align:left;white-space:nowrap;padding-right:8px}
.os-dem tr.os-dsl td{text-align:left;padding-top:10px}
.os-dn{width:44px;height:32px;padding:0 4px;text-align:center}
.os-person .os-emp{margin-top:6px}
/* While the owner sets the restaurant up, the conversation has the home page
   to itself (a phone's home already is the conversation; the Dashboard row goes). */
.home-split.setup-mode > .home-dash,.home-split.setup-mode > .home-top{display:none}
.home-split.setup-mode .home-chat-head .faint,.home-split.setup-mode .home-chat-size{display:none}
.os-later{margin-left:auto}
@media(min-width:721px){
  .home-split.setup-mode{display:block}
  .home-split.setup-mode > .home-chat{margin:0 auto;max-width:720px;position:static;height:auto;display:block}
  .home-split.setup-mode .home-chat .ai-page{height:calc(100vh - 170px);min-height:420px}
}
.home-split.setup-mode .ai-msg.ai-form{max-width:100%;width:100%}
/* Typing into a form in the chat (setup, onboarding): the ask-me bar and its
   camera / mic / send would sit between the field and the keyboard, covering
   what is being filled in. It comes back when the field is left. */
:is(.ai-page,.ai-panel):has(.ai-form :is(input,textarea,select):focus) > .ai-input-row{display:none}
@media(max-width:560px){
  .os-hrow{grid-template-columns:44px 1fr}
  .os-htog{justify-self:start}
  .os-hranges{grid-column:1/-1}
  .os-hr{display:flex;width:100%}
  .os-hr .input,.os-shead .input[type=time]{flex:1 1 0;width:0;min-width:0}
  .os-shead .os-slw{flex:1 1 100%}
  .os-srow{flex-direction:column;gap:4px}
  .os-srow > .faint{width:auto;padding-top:0}
  .os-hr .input,.os-shead .input[type=time]{font-size:14px;padding:0 4px}
  .os-shead .os-sx{height:34px;padding:0 10px}
}

/* One title per page, in the top bar, on every screen. The page's own big
   heading said the same thing again and left the bar empty until it scrolled
   away — and on the web the half-scrolled heading showed through under the
   bar. The heading and its one-line blurb go; the page's own buttons and
   figures beside them stay. (js/router.js largeTitle() adds .large-title only
   when the heading names the same page as the bar.) */
.topbar.large-title .topbar-title h1{opacity:1!important;transform:none!important}
.topbar.large-title + .content > .section-head:first-child > div:first-child > :is(h2, p),
.topbar.large-title + .content > :first-child > .section-head:first-child > div:first-child > :is(h2, p){display:none}
.topbar.large-title + .content > .section-head:first-child:has(> div:only-child),
.topbar.large-title + .content > :first-child > .section-head:first-child:has(> div:only-child){display:none}
.topbar.large-title + .content > .section-head:first-child > div:first-child:not(:has(> :not(h2, p))),
.topbar.large-title + .content > :first-child > .section-head:first-child > div:first-child:not(:has(> :not(h2, p))){display:none}

/* The venue's © line sits at the foot of the page beside the chat, not
   halfway up it under the last tile. */
@media(min-width:1200px){
  .home-dash{min-height:calc(100vh - 120px);display:flex;flex-direction:column}
  .main:has(> .offbar:not(.hidden)) .home-dash{min-height:calc(100vh - 160px)}
  .home-dash > :last-child, .home-dash > :last-child > .tiles-wrap{flex:1;display:flex;flex-direction:column}
  .home-dash .home-foot{margin:auto 0 0;padding-top:22px}
}

/* Availability as a grid: a day per row, a shift per column, tap the box. */
.avg{display:flex;flex-direction:column}
.avg-row{display:grid;grid-template-columns:40px repeat(calc(var(--n) + 3), minmax(0,1fr));align-items:center;gap:6px}
.avg-day{padding:5px 0}
.avg-day + .avg-day{border-top:1px solid var(--line-2)}
.avg-head{padding:0 0 6px;align-items:end}
.avg-h{display:flex;flex-direction:column;align-items:center;text-align:center;font-size:12px;font-weight:700;color:var(--ink-soft);line-height:1.25;min-width:0}
.avg-h b{font-weight:700;color:var(--ink);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all}
.avg-h small{font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
.avg-h .ic{width:15px;height:15px}
.avg-d{font-size:14px;font-weight:700}
.avg-box{height:36px;width:100%;max-width:64px;justify-self:center;border-radius:10px;border:1.5px solid var(--line-2);background:var(--card);
  color:transparent;cursor:pointer;display:grid;place-items:center;padding:0}
.avg-box .ic{width:17px;height:17px}
.avg-box.on{background:var(--accent);border-color:var(--accent);color:#fff}
.avg-box.off.on{background:var(--ink-soft);border-color:var(--ink-soft)}
.avg-own-btn{color:var(--ink-faint)}
.avg-none{text-align:center;color:var(--ink-faint);font-size:13px}
.avg-day .av-own{grid-column:auto;margin:6px 0 2px 46px}
.avg-day.is-custom .av-own{display:flex}

/* "Nothing here" as one quiet line, not a tall dashed box. */
.none-line{display:flex;align-items:center;gap:10px;color:var(--ink-soft);font-size:14px;padding:6px 2px}
.none-line .ic{width:18px;height:18px;color:var(--green)}

/* More: the page you are on stands out — a filled row, not just red text. */
.ns-item.on{background:var(--accent-soft);color:var(--accent-ink);border-radius:14px;border-bottom-color:transparent;font-weight:800;padding-left:10px;padding-right:10px}
.ns-item.on .ns-ic{background:var(--accent);color:#fff}

/* New delivery: scan the docket, first thing in the form. */
.dl-scan{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;margin-bottom:14px;cursor:pointer;font-weight:700}
.dl-scan .ic{width:20px;height:20px}
.dl-scan.busy{opacity:.6;pointer-events:none}

/* Task photos: six in the row, the sixth says how many more; tap for all. */
.task-ph{position:relative;padding:0;border:none;background:none;cursor:zoom-in;border-radius:8px;overflow:hidden;line-height:0}
.task-ph.more span{position:absolute;inset:0;display:grid;place-items:center;background:rgba(33,30,27,.55);color:#fff;font-size:17px;font-weight:800;line-height:1}
.task-gallery{display:flex;flex-direction:column;gap:10px}
.task-gallery img{width:100%;height:auto;border-radius:12px;display:block}

/* Calendar "Who is doing it": the team list under the box (js/calendar.js whoCombo) */
.who-combo{position:relative}
.who-list{position:absolute;left:0;right:0;top:100%;margin-top:4px;z-index:30;min-width:180px;max-height:232px;
  overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:6px;
  background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);
  display:flex;flex-direction:column;animation:pop .16s var(--ease-out)}
.who-list[hidden]{display:none}
.who-opt{display:flex;align-items:center;width:100%;min-height:44px;padding:0 12px;border-radius:10px;
  font-size:15px;font-weight:600;text-align:left;color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}
.who-opt:hover,.who-opt.on{background:var(--paper-2)}
.tg-item{position:relative}
/* Over a photo: dark glass and white words, readable on any picture and in
   either theme (white-on-white in dark mode left a blank box). */
.tg-del{position:absolute;right:8px;bottom:8px;background:rgba(20,18,16,.62)!important;color:#fff!important;
  border-color:rgba(255,255,255,.25)!important;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.tg-del .ic{color:#fff}

/* Cash-up on a phone: "$100" on one line, not "$10" over "0". */
.cu-den{white-space:nowrap}
@media(max-width:600px){ .cu-row{grid-template-columns:46px minmax(0,1fr)} .cu-den{font-size:14px} }

/* Cash-up: a saved count stays up for 30 minutes — what stays in the till and
   what goes in the bank bag, big enough to follow while putting the money away. */
.cu-done{border:2px solid var(--green);margin-bottom:12px;scroll-margin-top:84px}
.cu-done-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
.cu-done-who{min-width:0}
.cu-done-who b{display:block;font-size:17px;font-weight:800;color:var(--ink)}
.cu-done-who span{font-size:13px;color:var(--ink-soft);font-variant-numeric:tabular-nums}
.cu-done-split{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:560px){ .cu-done-split{grid-template-columns:1fr;gap:10px} }
.cu-done-pile{border-radius:12px;padding:12px 14px;background:var(--paper-2);border:1px solid var(--line-2)}
.cu-done-pile.keep{background:var(--green-soft);border-color:transparent}
.cu-done-k{font-size:13px;font-weight:700;color:var(--ink-soft)}
.cu-done-pile.keep .cu-done-k{color:var(--green)}
.cu-done-v{font-size:28px;font-weight:800;color:var(--ink);line-height:1.15;margin:2px 0 8px;font-variant-numeric:tabular-nums}
.cu-done-list{list-style:none;margin:0;padding:0}
.cu-done-list li{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:7px 0;border-top:1px solid var(--line-2);font-variant-numeric:tabular-nums}
.cu-done-list li b{font-size:20px;font-weight:800;color:var(--ink)}
.cu-done-list li span{font-size:13.5px;color:var(--ink-soft)}
.cu-done-until{font-size:12px;margin-top:10px}

/* Deliveries: a week of dates, a dot where something came or is coming. */
.dlv-cal{padding:14px 14px 10px}
.dlv-cal-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.dlv-cal-head b{flex:1;font-size:15px}
.dlv-cal-nav{width:34px;height:34px;border-radius:10px;border:1px solid var(--line-2);background:var(--card);font-size:20px;line-height:1;color:var(--ink-soft);cursor:pointer}
.dlv-cal-today{height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--line-2);background:var(--card);font-size:13px;font-weight:600;cursor:pointer}
.dlv-cal-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.dlv-cal-day{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0 5px;border:none;border-radius:12px;background:none;cursor:pointer;color:var(--ink)}
.dlv-cal-day span{font-size:12px;color:var(--ink-soft);font-weight:600}
.dlv-cal-day b{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}
.dlv-cal-day i{width:6px;height:6px;border-radius:50%;background:transparent}
.dlv-cal-day i.dot{background:var(--accent)}
.dlv-cal-day.today b{color:var(--accent)}
.dlv-cal-day.on{background:var(--accent);color:#fff}
.dlv-cal-day.on span, .dlv-cal-day.on b{color:#fff}
.dlv-cal-day.on i.dot{background:#fff}
.dlv-cal-list{margin-top:10px;border-top:1px solid var(--line-2);padding-top:6px}
.dlv-cal-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 10px;width:100%;padding:9px 2px;border:none;background:none;text-align:left;cursor:pointer;color:var(--ink)}
.dlv-cal-row + .dlv-cal-row{border-top:1px solid var(--line-2)}
.dlv-cal-row b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dlv-cal-row span:not(.pill){grid-column:1;font-size:12.5px;color:var(--ink-soft)}
.dlv-cal-row .pill{grid-column:2;grid-row:1 / span 2}
.dlv-cal-none{font-size:13px;padding:8px 2px}

/* A small text button inside a label ("Edit list"). */
.linkbtn{border:none;background:none;padding:0;font:inherit;font-size:13px;font-weight:700;color:var(--accent);cursor:pointer}
/* An empty list that is also the way to add the first one. */
.empty-add{display:block;width:100%;cursor:pointer;font:inherit;color:inherit}
.empty-add .em{color:var(--accent)}
.empty-add:active{transform:scale(.99)}

/* My profile: your initials, beside the bell. */
.tb-ava{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent-ink);font-size:12px;font-weight:800;letter-spacing:.02em}
.topbar-me.on .tb-ava{background:var(--accent);color:#fff}
.topbar-me .tb-badge{left:auto;right:-4px;top:-4px;margin:0}
/* "Something to finish on your profile": a red dot, not a bare "!". */
.who-dot{flex:none;width:10px;height:10px;border-radius:50%;background:var(--red);box-shadow:0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent);margin-right:4px}

/* Alerts: a plain card, dark words, a coloured dot for how urgent it is. */
.al-item{display:flex;align-items:flex-start;gap:12px;padding:14px 14px 14px 16px;margin-bottom:10px;background:var(--card);
  border:1px solid var(--line-2);border-radius:16px;color:var(--ink);font-size:14px;line-height:1.5}
.al-item.read{opacity:.55}
.al-item b{font-size:15px;color:var(--ink)}
.al-item .al-go{color:var(--ink);text-decoration:none}
.al-dot{flex:none;width:11px;height:11px;border-radius:50%;margin-top:6px}
.al-dot.red{background:var(--red);box-shadow:0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent)}
.al-dot.amber{background:#E0A11B;box-shadow:0 0 0 4px rgba(224,161,27,.18)}
.al-dot.grey{background:var(--ink-faint)}
.al-item .row{flex:none}

/* On a computer, pop-ups have the room: a form a little wider, and one with
   a table of lines in it (confirm a delivery, a docket, a count) wide enough
   that its last column isn't cut off. Phones keep the sheet from the bottom. */
@media (min-width:900px){
  .modal{max-width:560px}
  .modal:has(table), .modal:has(.dc-row), .modal:has(.dl-row){max-width:min(860px, 92vw)}
  .modal.wide{max-width:min(860px, 92vw)}
}

/* The photo box is the photo button. */
.shot-add{flex:1;align-self:stretch;justify-content:center;min-height:50px;cursor:pointer;font-size:14px;font-weight:600;color:var(--ink-soft)}
.shot-add .ic{width:20px;height:20px}
.shots:has(.shot-add){cursor:pointer}
.shots:has(.shot-add):active{transform:scale(.99)}
.shot-more{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:1.5px dashed var(--line);border-radius:10px;
  color:var(--ink-soft);cursor:pointer;font-weight:800;background:var(--card)}
.shot-more .ic{width:20px;height:20px}

/* No rubber-band past the top or bottom of the page on a Mac trackpad: the
   whole app slid away and showed a gap under it. Scroll areas inside the page
   (sheets, the chat) keep their own containment. */
@media (hover:hover) and (pointer:fine){
  html, body{overscroll-behavior:none}
  .main, .sidebar, .content{overscroll-behavior-y:none}
}
/* The iPhone app: the page doesn't rubber-band past its top or bottom. A
   bounce carried the sticky top bar and the order page's bar at the foot
   with it, so they looked loose and shook. Pull to refresh is the app's own
   (js/pull-refresh.js), so nothing is lost; the website keeps Safari's. */
html.mkr-native, html.mkr-native body{overscroll-behavior-y:none}
/* An SOP read out in the chat: its steps, numbered. */
.ai-steps{margin:8px 0 8px 20px;padding:0}
.ai-steps li{margin:4px 0;line-height:1.55}

/* iPhone sign-in: one still screen. The page was a little taller than the
   phone, so it scrolled and slid up under the clock, language button and
   all. Now the document is exactly the screen and the form is tightened to
   fit; only a phone too small for it scrolls, inside, without the bounce. */
html.mkr-native:has(.login-wrap) body{height:100dvh;overflow:hidden}
html.mkr-native .login-wrap{height:calc(100dvh - env(safe-area-inset-top));min-height:0;overflow-y:auto;overscroll-behavior:none}
html.mkr-native .login-card{box-sizing:border-box;padding-top:34px}
html.mkr-native .login-logo{width:72px;height:72px;border-radius:19px}
html.mkr-native .login-card > .row.center{gap:10px}
html.mkr-native .login-card > .row.center b{font-size:27px !important}
html.mkr-native .login-card .field{margin-bottom:12px}

/* iPad: the sign-in is a column in the middle of the screen, not a phone
   form stretched edge to edge. */
@media (min-width:700px){
  html.mkr-native .login-wrap{display:flex;align-items:center;justify-content:center}
  html.mkr-native .login-card{width:100%;max-width:460px;min-height:0;margin:0 auto;padding:34px 24px 28px}
}
/* A Save with nothing to save. */
.btn.is-saved, .btn.is-saved:disabled{opacity:.5;filter:saturate(.4);cursor:default;box-shadow:none}
.btn.is-saved .ic{width:15px;height:15px}


/* The temperature, typed on the task's own row; the box ticks it off. */
.task-temp{display:inline-flex;align-items:center;gap:4px}
.task-temp .input{width:76px;height:38px;padding:0 10px;text-align:right}
.task-temp span{font-size:13px;color:var(--ink-soft)}

/* iPad on its side: the mark and the name on the left, the form on the
   right — one screen, nothing below the fold. */
@media (min-width:700px) and (orientation:landscape){
  html.mkr-native .login-card{max-width:860px;display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1fr);column-gap:56px;align-items:center}
  html.mkr-native .login-card > *{grid-column:2}
  html.mkr-native .login-card > #loginBrand{grid-column:1;grid-row:1 / span 8;align-self:center}
  html.mkr-native .login-card > #loginBrand b{font-size:30px !important}
  html.mkr-native .login-card > #loginBrand .login-logo{width:84px;height:84px;border-radius:22px}
}
@media (min-width:700px) and (orientation:landscape){
  html.mkr-native .login-card{padding:18px 24px 14px}
  html.mkr-native .login-logo{width:56px;height:56px;border-radius:15px}
  html.mkr-native .login-card > .row.center{gap:6px;margin-bottom:2px}
  html.mkr-native .login-card > .row.center b{font-size:23px !important}
  html.mkr-native .login-card .field{margin-bottom:8px}
  html.mkr-native .login-card .field .faint{display:none}
  html.mkr-native .login-card .input{height:44px}
  html.mkr-native .login-card .btn-block{height:46px}
  html.mkr-native .login-card .lang-select{top:8px}
}

/* Cash-up signature: the switch for owners and managers, and the signature on the saved count. */
.cu-signset{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--ink-soft);cursor:pointer}
.cu-signset input{width:18px;height:18px;accent-color:var(--accent)}
.cu-done-sig{display:flex;align-items:center;gap:10px;margin-top:10px}
.cu-done-sig img{height:44px;background:#fff;border-radius:8px;border:1px solid var(--line-2)}
/* Changes the cloud refused: a red lamp, and the pill opens what they were. */
.netlight.stuck{cursor:pointer;color:var(--red)}
.netlight.stuck .lamp{background:var(--red);box-shadow:0 0 0 4px color-mix(in srgb, var(--red) 18%, transparent)}

/* The page's own buttons and badges, up in the top bar beside the title
   (js/router.js barActions); the row they left in the page goes. */
.tb-actions{display:none}
.topbar.has-actions .tb-actions{display:flex;align-items:center;gap:8px;margin-left:auto;min-width:0;flex-wrap:nowrap}
.topbar.has-actions .topbar-right{margin-left:12px}
.topbar.has-actions .tb-actions .btn{height:36px;padding:0 14px;font-size:13.5px;white-space:nowrap}
.topbar.has-actions + .content > .section-head:first-child,
.topbar.has-actions + .content > :first-child > .section-head:first-child,
.topbar.has-actions + .content .section-head[data-bar-head]{display:none !important}
@media (max-width:720px){
  .topbar.has-actions .tb-actions{gap:8px}
  .topbar.has-actions .topbar-right{margin-left:8px}
  .topbar.has-actions .tb-actions :is(.btn.tb-icon, .omenu > summary){width:38px;height:38px;min-height:38px;padding:0;display:grid;place-items:center;
    border:0;border-radius:12px;color:var(--ink);background:var(--card);box-shadow:0 0 0 .5px var(--line), 0 1px 3px rgba(33,30,27,.06)}
  .topbar.has-actions .tb-actions .omenu[open] > summary{background:var(--ink);color:var(--paper)}
  .topbar.has-actions .tb-actions .ic{width:20px;height:20px}
  .topbar.has-actions .tb-actions .pill{white-space:nowrap;font-size:12.5px;padding:5px 10px}
}

/* Setup, staff working hours: a day that is on reads in either theme — a
   filled switch with white words, not light words on a light pill in dark
   mode — and "+ break" is plain readable text, not dark red on dark. */
.os-htog.on{background:var(--accent);border-color:var(--accent);color:#fff}
.os-hadd{color:var(--ink-soft);font-weight:600}

/* Clock-in location: the restaurant's pin and the circle staff clock in within (js/geo-picker.js) */
.gp{display:flex;flex-direction:column;gap:8px;margin:4px 0 6px}
.gp-map{position:relative;height:230px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--paper-2);z-index:0}
.gp-msg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:16px;font-size:13px;color:var(--ink-soft);background:var(--paper-2);z-index:500}
.gp-msg[hidden]{display:none}
.gp-map .leaflet-control-attribution{font-size:10px}
:root[data-theme="dark"] .gp-map .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.85) contrast(.9)}
:root[data-theme="dark"] .gp-map .leaflet-control-attribution{background:rgba(0,0,0,.55);color:#ccc}
:root[data-theme="dark"] .gp-map .leaflet-control-attribution a{color:#ddd}
.gp-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.gp-tip{font-size:12px}
.gp-rad{display:flex;justify-content:space-between;align-items:baseline;font-size:14px;margin-top:2px}
.gp-val{font-size:16px}
.gp-sl{display:flex;align-items:center;gap:10px}
.gp-range{flex:1;accent-color:var(--accent);min-width:0}
.gp-step{width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink);font-size:18px;line-height:1;flex:none}
.gp-note{font-size:12px}
.task-note .ic{width:15px;height:15px;vertical-align:-3px;opacity:.75}

/* Task editor, laid out like a task in To Do / Reminders (js/task-plan.js) */
.tp{display:flex;flex-direction:column;gap:12px}
.tp-name{font-size:17px;font-weight:600}
.tp-groups{display:flex;gap:6px;background:var(--paper-2);padding:4px;border-radius:12px}
.tp-seg{flex:1;border:0;background:transparent;color:var(--ink-soft);padding:8px 6px;border-radius:9px;font:inherit;font-weight:600;cursor:pointer}
.tp-seg.on{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.18)}
.tp-sec{border:1px solid var(--line);border-radius:12px;background:var(--card);overflow:hidden}
.tp-row{display:flex;align-items:center;gap:10px;padding:10px 12px;min-height:46px;border-top:1px solid var(--line-2);color:var(--ink)}
.tp-sec > .tp-row:first-child,.tp-steps:empty + .tp-row,.tp-steps .tp-row:first-child{border-top:0}
.tp-row > .ic{color:var(--ink-soft)}
.tp-row .input{width:auto;min-width:0;padding:6px 8px;font-size:14px}
.tp-in{flex:1;min-width:0;border:0;background:transparent;color:var(--ink);font:inherit;font-size:15px;outline:none;padding:4px 0}
.tp-addstep{color:var(--ink-soft)}
.tp-addstep .tp-in::placeholder{color:var(--ink-soft)}
.tp-dot{width:16px;height:16px;border-radius:50%;border:1.5px solid var(--ink-faint);flex:none}
.tp-dot.on{background:var(--accent);border-color:var(--accent)}
.tp-x{border:0;background:transparent;color:var(--ink-faint);padding:4px;cursor:pointer;display:inline-flex}
.tp-x .ic{width:15px;height:15px}
.tp-custom{padding:0 12px 10px;display:flex;flex-direction:column;gap:8px}
.tp-custom[hidden],.tp-every[hidden],.tp-days[hidden]{display:none}
.tp-every{display:flex;align-items:center;gap:8px;font-size:14px}
.tp-every .input{width:auto;padding:6px 8px}
.tp-n{width:64px!important}
.tp-days{display:flex;gap:6px;flex-wrap:wrap}
.tp-day{flex:1;min-width:40px;border:1px solid var(--line);background:transparent;color:var(--ink-soft);border-radius:999px;padding:7px 4px;font:inherit;font-size:13px;cursor:pointer}
.tp-day.on{background:var(--accent);border-color:var(--accent);color:#fff}
.tp-next{padding:0 12px 10px;font-size:12.5px}
.tp-next:empty{display:none}
.tp-sops{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px}
.tp-sops:not(:empty){padding-bottom:10px}
.tp-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 6px 5px 10px;border-radius:999px;background:var(--accent-soft);color:var(--accent-ink);font-size:13px}
.tp-who{padding:0 12px 10px}
.tp-details{min-height:84px}

/* The day's list: Opening / Closing / Other, details, steps, SOPs */
.task-group{display:flex;justify-content:space-between;align-items:baseline;margin:18px 4px 8px;font-size:15px}
.task-group:first-of-type{margin-top:4px}
.task-details{margin-top:6px;font-size:13.5px;color:var(--ink-soft);white-space:pre-wrap}
.task-steps{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.task-step{display:flex;align-items:center;gap:8px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:13.5px;padding:4px 0;text-align:left;cursor:pointer}
.task-step.done span:last-child{text-decoration:line-through;color:var(--ink-faint)}
.task-step-box{width:18px;height:18px;border-radius:50%;border:1.5px solid var(--ink-faint);display:inline-flex;align-items:center;justify-content:center;flex:none}
.task-step.done .task-step-box{background:var(--green);border-color:var(--green);color:#fff}
.task-step-box .ic{width:12px;height:12px}
.task-sops{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.task-sop{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);background:transparent;color:var(--accent-ink);border-radius:999px;padding:4px 10px;font:inherit;font-size:12.5px;cursor:pointer}
.task-sop .ic{width:14px;height:14px}
.task-rep .ic{width:14px;height:14px;vertical-align:-2px;color:var(--ink-faint)}
.tplan{margin-top:16px;padding:6px 14px}
.tplan summary{cursor:pointer;padding:10px 0;font-size:15px}
.tplan-row{display:flex;align-items:center;gap:10px;width:100%;border:0;border-top:1px solid var(--line-2);background:transparent;color:var(--ink);font:inherit;padding:12px 0;text-align:left;cursor:pointer}
.tplan-row .grow{display:flex;flex-direction:column;gap:2px}
.tplan-row .faint{font-size:12.5px}
.tp-row select.input{min-width:118px}
/* A row's own tighter padding (task rows, cash-up rows) took away the room
   the arrow sits in, so it was drawn over "Never" and "Link an SOP…". */
.pick-btn.input{padding-right:32px!important;background-position:right 11px center!important}
.tp-row .pick-btn.input{max-width:62%}
/* An empty time on iOS drew as a sliver with nothing in it. */
.tp-row input[type=time].input{min-width:104px;min-height:36px}
/* A tall photo (a phone screenshot, a long docket) shows whole on a computer:
   the grid cell has no height of its own, so 100% let it run off the screen. */
.photo-view img{max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
.task-gallery img{width:auto;max-width:100%;max-height:72dvh;margin:0 auto;object-fit:contain;background:var(--paper-2)}

/* A task's photos: a stack to swipe through, like a set of photos in Messages
   (js/tasks.js rowExtras / bindRows). Tap for all of them, big. */
.task-stack{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin-top:10px}
.ts-label{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;padding:2px 0;color:var(--accent-ink);font:inherit;font-size:13.5px;font-weight:700;cursor:pointer}
.ts-label .ic{width:16px;height:16px}
.ts-cards{position:relative;width:132px;height:168px;margin-right:28px;touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none}
.ts-card{position:absolute;inset:0;border-radius:16px;overflow:hidden;background:var(--paper-2);border:1px solid var(--line);
  box-shadow:0 8px 20px -10px rgba(0,0,0,.5);transform-origin:center;
  transform:translateX(calc(var(--o,0) * 16px)) scale(calc(1 - var(--o,0) * .06));z-index:calc(10 - var(--o,0));
  transition:transform .28s var(--ease-out, ease), opacity .28s}
.ts-card img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.ts-card.gone{opacity:0;transform:translateX(-36px) scale(.9);pointer-events:none}
.ts-card.far{opacity:0}
.ts-row{display:flex;align-items:center;gap:10px}
.ts-nav{width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none;padding:0}
.ts-nav:disabled{opacity:.3;cursor:default}
.ts-nav .ic{width:16px;height:16px}
.ts-dots{display:flex;gap:2px;justify-content:center;width:132px}
.ts-dots button{width:13px;height:13px;border:0;padding:4px;background:transparent;cursor:pointer;display:inline-flex}
.ts-dots button::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--line)}
.ts-dots button.on::before{background:var(--ink-soft)}
/* Arrows are for a mouse; a finger swipes. */
@media (hover:none){ .ts-nav{display:none} }
@media (hover:hover){ .ts-dots{margin-left:44px} }

/* On a phone the buttons go in a row under the task, so the name and the
   photos have the width instead of a narrow column beside four buttons. */
@media (max-width:720px){
  .task-item{flex-wrap:wrap;align-items:flex-start}
  .task-item > .grow{flex:1 1 calc(100% - 60px);min-width:0}
  .task-item > .task-tools{flex:1 1 100%;padding-left:47px;justify-content:flex-start;gap:8px}
}
/* A task's conversation: the assigner and the assignee reply to each other
   (js/tasks.js). On the row the last two; tap for all of it and a reply box. */
.task-thread{margin-top:8px;display:flex;flex-direction:column;gap:6px;cursor:pointer;max-width:560px}
.tt-more{font-size:12px;color:var(--ink-faint)}
.tt-msg{padding:7px 11px;border-radius:12px;background:color-mix(in srgb,currentColor 7%,transparent);font-size:13.5px;max-width:100%}
.tt-msg.assigner{background:color-mix(in srgb,var(--accent) 14%,transparent);border-top-left-radius:4px}
.tt-msg.assignee{border-top-right-radius:4px}
.tt-who{font-size:12px;font-weight:700;color:var(--ink-faint);margin-bottom:2px}
.tt-who span{font-weight:500}
.tt-text{white-space:pre-wrap;word-break:break-word}
.tt-n{font-size:12px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--accent);color:#fff;display:inline-flex;align-items:center;justify-content:center}
.tt-win{display:flex;flex-direction:column;gap:12px}
.tt-list{display:flex;flex-direction:column;gap:8px;max-height:52dvh;overflow:auto;padding:2px}
.tt-row{display:flex;align-items:flex-start;gap:4px;max-width:85%}
.tt-row.assignee{align-self:flex-end;flex-direction:row-reverse}
.tt-row .tt-msg{flex:1}
.tt-x{border:0;background:transparent;color:var(--ink-faint);padding:4px;cursor:pointer;display:inline-flex}
.tt-x .ic{width:13px;height:13px}
.tt-empty{font-size:13px;padding:8px 0}
.tt-send{display:flex;gap:8px;align-items:flex-end}
.tt-send textarea{flex:1;min-height:44px;resize:vertical}
.tt-send .btn{height:44px;width:48px;padding:0;display:inline-flex;align-items:center;justify-content:center}

/* Subscribe in your calendar (js/cal-subscribe.js) */
.cs-how{font-size:14px;margin:0 0 12px}
.cs-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;background:var(--card);overflow:hidden}
.cs-list > .cs-row,.cs-group{border-top:1px solid var(--line-2)}
.cs-list > :first-child{border-top:0}
.cs-row{display:flex;align-items:center;gap:10px;padding:10px 12px;min-height:56px}
.cs-row > .ic{color:var(--ink-soft);flex:none}
.cs-row .grow{display:flex;flex-direction:column;min-width:0}
.cs-row .grow .faint{font-size:12.5px}
.cs-head{display:flex;align-items:center}
.cs-head .cs-row{flex:1;padding-left:0}
.cs-arrow{border:0;background:transparent;color:var(--ink-soft);width:36px;height:56px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none}
.cs-arrow .ic{transition:transform .2s}
.cs-arrow.open .ic{transform:rotate(90deg)}
.cs-people{background:var(--paper-2);padding:2px 0 8px 36px}
.cs-people .cs-row{min-height:50px;border-top:1px solid var(--line-2)}
.cs-ava{width:28px;height:28px;font-size:12px;flex:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--card);border:1px solid var(--line);font-weight:700}
.cs-note,.cs-none{font-size:12px;padding:6px 12px 0;margin:0}
.cs-more{margin-top:12px;font-size:13.5px}
.cs-more summary{cursor:pointer;color:var(--ink-soft)}
.cs-foot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px;font-size:12.5px}

/* Pick the part of a photo to read (js/crop.js) */
.crop{display:flex;flex-direction:column;gap:12px}
.crop-tip{margin:0;font-size:13.5px;color:var(--ink-soft)}
.crop-stage{position:relative;align-self:center;max-width:100%;line-height:0;touch-action:none;user-select:none;-webkit-user-select:none}
.crop-img{display:block;max-width:100%;max-height:62dvh;width:auto;height:auto;border-radius:10px}
.crop-box{position:absolute;border:2px solid #fff;border-radius:6px;box-shadow:0 0 0 9999px rgba(0,0,0,.5);cursor:move}
.crop-stage{overflow:hidden;border-radius:10px}
.crop-box i{position:absolute;width:26px;height:26px;border:4px solid #fff;touch-action:none}
.crop-box i::after{content:"";position:absolute;inset:-14px}
.crop-box i[data-h="nw"]{left:-4px;top:-4px;border-right:0;border-bottom:0;cursor:nwse-resize;border-top-left-radius:6px}
.crop-box i[data-h="ne"]{right:-4px;top:-4px;border-left:0;border-bottom:0;cursor:nesw-resize;border-top-right-radius:6px}
.crop-box i[data-h="sw"]{left:-4px;bottom:-4px;border-right:0;border-top:0;cursor:nesw-resize;border-bottom-left-radius:6px}
.crop-box i[data-h="se"]{right:-4px;bottom:-4px;border-left:0;border-top:0;cursor:nwse-resize;border-bottom-right-radius:6px}
.crop-acts{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
@media (max-width:720px){ .crop-acts .btn{flex:1} }
@media (max-width:720px){ .crop-img{max-height:calc(100dvh - 300px)} .crop{gap:10px} }
.cs-mine{margin-bottom:12px}

/* Cash-up with a set number of each note and coin (js/cashup.js) */
.cu-den small.cu-req{display:block;font-size:12px;font-weight:600;color:var(--ink-faint);line-height:1.2}
.cu-sub i{display:block;font-style:normal;font-size:12px;font-weight:700}
.cu-sub .cu-up{color:var(--green)}
.cu-sub .cu-short{color:var(--red)}
.cu-sub .cu-ok{color:var(--ink-faint)}
.cu-req-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:6px 14px}
.cu-req-row{display:grid;grid-template-columns:52px 1fr 70px;align-items:center;gap:8px}
.cu-req-row .input{padding:8px 10px}
.cu-req-sub{font-size:12.5px;color:var(--ink-soft);text-align:right;font-variant-numeric:tabular-nums}
.cu-req-total{display:flex;justify-content:space-between;align-items:baseline;margin-top:12px;padding-top:10px;border-top:1px solid var(--line);font-size:14px}
.cu-req-total b{font-size:18px}
@media (max-width:720px){ .cu-sub i{display:inline;margin-left:6px} }
/* Cash-up rows: note or coin · counted now · leave in · what it comes to */
.cu-table{display:flex;flex-direction:column;gap:6px}
.cu-th,.cu-tr{display:grid;grid-template-columns:56px minmax(0,1fr) minmax(0,1fr) 128px;align-items:center;gap:10px}
.cu-th{font-size:12px;font-weight:700;color:var(--ink-faint);padding:0 2px}
.cu-tr .input{padding:8px 10px}
.cu-tr.keep .cu-den{color:var(--green)}
.cu-keep{padding:8px 10px;border-radius:12px;background:var(--paper-2);font-weight:700;font-variant-numeric:tabular-nums;text-align:left}
.cu-keepin{border-style:dashed}
.cu-tr .cu-sub{text-align:right}
@media (max-width:720px){
  .cu-th,.cu-tr{grid-template-columns:42px minmax(0,1fr) minmax(0,1fr);gap:6px}
  .cu-th span:last-child{display:none}
  .cu-tr .cu-sub{grid-column:2 / -1;text-align:left;font-size:12px;margin-top:-4px}
  .cu-tr .cu-sub:empty{display:none}
}
/* One number per row, as on the sheet: counted less what stays */
.cu-tr .cu-sub b{font-size:16px;font-variant-numeric:tabular-nums}
.cu-tr .cu-sub .cu-up{color:var(--green)}
.cu-tr .cu-sub .cu-short{color:var(--red)}
.cu-tr .cu-sub .cu-ok{color:var(--ink-faint)}
.cu-th span:last-child{text-align:right}
/* The sheet's last line: counted − leave in = to the bank */
.cu-eod{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
.cu-eod .statcell{flex:1;min-width:120px}
.cu-op{font-size:22px;font-weight:700;color:var(--ink-faint)}
.cu-eod .cu-bank b{color:var(--green)}
@media (max-width:720px){
  .cu-th,.cu-tr{grid-template-columns:40px minmax(0,1fr) minmax(0,1fr) 66px;gap:8px}
  .cu-tr .cu-sub{white-space:nowrap;font-size:13px}
  .cu-th span:last-child{display:block}
  .cu-tr .cu-sub{grid-column:auto;text-align:right;font-size:14px;margin-top:0}
  /* A phone: one line each — counted, less what stays, equals the bank bag —
     label on the left, amount on the right, so no figure outgrows its box. */
  .cu-eod{display:grid;grid-template-columns:22px 1fr;gap:6px 8px;align-items:center}
  .cu-eod .statcell{flex-direction:row-reverse;justify-content:space-between;align-items:baseline;min-width:0;grid-column:2}
  .cu-eod .statcell b{font-size:20px;white-space:nowrap}
  .cu-eod > .statcell:first-child{grid-column:1/-1;margin-left:30px}
  .cu-op{font-size:18px;text-align:center}
}
/* The total row under the count. */
.cu-totrow{border-top:1.5px solid var(--line);margin-top:4px;padding-top:10px}
.cu-totrow b{font-size:15px;padding:0 10px;white-space:nowrap}
.cu-totrow .cu-sub{color:var(--green);text-align:right;padding:0}
.cu-done-x{margin-top:8px;font-size:12.5px;color:var(--amber-ink, var(--ink-soft));font-weight:600}
/* Opening amount, and today's cash under the totals */
.cu-open{display:flex;gap:12px;flex-wrap:wrap}
.cu-open .field{min-width:220px;margin:0}
.cu-taken{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:10px;border-top:1px solid var(--line-2);font-size:14px}
.cu-taken > span:first-child{font-weight:700}
.cu-taken b{font-size:18px;margin-left:auto}
.cu-taken b.cu-short{color:var(--red)}
.cu-openfix{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0}
.cu-openfix[hidden]{display:none}
.cu-openfix b{font-size:20px}

/* Team: Managers / Active staff / Offboarded fold (owner.js team()). */
.team-fold > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:6px;flex-wrap:nowrap!important}
.team-fold > summary::-webkit-details-marker{display:none}
.team-fold-t,.team-fold .st-count{white-space:nowrap;flex-shrink:0}
.team-fold-ch{margin-left:auto!important;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex:none;align-self:center;transition:transform .2s;color:var(--ink-faint)}
.team-fold[open] .team-fold-ch{transform:rotate(90deg)}
.team-fold:not([open]){padding-bottom:6px!important}

/* Record a purchase (stock-receipt.js): the optional fields fold under one row. */
.pl-more{margin-top:12px;border-top:1px solid var(--line-2);padding-top:6px}
.pl-more > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;padding:10px 0;
  font-size:13.5px;font-weight:600;color:var(--ink-soft)}
.pl-more > summary::-webkit-details-marker{display:none}
.pl-more > summary .ic{width:16px;height:16px;flex:none;transition:transform .2s}
.pl-more[open] > summary .ic{transform:rotate(45deg)}
/* On a phone an item line stacks: the item across the top, then qty, price,
   amount and remove in one row, each with its own small label — the table ran
   off the right edge, hiding the price. */
@media (max-width:560px){
  .pl-table thead{display:none}
  .pl-table, .pl-table tbody{display:block;width:100%;min-width:0!important}
  .pl-table .pl-row{display:grid;grid-template-columns:1fr 1fr auto auto;gap:8px;align-items:end;
    padding:10px 0;border-bottom:1px solid var(--line-2)}
  .pl-table .pl-row td{display:block;padding:0;border:0;min-width:0}
  .pl-table .pl-row td.pl-c-item{grid-column:1/-1}
  .pl-table .pl-row td[data-l]::before{content:attr(data-l);display:block;font-size:12px;font-weight:600;
    color:var(--ink-faint);margin-bottom:4px;text-align:left}
  .pl-table .pl-row .pl-amt{align-self:center;padding-top:16px;font-weight:700;white-space:nowrap}
  .pl-table .pl-row input{width:100%}
}
.pw-del{flex:none;margin-left:6px;padding:0 8px;color:var(--ink-faint)}
.pw-del .ic{width:16px;height:16px}

/* Alerts (owner.js renderAlerts): the controls on a row under the heading. */
.al-tools{display:flex;align-items:center;gap:8px 10px;flex-wrap:wrap;margin:0 0 14px}
.al-ret{display:inline-flex;align-items:center;gap:8px;font-size:13px}
.al-ret select{height:38px;width:auto;min-width:0}
.al-tools-r{display:inline-flex;gap:8px;margin-left:auto;flex-wrap:wrap}
.al-tools .btn{white-space:nowrap}
.al-ic{padding:0 10px;min-width:38px}
.al-ic .ic{width:17px;height:17px}

/* Swipe left to delete (util.js swipeDelete). */
.sw-row{position:relative;overflow:hidden;padding:0!important}
.sw-row > .sw-in{touch-action:pan-y;position:relative;z-index:1;display:flex;align-items:center;gap:inherit;width:100%;
  padding:inherit;background:var(--card);touch-action:pan-y}
.list .sw-row > .sw-in{padding:12px 4px}
.sw-acts{position:absolute;top:0;right:0;bottom:0;display:flex}
.sw-del,.sw-edit{width:80px;border:0;color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.sw-acts .sw-del:only-child{width:88px}
.sw-del{background:var(--red)}
.sw-edit{background:#8E8E93}
/* Typing a new price: the editor takes its own line under the name, rather
   than squeezing the name into a column one character wide. */
.pw-row:has(.pw-set .input) > .sw-in, .pw-row:has(.pw-set .input){flex-wrap:wrap}
.pw-row .pw-set:has(.input){width:100%;display:flex;justify-content:flex-end}
.pw-row .meta{min-width:0;flex:1 1 auto}
/* A finger has the swipe, so the bin button is for a mouse. */
@media (hover:none){ .pw-del{display:none} }

.sup-addrow{display:flex;align-items:center;gap:10px;width:100%;border:0;border-top:1px solid var(--line-2);background:transparent;
  padding:14px 18px;font:inherit;font-size:15px;font-weight:600;color:var(--accent-ink);cursor:pointer;text-align:left}
.sup-addrow .ic{width:20px;height:20px}
.tp-chip-t{display:inline-flex;align-items:center;gap:5px;border:0;background:none;padding:0;font:inherit;color:inherit;cursor:pointer}
.tp-chip-t .ic{width:14px;height:14px}

/* Task sections as tags (tasks.js groupedHtml): All · Opening 2/2 · Closing 0/3 */
.tg-tags{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:2px 0 12px;padding:2px 0}
.tg-tags::-webkit-scrollbar{display:none}
.tg-tag{flex:none;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--card);
  color:var(--ink-soft);border-radius:999px;padding:8px 14px;font:inherit;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap}
.tg-tag span{font-size:12px;color:var(--ink-faint);font-variant-numeric:tabular-nums}
.tg-tag.on{background:var(--accent);border-color:var(--accent);color:#fff}
.tg-tag.on span{color:rgba(255,255,255,.85)}

/* Temperature check: the reading on the row, before the tick (tasks.js rowExtras). */
.task-temp{display:inline-flex;align-items:center;gap:6px;margin:8px 0 2px}
.task-temp .input{width:96px;padding:8px 10px;font-size:16px;text-align:right}
.task-temp span{font-weight:700;color:var(--ink-soft)}
.task-temp .input.task-temp-ask{border-color:var(--amber-ink, #b7791f);box-shadow:0 0 0 3px color-mix(in srgb, var(--amber-ink, #b7791f) 25%, transparent)}
.cu-daytotal b{font-size:18px;color:var(--green)}

/* Any list row on a phone: the words keep room to be read, and buttons that
   don't fit beside them go onto the next line (Bookings' Seat · No-show ·
   cancel squeezed the name to 3px, one letter per line). */
@media (max-width:560px){
  .li{flex-wrap:wrap}
  .li > .meta{min-width:min(150px, 100%)}
  .li > .row.wrap, .li > .row.gap6{margin-left:auto;justify-content:flex-end}
}

/* On a phone the assistant is pinned at the top of Messages; the floating
   button covered Save cash-up, + New booking and other buttons. */
@media (max-width:720px){ .ai-fab{display:none!important} }

/* A sheet's buttons never run off its edge: with three (Cancel · Today only ·
   Delete every time) the row was wider than a phone and Cancel sat off-screen. */
.modal-actions{flex-wrap:wrap;row-gap:8px}
@media (max-width:560px){ .modal-actions > .btn{flex:1 1 auto;min-width:0;white-space:normal} }
/* Short read-only tables (a count's result) fit the phone instead of scrolling
   sideways — with the 520px floor, Book and Counted sat off the right edge. */
@media (max-width:560px){
  table.dtable.fit{min-width:0;font-size:13px}
  .dtable.fit th, .dtable.fit td{padding:8px 5px}
  .dtable.fit td:first-child{word-break:break-word}
}
/* A page switch shares the width by word length, not in equal parts: equal
   fifths cut "Deliveries" and "Bookings" short while "Tasks" had room spare. */
.tab-actions > .viewswitch.vs-fit:only-child > button{flex:1 1 auto}
@media (max-width:430px){ .viewswitch.vs-fit > button{padding:0 5px} }
/* A count beside the button ("0.00 h this week" + Add my shift) is as wide as
   a second button: the pair goes under the title too, or "My shifts" was "My sh…". */
@media (max-width:720px){
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > .row:last-child:has(> .pill + .btn){grid-column:1 / -1;grid-row:3;margin-top:8px;justify-content:space-between}
}
/* A phone's day cell is ~45px: one line ended every chip in "Sout…" / "Amy…".
   The name wraps onto a second line instead, as Calendar's month view does,
   and what still doesn't fit is cut clean rather than spent on "…". */
@media(max-width:700px){
  .cal-chip{padding:2px 3px;align-items:flex-start}
  .cal-chip span{white-space:normal;text-overflow:clip;overflow-wrap:anywhere;line-height:1.2;
    display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
}
/* A shift's name breaks between words only — "Morni/ng" read as two words.
   A little smaller on a phone so a one-word name keeps to its column. */
.avg-h b{word-break:normal;overflow-wrap:normal}
@media (max-width:430px){ .avg-h b{font-size:12px;letter-spacing:-.02em} }
/* Hours by branch ("54.0h") need more than the 28px a count does. */
.bestrow.hrs{grid-template-columns:110px 1fr 52px}
.bestq{white-space:nowrap}
/* A sheet rising its whole height over .34s with a long ease-out tail read as
   "about a second" on a phone. Quicker, front-loaded, and on its own layer so
   the page under it isn't repainted each frame. */
@media (max-width:600px){
  .modal, .modal.wide{animation:glassRise .24s cubic-bezier(.2,.9,.3,1);will-change:transform}
  .modal-back.closing .modal{transition:transform .18s cubic-bezier(.4,0,1,1)}
}
@media (max-width:720px){ .navsheet{animation:glassRise .24s cubic-bezier(.2,.9,.3,1)} }
@media (prefers-reduced-motion: reduce){ .modal, .modal.wide, .navsheet{animation:none} }
/* Three choices (Cancel · Today only · Delete every time) don't share a phone's
   width without folding each into three lines: they stack, as an iOS action
   sheet does — the choice that matters on top, Cancel at the bottom. */
@media (max-width:560px){
  .modal-actions:has(> .btn:nth-child(3)){flex-direction:column-reverse;align-items:stretch}
  .modal-actions:has(> .btn:nth-child(3)) > .btn{flex:none;width:100%;white-space:nowrap}
}

/* Roster: the warnings, folded above the grid (roster-view.js #rsWarn). The
   line says how many; red when any of them is a real gap. */
.rs-warn{padding:0;margin-bottom:12px;overflow:hidden}
.rs-warn>summary{display:flex;align-items:center;gap:10px;padding:14px 16px;cursor:pointer;list-style:none;
  font-size:13.5px;font-weight:700;color:var(--amber-ink)}
.rs-warn>summary::-webkit-details-marker{display:none}
.rs-warn.has-red>summary{color:var(--red-ink)}
.rs-warn>summary .ic{width:18px;height:18px;flex:none}
.rs-warn-n{min-width:24px;height:24px;padding:0 7px;border-radius:999px;display:grid;place-items:center;font-size:12.5px;
  background:var(--amber-soft);color:var(--amber-ink)}
.rs-warn.has-red .rs-warn-n{background:var(--red-soft);color:var(--red-ink)}
.rs-warn-chev{display:grid;color:var(--ink-faint);transition:transform .18s var(--ease-out)}
.rs-warn[open] .rs-warn-chev{transform:rotate(90deg)}
.rs-warn>.list, .rs-warn>.faint{padding:0 16px}
.rs-warn>.faint{padding-bottom:14px}
/* Roster numbers: the days with nobody on, as day names. */
.statcell b.statdays{display:flex;flex-wrap:wrap;gap:0 7px;font-size:17px;line-height:1.25}

/* My shifts: the week in one row (roster-view.js weekStrip). On a day: its
   start time; a day you can't come in red; days gone by faded. */
.wkstrip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:4px 0 4px}
.wk-day{display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 2px 7px;border-radius:12px;
  border:1px solid var(--line);background:var(--card);color:var(--ink-soft);font:inherit;cursor:pointer;min-width:0}
.wk-dn{font-size:12px;font-weight:700}
.wk-dd{font-size:16px;font-weight:800;color:var(--ink);line-height:1.2}
.wk-t{font-size:12px;font-weight:600;line-height:1.25;text-align:center;overflow-wrap:anywhere}
.wk-day.on{background:var(--accent-soft);border-color:transparent;color:var(--accent-ink)}
.wk-day.on .wk-dd{color:var(--accent-ink)}
.wk-day.on{background:var(--accent);color:var(--paper)}
.wk-day.on .wk-dd,.wk-day.on .wk-dn{color:var(--paper)}
.wk-day.off{background:var(--paper-2);border-style:dashed;color:var(--ink-faint)}
.wk-day.off .wk-dd{color:var(--ink-faint)}
.wk-day.today.on{box-shadow:inset 0 0 0 2px var(--paper),0 0 0 2px var(--accent)}
.wk-day.cant{background:var(--red-soft);border-color:transparent;color:var(--red-ink)}
.wk-day.cant .wk-dd{color:var(--red-ink)}
.wk-day.today{box-shadow:inset 0 0 0 2px var(--accent)}
.wk-day.past{opacity:.45;cursor:default}
.wk-hint{font-size:12px;margin:2px 2px 14px}
/* Shifts worked this week, folded (roster-view.js doneFold). */
.done-fold{margin-top:10px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.done-fold>summary{display:flex;align-items:center;gap:8px;padding:12px 18px;cursor:pointer;list-style:none;font-size:13.5px;font-weight:700;color:var(--ink-soft)}
.done-fold>summary::-webkit-details-marker{display:none}
.done-fold>summary b{min-width:22px;height:22px;padding:0 6px;border-radius:999px;display:grid;place-items:center;font-size:12px;background:var(--paper-2);color:var(--ink-soft)}
.done-fold>summary .ic{margin-left:auto;width:16px;height:16px;transition:transform .18s var(--ease-out)}
.done-fold[open]>summary .ic{transform:rotate(90deg)}
.done-fold>.list{padding:0 18px 8px}

/* A heading that stays on the page when its buttons go up to the phone's top
   bar (router.js barActions): the title stays, its own buttons hide. */
.topbar.has-actions + .content .section-head[data-keep-head]{display:flex !important}
.topbar.has-actions + .content .section-head[data-keep-head] > :not(:first-child){display:none}
/* Tasks: the day's progress on one line. */
.tprog{display:flex;align-items:center;gap:10px;padding:10px 14px;margin-bottom:14px;background:var(--card);
  border:1px solid var(--line);border-radius:14px;font-size:12.5px;font-weight:600;color:var(--ink-soft)}
.tprog b{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.tprog b small{font-size:12px;color:var(--ink-soft);font-weight:600}
.tprog .bar{flex:1;height:6px;border-radius:99px;background:var(--line);overflow:hidden;margin:0}
.tprog .bar i{display:block;height:100%;background:var(--accent);border-radius:99px}
/* A ticked task folds to its one line; the chevron opens it. */
.task-item.folded .task-more, .task-item.folded .task-tools{display:none}
.tasks-editing .task-item.folded .task-tools{display:flex}
/* Change and delete are behind Edit: without it the list is just the jobs
   and their photo / note buttons; with it every row shows both. */
#tlist:not(.tasks-editing) .task-tools [data-te], #tlist:not(.tasks-editing) .task-tools [data-td]{display:none}
#tlist.tasks-editing .task-tools [data-te], #tlist.tasks-editing .task-tools [data-td]{display:inline-flex}
.tprog .tprog-edit{flex:none;min-height:0;padding:5px 12px}
/* A page heading that is only a title on a phone: its line of description
   goes, the day bar under it is a slim one. */
@media (max-width:720px){
  .section-head.sh-compact{margin-bottom:8px}
  .section-head.sh-compact h2{font-size:19px}
  .section-head.sh-compact p{display:none}
  .weekbar.weekbar-sm{padding:4px;margin-bottom:10px;min-height:0}
  .weekbar.weekbar-sm .weekbar-arrow{width:38px;min-width:38px;height:38px;min-height:38px}
  .weekbar.weekbar-sm .weekbar-mid{display:flex;align-items:baseline;justify-content:center;gap:8px}
  .weekbar.weekbar-sm .weekbar-mid b{display:inline;font-size:14.5px}
  .tprog{margin-bottom:10px;padding:8px 12px}
}
/* The page's "+ Add …", on a phone: a round button down by the thumb, over
   the corner of the page, not a small icon up in the top bar (router.js). */
.fab-add{position:fixed;right:16px;bottom:calc(var(--nav-float, 10px) + 84px);z-index:40;width:54px;height:54px;border-radius:50%;
  display:grid;place-items:center;border:0;background:var(--accent);color:var(--paper);
  box-shadow:0 10px 24px -8px rgba(0,0,0,.45),0 0 0 .5px rgba(0,0,0,.08);cursor:pointer;-webkit-tap-highlight-color:transparent}
.fab-add .ic{width:26px;height:26px;stroke-width:2.2}
.fab-add:active{transform:scale(.93)}
/* Room under the page for it, so it never sits on the last line or button. */
@media (max-width:720px){ body:has(.fab-add) .content{padding-bottom:calc(var(--nav-float, 10px) + 150px)} }
@media (max-width:720px){ .fab-src{display:none!important} }
body.modal-open .fab-add, html.mkr-kb .fab-add, body:has(.navsheet-back:not(.hidden)) .fab-add{display:none}
.task-unfold{flex:none;align-self:flex-start;width:32px;height:32px;display:grid;place-items:center;border:0;background:none;
  color:var(--ink-faint);cursor:pointer;transition:transform .18s var(--ease-out)}
.task-unfold .ic{width:16px;height:16px}
.task-item:not(.folded) .task-unfold{transform:rotate(90deg)}
/* Fill in the blanks: Edit shows a − on each item and the Add item row. */
.modal-head .fg-edit{margin-left:auto;margin-right:6px}
.fg-rm{display:none;width:24px;height:24px;margin:0 8px 0 0;border:0;border-radius:50%;background:var(--red);color:#fff;
  font:700 17px/1 inherit;vertical-align:-3px;cursor:pointer;flex:none}
.fg-editing .fg-rm{display:inline-grid;place-items:center}
.fg-add{display:none}
.fg-editing .fg-add{display:inline-flex}
.fg-editing tr[data-new] td:first-child{display:flex;align-items:center}
@media (max-width:720px){ .task-item.done > .grow{flex-basis:calc(100% - 105px)} }

/* A reading out of range: red, with what was done about it (tasks.js valueTag). */
.temp-bad{color:var(--red-ink);font-weight:800}
.temp-act{color:var(--red-ink)}
.li .meta .temp-act{display:block;font-size:12px;margin-top:2px}
.temp-over b{display:block;margin-bottom:2px}
/* Temperature log (compliance.js): the warm ones stand out. */
.temp-log tr.bad td{background:var(--red-soft);color:var(--red-ink)}
.temp-log td.num b{font-variant-numeric:tabular-nums}
.mb12{margin-bottom:12px}

/* My shifts: rostered hours over a fortnight, against the recorded limit. */
.fn-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;padding:10px 14px;margin:0 0 14px;background:var(--card);
  border:1px solid var(--line);border-radius:14px;font-size:12.5px;font-weight:600;color:var(--ink-soft)}
.fn-line b{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.fn-line .bar{flex:1 1 100%;height:6px;margin:2px 0 0}
.fn-line.near .bar i{background:var(--amber)}
.fn-line.over{border-color:color-mix(in srgb,var(--red) 40%,transparent);background:var(--red-soft)}
.fn-line.over .bar i{background:var(--red)}
.fn-over{color:var(--red-ink)} .fn-over b{color:var(--red-ink)}

/* Prices: the items not bought lately as a form to type straight into
   (stock-prices.js priceBox). One with no price yet is marked. */
.pw-fill{display:inline-flex;align-items:center;gap:4px;flex:none}
.pw-fill .pw-cur{color:var(--ink-soft);font-weight:700}
.pw-fill .input{width:92px;text-align:right;padding:7px 9px;font-variant-numeric:tabular-nums}
.pw-fill .input.pw-saved{border-color:var(--green);box-shadow:0 0 0 3px var(--green-soft)}
.pw-fill .faint{font-size:12px;min-width:26px}
.pw-row.pw-missing .pw-fill .input{border-color:color-mix(in srgb, var(--amber) 60%, var(--line));background:var(--amber-soft)}
.pw-need{display:inline-block;margin-top:2px;font-size:12px;font-weight:700;color:var(--amber-ink)}
.pw-what{font-size:12.5px;margin:12px 2px 0}

/* Forecast: what was on the shelf, as a line (stock-view.js shelfChart). */
.shelf-chart{display:block;margin:4px 0 2px;overflow:visible}
.shelf-chart.big{margin:10px 0 4px;background:var(--paper-2);border-radius:12px}
.shelf-chart .sc-t{font-size:9.5px;fill:var(--ink-faint);font-weight:600}
.shelf-chart .sc-hot{fill:var(--red)}
.fc-item-top{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.fc-item-top .faint{font-size:12.5px;flex:1;min-width:0}
.fc-item-key{display:flex;flex-wrap:wrap;gap:12px;font-size:12px}
.fc-item-key span{display:inline-flex;align-items:center;gap:5px}
.fc-item-key i{display:inline-block;width:14px;height:3px;border-radius:2px;background:var(--ink-faint)}
.fc-item-key i.dash{height:0;background:none;border-top:2px dashed var(--ink-faint)}
.fc-working>summary{cursor:pointer;font-weight:700;font-size:13.5px;color:var(--ink-soft);padding:6px 0}
.fc-item .sup-facts{grid-template-columns:1fr 1fr;gap:8px 14px}
.sup-missing{margin:12px 0 4px;padding:12px;border-radius:14px;border:1px dashed color-mix(in srgb, var(--amber) 55%, var(--line));background:var(--amber-soft)}
.sup-missing b{display:block;font-size:13px;color:var(--amber-ink);margin-bottom:8px}
.sup-missing-row{display:flex;flex-wrap:wrap;gap:6px}
.sup-missing .chip{background:var(--card)}
.sup-missing .chip .ic,.sup-items .chip .ic{width:13px;height:13px;vertical-align:-2px}
.cnt-why{display:flex;flex-direction:column;gap:3px;margin:14px 0 10px;padding:12px 14px;border-radius:14px;background:var(--blue-soft);color:var(--blue-ink);font-size:13px;line-height:1.4}
.cnt-why b{font-size:14px}
/* "What is this page?" (js/help.js): a ? beside the bell, and a sheet with
   one sentence and the page drawn as three steps. */
.tb-help span{font-size:17px;font-weight:800;line-height:1;color:var(--ink-soft)}
.tb-help[hidden]{display:none!important}
.help-one{font-size:17px;font-weight:700;line-height:1.4;margin:0 0 16px;color:var(--ink)}
.help-flow{display:flex;align-items:flex-start;gap:4px}
.help-step{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.help-ic{position:relative;display:grid;place-items:center;width:62px;height:62px;border-radius:20px;background:var(--accent-soft);color:var(--accent-ink)}
.help-ic .ic{width:28px;height:28px}
.help-ic b{position:absolute;top:-6px;left:-6px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;
  background:var(--accent);color:var(--paper);font-size:12px;box-shadow:0 0 0 2px var(--card)}
.help-txt{font-size:13px;line-height:1.35;color:var(--ink-soft);font-weight:600}
.help-arrow{flex:none;align-self:flex-start;margin-top:20px;color:var(--ink-faint)}
.help-arrow .ic{width:18px;height:18px}
@media (max-width:380px){ .help-ic{width:54px;height:54px} .help-txt{font-size:12.5px} }
/* Fill in the blanks: what is empty is amber, a finished row goes quiet. */
.fg-left{font-size:13.5px;margin:10px 0 0;padding:9px 12px;border-radius:12px;background:var(--amber-soft);color:var(--amber-ink)}
.fg-left.fg-all{background:var(--green-soft);color:var(--green-ink)}
.dtable.entry .input.fg-need,.dtable.entry .pick-btn.fg-need{border-color:color-mix(in srgb, var(--amber) 70%, var(--line));background-color:var(--amber-soft)}
.dtable.entry input[data-fp].fg-need{border-width:2px}
.dtable.entry tr.fg-done td{opacity:.6}
/* Add stock items: what is already on the list, each a tap to change. */
.bulk-have{margin-top:14px;padding:10px 12px;border-radius:14px;background:var(--paper-2)}
.bulk-have>summary{cursor:pointer;font-weight:700;font-size:13.5px}
.bulk-have>summary .faint{font-weight:500;font-size:12px}
.bulk-have-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.bulk-have-list .chip i{font-style:normal;color:var(--ink-soft);font-weight:600}
.bulk-have-list .chip i.bulk-noprice{color:var(--amber-ink)}
/* Stock list rows: out / low / fine at a glance. */
.dtable tr.st-out td:first-child{box-shadow:inset 3px 0 0 var(--red)}
.dtable tr.st-low td:first-child{box-shadow:inset 3px 0 0 var(--amber)}
.dtable tr.st-out .st-qty{color:var(--red);font-weight:800}
.dtable tr.st-low .st-qty{color:var(--amber-ink);font-weight:800}
.st-noprice{font-size:12px;font-weight:700;color:var(--amber-ink);background:var(--amber-soft);padding:1px 7px;border-radius:999px}
@media (max-width:720px){
  .dtable.stack tr.st-out,.dtable.stack tr.st-low{padding-left:12px;border-radius:12px;margin:4px 0}
  .dtable.stack tr.st-out{background:color-mix(in srgb, var(--red) 7%, transparent);box-shadow:inset 4px 0 0 var(--red)}
  .dtable.stack tr.st-low{background:color-mix(in srgb, var(--amber) 9%, transparent);box-shadow:inset 4px 0 0 var(--amber)}
  .dtable.stack tr.st-out td:first-child,.dtable.stack tr.st-low td:first-child{box-shadow:none}
}
/* Cash-up: the bank bag total on a line of its own, "take out" per row, and
   past cash-ups that open. */
.cu-bagline{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:6px;padding:10px 12px;border-radius:12px;
  background:var(--green-soft);color:var(--green-ink);font-weight:700;font-size:14px}
.cu-bagline[hidden]{display:none}
.cu-bagline span{display:inline-flex;align-items:center;gap:6px}
.cu-bagline .ic{width:16px;height:16px}
.cu-bagline b{font-size:19px;font-variant-numeric:tabular-nums;white-space:nowrap}
.cu-totrow b{font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.cu-tr .cu-sub i{display:inline;margin-left:4px;font-size:12px;font-weight:700;font-style:normal}
button.li.cu-hrow{width:100%;text-align:left;background:none;border:0;font:inherit;color:inherit;cursor:pointer;align-items:center}
button.li.cu-hrow > .ic{width:16px;height:16px;color:var(--ink-faint);flex:none;margin-left:6px}
@media (max-width:720px){
  .cu-totrow{grid-template-columns:42px minmax(0,1fr) minmax(0,1fr)!important}
}
/* ↑ ↓ Done over the keyboard in the iPhone app (js/native-app.js): the page
   ends where the keyboard starts, so the bottom of the screen is its top. */
.kb-nav{display:none;position:fixed;left:0;right:0;bottom:0;z-index:2000;align-items:center;gap:2px;padding:4px 8px;
  background:color-mix(in srgb, var(--paper-2) 92%, transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  border-top:.5px solid var(--line)}
html.mkr-kb .kb-nav:not([hidden]){display:flex}
.kb-nav button{display:grid;place-items:center;min-width:44px;height:38px;border:0;border-radius:10px;background:none;color:var(--accent);font:inherit;cursor:pointer}
.kb-nav button:disabled{color:var(--ink-faint);opacity:.5}
.kb-nav button .ic{width:22px;height:22px;stroke-width:2.2}
.kb-nav .kb-done{font-weight:800;font-size:15px;padding:0 12px}
/* Room for the bar: a sheet's Save / Cancel row sits at its bottom, so the
   whole sheet stands on the bar rather than under it. */
html.mkr-kb:has(.kb-nav:not([hidden])) .modal-back{padding-bottom:46px}
html.mkr-kb:has(.kb-nav:not([hidden])) .content{scroll-padding-bottom:56px;padding-bottom:56px}
.li.li-leaving{transition:opacity .2s, transform .2s;opacity:0;transform:translateX(24px)}
/* Certificates (js/training.js certCard): title and Add on one line, each
   certificate on one line with its days-left beside it, the small print small. */
.cert-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.cert-head .section-title{margin:0}
.cert-head-r{flex:none;margin-left:auto}
.cert-li{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px}
.cert-li .meta{min-width:0}
.cert-r{display:flex;align-items:center;gap:6px;flex:none}
.cert-r .btn{padding:0 9px;min-height:32px}
.cert-note{font-size:12px;line-height:1.4;margin:10px 2px 0}
.cert-head .section-title{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;white-space:nowrap}
#certCard > .empty{padding:18px 14px}
#certCard > .empty .em{width:44px;height:44px;margin-bottom:6px}
/* "take out" under the number, so a four-figure count stays inside the card. */
.cu-tr .cu-sub i{display:block!important;margin:0!important;line-height:1.1}
.cu-tr .cu-sub{min-width:0;overflow:hidden}
/* Inside a conversation (a team chat or the assistant, js/assistant.js sets
   body.ai-fullpage) there is no bottom bar: the thread and its message box
   are the whole screen, as in any phone's messaging app. Back is the ‹ in
   the conversation's own head. */
@media (max-width:720px){
  body.ai-fullpage .mobile-nav{display:none!important}
  body.ai-fullpage .shell::after{display:none}
  body.ai-fullpage .content{padding-bottom:max(8px, env(safe-area-inset-bottom))!important}
  body.ai-fullpage .fab-add{display:none}
}
/* One colour top to bottom. The page used to carry a navy wash at the top and
   an amber one at the bottom, so behind the clock and under the top bar read
   blue-grey while the rest of the page was plain. Now the page is flat, and
   the band behind the clock and the top bar are that same colour (only just
   see-through, so what scrolls under still shows a little). */
body{background:var(--paper)!important;background-attachment:scroll!important}
:root{--glass-bar:color-mix(in srgb, var(--paper) 94%, transparent)}
:root[data-theme="dark"]{--glass-bar:color-mix(in srgb, var(--paper) 94%, transparent)}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){--glass-bar:color-mix(in srgb, var(--paper) 94%, transparent)} }
html.mkr-solid, html.mkr-solid[data-theme="dark"], html.mkr-contrast, html.mkr-contrast[data-theme="dark"]{--glass-bar:var(--paper)}
@media (prefers-reduced-transparency: reduce){ :root, :root[data-theme="dark"]{--glass-bar:var(--paper)} }
@media (prefers-contrast: more){ :root, :root[data-theme="dark"]{--glass-bar:var(--paper)} }
/* Dark mode: the accent is a light blue there, so the selected option's
   words are the page's dark colour, not white (white on it was about 2:1). */
:root[data-theme="dark"] .viewswitch button.on, :root[data-theme="dark"] .viewswitch.has-thumb > button.on{color:var(--paper)!important}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .viewswitch button.on,
  :root:not([data-theme="light"]) .viewswitch.has-thumb > button.on{color:var(--paper)!important} }
/* The tick box: the thing staff press most, often with wet hands or gloves.
   36px to see, 48px to hit. A photo task waiting for its photo shows a
   camera in a dashed box instead (tasks.js checkBox), and its Photo button
   is the row's main button, words and all, even on a phone. */
.task-check{width:36px;height:36px;border-radius:10px}
.task-check::after{inset:-6px}
.task-check .ic{width:18px;height:18px}
.task-check.wait{border-style:dashed;border-color:var(--ink-faint);color:var(--ink-soft);background:var(--paper-2)}
.task-check.wait .ic{width:18px;height:18px;stroke-width:2}
.task-tools .tt-photo-first{min-height:40px;padding:0 14px}
.task-tools .tt-photo-first span{display:inline!important}
/* Staff stock count (views/staff.js stockCount): one line an item and a
   Save bar at the bottom, always in view. Scoped to .scount: the ordering
   page (further down) has its own .sc-group / .sc-row / .sc-unit, and
   unscoped they turned each counted item into three lines — name, a box the
   width of the phone, then the unit under it. */
.scount .sc-tip{font-size:12.5px;margin:4px 2px 0}
.scount .sc-group{padding:12px 14px 4px}
.scount .sc-group .section-title{margin-bottom:4px}
.scount .sc-row{display:grid;grid-template-columns:minmax(0,1fr) 104px 44px;align-items:center;gap:8px;margin:0;padding:6px 0;border-top:1px solid var(--line-2);cursor:text}
.scount .sc-group .section-title + .sc-row{border-top:0}
.scount .sc-nm{min-width:0}
.scount .sc-nm b{display:block;font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.scount .sc-row .input{height:44px;text-align:right;font-size:17px;font-variant-numeric:tabular-nums;padding:0 10px}
.scount .sc-unit{font-size:13px;color:var(--ink-soft);font-weight:600}
.scount .sc-row.sc-done .sc-nm b{color:var(--ink-soft)}
.scount .sc-row.sc-done .input{border-color:var(--green);background:var(--green-soft)}
/* Find an item, or count one shelf at a time: the search box and a chip per
   category (海鲜 3/12 — how many of that shelf are counted). */
.scount .sc-search{margin-top:10px}
.scount .sc-cats{padding:10px 0 2px}
.scount .sc-cats .catchip-n{font-variant-numeric:tabular-nums}
.scount .sc-nofind{margin-top:12px}
.scount [hidden]{display:none !important}
.scount.sc-searching .sc-extra{display:none}
.scount .sc-savebar{position:sticky;bottom:calc(var(--nav-float, 10px) + 80px);z-index:25;margin-top:16px;padding:8px 0;display:flex;gap:8px;align-items:stretch}
.scount .sc-savebar .sc-bar-find{height:auto;min-height:52px;width:56px;flex:none;box-shadow:0 10px 24px -10px rgba(0,0,0,.3)}
.scount .sc-save{flex:1 1 auto;min-width:0;min-height:52px;font-size:16px;font-weight:800;box-shadow:0 10px 24px -10px rgba(0,0,0,.4)}
.scount .sc-save .sc-n{font-weight:600;opacity:.85}
@media (min-width:721px){ .scount .sc-savebar{bottom:12px} }
/* Typing: the ↑ ↓ Done bar is there; Save waits at the end of the list, out
   of the way of the box being typed in, and comes back with Done. */
html.mkr-kb .scount .sc-savebar{position:static}
.tile-n.tile-time{font-size:28px;font-variant-numeric:tabular-nums}
/* ===== Tap areas on a phone: 44px at least =====
   Measured page by page (ui-ux-pro-max §2, touch-target-size). Where a
   control is drawn small on purpose — an icon in the top bar, an arrow, a
   price you can change — the part you can tap grows around it (an empty
   ::after) and it looks the same; where it was just short, it is 44px. */
@media (max-width:720px){
  .topbar-bell{width:40px;height:40px}
  .topbar.has-actions .tb-actions :is(.btn.tb-icon, .omenu > summary){width:40px;height:40px;min-height:40px}
  .topbar-bell, .topbar .tb-actions .tb-icon, .topbar .tb-actions .omenu > summary,
  .weekbar-sm .weekbar-arrow, .dlv-cal-nav, .tprog-edit, .kv-edit, .pw-set .linkish, .cal-layer, .cal-day,
  .simple-back, .topbar-title > a:first-child{position:relative}
  .topbar-bell::after, .topbar .tb-actions .tb-icon::after, .topbar .tb-actions .omenu > summary::after{content:"";position:absolute;inset:-2px}
  .weekbar-sm .weekbar-arrow::after{content:"";position:absolute;inset:-3px}
  .dlv-cal-nav::after{content:"";position:absolute;inset:-5px}
  .tprog-edit::after{content:"";position:absolute;inset:-6px -2px}
  .kv-edit::after{content:"";position:absolute;inset:-5px -2px}
  .pw-set .linkish::after{content:"";position:absolute;inset:-12px -4px}
  .cal-layer{min-height:34px}
  .cal-layer::after{content:"";position:absolute;inset:-5px 0}
  .cal-day::after{content:"";position:absolute;inset:-11px}
  .rs-stats .statcell{min-height:44px;align-items:center}
  .tg-tag{min-height:44px}
  .viewswitch button{min-height:44px}
  .avg-box{min-height:44px}
  .task-temp .input, .task-item .input{min-height:44px}
  .section-head .btn-sm, .section-head .btn,
  .section-head:has(> div:first-child > h2):has(> :nth-child(2):last-child) > .btn:last-child{min-height:44px}
  details > summary{min-height:44px}
  .cu-signset{min-height:44px;display:inline-flex;align-items:center;gap:8px}
  .cu-signset input{width:22px;height:22px}
}
@media (max-width:720px){ .simple-back::after{content:"";position:absolute;inset:-2px} }
/* A top-bar icon with its word (router.js shortWord). */
@media (max-width:720px){
  .topbar.has-actions .tb-actions .btn.tb-icon.has-word{width:auto;padding:0 11px;display:inline-flex;gap:5px;font-size:13px;font-weight:700;white-space:nowrap}
  .topbar.has-actions .tb-actions .btn.tb-icon.has-word .ic{width:18px;height:18px}
}
@media (max-width:720px){ .viewswitch button{min-width:44px} }
/* ===== Readable on a phone (UI audit 11–15) =====
   Nothing anyone has to read is under 12px; the browser's own <small> (about
   11px) included. */
small{font-size:max(12px, .85em)}
.mobile-nav a,.mobile-nav button{font-size:12px}
/* Count badges: 12px figures need a slightly bigger dot. */
.tb-badge{min-width:19px;height:19px;line-height:15px;font-size:12px}
.mn-badge{min-width:19px;height:19px;line-height:16px;font-size:12px;top:-6px}
/* Status words in their tinted pills: the plain status colour on its own tint
   was about 4.2:1; the darker -ink shade clears 4.5:1 (and in dark mode the
   -ink shade is the lighter one, so it reads better there too). */
.pill.ok,.kv-state.ok,.dkt-delta.down,.pw-cheap{color:var(--green-ink)}
.pill.danger,.kv-state.hot,.dkt-delta.up{color:var(--red-ink)}
.pill.info{color:var(--blue-ink)}
.dkt-delta small{opacity:1}
.duty-chip .ic{width:14px;height:14px;flex:none}
/* Four figures in a row on a phone wrapped three-and-one; two by two instead. */
@media (max-width:600px){
  .statline:has(> .statcell:nth-child(4):last-child){display:grid;grid-template-columns:1fr 1fr}
  .statline:has(> .statcell:nth-child(4):last-child) > .statcell{min-width:0}
}
/* Dark mode: the accent, green and red are light there, so white on them was
   about 2:1. What sits on them takes the page's dark colour instead; the red
   count badges keep white figures on a deeper red, so they still read as alerts. */
:root[data-theme="dark"]{--badge-red:#C4473C}
:root[data-theme="dark"] :is(.btn-accent,.btn-danger,.btn-green,.lang-switch button.active,.ci-add,.onb-item.done .onb-ic,
  .kv-tick.on,.dc-row.dc-ok .dc-tick,.dc-row.dc-bad .dc-x,.ai-guide-mic.speaking,.ai-chip.su-go,.os-part.on .os-tick,.os-job.on,.set-ic,.av-chip.on,
  .sh-link .btn.is-copied,.ai-msg.user,.catchip.on,.cal-cell.is-today .cal-day,.ob-slot.on,.os-dchip.on,.avg-box.on,.ns-item.on .ns-ic,
  .dlv-cal-day.on,.dlv-cal-day.on span,.dlv-cal-day.on b,.topbar-me.on .tb-ava,.os-htog.on,.tp-day.on,.task-step.done .task-step-box,.tt-n,
  .tg-tag.on,.fg-rm){color:var(--paper)}
:root[data-theme="dark"] .tg-tag.on span{color:inherit;opacity:.8}
:root[data-theme="dark"] :is(.tb-badge,.mn-badge,.ns-badge,.nav-item .badge,.simple-count,.soldout-tag){background:var(--badge-red);color:#fff}
/* Grey words on a tinted box (the forecast's highlighted figure, the roster's
   empty-cell + and its band rows, the note in an alert) need the darker grey to clear 4.5:1. */
.fc-sum .hot i,.sup-stats .hot i,.rgrid .rg-empty,.rg-bandday .faint,.alert .faint{color:var(--ink-soft)}
/* ===== Stock's tabs (UI audit 9) =====
   A computer shows all seven. A phone shows the four used every week and puts
   Forecast, Suppliers and Dish costs under More, which takes the open tab's
   name when it is one of those, so nothing is out of sight past the edge.
   More sits beside the row, not in it: the row clips
   anything that pops out of it. */
.stab-row{position:relative}
.stab-more{display:none}
@media (max-width:600px){
  .stab-row{display:flex;align-items:flex-end;border-bottom:1px solid var(--line-2);margin-bottom:4px}
  /* The words without their icons (the More list keeps them): with icons the
     four were 352px in English and the room is 285. Should a phone still be
     narrower, the row scrolls; More is outside it, so it is always there. */
  .stab-row .tabbar{flex:1 1 auto;min-width:0;gap:0;border-bottom:0;margin-bottom:0;-webkit-mask-image:none;mask-image:none}
  .stab-row .tabbar .tab{padding:10px 8px}
  .stab-row .tabbar .tab .ic, .stab-more > summary .ic:not(.stab-chev){display:none}
  .stab-row .tabbar .tab-rest{display:none}
  .stab-more{display:block;flex:none}
  .stab-more > summary.tab{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;color:var(--ink-soft);
    padding:10px 4px 10px 8px;min-height:44px;border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap;background:transparent!important;border-radius:0}
  .stab-more > summary.tab.active{color:var(--ink);border-bottom-color:var(--accent)}
  .stab-more > summary .ic{width:16px;height:16px}
  .stab-more > summary .stab-chev{width:14px;height:14px;transition:transform .2s}
  .stab-more[open] > summary{background:transparent;color:var(--ink);border-color:transparent}
  .stab-more[open] > summary .stab-chev{transform:rotate(180deg)}
  .stab-more .omenu-pop{right:0;left:auto;min-width:190px}
  .stab-more .omenu-pop button.on{font-weight:700;color:var(--ink);background:var(--paper-2)}
  .stab-more .omenu-pop button.on .ic{color:var(--accent)}
}
/* Kitchen / List, on the Shelves heading: the words stay (people read the
   word, not the pan), just tighter than a page switch. */
.kv-head:has(.kv-sv){justify-content:flex-start;gap:4px}
.kv-head > span{margin-right:4px}
.kv-sv{margin-left:auto;flex:none}
.kv-sv button{padding:0 11px;font-size:13px;gap:5px}
.kv-sv button .ic{width:16px;height:16px}
.kv-head-list{margin-top:4px}
/* The month on a phone: each entry is a coloured bar (the colours are the
   calendars ticked above the month), and the whole day is one button that
   opens it in full — names cut to "South / ban…" said nothing, and the date
   alone was a 43×30 target. */
.cal-open{display:none}
.cal-none{margin:2px 2px 6px}
.cal-addday{align-self:flex-start;margin-top:4px}
/* The week, pinched open: a day to a row, every entry written out. */
.cal-week{display:flex;flex-direction:column;gap:8px}
.cal-wday{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);padding:10px 12px}
.cal-wday.is-today{border-color:var(--ink)}
.cal-wday-h{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.cal-wday-h b{font-size:14px}
.cal-wday.is-today .cal-wday-h b{color:var(--accent-ink)}
.cal-wday-h .btn{padding:4px 8px}
.cal-pinch{font-size:12.5px;text-align:center;margin:8px 0 0}
@media(min-width:701px){ .cal-pinch{display:none} }
.cal-root{touch-action:pan-x pan-y}
@media(max-width:700px){
  .cal-cell{position:relative;min-height:64px}
  .cal-open{display:block;position:absolute;inset:0;z-index:1;width:100%;border:0;padding:0;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .cal-open:active{background:color-mix(in srgb, var(--ink) 6%, transparent)}
  .cal-cell .cal-chip{height:6px;padding:0;border:0;border-radius:3px;background:var(--tone,var(--ink-faint))}
  .cal-cell .cal-chip span{display:none}
  .cal-cell .cal-items{gap:4px;padding:0 1px}
  .cal-cell .cal-more{padding:0 4px;background:none}
}
/* The deliveries week strip: 14px sides and 4px gaps left a day 42px wide. */
@media(max-width:600px){
  .dlv-cal{padding-left:10px;padding-right:10px}
  .dlv-cal-days{gap:1px}
  .dlv-cal-day{min-width:44px;min-height:48px}
}
/* The setup guides draw with the app's own line icons, not emoji: a picture
   in a soft circle at the top, an icon per row and per thing to try. */
.guide-hero.guide-hero-ic{display:grid;place-items:center;width:76px;height:76px;border-radius:50%;margin:18px 0 12px;
  background:var(--accent-soft);color:var(--accent-ink);letter-spacing:0}
.guide-hero.guide-hero-ic .ic{width:36px;height:36px}
.guide-li > span .ic{width:20px;height:20px;color:var(--ink-soft)}
.guide-try > span{display:grid;place-items:center}
.guide-try > span .ic{width:24px;height:24px;color:var(--accent-ink)}
.guide-nudge-ic{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:12px;background:var(--accent-soft);color:var(--accent-ink)}
.guide-nudge-ic .ic{width:22px;height:22px}
/* Line icons where emoji used to sit: sized to the words beside them. */
.stat .k .ic,.section-title > .ic{width:16px;height:16px}
.ct-btn .ic{width:14px;height:14px}
.gp-here .ic{width:16px;height:16px}
.os-ic .ic{width:22px;height:22px;color:var(--accent-ink)}
.ob-prep span[aria-hidden] > .ic, .ai-msg span[aria-hidden] > .ic{width:17px;height:17px;vertical-align:-3px;color:var(--ink-soft)}
.mod-note .ic{width:14px;height:14px;color:var(--amber-ink)}
/* The sign-up chat's field sat 6px above the whole bottom safe area — 40pt up
   on an iPhone, a strip of white under it. It goes down into that area to just
   above the home indicator, as Messages does; the keyboard case is unchanged. */
.napp-chat .ai-page .ai-input-row{bottom:max(8px, calc(env(safe-area-inset-bottom) - 18px))}
.napp-chat .ai-page .ai-log{padding-bottom:calc(50px + env(safe-area-inset-bottom))}
html.mkr-kb .napp-chat .ai-page .ai-input-row{bottom:8px}
/* The switch at the top of a page (Tasks · Stock · Deliveries…, the roster's
   three, Floor · Blocks · List on the owner's home). It sat 30px under the top
   bar and 14px over the heading — two empty bands on a phone. */
.page-switch{margin:14px 0 14px}
@media (max-width:720px){
  .page-switch{margin:-8px 0 12px}
  .home-switch{display:block;margin:-8px 0 12px}
  .home-switch .viewswitch{display:flex;width:100%}
  .home-switch .viewswitch > button{flex:1 1 0;justify-content:center;min-width:0}
}
/* The owner's home has no shift card: its empty slot still took a gap. */
.simple-today > #homeShift:empty{display:none}
/* When a page's own heading row hides on a phone (its buttons went up to the
   top bar), what came after it kept its own top margin on top of the page's:
   the Calendar's month sat 32px under the bar. It sits where a page switch
   does, 8px under. */
@media (max-width:720px){
  .topbar.has-actions + .content > .section-head:first-child + *,
  .topbar.has-actions + .content > :first-child > .section-head:first-child + *{margin-top:-8px !important}
}
/* The calendars to tick on a phone slide sideways only: the row also scrolled
   up and down (cutting the ticks in half) and bounced past its ends. */
@media(max-width:700px){
  .cal-layers{overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x}
}
/* The home blocks: the page's own padding is the gap above them on a phone. */
@media (max-width:720px){ .simple-today .tiles-wrap{margin-top:0} }
/* The owner's Today list: what needs you is one grouped list (as on Messages),
   not three loose boxes; each count is tinted like its row, not a black dot;
   and the four quiet figures sit two by two on a phone — four across left
   each one a sliver. */
.today-acts{gap:0;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.today-act{position:relative;border:0;border-radius:0;background:none;padding:14px 16px}
.today-act + .today-act::before{content:"";position:absolute;top:0;left:76px;right:0;border-top:1px solid var(--line-2)}
@media (hover:hover) and (pointer:fine){ .today-act:hover{transform:none;box-shadow:none;background:var(--paper-2)} }
.today-act-n{font-size:13px;min-width:28px;height:24px}
.today-foot{margin-top:22px;padding-top:16px}
@media (max-width:720px){
  .today-foot-metrics{grid-template-columns:1fr 1fr;gap:10px}
  .today-foot-metrics a{padding:12px 14px;border-radius:14px}
  .today-foot-metrics a span{font-size:12.5px}
  .today-foot-metrics a b{font-size:18px}
}
.pick-opt.pick-act .pick-tick{margin-left:auto;display:flex}
.pick-opt.pick-act.on .ic{color:var(--accent)}
/* A sheet with no buttons at its foot (a ⋯ menu, More, a day of the
   calendar): its body's 22px sat on top of the home indicator's own space —
   an empty band under three rows. */
@media (max-width:600px){ .modal:not(:has(> .modal-actions)) > .modal-body{padding-bottom:8px} }
/* Kitchen / List on the Shelves line is a quiet segmented control, not a
   second page switch: a white thumb on a grey track, the size of the words
   beside it (44px to hit, still). */
.kv-sv{background:var(--paper-2);border:1px solid var(--line-2);padding:2px}
.kv-sv > .vs-thumb{top:2px;bottom:2px;background:var(--card);box-shadow:0 1px 3px rgba(0,0,0,.14), 0 0 0 .5px rgba(0,0,0,.04)}
.kv-sv.has-thumb > button.on, .kv-sv > button.on{color:var(--ink)!important;background:transparent!important}
.kv-head .kv-sv > button{position:relative;min-height:34px;padding:0 11px;font-size:13px}
.kv-head .kv-sv > button::after{content:"";position:absolute;inset:-5px 0}
:root[data-theme="dark"] .kv-sv > .vs-thumb{background:var(--paper-2);box-shadow:0 0 0 1px var(--line)}
:root[data-theme="dark"] .kv-sv{background:var(--card)}
:root[data-theme="dark"] .kv-head .kv-sv.has-thumb > button.on, :root[data-theme="dark"] .kv-head .kv-sv > button.on{color:var(--ink)!important}
/* A note's first span is its icon; any other span is text, and must stay
   text: made a flex box too, "1 carton = <b>4 box</b>. Deliveries…" split
   into three columns. */
.disclaimer > span:not(:first-child){display:inline;flex-shrink:1;margin-top:0}
/* Two fields side by side in a form: a label that runs to two lines
   ("Delivery lead time (days)") no longer pushes its box out of line with
   its neighbour's — the boxes line up at the bottom — and a long label wraps
   instead of being cut off ("Supplier sells it by the…"). */
.modal .row > .field{display:flex;flex-direction:column;justify-content:flex-end}
.modal .row > .field > label{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}
/* Purchases: the month is ‹ October 2026 › — step a month either way, or tap
   the month to pick one (on a phone, the same sheet every list opens). It has
   a row of its own there; supplier and search share the row under it. */
.dkt-mon{display:flex;align-items:center;gap:6px;flex:1 1 280px;min-width:0}
.dkt-mon > .input, .dkt-mon > .pick-btn{flex:1 1 auto;min-width:0;text-align:center;justify-content:center;font-weight:600}
.dkt-mon-step{flex:none;width:44px;height:44px;padding:0;justify-content:center}
.dkt-mon-step:disabled{opacity:.35}
@media (max-width:720px){
  .dkt-filters{flex-wrap:wrap}
  .dkt-filters #fMon{display:revert}
  .dkt-filters #fMon.pick-native{display:none}
  .dkt-mon{flex:1 1 100%}
  .dkt-filters > .input, .dkt-filters > .pick-btn{flex:1 1 0}
}
/* Log out, at the foot of My profile: plain, in red, away from Save. */
.pf-out{margin-top:14px;color:var(--red-ink)}
.pf-out .ic{color:var(--red-ink)}
/* Alerts on a phone: "Auto-clear after" and its choice on one line, the
   buttons under it sharing the width — side by side, the words were squeezed
   into a column three lines tall. */
.al-ret > span{white-space:nowrap}
@media (max-width:720px){
  .al-tools{flex-wrap:wrap;gap:10px}
  .al-ret{flex:1 1 100%;justify-content:space-between}
  .al-ret select, .al-ret .pick-btn{flex:0 1 160px}
  .al-tools-r{flex:1 1 100%;display:flex;gap:8px}
  .al-tools-r:empty{display:none}
  .al-tools-r > .btn{flex:1 1 0;justify-content:center;min-height:44px}
}
/* Inside a conversation on a phone the thread is the whole screen, as in any
   messaging app: no top bar, no preview strip — its own head (‹, whose it is)
   is at the top. The offline warning stays: you need to know a message
   can't go. */
@media (max-width:720px){
  body.chat-thread .topbar{display:none!important}
  body.chat-thread .main > .offbar:not(#offbar){display:none!important}
  body.chat-thread .content{padding-top:max(8px, env(safe-area-inset-top))}
  html.mkr-native body.chat-thread .content{padding-top:8px}
}
/* A sheet is open: the page behind stays where it is (js/util.js stops the
   swipe; touch-action here would have stopped the sheet's own form too). */
.modal-back{overscroll-behavior:contain}
/* Certificates on a phone: "Add a certificate" under the title, the width of
   the card — a lone button pinned right on a row of its own looked dropped. */
@media (max-width:720px){
  .cert-head-r{flex:1 1 100%;margin-left:0}
  .cert-head-r #certAdd{flex:1 1 auto;justify-content:center;min-height:44px}
}
/* Audit: the search on the page, the count and the promise in one quiet line. */
.audit-search{margin:0 0 6px}
.audit-count{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12.5px;margin:0 2px 14px}
.audit-count .ic{width:14px;height:14px}
/* Team: a group's first person right under its heading, not a row's height
   below it. */
.team-fold > summary{padding-bottom:2px;margin-bottom:0}
.team-fold > .list > :first-child{padding-top:6px}
/* Settings on a phone: a row whose control is a switch puts the switch under
   its words, the width of the row — beside them, "A quieter look we are
   trying" ran down in four lines and the switches didn't line up. */
@media (max-width:720px){
  .pf-row:has(> .viewswitch){flex-wrap:wrap;row-gap:10px}
  .pf-row:has(> .viewswitch) > .set-name{flex:1 1 0;min-width:0}
  .pf-row > .viewswitch{flex:1 1 100%;display:flex;margin-left:54px}
  .pf-row > .viewswitch > button{flex:1 1 0;justify-content:center;min-width:0}
}
/* Purchases on a phone: the month on top, supplier and search side by side
   under it. */
@media (max-width:720px){ .dkt-mon{order:-1} }
/* Every calendar there is to tick, in view: they wrap onto a second line
   instead of sliding off the edge ("Deep…"). */
@media(max-width:700px){
  .cal-layers{flex-wrap:wrap;overflow:visible;margin:0 2px 10px;padding:0;gap:8px 14px;touch-action:auto}
}
/* Add shift: the seven days as a tidy grid — four across, every box the same
   size, the day over its date — not chips of seven widths wrapping raggedly. */
.sh-days{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.sh-days > .btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:52px;padding:6px 4px;min-width:0}
.sh-days > .btn b{font-size:14px;font-weight:700}
.sh-days > .btn span{font-size:12px;font-weight:500;opacity:.75;white-space:nowrap}
@media (min-width:721px){ .sh-days{grid-template-columns:repeat(7,minmax(0,1fr))} }
/* Skills to tick: two even columns, each box the same width, the tick, the
   icon and the words lined up down the list. */
.skill-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.skill-grid > .skill-chip{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;margin:0}
.skill-grid > .skill-chip > .ic{flex:none;width:18px;height:18px}
.skill-grid > .skill-chip > input{flex:none;margin:0}
/* A page's button row whose buttons all went up to the top bar keeps only
   whitespace, which :empty doesn't count as empty: it still took 16px. */
.tab-actions:not(:has(*)){display:none}
/* Stock: what's under the tabs starts 12px under them, in both views. */
#stockBody > :first-child{margin-top:12px}
/* On a phone, a save that is alone on its row is the width of the row (as
   Save profile is), not a small button left hanging on the right. */
@media (max-width:720px){
  .row:has(> #cuSave:only-child) > #cuSave,
  .section-head > #saveAv, .section-head > #saveBtn{flex:1 1 100%;justify-content:center;min-height:48px}
  .section-head:has(> #saveAv), .section-head:has(> #saveBtn){flex-wrap:wrap}
}
/* The count and the promise read as one line of text that wraps where it
   must, not as three boxes that break after the dot. */
.audit-count{display:block}
.audit-count .ic{vertical-align:-2px;margin-right:2px}
/* Four figure cards (Takings, and any page that uses the same grid): two by
   two on a phone, not four full-width cards one under another. */
@media(max-width:520px){
  .grid.g4:has(> .card.stat){grid-template-columns:1fr 1fr;gap:10px}
  .grid.g4 > .card.stat{padding:14px}
  .grid.g4 > .card.stat .v{font-size:24px}
}
/* Add shift: the venue's shifts as one even column, name left, time right. */
.sh-slots{display:grid;grid-template-columns:1fr;gap:6px}
.sh-slots > .btn{justify-content:space-between;min-height:44px;padding:6px 14px}
/* A shift for other positions names them on a second line, left-aligned like the name above it. */
.sh-slots > .btn > span:first-child{text-align:left}
/* The Shelves line: "Edit" (beside the word Shelves it says what it edits)
   stays on one line next to Kitchen / List. */
.kv-head .kv-edit span{white-space:nowrap}
.skill-grid > .skill-chip{padding:6px 10px;gap:7px;font-size:13.5px;line-height:1.2;overflow:hidden}
.skill-grid > .skill-chip > .ic{width:16px;height:16px}
.skill-grid > .skill-chip{font-size:13px;white-space:normal;padding:6px 8px;gap:6px}

/* Ordering (js/stock-view.js cartTab): one cart, a card per supplier, like a
   shop's cart — tick, nudge the quantity, take out, then order. */
.sc{display:flex;flex-direction:column;gap:12px}
.sc-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sc-all,.sc-sup{display:flex;align-items:center;gap:8px;cursor:pointer;min-width:0}
.sc-tick{width:20px;height:20px;margin:0;flex:none;accent-color:var(--accent);cursor:pointer}
.sc-group{padding:4px 14px 10px}
.sc-ghead{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:10px 0;border-bottom:1px solid var(--line-2)}
.sc-sup b{font-size:15px}
.sc-sup svg{width:16px;height:16px;color:var(--ink-soft)}
.sc-gfacts{font-size:12.5px}
.sc-gsub{font-size:14px;white-space:nowrap}
.sc-gsent{display:inline-flex;align-items:center;gap:3px;background:var(--paper-2);color:var(--ink-soft)}
.sc-gsent svg{width:12px;height:12px}
button.sc-gsent{border:0;font:inherit;font-size:12.5px;cursor:pointer}
/* 照上次订: their last order back in, in one tap */
.sc-glast{display:inline-flex;align-items:center;gap:4px;background:var(--paper-2);color:var(--ink);border:0;font:inherit;font-size:12.5px;cursor:pointer}
.sc-glast svg{width:12px;height:12px}
/* 上次 2 箱 · 11月5日 · 小王 under a line */
.sc-last{font-size:12px;color:var(--ink-soft);margin-top:2px}
.sc-gtotal{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:12px 0 4px;font-size:13.5px;font-weight:600}
.sc-gtotal b{font-size:17px}
.sc-gtotal .faint{font-weight:400;font-size:12px}
.sc-line{display:flex;align-items:flex-start;gap:10px;padding:12px 0;border-bottom:1px solid var(--line-2)}
.sc-line > .sc-tick{margin-top:22px}
.sc-pic{width:56px;height:56px;flex:none;border-radius:10px;background:var(--paper-2);display:flex;align-items:center;justify-content:center;font-size:24px;overflow:hidden}
.sc-pic img{width:100%;height:100%;object-fit:cover}
.sc-add .sc-pic{width:40px;height:40px;font-size:18px}
.sc-add{align-items:center}
.sc-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.sc-name{font-size:14.5px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
/* Shelf-tag price (per 100g / 100ml / each) under a line's price, and the
   "cheaper at another supplier" note with its one-tap move. */
.sc-u100{display:block;font-size:11.5px;color:var(--ink-soft);margin-top:2px;font-variant-numeric:tabular-nums;white-space:nowrap}
.sc-u100.best{color:var(--green-ink);font-weight:600}
.sc-swap{display:inline-flex;align-items:center;gap:3px;vertical-align:1px;margin-left:4px;padding:1px 7px 1px 5px;border-radius:999px;border:1px solid var(--line);background:var(--paper-2);color:var(--ink-soft);font-size:11.5px;font-weight:600;line-height:1.5;cursor:pointer}
.sc-swap svg{width:13px;height:13px}
.sc-swap:hover,.sc-swap:focus-visible{color:var(--ink);border-color:var(--ink-faint)}
/* The comparison window a switch icon opens: one row per supplier, cheapest first. */
.cmp-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:start;padding:12px 0;border-top:1px solid var(--line)}
.cmp-row.me{background:var(--paper-2);margin:0 -12px;padding:12px;border-radius:12px;border-top-color:transparent}
.cmp-who,.cmp-num{display:flex;flex-direction:column;gap:2px;min-width:0;font-size:13px}
.cmp-who b{font-size:14.5px}
.cmp-num{text-align:right;align-items:flex-end;font-variant-numeric:tabular-nums}
.cmp-num b{font-size:16px}
.cmp-less{color:var(--green-ink);font-weight:600}
.cmp-more{color:var(--ink-soft)}
.cmp-go{grid-column:1 / -1;justify-self:start}
.sc-crown{font-size:.95em;margin-left:2px}
/* An item's second-language name (MKR.stock.nameHtml): its own line under the
   main name, a size smaller and quieter, so the main name is what the eye finds. */
.nm-sub{display:block;font-size:.84em;font-weight:400;line-height:1.3;color:var(--ink-soft);margin-top:1px;overflow-wrap:anywhere}
.sc-why{font-size:12.5px;color:var(--ink-soft)}
.sc-code{font-size:12px;font-weight:600;color:var(--ink-soft);background:var(--paper-2);border-radius:6px;padding:1px 6px}
.sc-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:4px}
.sc-step{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--card)}
.sc-step button{width:36px;height:34px;border:0;background:none;color:var(--ink);display:flex;align-items:center;justify-content:center;cursor:pointer}
.sc-step button svg{width:16px;height:16px}
.sc-step input{width:52px;height:34px;border:0;border-left:1px solid var(--line);border-right:1px solid var(--line);text-align:center;font:inherit;font-weight:700;background:none;color:var(--ink);-moz-appearance:textfield}
.sc-step input::-webkit-outer-spin-button,.sc-step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.sc-unit{font-size:13px;font-weight:600}
.sc-link{border:0;background:none;padding:0;font:inherit;font-size:12.5px;color:var(--ink-soft);text-decoration:underline;cursor:pointer}
.sc-price{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.sc-price b{font-size:15px}
.sc-price .faint{font-size:11.5px}
.sc-min{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--amber-ink);padding:10px 0 0}
.sc-min svg{width:14px;height:14px}
.sc-more{padding-top:8px}
.sc-more summary{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:var(--ink-soft);cursor:pointer;list-style:none;padding:4px 0}
.sc-more summary::-webkit-details-marker{display:none}
.sc-more summary svg{width:14px;height:14px}
.sc-new{display:flex;gap:6px;padding:10px 0 2px}
.sc-new .input{flex:1;min-width:0}
.sc-new .sc-new-u{flex:0 0 84px}
.sc-new{flex-wrap:wrap}
.sc-new .sc-new-p{flex:0 0 96px}
@media (max-width:560px){ .sc-new .input[name="n"]{flex:1 1 100%} .sc-new .sc-new-u,.sc-new .sc-new-p{flex:1 1 0} }
/* Swipe a line left for 删除 (js/stock-view.js bindSwipe). */
.sc-sw{position:relative;overflow:hidden}
.sc-sw-del{position:absolute;top:1px;right:0;bottom:1px;width:84px;border:0;background:var(--red);color:#fff;font:inherit;font-weight:700;font-size:13px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer}
.sc-sw-del svg{width:18px;height:18px}
.sc-sw-edit{position:absolute;top:1px;right:84px;bottom:1px;width:76px;border:0;background:var(--ink-soft, #6b6560);color:#fff;font:inherit;font-weight:700;font-size:13px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer}
.sc-sw-edit svg{width:18px;height:18px}
.sc-sw > .sc-line{position:relative;background:var(--card);transition:transform .22s ease;touch-action:pan-y}
.sc-sw.dragging > .sc-line{transition:none}
.sc-setprice{border:1px dashed var(--line);background:none;border-radius:8px;padding:4px 8px;font:inherit;font-size:12px;font-weight:600;color:var(--ink);
  display:inline-flex;align-items:center;gap:3px;cursor:pointer;white-space:nowrap}
.sc-setprice svg{width:12px;height:12px}
.sc-totop{position:absolute;left:6px;top:-58px;width:48px;height:48px;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink);
  box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;font:inherit;font-size:10.5px;font-weight:600;cursor:pointer}
.sc-totop svg{width:17px;height:17px}
.sc-totop[hidden]{display:none}
.sc-bar-find{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:12px;height:46px;width:48px;padding:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font:inherit;font-size:11px;font-weight:600;cursor:pointer;flex:none}
.sc-bar-find svg{width:18px;height:18px}
.sc-idle{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px}
.sc-bar{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.sc-bar-sum{display:flex;flex-direction:column;gap:1px;font-size:13px}
.sc-bar-sum .v{font-size:19px}
.sc-searching .sc-bar, .sc-finding .sc-bar{display:none}
.sc-bar-sum{border:0;background:none;padding:2px 4px 2px 0;margin:0;font:inherit;color:inherit;text-align:left;cursor:pointer;border-radius:8px}
.sc-bar-sum:disabled{cursor:default}
.sc-bar-n{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.sc-bar{gap:8px}
.sc-bar-sum{flex:1 1 auto;min-width:0}
.sc-bar > .btn{flex:none;white-space:nowrap}
.sc-bar-see{display:inline-flex;align-items:center;gap:1px;font-weight:600;color:var(--ink);text-decoration:underline;text-underline-offset:2px}
.sc-bar-see svg{width:13px;height:13px}
/* Finding an item in a long order form. */
.sc [hidden]{display:none !important}
.sc-search{position:relative;display:flex;align-items:center}
.sc-search > svg{position:absolute;left:13px;width:17px;height:17px;color:var(--ink-soft);pointer-events:none}
.sc-search .input{width:100%;padding-left:38px;padding-right:40px;height:44px;font-size:16px}
.sc-search .input::-webkit-search-cancel-button{-webkit-appearance:none}
.sc-search-x{position:absolute;right:6px;width:32px;height:32px;border:0;border-radius:50%;background:var(--paper-2);color:var(--ink-soft);display:flex;align-items:center;justify-content:center;cursor:pointer}
.sc-search-x svg{width:14px;height:14px}
.sc-search-x[hidden]{display:none}
.sc-nofind{font-size:14px}
.sc-line.sc-flash,.sc-flash > .sc-line{animation:scFlash 1.4s ease}
@keyframes scFlash{0%,40%{background:color-mix(in srgb,var(--accent) 14%,var(--card))}100%{background:var(--card)}}
/* What is picked, in a sheet of its own. */
.sc-rev{display:flex;flex-direction:column;gap:14px}
.sc-rev-h{display:flex;align-items:center;gap:8px;padding-bottom:6px;border-bottom:1px solid var(--line-2);font-size:14px}
.sc-rev-h svg{width:16px;height:16px;color:var(--ink-soft)}
.sc-rev-h .faint{margin-left:auto;font-size:12.5px}
.sc-rev-li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:baseline;width:100%;padding:10px 0;border:0;border-bottom:1px solid var(--line-2);background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.sc-rev-n{font-size:14px;overflow-wrap:anywhere}
.sc-rev-q{white-space:nowrap;font-size:14px}
.sc-rev-a{white-space:nowrap;font-size:13.5px;min-width:64px;text-align:right}
.sc-rev-row{display:flex;align-items:center;gap:6px;border-bottom:1px solid var(--line-2)}
.sc-rev-row .sc-rev-li{border-bottom:0;flex:1;min-width:0}
.sc-rev-x{flex:none;width:36px;height:36px;border:0;border-radius:10px;background:none;color:var(--red);display:flex;align-items:center;justify-content:center;cursor:pointer}
.sc-rev-x svg{width:17px;height:17px}
/* The PO sheet: its lines, each one deletable until it is sent. */
.po-lines-edit{margin:4px 0 12px;border:1px solid var(--line);border-radius:12px;padding:2px 12px}
.po-lines-h{font-size:13px;font-weight:700;padding:10px 0 6px;border-bottom:1px solid var(--line-2)}
.po-line-e{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line-2);font-size:14px}
.po-line-e:last-child{border-bottom:0}
.po-line-e .n{overflow-wrap:anywhere}
.po-line-by{display:block;font-size:12px;color:var(--ink-soft);font-weight:400}
.po-line-e .q,.po-line-e .a{white-space:nowrap}
.po-line-e .a{min-width:60px;text-align:right}
.po-line-x{display:inline-flex;align-items:center;gap:3px;border:1px solid var(--line);border-radius:8px;background:none;color:var(--red);font:inherit;font-size:12.5px;font-weight:600;padding:5px 8px;cursor:pointer}
.po-line-x svg{width:14px;height:14px}
.po-line-x:disabled{opacity:.4;cursor:default}
.sc-rev-t{display:flex;justify-content:space-between;align-items:baseline;font-size:14px}
.sc-rev-t b{font-size:19px}
.sc-form{border:1px solid var(--line);border-radius:12px;padding:4px 14px}
.sc-form-h{padding:10px 0;border-bottom:1px solid var(--line-2);font-size:13.5px}
.sc-form-li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:baseline;padding:9px 0;border-bottom:1px solid var(--line-2)}
.sc-form-li:last-child{border-bottom:0}
.sc-form-li .sc-code:empty{padding:0;background:none}
.sc-form-li .q{font-weight:700;white-space:nowrap}
.sc-form-note{padding:10px 0;font-size:13px;color:var(--ink-soft);white-space:pre-line}
.li.done{opacity:.6}
/* The assistant button sits over the cart's Order button otherwise: lift it clear. */
body:has(.sc-bar) .ai-fab{bottom:96px}
@media (max-width:720px){
  .sc-bar{bottom:calc(var(--nav-float, 10px) + 70px)}
  body:has(.sc-bar) .ai-fab{bottom:calc(var(--nav-float, 10px) + 150px)}
}
@media (max-width:560px){
  .sc-group{padding:2px 12px 8px}
  .sc-pic{width:48px;height:48px}
  .sc-line > .sc-tick{margin-top:16px}
}
/* Purchase orders: the number on the sheet, the totals under it, the list of sent ones. */
.sc-po-no{font-size:17px;font-weight:700;letter-spacing:.02em;margin-bottom:2px}
.sc-form-n{display:flex;flex-direction:column;min-width:0}
.sc-form-n .faint{font-size:12px}
.sc-form-tot{display:flex;justify-content:space-between;padding:4px 0;font-size:13.5px;color:var(--ink-soft)}
.sc-form-tot:first-of-type{padding-top:10px}
.sc-form-grand{color:var(--ink);font-weight:700;font-size:15px;border-top:1px solid var(--line-2);margin-top:4px;padding:8px 0 10px}
.sc-po{display:flex;width:100%;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border:0;border-bottom:1px solid var(--line-2);background:none;font:inherit;color:inherit;text-align:left;cursor:pointer}
.sc-po:last-child{border-bottom:0}
.sc-po-main,.sc-po-side{display:flex;flex-direction:column;gap:2px;min-width:0}
.sc-po-main .faint{font-size:12.5px}
.sc-po-side{align-items:flex-end;flex:none}
/* The purchase order on screen: the paper itself, white in either theme, shrunk to fit. */
.sc-po-row{display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--line-2)}
.sc-po-row:last-child{border-bottom:0}
.sc-po-row .sc-po{flex:1;min-width:0;border-bottom:0}
.sc-po-x{flex:none;width:38px;height:38px;border:0;border-radius:10px;background:none;color:var(--red);display:flex;align-items:center;justify-content:center;cursor:pointer}
.sc-po-x svg{width:17px;height:17px}
/* Units to tap in the item editor. */
.unit-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:-4px 0 14px;font-size:12.5px}
.unit-chip{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:999px;padding:5px 11px;font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;min-width:38px}
/* 进价: 1 箱 = 10 把 $58 over 1 把 $5.80, like a line on a paper price list. */
/* The item's prices (stock-view.js itemModal): two blocks, each with a small
   caption — the pack price (optional) and the price of one unit. The $ sits in
   the box and "/箱" after it, right where the number is. */
.price-card{border:1px solid var(--line);border-radius:14px;background:var(--card);display:flex;flex-direction:column;overflow:hidden}
.pc-block{padding:12px 14px 14px}
.pc-unitrow{border-top:1px dashed var(--line)}
.pc-cap{font-size:12.5px;font-weight:600;color:var(--ink-soft);margin-bottom:8px}
.pc-cap .faint{font-weight:500}
.pc-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pc-qty{display:flex;align-items:center;gap:6px;flex:1 1 auto;min-width:0}
.pc-row .input{height:44px;font-size:16px;min-width:0}
.pc-qty .input{padding:6px 8px;text-align:center}
.pc-1{font-weight:700;font-size:16px;flex:none}
.pc-pack{flex:0 0 64px;width:64px}
.pc-n{flex:0 0 76px;width:76px}
.pc-eq{flex:none;color:var(--ink-soft);font-weight:700}
.pc-unit{flex:none;font-weight:700;font-size:15px}
.pc-money{display:flex;align-items:center;gap:4px;flex:0 0 auto;width:auto;margin-left:auto;padding:0 12px;cursor:text}
.pc-money:focus-within{border-color:var(--accent);background:var(--card);box-shadow:0 0 0 3px var(--accent-soft)}
.pc-cur{flex:none;color:var(--ink-soft);font-weight:700}
.pc-price{width:84px;min-width:0;border:none;background:transparent;color:var(--ink);font:inherit;font-size:17px;font-weight:700;text-align:right;padding:0;outline:none;height:100%}
.pc-per{flex:none;font-size:13px;color:var(--ink-soft);white-space:nowrap}
.pc-row input[type=number]{-moz-appearance:textfield;appearance:textfield}
.pc-row input[type=number]::-webkit-inner-spin-button,.pc-row input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.pc-sub:empty{display:none}
.pc-sub{margin-top:8px;font-size:12.5px;color:var(--ink-soft);text-align:right}
.price-card .unit-chips{margin:0}
.pc-note{margin-top:8px}
/* A narrow phone: the price goes onto its own line, full width. */
.pc-cap-side{display:flex;flex-direction:column;gap:2px;margin:0;font-size:14px;font-weight:700;color:var(--ink);flex:1 1 auto;min-width:0}
.pc-cap-side .faint{font-size:12.5px;font-weight:500}
/* A narrow phone: the pack price goes onto its own line, full width; the unit
   price keeps its label beside it. */
@media (max-width:420px){ .pc-block:not(.pc-unitrow) .pc-money{flex:1 1 100%;margin-left:0} .pc-block:not(.pc-unitrow) .pc-price{flex:1 1 auto;width:auto} }
/* Ordering by the pack or by the stock unit, on the line: [箱 | 把]. */
.sc-unit-fixed{display:inline-flex;align-items:center;height:34px;padding:0 4px;font-size:14px;font-weight:700;color:var(--ink)}
/* The price sits in the line's top-right corner, beside the name, so the row
   under it (− 0 + · [包 | 公斤] · 删除) has the whole width and stays on one
   line; the name and the shelf line leave room for the price. */
.sc-sw > .sc-line{position:relative}
.sc-sw > .sc-line > .sc-price{position:absolute;top:12px;right:0;max-width:96px}
.sc-sw > .sc-line > .sc-main > .sc-name, .sc-sw > .sc-line > .sc-main > .sc-why, .sc-sw > .sc-line > .sc-main > .sc-last{padding-right:98px}
/* …and the row itself starts under the picture, the full width of the card:
   the name and shelf line keep at least the picture's height, so the row
   never runs into it. */
.sc-sw > .sc-line > .sc-main > .sc-row{margin-left:-66px}
.sc-sw > .sc-line > .sc-main > .sc-why{min-height:34px}
@media (max-width:560px){
  .sc-sw > .sc-line > .sc-main > .sc-row{margin-left:-58px}
  .sc-sw > .sc-line > .sc-main > .sc-why{min-height:26px}
}
.sc-ut{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--card)}
.sc-ut button{border:0;background:none;font:inherit;font-size:14px;font-weight:700;padding:0 12px;height:34px;color:var(--ink-soft);cursor:pointer;min-width:40px}
.sc-ut button + button{border-left:1px solid var(--line)}
.sc-ut button.on{background:var(--ink);color:var(--card)}
textarea.input.i-name{resize:none;overflow:hidden;line-height:1.4;min-height:46px !important;padding-top:11px;padding-bottom:11px}
.unit-hint{flex-basis:100%;font-size:12px;margin-top:2px}
.unit-chip.on{background:var(--ink);border-color:var(--ink);color:var(--card)}
/* Folding a supplier on the order page: the header stays (name, count,
   subtotal), the lines go. A search still looks inside. */
.sc-fold{flex:none;width:30px;height:30px;margin-left:-6px;border:0;border-radius:8px;background:none;color:var(--ink-soft);display:flex;align-items:center;justify-content:center;cursor:pointer}
.sc-fold svg{width:18px;height:18px}
.sc:not(.sc-searching) .sc-folded > :not(.sc-ghead){display:none}
.sc-folded > .sc-ghead{border-bottom:0}
.sc-top-r{display:flex;align-items:center;gap:8px}
/* Long-press and drag to reorder (order page, prices). */
.sc-sw > .sc-line, .sc-group[data-group] > .sc-ghead, .pw-line{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.sc-dragging{position:relative;z-index:30;transition:none !important}
.sup-items .chip{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.sup-items .chip.sc-dragging{box-shadow:0 8px 22px rgba(0,0,0,.2)}
.sc-sw.sc-dragging > .sc-line, .pw-line.sc-dragging{box-shadow:0 10px 28px rgba(0,0,0,.18);border-radius:12px;background:var(--card)}
.sc-group.sc-dragging{box-shadow:0 12px 32px rgba(0,0,0,.2)}
.sc-sorting-sups .sc-group[data-group] > :not(.sc-ghead){display:none !important}
.sc-sorting-sups .sc-group[data-group] > .sc-ghead{border-bottom:0}
body.sc-drag-on{overscroll-behavior:none}
/* 分类: a supplier's goods in groups (牛肉, 鸡肉…), the plain group last. */
.sc-cathead{display:flex;align-items:center;gap:8px;padding:12px 0 6px;font-size:13px;color:var(--ink-soft);border-bottom:1px solid var(--line-2)}
.sc-cathead b{font-size:13.5px;color:var(--ink);font-weight:800}
.sc-cathead-none b{color:var(--ink-soft);font-weight:700}
.sc-cat + .sc-cat > .sc-cathead{margin-top:6px}
.sc-sorting-cats .sc-cat > :not(.sc-cathead){display:none !important}
.sc-cat.sc-dragging{background:var(--card);box-shadow:0 10px 28px rgba(0,0,0,.18);border-radius:12px}
/* 排顺序: short rows, a handle that drags at once, 置顶 in one tap. */
.sc-gsort{display:inline-flex;align-items:center;gap:4px;background:var(--paper-2);color:var(--ink);border:0;font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.sc-gsort svg{width:13px;height:13px}
.sc-gsort.on{background:var(--ink);color:var(--card)}
.sc-sortmode .sc-new, .sc-sortmode .sc-gtotal, .sc-sortmode .sc-min, .sc-sortmode .sc-glast, .sc-sortmode .sc-gcount{display:none}
.sc-srow{display:flex;align-items:center;gap:10px;min-height:48px;padding:4px 0;border-bottom:1px solid var(--line-2);background:var(--card);
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.sc-handle{flex:none;display:grid;place-items:center;width:40px;height:40px;margin-left:-8px;border-radius:10px;color:var(--ink-soft);cursor:grab;touch-action:none}
.sc-handle svg{width:20px;height:20px}
.sc-handle:hover{background:var(--paper-2)}
.sc-cathead .sc-handle{width:32px;height:32px;margin-left:-6px}
.sc-spic{flex:none;width:32px;height:32px;border-radius:8px;background:var(--paper-2);display:grid;place-items:center;font-size:17px;overflow:hidden}
.sc-spic img{width:100%;height:100%;object-fit:cover}
.sc-sname{flex:1;min-width:0;font-size:14px;font-weight:600;line-height:1.3;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.sc-stop{flex:none;display:inline-flex;align-items:center;gap:3px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.sc-stop svg{width:14px;height:14px}
.sc-cat > .sc-srow:first-child .sc-stop, .sc-cat > .sc-cathead + .sc-srow .sc-stop{visibility:hidden}
.sc-srow.sc-dragging{box-shadow:0 10px 28px rgba(0,0,0,.18);border-radius:12px;cursor:grabbing}
/* 预测: the same supplier cards — each item, its days left and the suggestion. */
.fc-pending{font-size:12.5px;margin:10px 2px 0}
.fc-line{display:flex;align-items:flex-start;gap:10px;padding:12px 0;border-bottom:1px solid var(--line-2);cursor:pointer}
.fc-line:last-child{border-bottom:0}
.fc-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.fc-cov{display:flex;align-items:center;gap:8px;font-size:13px}
.fc-cov .fc-cover{flex:0 0 70px}
.fc-sug{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:1px;text-align:right;min-width:64px}
.fc-sug b{font-size:15px}
.fc-sug small{font-size:11px}
@media (max-width:560px){ .fc-line .sc-pic{width:44px;height:44px;font-size:20px} }
/* Home: where the "N things waiting" count comes from, each part a link. */
.fp-parts{margin:4px 0 0;font-size:13px;color:var(--ink-soft);line-height:1.6}
.fp-parts a{color:var(--ink-soft);text-decoration:none;white-space:nowrap}
.fp-parts a b{color:var(--ink);font-weight:800}
.tile-gaps{display:block;font-size:12px;color:var(--amber-ink);margin-top:2px}
/* Roster: "Worth a look" marked 已读 — counted no more, still listed, dimmed. */
.rs-warn-read{flex:none;margin-right:8px;padding:4px 10px;font-size:12.5px}
.rs-warn-read svg, .rs-warn-seen svg{width:14px;height:14px}
.rs-warn-seen{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;margin-right:6px}
.rs-warn-isread{opacity:.5}
/* The bottom bar: tabs can be held and dragged (no copy / preview menu). */
.mobile-nav > [data-tab]{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.mobile-nav > .sc-dragging{z-index:5;transform-origin:center;background:var(--card);border-radius:14px;box-shadow:0 8px 22px rgba(0,0,0,.18)}
/* More: the bottom bar's pages, to drag into order, above the rest. */
.navsheet-h{font-size:12.5px;font-weight:700;color:var(--ink-soft);padding:12px 4px 4px}
/* The count sits on the icon's corner, as on a phone's home screen, so every
   row's grip lines up at the right edge. */
.navsheet-all .ns-ic{position:relative}
.navsheet-all .ns-ic .ns-badge{position:absolute;top:-6px;right:-8px;margin:0;min-width:18px;height:18px;padding:0 5px;font-size:11px;line-height:18px;box-shadow:0 0 0 2px var(--card)}
.navsheet-all .ns-label{flex:1;min-width:0}
.navsheet-all .ns-grip{margin-left:0;flex:none}
.navsheet-div{border-top:1px solid var(--line-2);margin-top:6px}
.ns-grip{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:20px;color:var(--ink-soft);opacity:.55}
.ns-grip i{display:block;width:16px;height:2px;border-radius:1px;background:currentColor;box-shadow:0 -5px 0 currentColor, 0 5px 0 currentColor}
/* Workflow: each tab's own number, and what waits on the other tabs. */
.page-switch [data-tab]{position:relative}
.pt-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-left:4px;border-radius:9px;background:var(--red);color:#fff;font-size:11px;font-weight:800;line-height:1}
.wf-notice{display:flex;align-items:flex-start;gap:8px;margin:8px 0 4px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb, var(--amber) 14%, var(--card));color:var(--amber-ink);font-size:13.5px}
.wf-notice svg{width:16px;height:16px;flex:none;margin-top:2px}
.wf-notice a{color:inherit;text-decoration:none}
.wf-notice a b{font-weight:800}
.pw-head .section-title{margin:0}
.pw-group{margin-top:12px}
.pw-line{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line-2)}
.pw-line:last-child{border-bottom:0}
.pw-line > .sw-in{display:flex;align-items:center;gap:10px;width:100%;padding:12px 0;background:var(--card)}
.pw-line > .sw-acts{top:1px;bottom:1px}
.pw-line .meta{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
.pw-line .pw-need{margin-top:0}
@media (max-width:560px){ .pw-line .sc-pic{width:44px;height:44px;font-size:20px} }
.po-sent{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;border-radius:10px;background:var(--paper-2);font-size:13.5px;color:var(--ink-soft)}
.po-showprice{display:flex;align-items:center;gap:10px;margin:10px 0 0;font-size:12.5px}
.po-showprice .btn svg{width:15px;height:15px}
.po-sent svg{width:16px;height:16px;flex:none;margin-top:2px;color:var(--ink)}
.po-paper{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;margin-top:12px}
.po-fit{width:760px;margin:0 auto}
/* The sheet is shrunk with zoom to fit a phone; iOS then "autosizes" text in
   its wider cells (Description, with prices off) to several times the rest.
   The sheet is a fixed layout: every word stays the size it was set. */
.po-sheet,.po-sheet *{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.po-edit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 10px}
.po-edit .field{margin-bottom:8px}
.po-edit-note{grid-column:1/-1}
.po-edit-wide{grid-column:1/-1}
.po-edit-wide [data-addx]{display:inline-flex;align-items:center;gap:4px;width:auto;margin:2px 0 4px}
.po-extra{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;gap:6px;align-items:center;margin-bottom:6px}
@media (max-width:560px){ .po-edit{grid-template-columns:repeat(2,minmax(0,1fr))} .po-edit .field:first-child{grid-column:1/-1} }
/* Whether the supplier's copy carries prices. */
.po-prices{display:flex;align-items:flex-start;gap:10px;margin:4px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;cursor:pointer}
.po-prices input{width:20px;height:20px;margin:1px 0 0;flex:none;accent-color:var(--accent)}
.po-prices span{display:flex;flex-direction:column;gap:2px;min-width:0}
.po-prices small{font-size:12.5px}
.po-colors{display:flex;align-items:center;gap:8px;margin:8px 0 0;flex-wrap:wrap}
.po-langs{display:flex;align-items:center;gap:6px;margin:8px 0 0;flex-wrap:wrap}
.po-langs>span{font-size:13px;margin-right:2px}
.po-lang{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:999px;padding:5px 11px;font:inherit;font-size:13px;cursor:pointer}
.po-lang.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-ink);font-weight:600}
.po-colors>span{font-size:13px;margin-right:2px}
.po-color{width:28px;height:28px;border-radius:50%;border:2px solid var(--line);padding:0;cursor:pointer;background:linear-gradient(135deg,var(--h) 0 50%,var(--i) 50% 100%)}
.po-color.on{border-color:var(--ink);box-shadow:0 0 0 2px var(--paper),0 0 0 4px var(--ink)}
/* Printing (the iPhone app's PDF) drops backgrounds unless told to keep them. */
.po-sheet,.po-sheet *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
/* A sheet filled back in from an earlier, unsaved go (js/util.js draftFor). */
.draft-note{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;padding:8px 10px 8px 12px;
  border-radius:10px;background:var(--amber-soft);color:var(--amber-ink);font-size:13px}
.draft-note .btn{flex:none}
.soc-app{flex:0 0 auto;width:auto;min-width:104px}
/* A number with its unit after it, inside the box ("30 天"). */
.input-suffix{position:relative}
.input-suffix .input{padding-right:46px}
.input-suffix span{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:var(--ink-soft);font-size:14px;pointer-events:none}
/* A supplier's sheet: what they supply, and adding to it. */
.sup-goods{border:1px solid var(--line);border-radius:12px;padding:2px 12px}
.sup-good{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line-2)}
.sup-good:last-child{border-bottom:0}
.sup-good .faint{font-size:12.5px}
.sup-new{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,.8fr) minmax(0,.8fr) minmax(0,.9fr) auto;gap:6px;margin:8px 0 4px}
@media (max-width:560px){ .sup-new{grid-template-columns:minmax(0,1fr) minmax(0,1fr)} .sup-new #s_gn{grid-column:1/-1} .sup-new .btn{grid-column:1/-1} }
/* An item's other suppliers, each with their own code for it. */
.item-srcs{display:flex;flex-direction:column;gap:6px;margin-bottom:6px}
.item-src{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) auto;gap:6px;align-items:center}
/* Which supplier a cart line is ordered from, when more than one has it. */
.sc-via{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink-soft);margin-top:2px}
.sc-via select{font:inherit;color:var(--ink);background:var(--paper-2);border:1px solid var(--line);border-radius:8px;padding:3px 6px;max-width:190px}
/* A photographed order form, read: each line, its quantity, and what it is. */
.sc-scan.busy{opacity:.6;pointer-events:none}
.sr-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:8px 12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line-2)}
.sr-row:last-child{border-bottom:0}
.sr-read{min-width:0;font-size:13.5px;overflow-wrap:anywhere}
.sr-pick{display:grid;grid-template-columns:76px minmax(0,1fr);gap:6px}
.sr-new .sr-pick select{border-color:var(--amber);color:var(--amber-ink)}
@media (max-width:560px){ .sr-row{grid-template-columns:1fr} }
/* A supplier's sheet: adding many items at once. */
.sup-addmode{margin-bottom:2px}
.sup-bulk-h{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13.5px}
.sup-bulk-pick{max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:2px 12px;margin-top:6px}
.sup-bulk-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line-2);cursor:pointer;font-size:13.5px}
.sup-bulk-row:last-child{border-bottom:0}
.sup-bulk-row input{width:18px;height:18px;accent-color:var(--accent);flex:none}
.sup-bscan.busy{opacity:.6;pointer-events:none}
#s_blist{margin-top:6px;font-size:13.5px}
.sr-noqty{border-color:var(--amber)}
/* "Take a photo or pick one": the camera beside the words, centred on them. */
.img-preview > span{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.img-preview > span .ic{margin:0;flex:none}
/* A button marked hidden stays hidden (.btn's own display overrode it:
   "Remove photo" showed with no photo there). */
.btn[hidden]{display:none}
/* Importing a spreadsheet: what each sheet would add or change. */
.im-sec{padding:10px 0;border-bottom:1px solid var(--line-2)}
.im-sec:last-of-type{border-bottom:0}
.im-sec > b{margin-right:8px}
.im-names{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
#imUp.busy{opacity:.6;pointer-events:none}
/* A venue's own colours set a light tint for every theme (js/brand.js), and
   in dark mode that put light words on a pale background — the selected
   supplier, a highlighted row, a tinted chip. Dark mode gets a dark tint of
   the same colour instead (it outranks the inline value). */
:root[data-theme="dark"]{ --accent-soft: color-mix(in srgb, var(--accent) 24%, #1C2230) !important; }
/* The cart as an order form: every product of the supplier, the ones not
   being ordered at 0 and quieter. */
.sc-tick-gap{width:20px;flex:none}
.sc-zero .sc-pic{opacity:.55}
.sc-zero .sc-name{color:var(--ink-soft);font-weight:500}
.sc-zero .sc-step button[disabled]{opacity:.3;cursor:default}
.sc-zero .sc-step input::placeholder{color:var(--ink-faint);font-weight:500}
.sc-none{font-size:13px;padding:12px 0 4px}
.sc-gcount{margin-left:auto}
button.sc-gcount{border:0;font:inherit;font-size:12.5px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:2px}
button.sc-gcount svg{width:12px;height:12px}
.sc-rev-off .sc-rev-n,.sc-rev-off .sc-rev-q,.sc-rev-off .sc-rev-a{opacity:.5}
.sc-rev-n small{display:block;font-size:11.5px;opacity:1}
/* The unit beside the quantity, written by whoever is ordering. */
.sc-unit-in{width:64px;height:34px;padding:0 8px;border:1px dashed var(--line);border-radius:8px;background:none;color:var(--ink);
  font:inherit;font-size:13px;font-weight:600}
.sc-unit-in:focus{outline:none;border-style:solid;border-color:var(--accent)}
.sc-unit-in::placeholder{color:var(--ink-faint);font-weight:500}
.sc-unit-sub{font-size:12px}
.sc-each{white-space:nowrap}
/* A price nobody knows yet. */
.sc-unknown{color:var(--ink-soft);font-weight:600}
.sc-unknown-n{font-size:12px;margin-left:4px}
/* Downloading a purchase order: PDF, Excel or a picture. */
.po-dl{display:flex;flex-direction:column;gap:8px}
.po-dl .btn{justify-content:flex-start;gap:12px;padding:12px 14px;height:auto;text-align:left}
.po-dl .btn svg{width:20px;height:20px;flex:none}
.po-dl .btn span{display:flex;flex-direction:column;gap:1px}
.po-dl .btn i{font-style:normal;font-weight:500;font-size:12.5px;color:var(--ink-soft)}

/* Add people: how many of each the venue has, of how many it may have. */
.seat-row{display:flex;flex-wrap:wrap;gap:8px}
.seat{display:inline-flex;gap:6px;align-items:baseline;padding:6px 12px;border-radius:999px;background:var(--paper-2);border:1px solid var(--line-2);font-size:13.5px;color:var(--ink-soft)}
.seat b{color:var(--ink);font-variant-numeric:tabular-nums}
.seat.on{border-color:var(--ink)}
.seat.full b{color:var(--red-ink)}
.seat-full{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:13.5px;color:var(--red-ink)}
.seat-full .ic{width:16px;height:16px;flex:none}
.seat-full span{flex:1 1 200px}
/* Clock-on map pin (js/geo-picker.js) */
.gp-pin{background:none;border:0;filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.gp-pin-b{fill:var(--accent);stroke:var(--paper);stroke-width:2}
.gp-pin-i{stroke:var(--paper)}
/* My profile → My restaurants (js/prefs.js venues) */
.pf-venue{display:flex;align-items:center;gap:12px;width:100%;padding:10px 6px;border:0;border-top:1px solid var(--line-2);background:none;color:inherit;text-align:left;cursor:pointer;font:inherit}
.pf-venue:first-of-type{border-top:0}
.pf-venue .grow{display:flex;flex-direction:column;gap:2px;min-width:0}
.pf-venue .grow b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-venue .faint{font-size:12.5px}
.pf-vlogo{flex:0 0 40px;height:40px;border-radius:12px;background:var(--accent-soft);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;overflow:hidden}
.pf-vlogo img{width:100%;height:100%;object-fit:cover}
.pf-vbadge{min-width:22px;height:22px;padding:0 7px;border-radius:99px;background:var(--red,#E5484D);color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.pf-vtick{color:var(--accent);display:flex}
.pf-vgo{color:var(--ink-faint);display:flex}
.pf-venue.busy{opacity:.55}

/* ===== Takings: the money at a glance (profit, where it went, the trend) ===== */
.mo-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
@media (max-width:1100px){ .mo-grid3{grid-template-columns:1fr} }
.mo-card{background:var(--card);border:1px solid var(--line-2);border-radius:var(--radius-lg);padding:18px;box-shadow:var(--shadow-soft);min-width:0}
.mo-k{font-size:13px;color:var(--ink-soft);font-weight:600;margin-bottom:6px}
.mo-big{font-size:32px;font-weight:700;letter-spacing:-.01em;font-variant-numeric:tabular-nums;line-height:1.15}
.mo-big.neg{color:var(--red)}
.mo-sub{font-size:13px;color:var(--ink-soft);margin-top:2px}
.mo-delta{display:inline-flex;align-items:baseline;gap:6px;margin-top:8px;font-weight:700;font-size:14px}
.mo-delta span{font-weight:400;color:var(--ink-soft);font-size:12.5px}
.mo-delta.up{color:var(--green)} .mo-delta.down{color:var(--red)}
.mo-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-top:16px;font-size:14px}
.mo-row b{font-variant-numeric:tabular-nums;font-size:17px}
.mo-row small{display:block;color:var(--ink-soft);font-size:12px;margin-top:2px}
.mo-track{height:12px;border-radius:6px;background:var(--line-2);margin-top:6px;overflow:hidden}
.mo-track i{display:block;height:100%;border-radius:6px}
.mo-track i.in, .mo-legend i.in{background:var(--green)}
.mo-track i.out, .mo-legend i.out{background:#C8553D}
.mo-note{display:flex;gap:6px;align-items:flex-start;margin-top:12px;font-size:12.5px;color:var(--amber-ink, var(--ink-soft))}
.mo-note svg{width:15px;height:15px;flex:none;margin-top:1px}
.mo-empty{padding:24px 0;text-align:center}
.mo-range{display:flex;gap:4px;background:var(--line-2);border-radius:999px;padding:3px;margin:4px 0 12px}
.mo-range button{flex:1;border:0;background:none;font:inherit;font-size:13px;padding:6px 4px;border-radius:999px;color:var(--ink-soft);cursor:pointer}
.mo-range button.on{background:var(--card);color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.mo-chart{position:relative;display:grid;grid-template-columns:1fr auto;gap:8px;height:150px}
.mo-chart svg{width:100%;height:100%;overflow:visible}
.mo-grid{stroke:var(--line-2);stroke-width:1;stroke-dasharray:3 3;vector-effect:non-scaling-stroke}
.mo-l{fill:none;stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}
.mo-l.in{stroke:var(--green)} .mo-l.out{stroke:#C8553D}
.mo-y{display:flex;flex-direction:column;justify-content:space-between;font-size:11.5px;color:var(--ink-soft);text-align:right;font-variant-numeric:tabular-nums;padding-bottom:2px}
.mo-x{display:flex;justify-content:space-between;font-size:11.5px;color:var(--ink-soft);margin:6px 44px 0 0}
.mo-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:12px;font-size:13px;font-variant-numeric:tabular-nums}
.mo-legend span{display:inline-flex;align-items:center;gap:6px}
.mo-legend i{width:10px;height:10px;border-radius:3px}
.mo-foot{font-size:12px;color:var(--ink-soft);margin-top:6px}
/* Team pulse (js/team-pulse.js): roster to confirm, forgotten clock-offs,
   who read a notice, the suggestion box and polls. One card style for all. */
.pl-home:empty{display:none}
.pl-home{display:flex;flex-direction:column;gap:12px;margin-bottom:16px}
.pl-card{padding:16px 18px;margin-bottom:0}
.section-head + .pl-card,.pl-card + .pl-card,.pl-ideas .pl-card + .pl-card{margin-top:12px}
.pl-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.pl-head > .ic{width:18px;height:18px;color:var(--accent)}
.pl-head b{font-size:15px}
.pl-head .faint{font-size:12.5px;margin-left:auto}
.pl-head .badge{background:var(--red);color:#fff;font-size:12px;font-weight:700;border-radius:999px;padding:1px 8px;margin-left:auto}
.pl-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.pl-chip{background:var(--paper-2);border:1px solid var(--line);border-radius:999px;padding:5px 11px;font-size:13px;font-weight:600}
.pl-ack{border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}
.pl-off{background:var(--amber-soft);border-color:color-mix(in srgb,var(--amber) 40%,transparent)}
.pl-off .pl-head > .ic{color:var(--amber-ink)}
.pl-p{margin:0 0 10px;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.pl-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pl-lab{font-size:13.5px;font-weight:600}
.pl-time{width:auto;min-width:118px;flex:0 0 auto}
.pl-note{font-size:12px;margin-top:8px}
.pl-acts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.pl-offrow{flex-wrap:wrap}
.pl-offrow .pl-acts{margin-left:auto}
@media (max-width:560px){ .pl-offrow .pl-acts{width:100%;justify-content:flex-start;padding-left:53px} }
.pl-link{display:flex;align-items:center;gap:12px;width:100%;text-align:left;font:inherit;color:inherit;text-decoration:none;cursor:pointer}
.pl-link > .ic:first-child{width:20px;height:20px;color:var(--accent)}
.pl-link .grow{display:flex;flex-direction:column;gap:2px;min-width:0}
.pl-link .faint{font-size:12.5px}
.pl-ackhost:empty{display:none}
.pl-ackline{display:flex;align-items:center;gap:8px;width:100%;margin:-4px 0 14px;padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:var(--paper-2);font:inherit;color:var(--ink);cursor:pointer;text-align:left;flex-wrap:wrap}
.pl-ackline .ic{width:16px;height:16px;color:var(--amber-ink)}
.pl-ackline.all .ic{color:var(--green)}
.pl-ackline span:not(.faint){font-weight:600;font-size:13.5px}
.pl-ackline .faint{margin-left:auto;font-size:12.5px}
.pl-sheet .list .li{padding:10px 4px}
.pl-sub{font-size:12.5px;font-weight:700;color:var(--ink-soft);margin:14px 0 2px;text-transform:uppercase;letter-spacing:.03em}
.pl-quote{background:var(--paper-2);border-left:3px solid var(--accent);border-radius:8px;padding:10px 12px;font-size:13.5px;line-height:1.5;overflow-wrap:anywhere}
.tc-seen{display:inline-flex;align-items:center;gap:4px;align-self:flex-end;margin:3px 4px 0;padding:2px 8px;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--ink-soft);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.tc-seen .ic{width:13px;height:13px}
.tc-seen.all{color:var(--green-ink);border-color:color-mix(in srgb,var(--green) 35%,transparent)}
.pl-q{font-size:16px;font-weight:600;margin:0 0 12px;overflow-wrap:anywhere}
.pl-opts{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.pl-opt{justify-content:center;white-space:normal;min-height:44px}
.pl-check{display:flex;gap:10px;align-items:flex-start;margin:12px 0;font-size:13.5px;cursor:pointer}
.pl-check input{margin-top:3px;width:18px;height:18px;flex:none}
.pl-check .faint{font-size:12.5px}
.pl-idea-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.pl-idea-top b{display:inline-flex;align-items:center;gap:5px}
.pl-idea-top b .ic{width:15px;height:15px}
.pl-idea-top .faint{font-size:12.5px}
.pl-idea-top .pill{margin-left:auto}
.pl-idea.done,.pl-result.done{opacity:.72}
.pl-reply{display:flex;gap:6px;align-items:flex-start;background:var(--paper-2);border-radius:10px;padding:8px 10px;margin:4px 0 10px;font-size:13px;line-height:1.45}
.pl-reply .ic{width:14px;height:14px;flex:none;margin-top:2px;color:var(--accent)}
.li .meta .pl-reply{margin:6px 0 0}
.pl-bar{display:grid;grid-template-columns:minmax(80px,38%) 1fr 28px;align-items:center;gap:10px;margin:6px 0;font-size:13.5px}
.pl-bar-l{overflow-wrap:anywhere}
.pl-bar-t{height:10px;border-radius:99px;background:var(--paper-2);overflow:hidden;border:1px solid var(--line)}
.pl-bar-t span{display:block;height:100%;background:var(--accent);border-radius:99px}
.pl-bar b{text-align:right}
.pl-who{font-size:12px;margin:-2px 0 6px calc(min(38%, 9999px) + 10px)}
@media (min-width:900px){ .pl-home{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));align-items:start} .pl-home > .pl-offs{grid-column:1 / -1} }
.pl-vs button .badge{background:var(--red);color:#fff;font-size:11.5px;font-weight:700;border-radius:999px;padding:0 6px;margin-left:4px;min-width:16px;text-align:center}
/* In these two sheets the right side is a short pill or a time: keep it beside the name. */
@media (max-width:560px){
  .pl-sheet .li{flex-wrap:nowrap}
  .pl-sheet .li > .meta{min-width:0}
}
.pl-sheet .li > .pill,.pl-sheet .li > .faint{flex:none;font-size:12.5px}
.pf-ver{text-align:center;font-size:12.5px;color:var(--ink-faint);margin:22px 0 8px;font-variant-numeric:tabular-nums;user-select:text;-webkit-user-select:text}
/* A phone box with its country code in front (js/util.js): 🇦🇺 +61 / 🇨🇳 +86. */
.tel-wrap{display:flex;gap:6px;align-items:stretch;width:100%;min-width:0}
.tel-wrap > input{flex:1;min-width:0;width:auto}
.tel-cc{flex:none;display:inline-flex;align-items:center;gap:2px;padding:0 9px;border:1px solid var(--line);border-radius:12px;
  background:var(--card);color:var(--ink);font:inherit;font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap;cursor:pointer}
.tel-cc:active{transform:scale(.97)}
/* A phone box shares a row with another field (the emergency contact's name
   and phone): with its country code it needs room, so on a narrow phone the
   row wraps and the phone takes its own line. */
.row:has(> .field .tel-wrap){flex-wrap:wrap}
.row:has(> .field .tel-wrap) > .field{min-width:min(100%, 200px)}
.row > .field:has(.tel-wrap){min-width:min(100%, 250px)}

/* ===== Ported 2026-11-22 from the 11-21 work (order progress, home week card,
   Square / Xero takings, two-question setup). Home card classes are wkm-: .wk-day
   is the week picker's. ===== */

/* ---------- First-run setup: two questions ---------- */
.setup2{max-width:640px;margin:0 auto}
.setup2-q{display:flex;gap:16px;align-items:flex-start;padding:22px;margin-top:14px}
.setup2-n{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;
  background:var(--ink);color:var(--paper);font-weight:800;font-size:15px}
.setup2-ask{display:block;font-size:18px;font-weight:800;letter-spacing:-.01em;margin:4px 0 12px}
.setup2-hint{font-size:13px;margin:-6px 0 12px}
.setup2-q .input{font-size:16px}
.setup2-opts{display:grid;gap:8px}
.setup2-opt{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1.5px solid var(--line);
  border-radius:14px;cursor:pointer;transition:border-color .15s var(--ease-out),background .15s var(--ease-out)}
.setup2-opt input{position:absolute;opacity:0;pointer-events:none}
.setup2-opt b{display:block;font-size:14.5px}
.setup2-opt i{display:block;font-style:normal;font-size:12.5px;color:var(--ink-soft);margin-top:1px}
.setup2-ic{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:var(--paper-2);color:var(--ink-soft)}
.setup2-ic .ic{width:19px;height:19px}
.setup2-tick{flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;
  border:1.5px solid var(--line);color:transparent}
.setup2-tick .ic{width:14px;height:14px;stroke-width:3}
.setup2-opt:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.setup2-opt:has(input:checked) .setup2-ic{background:var(--card);color:var(--accent-ink)}
.setup2-opt:has(input:checked) .setup2-tick{background:var(--accent);border-color:var(--accent);color:#fff}
.setup2-opt:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.setup2-go{width:100%;margin-top:18px;padding:15px;font-size:16px}
.setup2-foot{font-size:12.5px;text-align:center;margin-top:10px}
@media(max-width:560px){ .setup2-q{flex-direction:column;padding:18px 16px;gap:8px} .setup2-q>.grow{width:100%}
  .setup2-n{width:28px;height:28px;font-size:13px} .setup2-ask{font-size:16.5px;margin-top:0} .setup2-opt{padding:11px 12px} }

/* ---------- Order progress: ordered → arriving → checked in → sorted ----------
   Four colours, one meaning each: green 完成 done, amber 进行中 under way,
   grey 待完成 still to come, red 未完成 should have happened and hasn't.
   Never the venue's brand colour, which can be red. */
.ordbar{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);margin:6px 0 16px;padding:0;counter-reset:s}
.ordbar li{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;min-width:0}
.ordbar li::before{content:"";position:absolute;top:13px;right:50%;width:100%;height:3px;background:var(--line);z-index:0}
.ordbar li:first-child::before{display:none}
.ordbar li.is-done::before,.ordbar li.is-now::before,.ordbar li.is-warn::before,.ordbar li.is-bad::before{background:var(--green)}
.ordbar i{position:relative;z-index:1;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;
  background:var(--card);border:2px solid var(--line);color:#fff}
.ordbar i .ic{width:14px;height:14px;stroke-width:3}
.ordbar li.is-done i{background:var(--green);border-color:var(--green)}
.ordbar li.is-now i{border-color:var(--amber);box-shadow:0 0 0 4px var(--amber-soft)}
.ordbar li.is-now i::after{content:"";width:10px;height:10px;border-radius:50%;background:var(--amber)}
.ordbar li.is-warn i{background:var(--amber);border-color:var(--amber)}
.ordbar li.is-bad i{background:var(--red);border-color:var(--red)}
.ordbar span{font-size:12.5px;font-weight:700;line-height:1.2}
.ordbar li.is-todo span{color:var(--ink-faint);font-weight:600}
.ordbar li.is-warn span{color:var(--amber-ink)}
.ordbar li.is-bad span{color:var(--red)}
.ordbar em{font-style:normal;font-size:11.5px;color:var(--ink-soft)}

.ordbar-mini{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:12px}
.ordbar-segs{display:inline-flex;gap:3px;flex:none}
.ordbar-segs i{width:18px;height:5px;border-radius:3px;background:var(--line)}
.ordbar-segs i.is-done{background:var(--green)}
.ordbar-segs i.is-now{background:var(--amber)}
.ordbar-segs i.is-warn{background:var(--amber)}
.ordbar-segs i.is-bad{background:var(--red)}
.ordbar-mini b{font-weight:700}
.ordbar-mini b.is-now{color:var(--amber-ink)}
.ordbar-mini b.is-warn{color:var(--amber-ink)}
.ordbar-mini b.is-bad{color:var(--red)}
.ordbar-mini b.is-done{color:var(--green-ink)}
.ordbar-mini span{color:var(--ink-faint)}

/* ---------- Home: this week's money ---------- */
.wkm-card{display:block;color:inherit;padding-bottom:14px}
.wkm-card:hover{border-color:var(--accent)}
.wkm-top{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
.wkm-took{display:flex;align-items:baseline;gap:8px;margin-top:4px}
.wkm-took b{font-family:"Playfair Display",serif;font-size:36px;font-weight:900;line-height:1.05}
.wkm-took span{font-size:13px;color:var(--ink-soft);font-weight:600}
.wkm-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:4px;font-size:12.5px}
.wkm-chg{font-weight:800;padding:2px 8px;border-radius:999px}
.wkm-chg.up{background:var(--green-soft);color:var(--green-ink)}
.wkm-chg.down{background:var(--red-soft);color:var(--red-ink)}
.wkm-vs{color:var(--ink-faint)}
.wkm-bars{display:grid;grid-template-columns:repeat(7,20px);gap:6px;height:84px;flex:none}
.wkm-day{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;height:100%}
.wkm-day i{width:100%;border-radius:5px 5px 2px 2px;background:var(--green);min-height:0}
.wkm-day.gap i{height:6px!important;background:none;border:1.5px dashed var(--line)}
.wkm-day.future i{height:6px!important;background:var(--line-2)}
.wkm-day.today i{background:var(--accent)}
.wkm-day em{font-style:normal;font-size:11px;font-weight:700;color:var(--ink-faint)}
.wkm-day.today em{color:var(--accent-ink)}
.wkm-row{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line-2)}
.wkm-row span{display:flex;flex-direction:column;gap:2px}
.wkm-row i{font-style:normal;font-size:12.5px;font-weight:600;color:var(--ink-soft)}
.wkm-row b{font-size:18px;font-weight:800}
.wkm-nudge{display:flex;align-items:center;gap:6px;margin-top:12px;font-size:12.5px;font-weight:600;color:var(--amber-ink)}
.wkm-nudge .ic{width:15px;height:15px}
@media(max-width:560px){ .wkm-took b{font-size:30px} .wkm-bars{grid-template-columns:repeat(7,14px);gap:5px;height:70px} }

/* ---------- Takings: pull from Square / Xero ---------- */
.till-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin-bottom:6px}
.till-head b{display:flex;align-items:center;gap:6px;font-size:15px}
.till-head b .ic{width:17px;height:17px}
.till-head .faint{font-size:12.5px}
.till-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line-2)}
.till-row b{display:block;font-size:14px}
.till-row .grow span{display:block;font-size:12.5px;color:var(--ink-soft)}
.till-logo{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:10px;font-weight:900;font-size:16px;
  background:var(--paper-2);color:var(--ink-soft);border:1px solid var(--line)}
.till-row.on .till-logo{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.till-acct{margin-top:6px;max-width:260px;padding:6px 10px;font-size:13px}
.tk-src{font-style:normal;font-size:11px;padding:2px 8px;vertical-align:1px}
@media(max-width:560px){ .till-row{flex-wrap:wrap} .till-row .grow{flex-basis:calc(100% - 48px)} }
.till-row .grow .bk-says{margin-top:2px}
.bk-says .linkish{color:var(--ink);font-weight:700;text-decoration:underline;margin-left:4px}
.bk-pick .field{display:block;margin:12px 0}
.bk-pick .field > span{display:block;font-size:13px;font-weight:600;margin-bottom:6px}
.bk-split{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;margin:4px 0 12px}
.bk-split input{margin-top:3px}
.bk-list{border-top:1px solid var(--line-2)}
.bk-acct{display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid var(--line-2);font-size:14px;cursor:pointer}
.bk-acct input{width:18px;height:18px;flex:none}
.bk-acct .grow{min-width:0;overflow-wrap:anywhere}
.wkm-row b.wkm-norate{font-size:14px;font-weight:700;color:var(--ink-faint);padding-top:3px}
.ordbar-mini{white-space:nowrap;min-width:0}
.ordbar-mini span{overflow:hidden;text-overflow:ellipsis}
/* On a phone the bar already says where the order is — the status pill beside
   it is the same fact twice, in the narrowest row on the page. */
@media(max-width:560px){ .dlv-st{display:none} }

/* ===== Supplier dockets page (js/setup-papers.js) ===== */
.pp-steps{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0;margin:4px 0 18px;counter-reset:none}
.pp-steps li{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 12px;border-radius:14px;background:var(--paper-2);border:1.5px solid transparent}
.pp-steps li b{font-size:13.5px}
.pp-steps li i{font-style:normal;font-size:11.5px;color:var(--ink-soft)}
.pp-steps li.on{background:var(--accent-soft);border-color:var(--accent)}
.pp-steps li.done{opacity:.75}
.pp-n{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--card);font-size:12.5px;font-weight:800;margin-bottom:4px;color:var(--ink-soft)}
.pp-steps li.on .pp-n{background:var(--accent);color:#fff}
.pp-steps li.done .pp-n{background:var(--green);color:#fff}
.pp-n .ic{width:13px;height:13px;stroke-width:3}
.pp-need{padding:14px 16px;margin-bottom:12px}
.pp-h{display:flex;align-items:center;gap:8px;font-weight:800;font-size:14.5px;margin-bottom:6px}
.pp-h .ic{width:18px;height:18px;color:var(--accent-ink)}
.pp-need ul{margin:0;padding:0 0 0 26px;display:grid;gap:8px}
.pp-need li b{display:block;font-size:14px}
.pp-need li span{display:block;font-size:12.5px;color:var(--ink-soft)}
.pp-tips{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:6px}
.pp-tip{display:flex;flex-direction:column;gap:2px;padding:10px;border:1px solid var(--line);border-radius:12px;font-size:12.5px;background:var(--card)}
.pp-tip .ic{width:18px;height:18px;color:var(--accent-ink);margin-bottom:2px}
.pp-tip i{font-style:normal;font-size:11.5px;color:var(--ink-soft);line-height:1.35}
.pp-groups{display:grid;gap:10px}
.pp-group{padding:12px 14px;margin:0}
.pp-group-top{display:flex;align-items:center;gap:10px}
.pp-group-top .faint{font-size:12px}
.pp-gn{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--paper-2);font-weight:800;font-size:13px;color:var(--ink-soft)}
.pp-gn .ic{width:15px;height:15px}
.pp-name{font-size:16px;font-weight:600}
.pp-files{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:8px;margin-top:10px}
.pp-file,.pp-add{position:relative;aspect-ratio:3/4;border-radius:10px;overflow:hidden}
.pp-file{background:var(--paper-2);border:1px solid var(--line)}
.pp-file img{width:100%;height:100%;object-fit:cover;display:block}
.pp-file.up img{opacity:.45}
.pp-file.err{border-color:var(--red);background:var(--red-soft)}
.pp-doc{display:grid;place-items:center;align-content:center;gap:4px;height:100%;color:var(--ink-soft)}
.pp-doc .ic{width:22px;height:22px}
.pp-doc i{font-style:normal;font-size:11px;font-weight:700}
.pp-file-st{position:absolute;left:4px;right:4px;bottom:4px;font-size:10.5px;line-height:1.25;text-align:center;background:var(--card);border-radius:6px;padding:2px 3px}
.pp-x{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;border:none;background:rgba(0,0,0,.55);color:#fff;cursor:pointer;padding:0}
.pp-file .pp-x{position:absolute;top:4px;right:4px}
.pp-x .ic{width:14px;height:14px}
.pp-gx{background:var(--paper-2);color:var(--ink-soft);flex:none}
.pp-add{display:grid;place-items:center;align-content:center;gap:4px;border:1.5px dashed var(--line);color:var(--accent-ink);cursor:pointer;font-size:12.5px;background:var(--card)}
.pp-add .ic{width:24px;height:24px}
.pp-add:hover{border-color:var(--accent);background:var(--accent-soft)}
.pp-add:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.pp-more{width:100%;margin-top:10px;min-height:46px;border-style:dashed}
.pp-warn{margin-top:12px}
.pp-sum{margin-top:16px;font-size:13px;color:var(--ink-soft);text-align:center}
.pp-sum + .guide-actions{margin-top:10px}
.pp-self{display:block;margin:6px auto 0;font-size:13px}
.pp-list{padding:6px 16px}
.pp-li{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.pp-li:last-child{border-bottom:none}
.pp-li .ic{width:18px;height:18px;color:var(--ink-soft)}
.pp-wait{background:var(--amber-soft);color:var(--amber-ink)}
.pp-rev{padding:14px 16px;margin-bottom:10px}
.pp-rev.ok{border-color:var(--green);background:var(--green-soft)}
.pp-rev-top{display:flex;align-items:flex-start;gap:10px}
.pp-rev-top b{font-size:15.5px}
.pp-rev-top .faint{font-size:12.5px}
.pp-items{display:grid;gap:4px;margin:10px 0;font-size:13.5px}
.pp-items > div{display:flex;gap:6px;align-items:baseline}
.pp-items i{font-style:normal;font-size:11.5px}
.pp-ok{min-height:40px}
.pp-fix{font-size:13px;margin:6px 0 0}
.pp-nudge-wait{border-color:var(--line);background:var(--card)}
.pp-nudge-wait .guide-nudge-ic{background:var(--amber-soft);color:var(--amber-ink)}
.pp-nudge-go{border-color:var(--green);background:var(--green-soft)}
@media (max-width:520px){
  .pp-tips{grid-template-columns:repeat(2,1fr)}
  .pp-steps{gap:6px} .pp-steps li{padding:8px 9px} .pp-steps li b{font-size:12.5px}
  .pp-files{grid-template-columns:repeat(auto-fill,minmax(70px,1fr))}
}
.pp-ok-on{background:var(--green);border-color:var(--green);color:#fff}
.pp-fix a{color:var(--ink);text-decoration:underline;font-weight:600}
.pp-add i{font-style:normal;font-size:10.5px;color:var(--ink-soft);text-align:center;line-height:1.2;padding:0 4px}
.pp-add-lib{border-style:solid;border-color:var(--accent);background:var(--accent-soft)}

/* ===== Finance page: the + menu, a snapped receipt, an invoice (js/finance.js) ===== */
.qa-back{position:fixed;inset:0;z-index:300;background:rgba(20,24,32,.28);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);animation:qa-in .14s ease-out}
.qa-menu{position:fixed;display:flex;flex-direction:column;gap:8px;align-items:flex-end;max-width:calc(100vw - 24px)}
.qa-item{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:16px;
  padding:10px 10px 10px 16px;min-height:56px;box-shadow:var(--shadow);cursor:pointer;text-align:right;font:inherit;-webkit-tap-highlight-color:transparent}
.qa-item:active{transform:scale(.97)}
.qa-item:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.qa-t{display:flex;flex-direction:column;line-height:1.25}
.qa-t b{font-size:16px;font-weight:700}
.qa-t small{font-size:12.5px;color:var(--ink-soft);margin-top:2px}
.qa-ic{flex:none;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--paper-2);color:var(--ink)}
.qa-ic .ic{width:22px;height:22px}
@keyframes qa-in{from{opacity:0}to{opacity:1}}
.fin-photo{border:1px dashed var(--line);border-radius:14px;background:var(--paper-2);min-height:72px;display:grid;place-items:center;overflow:hidden;margin-bottom:10px}
.fin-photo img{display:block;width:100%;max-height:260px;object-fit:contain;background:#fff}
.fin-photo .ic{width:18px;height:18px;vertical-align:-3px}
.fin-read{font-size:13.5px;padding:8px 12px;border-radius:10px;background:var(--paper-2);color:var(--ink-soft);margin-bottom:10px}
.fin-read.green{background:var(--green-soft);color:var(--green)}
.fin-read.amber{background:var(--amber-soft);color:var(--amber-ink)}
.fin-read .ic{width:15px;height:15px;vertical-align:-2px}
.fin-repick{margin-bottom:14px;cursor:pointer}
.fin-cats{display:flex;flex-wrap:wrap;gap:8px}
.fin-cat{border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:999px;padding:9px 14px;font:inherit;font-size:14px;cursor:pointer;min-height:40px}
.fin-cat.on{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.fin-del{color:var(--red)}
.fin-thumb{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.fin-more{display:block;margin:6px auto 10px;color:var(--accent);font-weight:600;font-size:14px}
.fin-owed{font-size:12px;margin-left:6px;vertical-align:1px}
.inv-table .inv-desc{min-width:0}
.inv-tot{margin:12px 0 16px;padding:10px 14px;border-radius:12px;background:var(--paper-2);display:flex;flex-direction:column;gap:4px}
.inv-tot div{display:flex;justify-content:space-between;gap:12px;color:var(--ink-soft);font-size:14px}
.inv-tot div.big{color:var(--ink);font-size:17px;font-weight:700}
.inv-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.inv-status b{margin-left:auto;font-size:20px}
.inv-acts{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.inv-view .po-paper{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
@media (max-width:720px){
  .inv-table .pl-c-item{grid-column:1 / -1}
  .qa-item{min-height:60px}
}
.fin-form .row{flex-wrap:wrap}
.fin-form .row > .field{min-width:min(140px,100%)}
/* 连接记账软件 on the Finance page: a provider not set up yet says so (js/takings.js tillCard). */
.till-soon{font-style:normal;font-size:11px;padding:2px 8px;margin-left:6px;vertical-align:1px}
.till-asked{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;white-space:nowrap}
.till-asked .ic{width:14px;height:14px;color:var(--green)}

/* The assistant's face (Jarvis): the floating button and the chat header show
   the little chef instead of the sparkle. White behind him in both themes, a
   ring in the accent colour while the chat is open. */
.ai-fab.ava,.ai-fab.ava.open{background:#fff;padding:0;overflow:hidden;-webkit-backdrop-filter:none;backdrop-filter:none;
  box-shadow:0 0 0 1px rgba(0,0,0,.06), var(--shadow)}
.ai-fab.ava.open{box-shadow:0 0 0 3px var(--accent), var(--shadow)}
.ai-fab.ava img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.ai-head b:has(.ai-ava){display:flex;align-items:center;gap:8px}
.ai-head .ai-ava{display:block;width:26px;height:26px;border-radius:50%;background:#fff;flex:none}

/* ===== Jarvis pops up and says one thing (js/jarvis-pop.js) =====
   The little chef rises from the bottom corner, a speech bubble beside him;
   on a phone he sits above the bottom bar. */
.jv-pop{position:fixed;left:16px;bottom:22px;z-index:400;display:flex;align-items:flex-end;gap:10px;
  max-width:min(440px, calc(100vw - 32px));pointer-events:none}
.jv-face{width:84px;height:84px;flex:none;border-radius:50%;background:#fff;object-fit:cover;
  box-shadow:0 10px 26px -10px rgba(0,0,0,.45);transform:translateY(130%) rotate(-8deg);pointer-events:auto}
.jv-bubble{position:relative;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:20px 20px 20px 6px;
  padding:14px 16px 12px;box-shadow:0 14px 34px -14px rgba(0,0,0,.4);margin-bottom:34px;min-width:200px;
  opacity:0;transform:scale(.6);transform-origin:0 100%;pointer-events:auto}
.jv-bubble::before{content:"";position:absolute;left:-9px;bottom:12px;width:16px;height:16px;background:var(--card);
  border-left:1px solid var(--line);border-bottom:1px solid var(--line);transform:rotate(45deg);border-radius:0 0 0 4px}
.jv-t{display:block;font-size:15px;font-weight:800;margin-bottom:4px}
.jv-p{margin:0;font-size:15px;line-height:1.55;color:var(--ink-soft);min-height:1.55em;white-space:pre-wrap}
.jv-act{display:flex;justify-content:flex-end;margin-top:10px}
.jv-act .btn{min-height:40px;min-width:84px}
.jv-pop.in .jv-face{animation:jvRise .55s cubic-bezier(.2,1.6,.4,1) forwards}
.jv-pop.in .jv-bubble{animation:jvBubble .32s .2s cubic-bezier(.2,1.4,.4,1) forwards}
.jv-pop.out .jv-face{transform:none;animation:jvDrop .24s ease-in forwards}
.jv-pop.out .jv-bubble{opacity:1;transform:none;animation:jvFade .18s ease-in forwards}
@keyframes jvRise{0%{transform:translateY(130%) rotate(-8deg)}70%{transform:translateY(-6%) rotate(4deg)}100%{transform:none}}
@keyframes jvBubble{0%{opacity:0;transform:scale(.6)}100%{opacity:1;transform:none}}
@keyframes jvDrop{to{transform:translateY(130%) rotate(6deg)}}
@keyframes jvFade{to{opacity:0;transform:scale(.85)}}
@media (max-width:720px){
  .jv-pop{left:12px;right:12px;bottom:calc(78px + env(safe-area-inset-bottom));max-width:none}
  .jv-face{width:66px;height:66px}
  .jv-bubble{flex:1;min-width:0;margin-bottom:26px}
}
html.mkr-native .jv-pop{bottom:calc(96px + env(safe-area-inset-bottom))}
@media (prefers-reduced-motion:reduce){
  .jv-pop.in .jv-face,.jv-pop.in .jv-bubble{animation:none;transform:none;opacity:1}
  .jv-pop.out{display:none}
}

/* The welcome guide, told by Jarvis: his face peeks over the card and pops
   again on every step. */
.tour-card.jv-told{padding-top:22px;overflow:visible}
.tour-jarvis{position:absolute;top:-46px;left:16px;width:64px;height:64px;border-radius:50%;background:#fff;object-fit:cover;
  box-shadow:0 8px 20px -8px rgba(0,0,0,.45)}
.tour-card.jv-told .tour-n{margin-left:62px}
.tour-jarvis.pop{animation:jvRise .5s cubic-bezier(.2,1.6,.4,1)}
@media (prefers-reduced-motion:reduce){ .tour-jarvis.pop{animation:none} }
/* On a computer he comes out of the corner button (the assistant's own face,
   bottom right): the button steps aside while he talks, the bubble on his left. */
@media (min-width:721px){
  .jv-pop{left:auto;right:18px;bottom:18px;flex-direction:row-reverse}
  .jv-bubble{border-radius:20px 20px 6px 20px;transform-origin:100% 100%}
  .jv-bubble::before{left:auto;right:-9px;border-left:none;border-bottom:none;border-right:1px solid var(--line);border-top:1px solid var(--line);border-radius:0 4px 0 0}
  body.jv-talking .ai-fab{opacity:0;pointer-events:none}
}
/* Paid more than before: needs doing, so red (traffic light, Haydn 2026-11-25) */
.pw-cheap.pw-dearer{color:var(--red-ink)}
/* Item brand + note under its name (stock and order lists) */
.itm-extra{font-size:12px;color:var(--ink-soft);margin-top:2px;line-height:1.35;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.itm-extra .itm-brand{font-weight:600;color:var(--ink)}
/* 费用分析 on the Prices page: totals, then shares by category / supplier / item */
.sp-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}
.sp-kpi{background:var(--accent-soft);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:2px;min-width:0}
.sp-kpi i{font-style:normal;font-size:12px;color:var(--ink-soft)}
.sp-kpi b{font-size:22px;font-weight:800;letter-spacing:-.01em;color:var(--ink)}
.sp-kpi span{font-size:12px;color:var(--ink-soft)}
.sp-cols{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:18px}
.sp-h{font-weight:700;font-size:13.5px;margin-bottom:8px;color:var(--ink)}
.sp-row{padding:7px 0}
.sp-top{display:flex;align-items:baseline;gap:8px;min-width:0}
.sp-name{flex:1;min-width:0;font-size:13.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-amt{font-variant-numeric:tabular-nums;font-weight:700;font-size:13.5px}
.sp-pc{font-variant-numeric:tabular-nums;font-size:12px;color:var(--ink-soft);min-width:42px;text-align:right}
.sp-rank{font-size:12px;color:var(--ink-faint);min-width:16px}
.sp-bar{height:6px;border-radius:99px;background:var(--line);overflow:hidden;margin-top:5px}
.sp-bar i{display:block;height:100%;border-radius:99px;background:var(--accent)}
.sp-was{font-size:12px;color:var(--ink-soft);margin-top:3px}
.sp-delta{font-weight:700;font-variant-numeric:tabular-nums}
.sp-delta.sp-up{color:var(--amber-ink)}.sp-delta.sp-down{color:var(--green-ink)}.sp-delta.sp-flat{color:var(--ink-soft)}
.sp-rest{font-size:12px;margin-top:4px}
.sp-foot{font-size:12px;margin-top:12px}
.sp-top10{display:grid;grid-template-columns:1fr 1fr;column-gap:22px}
.pw-movehead{font-size:16px}
@media (max-width:720px){
  .sp-kpis{grid-template-columns:1fr 1fr}
  .sp-cols,.sp-top10{grid-template-columns:1fr;gap:6px}
  .sp-kpi b{font-size:20px}
}
/* 笔记 under the owner's dashboard (js/home-notes.js) */
.hn-card{padding:16px 18px;margin-top:16px}
.hn-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.hn-head b{display:flex;align-items:center;gap:6px;font-size:15px}
.hn-state{font-size:12px}
.hn-text{width:100%;resize:vertical;line-height:1.5;font-size:15px;min-height:96px}
.hn-foot{font-size:12px;margin-top:6px}
/* 公告 for the whole venue on every home page (js/notice.js) */
.an-card{padding:16px 18px;margin-top:16px;border-left:4px solid var(--amber)}
.an-card.an-new{background:var(--amber-soft)}
.an-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.an-head b{display:flex;align-items:center;gap:6px;font-size:15px}
.an-when{font-size:12px;margin-left:auto}
.an-pill{background:var(--amber);color:#fff;font-size:11px}
.an-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15.5px;line-height:1.55;color:var(--ink)}
.an-empty{font-size:13px}
.an-input{width:100%;resize:vertical;font-size:15px;line-height:1.5}
.an-act{display:flex;gap:8px;justify-content:flex-end;margin-top:10px;flex-wrap:wrap}
.an-act:empty{display:none}
/* 预定 everyone sees on their home page (js/bookings-home.js) */
.bk-card{padding:16px 18px;margin-top:16px}
.bk-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bk-head b{display:flex;align-items:center;gap:6px;font-size:15px}
.bk-today{background:var(--blue-soft);color:var(--blue-ink);font-size:11.5px}
.bk-add{margin-left:auto;display:flex;gap:6px}
.bk-filter{display:flex;gap:6px;margin:12px 0 4px;flex-wrap:wrap}
.bk-filter button{border:1px solid var(--line);background:transparent;color:var(--ink-soft);border-radius:99px;padding:5px 12px;font-size:13px;font-weight:600}
.bk-filter button.on{background:var(--accent);border-color:var(--accent);color:var(--accent-soft)}
.bk-filter button i{font-style:normal;opacity:.7;margin-left:2px}
.bk-day{font-size:12px;font-weight:700;color:var(--ink-soft);margin:12px 0 4px;text-transform:none}
.bk-row{display:flex;align-items:flex-start;gap:10px;padding:9px 6px;border-radius:12px;cursor:pointer}
.bk-row:hover{background:var(--line-2)}
.bk-time{font-variant-numeric:tabular-nums;font-weight:800;min-width:46px;color:var(--ink)}
.bk-kind{font-size:11.5px;font-weight:700;border-radius:6px;padding:2px 7px;white-space:nowrap;margin-top:1px}
.bk-kind.bk-table{background:var(--blue-soft);color:var(--blue-ink)}
.bk-kind.bk-food{background:var(--amber-soft);color:var(--amber-ink)}
.bk-main{flex:1;min-width:0;font-size:14px;color:var(--ink)}
.bk-note{display:block;font-size:12.5px;color:var(--ink-soft);margin-top:2px;white-space:pre-wrap;overflow-wrap:anywhere}
.bk-tel{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--accent-ink);text-decoration:none;white-space:nowrap}
.bk-tel svg{width:15px;height:15px}
.bk-empty{font-size:13px;margin-top:10px}
.bk-more{margin-top:6px}
@media (max-width:720px){
  .bk-add{margin-left:0;width:100%}
  .bk-add .btn{flex:1}
  .bk-tel span{display:none}
  .bk-tel{padding:6px;border-radius:99px;background:var(--accent-soft)}
}
@media (max-width:720px){ .bk-when{flex-wrap:wrap} .bk-when .bk-date{flex:1 1 100%} }
/* Country picker: three countries, the currency on its own small line so all fit on a phone */
#rCountry button,.os-cty button{line-height:1.25;padding-top:6px;padding-bottom:6px}
#rCountry button small,.os-cty button small{display:block;font-size:11px;opacity:.75;font-weight:500}
/* 预定 / 公告 / 笔记 as home blocks (js/tiles.js widgets) and their sheets */
.tile-wg .tile-unit{display:flex;flex-direction:column;gap:2px}
.tile-wg .tile-w{font-weight:500;color:var(--ink-soft);overflow-wrap:anywhere}
.tile-wg .tile-clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line;color:var(--ink);font-size:13px;line-height:1.35}
.tile-wg .tile-n.tile-quiet{font-size:20px}
.wg-sheet .bk-card,.wg-sheet .an-card,.wg-sheet .hn-card{margin:0;padding:0;box-shadow:none;background:transparent;border:0}
.wg-sheet .an-card.an-new{background:transparent}
.wg-sheet .bk-head > b,.wg-sheet .an-head > b,.wg-sheet .hn-head > b{display:none}
.bk-tb{font-weight:700;color:var(--blue-ink)}
/* Bookings: swipe left for 编辑 / ✓ 到了 / 取消; today's arrived ones greyed */
.sw-ok{width:76px;border:0;color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer;background:var(--green)}
.sw-acts .sw-edit,.sw-acts .sw-del{width:76px}
.bk-row.sw-row{padding:0!important;border-radius:12px}
.bk-row > .sw-in{display:flex;align-items:flex-start;gap:10px;padding:9px 6px;background:var(--card)}
.bk-done .bk-main,.bk-done .bk-time{opacity:.5}
.bk-done .bk-main b{text-decoration:line-through}
.bk-time svg{width:14px;height:14px;margin-right:3px;vertical-align:-2px;color:var(--green)}
/* 怎么连接 Xero / QuickBooks — the steps folded under each connect row (js/takings.js) */
.till-steps{margin:-4px 0 10px 52px;font-size:13.5px}
.till-steps summary{cursor:pointer;color:var(--accent-ink);font-weight:600;font-size:13px;padding:4px 0;list-style:none}
.till-steps summary::-webkit-details-marker{display:none}
.till-steps summary::before{content:'›';display:inline-block;margin-right:6px;transition:transform .15s}
.till-steps[open] summary::before{transform:rotate(90deg)}
.till-steps ol{margin:6px 0 6px 18px;padding:0;line-height:1.55;color:var(--ink)}
.till-steps ol li{margin:3px 0}
.till-steps ul{margin:6px 0 0 18px;padding:0;font-size:12.5px;line-height:1.5}
@media (max-width:720px){ .till-steps{margin-left:0} }

/* A staff member's own repeating tasks (views/staff.js tasks). */
.tp-repkinds .tp-seg{font-size:13.5px;padding:8px 2px}
.tp-repsec .tp-repkinds{margin:0 10px 10px}
.tp-repsec .tp-days{margin:0 10px 12px}
.tp-repsec .tp-days .tp-day{min-width:0;padding:7px 2px}
.task-rep{display:inline-flex;align-items:center;gap:3px;font-size:11.5px;font-weight:600;color:var(--accent-ink);background:var(--accent-soft);border-radius:999px;padding:1px 7px;vertical-align:1px}
.task-rep .ic{width:11px;height:11px}
.tmine-rep{display:flex;align-items:center;gap:6px;width:100%;margin:0 0 10px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer;text-align:left}
.tmine-rep .ic{width:15px;height:15px;color:var(--accent)}
.tmine-rep span{margin-left:auto;color:var(--ink-faint)}

/* Order lines, laid out as a grid (Haydn 2026-11-26: on a narrow phone every
   sentence wrapped, and the picture had too much room round it). The price
   sits beside the name only; the lines under it (on the shelf · last time)
   run the full width under the price, not in a column beside it. The picture
   is smaller and closer. Before this the price was pinned top-right and every
   line kept 98px clear for it, which left ~150px for the words on a 360px phone. */
.sc-sw > .sc-line{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;column-gap:10px;row-gap:3px;align-items:start}
.sc-sw > .sc-line > .sc-tick, .sc-sw > .sc-line > .sc-tick-gap{grid-column:1;grid-row:1 / span 2;align-self:center;margin-top:0}
.sc-sw > .sc-line > .sc-pic{grid-column:2;grid-row:1 / span 2}
.sc-sw > .sc-line > .sc-main{display:contents}
.sc-sw > .sc-line > .sc-main > *{grid-column:3 / -1;padding-right:0 !important;min-height:0 !important}
.sc-sw > .sc-line > .sc-main > .sc-name{grid-column:3;grid-row:1;padding-top:2px}
.sc-sw > .sc-line > .sc-price{position:static;grid-column:4;grid-row:1;max-width:none;text-align:right;align-self:start}
.sc-sw > .sc-line > .sc-main > .sc-row{grid-column:2 / -1;margin-left:0 !important;margin-top:6px}
.sc-sw > .sc-line > .sc-pic{width:46px;height:46px;font-size:28px}
@media (max-width:560px){
  .sc-sw > .sc-line{column-gap:8px}
  .sc-sw > .sc-line > .sc-pic{width:40px;height:40px;font-size:26px;border-radius:9px}
}
/* The tick level with the middle of the picture, whatever the price beside it. */
.sc-sw > .sc-line > .sc-tick, .sc-sw > .sc-line > .sc-tick-gap{grid-row:1;align-self:start;margin-top:13px}
@media (max-width:560px){ .sc-sw > .sc-line > .sc-tick, .sc-sw > .sc-line > .sc-tick-gap{margin-top:10px} }
