/* FastTrack, Phase 2 design (approved by Joe 2026-11-02): DoorDash + LeanBites
   layout, the phone's own font, real food photos first, minimal brand color.
   Data colors: calories dark ink, protein gold, score circle green (80+) / amber. */
:root {
  --ink: #1f2421;
  --muted: #6b706d;
  --line: #ececec;
  --soft: #f4f3f1;
  --gold: #f2a900;
  --gold-text: #8a6200;
  --gold-bg: #fff5d9;
  --green: #1f9d55;
  --amber: #e0a100;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.35 var(--font); -webkit-font-smoothing: antialiased; }
body { padding-bottom: env(safe-area-inset-bottom); }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.scroller { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 8px; scroll-padding: 0 16px; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: #c9c9c9 transparent; cursor: grab; }
/* A small scrollbar under every sideways row (Joe, 2026-11-04, preview) */
.scroller::-webkit-scrollbar { height: 4px; }
.scroller::-webkit-scrollbar-thumb { background: #c9c9c9; border-radius: 4px; }
.scroller::-webkit-scrollbar-track { background: transparent; }
.scroller.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.scroller > * { scroll-snap-align: start; }
.pad { padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Home ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; padding-top: max(14px, env(safe-area-inset-top)); }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: -.3px; color: var(--ink); }
.loc { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; background: none; border: 0; padding: 6px 0; }
.loc svg { width: 16px; height: 16px; }
.search { margin: 0 16px; display: flex; align-items: center; gap: 10px; border: 1px solid #e3e3e3; border-radius: 12px; padding: 0 12px; color: #8a8f8c; }
.search svg { width: 18px; height: 18px; }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; padding: 11px 0; color: var(--ink); background: none; min-width: 0; }
.search input::placeholder { color: #8a8f8c; }
.chips { padding: 12px 16px 4px; gap: 8px; }
.chip { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid #e1e1e1; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.icon { padding: 0; width: 34px; justify-content: center; color: var(--muted); }
.chip.icon svg { width: 18px; height: 18px; }
.chip svg.i { width: 16px; height: 16px; }
.chip-gap { flex: none; width: 1px; height: 22px; align-self: center; background: #e1e1e1; }
.chip .badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.chip[aria-pressed="true"] .badge { background: #fff; color: var(--ink); }
.hint { margin: 6px 16px 0; color: #b3261e; font-size: 13px; }
h2.h { font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.block { padding-top: 18px; }
.block > .h { padding-bottom: 10px; }
.cats { gap: 14px; }
.cat { flex: none; width: 62px; text-align: center; font-size: 12px; color: #3d423f; background: none; border: 0; padding: 0; }
.cat .tile { width: 62px; height: 62px; border-radius: 16px; background: var(--soft); display: grid; place-items: center; margin-bottom: 6px; color: #3d423f; border: 2px solid transparent; }
.cat .tile svg { width: 30px; height: 30px; stroke-width: 1.5; }
.cat[aria-pressed="true"] .tile { border-color: var(--ink); background: #fff; }
.rest-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 10px; text-decoration: none; }
.rest-head small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.arrow { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #f1f1f1; display: grid; place-items: center; border: 0; }
.arrow svg { width: 16px; height: 16px; }
.cards { padding-bottom: 16px; }
.card { flex: none; width: 236px; border-radius: 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.07); overflow: hidden; text-decoration: none; display: block; }
.card .ph { height: 150px; }
.card .body { padding: 10px 12px 12px; }
.card .row { display: flex; gap: 8px; align-items: flex-start; }
.card .name { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.card .sub { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: #f2f2f2; color: var(--ink); }
.pill svg { width: 13px; height: 13px; stroke-width: 2; }
.pill.pro { background: var(--gold-bg); color: var(--gold-text); }
.pill.pro svg { color: var(--gold); }
.none-note { margin: 0 16px 10px; color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 24px 16px; text-align: center; }

/* score ring */
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring b { font-weight: 500; position: relative; }

/* photos: the meal's own items arranged together */
.ph { position: relative; background: var(--soft); overflow: hidden; }
.ph img { position: absolute; object-fit: contain; }
.ph .e { left: -14%; top: -18%; width: 104%; height: 136%; }
.ph .s { right: -8%; bottom: -18%; width: 60%; height: 84%; }
.ph.one .e { left: -12%; top: -20%; width: 124%; height: 140%; }
.ph.three .e { left: -14%; top: -14%; width: 72%; height: 118%; }
.ph.three .e2 { right: -12%; top: -14%; width: 72%; height: 118%; }
.ph.two .e { left: -16%; top: -14%; width: 76%; height: 128%; }
.ph.two .e2 { right: -16%; top: -14%; width: 76%; height: 128%; }
.ph.three .s { right: 28%; bottom: -16%; width: 44%; height: 70%; }
.ph img.full { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
.ph img.l, .ph img.r { top: 0; width: 50%; height: 100%; object-fit: cover; }
.ph img.l { left: 0; }
.ph img.r { right: 0; border-left: 2px solid #fff; }
.ph img.inset { right: 8px; bottom: 8px; width: 30%; height: 34%; object-fit: cover; border-radius: 10px; border: 2px solid #fff; }
.ph .none { position: absolute; inset: 0; display: grid; place-items: center; color: #bcb7b0; }
.ph .none svg { width: 44px; height: 44px; stroke-width: 1.3; }
.ph .credit { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: #8d8882; background: rgba(255,255,255,.7); padding: 0 4px; border-radius: 4px; }
.ph.has-s .credit, .ph.three .credit { left: 10px; right: auto; }
.ph .tag { position: absolute; left: 10px; top: 10px; background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ph .ring { position: absolute; right: 8px; top: 8px; background: #fff; border-radius: 50%; }

/* ---------- Restaurant ---------- */
.hero { height: 250px; }
.hero .credit { bottom: 10px; }
.hero .tag { top: auto; bottom: 28px; }
.hbtn { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.15); z-index: 2; border: 0; }
.hbtn svg { width: 18px; height: 18px; }
.logo { width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.15); margin: -38px auto 0; position: relative; display: grid; place-items: center; font-weight: 700; font-size: 22px; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.rname { text-align: center; font-size: 23px; font-weight: 700; margin: 8px 16px 2px; letter-spacing: -.3px; }
.rmeta { text-align: center; color: var(--muted); font-size: 13px; margin: 0 16px; }
.rmeta svg { width: 14px; height: 14px; color: var(--green); stroke-width: 2.4; vertical-align: -2px; margin-right: 2px; }
.meal { padding: 16px 16px 4px; }
.meal h1 { font-size: 20px; font-weight: 700; line-height: 1.25; margin: 0; letter-spacing: -.2px; }
.meal .note { color: var(--muted); font-size: 13px; margin-top: 3px; }
.stats { display: flex; align-items: center; gap: 22px; margin: 12px 0 6px; }
.stat b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.pro b { color: var(--gold); }
.stats .ring { margin-left: auto; }
.macros { color: var(--muted); font-size: 13px; }
.macros b { color: var(--ink); font-weight: 500; }
.order-list { list-style: none; margin: 12px 0 0; padding: 10px 12px; background: var(--soft); border-radius: 12px; font-size: 13px; }
.order-list li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.order-list span:last-child { color: var(--muted); white-space: nowrap; }
.steps-h { margin: 14px 0 4px; font-size: 15px; font-weight: 600; }
.steps { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.5; }
.steps li { padding: 1px 0; }
.meal-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--green); }
.order-note { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.misses { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff6e0; font-size: 13px; }
.tips { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.tips li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tips li svg { color: var(--muted); width: 18px; height: 18px; }
.tips li b { font-weight: 500; }
.tips li.more { color: var(--muted); justify-content: space-between; padding: 0; }
.tips li.more button { flex: 1; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; padding: 11px 0; color: var(--muted); font-size: 14px; text-align: left; }
.tips li.more svg { width: 16px; height: 16px; transition: transform .15s; }
.tips li.more button[aria-expanded="true"] svg { transform: rotate(90deg); }
.tiles { padding-bottom: 6px; }
.tile2 { flex: none; width: 150px; text-decoration: none; display: block; color: inherit; }
.tile2 .ph { height: 140px; border-radius: 12px; }
.tile2 .name { font-size: 14px; font-weight: 500; margin-top: 8px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile2 .nums { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tile2 .nums .p { color: var(--gold-text); font-weight: 500; }

/* lists: full menu, drinks, sweet treats */
.list-section { padding: 22px 16px 0; }
.list-section .sub { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.list-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.list-controls .chip { height: 30px; font-size: 12px; }
.list-controls select { font: inherit; font-size: 13px; border: 1px solid #e1e1e1; border-radius: 8px; padding: 4px 6px; background: #fff; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.plain .nm { font-weight: 500; }
.plain .sm { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
.plain .cal { white-space: nowrap; font-weight: 500; }
.badge { display: inline-block; font-size: 11px; font-weight: 500; border-radius: 999px; padding: 1px 7px; margin: 3px 4px 0 0; background: #eef6f1; color: #1d6b40; }
.badge.fit { background: var(--gold-bg); color: var(--gold-text); }
.link-btn { background: none; border: 0; color: var(--ink); font-weight: 500; padding: 10px 0; text-decoration: underline; }

/* footer, sticky order button, sheets */
.footer { padding: 24px 16px 32px; color: var(--muted); font-size: 12px; }
.footer strong { font-weight: 500; color: #4a4f4c; }
.footer a { color: inherit; }
body.has-bar .footer { padding-bottom: 110px; }
.sticky { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px max(18px, env(safe-area-inset-bottom)); background: linear-gradient(rgba(255,255,255,0), #fff 30%); z-index: 5; }
.btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 500; }
.sticky .btn { justify-content: space-between; padding: 0 20px; }
.sticky .btn:disabled { opacity: 1; cursor: default; }
.sticky .btn small { font-size: 12px; color: #b9bdbb; font-weight: 400; }
.sheet-wrap { position: fixed; inset: 0; z-index: 10; }
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 20px max(24px, env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; }
.grab { width: 36px; height: 5px; border-radius: 3px; background: #ddd; margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 19px; }
.sheet p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.grow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.grow .box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid #c9c9c9; display: grid; place-items: center; flex: none; }
.grow[aria-pressed="true"] .box { background: var(--ink); border-color: var(--ink); color: #fff; }
.grow .box svg { width: 14px; height: 14px; stroke-width: 2.5; }
.grow b { font-weight: 500; flex: 1; }
.grow span { color: var(--muted); font-size: 13px; text-align: right; }
.sheet .btn { margin-top: 14px; }

@media (min-width: 700px) {
  main, .footer { max-width: 520px; margin: 0 auto; }
  .sticky { max-width: 520px; margin: 0 auto; }
}

/* Start screen (Joe, 2026-11-03): wordmark + two large photo cards, centered */
#start { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px 16px max(24px, env(safe-area-inset-bottom)); box-sizing: border-box; }
#start[hidden] { display: none; }
#start .wordmark { font-size: 24px; }
.start-cards { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.start-card { display: block; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); color: inherit; text-decoration: none; }
.start-card:active { transform: scale(.99); }
.start-photo { position: relative; height: 200px; background: #f3f2f0; overflow: hidden; }
.start-photo .credit { position: absolute; right: 8px; bottom: 8px; font-size: 10px; color: #fff; background: rgba(0,0,0,.45); padding: 2px 6px; border-radius: 6px; }
.start-text { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 2px; }
.start-text b { font-size: 20px; font-weight: 600; }
.start-text span { color: var(--muted); font-size: 14px; }
.sodium-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: #fdecea; color: #a1281b; font-size: 11px; font-weight: 600; vertical-align: middle; }
.tile2 .sodium-tag { margin-left: 0; }
.start-text .start-nums { color: var(--ink); font-size: 14px; font-weight: 500; margin-top: 2px; }
.pills .sodium-tag { margin-left: 0; height: 24px; }
/* Every card and menu item opens its own details (Joe, 2026-11-03) */
.plain li:has(> .item-link) { padding: 0; }
.item-link { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; width: 100%; text-decoration: none; color: inherit; }
.detail-chain { margin: 14px 16px 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.detail-chain svg { width: 14px; height: 14px; color: var(--green); }
.meal .detail-chain { margin: 0 0 4px; }
.nutrition li span:last-child { font-weight: 500; }
.detail-pad { height: 40px; }
/* Full Menu search and size picker (Joe, 2026-11-03) */
.search.menu-search { margin: 10px 0 4px; }
.list-controls.dim { opacity: .45; }
.list-controls.sizes { margin: 10px 0 2px; }
.size-name { margin-top: 2px; }
.opt { margin-top: 10px; }
.opt-name { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.opt .list-controls.sizes { margin: 6px 0 0; flex-wrap: wrap; }
.chip.unsold { border-style: dashed; color: var(--muted); }

/* ---- Joe, 2026-11-04, approved 2026-11-05 ---- */
:root { --accent: #2450d6; }   /* cobalt, option A (Joe, 2026-11-05) */
a.wordmark { text-decoration: none; }
/* Cutting / Bulking / Pre-workout centered; the selected one in the accent color */
.chips { justify-content: center; flex-wrap: wrap; }
.chip.preset[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Map: computers show it on the left (2/3); phones behind the List / Map button */
#map-pane { display: none; }
.map-art { width: 100%; height: 100%; display: block; }
.map-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 14px;
  padding: 12px 16px; box-shadow: 0 2px 12px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 2px; text-align: center; font-size: 14px; }
.map-note span { color: var(--muted); font-size: 13px; }
.view-toggle { display: none; }
@media (max-width: 1023px) {
  body.on-home .view-toggle { display: inline-flex; position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 8; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ink);
    color: #fff; font: inherit; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
  .view-toggle svg { width: 18px; height: 18px; }
  body.map-open #map-pane { display: block; position: fixed; inset: 0; z-index: 6; }
}
@media (min-width: 1024px) {
  body.split #map-pane { display: block; position: fixed; left: 0; top: 0; bottom: 0; width: 66.667vw; }
  body.split #home, body.split #rest, body.split .footer { margin-left: 66.667vw; }
  body.split .sticky { left: 66.667vw; }
}

/* "What I ate" calculator (Joe, 2026-11-06): simple fade-in only, no other animation yet. */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.fade { animation: fade-in .25s ease-out; }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } }
.ate-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 16px 0; padding: 14px 16px; border: 1px solid var(--line, #e6e6e6); border-radius: 14px; color: inherit; text-decoration: none; }
.ate-link b { display: block; font-size: 16px; font-weight: 600; }
.ate-link small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ate-link svg { width: 18px; height: 18px; color: var(--muted); }
.ate { padding: 12px 16px 0; }
.ate-top { display: flex; gap: 12px; align-items: flex-start; padding-top: max(4px, env(safe-area-inset-top)); }
.hbtn.flat { position: static; flex: none; }
.rname.left { text-align: left; margin: 2px 0 0; }
.ate .sub { margin: 2px 0 12px; color: var(--muted); font-size: 14px; }
.ate-meal .h { margin: 6px 0 0; }
.ate-list li { align-items: center; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty b { min-width: 16px; text-align: center; color: var(--ink); }
.qbtn, .add-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line, #dcdcdc); background: #fff; font-size: 18px; line-height: 1; color: var(--ink); cursor: pointer; flex: none; }
.add-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.ate-items { margin-top: 8px; }
.ate-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line, #eee); }
.ate-item > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ate-item .nm { font-size: 15px; }
.ate-item .sm { color: var(--muted); font-size: 13px; }
.ate-pick { margin-top: 4px; max-width: 100%; font: inherit; font-size: 13px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line, #dcdcdc); background: #fff; }
.ate-pad { height: 90px; }
.ate-total { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line, #e6e6e6); box-shadow: 0 -4px 16px rgba(0,0,0,.06); padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
.ate-total .stats { margin: 0; }
.ate-empty { margin: 4px 0; color: var(--muted); font-size: 14px; }
.ate-verdict { margin: 8px 0 4px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.ate-verdict.ok { color: var(--green); }
.ate-verdict.miss { color: var(--ink); }
.ate-verdict svg { width: 16px; height: 16px; }
.ate-checks { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ate-checks li { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: center; padding: 1px 0; }
.ate-checks li.ok { color: var(--green); }
.ate-checks li.miss { color: var(--muted); }
.ate-checks li span:last-child { color: var(--ink); white-space: nowrap; }
.ate-checks svg { width: 14px; height: 14px; }
.ate-checks .x { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); justify-self: center; }
@media (min-width: 1024px) { body.split .ate-total { left: 66.667vw; } }
.top-right { display: flex; align-items: center; gap: 14px; }
.ate-head { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 6px 0; }
.ate-places { margin-top: 8px; }
.ate-places li { padding: 0; }
.ate-place { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 0; color: inherit; text-decoration: none; font-size: 16px; }
.ate-place > span:nth-child(2) { flex: 1; }
.ate-place svg { width: 18px; height: 18px; color: var(--muted); }
.logo.small { position: static; margin: 0; box-shadow: none; border-width: 1px; border-color: var(--line); font-size: 16px; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); overflow: hidden; background: #fff; font-weight: 600; }
.logo.small img { width: 80%; height: auto; }
.ate-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ate-count { color: var(--muted); font-size: 14px; }
.calc-btn { border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 600; background: var(--accent); color: #fff; cursor: pointer; }
.calc-btn:disabled { background: #c9ccd6; cursor: default; }
.ate-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 10px; }
.tot { display: flex; flex-direction: column; }
.tot b { font-size: 16px; font-weight: 600; }
.tot > span { font-size: 12px; color: var(--muted); }
.tot.big { grid-column: span 2; }
.tot.big b { font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.tot.pro b { color: var(--gold, #c98a00); }
.ate-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ POLISH PASS (Joe, 2026-11-06)
   Quick and subtle: 0.2 to 0.3 s. With "reduce motion" on, simple fades only (see the end). */
html { scroll-behavior: smooth; }
* { -webkit-tap-highlight-color: transparent; }

/* Opening and closing pages: restaurant, meal and item details, calculator, picker, start. */
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-in { animation: view-in .24s cubic-bezier(.2,.7,.3,1); }

/* The More filters sheet slides up; the backdrop fades. */
.sheet-wrap .backdrop { opacity: 0; transition: opacity .22s ease; }
.sheet-wrap .sheet { transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.7,.3,1); }
.sheet-wrap.open .backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }

/* Photos fade in as they load. */
img { transition: opacity .3s ease; }
#app img:not(.loaded), main img:not(.loaded), #start img:not(.loaded), .ate-total img:not(.loaded) { opacity: 0; }

/* Instant press feedback on buttons and cards. */
.card, .tile2, .chip, .btn, .cat, .add-btn, .qbtn, .calc-btn, .ate-place, .ate-link, .item-link, .hbtn,
.start-card, .rest-head, .link-btn, .ate-toggle, .ate-head, .view-toggle, .loc {
  transition: transform .12s ease, opacity .12s ease; }
.card:active, .tile2:active, .chip:active, .btn:active, .cat:active, .add-btn:active, .qbtn:active,
.calc-btn:active, .ate-place:active, .ate-link:active, .item-link:active, .hbtn:active, .start-card:active,
.rest-head:active, .link-btn:active, .ate-toggle:active, .ate-head:active, .view-toggle:active, .loc:active {
  transform: scale(.97); transition-duration: .05s; }
.calc-btn:disabled:active, .btn:disabled:active { transform: none; }

/* Content below the fold fades and lifts in as it scrolls into view (light and quick). */
.rv { opacity: 0; transform: translateY(10px); transition: opacity .3s ease, transform .3s ease; }
.rv.in { opacity: 1; transform: none; }

/* Calculator: the merge (about 0.65 s), then the card's 0.3 s fade. */
.merge-stage { position: relative; height: 150px; }
.mt { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: #f3f3f2; overflow: hidden; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.12);
  animation: merge .62s cubic-bezier(.55,0,.35,1) forwards; }
.mt img { width: 100%; height: 100%; object-fit: cover; }
.mt svg { width: 28px; height: 28px; color: var(--muted); }
@keyframes merge {
  0% { transform: rotate(var(--a)) translateX(64px) rotate(calc(-1 * var(--a))); filter: blur(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: rotate(calc(var(--a) + 320deg)) translateX(0) rotate(calc(-1 * var(--a) - 320deg)) scale(.5); filter: blur(8px); opacity: 0; }
}
.mt-core { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(36,80,214,.25) 60%, transparent 70%);
  opacity: 0; transform: scale(.2); filter: blur(6px); animation: core .65s ease-out forwards; }
@keyframes core { 0%, 55% { opacity: 0; transform: scale(.2); } 85% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
.ate-card.fade { animation: fade-in .3s ease-out; }

/* Collapsible result card. */
.ate-head-right { display: inline-flex; align-items: center; gap: 10px; }
.ate-toggle { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--accent); padding: 4px 0; cursor: pointer; }
.ate-toggle svg { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .2s ease; }
.ate-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.ate-mini { margin: 2px 0 0; font-size: 15px; }
.ate-mini .ate-pro { color: var(--gold); }
.ate-card.collapsed .ate-verdict { margin-top: 4px; }

/* Reduce motion: simple fades only. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes view-in { from { opacity: 0; } to { opacity: 1; } }
  .sheet-wrap .sheet { transform: none; opacity: 0; transition: opacity .2s ease; }
  .sheet-wrap.open .sheet { opacity: 1; }
  .rv { transform: none; }
  .card:active, .tile2:active, .chip:active, .btn:active, .cat:active, .add-btn:active, .qbtn:active,
  .calc-btn:active, .ate-place:active, .ate-link:active, .item-link:active, .hbtn:active, .start-card:active,
  .rest-head:active, .link-btn:active, .ate-toggle:active, .ate-head:active, .view-toggle:active, .loc:active {
    transform: none; opacity: .7; }
  .ate-toggle svg { transition: none; }
  .fade, .ate-card.fade { animation: fade-in .2s ease-out; }
}

.site-line { margin-top: 6px; }
.site-line a { color: var(--muted); }
