/* Sage: soft sage cream, deep green, white photo cards. Phone first, wide layout with a sidebar on a computer. */
:root {
  --bg: #f3f2ea; --side: #ebeadf; --card: #ffffff; --soft: #e7ebdc; --soft2: #dfe5d2; --line: #e2e1d6;
  --green: #22503a; --green2: #2f6249; --ink: #18241d; --ink2: #3c4a41; --muted: #737d74; --faint: #a3aba2;
  --tag: #e9eedf; --tagink: #3d5a44; --eyebrow: #c0663a;
  --protein: #22503a; --carbs: #d3a13b; --fat: #c66a4b; --sodium: #5f86a6; --warn: #b4532f;
  --r: 18px; --r2: 12px; --shadow: 0 1px 2px rgba(24,36,29,.04), 0 6px 22px rgba(24,36,29,.05);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --head: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -.02em; }
.hidden { display: none !important; }

/* ---------- shell */
.app { min-height: 100vh; }
.side { display: none; }
.main { padding: calc(14px + var(--safe-t)) 18px calc(96px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.brand { font: 800 21px/1 var(--head); letter-spacing: -.03em; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.brand .leaf { width: 22px; height: 22px; color: var(--green); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); }
.icon-btn:hover { background: var(--soft); }
.fab { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(34,80,58,.28); }
.fab svg.lucide { width: 22px; height: 22px; }
.eyebrow { font: 700 11px/1 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: 8px; }
.title { font: 800 30px/1.08 var(--head); letter-spacing: -.035em; }
.sub { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; gap: 10px; }
.section-h h2 { font-size: 20px; font-weight: 700; }
.section-h .meta { color: var(--muted); font-size: 12.5px; }
.link { color: var(--green); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(250,249,244,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 8px 6px calc(8px + var(--safe-b)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); padding: 2px 6px; position: relative; min-width: 58px; }
.tabbar a .pill { width: 46px; height: 30px; border-radius: 15px; display: grid; place-items: center; }
.tabbar a.on { color: var(--green); font-weight: 600; }
.tabbar a.on .pill { background: var(--soft2); }
.tabbar .badge { position: absolute; top: -2px; right: 8px; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--soft2); color: var(--green); font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }

/* ---------- buttons, fields, chips */
.btn { height: 44px; padding: 0 18px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green2); }
.btn.soft { background: var(--soft); color: var(--green); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.danger { color: var(--warn); background: #f6e7df; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.wide { width: 100%; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--soft); color: var(--ink2); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.chip.on { background: var(--green); color: #fff; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip .n { font-size: 11px; opacity: .75; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select, .input { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 15px; color: var(--ink); outline: none; }
.field textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: var(--green2); box-shadow: 0 0 0 3px rgba(47,98,73,.12); }
.field .hint { font-weight: 400; color: var(--faint); font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.search { display: flex; align-items: center; gap: 9px; background: var(--card); border-radius: 14px; padding: 0 14px; height: 46px; color: var(--muted); box-shadow: var(--shadow); }
.search input { border: 0; outline: 0; background: none; flex: 1; font-size: 14.5px; color: var(--ink); min-width: 0; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--tag); color: var(--tagink); font-size: 11px; font-weight: 600; }
.tag.warn { background: #f6e7df; color: var(--warn); }

/* ---------- cards */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.panel { background: var(--soft); border-radius: var(--r); }
.pad { padding: 16px; }

/* day strip */
.weekbar { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.weekbar .range { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { background: var(--soft); border-radius: 14px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink2); position: relative; }
.day .dw { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.day .dn { font: 600 19px/1.1 var(--head); }
.day .dots { display: flex; gap: 3px; height: 5px; margin-top: 2px; }
.day .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.day.on { background: var(--green); color: #fff; }
.day.on .dw { color: #cfe0d4; }
.day.on .dots i { background: #9fc2ab; }
.day.today:not(.on) { outline: 1.5px solid var(--green2); outline-offset: -1.5px; }
.day .tl { display: none; }

/* calorie card */
.kcal { margin-top: 14px; padding: 16px 16px 14px; }
.kcal .big { font: 700 30px/1 var(--head); letter-spacing: -.03em; }
.kcal .of { color: var(--muted); font-size: 13px; font-weight: 500; }
.kcal .pct { font-weight: 700; color: var(--green); font-size: 14px; }
.bar { height: 7px; border-radius: 4px; background: rgba(34,80,58,.12); overflow: hidden; margin: 10px 0; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--green); }
.macros { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink2); }
.macros b { font-weight: 600; }

/* menu cards */
.menu { display: flex; flex-direction: column; gap: 10px; }
.meal { display: flex; align-items: stretch; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); min-height: 92px; text-align: left; width: 100%; }
.meal .ph { width: 92px; flex: none; background: var(--soft2) center/cover; display: grid; place-items: center; color: var(--green); }
.meal .bd { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; }
.meal .slot { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.meal .nm { font: 600 16px/1.25 var(--head); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meal .mt { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; }
.meal .go { display: grid; place-items: center; padding-right: 12px; color: var(--faint); }
.meal.empty { background: transparent; box-shadow: none; border: 1.5px dashed var(--soft2); min-height: 58px; align-items: center; padding: 0 16px; gap: 10px; color: var(--muted); font-weight: 500; }
.meal.empty svg { color: var(--green); }
.why { font-size: 12px; color: var(--green2); display: flex; gap: 5px; align-items: flex-start; margin-top: 2px; }
.why svg.lucide { width: 13px; height: 13px; margin-top: 2px; }

.banner { margin-top: 18px; display: flex; align-items: center; gap: 14px; padding: 16px; }
.banner .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--card); display: grid; place-items: center; color: var(--green); flex: none; }
.banner h3 { font-size: 16px; font-weight: 700; }
.banner p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

/* recipe cards */
.rgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rcard { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; }
.rcard .ph { aspect-ratio: 4/3; background: var(--soft2) center/cover; position: relative; display: grid; place-items: center; color: var(--green); }
.rcard .ph .tag { position: absolute; left: 8px; top: 8px; background: rgba(255,255,255,.92); }
.rcard .ph .fav { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--warn); }
.rcard .ph .fav svg.lucide { width: 15px; height: 15px; fill: currentColor; }
.rcard .bd { padding: 10px 12px 12px; }
.rcard .nm { font: 600 14px/1.3 var(--head); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .mt { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.hero-r { display: block; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); text-align: left; width: 100%; }
.hero-r .ph { aspect-ratio: 16/8; background: var(--soft2) center/cover; position: relative; }
.hero-r .ph .tag { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); }
.hero-r .bd { padding: 14px 16px; }
.hero-r .nm { font: 600 18px/1.25 var(--head); }
.hero-r .mt { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ingredient pictures */
.ing { width: 40px; height: 40px; border-radius: 11px; background: var(--soft); position: relative; overflow: hidden; flex: none; display: grid; place-items: center; font: 700 15px/1 var(--head); color: var(--green); }
.ing img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; background: var(--soft); }
.ing.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 20px; }

/* grocery list */
.stores { margin: 16px 0 4px; }
.addbar { display: flex; gap: 8px; margin-top: 14px; }
.addbar .search { flex: 1; }
.aisle { margin-top: 18px; }
.aisle h4 { margin: 0 0 8px 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.store-h { margin: 26px 0 0; display: flex; align-items: center; gap: 9px; font: 700 17px/1 var(--head); }
.store-h .dot { width: 10px; height: 10px; border-radius: 50%; }
.store-h .n { color: var(--muted); font: 500 12.5px var(--font); }
.items { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid #f0efe7; min-height: 60px; }
.item:first-child { border-top: 0; }
.item .ck { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--soft2); display: grid; place-items: center; flex: none; color: transparent; }
.item .ck svg.lucide { width: 15px; height: 15px; stroke-width: 3; }
.item.done .ck { background: var(--green); border-color: var(--green); color: #fff; }
.item .tx { flex: 1; min-width: 0; text-align: left; }
.item .nm { font-weight: 550; font-size: 15px; }
.item .q { font-size: 12.5px; color: var(--muted); }
.item.done .nm { text-decoration: line-through; color: var(--faint); }
.item.done .ing { opacity: .45; }
.item .pr { font-size: 12.5px; color: var(--muted); }
.shopbar { position: fixed; left: 0; right: 0; bottom: calc(66px + var(--safe-b)); z-index: 25; padding: 0 16px; display: flex; justify-content: center; pointer-events: none; }
.shopbar .btn { pointer-events: auto; box-shadow: 0 8px 22px rgba(34,80,58,.3); }

/* kitchen */
.pantry { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 4px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; }
.pchip .ing { width: 34px; height: 34px; border-radius: 10px; }
.pchip button { width: 26px; height: 26px; display: grid; place-items: center; color: var(--faint); border-radius: 50%; }
.pchip button:hover { background: var(--soft); color: var(--ink); }
.pchip.off { opacity: .45; }
.idea { overflow: hidden; }
.idea .hd { background: var(--green); color: #fff; padding: 18px; }
.idea .hd .eyebrow { color: #b8d4c1; }
.idea .hd h2 { font-size: 22px; }
.idea .hd p { margin: 6px 0 0; color: #d6e6db; font-size: 13.5px; }

/* recipe page */
.rhero { margin: 0 -18px; aspect-ratio: 16/10; background: var(--soft2) center/cover; position: relative; }
.rhero .bar-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + var(--safe-t)) 12px; display: flex; justify-content: space-between; }
.rhero .bar-top button { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; color: var(--ink); }
.rbody { background: var(--bg); border-radius: 24px 24px 0 0; margin: -22px -18px 0; padding: 22px 18px 0; position: relative; }
.rbody h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.fact { background: var(--card); border-radius: 14px; padding: 10px; text-align: center; box-shadow: var(--shadow); }
.fact b { display: block; font: 700 17px/1.2 var(--head); }
.fact span { font-size: 11px; color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ings { display: flex; flex-direction: column; }
.ingrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ingrow:last-child { border-bottom: 0; }
.ingrow .tx { flex: 1; font-size: 14.5px; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li { display: flex; gap: 12px; font-size: 15px; line-height: 1.55; }
.steps li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--green); font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.nutri { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; }
.nutri div { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.nutri b { font-weight: 600; }
.over { color: var(--warn); }
.check { white-space: pre-wrap; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.stepper { display: inline-flex; align-items: center; background: var(--card); border-radius: 12px; border: 1px solid var(--line); }
.stepper button { width: 36px; height: 36px; display: grid; place-items: center; color: var(--green); }
.stepper b { min-width: 26px; text-align: center; font-weight: 600; }

/* insights */
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.msg { padding: 14px 16px; }
.msg b { font-size: 15px; font-weight: 600; display: block; }
.msg span { font-size: 12.5px; color: var(--muted); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; position: relative; }
.chart .goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--faint); }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .col i { width: 100%; max-width: 34px; border-radius: 8px; background: var(--soft2); min-height: 4px; }
.chart .col.on i { background: var(--green); }
.chart .col span { font-size: 11px; color: var(--muted); }
.avgs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.avg { padding: 12px 14px; }
.avg .l { font-size: 12px; color: var(--muted); }
.avg .v { font: 700 20px/1.3 var(--head); }
.avg .bar { height: 5px; margin: 6px 0 0; }
.trip { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid #f0efe7; }
.trip:first-child { border-top: 0; }
.trip .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; }
.bubble.sage { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 5px; }

/* sheets */
.scrim { position: fixed; inset: 0; background: rgba(20,30,24,.36); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--bg); width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); animation: up .22s cubic-bezier(.2,.8,.2,1); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--soft2); margin: 0 auto 12px; }
.sheet h2 { font-size: 21px; font-weight: 700; margin-bottom: 4px; }
.sheet .stack { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; text-align: left; width: 100%; }
.pick:hover { background: var(--soft); }
.pick .ph { width: 54px; height: 54px; border-radius: 12px; background: var(--soft2) center/cover; flex: none; display: grid; place-items: center; color: var(--green); }
.pick .nm { font-weight: 600; font-size: 14.5px; }
.pick .mt { font-size: 12px; color: var(--muted); }
.proposal { display: flex; gap: 12px; padding: 10px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); align-items: flex-start; }
.proposal .ph { width: 60px; height: 60px; border-radius: 12px; background: var(--soft2) center/cover; flex: none; display: grid; place-items: center; color: var(--green); }
.proposal.off { opacity: .45; }
.proposal .tog { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--soft2); display: grid; place-items: center; color: transparent; flex: none; margin-top: 4px; }
.proposal:not(.off) .tog { background: var(--green); border-color: var(--green); color: #fff; }
.proposal .tog svg.lucide { width: 14px; height: 14px; stroke-width: 3; }

.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; z-index: 80; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: up .2s; }
.empty-state { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty-state .ic { width: 58px; height: 58px; border-radius: 18px; background: var(--soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 12px; }
.empty-state .ic svg.lucide { width: 26px; height: 26px; }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: rot .8s linear infinite; }
.spin.dark { border-color: rgba(34,80,58,.2); border-top-color: var(--green); }
@keyframes rot { to { transform: rotate(360deg); } }
.thinking { display: flex; align-items: center; gap: 12px; padding: 18px; color: var(--ink2); }

/* sign in */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .box { width: 100%; max-width: 360px; text-align: center; }
.gate .leafbig { width: 64px; height: 64px; border-radius: 20px; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; }
.gate .leafbig svg.lucide { width: 30px; height: 30px; }
.gate h1 { font-size: 34px; font-weight: 800; }
.gate p { color: var(--muted); margin: 6px 0 22px; }
.gate .err { color: var(--warn); font-size: 13.5px; margin-top: 10px; min-height: 20px; }

/* me */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.store-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid #f0efe7; }
.store-row:first-child { border-top: 0; }
.store-row input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; background: none; border-radius: 50%; }
.store-row input[type=text] { flex: 1; border: 0; background: none; font-weight: 600; font-size: 15px; outline: none; min-width: 0; }
.aisle-list { display: flex; flex-direction: column; gap: 4px; }
.aisle-list div { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 10px; padding: 6px 6px 6px 12px; font-size: 14px; }
.aisle-list div span { flex: 1; }
.aisle-list button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.aisle-list button:hover { background: var(--soft); }

/* ---------- computer: sidebar, wide grid */
@media (min-width: 980px) {
  .app { display: grid; grid-template-columns: 236px 1fr; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--side); padding: 26px 18px 20px; }
  .side .brand { font-size: 27px; }
  .side .tagline { font-size: 12px; color: var(--muted); margin: 8px 0 30px 2px; }
  .side .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px 10px; }
  .side nav { display: flex; flex-direction: column; gap: 3px; }
  .side nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--ink2); }
  .side nav a:hover { background: rgba(255,255,255,.5); }
  .side nav a.on { background: var(--soft2); color: var(--green); font-weight: 600; }
  .side nav a .badge { margin-left: auto; background: var(--card); }
  .side .promo { margin-top: auto; background: var(--soft2); border-radius: 16px; padding: 16px; }
  .side .promo b { font: 700 17px/1.2 var(--head); display: block; color: var(--ink); }
  .side .promo p { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
  .side .foot { margin-top: 16px; }
  .tabbar, .top .brand, .top .me-btn { display: none; }
  .main { max-width: 1240px; width: 100%; padding: 34px 44px 60px; }
  .title { font-size: 34px; }
  .days { gap: 10px; }
  .day { align-items: flex-start; padding: 12px 14px; border-radius: 14px; min-height: 84px; gap: 4px; }
  .day .dw { font-size: 11px; letter-spacing: .05em; }
  .day .dn { font-size: 26px; }
  .day .dots { margin-top: 6px; }
  .day .tl { display: inline-block; position: absolute; top: 12px; right: 10px; font-size: 9px; font-weight: 700; letter-spacing: .06em; background: rgba(255,255,255,.18); padding: 3px 6px; border-radius: 5px; }
  .day.today:not(.on) .tl { background: var(--soft2); color: var(--green); }
  .plan-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
  .menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .menu.four { grid-template-columns: repeat(2, 1fr); }
  .meal { flex-direction: column; min-height: 0; }
  .meal .ph { width: 100%; aspect-ratio: 4/3; }
  .meal .bd { padding: 14px 16px 16px; justify-content: flex-start; }
  .meal .go { display: none; }
  .meal .slot { position: absolute; }
  .meal { position: relative; }
  .meal .slotpill { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.94); border-radius: 6px; padding: 4px 8px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
  .meal .bd .slot { display: none; }
  .meal.empty { min-height: 220px; flex-direction: column; justify-content: center; }
  .kcal.side-card { margin-top: 0; background: var(--card); box-shadow: var(--shadow); padding: 20px; }
  .rgrid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .rgrid.three { grid-template-columns: repeat(3, 1fr); }
  .list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 22px; align-items: start; }
  .shopbar { left: 236px; bottom: 26px; }
  .scrim { align-items: center; }
  .sheet { max-width: 560px; border-radius: 24px; max-height: 86vh; padding: 22px 26px 26px; }
  .sheet .grab { display: none; }
  .rpage { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
  .rhero { margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4/3.2; position: sticky; top: 24px; }
  .rbody { margin: 0; padding: 0; border-radius: 0; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
  .ins-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
  .kitchen-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 26px; align-items: start; }
  .toast { bottom: 30px; left: calc(50% + 118px); }
}
@media (max-width: 979px) {
  .plan-grid > aside .side-card { display: none; }
}
@media (max-width: 380px) { .title { font-size: 26px; } .facts { grid-template-columns: repeat(2, 1fr); } }

/* fixes after first look */
.slotpill { display: none; }
.desk-only { display: none !important; }
@media (min-width: 980px) {
  body { background: linear-gradient(to right, var(--side) 236px, var(--bg) 236px); }
  .top { display: none; }
  .desk-only { display: inline-flex !important; }
  .kcal.panel { display: none; }
  .meal .slotpill { display: block; }
  .plan-grid > aside { padding-top: 30px; }
}
