:root {
  color-scheme: light;
  --paper: #f6f7f5;
  --surface: #fff;
  --ink: #20352e;
  --muted: #6a766f;
  --forest: #173c32;
  --forest-deep: #102c25;
  --coral: #f26143;
  --coral-dark: #c83d23;
  --coral-pale: #fff0eb;
  --sage: #edf4ed;
  --sage-ink: #42604c;
  --line: #e4e9e3;
  --radius: 22px;
  --shadow: 0 8px 26px rgb(23 60 50 / 3%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .43; }
button { color: inherit; }
a { color: var(--coral-dark); text-underline-offset: 3px; }
button, input, select, textarea { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #e97849;
  outline-offset: 4px;
}
button { transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
button:active:not(:disabled) { transform: translateY(1px); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 720; line-height: 1.15; }
h1 { font-size: clamp(2rem, 3.5vw, 2.8rem); letter-spacing: -.055em; }
h2 { font-size: 1.4rem; letter-spacing: -.035em; }
h3 { font-size: 1.1rem; letter-spacing: -.025em; }
svg { display: block; flex-shrink: 0; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { padding-left: 1.3rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
[hidden], .hidden { display: none !important; }

#shell { max-width: 1224px; padding: 0 32px; margin: 0 auto; position: relative; }
.app-header { display: flex; align-items: center; justify-content: space-between; min-height: 106px; gap: 20px; }
.brand { display: flex; align-items: baseline; gap: 13px; font-size: 2rem; font-weight: 830; letter-spacing: -.075em; line-height: 1; }
.brand .accent, .brand > b, .brand > em { color: var(--coral); font-style: normal; }
.brand-caption { font-size: .81rem; font-weight: 500; letter-spacing: .01em; color: var(--muted); line-height: 1.4; max-width: 105px; }
.main-nav { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; }
.nav-item { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 12px; background: transparent; font-size: .89rem; font-weight: 600; white-space: nowrap; color: var(--muted); }
.nav-item .icon, .nav-item > svg { width: 20px; height: 20px; }
.nav-item.active, .nav-item[aria-current="page"], .nav-item[aria-selected="true"] { color: var(--forest); background: #e9eee8; }
.nav-item:hover { background: #edf0ea; color: var(--forest); }
.icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 22px; height: 22px; }
.icon svg { width: 100%; height: 100%; }
.icon-button { min-width: 44px; min-height: 44px; display: inline-flex; justify-content: center; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.icon-button:hover { background: #eef2ed; }
.icon-button > svg { width: 21px; height: 21px; }
#app { padding: 20px 0 30px; min-height: calc(100dvh - 205px); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.page-heading h1 { margin-top: 8px; }
.page-heading p { color: var(--muted); margin-top: 10px; max-width: 620px; font-size: 1rem; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; }
.date-switcher { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.date-switcher input[type="date"] { color: var(--ink); border: 1px solid var(--line); border-radius: 12px; min-height: 44px; background: #fff; padding: 8px 11px; max-width: 160px; font-size: .88rem; font-weight: 600; }
.date-switcher .date-label { min-width: 112px; text-align: center; font-size: .9rem; font-weight: 600; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; border: 1px solid transparent; border-radius: 13px; padding: 11px 18px; font-size: .92rem; font-weight: 650; line-height: 1.3; text-decoration: none; text-align: center; }
.button svg { width: 19px; height: 19px; }
.button.primary { color: #fff; background: var(--coral-dark); }
.button.primary:hover { background: #b4331d; box-shadow: 0 4px 14px rgb(200 61 35 / 16%); }
.button.secondary { color: var(--forest); background: var(--surface); border-color: var(--line); }
.button.secondary:hover { background: var(--sage); }
.button.light { background: rgb(255 255 255 / 11%); color: #fff; border-color: rgb(255 255 255 / 15%); }
.button.light:hover { background: rgb(255 255 255 / 18%); }
.button.small { min-height: 44px; padding: 9px 13px; font-size: .84rem; border-radius: 11px; }
.button.full { width: 100%; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 7px 4px; border: 0; background: transparent; color: var(--coral-dark); font-weight: 650; font-size: .88rem; text-decoration: none; }
.text-button:hover { color: #9c301d; }
.pill, .tag, .chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; font-size: .76rem; font-weight: 650; line-height: 1.3; padding: 6px 10px; }
.tag { background: var(--sage); color: var(--sage-ink); }
.pill { background: var(--coral-pale); color: #b8472b; }
.chip { background: #f0f3ee; color: #506253; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.meta { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .84rem; }
.meta svg { width: 17px; height: 17px; }

.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.today-grid > *, .side-stack > *, .day-details > * { min-width: 0; }
.hero-card { position: relative; overflow: hidden; min-height: 353px; padding: 28px 30px; border-radius: 25px; background: var(--forest); color: #fff; box-shadow: 0 12px 30px rgb(23 60 50 / 8%); isolation: isolate; }
.hero-card::after { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; border: 1px solid rgb(255 255 255 / 6%); border-radius: 50%; right: -100px; top: 70px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 25px; position: relative; z-index: 1; }
.hero-top .tag { background: rgb(255 255 255 / 12%); color: #e6f0df; }
.hero-top .pill { background: #dcebbf; color: #38512e; }
.hero-illustration { position: absolute; width: 232px; max-width: 43%; right: -13px; top: 90px; pointer-events: none; z-index: -1; }
.hero-illustration svg { width: 100%; height: auto; }
.hero-content { max-width: 73%; position: relative; }
.hero-content > .eyebrow { color: #b6ccbf; margin-bottom: 9px; }
.hero-content h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); letter-spacing: -.045em; line-height: 1.06; max-width: 370px; }
.hero-content .recipe-desc { color: #d1e0d6; font-size: .95rem; line-height: 1.55; margin: 13px 0 19px; max-width: 305px; }
.hero-content .meta { color: #d4e4d8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; position: relative; z-index: 1; }
.hero-card .button.primary { background: var(--coral); color: #102c25; }
.hero-card .button.primary:hover { background: #fa795f; }
.day-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 14px; }
.card-header > div { min-width: 0; }
.card-header h2, .card-header h3 { margin-top: 3px; }
.card-icon { display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; width: 39px; height: 39px; border-radius: 12px; background: #f3f5ef; color: #66794b; }
.card-icon svg { width: 21px; height: 21px; }
.day-details .card { padding: 21px; }
.day-details .card h3 { margin: 9px 0 8px; line-height: 1.3; }
.day-details .card p { font-size: .89rem; color: var(--muted); line-height: 1.6; }
.day-details .meta-row { margin-top: 16px; }
.side-stack { display: grid; gap: 18px; }
.side-stack .card h3 { font-size: 1.07rem; }
.grocery-preview { list-style: none; padding: 0; margin: 11px 0 12px; }
.grocery-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f2ed; font-size: .9rem; }
.grocery-item:last-child { border-bottom: 0; }
.grocery-item > span:last-child, .grocery-item .quantity { color: var(--muted); flex-shrink: 0; font-size: .84rem; }
.grocery-item > span:first-child { min-width: 0; }
.baby-callout { background: var(--sage); border: 1px solid #dfeadd; border-radius: var(--radius); padding: 23px; }
.baby-callout .card-header { margin-bottom: 9px; }
.baby-callout .card-icon { background: #dce8d7; color: #567647; }
.baby-callout p { color: #4e6755; font-size: .9rem; line-height: 1.65; }
.baby-callout .text-button { color: #3a6044; padding-bottom: 0; }
.info-strip { display: flex; align-items: flex-start; gap: 11px; margin-top: 20px; padding: 15px 19px; background: #ecf0ea; border: 1px solid #e3e8df; border-radius: 14px; color: #536653; font-size: .87rem; line-height: 1.5; }
.info-strip .icon { width: 19px; height: 19px; margin-top: 2px; }
.prep-card { margin-top: 20px; }
.prep-card .card-header { margin-bottom: 12px; }
.prep-list { margin: 0; padding: 0; list-style: none; }
.prep-list li { padding: 11px 0; border-bottom: 1px solid #edf0e9; }
.prep-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.prep-list label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: .93rem; line-height: 1.6; }
.prep-list input[type="checkbox"] { flex-shrink: 0; margin-top: 3px; }
.prep-list input:checked + span { color: #87918a; text-decoration: line-through; text-decoration-color: #bac4bb; }
input[type="checkbox"], .checkbox { accent-color: var(--forest); width: 21px; height: 21px; cursor: pointer; margin: 0; border-radius: 6px; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 30px 0 15px; }
.section-title h2 { font-size: 1.2rem; }
.week-strip { display: flex; gap: 8px; overflow-x: auto; padding: 3px 1px 8px; scrollbar-width: thin; }
.day-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1 0 54px; min-height: 70px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 15px; background: #fff; font-size: .8rem; color: var(--muted); }
.day-chip b { font-size: 1.1rem; color: var(--ink); }
.day-chip.active { color: #fff; border-color: var(--forest); background: var(--forest); }
.day-chip.active b { color: #fff; }
.mini-week { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.mini-day { border: 1px solid var(--line); border-radius: 17px; background: #fff; padding: 18px; min-width: 0; text-align: left; }
.mini-day .eyebrow { font-size: .7rem; }
.mini-day h3, .mini-day strong { display: block; margin-top: 10px; font-size: .95rem; line-height: 1.4; }
.mini-day .meta, .mini-day p { margin-top: 9px; font-size: .8rem; color: var(--muted); }

.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 24px; }
.segmented { display: inline-flex; align-items: center; padding: 4px; gap: 3px; border: 1px solid var(--line); border-radius: 14px; background: #eaf0e8; }
.segmented button { min-height: 44px; border: 0; border-radius: 10px; padding: 8px 16px; background: transparent; color: #63715e; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.segmented button.active, .segmented button[aria-pressed="true"] { color: var(--forest); background: #fff; box-shadow: 0 2px 6px rgb(30 55 37 / 7%); }
.search-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 0 14px; min-height: 47px; }
.search-field .icon { color: #7d8b7d; width: 19px; height: 19px; }
.search-field input { border: 0; background: transparent; color: var(--ink); min-width: 0; width: 100%; min-height: 44px; outline: 0; font-size: .93rem; }
.search-field:focus-within { outline: 3px solid #e97849; outline-offset: 3px; }
.search-field input:focus-visible { outline: 0; }
.search-field input::placeholder { color: #899187; }
.filter-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-chips button { min-height: 44px; padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 99px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.filter-chips button.active { background: var(--forest); border-color: var(--forest); color: #fff; }

.shopping-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); align-items: start; gap: 24px; }
.shopping-main, .shopping-aside { min-width: 0; }
.shopping-aside { display: grid; gap: 18px; }
.shopping-progress { margin-bottom: 24px; padding: 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 19px; }
.shopping-progress .row { justify-content: space-between; margin-bottom: 12px; font-size: .92rem; }
.progress-track { height: 7px; background: #edf1e9; border-radius: 99px; overflow: hidden; }
.progress-track > span { display: block; background: var(--forest); height: 100%; border-radius: inherit; transition: width .25s ease; }
.shopping-group { background: #fff; border: 1px solid var(--line); border-radius: 19px; margin-bottom: 16px; overflow: hidden; }
.shopping-group h2 { margin: 0; padding: 18px 22px; font-size: .95rem; background: #fafbf8; border-bottom: 1px solid var(--line); }
.shopping-row { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto 38px; gap: 12px; align-items: center; min-height: 71px; padding: 13px 18px 13px 22px; border-bottom: 1px solid #eef1eb; }
.shopping-row:last-child { border-bottom: 0; }
.shopping-row label { min-width: 0; cursor: pointer; line-height: 1.35; padding: 3px 0; }
.ingredient-name { font-size: .95rem; font-weight: 560; }
.shopping-row label small { display: block; margin-top: 3px; color: var(--muted); font-size: .77rem; }
.quantity { font-variant-numeric: tabular-nums; white-space: nowrap; color: #657160; font-size: .87rem; }
.pantry-toggle { min-width: 38px; min-height: 44px; border: 0; background: transparent; border-radius: 9px; color: #84917e; font-size: .75rem; padding: 8px; }
.pantry-toggle .icon, .pantry-toggle svg { width: 19px; height: 19px; }
.pantry-toggle:hover { background: #eef3e9; color: var(--forest); }
.shopping-row.done { background: #fafcf8; }
.shopping-row.done .ingredient-name { color: #8d978b; text-decoration: line-through; text-decoration-color: #bec7b7; }
.shopping-row.done .quantity { color: #a4aea0; }
.shopping-row.in-pantry { background: #f2f6ee; }
.shopping-row.in-pantry .pantry-toggle { background: #dde9d5; color: #4b6a3b; }
.shopping-row.in-pantry .ingredient-name { color: #627858; }
.shopping-aside .card p { font-size: .9rem; color: var(--muted); }
.shopping-aside .card .button { margin-top: 16px; }
.shopping-aside ul { margin: 12px 0 0; font-size: .88rem; color: var(--muted); }
.shopping-aside li { margin: 8px 0; }
.shopping-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shopping-controls label { display: flex; gap: 9px; align-items: center; font-size: .88rem; }
.empty-state { text-align: center; background: #fff; border: 1px dashed #d4dfce; border-radius: 20px; padding: 50px 24px; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--ink); margin-bottom: 10px; }
.empty-state .icon { margin: 0 auto 15px; width: 32px; height: 32px; color: #839d70; }
.empty-state p { max-width: 430px; margin: 0 auto; }
.empty-state .button { margin-top: 20px; }
.notice { padding: 15px 18px; border: 1px solid #e1e9d8; border-radius: 14px; margin: 16px 0; color: #566a4f; background: #eff4e9; font-size: .88rem; line-height: 1.6; }
.notice a { color: inherit; }

.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.recipe-card { min-width: 0; border-radius: 20px; background: #fff; border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.recipe-card > button, button.recipe-card { display: block; padding: 0; border: 0; text-align: left; width: 100%; color: var(--ink); background: #fff; }
button.recipe-card { border: 1px solid var(--line); }
.recipe-card:hover { box-shadow: 0 7px 24px rgb(23 60 50 / 9%); }
.recipe-art { min-height: 130px; display: flex; align-items: center; justify-content: center; background: #e9f0e2; font-size: 3.4rem; position: relative; overflow: hidden; }
.recipe-art svg { width: 125px; height: 115px; }
.recipe-art .chip { position: absolute; top: 12px; left: 13px; background: rgb(255 255 255 / 88%); font-size: .71rem; }
.recipe-card:nth-child(4n+2) .recipe-art { background: #ffede3; }
.recipe-card:nth-child(4n+3) .recipe-art { background: #edf0fa; }
.recipe-card:nth-child(4n+4) .recipe-art { background: #faf0d7; }
.recipe-info { padding: 20px; }
.recipe-info h3 { font-size: 1.12rem; min-height: 2.5em; line-height: 1.3; }
.recipe-info p { margin-top: 8px; font-size: .87rem; color: var(--muted); }
.recipe-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; color: var(--muted); font-size: .79rem; margin-top: 14px; }
.recipe-meta > span { display: inline-flex; gap: 5px; align-items: center; }
.recipe-meta svg { width: 15px; height: 15px; }

.planning-list { display: grid; gap: 12px; }
.plan-day { display: grid; grid-template-columns: 67px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 22px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 19px; padding: 20px 22px; }
.plan-day.active, .plan-day.is-today { border-color: #b7cbb2; box-shadow: inset 3px 0 0 var(--forest); }
.date-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f0f4eb; border-radius: 13px; width: 60px; min-height: 67px; color: #5b7150; }
.date-badge b { color: var(--forest); font-size: 1.5rem; line-height: 1.2; }
.date-badge small { text-transform: uppercase; font-size: .7rem; font-weight: 650; letter-spacing: .055em; }
.meal-label { text-transform: uppercase; color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .08em; margin-bottom: 5px; }
.plan-day h3, .plan-day strong { font-size: .95rem; line-height: 1.4; }
.plan-day p { font-size: .81rem; color: var(--muted); margin-top: 5px; }
.plan-day .tag, .plan-day .pill { margin-top: 8px; font-size: .68rem; padding: 4px 8px; }
.plan-day .button { font-size: .82rem; }

dialog { padding: 0; border: 1px solid #dce3d6; border-radius: 25px; width: min(760px, calc(100% - 32px)); max-height: min(90dvh, 930px); color: var(--ink); background: #fff; box-shadow: 0 30px 100px rgb(7 28 17 / 25%); overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: rgb(15 32 24 / 50%); backdrop-filter: blur(5px); }
.dialog-shell { position: relative; padding: 30px; max-width: 760px; }
.close-dialog { position: absolute; top: 20px; right: 20px; z-index: 4; width: 44px; height: 44px; border: 1px solid var(--line); background: #f7f9f4; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.close-dialog:hover { background: #eaf0e2; }
.close-dialog svg { width: 21px; height: 21px; }
.dialog-header { padding-right: 45px; }
.dialog-header h2 { font-size: 1.85rem; line-height: 1.16; margin: 10px 0 12px; letter-spacing: -.04em; }
.dialog-header p { color: var(--muted); font-size: .95rem; }
.dialog-header .meta-row { margin-top: 15px; }
.dialog-tabs { display: flex; gap: 6px; padding: 4px; background: #f0f4eb; border-radius: 13px; margin: 23px 0; }
.dialog-tabs button { flex: 1; min-height: 44px; padding: 9px 13px; font-size: .88rem; font-weight: 650; border: 0; border-radius: 10px; background: transparent; color: #67785e; }
.dialog-tabs button.active, .dialog-tabs button[aria-selected="true"] { background: #fff; color: var(--forest); box-shadow: 0 2px 7px rgb(28 54 34 / 6%); }
.dialog-body { margin-top: 22px; }
.dialog-body h3 { font-size: 1.1rem; margin: 25px 0 13px; }
.dialog-body h3:first-child { margin-top: 0; }
.dialog-body > p { margin: 12px 0; font-size: .96rem; line-height: 1.7; }
.dialog-body .muted { font-size: .88rem; }
.ingredient-list { list-style: none; padding: 0; margin: 0 0 24px; }
.ingredient-list li { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #edf0e9; font-size: .95rem; }
.ingredient-list .quantity { font-weight: 600; font-size: .89rem; }
.ingredient-list small { color: var(--muted); }
.method-list { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.method-list li { display: flex; align-items: flex-start; gap: 13px; padding: 13px 0; font-size: .95rem; line-height: 1.7; }
.step-number { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; flex: 0 0 28px; align-items: center; justify-content: center; margin-top: 1px; background: #eef3e7; color: #536b44; font-size: .78rem; font-weight: 700; }
.method-list li > div, .method-list li > p { min-width: 0; }
.baby-note, .storage-note { padding: 19px 21px; margin: 18px 0; border-radius: 15px; background: var(--sage); color: #4c6854; font-size: .93rem; line-height: 1.7; }
.baby-note h3, .storage-note h3 { color: #33573d; margin: 0 0 9px; }
.baby-note ul, .storage-note ul { padding-left: 20px; margin-bottom: 0; }
.baby-note li, .storage-note li { margin: 7px 0; }
.storage-note { background: #f4f6ef; color: #64705b; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.modal-actions .button { flex: 1; }
.settings-actions { display: grid; gap: 12px; margin-top: 20px; }
.settings-actions .button { justify-content: flex-start; }
.settings-actions label { font-size: .9rem; }
.settings-actions input:not([type="checkbox"]), .dialog-body input:not([type="checkbox"]), .dialog-body select, .dialog-body textarea { width: 100%; min-height: 46px; padding: 10px 12px; background: #fff; border: 1px solid #dce3d5; border-radius: 11px; margin: 7px 0 12px; color: var(--ink); }
.dialog-body select { appearance: none; padding-right: 37px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23536b44' stroke-width='2' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-position: right 13px center; background-repeat: no-repeat; }
.dialog-body textarea { resize: vertical; min-height: 95px; }
.dialog-body .row > * { min-width: 0; }
.toast { position: fixed; z-index: 50; bottom: 28px; left: 50%; transform: translate(-50%, 12px); max-width: min(480px, calc(100% - 36px)); padding: 14px 22px; border: 1px solid #42664e; border-radius: 15px; background: var(--forest-deep); color: #fff; text-align: center; font-size: .91rem; box-shadow: 0 8px 25px rgb(11 34 19 / 20%); opacity: 0; visibility: hidden; transition: opacity .16s ease, transform .16s ease, visibility .16s; }
.toast.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 0 28px; border-top: 1px solid var(--line); color: #82907c; font-size: .77rem; }
.app-footer .text-button { font-size: .79rem; min-height: 35px; color: #738269; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }

@media (min-width: 761px) and (max-width: 1040px) {
  #shell { padding: 0 24px; }
  .brand-caption { display: none; }
  .nav-item { padding: 10px 11px; }
  .today-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
  .hero-card { padding: 25px; }
  .hero-content { max-width: 85%; }
  .hero-illustration { opacity: .55; }
  .hero-actions .button { padding: 11px 13px; font-size: .84rem; }
  .day-details { gap: 12px; }
  .day-details .card { padding: 17px; }
  .recipe-grid { gap: 15px; }
  .recipe-info { padding: 16px; }
  .plan-day { gap: 15px; padding: 18px; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  #shell { padding: 0 18px; }
  .app-header { min-height: 84px; }
  .brand { font-size: 1.85rem; gap: 11px; }
  .brand-caption { font-size: .73rem; max-width: 90px; }
  .app-header > .icon-button { background: transparent; border-color: #e4e8df; }
  .main-nav { position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; right: 0; transform: none; gap: 0; padding: 8px 10px calc(7px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #e2e8dd; background: rgb(255 255 255 / 96%); backdrop-filter: blur(16px); box-shadow: 0 -3px 20px rgb(24 52 33 / 4%); }
  .nav-item { flex: 1; flex-direction: column; gap: 5px; min-height: 57px; padding: 7px 4px; border-radius: 12px; font-size: .69rem; letter-spacing: .01em; font-weight: 650; }
  .nav-item .icon, .nav-item > svg { width: 22px; height: 22px; }
  .nav-item.active, .nav-item[aria-current="page"], .nav-item[aria-selected="true"] { background: #eff4e9; }
  #app { padding-top: 12px; padding-bottom: 22px; min-height: calc(100dvh - 225px); }
  .page-heading { flex-wrap: wrap; align-items: center; gap: 17px; margin-bottom: 23px; }
  .page-heading h1 { margin-top: 7px; font-size: 2.1rem; letter-spacing: -.055em; }
  .page-heading p { font-size: .92rem; margin-top: 9px; }
  .page-heading > div:first-child { flex: 1 1 100%; }
  .eyebrow { font-size: .72rem; }
  .date-switcher { width: 100%; justify-content: space-between; gap: 8px; }
  .date-switcher input[type="date"] { flex: 1; max-width: none; padding: 9px 13px; font-size: .91rem; }
  .date-switcher .date-label { flex: 1; }
  .today-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-card { min-height: 342px; padding: 23px; border-radius: 23px; }
  .hero-top { margin-bottom: 24px; }
  .hero-content { max-width: 80%; }
  .hero-content h2 { font-size: 2.1rem; max-width: 270px; }
  .hero-content .recipe-desc { font-size: .91rem; max-width: 240px; }
  .hero-illustration { top: 105px; right: -27px; width: 175px; max-width: 47%; opacity: .72; }
  .hero-actions { gap: 8px; margin-top: 23px; }
  .hero-actions .button { padding: 12px 14px; font-size: .85rem; }
  .hero-actions .button.primary { flex-grow: 1; }
  .hero-actions .button.light { flex-grow: 1; }
  .day-details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
  .day-details .card { padding: 17px; border-radius: 18px; }
  .day-details .card-header { gap: 8px; }
  .day-details .card h3 { font-size: 1rem; }
  .day-details .card p { font-size: .83rem; }
  .day-details .card-icon { width: 32px; height: 32px; border-radius: 9px; }
  .day-details .card-icon svg { width: 18px; height: 18px; }
  .day-details .meta-row { gap: 7px; }
  .day-details .meta { font-size: .77rem; }
  .day-details .text-button { font-size: .8rem; }
  .card, .baby-callout { padding: 21px; border-radius: 20px; }
  .side-stack { gap: 16px; }
  .grocery-preview { margin-top: 7px; }
  .grocery-item { padding: 11px 0; }
  .info-strip { margin-top: 15px; padding: 15px 16px; font-size: .84rem; }
  .prep-card { margin-top: 16px; }
  .prep-list label { font-size: .91rem; }
  .section-title { margin-top: 27px; gap: 13px; }
  .section-title h2 { font-size: 1.15rem; }
  .section-title .text-button { font-size: .8rem; }
  .mini-week { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mini-day { padding: 16px; }
  .week-strip { gap: 6px; }
  .day-chip { min-width: 40px; flex-basis: 40px; padding: 8px 6px; border-radius: 12px; font-size: .73rem; min-height: 64px; }
  .toolbar { gap: 14px; margin-bottom: 20px; }
  .toolbar > .search-field { width: 100%; }
  .toolbar > .segmented { width: 100%; }
  .segmented button { padding: 9px 12px; flex: 1; font-size: .82rem; }
  .search-field input { font-size: 1rem; }
  .filter-chips { gap: 7px; }
  .filter-chips button { padding: 8px 12px; }
  .shopping-layout { display: flex; flex-direction: column; gap: 20px; }
  .shopping-main, .shopping-aside { width: 100%; }
  .shopping-progress { padding: 19px; margin-bottom: 18px; }
  .shopping-group { border-radius: 17px; }
  .shopping-group h2 { padding: 16px 18px; }
  .shopping-row { grid-template-columns: 22px minmax(0, 1fr) auto 35px; gap: 9px; padding: 13px 12px 13px 17px; min-height: 75px; }
  .ingredient-name { font-size: .91rem; }
  .shopping-row label small { font-size: .73rem; }
  .shopping-row .quantity { font-size: .81rem; }
  .pantry-toggle { padding: 8px; min-width: 35px; }
  .shopping-controls { width: 100%; }
  .shopping-controls > .button { flex: 1; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .recipe-card { border-radius: 17px; }
  .recipe-art { min-height: 110px; font-size: 2.8rem; }
  .recipe-art svg { width: 100px; height: 94px; }
  .recipe-info { padding: 15px; }
  .recipe-info h3 { font-size: .98rem; line-height: 1.3; }
  .recipe-info p { font-size: .8rem; }
  .recipe-meta { font-size: .72rem; gap: 6px; margin-top: 12px; }
  .recipe-art .chip { top: 10px; left: 10px; font-size: .64rem; padding: 5px 8px; }
  .plan-day { grid-template-columns: 51px minmax(0, 1fr) auto; gap: 12px; padding: 17px 15px; border-radius: 17px; align-items: start; }
  .date-badge { width: 47px; min-height: 60px; border-radius: 11px; grid-row: span 2; }
  .date-badge b { font-size: 1.3rem; }
  .date-badge small { font-size: .64rem; }
  .plan-day > :nth-child(2) { grid-column: 2; }
  .plan-day > :nth-child(3) { grid-column: 2; }
  .plan-day > .button, .plan-day > .icon-button, .plan-day > :last-child:not(:nth-child(3)) { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .plan-day h3, .plan-day strong { font-size: .9rem; }
  .plan-day .button { min-height: 44px; padding: 9px; font-size: .74rem; }
  .meal-label { font-size: .66rem; }
  dialog { width: calc(100% - 20px); max-height: calc(100dvh - 38px); border-radius: 23px; }
  .dialog-shell { padding: 25px 21px; }
  .dialog-header { padding-right: 32px; }
  .dialog-header h2 { font-size: 1.65rem; margin-top: 9px; }
  .dialog-header p { font-size: .9rem; }
  .close-dialog { top: 14px; right: 13px; width: 44px; height: 44px; }
  .dialog-tabs { gap: 3px; margin: 20px 0; }
  .dialog-tabs button { padding: 9px 8px; font-size: .82rem; }
  .dialog-body { margin-top: 18px; }
  .method-list li { font-size: .91rem; gap: 11px; }
  .ingredient-list li { font-size: .9rem; }
  .baby-note, .storage-note { padding: 17px; font-size: .89rem; }
  .modal-actions { gap: 9px; }
  .modal-actions .button { flex-basis: 100%; }
  .dialog-body input:not([type="checkbox"]), .dialog-body select, .dialog-body textarea { font-size: 1rem; }
  .toast { bottom: calc(91px + env(safe-area-inset-bottom, 0px)); font-size: .86rem; padding: 12px 17px; }
  .app-footer { padding: 18px 0 8px; align-items: flex-start; font-size: .71rem; gap: 14px; }
  .app-footer .text-button { font-size: .73rem; min-height: 30px; }
}

@media (max-width: 360px) {
  #shell { padding: 0 13px; }
  .hero-card { padding: 21px; }
  .hero-content { max-width: 92%; }
  .hero-illustration { opacity: .28; }
  .hero-content h2 { font-size: 1.95rem; }
  .day-details { grid-template-columns: 1fr; }
  .recipe-grid { gap: 10px; }
  .recipe-info { padding: 12px; }
  .recipe-info h3 { font-size: .9rem; }
  .shopping-row { gap: 7px; padding-left: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  body { padding: 0; background: #fff; color: #000; }
  #shell { max-width: none; padding: 0; }
  .app-header { min-height: 65px; }
  .main-nav, .app-header > button, .app-footer, .date-switcher, .toolbar, .pantry-toggle, .toast, .shopping-aside, .hero-actions, .text-button { display: none !important; }
  #app { padding: 0; }
  .shopping-layout { display: block; }
  .shopping-row, .card, .recipe-card, .plan-day { break-inside: avoid; box-shadow: none; }
  .shopping-group { border-color: #bbb; }
  .shopping-row.done, .shopping-row.in-pantry { display: none; }
  .shopping-row { grid-template-columns: 22px 1fr auto; }
}

/* Layout for the live component templates. */
.brand { display: inline-flex; gap: 0; color: var(--forest); text-decoration: none; }
.brand > span { color: var(--coral); }
.app-header > .brand-caption { position: absolute; left: 147px; top: 41px; max-width: 119px; font-size: .79rem; }
.app-header > .settings-button { margin-left: auto; }
.card > .section-title { margin: 0 0 16px; }
.card.grocery-preview { padding: 23px; margin: 0; }
.card.grocery-preview > p { font-size: .93rem; margin-bottom: 10px; }
.grocery-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; }
.grocery-item > span:last-of-type { color: var(--ink); font-size: .9rem; }
.grocery-item > strong { color: var(--muted); font-weight: 550; font-size: .875rem; white-space: nowrap; }
.preview-dot { width: 7px; height: 7px; background: #e6edde; border-radius: 50%; }
.card.grocery-preview > .button { width: 100%; margin-top: 16px; }
.hero-secondary { background: rgb(255 255 255 / 5%); color: #fff; border-color: rgb(255 255 255 / 24%); }
.hero-secondary:hover { background: rgb(255 255 255 / 14%); }
.hero-content { max-width: none; width: 100%; }
.hero-content > div:first-child { width: 74%; position: relative; z-index: 1; }
.hero-content .eyebrow { color: #bad1c1; margin-bottom: 9px; }
.hero-content .hero-illustration { top: -4px; right: -17px; width: 210px; max-width: 41%; z-index: 0; }
.hero-content .hero-illustration svg { width: 100%; height: auto; }
.mini-week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-day > .small { display: block; margin-top: 9px; font-size: .875rem; }
.freezer-shortcut { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; }
.freezer-shortcut > span:nth-child(2) { flex: 1; min-width: 0; }
.freezer-shortcut strong, .freezer-shortcut small { display: block; }
.freezer-shortcut strong { font-size: 1rem; }
.freezer-shortcut small { font-size: .875rem; margin-top: 3px; color: var(--muted); }
.freezer-shortcut:hover { background: #fbfcf9; border-color: #cbd9c3; }
.plain-list { list-style: none; padding: 0; margin: 18px 0; }
.plain-list li { display: flex; align-items: flex-start; gap: 11px; margin: 13px 0; }
.plain-list .icon { margin-top: 2px; color: #718d61; }
.plain-list strong { font-size: .92rem; color: var(--ink); }
.plain-list small { display: block; margin-top: 4px; color: var(--muted); font-size: .875rem; }
.plan-day { grid-template-columns: 64px minmax(0, 1fr) 44px; }
.plan-day.selected { border-color: #b7cbb2; box-shadow: inset 3px 0 0 var(--forest); }
.plan-day .date-badge { border: 0; }
.plan-meals { display: grid; grid-template-columns: 1fr 1.15fr; align-items: start; gap: 12px 25px; }
.plan-meals > p { grid-column: 1 / -1; margin: 0; }
.plan-meals > div { min-width: 0; }
.plan-meals .meal-label { display: block; font-size: .75rem; }
.plan-meals > div > p { color: var(--ink); font-size: .95rem; line-height: 1.5; }
.meal-name { display: block; border: 0; padding: 0; text-align: left; background: transparent; color: var(--forest); font-size: .95rem; font-weight: 650; min-height: 30px; line-height: 1.45; }
.meal-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.plan-meals .chip { font-size: .78rem; margin-top: 7px; }
.plan-meals .chip.cook { background: var(--coral-pale); color: #b4472b; }
.day-chip strong { color: inherit; font-size: .9rem; }
.day-chip > span { font-size: .875rem; }
.planning-list { margin-top: 15px; }
.recipe-grid { margin-top: 22px; }
.recipe-art { gap: 12px; }
.recipe-art > span:first-child { font-size: 3.4rem; }
.recipe-art .recipe-category { position: absolute; top: 13px; left: 13px; font-size: .875rem; line-height: 1.3; font-weight: 600; border-radius: 99px; padding: 6px 10px; color: #536747; background: rgb(255 255 255 / 84%); }
.recipe-info h2 { font-size: 1.12rem; line-height: 1.3; min-height: 2.6em; }
.recipe-meta { font-size: .875rem; }
.shopping-group.card { padding: 0; }
.shopping-row { grid-template-columns: 23px minmax(0, 1fr) auto 74px; }
.pantry-toggle { min-width: 65px; padding: 7px 4px; font-size: .875rem; }
.inline-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: .875rem; cursor: pointer; }
.inline-check input { flex-shrink: 0; margin-top: 1px; }
.date-input-label { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.date-input-label input[type="date"] { min-height: 44px; border: 1px solid var(--line); padding: 8px 11px; border-radius: 11px; color: var(--ink); background: #fff; font-size: .92rem; }
.add-item-form > label { display: block; font-size: .95rem; font-weight: 600; margin-bottom: 11px; }
.add-item-form input { width: 100%; min-width: 0; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 1rem; }
.pantry-details { margin-top: 18px; }
.pantry-details summary { font-size: .95rem; font-weight: 650; cursor: pointer; }
.pantry-details > p { margin: 13px 0; }
.pantry-details .shopping-row { margin: 0 -12px; }
.carryover { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.carryover strong, .carryover small { display: block; }
.carryover small { margin-top: 4px; font-size: .875rem; color: var(--muted); }
.method-list li > label { width: 100%; display: grid; grid-template-columns: 22px 28px minmax(0, 1fr); align-items: start; gap: 11px; cursor: pointer; }
.method-list li input { margin-top: 5px; }
.method-list li input:checked ~ span:last-child { color: #85937d; text-decoration: line-through; text-decoration-color: #bdc9b5; }
.storage-note { display: flex; align-items: flex-start; gap: 13px; }
.storage-note > .icon { margin-top: 3px; color: #789267; }
.baby-note > .icon { margin-bottom: 14px; }
.portion-note { padding: 13px 16px; margin-bottom: 18px; border-radius: 13px; background: #f3f6ed; font-size: .9rem; color: #66765a; }
.settings-section { margin: 0 0 25px; }
.settings-section + .settings-section { padding-top: 22px; border-top: 1px solid var(--line); }
.settings-section p { font-size: .95rem; line-height: 1.7; margin-top: 11px; }
.guide-list li, .source-list li { margin: 11px 0; }
.guide-list { padding-left: 21px; line-height: 1.7; }
.source-list { font-size: .9rem; }
.freezer-list { margin: 20px 0; }
.freezer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.freezer-row > div { min-width: 0; }
.freezer-row small { display: block; font-size: .875rem; color: var(--muted); margin-top: 4px; }
.freezer-row .button { flex-shrink: 0; }
.compact { padding: 11px 16px; margin-top: 0; }
.skip-link:focus-visible { width: auto; height: auto; clip: auto; margin: 0; padding: 10px 18px; top: 5px; left: 10px; z-index: 99; background: #fff; border-radius: 10px; }

@media (max-width: 1100px) {
  .app-header > .brand-caption { display: none; }
}
@media (max-width: 760px) {
  .nav-item { font-size: .875rem; }
  .card.grocery-preview { padding: 21px; }
  .hero-content > div:first-child { width: 100%; padding-right: 20px; }
  .hero-content .hero-illustration { top: 8px; right: -30px; width: 170px; max-width: 50%; opacity: .25; }
  .hero-actions .hero-secondary { flex-grow: 1; }
  .hero-content .eyebrow { font-size: .75rem; }
  .mini-week { grid-template-columns: 1fr; gap: 10px; }
  .mini-day { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 5px 12px; align-items: center; }
  .mini-day > .eyebrow { grid-row: span 2; }
  .mini-day > strong { margin: 0; }
  .mini-day > .small { margin: 0; }
  .plan-day { grid-template-columns: 49px minmax(0, 1fr) 44px; gap: 12px; }
  .plan-day > .date-badge { grid-column: 1; grid-row: 1; }
  .plan-day > .plan-meals { grid-column: 2; grid-row: 1; }
  .plan-day > .icon-button { grid-column: 3; grid-row: 1; align-self: start; }
  .plan-meals { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .meal-name { min-height: 40px; font-size: .92rem; }
  .plan-meals > div > p { font-size: .92rem; }
  .plan-meals .chip { font-size: .75rem; }
  .day-chip { min-width: 94px; }
  .recipe-art { min-height: 128px; padding-top: 25px; }
  .recipe-art > span:first-child { font-size: 2.8rem; }
  .recipe-art .recipe-category { font-size: .875rem; padding: 5px 8px; top: 9px; left: 9px; }
  .recipe-info h2 { font-size: 1rem; }
  .recipe-meta { font-size: .875rem; }
  .shopping-row { grid-template-columns: 22px minmax(0, 1fr) auto 66px; padding-left: 15px; padding-right: 9px; gap: 8px; }
  .pantry-toggle { font-size: .875rem; min-width: 63px; }
  .shopping-row .quantity { font-size: .875rem; }
  .shopping-row label small { font-size: .76rem; }
  .date-switcher > .date-input-label { flex: 1; }
  .date-switcher input[type="date"] { width: 100%; }
  .shopping-toolbar > .date-input-label { width: 100%; }
  .shopping-toolbar > .date-input-label input { flex: 1; }
  .add-item-form .row { gap: 9px; }
  .add-item-form .button { padding-left: 12px; padding-right: 12px; }
  .card > .section-title { flex-wrap: wrap; gap: 7px 14px; }
  .method-list li > label { grid-template-columns: 22px 25px minmax(0,1fr); gap: 8px; }
  .freezer-row { flex-wrap: wrap; gap: 10px; }
  .freezer-row .button { min-height: 44px; }
}
