:root {
  color-scheme: light;
  --ink: #14201f;
  --muted: #61706d;
  --line: #dce3e0;
  --paper: #ffffff;
  --wash: #f4f7f5;
  --brand: #153f3a;
  --brand-strong: #0b2f2b;
  --accent: #d49632;
  --coral: #c85b4b;
  --success: #24725e;
  --danger: #a33b35;
  --shadow: 0 16px 40px rgba(20, 32, 31, 0.16);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; }
#menu { scroll-margin-top: 84px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(212, 150, 50, 0.55); outline-offset: 2px; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  min-height: 72px;
  padding: 10px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: var(--brand);
  border-bottom: 4px solid var(--accent);
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 800; }
.brand img { width: 48px; height: 48px; padding: 2px; object-fit: contain; border-radius: 4px; background: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.language-control { display: flex; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; padding: 2px; }
.language-button { min-width: 44px; min-height: 40px; border: 0; border-radius: 4px; color: #fff; background: transparent; }
.language-button.active { color: var(--brand-strong); background: #fff; font-weight: 800; }
.icon-command { min-height: 44px; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; padding: 0 12px; color: #fff; background: transparent; display: flex; align-items: center; gap: 7px; }

.menu-toolbar { padding: 28px clamp(16px, 5vw, 72px) 14px; background: var(--wash); border-bottom: 1px solid var(--line); }
.title-row { max-width: 1320px; margin: 0 auto 20px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.venue-line, .sheet-eyebrow { margin: 0 0 5px; color: var(--coral); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1; letter-spacing: 0; }
.service-state { max-width: 300px; padding: 8px 12px; border-left: 4px solid var(--success); color: var(--brand-strong); background: #e7f2ee; font-size: .88rem; }
.service-state.unavailable { border-color: var(--accent); background: #fff3dd; }
.search-field { max-width: 1320px; margin: 0 auto 14px; height: 52px; display: flex; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.search-field input { flex: 1; min-width: 0; border: 0; padding: 0 16px; background: transparent; }
.search-field button { width: 52px; border: 0; background: transparent; color: var(--muted); font-weight: 800; }
.category-nav { max-width: 1320px; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; overscroll-behavior-inline: contain; }
.category-nav::-webkit-scrollbar { display: none; }
.category-button { flex: 0 0 auto; min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-weight: 700; }
.category-button.active { color: #fff; border-color: var(--brand); background: var(--brand); }

.menu-content { max-width: 1464px; min-height: 55vh; margin: 0 auto; padding: 28px clamp(16px, 5vw, 72px) 120px; }
.category-section { scroll-margin-top: 190px; margin-bottom: 42px; }
.category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 9px; margin-bottom: 16px; }
.category-heading h2 { margin: 0; font-size: 1.45rem; }
.category-heading span { color: var(--muted); font-size: .84rem; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.menu-card { min-width: 0; display: grid; grid-template-columns: 132px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.menu-card.sold-out { opacity: .68; }
.menu-card img { width: 132px; height: 100%; min-height: 156px; object-fit: cover; background: var(--wash); }
.menu-card-content { min-width: 0; padding: 14px; display: flex; flex-direction: column; gap: 7px; }
.menu-card h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.menu-description { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag-row { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { padding: 3px 6px; border-radius: 3px; background: var(--wash); color: var(--muted); font-size: .68rem; }
.card-action { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { white-space: nowrap; font-weight: 800; color: var(--brand-strong); }
.add-button { width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: var(--brand); font-size: 1.5rem; line-height: 1; }
.sold-label { color: var(--danger); font-size: .8rem; font-weight: 800; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

.cart-bar { position: fixed; z-index: 35; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(680px, calc(100% - 24px)); min-height: 58px; padding: 0 18px; display: none; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border: 0; border-radius: 6px; color: #fff; background: var(--brand-strong); box-shadow: var(--shadow); }
.cart-bar.visible { display: grid; }
.cart-bar > :last-child { text-align: end; }

.sheet { width: min(680px, 100%); max-width: none; max-height: 92dvh; margin: auto 0 0 auto; padding: 0; border: 0; border-radius: 6px 0 0 0; color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.item-sheet { width: min(620px, 100%); }
.sheet::backdrop { background: rgba(8, 20, 19, .56); }
.sheet-shell { max-height: 92dvh; display: flex; flex-direction: column; }
.sheet-header { min-height: 78px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.sheet-header h2 { margin: 0; font-size: 1.25rem; }
.close-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.1rem; }
.sheet-body { overflow-y: auto; padding: 20px; }
.sheet-footer { padding: 14px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.primary-button { width: 100%; min-height: 50px; border: 0; border-radius: 5px; color: #fff; background: var(--brand); font-weight: 800; }
.primary-button:disabled { cursor: not-allowed; color: #7b8583; background: #d9dfdd; }
.modifier-group { margin: 0 0 22px; padding: 0; border: 0; }
.modifier-group legend { width: 100%; margin-bottom: 8px; font-weight: 800; }
.requirement { float: inline-end; color: var(--coral); font-size: .75rem; }
.option-row { min-height: 48px; padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.option-row label { flex: 1; display: flex; align-items: center; gap: 10px; }
.option-row input { width: 20px; height: 20px; }
.notes-field { display: grid; gap: 7px; }

.cart-line { padding: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; border-bottom: 1px solid var(--line); }
.cart-line h3 { margin: 0 0 4px; font-size: .95rem; }
.cart-line p { margin: 2px 0; color: var(--muted); font-size: .8rem; }
.quantity-control { display: grid; grid-template-columns: 40px 32px 40px; align-items: center; text-align: center; }
.quantity-control button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.15rem; }
.remove-command { margin-top: 7px; border: 0; padding: 0; color: var(--danger); background: transparent; font-size: .8rem; }
.totals { padding: 16px 0; border-bottom: 1px solid var(--line); }
.total-row { min-height: 28px; display: flex; justify-content: space-between; gap: 14px; color: var(--muted); }
.total-row.grand { margin-top: 5px; color: var(--ink); font-weight: 800; font-size: 1.08rem; }
.checkout-form { padding-top: 18px; display: grid; gap: 15px; }
.checkout-form fieldset { margin: 0; padding: 0; border: 0; }
.checkout-form legend { margin-bottom: 8px; font-weight: 800; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.segmented label { min-width: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 46px; padding: 8px; display: grid; place-items: center; text-align: center; border-inline-end: 1px solid var(--line); font-size: .82rem; font-weight: 700; }
.segmented label:last-child span { border-inline-end: 0; }
.segmented input:checked + span { color: #fff; background: var(--brand); }
.segmented input:focus-visible + span { outline: 3px solid rgba(212,150,50,.55); outline-offset: -3px; }
.checkout-form label:not(.honeypot) { display: grid; gap: 6px; color: var(--ink); font-size: .84rem; font-weight: 700; }
.checkout-form input, .checkout-form select, .checkout-form textarea, .notes-field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; resize: vertical; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ordering-message { margin: 0; padding: 10px 12px; color: var(--brand-strong); background: #e7f2ee; border-left: 4px solid var(--success); }
.ordering-message.unavailable { color: #654713; background: #fff3dd; border-color: var(--accent); }
.payment-note { margin: -5px 0 0; color: var(--muted); text-align: center; font-size: .78rem; }
.honeypot { position: absolute; left: -10000px; }

.order-card { margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 5px; }
.order-card.active { border-left-color: var(--success); }
.order-card h3 { margin: 0 0 5px; display: flex; justify-content: space-between; gap: 10px; font-size: 1rem; }
.order-card p { margin: 5px 0; color: var(--muted); }
.order-card .order-total { color: var(--ink); font-weight: 800; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 88px; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 5px; color: #fff; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.page-footer { min-height: 140px; padding: 34px clamp(16px, 5vw, 72px); display: flex; flex-direction: column; gap: 7px; color: #fff; background: var(--ink); }
.page-footer span { color: #cbd4d1; }

[dir="rtl"] .service-state, [dir="rtl"] .ordering-message, [dir="rtl"] .order-card { border-left: 0; border-right: 4px solid var(--success); }
[dir="rtl"] .order-card { border-right-width: 5px; }
[dir="rtl"] .sheet { margin: auto auto 0 0; border-radius: 0 6px 0 0; }

@media (max-width: 1120px) {
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .topbar { min-height: 64px; padding: 8px 12px; }
  #menu { scroll-margin-top: 76px; }
  .brand img { width: 42px; height: 42px; }
  .brand span, .command-label { display: none; }
  .menu-toolbar { padding: 22px 14px 10px; }
  .title-row { align-items: start; flex-direction: column; gap: 12px; }
  .service-state { max-width: none; width: 100%; }
  .menu-content { padding: 20px 12px 110px; }
  .menu-grid { grid-template-columns: 1fr; gap: 10px; }
  .menu-card { grid-template-columns: 112px minmax(0, 1fr); }
  .menu-card img { width: 112px; min-height: 148px; }
  .menu-card-content { padding: 12px; }
  .category-section { scroll-margin-top: 176px; margin-bottom: 32px; }
  .cart-bar { grid-template-columns: 1fr 1fr; }
  .cart-bar > :nth-child(2) { display: none; }
  .sheet { width: 100%; border-radius: 6px 6px 0 0; }
  [dir="rtl"] .sheet { border-radius: 6px 6px 0 0; }
  .field-grid { grid-template-columns: 1fr; }
  .segmented span { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
