:root, body.dark {
  --bg: #181412; --card: #221c18; --raised: #2d2520; --inset: #14100e; --ink: #f3ebe4; --muted: #b8a99b; --line: #3a2f27; --line-strong: #6b594d;
  --accent: #f59e0b; --accent-ink: #1a1208; --accent-soft: #ffc174; --glow: rgba(245,158,11,.25);
  --ok: #4ade80; --ok-bg: #12301c; --ok-solid: #15803d; --warn: #fbbf24; --warn-bg: #33260a; --bad: #ff8a80; --bad-bg: #3a1614; --bad-solid: #dc2626;
  --info-bg: #1b2340; --info: #a5b8ff;
  --radius: 16px; --shadow: 0 1px 0 rgba(255,255,255,.02), 0 6px 18px -8px rgba(0,0,0,.6); --shadow-lift: 0 12px 32px -8px rgba(10,8,7,.7), 0 2px 6px rgba(0,0,0,.4);
  --f-head: 'Epilogue', 'Plus Jakarta Sans', system-ui, sans-serif; --f-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-family: var(--f-body);
  color-scheme: dark;
}
@font-face { font-family: 'Epilogue'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/fonts/epilogue-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Epilogue'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/fonts/epilogue-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/jakarta-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/fonts/jakarta-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; font-size: 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--f-head); font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row { display: flex; gap: 8px; align-items: center; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 10px; }
.hidden { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.topbar h1 { font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { font-weight: 800; letter-spacing: .02em; color: var(--accent); }
.lang { display: inline-flex; gap: 2px; border: 1px solid var(--line-strong); background: var(--card); border-radius: 999px; padding: 3px; font-weight: 700; font-size: 13px; cursor: pointer; min-height: 40px; align-items: center; }
.lang span { padding: 6px 11px; border-radius: 999px; color: var(--muted); }
.lang span.on { background: var(--accent); color: var(--accent-ink); }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.banner { padding: 10px 16px; font-weight: 600; font-size: 14px; }
.banner.bad { background: var(--bad-solid); color: #fff; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.info { background: var(--info-bg); color: var(--info); }

.tabs { display: flex; gap: 4px; padding: 8px 16px 0; font-family: var(--f-body); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 53px; z-index: 15; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }
.tabs .count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }

main { padding: 12px 16px 120px; max-width: 760px; margin: 0 auto; }
main.wide { max-width: 1200px; }

.btn { border: 1px solid var(--line-strong); background: var(--card); border-radius: 999px; padding: 12px 16px; font-weight: 700; cursor: pointer; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.btn.primary:active { box-shadow: 0 0 18px 2px var(--glow); }
.btn:focus-visible, .chip-link:focus-visible, .card-item:focus-visible, .lang:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.ok { background: var(--ok-solid); border-color: var(--ok-solid); color: #fff; }
.btn.bad { background: var(--bad-solid); border-color: var(--bad-solid); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 1px solid var(--line-strong); background: var(--card); width: 44px; height: 44px; border-radius: 999px; cursor: pointer; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.link { background: none; border: 0; color: var(--accent-soft); font-weight: 600; cursor: pointer; padding: 4px 0; font-size: 14px; }
.link.bad { color: var(--bad); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 12px; position: sticky; top: 53px; background: var(--bg); z-index: 10; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-link { white-space: nowrap; padding: 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-strong); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.chip-link.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--inset); border: 1px solid var(--line-strong); color: var(--ink); font-weight: 500; margin: 2px 4px 0 0; }
.al-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 6px; font-weight: 600; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); font-weight: 700; white-space: nowrap; }
.tag.req { background: var(--info-bg); color: var(--info); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.info { background: var(--info-bg); color: var(--info); }

.menu-sec { scroll-margin-top: 200px; margin-bottom: 8px; }
.menu-sec h3 { font-size: 20px; margin: 22px 0 12px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; padding-top: 26px; margin-bottom: 14px; }
.sec-head h3 { flex: 1; margin: 0; font-size: 22px; display: flex; align-items: center; gap: 12px; }
.sec-head h3::before { content: ''; width: 6px; height: 20px; border-radius: 3px; background: var(--accent); flex: none; }
.sec-count { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.card-item { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; cursor: pointer; box-shadow: var(--shadow); color: var(--ink); }
.card-item:active { box-shadow: inset 0 1px 0 rgba(245,158,11,.2), var(--shadow); border-color: var(--line-strong); }
.card-item.out { cursor: not-allowed; }
.card-item.out .ci-main, .card-item.out .ci-foot { opacity: .62; }
.card-item.out .ci-name { text-decoration: line-through; text-decoration-thickness: 2px; }
.card-item.out .ci-photo img { filter: grayscale(1); }
.ci-main { display: flex; gap: 14px; align-items: stretch; }
.ci-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-name { font-family: var(--f-head); font-weight: 700; font-size: 18px; line-height: 1.25; }
.ci-desc { color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-meta { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 8px; }
.ci-meta .price { flex: 1; }
.price { font-weight: 700; white-space: nowrap; font-family: var(--f-head); }
.card-item .price { color: var(--accent-soft); font-size: 18px; }
.ci-photo { position: relative; flex: 0 0 104px; height: 104px; border-radius: 12px; overflow: hidden; background: var(--inset); border: 1px solid var(--line-strong); }
.ci-photo img { width: 100%; height: 100%; object-fit: cover; }
.add-dot { width: 44px; height: 44px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 4px 14px -4px var(--glow); }
.add-dot.off { width: auto; padding: 0 14px; background: var(--raised); color: var(--muted); font-size: 13px; font-weight: 700; box-shadow: none; }
.out-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--bad); border: 1px solid var(--bad); border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
.out-pill::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.ci-foot { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.allergens { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; }
.ci-foot .allergens { margin: 0; }
.ico { display: inline-flex; line-height: 0; }

.row-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; }
.row-item.out { opacity: .55; }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 40%); z-index: 30; }
.cartbar .btn { width: 100%; max-width: 728px; margin: 0 auto; display: flex; justify-content: space-between; }
.order-pill.btn.primary { background: var(--bg); color: var(--ink); border: 1.5px solid var(--accent); padding: 8px 8px 8px 10px; min-height: 64px; gap: 12px; box-shadow: 0 16px 36px -4px rgba(0,0,0,.8), 0 0 20px 2px var(--glow); }
.order-pill .bag { position: relative; width: 44px; height: 44px; border-radius: 999px; background: #3a2a14; color: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.order-pill .bag-n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.order-pill .op-text { flex: 1; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.order-pill .op-k { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.order-pill .op-v { font-family: var(--f-head); font-size: 19px; font-weight: 800; }
.order-pill .op-go { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 18px; min-height: 48px; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }

.guest-top { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.guest-top .top-ico { color: var(--accent-soft); }
.guest-top h1 { font-size: 22px; color: var(--accent-soft); }
.top-title { font-family: var(--f-head); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--accent-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.icon-btn { color: var(--ink); }
.top-place { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.field-hint { margin: 6px 0 14px; }
.top-sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.live-dot { width: 7px; height: 7px; border-radius: 999px; background: #34d399; }
.top-sub.off .live-dot { background: var(--bad); }
.seg-nav.tabs { padding: 10px 16px 8px; border-bottom: 0; gap: 6px; }
.seg-nav.tabs::before { content: none; }
.seg-nav.tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--card); color: var(--ink); font-size: 15px; padding: 8px 10px; }
.seg-nav.tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 800; }
.seg-nav .seg-label { overflow: hidden; text-overflow: ellipsis; }
.seg-nav .count { background: var(--inset); color: var(--accent-soft); margin: 0; }
.seg-nav button.on .count { background: var(--accent-ink); color: var(--accent-soft); }
.guest-main { padding-bottom: 130px; }

.sheet-wrap { position: fixed; inset: 0; background: rgba(8,6,5,.7); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--raised); box-shadow: var(--shadow-lift); width: 100%; max-width: 640px; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out; }
.sheet.wide { max-width: 900px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; font-size: 18px; }
.sheet-body { overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet-foot { position: sticky; bottom: -16px; background: var(--raised); padding: 12px 0 4px; margin-top: 12px; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 18px; } }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

.item-sheet .hero { width: calc(100% + 32px); margin: -14px -16px 12px; max-height: 220px; object-fit: cover; }
.group { border: 0; padding: 0; margin: 16px 0 0; }
.group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; padding: 4px 0; border-radius: 8px; }
.group-head.need { background: var(--bad-bg); padding: 4px 8px; }
.group-head.need .tag { background: var(--bad-solid); color: #fff; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 11px 14px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; margin-bottom: 6px; cursor: pointer; }
.choice span:nth-child(2) { flex: 1; }
.choice input { width: 22px; height: 22px; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--raised); }
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea, input.inp, select.inp { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--inset); }
.field input:focus, .field select:focus, .field textarea:focus, input.inp:focus, select.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--glow); }
.qty-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 14px; }
.qty-n { font-size: 20px; font-weight: 800; font-family: var(--f-head); min-width: 20px; text-align: center; }
.allergen-row { margin: 8px 0; font-size: 14px; }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line.out { background: var(--bad-bg); margin: 0 -8px; padding: 12px 8px; border-radius: 8px; }
.line.voided .grow { text-decoration: line-through; color: var(--muted); }
.line.sel { background: var(--info-bg); margin: 0 -8px; padding: 12px 8px; border-radius: 8px; }
.line-side { text-align: right; }
.line-actions { display: flex; gap: 10px; justify-content: flex-end; }
.who { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.totals { width: 100%; border-collapse: collapse; margin-top: 8px; }
.totals td { padding: 4px 0; }
.totals td:last-child { text-align: right; font-weight: 600; }
.totals tr.big td { font-size: 19px; font-weight: 800; font-family: var(--f-head); border-top: 1px solid var(--line); padding-top: 8px; }

.seg { display: flex; background: var(--inset); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px 6px; border-radius: 999px; font-weight: 700; cursor: pointer; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.tipgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.tipgrid button { border: 1px solid var(--line-strong); background: var(--card); border-radius: 999px; min-height: 44px; padding: 10px 4px; font-weight: 700; cursor: pointer; }
.tipgrid button.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

.status-steps { display: flex; justify-content: space-between; margin: 16px 0; position: relative; }
.status-steps .step { flex: 1; text-align: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.status-steps .dot { width: 26px; height: 26px; border-radius: 999px; background: var(--line); margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.status-steps .on .dot { background: var(--ok-solid); }
.status-steps .on { color: var(--ink); }

.toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 520px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; pointer-events: auto; }
.toast.ok { background: var(--ok-solid); color: #fff; }
.toast.bad { background: var(--bad-solid); color: #fff; }
.toast.ready { background: var(--ok-solid); color: #fff; font-size: 18px; padding: 16px; }
.toast.warn { background: #b45309; color: #fff; }
.toast.out { opacity: 0; transform: translateY(-10px); }

.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 20px auto; }
.pinpad button { height: 64px; font-size: 24px; font-weight: 700; font-family: var(--f-head); border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); cursor: pointer; }
.pindots { display: flex; justify-content: center; gap: 12px; margin: 20px 0; }
.pindots span { width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--muted); }
.pindots span.on { background: var(--accent); border-color: var(--accent); }

.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.tile { position: relative; border: 2px solid var(--line); color: var(--ink); background: var(--card); border-radius: 14px; padding: 10px; min-height: 96px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.tile .lbl { font-size: 24px; font-weight: 800; font-family: var(--f-head); }
.tile.open { border-color: var(--accent); background: var(--raised); }
.tile.ready { border-color: var(--ok); background: var(--ok-bg); animation: pulse 1.6s infinite; }
.tile.alert { border-color: var(--bad); background: var(--bad-bg); }
.tile.notmine { opacity: .55; }
.tile .badges { display: flex; flex-wrap: wrap; gap: 3px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(74,222,128,.3); } }
.area-h { margin: 16px 0 8px; font-size: 14px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }

table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.grid th { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
table.grid td.num, table.grid th.num { text-align: right; white-space: nowrap; }
table.grid tfoot td { font-weight: 800; border-top: 2px solid var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi .v { font-size: 24px; font-weight: 800; font-family: var(--f-head); color: var(--accent-soft); }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; }

.kds-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.kds-head h1 { font-size: 24px; flex: 1; }
.kds-clock { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 12px; align-items: start; }
.ticket { background: var(--card); border: 1px solid var(--line); border-radius: 16px; border-top: 8px solid var(--muted); overflow: hidden; }
.ticket.new { border-color: #3b82f6; }
.ticket.fresh { animation: flash 1s 3; }
.ticket.started { border-color: var(--warn); }
.ticket.late { border-color: var(--bad); }
.ticket .th { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-bottom: 1px dashed var(--line); }
.ticket .tt { font-size: 26px; font-weight: 800; font-family: var(--f-head); }
.ticket .age { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket .late-age { color: var(--bad); }
.ticket ul { list-style: none; margin: 0; padding: 8px 12px; }
.ticket li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.ticket li:last-child { border: 0; }
.ticket li.void { text-decoration: line-through; color: var(--muted); }
.ticket .q { font-weight: 900; margin-right: 6px; }
.ticket .mod { display: block; font-size: 15px; color: var(--warn); font-weight: 700; padding-left: 26px; }
.ticket .mod.rm { color: var(--bad); text-transform: uppercase; }
.ticket .nt { display: block; font-size: 15px; padding-left: 26px; font-style: italic; color: var(--info); }
.ticket .tf { display: flex; gap: 8px; padding: 10px 12px; }
.ticket .tf .btn { flex: 1; min-height: 56px; font-size: 18px; }
.ticket .meta { font-size: 13px; color: var(--muted); padding: 0 12px 6px; }
@keyframes flash { 50% { box-shadow: 0 0 0 6px rgba(59,130,246,.6); } }
.done-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px; border-top: 1px solid var(--line); }
.done-strip .d { background: var(--card); border-radius: 10px; padding: 8px 10px; white-space: nowrap; font-size: 14px; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); color: #fff; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px; cursor: pointer; }
.overlay h2 { font-size: 28px; }
.big-off { position: fixed; inset: auto 0 0 0; background: var(--bad-solid); color: #fff; font-size: 22px; font-weight: 800; text-align: center; padding: 14px; z-index: 50; }

.board { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.board section { padding: 24px; }
.board h2 { font-size: 34px; margin-bottom: 16px; }
.board .nums { display: flex; flex-wrap: wrap; gap: 14px; }
.board .n { font-size: 56px; font-weight: 800; font-family: var(--f-head); padding: 8px 18px; border-radius: 14px; background: var(--card); }
.board .ready .n { background: var(--ok-solid); color: #fff; }

.big-no { font-size: 72px; font-weight: 800; font-family: var(--f-head); color: var(--accent-soft); text-align: center; letter-spacing: -.02em; }
.ready-hero { background: var(--ok-solid); color: #fff; border-radius: 18px; padding: 24px; text-align: center; margin: 12px 0; }
.ready-hero h2 { font-size: 28px; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 16px; }
.qr-card { border: 2px dashed #999; border-radius: 12px; padding: 16px; text-align: center; break-inside: avoid; background: #fff; color: #000; }
.qr-card img { width: 180px; height: 180px; margin: 8px auto; }
@media print { .noprint { display: none !important; } body { background: #fff; } }
.editor-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.editor-row img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--line); }
.editor-row .price-in { width: 84px; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 10px; text-align: right; background: var(--inset); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.switch input { width: 40px; height: 22px; appearance: none; background: var(--line-strong); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 999px; background: #fff; top: 2px; left: 2px; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked { background: var(--bad-solid); }
.switch input:checked::after { left: 20px; }
.switch.good input:checked { background: var(--ok-solid); }
.optgroup-ed { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 10px; background: var(--card); }
.optgroup-ed .row input { padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 10px; min-width: 0; background: var(--inset); }
.daypick { display: flex; gap: 4px; flex-wrap: wrap; }
.daypick label { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; cursor: pointer; background: var(--card); }
.daypick input { margin-right: 4px; }
.card { overflow-x: auto; }
.row.wrap > .btn.grow { flex: 1 1 40%; }
