/* 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; scrollbar-width: none; padding: 0 16px; scroll-padding: 0 16px; scroll-snap-type: x proximity; }
.scroller::-webkit-scrollbar { display: 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; }
.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; gap: 6px; }
.pill { 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.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; }
.seg { display: flex; background: #f1f1f1; border-radius: 999px; padding: 3px; margin: 14px 16px 0; }
.seg button { flex: 1; height: 36px; border: 0; border-radius: 999px; background: none; font-size: 14px; font-weight: 500; color: #555; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.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; }
.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; }
.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; }
}
