/* Canteen Express
   Palette: canteen-tray cobalt, sauce red, mustard, icy-pole mint, deep ink.
   Type: Baloo 2 (headings, prices, buttons), Nunito (reading text),
         Caveat (only for the pen writing on the lunch bag). */

@font-face { font-family: "Baloo 2"; font-weight: 600; font-display: swap; src: url("../fonts/baloo-2-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url("../fonts/baloo-2-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url("../fonts/baloo-2-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url("../fonts/caveat-latin-700-normal.woff2") format("woff2"); }

:root {
  --cobalt: #2447F9;
  --cobalt-deep: #1531B8;
  --ink: #151A4A;
  --sauce: #EE3B26;
  --sauce-deep: #B82313;
  --mustard: #FFC62E;
  --mustard-deep: #D99A00;
  --mint: #19C79A;
  --mint-deep: #0E8F6D;
  --ground: #EEF1FF;
  --white: #FFFFFF;
  --muted: #565C8C;
  --line: #D5DAF5;
  --bag: #D2AC78;
  --bag-shade: #B48D58;
  --display: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pen: "Caveat", "Bradley Hand", cursive;
  --tabbar: 68px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.on-dark :focus-visible, .auth :focus-visible { outline-color: var(--white); }

/* ---------- buttons: chunky, with a solid edge that presses down ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 16px;
  font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1;
  background: var(--white); color: var(--ink);
  box-shadow: 0 4px 0 var(--line); transition: transform .06s, box-shadow .06s;
  text-decoration: none; user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--sauce); color: var(--white); box-shadow: 0 4px 0 var(--sauce-deep); }
.btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--sauce-deep); }
.btn-ink { background: var(--ink); color: var(--white); box-shadow: 0 4px 0 #05082A; }
.btn-ink:active:not(:disabled) { box-shadow: 0 1px 0 #05082A; }
.btn-mustard { background: var(--mustard); color: var(--ink); box-shadow: 0 4px 0 var(--mustard-deep); }
.btn-mustard:active:not(:disabled) { box-shadow: 0 1px 0 var(--mustard-deep); }
.btn-mint { background: var(--mint); color: #05281E; box-shadow: 0 4px 0 var(--mint-deep); }
.btn-mint:active:not(:disabled) { box-shadow: 0 1px 0 var(--mint-deep); }
.btn-wide { width: 100%; }
.btn-big { min-height: 60px; font-size: 21px; border-radius: 18px; }
.btn-small { min-height: 42px; padding: 0 14px; font-size: 16px; border-radius: 12px; }
.btn-plain { background: none; box-shadow: none; color: var(--cobalt); padding: 0 8px; min-height: 44px; font-size: 17px; }
.btn-plain:active:not(:disabled) { transform: none; box-shadow: none; opacity: .6; }
.btn-danger-plain { color: var(--sauce-deep); }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn:not(.btn-primary):not(.btn-ink).is-busy::after { border-color: rgba(21,26,74,.25); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.iconbtn {
  width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255,255,255,.18); color: inherit;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.iconbtn svg { width: 24px; height: 24px; }
.iconbtn.on-light { background: var(--ground); }

/* ---------- form fields ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--white); font-size: 17px; font-weight: 600;
}
textarea.input { padding: 12px 16px; min-height: 76px; resize: vertical; }
.input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(36,71,249,.18); }
.input::placeholder { color: #9AA0C8; font-weight: 400; }
.hint { color: var(--muted); font-size: 15px; }
.formerror {
  background: #FFE7E3; color: #8C1A0D; border-radius: 12px; padding: 10px 14px; font-weight: 700;
  font-size: 15px; margin-bottom: 14px;
}

/* ---------- sign in / join: one cobalt screen ---------- */
.auth { min-height: 100dvh; background: var(--cobalt); color: var(--white); padding: 0 20px 40px; position: relative; overflow: hidden; }
.auth-inner { max-width: 440px; margin: 0 auto; position: relative; z-index: 1; }
.auth::before, .auth::after { content: ""; position: absolute; border-radius: 50%; }
.auth::before { width: 340px; height: 340px; background: var(--mustard); right: -150px; top: -130px; }
.auth::after { width: 260px; height: 260px; background: var(--sauce); left: -140px; bottom: -120px; }
.auth.is-join::before { width: 220px; height: 220px; right: -120px; top: -150px; }
.brand { padding: 44px 0 26px; }
.brand-mark { width: 92px; height: 92px; margin-bottom: 14px; }
.brand h1 { font-size: clamp(44px, 13vw, 60px); font-weight: 800; line-height: .9; }
.brand p { margin-top: 12px; font-size: 19px; font-weight: 600; opacity: .95; max-width: 24ch; }
.panel { background: var(--white); color: var(--ink); border-radius: 24px; padding: 22px 20px 20px; box-shadow: 0 8px 0 var(--cobalt-deep); }
.panel h2 { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.switchline { margin-top: 14px; text-align: center; font-size: 16px; }
.switchline button { background: none; border: 0; padding: 6px; color: var(--cobalt); font-weight: 800; text-decoration: underline; }

.code-input {
  font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: .3em; text-align: center;
  text-transform: uppercase; min-height: 68px; padding-left: .3em;
}
.rolepick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.rolepick label { position: relative; }
.rolepick input { position: absolute; opacity: 0; inset: 0; }
.rolepick span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 84px; border-radius: 16px; border: 2px solid var(--line); background: var(--white);
  font-family: var(--display); font-weight: 700; font-size: 18px; text-align: center;
}
.rolepick span small { font-family: var(--body); font-weight: 600; font-size: 12.5px; color: var(--muted); line-height: 1.2; }
.rolepick input:checked + span { border-color: var(--ink); background: var(--mustard); box-shadow: 0 4px 0 var(--mustard-deep); }
.rolepick input:checked + span small { color: var(--ink); }
.rolepick input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }

/* ---------- customer shell ---------- */
.shell { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
.shell.has-cart { padding-bottom: calc(var(--tabbar) + 104px + env(safe-area-inset-bottom)); }

.hdr { background: var(--cobalt); color: var(--white); padding: 22px 20px 26px; border-radius: 0 0 30px 30px; position: relative; overflow: hidden; }
.hdr::after { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; background: var(--mustard); right: -70px; top: -90px; }
.hdr > * { position: relative; z-index: 1; }
.hdr-school { font-weight: 800; font-size: 15px; opacity: .92; max-width: 70%; }
.hdr h1 { font-size: clamp(32px, 9.5vw, 42px); font-weight: 800; margin-top: 6px; max-width: 12ch; }
.pickup-chip {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 12px;
  border: 0; border-radius: 999px; background: var(--white); color: var(--ink); font-weight: 800; font-size: 16px;
  box-shadow: 0 4px 0 var(--cobalt-deep); text-align: left;
}
.pickup-chip svg { width: 22px; height: 22px; color: var(--cobalt); flex: none; }
.pickup-chip small { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); line-height: 1.1; }

.notice { margin: 16px 16px 0; padding: 14px 16px; border-radius: 18px; background: var(--mustard); font-weight: 700; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.notice.is-closed { background: #FFE7E3; color: #8C1A0D; }
.notice.is-test { background: var(--ink); color: var(--white); font-size: 15px; }
.notice p { flex: 1; }

.cats { display: flex; gap: 10px; padding: 20px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white);
  font-family: var(--display); font-weight: 700; font-size: 19px;
}
.cat[aria-selected="true"] { background: var(--ink); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px 16px 0; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 0; border: 0;
  border-radius: 22px; background: var(--white); overflow: hidden; box-shadow: 0 4px 0 var(--line);
  transition: transform .06s, box-shadow .06s;
}
.tile:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.tile-art { aspect-ratio: 1.25; display: flex; align-items: center; justify-content: center; }
.tile-art svg { width: 62%; height: auto; }
.tile-body { display: block; padding: 10px 14px 14px; }
.tile-name { display: block; font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.05; }
.tile-desc { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.25; margin-top: 3px; min-height: 2.5em; }
.price-tag {
  position: absolute; top: 10px; left: 10px; background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
  padding: 1px 10px 0; font-family: var(--display); font-weight: 700; font-size: 15px; transform: rotate(-4deg);
}
.tile:disabled { opacity: 1; }
.tile:disabled .tile-art { filter: grayscale(1); opacity: .45; }
.tile:disabled .tile-name, .tile:disabled .tile-desc { opacity: .5; }
.soldout { position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--white); border-radius: 999px; padding: 1px 10px 0; font-family: var(--display); font-weight: 700; font-size: 15px; }

.empty { text-align: center; padding: 48px 28px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }

/* sticky order bar + tab bar */
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%); width: min(528px, calc(100% - 32px));
  bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom)); z-index: 20;
}
.cartbar .btn { justify-content: space-between; padding: 0 18px; }
.cartbar .count { background: var(--white); color: var(--sauce-deep); border-radius: 999px; min-width: 30px; height: 30px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.cartbar .left { display: inline-flex; align-items: center; gap: 12px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--white); border-top: 2px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--tabbar); }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-weight: 800; font-size: 13px; position: relative; }
.tab svg { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--cobalt); }
.tab .dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 12px; height: 12px; border-radius: 50%; background: var(--sauce); border: 2px solid var(--white); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(21,26,74,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet {
  width: 100%; max-width: 560px; max-height: 94dvh; background: var(--white); border-radius: 28px 28px 0 0; display: flex; flex-direction: column; overflow: hidden;
  animation: rise .22s cubic-bezier(.2,.8,.2,1);
}
.sheet-scroll { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 0 20px 8px; }
.sheet-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 2px solid var(--ground); display: flex; gap: 12px; align-items: center; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sheet-head h2 { font-size: 26px; font-weight: 800; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .6; } }

.item-hero { margin: 0 -20px; padding: 14px 20px 16px; display: flex; gap: 16px; align-items: center; border-radius: 28px 28px 0 0; position: relative; }
.item-hero > svg { width: 112px; height: 112px; flex: none; }
.item-hero h2 { font-size: 32px; font-weight: 800; }
.item-hero p { font-size: 15.5px; margin-top: 4px; max-width: 26ch; }
.item-hero .iconbtn { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.7); }

.group { padding: 18px 0 2px; }
.group h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; }
.group h3 small { font-family: var(--body); font-weight: 700; font-size: 13.5px; color: var(--muted); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.seg button, .chip {
  min-height: 52px; border-radius: 16px; border: 2px solid var(--line); background: var(--white);
  font-family: var(--display); font-weight: 700; font-size: 18px; padding: 0 16px;
}
.seg button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 66px; line-height: 1.1; }
.seg button small { font-family: var(--body); font-weight: 700; font-size: 15px; color: var(--muted); }
.seg button[aria-pressed="true"], .chip[aria-pressed="true"] { border-color: var(--ink); background: var(--mustard); box-shadow: 0 4px 0 var(--mustard-deep); }
.seg button[aria-pressed="true"] small { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip small { font-family: var(--body); font-weight: 700; font-size: 13.5px; color: var(--muted); margin-left: 4px; }
.chip:disabled { opacity: .4; }

.stepline { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.stepline + .stepline { border-top: 2px solid var(--ground); }
.stepline b { font-family: var(--display); font-weight: 700; font-size: 19px; }
.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--ground); border-radius: 14px; }
.stepper button { width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--ink); color: var(--white); font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; display: flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.stepper button:disabled { background: #C6CBEA; }
.stepper output { min-width: 44px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 22px; }

/* ---------- pages (order, account) ---------- */
.pagehead { display: flex; align-items: center; gap: 10px; padding: 18px 16px 8px; }
.pagehead h1 { font-size: 30px; font-weight: 800; }
.card { background: var(--white); border-radius: 22px; padding: 16px 16px; margin: 12px 16px 0; }
.card h2 { font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.card > .hint { margin-top: -4px; margin-bottom: 10px; }

.line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.line + .line { border-top: 2px solid var(--ground); }
.line-art { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: none; }
.line-art svg { width: 44px; height: 44px; }
.line-main { flex: 1; min-width: 0; }
.line-name { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.1; }
.line-opts { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.line-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.line-price { font-family: var(--display); font-weight: 700; font-size: 19px; }
.stepper.small button { width: 36px; height: 36px; font-size: 22px; border-radius: 11px; }
.stepper.small output { min-width: 34px; font-size: 19px; }

.rowbtn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 6px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--white); text-align: left; font-weight: 800; }
.rowbtn small { display: block; font-weight: 600; color: var(--muted); font-size: 14px; }
.rowbtn .go { color: var(--cobalt); font-weight: 800; flex: none; }

.total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-weight: 800; font-size: 26px; padding-top: 4px; }
.paybox { margin: 16px 16px 0; }
.paynote { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 10px; }

/* the lunch bag: the one showpiece. A paper bag with the order written on it in pen. */
.bagwrap { padding: 8px 20px 0; }
.bag {
  position: relative; background: var(--bag); color: #3B2A14; padding: 34px 22px 24px; margin-top: 6px;
  clip-path: polygon(0 14px, 4% 0, 8% 14px, 12% 0, 16% 14px, 20% 0, 24% 14px, 28% 0, 32% 14px, 36% 0, 40% 14px, 44% 0, 48% 14px, 52% 0, 56% 14px, 60% 0, 64% 14px, 68% 0, 72% 14px, 76% 0, 80% 14px, 84% 0, 88% 14px, 92% 0, 96% 14px, 100% 0, 100% 100%, 0 100%);
  background-image: linear-gradient(90deg, rgba(0,0,0,.07) 0 2px, transparent 2px 100%), linear-gradient(90deg, transparent 0 calc(100% - 2px), rgba(0,0,0,.07) calc(100% - 2px) 100%);
  background-size: 26px 100%, 26px 100%; background-repeat: no-repeat; background-position: left, right;
  border-radius: 0 0 10px 10px;
}
.bag-fold { position: absolute; left: 0; right: 0; top: 46px; height: 2px; background: rgba(0,0,0,.09); }
.bag-num { font-family: var(--display); font-weight: 800; font-size: 76px; line-height: .8; color: var(--ink); margin-top: 26px; }
.bag-num small { display: block; font-family: var(--body); font-weight: 800; font-size: 14px; letter-spacing: 0; margin-bottom: 8px; color: #5C4423; }
.bag-pen { font-family: var(--pen); font-weight: 700; color: #1F2A7A; }
.bag-name { font-size: 40px; line-height: 1; margin-top: 16px; }
.bag-items { font-size: 27px; line-height: 1.12; margin-top: 12px; }
.bag-items li { margin-top: 6px; }
.bag-items ul, .bag-items { list-style: none; padding: 0; }
.bag-items small { display: block; font-size: 22px; opacity: .85; }
.bag-when { margin-top: 18px; padding-top: 14px; border-top: 2px dashed rgba(59,42,20,.35); font-weight: 800; font-size: 17px; display: flex; justify-content: space-between; gap: 12px; }
.stamp {
  position: absolute; right: 16px; top: 62px; padding: 6px 14px 4px; border: 4px solid currentColor; border-radius: 12px;
  font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; transform: rotate(9deg); color: var(--cobalt);
  background: rgba(255,255,255,.14); text-align: center;
}
.stamp.is-ready { color: #0A7A5B; animation: thump .45s cubic-bezier(.2,1.6,.4,1); }
.stamp.is-making { color: #9A5B00; }
.stamp.is-cancelled { color: var(--sauce-deep); }
.stamp.is-done { color: #5C4423; }
@keyframes thump { from { transform: rotate(9deg) scale(2); opacity: 0; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 16px 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 13px; height: 4px; background: var(--line); border-radius: 2px; }
.steps i { position: absolute; left: 12.5%; top: 13px; height: 4px; background: var(--mint); border-radius: 2px; transition: width .4s; }
.step { position: relative; text-align: center; font-weight: 800; font-size: 13.5px; color: var(--muted); }
.step::before { content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--white); border: 4px solid var(--line); position: relative; z-index: 1; }
.step.is-done::before { background: var(--mint); border-color: var(--mint); }
.step.is-now { color: var(--ink); }
.step.is-now::before { background: var(--mustard); border-color: var(--ink); }
.status-line { margin: 20px 20px 0; font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; text-align: center; }
.status-sub { text-align: center; color: var(--muted); margin: 6px 24px 0; }

.ordercard { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; border: 0; background: var(--white); border-radius: 20px; padding: 14px 16px; margin-top: 10px; box-shadow: 0 4px 0 var(--line); }
.ordercard:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.ordercard .num { font-family: var(--display); font-weight: 800; font-size: 30px; min-width: 58px; text-align: center; background: var(--ground); border-radius: 14px; padding: 6px 4px 2px; line-height: 1; }
.ordercard .what { flex: 1; min-width: 0; }
.ordercard .what b { display: block; font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.15; }
.ordercard .what span { color: var(--muted); font-size: 14.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 12px 1px; font-weight: 800; font-size: 13.5px; background: var(--ground); white-space: nowrap; }
.pill.is-ready { background: var(--mint); color: #05281E; }
.pill.is-making { background: var(--mustard); }
.pill.is-new { background: var(--cobalt); color: var(--white); }
.pill.is-cancelled { background: #FFE7E3; color: #8C1A0D; }
.pill.is-pre { background: #E4D2FF; color: #3B1C78; }

.kid { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; }
.kid + .kid { border-top: 2px solid var(--ground); }
.kid b { font-family: var(--display); font-size: 19px; font-weight: 700; }
.kid span { color: var(--muted); font-size: 15px; margin-left: 6px; }
.inline-form { display: grid; grid-template-columns: 1fr 110px; gap: 8px; margin-top: 10px; }
.inline-form .btn { grid-column: 1 / -1; }

/* time picker */
.hours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hours .chip, .mins .chip { padding: 0 4px; font-size: 17px; }
.daychips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.daychips::-webkit-scrollbar { display: none; }
.daychips .chip { flex: none; }

/* toast */
.toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: var(--white); border-radius: 16px; padding: 12px 18px; font-weight: 800; font-size: 16px;
  max-width: min(480px, calc(100% - 32px)); box-shadow: 0 6px 0 rgba(5,8,42,.35); animation: drop .2s ease-out; text-align: center;
}
.is-kitchen .toast { top: auto; bottom: calc(22px + env(safe-area-inset-bottom)); font-size: 19px; padding: 14px 22px; }
.toast.is-error { background: var(--sauce-deep); }
.toast.is-good { background: var(--mint-deep); }
@keyframes drop { from { transform: translate(-50%, -16px); opacity: 0; } }

.loading { min-height: 60dvh; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 800; }

/* ====================== canteen screen (iPad) ====================== */
.kitchen { min-height: 100dvh; background: #0E1240; color: var(--white); display: flex; flex-direction: column; }
.k-top { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--ink); border-bottom: 2px solid #262C6B; flex-wrap: wrap; }
.k-brand { display: flex; align-items: center; gap: 10px; margin-right: 6px; min-width: 0; }
.k-brand svg { width: 40px; height: 40px; flex: none; }
.k-brand b { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; display: block; }
.k-brand span { font-size: 13.5px; font-weight: 700; opacity: .8; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch; }
.k-nav { display: flex; gap: 6px; background: #0E1240; padding: 5px; border-radius: 16px; }
.k-nav button { border: 0; background: none; color: #B9C0F2; font-family: var(--display); font-weight: 700; font-size: 18px; min-height: 44px; padding: 0 16px; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; }
.k-nav button[aria-current="page"] { background: var(--white); color: var(--ink); }
.k-nav .badge { background: var(--sauce); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.k-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.k-clock { font-family: var(--display); font-weight: 700; font-size: 24px; white-space: nowrap; }
.k-open { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; min-height: 46px; padding: 0 16px 0 8px; font-family: var(--display); font-weight: 700; font-size: 17px; background: var(--mint); color: #05281E; }
.k-open::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.k-open.is-paused { background: var(--sauce); color: #fff; padding: 0 8px 0 16px; flex-direction: row-reverse; }
.k-open:disabled { cursor: default; }
.k-banner { background: var(--mustard); color: var(--ink); font-weight: 800; padding: 9px 18px; text-align: center; font-size: 15.5px; }
.k-banner.is-paused { background: var(--sauce); color: #fff; }

.board { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px 18px 24px; align-items: start; }
.col h2 { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; padding: 0 4px 10px; }
.col h2 span { background: #262C6B; border-radius: 999px; min-width: 32px; height: 32px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.col-new h2 span { background: var(--cobalt); }
.col-empty { border: 2px dashed #2F3682; border-radius: 20px; padding: 26px 16px; text-align: center; color: #8E96D6; font-weight: 700; }

.docket { background: var(--white); color: var(--ink); border-radius: 20px; padding: 14px 16px 16px; margin-bottom: 12px; border-top: 10px solid var(--cobalt); position: relative; }
.col-making .docket { border-top-color: var(--mustard); }
.col-ready .docket { border-top-color: var(--mint); }
.docket.is-fresh { animation: ring 1.1s ease-in-out 3; }
@keyframes ring { 50% { box-shadow: 0 0 0 8px rgba(255,198,46,.9); } }
.docket-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.docket-num { font-family: var(--display); font-weight: 800; font-size: 46px; line-height: .85; padding-top: 6px; }
.docket-time { text-align: right; }
.docket-time b { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 23px; background: var(--ground); border-radius: 12px; padding: 4px 10px 1px; line-height: 1.1; white-space: nowrap; }
.docket-time small { display: block; font-weight: 800; font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.docket-time.is-soon b { background: var(--mustard); }
.docket-time.is-late b { background: var(--sauce); color: #fff; }
.docket-time.is-late small { color: var(--sauce-deep); }
.docket-who { font-family: var(--display); font-weight: 700; font-size: 23px; line-height: 1.1; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.docket-items { list-style: none; padding: 0; margin: 10px 0 0; border-top: 2px solid var(--ground); }
.docket-items li { padding: 9px 0; border-bottom: 2px solid var(--ground); display: grid; grid-template-columns: 34px 1fr; gap: 6px; }
.docket-items .q { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.1; }
.docket-items b { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1; display: block; }
.docket-items span { display: block; font-weight: 700; font-size: 16px; color: #2D3470; }
.docket-items em { display: block; font-style: normal; font-weight: 800; font-size: 15px; background: #FFF1C2; border-radius: 8px; padding: 2px 8px; margin-top: 4px; }
.docket-note { margin-top: 10px; background: #FFF1C2; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 15.5px; }
.docket-acts { display: flex; gap: 10px; margin-top: 14px; }
.docket-acts .btn { flex: 1; }
.docket-acts .btn-plain { flex: none; }

.k-page { flex: 1; padding: 18px; max-width: 1100px; width: 100%; margin: 0 auto; }
.k-card { background: var(--white); color: var(--ink); border-radius: 22px; padding: 18px 20px; margin-bottom: 14px; }
.k-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.k-card h3 { font-size: 20px; font-weight: 700; margin: 16px 0 8px; }
.k-card .hint { margin-bottom: 12px; }
.k-days { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.k-days .chip { background: #1B2060; color: #fff; border-color: #2F3682; }
.k-days .chip[aria-pressed="true"] { background: var(--mustard); color: var(--ink); border-color: var(--mustard); box-shadow: none; }
.k-stats { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-end; }
.k-stats div b { display: block; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .9; }
.k-stats div span { font-weight: 800; color: var(--muted); font-size: 15px; }
.tally { display: flex; flex-wrap: wrap; gap: 8px; }
.tally span { background: var(--ground); border-radius: 12px; padding: 6px 12px 4px; font-weight: 800; }
.tally span b { font-family: var(--display); font-size: 20px; margin-right: 6px; }
table.daylist { width: 100%; border-collapse: collapse; }
.daylist th { text-align: left; font-size: 14px; color: var(--muted); padding: 6px 10px 6px 0; font-weight: 800; }
.daylist td { padding: 10px 10px 10px 0; border-top: 2px solid var(--ground); vertical-align: top; font-weight: 700; }
.daylist td.t { font-family: var(--display); font-weight: 800; font-size: 20px; white-space: nowrap; }
.daylist td.n { font-family: var(--display); font-weight: 800; font-size: 20px; }
.daylist td small { display: block; color: var(--muted); font-weight: 600; }

.setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.setrow + .setrow { border-top: 2px solid var(--ground); }
.setrow > div:first-child { flex: 1; min-width: 220px; }
.setrow b { font-family: var(--display); font-weight: 700; font-size: 19px; display: block; }
.setrow small { color: var(--muted); font-size: 15px; display: block; }
.setrow .input { width: auto; min-width: 120px; }
.setrow .pair { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bigcode { font-family: var(--display); font-weight: 800; font-size: 44px; letter-spacing: .18em; background: var(--mustard); border-radius: 16px; padding: 6px 18px 0; display: inline-block; }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 64px; height: 38px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #C6CBEA; transition: background .15s; }
.switch i::after { content: ""; position: absolute; width: 30px; height: 30px; left: 4px; top: 4px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--mint); }
.switch input:checked + i::after { transform: translateX(26px); }
.switch input:focus-visible + i { outline: 3px solid var(--cobalt); outline-offset: 2px; }
table.menuedit { width: 100%; border-collapse: collapse; }
.menuedit th { text-align: left; font-size: 14px; color: var(--muted); padding: 4px 8px 6px 0; font-weight: 800; }
.menuedit td { padding: 8px 8px 8px 0; border-top: 2px solid var(--ground); font-weight: 800; }
.menuedit td.nm { font-family: var(--display); font-size: 19px; font-weight: 700; }
.priceinput { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 0 10px; background: #fff; font-weight: 800; }
.priceinput input { border: 0; outline: 0; width: 66px; min-height: 44px; font-weight: 800; background: none; text-align: right; }
.priceinput:focus-within { border-color: var(--cobalt); }
.priceinput.is-saved { border-color: var(--mint); }

.k-modal { background: var(--white); color: var(--ink); border-radius: 26px; padding: 24px; width: min(560px, calc(100% - 32px)); margin: auto; animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.k-modal h2 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.k-modal p { margin-bottom: 14px; }
.k-modal .acts { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.k-modal .acts .btn { flex: 1; }
.scrim.is-center { align-items: center; }
.k-start { text-align: center; }
.k-start svg { width: 96px; height: 96px; margin: 0 auto 10px; }

@media (max-width: 900px) {
  .board { grid-template-columns: 1fr; }
  .k-clock { display: none; }
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
