:root {
  --paper: #FAF8F4;
  --surface: #FFFFFF;
  --soft: #EFEAE1;
  --hairline: #E6E0D6;
  --border-strong: #C9C0B3;
  --espresso: #1A1614;
  --stone: #686058;
  --muted: #6F675E;
  --chili: #C83E2B;
  --chili-dark: #A83121;
  --chili-soft: #FDF0ED;
  --chili-border: #F0C4BC;
  --chili-ink: #962A1B;
  --cardamom: #1F5E3B;
  --cardamom-soft: #EAF4EE;
  --saffron-soft: #FDF3E1;
  --saffron-border: #E8CA94;
  --saffron-ink: #8A4A0B;
  --saffron-gold: #F4C86C;
  --radius-control: 8px;
  --radius-card: 16px;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--espresso); font-family: var(--font-sans); font-size: 14px; font-weight: 400; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--espresso); font-size: 14px; font-weight: 400; overflow-x: clip; }
h1, h2, h3, strong, b { font-weight: 600; }
h1, h2, h3 { text-wrap: balance; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; scroll-margin-top: 84px; scroll-margin-bottom: 120px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--chili); outline-offset: 2px; }

/* ---- Unified button component ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.btn-sm { height: 32px; min-width: 32px; padding: 0 12px; font-size: 14px; }
.btn-md { height: 40px; min-width: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 48px; min-width: 48px; padding: 0 20px; font-size: 16px; }
.btn.primary { background: var(--chili); border-color: var(--chili); color: var(--surface); }
.btn.primary:hover:not(:disabled) { background: var(--chili-dark); border-color: var(--chili-dark); }
.btn.secondary { background: var(--surface); border-color: var(--hairline); color: var(--espresso); }
.btn.secondary:hover:not(:disabled) { background: var(--soft); border-color: var(--border-strong); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--chili); padding: 0; height: auto; min-width: 0; font-size: 12px; }
.btn.quiet:hover:not(:disabled) { color: var(--chili-dark); }
.btn:disabled { background: var(--hairline); border-color: var(--hairline); color: var(--stone); cursor: not-allowed; }

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-group { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.brand {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-decoration: none;
  color: var(--espresso);
  line-height: 1;
}
.brand em { font-style: normal; color: var(--chili); }
.location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--stone);
  white-space: nowrap;
}
.location svg { color: var(--chili); flex: none; }

.top-actions { display: flex; align-items: center; gap: 12px; }
.persona-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  transition: border-color 140ms ease;
}
.persona-wrap:hover { border-color: var(--border-strong); }
.persona-label { font-size: 12px; font-weight: 600; color: var(--stone); white-space: nowrap; }
.persona {
  border: 0;
  background: var(--soft);
  border-radius: var(--radius-control);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--espresso);
  cursor: pointer;
  transition: background-color 140ms ease;
}
.persona:hover { background: var(--hairline); }
.bts-label-short { display: none; }
.bts-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: var(--radius-control);
  background: var(--cardamom-soft);
  color: var(--cardamom);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- Main wrapper & Hero ---- */
.page-wrap { max-width: 1240px; margin: 0 auto; padding: 28px 24px 64px; }
body:has(.loyalty-bar) .page-wrap { padding-bottom: 128px; }

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; }
.kitchen-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cardamom);
}
.kitchen-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cardamom);
  display: inline-block;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  max-width: 16ch;
}
.hero-lead {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--stone);
  max-width: 54ch;
  text-wrap: pretty;
}

.live-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.live-cell {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.live-cell + .live-cell { border-left: 1px solid var(--hairline); }
.live-k { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--muted); }
.live-v {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--espresso);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-v svg { color: var(--chili); flex: none; }
.live-cell small { font-size: 12px; line-height: 1.3; color: var(--stone); }
.why-link {
  align-self: flex-start;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-photo {
  margin: 0;
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 232px;
  border: 1px solid var(--hairline);
  background: var(--espresso);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  background: rgba(26, 22, 20, 0.86);
  backdrop-filter: blur(6px);
  color: var(--surface);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.hero-photo figcaption span { font-size: 12px; color: var(--hairline); }
.hero-photo figcaption strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Surge banner ---- */
.surge-banner {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius-card);
  background: var(--saffron-soft);
  border: 1px solid var(--saffron-border);
  color: var(--saffron-ink);
  display: flex;
  align-items: center;
  gap: 12px;
}
.surge-ico {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-control);
  background: rgba(244, 200, 108, 0.45);
  display: grid;
  place-items: center;
  flex: none;
}
.surge-copy { flex: 1 1 220px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 14px; line-height: 1.4; }
.surge-copy strong { font-weight: 600; }
.surge-copy span { color: var(--saffron-ink); font-size: 14px; }
.surge-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--saffron-ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--saffron-border);
  border-radius: var(--radius-control);
  padding: 4px 12px;
  white-space: nowrap;
  flex: none;
}

/* ---- Store 2-column layout ---- */
.store-layout {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 28px;
  align-items: start;
}
.store-layout > *, .hero-copy, .menu-col, .menu-head { min-width: 0; }
.menu-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.menu-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.menu-head p { margin: 4px 0 0; font-size: 14px; color: var(--stone); }

.chips-wrap { position: relative; max-width: 100%; }
.chips-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(250, 248, 244, 0), var(--paper) 85%);
  opacity: 0;
  transition: opacity 140ms ease;
}
.chips-wrap.can-scroll::after { opacity: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { color: var(--stone); flex: none; }
.chip:hover:not(.on) { border-color: var(--border-strong); color: var(--espresso); }
.chip.on { background: var(--espresso); color: var(--surface); border-color: var(--espresso); }
.chip.on:hover { background: var(--espresso); border-color: var(--espresso); color: var(--surface); }

/* ---- Menu items (editorial photo rows) ---- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.dish-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  align-items: stretch;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.dish-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px rgba(26, 22, 20, 0.08);
}
.dish-media {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-control);
  overflow: hidden;
  background: var(--soft);
  align-self: center;
}
.dish-media img { width: 100%; height: 100%; object-fit: cover; }

.dish-body { display: flex; flex-direction: column; min-width: 0; }
.dish-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dietary {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--cardamom);
  display: inline-grid;
  place-items: center;
  flex: none;
}
.dietary i { width: 6px; height: 6px; border-radius: 50%; background: var(--cardamom); display: block; }
.dietary.nonveg { border-color: var(--chili); }
.dietary.nonveg i { background: var(--chili); border-radius: 1px; transform: rotate(45deg); width: 6px; height: 6px; }
.dish-tag { font-size: 12px; font-weight: 600; color: var(--stone); }
.dish-prep { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.dish-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--espresso);
}
.dish-body p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--stone);
  flex: 1;
}
.dish-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.dish-price { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

.stepper { display: inline-flex; align-items: center; gap: 8px; }
.qty { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.step.plus { padding: 0 12px; gap: 4px; }
.step.minus { width: 32px; padding: 0; font-size: 16px; }

/* ---- Desktop sticky bag rail ---- */
.cart-panel {
  position: sticky;
  top: 84px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}
.cart-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.cart-rail-title { display: flex; align-items: center; gap: 12px; }
.cart-rail-title svg { color: var(--espresso); }
.cart-rail-title h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 0; }
.cart-rail-title small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.cart-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-control);
  background: var(--soft);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.cart-panel.has-items .cart-badge { background: var(--chili); color: var(--surface); }

.cart-empty { padding: 8px 0; text-align: left; }
.cart-empty p { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--espresso); }
.cart-empty small { display: block; font-size: 14px; line-height: 1.5; color: var(--stone); }

.cart-lines { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.cart-lines li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}
.cl-qty { font-weight: 600; color: var(--chili); font-variant-numeric: tabular-nums; }
.cl-name { color: var(--espresso); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-price { font-weight: 600; font-variant-numeric: tabular-nums; }

.cart-summary {
  margin: 8px 0 12px;
  padding: 8px 0 0;
  border-top: 1px dashed var(--hairline);
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--stone);
}
.cart-summary div { display: flex; justify-content: space-between; align-items: baseline; }
.cart-summary .muted { color: var(--muted); }
.cart-summary dt, .cart-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.cart-summary .perk dd { color: var(--cardamom); font-weight: 600; }
.cart-summary .total {
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
  color: var(--espresso);
}
.cart-quote-note {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: var(--radius-control);
  background: var(--chili-soft);
  border: 1px solid var(--chili-border);
  color: var(--chili-ink);
  font-size: 12px;
  line-height: 1.45;
}

.cart-mobile-info { display: none; }
.cta-mobile { display: none; }
.checkout-cta { width: 100%; }

/* ---- Sticky loyalty upsell bar (z-index 10, pinned to bottom 76px) ---- */
.loyalty-bar {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 76px;
  background: var(--espresso);
  color: var(--surface);
  border-top: 2px solid var(--saffron-gold);
  box-shadow: 0 -10px 28px rgba(26, 22, 20, 0.22);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px max(calc((100vw - 1200px) / 2), 24px);
}
body.order-confirmed .loyalty-bar,
body:has(#checkout.open #order-confirmed:not([hidden])) .loyalty-bar {
  display: none;
}
.loyalty-spark {
  pointer-events: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-control);
  background: rgba(244, 200, 108, 0.18);
  color: var(--saffron-gold);
  display: grid;
  place-items: center;
  flex: none;
}
.loyalty-copy { flex: 1; min-width: 0; pointer-events: none; }
.loyalty-copy strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--surface); }
.loyalty-copy span { display: block; font-size: 12px; line-height: 1.35; color: var(--hairline); margin-top: 4px; }
.btn.secondary.loyalty-cta {
  background: transparent;
  border-color: var(--saffron-border);
  color: var(--saffron-gold);
  flex: none;
}
.btn.secondary.loyalty-cta:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--saffron-gold);
  color: var(--saffron-gold);
}

/* ---- Checkout modal & Express sheet ---- */
.shade {
  position: fixed;
  z-index: 7;
  inset: 0;
  background: rgba(26, 22, 20, 0.48);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.shade.open { display: flex; }
/* Classic & Split Pay sit above the loyalty bar so the scrim dims it */
.shade:not(.express) { z-index: 12; }
/* Express sheet stays below the loyalty bar (z-index 7 < 10) */
.shade.express { align-items: flex-end; padding: 0; }

.panel {
  width: min(500px, 100%);
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  position: relative;
  box-shadow: 0 24px 64px rgba(26, 22, 20, 0.28);
  max-height: 92vh;
  overflow-y: auto;
}
/* Express sheet sits flush at bottom:0 so its Place order button sits behind the loyalty bar */
.panel.express {
  width: min(560px, 100%);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  padding: 16px 24px;
  max-height: 90vh;
}
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-control);
  background: var(--hairline);
  margin: 0 auto 12px;
}
.close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.variant-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--chili-ink);
  background: var(--chili-soft);
  padding: 4px 8px;
  border-radius: var(--radius-control);
  margin-bottom: 8px;
}
.panel-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.sub { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--stone); text-wrap: pretty; }

.eta-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  background: var(--paper);
  margin-bottom: 12px;
  font-size: 14px;
}
.eta-card small { display: block; color: var(--stone); font-size: 12px; margin-top: 4px; }
.eta-fee { font-variant-numeric: tabular-nums; color: var(--cardamom); }

.lines { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
.lines li { display: flex; justify-content: space-between; padding: 4px 0; }
.lines li b { font-variant-numeric: tabular-nums; }

.totals {
  margin: 0 0 12px;
  padding: 8px 0 4px;
  border-top: 1px dashed var(--hairline);
  font-size: 12px;
  color: var(--stone);
}
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals dt, .totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .grand {
  color: var(--espresso);
  font-weight: 600;
  font-size: 16px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--hairline);
}

.pay-option, .express-pay-pill {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  padding: 12px;
  margin: 8px 0;
  font-size: 14px;
  cursor: pointer;
}
.pay-option small, .express-pay-pill small { display: block; color: var(--stone); font-size: 12px; margin-top: 4px; }
.pay-option.on, .express-pay-pill { border-color: var(--chili-border); background: var(--chili-soft); }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; }
.on .radio, .express-pay-pill .radio { border-color: var(--chili); background: radial-gradient(var(--chili) 42%, var(--surface) 46%); }

.split-schedule {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  padding: 12px;
  background: var(--paper);
}
.split-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.split-head span { color: var(--stone); font-size: 12px; }
.split-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.split-step {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  padding: 8px 12px;
  text-align: center;
}
.split-step.now { border-color: var(--chili); background: var(--chili-soft); }
.split-step span { display: block; font-size: 12px; color: var(--stone); }
.split-step strong { display: block; font-size: 14px; margin-top: 4px; font-variant-numeric: tabular-nums; }

.error {
  border: 1px solid var(--chili-border);
  background: var(--chili-soft);
  color: var(--chili-ink);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.45;
  margin: 8px 0;
}
.error b { display: block; font-size: 14px; margin-bottom: 4px; }

.place { width: 100%; margin-top: 12px; }
.panel.express .place { margin-bottom: 0; }

.confirmed { text-align: center; padding: 24px 8px 16px; }
.tick {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cardamom-soft);
  color: var(--cardamom);
  font-size: 28px;
  font-weight: 600;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.confirmed h2 { font-family: var(--font-display); font-size: 22px; margin: 0 0 8px; }
.confirmed p { color: var(--stone); font-size: 14px; margin: 0 0 20px; }
#order-id { letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.confirmed-done { margin: 0 auto; }

/* ---- Behind the scenes slide-over drawer ---- */
.bts-backdrop {
  position: fixed;
  z-index: 19;
  inset: 0;
  background: rgba(26, 22, 20, 0.36);
}
.bts-drawer {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--paper);
  border-left: 1px solid var(--hairline);
  box-shadow: -16px 0 48px rgba(26, 22, 20, 0.18);
  display: flex;
  flex-direction: column;
}
.bts-head {
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.bts-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bts-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 0; }
.bts-head p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--stone); text-wrap: pretty; }
.bts-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-control);
  background: var(--cardamom-soft);
  color: var(--cardamom);
  font-size: 12px;
  font-weight: 600;
}
.bts-live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--cardamom); }
.bts-close { width: 32px; height: 32px; padding: 0; font-size: 18px; flex: none; }

.bts-scroll { padding: 16px 20px 24px; overflow-y: auto; flex: 1; display: grid; gap: 16px; align-content: start; }
.bts-section h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--stone); }
.bts-sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.bts-sec-head h3 { margin: 0; }
.bts-sec-head span { font-size: 12px; color: var(--muted); }

.bts-visitor-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 16px;
  display: grid;
  gap: 12px;
}
.bts-visitor-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.bts-visitor-top strong { font-size: 16px; }
.bts-id { font-family: var(--font-mono); font-size: 12px; color: var(--stone); background: var(--paper); padding: 4px 8px; border-radius: var(--radius-control); }
.bts-traits { display: flex; flex-wrap: wrap; gap: 8px; }
.bts-trait {
  display: inline-flex;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  overflow: hidden;
  font-size: 12px;
}
.bts-trait code { font-family: var(--font-mono); background: var(--paper); padding: 4px 8px; color: var(--stone); }
.bts-trait span { padding: 4px 8px; font-weight: 600; background: var(--surface); }

.bts-segments-row { display: grid; gap: 8px; }
.bts-sublabel { font-size: 12px; font-weight: 600; color: var(--muted); }
.bts-segs { display: flex; flex-wrap: wrap; gap: 8px; }
.bts-seg {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-control);
  background: var(--soft);
  color: var(--stone);
}
.bts-seg.active { background: var(--cardamom-soft); color: var(--cardamom); font-weight: 600; }
.bts-note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--stone); text-wrap: pretty; }

.bts-flag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bts-flag {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 12px 16px;
}
.bts-flag-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bts-flag-head strong { display: block; font-size: 14px; }
.bts-key { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.bts-val {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-control);
  white-space: nowrap;
  flex: none;
}
.bts-val.tone-on { background: var(--cardamom-soft); color: var(--cardamom); }
.bts-val.tone-off { background: var(--soft); color: var(--stone); }
.bts-val.tone-variant { background: var(--chili-soft); color: var(--chili-ink); }
.bts-val.tone-config { background: var(--saffron-soft); color: var(--saffron-ink); }
.bts-why { margin: 8px 0; font-size: 14px; line-height: 1.45; color: var(--espresso); text-wrap: pretty; }
.bts-reader { font-size: 12px; color: var(--muted); }

.bts-footer-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--stone); }

/* ---- Toast (bottom-anchored, above bars) ---- */
.toast {
  position: fixed;
  z-index: 25;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: var(--espresso);
  color: var(--surface);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(26, 22, 20, 0.25);
  display: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body:has(.loyalty-bar) .toast { bottom: 96px; }
.toast.show { display: block; }

/* ---- Tablet & Mobile (< 1024px) ---- */
@media (max-width: 1023px) {
  .hero-band { grid-template-columns: 1fr; gap: 20px; }
  .hero-photo { min-height: 192px; max-height: 220px; }
  .store-layout { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }

  /* Collapse desktop right rail into compact floating bottom dock on <1024px */
  .cart-panel {
    position: fixed;
    z-index: 6;
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-height: none;
    overflow: visible;
    padding: 12px 16px;
    border-radius: var(--radius-card);
    background: var(--espresso);
    color: var(--surface);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 16px 36px rgba(26, 22, 20, 0.3);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .cart-panel.has-items { display: flex; }
  body:has(.loyalty-bar) .cart-panel.has-items { bottom: 104px; }
  body:has(.cart-panel.has-items) .page-wrap { padding-bottom: 112px; }
  body:has(.loyalty-bar):has(.cart-panel.has-items) .page-wrap { padding-bottom: 200px; }

  /* Toast sits just above the bag bar (and above loyalty bar) */
  body:has(.cart-panel.has-items) .toast { bottom: 96px; }
  body:has(.loyalty-bar):has(.cart-panel.has-items) .toast { bottom: 184px; }

  .cart-rail-head, .cart-empty, .cart-lines, .cart-summary, .cart-quote-note { display: none !important; }
  .cart-mobile-info { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
  .mobile-count {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius-control);
    background: var(--chili);
    color: var(--surface);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .mobile-text { min-width: 0; }
  .mobile-text strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-text small { display: block; font-size: 12px; color: var(--hairline); margin-top: 4px; }
  .checkout-cta { width: auto; flex: none; padding: 0 16px; }
  .cta-desktop { display: none; }
  .cta-mobile { display: inline; }
}

/* ---- Touch targets (>= 44px on narrow / touch devices) ---- */
@media (max-width: 1023px), (pointer: coarse) {
  .brand { min-height: 44px; display: inline-flex; align-items: center; }
  .persona { min-height: 44px; padding: 8px 12px; }
  .bts-btn, .loyalty-cta, .chip, .step.plus, .step.minus { min-height: 44px; min-width: 44px; height: 44px; }
  .step.minus { width: 44px; }
  .close, .bts-close { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .why-link { min-height: 44px; padding: 8px 0; }
}

/* ---- Narrow Mobile (390px) ---- */
@media (max-width: 640px) {
  .topbar-inner { padding: 0 16px; height: 60px; gap: 8px; }
  .location, .persona-label { display: none; }
  .persona-wrap { padding: 0; border: 0; background: transparent; }
  .bts-btn { padding: 0 12px; }
  .bts-label-full { display: none; }
  .bts-label-short { display: inline; }
  .page-wrap { padding: 16px 16px 48px; }
  body:has(.loyalty-bar) .page-wrap { padding-bottom: 120px; }
  body:has(.cart-panel.has-items) .page-wrap { padding-bottom: 112px; }
  body:has(.loyalty-bar):has(.cart-panel.has-items) .page-wrap { padding-bottom: 200px; }
  .hero-band { gap: 16px; padding-bottom: 20px; }
  .hero-copy h1 { font-size: 32px; }
  .hero-lead { font-size: 14px; margin-bottom: 16px; }
  .hero-photo { min-height: 152px; height: 152px; }
  .live-strip { grid-template-columns: 1fr; }
  .live-cell + .live-cell { border-left: 0; border-top: 1px solid var(--hairline); }
  .surge-banner { flex-wrap: wrap; align-items: flex-start; }
  .surge-copy { flex: 1 1 220px; }
  .surge-note { margin-left: 44px; }
  .chips { padding-right: 28px; }
  .dish-card { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .dish-media { width: 96px; height: 96px; }
  .dish-body h3 { font-size: 16px; }
  .loyalty-bar { padding: 12px 16px; gap: 12px; min-height: 76px; height: auto; }
  .loyalty-copy strong { font-size: 12px; }
  .loyalty-copy span { font-size: 12px; }
  .loyalty-cta { padding: 0 16px; }
  .panel { padding: 20px 16px; }
  .panel.express { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
