/* eatGPT public site — contemporary grocery comparison product. */
:root {
  color-scheme: dark;
  --bg: #111111;
  --bg-elev: #1b1c1d;
  --hover: #292b2d;
  --ink: #f5f4f0;
  --muted: #c8c7c2;
  --faint: #adafae;
  --line: #393b3c;
  --line-strong: #898d8d;
  --accent: #b8efcb;
  --accent-2: #9edab8;
  --on-accent: #102017;
  --accent-soft: #203429;
  --save: #ffd087;
  --save-soft: #352b20;
  --danger: #ffb9b7;
  --danger-bg: #392525;
  --danger-line: #ab706e;
  --focus: #9dddff;
  --font: "Noto Sans TC", system-ui, sans-serif;
  --latin: "Inter Tight", "Noto Sans TC", system-ui, sans-serif;
  --shadow: 0 4px 18px rgb(0 0 0 / 20%);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  backdrop-filter: saturate(1.15) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-inner, .wrap, .foot-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.site-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  white-space: nowrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.wordmark .mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  display: block;
  flex-shrink: 0;
}
.wordmark span {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 1;
}
.wordmark:hover { color: var(--accent); }
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
  min-width: 0;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--hover); }
.nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 650;
  background: var(--accent-soft);
}
.lang {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elev);
}
.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 9px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 1.2;
  min-width: 36px;
}
.lang button + button { border-left: 1px solid var(--line); }
.lang button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* Hero */
main.wrap { padding: 28px 0 80px; }
.hero { margin: 0 0 22px; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--muted);
  font-weight: 650;
}
h1 {
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: normal;
  font-weight: 550;
  margin: 0 0 8px;
  color: var(--muted);
}
.lead {
  margin: 0 0 22px;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: normal;
  font-weight: 650;
  color: var(--ink);
  max-width: 22em;
}
.search-hero {
  position: relative;
  display: block;
  max-width: 40rem;
}
.search-hero .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}
.search-hero input {
  width: 100%;
  font: inherit;
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px 16px 16px 44px;
  box-shadow: var(--shadow);
}
.search-hero input::placeholder { color: var(--faint); }
.question-answer {
  margin: 10px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}
.question-answer span { display: block; }
.question-answer span + span { color: var(--muted); margin-top: 2px; }

.search-hero input:focus,
.controls select:focus,
.lang button:focus-visible,
.pager button:focus-visible,
.cta:focus-visible,
.policy summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.status {
  min-height: 1.3em;
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--muted);
}
.status.live { color: var(--accent-2); }
.status.unavailable, .unavailable-panel { color: var(--danger); }
.unavailable-panel {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.hidden { display: none !important; }

.grocery-title {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 650;
  color: var(--ink);
}

.confirm {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 54rem;
}
body:has(.resto-hero) .confirm {
  margin: 0;
  max-width: none;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 450;
}
body:has(.resto-hero) .confirm strong {
  font-weight: 550;
  color: var(--muted);
}
.confirm strong { color: var(--ink); font-weight: 650; }

/* Filters */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 14px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.controls .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}
.controls .check input { accent-color: var(--accent); width: 15px; height: 15px; }
.controls .sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.controls select {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
}
.count { margin: 0; font-size: 0.8rem; color: var(--muted); }

.empty-filter {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Comparison table (grocery) and reserved list rows (restaurant) */
.results {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.cmp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmp-table {
  --store-count: 2;
  /* Definite store/save column widths (rem), not percentages. --cheaper-inset is
     a consistent highlight inset; the cheaper fill equals the cell padding-box
     minus 2 * --cheaper-inset on each axis. */
  --store-col: 11rem;
  --save-col: 8rem;
  --cheaper-inset: 4px;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.cmp-table col.col-name { width: auto; }
.cmp-table col.col-store { width: var(--store-col); }
.cmp-table col.col-save { width: var(--save-col); }
.cmp-table thead th {
  position: sticky;
  top: 56px;
  z-index: 6;
  background: var(--bg-elev);
  box-shadow: 0 1px 0 var(--line);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: normal;
  text-transform: none;
  color: var(--muted);
  text-align: left;
  padding: 12px 12px 12px 0;
}
.cmp-table thead th:first-child { padding-left: 20px; }
.cmp-table thead th:last-child { padding-right: 20px; }
.cmp-table .cmp-name-head,
.cmp-table .cmp-name { width: auto; }
.cmp-table .cmp-store-head,
.cmp-table .cmp-cell { width: var(--store-col); }
.cmp-table .cmp-save-head,
.cmp-table .cmp-save { width: var(--save-col); }
.cmp-table .cmp-store-head,
.cmp-table .cmp-cell,
.cmp-table .cmp-save-head,
.cmp-table .cmp-save { text-align: right; }
.cmp-table .cmp-row > * {
  vertical-align: top;
  padding: 14px 12px 14px 0;
  border-bottom: 1px solid var(--line);
}
.cmp-table .cmp-row > *:first-child { padding-left: 20px; }
.cmp-table .cmp-row > *:last-child { padding-right: 20px; }
.cmp-table tbody .cmp-row:last-child > * { border-bottom: 0; }
.cmp-table tbody .cmp-row:hover { background: var(--hover); }
.cmp-table tbody .cmp-row.is-diff { background: color-mix(in srgb, var(--save-soft) 55%, var(--bg-elev)); }
.cmp-table tbody .cmp-row.is-diff:hover { background: color-mix(in srgb, var(--save-soft) 75%, var(--bg-elev)); }

/* Restaurant reserved placeholders still use these unscoped row styles. */
.cmp-list .cmp-row,
.reserved .cmp-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr);
  grid-template-areas:
    "name prices"
    "obs  prices";
  gap: 2px 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cmp-list .cmp-row:last-child,
.reserved .cmp-row:last-child { border-bottom: 0; }
.cmp-name {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 1.35;
  min-width: 0;
  color: var(--ink);
}
.cmp-table .cmp-name {
  font-weight: 650;
  text-align: left;
}
.cmp-obs {
  color: var(--faint);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: normal;
  margin-top: 4px;
  line-height: 1.35;
}
.cmp-prices {
  grid-area: prices;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 7.2rem;
  gap: 8px 16px;
  align-items: center;
}
.cmp-price,
.cmp-cell-inner {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 10px;
  box-sizing: border-box;
}
.cmp-table td.cmp-cell,
.cmp-table td.cmp-save,
.cmp-table th.cmp-name {
  display: table-cell;
}
.cmp-price .store,
.cmp-cell .store {
  display: block;
  width: 100%;
  font-size: 0.7rem;
  font-weight: 550;
  color: var(--muted);
  letter-spacing: normal;
  text-align: inherit;
}
.cmp-table .cmp-cell .store { display: none; }
.cmp-price .amt,
.cmp-cell .amt {
  font-size: 1.22rem;
  font-weight: 650;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.15;
}
.cmp-price.is-cheaper .amt,
.cmp-cell.is-cheaper .amt { color: var(--accent); font-weight: 700; }
/* Paint a stretch fill on the td, not a shrink-to-fit inner. Table-cell
   percentage widths on .cmp-cell-inner are indefinite; do not use them here. */
.cmp-table td.cmp-cell {
  position: relative;
}
.cmp-table td.cmp-cell.is-cheaper {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.cmp-table td.cmp-cell.is-cheaper::before {
  content: "";
  position: absolute;
  inset: var(--cheaper-inset);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 10px;
  pointer-events: none;
  z-index: 0;
}
.cmp-table .cmp-cell-inner {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  box-sizing: border-box;
  background: transparent;
  box-shadow: none;
}
.cmp-price.is-cheaper {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}
.cmp-unit, .cmp-promo, .cmp-hist {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: normal;
  line-height: 1.35;
  text-align: inherit;
  white-space: normal;
  max-width: 16rem;
}
.cmp-cell.is-omitted .cmp-cell-inner { min-height: 1em; }
.cmp-cell.is-empty .amt {
  color: var(--faint);
  font-weight: 550;
  font-size: 1.05rem;
  letter-spacing: normal;
}
.cue {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 1.3;
  white-space: nowrap;
}
.cmp-cell.is-cheaper .cue {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.cmp-save {
  text-align: right;
  justify-self: end;
  min-width: 0;
}
.cmp-save .save-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--save);
  letter-spacing: normal;
  text-transform: none;
}
.cmp-save .save-amt {
  display: block;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
  color: var(--save);
  line-height: 1.15;
}
.cmp-save .save-basis {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.3;
  color: var(--save);
  text-transform: none;
  max-width: 9.5rem;
}
.cmp-save.cmp-save-unit .save-amt {
  font-size: 1.12rem;
  font-weight: 700;
}
.cmp-save.is-same {
  color: var(--faint);
  text-align: right;
}
.same-cue {
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--faint);
  letter-spacing: normal;
}

/* Skeleton */
.skeleton-row .ghost,
.reserved .ghost {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--hover) 25%, var(--line) 50%, var(--hover) 75%);
  background-size: 200% 100%;
}
.skeleton-row .ghost {
  animation: shine 1.2s ease-in-out infinite;
}
.skeleton-row .g1, .reserved .g1 { width: 72%; height: 16px; }
.skeleton-row .g2, .reserved .g2 { width: 58%; height: 22px; margin-left: auto; }
.skeleton-row .g3, .reserved .g3 { width: 70%; height: 22px; margin-left: auto; }
.skeleton-row .g-obs { width: 42%; height: 10px; margin-top: 8px; }
.cmp-table .skeleton-row .g2 { margin-top: 0; }
@keyframes shine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.pager button {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 550;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}
.pager button:disabled { opacity: 1; color: var(--faint); cursor: not-allowed; }
.pager button:hover:not(:disabled) { border-color: var(--line-strong); }

/* Footer */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.82rem;
}
.policy { margin: 0 0 16px; max-width: 46rem; }
.policy summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
  font-size: 0.86rem;
}
.policy-body { margin: 10px 0 0; }
.policy-body p { margin: 0 0 8px; max-width: 46rem; line-height: 1.55; }
.policy-body p:last-child { margin-bottom: 0; }
.legal { margin: 0; max-width: 46rem; color: var(--muted); }
.foot-links { margin: 10px 0 0; }
.foot-links a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Privacy draft */
.privacy-page { max-width: 42rem; }
.privacy-page .privacy-body p { margin: 0 0 1rem; line-height: 1.65; }
.privacy-page .privacy-body p:last-child { margin-bottom: 0; }

/* Restaurant empty state */
.empty-state { max-width: 36rem; margin: 0 0 32px; }
.empty-state h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: normal;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 12px;
}
.empty-state .lead {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.45;
  margin: 0 0 12px;
  color: var(--ink);
  max-width: 34rem;
}
.empty-body {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.empty-cta { margin: 0; }
.cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.94rem;
  letter-spacing: normal;
}
.cta:hover { background: var(--accent-2); color: var(--on-accent); }
.reserved {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0.48;
  pointer-events: none;
  user-select: none;
}
.reserved .cmp-row { background: transparent; }
.reserved .cmp-row:hover { background: transparent; }
.reserved .ghost {
  background: var(--hover);
}

.results[hidden],
.controls[hidden],
.pager[hidden],
.count[hidden],
.empty-filter[hidden] { display: none !important; }
.toolbar:has(#controls[hidden]) { display: none; }

@media (max-width: 860px) {
  .cmp-table thead th { top: 56px; }
  .cmp-list .cmp-row,
  .reserved .cmp-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "prices"
      "obs";
    gap: 10px;
  }
  .cmp-prices { grid-template-columns: 1fr 1fr; }
  .cmp-list .cmp-save,
  .reserved .cmp-save {
    grid-column: 1 / -1;
    text-align: left;
    justify-self: start;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-top: 2px;
  }
  .cmp-save .save-label { display: inline; text-transform: none; letter-spacing: normal; }
  .cmp-save .save-amt { display: inline; font-size: 1.12rem; }
  .cmp-obs { order: 3; }
}

@media (max-width: 700px) {
  .site-inner, .wrap, .foot-inner { width: calc(100% - 28px); }
  .site-inner { gap: 10px; height: 52px; }
  .wordmark span { font-size: 1rem; }
  .nav a { padding: 5px 8px; font-size: 0.88rem; }
  .lang button { min-height: 32px; min-width: 36px; }
  main.wrap { padding: 14px 0 64px; }
  .hero { margin: 0 0 12px; }
  .eyebrow { margin-bottom: 4px; }
  h1 { margin-bottom: 4px; }
  .lead {
    margin-bottom: 12px;
    font-size: 1.28rem;
    line-height: 1.25;
  }
  .search-hero input { padding: 12px 14px 12px 40px; font-size: 1rem; }
  .search-hero .search-icon { left: 14px; }

  .status { margin: 0 0 6px; font-size: 0.8rem; min-height: 0; }
  .confirm {
    margin: 0 0 6px;
    font-size: 0.75rem;
    line-height: 1.4;
  }
  .toolbar { margin: 0 0 8px; gap: 6px 12px; }
  .controls { gap: 8px 12px; }
  .controls .check { font-size: 0.86rem; }
  .controls select { padding: 6px 8px; }

  .results, .reserved { border-radius: 12px; background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .cmp-list { display: flex; flex-direction: column; gap: 10px; }
  .cmp-table { display: block; width: 100%; table-layout: auto; }
  .cmp-table colgroup,
  .cmp-table thead { display: none; }
  .cmp-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .cmp-table .cmp-name-head,
  .cmp-table .cmp-name,
  .cmp-table .cmp-store-head,
  .cmp-table .cmp-cell,
  .cmp-table .cmp-save-head,
  .cmp-table .cmp-save { width: auto; }
  .cmp-list .cmp-row,
  .reserved .cmp-row,
  .cmp-table tbody .cmp-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    width: 100%;
    gap: 6px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px 10px;
    box-sizing: border-box;
  }
  .cmp-table tbody .cmp-row > *,
  .cmp-table tbody .cmp-row:last-child > *,
  .cmp-table tbody th.cmp-name,
  .cmp-table tbody td.cmp-cell,
  .cmp-table tbody td.cmp-save {
    display: block;
    border-bottom: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
  }
  .cmp-table .cmp-name {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  .cmp-table tbody .cmp-row.is-diff { background: color-mix(in srgb, var(--save-soft) 70%, var(--bg-elev)); }
  .cmp-table tbody .cmp-row.is-diff:hover,
  .cmp-table tbody .cmp-row:hover,
  .cmp-list .cmp-row:hover,
  .reserved .cmp-row:hover { background: var(--bg-elev); }
  .cmp-table tbody .cmp-row.is-diff:hover { background: color-mix(in srgb, var(--save-soft) 70%, var(--bg-elev)); }
  .cmp-list .cmp-row:last-child,
  .reserved .cmp-row:last-child { border-bottom: 1px solid var(--line); }
  .cmp-table .cmp-cell,
  .cmp-table .cmp-save {
    display: block;
    justify-content: unset;
    text-align: left;
    width: 100%;
  }
  .cmp-table .cmp-cell-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    padding: 5px 8px;
    gap: 0 8px;
  }
  .cmp-table .cmp-cell .store {
    display: block;
    width: auto;
    margin: 0;
    flex: 1 1 auto;
  }
  .cmp-table .cmp-cell .amt {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 1.12rem;
  }
  .cmp-table .cmp-cell .cue {
    flex: 1 0 100%;
    justify-content: flex-end;
    text-align: right;
  }
  /* Cards are block layout, not table-cells. Stretch the inner, not a td ::before. */
  .cmp-table td.cmp-cell.is-cheaper::before {
    content: none;
    display: none;
  }
  .cmp-cell.is-cheaper {
    padding: 0 !important;
    width: 100%;
    background: transparent;
    position: static;
  }
  .cmp-table .cmp-cell-inner {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
  .cmp-cell.is-cheaper .cmp-cell-inner {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
  }
  .cmp-table .cmp-save {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 2px;
  }
  .cmp-save .save-label { display: inline; text-transform: none; letter-spacing: normal; }
  .cmp-save .save-amt { display: inline; font-size: 1.16rem; }
  .cmp-save.cmp-save-unit {
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
  }
  .cmp-save .save-basis {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    max-width: none;
  }
  .cmp-save.cmp-save-unit .save-amt { display: inline; font-size: 1.12rem; font-weight: 700; }
  .reserved { display: flex; flex-direction: column; gap: 10px; opacity: 0.45; }

  .hero { margin: 0 0 8px; }
  .lead { margin-bottom: 8px; font-size: 1.18rem; }
  .cmp-unit, .cmp-promo, .cmp-hist {
    font-size: 0.64rem;
    line-height: 1.25;
    max-width: none;
  }
  .cmp-table .cmp-cell-inner { padding: 4px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-row .ghost { animation: none; }
  html { scroll-behavior: auto; }
}

/* Restaurant search */
body:has(.resto-page) {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body:has(.resto-page) main.resto-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.resto-hero { margin: 0 0 14px; }
.resto-hero .eyebrow { margin-bottom: 8px; }
.resto-hero h1.resto-display {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: normal;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 22em;
  text-wrap: balance;
}
.resto-form {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.resto-form .search-hero { max-width: none; }
.resto-form .search-hero input {
  box-shadow: none;
  padding: 14px 14px 14px 44px;
}
.resto-form .search-hero .search-icon { left: 14px; }
.resto-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0;
}
.text-btn, .text-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  color: var(--accent-2);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.text-btn:hover, .text-link:hover { color: var(--accent); }
.resto-actions .cta { border: 0; cursor: pointer; font: inherit; padding: 10px 14px; }
.location-status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 40rem;
}
.location-status:empty { display: none; }
.manual-location {
  display: block;
  margin: 0;
  max-width: none;
}
.place-field { display: block; margin: 0; }
.place-caption {
  display: block;
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--muted);
}
.place-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 12px;
}
.place-row .place-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}
.place-row .place-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.place-row #btn-place {
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.2;
  padding: 8px 0;
}
.resto-intents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.intent-chip {
  font: inherit;
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  line-height: 1.3;
}
.intent-chip:hover { border-color: var(--line-strong); }
.intent-chip:focus-visible,
.text-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.resto-actions .cta:focus-visible,
.intent-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.resto-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* Ready banner is folded into the waiting composition; keep the node for errors/loading. */
body:has(#resto-idle:not([hidden])) .resto-page > .resto-stage > #banner.live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body:has(#results:not([hidden])) .resto-page > .resto-stage > #banner.live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.resto-wait {
  flex: 0 0 auto;
  margin: 0;
}
.resto-wait.is-landing {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px 28px 20px;
  min-height: 0;
}
.resto-idle {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  max-width: none;
  border: 0;
}
.resto-idle[hidden] { display: none !important; }
.resto-ways {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 28px;
  align-content: start;
}
.resto-ways li { margin: 0; min-width: 0; }
.resto-way-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 1.3;
  color: var(--ink);
}
.resto-way-hint {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 22em;
}
.resto-wait .confirm {
  margin: 28px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.resto-loc-note {
  display: inline;
  margin: 0;
}
.resto-loc-note::before {
  content: " ";
}

.ai-answer {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.95rem;
  max-width: 46rem;
}
.citywide-note, .count {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: var(--muted);
}
.resto-results { margin: 0 0 28px; }
.resto-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.resto-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.resto-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.resto-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 1.35;
  color: var(--ink);
}
.resto-meta, .resto-address {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.resto-cover-wrap {
  margin: -16px -20px 14px;
  border-radius: 0;
  overflow: hidden;
  background: var(--accent-soft);
  aspect-ratio: 16 / 9;
  max-height: 220px;
}
.resto-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resto-cover-wrap {
  position: relative;
}
.resto-cover-wrap.is-fallback {
  min-height: 140px;
  background: color-mix(in srgb, var(--accent) 18%, var(--bg-elev));
}
.resto-cover-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 14px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: normal;
  line-height: 1.3;
  color: var(--ink);
  background: var(--bg);
}
.resto-cover-wrap.is-fallback .resto-cover-caption {
  background: none;
  color: var(--ink);
}
.resto-comment {
  margin: 12px 0 0;
  padding: 10px 12px;
  max-width: 46rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  color: var(--ink);
}
.resto-comment-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: normal;
  text-transform: none;
  color: var(--accent);
}
.resto-comment-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}
.matched-dishes li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dish-thumb {
  display: none;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--accent-soft);
  flex-shrink: 0;
}
.dish-thumb.is-loaded {
  display: block;
}
.resto-menu { margin: 12px 0 0; }
.resto-menu-btn { cursor: pointer; }
.resto-menu-btn.intent-chip {
  background: var(--bg-elev);
  color: var(--ink);
}
.resto-menu-panel {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.menu-note {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.venue-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.venue-menu li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.venue-menu li:first-child { border-top: 0; padding-top: 0; }
.venue-dish-name { flex: 1 1 12rem; font-size: 0.92rem; }
.dish-health {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.band {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: normal;
  text-transform: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.band-excellent { background: var(--accent-soft); color: var(--accent); }
.band-good { background: var(--accent-soft); color: var(--accent); }
.band-okay { background: var(--save-soft); color: var(--save); }
.band-poor { background: var(--danger-bg); color: var(--danger); }
.matched-dishes {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.matched-dishes li { margin: 0 0 4px; }
.stale-price { color: var(--faint); font-size: 0.8rem; }

@media (max-width: 700px) {
  body:has(.resto-page) main.resto-page { padding-bottom: 12px; }
  .resto-hero { margin: 0 0 12px; }
  .resto-hero h1.resto-display {
    margin-bottom: 12px;
    font-size: 1.28rem;
    line-height: 1.25;
    max-width: none;
  }
  .resto-form { gap: 10px; padding: 12px; border-radius: 12px; }
  .resto-form .search-hero input { padding: 12px 12px 12px 40px; }
  .place-row { gap: 8px; }
  .place-row .place-input { padding: 9px 10px; }
  .resto-card { border-radius: 12px; padding: 14px 14px 12px; }
  .resto-cover-wrap { margin: -14px -14px 12px; max-height: 180px; }
  .resto-wait.is-landing { padding: 18px 16px 14px; border-radius: 12px; }
  .resto-ways {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .resto-way-name { font-size: 1.02rem; margin-bottom: 2px; }
  .resto-way-hint { font-size: 0.88rem; }
  .resto-wait .confirm { margin-top: 16px; padding-top: 12px; }
}


/* Consumer surface; all visual states share opaque, tested color pairs. */
html:lang(en) body { font-family: var(--latin); }
.wordmark span, .amt, .save-amt { font-family: var(--latin); }
.wordmark .mark { width: 32px; height: 32px; }
.nav a, .lang button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; }
.lang button { min-width: 40px; }
.hero { background: radial-gradient(ellipse at top right, var(--hover), var(--bg) 72%); border-radius: 18px; padding: clamp(14px, 3vw, 32px); }
.grocery-title, .resto-hero h1.resto-display { margin: 0 0 10px; font-size: clamp(1.45rem,4vw,2.25rem); line-height: 1.28; color: var(--ink); }
.hero-helper { color: var(--muted); margin: 0 0 12px; }
.hero.resto-hero { padding-bottom: 8px; }
.resto-form { background: transparent; border: 0; box-shadow: none; padding: 0; }
.search-pill { display: flex; align-items: center; width: 100%; max-width: 40rem; min-height: 54px; gap: 4px; padding: 4px; background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: 999px; }
.search-pill .search-hero, .search-pill > input { flex: 1 1 0; min-width: 0; }
.search-pill #q { display: block; width: 100%; min-width: 0; padding: 10px 12px; font: inherit; font-size: 1rem; background: transparent; color: var(--ink); border: 0; border-radius: 999px; box-shadow: none; }
.search-pill .search-hero #q { padding-left: 40px; }
.search-pill #q::placeholder, .place-input::placeholder { color: var(--faint); opacity: 1; }
.search-submit { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; font: inherit; font-size: 1.25rem; cursor: pointer; color: var(--on-accent); background: var(--accent); }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.intent-chip, .controls .check { border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink); border-radius: 999px; min-height: 44px; }
.controls .check { padding: 6px 12px; }
.controls .check:has(input:checked), .intent-chip[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.intent-chip:hover, .pager button:hover:not(:disabled), .lang button:not([aria-pressed="true"]):hover { background: var(--hover); }
.search-submit:hover, .search-submit:active { background: var(--accent-2); }
.search-submit:disabled, .suggestions button:disabled { cursor: not-allowed; color: var(--muted); background: var(--hover); }
.controls select, .place-row .place-input, .pager button { border-color: var(--line-strong); min-height: 44px; }
.text-btn, summary { min-height: 44px; }
.place-row .place-input { font-size: 1rem; }
:focus-visible, .search-pill:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.lang button:focus-visible { outline-offset: -3px; }
.lang button[aria-pressed="true"]:focus-visible, .search-submit:focus-visible { outline: 3px double var(--on-accent); outline-offset: -4px; }
.cmp-photo { display: block; float: inline-start; width: 32px; height: 32px; margin: 0 10px 4px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--hover); }
.cmp-table .cmp-name { overflow-wrap: anywhere; }
.cmp-unit, .cmp-promo, .cmp-hist, .cmp-obs { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.cmp-price .amt, .cmp-cell .amt, .cmp-table .cmp-cell .amt { font-size: 1.3rem; font-weight: 700; }
.cmp-save .save-amt { font-size: 1.35rem; }
.empty-filter { background: var(--bg-elev); padding: 12px 14px; border-radius: var(--radius); }
.site-foot { background: var(--bg-elev); }
.resto-wait.is-landing { padding: 12px 16px; max-width: 44rem; }
.resto-wait .confirm { margin-top: 10px; padding-top: 10px; }
.resto-way-hint { max-width: none; }
@media (max-width: 700px) {
  .site-inner { gap: 4px; }
  .nav a { padding: 4px; }
  .lang button { padding: 4px; min-width: 34px; }
  .hero { padding: 12px; }
  .cmp-photo { width: 28px; height: 28px; }
  .controls, .controls .sort { min-width: 0; max-width: 100%; }
  .controls select { min-width: 0; max-width: 100%; }
}
