:root {
  --ink: #172554;
  --muted: #64748b;
  --cream: #fff7ed;
  --paper: #ffffff;
  --orange: #c2410c;
  --orange-dark: #c2410c;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --line: #e2e8f0;
  --shadow: 0 12px 35px rgba(23, 37, 84, .11);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 70px; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: #f8fafc; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; }
button, input, textarea { font: inherit; }
button { touch-action: manipulation; }
button:disabled { opacity: .5; cursor: not-allowed; }
select { font: inherit; }

.customer-notices { width: min(720px, 100%); margin: 0 auto; padding: 16px 16px 0; }
.customer-notices p:empty { display: none; }
.notice-card { margin-bottom: 12px; padding: 16px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; line-height: 1.65; }
.notice-card p { margin: 6px 0; }
.notice-card small { display: block; color: #475569; }
.notice-card.warning { background: #fff7ed; border-color: #fb923c; }
.cancel-order-button { min-height: 48px; margin: 18px 0; padding: 10px; color: #991b1b; }
.connection-status { margin: 6px 0; font-size: 13px; line-height: 1.6; }
.staff-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 14px; background: #1e293b; border-radius: 14px; }
.staff-tools label { display: flex; align-items: center; gap: 8px; }
.staff-tools select { min-height: 42px; border-radius: 8px; background: #fff; color: #172554; }
.staff-tools p, .staff-tools small { flex-basis: 100%; margin: 0; }
.staff-tools small { color: #cbd5e1; line-height: 1.6; }
.staff-body .error-message { color: #fca5a5; }
.shop-controls:not(:empty) { margin-bottom: 14px; padding: 14px; color: #172554; background: #fff7ed; border: 1px solid #fdba74; border-radius: 14px; }
.shop-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.shop-controls small { display: block; line-height: 1.6; }
.danger-button { min-height: 44px; padding: 8px 14px; background: #b91c1c; color: white; border: 0; border-radius: 10px; font-weight: 700; }
.timeout-controls { margin-top: 12px; padding-top: 12px; border-top: 1px solid #fed7aa; }
.timeout-controls input { width: 74px; min-height: 42px; padding: 4px; }
.order-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.order-filter input { width: 140px; min-height: 42px; padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; }
.kitchen-totals { padding: 16px; margin-bottom: 18px; color: #172554; background: #e0f2fe; border-radius: 16px; }
.kitchen-totals h2 { margin: 0 0 6px; font-size: 20px; }
.kitchen-totals p { font-size: 12px; line-height: 1.6; }
.kitchen-totals table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.kitchen-totals th, .kitchen-totals td { padding: 9px 4px; border-bottom: 1px solid #bae6fd; text-align: right; }
.kitchen-totals th:first-child, .kitchen-totals td:first-child { text-align: left; }
.deadline-status { padding: 10px; margin: 8px 0; background: #f1f5f9; border-radius: 10px; }
.deadline-status.overdue { background: #fff7ed; border: 2px solid #f97316; }
.deadline-status small { display: block; margin: 6px 0; line-height: 1.5; }
.menu-card.sold-out { background: #f1f5f9; }

.hero { position: relative; overflow: hidden; padding: 38px max(20px, calc((100% - 680px)/2)) 38px; color: var(--ink); background: linear-gradient(135deg, #ffedd5, #fffaf5 55%, #fed7aa); border-bottom: 1px solid #fed7aa; }
.hero::after { content: "☕"; position: absolute; right: max(18px, calc((100% - 680px)/2)); bottom: -25px; font-size: 116px; opacity: .11; transform: rotate(-9deg); }
.hero h1, .staff-header h1 { margin: 5px 0 8px; font-size: clamp(28px, 7vw, 42px); letter-spacing: -.04em; }
.hero p { max-width: 680px; margin: 0; line-height: 1.7; color: #7c2d12; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .74; }
.order-flow { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 22px 1fr 22px 1fr; align-items: center; width: min(680px, calc(100% - 32px)); margin: -17px auto 8px; padding: 11px 14px; background: white; border: 1px solid #fed7aa; border-radius: 16px; box-shadow: 0 8px 24px rgba(124,45,18,.1); }
.order-flow div { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 800; }
.order-flow b { display: grid; place-items: center; width: 22px; height: 22px; color: white; background: var(--orange); border-radius: 50%; }
.order-flow i { height: 1px; background: #fdba74; }
.category-nav { position: sticky; z-index: 4; top: 0; display: flex; gap: 8px; overflow-x: auto; width: 100%; padding: 9px max(16px, calc((100% - 688px)/2)); background: rgba(248,250,252,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); scrollbar-width: none; }
.category-nav:empty { display: none; }
.category-nav a { flex: 0 0 auto; padding: 8px 14px; color: #7c2d12; background: white; border: 1px solid #fed7aa; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 800; }
.page { width: min(720px, 100%); margin: 0 auto; padding: 18px 16px 120px; }
.loading { padding: 45px 0; text-align: center; color: var(--muted); }

.menu-section { margin-bottom: 30px; }
.menu-section { scroll-margin-top: 66px; }
.menu-section h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 19px; }
.menu-section h2 small { color: var(--muted); font-size: 11px; font-weight: 600; }
.menu-list { display: grid; gap: 10px; }
.menu-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; min-height: 92px; padding: 15px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 4px 16px rgba(23,37,84,.05); }
.menu-emoji { display: grid; place-items: center; width: 46px; height: 46px; font-size: 28px; background: var(--cream); border-radius: 14px; }
.menu-info h3 { margin: 0 0 5px; font-size: 16px; }
.price { color: var(--orange-dark); font-weight: 800; }
.price small { color: var(--muted); font-weight: 600; }
.stock-note { display: inline-block; margin-top: 5px; padding: 2px 7px; color: #9a3412; background: #ffedd5; border-radius: 999px; font-size: 10px; font-weight: 800; }
.stepper { display: grid; grid-template-columns: 38px 28px 38px; align-items: center; text-align: center; }
.stepper button { width: 38px; height: 38px; padding: 0; color: var(--ink); background: #eff6ff; border: 0; border-radius: 50%; font-size: 21px; font-weight: 700; }
.stepper b { font-size: 17px; }

.cart-bar { position: fixed; z-index: 10; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; gap: 12px; width: min(696px, calc(100% - 24px)); margin: 0 auto; padding: 12px 12px 12px 16px; color: white; background: var(--ink); border-radius: 18px; box-shadow: 0 16px 40px rgba(23,37,84,.3); }
.cart-bar > div { display: grid; grid-template-columns: auto auto; gap: 0 10px; align-items: baseline; }
.cart-count { font-size: 12px; opacity: .72; }
.cart-bar strong { font-size: 21px; }
.cart-bar small { grid-column: 1 / -1; color: #fed7aa; }
.primary-button { min-height: 46px; padding: 0 18px; color: #fff; background: var(--orange); border: 0; border-radius: 13px; font-weight: 800; cursor: pointer; }
.primary-button:disabled { opacity: .55; }
.wide { width: 100%; }
.secondary-button { color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.secondary-button.wide { min-height: 46px; padding: 8px 12px; margin-top: 8px; }
.small { min-height: 38px; padding: 0 12px; }

.sheet { width: min(640px, 100%); max-height: 88dvh; margin: auto auto 0; padding: 23px 18px max(24px, env(safe-area-inset-bottom)); border: 0; border-radius: 24px 24px 0 0; color: var(--ink); }
.sheet::backdrop, .pin-dialog::backdrop { background: rgba(15, 23, 42, .62); backdrop-filter: blur(3px); }
.sheet h2 { margin: 4px 0 18px; }
.close-button { position: absolute; top: 16px; right: 16px; }
.icon-button { width: 38px; height: 38px; padding: 0; color: var(--ink); background: #f1f5f9; border: 0; border-radius: 50%; font-size: 24px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cart-item small { display: block; margin-top: 4px; color: var(--muted); }
.compact { grid-template-columns: 34px 26px 34px; }
.compact button { width: 34px; height: 34px; }
.field-label { display: block; margin: 20px 0 7px; font-size: 13px; font-weight: 700; }
.text-input { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 16px; }
.total-box { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; margin: 18px 0 8px; padding: 16px; background: var(--cream); border-radius: 14px; }
.total-box strong { font-size: 25px; }
.total-box b { grid-column: 1 / -1; color: var(--orange-dark); text-align: right; }
.hint, .auto-update, .admin-hint { color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }
.error-message { color: var(--red); font-weight: 700; text-align: center; }

.status-page { padding-top: 20px; }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-weight: 700; }
.number-card { padding: 24px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.number-card.is-ready { color: white; background: linear-gradient(145deg, #16a34a, #15803d); }
.order-number { margin: 2px 0 8px; font-size: clamp(76px, 25vw, 130px); font-weight: 900; letter-spacing: .04em; line-height: 1; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-unpaid { color: #9a3412; background: #ffedd5; }
.status-paid { color: #1e40af; background: #dbeafe; }
.status-preparing { color: #6b21a8; background: #f3e8ff; }
.status-ready { color: #166534; background: #dcfce7; }
.status-completed { color: #475569; background: #e2e8f0; }
.status-cancelled { color: #991b1b; background: #fee2e2; }
.guidance-card { display: grid; gap: 5px; margin: 15px 0; padding: 17px; background: white; border-left: 5px solid var(--orange); border-radius: 14px; box-shadow: 0 5px 18px rgba(23,37,84,.06); }
.guidance-card span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.guidance-card.status-ready { border-color: var(--green); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); margin: 28px 0; padding: 0; list-style: none; }
.progress li { position: relative; padding-top: 24px; color: #94a3b8; font-size: 10px; font-weight: 700; text-align: center; }
.progress li::before { content: ""; position: absolute; z-index: 2; top: 0; left: 50%; width: 15px; height: 15px; transform: translateX(-50%); background: #cbd5e1; border: 4px solid #f8fafc; border-radius: 50%; }
.progress li::after { content: ""; position: absolute; top: 7px; right: 50%; width: 100%; height: 3px; background: #cbd5e1; }
.progress li:first-child::after { display: none; }
.progress li.done { color: var(--blue); }
.progress li.done::before, .progress li.done::after { background: var(--blue); }
.progress li.current::before { box-shadow: 0 0 0 5px #dbeafe; }
.receipt-card { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.receipt-card h2 { margin: 0 0 14px; font-size: 17px; }
.receipt-card > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.receipt-card hr { border: 0; border-top: 1px solid var(--line); }
.receipt-total strong { font-size: 21px; }
.ticket-emphasis { justify-content: center !important; margin-top: 7px; color: var(--orange-dark); background: var(--cream); border-radius: 10px; font-weight: 900; }
.order-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.staff-body { min-height: 100vh; color: #e2e8f0; background: #0f172a; }
.staff-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 16px 12px; background: #172554; }
.staff-header h1 { margin-bottom: 0; font-size: 26px; }
.staff-nav { position: sticky; z-index: 5; top: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow-x: auto; padding: 0 8px; background: #172554; border-bottom: 1px solid #334155; }
.staff-nav a { position: relative; padding: 13px 4px; color: #b7c5d9; white-space: nowrap; text-align: center; text-decoration: none; font-size: 13px; font-weight: 800; border-bottom: 3px solid transparent; }
.staff-nav a.active { color: white; border-color: #fb923c; }
.staff-main { width: min(1100px, 100%); margin: 0 auto; padding: 16px; }
.summary { display: flex; align-items: baseline; gap: 7px; min-height: 42px; color: #94a3b8; }
.summary b { color: #fff; font-size: 30px; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.staff-order { overflow: hidden; padding: 16px; color: var(--ink); background: white; border-top: 6px solid #94a3b8; border-radius: 18px; }
.status-border-unpaid { border-color: var(--orange); }
.status-border-paid { border-color: var(--blue); }
.status-border-preparing { border-color: #9333ea; }
.status-border-ready { border-color: var(--green); }
.order-card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.order-card-head small { display: block; color: var(--muted); font-weight: 700; }
.order-card-head strong { font-size: 43px; line-height: 1; font-variant-numeric: tabular-nums; }
.order-meta { display: grid; justify-items: end; gap: 7px; }
.order-meta time { color: var(--muted); font-size: 12px; }
.staff-items { padding: 11px 0; }
.staff-items > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 17px; }
.staff-items strong { font-size: 20px; }
.staff-note { padding: 10px; color: #7c2d12; background: var(--cream); border-radius: 10px; font-size: 13px; font-weight: 700; }
.ticket-check { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: 12px; color: #fff; background: var(--ink); border-radius: 12px; }
.ticket-check strong { font-size: 31px; }
.ticket-check small { grid-column: 1 / -1; color: #fdba74; text-align: right; }
.staff-action { width: 100%; min-height: 54px; margin-top: 12px; color: white; border: 0; border-radius: 12px; font-size: 17px; font-weight: 900; }
.staff-action.primary { background: var(--blue); }
.staff-action.success { background: var(--green); }
.cancel-link { width: 100%; margin-top: 8px; padding: 7px; color: #94a3b8; background: transparent; border: 0; font-size: 12px; text-decoration: underline; }
.empty-state { padding: 42px 20px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 18px; }
.empty-state b { font-size: 18px; }
.empty-state p { color: var(--muted); }
.dark-empty { color: #e2e8f0; background: #1e293b; border-color: #334155; }
.loading.dark { color: #94a3b8; }
.pin-dialog { width: min(380px, calc(100% - 32px)); padding: 24px; color: var(--ink); border: 0; border-radius: 18px; }
.pin-dialog h2 { margin-top: 0; }
.pin-input { margin: 10px 0; letter-spacing: .15em; text-align: center; font-size: 20px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translateX(-50%); min-width: 240px; padding: 13px 18px; color: white; background: #166534; border-radius: 12px; text-align: center; font-weight: 800; box-shadow: var(--shadow); }
.admin-list { display: grid; gap: 10px; }
.admin-item { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 14px; color: var(--ink); background: white; border-radius: 15px; }
.admin-item small { display: block; margin-top: 3px; color: var(--muted); }
.admin-item.sold-out { opacity: .62; }
.availability { min-height: 42px; padding: 0 13px; border: 0; border-radius: 11px; font-weight: 800; }
.availability.on { color: #166534; background: #dcfce7; }
.availability.off { color: #991b1b; background: #fee2e2; }

.analytics-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px; color: var(--ink); background: white; border-radius: 14px; }
.analytics-controls label { font-size: 13px; font-weight: 800; }
.analytics-controls input { min-height: 38px; padding: 6px 9px; color: var(--ink); background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.metric-grid article { display: grid; gap: 4px; min-height: 108px; padding: 16px; color: var(--ink); background: white; border-radius: 15px; }
.metric-grid span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric-grid strong { align-self: end; font-size: clamp(22px, 4vw, 31px); }
.metric-grid small { color: var(--muted); font-size: 11px; }
.analytics-panel { margin-bottom: 14px; padding: 17px; color: var(--ink); background: white; border-radius: 16px; }
.analytics-panel h2 { margin: 0 0 14px; font-size: 17px; }
.hour-chart { display: grid; gap: 12px; }
.hour-row { display: grid; grid-template-columns: 48px minmax(90px, 1fr) 80px 80px; gap: 9px; align-items: center; font-size: 12px; }
.hour-row time { color: var(--muted); font-weight: 800; }
.hour-row > b { text-align: right; }
.hour-row > small { color: var(--muted); text-align: right; }
.hour-track { overflow: hidden; height: 11px; background: #e2e8f0; border-radius: 999px; }
.hour-track span { display: block; height: 100%; background: linear-gradient(90deg, #f97316, #fb923c); border-radius: inherit; }
.analytics-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.analytics-table { display: grid; }
.analytics-table > div { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.analytics-table > div:last-child { border-bottom: 0; }
.analytics-table small { min-width: 76px; color: var(--muted); text-align: right; }
.order-history { max-height: 420px; overflow: auto; }
.order-history > div { grid-template-columns: 44px 70px 1fr auto; }
.order-history time { color: var(--muted); }
.analytics-empty { margin: 25px 0; color: var(--muted); text-align: center; }

.setup-body { background: #f8fafc; }
.setup-hero { color: white; background: linear-gradient(145deg, #172554, #1e3a8a); border: 0; }
.setup-hero p { color: #bfdbfe; }
.setup-grid { width: min(920px, 100%); display: grid; gap: 16px; padding-bottom: 40px; }
.setup-card { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 6px 22px rgba(23,37,84,.06); }
.setup-card img { width: 170px; height: 170px; image-rendering: pixelated; }
.setup-card h2 { margin: 0 0 6px; }
.setup-card p { color: var(--muted); line-height: 1.6; }
.link-button { display: inline-flex; align-items: center; text-decoration: none; }
.setup-card code { display: block; overflow-wrap: anywhere; margin-top: 12px; color: var(--muted); }

/* Product details, inventory, corrections and attention indicators. */
:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.counter-entry { margin: 16px 0 24px; }
.counter-entry p { color: #cbd5e1; font-size: 12px; line-height: 1.7; }
.counter-product { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e2e8f0; padding: 12px 0; }
.counter-products span { min-width: 0; }
.counter-products b, .counter-products small { display: block; overflow-wrap: anywhere; }
.counter-products small { margin-top: 5px; color: #475569; }
.counter-stepper { display: grid; grid-template-columns: 42px 38px 42px; align-items: center; flex: 0 0 auto; }
.counter-stepper button { width: 42px; height: 42px; padding: 0; color: #172554; background: #dbeafe; border: 0; border-radius: 50%; font-size: 22px; font-weight: 900; }
.counter-stepper button:disabled { opacity: .4; }
.counter-qty { width: 38px; min-height: 42px; padding: 0; color: var(--ink); background: transparent; border: 0; text-align: center; font-size: 18px; font-weight: 900; appearance: textfield; }
.counter-qty::-webkit-inner-spin-button { appearance: none; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dialog-actions button { min-height: 46px; }
.counter-tag { color: #1e40af; font-size: 12px; font-weight: 700; }
.product-name { padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; font-weight: 800; cursor: pointer; }
.detail-link { padding: 8px 0; border: 0; background: transparent; color: #9a3412; font-size: 12px; text-align: left; text-decoration: underline; cursor: pointer; }
.menu-card { position: relative; }
.menu-card.is-popular { border: 2px solid #ca8a04; margin-top: 10px; padding-top: 23px; }
.popular-pill { position: absolute; top: -11px; left: 16px; padding: 3px 9px; color: #713f12; background: #fef3c7; border: 1px solid #eab308; border-radius: 6px; font-size: 11px; font-weight: 800; }
.sold-out-label { display: block; text-align: left; font-size: 12px; }
.detail-emoji { display: grid; place-items: center; width: 74px; height: 74px; margin: 8px 0 16px; background: #fff7ed; border-radius: 22px; font-size: 43px; }
.detail-category { color: #9a3412; font-size: 12px; font-weight: 800; }
.detail-description { line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-price { font-size: 28px; font-weight: 900; color: #9a3412; }
.detail-price small { display: block; font-size: 13px; }
.product-facts { padding: 18px; background: #f8fafc; border-radius: 14px; font-size: 13px; }
.product-facts dt { font-weight: 800; margin: 12px 0 4px; }
.product-facts dt:first-child { margin-top: 0; }
.product-facts dd { margin: 0; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-header-actions { display: flex; align-items: center; flex-shrink: 0; gap: 9px; }
.alert-badge, .nav-alert { display: inline-grid; place-items: center; color: white; background: #b91c1c; border: 2px solid #fecaca; border-radius: 50%; font-weight: 900; }
.alert-badge { width: 40px; height: 40px; font-size: 25px; cursor: pointer; }
.nav-alert { position: absolute; right: 0; top: 2px; width: 17px; height: 17px; font-size: 11px; }
.pickup-mark { display: inline-block; padding: 7px 11px; margin: 10px 0 0; background: #e2e8f0; color: #334155; border: 1px solid currentColor; border-radius: 10px; font-size: 14px; font-weight: 800; }
.mark-blue-star { color: #1e40af; background: #dbeafe; }
.mark-green-leaf { color: #166534; background: #dcfce7; }
.mark-orange-circle { color: #9a3412; background: #ffedd5; }
.mark-purple-moon { color: #6b21a8; background: #f3e8ff; }
.mark-red-heart { color: #991b1b; background: #fee2e2; }
.mark-teal-diamond { color: #155e75; background: #cffafe; }
.history-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 18px; }
.history-controls label { display: grid; gap: 6px; font-size: 13px; }
.history-controls select, .history-controls input { min-height: 42px; max-width: 170px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px; background: white; color: var(--ink); }
.inventory-guide, .export-panel { padding: 18px; margin: 0 0 18px; color: var(--ink); background: white; border: 1px solid #cbd5e1; border-radius: 16px; line-height: 1.75; }
.inventory-guide h2 { font-size: 19px; margin: 0 0 8px; }
.inventory-guide p { font-size: 13px; }
.inventory-guide.warning { background: #fff7ed; border-color: #fb923c; }
.stock-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stock-metrics span { padding: 13px 8px; background: #f1f5f9; border-radius: 10px; font-size: 11px; }
.stock-metrics b { display: block; font-size: clamp(17px, 4vw, 26px); font-variant-numeric: tabular-nums; }
.material-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 14px; margin: 14px 0 20px; }
.material-card { padding: 18px; color: var(--ink); background: white; border-radius: 16px; }
.material-card h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.material-card p { font-size: 13px; color: #475569; }
.material-card label, .inventory-guide label, .edit-label { display: grid; gap: 5px; margin: 13px 0; font-size: 13px; font-weight: 700; }
.material-card input, .inventory-guide input:not([type=checkbox]), .edit-label input, .edit-label textarea, .edit-label select, .recipe-fields input { width: 100%; min-width: 0; min-height: 44px; padding: 9px; color: var(--ink); background: #fff; border: 1px solid #94a3b8; border-radius: 9px; font-size: 16px; }
.edit-label textarea { min-height: 85px; resize: vertical; }
.material-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.material-fields label { margin: 0; }
.recipe-fields label { display: grid; grid-template-columns: 1fr 112px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; font-size: 13px; }
.recipe-fields span { display: flex; align-items: center; gap: 5px; }
.recipe-fields input { width: 80px; }
.check-label, .inventory-guide .check-label { display: flex; align-items: start; gap: 10px; font-size: 13px; font-weight: 700; line-height: 1.65; margin: 20px 0; }
.check-label input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.sheet .error-message, .pin-dialog .error-message { color: #b91c1c; }
.sheet h2 { padding-right: 28px; }
.sheet p { line-height: 1.7; }
.history-warning { color: #cbd5e1; font-size: 13px; line-height: 1.7; }
.history-pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 20px 0; font-size: 12px; }
.export-panel { margin-top: 24px; border-color: #64748b; font-size: 13px; }
.export-panel summary, .inventory-guide summary { min-height: 28px; cursor: pointer; font-weight: 800; }
.alert-list { padding-left: 22px; line-height: 1.8; font-size: 13px; }
.alert-list li { margin: 8px 0; }
.event-list { padding-left: 22px; font-size: 12px; }
.event-list li { padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.event-list time, .event-list b, .event-list span { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
@media (max-width: 390px) {
  .staff-header h1 { font-size: 23px; }
}

@media (min-width: 680px) {
  .sheet { margin: auto; border-radius: 24px; }
  .menu-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .setup-card { grid-template-columns: 1fr; text-align: center; }
  .setup-card img { margin: auto; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .analytics-columns { grid-template-columns: 1fr; }
  .hour-row { grid-template-columns: 42px 1fr 72px; }
  .hour-row > small { grid-column: 2 / -1; margin-top: -7px; }
}
@media (max-width: 390px) {
  .menu-card { grid-template-columns: 40px 1fr; }
  .menu-emoji { width: 40px; height: 40px; font-size: 23px; }
  .stepper { grid-column: 2; justify-self: end; margin-top: -4px; }
}

/* v6: monitoring is glanceable; editing lives under Management. */
.back-management { display: inline-block; color: #bfdbfe; margin-bottom: 16px; font-weight: 700; }
.management-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 25px; }
.management-links a { padding: 18px; color: #172554; background: #eff6ff; border: 1px solid #93c5fd; border-radius: 14px; text-decoration: none; }
.management-links b, .management-links span { display: block; }
.management-links span { color: #475569; font-size: 12px; line-height: 1.7; margin-top: 6px; }
.inventory-caption { color: #cbd5e1; font-size: 12px; line-height: 1.75; }
.stock-overview { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 12px; margin: 18px 0; }
.stock-card { padding: 16px; background: white; color: #172554; border: 2px solid transparent; border-radius: 15px; }
.stock-card h2 { margin: 0; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.stock-card strong { display: block; font-size: 32px; margin: 10px 0; font-variant-numeric: tabular-nums; }
.stock-card strong small { font-size: 13px; margin-left: 6px; }
.stock-card p { font-size: 11px; color: #475569; line-height: 1.65; margin-bottom: 0; }
.stock-low { border-color: #ef4444; }
.stock-warning { display: inline-block; font-size: 11px; font-weight: 800; color: #991b1b; padding: 3px 7px; margin-top: 5px; background: #fee2e2; border-radius: 6px; }
.stock-track { height: 8px; background: #e2e8f0; border-radius: 8px; overflow: hidden; }
.stock-track span { display: block; height: 100%; background: #2563eb; }
.stock-low .stock-track span { background: #dc2626; }
.settings-list { display: grid; gap: 9px; margin: 14px 0 20px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 1px solid #cbd5e1; border-radius: 12px; background: white; color: #172554; text-align: left; cursor: pointer; }
.settings-row small { display: block; color: #475569; font-size: 12px; margin-top: 5px; }
.settings-row > span:last-child { white-space: nowrap; font-size: 13px; }
.order-urgent { outline: 3px solid #ef4444; outline-offset: -3px; }
.urgent-message { padding: 10px; border-radius: 8px; background: #fee2e2; color: #991b1b; font-weight: 800; font-size: 13px; margin: 0 0 14px; line-height: 1.7; }
@media (max-width: 480px) { .management-links { grid-template-columns: 1fr; } }
.incident-entry { margin: 12px 0; padding: 12px; border-left: 5px solid #64748b; background: #f8fafc; overflow-wrap: anywhere; }
.incident-entry time { display: block; font-size: 13px; margin-top: 5px; }
.incident-entry p { margin: 7px 0; }
.severity-CRITICAL { border-color: #dc2626; background: #fff1f2; }
.severity-WARNING { border-color: #b45309; background: #fffbeb; }

/* Keep utility controls available without competing with the order cards. */
.staff-utilities { margin: 8px 0 18px; border: 1px solid #64748b; border-radius: 12px; }
.staff-utilities > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
.staff-utilities[open] > summary { border-bottom: 1px solid #64748b; }
.staff-utilities .staff-tools, .staff-utilities .shop-controls { margin: 12px; }
.menu-card { transition: box-shadow .2s, border-color .2s; }
.menu-card:focus-within { border-color: #f59e0b; box-shadow: 0 4px 20px #f59e0b18; }
.menu-card.in-cart { background: linear-gradient(135deg, #fff 60%, #fff7ed); border-color: #fdba74; }
.menu-card.in-cart .menu-emoji { background: #ffedd5; }
.stepper button { transition: transform .12s, background-color .15s; touch-action: manipulation; }
.stepper button:active:not(:disabled) { transform: scale(.88); }
.stepper button:focus-visible, .back-management:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.menu-section h2 span::after { content: ' ·'; color: #f59e0b; }
@media (prefers-reduced-motion: reduce) {
  .menu-card, .stepper button { transition: none; }
  .stepper button:active:not(:disabled) { transform: none; }
}

/* Customer additions: subtle allergen cue, viewport-safe dialogs, and a visual cart. */
.customer-body .hero h1 { user-select: none; }
.customer-body .popular-pill { pointer-events: none; }
.menu-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.allergen-hint { display: inline-flex; align-items: center; gap: 4px; min-height: 25px; padding: 2px 7px 2px 4px; color: #92400e; background: #fffbeb; border: 1px solid #f3c98b; border-radius: 999px; font-size: 10px; font-weight: 800; cursor: pointer; }
.allergen-hint b { display: grid; place-items: center; width: 16px; height: 16px; color: white; background: #b45309; border-radius: 50%; font-size: 11px; }
.fact-allergen::before { content: '!'; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; color: white; background: #b45309; border-radius: 50%; font-size: 11px; }
.customer-body .sheet[open] { width: min(640px, calc(100svw - 24px)); transform: translate(var(--visual-dialog-x, 0px), var(--visual-dialog-y, 0px)); }

.cart-bar { bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--visual-viewport-bottom, 0px)); padding: 10px 12px; }
.cart-bar .cart-summary { min-width: 80px; margin-right: auto; }
.cart-cup-stack { position: relative !important; display: block !important; flex: 0 0 48px; width: 48px; height: 48px; margin-right: 3px; }
.cart-basket { position: absolute; left: 2px; bottom: 0; font-size: 34px; line-height: 1; filter: grayscale(.18); }
.cart-cup-icons { position: absolute; left: 9px; right: 2px; top: 0; height: 28px; }
.cart-cup-icons i { position: absolute; left: calc(var(--cup-index) * 7px); top: calc((3 - var(--cup-index)) * 2px); display: grid; place-items: center; width: 21px; height: 21px; font-size: 14px; font-style: normal; background: white; border: 1px solid #fdba74; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,.2); transform: rotate(calc((var(--cup-index) - 1.5) * 4deg)); }
.secret-menu-card { background: linear-gradient(135deg, #fff 60%, #f5f3ff); border-color: #c4b5fd; }
.secret-menu-card .menu-emoji { background: #f5f3ff; }

@media (max-width: 460px) {
  .cart-bar .primary-button { padding: 0 14px; font-size: 13px; }
  .cart-cup-stack { min-width: 48px; padding: 0; border: 0; }
}
@media (max-width: 350px) {
  .cart-cup-stack { display: none !important; }
}

/* v1.1: reorder controls for materials, products, and recipe rows. */
.settings-row-wrap { display: flex; align-items: stretch; gap: 8px; }
.settings-row-wrap > .settings-row { flex: 1; min-width: 0; }
.move-buttons { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.move-buttons .icon-button { width: 34px; height: 34px; font-size: 14px; line-height: 1; }
.move-buttons .icon-button:disabled { opacity: .4; }
.recipe-row { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid #e2e8f0; }
.recipe-row > label { flex: 1; min-width: 0; border-bottom: 0; }
.recipe-row .move-buttons { flex-direction: row; padding-right: 2px; }
.recipe-row .move-buttons .icon-button { width: 30px; height: 30px; font-size: 13px; }
.storage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }

/* v1.1: menu options (required colour choice, paid add-ons). */
.option-stepper { display: flex; grid-template-columns: none; align-items: center; gap: 8px; }
.option-stepper b { min-width: 1.5em; }
.option-stepper button { width: auto; min-width: 66px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 15px; }
.option-hint { display: block; margin: 4px 0; color: var(--muted); font-size: 12px; }
.option-label { color: #1d4ed8; }
.option-group { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.option-group legend { padding: 0 6px; font-size: 14px; font-weight: 800; }
.option-choice { display: flex; align-items: center; gap: 10px; padding: 10px 4px; font-size: 15px; border-bottom: 1px dashed #e2e8f0; }
.option-choice:last-child { border-bottom: 0; }
.option-choice input { width: 22px; height: 22px; accent-color: #ea580c; }
.option-choice.sold-out { color: #94a3b8; }
.option-total { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 14px; font-size: 15px; }
.option-total strong { font-size: 26px; color: #9a3412; }
.option-stepper button:disabled { opacity: .4; }
.item-options { display: block; color: #1d4ed8; font-size: 12px; font-style: normal; }

/* v1.1: admin option editor inside the product dialog. */
.option-group-edit { margin: 0 0 14px; padding: 12px; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 14px; }
.option-group-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; align-items: end; }
.option-group-head label, .option-row label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; }
.option-group-head input, .option-group-head select, .option-row input, .option-row select { width: 100%; padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.option-rows { margin: 10px 0; }
.option-row { display: block; padding: 8px 0; border-bottom: 1px solid #e2e8f0; }
.option-row-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)) auto; gap: 8px; align-items: end; }
.option-materials { margin-top: 8px; }
.option-materials-title { display: block; margin-bottom: 4px; color: #475569; font-size: 12px; font-weight: 700; }
.option-material-rows { display: grid; gap: 6px; margin-bottom: 6px; }
.option-material-row { display: grid; grid-template-columns: 1fr 120px auto; gap: 6px; align-items: center; }
.option-material-row select, .option-material-row input { width: 100%; padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.option-max + small, .option-row-head label small { color: #64748b; font-weight: 500; }
.option-row .icon-button { width: 34px; height: 34px; font-size: 16px; background: #fee2e2; color: #b91c1c; }
/* v1.1: customer-chosen portions (for example the three 氷蜜 colours). */
.portion-list { display: grid; gap: 2px; }
.portion-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px dashed #e2e8f0; }
.portion-row:last-child { border-bottom: 0; }
.portion-row.sold-out { color: #94a3b8; }
.portion-name { font-size: 15px; }
.portion-stepper { display: flex; align-items: center; gap: 12px; }
.portion-stepper .portion-button { width: 38px; height: 38px; padding: 0; color: #172554; background: #dbeafe; border: 0; border-radius: 50%; font-size: 20px; font-weight: 900; touch-action: manipulation; }
.portion-stepper .portion-button:disabled { opacity: .4; }
.portion-count { min-width: 1.5em; text-align: center; font-size: 17px; }
.option-group-head .check-label { align-self: center; }
.counter-stepper.option-stepper { display: flex; grid-template-columns: none; gap: 8px; align-items: center; }
.counter-stepper.option-stepper b { min-width: 1.5em; text-align: center; font-size: 17px; }
.counter-stepper.option-stepper button { width: auto; min-width: 66px; height: 38px; border-radius: 999px; font-size: 15px; }

