:root {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #192920;
  background: #f4f6f3;
  color-scheme: light;
  accent-color: #2d754f;
  --ink: #192920;
  --muted: #53655a;
  --green: #206544;
  --deep: #12271d;
  --paper: #fff;
  --line: #dde5de;
  --tint: #ecf4ed;
  --lime: #d4f490;
  --radius: 16px;
  --sidebar: 216px;
  --focus-ring: #278258;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding-inline-start: var(--sidebar); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p, ol, ul { margin-block: 0; }
h2, h3 { line-height: 1.25; }
h2 { font-size: 1.12rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; letter-spacing: -.015em; }
p { text-wrap: pretty; }
small { font-size: .8rem; color: var(--muted); }
svg { display: block; }
.icon { flex: none; width: 20px; height: 20px; }
.shell { width: min(100% - 4rem, 70rem); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .6rem 1rem; transform: translateY(-160%); background: var(--paper); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.daily-view :focus { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.daily-view input, .daily-view select { border-color: var(--muted); }

.site-header {
  position: fixed; z-index: 3; inset: 0 auto 0 0; width: var(--sidebar); overflow-y: auto;
  color: #f3faef; background: var(--deep);
}
.header-content {
  width: 100%; min-height: 100%; display: flex; flex-direction: column; align-items: stretch;
  padding: 1.45rem .85rem .9rem;
}
.brand {
  display: flex; align-items: center; gap: .67rem; padding-inline: .37rem;
  font-weight: 790; font-size: 1.23rem; letter-spacing: -.045em; line-height: 1.1;
}
.brand-mark { flex: none; width: 42px; height: 42px; padding: 4px; border-radius: 12px; background: var(--lime); color: var(--deep); }
.brand small { display: block; margin-top: .31rem; color: #aec1b2; font-size: .57rem; font-weight: 700; letter-spacing: .12em; }
nav { display: grid; gap: .3rem; margin-block: 2.05rem 1rem; }
nav button {
  min-width: 0; justify-content: flex-start; gap: .65rem; padding: .62rem .67rem; width: 100%;
  background: transparent; color: #c2d4c6; border-color: transparent; font-size: .89rem;
}
nav button:hover { background: #213b2c; border-color: #213b2c; color: #fff; }
nav [aria-current] { background: #2a4432; border-color: #395941; color: #efffd8; }
nav [aria-current] .icon { color: var(--lime); }
nav button .icon { width: 19px; height: 19px; }
.connection {
  display: flex; align-items: center; gap: .48rem; padding: .55rem .62rem; margin-top: auto; border-radius: 10px;
  color: #d2dfd3; background: #203a2b; font-size: .73rem; font-weight: 650;
}
.connection-dot { width: .46rem; height: .46rem; border-radius: 50%; background: #e0b968; flex: none; }
.connection[data-shared="true"] .connection-dot { background: #a8e884; }
main { padding-block: clamp(1.7rem, 4vw, 3rem) 3.8rem; }
main:focus { outline: 0; }

.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 3rem; align-items: center; min-height: 80vh; }
.auth-intro h1 { font-size: clamp(2.2rem, 4.5vw, 3.7rem); letter-spacing: -.055em; line-height: 1.08; margin: .65rem 0 1rem; }
.auth-intro > p { color: var(--muted); max-width: 38ch; }
.auth-art { width: min(100%, 350px); margin: 1rem auto; color: #7d986d; }
.auth-benefits { display: grid; gap: .65rem; font-size: .88rem; color: var(--muted); }
.auth-benefits span { display: flex; align-items: center; gap: .65rem; }
.auth-card { display: grid; gap: .9rem; }
.auth-card > p { color: var(--muted); }
.auth-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.card.recovery-card { display: grid; gap: .8rem; border-color: #8dad67; background: #f3f8e8; }
.invite-card { display: grid; gap: .8rem; }
.nutrition-form fieldset, .balanced-guide, .energy-card { display: grid; gap: .8rem; }
.profile-preferences { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.energy-value { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 760; letter-spacing: -.04em; color: var(--green); }
.energy-value small { display: block; letter-spacing: 0; font-weight: 500; }
.energy-card dl { margin: 0; display: grid; gap: .5rem; }
.energy-card dl > div { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.energy-card dt { color: var(--muted); }
.energy-card dd { margin: 0; font-weight: 650; }
.energy-card a, .balanced-guide a { color: var(--green); text-underline-offset: .15em; }
.nutrient-panel { margin-top: .75rem; }
.nutrient-caption { color: var(--muted); font-size: .76rem; }
.nutrient-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .5rem; margin: .5rem 0; }
.nutrient-grid > div { padding: .5rem; border: 1px solid var(--line); border-radius: 8px; background: #f6f9f5; }
.nutrient-grid dt { font-size: .68rem; color: var(--muted); }
.nutrient-grid dd { margin: .15rem 0 0; font-size: 1rem; font-weight: 700; }
.nutrient-sources { font-size: .76rem; }
.nutrient-sources p, .nutrient-sources ul { margin-top: .4rem; }
.nutrient-sources ul { padding-inline-start: 1rem; }
.nutrient-sources a { color: var(--green); }
.adult-meal-nutrients { font-size: .78rem; margin-top: .55rem; }
.portion-planner, .portion-preview { display: grid; gap: .8rem; }
.portion-preview { padding: .8rem; border: 1px solid #a4c695; border-radius: 10px; background: #f5faef; }
.daily-date { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem; margin-bottom: 1rem; }
.daily-date label { flex: 1 1 12rem; }
.daily-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .6rem; }
#daily-form > fieldset { margin-top: 1rem; }
#daily-form fieldset { display: grid; gap: .7rem; }
.daily-coverage { list-style: none; padding: 0; }
.daily-coverage li { display: grid; gap: .25rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.daily-coverage span { font-size: .85rem; }
.shopping-actions { margin-bottom: .7rem; flex-wrap: wrap; }
.shopping-snapshot-hint { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
.shopping-copy-fallback { margin-top: 1rem; }
.shopping-copy-fallback textarea { width: 100%; resize: vertical; }
.shopping-view :focus { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.shopping-print { display: none; }
.shopping-product-note { display: block; font-weight: 400; font-size: .85em; }
.shopping-sources-hint { color: var(--muted); font-size: .85rem; margin-block: .5rem; }
.shopping-group { margin-top: 1.1rem; }
.shopping-group h3 { color: var(--muted); margin-bottom: .25rem; }
.shopping-items { list-style: none; padding: 0; }
.shopping-items > li { padding-block: .65rem; border-bottom: 1px solid var(--line); }
.shopping-items > li:last-child { border-bottom: 0; }
.shopping-items summary { cursor: pointer; }
.shopping-item-line { display: inline-flex; width: calc(100% - 1.5rem); justify-content: space-between; gap: .6rem; vertical-align: top; }
.shopping-item-line > span, .shopping-source-entry > span { min-width: 0; overflow-wrap: anywhere; }
.shopping-items strong { flex: none; white-space: nowrap; font-size: .88rem; font-variant-numeric: tabular-nums; }
.shopping-source-list { display: grid; gap: .65rem; padding-inline-start: 1.4rem; margin-block: .7rem .2rem; }
.shopping-source-list time { color: var(--muted); font-size: .8rem; }
.shopping-source-entry { display: flex; justify-content: space-between; gap: .6rem; }
.stock-panel { margin-bottom: 1rem; }
.stock-panel > p, .stock-panel > details { margin-top: .7rem; }
.stock-panel fieldset { margin-top: .8rem; }
.stock-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .8rem; margin-block: .8rem; }
.stock-fields input { width: 100%; }
.stock-breakdown { margin-block: .6rem; font-size: .85rem; }
.stock-breakdown > div { display: flex; justify-content: space-between; gap: .8rem; }
.stock-breakdown dd { margin: 0; text-align: right; white-space: nowrap; }
@media print {
  html:has(body[data-view="shop"]) { background: var(--paper); }
  body[data-view="shop"] { padding: 0; background: var(--paper); color: var(--ink); }
  body[data-view="shop"] .site-header,
  body[data-view="shop"] .skip-link,
  body[data-view="shop"] #status,
  body[data-view="shop"] .shopping-screen { display: none !important; }
  body[data-view="shop"] main { padding: 0; margin: 0; width: auto; max-width: none; }
  body[data-view="shop"] .shopping-print { display: block; font-size: 11pt; }
  .shopping-print h1 { font-size: 20pt; margin-bottom: .5rem; }
  .shopping-print p { margin-block: .5rem; }
  .shopping-print table { width: 100%; border-collapse: collapse; margin-block: 1rem; }
  .shopping-print caption { text-align: left; font-weight: 700; margin-bottom: .5rem; }
  .shopping-print th, .shopping-print td { text-align: left; padding: .45rem .2rem; border-bottom: 1px solid var(--line); }
  .shopping-print .shopping-print-amount { text-align: right; white-space: nowrap; }
  .shopping-print tr { break-inside: avoid; }
  .shopping-print tbody { break-inside: avoid; }
  .shopping-print-group { break-after: avoid; }
  .shopping-print-group th { padding-top: 1rem; border-bottom-width: 2px; }
  .shopping-print .stock-table { font-size: 10pt; }
}
.recovery-code { display: block; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; user-select: all; font-size: .95rem; }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; gap: 1.5rem; min-height: auto; max-width: 460px; margin-inline: auto; }
  .auth-art, .auth-benefits { display: none; }
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .46rem;
  min-height: 44px; padding: .52rem .78rem; border: 1px solid #236746; border-radius: 9px;
  background: #236746; color: #fff; cursor: pointer; font-size: .85rem; font-weight: 710;
  line-height: 1.25; transition: background .15s, border-color .15s, color .15s;
}
button:hover { background: #184f34; border-color: #184f34; }
button .icon { width: 17px; height: 17px; }
button.secondary { background: var(--paper); border-color: #d8e3da; color: #2c583d; }
button.secondary:hover { background: var(--tint); border-color: #c4d9c9; }
button.quiet { color: #4b6052; background: transparent; border-color: transparent; }
button.quiet:hover { background: var(--tint); border-color: transparent; }
button.icon-button { width: 44px; padding: 0; }
button.text-button { justify-content: flex-start; color: var(--green); background: transparent; border-color: transparent; padding-inline: 0; }
button.text-button:hover { text-decoration: underline; }
button:disabled { opacity: .55; cursor: default; }

.eyebrow { color: #496052; font-size: .68rem; line-height: 1.4; font-weight: 770; letter-spacing: .105em; text-transform: uppercase; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: .85rem; flex-wrap: wrap; margin-bottom: 1.28rem; }
.page-heading h1 { margin: .18rem 0 .38rem; font-size: clamp(2.1rem, 4.8vw, 3.38rem); font-weight: 780; line-height: 1.03; letter-spacing: -.056em; }
.page-heading p { color: var(--muted); max-width: 52ch; font-size: .94rem; }

.assistant-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; padding: .87rem 1rem;
  border: 1px solid #cce3c9; border-radius: var(--radius); background: linear-gradient(106deg, #e6f2e6, #e7f5d1);
}
.assistant-card::after {
  content: ''; position: absolute; inset: 50% -.3rem auto auto; z-index: -1;
  transform: translateY(-50%); width: 16rem; aspect-ratio: 1;
  background: repeating-radial-gradient(circle, transparent 0 12px, #7fa37a30 13px 14px, transparent 15px 25px);
  mask-image: linear-gradient(90deg, transparent, #000);
}
.assistant-mark { display: grid; place-items: center; flex: none; width: 45px; height: 45px; border-radius: 12px; color: #ecffe0; background: #295a3d; }
.assistant-mark .icon { width: 23px; height: 23px; }
.assistant-copy { flex: 1; min-width: 0; }
.assistant-copy p { margin-top: .18rem; color: #405b47; font-size: .86rem; }
.assistant-card button { flex: none; }

.week-board { margin: 1rem 0; padding: .87rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.week-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .75rem; }
.week-title { display: grid; gap: .18rem; }
.week-title h2 { font-size: clamp(1.08rem, 3vw, 1.43rem); font-weight: 780; letter-spacing: -.04em; }
.week-switch { display: flex; align-items: center; gap: .3rem; }
.week-switch button { min-height: 40px; }
.week-switch .icon-button { width: 40px; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.week-day {
  display: grid; gap: .12rem; justify-items: center; padding: .37rem .1rem; min-width: 0;
  color: #415749; background: #f3f6f3; border-color: #edf1ed;
}
.week-day span { font-size: .65rem; text-transform: uppercase; }
.week-day strong { color: var(--ink); font-size: 1.13rem; font-variant-numeric: tabular-nums; }
.week-day i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.week-day.is-planned i { background: #2b7852; }
.week-day[aria-current] { color: #245a3d; background: #e4f0e5; border-color: #b6d6bb; }
.week-day:hover { background: #e5f0e5; border-color: #c7ddcb; }

.plan-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(220px, 1fr); gap: .9rem; align-items: start; }
.week-days, .week-aside, .stack { display: grid; gap: .67rem; min-width: 0; }
.card { min-width: 0; padding: 1rem; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); overflow-wrap: anywhere; }
.card > :is(h2, h3, p) + :is(p, ol, ul, details, .actions, .quantities, form) { margin-top: .55rem; }
.day-card {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .8rem; align-items: center;
  min-height: 76px; padding: .67rem .82rem; scroll-margin-block: 1rem 5rem;
}
.day-card.current { border-color: #a8ceb0; box-shadow: inset 3px 0 #62a276; }
.day-card.editing { align-items: start; }
.date-chip { display: grid; place-items: center; align-content: center; min-height: 48px; gap: .04rem; border-radius: 9px; background: #eff3ef; color: #486151; }
.current .date-chip { background: #e0f0e3; color: #22583a; }
.date-chip span { font-size: .62rem; font-weight: 770; text-transform: uppercase; letter-spacing: .055em; }
.date-chip strong { font-size: 1.2rem; font-weight: 780; line-height: 1.08; font-variant-numeric: tabular-nums; }
.day-detail { min-width: 0; }
.day-detail p { margin-top: .16rem; font-size: .8rem; color: var(--muted); }
.day-labels { display: flex; flex-wrap: wrap; align-items: center; gap: .28rem; margin-bottom: .14rem; }
.day-labels .eyebrow { font-size: .6rem; }
.day-actions { justify-content: flex-end; }
.day-actions button { font-size: .78rem; }
.day-editor { grid-column: 2 / -1; width: 100%; }
.day-editor h3 { margin-bottom: .62rem; }
.day-editor .actions { margin-top: .25rem; }
.badge { display: inline-flex; align-items: center; gap: .24rem; width: fit-content; padding: .17rem .48rem; border-radius: 6px; background: #eaf2ea; color: #3d5c46; font-size: .69rem; font-weight: 700; }
.badge.warm { background: #fff0d3; color: #775524; }
.badge .icon { width: 12px; height: 12px; }
.aside-title { display: flex; align-items: center; gap: .55rem; margin-bottom: .48rem; }
.icon-tile { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; color: var(--green); background: #e7f2e8; }
.aside-card p { color: var(--muted); font-size: .83rem; }
.aside-card .actions { margin-top: .65rem; }
.aside-card .actions button { width: 100%; }
.count-bar { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; margin-block: .65rem .55rem; }
.count-bar span { height: 5px; border-radius: 6px; background: #e9efe9; }
.count-bar .filled { background: #78ac82; }
.aside-card.shop-card { background: #edf5ed; border-color: #d9e9d9; }

.cards { display: grid; gap: .8rem; }
.recipe-tools {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-bottom: .85rem; padding: .62rem;
}
.recipe-search { position: relative; flex: 1; min-width: min(12rem, 100%); }
.recipe-search .icon { position: absolute; top: .77rem; left: .66rem; pointer-events: none; width: 18px; height: 18px; color: #537462; }
.recipe-search input[type=search] { padding-inline-start: 2.15rem; }
.filter-chip[aria-pressed="true"] { background: #e5f2e6; border-color: #a5caaa; }
#recipe-count { color: var(--muted); font-size: .78rem; font-weight: 680; padding-inline: .32rem; white-space: nowrap; }
.recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.recipe-grid > .empty-state { grid-column: 1 / -1; }
.recipe-card { overflow: hidden; padding: 0; }
.recipe-visual { display: grid; place-items: center; height: 118px; color: #516b48; background: #e3efda; }
.recipe-visual[data-tone="1"] { color: #76502c; background: #f1e8d7; }
.recipe-visual[data-tone="2"] { color: #854e43; background: #f1e4e0; }
.recipe-visual[data-tone="3"] { color: #4e675c; background: #e0ebe5; }
.recipe-visual .dish { width: 150px; height: 108px; }
.recipe-body { padding: .87rem .9rem .94rem; }
.recipe-body h2 { margin: .33rem 0 .56rem; }
.recipe-time { display: flex; align-items: center; gap: .32rem; color: var(--muted); font-size: .76rem; font-weight: 650; }
.recipe-time .icon { width: 15px; height: 15px; }
.recipe-card details { border-top: 1px solid var(--line); padding-top: .48rem; font-size: .86rem; }
.recipe-card ol, .cook-card ol { display: grid; gap: .43rem; padding-inline-start: 1.2rem; font-size: .88rem; }
.recipe-card ol { margin-top: .65rem; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(210px, 1fr); gap: .9rem; align-items: start; }
.empty-state { display: grid; justify-items: start; gap: .46rem; padding: clamp(1.1rem, 3vw, 1.6rem); }
.empty-state p { color: var(--muted); max-width: 46ch; }
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .63rem; }
.profile strong { display: block; line-height: 1.25; }
.profile-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--green); background: #e4f1e6; font-size: 1rem; font-weight: 750; }
.profile small { display: block; margin-top: .18rem; }
.shopping-title { display: flex; justify-content: space-between; align-items: start; gap: .6rem; flex-wrap: wrap; margin-bottom: .38rem; }
.quantities { padding: 0; list-style: none; }
.quantities li { display: flex; justify-content: space-between; gap: .56rem; padding: .59rem 0; border-bottom: 1px solid var(--line); }
.quantities li:last-child { border-bottom: 0; }
.quantities strong { white-space: nowrap; font-size: .88rem; font-variant-numeric: tabular-nums; }
.quantities small { display: inline-block; margin-inline-start: .19rem; }
.cook-card .quantities { margin: .55rem 0 .85rem; }

form { display: grid; gap: .72rem; }
form label { display: grid; gap: .26rem; font-size: .85rem; font-weight: 650; }
input:not([type=checkbox]), select, textarea {
  min-height: 44px; min-width: 0; width: 100%; padding: .52rem .65rem; border: 1px solid #cbdacf;
  border-radius: 9px; color: var(--ink); background: #fff; font-size: 1rem; font-weight: 400;
}
input:disabled { opacity: .62; background: #eff3ef; }
textarea { resize: vertical; }
fieldset { min-width: 0; margin: 0; padding: .5rem .65rem .64rem; border: 1px solid var(--line); border-radius: 10px; }
legend { padding-inline: .27rem; font-weight: 700; font-size: .86rem; }
.fields { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); }
.attendee { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .36rem .6rem; align-items: end; margin: .24rem 0; }
.attendee input[type=number] { max-width: 8rem; }
.attendee > label:first-child, label.check, .choices label { display: flex; align-items: center; min-height: 44px; gap: .43rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0 .8rem; }
input[type=checkbox] { inline-size: 1.1rem; block-size: 1.1rem; flex: none; }
.meal-form [data-fresh] { display: grid; gap: .63rem; }
summary { cursor: pointer; color: var(--green); font-weight: 680; }
.summary-subtitle { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; margin: .19rem 0 0 .95rem; }
.ai-panel { margin-bottom: 1rem; background: #eff5ef; border-color: #dce8dc; }
.ai-panel form, .ai-preview { margin-top: .8rem; }
.ai-preview { border-top: 1px solid #d7e4d8; padding-top: .72rem; }
.ai-preview ul { margin: .48rem 0 .72rem; display: grid; gap: .44rem; padding-inline-start: 1.1rem; }
.ai-preview li { font-size: .88rem; }
.status:empty { display: none; }
.status {
  position: fixed; z-index: 4; inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  max-width: min(calc(100vw - 2rem), 33rem); padding: .69rem .9rem; border-radius: 11px;
  color: #fff; background: #203e2b; box-shadow: 0 3px 16px #1f302733; font-size: .86rem;
}
.notice { margin-top: .45rem; padding: .42rem .52rem .42rem 1.55rem; border-radius: 8px; color: #6e4721; background: #fbefd9; font-size: .77rem; }
.muted { color: var(--muted); }

@media (min-width: 961px) {
  .week-aside { position: sticky; top: 1rem; }
  .ai-layout:has(.ai-preview) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .83fr); gap: .9rem; align-items: start; }
  .ai-preview { padding: .74rem .92rem; border: 1px solid #d7e4d8; border-radius: 11px; background: var(--paper); }
}
@media (max-width: 960px) {
  :root { --sidebar: 176px; }
  .shell { width: min(100% - 2rem, 70rem); }
  .header-content { width: 100%; }
  .brand { padding-inline: 0; }
  .plan-grid, .content-grid { grid-template-columns: minmax(0, 1fr); }
  .week-aside { grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  body { padding-inline-start: 0; }
  .site-header { position: static; overflow: visible; width: 100%; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--line); }
  .header-content { width: min(100% - 1.65rem, 70rem); min-height: 58px; padding: .5rem 0; flex-direction: row; align-items: center; justify-content: space-between; gap: .4rem; }
  .brand { gap: .45rem; font-size: 1.02rem; }
  .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
  .brand small { margin-top: .18rem; color: #566b5c; font-size: .49rem; }
  .connection { margin-top: 0; padding: .32rem .46rem; color: #476051; background: #edf3ed; font-size: .67rem; }
  nav {
    position: fixed; inset: auto 0 0; z-index: 3; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .12rem;
    margin: 0; padding: .32rem .22rem max(.34rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    background: #fffffff7; backdrop-filter: blur(12px);
  }
  nav button { flex-direction: column; justify-content: center; gap: .14rem; padding: .25rem .08rem; min-height: 47px; color: #496253; font-size: clamp(.54rem, 1.8vw, .69rem); }
  nav button .icon { width: 18px; height: 18px; }
  nav button:hover { color: #224c34; background: #edf5ed; border-color: #edf5ed; }
  nav [aria-current] { background: #e3f0e3; color: #234d34; border-color: #e3f0e3; }
  nav [aria-current] .icon { color: #246343; }
  .shell { width: min(100% - 1.65rem, 70rem); }
  main { padding-block: .92rem calc(4.8rem + env(safe-area-inset-bottom)); }
  .page-heading { gap: .65rem; margin-bottom: .82rem; }
  .page-heading h1 { font-size: 2.16rem; }
  .page-heading p { font-size: .84rem; }
  .status { bottom: calc(3.75rem + env(safe-area-inset-bottom)); }
  .assistant-card { gap: .58rem; padding: .65rem .7rem; margin-bottom: .65rem; }
  .assistant-copy h2 { font-size: 1rem; }
  .assistant-copy p { font-size: .76rem; }
  .assistant-mark { width: 36px; height: 36px; border-radius: 9px; }
  .assistant-mark .icon { width: 19px; height: 19px; }
  .assistant-card button { padding-inline: .49rem; font-size: .76rem; }
  .assistant-card button .icon { display: none; }
  .week-board { padding: .62rem .65rem .68rem; margin-block: .7rem; }
  .week-toolbar { margin-bottom: .47rem; gap: .42rem; }
  .week-strip { gap: .2rem; }
  .week-day { padding-block: .24rem; }
  .week-day strong { font-size: .96rem; }
  .week-switch button { min-height: 34px; font-size: .76rem; }
  .week-switch .icon-button { width: 34px; }
  .week-aside { grid-template-columns: minmax(0, 1fr); }
  .week-aside .shop-card { display: none; }
  .week-aside .progress-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .26rem .4rem; padding: .55rem .66rem; }
  .week-aside .aside-title { margin: 0; gap: .32rem; }
  .week-aside .aside-title h2 { font-size: .89rem; }
  .week-aside .icon-tile { width: 25px; height: 25px; border-radius: 7px; }
  .week-aside .icon-tile .icon { width: 15px; height: 15px; }
  .week-aside .aside-card p { justify-self: end; font-size: .73rem; }
  .week-aside .count-bar { display: none; }
  .week-aside .badge, .week-aside .actions { grid-column: 1 / -1; }
  .week-aside .aside-card .actions { margin-top: .22rem; }
  .plan-grid { gap: .66rem; }
  .day-card { grid-template-columns: 2.65rem minmax(0, 1fr); gap: .38rem .57rem; padding: .52rem .63rem; min-height: 0; }
  .date-chip { min-height: 44px; }
  .day-actions { grid-column: 2; justify-content: flex-start; gap: .25rem; }
  .day-actions button { padding-inline: .49rem; }
  .day-editor { grid-column: 1 / -1; }
  .day-card.open-day { grid-template-columns: 2.65rem minmax(0, 1fr) auto; }
  .open-day .day-actions { grid-column: auto; }
  .open-day .day-actions button { width: 44px; gap: 0; padding: 0; font-size: 0; }
}
@media (max-width: 430px) {
  .recipe-grid { grid-template-columns: minmax(0, 1fr); }
  .recipe-tools .recipe-search { flex-basis: 100%; }
  .assistant-card { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .assistant-card button { grid-column: 2; justify-self: start; min-height: 38px; padding-inline: .64rem; }
  .assistant-card button .icon { display: block; width: 14px; height: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
