/* ================================================================================
   planner.css - Meal Planner app page.  Light + dark themes as variables:
   the system setting by default, the toggle's choice when made (data-theme).
   ================================================================================ */

:root { --navy:#1a1a3b; --navy-accent:#7fb0ff; --bg:#e8edf3; --card:#ffffff; --fg:#0a2540; --text:#425466; --mut:#697386; --line:#d6dde8; --accent:#1a73e8; --accent-hover:#155ab9; --accent-text:#1a73e8; --accent-soft:rgba(26,115,232,.10); --good:#0c8155; --good-soft:rgba(16,185,129,.12); --warn:#c2410c; --chip:#f1f5f9; --card-border:transparent; --card-shadow:0 1px 2px rgba(10,37,64,.06),0 4px 14px rgba(10,37,64,.07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#0f172a; --card:#1e293b; --fg:#f1f5f9; --text:#e2e8f0; --mut:#94a3b8; --line:#334155; --accent:#1a73e8; --accent-hover:#1557b0; --accent-text:#7fb0ff; --accent-soft:rgba(26,115,232,.16); --good:#34d399; --good-soft:rgba(52,211,153,.14); --warn:#fb923c; --chip:#0b1222; --card-border:#334155; --card-shadow:none; } }
:root[data-theme="dark"] { --bg:#0f172a; --card:#1e293b; --fg:#f1f5f9; --text:#e2e8f0; --mut:#94a3b8; --line:#334155; --accent:#1a73e8; --accent-hover:#1557b0; --accent-text:#7fb0ff; --accent-soft:rgba(26,115,232,.16); --good:#34d399; --good-soft:rgba(52,211,153,.14); --warn:#fb923c; --chip:#0b1222; --card-border:#334155; --card-shadow:none; }

/* Clerkenwell family look (2026-11-13): slate surfaces, navy brand bar with the
   Clerkenwell wordmark, Clerkenwell blue for actions, green for savings, Noto Sans,
   cards lifted by a layered shadow in light mode and outlined in dark mode. */
@font-face { font-family:"Noto Sans"; font-style:normal; font-weight:400 600; font-display:swap; src:url("../fonts/NotoSans-Regular.woff2") format("woff2"); }
@font-face { font-family:"Noto Sans"; font-style:normal; font-weight:700 900; font-display:swap; src:url("../fonts/NotoSans-Bold.woff2") format("woff2"); }

* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:15px/1.45 "Noto Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; max-width:760px; margin-inline:auto; padding:0 16px 40px; }
h1 { margin:0; font-size:24px; }
.eyebrow { color:var(--mut); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.topbar { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; padding:20px 0 12px; flex-wrap:wrap; }
.settings { display:flex; gap:10px; align-items:center; color:var(--mut); font-size:13px; }
.settings input { width:58px; margin-left:4px; padding:6px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--fg); }
button { font:inherit; cursor:pointer; }
.icon { border:1px solid var(--line); background:var(--card); color:var(--fg); border-radius:50%; width:36px; height:36px; }

.strip { display:flex; gap:8px; overflow-x:auto; padding:4px 0 8px; }
.store { flex:0 0 auto; min-width:104px; border:1px solid var(--line); background:var(--card); color:var(--fg); border-radius:12px; padding:8px 10px; text-align:left; }
.store .n { font-size:12px; color:var(--mut); text-transform:capitalize; }
.store .t { font-size:18px; font-weight:700; }
.store .m { font-size:11px; color:var(--warn); }
.store.cheapest .t { color:var(--good); }
.store.selected { border:2px solid var(--accent); }
.loading { color:var(--mut); padding:12px 0; }
.budget { height:8px; border-radius:4px; background:var(--chip); overflow:hidden; margin:4px 0 2px; }
.budget > div { height:100%; background:var(--good); }
.budget.over > div { background:var(--warn); }
.budget-label { font-size:13px; color:var(--mut); margin-bottom:8px; }

.tabs { display:flex; gap:6px; margin:10px 0; }
.tab { flex:1; padding:10px; border:1px solid var(--line); background:var(--card); color:var(--mut); border-radius:10px; }
.tab.active { background:var(--accent-soft); color:var(--fg); border-color:var(--accent); font-weight:600; }

.day { position:relative; display:flex; gap:14px; align-items:center; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px 12px 12px; margin:20px 0 10px; cursor:pointer; }
.day .badge { width:56px; height:56px; flex:0 0 56px; border-radius:12px; background:var(--chip); display:grid; place-items:center; font-weight:700; color:var(--mut); font-size:12px; text-transform:uppercase; }
.day .name { font-weight:650; }
.day .meta { font-size:12px; color:var(--mut); display:flex; gap:10px; flex-wrap:wrap; }
.day .price { margin-left:auto; font-weight:700; font-size:17px; white-space:nowrap; }
.day .dayname { position:absolute; top:-12px; left:50%; transform:translateX(-50%); padding:2px 14px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--mut); font-size:11px; letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; }
.chip { background:var(--chip); border-radius:8px; padding:1px 7px; }

.aisle { margin:14px 0 6px; font-size:12px; color:var(--mut); text-transform:uppercase; letter-spacing:.06em; }
.line { display:flex; gap:10px; align-items:center; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:10px; margin-bottom:6px; }
.line input { width:20px; height:20px; accent-color:var(--accent); }
.line .what { flex:1; }
.line .prod { font-size:12px; color:var(--mut); }
.line .prod-link { color:var(--accent); text-decoration:underline; text-underline-offset:2px; }
.line .prod-link:hover { text-decoration-thickness:2px; }
.line .left { font-size:12px; color:var(--warn); }
.line .need { font-size:12px; color:var(--mut); }
.line .cost { font-weight:700; white-space:nowrap; }
.line.done .what { text-decoration:line-through; opacity:.6; }
.missing { color:var(--warn); font-size:13px; margin:8px 0; }

dialog { border:1px solid var(--line); border-radius:16px; background:var(--card); color:var(--fg); max-width:520px; width:calc(100% - 32px); }
dialog::backdrop { background:rgba(0,0,0,.45); }
.close { margin-top:12px; width:100%; padding:10px; border-radius:10px; border:1px solid var(--line); background:var(--chip); color:var(--fg); }

/* ---------- mise-style additions: onboarding, cards, rows, meal tabs ---------- */
.sub { color:var(--mut); font-size:13px; }
.onboard { position:fixed; inset:0; z-index:20; background:var(--bg); padding:20px 16px 96px; overflow:auto; max-width:760px; margin:0 auto; }
.onboard h2 { font-size:28px; line-height:1.15; margin:28px 0 6px; }
.onboard-signin { display:block; margin:20px auto 0; padding:10px 14px; }
.onboard-photos { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin:22px 0 8px; }
.onboard-photos img { width:100%; aspect-ratio:1 / 1; object-fit:cover; display:block; border-radius:14px; box-shadow:var(--card-shadow); }
.onboard-photo-credit { color:var(--mut); font-size:11px; text-align:right; margin:0 2px 8px; }
@media (max-width:400px) { .onboard-photos { grid-template-columns:repeat(2, minmax(0, 1fr)); } .onboard-photos img:last-child { display:none; } }
.progress { height:6px; background:var(--chip); border-radius:3px; margin:8px 0 0 48px; }
.progress > div { height:100%; background:var(--accent); border-radius:3px; transition:width .3s; }
.back { position:absolute; top:12px; left:16px; width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--fg); }
.primary { position:fixed; left:16px; right:16px; bottom:18px; max-width:728px; margin:0 auto; padding:16px; border:0; border-radius:16px; background:var(--accent); color:#ffffff; font-weight:700; font-size:17px; }
.primary:disabled { opacity:.45; }
.opts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
.opts.one { grid-template-columns:1fr; }
.opt { padding:16px 12px; border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--fg); text-align:left; font-size:15px; }
.opt.on { border:2px solid var(--accent); background:var(--accent-soft); }
.daypick { display:flex; gap:6px; margin-top:24px; }
.daypick .opt { flex:1; text-align:center; padding:14px 0; }
.big-num { font-size:56px; font-weight:800; text-align:center; margin:30px 0 4px; }
.onboard input[type=range] { width:100%; accent-color:var(--accent); }
.onboard input[type=text] { width:100%; padding:14px; border-radius:12px; border:1px solid var(--line); background:var(--card); color:var(--fg); font-size:16px; margin-top:18px; }
.stepper { display:flex; align-items:center; justify-content:center; gap:28px; margin-top:40px; }
.stepper button { width:52px; height:52px; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--fg); font-size:24px; }
.stepper .big-num { margin:0; line-height:1; min-width:1.2em; text-align:center; }
.checks { list-style:none; padding:0; margin-top:40px; }
.checks li { padding:12px 0 12px 34px; position:relative; color:var(--mut); }
.checks li::before { content:""; position:absolute; left:0; top:12px; width:20px; height:20px; border-radius:50%; border:2px solid var(--line); }
.checks li.done { color:var(--fg); }
.checks li.done::before { background:var(--accent); border-color:var(--accent); }
.cards { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px; text-align:left; color:var(--fg); }
.card .big { font-size:20px; font-weight:750; margin:2px 0 6px; }
.row { display:flex; gap:8px; margin:10px 0; }
.row.add input { flex:1; padding:10px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--fg); }
.secondary { padding:10px 14px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--fg); }
.mtabs { display:flex; gap:6px; margin:12px 0 6px; }
.mtabs .tab { padding:8px; }
.mactions { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.fav.on { color:#e11d48; border-color:#e11d48; }
.cooked { opacity:.55; }
.cooked .name::after { content:"  ✓ cooked"; color:var(--good); font-size:12px; }

/* ---------- views + bottom toolbar ---------- */
body { padding-bottom:96px; }
.viewhead { display:flex; gap:12px; align-items:center; margin:8px 0; }
.viewhead h2 { margin:0; font-size:22px; }
.back-inline { width:38px; height:38px; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--fg); flex:0 0 38px; }
.search { flex:1; padding:10px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--fg); }
.bottombar { position:fixed; left:0; right:0; bottom:0; display:flex; justify-content:center; background:var(--card); border-top:1px solid var(--line); padding:6px 8px calc(6px + env(safe-area-inset-bottom)); z-index:10; }
.bottombar button { flex:1; max-width:180px; background:none; border:0; color:var(--mut); font-size:12px; display:flex; flex-direction:column; align-items:center; gap:2px; padding:4px 0; }
.bottombar button span { font-size:20px; line-height:1; }
.bottombar button.active { color:var(--accent-text); font-weight:650; }
.choice { display:flex; justify-content:space-between; align-items:center; width:100%; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:8px; color:var(--fg); text-align:left; }
.recipe-row { display:flex; gap:10px; align-items:center; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:8px; cursor:pointer; }
.recipe-row .name { font-weight:600; }
.recipe-row .price { margin-left:auto; font-weight:700; white-space:nowrap; }
.daybtns { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.danger { color:var(--warn); }
.secondary.on { border-color:var(--accent); background:var(--accent-soft); }

/* ---------- explore, categories, preferences page, edit plan, settings ---------- */
.spread { justify-content:space-between; }
.search.full { width:100%; margin:6px 0 12px; }
.section-h { display:flex; justify-content:space-between; align-items:center; margin:16px 0 8px; font-weight:700; font-size:17px; }
.section-h button { background:none; border:0; color:var(--accent-text); }
.tiles { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tile { aspect-ratio:1/0.92; border-radius:16px; border:1px solid var(--line); background:linear-gradient(160deg,var(--accent-soft),var(--card)); color:var(--fg); text-align:left; padding:12px; display:flex; flex-direction:column; justify-content:flex-end; }
.tile .emoji { font-size:40px; margin-bottom:auto; }
.tile .t { font-weight:750; font-size:17px; }
.tile .s { font-size:12px; color:var(--mut); }
.tile .n { font-size:12px; font-weight:700; color:var(--accent-text); margin-top:2px; }
.heart { background:none; border:0; font-size:20px; color:var(--mut); padding:4px 8px; }
.heart.on { color:#e11d48; }
.fav-delete { background:none; border:0; color:var(--mut); font-size:20px; line-height:1; padding:4px 8px; cursor:pointer; }
.fav-delete:hover { color:var(--warn); }
.source-card .fav-delete { align-self:flex-start; }
.pref h3 { margin:18px 0 4px; font-size:16px; }
.pref .sub { margin-bottom:8px; }
.pref select, .pref input[type=text] { width:100%; padding:12px; border-radius:12px; border:1px solid var(--line); background:var(--card); color:var(--fg); font-size:15px; }
.pref input[type=range] { width:100%; accent-color:var(--accent); }
.pref .big-num { font-size:30px; margin:6px 0; text-align:left; }
.pref .stepper { justify-content:flex-start; margin-top:6px; }
.pref .opts { margin-top:6px; }
.primary.inline { position:static; display:block; width:100%; margin:20px 0; }
.edit-day { margin-bottom:12px; }
.edit-day .row { margin:6px 0 0; }
.edit-day .row button { flex:1; }
.day.picked { border:2px solid var(--accent); }
.day.leftover .name::before { content:"🍲 "; }
.set-group { margin:18px 0 6px; font-size:12px; color:var(--mut); text-transform:uppercase; letter-spacing:.06em; }
.toggle { padding:6px 12px; border-radius:20px; border:1px solid var(--line); background:var(--chip); color:var(--mut); }
.toggle.on { background:var(--accent); color:#ffffff; border-color:var(--accent); }
[hidden] { display:none !important; }
.theme-fab { position:fixed; top:12px; right:max(12px, calc(50vw - 368px)); z-index:30; width:40px; height:40px; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--fg); font-size:18px; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.topbar { padding-right:52px; }
.store.split { border-style:dashed; } .store .s { font-size:11px; color:var(--good); }
/* ---------- unlock ---------- */
.lockcard { background:var(--accent-soft); border:1px solid var(--accent); border-radius:14px; padding:14px; margin:10px 0; }
.lockcard .big, #unlock .big { font-size:20px; font-weight:750; margin:8px 0; }
#unlock .perks { color:var(--mut); padding-left:18px; }

/* ---------- Clerkenwell family cues ---------- */
.brandbar { background:var(--navy); color:#fff; margin:0 calc(50% - 50vw); padding:12px max(16px, calc(50vw - 364px)); display:flex; align-items:center; justify-content:space-between; }
.wordmark { font-size:20px; font-weight:800; letter-spacing:-0.02em; color:#fff; text-decoration:none; }
.wordmark-accent { color:var(--navy-accent); margin-left:1px; }
.theme-fab { position:static; width:36px; height:36px; border:1px solid rgba(255,255,255,.25); background:transparent; color:#fff; box-shadow:none; }
.topbar { padding-right:0; }
h1, h2, .viewhead h2, .card .big, .day .name, .day .price { color:var(--fg); }
.day, .line, .card, .store, .choice, .recipe-row, .opt, .tile { border-color:var(--card-border); box-shadow:var(--card-shadow); }
.tile { border:2px solid rgba(26,115,232,.6); }
.store.selected, .day.picked, .opt.on { border-color:var(--accent); }
.store.cheapest { box-shadow:inset 0 0 0 1px var(--good), var(--card-shadow); }
.primary { border-radius:10px; transition:background .12s; }
.primary:hover:not(:disabled), .toggle.on:hover { background:var(--accent-hover); }
.tab.active, .secondary.on { color:var(--fg); }
.eyebrow, .aisle, .set-group { font-weight:600; letter-spacing:.04em; font-size:11px; }
dialog { box-shadow:0 12px 40px rgba(2,6,23,.35); }
/* The page draws its own dark theme: declaring it stops browsers' forced/auto dark mode from repainting it. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: only light; }
:root[data-theme="dark"] { color-scheme: only dark; }

/* ---------- find the source ---------- */
.source-hero { background:var(--accent-soft); border:1px solid var(--accent); border-radius:14px; padding:14px; margin:6px 0 14px; }
.source-hero .t { font-weight:750; font-size:18px; color:var(--fg); }
.source-hero .s { color:var(--text); font-size:14px; margin:4px 0 8px; }
.source-hero .search.full { margin:4px 0 0; }
.source-card { display:flex; gap:12px; background:var(--card); border:1px solid var(--line); border-radius:12px; padding:10px; margin-bottom:8px; cursor:pointer; box-shadow:var(--card-shadow); }
.source-card img, .source-card .noimg { flex:0 0 76px; width:76px; height:76px; border-radius:10px; object-fit:cover; background:var(--chip); display:flex; align-items:center; justify-content:center; font-size:28px; }
.source-card .body { flex:1; min-width:0; }
.source-card .name { font-weight:650; color:var(--fg); }
.source-card .who { color:var(--text); font-size:13px; margin:2px 0 4px; }
.source-card .meta { display:flex; flex-wrap:wrap; gap:6px; font-size:12px; color:var(--mut); }
.source-card .heart { align-self:flex-start; }
.source-card .book-actions { display:flex; align-items:center; gap:8px; margin-top:6px; }
.source-card .book-actions .secondary { padding:3px 9px; font-size:12px; }
.close-match { color:var(--mut); font-size:12px; margin:12px 0 6px; }
.orig { display:block; text-align:center; margin:12px 0 4px; padding:12px; border-radius:12px; background:var(--accent); color:#ffffff; font-weight:700; text-decoration:none; }
.ingr { margin:8px 0; padding-left:18px; color:var(--text); }
.ingr li.h { list-style:none; margin-left:-18px; font-weight:700; color:var(--fg); margin-top:8px; }
.source-card .chip { background:var(--chip); border-radius:999px; padding:1px 8px; }
.source-card .chip.good { background:var(--good-soft); color:var(--good); }
.line.speciality { text-decoration:none; color:var(--fg); border-style:dashed; }
.line.speciality .chip { background:var(--accent-soft); color:var(--accent-text); border-radius:999px; padding:1px 8px; font-size:11px; margin-left:6px; }

/* Recipe feedback: grade buttons, report link, banners, check-in, report sheet. */
.fb-grade { margin:12px 0 4px; }
.fb-report { margin:14px 0 4px; }
.linkish { background:none; border:0; padding:0; color:var(--accent); text-decoration:underline; font:inherit; cursor:pointer; }
.fb-banner { margin:10px 0; padding:10px 12px; border-radius:10px; border:1px solid var(--line); background:var(--chip); font-size:14px; }
.fb-banner.danger { border-color:#d97706; background:rgba(217,119,6,.12); }
.fb-checkin { margin:0 0 12px; }
.fb-checkin .daybtns { margin-top:8px; }
.fb-opt input { width:20px; height:20px; accent-color:var(--accent); }
.fb-mine { margin:8px 0; }
#report h3 { margin:16px 0 8px; font-size:15px; }
#report select.choice { font:inherit; }
#report label.secondary { display:inline-flex; gap:6px; align-items:center; cursor:pointer; }
.fb-send { display:block; width:100%; margin-top:14px; font-weight:700; border-color:var(--accent); }

/* mise-style meal cards: photo thumb, mood pill, icon meta; hero photo on the meal sheet. */
.thumb { flex:0 0 72px; width:72px; height:72px; border-radius:12px; overflow:hidden; background:var(--chip); }
.thumb img, .hero img { width:100%; height:100%; object-fit:cover; display:block; }
.thumb.noimg, .hero.noimg { display:grid; place-items:center; font-size:34px; background:linear-gradient(135deg, var(--chip), var(--card)); }
.dbody { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; align-items:flex-start; }
.dbody .name { font-weight:650; font-size:16px; line-height:1.25; }
.dbody .meta { font-size:13px; color:var(--mut); display:flex; gap:0; flex-wrap:wrap; }
.dbody .meta span + span { border-left:1px solid var(--line); margin-left:8px; padding-left:8px; }
.dbody .meta .mprice { color:var(--fg); font-weight:700; }
.mood { display:inline-block; border-radius:999px; padding:1px 10px; font-size:12px; font-weight:600; background:var(--chip); color:var(--fg); }
.mood-family-favs { background:rgba(251,191,140,.25); color:#f6b07a; }
.mood-healthy-comfort { background:rgba(134,239,172,.2); color:#7fd99a; }
.mood-speedy-meals { background:rgba(196,181,253,.22); color:#b7a6f5; }
.mood-british-staples { background:rgba(165,180,252,.22); color:#a3b1f7; }
.mood-protein-packed { background:rgba(249,168,212,.22); color:#f39ac6; }
.mood-fakeaway { background:rgba(253,186,116,.25); color:#f7a35f; }
.mood-low-calorie { background:rgba(110,231,183,.2); color:#6fd8ad; }
.mood-from-the-source { background:rgba(147,197,253,.2); color:#8dbdf5; }
:root[data-theme="light"] .mood-family-favs { color:#9a4d12; } :root[data-theme="light"] .mood-healthy-comfort { color:#1f7a3d; }
:root[data-theme="light"] .mood-speedy-meals { color:#5b3fc4; } :root[data-theme="light"] .mood-british-staples { color:#3346b8; }
:root[data-theme="light"] .mood-protein-packed { color:#a1246a; } :root[data-theme="light"] .mood-fakeaway { color:#9a4a0c; }
:root[data-theme="light"] .mood-low-calorie { color:#11734d; } :root[data-theme="light"] .mood-from-the-source { color:#1d5fa8; }
.recipe-row { display:flex; gap:14px; align-items:center; }
.hero { width:100%; aspect-ratio:16/10; border-radius:16px; overflow:hidden; margin:0 0 12px; background:var(--chip); }
.hero.noimg { font-size:72px; }
.mtitle { text-align:center; margin:4px 0 6px; }
.hero { position:relative; }
.hero .credit { position:absolute; right:8px; bottom:8px; padding:2px 8px; border-radius:999px; background:rgba(0,0,0,.55); color:#fff; font-size:11px; text-decoration:none; }
.dbody .meta .src { color:var(--mut); font-weight:400; }
.ours { margin:10px 2px 6px; line-height:1.6; }
.ours .lede { font-size:16px; color:var(--fg); margin:0 0 12px; }
.ours p { margin:0 0 12px; color:var(--text); }
.ours p b { color:var(--fg); }
a.hero { display:block; cursor:pointer; }
a.hero:hover img { opacity:.92; }
.missing-line { display:flex; align-items:center; gap:10px; }
.missing-line .what { flex:1; display:flex; gap:10px; align-items:flex-start; cursor:pointer; }
.missing-line .what > span { display:flex; flex-direction:column; }
.missing-line.done .what { opacity:.5; text-decoration:line-through; }
.missing-help { margin:-2px 0 6px; }
a.find { flex:0 0 auto; padding:6px 12px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--accent-text); text-decoration:none; font-size:13px; font-weight:600; white-space:nowrap; }
a.find:hover { border-color:var(--accent); }
.pantry-line { display:flex; align-items:center; gap:8px; }
.pantry-line .what { flex:1; min-width:0; }
.pantry-line.expired .prod { color:var(--warn); }
.pantry-where { padding:6px 8px; border-radius:8px; border:1px solid var(--line); background:var(--card); color:var(--fg); font:inherit; font-size:13px; }

/* "What you like to eat" - the front-page link and the page itself. */
.taste-link { display:flex; align-items:center; gap:12px; width:100%; margin:12px 0 4px; padding:14px 16px; border-radius:16px; border:1px solid var(--accent); background:var(--accent-soft); color:var(--fg); text-align:left; cursor:pointer; font:inherit; }
.taste-link .tl-icon { font-size:26px; }
.taste-link .tl-text { flex:1; display:flex; flex-direction:column; gap:2px; }
.taste-link .tl-text b { font-size:16px; }
.taste-count { margin:12px 0 4px; padding:10px 14px; border-radius:12px; background:var(--good-soft); color:var(--good); font-weight:650; }
.taste-count.thin { background:rgba(217,119,6,.12); color:var(--warn); }
.tsec { margin:18px 0 6px; }
.tsec h3 { margin:0 0 4px; font-size:17px; }
.tsec .search { margin:10px 0 4px; }
.tgroup { margin:12px 0 6px; font-size:12px; color:var(--mut); text-transform:uppercase; letter-spacing:.05em; }
.tchips { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.tchip { padding:8px 12px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--fg); font:inherit; font-size:14px; cursor:pointer; }
.tchip.on { border-color:var(--accent); background:var(--accent-soft); font-weight:650; }
.tchip .n { margin-left:6px; color:var(--mut); font-size:12px; }
#view-taste { padding-bottom:90px; }
#view-choices { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
#save-choices { position:fixed; left:16px; right:16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index:9; display:block; width:auto; max-width:728px; margin:0 auto; }
.frontlinks { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0 4px; }
.frontlinks .taste-link { margin:0; }
@media (max-width:560px) { .frontlinks { grid-template-columns:1fr; } }
.hero.book { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-decoration:none; color:var(--fg); text-align:center; padding:16px; }
.hero.book .bk-emoji { font-size:54px; }
.hero.book .bk-note { display:flex; flex-direction:column; gap:3px; font-size:13px; color:var(--mut); }
.hero.book .bk-note b { font-size:15px; color:var(--accent-text); }
/* The × at the top of every pop-up: stays in view while the sheet scrolls. */
.xclose { position:sticky; top:0; float:right; z-index:5; width:36px; height:36px; margin:-4px -4px 0 8px; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--fg); font-size:22px; line-height:1; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.xclose:hover { border-color:var(--accent); }
/* Pudding: indented under its dinner. */
.pudding { display:flex; gap:12px; align-items:center; margin:-4px 0 10px 28px; padding:8px 12px; border-radius:12px; border:1px dashed var(--line); background:var(--card); cursor:pointer; }
.pudding .pthumb { flex:0 0 46px; width:46px; height:46px; border-radius:10px; }
.pudding .name { font-size:14px; font-weight:600; }
.pudding .plabel { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--accent-text); margin-right:4px; }
/* Building screen: a spinner and a live progress line, so it never looks stuck. */
.spinner { width:44px; height:44px; margin:28px auto 8px; border-radius:50%; border:4px solid var(--line); border-top-color:var(--accent); animation:spin .9s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration:3s; } }
.build-progress { text-align:center; margin:6px 0 14px; min-height:1.4em; font-variant-numeric:tabular-nums; }
#building-title { text-align:center; }
/* + Pudding on the supper card, × on the pudding row. */
.addpud { display:inline-flex; align-items:center; margin-left:8px; padding:3px 9px; border-radius:999px; border:1px dashed var(--line); background:transparent; color:var(--accent-text); font:inherit; font-size:12px; cursor:pointer; vertical-align:middle; }
.dbody .tagline { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:3px 0 4px; }
.dbody .tagline .addpud { margin-left:auto; }
.dbody .tagline .replacemeal { margin-left:8px; }
.addpud:hover { border-color:var(--accent); }
.pudding { position:relative; }
.xpud { position:absolute; right:8px; top:6px; width:24px; height:24px; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--mut); cursor:pointer; line-height:1; }
/* Welcome: what the app does, shown once on the first visit. */
.welcome { max-width:520px; padding:26px 24px 22px; }
.welcome-mark { font-weight:800; font-size:15px; letter-spacing:.2px; }
.welcome-mark b { color:var(--accent-text); }
.welcome h2 { font-size:22px; line-height:1.25; margin:14px 0 8px; }
.welcome-lead { margin:0 0 16px; line-height:1.5; }
.welcome-rows { display:grid; gap:10px; }
.wrow { display:grid; grid-template-columns:40px 1fr; gap:12px; align-items:start; padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--card); }
.wrow b { display:block; margin-bottom:2px; }
.wrow span { font-size:14px; line-height:1.45; color:var(--mut); }
.wicon { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:var(--bg); font-size:20px; font-weight:800; color:var(--accent-text) !important; }
.welcome-note { margin:14px 0 12px; text-align:center; }
.welcome .welcome-go { position:static; width:100%; max-width:none; margin:0; }
.welcome-signin { display:block; width:100%; margin:0 0 10px; }
/* Grocery list: send the list to the shop's own basket (extension). */
.basketcard { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; padding:12px 14px; margin:4px 0 14px; border:1px solid var(--accent); border-radius:14px; background:var(--card); }
.basketcard .secondary { white-space:nowrap; }
.toast { position:fixed; left:50%; bottom:84px; transform:translate(-50%, 20px); max-width:min(92vw, 520px); padding:10px 16px; border-radius:12px; background:var(--text); color:var(--bg); font-size:14px; opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:50; }
.toast.on { opacity:1; transform:translate(-50%, 0); }
.basketcard .warnline { margin-top:4px; color:var(--warn, #c0661a); }
/* Accounts and founder places. */
.foundercard { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; padding:12px 14px; margin:4px 0 12px; border:1px solid var(--good); border-radius:14px; background:var(--card); }
.acct-input { width:100%; padding:12px; margin:10px 0; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--fg); font:inherit; font-size:16px; }
.terms { padding-left:18px; line-height:1.5; } .terms li { margin:6px 0; }
.tick { display:flex; gap:8px; align-items:flex-start; margin:12px 0; }
.fbq { margin:14px 0; } .fbqt { font-weight:600; margin-bottom:6px; }
.fbc { display:block; margin:4px 0; }
.fbq textarea { width:100%; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--fg); font:inherit; padding:8px; }
/* Entry fields (2026-11-16): in light mode white fields on white cards with a pale
   border were nearly invisible.  Fields get their own colours: a slightly tinted
   fill, a clearly darker border, and a blue focus ring.  Dark mode keeps a darker
   well with a visible edge. */
:root { --field-bg:#f6f8fb; --field-border:#8e9bb0; --field-focus:rgba(26,115,232,.28); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --field-bg:#0f172a; --field-border:#55657d; --field-focus:rgba(127,176,255,.35); } }
:root[data-theme="dark"] { --field-bg:#0f172a; --field-border:#55657d; --field-focus:rgba(127,176,255,.35); }
input[type=text], input[type=email], input[type=number], input[type=search], input[type=tel], input:not([type]), select, textarea, .acct-input {
    background:var(--field-bg) !important; border:1.5px solid var(--field-border) !important; color:var(--fg);
    box-shadow:inset 0 1px 2px rgba(10,37,64,.06);
}
input[type=text]:focus, input[type=email]:focus, input[type=number]:focus, input[type=search]:focus, input[type=tel]:focus, input:not([type]):focus, select:focus, textarea:focus, .acct-input:focus {
    outline:none; border-color:var(--accent) !important; box-shadow:0 0 0 3px var(--field-focus);
}
input::placeholder, textarea::placeholder { color:var(--mut); opacity:1; }
/* Meal cards and their badges (2026-11-16): in light mode the cards had no border
   (shadow only) and the day pills and pudding rows a pale one, so they blurred
   into the page.  A defined outline in both themes. */
:root { --badge-border:#a7b4c6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --badge-border:#4b5b72; } }
:root[data-theme="dark"] { --badge-border:#4b5b72; }
.day { border:1.5px solid var(--badge-border); }
.day .dayname { border:1.5px solid var(--badge-border); color:var(--text); font-weight:600; }
.pudding { border:1.5px dashed var(--badge-border); }
.day .badge { border:1px solid var(--badge-border); }
.mood { border:1px solid var(--badge-border); }
.day.empty { border-style:dashed; }
.day.empty .dbody { padding:6px 0; }
.edit-day .row .danger { flex:0 0 auto; padding-left:16px; padding-right:16px; }
.edit-day .row .arrow { flex:0 0 52px; font-size:18px; font-weight:700; }
.cat-refine { gap:8px; margin:10px 0 0; }
.cat-refine select { flex:1; min-width:0; }
.secondary.soon { opacity:.6; cursor:not-allowed; display:flex; flex-direction:column; align-items:center; gap:2px; }
.soon-tag { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--accent-text); }

/* 2026-11-17 UI polish: clarify page hierarchy, action affordance and keyboard navigation. */
.section-intro{margin:20px 0 10px}.section-intro h2{font-size:18px;line-height:1.3;margin:0 0 4px;letter-spacing:-.02em}.section-intro p,.view-explain{font-size:13px;line-height:1.55;color:var(--mut);margin:0 0 10px}.days-intro{margin-top:24px}.field-label{display:block;font-size:13px;font-weight:700;color:var(--fg);margin:12px 0 7px}.viewhead .view-explain{max-width:560px;margin:6px 0 0}.viewhead:has(.view-explain){align-items:flex-start}.plan-actions{flex-wrap:wrap}.plan-actions .secondary{flex:1;min-width:130px}.strip:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid var(--accent-text);outline-offset:2px}.store:hover,.day:hover,.choice:hover,.taste-link:hover{border-color:var(--accent)}.bottombar button{min-height:48px}.viewhead h2{text-transform:none}.row.add{flex-wrap:wrap}.row.add input{min-width:160px}.theme-fab{min-width:36px}button:disabled{cursor:not-allowed}
@media(max-width:400px){.row.add{align-items:stretch}.row.add input{width:100%}.row.add button{flex:1}.section-intro p{font-size:12px}}

/* Free-week status: a quiet countdown, then the unlock prompt once it ends. */
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px;
                max-width: 760px; margin: 8px auto 0; padding: 8px 12px;
                border: 1px solid var(--line); background: var(--card); color: var(--text);
                border-radius: 12px; font-size: 13px; }
.trial-banner.expired { border-color: var(--accent); }
.trial-banner button.trial-unlock { border: 0; background: var(--accent); color: #fff;
                padding: 6px 10px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }

/* What you like to eat: .primary is fixed at bottom:18px, which parks the save
   button INSIDE the fixed bottom bar on every Android navigation mode.  Lift it
   clear of the bar (and its safe-area inset) rather than padding the view. */
#view-taste { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
#taste-save { bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 9; margin-bottom: 8px; }

/* Edit plan -> Nothing planned: Meals fill mode (day locked, budget-capped). */
.fill-slot { margin: 10px 0 16px; padding: 14px; border: 2px solid var(--accent); border-radius: 14px; background: var(--card); }
.fill-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.fill-head .t { font-weight: 800; color: var(--fg); }
.fill-head .s { flex: 1; color: var(--mut); font-size: 13px; }
.fill-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.fill-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fill-pick:hover { border-color: var(--accent); }
.fill-name { flex: 1; font-weight: 650; color: var(--fg); }
.fill-who { flex: 0 0 auto; max-width: 40%; color: var(--mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fill-cost { flex: 0 0 auto; font-weight: 700; color: var(--fg); }

.fill-results { margin: 6px 0 10px; }
.fill-results .fill-list { max-height: 260px; }

/* Bottom tab bar: Android Chrome's tap highlight and the focus ring appeared as a
   sporadic blue box on a tapped tab.  The active tab already carries the state, so
   suppress both there (keyboard users still get the colour change). */
html { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea, .tile, .day { -webkit-tap-highlight-color: transparent; }
.bottombar button, .bottombar button:focus, .bottombar button:focus-visible { outline: none; }

/* While filling an Edit-plan day, each cuisine/search row offers a one-tap add. */
.recipe-row .use-pending { flex: 0 0 auto; align-self: center; padding: 5px 9px; font-size: 12px; white-space: nowrap; }

/* The store link inside the grocery list's basket card. */
.ext-link { color: var(--accent-text); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.ext-link:hover { color: var(--accent); }

/* Meals: a small refresh control beside "Suggested for you". */
.sugg-refresh { margin-left: 8px; border: 1px solid var(--line); background: var(--card); color: var(--accent-text); border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 14px; line-height: 1.2; cursor: pointer; vertical-align: middle; }
.sugg-refresh:hover { border-color: var(--accent); }

/* Recipe photo review: desktop shows OCR and closest match side by side; phones stack. */
#recipe-review { max-width:1100px; }
.recipe-review-grid { display:block; }
.recipe-review-column { min-width:0; }
.recipe-review-match { margin-top:18px; }
#recipe-review.side-by-side .recipe-review-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
#recipe-review.side-by-side .recipe-review-match { margin-top:0; border-left:1px solid var(--line); padding-left:24px; }
.recipe-match-preview { margin-top:14px; padding:14px; background:var(--bg); border:1px solid var(--line); border-radius:12px; }
.recipe-match-preview h4 { margin:0 0 4px; font-size:16px; }
.recipe-match-preview .ingr { max-height:280px; overflow:auto; margin:8px 0; padding-left:20px; }
.recipe-match-preview .method { max-height:220px; overflow:auto; }
.recipe-match-preview .match-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:10px; }
