:root {
  --bg: #eaf4e6;
  --bg-deep: #d9ecd3;
  --card: #ffffff;
  --ink: #17301f;
  --muted: #5a6f60;
  --line: #d3e4cd;
  --green: #1f6b3a;
  --green-d: #154d2a;
  --green-l: #2f9a55;
  --mint: #dff0d9;
  --warm: #e07b1f;
  --warm-bg: #fdf0e0;
  --red: #b3402f;
  --shadow: 0 1px 2px rgba(23, 48, 31, .06), 0 6px 18px rgba(23, 48, 31, .07);
  --r: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-deep); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; }
body.locked { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: left; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin: 0; }
.ic { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: 92px; box-shadow: 0 0 40px rgba(23, 48, 31, .12); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(234, 244, 230, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { border-radius: 10px; }
.brand b { display: block; font-family: var(--serif); font-size: 19px; line-height: 1.1; color: var(--green-d); }
.brand small { display: block; font-size: 11.5px; color: var(--muted); }
.top-r { display: flex; align-items: center; gap: 8px; }
.plan-b { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.plan-b.plus { background: var(--warm); border-color: var(--warm); color: #fff; }
.top-btn { display: flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 700; color: var(--green-d); }

/* ---------- shared ---------- */
.pad { padding: 18px 16px 8px; }
.page-h { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--green-d); }
.page-s { color: var(--muted); margin: 6px 0 16px; }
.sec { padding: 22px 16px 0; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec-h h2 { font-family: var(--serif); font-size: 22px; color: var(--green-d); line-height: 1.15; }
.sec-h p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.note { color: var(--muted); font-size: 14.5px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); padding: 14px; }
.fine { font-size: 12.5px; color: var(--muted); margin: 18px 16px 6px; }
.sheet .fine, .box .fine { margin: 10px 0 0; }
.err { color: var(--red); font-size: 14px; font-weight: 600; margin-top: 8px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-l); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; background: var(--green); color: #fff; font-weight: 700; text-align: center; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.98); background: var(--green-d); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 15px; }
.btn.outline { background: var(--card); color: var(--green-d); border: 1.5px solid var(--green); }
.btn.outline.danger { color: var(--red); border-color: var(--red); }
.btn.light { background: #fff; color: var(--green-d); }
.btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }
.link { color: var(--green); font-weight: 700; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }
.link.danger { color: var(--red); }
.row-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.input { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); }
.input:focus { outline: none; border-color: var(--green-l); box-shadow: 0 0 0 3px rgba(47, 154, 85, .18); }
.add-row { display: flex; gap: 8px; margin-top: 14px; }
.add-row .input { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; min-height: 40px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); flex: none; }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; margin-top: 6px; }
.pill.ok { background: var(--green); color: #fff; }
.pill.near { background: var(--warm-bg); color: #9a4f0c; }
.pill.far { background: #eef2ec; color: var(--muted); }
.plus-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--warm); color: #fff; padding: 3px 8px 3px 6px; border-radius: 99px; }
.plus-tag .ic { width: 13px; height: 13px; }

/* ---------- recipe art + cards ---------- */
.art { flex: none; width: 92px; align-self: stretch; min-height: 92px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .5), transparent 46%), linear-gradient(140deg, var(--a), var(--b)); }
.art.photo { background-size: cover; background-position: center; background-color: var(--mint); }
/* Photos are square, so give them room: the whole plate on the recipe page, most of it on the small cards. */
.art.hero-art.photo { height: auto; aspect-ratio: 1 / 1; max-height: 64vh; }
.art.tall.photo { height: auto; aspect-ratio: 4 / 3; }
.card .art.photo { width: 104px; min-height: 104px; }
.art span { font-size: 40px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .22)); }
.art.tall { width: 100%; height: 104px; min-height: 0; border-radius: 14px 14px 0 0; }
.art.hero-art { width: 100%; height: 220px; border-radius: 0; }
.art.hero-art span { font-size: 96px; }
.stack { display: grid; gap: 10px; }
.card { display: flex; gap: 12px; width: 100%; padding: 10px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.card-b { min-width: 0; flex: 1; padding: 2px 0; }
.card h3, .tile h3 { font-family: var(--serif); font-size: 18px; line-height: 1.2; margin: 2px 0 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.meta .time { color: var(--warm); font-weight: 700; }
.scroller { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.scroller::-webkit-scrollbar, .frow::-webkit-scrollbar, .goal-row::-webkit-scrollbar { display: none; }
.tile { flex: none; width: 172px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); scroll-snap-align: start; display: flex; flex-direction: column; }
.tile-b { padding: 10px 12px 12px; }
.tile h3 { font-size: 16.5px; }

/* ---------- home ---------- */
.hero { margin: 14px 16px 0; padding: 22px 20px; border-radius: 24px; color: #fff; background: radial-gradient(circle at 92% 0%, rgba(255, 255, 255, .22), transparent 42%), linear-gradient(150deg, #2f9a55, #1f6b3a 55%, #154d2a); box-shadow: var(--shadow); }
.hero-k { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.hero h1 { font-family: var(--serif); font-size: 33px; line-height: 1.08; margin: 6px 0 8px; }
.hero-s { opacity: .94; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-btns .btn { flex: 1 1 150px; padding: 0 14px; }
.meal-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding: 16px 16px 0; }
.meal { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 1px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 700; color: var(--green-d); }
.meal span { font-size: 26px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cu { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); border-left: 6px solid var(--a); }
.cu-i { font-size: 28px; }
.cu b { font-family: var(--serif); font-size: 17px; }
.cu small, .goal small { color: var(--muted); font-size: 12.5px; }
.goal-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; }
.goal { flex: none; width: 138px; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--r); background: var(--mint); border: 1px solid var(--line); }
.goal span { font-size: 24px; }
.goal b { font-size: 14.5px; line-height: 1.2; }
.empty { text-align: center; background: var(--card); border-radius: 22px; padding: 26px 20px; box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: center; }
.empty-i { font-size: 44px; }
.empty h3 { font-family: var(--serif); font-size: 21px; }
.empty p { color: var(--muted); }

/* ---------- kitchen ---------- */
.scan-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, #fff, #f1f8ee); border: 1.5px solid var(--green-l); margin-bottom: 14px; }
.scan-i { width: 46px; height: 46px; border-radius: 14px; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.scan-t { flex: 1; min-width: 0; }
.scan-t b { display: block; }
.scan-t small { color: var(--muted); font-size: 13px; line-height: 1.3; display: block; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; background: var(--bg-deep); border-radius: 16px; margin-bottom: 12px; }
.seg button { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--muted); position: relative; }
.seg button span { font-size: 22px; }
.seg button.on { background: var(--card); color: var(--green-d); box-shadow: var(--shadow); }
.seg i { position: absolute; top: 5px; right: 8px; font-style: normal; font-size: 11px; min-width: 20px; text-align: center; padding: 1px 5px; border-radius: 99px; background: var(--green); color: #fff; }
.seg.two { grid-template-columns: 1fr 1fr; margin-bottom: 0; }
.seg.two button { flex-direction: row; justify-content: center; gap: 6px; padding: 10px 4px; font-size: 13.5px; }
.seg.two button span { font-size: 18px; }
.chips.quick { margin-top: 12px; }
.grp .shop { margin-top: 0; }
.shots.left { text-align: left; margin-top: 6px; }
.grp { margin-top: 18px; }
.grp h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); font-size: 15px; font-weight: 600; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chip .x { opacity: .8; margin-left: 2px; }
.addq { margin-top: 16px; padding: 14px; background: var(--card); border: 1.5px dashed var(--green-l); border-radius: var(--r); }
.addq p { margin-bottom: 10px; font-size: 15px; }
.cta-bar { position: sticky; bottom: 84px; padding: 12px 16px; background: linear-gradient(to top, var(--bg) 62%, transparent); z-index: 5; }

/* ---------- recipes ---------- */
.frow { display: flex; gap: 8px; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.fchip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; }
.fchip.strong { border-color: var(--green-l); color: var(--green-d); }
.fchip.on { background: var(--green); border-color: var(--green); color: #fff; }
.count { display: flex; gap: 5px; align-items: center; margin: 16px 0 10px; color: var(--muted); font-size: 14.5px; min-height: 40px; }

/* ---------- week + list ---------- */
.count .link { margin-left: auto; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stats div { background: var(--green); color: #fff; border-radius: var(--r); padding: 14px; }
.stats b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.stats small { opacity: .9; font-size: 13px; }
.day { background: var(--card); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.day-h { display: flex; justify-content: space-between; align-items: baseline; }
.day-h b { font-family: var(--serif); font-size: 18px; color: var(--green-d); }
.day-h small, .day-e { color: var(--muted); font-size: 13.5px; }
.plan { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.plan-m { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.plan-i { font-size: 26px; }
.plan-m b { display: block; font-size: 15.5px; }
.plan-m small { color: var(--muted); font-size: 13px; }
.x-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); flex: none; }
.x-btn .ic { width: 18px; height: 18px; }
.shop { margin-top: 14px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.shop-i { display: flex; align-items: center; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); }
.shop-i:last-child { border-bottom: 0; }
.shop-i label { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 48px; }
.shop-i b { display: block; font-weight: 600; }
.shop-i small { color: var(--muted); font-size: 12.5px; }
.shop-i.done b { text-decoration: line-through; color: var(--muted); }

/* ---------- recipe detail ---------- */
.detail { position: fixed; inset: 0; z-index: 40; max-width: 480px; margin: 0 auto; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
@keyframes up { from { transform: translateY(24px); } to { transform: none; } }
.d-top { position: relative; }
.round { position: absolute; top: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .94); display: grid; place-items: center; box-shadow: var(--shadow); color: var(--green-d); }
.round.back { left: 14px; }
.round.fav { right: 14px; }
.round.fav.on { color: #fff; background: var(--warm); }
.round.fav.on .ic { fill: currentColor; }
.d-body { padding: 18px 16px 0; margin-top: -22px; background: var(--bg); border-radius: 24px 24px 0 0; position: relative; }
.d-body h1 { font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--green-d); margin: 4px 0 6px; }
.d-body h2 { font-family: var(--serif); font-size: 21px; color: var(--green-d); margin: 24px 0 10px; }
.d-desc { color: var(--muted); }
.times { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; margin-top: 14px; }
.times div { background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.times b { display: block; font-size: 17px; }
.times small { color: var(--muted); font-size: 12.5px; }
.times .tot { background: var(--warm-bg); }
.times .tot b { color: #9a4f0c; }
.have-bar { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--warm-bg); color: #6f3a0a; font-size: 14.5px; }
.have-bar.ok { background: var(--mint); color: var(--green-d); }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.box { background: var(--card); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); margin-top: 14px; }
.box.cost { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
.box.cost b { font-family: var(--serif); font-size: 24px; display: block; line-height: 1.1; }
.box.cost small, .stepper small { color: var(--muted); font-size: 12.5px; }
.box.cost .stepper { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; background: var(--mint); font-size: 22px; font-weight: 700; text-align: center; color: var(--green-d); }
.stepper span { text-align: center; }
.stepper .num { width: 62px; height: 44px; text-align: center; font-size: 20px; font-weight: 700; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); display: block; -moz-appearance: textfield; }
.stepper .num::-webkit-outer-spin-button, .stepper .num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper b { font-size: 20px; display: block; font-family: var(--sans); }
.ings { list-style: none; padding: 0; margin: 0 0 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ings li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.ings li:last-child { border-bottom: 0; }
.ings li span:nth-child(2) { flex: 1; }
.tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; background: var(--green); color: #fff; }
.miss .tick { background: var(--warm-bg); color: #9a4f0c; }
.ings em { font-style: normal; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9a4f0c; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; background: var(--card); border-radius: var(--r); padding: 14px 14px 14px 54px; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.nfacts { border: 2px solid var(--ink); border-radius: 12px; box-shadow: none; }
.n-serv { font-size: 13.5px; color: var(--muted); }
.n-cal { display: flex; justify-content: space-between; align-items: baseline; border-top: 6px solid var(--ink); border-bottom: 3px solid var(--ink); margin-top: 8px; padding: 6px 0; font-weight: 800; font-size: 18px; }
.n-cal b { font-size: 30px; line-height: 1; }
.n-row { display: flex; justify-content: space-between; padding: 7px 0 7px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.n-row.strong { padding-left: 0; font-weight: 700; }
.n-row b { font-weight: 600; }
.box.tip { background: var(--mint); box-shadow: none; border: 1px solid var(--line); }
.box.tip p { font-size: 14.5px; margin-top: 4px; }
.d-space { height: 110px; }
.d-cta { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 41; }
.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; background: var(--card); border-radius: 16px; padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.daypick span { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-weight: 700; }
.daypick button { min-height: 44px; border-radius: 10px; background: var(--mint); font-weight: 700; font-size: 13.5px; text-align: center; color: var(--green-d); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 35, 22, .5); z-index: 50; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; max-height: 90vh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); z-index: 51; animation: up .2s ease-out; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheet-h h2 { font-family: var(--serif); font-size: 23px; color: var(--green-d); }
.sheet-s { color: var(--muted); margin-bottom: 12px; font-size: 14.5px; }
.sheet .btn.wide { margin-top: 14px; }
.plist { display: grid; gap: 8px; }
.prow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); }
.prow.on { border-color: var(--green); background: var(--mint); }
.prow span:nth-child(2) { flex: 1; }
.prow b { display: block; }
.prow small { color: var(--muted); font-size: 13px; }
.p-i { font-size: 22px; }
.p-c { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.prow.on .p-c { background: var(--green); border-color: var(--green); color: #fff; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set > div:first-child { flex: 1; min-width: 0; }
.set b { display: block; }
.set small { color: var(--muted); font-size: 13px; }
.set .stepper { gap: 8px; }
.up-hero { text-align: center; padding: 18px 12px; border-radius: 20px; color: #fff; background: linear-gradient(150deg, #2f9a55, #154d2a); }
.up-hero .ic { width: 40px; height: 40px; }
.up-hero h3 { font-family: var(--serif); font-size: 23px; margin: 6px 0; }
.up-hero p { opacity: .93; font-size: 14.5px; }
.up-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.up-list li { padding-left: 30px; position: relative; font-size: 15px; }
.up-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.up-price { text-align: center; margin-top: 16px; }
.up-price b { font-family: var(--serif); font-size: 36px; color: var(--green-d); }
.up-price span { color: var(--muted); margin-left: 4px; }
.preview { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--warm-bg); border: 1.5px dashed var(--warm); font-size: 14px; }
.preview p { margin: 2px 0 8px; color: #6f3a0a; }
.preview:not(:has(.btn)) p { margin-bottom: 0; }

/* ---------- scan ---------- */
.dots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 14px; }
.dots span { text-align: center; font-size: 12.5px; font-weight: 700; padding: 8px 2px; border-radius: 10px; background: var(--bg-deep); color: var(--muted); }
.dots .on { background: var(--green); color: #fff; }
.dots .done { background: var(--mint); color: var(--green-d); }
.scan-step, .scan-done, .scan-busy { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 6px 0; }
.scan-big { font-size: 64px; }
.scan-step h3, .scan-done h3 { font-family: var(--serif); font-size: 22px; color: var(--green-d); }
.scan-step p, .scan-done p, .scan-busy p { color: var(--muted); }
.filebtn { position: relative; overflow: hidden; cursor: pointer; }
.filebtn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.shots { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.link.center { display: block; text-align: center; margin: 10px auto 0; line-height: 40px; }
.sheet label.btn.wide { margin-top: 12px; }
.scan-busy img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--mint); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.found { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); max-height: 38vh; overflow-y: auto; }
.f-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 48px; border-bottom: 1px solid var(--line); }
.f-row:last-child { border-bottom: 0; }
.f-row span { flex: 1; font-weight: 600; }
.f-row em { font-style: normal; font-size: 12px; color: var(--muted); }

/* ---------- bottom nav + toast ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 30; }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 5px; border-radius: 14px; color: var(--muted); font-size: 11.5px; font-weight: 700; position: relative; }
.nav button.on { color: var(--green); background: var(--mint); }
.nav i { position: absolute; top: 2px; left: 54%; font-style: normal; font-size: 10.5px; background: var(--warm); color: #fff; border-radius: 99px; min-width: 18px; text-align: center; padding: 1px 5px; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 99px; font-size: 14.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: 88vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- my own recipes ---------- */
.mine-btns { display: grid; gap: 8px; margin: 12px 0 2px; }
.mine-btns .btn { padding: 0 12px; }
.pad-x { padding: 12px 16px 0; }
.find-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, #fff, #f1f8ee); border: 1.5px solid var(--green-l); }
.find-card .scan-i { font-size: 22px; }
.find-h { font-family: var(--serif); font-size: 24px; color: var(--green-d); line-height: 1.15; margin: 4px 0 6px; }
.nline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 8px; }
.nline span { background: var(--card); border-radius: 12px; padding: 8px 4px; text-align: center; font-size: 12px; color: var(--muted); box-shadow: var(--shadow); }
.nline b { display: block; font-size: 15px; color: var(--ink); }
.fld.half { width: 50%; }
.fld { display: block; font-size: 13.5px; font-weight: 700; color: var(--green-d); margin-top: 14px; }
.fld .input { margin-top: 6px; font-weight: 400; color: var(--ink); }
.fld .chips { margin-top: 8px; }
.fld3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.area { min-height: 0; height: auto; padding: 12px 14px; line-height: 1.45; resize: vertical; font-family: inherit; }
.chip.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.ings.prev { margin: 8px 0 0; }
.ings.prev li { padding: 9px 12px; font-size: 14.5px; }
.ings.prev small { display: block; font-size: 12px; color: var(--muted); }
.ings.prev em.g { color: var(--green); }
.ings.prev em.k { color: var(--muted); }
.box.cost.solo { display: block; }
.box.cost.solo .stepper { border-top: 0; padding-top: 0; }
.sheet:has(.fld) { max-height: 94vh; }

/* ---------- lists grouped by meal ---------- */
.jump { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 4px; padding: 0 16px 4px; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump .fchip b { margin-left: 2px; color: var(--green); }
.mgroup { margin-top: 18px; scroll-margin-top: 70px; }
.mgroup-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; border-radius: 14px; background: var(--green); color: #fff; }
.mgroup-h span { font-size: 26px; }
.mgroup-h h3 { font-family: var(--serif); font-size: 19px; line-height: 1.15; }
.mgroup-h small { opacity: .9; font-size: 12.5px; }
.hmeal { margin-top: 6px; }
.hmeal-h { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 8px; }
.hmeal-h b { font-size: 16px; color: var(--green-d); }
.hmeal-h small { color: var(--muted); font-size: 13px; }

.softmiss .tick { background: #eef2ec; color: var(--muted); }
.ings em.s { color: var(--muted); }

.near-h { margin: 16px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9a4f0c; }
.near-h small { background: var(--warm-bg); border-radius: 99px; padding: 2px 8px; margin-left: 4px; }
.unlock { background: var(--warm-bg); border: 1.5px solid #f0c592; border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.unlock p { font-size: 13.5px; color: #6f3a0a; margin: 2px 0 10px; }
.urow { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; margin-top: 6px; background: var(--card); border-radius: 12px; font-weight: 700; }
.urow em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--green); }

.missed { background: var(--warm-bg); border: 1.5px solid #f0c592; border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.missed p { font-size: 13.5px; color: #6f3a0a; margin: 2px 0 10px; }

.tap-hint { font-size: 13.5px; color: var(--muted); margin: -2px 0 10px; }
.ings li.tap { cursor: pointer; }
.ings li.tap:active { background: var(--mint); }
.ihave { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--green-d); background: var(--mint); border: 1px solid var(--line); border-radius: 99px; padding: 6px 10px; white-space: nowrap; }

/* ---------- about and disclaimer ---------- */
.ab { background: var(--card); border-radius: 14px; padding: 12px 14px; margin-top: 10px; box-shadow: var(--shadow); }
.ab b { display: block; color: var(--green-d); }
.ab p { font-size: 14.5px; color: var(--ink); margin-top: 3px; }
.fbbox { background: var(--mint); box-shadow: none; border: 1px solid var(--line); }
.fbbox .input { margin-top: 10px; }
.fb-ok { font-weight: 700; color: var(--green-d); margin: 8px 0; }
.link.inline { min-height: 0; font-size: inherit; display: inline; }

.find-img { width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; background-size: cover; background-position: center; background-color: var(--mint); margin-bottom: 12px; }
.find-img.wait { display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); font-size: 14px; }

.up-trial { margin: -4px 0 12px; text-align: center; font-weight: 700; color: var(--green); }

.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.tool-i { font-size: 24px; }
.tool b { font-size: 15.5px; color: var(--green-d); }
.tool small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--bg-deep); }
.gap-t { margin-top: 14px; }
.sub-h { font-family: var(--serif); font-size: 18px; color: var(--green-d); margin: 16px 0 10px; }
.chat { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.chat .scroller { margin: 0; padding: 2px 0 8px; flex: none; }
.bub { align-self: flex-start; max-width: 88%; padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: var(--card); box-shadow: var(--shadow); font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.bub.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--green); color: #fff; box-shadow: none; }
.bub.wait { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.spin.sm { width: 16px; height: 16px; border-width: 2px; }
.starters { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.starters .chip { text-align: left; white-space: normal; height: auto; }
.ask-f { display: flex; gap: 8px; }
.ask-f .input { flex: 1; min-width: 0; }
.sheet .card { margin-bottom: 10px; width: 100%; }

.cu.pic { padding: 0 0 12px; border-left: 0; overflow: hidden; text-align: left; }
.cu-p { display: block; width: 100%; aspect-ratio: 4 / 3; background-size: cover; background-position: center; margin-bottom: 8px; }
.cu.pic b, .cu.pic small { padding: 0 12px; }
.cu.pic { background: var(--green); }
.cu.pic b { color: #fff; }
.cu.pic small { color: #d9efd9; font-weight: 600; }
.cu.pic { background: #3c9457; }
.cu.pic small { color: #eaf7ea; }
.cu.pic { background: #4ba566; }
.cu.pic small { color: #fff; }

.sec-a { display: flex; align-items: center; gap: 10px; flex: none; }
.fold { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: var(--bg-deep); color: var(--green-d); font-size: 13px; font-weight: 700; flex: none; }
.fold i { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-135deg) translate(-2px, -2px); }
.fold.shut i { transform: rotate(45deg) translate(-1px, -1px); }
.mgroup-h .fold { margin-left: auto; background: rgba(255, 255, 255, .18); color: #fff; }

/* Orange marks everything that is part of Plus; green marks Free. */
.plan-b { background: var(--green); border-color: var(--green); color: #fff; }
.plan-b.plus { background: var(--warm); border-color: var(--warm); }
.tool { border: 2px solid var(--warm); }
.find-card { border: 2px solid var(--warm); }
.find-card .pill.ok { background: var(--warm); }
.btn.paid { background: var(--warm); color: #fff; }
.btn.outline.paid { background: transparent; color: #b4590c; border-color: var(--warm); }
.btn.ghost.paid { background: rgba(255, 255, 255, .16); color: #fff; border: 2px solid var(--warm); }
.scan-tip { text-align: left; margin: 12px 0; }
.scan-add { margin: 10px 0 12px; }




/* voice */
.mic { flex: none; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; background: var(--card); border: 2px solid var(--warm); }
.mic.on { background: var(--warm); }
.voice-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: 14px; background: #fff3e4; border: 1.5px solid var(--warm); }
.voice-bar div { flex: 1; min-width: 0; }
.voice-bar b { display: block; color: #b4590c; }
.voice-bar small { color: var(--muted); font-size: 13px; }
.pulse { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--warm); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.7); opacity: .4; } }

/* tidy-up: saved, my recipes, clearer sections */
.card, .tile { position: relative; }
.saved-mark { position: absolute; top: 6px; left: 6px; z-index: 1; padding: 3px 8px; border-radius: 99px; background: var(--warm); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.mystuff { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 0; }
.mystuff button { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-align: left; }
.mystuff span { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); font-size: 18px; color: var(--green-d); }
.mystuff b { display: block; font-size: 15.5px; color: var(--green-d); }
.mystuff small { color: var(--muted); font-size: 12.5px; }
.meal-row.flat { margin: 0; padding: 0; }
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; margin: 12px 0 14px; background: var(--bg-deep); border-radius: 16px; }
.shelf button { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--muted); }
.shelf button.on { background: var(--card); color: var(--green-d); box-shadow: var(--shadow); }
.shelf i { font-style: normal; font-size: 11.5px; padding: 1px 6px; border-radius: 99px; background: var(--mint); color: var(--green-d); }
.flabel { margin: 14px 0 -4px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.savebtn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; margin: 4px 0 12px; border-radius: 99px; border: 2px solid var(--green); background: var(--card); color: var(--green-d); font-weight: 700; font-size: 15px; }
.savebtn.on { background: var(--green); color: #fff; }
.savebtn small { font-weight: 500; opacity: .85; font-size: 12px; }
.shelf button { white-space: nowrap; font-size: 13.5px; }

/* tighter home */
.sec { padding-top: 16px; }
.sec-h { margin-bottom: 8px; }
.cu-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.cu-row::-webkit-scrollbar { display: none; }
.cu-row .cu { flex: none; width: 150px; scroll-snap-align: start; }
.mystuff { padding-top: 12px; }

/* costs */
.cost-note { margin: 8px 0 4px; }
.cost-note p { margin: 0 0 6px; }
.cost-note small { color: var(--muted); font-weight: 500; }
.cb { margin-top: 6px; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.cb-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cb-row:last-child { border-bottom: 0; }
.cb-row b { flex: none; }
.cb-row.tot { font-weight: 700; color: var(--green-d); }
.shop-p { flex: none; text-align: right; margin-right: 6px; }
.shop-p b { display: block; font-size: 14px; color: var(--green-d); }
.shop-p small { display: block; font-size: 11px; color: var(--muted); }
.shop-tot { margin: 12px 0; }
.shop-tot b { display: block; font-size: 20px; color: var(--green-d); }
.shop-tot small { color: var(--muted); }
.shop-tot .fine { margin-top: 6px; }
.pr-list { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 2px 12px; }
.pr-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pr-row:last-child { border-bottom: 0; }
.pr-row > div { flex: 1; min-width: 0; }
.pr-row b { display: block; font-size: 15px; }
.pr-row small { color: var(--muted); font-size: 12px; }
.pr-src.est { color: #b4590c; font-weight: 700; }
.pr-src.own { color: var(--green-d); font-weight: 700; }
.pr-in { flex: none; display: flex; align-items: center; gap: 2px; font-weight: 700; color: var(--green-d); }
.pr-in input { width: 74px; min-height: 40px; padding: 0 8px; border-radius: 10px; border: 1.5px solid var(--line); font: inherit; text-align: right; background: #fff; }
.pr-gap { width: 36px; flex: none; }

.meal-row.flat { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.meal-row.flat .meal { font-size: 11.5px; padding: 10px 0; border-radius: 14px; }
.meal-row.flat .meal span { font-size: 23px; }

.backbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 8px; margin: 0 0 10px -4px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); color: var(--green-d); font-weight: 700; font-size: 14px; }
.backbtn .ic { width: 18px; height: 18px; }

/* header: plan label, family size, settings */
.top { gap: 8px; }
.brand > div { min-width: 0; }
.brand b, .brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { gap: 6px; flex: none; }
.top-btn { padding: 0 10px; }
.top-btn.gear { width: 40px; padding: 0; justify-content: center; }
span.plan-b { cursor: default; }
@media (max-width: 440px) { .brand small { display: none; } }
.fine.center { text-align: center; margin: -4px 0 12px; }

/* plan label sits under the app name, so the name is never cut off */
.brand .plan-b { display: inline-block; margin-top: 3px; padding: 2px 8px; font-size: 10px; line-height: 1.4; white-space: nowrap; }
.brand small + .plan-b { margin-left: 0; }
@media (min-width: 441px) { .brand .plan-b { margin-top: 4px; } }

.meal-row.flat { grid-template-columns: repeat(4, 1fr); }
.meal-row.flat .meal { font-size: 12.5px; }

/* arrows on sideways rows */
.hs { position: relative; }
.hs-a { position: absolute; top: calc(50% - 24px); z-index: 2; width: 38px; height: 38px; padding: 0 0 3px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #1d5e34; font-size: 28px; line-height: 1; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer; transition: opacity .2s; }
.hs-a.l { left: -6px; }
.hs-a.r { right: -6px; }
.hs.at-start .hs-a.l, .hs.at-end .hs-a.r { opacity: 0; pointer-events: none; }
