:root {
  --blue: #2340c8;
  --blue-deep: #1a36a8;
  --navy: #12263f;
  --orange: #ff8a3d;
  --orange-hot: #f06e1c;
  --cream: #fff8e8;
  --cream-deep: #ebe6d4;
  --paper: #ffffff;
  --text: #14161f;
  --muted: #454555;
  --mist: #dce3f2;
  --border: #12263f;
  --danger: #b42318;
  --ok: #1f7a4c;
  --shadow: 4px 4px 0 #12263f;
  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Arial Black", Impact, sans-serif;
  --check: repeating-conic-gradient(#12263f 0 25%, #fff8e8 0 50%) 0 0 / 14px 14px;
  --header-h: 72px;
  --cats-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(84px + var(--safe-bottom));
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

/* ——— Sticky top bar (matches homepage nav) ——— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  color: var(--navy);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 14px;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  line-height: 1;
  flex: 0 0 auto;
}
.brand-mark-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  color: var(--blue);
  text-shadow: 2px 2px 0 var(--navy);
  padding-right: 2px;
}
.brand-mark-row {
  display: flex;
  align-items: center;
}
.brand-mark-eats {
  transform: rotate(-4deg);
  background: var(--orange);
  color: var(--navy);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px 3px;
  border: 2px solid var(--navy);
  box-shadow: 2px 2px 0 var(--navy);
}

.brand {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  display: inline-block;
}
.brand em {
  font-style: normal;
  color: var(--orange);
}
.brand-logo {
  display: inline-flex;
  align-items: center;
  max-width: min(180px, 48vw);
}
.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}
.tagline {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  flex: 1 1 auto;
  min-width: 0;
}
.topbar-meta {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  text-align: right;
}
.topbar-addr {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
.topbar-phone {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.topbar-phone:hover { color: var(--blue); }

.cart-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 3px solid var(--navy);
  background: var(--orange);
  color: var(--navy);
  border-radius: 999px;
  padding: 9px 16px 10px;
  font: inherit;
  font-family: var(--display);
  font-weight: 800;
  cursor: pointer;
  min-height: 46px;
  box-shadow: 4px 4px 0 var(--navy);
}
.cart-chip:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--navy);
}
.cart-chip-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cart-chip-count {
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--cream);
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}
.cart-chip-total { font-size: 0.95rem; }

.checker {
  height: 14px;
  background: var(--check);
  border-top: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
}

/* legacy meta-line used on status/pay pages */
.meta-line {
  margin: 6px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58vw;
}
.meta-line a { color: var(--blue); text-decoration: none; }
.meta-line .dot { opacity: 0.45; margin: 0 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.menu-empty {
  margin: 24px 14px;
  padding: 18px 16px;
  text-align: center;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.paused {
  display: none;
  margin: 10px 12px 0;
  background: var(--orange);
  color: var(--navy);
  border: 3px solid var(--navy);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--navy);
}
.paused.show { display: block; }

/* ——— Centered category bar + menu layout ——— */
.menu-shell {
  display: flex;
  flex-direction: column;
  max-width: 920px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
}

.menu-cats {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--cream);
}

.menu-cats-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 12px 12px;
  border-bottom: 2px solid var(--navy);
}

.cats-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 2px solid var(--navy);
  background: var(--paper);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--navy);
}
.cats-search:hover {
  background: var(--orange);
}
.cats-search:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--navy);
}
.cats-search-icon {
  display: block;
  flex: 0 0 auto;
}
.cats-search-label { line-height: 1; }

.cat-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 2px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
}
.cat-rail::-webkit-scrollbar { display: none; }

.cat-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 2px solid var(--navy);
  background: var(--paper);
  color: var(--navy);
  text-align: center;
  padding: 7px 12px;
  font: inherit;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--navy);
}
.cat-tab:hover { background: #fff3e0; }
.cat-tab.active {
  background: var(--orange);
  color: var(--navy);
}
.cat-tab:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--navy);
}

.menu {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 4px 0 12px;
}

.cat-section {
  scroll-margin-top: calc(var(--header-h) + var(--cats-h) + 8px);
  margin: 0;
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  margin: 14px 12px 8px;
  position: sticky;
  top: calc(var(--header-h) + var(--cats-h));
  z-index: 15;
  background: linear-gradient(180deg, var(--cream) 72%, rgba(255, 248, 232, 0));
  padding: 4px 0 10px;
}

/* ——— Full-screen search ——— */
.search-screen {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.search-screen.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.search-screen-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-top, 0px));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: var(--blue);
  border-bottom: 3px solid var(--navy);
}
.search-back {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 3px solid var(--navy);
  border-radius: 12px;
  background: var(--cream);
  color: var(--navy);
  font: inherit;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--navy);
}
.search-screen-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 3px solid var(--navy);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 700;
  font-size: 16px; /* prevent iOS zoom on focus */
  color: var(--navy);
  background: var(--cream);
  box-shadow: 2px 2px 0 var(--navy);
}
.search-screen-input:focus {
  outline: 3px solid var(--orange);
  outline-offset: 1px;
}
.search-screen-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0 calc(24px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.search-hint {
  margin: 28px 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}
.search-cat-label {
  margin: 14px 14px 6px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}
.cat-head h2 {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 8px;
}
.cat-head::after {
  content: "";
  flex: 1;
  border-top: 3px dotted var(--navy);
  opacity: 0.5;
}

.item-list {
  background: var(--paper);
  border: 2px solid var(--navy);
  border-radius: 16px;
  margin: 0 12px 12px;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--navy);
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 14px 14px;
  border-bottom: 2px solid rgba(18, 38, 63, 0.12);
  cursor: pointer;
  background: var(--paper);
  min-height: 68px;
}
.item:last-child { border-bottom: 0; }
.item:active { background: #fff3e0; }
.item.soldout {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.item-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.15;
}
.item-desc {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-prices {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.price-pill {
  display: inline-block;
  background: var(--orange);
  color: var(--navy);
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 9px 3px;
  border-radius: 999px;
  border: 2px solid var(--navy);
  letter-spacing: 0.01em;
}
.price-pill.ghost {
  background: var(--paper);
  color: var(--navy);
}

.item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.item-price-main {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
  white-space: nowrap;
}
.add-plus {
  width: 42px;
  height: 42px;
  border: 3px solid var(--navy);
  border-radius: 12px;
  background: var(--blue);
  color: var(--cream);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 3px 3px 0 var(--navy);
}
.add-plus:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--navy);
}
.add-plus:disabled {
  background: #9aa3b2;
  cursor: not-allowed;
  box-shadow: none;
}

/* ——— Floating cart bar ——— */
.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--navy);
  color: var(--cream);
  border-radius: 999px;
  padding: 12px 14px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  border: 3px solid var(--navy);
  width: auto;
  font: inherit;
  font-family: var(--display);
  font-weight: 800;
  min-height: 54px;
}
.cart-bar.empty {
  background: #3a4654;
  opacity: 0.95;
}
.cart-bar-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cart-bar-badge {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--navy);
  border: 2px solid var(--cream);
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
}
.cart-bar strong {
  background: var(--orange);
  color: var(--navy);
  padding: 7px 12px;
  border-radius: 999px;
  border: 2px solid var(--cream);
  font-weight: 800;
  font-size: 0.9rem;
}

/* ——— Drawer ——— */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 32, 48, 0.52);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  max-height: 94vh;
  height: min(94vh, 820px);
  background: var(--cream);
  border: 3px solid var(--navy);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  transform: translateY(105%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -6px 0 rgba(18, 38, 63, 0.12);
  overflow: hidden;
}
.drawer.open { transform: translateY(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--blue);
  color: var(--cream);
  border-bottom: 3px solid var(--navy);
  border-radius: 18px 18px 0 0;
  flex: 0 0 auto;
}
.drawer-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.drawer-sub {
  margin: 3px 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.78;
}
.icon-btn {
  border: 2px solid var(--navy);
  background: var(--cream);
  color: var(--navy);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 2px 2px 0 var(--navy);
}
.icon-btn.dark {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--cream);
  box-shadow: none;
}

.drawer-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px 14px 8px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-section {
  background: var(--paper);
  border: 2px solid var(--navy);
  border-radius: 14px;
  padding: 12px 12px 10px;
  box-shadow: 3px 3px 0 var(--navy);
}
.cart-section--last { margin-bottom: 2px; }
.cart-section-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
}
.cart-section .field.compact:first-of-type { margin-top: 0; }
.cart-section .field.compact:last-child { margin-bottom: 0; }
.cart-section .seg { margin-bottom: 0; }
.cart-section .tips { margin-bottom: 0; }

.cart-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--cream);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
}
.cart-empty[hidden] { display: none; }

.cart-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.cart-line:first-child { padding-top: 0; }
.cart-line:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}
.cart-line .title {
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--text);
}
.cart-line .price {
  font-weight: 900;
  font-size: 0.9rem;
  white-space: nowrap;
}
.cart-line .meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  grid-column: 1 / -1;
  line-height: 1.35;
}
.cart-line .line-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}
.cart-line .qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.cart-line .qty-stepper button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.cart-line .qty-stepper button:active { background: var(--cream); }
.cart-line .qty-stepper span {
  min-width: 28px;
  text-align: center;
  font-weight: 900;
  font-size: 0.88rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 34px;
}
.cart-line .remove {
  border: 0;
  background: none;
  color: var(--danger);
  padding: 6px 2px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.drawer-foot {
  flex: 0 0 auto;
  background: var(--paper);
  border-top: 2px solid var(--border);
  padding: 12px 14px calc(12px + var(--safe-bottom));
  box-shadow: 0 -6px 18px rgba(16, 32, 48, 0.06);
  position: relative;
  z-index: 20;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}
.details-grid {
  margin: 0 0 8px;
}
.details-grid > .field.compact {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}
.details-grid > .field.compact label {
  min-height: 1.1em;
  line-height: 1.1;
}
.details-grid > .field.compact input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.field { margin: 10px 0; }
.field.compact { margin: 8px 0; }
.field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.optional { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 2px solid var(--navy);
  border-radius: 10px;
  padding: 11px 10px;
  font: inherit;
  font-weight: 600;
  background: #fff;
  font-size: 16px; /* prevent iOS zoom on focus */
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 2px 2px 0 var(--navy);
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.seg button {
  border: 2px solid var(--navy);
  background: #fff;
  border-radius: 999px;
  padding: 11px;
  font-family: var(--display);
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  min-height: 44px;
  box-shadow: 2px 2px 0 var(--navy);
}
.seg button.active {
  background: var(--navy);
  color: var(--cream);
}
.seg button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.hours-hint {
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
}
.hours-hint strong {
  color: var(--navy);
  font-weight: 800;
}

.field select {
  width: 100%;
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 11px 10px;
  font: inherit;
  font-weight: 600;
  background: #fff;
  font-size: 16px; /* prevent iOS zoom on focus */
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%),
    linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 2px 2px 0 var(--navy);
}

.tips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tips button {
  border: 2px solid var(--navy);
  background: #fff;
  border-radius: 999px;
  padding: 10px 4px;
  font-family: var(--display);
  font-weight: 800;
  cursor: pointer;
  min-height: 42px;
  box-shadow: 2px 2px 0 var(--navy);
}
.tips button.active {
  background: var(--orange);
  color: var(--navy);
}

.totals {
  font-size: 0.88rem;
}
.totals .row {
  display: flex;
  justify-content: space-between;
  margin: 2px 0;
  font-weight: 700;
  color: var(--muted);
}
.totals .row[hidden] { display: none !important; }
.totals .row.total {
  color: var(--navy);
  font-weight: 900;
  font-size: 1.08rem;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1.5px solid var(--border);
}
.totals-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  margin-top: 10px;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: var(--orange);
  color: var(--navy);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  padding: 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 52px;
  box-shadow: 4px 4px 0 var(--navy);
}
.checkout-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--navy);
}
.checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

@media (min-width: 720px) {
  .drawer {
    left: auto;
    right: 16px;
    bottom: 16px;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    height: min(760px, calc(100vh - 32px));
    border-radius: 18px;
  }
  .drawer-head { border-radius: 18px 18px 0 0; }
}

.err {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
  font-weight: 800;
}
.err.show { display: block; }

/* ——— Item modal ——— */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 32, 48, 0.55);
  z-index: 80;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 94vh;
  background: var(--cream);
  border: 3px solid var(--navy);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 0 rgba(18, 38, 63, 0.15);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 8px;
  border-bottom: 1px solid var(--border);
}
.modal-title-block { min-width: 0; flex: 1; }
.modal h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
  font-size: 1.25rem;
}
.modal .desc {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}
.modal-price {
  margin: 6px 0 0;
  font-weight: 900;
  color: var(--orange-hot);
  font-size: 0.95rem;
}

.modal-scroll {
  overflow: auto;
  padding: 4px 14px 8px;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.opt-group {
  margin: 10px 0;
  border: 2px solid var(--navy);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  box-shadow: 2px 2px 0 var(--navy);
}
.opt-group .title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--navy);
}
.badge {
  background: var(--orange);
  color: var(--navy);
  font-size: 0.62rem;
  padding: 3px 7px;
  border-radius: 999px;
  border: 2px solid var(--navy);
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
}
.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-top: 1px dashed var(--border);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 44px;
}
.opt:first-of-type { border-top: 0; }
.opt input { width: 18px; height: 18px; accent-color: var(--blue); }
.opt .price {
  margin-left: auto;
  color: var(--orange-hot);
  font-size: 0.82rem;
  font-weight: 800;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--cream);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.stepper button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}
.stepper span {
  min-width: 1.4rem;
  text-align: center;
  font-weight: 900;
}

.add-btn {
  flex: 1;
  border: 3px solid var(--navy);
  border-radius: 999px;
  background: var(--orange);
  color: var(--navy);
  font-family: var(--display);
  font-weight: 800;
  padding: 12px 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  box-shadow: 3px 3px 0 var(--navy);
}
.add-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* Status / pay pages reuse */
body:has(.status-page) {
  padding-bottom: calc(24px + var(--safe-bottom));
}
.status-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 12px;
}
.status-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 18px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8eefc;
  color: var(--blue);
  font-weight: 900;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.paid { background: #e7f7ee; color: var(--ok); }
.pill.pending { background: #fff0e0; color: #8a4b00; }

@media (min-width: 720px) {
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal {
    border-radius: 18px;
    border-bottom: 3px solid var(--navy);
    max-height: 88vh;
  }
  .menu-shell {
    border-left: 2px solid var(--navy);
    border-right: 2px solid var(--navy);
    background: var(--cream);
  }
  .menu-cats-inner {
    padding: 12px 16px;
    justify-content: center;
  }
  .cat-rail {
    flex: 0 1 auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .menu { padding-top: 8px; }
  .item-list {
    margin: 0 14px 14px;
  }
  .cat-head { margin-left: 14px; margin-right: 14px; }
  .cat-tab { font-size: 0.78rem; padding: 8px 14px; }
  .search-screen-body { max-width: 720px; margin: 0 auto; width: 100%; }
  .topbar-inner { padding: 16px 28px; }
  .topbar-meta { display: flex; }
  .topbar-actions { gap: 18px; }
}

@media (max-width: 480px) {
  .topbar-inner { padding: 12px 12px; gap: 10px; }
  .brand-mark-name { font-size: clamp(1.55rem, 7vw, 1.9rem); }
  .cart-chip {
    padding: 8px 12px 9px;
    gap: 6px;
    box-shadow: 3px 3px 0 var(--navy);
    border-width: 2px;
    min-height: 44px;
  }
  .cart-chip-label { font-size: 0.85rem; }
  .menu-cats-inner { padding: 8px 10px 10px; gap: 6px; }
  .cats-search { padding: 8px 10px; }
  .cats-search-label { display: none; }
  .item { padding: 12px; gap: 4px 8px; }
  .item-list { margin: 0 10px 10px; }
  .cat-head { margin-left: 10px; margin-right: 10px; }
  .drawer {
    max-height: 96dvh;
    height: min(96dvh, 820px);
  }
  .drawer-body { padding: 12px 12px 8px; }
  .grid-2 { grid-template-columns: 1fr; }
  .tips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tips button { min-height: 44px; padding: 8px 4px; font-size: 0.85rem; }
  .seg button { min-height: 44px; }
  .status-page { padding: 16px 12px; }
  .brand-logo { max-width: min(140px, 42vw); }
  .brand-logo img { max-height: 48px; }
}

@media (max-width: 380px) {
  .grid-2 { grid-template-columns: 1fr; }
  .cart-chip-total { display: none; }
  .cart-chip { padding: 9px 12px 10px; }
  .cart-chip-label { display: none; }
  .item-price-main { font-size: 0.9rem; }
  .add-plus { width: 40px; height: 40px; }
}

.addr-autocomplete {
  position: relative;
  z-index: 30;
}
.addr-suggest {
  position: absolute;
  left: 0;
  right: 0;
  /* Open upward so the list doesn't cover sticky checkout totals */
  bottom: calc(100% + 4px);
  top: auto;
  z-index: 50;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 -8px 24px rgba(16, 32, 48, 0.12);
  max-height: min(200px, 36vh);
  overflow: auto;
}
.addr-suggest.addr-suggest--down {
  top: calc(100% + 4px);
  bottom: auto;
  box-shadow: var(--shadow);
}
.addr-suggest[hidden] { display: none !important; }
.addr-suggest li {
  margin: 0;
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.addr-suggest li:last-child { border-bottom: 0; }
.addr-suggest li:hover,
.addr-suggest li.active {
  background: var(--cream);
}
.addr-suggest li small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.addr-status {
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
}
.addr-status.ok { color: var(--ok); }
.addr-status.bad { color: var(--danger); }
.addr-status.warn,
.addr-status.pending { color: var(--muted); }
