/* 美食地圖 (Eats) theme. Identity + page layout only; the shared child shell,
   drawer and tokens are reused unchanged (no --hx-theme-* overrides).
   Design record: reports/food_map_page_20261103/HANDOFF.md (sections 9-11). */
html:has(body.eats-body) { background: var(--hx-theme-deep); }
body.eats-body {
  /* Warm reading palette: cream paper that echoes the photo's wooden table and fries.
     Page-owned variables only; the shared header reads the paper through the base hook
     --hx-child-reading-bg. Contrast table: HANDOFF section 10. */
  --eats-paper: #f8f2e8;             /* page / reading background */
  --eats-paper-rgb: 248 242 232;
  --eats-surface: #fffcf6;           /* search, triggers, pickers, sheet, tokens */
  --eats-line: #e6dccd;              /* dividers */
  --eats-selected: #f1e6d6;          /* open trigger, current picker row */
  --eats-hover: #f4ebdd;
  --eats-control: #d8c9b5;           /* soft borders: tokens, popover edge */
  --eats-control-border: #95816b;    /* input / trigger / toggle borders (3.6:1 on surface) */
  --eats-disabled: #a8998a;
  --eats-accent: #a4461f;            /* persimmon: city pins, selected values (5.4:1 on paper) */
  --eats-accent-rgb: 164 70 31;
  --eats-gold: #f2c46d;              /* fries gold from the header photo: eyebrow on deep only */
  --eats-ink: var(--hx-theme-ink);
  --eats-muted: var(--hx-theme-muted);
  --eats-link: var(--hx-theme-link);
  --eats-deep: var(--hx-theme-deep);
  --eats-deep-rgb: var(--hx-theme-deep-rgb);
  --eats-on-deep: var(--hx-theme-on-deep);
  --eats-on-deep-muted: var(--hx-theme-on-deep-muted);
  --hx-child-reading-bg: var(--eats-paper);
  --eats-map-land: #f3ece0;
  --eats-gutter: max(20px, env(safe-area-inset-left, 0px));
  --eats-gutter-right: max(20px, env(safe-area-inset-right, 0px));
  --eats-fade: 40px;
  --eats-pane-top: var(--hx-child-height);
  padding: 0; color: var(--eats-ink); background: var(--eats-paper); overflow-x: clip; letter-spacing: 0;
}
body.eats-body *, body.eats-body *::before, body.eats-body *::after { letter-spacing: 0; }
.eats-body [hidden] { display: none !important; }
.eats-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.eats-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.eats-shell { min-width: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ---- Masthead: owner photo (bounded, cover-cropped) + deep title band ----
   Phone portrait: photo first, then the title band (Dev phone order).
   Wider / short landscape: title over a left shade on the photo (see media queries).
   The watermark is baked at ~93% x / 72% y; object-position 50% 75% keeps it inside every crop. */
.eats-masthead {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0;
  background: var(--eats-deep); color: var(--eats-on-deep);
  --eats-photo-h: min(46vw, 200px); --eats-photo-fade: 28px;
}
.eats-masthead-photo { position: relative; display: block; height: var(--eats-photo-h); overflow: hidden; background: #2c231d; }
.eats-masthead-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 75%; }
.eats-masthead-photo::after { content: ""; position: absolute; inset: auto 0 0; height: var(--eats-photo-fade); background: linear-gradient(to bottom, transparent, var(--eats-deep)); pointer-events: none; }
.eats-masthead[data-image-failed] .eats-masthead-photo { display: none; }
.eats-masthead-text { position: relative; padding: 6px var(--eats-gutter-right) calc(var(--eats-fade) + 10px) var(--eats-gutter); }
.eats-masthead::after { content: ""; position: absolute; z-index: 1; inset: auto 0 0; height: var(--eats-fade); background: linear-gradient(to bottom, transparent, var(--eats-paper)); pointer-events: none; }
.eats-masthead-text > * { max-width: 640px; }
.eats-eyebrow { color: var(--eats-gold); font-size: 12px; font-weight: 650; }
.eats-masthead h1 { margin-top: 4px; font-size: 26px; line-height: 1.25; font-weight: 720; }
.eats-lede { margin-top: 6px; color: var(--eats-on-deep); font-size: 15px; line-height: 1.6; }
.eats-readout { margin-top: 6px; color: var(--eats-on-deep-muted); font-size: 13px; line-height: 1.6; font-variant-numeric: tabular-nums; }

/* ---- Layout: stacked by default (phone, tablet portrait, short landscape) ---- */
.eats-layout {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "toolbar" "active" "map" "summary" "results";
  min-width: 0;
}
.eats-masthead { grid-area: head; }
.eats-toolbar, .eats-active-row, .eats-summary-row, .eats-map-panel, .eats-results-panel { position: relative; z-index: 2; }
.eats-toolbar { grid-area: toolbar; margin-top: -14px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; padding: 0 var(--eats-gutter-right) 0 var(--eats-gutter); min-width: 0; }
.eats-active-row { grid-area: active; padding: 10px var(--eats-gutter-right) 0 var(--eats-gutter); min-width: 0; }
.eats-map-panel { grid-area: map; padding: 12px var(--eats-gutter-right) 0 var(--eats-gutter); min-width: 0; }
.eats-map-frame { scroll-margin: calc(var(--hx-child-height, 56px) + 6px) 0 8px; }
.eats-summary-row { grid-area: summary; padding: 0 var(--eats-gutter-right) 0 var(--eats-gutter); min-width: 0; }
.eats-results-panel { grid-area: results; padding: 0 var(--eats-gutter-right) 48px var(--eats-gutter); min-width: 0; container: eatsresults / inline-size; }

/* ---- Search + picker triggers: one row when it fits, search on its own row on phones ---- */
.eats-search { position: relative; flex: 1 1 220px; min-width: 0; display: flex; margin: 0; }
.eats-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--eats-muted); pointer-events: none; }
.eats-search-input {
  width: 100%; min-width: 0; min-height: 44px; padding: 8px 44px 8px 40px;
  border: 1px solid var(--eats-control-border); border-radius: 4px; background: var(--eats-surface); color: var(--eats-ink); font-size: 16px;
  -webkit-appearance: none; appearance: none;
}
.eats-search-input::placeholder { color: var(--eats-muted); opacity: 1; }
.eats-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.eats-search-clear { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 44px; height: 100%; padding: 0; border: 0; background: transparent; color: var(--eats-muted); cursor: pointer; }
.eats-triggers { display: flex; gap: 8px; flex: 0 1 auto; min-width: 0; }
.eats-trigger {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 44px; padding: 0 10px 0 12px;
  border: 1px solid var(--eats-control-border); border-radius: 4px; background: var(--eats-surface); color: var(--eats-ink); font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background-color var(--hx-dur-fast) var(--hx-ease), border-color var(--hx-dur-fast) var(--hx-ease);
}
.eats-trigger-name { flex: 0 0 auto; }
.eats-trigger-value { min-width: 0; max-width: 8.5em; overflow: hidden; text-overflow: ellipsis; color: var(--eats-accent); font-weight: 650; }
.eats-trigger-value:empty { display: none; }
.eats-trigger > .eats-icon { margin-left: auto; color: var(--eats-muted); transition: transform var(--hx-dur-fast) var(--hx-ease); }
.eats-trigger[aria-expanded="true"] { background: var(--eats-selected); }
.eats-trigger[aria-expanded="true"] > .eats-icon:last-child { transform: rotate(180deg); }
.eats-trigger.is-active { border-color: var(--eats-deep); box-shadow: inset 0 0 0 1px var(--eats-deep); }
@media (max-width: 760px) {
  .eats-search { flex-basis: 100%; }
  .eats-triggers { flex: 1 1 100%; }
  .eats-trigger { flex: 1 1 0; justify-content: flex-start; }
}

/* ---- Two-level picker: anchored popover (wide) / bottom sheet (phone, short landscape) ---- */
.eats-picker { padding: 0; border: 0; color: var(--eats-ink); background: var(--eats-surface); font-family: var(--hx-font); }
.eats-picker:not([open]) { display: none; }
.eats-picker-box { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.eats-picker-head { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 8px 4px 16px; border-bottom: 1px solid var(--eats-line); flex: 0 0 auto; }
.eats-picker-title { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eats-picker-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -8px; padding: 0 8px 0 4px; border: 0; background: transparent; color: var(--eats-link); font-size: 15px; cursor: pointer; }
.eats-picker-done { min-height: 44px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--eats-link); font-size: 15px; font-weight: 700; cursor: pointer; }
.eats-picker-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.eats-option-list { margin: 0; padding: 4px 0; list-style: none; }
.eats-option {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 0; background: transparent; color: var(--eats-ink); font-size: 15px; line-height: 1.4; text-align: left; cursor: pointer;
}
.eats-option-check { display: grid; place-items: center; color: var(--eats-accent); }
.eats-option-check .eats-icon { width: 16px; height: 16px; flex-basis: 16px; }
.eats-option-label { min-width: 0; overflow-wrap: anywhere; }
.eats-option-count { color: var(--eats-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.eats-option > .eats-icon { color: var(--eats-muted); }
.eats-option[aria-pressed="true"] { font-weight: 700; }
.eats-option.is-current { background: var(--eats-selected); }
.eats-option:disabled { color: var(--eats-disabled); cursor: default; }
.eats-option:disabled .eats-option-count { color: var(--eats-disabled); }
.eats-pane-label { padding: 10px 12px 2px 40px; color: var(--eats-muted); font-size: 12px; font-weight: 650; }
.eats-pane-hint { padding: 12px 16px; color: var(--eats-muted); font-size: 14px; line-height: 1.6; }

/* Popover: absolutely placed under the toolbar row, never in page flow. */
.eats-picker.is-popover {
  position: absolute; z-index: 30; inset: calc(100% + 6px) auto auto var(--eats-gutter); margin: 0;
  width: min(560px, calc(100% - var(--eats-gutter) - var(--eats-gutter-right))); max-height: var(--picker-max, min(62vh, 480px));
  border: 1px solid var(--eats-control); border-radius: 8px; box-shadow: 0 12px 32px rgb(60 36 18 / .18);
  transform-origin: top center; animation: drawerIn 160ms var(--hx-ease) both;
}
.eats-picker.is-popover .eats-picker-box { max-height: var(--picker-max, min(62vh, 480px)); }
.eats-picker-panes { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); min-height: 0; flex: 1 1 auto; }
.eats-picker-pane { max-height: calc(var(--picker-max, min(62vh, 480px)) - 53px); }
.eats-picker-pane + .eats-picker-pane { border-left: 1px solid var(--eats-line); }

/* Sheet: modal, bottom-anchored, safe-area aware, scrolls inside. */
.eats-picker.is-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: min(82dvh, 640px);
  border-radius: 14px 14px 0 0; box-shadow: 0 -8px 28px rgb(20 12 8 / .25);
  padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  animation: eats-sheet-in 240ms var(--hx-ease) both;
}
.eats-picker.is-sheet .eats-picker-box { max-height: calc(min(82dvh, 640px) - env(safe-area-inset-bottom, 0px)); }
.eats-picker.is-sheet .eats-picker-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #dccdb9; }
.eats-picker.is-sheet .eats-picker-head { position: relative; padding-top: 10px; }
.eats-picker.is-sheet .eats-picker-scroll { padding-bottom: 8px; }
.eats-picker.is-sheet .eats-option { min-height: 50px; padding-inline: 16px; }
.eats-picker::backdrop { background: rgb(38 24 14 / .42); }
html.eats-sheet-open { overflow: hidden; }
/* No motion.css primitive slides up from the bottom edge; pinned exemption in scripts/check_web_invariants.py. */
@keyframes eats-sheet-in { from { transform: translateY(100%); } to { transform: none; } }

/* ---- Summary + active tokens ---- */
.eats-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; min-height: 52px; padding: 12px 0 10px; border-bottom: 1px solid var(--eats-line); }
/* Map toggle: phone layouts only (portrait + short landscape); larger layouts always show the map. */
.eats-map-toggle {
  display: none; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 12px; flex: 0 0 auto;
  border: 1px solid var(--eats-control-border); border-radius: 999px; background: var(--eats-surface); color: var(--eats-ink); font-size: 15px; font-weight: 650; cursor: pointer; white-space: nowrap;
  transition: background-color var(--hx-dur-fast) var(--hx-ease);
}
.eats-map-toggle .eats-icon { color: var(--eats-accent); }
.eats-map-toggle[aria-expanded="true"] { background: var(--eats-selected); }
.eats-count { color: var(--eats-ink); font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.eats-active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.eats-token {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 100%; padding: 4px 10px; border: 1px solid var(--eats-control); border-radius: 999px;
  background: var(--eats-surface); color: var(--eats-ink); font-size: 13px; cursor: pointer; overflow-wrap: anywhere; text-align: left;
}
.eats-token > span[aria-hidden] { color: var(--eats-muted); font-size: 16px; line-height: 1; }
.eats-clear-all { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--eats-link); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (pointer: coarse) { .eats-token { min-height: 44px; } }

/* ---- Result rows ---- */
.eats-results { min-width: 0; }
.eats-results.is-updating { animation: viewIn 220ms var(--hx-ease) both; }
.eats-list { margin: 0; padding: 0; list-style: none; }
.eats-place { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; padding: 14px 0 6px; border-bottom: 1px solid var(--eats-line); }
.eats-place-text { min-width: 0; }
.eats-place-name { font-size: 17px; line-height: 1.45; font-weight: 650; overflow-wrap: anywhere; }
/* Meta segments (region · kind · 也屬 …) each carry a leading separator. The row starts one separator
   width to the left and clips that strip, so a segment that wraps onto a new line starts clean. */
.eats-place-meta {
  --eats-sep: 18px; display: flex; flex-wrap: wrap; gap: 2px 0; margin: 3px 0 0 calc(-1 * var(--eats-sep)); clip-path: inset(0 0 0 var(--eats-sep));
  color: var(--eats-muted); font-size: 14px; line-height: 1.5;
}
.eats-place-meta > span { min-width: 0; overflow-wrap: anywhere; }
.eats-place-meta > span::before { content: "·"; display: inline-block; width: var(--eats-sep); text-align: center; }
.eats-place-note { margin-top: 4px; color: var(--eats-ink); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.eats-status {
  justify-self: start; display: inline-flex; align-items: center; min-height: 24px; margin-top: 6px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 4px;
  font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap;
}
.eats-status[data-status="closed"] { color: #9a3b2c; background: #f8e5dd; }
.eats-status[data-status="temporarily_closed"] { color: #855510; background: #f6ead2; }
.eats-status[data-status="possibly_closed"] { color: #5f5850; background: #ebe5dc; border-style: dashed; }
.eats-place:not([data-status="open"]) .eats-place-name, .eats-place:not([data-status="open"]) .eats-place-note { color: #5a4f47; }
.eats-maps-link {
  justify-self: start; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--eats-link); font-size: 14px; font-weight: 600; text-decoration: none;
}
.eats-maps-link .eats-icon { width: 16px; height: 16px; flex-basis: 16px; }
.eats-maps-link:hover span, .eats-maps-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.eats-closed-head { margin-top: 28px; padding: 14px 0 10px; border-bottom: 1px solid var(--eats-line); }
.eats-closed-head h2 { font-size: 15px; font-weight: 700; }
.eats-closed-head p { margin-top: 4px; color: var(--eats-muted); font-size: 13px; line-height: 1.6; }
@container eatsresults (min-width: 500px) {
  .eats-place { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text link" "status link"; align-items: start; padding: 16px 0; }
  .eats-place-text { grid-area: text; }
  .eats-status { grid-area: status; }
  .eats-maps-link { grid-area: link; align-self: center; }
}
.eats-empty { padding: 36px 0 12px; }
.eats-empty h2 { font-size: 22px; line-height: 1.35; }
.eats-empty p { margin-top: 8px; max-width: 560px; color: var(--eats-muted); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.eats-empty-action { margin-top: 18px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--eats-deep); border-radius: 4px; background: var(--eats-deep); color: var(--eats-on-deep); font-size: 15px; cursor: pointer; }
.eats-updated { margin-top: 24px; color: var(--eats-muted); font-size: 13px; line-height: 1.6; }

/* ---- Map ---- */
.eats-map-frame { position: relative; display: grid; }
.eats-map { height: clamp(240px, 62vw, 340px); border: 1px solid var(--eats-line); border-radius: 12px; overflow: hidden; background: var(--eats-map-land); }
.eats-map-state {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; max-width: calc(100% - 48px);
  padding: 8px 14px; border-radius: 4px; background: rgb(var(--eats-paper-rgb) / .94); color: var(--eats-muted); font-size: 14px; text-align: center; pointer-events: none;
}
.eats-map-state[data-kind="error"] { color: #9a3b2c; }
.eats-map-legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--eats-muted); font-size: 12.5px; line-height: 1.5; }
.eats-legend-dot, .eats-pin-dot {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; flex: 0 0 auto;
  border-radius: 999px; background: var(--eats-accent); color: #fff; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1;
  box-shadow: 0 0 0 2px #fffcf6, 0 2px 6px rgb(60 30 12 / .32);
}
/* MapLibre owns marker positioning (.maplibregl-marker is absolute); never override it. */
.eats-pin {
  display: grid; place-items: center; width: max(44px, var(--pin-size, 0px)); height: max(44px, var(--pin-size, 0px));
  padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.eats-pin .eats-pin-dot { transition: transform var(--hx-dur-fast) var(--hx-ease), background-color var(--hx-dur-fast) var(--hx-ease); }
.eats-pin.is-cluster .eats-pin-dot { width: var(--pin-size); height: var(--pin-size); font-size: 13px; box-shadow: 0 0 0 4px rgb(var(--eats-accent-rgb) / .24), 0 0 0 2px #fff inset, 0 2px 8px rgb(40 24 14 / .3); }
.eats-pin:hover .eats-pin-dot, .eats-pin:focus-visible .eats-pin-dot { transform: scale(1.1); }
.eats-pin:focus-visible { outline: none; }
.eats-pin:focus-visible .eats-pin-dot { outline: 2px solid var(--eats-deep); outline-offset: 3px; }
.eats-pin.is-selected .eats-pin-dot { background: var(--eats-deep); box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--eats-accent); }
.eats-pin.is-selected { z-index: 2; }
.eats-pin-label {
  position: absolute; top: calc(50% + 16px); left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px;
  background: rgb(255 252 246 / .94); color: var(--eats-ink); font-size: 12px; font-weight: 650; line-height: 1.4; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity var(--hx-dur-fast) var(--hx-ease);
}
.eats-map.is-near .eats-pin-label, .eats-pin.is-selected .eats-pin-label, .eats-pin:hover .eats-pin-label, .eats-pin:focus-visible .eats-pin-label { opacity: 1; }
.eats-map .maplibregl-ctrl-attrib { font-size: 11px; }
.eats-map .maplibregl-cooperative-gesture-screen { font-size: 15px; }

/* Phone layouts (portrait + short landscape): list first, the map opens below the count row. */
@media (max-width: 760px), (orientation: landscape) and (max-height: 560px) {
  .eats-layout { grid-template-areas: "head" "toolbar" "active" "summary" "map" "results"; }
  .eats-map-toggle { display: inline-flex; }
  body:not([data-map-open="open"]) .eats-map-panel { display: none; }
  /* drawerIn enters from just above (no downward offset), so scrollIntoView lands the final box under the header. */
  body[data-map-open="open"] .eats-map-panel { padding-bottom: 4px; transform-origin: top center; animation: drawerIn 220ms var(--hx-ease) both; }
  body[data-map-open="open"] .eats-summary { border-bottom-color: transparent; }
}

/* ---- Title over the photo: tablet, desktop and short landscape ---- */
@media (min-width: 761px), (orientation: landscape) and (max-height: 560px) {
  .eats-masthead { display: grid; align-content: end; min-height: var(--eats-photo-h); --eats-photo-h: 300px; }
  .eats-masthead-photo { position: absolute; inset: 0 0 auto 0; height: var(--eats-photo-h); }
  /* Left shade for the title only; the paper fade (::after) finishes the header bottom. */
  .eats-masthead-photo::after { inset: 0; height: auto; background: linear-gradient(90deg, rgb(var(--eats-deep-rgb) / .9) 0%, rgb(var(--eats-deep-rgb) / .72) 34%, rgb(var(--eats-deep-rgb) / .14) 64%, transparent 78%); }
  .eats-masthead-text { padding-top: 28px; }
  .eats-masthead-text > * { max-width: min(62%, 460px); }
  .eats-masthead-text .eats-readout { max-width: min(70%, 520px); }
  .eats-masthead[data-image-failed] { min-height: 0; }
  .eats-masthead[data-image-failed] .eats-masthead-text > * { max-width: 640px; }
}

/* ---- Short landscape: one pinned layer (the shared header) only; reduced header ---- */
@media (orientation: landscape) and (max-height: 560px) {
  .eats-masthead { --eats-photo-h: 160px; --eats-fade: 32px; }
  .eats-masthead-text { padding-top: 10px; padding-bottom: calc(var(--eats-fade) + 4px); }
  .eats-masthead h1 { font-size: 24px; margin-top: 2px; }
  .eats-lede { display: none; }
  /* Opened map is tall: usable height (below the shared header, above the home indicator) minus
     76px for the gap, the one-line legend and a visible edge of the list. */
  .eats-map { height: calc(100vh - var(--hx-child-height, 52px) - env(safe-area-inset-bottom, 0px) - 76px); height: calc(100dvh - var(--hx-child-height, 52px) - env(safe-area-inset-bottom, 0px) - 76px); min-height: 200px; }
}

/* ---- Tablet portrait: still stacked, wider gutters and a taller map ---- */
@media (min-width: 761px) {
  body.eats-body { --eats-gutter: max(32px, env(safe-area-inset-left, 0px)); --eats-gutter-right: max(32px, env(safe-area-inset-right, 0px)); --eats-fade: 64px; }
  .eats-masthead h1 { font-size: 32px; }
}
@media (min-width: 761px) and (orientation: portrait) {
  .eats-masthead { --eats-photo-h: 340px; }
  .eats-map { height: min(44vh, 520px); }
}

/* ---- Landscape tablet + desktop: list column with a pinned full-height map pane ---- */
@media (min-width: 761px) and (orientation: landscape) and (min-height: 561px) {
  .eats-masthead-text { padding-right: 28px; }
  .eats-layout {
    grid-template-columns: minmax(0, min(600px, 52%)) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas: "head map" "toolbar map" "active map" "summary map" "results map";
  }
  .eats-toolbar { margin-top: -18px; }
  .eats-toolbar, .eats-active-row, .eats-summary-row, .eats-results-panel { padding-right: 28px; }
  .eats-picker.is-popover { width: min(560px, calc(100% - var(--eats-gutter) - 28px)); }
  .eats-map-panel { padding: 0; align-self: stretch; z-index: 1; }
  .eats-map-frame { position: sticky; top: var(--eats-pane-top); height: calc(100vh - var(--eats-pane-top)); height: calc(100dvh - var(--eats-pane-top)); }
  .eats-map { height: 100%; border-radius: 0; border-width: 0 0 0 1px; }
  .eats-map-legend {
    position: absolute; left: 12px; top: 12px; z-index: 2; max-width: min(420px, calc(100% - 76px)); margin: 0;
    padding: 6px 10px; border-radius: 4px; background: rgb(255 252 246 / .94); box-shadow: 0 1px 4px rgb(60 36 18 / .14); color: var(--eats-ink);
  }
}
@media (min-width: 1181px) and (orientation: landscape) and (min-height: 561px) {
  .eats-masthead-text { padding-left: max(48px, env(safe-area-inset-left, 0px)); padding-right: 36px; }
  .eats-toolbar, .eats-active-row, .eats-summary-row, .eats-results-panel { padding-left: max(48px, env(safe-area-inset-left, 0px)); padding-right: 36px; }
  .eats-picker.is-popover { left: max(48px, env(safe-area-inset-left, 0px)); width: min(560px, calc(100% - 84px)); }
  .eats-masthead h1 { font-size: 34px; }
}

@media (hover: hover) {
  .eats-trigger:hover, .eats-token:hover, .eats-map-toggle:hover { background: var(--eats-hover); }
  .eats-option:not(:disabled):hover { background: var(--eats-hover); }
  .eats-empty-action:hover { background: #4a3c33; }
}
.eats-body :focus-visible { outline: 2px solid var(--eats-link); outline-offset: 2px; }
.eats-option:focus-visible { outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
  .eats-results.is-updating, .eats-picker.is-popover, .eats-picker.is-sheet, body[data-map-open="open"] .eats-map-panel { animation: none; }
  .eats-trigger, .eats-map-toggle, .eats-trigger > .eats-icon, .eats-pin .eats-pin-dot, .eats-pin-label { transition: none; }
  .eats-pin:hover .eats-pin-dot, .eats-pin:focus-visible .eats-pin-dot { transform: none; }
}
