:root {
  --forest: #2f4a3a;
  --forest-deep: #243a2d;
  --olive: #3d4f13;
  --sage: #a9bba6;
  --sage-soft: #dfe7da;
  --cream: #f4eedf;
  --paper: #fbf8f1;
  --ink: #1f2d24;
  --muted: #5e6b61;
  --line: #e2dccb;
  --wa: #1f9d55;
  --danger: #a1302a;
  --radius: 14px;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tabs-h: 52px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--tabs-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.45;
  color: var(--ink); background: var(--cream);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #e2b84a; outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.demo-banner {
  background: #f3e2a9; color: #4a3b06; font-size: 13px; text-align: center;
  padding: 7px 12px;
}

/* Header */
.site-header {
  background: var(--forest); color: var(--cream); text-align: center;
  padding: 26px 20px 18px;
}
.brand { margin: 0 auto; max-width: 230px; line-height: 0; }
.brand img { display: block; width: 100%; height: auto; }
.tagline { margin: 12px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--sage); }

/* Tabs */
.tabs {
  position: sticky; top: 0; z-index: 20; background: var(--forest-deep);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.tabs ul {
  display: flex; gap: 6px; margin: 0 auto; padding: 8px 12px; list-style: none;
  overflow-x: auto; scrollbar-width: none; max-width: 640px; height: var(--tabs-h); align-items: center;
}
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a {
  display: block; white-space: nowrap; text-decoration: none; color: var(--cream);
  padding: 7px 14px; border-radius: 999px; font-size: 14px; border: 1px solid rgba(244,238,223,.25);
}
.tabs a[aria-current="true"] { background: var(--cream); color: var(--forest-deep); border-color: var(--cream); font-weight: 600; }

main { max-width: 640px; margin: 0 auto; outline: none; }

/* Category */
.category { padding: 26px 14px 10px; }
.category-title {
  font-family: var(--serif); font-weight: 600; font-size: 34px; letter-spacing: .12em;
  text-transform: uppercase; text-align: center; margin: 0 0 4px; line-height: 1.1;
}
.category-sub { text-align: center; margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.category.theme-forest { background: var(--forest); color: var(--cream); }
.category.theme-forest .category-sub, .category.theme-forest .muted { color: #c8d3c3; }
.category.theme-paper { background: var(--cream); }

.section-title {
  font-family: var(--serif); font-weight: 700; font-size: 23px; letter-spacing: .06em;
  text-transform: uppercase; margin: 22px 2px 4px; padding-bottom: 6px;
  border-bottom: 1px solid currentColor; display: inline-block;
}
.section-sub { margin: 0 2px 10px; font-size: 13px; color: var(--muted); }
.theme-forest .section-sub { color: #c8d3c3; }

/* Items */
.items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.item {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 12px;
}
.theme-forest .item { background: rgba(255,255,255,.06); border-color: rgba(244,238,223,.16); color: var(--cream); }
.item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.item-name { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; }
.item-tag { display: inline-block; font-size: 11.5px; font-weight: 500; text-transform: none; letter-spacing: 0;
  color: var(--olive); background: var(--sage-soft); padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.theme-forest .item-tag { background: rgba(169,187,166,.22); color: var(--cream); }
.price { font-weight: 700; white-space: nowrap; font-size: 15px; }
.price.ask { font-weight: 600; font-size: 13px; color: var(--muted); font-style: italic; }
.item-desc { margin: 5px 0 0; color: #3c4a40; font-size: 14px; }
.theme-forest .item-desc { color: #dfe5d9; }
.macros { margin: 6px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .01em; }
.theme-forest .macros { color: #b9c6b4; }
.macros b { font-weight: 600; }
.extras-info { margin: 6px 0 0; font-size: 13px; }
.item-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 4px; }
.item-meta { flex: 1; min-width: 0; padding-bottom: 2px; }
.item-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 6px; min-height: 40px; flex: none; }
.in-cart { font-size: 13px; color: var(--muted); margin-right: auto; }
.theme-forest .in-cart { color: #c8d3c3; }

.size-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 2px; text-align: center; }
.size-grid div { border: 1px solid rgba(244,238,223,.25); border-radius: 12px; padding: 10px 4px; font-size: 12px; line-height: 1.5; }
.size-grid strong { display: block; letter-spacing: .08em; font-size: 12.5px; }
.size-grid .sz-price { display: block; font-family: var(--serif); font-size: 20px; font-weight: 700; }

.builder-groups { margin: 12px 0 0; display: grid; gap: 10px; }
.builder-groups h4 { margin: 0 0 4px; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--olive); }
.builder-groups ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.builder-groups ul.plain { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.builder-groups li { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; }
.builder-groups .b-dots { flex: 1; border-bottom: 1px dotted #b9b19c; transform: translateY(-3px); min-width: 12px; }
.builder-groups .b-price { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  appearance: none; border: 0; border-radius: 999px; padding: 10px 18px; min-height: 44px;
  font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.btn-add { background: var(--forest); color: var(--cream); padding: 8px 18px; min-height: 40px; }
.theme-forest .btn-add { background: var(--cream); color: var(--forest-deep); }
.btn-primary { background: var(--forest); color: var(--cream); }
.btn-wa { background: var(--wa); color: #fff; width: 100%; font-size: 16px; }
.btn-wa:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; color: var(--muted); text-decoration: underline; min-height: 36px; padding: 6px; font-weight: 500; }
.grow { flex: 1; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); }
.stepper button, .stepper .step {
  width: 40px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 999px; line-height: 1;
}
.stepper output, .stepper .qty { min-width: 26px; text-align: center; font-weight: 700; }

/* Footer */
.site-footer { text-align: center; padding: 22px 18px 10px; color: var(--muted); font-size: 13.5px; max-width: 640px; margin: 0 auto; }
.site-footer p { margin: 4px 0; }

/* Cart bar */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(244,238,223,1) 60%, rgba(244,238,223,0));
}
.cart-bar-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 616px; margin: 0 auto;
  background: var(--forest); color: var(--cream); border: 0; border-radius: 999px;
  padding: 10px 18px 10px 10px; min-height: 54px; font-weight: 650; font-size: 16px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(31,45,36,.3);
}
.cart-count { background: var(--cream); color: var(--forest); min-width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; font-size: 15px; }
.cart-bar-label { flex: 1; text-align: left; }

/* Sheets (dialog) */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92dvh;
  border-radius: 20px 20px 0 0; background: var(--paper); color: var(--ink);
}
dialog.sheet::backdrop { background: rgba(20,30,24,.55); }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: up .22s ease-out; }
  @keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}
.sheet-inner { display: flex; flex-direction: column; max-height: 92dvh; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 8px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.15; }
.icon-btn { border: 0; background: var(--sage-soft); width: 38px; height: 38px; border-radius: 999px; font-size: 16px; cursor: pointer; flex: none; }
.sheet-body { padding: 12px 16px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.sheet-foot.col { flex-direction: column; align-items: stretch; gap: 6px; }

.opt-group { border: 0; padding: 0; margin: 0 0 16px; }
.opt-group legend { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 0; margin-bottom: 2px; }
.opt-group .hint { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.req { font-size: 11px; font-weight: 600; color: var(--olive); background: var(--sage-soft); border-radius: 999px; padding: 1px 7px; margin-left: 6px; letter-spacing: 0; text-transform: none; }
.opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 44px;
}
.opt input { width: 20px; height: 20px; accent-color: var(--forest); flex: none; }
.opt .opt-name { flex: 1; }
.opt .opt-detail { display: block; font-size: 12px; color: var(--muted); }
.opt .opt-price { font-size: 14px; color: var(--muted); white-space: nowrap; }
.opt.disabled { opacity: .45; }
.tags { margin-left: 4px; }
.item-sheet-desc { margin: 0 0 14px; color: #3c4a40; font-size: 14px; }

.cart-lines { list-style: none; padding: 0; margin: 0 0 8px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line .cl-name { font-weight: 650; }
.cart-line .cl-opts { font-size: 12.5px; color: var(--muted); grid-column: 1; grid-row: 2; }
.cart-line .cl-total { font-weight: 700; text-align: right; }
.cart-line .stepper { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; }
.cart-line .stepper button { width: 36px; height: 36px; }

.field-group { border: 0; padding: 0; margin: 14px 0 6px; }
.field-group legend { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; padding: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; text-align: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; }
.seg input:checked + span { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.seg input:focus-visible + span { outline: 3px solid #e2b84a; outline-offset: 2px; }
.fields { display: grid; gap: 4px; }
.fields label, .note-label { font-size: 13px; font-weight: 600; margin-top: 4px; display: block; }
input[type="text"], .fields input, textarea {
  width: 100%; border: 1px solid #cfc8b6; border-radius: 10px; padding: 10px 12px; background: #fff; min-height: 44px; font-size: 16px;
}
textarea { resize: vertical; margin-top: 4px; }
input[aria-invalid="true"] { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: 13.5px; min-height: 1em; margin: 8px 0 0; }
.total-row { display: flex; justify-content: space-between; font-size: 17px; }
.tax-line { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.preview { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Dressings table */
.dressing-list { list-style: none; margin: 8px 0 0; padding: 0; }
.dressing-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 2px; border-bottom: 1px solid rgba(244,238,223,.16); }
.dressing-list .d-name { text-transform: uppercase; letter-spacing: .04em; font-size: 14px; }
.dressing-list .d-mac { font-size: 12.5px; color: #c8d3c3; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin: 14px 0 6px; font-size: 13px; }
.tag-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-right: 3px; vertical-align: 1px; }
.tag-vegan { background: #c9d77a; color: #2b3a0c; }
.tag-dairy { background: #e8e1cc; color: #4a4128; }
.tag-honey { background: #f2c14e; color: #4b3600; }
.tag-nuts  { background: #d8b48a; color: #4a2f12; }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 14px; z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }
.noscript { padding: 20px; text-align: center; }

@media (min-width: 560px) {
  .category { padding-left: 20px; padding-right: 20px; }
  .brand { max-width: 270px; }
}

body:has(dialog[open]) { overflow: hidden; }

/* Optional dish photos */
.item { overflow: hidden; }
.item.has-img { padding: 0; }
.item.has-img .item-body { padding: 12px 14px 12px; }
.item-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--sage-soft); }
.theme-forest .item-img { background: rgba(255,255,255,.08); }
.tags span { font-size: 13px; }
.legend span[role="img"] { margin-right: 2px; }
.item-actions.builder-top { justify-content: flex-start; margin: 10px 0 2px; }
/* Compact row for simple items (no description/macros), e.g. most drinks */
.item.compact { padding: 8px 10px 8px 14px; }
.item.compact .item-body { display: flex; align-items: center; gap: 10px; }
.item.compact .item-head { flex: 1; min-width: 0; }
.item.compact .item-foot { margin: 0; }
.item.compact .item-meta { display: none; }
.item.compact .item-actions { margin: 0; }

/* Mode toggle: Dining in (view only) | Pickup / Delivery */
.mode-bar { background: var(--forest); padding: 0 16px 14px; text-align: center; }
.mode-toggle {
  display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; max-width: 360px;
  padding: 4px; border-radius: 999px; background: rgba(0,0,0,.18); border: 1px solid rgba(244,238,223,.22);
}
.mode-pill {
  appearance: none; border: 0; background: none; color: var(--cream); cursor: pointer;
  border-radius: 999px; min-height: 40px; padding: 8px 12px; font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.mode-pill[aria-checked="true"] { background: var(--cream); color: var(--forest-deep); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.dinein-note { margin: 10px 0 0; font-size: 13.5px; color: var(--sage-soft); font-style: italic; }
.mode-toggle[hidden] + .dinein-note { margin-top: 0; }

/* Dine-in = view only: no add buttons, no cart */
.mode-dinein .item-actions:empty { display: none; }
.mode-dinein .cart-bar { display: none !important; }
body.mode-dinein { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* Cart: GoSend / GrabExpress instructions */
.driver-info {
  background: var(--sage-soft); border: 1px solid #c9d6c3; border-radius: 12px;
  padding: 9px 12px; margin: 2px 0 4px; font-size: 13px; line-height: 1.4; color: var(--forest-deep);
}
.driver-info strong { display: block; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
.driver-info p { margin: 0; }
textarea[aria-invalid="true"] { border-color: var(--danger); }
#f-address { margin-top: 0; }

/* add-on thumbnails (Make Your Own Breakfast) */
.builder-groups li:has(.b-thumb) { align-items: center; padding: 3px 0; }
.builder-groups .b-thumb { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: cover; background: var(--cream); box-shadow: 0 0 0 1px var(--line); }
.builder-groups .b-thumb-empty { background: var(--sage-soft); box-shadow: none; opacity: .55; }
.builder-groups li:has(.b-thumb) .b-dots { transform: none; align-self: center; }
.builder-groups ul.plain li:has(.b-thumb) .b-name { line-height: 1.2; }
.opt .opt-thumb { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; background: var(--cream); box-shadow: 0 0 0 1px var(--line); }
.opt .opt-thumb-empty { background: var(--sage-soft); box-shadow: none; opacity: .55; }
