body.page-menu {
  text-align: left;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom));
}

.menu-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.page-menu .menu-top .theme-toggle-wrap {
  margin-bottom: 0;
}

.menu-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--logo-color);
  font-weight: 700;
  font-size: 1.05rem;
}

.menu-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

/* Same as main page: mono PNG as mask so the mark uses --logo-color (gold in dark mode). */
@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .menu-brand img {
    display: none;
  }

  .menu-brand::before {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--logo-color);
    -webkit-mask-image: url("../images/png_new_logo.png");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("../images/png_new_logo.png");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
  }
}

.menu-nav-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-top) 88%, var(--bg-deep));
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .menu-nav-inline {
  background: color-mix(in srgb, var(--bg-top) 82%, #000);
  border-color: var(--border-strong);
}

.menu-nav-inline a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.55);
  color: var(--menu-ink);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    color 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

html[data-theme="dark"] .menu-nav-inline a {
  background: rgba(255, 255, 255, 0.08);
  color: var(--menu-ink);
}

.menu-nav-inline a:hover {
  border-color: var(--menu-accent);
  background: var(--menu-accent-soft);
  color: var(--menu-ink);
}

.menu-nav-inline a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

html[data-theme="dark"] .menu-nav-inline a:hover {
  border-color: var(--menu-secondary);
  background: var(--menu-secondary-soft);
  color: var(--menu-ink);
}

.menu-intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  margin: 0;
  color: var(--text);
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 4;
  padding-top: 0.25rem;
  margin-bottom: 0.15rem;
}

.section-strip-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.section-strip {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem 0.6rem;
  margin: 0 -0.65rem;
  padding-left: max(0.65rem, env(safe-area-inset-left));
  padding-right: max(0.65rem, env(safe-area-inset-right));
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--bg-top) 92%, var(--bg-deep));
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .section-strip {
  background: color-mix(in srgb, var(--bg-top) 88%, #000);
}

.section-strip-tier {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.section-strip-tier--drinks {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.5rem;
  margin-top: 0.05rem;
}

.section-strip-tier-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-left: 0.1rem;
}

.section-strip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  padding-bottom: 0.15rem;
  min-width: 0;
}

.section-strip-row::-webkit-scrollbar {
  height: 6px;
}

.section-strip-row::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.section-chip {
  appearance: none;
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.55);
  color: var(--menu-ink);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  max-width: min(220px, 70vw);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

html[data-theme="dark"] .section-chip {
  background: rgba(255, 255, 255, 0.08);
}

.section-chip:hover,
.section-chip:focus-visible {
  border-color: var(--menu-accent);
  outline: none;
}

.section-chip.is-active {
  background: var(--menu-accent-soft);
  border-color: var(--menu-accent);
  color: var(--menu-accent);
}

html[data-theme="dark"] .section-chip.is-active {
  background: var(--menu-secondary-soft);
  border-color: var(--menu-secondary);
  color: var(--menu-secondary);
}

/* Portrait phones: wrap chips (~4 per row) so food/drinks tiers fit in two rows without horizontal scroll. */
@media (max-width: 640px) and (orientation: portrait) {
  .section-strip {
    padding: 0.5rem max(0.5rem, env(safe-area-inset-right)) 0.55rem max(0.5rem, env(safe-area-inset-left));
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .section-strip-row {
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: visible;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: auto;
    row-gap: 0.4rem;
    column-gap: 0.4rem;
  }

  .section-strip-row .section-chip {
    flex: 1 1 calc(25% - 0.34rem);
    min-width: 4.25rem;
    max-width: none;
    scroll-snap-align: none;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    padding: 0.36rem 0.45rem;
    font-size: 0.75rem;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Drinks: three per row so row 1 is espresso / iced / tea and row 2 is smoothies / refreshers / bottled. */
  .section-strip-tier--drinks .section-strip-row .section-chip {
    flex: 1 1 calc(33.333% - 0.27rem);
    min-width: 4.5rem;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.menu-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .menu-card {
  background: rgba(255, 255, 255, 0.06);
}

.menu-card figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  background: var(--card-bg-soft);
}

.menu-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-card-body {
  padding: 0.75rem 0.9rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.menu-card-kind {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.menu-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--menu-ink);
  line-height: 1.25;
}

.menu-card .price-line {
  font-weight: 700;
  color: var(--menu-accent);
  font-size: 0.95rem;
}

html[data-theme="dark"] .menu-card .price-line {
  color: var(--menu-secondary);
}

.menu-card .desc {
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.45;
  margin: 0;
  max-height: 4.2em;
  overflow: hidden;
}

.menu-status {
  padding: 1rem;
  color: var(--text-soft);
}

.menu-status.is-error {
  color: #c0392b;
}
