:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --tint: #f3ece1;
  --text: #2b2520;
  --muted: #6f655b;
  --border: #e6ddd0;
  --accent: #8c3b1f;
  --accent-ink: #ffffff;
  --accent-soft: #f6e4da;
  --hero-from: #3a2a20;
  --ok: #2f7a43;
  --ok-soft: #e3f2e6;
  --warn: #9a6a00;
  --warn-soft: #fbf0d4;
  --danger: #b3261e;
  --danger-soft: #fbe3e1;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 4px 16px rgb(0 0 0 / 0.04);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
code { background: var(--tint); padding: 0 0.3em; border-radius: 4px; font-size: 0.9em; word-break: break-all; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.tinted { background: var(--tint); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Header & footer */
.site-header, .admin-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text); text-decoration: none; }
.nav nav { display: flex; gap: 4px 16px; flex-wrap: wrap; align-items: center; }
.nav nav a { color: var(--text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav nav a:hover, .nav nav a.active { border-bottom-color: var(--accent); }
.announcement { background: var(--accent); color: var(--accent-ink); padding: 8px 0; text-align: center; font-weight: 500; }
.site-footer { background: #2b2520; color: #e9e1d6; margin-top: 40px; padding: 40px 0 16px; }
.site-footer a { color: #f3c9b5; }
.site-footer .hours th, .site-footer .hours td { border-color: #463d35; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid #463d35; font-size: 0.875rem; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--hero-from), var(--accent)); background-size: cover; background-position: center; color: #fff; padding: 96px 0; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2em; }
.hero .lead { text-shadow: 0 1px 8px rgb(0 0 0 / 0.4); }
.hero .lead { font-size: 1.25rem; max-width: 36em; opacity: 0.92; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 600; margin: 0 0 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.open { background: #6fdc8c; }
.dot.closed { background: #f0a39b; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 0.6); }
.about p { max-width: 42em; font-size: 1.075rem; }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }
.btn.small { padding: 5px 12px; font-size: 0.875rem; }
/* A status step already reached: highlighted, not a button. */
.btn.done { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); cursor: default; }
.btn.done:hover { filter: none; }
.status-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
/* Hover/focus tips on admin buttons (data-tip="…"). Opens to the left of the button's right
   edge, since these buttons sit on the right of the page. */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20;
  width: max-content; max-width: 260px; padding: 7px 10px; border-radius: 6px;
  background: #2b2520; color: #fff; font: 400 0.8rem/1.4 var(--font); text-align: left; white-space: normal;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.2); pointer-events: none;
}
[data-tip]:hover::before, [data-tip]:focus-visible::before {
  content: ''; position: absolute; right: 14px; bottom: calc(100% + 2px); z-index: 20;
  border: 6px solid transparent; border-top-color: #2b2520; border-bottom: 0; pointer-events: none;
}
.btn.block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 4px 0; }
form.inline { display: inline; }

/* Menu */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chips a { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.chips a.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.menu-cat { margin-bottom: 32px; scroll-margin-top: 80px; }
.dish-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 32px; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.dish-grid .dish { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 0; }
.dish { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.dish img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; }
.dish-body { flex: 1; min-width: 0; }
.dish-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.dish h3 { margin: 0; font-family: var(--font); font-weight: 600; font-size: 1rem; }
.dish p { margin: 4px 0; color: var(--muted); font-size: 0.95rem; }
.dish.unavailable { opacity: 0.55; }
.price { font-weight: 600; white-space: nowrap; }
.tag { display: inline-block; font-size: 0.75rem; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--muted); margin-right: 4px; font-family: var(--font); font-weight: 500; vertical-align: middle; }

/* Visit */
.visit { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: start; }
.address { font-size: 1.1rem; }
.map { width: 100%; height: 360px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.hours { border-collapse: collapse; }
.hours-note { margin: 8px 0 0; font-style: italic; }
.hours th, .hours td { vertical-align: top; text-align: left; padding: 3px 16px 3px 0; font-weight: normal; border-bottom: 1px solid var(--border); }

/* Forms */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.form label { display: block; margin-bottom: 14px; font-weight: 500; font-size: 0.95rem; }
.form .row { display: flex; gap: 0 16px; flex-wrap: wrap; align-items: flex-end; }
.form .row > label { flex: 1 1 180px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type='checkbox'] { display: inline-block; width: auto; margin: 0 8px 0 0; accent-color: var(--accent); }
label.check { display: flex; align-items: center; font-weight: 500; }
input.short { max-width: 110px; }
.narrow-form { max-width: 680px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.inline-form input { margin: 0; max-width: 200px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; }
.alert.success { background: var(--ok-soft); color: var(--ok); border-color: #c4e3cb; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: #f2c4c0; }
.alert.info { background: var(--warn-soft); color: #6b4a00; border-color: #f0dfb0; }

/* Confirmation */
.confirm { text-align: center; padding: 32px 24px; }
.ref { font-family: ui-monospace, Menlo, monospace; font-size: 2rem; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); margin: 4px 0 16px; }
.summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; text-align: left; max-width: 420px; margin: 0 auto 16px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; overflow-wrap: anywhere; }
.lines { width: 100%; max-width: 460px; margin: 0 auto 16px; border-collapse: collapse; text-align: left; }
.lines td, .lines th { padding: 6px 0; border-bottom: 1px solid var(--border); }
.num { text-align: right; white-space: nowrap; }
.total-row th { border-bottom: 0; padding-top: 10px; }

/* Order page */
.order-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.order-chips { position: sticky; top: 58px; z-index: 4; background: var(--bg); padding: 8px 0; margin-bottom: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.order-chips a { white-space: nowrap; font-size: 0.9rem; }
.order-menu .menu-cat { scroll-margin-top: 120px; }
.order-menu h2 { margin-top: 16px; }
.order-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.order-line-info { min-width: 0; }
/* A dish sold out today: shown on the order page, but can't be added. */
.order-line-sold-out { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); opacity: 0.6; }
.tag.sold-out-tag { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.dish.sold-out { opacity: 0.7; }
.order-line-info .price { margin-top: 2px; }
.order-line.picked { background: var(--accent-soft); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.qty { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper { display: flex; align-items: center; gap: 4px; }
.qty input { width: 52px; text-align: center; margin: 0; padding: 6px 4px; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--accent); flex: none; }
.qty-btn:hover { border-color: var(--accent); }
.add-btn { display: none; min-width: 72px; }
.js-cart .order-line:not(.picked) .add-btn { display: inline-block; }
.js-cart .order-line:not(.picked) .stepper { display: none; }
.order-summary { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.order-summary label { display: block; margin-bottom: 12px; font-weight: 500; font-size: 0.95rem; }
.order-summary h3 { margin-top: 16px; }
.basket { list-style: none; padding: 0; margin: 0 0 8px; }
.basket li { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
.basket li.muted { display: block; border: 0; }
.basket-qty { display: flex; align-items: center; gap: 6px; }
.basket-qty span { min-width: 1.4em; text-align: center; font-weight: 600; }
.basket .qty-btn { width: 28px; height: 28px; font-size: 1rem; }
.basket-price { min-width: 64px; text-align: right; font-weight: 600; }
.basket-remove { background: none; border: 0; color: var(--muted); font-size: 1.2rem; cursor: pointer; padding: 0 4px; }
.basket-remove:hover { color: var(--danger); }
.cart-bar { display: none; }
.env-banner { background: repeating-linear-gradient(135deg, #ffd84d 0 14px, #ffcf1f 14px 28px); color: #3b2f00; text-align: center; font-size: 0.85rem; font-weight: 600; padding: 6px 12px; }
.env-banner.env-development { background: repeating-linear-gradient(135deg, #b9e4ff 0 14px, #a3d9ff 14px 28px); color: #06324d; }
.account-card { max-width: 460px; margin: 0 auto; }
.code-input { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; font-family: ui-monospace, Menlo, monospace; }
.my-orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 32px; }
.my-order { margin: 0; }
.my-order.active { border-color: var(--accent); }
.my-order p { margin: 6px 0; }
.my-order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.my-order-head .status-pill { margin-left: 6px; }
.account-settings { margin-top: 8px; }
.track { padding: 28px 24px; }
.track h1 { margin-bottom: 20px; }
.steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: none; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 0.875rem; color: var(--muted); position: relative; }
.steps li + li::before { content: ''; position: absolute; top: 16px; right: 50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.steps li.done + li::before, .steps li.done + li.current::before { background: var(--ok); }
.step-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); border: 2px solid var(--border); font-weight: 700; position: relative; z-index: 1; }
.steps li.done { color: var(--text); }
.steps li.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.current { color: var(--text); font-weight: 600; }
.steps li.current .step-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--accent-soft); }
.track-when { font-size: 1.05rem; }
.track-note { text-align: left; }
.spaced { margin-top: 24px; }
.feature-list { display: grid; gap: 12px; margin-bottom: 20px; }
/* label.feature-row beats the general `.form label { display: block }` rule. */
label.feature-row { display: flex; gap: 16px; align-items: flex-start; margin: 0; cursor: pointer; font-weight: 400; }
.feature-row strong { margin-right: 6px; }
.feature-desc { display: block; margin-top: 4px; }
/* On/off switch built on a real checkbox (keyboard and screen readers work as normal). */
.switch { position: relative; display: inline-block; flex: none; width: 46px; height: 26px; margin-top: 2px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background 0.15s; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.3); transition: transform 0.15s; }
.switch input:checked + .switch-track { background: var(--ok); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.platform-site { margin-bottom: 32px; }
.platform-envs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.platform-envs .card { margin: 0; }
.platform-env-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
label.feature-row.compact { padding: 10px 0; border-bottom: 1px solid var(--border); }
.status-pill.env-pill { text-transform: uppercase; letter-spacing: 0.04em; }
label.feature-row.compact:last-of-type { border-bottom: 0; }
.pay-choice { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.pay-choice legend { font-weight: 600; font-size: 0.95rem; padding: 0 4px; }
.pay-choice label.check { margin-bottom: 6px; gap: 8px; }
.pay-choice input[type=radio] { width: auto; display: inline; margin: 0; }
.discount-box { margin: 10px 0 6px; }
.discount-box label { display: block; font-weight: 600; margin-bottom: 4px; }
.discount-row { display: flex; gap: 8px; }
.discount-row input { margin: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.discount-msg { margin: 6px 0 0; color: var(--muted); min-height: 1.2em; }
.discount-msg.ok { color: var(--ok); }
.discount-msg.bad { color: var(--danger); }
.subtotal-line { display: flex; justify-content: space-between; margin: 4px 0; font-size: 0.95rem; }
.discount-line, .discount-row-line td { color: var(--ok); }
.person-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: 1px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); cursor: pointer; border: 3px solid transparent; }
.swatch input:checked + span { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.roster-head { margin-bottom: 8px; }
.roster-nav, .roster-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.roster-stats { margin-bottom: 18px; }
table.roster { min-width: 900px; }
table.roster th, table.roster td { vertical-align: top; }
table.roster .is-today { background: var(--accent-soft); }
.roster-person { white-space: nowrap; font-weight: 600; }
.roster-cell { min-width: 110px; }
.shift-chip { display: block; margin: 0 0 4px; padding: 3px 7px; border-radius: 6px; border-left: 4px solid var(--c); background: var(--tint); color: var(--text); font-size: 0.82rem; text-decoration: none; line-height: 1.35; }
a.shift-chip:hover { filter: brightness(0.95); }
.shift-area { display: block; color: var(--muted); font-size: 0.75rem; }
.shift-chip.s-confirmed { background: var(--ok-soft); }
.shift-chip.s-absent { text-decoration: line-through; opacity: 0.6; }
.shift-chip.overlap { outline: 2px solid var(--danger); }
.add-shift { display: inline-block; padding: 0 8px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 700; }
.add-shift:hover { background: var(--tint); color: var(--accent); }
.today-roster { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.today-roster .shift-chip { display: inline-block; margin: 0; }
.view-tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.view-tabs a { padding: 6px 18px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9rem; }
.view-tabs a.active { background: var(--accent); color: var(--accent-ink); }
.planner-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.planner-bar input[type=date] { width: auto; margin: 0; }
.planner-title { font-size: 1.1rem; margin-left: 6px; }
.planner-status { font-size: 0.85rem; color: var(--muted); }
.planner-status.bad, .row-status.bad, #planner-add-msg.bad { color: var(--danger); }
.row-status.ok, #planner-add-msg.ok { color: var(--ok); }
.planner-week { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.week-chip { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; }
.week-chip small { color: var(--muted); }
.week-chip.today span { color: var(--accent); font-weight: 700; }
.week-chip.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.planner-wrap { background: var(--surface); }
table.planner-grid { border-collapse: separate; border-spacing: 3px; user-select: none; -webkit-user-select: none; }
table.planner-grid th, table.planner-grid td { padding: 0; text-align: center; vertical-align: middle; }
table.planner-grid thead th { font-size: 0.75rem; font-weight: 600; padding: 4px 2px; border-radius: 5px; min-width: 40px; white-space: nowrap; }
table.planner-grid .planner-name-col { text-align: left; min-width: 150px; background: transparent; }
.planner-person { text-align: left !important; padding: 4px 10px 4px 4px !important; white-space: nowrap; font-weight: 600; }
.planner-person small { display: block; font-weight: 400; color: var(--muted); margin-left: 18px; }
.hour-box { width: 40px; height: 34px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; padding: 0; touch-action: none; }
.hour-box:hover:not(:disabled) { border-color: var(--c); }
.hour-box[aria-pressed=true] { background: var(--c); border-color: var(--c); }
.hour-box:disabled { cursor: default; opacity: 0.75; }
.hour-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.planner-total { text-align: left !important; padding: 0 0 0 10px !important; min-width: 110px; white-space: nowrap; font-size: 0.9rem; }
.planner-total small { display: block; color: var(--muted); font-size: 0.75rem; }
.planner-total .row-note { color: var(--warn); }
table.planner-grid tfoot th { text-align: left; font-size: 0.8rem; color: var(--muted); padding: 6px 4px; }
.planner-count { font-weight: 700; font-size: 0.85rem; }
.planner-count.short { color: var(--danger); }
.planner-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; padding: 12px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.planner-add input { width: auto; flex: 1 1 140px; margin: 0; }
.planner-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; }
.busy-card { margin-top: 24px; }
table.timesheet input { margin: 0; min-width: 0; }
table.timesheet input[type=number] { width: 76px; }
table.timesheet input[type=time] { width: 130px; }
table.busy-grid { border-collapse: separate; border-spacing: 3px; font-size: 0.8rem; }
table.busy-grid th { font-weight: 500; color: var(--muted); padding: 2px 4px; white-space: nowrap; text-align: center; }
table.busy-grid tbody th { text-align: left; color: var(--text); }
table.busy-grid tr.is-today th { color: var(--accent); font-weight: 700; }
table.busy-grid td { width: 38px; height: 30px; text-align: center; border-radius: 5px; font-weight: 700; }
.busy-0 { background: var(--tint); color: var(--muted); }
.busy-1 { background: #fde7c7; color: #6b3b00; }
.busy-2 { background: #fbbf72; color: #4a2700; }
.busy-3 { background: #ea7a2d; color: #fff; }
table.busy-grid td.short { outline: 2px solid var(--danger); outline-offset: -2px; }
.busy-legend span { display: inline-block; padding: 2px 10px; border-radius: 5px; margin-right: 6px; }
.short-legend { color: var(--danger); font-weight: 700; padding: 0 !important; }
@media print {
  .admin-side, .admin-topbar, .side-scrim, .env-banner, .no-print, .busy-card, .alert { display: none !important; }
  .admin-shell { display: block; }
  .admin-main { padding: 0; }
  body.admin { background: #fff; }
  table.roster { min-width: 0; font-size: 11px; }
  .shift-chip { border: 1px solid #ccc; border-left: 4px solid var(--c); }
}
.msg-log { list-style: none; padding: 0; margin: 0; }
.msg-log li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.msg-log li:last-child { border-bottom: 0; }
.total { display: flex; justify-content: space-between; font-size: 1.15rem; border-top: 1px solid var(--border); padding-top: 10px; }

/* Admin */
body.admin { background: #f6f5f3; }

/* Admin layout: tabs down the left. Always visible on wide screens; on phones a ☰ button
   slides them in from the left (a checkbox, so it works without JavaScript too). */
.admin-shell { --side-w: 232px; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; min-height: 100vh; }
.admin-shell > .env-banner { grid-column: 2; grid-row: 1; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.admin-side { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 20; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px 12px; background: var(--surface); border-right: 1px solid var(--border); }
.admin-side .brand { font-size: 1.05rem; letter-spacing: 0.08em; padding: 0 10px 8px; display: block; overflow-wrap: anywhere; }
.admin-side nav, .side-foot { display: flex; flex-direction: column; gap: 2px; }
.admin-side nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.admin-side nav a, .side-foot a, .side-foot .link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.95rem; line-height: 1.3; min-height: 36px; }
.side-foot a, .side-foot .link { justify-content: flex-start; gap: 4px; }
.admin-side nav a:hover, .side-foot a:hover, .side-foot .link:hover { background: var(--tint); }
.admin-side nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-group { margin: 12px 10px 2px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.side-group:first-child { margin-top: 0; }
.side-foot { flex: none; padding-top: 8px; border-top: 1px solid var(--border); }
.side-foot form { margin: 0; }
.side-foot .link { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.admin-main { grid-column: 2; grid-row: 2; width: 100%; max-width: 1140px; margin: 0; padding-left: 32px; padding-right: 32px; }
.admin-topbar, .side-scrim { display: none; }

@media (max-width: 900px) {
  .admin-shell { display: block; }
  .admin-topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 15; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .admin-topbar .brand { font-size: 1rem; letter-spacing: 0.08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; flex: none; }
  .menu-btn:hover { background: var(--tint); }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); content: ''; position: relative; }
  .menu-icon::before { position: absolute; top: -6px; }
  .menu-icon::after { position: absolute; top: 6px; }
  .menu-btn .badge { position: absolute; top: 4px; right: 2px; }
  .nav-toggle:focus-visible ~ .admin-topbar .menu-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
  .admin-side { position: fixed; top: 0; bottom: 0; left: 0; height: auto; width: min(84vw, 300px); transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; box-shadow: none; }
  .nav-toggle:checked ~ .admin-side { transform: none; visibility: visible; box-shadow: 0 0 40px rgb(0 0 0 / 0.25); }
  .nav-toggle:checked ~ .side-scrim { display: block; position: fixed; inset: 0; z-index: 19; background: rgb(0 0 0 / 0.35); }
  .admin-main { max-width: none; padding-left: 16px; padding-right: 16px; padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .admin-side { transition: none; } }
.login-page main { padding-top: 10vh; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.75rem; text-align: center; line-height: 20px; }
.badge:empty { display: none; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 2rem; font-family: var(--serif); color: var(--accent); }
.stat span { color: var(--muted); font-size: 0.9rem; }
section + section { margin-top: 24px; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card .table-wrap { border: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data thead th { background: var(--tint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
table.data input { margin: 0; }
tr.dim { opacity: 0.55; }
/* Inventory and Square orders (admin) */
tr.stock-low td { background: var(--warn-soft); }
.stock-now { font-size: 1.25rem; }
form.stock-quick { display: flex; gap: 6px; align-items: center; }
form.stock-quick select, form.stock-quick input { width: auto; margin: 0; padding: 6px 8px; }
form.stock-quick input { width: 5.5em; }
@media (max-width: 640px) {
  .stock-table .wide-only { display: none; }
  form.stock-quick { flex-wrap: wrap; }
  form.stock-quick select { width: 100%; }
}
.recipe-row { align-items: end; }
.steps-list { padding-left: 1.4em; margin-bottom: 20px; }
.error-text { color: var(--danger); }
/* Admin previews (unsaved changes) */
.preview-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: #ffd84d; color: #1d1d1d; padding: 10px 16px; text-align: center; font-size: 0.95rem; box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25); }
body:has(> .preview-banner) { padding-bottom: 48px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Website orders sent to Square: has the kitchen accepted it there? */
.kitchen-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.kitchen-tag.waiting { background: var(--warn-soft); color: var(--warn); }
.kitchen-tag.late { background: var(--danger-soft); color: var(--danger); }
.kitchen-tag.ok { background: var(--ok-soft); color: var(--ok); }
.inline-field { display: flex; align-items: center; gap: 8px; }
.inline-field input { width: 6em; }
/* Paying through Square: Square's card fields are drawn inside #card-container. */
.pay-card { text-align: left; }
.pay-card h1, .pay-card .eyebrow { text-align: center; }
.card-container { min-height: 90px; margin: 16px 0 8px; }
#square-pay .btn { width: 100%; }
.steps-list li { margin-bottom: 10px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .chips { margin-bottom: 0; }
.small-chips a { padding: 4px 12px; font-size: 0.9rem; }
.status-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; text-transform: capitalize; background: var(--tint); color: var(--muted); font-family: var(--font); vertical-align: middle; }
.s-pending, .s-new { background: var(--warn-soft); color: var(--warn); }
.s-confirmed, .s-accepted, .s-seated { background: #e2ecfa; color: #24589c; }
.s-ready { background: var(--ok-soft); color: var(--ok); }
.s-completed, .s-collected { background: #ececec; color: #555; }
.s-declined, .s-cancelled, .s-no-show { background: var(--danger-soft); color: var(--danger); }
.login-owner { background: var(--accent-soft); color: var(--accent); }
.login-staff { background: #e2ecfa; color: #24589c; }
.login-off { background: var(--danger-soft); color: var(--danger); }
.login-owner, .login-staff, .login-off, .login-none { text-transform: none; }
.give-login { display: grid; gap: 6px; margin: 8px 0; max-width: 260px; }
.give-login input, .give-login select { margin: 0; }
.status-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.card .status-actions { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters label { font-size: 0.875rem; font-weight: 500; }
.cat-summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; }
.cat-summary::-webkit-details-marker { display: none; }
.cat-summary h2 { margin: 0; }
details[open] > .cat-summary { margin-bottom: 12px; }
.menu-admin-cat details { margin-bottom: 12px; }

@media (max-width: 860px) {
  .visit, .order-layout, .grid-2 { grid-template-columns: 1fr; }
  .order-summary { position: static; max-height: none; scroll-margin-top: 70px; }
  .cart-bar:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 6; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; box-shadow: 0 6px 24px rgb(0 0 0 / 0.25); }
  .order-layout { padding-bottom: 72px; }
  .order-chips { position: static; }
  .map { height: 280px; }
  .hero { padding: 48px 0; }
  .dish-list { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1815;
    --surface: #24201c;
    --tint: #2e2924;
    --text: #efe8df;
    --muted: #b2a798;
    --border: #3b342d;
    --accent: #e08a62;
    --accent-ink: #1b1815;
    --accent-soft: #3a2a22;
    --ok-soft: #1f3324;
    --ok: #8fd6a2;
    --warn-soft: #3a3019;
    --warn: #e6c36a;
    --danger-soft: #3d2120;
    --danger: #f2a49d;
    color-scheme: dark;
  }
  body.admin { background: #171512; }
  .alert.info { color: var(--warn); }
  .alert.success, .alert.error, .alert.info { border-color: transparent; }
  .s-confirmed, .s-accepted, .s-seated { background: #1f2c3f; color: #9cc1f0; }
  .s-completed, .s-collected { background: #2e2e2e; color: #bbb; }
}

/* Alerts for new orders and bookings (public/js/admin.js) */
.alert-stack { position: fixed; top: 16px; right: 16px; z-index: 40; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.alert-toast { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 6px solid var(--accent); border-radius: var(--radius); box-shadow: 0 10px 40px rgb(0 0 0 / 0.25); animation: alert-in 0.25s ease-out, alert-pulse 1.6s ease-in-out 0.25s 3; }
.alert-toast.booking { border-left-color: #2563eb; }
.alert-toast strong { font-size: 1.05rem; }
.alert-toast-actions { display: flex; gap: 8px; margin-top: 6px; }
.alert-toast .alert-sound-hint { align-self: flex-start; padding: 0; }
@keyframes alert-in { from { transform: translateY(-12px); opacity: 0; } }
@keyframes alert-pulse { 50% { box-shadow: 0 0 0 6px var(--accent-soft), 0 10px 40px rgb(0 0 0 / 0.25); } }
@media (max-width: 900px) { .alert-stack { top: 64px; left: 12px; right: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .alert-toast { animation: none; } }
.push-status.ok { color: var(--ok); font-weight: 600; }
.push-status.bad { color: var(--danger); }
.device-list { list-style: none; padding: 0; margin: 0; }
.device-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.device-list li:last-child { border-bottom: 0; }

/* Gallery page: edge-to-edge photos; two full-width, then three side by side (each as
   wide as its shape needs, so the row has one height). Phones: one column. */
.gallery-page { padding-bottom: 0; }
.gallery-title { text-align: center; padding: 32px 16px 20px; margin: 0; }
.gallery-row { display: flex; }
.gallery-item { display: block; flex: 1 1 100%; cursor: zoom-in; overflow: hidden; background: #111; }
.gallery-item img { display: block; width: 100%; height: auto; transition: transform 0.4s, opacity 0.2s; }
.gallery-row:not(.gallery-row-multi) .gallery-item img { max-height: 92vh; object-fit: cover; }
.gallery-row-multi .gallery-item { flex: var(--ar) 1 0; }
.gallery-item:hover img { transform: scale(1.02); }
@media (max-width: 700px) {
  .gallery-row { flex-direction: column; }
  .gallery-row-multi .gallery-item { flex: none; }
}
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / 0.94); color: #fff; }
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox::backdrop { background: rgb(0 0 0 / 0.6); }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; }
.lightbox-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; margin: 0; padding: 0 60px; }
.lightbox button { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.15); color: #fff; font-size: 1.6rem; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / 0.3); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: calc(50% - 26px); }
.lightbox-next { right: 16px; top: calc(50% - 26px); }
@media (prefers-reduced-motion: reduce) { .gallery-item img { transition: none; } .gallery-item:hover img { transform: none; } }

/* Admin → Gallery */
.upload-drop { display: flex; align-items: center; justify-content: center; min-height: 120px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; text-align: center; padding: 16px; }
.upload-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.upload-drop.disabled { opacity: 0.5; cursor: not-allowed; }
.upload-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-status { list-style: none; padding: 0; margin: 10px 0 0; }
.upload-status .ok { color: var(--ok); }
.upload-status .bad { color: var(--danger); }
.gallery-admin { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery-admin li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.gallery-admin img { width: 100%; height: 180px; object-fit: cover; display: block; }
.gallery-caption, .gallery-tools { display: flex; gap: 6px; align-items: center; padding: 8px 10px 0; margin: 0; }
.gallery-caption input { margin: 0; flex: 1; min-width: 0; }
.gallery-tools { padding-bottom: 10px; }
.gallery-tools .small { margin-right: auto; }
.gallery-caption { flex-wrap: wrap; }
.gallery-caption select { margin: 0; flex: 1 1 100%; order: 3; }

/* Enquiries */
.alert-toast.enquiry { border-left-color: #7c3aed; }
.enquiry-message { white-space: pre-line; font-size: 1.05rem; }
.lead-text { font-size: 1.1rem; }
/* A row of chosen-size photos that isn't full keeps each photo at its size, centred. */
.gallery-row-partial { justify-content: center; background: transparent; }
.gallery-row-partial .gallery-item { flex: 0 0 calc(100% / var(--per-row)); }
@media (max-width: 700px) { .gallery-row-partial .gallery-item { flex: none; } }
/* Order page: a product photo when the item has one */
.order-line-img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }
.order-line-info { flex: 1; min-width: 0; }

/* Admin → Insights: simple bar charts and meters (no chart library) */
.ins-chart, .ins-hours { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 8px; }
.ins-chart.dense { gap: 1px; }
.ins-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; border-radius: 3px; }
.ins-bar span { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: 0.85; }
.ins-bar:hover span { opacity: 1; }
.ins-hours { height: 110px; }
.ins-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.ins-list { list-style: none; padding: 0; margin: 0; }
.ins-list li { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.ins-list li:last-child { border-bottom: 0; }
.ins-list li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-meter { height: 8px; background: var(--tint); border-radius: 999px; overflow: hidden; }
.ins-meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.ins-list strong { min-width: 3ch; text-align: right; }

/* Admin: custom sizes and delivery bands */
.dims-table input, .bands-table input { margin: 0; max-width: 120px; }
.dims-table th { white-space: nowrap; }
.bands-table { max-width: 360px; }

/* Order page: custom size steppers (products with size rules). */
.size-picker { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-top: .4rem; }
.size-dim { display: inline-flex; align-items: center; gap: .25rem; }
.size-name { font-size: .8rem; color: var(--muted); }
.size-dim output { min-width: 3.2em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.size-btn { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: inherit; font: inherit; line-height: 1; cursor: pointer; }
.size-btn:disabled { opacity: .35; cursor: default; }
#delivery-msg.ok { color: var(--ok); }
#delivery-msg.bad { color: var(--danger); }
#delivery-msg .btn { margin-left: .25rem; }
input.short { max-width: 8em; }

/* Product pages (/products/<slug>). */
.crumbs { color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: inherit; }
.product-top { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.product-media img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.product-buy h1 { margin: 0 0 .25rem; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; }
.product-price { font-size: 1.6rem; font-weight: 700; margin: .5rem 0; }
.product-form { display: grid; gap: .9rem; margin: 1rem 0; }
.product-sizes { border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .9rem; margin: 0; }
.product-sizes legend { font-weight: 600; padding: 0 .3rem; }
.product-qty { display: flex; align-items: center; gap: .75rem; }
.product-qty input { width: 4em; text-align: center; }
.product-add { justify-self: start; min-width: 12rem; }
.product-delivery { background: var(--tint); border-radius: var(--radius); padding: .8rem 1rem; margin-top: 1rem; }
.product-delivery p { margin: .3rem 0; }
.product-delivery .ok, .product-postcode-msg.ok { color: var(--ok); }
.product-delivery .bad { color: var(--danger); }
.product-info { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); margin-top: 2.5rem; }
.product-info h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.product-features { padding-left: 1.2rem; margin: 0; }
.product-features li { margin: .25rem 0; }
.product-specs th { text-align: left; font-weight: 600; width: 45%; }
.product-related { margin-top: 2.5rem; }
.product-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.product-card a { color: inherit; text-decoration: none; }
.product-card img { width: 100%; height: auto; }
@media (max-width: 720px) {
  .product-top { grid-template-columns: 1fr; gap: 1rem; }
  .product-add { justify-self: stretch; }
}
