/* Layout: phone-first. Customer = one narrow column with a sticky pay bar and a tear-off queue ticket.
   Owner = queue lanes (one at a time on a phone, three side by side from 900px) with a fixed bottom nav. */
:root{
  --fs:1;
  --bg:#ECEEE8; --surface:#FFFFFF; --surface-2:#E1E4DB; --line:#C9CEC1;
  --ink:#15160F; --muted:#4F5548; --accent:#C23D0B; --accent-ink:#FFFFFF;
  --band:#FFFFFF; --band-ink:#15160F; --band-line:#C9CEC1;
  --new:#F5C518; --new-ink:#15160F; --cook:#2753D6; --cook-ink:#FFFFFF;
  --ready:#0B7A55; --ready-ink:#FFFFFF; --late:#C42121; --late-ink:#FFFFFF;
  --late-tint:#FBE6E3; --new-tint:#FFF5C9; --ready-tint:#DDF2E8;
  --ph1:#F2D9B8; --ph2:#E7CFC4; --ph3:#D9E3C4; --ph4:#CFDCE6;
  --focus:#2753D6; --shadow:0 1px 0 rgba(21,22,15,.05),0 10px 28px -14px rgba(21,22,15,.35);
  --f-display:'Anybody','Noto Sans SC',system-ui,sans-serif;
  --f-body:'Figtree','Noto Sans SC',system-ui,-apple-system,sans-serif;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#10110D; --surface:#1B1C17; --surface-2:#272920; --line:#3A3D32;
  --ink:#F1F2EA; --muted:#AEB3A3; --accent:#FF7B3A; --accent-ink:#15160F;
  --band:#050604; --band-ink:#F1F2EA; --band-line:#2E3128;
  --late-tint:#3A1715; --new-tint:#3A3210; --ready-tint:#0F2E22;
  --ph1:#4A3A26; --ph2:#46302A; --ph3:#36402A; --ph4:#2B3842;
  --focus:#8FB0FF; --shadow:0 1px 0 rgba(0,0,0,.4),0 10px 28px -14px rgba(0,0,0,.8);
  color-scheme:dark }}
:root[data-theme="dark"]{
  --bg:#10110D; --surface:#1B1C17; --surface-2:#272920; --line:#3A3D32;
  --ink:#F1F2EA; --muted:#AEB3A3; --accent:#FF7B3A; --accent-ink:#15160F;
  --band:#050604; --band-ink:#F1F2EA; --band-line:#2E3128;
  --late-tint:#3A1715; --new-tint:#3A3210; --ready-tint:#0F2E22;
  --ph1:#4A3A26; --ph2:#46302A; --ph3:#36402A; --ph4:#2B3842;
  --focus:#8FB0FF; --shadow:0 1px 0 rgba(0,0,0,.4),0 10px 28px -14px rgba(0,0,0,.8);
  color-scheme:dark }

*{box-sizing:border-box}
html,body{min-height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:calc(16px*var(--fs));line-height:1.4;-webkit-tap-highlight-color:transparent}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.num{font-variant-numeric:tabular-nums}
.wrap{max-width:560px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:16px 140px;display:flex;flex-direction:column;gap:16px}
.wrap.wide{max-width:1240px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
h1,h2,h3{margin:0;text-wrap:balance}
.eyebrow{font-size:calc(13px*var(--fs));font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.display{font-family:var(--f-display);font-stretch:112%;font-weight:850;letter-spacing:-.01em}

/* buttons */
.btn{min-height:56px;border-radius:14px;border:0;padding:0 18px;font-size:calc(18px*var(--fs));font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:10px;text-decoration:none}
.btn svg{flex-shrink:0}
.btn-accent{background:var(--accent);color:var(--accent-ink)}
.btn-ink{background:var(--ink);color:var(--bg)}
.btn-ghost{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 2px var(--ink)}
.btn-soft{background:var(--surface-2);color:var(--ink)}
.btn-block{width:100%}
.btn-sm{min-height:44px;font-size:calc(15px*var(--fs));padding:0 14px;border-radius:12px}
.icon-btn{width:52px;height:52px;border-radius:14px;border:0;background:var(--surface-2);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.seg{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:6px}
.seg button{min-height:48px;border-radius:12px;border:2px solid var(--line);background:var(--surface);font-weight:800;font-size:calc(16px*var(--fs))}
.seg button[aria-pressed="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 12px;font-size:calc(14px*var(--fs));font-weight:800;background:var(--surface-2);color:var(--ink)}
.dot{width:9px;height:9px;border-radius:50%;background:currentColor;flex-shrink:0}

/* ---------- customer ---------- */
.c-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.stall-name{font-family:var(--f-display);font-stretch:118%;font-weight:880;font-size:calc(clamp(30px,8.5vw,40px)*var(--fs));line-height:.95;text-transform:uppercase;letter-spacing:-.005em;overflow-wrap:anywhere}
.lang{display:flex;gap:4px;background:var(--surface-2);padding:4px;border-radius:999px;flex-shrink:0}
.lang button{min-width:44px;height:40px;border:0;border-radius:999px;background:transparent;font-weight:800;font-size:calc(14px*var(--fs));padding:0 10px}
.lang button[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.status-row{display:flex;flex-wrap:wrap;gap:8px}
.status-open{color:var(--ready)}
.notice{border-radius:16px;padding:14px 16px;font-weight:700;display:flex;gap:10px;align-items:flex-start}
.notice.warn{background:var(--new-tint);color:var(--ink)}
.notice.bad{background:var(--late-tint);color:var(--ink)}
.my-order{display:flex;align-items:center;gap:14px;width:100%;text-align:left;border:0;border-radius:18px;padding:12px 14px;background:var(--ink);color:var(--bg)}
.my-order .no{font-family:var(--f-display);font-stretch:80%;font-weight:900;font-size:calc(40px*var(--fs));line-height:1}
.items{display:flex;flex-direction:column;gap:12px}
.item{display:grid;grid-template-columns:92px minmax(0,1fr) auto;gap:14px;align-items:center;background:var(--surface);border-radius:20px;padding:10px;box-shadow:var(--shadow)}
.item.out{opacity:.55;box-shadow:none;border:2px dashed var(--line)}
.ph{width:92px;height:92px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-family:var(--f-display);font-stretch:80%;font-weight:900;font-size:calc(46px*var(--fs));color:var(--ink);opacity:.9;overflow:hidden;position:relative}
.ph img{width:100%;height:100%;object-fit:cover;max-width:100%}
.ph.c1{background:var(--ph1)}.ph.c2{background:var(--ph2)}.ph.c3{background:var(--ph3)}.ph.c4{background:var(--ph4)}
.item-name{font-weight:800;font-size:calc(18px*var(--fs));line-height:1.2}
.item-price{font-weight:800;font-size:calc(19px*var(--fs))}
.item-meta{font-size:calc(14px*var(--fs));font-weight:600;color:var(--muted)}
.add{width:56px;height:56px;border-radius:16px;border:0;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center}
.stepper{display:flex;flex-direction:column;align-items:center;gap:2px}
.stepper button{width:52px;height:46px;border-radius:12px;border:0;display:flex;align-items:center;justify-content:center}
.stepper .plus{background:var(--accent);color:var(--accent-ink)}
.stepper .minus{background:var(--surface-2);color:var(--ink)}
.stepper .q{font-weight:900;font-size:calc(20px*var(--fs));line-height:24px}
.out-tag{background:var(--late);color:var(--late-ink);border-radius:999px;padding:6px 12px;font-weight:800;font-size:calc(14px*var(--fs))}
.paybar{position:fixed;left:0;right:0;bottom:0;z-index:20;padding:12px max(16px,env(safe-area-inset-right,0px)) calc(14px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));background:linear-gradient(to top,var(--bg) 70%,transparent)}
.paybar-in{max-width:560px;margin:0 auto}
.paybar .btn{width:100%;min-height:64px;justify-content:space-between;font-size:calc(19px*var(--fs));border-radius:18px;box-shadow:var(--shadow)}
.panel{background:var(--surface);border-radius:20px;padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow)}
.line{display:flex;justify-content:space-between;gap:12px;align-items:center}
.line-total{font-size:calc(22px*var(--fs));font-weight:900}
.mini-step{display:flex;align-items:center;gap:6px}
.mini-step button{width:44px;height:44px;border-radius:12px;border:0;background:var(--surface-2);display:flex;align-items:center;justify-content:center}
.methods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.method{min-height:72px;border-radius:16px;border:2px solid var(--line);background:var(--surface);display:flex;align-items:center;gap:10px;padding:10px 12px;text-align:left;font-weight:800;font-size:calc(16px*var(--fs));line-height:1.2}
.method[aria-pressed="true"]{border:3px solid var(--ink);padding:9px 11px;background:var(--surface-2)}
.method .mi{width:36px;height:36px;border-radius:10px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.method[aria-pressed="true"] .mi{background:var(--ink);color:var(--bg)}
.method.full{grid-column:1/-1}
.sandbox{border:3px dashed var(--accent);border-radius:20px;padding:18px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;background:var(--surface)}
.qr-box{background:#FFFFFF;padding:12px;border-radius:12px;width:200px;max-width:100%}
.qr-box svg{display:block;width:100%;height:auto}

/* ticket */
.ticket{background:var(--surface);border-radius:24px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.ticket .t-top{padding:22px 20px 18px;display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.ticket .t-no{font-family:var(--f-display);font-stretch:75%;font-weight:900;font-size:clamp(104px,30vw,150px);line-height:.88;letter-spacing:-.02em}
.perf{position:relative;height:24px}
.perf::before{content:"";position:absolute;left:22px;right:22px;top:11px;border-top:3px dashed var(--line)}
.perf::after,.perf .r{content:"";position:absolute;top:0;width:24px;height:24px;border-radius:50%;background:var(--bg)}
.perf::after{left:-12px}
.perf .r{right:-12px}
.ticket .t-bot{padding:16px 20px 22px;display:flex;flex-direction:column;gap:14px}
.eta{display:flex;align-items:baseline;justify-content:center;gap:8px}
.eta b{font-family:var(--f-display);font-stretch:85%;font-weight:900;font-size:calc(64px*var(--fs));line-height:1;color:var(--cook)}
.steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.step{display:flex;flex-direction:column;gap:6px;font-size:calc(14px*var(--fs));font-weight:700;color:var(--muted)}
.step i{height:8px;border-radius:999px;background:var(--surface-2);display:block}
.step.done i{background:var(--ready)}
.step.now i{background:var(--cook)}
.step.done,.step.now{color:var(--ink);font-weight:800}
.ready-screen{background:var(--ready);color:var(--ready-ink);border-radius:28px;padding:28px 20px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.ready-screen .t-no{font-family:var(--f-display);font-stretch:75%;font-weight:900;font-size:clamp(110px,32vw,160px);line-height:.88}
.ready-screen .big{font-family:var(--f-display);font-stretch:130%;font-weight:900;font-size:calc(44px*var(--fs));letter-spacing:.02em}
@media (prefers-reduced-motion:no-preference){ .ready-screen{animation:pulse 1.3s ease-in-out infinite} }
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.025)}}
.unpaid-box{background:var(--new);color:var(--new-ink);border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:4px}
.foot-link{display:flex;justify-content:center;padding-top:8px}
.foot-link a,.linklike{color:var(--muted);font-weight:700;font-size:calc(14px*var(--fs));background:none;border:0;text-decoration:underline;padding:12px}

/* ---------- owner ---------- */
.o-head{background:var(--band);color:var(--band-ink)}
.o-head-in{max-width:1240px;margin:0 auto;padding:14px max(16px,env(safe-area-inset-right,0px)) 14px max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:12px}
.o-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.o-title{font-family:var(--f-display);font-stretch:115%;font-weight:880;font-size:calc(22px*var(--fs));text-transform:uppercase;line-height:1}
.o-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.o-chip{display:inline-flex;align-items:center;gap:6px;font-size:calc(13px*var(--fs));font-weight:800;border-radius:999px;padding:5px 10px;border:1px solid var(--band-line);background:transparent;color:var(--band-ink);min-height:30px}
.o-chip.ok .dot{color:#34D399}.o-chip.bad .dot{color:#F87171}
.o-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.o-lang{background:var(--band-line)}
.o-lang button{color:var(--band-ink);height:44px}
.o-lang button[aria-pressed="true"]{background:var(--band-ink);color:var(--band)}
.o-btn{min-height:52px;border-radius:14px;padding:0 14px;font-weight:800;font-size:calc(16px*var(--fs));display:inline-flex;align-items:center;gap:8px;border:2px solid var(--band-ink);background:transparent;color:var(--band-ink)}
.o-btn.pause{background:var(--late);border-color:var(--late);color:var(--late-ink)}
.o-btn.resume{background:var(--new);border-color:var(--new);color:var(--new-ink)}
.busy{display:flex;align-items:center;gap:10px}
.busy-l{font-weight:800;font-size:calc(14px*var(--fs));width:48px;flex-shrink:0}
.busy .seg{flex:1}
.busy .seg button{background:transparent;color:var(--band-ink);border-color:var(--band-line)}
.busy .seg button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.busy .seg button.norm[aria-pressed="true"]{background:var(--band-ink);color:var(--band);border-color:var(--band-ink)}
.pausebar{background:var(--late);color:var(--late-ink);font-weight:700;padding:10px max(16px,env(safe-area-inset-left,0px))}
.q-tools{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between;align-items:center}
.lane-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.lane-tab{min-height:68px;border-radius:16px;border:3px solid var(--lc);background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:800;font-size:calc(15px*var(--fs));line-height:1.1}
.lane-tab b{font-family:var(--f-display);font-stretch:85%;font-size:calc(30px*var(--fs));font-weight:900}
.lane-tab[aria-pressed="true"]{background:var(--lc);color:var(--lci)}
.lanes{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.lane{display:none;flex-direction:column;gap:12px;min-width:0}
.lane.on{display:flex}
.lane-h{display:none;align-items:center;gap:10px;font-weight:900;font-size:calc(18px*var(--fs));padding:10px 14px;border-radius:14px;background:var(--lc);color:var(--lci)}
.lane-h b{margin-left:auto;font-family:var(--f-display);font-size:calc(24px*var(--fs))}
@media (min-width:900px){
  .lane-tabs{display:none}
  .lanes{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
  .lane{display:flex}
  .lane-h{display:flex}
}
.oc{background:var(--surface);border-radius:18px;box-shadow:var(--shadow);border-top:10px solid var(--lc);padding:12px 14px 14px;display:flex;flex-direction:column;gap:10px}
.oc.late{background:var(--late-tint);box-shadow:inset 0 0 0 3px var(--late);border-top-color:var(--late)}
.oc.unpaid{border:3px dashed var(--ink);border-top-width:10px;border-top-style:solid;border-top-color:var(--new)}
.oc-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.oc-no{font-family:var(--f-display);font-stretch:78%;font-weight:900;font-size:calc(52px*var(--fs));line-height:.9;letter-spacing:-.01em}
.oc-time{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.oc-min{display:flex;align-items:center;gap:6px;font-weight:900;font-size:calc(26px*var(--fs))}
.oc.late .oc-min{color:var(--late)}
.late-tag{background:var(--late);color:var(--late-ink);border-radius:999px;padding:3px 10px;font-weight:900;font-size:calc(14px*var(--fs));letter-spacing:.04em}
.oc-lines{display:flex;flex-direction:column;gap:2px;font-size:calc(19px*var(--fs));font-weight:700;line-height:1.3}
.oc-lines span b{font-weight:900}
.oc-pay{display:flex;align-items:center;gap:6px;font-size:calc(15px*var(--fs));font-weight:800;flex-wrap:wrap}
.oc-pay .paid{color:var(--ready)}
.oc-btns{display:flex;gap:8px}
.oc-btns .main{flex:1;min-height:64px;font-size:calc(20px*var(--fs));border-radius:16px}
.oc-btns .side{width:72px;min-height:64px;border-radius:16px;font-size:calc(18px*var(--fs));font-weight:900;border:2px solid var(--ink);background:var(--surface);color:var(--ink)}
.act-new{background:var(--cook);color:var(--cook-ink)}
.act-cook{background:var(--ready);color:var(--ready-ink)}
.act-ready{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 3px var(--ink)}
.act-cash{background:var(--new);color:var(--new-ink)}
.empty{padding:36px 16px;text-align:center;border:2px dashed var(--line);border-radius:18px;font-weight:700;color:var(--muted)}
.nav{position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--surface);border-top:1px solid var(--line);padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
.nav-in{max-width:640px;margin:0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.nav button{min-height:70px;border:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-weight:800;font-size:calc(13px*var(--fs));color:var(--muted);position:relative}
.nav button[aria-current="page"]{color:var(--ink)}
.nav button[aria-current="page"]::after{content:"";position:absolute;top:0;left:28%;right:28%;height:4px;border-radius:0 0 4px 4px;background:var(--ink)}
.nav .badge{position:absolute;top:8px;left:calc(50% + 6px);background:var(--new);color:var(--new-ink);border-radius:999px;font-size:calc(12px*var(--fs));font-weight:900;padding:1px 6px}
.list{display:flex;flex-direction:column;gap:10px}
.mrow{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:12px;align-items:center;background:var(--surface);border-radius:16px;padding:8px;box-shadow:var(--shadow)}
.mrow .ph{width:64px;height:64px;font-size:calc(30px*var(--fs));border-radius:12px}
.mrow-r{display:flex;gap:6px;align-items:center}
.toggle{min-width:96px;min-height:56px;border-radius:14px;border:0;font-weight:900;font-size:calc(17px*var(--fs))}
.toggle.on{background:var(--ready);color:var(--ready-ink)}
.toggle.off{background:var(--late);color:var(--late-ink)}
.stat-big{font-family:var(--f-display);font-stretch:90%;font-weight:900;font-size:calc(56px*var(--fs));line-height:1}
.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bar{height:14px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px}
.field{display:flex;flex-direction:column;gap:6px}
.field label,.field .lbl{font-weight:800;font-size:calc(15px*var(--fs))}
.field .hint{font-size:calc(14px*var(--fs));color:var(--muted);font-weight:600}
.input{min-height:56px;border-radius:14px;border:2px solid var(--line);background:var(--surface);padding:0 14px;font-size:calc(18px*var(--fs));font-weight:600;width:100%}
.input:focus{border-color:var(--ink);outline:none}
.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px}
.poster{background:#FFFFFF;color:#15160F;border-radius:16px;padding:18px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;border:2px solid var(--line)}
.poster .p-name{font-family:var(--f-display);font-stretch:118%;font-weight:900;font-size:calc(28px*var(--fs));text-transform:uppercase;line-height:1}
.poster .p-cta{background:#C23D0B;color:#FFFFFF;border-radius:999px;padding:6px 14px;font-weight:900;font-size:calc(15px*var(--fs))}
.poster .qr-box{width:220px}
.poster small{font-size:calc(13px*var(--fs));font-weight:700;color:#4F5548}
.steps-on{display:flex;flex-direction:column;gap:10px;counter-reset:s}
.steps-on li{list-style:none;display:flex;gap:12px;align-items:center;font-weight:700}
.steps-on li::before{counter-increment:s;content:counter(s);width:32px;height:32px;border-radius:50%;background:var(--ink);color:var(--bg);display:flex;align-items:center;justify-content:center;font-weight:900;flex-shrink:0}
.olist{display:flex;flex-direction:column}
.orow{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);align-items:center}
.orow:last-child{border-bottom:0}
.pill{display:inline-flex;border-radius:999px;padding:3px 10px;font-size:calc(13px*var(--fs));font-weight:800}
.pill.new{background:var(--new);color:var(--new-ink)}.pill.cooking{background:var(--cook);color:var(--cook-ink)}.pill.ready{background:var(--ready);color:var(--ready-ink)}.pill.done{background:var(--surface-2);color:var(--ink)}.pill.unpaid{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 2px var(--ink)}.pill.cancelled{background:var(--late-tint);color:var(--ink)}

/* overlays */
.alert{position:fixed;left:0;right:0;top:0;z-index:60;background:var(--new);color:var(--new-ink);padding:calc(18px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 16px max(16px,env(safe-area-inset-left,0px));box-shadow:0 18px 40px rgba(0,0,0,.4)}
.alert-in{max-width:560px;margin:0 auto;display:flex;flex-direction:column;gap:8px}
.alert .a-no{font-family:var(--f-display);font-stretch:78%;font-weight:900;font-size:calc(64px*var(--fs));line-height:.9}
.alert .btn{background:#15160F;color:#FFFFFF;min-height:64px;font-size:calc(22px*var(--fs))}
@media (prefers-reduced-motion:no-preference){ .alert{animation:flash 1s steps(2,end) infinite} }
@keyframes flash{0%{background:#F5C518}50%{background:#FFE27A}}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(84px + env(safe-area-inset-bottom,0px));z-index:50;width:min(520px,calc(100% - 32px));background:var(--ink);color:var(--bg);border-radius:16px;padding:6px 6px 6px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:700;box-shadow:var(--shadow)}
.toast button{min-height:48px;border-radius:12px;border:0;padding:0 16px;font-weight:900;background:var(--new);color:var(--new-ink)}
.toast.cust{bottom:calc(96px + env(safe-area-inset-bottom,0px))}
.scrim{position:fixed;inset:0;z-index:70;background:rgba(10,11,8,.55);display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--bg);width:100%;max-width:560px;max-height:92%;overflow-y:auto;border-radius:24px 24px 0 0;padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:16px}
.sheet-h{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:0;z-index:2;background:var(--bg);padding:16px 0 12px;border-bottom:1px solid var(--line)}
.sheet-f{position:sticky;bottom:0;z-index:2;background:var(--bg);display:flex;flex-direction:column;gap:12px;padding:12px 0 calc(16px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);margin-top:auto}
.cgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ctile{min-height:84px;border-radius:16px;border:2px solid var(--line);background:var(--surface);padding:8px;display:flex;align-items:center;gap:10px;text-align:left;font-weight:800;position:relative}
.ctile .ph{width:56px;height:56px;border-radius:10px;font-size:calc(26px*var(--fs));flex-shrink:0}
.ct-txt{display:flex;flex-direction:column;gap:4px;min-width:0;padding-right:22px}
.ctile .cq{position:absolute;top:8px;right:8px;background:var(--accent);color:var(--accent-ink);border-radius:999px;min-width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-weight:900}
.ctile:disabled{opacity:.45}
.photo-pick{display:flex;gap:12px;align-items:center}
.photo-pick .ph{width:96px;height:96px}
.file-btn{position:relative;overflow:hidden}
.file-btn input{position:absolute;inset:0;opacity:0;cursor:pointer}
.err{color:var(--late);font-weight:800}
.mode-note{font-size:calc(13px*var(--fs));color:var(--muted);font-weight:600;text-align:center}

/* base (page reset + safe areas) */
html{-webkit-text-size-adjust:100%}
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
body{margin:0}
img{max-width:100%}
[hidden]{display:none!important}
.chooser{display:grid;gap:14px}
.choice{display:flex;align-items:center;gap:16px;padding:18px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow);text-decoration:none;color:var(--ink)}
.choice img{width:64px;height:64px;border-radius:16px;flex-shrink:0}
.choice b{display:block;font-size:calc(20px*var(--fs))}
.choice span{color:var(--muted);font-weight:600}
.t-no,.oc-no,.a-no,.my-order .no{white-space:nowrap}
.ready-screen .t-no{font-size:clamp(88px,26vw,150px)}
.ticket .t-top .t-no{font-size:clamp(88px,27vw,150px)}

/* ================= design v2 ================= */
/* brand (logo + stall name) */
.brand{display:flex;align-items:center;gap:12px;min-width:0}
.logo{width:56px;height:56px;border-radius:50%;object-fit:cover;flex-shrink:0;background:var(--surface-2);box-shadow:0 0 0 2px var(--surface)}
.logo.sm{width:44px;height:44px}
.logo.xs{width:32px;height:32px;box-shadow:none}
.logo.lg{width:96px;height:96px}
.logo-ph{display:inline-flex;align-items:center;justify-content:center;font-family:var(--f-display);font-weight:900;font-size:calc(24px*var(--fs));color:var(--ink)}
.c2-name{font-size:calc(clamp(24px,6.6vw,32px)*var(--fs))}
.o-head .brand .logo{box-shadow:0 0 0 2px var(--band-line)}

/* install banner + help */
.inst{display:flex;align-items:center;gap:10px;background:var(--surface);border-radius:16px;padding:10px 10px 10px 12px;box-shadow:var(--shadow)}
.inst img{width:40px;height:40px;border-radius:10px;flex-shrink:0}
.inst-t{flex:1;min-width:0;display:flex;flex-direction:column;font-size:calc(13px*var(--fs));line-height:1.3}
.inst-t b{font-size:calc(15px*var(--fs))}
.inst-t span{color:var(--muted);font-weight:600}
.inst .btn-sm{min-height:40px}
.inst-x{width:36px;height:36px;border:0;border-radius:10px;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.inst-steps{margin:0;padding:0;display:flex;flex-direction:column;gap:12px;list-style:none}
.inst-steps li{display:flex;align-items:center;gap:12px;font-weight:700;font-size:calc(16px*var(--fs))}
.inst-ic{width:44px;height:44px;border-radius:12px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex-shrink:0}

/* ---------- customer: Grab-style 2-column grid, smaller controls ---------- */
.c2 .btn{min-height:52px;font-size:calc(17px*var(--fs));border-radius:14px}
.btn-md{min-height:48px!important;font-size:calc(16px*var(--fs))!important}
.c2 .lang button{height:36px;min-width:40px;font-size:calc(13px*var(--fs))}
.c2 .icon-btn{width:44px;height:44px;border-radius:12px}
.c2 .method{min-height:56px;font-size:calc(15px*var(--fs));border-radius:14px;padding:8px 10px}
.c2 .method[aria-pressed="true"]{padding:7px 9px}
.c2 .method .mi{width:32px;height:32px}
.c2 .mini-step button{width:40px;height:40px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
@media (min-width:640px){ .grid2{grid-template-columns:repeat(3,minmax(0,1fr))} }
.dish{position:relative;display:flex;flex-direction:column;gap:8px;min-width:0;container-type:inline-size}
.dish-ph{position:relative;width:100%;aspect-ratio:1/1;height:auto;border:0;padding:0;border-radius:18px;font-size:calc(52px*var(--fs));cursor:pointer;max-width:100%}
.dish-ph img{border-radius:18px}
.dish.out .dish-ph img{filter:grayscale(1);opacity:.55}
.dish-out{position:absolute;left:8px;top:8px;background:var(--late);color:var(--late-ink);font-family:var(--f-body);font-size:calc(12px*var(--fs));font-weight:800;padding:3px 9px;border-radius:999px}
.dish-add{position:absolute;right:8px;top:calc(100cqw - 48px);width:40px;height:40px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.25)}
.dish-step{position:absolute;right:8px;top:calc(100cqw - 48px);display:flex;align-items:center;gap:2px;background:var(--surface);border-radius:999px;padding:3px;box-shadow:0 4px 12px rgba(0,0,0,.25)}
.dish-step button{width:34px;height:34px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center}
.dish-step span{min-width:22px;text-align:center;font-weight:900}
.dish-txt{border:0;background:none;padding:0 2px;text-align:left;display:flex;flex-direction:column;gap:4px;color:var(--ink);cursor:pointer}
.dish-name{font-weight:800;font-size:calc(15px*var(--fs));line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dish-row{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}
.dish-price{font-weight:900;font-size:calc(16px*var(--fs))}
.dish-meta{display:inline-flex;align-items:center;gap:3px;font-size:calc(12px*var(--fs));font-weight:700;color:var(--muted)}
.cartbar{width:100%;min-height:52px;border:0;border-radius:16px;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;gap:10px;padding:0 16px 0 8px;font-size:calc(16px*var(--fs));font-weight:800;box-shadow:var(--shadow)}
.cartbar.ink{background:var(--ink);color:var(--bg);justify-content:center;padding:0 16px}
.cb-n{min-width:34px;height:34px;border-radius:10px;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;font-weight:900}
.cb-l{flex:1;text-align:left}
.paybar .cartbar{justify-content:center}
.paybar .cartbar .cb-l{text-align:left}
.dish-sheet{padding:0 0 0 0}
.dish-hero{position:relative;width:100%;aspect-ratio:4/3;border-radius:24px 24px 0 0;font-size:calc(80px*var(--fs));flex-shrink:0}
.dish-hero img{border-radius:24px 24px 0 0}
.hero-x{position:absolute;top:12px;right:12px;background:var(--surface);box-shadow:var(--shadow)}
.dish-body{padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:8px}
.dish-sheet .sheet-f{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.dish-buy{display:flex;gap:12px;align-items:center}
.dish-buy .btn{min-height:52px;font-size:calc(17px*var(--fs))}
.t-pick{font-family:var(--f-display);font-stretch:120%;font-weight:900;font-size:calc(22px*var(--fs));letter-spacing:.06em}
.c2 .step i{height:12px}
.c2 .ticket .t-top{gap:2px}
.c2 .my-order{padding:10px 12px}
.c2 .my-order .no{font-size:calc(32px*var(--fs))}

/* ---------- admin: number tiles, shortcut grid, photo cards, tiles ---------- */
.stat-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.stile{min-height:84px;border-radius:18px;border:0;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 4px;color:var(--ink);border-top:6px solid var(--lc,var(--ink))}
.stile b{font-family:var(--f-display);font-stretch:85%;font-weight:900;font-size:calc(34px*var(--fs));line-height:1}
.stile span{font-size:calc(13px*var(--fs));font-weight:800;color:var(--muted)}
.stile[aria-pressed="true"]{background:var(--lc);color:var(--lci)}
.stile[aria-pressed="true"] span{color:var(--lci)}
.stile.sales{--lc:var(--ink)}
.stile.sales b{font-size:calc(clamp(13px,3.9vw,22px)*var(--fs));font-stretch:80%;letter-spacing:-.02em;max-width:100%;overflow:hidden}
@media (min-width:900px){ .stile[aria-pressed="true"]{background:var(--surface);color:var(--ink)} .stile[aria-pressed="true"] span{color:var(--muted)} }
.shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;background:var(--surface);border-radius:20px;padding:14px 8px;box-shadow:var(--shadow)}
@media (min-width:640px){ .shortcuts{grid-template-columns:repeat(6,minmax(0,1fr))} }
.sc{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:calc(13px*var(--fs));font-weight:800;color:var(--ink);min-height:76px;padding:4px}
.sc-ic{width:52px;height:52px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--ink)}
.sc:active .sc-ic{background:var(--accent);color:var(--accent-ink)}
.lane-tabs{display:none!important}
.oc-thumbs{display:flex;gap:8px;flex-wrap:wrap}
.th{position:relative}
.th .ph{width:64px;height:64px;font-size:calc(28px*var(--fs));border-radius:14px}
.th-q{position:absolute;right:-6px;top:-6px;background:var(--ink);color:var(--bg);border-radius:999px;padding:1px 7px;font-size:calc(13px*var(--fs));font-weight:900;box-shadow:0 0 0 2px var(--surface)}
.oc-names{font-size:calc(14px*var(--fs));font-weight:700;color:var(--muted);line-height:1.3}
.tchip{display:inline-flex;align-items:center;gap:4px;background:var(--surface-2);border-radius:999px;padding:4px 10px;font-weight:900;font-size:calc(16px*var(--fs))}
.tchip.late{background:var(--late);color:var(--late-ink)}
.pill.paidp{background:var(--ready-tint);color:var(--ink);display:inline-flex;align-items:center;gap:4px;padding:5px 10px;font-size:calc(14px*var(--fs))}
.pill.unpaid{display:inline-flex;align-items:center;gap:4px;padding:5px 10px;font-size:calc(14px*var(--fs))}
.oc-btns .side{display:flex;align-items:center;justify-content:center}
.empty svg{opacity:.5}
.mgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (min-width:640px){ .mgrid{grid-template-columns:repeat(4,minmax(0,1fr))} }
.mtile{background:var(--surface);border-radius:18px;box-shadow:var(--shadow);padding:8px;display:flex;flex-direction:column;gap:8px;min-width:0}
.mtile.out .ph img{filter:grayscale(1);opacity:.55}
.mtile-ph{border:0;padding:0;background:none;cursor:pointer}
.mtile-ph .ph{width:100%;height:auto;aspect-ratio:1/1;border-radius:12px;font-size:calc(44px*var(--fs))}
.mtile-t{display:flex;flex-direction:column;gap:2px;min-width:0;padding:0 2px}
.mtile-t b{font-size:calc(15px*var(--fs));line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mtile .toggle{width:100%;min-height:48px;min-width:0;font-size:calc(15px*var(--fs))}
.add-tile{border:2px dashed var(--line);background:transparent;box-shadow:none;align-items:center;justify-content:center;min-height:200px;color:var(--ink);font-size:calc(15px*var(--fs))}
.set-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (min-width:640px){ .set-grid{grid-template-columns:repeat(4,minmax(0,1fr))} }
.set-tile{border:0;background:var(--surface);box-shadow:var(--shadow);border-radius:18px;min-height:112px;padding:14px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;color:var(--ink);font-size:calc(15px*var(--fs))}
.set-tile b{font-size:calc(15px*var(--fs));line-height:1.2}
.set-val{font-size:calc(13px*var(--fs));font-weight:700;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.set-tile.st-on .sc-ic{background:var(--ready);color:var(--ready-ink)}
.set-tile.st-off .sc-ic{background:var(--late);color:var(--late-ink)}
.tile-logo{display:flex}
.busy-l{width:auto;display:flex;align-items:center}
.poster .logo{box-shadow:none}

/* ---------- order history ---------- */
.hist{gap:12px}
.hist-h h2{display:flex;align-items:center;gap:8px;margin:0}
.daychips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none;margin:0 -4px;padding-left:4px}
.daychips::-webkit-scrollbar{display:none}
.daychips .chip{border:0;min-height:44px;padding:8px 14px;white-space:nowrap;flex-shrink:0;font-size:calc(15px*var(--fs))}
.daychips .chip[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.daychips .chip .num{opacity:.65;font-size:calc(13px*var(--fs))}
.h-search{min-height:48px;font-size:calc(16px*var(--fs))}
.hlist{display:flex;flex-direction:column}
.hrow{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 4px;border:0;border-bottom:1px solid var(--line);background:none;text-align:left;color:var(--ink);width:100%;min-height:72px;cursor:pointer}
.hrow:last-child{border-bottom:0}
.hrow:active{background:var(--surface-2)}
.hrow-no{font-size:calc(24px*var(--fs));min-width:64px;line-height:1}
.hrow-mid{display:flex;flex-direction:column;gap:5px;min-width:0}
.hrow-th{display:flex;gap:8px;align-items:center}
.th.sm .ph{width:40px;height:40px;font-size:calc(18px*var(--fs));border-radius:10px}
.th.sm .th-q{font-size:calc(11px*var(--fs));padding:0 5px;top:-5px;right:-6px}
.th-more{font-size:calc(13px*var(--fs));font-weight:900;color:var(--muted)}
.hrow-names{font-size:calc(14px*var(--fs));font-weight:700;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hrow-meta{font-size:calc(13px*var(--fs));font-weight:700;color:var(--muted)}
.hrow .pill{font-size:calc(12px*var(--fs));padding:4px 9px;white-space:nowrap}
/* order detail sheet */
.od-items{display:flex;flex-direction:column;gap:10px}
.od-line{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:12px;align-items:center}
.od-line .ph{width:56px;height:56px;font-size:calc(24px*var(--fs));border-radius:12px}
.od-n{display:flex;flex-direction:column;gap:2px;min-width:0}
.od-n b{font-size:calc(16px*var(--fs))}
.od-n span{font-size:calc(14px*var(--fs));font-weight:700}
.od-total{display:flex;justify-content:space-between;align-items:center;border-top:2px solid var(--ink);padding-top:10px;font-weight:800;font-size:calc(18px*var(--fs))}
.od-total b{font-size:calc(22px*var(--fs))}
.od-pay{display:flex;gap:8px;flex-wrap:wrap}
.od-time{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.od-time li{display:grid;grid-template-columns:18px 1fr auto;gap:10px;align-items:center;padding:7px 0;color:var(--muted);font-weight:700;position:relative}
.od-time li i{width:12px;height:12px;border-radius:50%;background:var(--line);justify-self:center;position:relative;z-index:1}
.od-time li:not(:last-child)::after{content:"";position:absolute;left:8px;top:24px;bottom:-8px;width:2px;background:var(--line)}
.od-time li.on{color:var(--ink)}
.od-time li.on i{background:var(--ready)}
/* alert sound picker */
.snd-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.snd{border:2px solid var(--line);background:var(--surface);border-radius:18px;min-height:112px;padding:14px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;color:var(--ink);font-size:calc(16px*var(--fs));text-align:left}
.snd[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset}
.snd[aria-pressed="true"] .sc-ic{background:var(--accent);color:var(--accent-ink)}
.snd-tips{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;color:var(--muted);font-weight:600;font-size:calc(15px*var(--fs));line-height:1.4}

/* ---------- slide to confirm collected ---------- */
.slide{--p:0;position:relative;height:64px;border-radius:999px;background:var(--surface);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;border:2px solid var(--ready)}
.slide::before{content:"";position:absolute;inset:0;background:var(--ready);opacity:calc(var(--p) * .9);pointer-events:none}
.slide-txt{position:relative;font-weight:800;font-size:calc(16px*var(--fs));color:var(--ink);padding-left:56px;padding-right:12px;opacity:calc(1 - var(--p));text-align:center}
.slide-knob{position:absolute;left:4px;top:4px;width:52px;height:52px;border-radius:50%;border:0;background:var(--ready);color:var(--ready-ink);display:flex;align-items:center;justify-content:center;touch-action:none;cursor:grab;transition:transform .25s ease;box-shadow:0 3px 10px rgba(0,0,0,.25);z-index:1}
.slide.drag .slide-knob{transition:none;cursor:grabbing}
.slide.done .slide-txt{opacity:0}
.slide-knob svg{width:24px;height:24px}
@media (prefers-reduced-motion:no-preference){ .slide:not(.drag):not(.done) .slide-knob{animation:nudge 2.4s ease-in-out infinite} }
@keyframes nudge{0%,70%,100%{transform:translateX(0)}80%{transform:translateX(14px)}90%{transform:translateX(0)}}

/* dish sheet: big full-width photo + description */
.dish-sheet{max-height:94%}
.dish-sheet .dish-hero{height:auto!important;width:100%!important;aspect-ratio:4/3;max-height:56vh;border-radius:24px 24px 0 0;flex-shrink:0}
.dish-sheet .dish-hero img{width:100%;height:100%;object-fit:cover;border-radius:24px 24px 0 0}
.dish-desc{margin:2px 0 0;font-size:calc(16px*var(--fs));line-height:1.5;font-weight:500;color:var(--muted);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
textarea.input{min-height:96px;resize:vertical;padding-top:12px;line-height:1.4;font-family:inherit}

/* ---------- customer sticky header ---------- */
.c-head{position:sticky;top:0;z-index:20;display:flex;flex-direction:column;gap:10px;background:var(--bg);
  margin:-16px calc(-1 * max(16px,env(safe-area-inset-left,0px))) 0;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 12px max(16px,env(safe-area-inset-left,0px));
  transition:box-shadow .2s ease, padding .2s ease}
body.scrolled .c-head{box-shadow:0 8px 18px -10px rgba(0,0,0,.28);border-bottom:1px solid var(--line)}
@media (prefers-color-scheme:dark){ body.scrolled .c-head{box-shadow:0 8px 20px -8px rgba(0,0,0,.7)} }
.c-head .logo{transition:width .2s ease,height .2s ease}
.c-head .c2-name{transition:font-size .2s ease}
body.scrolled .c-head{padding-top:calc(8px + env(safe-area-inset-top,0px));padding-bottom:8px;gap:8px}
body.scrolled .c-head .logo:not(.sm){width:40px;height:40px}
body.scrolled .c-head .c2-name{font-size:calc(20px*var(--fs))!important}
body.scrolled .c-head .eyebrow{display:none}
body.scrolled .c-head .c-top{align-items:center}
@media (min-width:600px){ .c-head{margin-left:-16px;margin-right:-16px;border-radius:0 0 18px 18px} }
body.scrolled .c-head .c2-name{font-size:calc(18px*var(--fs))!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
body.scrolled .c-head .brand > div{min-width:0;overflow:hidden}
body.scrolled .c-head .status-row{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
body.scrolled .c-head .status-row::-webkit-scrollbar{display:none}
body.scrolled .c-head .status-row > *{flex-shrink:0;font-size:calc(13px*var(--fs));padding-top:5px;padding-bottom:5px}

/* ---------- admin sticky header ---------- */
.o-head{position:sticky;top:0;z-index:25;transition:box-shadow .2s ease}
.o-head-in{transition:padding .2s ease,gap .2s ease}
.o-head .o-title,.o-head .logo{transition:font-size .2s ease,width .2s ease,height .2s ease}
body.scrolled .o-head{box-shadow:0 8px 20px -8px rgba(0,0,0,.45)}
body.scrolled .o-head-in{padding-top:8px;padding-bottom:8px;gap:0}
body.scrolled .o-head .busy{display:none}
body.scrolled .o-head .o-title{font-size:calc(18px*var(--fs));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.scrolled .o-head .logo.sm{width:36px;height:36px}
body.scrolled .o-head .o-chips{margin-top:2px}
body.scrolled .o-head .o-btn{min-height:44px}
@media (max-width:700px){
  body.scrolled .o-head .o-row{flex-wrap:nowrap}
  body.scrolled .o-head .brand{min-width:0;flex:1}
  body.scrolled .o-head .brand > div{min-width:0}
  body.scrolled .o-head .o-chips{flex-wrap:nowrap}
  body.scrolled .o-head .o-chip{font-size:0;gap:0;padding:4px 8px;min-height:28px}
  body.scrolled .o-head .o-chip svg{width:16px;height:16px}
  body.scrolled .o-head .o-btn{font-size:0;gap:0;min-height:44px;width:48px;padding:0;justify-content:center}
}

/* ---------- payment picker (grouped, brand badges) ---------- */
.paysec{display:flex;flex-direction:column;gap:12px}
.trust{display:flex;gap:8px;flex-wrap:wrap;align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:5px 10px;font-size:calc(13px*var(--fs));font-weight:800}
.trust span{display:inline-flex;align-items:center;gap:5px;color:var(--ready)}
.trust span:last-child{color:var(--cook)}
.paycard{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow);width:100%;text-align:left;color:var(--ink)}
.paycard-h{display:flex;align-items:center;gap:10px}
.paycard-h b{flex:1;font-size:calc(16px*var(--fs));line-height:1.25}
.pc-ic{width:36px;height:36px;border-radius:10px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--ink)}
.pc-ic.dn{background:#E4007F;color:#fff}
.pc-ic.cash{background:var(--ready);color:var(--ready-ink)}
.pc-more{border:0;background:none;color:var(--cook);font-weight:800;font-size:calc(14px*var(--fs));display:inline-flex;align-items:center;gap:4px;min-height:40px;padding:0 4px;white-space:nowrap}
.chev{display:inline-block;transition:transform .2s;font-size:calc(18px*var(--fs));line-height:1;transform:translateY(-2px)}
.chev.up{transform:rotate(180deg) translateY(-2px)}
.pick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 6px}
.pick{position:relative;border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:6px;padding:4px 2px;border-radius:14px;color:var(--ink);min-height:96px}
.pick-n{font-size:calc(12.5px*var(--fs));font-weight:700;text-align:center;line-height:1.2}
.pick .pbadge{box-shadow:0 0 0 1px var(--line)}
.pick[aria-pressed="true"] .pbadge{box-shadow:0 0 0 3px var(--bg),0 0 0 5px var(--accent)}
.pick[aria-pressed="true"] .pick-n{font-weight:900}
.pick-ok{position:absolute;top:0;right:calc(50% - 34px);width:22px;height:22px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px var(--bg)}
.pbadge{border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-family:var(--f-display);font-weight:900;letter-spacing:-.01em;background:var(--surface-2);color:var(--ink);flex-shrink:0;overflow:hidden}
.pbadge.img{background:#fff}
.pbadge.img img{width:100%;height:100%;object-fit:contain}
.paycard.row{flex-direction:row;align-items:center;gap:12px;cursor:pointer;min-height:68px}
.row-t{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.row-t b{font-size:calc(16px*var(--fs))}
.row-t .muted{font-size:calc(13px*var(--fs));font-weight:600}
.radio{width:22px;height:22px;border-radius:50%;border:2px solid var(--line);flex-shrink:0}
.paycard.row.on{border:2px solid var(--accent);padding:13px}
.paycard.row.on .radio{border:7px solid var(--accent)}
@media (max-width:360px){ .pick-grid{grid-template-columns:repeat(3,minmax(0,1fr))} }
/* customer details */
.cust .input[aria-invalid="true"]{border-color:var(--late);box-shadow:0 0 0 2px var(--late)}
/* admin: customer name */
.oc-cust{display:inline-flex;align-items:center;gap:6px;font-weight:900;font-size:calc(17px*var(--fs))}
.hrow-cust{font-size:calc(14px*var(--fs));font-weight:900}
.od-cust{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:var(--surface);border-radius:14px;padding:10px 12px}
.od-cust .btn-sm{min-height:40px}
.od-cust .row-t{flex:1 1 170px}.od-cust .row-t .muted{white-space:nowrap}

/* ---------- sheets as proper modals: darker overlay; centred card on wide screens ---------- */
.scrim{background:rgba(8,9,6,.62);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.scrim.enter{animation:scrimIn .18s ease}
@media (prefers-color-scheme:dark){ .scrim{background:rgba(0,0,0,.78)} }
.scrim > .sheet{box-shadow:0 -10px 40px rgba(0,0,0,.35)}
@media (min-width:700px){
  .scrim{align-items:center;padding:24px}
  .scrim > .sheet{border-radius:24px;max-height:88vh;box-shadow:0 24px 70px rgba(0,0,0,.5)}
  .scrim > .sheet .sheet-f{padding-bottom:16px}
  .dish-sheet .dish-hero,.dish-sheet .dish-hero img{border-radius:24px 24px 0 0}
}
@media (prefers-reduced-motion:no-preference){
  .scrim.enter > .sheet{animation:sheetUp .22s cubic-bezier(.2,.8,.2,1)}
  @media (min-width:700px){ .scrim.enter > .sheet{animation:sheetPop .2s cubic-bezier(.2,.8,.2,1)} }
}
@keyframes scrimIn{from{opacity:0}to{opacity:1}}
@keyframes sheetUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@keyframes sheetPop{from{transform:scale(.97);opacity:0}to{transform:none;opacity:1}}
.sheet > :last-child:not(.sheet-f){margin-bottom:20px}

/* lock the page behind an open modal (iOS needs position:fixed) and keep the sheet fully visible */
html.modal-open,html.modal-open body{overflow:hidden;overscroll-behavior:none}
html.modal-open body{position:fixed;left:0;right:0;width:100%}
.scrim{height:100vh;height:100dvh;overscroll-behavior:contain}
.sheet{max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.sheet:has(> .sheet-f){padding-bottom:0}
.od-cust-btns{display:flex;gap:8px;width:100%}
.od-cust-btns .btn{flex:1}

/* best sellers: photo, rank, bar; tap opens the menu item */
.best{display:flex;flex-direction:column}
.best-row{display:grid;grid-template-columns:22px 52px minmax(0,1fr) auto 18px;gap:12px;align-items:center;border:0;border-bottom:1px solid var(--line);background:none;padding:10px 2px;text-align:left;color:var(--ink);width:100%;min-height:72px;cursor:pointer}
.best-row:last-child{border-bottom:0}
.best-row:active{background:var(--surface-2)}
.best-row[disabled]{cursor:default;grid-template-columns:22px 52px minmax(0,1fr) auto}
.best-row .ph{width:52px;height:52px;border-radius:12px;font-size:calc(22px*var(--fs))}
.best-rank{font-weight:900;color:var(--muted);text-align:center}
.best-row:first-child .best-rank{color:var(--accent)}
.best-mid{display:flex;flex-direction:column;gap:5px;min-width:0}
.best-mid b{font-size:calc(16px*var(--fs));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.best-mid .bar{height:6px}
.best-mid .muted{font-size:calc(13px*var(--fs));font-weight:700}
.best-q{font-size:calc(18px*var(--fs))}
.best-go{color:var(--muted);display:flex}
.best-mid b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.25}
.page{display:flex;flex-direction:column;gap:14px;width:100%;margin-left:auto;margin-right:auto;align-self:center}

/* ---------- theme-aware bits + Display sheet ---------- */
:root{--scrim:rgba(8,9,6,.62);--head-shadow:0 8px 18px -10px rgba(0,0,0,.28)}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){--scrim:rgba(0,0,0,.78);--head-shadow:0 8px 20px -8px rgba(0,0,0,.7)} }
:root[data-theme="dark"]{--scrim:rgba(0,0,0,.78);--head-shadow:0 8px 20px -8px rgba(0,0,0,.7)}
.scrim{background:var(--scrim)!important}
body.scrolled .c-head{box-shadow:var(--head-shadow)!important}
:root[data-theme="light"]{color-scheme:light}
.disp-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.disp-seg.size{grid-template-columns:repeat(4,minmax(0,1fr))}
.disp-seg button{min-height:64px;border-radius:14px;border:2px solid var(--line);background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-weight:800;font-size:calc(14px*var(--fs));color:var(--ink)}
.disp-seg button small{font-size:calc(11px*var(--fs));color:var(--muted);font-weight:700}
.disp-seg button[aria-pressed="true"]{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent) inset;background:var(--surface-2)}
.aa-btn{width:44px;height:44px;border-radius:999px;border:0;background:var(--surface-2);color:var(--ink);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.c-top-r{display:flex;gap:8px;align-items:center}
body.scrolled .c-head .aa-btn{width:38px;height:38px}
.lang-aa{display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 12px;border-radius:999px;border:0;background:var(--surface-2);color:var(--ink);font-weight:900;font-size:calc(15px*var(--fs));flex-shrink:0}
.lang-aa .sep{width:1px;height:20px;background:var(--line);margin:0 2px}
body.scrolled .c-head .lang-aa{height:38px;padding:0 10px}
.c-top .brand{min-width:0;flex:1}
.c2-name{overflow-wrap:normal;word-break:normal}
html.fs-big .inst{flex-wrap:wrap}
html.fs-big .inst-t{flex:1 1 170px}
.c-top{flex-wrap:wrap;row-gap:10px}.c-top .brand{flex:1 1 190px}.c-top .lang-aa{margin-left:auto}
/* big text: keep the dashboard numbers fitting their tiles; close button stays in the corner */
.stile b{font-size:34px}
.stile.sales b{font-size:clamp(13px,3.9vw,22px)}
html.fs-big .inst{position:relative;padding-right:46px}
html.fs-big .inst-x{position:absolute;top:6px;right:6px}
html.fs-big .inst .btn-sm{margin-left:52px}

/* admin header: light in light mode (white bar + hairline), dark in dark mode */
.o-head{border-bottom:1px solid var(--band-line)}
.o-btn.pause{border-color:transparent}
.theme-chip{padding:5px 9px}
