/* ─────────────────────────────────────────────────────────────
   MENVA — Component Styles
   Light, elite, quiet confidence. Printed-menu cues: ivory paper,
   fine hairlines, one accent (oxblood) used sparingly.
   ───────────────────────────────────────────────────────────── */

/* ═══ Wordmark ═══ */
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.wordmark-dot { color: var(--accent); }

/* ═══ Header — slim, hairline below ═══ */
.topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: var(--text-sm);
}

/* ═══ Sticky category nav ═══ */
.cat-nav {
  position: sticky;
  top: 0;
  z-index: 6;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.1);
  backdrop-filter: saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.cat-nav-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 1120px;
  margin: 0 auto;
}
.cat-nav-scroll::-webkit-scrollbar { display: none; }
.cat-nav-scroll { position: relative; padding: 8px 0; }
.cat-nav-indicator {
  position: absolute;
  left: 0;
  top: 8px;
  height: 44px;
  width: var(--indicator-w, 0px);
  transform: translateX(var(--indicator-x, 0px));
  background: var(--ink);
  border-radius: var(--radius-pill);
  z-index: 0;
  pointer-events: none;
  transition: transform var(--dur) var(--ease-out), width var(--dur) var(--ease-out);
}
.cat-link {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  margin-right: 6px;
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.cat-link.active { color: var(--accent-ink); background: transparent; }
@media (prefers-reduced-motion: reduce) {
  .cat-nav-indicator { transition: none; }
}

/* ═══ Primary action ═══ */
.product-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-pill);
  min-height: 52px;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--ease-fast), transform var(--dur-fast) var(--ease-out);
}
.product-action:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.product-action:active { transform: scale(0.97); }
.product-action svg { width: 18px; height: 18px; transition: transform var(--ease-fast); }
.product-action:hover svg { transform: translateX(3px); }

/* ═══ Restaurant Page ═══ */
.restaurant-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.restaurant-cover {
  padding: 20px 0 16px;
  display: flex;
  justify-content: center;
}
.cover-card {
  width: 100%;
  max-width: 460px;
  padding: 24px 24px 20px;
  text-align: center;
  background: var(--cover-paper);
  color: var(--cover-ink);
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: -5px;
}
.cover-heading {
  margin: 0 0 14px;
  line-height: 0;
}
.cover-heading .restaurant-logo-svg {
  display: block;
  width: min(180px, 60%);
  height: auto;
  margin: 0 auto;
}
.cover-copy .cover-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cover-copy .overline { color: #6B6056; }
.table-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--cover-ink);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.cover-copy p {
  margin-top: 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: color-mix(in srgb, var(--cover-ink) 88%, transparent);
}

/* ═══ Restaurant brand band (e.g. Baraza) — full-width, sits above the padded page ═══ */
.restaurant-band {
  background: var(--brand-band);
  color: var(--brand-band-ink);
  position: relative;
  overflow: hidden;
}
.restaurant-band::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20 L20 0 L40 20 L20 40 Z' fill='none' stroke='%23000000' stroke-width='1'/%3E%3C/svg%3E");
}
.band-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.band-logo {
  flex: none;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: var(--shadow);
}
.band-copy { min-width: 0; }
.band-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-base);
  line-height: 1.4;
  color: var(--brand-band-ink);
}
.band-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.band-pills .pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 11px;
  border: 1px solid color-mix(in srgb, var(--brand-band-ink) 35%, transparent);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--brand-band-ink);
}
.band-pills .table-chip {
  border-color: color-mix(in srgb, var(--brand-band-ink) 55%, transparent);
  color: var(--brand-band-ink);
}
@media (max-width: 480px) {
  .band-inner { flex-direction: column; text-align: center; }
  .band-pills { justify-content: center; }
}

/* One quiet line about the restaurant, then straight to the food */
.menu-intro {
  max-width: 56ch;
  margin: 0 auto;
  padding: 4px 0 8px;
  text-align: center;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted);
}
.menu-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 24px 0 14px;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.menu-heading h2 {
  font-size: var(--text-2xl);
  color: var(--ink);
}
.menu-heading > span {
  font-size: var(--text-xs);
  color: var(--muted);
}
.menu-category {
  padding: 20px 0 8px;
  scroll-margin-top: 96px;
}
.menu-category > h3 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 14px;
}
/* Baraza: condensed caps category headings (self-hosted Barlow Condensed 600) */
.theme-baraza .menu-category > h3 {
  font-family: var(--font-condensed);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.dish-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.dish-grid .dish-row {
  grid-column: 1 / -1;
}
@media (min-width: 560px) {
  .dish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 900px) {
  .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ─ Dish card: poster sits on the stage colour, refined mark, serif name, oxblood price ─ */
.dish-card {
  text-align: left;
  padding: 0;
  min-width: 0;
}
.dish-photo {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--stage);
  height: auto;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.dish-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.dish-card:hover .dish-photo img { transform: scale(1.03); }
.see-mark {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  min-height: 30px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  overflow: hidden;
  isolation: isolate;
}
.dish-photo svg { width: 13px; height: 13px; flex: none; color: var(--accent); }

/* A soft light sweep across the pill every ~6s, only while the card is in view (reduced motion: none) */
.see-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, #fff 55%, transparent), transparent);
}
html.js-motion .see-mark.in-view::after {
  animation: see-mark-sweep 6s ease-in-out infinite;
}
@keyframes see-mark-sweep {
  0%, 8% { transform: translateX(-120%) skewX(-20deg); }
  22%, 100% { transform: translateX(220%) skewX(-20deg); }
}
@media (prefers-reduced-motion: reduce) {
  .see-mark.in-view::after { animation: none; }
}
.dish-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.dish-line h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--ink);
}
.dish-card:hover .dish-line h4,
.dish-row:hover .dish-line h4 { color: var(--accent); }
.dish-line > span {
  font-size: var(--text-sm);
  text-align: right;
  flex: none;
  max-width: 42%;
  color: var(--accent);
}
.dish-card > p {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─ Dish row: clean printed-menu line for dishes with no 3D ─ */
.dish-row {
  text-align: left;
  padding: 14px 0;
  min-width: 0;
  border-bottom: 1px dashed var(--line);
  display: block;
}
.dish-row:last-child { border-bottom: 0; }
.dish-row .dish-line { margin-top: 0; }
.dish-row > p {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 4px;
}

.menu-disclaimer {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--muted);
  padding: 32px 0 40px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

/* ═══ Gauchos accent dividers ═══ */
.theme-gauchos .menu-heading h2 { color: var(--accent); }

/* ═══ Category note — one muted line under a category heading, when the restaurant provides one ═══ */
.category-note {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: -8px;
  padding-bottom: 14px;
  max-width: 56ch;
}

/* ═══ Serve tag ("Hot" / "Iced") — next to a dish name, on cards and on the sheet ═══ */
.serve-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  min-height: 0;
  vertical-align: middle;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--radius-pill);
}
.dish-detail h2 .serve-tag { font-size: 11px; }

/* ═══ Dish Modal (native <dialog>) — bottom sheet on phones ═══ */
.modal-open { overflow: hidden; }
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  max-width: 980px;
  width: calc(100% - 40px);
  max-height: 90svh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}
dialog::backdrop {
  background: rgba(20, 16, 12, 0.5);
}
dialog[open] {
  animation: settle 220ms var(--ease);
}
.sheet-handle { display: none; }
.close-dialog {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.close-dialog:hover { background: var(--surface-2); }
.close-dialog svg { width: 18px; height: 18px; }
#dish-content {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

/* ═══ Dish Stage (3D in modal) ═══ */
.dish-stage {
  background: var(--stage);
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden;
  position: relative;
}
.dish-stage model-viewer {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  --poster-color: transparent;
  --progress-bar-color: var(--accent);
  touch-action: pan-y;
}
.detail-photo {
  width: 100%;
  height: 460px;
  object-fit: cover;
}
.stage-actions {
  display: grid;
  gap: 8px;
  padding: 12px 20px 20px;
}
.stage-status {
  min-height: 1.4em;
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
}
.stage-status:empty { display: none; }
.reset-view {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--ink);
  border: 1px solid var(--line);
}
.reset-view svg { width: 18px; height: 18px; }
.reset-view[hidden] { display: none; }
.inapp-note {
  font-size: var(--text-xs);
  color: var(--ink);
  text-align: center;
  line-height: 1.5;
}
.copy-link {
  min-height: 44px;
  padding: 0 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--accent);
  font-weight: 500;
}

/* "See it on your table": full width, oxblood, shown once the model has loaded */
.ar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: 600;
  animation: ar-ready 350ms var(--ease) both;
  transition: background var(--ease-fast), transform var(--dur-fast) var(--ease-out);
}
.ar-btn[hidden] { display: none; }
/* iPhone: while the AR file comes down, the button fills with real progress, then turns live */
.ar-btn.is-preparing {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface-2);
  color: var(--ink);
  cursor: progress;
}
.ar-btn.is-preparing::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  transform: scaleX(var(--prep, 0));
  transform-origin: 0 50%;
  transition: transform 200ms linear;
}
.ar-btn-label { font-variant-numeric: tabular-nums; }
.ar-btn:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.ar-btn:active { transform: scale(0.97); }
.ar-btn svg { width: 18px; height: 18px; flex: none; }
@keyframes ar-ready { from { opacity: 0; transform: translateY(4px); } }

/* AR placement prompt (WebXR, slot="ar-prompt") */
.ar-prompt {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: min(280px, 80vw);
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.ar-prompt svg { width: 120px; height: 80px; margin: 0 auto 8px; overflow: visible; }
.ar-prompt ellipse, .ar-prompt rect, .ar-prompt line {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}
.ar-prompt-phone { transform-origin: 60px 120px; animation: ar-sweep 3s ease-in-out infinite alternate; }
@keyframes ar-sweep { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
.ar-prompt p { font-size: var(--text-sm); line-height: 1.4; }

/* ═══ Dish Detail (right side of modal) ═══ */
.dish-detail {
  padding: 52px 28px 32px;
}
.dish-detail .overline { display: block; margin-bottom: 6px; }
.dish-detail h2 {
  font-size: var(--text-2xl);
  margin: 0 0 8px;
  color: var(--ink);
}
.dish-detail > .detail-price {
  font-size: var(--text-base);
  color: var(--accent);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.dish-detail > p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Dish facts: halal → allergens → spice → dietary → ingredients — a quiet definition list */
.facts {
  display: grid;
  gap: 0;
  margin: 4px 0 16px;
  border-top: 1px solid var(--line);
}
.fact {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.fact dt { color: var(--muted); }
.fact dd { color: var(--ink); }
.fact-unconfirmed dd,
p.fact-unconfirmed { color: var(--muted); font-style: italic; }
.dish-detail > .detail-price.fact-unconfirmed { color: var(--muted); font-style: italic; }
.spice { color: var(--accent); letter-spacing: 2px; }

details.nutrition {
  margin-bottom: 16px;
  font-size: var(--text-sm);
  padding-top: 4px;
}
details.nutrition summary {
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-weight: 500;
}
details.nutrition summary::-webkit-details-marker { display: none; }
details.nutrition summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--muted);
  transition: transform var(--ease-fast);
}
details.nutrition[open] summary::after { transform: rotate(45deg); }
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.nutrition-item {
  text-align: center;
  padding: 12px 6px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.nutrition-item .value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
  line-height: 1;
}
.nutrition-item .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 4px;
}
.fact-note { font-size: var(--text-xs); color: var(--muted); margin: 10px 0 4px; font-style: italic; }

/* ═══ Bean card (coffee dishes: origin / tasting notes / brew method) ═══ */
.bean-facts {
  margin: -4px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.bean-facts .fact { border-bottom: 0; padding: 6px 0; }
.bean-facts .fact:first-child { padding-top: 0; }
.bean-facts .fact:last-child { padding-bottom: 0; }

/* ═══ "Add to my table" (CLAUDE.md Phase 7) ═══ */
.tray-add {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.tray-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: 0 auto;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 4px;
}
.tray-step {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
}
.tray-step:active { transform: scale(0.94); }
.tray-qty {
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}
.tray-note {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  font-family: var(--font-body);
}
.tray-note::placeholder { color: var(--faint); }
.quick-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}
.quick-note-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: background var(--ease-fast), transform var(--dur-fast) var(--ease-out);
}
.quick-note-chip:hover { background: var(--surface); }
.quick-note-chip:active { transform: scale(0.96); }
.tray-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  font-weight: 600;
  transition: background var(--ease-fast), transform var(--dur-fast) var(--ease-out);
}
.tray-add-btn:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.tray-add-btn:active { transform: scale(0.97); }
.tray-add-status {
  min-height: 1.4em;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--muted);
}
.tray-add-status:empty { display: none; }

/* ═══ Floating tray pill ═══ */
.tray-pill {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-lg);
  animation: tray-pill-in var(--dur-slow) var(--ease-out);
}
.tray-pill[hidden] { display: none; }
.tray-pill:active { transform: translateX(-50%) scale(0.97); }
@keyframes tray-pill-in { from { opacity: 0; transform: translateX(-50%) scale(0.9); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .tray-pill { animation: none; }
}
/* Hidden while the dish sheet covers the screen — a dialog is always on top of a fixed pill anyway,
   but this keeps it out of the accessibility tree and off-screen readers too. */
#dish-dialog[open] ~ .tray-pill { display: none; }

/* ═══ "Show the waiter" — full-screen, always high-contrast ═══ */
.waiter-dialog {
  position: fixed;
  inset: 0;
  margin: 0;
  max-width: 100%;
  width: 100%;
  height: 100%;
  max-height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #111111;
  color: #F5EFE4;
}
.waiter-dialog::backdrop { background: #111111; }
.waiter-dialog[open] { animation: settle 220ms var(--ease); }
.waiter-content {
  min-height: 100%;
  padding: max(20px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.waiter-done {
  align-self: flex-end;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #4A443C;
  border-radius: var(--radius-pill);
  color: #F5EFE4;
  font-size: var(--text-sm);
  font-weight: 600;
}
.waiter-dialog h2#waiter-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3rem);
  margin: 20px 0 6px;
  color: #FFFFFF;
}
.waiter-hint {
  font-size: var(--text-base);
  color: #C9BFAE;
  margin-bottom: 28px;
}
.waiter-list {
  display: grid;
  gap: 22px;
  align-content: start; /* rows keep their height; the space goes below the list */
  flex: 1;
}
.waiter-empty { font-size: var(--text-lg); color: #C9BFAE; }
.waiter-item { border-bottom: 1px solid #322D26; padding-bottom: 18px; }
.waiter-item-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
}
.waiter-item-qty { font-variant-numeric: tabular-nums; color: #FFFFFF; font-weight: 600; flex: none; }
.waiter-item-name { color: #FFFFFF; font-weight: 500; }
.waiter-item-price { margin-left: auto; white-space: nowrap; color: #C9BFAE; font-size: var(--text-base); font-variant-numeric: tabular-nums; }
.waiter-item-note { margin-top: 6px; font-size: var(--text-base); color: #C9BFAE; font-style: italic; }
.waiter-item-edit {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  opacity: 0.55;
}
.waiter-edit-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #4A443C;
  border-radius: var(--radius-pill);
  color: #C9BFAE;
  font-size: var(--text-xs);
}
.waiter-edit-btn:hover, .waiter-edit-btn:active { opacity: 1; }
.waiter-clear {
  margin-top: 20px;
  min-height: 44px;
  padding: 0 18px;
  align-self: center;
  color: #C9BFAE;
  font-size: var(--text-sm);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--ease-fast), border-color var(--ease-fast), transform var(--dur-fast) var(--ease-out);
}
.back-menu:active { transform: scale(0.98); }
.back-menu:hover { background: var(--surface-2); border-color: var(--faint); }
.back-menu svg { width: 16px; height: 16px; transform: rotate(180deg); }

/* ═══ Published Menu / Listing (secondary pages — same quiet palette) ═══ */
.published-menu { padding: 32px 0; border-bottom: 1px solid var(--line); }
.published-menu h2 { font-size: var(--text-xl); margin-bottom: 6px; }
.published-menu > p { font-size: var(--text-xs); color: var(--muted); margin-bottom: 8px; }
.published-menu > p a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.published-controls { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.published-controls input,
.published-controls select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: var(--text-xs);
  background: var(--surface);
}
.published-controls input { flex: 1; min-width: 200px; }
.published-category { margin-bottom: 20px; }
.published-category h3 { font-size: var(--text-sm); font-style: italic; margin-bottom: 10px; }
.published-item { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.published-item h4 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; }
.published-item span { font-size: var(--text-sm); white-space: nowrap; color: var(--accent); }
.published-item p { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }

.listing-details { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; padding: 32px 0; }
.listing-details > div:last-child { padding: 24px; background: var(--stage); border-radius: var(--radius); }
.listing-details h2 { margin-top: 0; }
.listing-details address { padding-bottom: 16px; border-bottom: 1px solid var(--line); font-style: normal; font-size: var(--text-sm); }
.source-line a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.listing-menu-note { padding: 32px 0; border-bottom: 1px solid var(--line); }
.listing-menu-note h2 { margin-top: 0; }
.listing-menu-note p { font-size: var(--text-sm); color: var(--muted); max-width: 48ch; }
.photo-disclosure { font-size: var(--text-xs); color: var(--muted); padding: 12px 0; }

/* ═══ Footer — minimal, hairline top ═══ */
footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}
footer > span {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--ink);
}
footer p { font-size: var(--text-xs); }
footer small {
  margin-left: auto;
  font-size: 10px;
  max-width: 280px;
  text-align: right;
  line-height: 1.6;
}

/* ═══ Brand / not-found / data-unavailable pages — editorial, calm ═══ */
.brand-page {
  max-width: 600px;
  min-height: calc(100dvh - 200px);
  margin: 0 auto;
  padding: 40px 20px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.brand-page .overline { margin-bottom: 4px; }
.brand-page h1 {
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-page h1 em { color: var(--accent); font-style: italic; }
.brand-page > p {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.5;
}
.brand-page .product-action { align-self: flex-start; margin-top: 8px; }
.brand-page > .brand-note {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* ═══ Home (/) — hero, the pilot restaurant with real dishes, how it works ═══ */
.home {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px 56px;
}
.home-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 48px 0 40px;
  max-width: 620px;
}
.home-hero h1 {
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.home-hero h1 em { color: var(--accent); font-style: italic; }
.home-hero > p:not(.overline) {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--muted);
  max-width: 38ch;
}
.home-hero .product-action { align-self: flex-start; margin-top: 10px; }

.home-pilot {
  padding: 32px 0 36px;
  border-top: 1px solid var(--line);
}
.home-pilot > .overline { margin-bottom: 14px; }
.restaurant-row {
  display: grid;
  gap: 28px;
}
@media (min-width: 700px) {
  .restaurant-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.pilot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--cover-paper);
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius);
  color: var(--cover-ink);
  min-height: 44px;
}
.pilot-logo { width: min(160px, 45%); height: auto; }
.pilot-name { font-family: var(--font-display); font-size: var(--text-xl); }
.pilot-where {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5E5247;
  text-align: right;
}
/* Richer brand card (a restaurant with its own round logo, e.g. Baraza): round crop on the left,
   name + tagline + area stacked beside it, a thin sage-band stripe reads as that restaurant's own
   mark without competing with the MENVA ember used elsewhere on this page. */
.pilot-card--brand {
  justify-content: flex-start;
  border-left: 5px solid var(--brand-band, var(--gold));
}
.pilot-logo-round {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.pilot-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pilot-card--brand .pilot-name { font-size: var(--text-lg); }
.pilot-tagline { font-size: var(--text-xs); color: var(--accent); }
.pilot-card--brand .pilot-where {
  margin-top: 2px;
  text-align: left;
  color: var(--muted);
}
.pilot-dishes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.pilot-dishes a {
  display: block;
  min-height: 44px;
  background: var(--surface);
  padding: 8px 8px 12px;
  border-radius: var(--radius-sm);
}
.pilot-dish-photo {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--stage) center / cover no-repeat;
}
.pilot-dish-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.pilot-dishes a:hover img { transform: scale(1.03); }
.pilot-dish-name {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.25;
  color: var(--ink);
}
.pilot-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 20px;
  padding: 0 20px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: background var(--ease-fast), transform var(--dur-fast) var(--ease-out);
}
.pilot-more:hover { background: var(--surface-2); }
.pilot-more:active { transform: scale(0.97); }
.pilot-more svg { width: 18px; height: 18px; flex: none; }

.home-how {
  padding: 32px 0 8px;
  border-top: 1px solid var(--line);
}
.home-how h2 { font-size: var(--text-xl); margin-bottom: 16px; }
.home-how ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
  list-style: none;
}
.home-how li {
  counter-increment: step;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted);
}
.home-how li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--gold);
  margin-bottom: 6px;
}
.home-how strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }

@media (max-width: 640px) {
  .home-hero { padding: 32px 0 32px; }
  .pilot-dishes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pilot-dish-name { font-size: var(--text-sm); }
  .home-how ol { grid-template-columns: 1fr; gap: 18px; }
}

/* ═══ Responsive ═══ */
@media (max-width: 1000px) {
  .listing-details { gap: 28px; }
}

@media (max-width: 768px) {
  dialog {
    width: 100%;
    max-width: 100%;
    height: 92svh;
    max-height: 92svh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    overflow-y: auto;
  }
  dialog[open] { animation: sheet-up 260ms var(--ease); }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
  .sheet-handle {
    display: block;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 10px auto 0;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--line);
  }
  .topbar { padding: 14px 20px; }
  .listing-details { grid-template-columns: 1fr; }
  #dish-content { grid-template-columns: 1fr; }
  .dish-stage { border-radius: 0; }
  .dish-stage model-viewer { height: 300px; }
  .detail-photo { height: 260px; }
  .dish-detail { padding: 24px 20px 28px; }
  .nutrition-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cover-card { max-width: 100%; padding: 20px 20px 16px; }
  footer { flex-wrap: wrap; gap: 10px; }
  footer small { width: 100%; max-width: none; margin: 0; text-align: left; }
}

@media (max-width: 480px) {
  .nutrition-grid { grid-template-columns: repeat(2, 1fr); }
  .fact { grid-template-columns: 84px 1fr; }
}

/* ═══ Motion ═══
   Animate only transform and opacity. Nothing here hides content before JS runs — the opacity:0
   start only applies under html.js-motion, which js/app.js adds unless the visitor asked for
   reduced motion. */

/* Section / card arrival: fade + 16px rise, 560ms, staggered 60ms per item, once per element. */
html.js-motion .dish-card,
html.js-motion .dish-row,
html.js-motion .home-pilot,
html.js-motion .home-how,
html.js-motion .menu-heading {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
html.js-motion .dish-card.is-in,
html.js-motion .dish-row.is-in,
html.js-motion .home-pilot.is-in,
html.js-motion .home-how.is-in,
html.js-motion .menu-heading.is-in {
  opacity: 1;
  transform: none;
}

/* Card press: scale .98 on press (touch and mouse). */
.dish-card,
.pilot-dishes a {
  transition: transform 120ms var(--ease-out);
}
.dish-card:active,
.pilot-dishes a:active {
  transform: scale(0.98);
}

/* Card tilt toward the cursor — fine pointer + hover devices only (set via js/app.js initTilt). */
.dish-photo,
.pilot-dish-photo {
  transition: transform var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .dish-photo,
  .pilot-dish-photo {
    transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  }
}

/* Unpriced rows: a short, quiet line; the dish sheet carries the full "please confirm" wording */
.dish-line .price-ask { color: var(--muted); font-size: var(--text-sm); white-space: nowrap; }
