/* Meals: mobile-first styles. Desktop layout from 900px. */

/* ------------------------------------------------------------------ tokens */
:root {
  --page: #F6F5F1;
  --surface: #FFFFFF;
  --soft: #EEECE6;
  --line: #E6E3DC;
  --line-soft: #EEECE6;
  --ink: #1B1A17;
  --ink-2: #4A4740;
  --muted: #66625A;
  --dashed: #A8A398;
  --accent: #23613F;
  --accent-hover: #174A2F;
  --on-accent: #FFFFFF;
  --green-soft: #E4EFE7;
  --green-ink: #1E5536;
  --saffron-soft: #FCEFD3;
  --saffron-ink: #6E4A00;
  --danger: #9A3F1E;
  --danger-soft: #F8E7DF;
  --star: #B07A12;
  --bar-bg: #1B1A17;
  --bar-ink: #FFFFFF;
  --bar-muted: #D9D6CF;
  --scrim: rgba(27, 26, 23, .45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 24px rgba(27, 26, 23, .25);
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --tabbar-h: 72px;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #151412;
    --surface: #1F1E1B;
    --soft: #2C2A26;
    --line: #3A3732;
    --line-soft: #2E2C28;
    --ink: #EEEBE4;
    --ink-2: #D2CEC5;
    --muted: #ABA59A;
    --dashed: #6E6960;
    --accent: #7FC99D;
    --accent-hover: #9AD7B2;
    --on-accent: #0D1F14;
    --green-soft: #1D3327;
    --green-ink: #A9DEBE;
    --saffron-soft: #3B2F15;
    --saffron-ink: #F2D08A;
    --danger: #F2A285;
    --danger-soft: #3A2119;
    --star: #E8B54F;
    --bar-bg: #2D2B27;
    --bar-ink: #F3F0EA;
    --bar-muted: #D2CEC5;
    --scrim: rgba(0, 0, 0, .6);
    --shadow-sm: none;
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.45 var(--font-body);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
body.has-selection { padding-bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom, 0px)); }
[hidden] { display: none !important; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
b, strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.desk-only { display: none !important; }
.icon { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------------ app chrome */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 4px 8px 4px 16px; min-height: 52px;
  display: flex; align-items: center; gap: 8px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  font: 700 20px/1 var(--font-head);
}
.brand:hover { color: var(--ink); }
.brand svg { color: var(--accent); }
/* "Find at <store>" links on the shopping list: opened ones turn green (only colors may change on :visited). */
.find-link { white-space: nowrap; }
.find-link:visited { color: var(--green-ink); background-color: var(--green-soft); border-color: var(--green-ink); }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.signin-logo { display: block; width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 16px; }
.topnav, .who, .signout { display: none; }
.top-settings { margin-left: auto; }
.top-settings[aria-current="page"] { color: var(--accent); background: var(--green-soft); border-color: transparent; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; min-height: 44px;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }

main.page { max-width: 1200px; margin: 0 auto; padding: 16px 16px 24px; }

.flash { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: var(--green-soft); color: var(--green-ink); }
.flash.err { background: var(--danger-soft); color: var(--danger); }

.toast {
  position: fixed; z-index: 60; left: 16px; right: 16px;
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto; max-width: 420px; padding: 12px 16px; border-radius: var(--radius-md);
  background: var(--bar-bg); color: var(--bar-ink); box-shadow: var(--shadow-lg); font-weight: 500;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.toast:empty { padding: 0; box-shadow: none; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
body.has-selection .toast { bottom: calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom, 0px)); }
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; color: var(--on-accent); }

/* ------------------------------------------------------------------ primitives */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.eyebrow {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.section-title {
  margin: 24px 0 8px; font: 600 13px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.page-head .lead { margin-top: 6px; color: var(--muted); max-width: 60ch; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; font-size: 14px;
  text-decoration: none;
}

.btn, button {
  font: 600 14px/1.2 var(--font-body); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.btn:hover, button:hover { border-color: var(--dashed); color: var(--ink); }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover, button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.outline { border-color: var(--accent); color: var(--accent); }
.btn.outline:hover { background: var(--green-soft); color: var(--accent); border-color: var(--accent); }
.btn.dashed { border: 1px dashed var(--dashed); color: var(--accent); }
.btn.dashed:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.btn.text, button.text {
  background: transparent; border-color: transparent; padding: 0 8px; color: var(--accent);
}
.btn.text:hover, button.text:hover { background: transparent; border-color: transparent; color: var(--accent-hover); text-decoration: underline; }
.btn.text.danger { color: var(--danger); }
.btn.block { display: flex; width: 100%; }
.btn.lg { min-height: 48px; font-size: 15px; border-radius: var(--radius-md); }
.btn.sm { min-height: 44px; padding: 0 14px; }
.btn:disabled, button:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.primary:disabled { background: var(--soft); border-color: var(--line); color: var(--ink-2); opacity: 1; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link-btn {
  min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent);
  font: 600 13px/1.3 var(--font-body); text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent-hover); background: none; }

.icon-btn {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 22px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.is-disabled { opacity: .4; }
.icon-btn.plain { border-color: transparent; background: transparent; }

.pill {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; line-height: 1.2;
  padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); white-space: nowrap;
}
.pill.draft { background: var(--saffron-soft); color: var(--saffron-ink); }
.pill.sent { background: var(--green-soft); color: var(--green-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; line-height: 1.2;
  padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); white-space: nowrap;
}
.chip.saffron { background: var(--saffron-soft); color: var(--saffron-ink); }
.chip.green { background: var(--green-soft); color: var(--green-ink); }
.chip.xs { font-size: 11px; padding: 2px 8px; }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.star { color: var(--star); }

.note {
  background: var(--saffron-soft); color: var(--saffron-ink); padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.4;
}
.note.green { background: var(--green-soft); color: var(--green-ink); }
.note.danger { background: var(--danger-soft); color: var(--danger); }
.note a { color: inherit; font-weight: 600; }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.note li + li { margin-top: 4px; }
.note ul + p, .note p + p { margin-top: 6px; }


/* segmented tabs */
.seg-tabs {
  padding: 4px; background: var(--soft); border-radius: var(--radius-md);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
}
.seg-tabs [role="tab"] {
  min-height: 44px; padding: 4px 6px; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font: 600 13px/1.2 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg-tabs [role="tab"]:hover { color: var(--ink); background: transparent; }
.seg-tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-tabs .tab-date::before { content: " · "; }
.seg-tabs.compact [role="tab"] { flex-direction: column; gap: 1px; }
.seg-tabs.compact .tab-date { font-size: 11px; font-weight: 500; }
.seg-tabs.compact .tab-date::before { content: none; }

/* spinner + slow forms */
.spinner {
  display: inline-block; width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
form.busy [type="submit"] { pointer-events: none; opacity: .8; }

/* ------------------------------------------------------------------ forms */
label, .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=number], input[type=search], input[type=date], input[type=email], select, textarea {
  font: 400 16px/1.3 var(--font-body); width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { min-height: 7rem; resize: vertical; line-height: 1.45; }
select { appearance: auto; }
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--accent); }
input[type=checkbox] { width: 22px; height: 22px; margin: 0; flex: none; }
input[type=file] { font: 400 14px var(--font-body); color: var(--ink-2); max-width: 100%; }
input[type=file]::file-selector-button {
  font: 600 14px var(--font-body); min-height: 40px; padding: 0 14px; margin-right: 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--soft); color: var(--ink);
}
.field + .field { margin-top: 14px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.search-field {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.search-field svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-field input { border: 0; padding: 10px 0; min-height: 42px; background: transparent; }
.search-field input:focus-visible { outline: none; }
.search-field:focus-within { outline: 2px solid var(--accent); border-color: var(--accent); }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form > input, .inline-form > select { flex: 1; min-width: 0; }
.check-row {
  display: flex; align-items: center; gap: 12px; min-height: 50px; margin: 0;
  font-size: 15px; font-weight: 400; cursor: pointer;
}

/* ------------------------------------------------------------------ plan */
.plan-head {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title pager" "tools tools";
  gap: 12px 8px; align-items: center; margin: 4px 0 12px;
}
.plan-title { grid-area: title; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan-pager { grid-area: pager; display: flex; gap: 6px; }
.plan-tools { grid-area: tools; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan-tools .btn.primary { margin-left: auto; }
.plan-tools form { margin: 0; }

.plan-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.plan-notes .note { margin: 0; }

.week-switch { display: flex; gap: 8px; align-items: stretch; margin: 16px 0 0; }
.week-switch .seg-tabs { flex: 1; min-width: 0; }
.week-switch form { margin: 0; display: flex; }
.week-switch .btn.dashed { min-height: 48px; border-radius: var(--radius-md); padding: 0 14px; }

.weeks { display: flex; flex-direction: column; gap: 24px; margin-top: 16px; }
.week { display: flex; flex-direction: column; gap: 12px; }
.week:not(.is-current) { display: none; }
.week-head { display: none; font-size: 20px; }
.week-foot { display: flex; justify-content: center; margin: 0; }

.day-grid { display: flex; flex-direction: column; gap: 12px; }
.day-card {
  display: flex; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
  overflow: hidden; min-height: 132px;
}
.day-card:has(input:checked), .day-card.is-picked { border-color: var(--accent); }
.day-photo { position: relative; width: 116px; flex: none; background: var(--soft); }
.day-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pick {
  position: absolute; top: 4px; left: 4px; width: 44px; height: 44px; margin: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.pick input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
.pick-box {
  width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .94); border: 2px solid #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.pick-box svg { width: 16px; height: 16px; opacity: 0; }
.pick input:checked + .pick-box { background: #23613F; border-color: #23613F; }
.pick input:checked + .pick-box svg { opacity: 1; }
.pick input:focus-visible + .pick-box { outline: 3px solid #FFFFFF; box-shadow: 0 0 0 5px #23613F; }
.day-body { flex: 1; min-width: 0; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.day-label { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.day-title { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; }
a.day-title:hover { color: var(--ink); text-decoration: underline; }
.day-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.day-reason { font-size: 13px; line-height: 1.35; color: var(--ink-2); flex: 1; }
.day-actions { display: flex; justify-content: flex-end; gap: 2px; }
.day-actions form { margin: 0; display: flex; }
.day-actions .btn.text { min-height: 44px; padding: 0 6px; font-size: 13px; }

.day-card.is-empty { min-height: 0; align-items: center; border-style: dashed; background: transparent; }
.day-card.is-empty .day-body { padding: 10px 12px 10px 16px; gap: 2px; }
.day-empty { font-size: 14px; color: var(--muted); }
.day-card.is-empty .btn { flex: none; margin-right: 12px; }

.move-list { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.move-list .eyebrow { margin: 10px 0 2px; }
.move-days { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.move-opt {
  display: flex; justify-content: flex-start; gap: 12px; width: 100%; min-height: 48px; padding: 8px 14px;
  border: 0; border-radius: 0; background: var(--surface); text-align: left; font-weight: 400;
}
.move-opt[hidden] { display: none; }
.move-opt + .move-opt { border-top: 1px solid var(--line-soft); }
.move-opt:hover { background: var(--soft); }
.move-day { width: 96px; flex: none; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.move-meal { flex: 1; min-width: 0; font-size: 14px; }
.move-meal.muted { color: var(--muted); }
.move-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }

.extras-card { margin-top: 16px; padding-bottom: 8px; }
.extras-card .card-head a { font-size: 13px; font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.extras-list .check-row { border-top: 1px solid var(--line-soft); }
.extras-list .check-row .muted { font-size: 13px; }
.extras-empty { padding: 8px 0 8px; font-size: 14px; }

.reroll-bar {
  position: fixed; z-index: 40; left: 16px; right: 16px;
  bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; margin: 0;
  background: var(--bar-bg); color: var(--bar-ink); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.reroll-count { flex: 1; font-size: 14px; font-weight: 500; }
.reroll-clear { background: transparent; border-color: transparent; color: var(--bar-muted); font-weight: 500; padding: 0 12px; }
.reroll-clear:hover { background: transparent; border-color: transparent; color: var(--bar-ink); text-decoration: underline; }
.reroll-bar .btn.primary svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ dialogs (bottom sheet on phones) */
dialog {
  padding: 0; border: 0; color: var(--ink); background: var(--surface);
  width: 100%; max-width: 100%; max-height: 88vh; max-height: 88dvh;
  margin: auto 0 0; border-radius: 24px 24px 0 0; box-shadow: 0 -8px 32px rgba(0, 0, 0, .18);
  padding-bottom: env(safe-area-inset-bottom, 0px); overscroll-behavior: contain;
}
dialog::backdrop { background: var(--scrim); }
dialog[open] { animation: sheet-up .2s ease-out; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
.sheet-grip { display: flex; justify-content: center; padding-top: 8px; }
.sheet-grip span { width: 40px; height: 4px; border-radius: 2px; background: var(--line); }
.dlg-close { position: absolute; top: 16px; right: 12px; background: var(--page); border-color: transparent; }
.sheet-head { padding: 12px 64px 8px 16px; display: flex; flex-direction: column; gap: 4px; }
.sheet-head h2 { font-size: 22px; }
.sheet-head p { font-size: 13px; color: var(--muted); }
.dlg-body { padding: 0 0 16px; }
.dlg-pad { padding: 4px 16px 16px; }
.dlg-loading { display: flex; align-items: center; gap: 10px; padding: 48px 16px 40px; color: var(--muted); }
.sheet-section { padding: 8px 16px 0; }
.sheet-section .eyebrow { margin: 4px 0 8px; }
.sheet-section + .sheet-section { padding-top: 16px; }

.alt-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.alt-row { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; }
.alt-row img { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; flex: none; background: var(--soft); }
.alt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.alt-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.alt-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.alt-shares { font-size: 12px; color: var(--saffron-ink); }
.alt-variety { font-size: 12px; color: var(--muted); }
.alt-row form { margin: 0; flex: none; }
.alt-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: 14px; }
.pick-any { display: flex; gap: 8px; margin-top: 6px; }
.pick-any select { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ shopping */
.kroger-card { display: flex; flex-direction: column; gap: 12px; }
.store-row { display: flex; align-items: center; gap: 12px; }
.store-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.store-row .strong { font-size: 14px; font-weight: 600; }
.icon-tile {
  width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.icon-tile svg { width: 20px; height: 20px; }
.kroger-card form { margin: 0; }

.list-card { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-card > li { border-bottom: 1px solid var(--line-soft); }
.list-card > li:last-child { border-bottom: 0; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 8px; }
.check-hit { width: 44px; height: 44px; margin: 0; display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.shop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-name { font-size: 15px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow-wrap: anywhere; }
.shop-need { font-size: 13px; color: var(--muted); }
.shop-recipes {
  font-size: 12px; line-height: 1.35; color: var(--muted);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
@media (min-width: 900px) { .shop-recipes { -webkit-line-clamp: unset; line-clamp: none; display: block; } }
.prod-line { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--ink); }
.prod-line img {
  width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #FFFFFF;
  border: 1px solid var(--line); flex: none;
}
.prod-line .prod-desc { min-width: 0; overflow-wrap: anywhere; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); flex: none; }
.stepper button {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink); font: 600 18px/1 var(--font-body);
}
.stepper button:hover { background: var(--soft); }
.stepper button:disabled { opacity: .35; background: transparent; }
.stepper output { min-width: 24px; text-align: center; font-size: 15px; font-weight: 600; }
.row-action { flex: none; }
details.fold { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.fold > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 52px; padding: 12px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary svg { transform: rotate(180deg); }
details.fold .fold-body { padding: 0 16px 12px; }
details.fold .list-card { border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; margin: 8px -16px -12px; }
.log-entry + .log-entry { border-top: 1px solid var(--line-soft); }
.log-entry summary { min-height: 48px; padding: 12px 16px; cursor: pointer; font-size: 14px; font-weight: 600; }
.log-entry ul { list-style: none; padding: 0 16px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

.products { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card.product { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 16px; font-size: 13px; }
.card.product img { width: 100%; height: 110px; object-fit: contain; background: #FFFFFF; border-radius: 10px; }
.card.product .desc { font-size: 14px; font-weight: 600; line-height: 1.3; }
.card.product .price { font-size: 15px; font-weight: 700; }
.card.product .price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.card.product button { margin-top: auto; }
.results { margin-top: 12px; }
.results .flash { margin: 0; }

/* ------------------------------------------------------------------ recipes */
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters + .filters { margin-top: 6px; }
.filters button {
  min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  white-space: nowrap; flex: none;
}
.filters button.on { background: var(--green-soft); border-color: var(--accent); color: var(--green-ink); font-weight: 600; }
.filters button svg { width: 14px; height: 14px; }
.recipe-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.recipe-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.recipe-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.recipe-card:hover { color: var(--ink); border-color: var(--dashed); }
.recipe-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--soft); }
.rc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rc-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.rc-body .chips { gap: 4px; }
.rc-body .chip { font-size: 11px; padding: 3px 8px; }
.rc-last { font-size: 12px; color: var(--muted); margin-top: auto; }
.no-results { padding: 24px 0; text-align: center; color: var(--muted); }

/* recipe detail */
.recipe-page { margin: -16px -16px 0; }
.hero { position: relative; height: 292px; background: var(--soft); }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-bar { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 8px; }
.hero-bar .group { display: flex; gap: 8px; }
.glass {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 22px; border: 0;
  background: rgba(255, 255, 255, .92); color: #1B1A17; display: inline-flex; align-items: center; justify-content: center;
}
.glass:hover { background: #FFFFFF; color: #1B1A17; }
.glass svg { width: 20px; height: 20px; }
.fav-btn svg { fill: none; stroke: #1B1A17; }
.fav-btn[aria-pressed="true"] svg { fill: #E0A43A; stroke: #B07A12; }
.credit {
  position: absolute; right: 12px; bottom: 32px; font-size: 11px; font-weight: 600; padding: 7px 10px;
  border-radius: 999px; background: rgba(27, 26, 23, .72); color: #FFFFFF; text-decoration: none;
}
a.credit:hover { color: #FFFFFF; text-decoration: underline; }
.recipe-sheet {
  position: relative; margin-top: -20px; background: var(--page); border-radius: 22px 22px 0 0;
  padding: 20px 16px 0; display: flex; flex-direction: column; gap: 12px;
}
.recipe-sheet h1 { font-size: 26px; }
.recipe-last { font-size: 13px; color: var(--muted); }
.nutrition-card { display: flex; flex-direction: column; gap: 8px; }
.nutrition-card h2 { font-size: 18px; }
.nutrition-card > p { margin: 0; }
.nutrition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.nutrition-grid div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line-soft); padding: 6px 0; }
.nutrition-grid dt { color: var(--muted); }
.nutrition-grid dd { margin: 0; font-weight: 600; text-align: right; }
.ing-list { list-style: none; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ing-list li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.ing-list li:last-child { border-bottom: 0; }
.ing-amt { width: 92px; flex: none; font-weight: 600; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.step-n {
  width: 28px; height: 28px; flex: none; border-radius: 14px; background: var(--green-soft); color: var(--green-ink);
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step-text { font-size: 15px; line-height: 1.45; }
.step-amounts { margin-top: 6px; font-size: 13px; font-style: italic; color: var(--muted); }
.prep-tips { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.prep-tips li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.recipe-source { margin-top: 14px; }
.recipe-source a { color: inherit; }

/* plan prep list */
.prep-intro { margin: 4px 0 8px; font-size: 14px; }
.prep-session .section-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  text-transform: none; letter-spacing: 0; font: 700 17px/1.3 var(--font-head); color: var(--ink); }
.prep-sub { font: 500 13px/1.3 var(--font-body); color: var(--muted); }
.prep-session .chip[data-left] { margin-left: auto; }
.prep-dinner { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.prep-dinner:last-child { border-bottom: 0; }
.prep-dish { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 14px; }
.prep-dish img { width: 44px; height: 33px; object-fit: cover; border-radius: 6px; flex: none; }
.prep-tasks { list-style: none; margin-top: 6px; }
.prep-task { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.prep-task input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.prep-task > span { display: flex; flex-direction: column; gap: 2px; }
.prep-text { font-size: 15px; }
.prep-task input:checked + span .prep-text { text-decoration: line-through; color: var(--muted); }
.empty-panel { padding: 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.photo-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.photo-strip a { flex: none; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.photo-strip img { width: 104px; height: 140px; object-fit: cover; display: block; }
.dish-photo { display: flex; flex-direction: column; gap: 12px; }
.dish-photo form { margin: 0; }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.upload-row input[type=file] { flex: 1 1 200px; }

/* recipe form */
.form-page { max-width: 860px; }
.form-card + .form-card { margin-top: 16px; }
.form-card h2 { margin-bottom: 4px; }
.photo-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; }
.photo-thumbs a { flex: none; line-height: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.photo-thumbs img { width: 88px; height: 118px; object-fit: cover; }
.ing-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.ing-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 4px 6px; letter-spacing: .03em; text-transform: uppercase; }
.ing-table td { padding: 3px 4px; vertical-align: middle; }
.ing-table td input { min-height: 44px; padding: 8px 10px; }
.ing-table td.q { width: 4.75rem; } .ing-table td.u { width: 7.5rem; } .ing-table td.s { width: 6rem; } .ing-table td.x { width: 48px; }
.ing-del { width: 44px; height: 44px; min-height: 44px; padding: 0; border-color: transparent; background: transparent; color: var(--danger); }
.ing-del:hover { border-color: var(--danger); color: var(--danger); }
.ing-del svg { width: 16px; height: 16px; }
.mono { font-family: ui-monospace, Consolas, "SF Mono", monospace !important; font-size: 14px !important; }
.add-ing { margin-top: 12px; }
.hint.under-label { margin: -2px 0 8px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 899px) {
  .ing-table thead { display: none; }
  .ing-table, .ing-table tbody { display: block; }
  .ing-table tr {
    display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 10px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .ing-table td { padding: 0; width: auto !important; display: block; }
  .ing-table td.i { grid-column: 1 / -1; order: -1; }
  .ing-table td.n { grid-column: 1 / 3; }
  .ing-table td.x { display: flex; justify-content: flex-end; }
}

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 24px 16px; border: 1px dashed var(--dashed); border-radius: var(--radius); background: var(--page);
}
.dropzone svg { width: 32px; height: 32px; color: var(--accent); }

/* ------------------------------------------------------------------ pantry */
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; min-width: 0; }
.staple-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; min-height: 60px; }
.staple-name { display: flex; flex-direction: column; gap: 2px; }
.staple-name b { font-size: 15px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; flex: none; }
.seg button {
  border: 0; border-radius: 0; min-height: 44px; padding: 0 10px; font-size: 13px; font-weight: 500;
  background: var(--surface); color: var(--muted);
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--ink); background: var(--soft); }
.seg button.on.ok { background: var(--green-soft); color: var(--green-ink); font-weight: 600; }
.seg button.on.low { background: var(--saffron-soft); color: var(--saffron-ink); font-weight: 600; }
.seg button.on.out { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.remove-btn { color: var(--muted); border-color: transparent; background: transparent; }
.remove-btn:hover { color: var(--danger); border-color: var(--line); background: transparent; }
.extra-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 12px; }
.extra-thumb {
  width: 48px; height: 48px; border-radius: var(--radius-sm); flex: none; object-fit: contain; background: #FFFFFF;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.extra-thumb:not(img) { background: var(--soft); }
.extras-list .extra-thumb { width: 44px; height: 44px; }
.extra-thumb svg { width: 20px; height: 20px; }
.pantry-cols { display: grid; gap: 24px; }
.pantry-cols section { min-width: 0; }
#extras { scroll-margin-top: 80px; }

/* ------------------------------------------------------------------ settings */
.settings-grid { display: grid; gap: 16px; }
.settings-grid .card h2 { margin-bottom: 12px; }
.store-list { list-style: none; margin-top: 4px; }
.store-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.store-list form { margin: 0; }
.range-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.range-row input[type=range] { flex: 1; min-width: 0; height: 44px; }
output.range-value { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ------------------------------------------------------------------ plans list */
.plan-list a.plan-link {
  display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; min-height: 64px;
  color: var(--ink); text-decoration: none;
}
.plan-list a.plan-link:hover { background: var(--page); color: var(--ink); }
.plan-link .grow { display: flex; flex-direction: column; gap: 2px; }
.plan-link .range { font: 700 18px/1.2 var(--font-head); }
.plan-link svg { width: 18px; height: 18px; color: var(--muted); }
.new-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.new-plan form { margin: 0; }

/* ------------------------------------------------------------------ denied */
body.bare { padding: 0; }
.center-card { max-width: 440px; margin: 12vh auto; padding: 0 16px; }
.center-card .card { display: flex; flex-direction: column; gap: 14px; padding: 24px; }

/* ------------------------------------------------------------------ desktop */
@media (min-width: 900px) {
  body, body.has-selection { padding-bottom: 0; }
  body.has-selection main.page { padding-bottom: 112px; }
  .desk-only { display: revert !important; }
  .phone-only { display: none !important; }
  h1 { font-size: 36px; }

  .topbar { position: sticky; top: 0; z-index: 30; }
  .topbar-in { padding: 0 24px; min-height: 64px; flex-wrap: wrap; }
  .topnav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
  .topnav a {
    padding: 10px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 14px;
    text-decoration: none; min-height: 44px; display: inline-flex; align-items: center;
  }
  .topnav a:hover { background: var(--soft); color: var(--ink); }
  .topnav a[aria-current="page"] { background: var(--green-soft); color: var(--green-ink); font-weight: 600; }
  .who { display: inline; font-size: 13px; color: var(--muted); }
  .signout { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; text-decoration: none; }
  .top-settings, .tabbar { display: none; }
  main.page { padding: 24px 24px 48px; }
  .toast, body.has-selection .toast { bottom: 24px; }
  body.has-selection .toast { bottom: 104px; }
  .flash { margin-bottom: 20px; }

  .card { padding: 16px 20px; }

  /* plan */
  .plan-head {
    grid-template-columns: auto auto 1fr; grid-template-areas: "title pager tools";
    align-items: end; gap: 16px; margin: 0 0 20px;
  }
  .plan-pager { align-self: end; padding-bottom: 2px; }
  .plan-tools { justify-content: flex-end; }
  .plan-tools .btn.primary { margin-left: 0; }
  .summary { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
  .summary-text { flex: 1 1 380px; }
  .meters { display: flex; gap: 24px; }
  .meter-label { justify-content: flex-start; color: var(--muted); }
  .meter-label b { color: var(--ink); }
  .meter-track { display: none; }
  .summary .note, .summary .warn-list { flex: 1 1 100%; }
  .week-switch { display: none; }
  .weeks { margin-top: 24px; gap: 28px; }
  .week, .week:not(.is-current) { display: flex; }
  .week-head { display: block; }
  .week-foot { justify-content: flex-start; }
  .day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
  .day-card { flex-direction: column; min-height: 0; }
  .day-photo { width: 100%; height: 150px; }
  .pick { top: 8px; left: 8px; }
  .day-body { padding: 12px 14px 10px; }
  .day-actions { justify-content: flex-start; gap: 14px; }
  .day-actions .btn.text { padding: 0; }
  .day-card.is-empty { justify-content: center; text-align: center; min-height: 180px; gap: 8px; }
  .day-card.is-empty .day-body { flex: 0 0 auto; align-items: center; padding: 16px 14px 0; }
  .day-card.is-empty .btn { margin: 0 0 16px; }
  .extras-card { margin-top: 28px; max-width: 760px; }
  .extras-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .extras-list .check-row { min-height: 48px; }
  .reroll-bar {
    left: 50%; right: auto; bottom: 24px; transform: translateX(-50%);
    width: min(480px, calc(100vw - 48px)); padding: 12px 12px 12px 18px;
  }

  /* dialogs: centred */
  dialog {
    margin: auto; width: min(640px, calc(100vw - 48px)); max-height: 85vh; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding-bottom: 0;
  }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 20px; }
  .dlg-close { top: 14px; }

  /* shopping */
  .shop-page, .prep-page { max-width: 820px; }
  .shop-row { padding: 10px 16px 10px 10px; }

  /* recipes */
  .filters { flex-wrap: wrap; overflow: visible; padding: 0; margin: 0; }
  .recipe-tools { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .recipe-tools .search-field { flex: 0 1 380px; }
  .recipe-tools .filter-group { flex: 1 1 400px; display: flex; flex-direction: column; gap: 6px; }
  .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
  .rc-title { font-size: 15px; }
  .rc-body .chip { font-size: 12px; }

  .recipe-page { margin: 0 auto; max-width: 820px; }
  .hero { height: 400px; border-radius: var(--radius); overflow: hidden; }
  .credit { bottom: 14px; }
  .recipe-sheet { margin-top: 0; padding: 24px 0 0; border-radius: 0; }
  .recipe-sheet h1 { font-size: 34px; }

  /* pantry + settings */
  .pantry-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .settings-grid .span-2 { grid-column: 1 / -1; }
  .plans-page { max-width: 760px; }
}


/* ------------------------------------------------------------------ Ask AI */
.topnav a svg { margin-right: 6px; }
.ask-recipe { margin-top: 12px; align-self: flex-start; }
.ask-body main.page { padding-bottom: 8px; }
.ask-page {
  max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px;
  /* fill the screen between the top bar and the tab bar; the log scrolls, the input stays put */
  height: calc(100vh - 53px - var(--tabbar-h) - env(safe-area-inset-bottom, 0px) - 24px);
  height: calc(100dvh - 53px - var(--tabbar-h) - env(safe-area-inset-bottom, 0px) - 24px);
}
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ask-head h1 { display: inline-flex; align-items: center; gap: 8px; font-size: 24px; }
.ask-head h1 svg { color: var(--accent); width: 22px; height: 22px; }
.ask-context {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; font-size: 14px;
  background: var(--green-soft); color: var(--green-ink); border-radius: var(--radius-sm);
}
.ask-context img { width: 40px; height: 30px; object-fit: cover; border-radius: 6px; flex: none; }
.ask-context span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-context a { color: inherit; font-weight: 600; }
.icon-btn.sm { width: 36px; height: 36px; min-height: 36px; }
.ask-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 4px 2px 8px; overscroll-behavior: contain; }
.ask-empty { display: flex; flex-direction: column; gap: 14px; padding: 8px 2px; }
.ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 500 14px/1.3 var(--font-body); text-align: left; cursor: pointer;
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.msg p + p, .msg p + ul, .msg p + ol, .msg ul + p, .msg ol + p { margin-top: 8px; }
.msg ul, .msg ol { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg code { font-size: 13px; background: var(--soft); padding: 1px 5px; border-radius: 5px; }
.ask-err { color: var(--danger); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .6; } }
.ask-bar {
  display: flex; align-items: flex-end; gap: 8px; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 26px;
}
.ask-bar textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 160px; resize: none; border: 0; outline: none; background: transparent;
  padding: 11px 8px 11px 12px; font: 400 16px/1.4 var(--font-body); color: var(--ink); overflow-y: hidden;
}
.ask-bar .icon-btn { border: 0; }
.icon-btn.primary { background: var(--accent); color: var(--on-accent); }
.icon-btn.primary:hover { background: var(--accent-hover); }
.icon-btn.primary:disabled { opacity: .45; }
.ask-mic { background: var(--soft); color: var(--ink); }
.ask-mic.listening { background: var(--danger); color: #FFFFFF; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--danger-soft); } }
@media (prefers-reduced-motion: reduce) { .ask-mic.listening { animation: none; } }

/* add from link: the page's photo on the recipe form */
.import-photo { display: flex; gap: 14px; align-items: center; }
.import-photo img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); flex: none; background: var(--soft); }
.check-line { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check-line input { width: 20px; height: 20px; }

@media (min-width: 900px) {
  .ask-page { height: calc(100vh - 61px - 48px); height: calc(100dvh - 61px - 48px); }
  .ask-body main.page { padding-bottom: 24px; }
}

/* duplicate warning on the recipe form */
.dupe-note { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.dupe-note ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.dupe-note a { font-weight: 600; }

/* non-production environments */
.env-banner { padding: 6px 16px; text-align: center; font: 600 12px/1.3 var(--font-body); letter-spacing: .02em;
  background: #6B3FA0; color: #FFFFFF; }
.env-banner.env-test { background: #9A3F1E; }

/* ------------------------------------------------------------------ v2: signed-out pages, nav additions */
body.no-nav { padding-bottom: 0; }
body.no-nav .toast { bottom: 16px; }
.top-settings.on { color: var(--accent); background: var(--green-soft); border-color: transparent; }
.flash.in-section { margin: 0; }

/* plain lists inside cards (household page) */
.plain-list { list-style: none; }
.plain-list > li + li { border-top: 1px solid var(--line-soft); }

/* settings: link to the household page */
.people-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.settings-grid .people-card h2 { margin-bottom: 2px; }
.people-card .btn svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ recipes list: ownership badges, community */
.rc-photo { position: relative; display: block; }
.rc-badges {
  position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px;
  pointer-events: none;
}
.rc-badges .chip { font-size: 11px; padding: 3px 8px; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.chip.rc-own { background: rgba(255, 255, 255, .94); color: #1B1A17; }

.switch-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; align-self: flex-start;
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.switch-link:hover { color: var(--ink); }
.switch {
  position: relative; width: 38px; height: 22px; border-radius: 11px; flex: none;
  background: var(--dashed); transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s;
}
.switch-link.on .switch { background: var(--accent); }
.switch-link.on .switch::after { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

.community { margin-top: 8px; }
.community-lead { margin: -4px 0 12px; }
.community-card .rc-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.community-card .rc-link:hover { color: inherit; }
.community-card .rc-link:hover .rc-title { text-decoration: underline; }
.rc-save { margin: 0; padding: 0 10px 10px; }
.rc-save .btn { font-size: 13px; padding: 0 10px; text-align: center; }
.rc-save .btn svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ recipe page: origin, sharing, reviews */
.recipe-origin { font-size: 14px; color: var(--muted); margin-top: -4px; }
.recipe-origin a { font-weight: 600; }
.rating-chip { gap: 2px; text-decoration: none; color: var(--ink-2); }
.rating-chip:hover { color: var(--ink); background: var(--line); }
.save-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0;
  padding: 12px 12px 12px 16px; background: var(--green-soft); color: var(--green-ink); border-radius: var(--radius-md);
}
.save-card .btn { flex: none; }
.share-card .chip { font-size: 13px; padding: 5px 12px; }
.share-card form { margin: 0; }

.reviews { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 80px; }
.reviews .card-head { flex-wrap: wrap; }
.rating-sum { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.stars { display: inline-flex; gap: 1px; font-size: 14px; line-height: 1; }
.stars .on { color: var(--star); }
.stars .off { color: var(--dashed); }
.review-list { list-style: none; display: flex; flex-direction: column; }
.review { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.review:first-child { border-top: 0; padding-top: 0; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.review-head .strong { font-weight: 600; }
.review-text { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.review-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); }
.review form { margin: 0; }
.review .btn.text.sm { padding: 0; align-self: flex-start; }
.review .btn svg { width: 16px; height: 16px; }

details.report > summary {
  display: inline-flex; align-items: center; min-height: 44px; list-style: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
details.report > summary::-webkit-details-marker { display: none; }
details.report > summary:hover, details.report[open] > summary { color: var(--ink); text-decoration: underline; }
details.report form { margin: 0 0 4px; }
.recipe-report { padding: 0 2px; }

.review-form { display: flex; flex-direction: column; gap: 12px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.star-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.star-pick legend { padding: 0; margin-bottom: 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.star-row { display: flex; gap: 2px; }
.star-row label {
  position: relative; width: 44px; height: 44px; margin: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 400; line-height: 1; color: var(--dashed); cursor: pointer;
}
.star-row input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.star-row label:hover span[aria-hidden] { color: var(--star); }
.star-row input:checked + span { color: var(--star); }
/* the stars before the chosen one (a rule of its own: browsers without :has() drop only this one) */
.star-row label:has(~ label input:checked) span[aria-hidden] { color: var(--star); }
.star-row input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ recipe form */
.copy-note { margin-bottom: 16px; }

/* ------------------------------------------------------------------ household */
.household-page { max-width: 980px; }
.household-grid { display: grid; gap: 16px; }
.invite-ready { border: 2px solid var(--accent); margin-bottom: 16px; }
.invite-ready h2 { display: flex; align-items: center; gap: 8px; }
.invite-ready h2 svg { color: var(--accent); width: 20px; height: 20px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font: 400 14px/1.3 ui-monospace, Consolas, "SF Mono", monospace; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; min-height: 56px; }
.member-row form { margin: 0; flex: none; }
.member-row b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.member-email { overflow-wrap: anywhere; }
.danger-card h2 { color: var(--danger); }
form.card { margin: 0; }
.danger-card .check-line { font-weight: 500; }
.bring-line { align-items: flex-start; font-weight: 400; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.bring-line input { margin-top: 2px; flex: none; }

/* join */
.narrow-card { max-width: 520px; margin: 4vh auto 0; }
.narrow-card .card { padding: 24px; gap: 14px; }
.narrow-card h1 { font-size: 26px; }
.narrow-card form { margin: 4px 0 0; }

/* privacy, and the signed-out card */
.prose { max-width: 70ch; display: flex; flex-direction: column; gap: 24px; margin: 4px 0 24px; }
.prose-head { display: flex; flex-direction: column; gap: 6px; }
.prose-head .lead { color: var(--muted); font-size: 16px; margin-top: 4px; }
.prose section { display: flex; flex-direction: column; gap: 8px; }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose p, .prose li { line-height: 1.55; }
.center-card { margin-top: 8vh; }

/* ------------------------------------------------------------------ admin */
.admin-page { max-width: 1100px; }
.admin-jump {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 4px; scrollbar-width: none;
}
.admin-jump::-webkit-scrollbar { display: none; }
.admin-jump a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 500; text-decoration: none;
}
.admin-jump a:hover { border-color: var(--dashed); color: var(--ink); }
.admin-jump .count {
  min-width: 20px; padding: 1px 6px; border-radius: 999px; text-align: center;
  background: var(--saffron-soft); color: var(--saffron-ink); font-size: 11px; font-weight: 700;
}
.admin-section { scroll-margin-top: 80px; }
.admin-section .section-title { margin-top: 28px; }
.admin-limits { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.mod-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.mod-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.mod-info .strong { font-weight: 600; }
.mod-quote {
  margin-top: 4px; padding: 8px 10px; font-size: 14px; background: var(--page);
  border-left: 3px solid var(--line); border-radius: 0 8px 8px 0;
}
.mod-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mod-actions form { margin: 0; }
.reject-form { flex: 1 1 260px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.data-table thead th {
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody th { font-weight: 600; min-width: 150px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .nowrap { white-space: nowrap; }
.cell-sub { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.id-cell {
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 400 12px/1.4 ui-monospace, Consolas, "SF Mono", monospace;
}

@media (min-width: 900px) {
  /* desktop top bar: the household name sits under "Signed in as", in small type */
  .who { display: flex; flex-direction: column; align-items: flex-end; max-width: 220px; line-height: 1.25; text-align: right; }
  .who-name, .who-hh { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .who-hh { font-size: 12px; color: var(--muted); text-decoration: none; }
  .who-hh:hover { color: var(--accent); text-decoration: underline; }

  .household-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .recipe-origin { font-size: 15px; }

  .admin-jump { flex-wrap: wrap; overflow: visible; margin: 0 0 8px; padding: 0; }
  .mod-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; }
  .mod-actions { flex: 0 1 auto; justify-content: flex-end; }
  .reject-form { flex: 0 1 320px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  /* eight nav items plus the name: tighten so the bar stays on one row */
  .topbar-in { padding: 0 16px; gap: 8px 16px; }
  .topnav a { padding: 10px; }
}

/* ------------------------------------------------------------------ takeout */
.takeout-page { display: flex; flex-direction: column; gap: 20px; }
.store-options { border: 0; padding: 0; margin: 0; max-height: 340px; overflow-y: auto; display: grid; gap: 2px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.store-option { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 8px; cursor: pointer; margin: 0; font-weight: 400; }
.store-option:hover { background: var(--soft); }
.store-option input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.store-option:has(input:checked) { background: var(--green-soft); font-weight: 600; }
.store-option .chip { flex: none; font-size: .75rem; }
.welcome-steps { max-width: 680px; margin: 0 auto; }
.welcome-steps h2 { display: flex; align-items: center; gap: 10px; }
.day-checks { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.day-check { position: relative; margin: 0; }
.day-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.day-check span {
  display: flex; align-items: center; justify-content: center; min-width: 56px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 14px;
}
.day-check input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day-check input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.place-card { padding: 0; }
.place-card > summary {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; cursor: pointer; list-style: none;
}
.place-card > summary::-webkit-details-marker { display: none; }
.place-card > summary svg { color: var(--muted); transition: transform .15s; }
.place-card[open] > summary svg { transform: rotate(180deg); }
.place-card .grow { display: flex; flex-direction: column; gap: 2px; }
.place-name { font-weight: 600; font-size: 16px; }
.place-emoji { font-size: 26px; line-height: 1; width: 40px; text-align: center; flex: none; }
.place-form { padding: 0 16px 8px; }
.place-remove { padding: 0 8px 8px; display: flex; justify-content: flex-end; }
.place-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.place-grid form { margin: 0; }
.place-btn { display: inline-flex; align-items: center; gap: 8px; }
.place-btn.on { background: var(--green-soft); border-color: var(--accent); color: var(--green-ink); font-weight: 600; }
.own-add { display: flex; align-items: flex-end; }
.order-table td.x { width: 48px; }
.takeout-card { border-color: var(--saffron-soft); }
.takeout-photo { display: flex; align-items: center; justify-content: center; background: var(--saffron-soft); }
.takeout-photo span { font-size: 44px; line-height: 1; }
.order-lines { margin: 2px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.4; color: var(--ink-2); flex: 1; }
/* Order gets its own full-width row so Change / Move / Remove always fit beside each other below it */
.takeout-card .day-actions { flex-wrap: wrap; row-gap: 4px; }
.order-btn { flex: 1 0 100%; justify-content: center; min-height: 44px; padding: 0 12px; gap: 4px; }
.order-btn svg { width: 14px; height: 14px; }
@media (max-width: 899px) {
  .order-table tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px; }
  .order-table td.p { grid-column: 1; }
  .order-table td.n { grid-column: 2; }
  .order-table td.x { grid-column: 3; }
}

/* ------------------------------------------------------------------ sides, desserts, drinks on a day */
.addons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 2px; }
.addon-chip {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-height: 32px; padding: 0 2px 0 10px;
  border-radius: 999px; background: var(--soft); font-size: 13px;
}
.addon-chip a { color: var(--ink); text-decoration: none; display: inline-flex; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addon-chip a:hover { text-decoration: underline; }
.addon-chip form { margin: 0; display: flex; }
.addon-x {
  width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.addon-x:hover { color: var(--danger); background: var(--surface); }
.addon-add {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1px dashed var(--dashed, var(--line)); background: transparent; color: var(--accent); font: 500 13px/1 var(--font-body); cursor: pointer;
}
.addon-add:hover { border-color: var(--accent); }
.addon-add svg { width: 14px; height: 14px; }
.day-card.is-empty .addons { margin-top: 6px; }
.check-cell { display: flex; flex-direction: column; justify-content: flex-end; }
.btn.text.sm-inline { min-height: 32px; padding: 0 4px; font-size: 13px; vertical-align: baseline; }
.takeout-photo .place-logo {
  width: 84px; height: 84px; border-radius: 20px; object-fit: cover; display: block; position: static;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.place-mark { width: 40px; height: 40px; border-radius: 10px; flex: none; object-fit: cover; }
.place-chip-logo { width: 24px; height: 24px; border-radius: 6px; flex: none; object-fit: cover; }

/* ------------------------------------------------------------------ Premium */
.billing-page { display: flex; flex-direction: column; gap: 20px; }
.plan-options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.plan-option { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.plan-price { font-size: 22px; font-weight: 700; }
.tier-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tick-list { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.upsell { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; }
.upsell p { flex: 1 1 240px; margin: 0; }
.inline-form { display: inline; margin: 0; }


/* ------------------------------------------------------------------ admin: standard library */
.library-filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; margin-bottom: 12px; }
.library-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.library-row { display: flex; gap: 14px; align-items: flex-start; }
.library-row.is-retired { opacity: .75; }
.library-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; flex: none; background: var(--soft); }
.library-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.library-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.inline-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.inline-controls form { margin: 0; }
.inline-controls select, .inline-controls input[type=text] { width: auto; min-width: 0; flex: 1 1 160px; }
.review-notes { margin: 0; padding-left: 18px; }
@media (max-width: 599px) {
  .library-row { flex-direction: column; }
  .library-thumb { width: 100%; height: 160px; }
}

/* ------------------------------------------------------------------ community */
.block { display: block; }
.seg-tabs a { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  color: var(--muted); font: 600 13px/1.2 var(--font-body); text-decoration: none; }
.seg-tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.community-page, .profile-page { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.hh-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--green-soft); color: var(--green-ink); font: 700 16px/1 var(--font-head); }
.hh-avatar.lg { width: 44px; height: 44px; font-size: 20px; }
.hh-avatar.xl { width: 64px; height: 64px; font-size: 28px; }
.me-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.post { display: flex; flex-direction: column; gap: 10px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-who { font-weight: 600; color: var(--ink); text-decoration: none; }
.post-who:hover { text-decoration: underline; }
.post-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--soft); }
.post-photo.sm { max-width: 320px; }
.post-title { font: 700 18px/1.25 var(--font-head); margin: 0; }
.post-title a { color: var(--ink); }
.post-caption { margin: 0; }
.reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.react { min-height: 36px; min-width: 44px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.react span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.react.on { background: var(--green-soft); border-color: var(--green-ink); }
.comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.comments li { padding: 8px 10px; background: var(--soft); border-radius: var(--radius-sm); }
.comments p { margin: 2px 0 0; }
.comment-who a { font-weight: 600; color: var(--ink); }
.comment-actions, .post-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.comment-form input { flex: 1; min-width: 0; }
details.report > summary { list-style: none; }
details.report > summary::-webkit-details-marker { display: none; }
details.report[open] form { margin-top: 6px; }
.btn.xs { min-height: 32px; padding: 0 6px; font-size: 13px; }
.board-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .board-grid { grid-template-columns: 1fr 1fr; } }
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.board li:first-child { border-top: 0; }
.board li.me { font-weight: 600; }
.board .rank { width: 24px; color: var(--muted); font-variant-numeric: tabular-nums; }
.find-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.profile-head h1 { margin: 0; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  background: var(--saffron-soft); color: var(--saffron-ink); font-size: 13px; font-weight: 600; }
.badge-chip.locked { background: var(--soft); color: var(--muted); font-weight: 500; }
.week-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.week-day { width: 96px; flex: none; color: var(--muted); font-size: 14px; }
.cook-form { margin-top: 8px; }
.cook-form > summary { list-style: none; display: inline-flex; }
.cook-form > summary::-webkit-details-marker { display: none; }
.cook-form[open] > summary { margin-bottom: 8px; }
.cook-form form { padding: 10px; background: var(--soft); border-radius: var(--radius-sm); }
.cooked-done { margin: 8px 0 0; display: inline-flex; align-items: center; gap: 6px; color: var(--green-ink); font-weight: 600; font-size: 14px; }

/* ------------------------------------------------------------------ header v2: 4 tabs + household menu */
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pts-pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px;
  background: var(--saffron-soft); color: var(--saffron-ink); font-weight: 700; font-size: 13px; text-decoration: none; }
.ask-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.ask-btn svg { color: var(--accent); }
.ask-btn[aria-current="page"] { background: var(--green-soft); border-color: transparent; }
.hh-menu { position: relative; }
.hh-menu > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px 4px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.hh-menu > summary::-webkit-details-marker { display: none; }
.hh-menu-who { display: flex; flex-direction: column; line-height: 1.15; max-width: 200px; }
.hh-menu-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-menu-pts { font-size: 12px; color: var(--saffron-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 240px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; }
.hh-menu-list a, .menu-list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.hh-menu-list a:hover { background: var(--soft); }
.hh-menu-list a[aria-current="page"] { background: var(--green-soft); color: var(--green-ink); }
.hh-menu-list a.danger, .menu-list a.danger { color: var(--danger); }
.more-page { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.menu-list { padding: 4px; display: flex; flex-direction: column; }
.menu-list a { min-height: 54px; border-bottom: 1px solid var(--line-soft); border-radius: 0; font-size: 16px; }
.menu-list a:last-child { border-bottom: 0; }
.menu-list a svg { color: var(--accent); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ------------------------------------------------------------------ plan v2: day cards + progress */
.day-top { display: flex; align-items: center; gap: 6px; }
.day-menu { margin-left: auto; position: relative; }
.day-menu > summary { list-style: none; width: 40px; height: 40px; margin: -8px -6px -8px 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; color: var(--ink-2); cursor: pointer; }
.day-menu > summary::-webkit-details-marker { display: none; }
.day-menu > summary:hover { background: var(--soft); }
.day-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; }
.day-menu-list form { margin: 0; display: flex; }
.day-menu-list button { flex: 1; text-align: left; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); font: 500 15px var(--font-body); cursor: pointer; }
.day-menu-list button:hover { background: var(--soft); }
.day-menu-list button.danger { color: var(--danger); }
.photo-chip { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.photo-chip.cooked { background: var(--green-ink); color: #FFFFFF; }
.photo-chip.tonight { background: #F2B035; color: #1B1A17; }
.day-card.is-today { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.day-reason { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.day-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cook-quick { flex: 1; margin: 0; display: flex; }
.cook-btn { flex: 1; justify-content: center; }
.day-foot .cook-form { margin: 0; flex: none; }
.day-foot .cook-form[open] { flex: 1 1 100%; order: 2; }
.cook-photo-btn { width: 44px; padding: 0; justify-content: center; }
.see-post { margin-left: auto; font-weight: 600; font-size: 14px; }
.day-foot .cooked-done { margin: 0; }
.progress-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 14px 0 4px; }
.progress-main { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.progress-main .meter { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.progress-main .meter span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.progress-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.progress-stats a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.progress-stats b { font: 700 22px/1.1 var(--font-head); }
.progress-stats span { font-size: 13px; color: var(--muted); }
@media (min-width: 900px) {
  .day-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
  .day-photo { height: 170px; }
}

/* menus inside cards must not be clipped; menu rows are left-aligned */
.day-card:has(details[open]) { overflow: visible; position: relative; z-index: 5; }
.day-menu-list button { display: flex; align-items: center; justify-content: flex-start; }
@media (min-width: 900px) { .ask-btn.desk-only { display: inline-flex !important; } }

/* feed: recipe photo when a post has none; comment box on one row */
.post-photo-wrap { position: relative; }
.photo-tag { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px;
  background: rgba(27, 26, 23, .72); color: #FFFFFF; font-size: 12px; font-weight: 600; }
.comment-form { flex-wrap: nowrap; }
/* phone: plan tools on one row; the cook button stays on one line */
@media (max-width: 899px) {
  .plan-tools { flex-wrap: nowrap; }
  .plan-tools .btn { min-height: 44px; padding: 0 12px; font-size: 14px; }
  .plan-tools .btn.primary { flex: 1; justify-content: center; }
  .plan-tools .all-plans-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cook-btn .cook-pts { display: none; }
}

/* ------------------------------------------------------------------ issues + Report a problem */
.narrow-page { max-width: 760px; }
.new-issue > summary { list-style: none; display: inline-flex; width: auto; }
.new-issue > summary::-webkit-details-marker { display: none; }
.new-issue[open] > summary { margin-bottom: 14px; }
.issue-list li + li { border-top: 1px solid var(--line-soft); }
.issue-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.issue-row:hover { background: var(--soft); }
.issue-num { font-weight: 700; color: var(--muted); min-width: 36px; }
.issue-body { white-space: pre-wrap; margin: 0; }
.issue-shot { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.issue-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.issue-history li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-left: 12px; border-left: 3px solid var(--line); }
.issue-history .issue-body { flex-basis: 100%; }
.seg-choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.seg-choice label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.row.wrap { flex-wrap: wrap; }

/* ------------------------------------------------------------------ area: prompt, picker, leaderboard chips */
.area-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.area-ask h2 { font-size: 17px; margin: 0 0 4px; }
.area-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.chip-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
.chip-tabs a[aria-current="page"] { background: var(--green-soft); border-color: transparent; color: var(--green-ink); font-weight: 600; }

/* ------------------------------------------------------------------ household photo, badge icons, week thumbnails */
img.hh-avatar { object-fit: cover; padding: 0; background: var(--soft); }
.photo-row { align-items: center; gap: 14px; }
.badge-chip svg { flex: none; }
.week-thumb { flex: none; width: 72px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--soft); }
.week-thumb.empty { background: transparent; }
@media (max-width: 599px) { .week-thumb { width: 56px; height: 42px; } }

/* ------------------------------------------------------------------ forums */
.forum-page { max-width: 900px; }
.cat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cat-card { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.cat-card:hover { border-color: var(--accent); }
.thread-list li + li { border-top: 1px solid var(--line-soft); }
.thread-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.thread-row:hover { background: var(--soft); }
.reply-count { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; flex: none; }
.thread-title { font-size: 24px; margin: 0; }
.forum-text { white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; }
.forum-photo { max-width: 100%; max-height: 520px; height: auto; border-radius: 10px; display: block; }
.recipe-ref { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; background: var(--surface); }
.recipe-ref img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex: none; background: var(--soft); }
a.recipe-ref:hover { border-color: var(--accent); }
.reply.is-helpful { border-color: var(--green-ink); }
.composer-extras > summary { list-style: none; display: inline-flex; }
.composer-extras > summary::-webkit-details-marker { display: none; }
.composer-extras[open] > summary { margin-bottom: 8px; }
.h3 { font-size: 17px; margin: 0; }

/* ------------------------------------------------------------------ shopping without Kroger: To buy -> In cart -> Ordered */
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; flex: none; }
.status-mark { color: var(--green-ink); }
.status-mark.cart { color: var(--saffron-ink); }
.shop-row.is-ordered .shop-name { color: var(--muted); text-decoration: line-through; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-row .section-title { margin: 0; }
@media (max-width: 599px) { .row-actions { flex-direction: column; align-items: stretch; } }

/* ------------------------------------------------------------------ public home page */
.welcome { max-width: 960px; margin: 0 auto; padding: 8vh 16px 40px; display: flex; flex-direction: column; gap: 32px; }
.welcome-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.welcome-hero h1 { font-size: clamp(36px, 7vw, 56px); margin: 0; }
.welcome-hero .lead { max-width: 560px; font-size: 18px; margin: 0; }
.welcome-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.welcome-grid .card { display: flex; flex-direction: column; gap: 8px; }
.welcome-grid svg { color: var(--accent); }
.welcome-grid h2 { font-size: 18px; margin: 0; }
.welcome-grid p { margin: 0; color: var(--ink-2); }
.welcome-foot { text-align: center; }
/* guides */
.guide-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.guide-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; }
.guide-card:hover { border-color: var(--accent); color: inherit; }
.gc-photo { display: block; aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.gc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-photo .rc-ph { aspect-ratio: auto; height: 100%; }
.gc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.gc-title { font-weight: 600; font-size: 16px; line-height: 1.3; }
.guide-page { max-width: 720px; margin: 0 auto; }
.guide-page h1 { margin: 0; }
.byline { display: flex; align-items: center; gap: 10px; }
.persona-dot { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex: none; background: var(--green-soft); color: var(--green-ink); }
.persona-dot.saffron { background: var(--saffron-soft); color: var(--saffron-ink); }
.persona-dot.soft { background: var(--soft); color: var(--ink-2); }
.fine-print { margin: 0; }
.persona-img { border-radius: 50%; object-fit: cover; flex: none; background: var(--soft); }
.avatar-options { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.avatar-options img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.persona-admin + .persona-admin { border-top: 1px solid var(--line); padding-top: 12px; }
.persona-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.persona-hero .persona-img, .persona-hero .persona-dot { width: 120px !important; height: 120px !important; font-size: 44px; }
.guide-body { font-size: 17px; line-height: 1.65; }
.guide-body h2 { margin: 28px 0 8px; font-size: 22px; }
.guide-body ul, .guide-body ol { padding-left: 22px; display: grid; gap: 6px; }
.guide-body table { border-collapse: collapse; width: 100%; font-size: 15px; }
.guide-body th, .guide-body td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.guide-body a { color: var(--accent); }
.author-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.author-list li { display: flex; align-items: center; gap: 10px; }
.guide-thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; }
/* public recipe cards without a photo: a colored tile the same shape as a photo */
.rc-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; width: 100%;
  background: var(--green-soft); color: var(--green-ink); }
.rc-ph svg { opacity: .7; }
.rc-ph-side { background: var(--soft); color: var(--ink-2); }
.rc-ph-dessert, .rc-ph-drink { background: var(--saffron-soft); color: var(--saffron-ink); }
/* public recipes index */
.pub-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px;
  padding: 8px 0 20px; }
.pub-hero h1 { margin: 0; max-width: 16em; }
.pub-hero .lead { margin: 0; max-width: 40em; }
.pub-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; }
.pub-filters .search-field { flex: 1 1 280px; max-width: 420px; }
.pub-filters > .filters { flex: 0 1 auto; }
.more-filters { flex: 1 1 100%; }
.more-filters:not([open]) { flex: 0 0 auto; }
.more-filters > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px;
  padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 500;
  font-size: 14px; list-style: none; }
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters[open] > summary { background: var(--green-soft); border-color: var(--accent); color: var(--green-ink); }
.more-filters > .stack { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); }
.mf-count { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 12px;
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.member-filters { flex-wrap: wrap; }
.more-filters p.xs { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.pub-foot { margin-top: 24px; }
.tool-admin-photo { width: 100%; max-width: 360px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.tool-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tool-tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; }
.tool-tile:hover { border-color: var(--accent); }
.tool-tile .tt-photo { aspect-ratio: 4 / 3; background: var(--soft); display: block; }
.tool-tile .tt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-tile .tt-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.tool-tile .tt-name { font-weight: 600; }
.tool-hero { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); display: block; }
.tool-page { max-width: 820px; margin: 0 auto; }
.tool-page .look-for { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.tool-pick-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tool-pick-cards .card { display: flex; flex-direction: column; gap: 6px; }
.tool-pick-cards .card .btn { margin-top: auto; }
.welcome-hero .row.center { justify-content: center; }
.visitor-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.visitor-nav a:not(.btn) { padding: 10px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 14px;
  text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.visitor-nav a:not(.btn):hover { background: var(--soft); color: var(--ink); }
.visitor-nav a[aria-current="page"] { background: var(--green-soft); color: var(--green-ink); font-weight: 600; }
@media (max-width: 420px) { .visitor-nav a:not(.btn) { padding: 10px 8px; font-size: 13px; } }

/* ------------------------------------------------------------------ sign in */
.signin-card h1 { font-size: 26px; margin: 0; text-align: center; }
.signin-card > p { text-align: center; margin: 0; }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.code-input { font-size: 26px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.signin-again { justify-content: center; }

/* ------------------------------------------------------------------ printing: black and white, no photos or controls */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  :root, body { background: #fff !important; color-scheme: light; }
  *, *::before, *::after { color: #000 !important; background: transparent !important; box-shadow: none !important;
    text-shadow: none !important; }
  body { font-size: 11pt; line-height: 1.35; padding: 0 !important; }
  .print-only { display: block !important; }
  .env-banner, .topbar, .tabbar, .toast, .flash, dialog, .no-print, .back-link, .hero, img, video,
  button, .btn, .stepper, .row-actions, .row-action, .find-link, form, .kroger-card, .fold > summary svg,
  .composer-extras, .report, .upsell, .prod-line, .chip-tabs, .seg-tabs, .shop-recipes, .prep-intro { display: none !important; }
  main, .shop-page, .prep-page, .recipe-sheet, .recipe-page { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  h1 { font-size: 20pt; margin: 0 0 4pt; }
  h2, .section-title { font-size: 12pt; margin: 12pt 0 4pt; break-after: avoid; }
  a { text-decoration: none !important; }
  .card, .list-card { border: 0 !important; padding: 0 !important; border-radius: 0 !important; }
  .list-card > li, .shop-row, .prep-task, .prep-dinner { border-color: #bbb !important; break-inside: avoid; padding: 3pt 0 !important; min-height: 0 !important; }
  .chip { border: 1px solid #999 !important; padding: 0 4pt !important; }
  /* tick boxes to fill in by hand */
  .check-hit { display: none !important; }
  .shop-row { display: flex !important; gap: 8pt; align-items: flex-start; }
  .shop-row::before, .prep-task::before { content: "\2610"; font-size: 13pt; line-height: 1; flex: none; }
  .shop-row.is-ordered::before, .shop-row.is-cart::before { content: "\2611"; }
  .prep-task input { display: none !important; }
  .fold:not([open]) > .fold-body { display: block !important; }
  details > summary { list-style: none; }
}

/* ------------------------------------------------------------------ send a recipe; inbox */
.send-list li + li { border-top: 1px solid var(--line-soft); }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; }
.send-row input[type=text] { flex: 1 1 200px; min-width: 0; }
.inbox-item blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--line); }
.blocked-row { padding: 10px 14px; align-items: center; }
.hh-menu-list .count, .menu-list .count { margin-left: auto; background: var(--saffron-soft); color: var(--saffron-ink);
  border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }

/* ------------------------------------------------------------------ takeout near you */
.takeout-map { width: 100%; height: 360px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.nearby-list { list-style: none; margin: 0; padding: 0; }
.nearby-list:empty { display: none; }
.nearby-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.nearby-row + .nearby-row { border-top: 1px solid var(--line-soft); }
.nearby-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green-ink);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.nearby-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nearby-links form { margin: 0; }
.map-pop { padding: 8px 10px; font-weight: 600; color: #1B1A17; }

.apple-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #000; color: #fff; border-color: #000; }
.apple-btn:hover { background: #222; color: #fff; }

/* ------------------------------------------------------------------ party days */
.party-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; padding: 8px 10px;
  border-radius: 12px; background: var(--saffron-soft); }
.party-strip .party-name { font-weight: 700; color: var(--saffron-ink); }
.party-strip .btn { margin-left: auto; }
.party-form { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; }

/* ------------------------------------------------------------------ saved store products */
.pick-save > summary { list-style: none; }
.pick-save > summary::-webkit-details-marker { display: none; }
.pick-save[open] { flex-basis: 100%; }
.pick-save form { margin-top: 6px; }

/* ------------------------------------------------------------------ shop item by item */
.walk { max-width: 560px; margin: 0 auto; }
.walk .page-head { margin-bottom: 8px; }
.walk-progress { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.walk-progress .meter { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.walk-progress .meter span { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width .2s; }
.walk-card { display: flex; flex-direction: column; gap: 12px; }
.walk-card h1 { margin: 0; font-size: 26px; overflow-wrap: anywhere; }
.walk-card h1:focus { outline: none; }
.walk-card p { margin: 0; }
.walk-need { font-size: 17px; font-weight: 600; }
.walk-card > .btn.text { align-self: flex-start; }
.walk-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }
.walk-actions form { margin: 0; }
@media (min-width: 520px) { .walk-actions { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.walk-paste > summary { list-style: none; }
.walk-paste > summary::-webkit-details-marker { display: none; }
.walk-paste form { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .walk-progress .meter span { transition: none; } }

.left-note { display: block; color: var(--green-ink); }
.use-soon { margin-bottom: 16px; }
.use-soon-row { padding: 8px 14px; align-items: center; }

/* ------------------------------------------------------------------ Community v2: feed + sidebar */
.community-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; max-width: 1280px; }
.community-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.community-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 18px; }
.community-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.community-head h1 { margin: 0; }
.community-lead { margin: -8px 0 0; }
.side-card { display: flex; flex-direction: column; gap: 10px; }
.side-card h2 { font-size: 18px; margin: 0; }
.side-head { display: flex; align-items: baseline; gap: 8px; }
.side-head a { margin-left: auto; font-size: 13px; font-weight: 600; }
.side-name { font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; }
.me-row { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.suggest-row { display: flex; align-items: center; gap: 10px; }
.suggest-row a { color: var(--ink); text-decoration: none; font-weight: 500; }
.thread-link { color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.35; }
.thread-link:hover { color: var(--accent); }
.post { border-radius: 20px; overflow: hidden; }
.post .post-photo { max-height: 420px; object-fit: cover; width: 100%; }
@media (max-width: 899px) { .community-side { order: -1; } .community-side .side-card:not(:first-child) { display: none; } }

/* flash messages: close button and fade-out */
.flash { position: relative; padding-right: 44px; transition: opacity .5s ease; }
.flash.fading { opacity: 0; }
.flash-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.flash-x:hover { background: rgba(0, 0, 0, .06); }

/* ------------------------------------------------------------------ sheet picker: search, filters, groups */
.picker { display: flex; flex-direction: column; gap: 10px; }
.picker-tools { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 4px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.picker-tools input[type=search] { width: 100%; }
.picker-group { border: 1px solid var(--line); border-radius: 14px; }
.picker-group > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; cursor: pointer; font-weight: 600; }
.picker-group > summary::-webkit-details-marker { display: none; }
.picker-group > summary svg { margin-left: auto; transition: transform .15s; }
.picker-group[open] > summary svg { transform: rotate(180deg); }
.picker-count { font-weight: 500; color: var(--muted); font-size: 13px; background: var(--soft); border-radius: 999px; padding: 1px 8px; }
.picker-list { padding: 0 8px 8px; gap: 6px; }
.picker-list .alt-row { padding: 6px; border-radius: 12px; }
.picker-list .alt-row img { width: 48px; height: 48px; border-radius: 10px; }
.picker-empty { padding: 0 14px 12px; margin: 0; }
.chip-btn[aria-pressed='true'] { background: var(--green-soft); border-color: transparent; color: var(--green-ink); }

.plan-price .was { color: var(--muted); font-weight: 500; font-size: 18px; }
.plan-price .per { font-size: 15px; font-weight: 500; color: var(--muted); }

/* ------------------------------------------------------------------ admin: photo review */
.photo-job { align-items: center; gap: 10px; }
.photo-review { display: flex; flex-direction: column; gap: 10px; }
.photo-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.photo-pair figure { margin: 0; }
.photo-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--soft); display: block; }

.seg-tabs a .muted { margin-left: 6px; font-weight: 500; }

/* ------------------------------------------------------------------ kitchen tools */
.tools-row { margin-top: 16px; }
.tools-row .h-small { font-size: 14px; margin: 0 0 6px; }
.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
a.tool-chip { text-decoration: none; }
a.tool-chip:hover { border-color: var(--accent); color: var(--accent); }
a.tool-link { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 2px; }
.tool-picks { border: 0; margin: 0; padding: 0; }
.tool-picks legend { font-weight: 600; padding: 0; }
.tool-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.tool-group > span { flex-basis: 100%; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; }
.check-chip:has(input:checked) { border-color: var(--accent); background: var(--green-soft); }
.tools-page .tool-card { scroll-margin-top: 80px; }
.tools-page .tool-card:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-picks-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tool-pick { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.tool-pick .tier { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tool-pick .btn { align-self: flex-start; margin-top: 4px; }
.tool-nav { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------------ public recipes (visitors) */
.public-recipe .hero.no-photo { min-height: 72px; background: var(--green-soft); }
.public-recipe .recipe-sheet > section { margin-top: 18px; }
.public-recipe .recipe-sheet h2 { font-size: 20px; margin: 0 0 8px; }
.public-cta { margin: 16px 0; display: flex; flex-direction: column; gap: 6px; background: var(--green-soft); border-color: transparent; }
.public-cta p { margin: 0; }
