.menu-page {
  --canvas: #f9f4ec;
  --paper: #fffdf9;
  --ink: #2a1a14;
  --muted: #6b5145;
  --terracotta: #8a3226;
  --terracotta-dark: #63231b;
  --gold: #f4c577;
  --line: #e7d9cb;
  --display: Georgia, "Times New Roman", serif;
  --motion-fast: 160ms;
  --shadow: 0 3px 8px #3f22120a, 0 12px 28px #3f22120a;
}

.menu-page .wrap { width: min(100% - 56px, 1120px); }
.menu-page .top { background: #fff7ec; }
.menu-page .top-row { min-height: 70px; }
.menu-page .brand { gap: 10px; font-size: 1.03rem; }
.menu-page .brand-logo { height: 56px; }
.table-label {
  border-radius: 8px;
  border-color: #e0c4a8;
  background: #ffebd4;
  padding: 6px 11px;
  font-weight: 750;
  white-space: nowrap;
}

.menu-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid #753526;
  background: #472018;
}
.menu-banner::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #472018 6%, #472018 36%, #472018c9 57%, #46201610 100%),
    linear-gradient(0deg, #2a140ec4, #2a140e00 45%);
  content: "";
}
.banner-image {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: min(62%, 950px);
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}
.menu-head {
  display: flex;
  align-items: center;
  min-height: 130px;
  padding-block: 18px;
}
.menu-head h1 {
  color: #fff8e9;
  font: 800 clamp(1.85rem, 4vw, 2.65rem)/1.06 var(--heading);
  letter-spacing: -.055em;
}
.menu-head h1 span { font-weight: 600; }
.menu-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
  background: #fff7ec;
  box-shadow: 0 3px 12px #351a1210;
}
.menu-toolbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.menu-nav {
  position: relative;
  isolation: isolate;
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  margin: 0;
  padding: 3px;
  border: 1px solid #eadacc;
  border-radius: 14px;
  background: #f4e9dc;
}
.menu-links { display: flex; gap: 3px; }
.section-indicator {
  position: absolute;
  z-index: -1;
  transform-origin: left center;
  border-radius: 10px;
  background: var(--gold);
  pointer-events: none;
}
.menu-nav .category {
  min-height: 44px;
  padding-inline: 15px;
  border-radius: 10px;
  color: var(--terracotta-dark);
  line-height: 1.15;
  white-space: nowrap;
}
.menu-nav:has(.section-indicator:not([hidden])) .category[aria-current] { background: transparent; }
.menu-nav .category:not([aria-current]):hover { background: #eeddc9; }
.menu-nav .category:focus-visible { outline-color: #895014; }

.search-dock { display: flex; justify-content: flex-end; flex: 0 0 44px; }
.search-toggle, .search-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e9d5c2;
  border-radius: 12px;
  background: #fffaf2;
  color: var(--terracotta-dark);
}
.search-toggle:hover, .search-toggle.has-query { background: #f6dfb5; }
.search-toggle .icon-search { width: 13px; margin: 0 3px 3px 0; }
.searchbox {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 auto;
  width: 100%;
  min-height: 44px;
  gap: 8px;
  padding-inline: 13px 4px;
  border-color: #ddc3a9;
  border-radius: 14px;
  background: #fffdf8;
  transform-origin: right center;
}
.searchbox .search-close { border-color: transparent; background: transparent; font-size: 1.35rem; }
.searchbox .search-close:hover { background: #f4e9dc; }

@media (max-width: 839px) {
  .menu-toolbar-inner:has(.searchbox:not([hidden])) .menu-nav { visibility: hidden; }
}

@media (min-width: 840px) {
  .search-dock { position: relative; flex: 1 1 44px; max-width: 420px; min-width: 44px; height: 46px; }
}

#stage { margin-top: 16px; scroll-margin-top: 72px; }
.chips { gap: 4px 7px; margin-bottom: 9px; }
.chips a { border-radius: 10px; padding-inline: 12px; }
.chips a[aria-current] { background: #f3e2d3; border-color: #d0aa92; color: var(--terracotta-dark); }
.list-heading { padding: 6px 0 13px; }
.list-heading h2 {
  font: 700 clamp(1.65rem, 3.1vw, 2.65rem)/1.03 var(--display);
  letter-spacing: -.052em;
}
.list-heading small { color: var(--muted); font-variant-numeric: tabular-nums; }
.item-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.menu-page .item {
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.item-img, .photo-preview {
  background: #f1e7da;
}
.promo-price { display: inline-grid; gap: 3px; min-width: 0; font-variant-numeric: tabular-nums; }
.promo-price s { font-size: .75rem; font-weight: 500; color: var(--muted); }
.promo-price-line { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
.promo-price strong { color: #196b43; font-weight: 800; white-space: nowrap; }
.promo-discount {
  padding: 2px 5px;
  border-radius: 4px;
  background: #dff5e8;
  color: #196b43;
  font-size: .72rem;
  line-height: 1.25;
  font-weight: 750;
  white-space: nowrap;
}
.photo-placeholder {
  background: radial-gradient(ellipse at 50% 35%, #f8efe3 0%, #f1e7da 85%);
  color: #6b5145;
}
.item-copy { padding: 12px 11px 8px; }
.item-copy h3 { letter-spacing: -.018em; }
.item-copy p { font-size: .81rem; line-height: 1.35; margin-top: 6px; }
.item-footer { column-gap: 7px; row-gap: 0; padding-top: 6px; }
.starting-price { font-size: .89rem; font-weight: 800; }
.menu-page .item .item-details {
  min-height: 44px;
  padding: 4px 0;
  color: var(--terracotta-dark);
  font-size: .76rem;
}
.details-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 7px;
  background: #f3e7d9;
}
.details-arrow {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
}
.more { border-radius: 12px; }

.dock {
  border: 0;
  background: transparent;
  padding: 0 0 max(10px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.menu-page .dock-inner {
  width: min(100% - 32px, 560px);
  padding: 7px;
  gap: 6px;
  background: #331e18;
  border: 1px solid #684435;
  border-radius: 18px;
  box-shadow: 0 8px 30px #30180e4d;
  pointer-events: auto;
}
.dock .primary, .dock .waiter { border-radius: 12px; min-height: 47px; }
.dock .waiter { border-color: #a68160; }
.dock .waiter:active { background: #644335; }
.dock .cart-button { justify-content: space-between; padding-inline: 10px; }
.dock .cart-button:focus-visible, .dock .waiter:focus-visible { outline-color: var(--gold); }
.cart-caption { display: inline-flex; align-items: center; gap: 5px; }
#cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 21px;
  padding-inline: 4px;
  border-radius: 11px;
  background: #5c2b1e;
  color: #fff7e7;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}
#cart-total { font-variant-numeric: tabular-nums; }
.cart-arrow { font-size: 1rem; }
.cart-notice {
  position: fixed;
  z-index: 4;
  inset: auto 0 calc(78px + max(10px, env(safe-area-inset-bottom)));
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px 8px 9px;
  border: 1px solid #ded0bd;
  border-radius: 13px;
  background: #fff9ee;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 750;
  pointer-events: none;
}
.cart-notice-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2f5d49;
  color: #fff;
  font-size: .9rem;
}

#sheet {
  --sheet-limit: min(88dvh, 760px);
  --sheet-padding: 24px;
  width: min(100% - 30px, 565px);
  max-height: var(--sheet-limit);
  border-radius: 20px;
}
#sheet[open] { animation: none; }
#sheet .sheet-body { padding: var(--sheet-padding); }
#sheet .sheet-header {
  align-items: start;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
#sheet .sheet-header h2 {
  font: 700 clamp(1.75rem, 4.2vw, 2.5rem)/1.05 var(--display);
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
#sheet .sheet-header p {
  margin-bottom: 5px;
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .035em;
}
#sheet .close, #sheet .quantity button {
  flex: 0 0 auto;
  border-color: #d9bfad;
  border-radius: 10px;
}
#sheet[data-view="product"] { overflow: hidden; }
#sheet.is-morphing {
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
#sheet.is-morphing .sheet-body { opacity: 0; pointer-events: none; }
.product-morph-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}
.product-morph-layer > div { position: absolute; transform-origin: top left; }
.product-morph-shell { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.product-morph-photo { inset: 0; overflow: hidden; background: #f1e7da; }
.product-morph-photo img { position: absolute; display: block; }
.product-morph-title { color: var(--ink); overflow-wrap: anywhere; }
#sheet[data-view="product"] .sheet-body {
  display: flex;
  flex-direction: column;
  max-height: calc(var(--sheet-limit) - 2px);
  padding: 0;
}
#sheet[data-view="product"] .sheet-header {
  flex-shrink: 0;
  margin: 0;
  padding: 15px var(--sheet-padding);
}
#product-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.product-scroll {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  min-height: 0;
  padding: 15px var(--sheet-padding) 12px;
  scroll-padding-block: 8px;
}
#product-form > .form-message { margin: 0; padding: 7px var(--sheet-padding); }
.detail-footer {
  flex-shrink: 0;
  align-items: center;
  gap: 9px;
  padding: 10px var(--sheet-padding) max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff9f0;
}
#sheet .primary { min-height: 46px; border-radius: 12px; }
#sheet .detail-price { font-size: 1.22rem; font-variant-numeric: tabular-nums; }
#sheet .detail-description { line-height: 1.45; }
#sheet .photo-preview { border-radius: 12px; }
.photo-preview span { border-radius: 8px; }
#sheet .option { border-radius: 10px; border-color: #dac6b5; }
#sheet .option:has(:checked) {
  background: #f3e2d3;
  border-color: var(--terracotta);
  box-shadow: inset 0 0 0 1px var(--terracotta);
}
#sheet textarea { min-height: 64px; border-radius: 10px; }
#sheet .quantity { gap: 4px; align-items: center; }
#sheet .quantity output { font-variant-numeric: tabular-nums; }
#sheet .cart-line { padding-block: 12px; }
.send-button[aria-busy="true"] { cursor: wait; opacity: .82; }
#sheet .send-label { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .menu-page :is(.primary, .waiter, .quantity button):active:not(:disabled) { scale: .98; }
}

@media (hover: hover) {
  .menu-page :is(.item, .category, .chips a, .primary, .waiter, .more, .option) {
    transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
  }
  .dock .waiter:not(:disabled):hover { background: #583b2d; }
  .item:hover .details-arrow { transform: translateX(3px); }
  .item .item-details:hover { text-decoration: none; }
  .item:hover .details-label, .item:focus-within .details-label { background: #efdbc6; }
  .details-arrow { transition: transform var(--motion-fast) ease; }
  #sheet .option:hover { border-color: var(--terracotta); }
}

@media (min-width: 680px) {
  .item-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .item-copy { padding: 14px 14px 10px; }
}

@media (min-width: 950px) {
  .item-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}

@media (max-width: 639px) {
  .menu-page .wrap { width: calc(100% - 32px); }
  .menu-page .top-row { min-height: 56px; }
  .menu-page .brand-logo { height: 46px; }
  .menu-page .brand { font-size: .96rem; }
  .menu-head { min-height: 82px; padding-block: 12px; }
  .menu-head h1 { font-size: clamp(1.35rem, 6.3vw, 1.9rem); }
  .menu-banner::before {
    background: linear-gradient(90deg, #472018 6%, #472018eb 35%, #4720188c 74%, #4720182e 100%);
  }
  .banner-image { width: 62%; }
  .menu-nav { flex: 1 1 auto; min-width: 0; }
  .menu-links { gap: 2px; }
  .menu-nav .category { flex: 1 1 auto; padding-inline: 4px; font-size: clamp(.69rem, 3.15vw, .89rem); }
  #stage { margin-top: 10px; }
  .chips { margin-bottom: 5px; }
  .chips a { padding-inline: 8px; }
  .list-heading { padding-block: 4px 10px; }
  .dock .cart-button { padding-inline: 7px; gap: 4px; }
  .cart-caption { gap: 4px; }
  .cart-button:has(#cart-count:not([hidden])) .cart-arrow { display: none; }
  #sheet {
    --sheet-limit: 94dvh;
    --sheet-padding: 16px;
    width: 100%;
    border-radius: 20px 20px 0 0;
  }
  #sheet[data-view="product"] .sheet-header { padding-block: 12px; }
}

@media (max-width: 359px) {
  .menu-page .menu-toolbar-inner { width: calc(100% - 16px); gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-page *, .menu-page *::before, .menu-page *::after { transition: none !important; }
  .item:hover .details-arrow { transform: none; }
}
