:root {
  --bg: #fbf6ee; --surface: #ffffff; --surface-2: #f4ece0; --text: #2a2118; --muted: #6e6255; --line: #e6dccd;
  --primary: #1d6b45; --primary-ink: #ffffff; --primary-soft: #e3f1e8; --accent: #c7441f; --accent-soft: #fbe6de;
  --ok: #1d6b45; --ok-soft: #e3f1e8; --warn: #8a5a00; --warn-soft: #fff1cf; --bad: #b3261e; --bad-soft: #fde6e4;
  --info: #1f4f7a; --info-soft: #e2eef8; --staple: #5b3f8c; --staple-soft: #eee6f8;
  --radius: 14px; --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 4px 14px rgba(60, 40, 10, .06);
  --nav-h: 64px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130e; --surface: #221c15; --surface-2: #2c251c; --text: #f3ece2; --muted: #b9ab98; --line: #3a3127;
    --primary: #3fae74; --primary-ink: #0d1f15; --primary-soft: #1d3326; --accent: #ef7650; --accent-soft: #3a2219;
    --ok: #5cc68d; --ok-soft: #1d3326; --warn: #f0c048; --warn-soft: #3a2f12; --bad: #ff8a80; --bad-soft: #3d1d1a;
    --info: #8cc3f0; --info-soft: #1a2c3d; --staple: #c7a8f5; --staple-soft: #2c2140; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}
body.no-scroll { overflow: hidden; }
a { color: var(--primary); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2em 0 .3em; }
h2 { font-size: 1.15rem; margin: .2em 0 .5em; }
h3 { font-size: 1rem; margin: .2em 0; }
small { color: var(--muted); }
code { background: var(--surface-2); padding: 0 .3em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--primary-ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px; }
.brand { font-weight: 800; text-decoration: none; color: var(--text); font-size: 1.05rem; }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px; outline: none; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; min-height: 44px; }
.bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active svg { stroke-width: 2.4; }

.hero { padding: 8px 0 4px; }
.hello { margin: 0; color: var(--muted); font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 .8em; }
.page-head { margin-bottom: 8px; }
.section-title { margin-top: 1.4em; }
.sub-title { margin-top: 1em; font-size: 1rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .3em 0; }
.hint.block, .block { display: block; }
.center { text-align: center; }
.muted-text { color: var(--muted); }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); } .bad-text, .danger-text { color: var(--bad) !important; }
.staple-text { color: var(--staple); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 12px 0; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; }
.ok-border { border-left: 5px solid var(--ok); } .bad-border { border-left: 5px solid var(--accent); }
.notice { background: var(--warn-soft); }
.tip { background: var(--info-soft); } .safety { background: var(--warn-soft); }

.row { display: flex; } .between { justify-content: space-between; } .center.row, .row.center { align-items: center; }
.row.center { justify-content: center; } .row.between.center { justify-content: space-between; }
.gap { gap: 8px; } .wrap { flex-wrap: wrap; } .end { justify-content: flex-end; } .grow { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--primary); background: var(--surface); color: var(--primary); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: .9rem; }
.btn.big { width: 100%; min-height: 56px; font-size: 1.1rem; margin: 8px 0 4px; }
.btn.full { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { min-width: 40px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; cursor: pointer; }
.link { font-weight: 700; text-decoration: none; }
.link-btn { background: none; border: 0; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; padding: 4px 0; text-decoration: underline; }
.file-btn { position: relative; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip { white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .85rem; text-decoration: none; border: 1px solid transparent; }
a.chip { min-height: 36px; display: inline-flex; align-items: center; }
.chip.active { background: var(--primary); color: var(--primary-ink); }

.badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.staple { background: var(--staple-soft); color: var(--staple); }
.tag { font-size: .7rem; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }

.alert { padding: 10px 12px; border-radius: 10px; margin: 10px 0; font-size: .92rem; }
.alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); color: var(--info); }
.error { color: var(--bad); font-size: .9rem; margin: 4px 0; }

.kitchen-overview .big-number { font-size: 2rem; font-weight: 800; margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tiles.two { margin-top: 14px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px; min-height: 96px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.tile strong { font-size: .98rem; line-height: 1.25; }
.tile small { font-size: .8rem; }
.tile-emoji { font-size: 1.6rem; }
.tile.accent { background: var(--primary-soft); border-color: transparent; }
@media (min-width: 520px) { .tiles { grid-template-columns: repeat(3, 1fr); } }

.cards { display: grid; gap: 10px; }
.recipe-card { padding: 0; overflow: hidden; margin: 0; }
.recipe-link { display: flex; gap: 12px; padding: 10px; text-decoration: none; color: var(--text); }
.rc-body { min-width: 0; flex: 1; }
.rc-body h3 { font-size: 1rem; }
.meta { color: var(--muted); font-size: .85rem; margin: 2px 0; }
.add-missing { margin: 0 10px 10px; }
.art { position: relative; overflow: hidden; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff; }
.art span { filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-xs { width: 34px; height: 34px; font-size: 1.1rem; border-radius: 8px; }
.art-tile { width: 100%; height: 86px; font-size: 2.2rem; border-radius: 10px 10px 0 0; }
.art-sm { width: 64px; height: 64px; font-size: 2rem; }
.art-md { width: 84px; height: 84px; font-size: 2.6rem; }
.art-lg { width: 100%; height: 170px; font-size: 5rem; border-radius: var(--radius); }

.servings-bar { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 6px 0; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }

.empty { text-align: center; padding: 28px 12px; }
.empty-icon { font-size: 3rem; }
.empty p { color: var(--muted); max-width: 420px; margin: 6px auto 14px; }
.loading { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 24px; color: var(--muted); }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } * { scroll-behavior: auto !important; } }

/* forms */
label { display: block; font-weight: 600; font-size: .92rem; margin: 10px 0 4px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; min-height: 40px; margin: 4px 0; }
label.check.inline { display: inline-flex; margin-right: 12px; }
label.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
input:not([type=checkbox]):not([type=file]), select, textarea {
  display: block; width: 100%; margin-top: 4px; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px;
}
input[aria-invalid=true] { border-color: var(--bad); }
textarea { min-height: 110px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 12px; margin: 10px 0; min-width: 0; }
legend { font-weight: 700; padding: 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
legend label { margin: 0; display: inline-flex; gap: 8px; align-items: center; }
.label { margin-top: 0; }

/* kitchen */
.search-results { list-style: none; margin: 6px 0; padding: 0; }
.search-results .result { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); font: inherit; margin: 4px 0; cursor: pointer; }
.search-results .result small { display: block; }
.search-results .result.custom { background: transparent; border-style: dashed; color: var(--primary); font-weight: 700; }
.group-title { font-size: 1rem; margin: 18px 0 6px; }
.inv-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.inv-row { border-bottom: 1px solid var(--line); }
.inv-row:last-child { border-bottom: 0; }
.finished .inv-row { padding: 8px 12px; }
.inv-btn { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name qty" "badges badges"; gap: 0 8px; width: 100%; padding: 12px; text-align: left; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; min-height: 52px; }
.inv-name { grid-area: name; font-weight: 600; }
.inv-qty { grid-area: qty; color: var(--muted); font-size: .92rem; }
.inv-btn .badges { grid-area: badges; margin: 0; }
.photo-pick { display: block; margin: 12px 0; }
.photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-pick:focus-within .btn { outline: 3px solid var(--accent); }
.photo-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.review-row.low { border-color: var(--warn); }

/* recipe */
.back { display: inline-block; margin: 4px 0 8px; font-weight: 700; text-decoration: none; }
.recipe-hero { margin-bottom: 8px; }
.times { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 12px 0; }
.times div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.times dt { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.times dd { margin: 0; }
.actions { margin: 8px 0; }
.ing-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ing-line { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ing-line:last-child { border-bottom: 0; }
.ing-line.optional { opacity: .85; }
.st { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.st.ok { background: var(--ok-soft); color: var(--ok); } .st.warn { background: var(--warn-soft); color: var(--warn); }
.st.bad { background: var(--bad-soft); color: var(--bad); } .st.staple { background: var(--staple-soft); color: var(--staple); }
.st.muted { background: var(--surface-2); color: var(--muted); }
.ing-main { min-width: 0; }
.qty { color: var(--muted); }
.ing-sub { font-size: .85rem; }
.ok-text.ing-sub, .ing-sub.ok-text { color: var(--ok); }
.missing-box { border-left: 5px solid var(--accent); }
.steps { list-style: none; padding: 0; margin: 0; }
.step { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius); margin: 6px 0; background: var(--surface); border: 1px solid var(--line); }
.step.current { border: 2px solid var(--primary); background: var(--primary-soft); }
.step.done p:first-child { color: var(--muted); }
.step-btn { background: none; border: 0; padding: 0; cursor: pointer; }
.step-no { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); font-weight: 800; color: var(--text); }
.step.current .step-no { background: var(--primary); color: var(--primary-ink); }
.step.done .step-no { background: var(--ok-soft); color: var(--ok); }
.step-body p { margin: 0 0 4px; font-size: 1.05rem; }
.step-body .step-meta { font-size: .82rem; color: var(--muted); }
.step-section h3 { margin: 16px 0 4px; color: var(--accent); }
.step-nav { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); justify-content: space-between; background: var(--bg); padding: 8px 0; }
.step-nav .btn { flex: 1; }
.video-frame { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.video-frame video, .video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-status { position: absolute; left: 8px; right: 8px; bottom: 8px; color: #fff; font-size: .85rem; text-shadow: 0 1px 2px #000; pointer-events: none; }
.video-status .bad-text { background: rgba(0,0,0,.7); padding: 4px 8px; border-radius: 6px; color: #ffb4ab !important; pointer-events: auto; }
.video-placeholder { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; background: var(--surface-2); }
.vp-icon { font-size: 2.4rem; }

/* planner */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tab { padding: 10px 12px; white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.day h3 { font-size: 1.05rem; }
.slot { border-top: 1px solid var(--line); padding: 8px 0; }
.slot h4 { margin: 4px 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.plan-item { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 2px 8px; align-items: center; padding: 6px 0; }
.plan-item .role { font-size: .75rem; color: var(--muted); font-weight: 700; }
.plan-item .plan-name { font-weight: 600; text-decoration: none; }
.plan-item .plan-meta, .plan-item .badge, .plan-item .hint { grid-column: 2; }
.plan-item .icon-btn { grid-row: 1; }
.plan-item .icon-btn:nth-of-type(1) { grid-column: 3; } .plan-item .icon-btn:nth-of-type(2) { grid-column: 4; }
.plan-meta { font-size: .8rem; color: var(--muted); }
.shop-preview li { padding: 3px 0; }
.saved-list { list-style: none; padding: 0; }

/* shopping */
.shop-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.shop-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.shop-row:last-child { border-bottom: 0; }
.shop-row.done .shop-main strong { text-decoration: line-through; color: var(--muted); }
.shop-check input { width: 26px; height: 26px; accent-color: var(--primary); }
.shop-main { flex: 1; min-width: 0; }

ul.plain { padding-left: 18px; margin: 6px 0; }
.status-list li { margin: 6px 0; }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 12, 4, .45); }
.sheet { position: relative; width: 100%; max-width: 640px; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 18px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sheet-body { padding: 8px 16px 16px; overflow-y: auto; }
.sticky-actions { position: sticky; bottom: -16px; background: var(--bg); padding: 12px 0; margin-top: 8px; border-top: 1px solid var(--line); }
.confirm-msg { margin: 12px 0 18px; }

/* hero + right-now */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img { border-radius: 8px; box-shadow: 0 2px 6px rgba(217, 58, 29, .3); }
.brand { letter-spacing: -.01em; }
.hl { color: var(--accent); }
.hero { display: flex; align-items: center; gap: 8px; }
.hero-text { flex: 1; min-width: 0; }
.hero-plate { width: 150px; height: auto; flex: none; }
@media (max-width: 360px) { .hero-plate { width: 108px; } }
.count-line { margin: 4px 0 10px; font-size: 1.02rem; }
.count-line strong { font-size: 1.6rem; color: var(--primary); margin-right: 2px; }
.count-line .muted-text { font-size: .9rem; }

/* meals grouped by item ("With rice") + compact meal rows */
.main-group { margin: 14px 0 6px; }
.main-group-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1rem; }
.main-group-title img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.main-group-title small { margin-left: auto; font-weight: 600; font-size: .78rem; color: var(--muted); text-align: right; }
.meal-list { display: grid; gap: 8px; }
.meal-row { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.meal-row .recipe-link { flex: 1; min-width: 0; align-items: center; padding: 8px 6px 8px 8px; }
.meal-row .art-sm { width: 56px; height: 56px; border-radius: 12px; }
.meal-row h3 { margin: 0 0 2px; font-size: .98rem; line-height: 1.25; }
.meal-row .meta { margin: 0; font-size: .84rem; }
.meal-row .ok-text { font-weight: 700; }
.meal-row.is-ready { border-left: 4px solid var(--ok); }
.meal-row.is-shop { border-left: 4px solid var(--accent); }
.buy-line { margin: 4px 0 0; font-size: .86rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.buy-tag { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; margin-right: 2px; }
.cart-btn { flex: none; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 60px; min-height: 56px;
  border: 0; border-left: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; transition: background .15s, transform .1s; }
.cart-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-btn:hover { background: var(--accent); color: #fff; }
.cart-btn:active { transform: scale(.94); }
.cart-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.cart-btn.added { background: var(--ok-soft); color: var(--ok); }
.cart-btn.added:hover { background: var(--ok-soft); color: var(--ok); }
.cook-bar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius); background: var(--primary); color: var(--primary-ink); text-decoration: none; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.cook-bar b { font-size: .9rem; }
.jump { margin: 4px 0 8px; }
/* prices */
.price-box { display: inline-flex !important; align-items: center; gap: 2px; flex: 0 0 auto; width: auto !important; border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; background: var(--surface); margin: 0 !important; }
.price-box span { color: var(--muted); font-weight: 700; }
.price-input { width: 64px !important; min-width: 0; flex: none; border: 0 !important; padding: 8px 2px !important; margin: 0 !important; background: transparent; font: inherit; min-height: 40px; box-shadow: none !important; }
.total-card { display: flex; flex-direction: column; gap: 2px; background: var(--primary-soft); border-color: transparent; }
.total-card small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.total-card strong { font-size: 1.6rem; color: var(--primary); }
.total-card p { margin: 0; }
.plan-cost { margin: 4px 0 8px; font-size: 1.05rem; color: var(--primary); }
.price-tag { font-weight: 700; color: var(--primary); margin-left: 4px; }
.trip { border-top: 1px solid var(--line); padding: 6px 0; }
.trip > summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; min-height: 40px; align-items: center; }
.trip ul { margin: 6px 0; }
/* family sharing */
.family-card h2 small { font-weight: 500; font-size: .8rem; }
.family-code strong { font-size: 1.3rem; letter-spacing: .12em; color: var(--primary); }
.reader-ask, .reader-found { margin: 10px 0; padding: 12px; border-radius: 12px; background: var(--primary-soft); }
.reader-ask p, .reader-found p { margin: 0 0 6px; }
.reader-status { margin: 8px 0 4px; font-weight: 600; }
.reader-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 8px; }
.reader-bar span { display: block; height: 100%; background: var(--primary); transition: width .2s; }
/* install the app */
.install-card { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 10px 12px; border-radius: var(--radius); background: var(--primary-soft); }
.install-card img { border-radius: 10px; flex: none; }
.install-card div { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.3; }
.install-card small { color: var(--muted); }
.install-close { flex: none; }
.install-sheet { text-align: center; }
.install-sheet img { border-radius: 14px; margin: 4px auto 8px; display: block; }
.install-steps { list-style: none; padding: 0; margin: 8px 0; text-align: left; }
.install-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.install-steps li svg { vertical-align: middle; }
.ios-add { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 5px; font-weight: 800; font-size: .85rem; }
/* step-by-step pictures */
.step-guide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.sg-stage { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; }
.sg-photo { width: 100%; height: 100%; object-fit: cover; display: block; animation: sg-in .45s ease; }
@keyframes sg-in { from { opacity: 0; } to { opacity: 1; } }
.sg-badge, .sg-time { position: absolute; top: 8px; padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .82rem; color: #fff; }
.sg-badge { left: 8px; background: var(--accent); }
.sg-badge.done { background: var(--primary); }
.sg-time { right: 8px; background: rgba(0, 0, 0, .6); }
.sg-section { margin: 8px 0 0; color: var(--accent); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.sg-text { font-size: 1.15rem; line-height: 1.4; font-weight: 600; margin: 8px 0; min-height: 3.2em; }
.sg-ings { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sg-ing { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; font-weight: 600; }
.sg-ing:not(:has(img)) { padding-left: 10px; }
.sg-ing img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.sg-bar { display: flex; gap: 3px; margin: 6px 0; }
.sg-bar span { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-2); }
.sg-bar span.done { background: var(--primary); }
.sg-bar span.on { background: var(--accent); }
.sg-controls { display: flex; align-items: center; justify-content: center; gap: 10px; }
.no-video { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: .92rem; }
.watch-btn small { font-weight: 600; opacity: .85; }
.video-section { margin: 10px 0 4px; }
/* my recipes */
.planner-icon { font-size: 1.6rem; }
.my-item .recipe-card { margin-bottom: 4px; }
.my-actions { margin: 0 0 12px; }
.photo-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.photo-pick img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.recipe-form textarea { width: 100%; }
.plan-from { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--primary-soft); font-size: .9rem; }
.buy-line.block { display: block; }
.jump .chip small { opacity: .7; margin-left: 2px; }

/* tap what you have */
.quick-pick { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; background: var(--surface); }
.quick-pick > summary { cursor: pointer; padding: 12px 0; min-height: 44px; }
.quick-pick > summary small { color: var(--muted); margin-left: 4px; }
.qp-group h4 { margin: 8px 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.qp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.qp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.qp-chip:not(:has(img)) { padding-left: 12px; }
.qp-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.qp-chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 700; }
.qp-chip.on:disabled { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary); cursor: default; }
.listening { text-align: center; padding: 16px 0; }
.listening .mic { font-size: 3rem; display: inline-block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }


/* add box + confirm lists */
.add-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.search-results .result { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.search-results .result.have { opacity: .6; cursor: default; }
.result-act { flex: none; font-weight: 800; color: var(--primary); }
.confirm-list { list-style: none; padding: 0; margin: 8px 0; }
.confirm-row { border-bottom: 1px solid var(--line); padding: 4px 0 8px; }
.confirm-row select { margin: 0 0 4px 32px; width: calc(100% - 32px); }
.confirm-row.low label strong { color: var(--warn); }
.inv-row.has-delete .inv-name { flex: 1; padding: 12px; font-weight: 600; }
.need-buy { margin: 6px 0; }

/* home steps */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-step { position: relative; }
.step-label { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.muted-step { opacity: .75; }
.home-step .search-box { box-shadow: none; background: var(--surface-2); border: 0; margin: 10px 0; }
.label-small { font-size: .85rem; color: var(--muted); margin: 14px 0 0; text-transform: uppercase; letter-spacing: .04em; }
.cat-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.cat-count { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: .82rem; }
.item-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.item-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); overflow: hidden; }
.chip-main { border: 0; background: none; padding: 6px 4px 6px 12px; font: inherit; font-size: .88rem; color: var(--text); cursor: pointer; min-height: 38px; }
.chip-main small { color: var(--muted); }
.chip-del { border: 0; border-left: 1px solid var(--line); background: none; color: var(--bad); padding: 0 10px; font-size: .9rem; cursor: pointer; min-width: 38px; }
.chip-del:hover, .del-btn:hover { background: var(--bad-soft); }
.empty.small { padding: 12px; }
.meal-tiles { margin-top: 8px; }
.photo-tile { padding: 0; min-height: 0; overflow: hidden; gap: 0; }
.photo-tile .tile-text { padding: 8px 10px 10px; display: flex; flex-direction: column; }
.photo-tile.active { outline: 3px solid var(--primary); }
.wish-form { align-items: flex-end; margin: 10px 0; }
.wish-form input { margin-top: 0; flex: 1; }
.wish-result .need-buy { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.wish-result .need-buy h4 { margin: 0 0 4px; }
.ok-alert { background: var(--ok-soft); color: var(--ok); }
.planner-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); background: var(--primary-soft); border-color: transparent; }
.planner-icon { color: var(--primary); }
.plan-option { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); min-height: 76px; }
.plan-option-icon { flex: none; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 800; font-size: 1.2rem; }
.week-group { margin: 10px 0; }
.week-group > summary { cursor: pointer; font-weight: 800; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 44px; }
.week-group > summary small { font-weight: 500; margin-left: 6px; }
.plan-item .plan-name { display: inline-flex; align-items: center; gap: 8px; }
.inv-row.has-delete { display: flex; align-items: center; }
.inv-row.has-delete .inv-btn { flex: 1; }
.del-btn { margin-right: 10px; color: var(--bad); flex: none; }
.group-title { display: flex; align-items: center; gap: 8px; }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 56px); transform: translateX(-50%) translateY(-16px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 560px); width: max-content; background: #2a2118; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; display: flex; gap: 12px; align-items: center; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.toast.ok { background: #14532d; } .toast.error { background: #8c1d18; }
.toast-btn { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; cursor: pointer; }
