/* Groceries & Errands v0.5 — linen & paper (from the user's reference images).
   All colours, fonts, radii and shadows live in :root so the look can change in one place. */
:root {
  --bg: #ECE6DA;            /* linen */
  --paper: #FBF8F1;
  --ink: #2A2823;
  --muted: #77705F;
  --accent: #2F4A37;        /* forest */
  --accent-soft: #DCE4D6;
  --rule: #D9D1C2;
  --warn: #9A6B2F;          /* used sparingly: near the budget limit */
  --over: #8A3B2E;          /* over budget */
  --focus: #B8963E;
  --font-title: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;
  --font-ui: "Jost", "Avenir Next", system-ui, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(60,50,30,.06), 0 10px 26px -14px rgba(60,50,30,.22);
  --line: 48px;             /* ruled line height = one list row */
  --shop-1: #8FA68A; --shop-2: #C08A6B; --shop-3: #9A9558; --shop-4: #8DA3B0; --shop-5: #A98C9C; --shop-6: #C9AE7A;
  --tabbar: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.45;
  background-color: var(--bg);
  /* faint woven linen: two fine thread directions, CSS only */
  background-image:
    repeating-linear-gradient(0deg, rgba(120,100,70,.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120,100,70,.03) 0 1px, transparent 1px 4px);
  padding: env(safe-area-inset-top) 0 calc(var(--tabbar) + 64px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* header */
.app-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 2px; max-width: 560px; margin: 0 auto; }
.app-name { font-family: var(--font-title); font-size: 17px; font-weight: 600; letter-spacing: .08em; color: var(--muted); margin: 0; }
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--ink); }
.icon-btn:hover { border-color: var(--rule); }
.icon-btn svg { width: 22px; height: 22px; }

/* screen titles, in the reference look */
.screen { display: none; }
.screen.active { display: block; }
.s-title { font-family: var(--font-title); font-weight: 500; font-size: 30px; letter-spacing: .2em; text-transform: uppercase; text-align: center; margin: 14px 0 0; line-height: 1.15; }
/* long one-word titles ("Kruideniersware", her own list names) shrink instead of breaking mid-word */
.s-title.long { font-size: 22px; letter-spacing: .12em; }
.s-title.longer { font-size: 18px; letter-spacing: .06em; }
.s-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.orn { display: flex; align-items: center; gap: 10px; color: var(--accent); margin: 12px auto 18px; max-width: 220px; }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.orn svg { width: 16px; height: 16px; }
.label { font-family: var(--font-ui); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.serif { font-family: var(--font-title); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* paper sheets */
.sheet { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px; margin: 0 0 16px; position: relative; }
.sheet h3 { font-family: var(--font-title); font-weight: 600; font-size: 22px; margin: 0 0 8px; letter-spacing: .01em; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sheet-head .link { font-size: 14px; }
.hand { font-family: var(--font-hand); font-weight: 300; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--paper); font-weight: 500; letter-spacing: .02em; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding: 0 10px; min-height: 48px; }
.btn.wide { width: 100%; }
.btn.wa { background: #25D366; border-color: #25D366; color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 6px 0; min-height: 48px; min-width: 48px; display: inline-flex; align-items: center; color: var(--accent); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 14px; white-space: nowrap; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--paper); }
.seg { display: flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: var(--paper); margin: 0 auto 16px; max-width: 360px; }
.seg button { flex: 1; min-height: 48px; border: 0; border-radius: 999px; background: none; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--paper); }

/* inputs (always plain type while typing) */
.field { margin: 0 0 12px; }
.field label, .field .label { display: block; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; font-size: 17px; font-family: var(--font-ui); }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }

/* the list: ruled paper */
.list-sheet { padding: 6px 0 4px; overflow: hidden; }
.group { position: relative; padding: 0 0 6px; }
.group + .group { border-top: 1px solid var(--rule); }
.group-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 4px; }
.group-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--shop, var(--rule)); flex: none; }
.group-head h3 { margin: 0; font-size: 21px; flex: 1; }
.group-head .count { font-size: 13px; color: var(--muted); }
.group[data-shop] { box-shadow: inset 3px 0 0 var(--shop, transparent); }
.lines .item { border-bottom: 1px solid var(--rule); }
.item { display: flex; align-items: center; min-height: var(--line); padding: 0 8px 0 10px; gap: 4px; }
.tick { width: 48px; height: 48px; flex: none; border: 0; background: none; color: var(--accent); display: grid; place-items: center; }
.tick svg { width: 22px; height: 22px; }
.tick .check { opacity: 0; }
.item.done .tick .check { opacity: 1; }
.item-main { flex: 1; min-width: 0; padding: 6px 0; }
.item-text { position: relative; display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-family: var(--font-hand); font-weight: 300; font-size: 20px; line-height: 1.3; }
body.plain-items .item-text { font-family: var(--font-ui); font-weight: 400; font-size: 17px; }
.item-text .qty { font-family: var(--font-ui); font-size: 14px; color: var(--muted); margin-left: 4px; }
.item-sub { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.badge { display: inline-block; font-size: 11px; letter-spacing: .06em; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); margin-left: 6px; vertical-align: 2px; font-family: var(--font-ui); }
.badge.due { border-color: var(--accent); color: var(--accent); }
.badge.soon { border-color: var(--warn); color: var(--warn); }
.badge.over { border-color: var(--over); color: var(--over); }
.strike { visibility: hidden; position: absolute; left: -2px; right: -2px; top: 52%; height: 12px; width: calc(100% + 4px); pointer-events: none; overflow: visible; }
.strike path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.item.done .strike { visibility: visible; }
.item.done .strike path { stroke-dashoffset: 0; }
.item.done .item-main { opacity: .55; }
.item.just .strike path { transition: stroke-dashoffset .45s ease-out; }
.price { font-size: 14px; color: var(--muted); white-space: nowrap; }
.more-btn { width: 48px; height: 48px; border: 0; background: none; color: var(--muted); flex: none; display: grid; place-items: center; }
.more-btn svg { width: 20px; height: 20px; }
.more-btn { width: 48px; height: 48px; }
.more-btn.del-btn { color: var(--muted); }
.toast-undo { margin-left: 10px; min-height: 48px; padding: 0 14px; border: 1px solid currentColor; border-radius: 999px; background: none; color: inherit; font: inherit; font-weight: 600; }
.add-line { display: flex; align-items: center; min-height: var(--line); padding: 0 12px 0 18px; gap: 10px; }
.add-line .plus { color: var(--muted); width: 22px; flex: none; }
.add-line input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 48px; font-size: 17px; font-family: var(--font-ui); padding: 0; }
.add-line input:focus { outline: none; }
.add-line:focus-within { background: rgba(220,228,214,.35); box-shadow: inset 0 0 0 2px var(--focus); }
.suggest { padding: 4px 18px 12px 58px; }
.suggest p { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.suggest .chips { flex-wrap: wrap; overflow: visible; }
.inline-ask { padding: 0 18px 10px 58px; font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.timer-row { padding: 0 18px 4px 46px; }
.timer-btn { min-height: 36px; font-size: 13.5px; padding: 0 12px; }
.list-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 10px 18px 12px; border-top: 1px solid var(--rule); }
.empty-note { padding: 14px 18px 6px; color: var(--muted); font-family: var(--font-hand); font-size: 19px; }

/* today */
.today-date { text-align: center; color: var(--muted); margin: 2px 0 0; font-size: 14px; }
.card-rows { list-style: none; margin: 0; padding: 0; }
.card-rows li { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--rule); }
.card-rows li:last-child { border-bottom: 0; }
.card-rows li > .grow { flex: 1; min-width: 0; padding: 6px 0; }
.slot-name { width: 88px; flex: none; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); overflow-wrap: normal; hyphens: auto; }
.meal-name { flex: 1; min-width: 0; min-height: 48px; text-align: left; background: none; border: 0; padding: 8px 0; font-family: var(--font-title); font-size: 19px; color: var(--ink); }
.meal-name.free { font-family: var(--font-hand); font-weight: 300; font-size: 18px; }
.meal-name.empty { color: var(--muted); font-family: var(--font-ui); font-size: 14px; }
.row-btn { min-height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--accent); font-size: 14px; flex: none; }
.money-big { font-family: var(--font-title); font-size: 42px; font-weight: 500; line-height: 1; margin: 4px 0; }
.bar { height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar.near i { background: var(--warn); } .bar.over i { background: var(--over); }
.ok { color: var(--accent); } .warn { color: var(--warn); } .over-text { color: var(--over); }

/* pantry */
.p-row { display: flex; align-items: center; gap: 8px; min-height: 56px; border-bottom: 1px solid var(--rule); padding: 4px 0; }
.p-row:last-child { border-bottom: 0; }
.p-name { flex: 1; min-width: 0; min-height: 48px; text-align: left; background: none; border: 0; padding: 4px 0; }
.p-name .item-text { font-size: 19px; }
.tri { display: flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; flex: none; }
.tri button { min-height: 48px; min-width: 52px; padding: 0 8px; border: 0; background: transparent; font-size: 13px; color: var(--muted); }
.tri button + button { border-left: 1px solid var(--rule); }
.tri button[aria-pressed="true"][data-s="plenty"] { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.tri button[aria-pressed="true"][data-s="low"] { background: #F1E6CF; color: var(--warn); font-weight: 500; }
.tri button[aria-pressed="true"][data-s="out"] { background: #EFDCD6; color: var(--over); font-weight: 500; }
.cat-title { font-family: var(--font-title); font-size: 19px; font-style: italic; color: var(--muted); margin: 14px 0 0; }

/* week planner */
.day { padding: 14px 18px 8px; }
.day h3 { display: flex; justify-content: space-between; align-items: baseline; }
.day h3 .small { font-family: var(--font-ui); font-weight: 400; color: var(--muted); }
.day.is-today { box-shadow: var(--shadow), inset 3px 0 0 var(--accent); }
.week-nav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.totals .k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.totals .v { font-family: var(--font-title); font-size: 24px; }

/* trip */
.check-row { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--rule); }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.kv:last-child { border-bottom: 0; }
.leave-big { font-family: var(--font-title); font-size: 54px; line-height: 1; margin: 4px 0 6px; color: var(--accent); }
.route-step { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
#map { width: 100%; height: 200px; border-radius: var(--radius); background: var(--paper); margin-top: 12px; }

/* bottom: summary note + tab bar */
.total-note { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom)); z-index: 20;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; box-shadow: var(--shadow); min-height: 48px; padding: 0 16px;
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.total-note { transition: transform .2s ease, opacity .2s ease; }
.total-note.tuck { transform: translate(-50%, 160%); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .total-note { transition: none; } }
.total-note[hidden] { display: none; } /* the display rule above beat [hidden]: the note stayed over Money and Our Table */
.total-note strong { font-family: var(--font-title); font-size: 20px; font-weight: 600; }
.total-note .left.over { color: var(--over); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.tabbar .in { max-width: 560px; margin: 0 auto; display: flex; }
.tabbar button { flex: 1; min-height: var(--tabbar); border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; letter-spacing: .03em; position: relative; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--accent); font-weight: 500; }
.tabbar button[aria-current="page"]::after { content: ""; position: absolute; bottom: 9px; width: 18px; height: 1.5px; background: var(--accent); border-radius: 1px; }

/* bottom sheets (in-page dialogs; no browser pop-ups) */
.scrim { position: fixed; inset: 0; background: rgba(42,40,35,.28); z-index: 50; display: none; }
.scrim.open { display: block; }
.modal { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 88vh; overflow-y: auto; background: var(--paper);
  border-radius: 14px 14px 0 0; box-shadow: 0 -10px 30px rgba(42,40,35,.18); padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); display: none; }
.modal.open { display: block; }
.modal .in { max-width: 560px; margin: 0 auto; }
.modal .in { position: relative; }
.modal-close { position: absolute; top: -4px; right: -6px; }
.modal .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--rule); margin: 0 auto 12px; }
.modal h2 { font-family: var(--font-title); font-weight: 600; font-size: 26px; margin: 0 0 12px; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li { border-bottom: 1px solid var(--rule); }
.pick-list button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 0; min-height: 52px; }
.pick-list .t { display: block; font-family: var(--font-title); font-size: 19px; }
.pick-list .m { display: block; font-size: 13px; color: var(--muted); }
.result { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.toast { pointer-events: auto; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 72px + env(safe-area-inset-bottom)); z-index: 70;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 24px; text-align: center; font-size: 14px; display: none; max-width: 90vw; }

/* recipes + guides inside the app frame */
.screen .rcp-root, .screen .gd-root { background: transparent; padding: 0; min-height: 0; }

/* guides */
.gd-root { color: var(--ink); }
.gd-screen-title { font-family: var(--font-title); font-weight: 500; font-size: 28px; letter-spacing: .2em; text-transform: uppercase; text-align: center; margin: 4px 0 0; }
.gd-screen-sub, .gd-sub { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; margin: 6px 0 0; }
.gd-orn { display: flex; align-items: center; gap: 10px; color: var(--accent); margin: 10px auto 16px; max-width: 200px; }
.gd-orn::before, .gd-orn::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.gd-orn svg { width: 14px; height: 14px; }
.gd-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.gd-chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); font-size: 14px; }
.gd-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.gd-index { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gd-index-item { width: 100%; background: var(--paper); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.gd-index-pic { width: 76px; height: 76px; display: grid; place-items: center; color: var(--muted); }
.gd-index-pic img { width: 76px; height: 76px; object-fit: cover; border-radius: 50%; }
.gd-index-name { font-family: var(--font-title); font-size: 20px; text-align: center; line-height: 1.15; }
.gd-chev { display: none; }
.gd-af { display: block; font-size: .72em; color: var(--muted); font-style: italic; }
.gd-topbar { display: flex; }
.gd-icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); display: grid; place-items: center; }
.gd-icon-btn svg { width: 20px; height: 20px; }
.gd-head { text-align: center; }
.gd-title { font-family: var(--font-title); font-weight: 500; font-size: 52px; line-height: 1; margin: 2px 0 0; outline: none; }
.gd-hero { margin: 0 auto 6px; width: 200px; height: 170px; display: grid; place-items: center; color: var(--accent); }
.gd-hero img { width: 220px; height: 220px; object-fit: cover; border-radius: 50%; }
.gd-ph { width: 64px; height: 64px; } .gd-ph-big { width: 200px; height: 160px; }
/* hand-made line illustrations (no image API) */
.gd-il { display: block; width: 100%; height: 100%; }
.gd-il-big { width: 170px; height: 170px; }
.gd-index-pic .gd-il { width: 76px; height: 76px; }
.gd-bowl .gd-il { width: 68px; height: 68px; }
.gd-looks { text-align: center; color: var(--muted); font-style: italic; font-family: var(--font-title); font-size: 18px; margin: 0 8px 16px; }
.gd-looks .gd-label, .gd-safety .gd-label, .gd-flavour .gd-label { display: block; font-style: normal; font-family: var(--font-ui); }
.gd-label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
.gd-parts { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.gd-part { text-align: left; }
.gd-bowl { width: 64px; height: 64px; display: grid; place-items: center; color: var(--muted); margin: 0 0 4px; }
.gd-bowl img { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; }
.gd-part-name { font-family: var(--font-title); font-style: italic; font-weight: 500; font-size: 21px; margin: 0 0 4px; line-height: 1.1; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
.gd-uses { list-style: none; margin: 0; padding: 0; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); line-height: 1.6; }
.gd-sec { border-top: 1px solid var(--rule); margin-top: 18px; padding-top: 12px; }
.gd-sec-title { font-family: var(--font-title); font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.gd-methods { list-style: none; margin: 0; padding: 0; }
.gd-methods li { border-bottom: 1px solid var(--rule); }
.gd-methods li:last-child { border-bottom: 0; }
.gd-method { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; min-height: 50px; padding: 6px 0; text-align: left; font-family: var(--font-title); font-size: 20px; color: var(--accent); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 5px; }
.gd-method span:first-child { flex: 1; }
.gd-method .gd-meta { font-family: var(--font-ui); font-size: 13px; color: var(--muted); text-decoration: none; }
.gd-method-off { color: var(--ink); text-decoration: none; }
.gd-friends { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.gd-friend { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); font-size: 14px; display: inline-flex; align-items: center; }
button.gd-friend { color: var(--accent); }
.gd-lines { margin: 0; padding: 0 0 0 18px; }
.gd-lines li { margin: 0 0 4px; }
.gd-safety, .gd-flavour { margin: 14px 0 0; font-size: 15px; }
.gd-btn { width: 100%; margin-top: 20px; min-height: 48px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 500; }
.gd-status, .gd-note { text-align: center; color: var(--muted); font-size: 13px; min-height: 1em; }
.gd-empty { text-align: center; color: var(--muted); }

/* deep link from the Android home-screen bar: point at the button to tap (mic / Scan a slip) */
.dl-pulse { animation: dlPulse 1.2s ease-in-out 2; outline: 3px solid var(--focus); outline-offset: 3px; }
@keyframes dlPulse { 50% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (min-width: 600px) { .gd-parts { grid-template-columns: 1fr 1fr 1fr; } }

.day-collapsed { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--paper); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 18px; margin: 0 0 10px; min-height: 52px; text-align: left; }
.day-collapsed .serif { font-size: 19px; font-weight: 600; flex: 1; }
.day-collapsed .muted { font-size: 13px; }
.ask-preview { white-space: pre-line; max-height: 50vh; overflow-y: auto; margin: 4px 0 0; padding: 12px 14px; border-left: 2px solid var(--accent); background: var(--soft, #DCE4D6); border-radius: 4px; font-size: 15px; line-height: 1.5; color: var(--ink); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }

/* ===== Slips (slips.js) ===== */
.slp-entry .slp-scan { position: relative; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.slp-thumb { display: block; width: 100%; max-height: 220px; object-fit: contain; border-radius: 6px; border: 1px solid var(--rule); background: var(--paper); margin: 4px 0 12px; }
.slp-thumb.small { max-height: 120px; }
.slp-status { font-family: var(--font-title, "Cormorant Garamond", serif); font-size: 20px; color: var(--ink); margin: 8px 0 14px; }
.slp-lines { border-top: 1px solid var(--rule); margin: 4px 0 6px; }
.slp-line { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.slp-line.off { opacity: .5; }
.slp-line .slp-keep { min-width: 32px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.slp-line .slp-keep input { width: 22px; height: 22px; accent-color: var(--accent); }
.slp-line .slp-price { width: 96px; text-align: right; }
.slp-line .item-sub { display: block; margin-top: 4px; }
.slp-hist { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); }
.slp-low { margin: 2px 0 6px; color: var(--ink); }
.slp-hist-list { list-style: none; margin: 0; padding: 0; }
.slp-hist-list li { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dotted var(--rule); font-size: 14px; color: var(--ink); }
.slp-hist-list li span:first-child { min-width: 62px; color: var(--muted); }

.offline-bar { margin: 0; padding: 8px 16px; background: var(--soft, #DCE4D6); color: var(--ink); font-size: 14px; text-align: center; }
.offline-bar.warn-bar { background: #F1E6CF; color: var(--ink); }
.leave-line { font-size: 17px; margin: 4px 0 2px; }
/* QA: long words never push the page sideways */
main, .sheet, .lines, .modal { overflow-wrap: anywhere; }
/* ...but a button word never breaks letter-by-letter ("Delet / e"): buttons only wrap between words */
button, .btn, .chip { overflow-wrap: normal; }
.chip[data-act="l-day"] { min-width: 48px; padding: 0 10px; }
.lines .grow, .line .grow { min-width: 0; }

/* Studio photos (ready-made): soft square, blended into the linen so backgrounds match */
.gd-hero[data-photo] { width: 260px; height: 260px; margin-bottom: 14px; }
.gd-hero[data-photo] img { width: 260px; height: 260px; border-radius: 22px; mix-blend-mode: multiply; }
.gd-bowl[data-photo] { width: 104px; height: 104px; margin-bottom: 8px; }
.gd-bowl[data-photo] img { width: 104px; height: 104px; border-radius: 18px; mix-blend-mode: multiply; transform: scale(1.35); }
.gd-bowl[data-photo] { overflow: hidden; border-radius: 18px; }
.gd-index-pic[data-photo] img { border-radius: 16px; mix-blend-mode: multiply; }

/* ---------- Shop finder: centre names, map, need hints, start route ---------- */
.group-sub { display: block; font-family: var(--font-ui); font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.3; margin-top: 1px; }
.route-step { display: flex; align-items: center; gap: 10px; }
.route-step .grow { flex: 1; min-width: 0; }
.route-step .go-shop { flex: none; min-height: 40px; font-size: 13.5px; }
.btn.start-route { min-height: 56px; font-size: 17px; letter-spacing: .02em; }
.need-hint { padding: 0 18px 8px 58px; margin-top: -8px; }
.need-hint .link { min-height: 36px; padding: 2px 0; font-size: 13.5px; text-align: left; }
.wrap-chips { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; }
.sf-cats { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.sf-centre { font-family: var(--font-title); font-weight: 600; font-size: 18px; color: var(--accent); margin: 14px 0 0; padding-bottom: 2px; border-bottom: 1px solid var(--rule); }
.sf-have { font-family: var(--font-ui); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.pick-list button[aria-disabled="true"] .t { color: var(--muted); }
.sf-map-wrap { margin: 12px 0 0; }
.sf-map { height: 260px; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--accent-soft); z-index: 0; }
.sf-map-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.sf-map-foot .grow { flex: 1; }
.sf-loc { min-height: 44px; padding: 0 14px; font-size: 14px; }
.sf-map .leaflet-control-attribution { font-size: 10px; }
.sf-map .leaflet-control-zoom a { width: 36px; height: 36px; line-height: 36px; font-size: 20px; }
.sf-map .leaflet-popup-content-wrapper { border-radius: 10px; background: var(--paper); color: var(--ink); }
.sf-map .leaflet-popup-content { margin: 12px 14px; font-family: var(--font-ui); }
.sf-pop strong { display: block; font-family: var(--font-title); font-size: 18px; font-weight: 600; line-height: 1.2; }
.sf-pop span { display: block; font-size: 13px; color: var(--accent); }
.sf-pop span.m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sf-pop .btn { margin-top: 10px; width: 100%; min-height: 44px; font-size: 14px; }

/* smart list: typeahead + "did you forget?" */
.ta-box { position: fixed; z-index: 80; display: none; max-height: 300px; overflow-y: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 4px; }
.ta-row { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; background: none; text-align: left; border-radius: 10px; font: inherit; color: inherit; cursor: pointer; }
.ta-row:active, .ta-row:focus-visible { background: var(--rule); }
.ta-name { font-size: 17px; }
.ta-meta { font-size: 13px; opacity: .7; }
.smart-fg-row { border-top: 1px solid var(--rule); padding: 12px 0; }
.smart-fg-name { font-size: 19px; margin: 0 0 8px; }
.smart-fg-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.smart-fg-btns .btn { flex: 1 1 auto; min-height: 48px; }
.smart-fg-else { display: grid; gap: 6px; }
.smart-fg .wide { width: 100%; margin-top: 12px; min-height: 48px; }

/* Plans: locked sheet (e.g. budgets without the money pack) */
.plan-locked .lock-ico { vertical-align: -2px; margin-left: 4px; color: var(--muted, #77705F); }

/* v49: room under the last row so the floating money pill never covers it; no accidental text selection on long-press */
main.wrap { padding-bottom: calc(var(--tabbar) + 96px + env(safe-area-inset-bottom)); }
.item, .card-rows li, .day-collapsed { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.item input, .item textarea { -webkit-user-select: text; user-select: text; }

/* per-day food line in the planner, and Today's food tracker */
.day-food { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--rule); font-size: 13px; line-height: 1.4; }
.day-food .k { font-weight: 600; margin-right: 4px; }
.today-food { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.today-food .k { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6b6658); }
.today-food .big { margin: 2px 0 6px; font-family: var(--font-title); font-size: 19px; }
.macro-pills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.macro-pills li { border: 1px solid var(--rule); border-radius: 999px; padding: 4px 10px; font-size: 13px; text-align: center; }
.macro-pills b { font-size: 15px; }
.row-btn.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pick-list .pick-group { padding: 10px 4px 2px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6b6658); list-style: none; }

/* calendar chip: the real date input covers the chip, so tapping it opens the phone's date picker */
.date-chip { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.date-chip input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.date-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--paper); }
/* v57 build a meal */
.bm-parts { list-style: none; margin: 0; padding: 0; }
.bm-part { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 0; border-bottom: 1px solid var(--line, #e5e5e5); }
.bm-part .t { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.bm-part .input.bm-qty { width: 84px; flex: 0 0 84px; }
.bm-part .input.bm-unit { width: auto; flex: 1 1 auto; max-width: 160px; }
.bm-part .icon-btn { margin-left: auto; }
.bm-labs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bm-lab { display: flex; flex-direction: column; font-size: .85em; gap: 2px; }
.bm-video { width: 100%; max-height: 240px; border-radius: 12px; background: #000; margin: 6px 0; object-fit: cover; }
.pick-list .pick-mine { display: flex; align-items: center; gap: 6px; }
.pick-list .pick-mine > button:first-child { flex: 1; }

/* ===== Hosting (v62): linen editorial style — the look approved for the redesign ===== */
#hostRoot { margin: 0 -16px; }
.hs { min-height: calc(100vh - 140px); --hs-ink: #2B2622; --hs-muted: #7C7166; --hs-wine: #6A2228; --hs-line: rgba(43,38,34,.18); color: var(--hs-ink); padding: 8px 22px 40px;
  background-color: #ECE6DB;
  background-image: radial-gradient(120% 60% at 0% 0%, rgba(255,252,244,.55), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.31 0 0 0 0 0.26 0 0 0 0.10 0'/%3E%3C/filter%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.012' numOctaves='2' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.31 0 0 0 0 0.26 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23h)'/%3E%3Crect width='240' height='240' filter='url(%23v)'/%3E%3C/svg%3E"); }
.hs-head { text-align: center; padding: 18px 0 6px; }
.hs-kicker { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--hs-muted); margin: 0 0 8px; }
.hs-title { font-family: var(--font-title); font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; color: var(--hs-wine); margin: 0; }
.hs-tabs { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; padding: 18px 0 2px; margin: 0 -22px 0; padding-left: 22px; padding-right: 22px; border-bottom: 1px solid var(--hs-line); }
.hs-tabs::-webkit-scrollbar { display: none; }
.hs-tabs button { all: unset; cursor: pointer; white-space: nowrap; padding: 10px 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--hs-muted); border-bottom: 1.5px solid transparent; }
.hs-tabs button[aria-selected="true"] { color: var(--hs-ink); border-bottom-color: var(--hs-wine); }
.hs-body { padding-top: 18px; }
.hs-lead { font-family: var(--font-title); font-style: italic; font-size: 19px; margin: 10px 0 6px; }
.hs-chips { display: flex; gap: 8px; }
.hs-chip { all: unset; cursor: pointer; padding: 8px 16px; border: 1px solid var(--hs-line); border-radius: 999px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.hs-chip[aria-pressed="true"] { background: var(--hs-ink); color: #ECE6DB; border-color: var(--hs-ink); }
.hs-figure { margin: 6px -10px 0; color: var(--hs-ink); }
.hs-figure svg { display: block; width: 100%; height: auto; }
.hs-pin { cursor: pointer; }
.hs-pin circle { fill: #ECE6DB; stroke: var(--hs-wine); stroke-width: 1.2; transition: fill .2s; }
.hs-pin text { font: 500 10px var(--font-ui); fill: var(--hs-wine); text-anchor: middle; pointer-events: none; }
.hs-pin.on circle { fill: var(--hs-wine); } .hs-pin.on text { fill: #fff; }
.hs-hint { font-size: 12px; color: var(--hs-muted); text-align: center; margin: 0 0 8px; }
.hs-parts { list-style: none; margin: 0; padding: 0; }
.hs-parts li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hs-line); cursor: pointer; transition: background .2s; }
.hs-parts li.on { background: rgba(106,34,40,.06); }
.hs-parts .no { font-family: var(--font-title); color: var(--hs-wine); font-size: 22px; min-width: 22px; line-height: 1.1; }
.hs b { font-family: var(--font-title); font-weight: 500; font-size: 19px; display: block; line-height: 1.2; }
.hs .tip { display: block; font-size: 13px; color: var(--hs-muted); margin-top: 2px; line-height: 1.45; }
.hs-glasses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.hs-glasses li { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hs-glasses svg { width: 56px; height: 84px; color: var(--hs-ink); margin-bottom: 6px; }
.hs-h { font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--hs-muted); margin: 30px 0 8px; display: flex; gap: 12px; align-items: center; }
.hs-h::after { content: ''; flex: 1; height: 1px; background: var(--hs-line); }
.hs-rules { margin: 0; padding-left: 18px; } .hs-rules li { padding: 6px 0; line-height: 1.5; }
.hs-signals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hs-signals figure { margin: 0; text-align: center; } .hs-signals svg { width: 100%; max-width: 170px; color: var(--hs-ink); }
.hs-note { font-size: 13px; color: var(--hs-muted); line-height: 1.5; border-top: 1px solid var(--hs-line); padding-top: 12px; margin-top: 16px; }
.hs-check { list-style: none; margin: 0; padding: 0; }
.hs-check li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--hs-line); cursor: pointer; }
.hs-check .box { flex: none; width: 20px; height: 20px; border: 1.2px solid var(--hs-ink); border-radius: 4px; margin-top: 2px; position: relative; }
.hs-check li.done .box { background: var(--hs-ink); }
.hs-check li.done .box::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #ECE6DB; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hs-check li.done > span:last-child { opacity: .5; text-decoration: line-through; text-decoration-thickness: 1px; }
.hs-btn { all: unset; cursor: pointer; display: block; text-align: center; margin: 20px auto 0; padding: 13px 22px; border-radius: 999px; background: var(--hs-ink); color: #ECE6DB; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; }
.hs-btn-quiet { background: transparent; color: var(--hs-ink); border: 1px solid var(--hs-line); }
.hs-golden { font-family: var(--font-title); font-style: italic; text-align: center; font-size: 18px; color: var(--hs-muted); margin: 36px 0 0; }
#rcpSeg { max-width: 420px; } #rcpSeg button { font-size: 13px; }

/* ===== v63 linen editorial look across the app: the whole screen is one tablecloth; boxes become hairlines ===== */
:root { --bg: #ECE6DB; --paper: #F4EFE6; --accent: #2B2622; --accent-soft: rgba(106,34,40,.08); --rule: rgba(43,38,34,.16); --shadow: none; --wine: #6A2228; }
body { background-image:
    radial-gradient(120% 60% at 0% 0%, rgba(255,252,244,.55), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.31 0 0 0 0 0.26 0 0 0 0.10 0'/%3E%3C/filter%3E%3Cfilter id='v'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9 0.012' numOctaves='2' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.31 0 0 0 0 0.26 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23h)'/%3E%3Crect width='240' height='240' filter='url(%23v)'/%3E%3C/svg%3E");
  background-attachment: fixed, scroll; }
.sheet { background: transparent; box-shadow: none; border-radius: 0; padding: 18px 0; border-top: 1px solid var(--rule); }
.tabbar { background: rgba(236,230,219,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg { background: transparent; border-color: var(--rule); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #ECE6DB; }
.hs { background: none; }
/* dialogs and pop-up sheets still need a solid surface so text stays readable over the page */
.modal .sheet { border-top: 0; }
.day-collapsed, .gd-index-item { background: transparent; box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--rule); }
.chip, .gd-chip, .gd-friend, .stepper button, .gd-icon-btn { background: transparent; }
.chip.on, .chip[aria-pressed="true"] { background: var(--ink); color: #ECE6DB; border-color: var(--ink); }
/* v64: finish the linen look — fields as underlines on the cloth, no handwriting, quiet ornaments, pop-ups in linen */
:root { --font-hand: "Cormorant Garamond", "Iowan Old Style", Georgia, serif; }
.hand, .empty-note, .meal-name.free { font-style: italic; font-weight: 400; }
.empty-note { font-size: 20px; }
.input, select.input, textarea.input { background: transparent; border: 0; border-bottom: 1px solid rgba(43,38,34,.35); border-radius: 0; padding-left: 2px; }
.input:focus, select.input:focus, textarea.input:focus { border-bottom-color: var(--ink); outline: none; box-shadow: 0 1px 0 var(--ink); }
textarea.input { border: 1px solid var(--rule); }
.orn svg { display: none; }
.orn { max-width: 44px; gap: 0; }
.orn::after { display: none; }
.modal { background-color: #ECE6DB; background-image: inherit; border-top: 1px solid var(--rule); box-shadow: 0 -18px 40px -24px rgba(43,38,34,.35); }
