:root {
    color-scheme: light;
    --bg: #f7f6f0;
    --paper: #fffefa;
    --ink: #232724;
    --muted: #5c665e;
    --green: #244c3c;
    --soft-green: #e3ecdf;
    --line: #e1e3d8;
    --warm: #a54d35;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: var(--sans); font-size: 15px; line-height: 1.48; }
a { color: var(--green); }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a65a35; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(3.5rem, 8vw, 6.3rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); }
h3 { font-size: 1.15rem; }
p { color: var(--muted); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .8; }
button[hidden] { display: none; }
.skip { position: absolute; top: -100px; z-index: 10; background: var(--paper); padding: 12px; }
.skip:focus { top: 8px; }
.shell { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #eeefe6; border-right: 1px solid var(--line); padding: 37px 23px 22px; display: flex; flex-direction: column; gap: 58px; position: sticky; top: 0; height: 100vh; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 2.04rem; letter-spacing: -.065em; white-space: nowrap; }
.brand-dot { color: #a14d36; }
.brand-mark { display: inline-grid; place-items: center; width: 35px; height: 35px; font-size: 22px; background: var(--green); color: white; border-radius: 50%; font-family: var(--serif); letter-spacing: 0; }
.nav { display: grid; gap: 7px; }
.nav a { padding: 10px 12px; display: flex; gap: 10px; align-items: center; color: var(--muted); text-decoration: none; font-size: .94rem; font-weight: 600; border-radius: 8px; }
.nav a:hover, .nav a[aria-current] { color: var(--green); background: #dce8da; }
.nav-icon { min-width: 21px; text-align: center; font-size: 1.05rem; }
.signout { margin-top: auto; padding-left: 12px; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--green); font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.main { padding: 27px clamp(20px, 4.8vw, 78px) 35px; width: min(100%, 1510px); min-width: 0; }
.toolbar { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 40px; }
.quiet { font-size: .89rem; font-weight: 650; color: var(--green); text-underline-offset: 4px; }
.week-nav { display: flex; gap: 11px; align-items: center; font-size: .85rem; font-weight: 650; }
.week-nav a { display: grid; place-items: center; text-decoration: none; border: 1px solid var(--line); background: var(--paper); width: 37px; height: 37px; border-radius: 50%; font-size: 1.44rem; line-height: 1; }
.week-nav a:hover, .secondary:hover { background: var(--soft-green); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 29px 0 28px; }
.page-head p { margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-weight: 650; padding: 10px 14px; text-align: center; font-size: .87rem; min-height: 43px; }
.primary { background: var(--green); color: #fff; }
.primary:hover { background: #32614b; }
.secondary { border-color: var(--line); background: var(--paper); color: var(--green); }
.notice { padding: 11px 14px; margin: 0 0 18px; border-radius: 8px; background: var(--soft-green); color: var(--green); }
.notice.error { background: #f5e4db; color: #7c3526; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.metric { border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; background: var(--paper); display: grid; align-content: start; gap: 5px; }
.metric.accent { background: var(--soft-green); border-color: #d3e1d0; color: var(--green); }
.metric > span { font-size: .82rem; font-weight: 650; }
.metric > strong { font-family: var(--serif); font-weight: 500; font-size: clamp(1.38rem, 2.65vw, 2.22rem); line-height: 1.06; }
.metric em, .metric-divider { font-style: normal; font-size: .62em; }
.metric small, .metric > a { color: var(--muted); font-size: .79rem; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 5px; gap: 4px; }
.days a { display: grid; justify-items: center; gap: 3px; border-radius: 8px; text-decoration: none; padding: 8px 4px; color: var(--muted); font-size: .79rem; }
.days strong { font-size: 1.06rem; }
.days a:hover { background: var(--soft-green); }
.days a[aria-current] { background: var(--green); color: white; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin: 25px 0 14px; }
.section-head p { margin-top: 4px; font-size: .88rem; }
.capitalize::first-letter { text-transform: uppercase; }
.meal-grid, .store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.meal { --meal: #f4eddb; border-radius: 12px; padding: 17px; border: 1px solid var(--line); background: var(--paper); }
.meal-1 { --meal: #e4ecdc; }
.meal-2 { --meal: #ece7f0; }
.meal-3 { --meal: #f5e7df; }
.meal-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; margin-bottom: 16px; }
.slot { background: var(--meal); padding: 4px 9px; border-radius: 18px; color: var(--ink); font-weight: 650; }
.meal h3 { font-family: var(--serif); font-weight: 500; font-size: 1.51rem; }
.meal-nutrition { margin: 7px 0 15px; font-size: .86rem; }
.meal-nutrition span { margin-inline: 3px; }
summary { color: var(--green); font-weight: 650; cursor: pointer; }
.meal summary { font-size: .84rem; }
.meal details p { font-size: .87rem; }
.ingredients { list-style: none; padding: 0; margin: 10px 0; font-size: .85rem; }
.ingredients li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ingredients strong { white-space: nowrap; }
.fine { font-size: .83rem; }
main > .fine, .store-grid + .fine { margin-top: 13px; }
.blank { margin-top: 18px; padding: 32px 20px; border: 1px dashed #ccd0c3; border-radius: 14px; text-align: center; display: grid; justify-items: center; gap: 10px; background: #f2f3ea; }
.blank p { max-width: 440px; }
.blank-icon, .store-icon { display: grid; place-items: center; width: 39px; height: 39px; background: var(--soft-green); border-radius: 50%; color: var(--green); font-size: 1.2rem; flex: none; }
.panel { background: var(--paper); border-radius: 12px; border: 1px solid var(--line); min-width: 0; }
.padded, .manage, .store-card { padding: 17px; }
.manage { margin-top: 15px; }
.manage[open] > summary { margin-bottom: 15px; }
.stack, .profile-form { display: grid; gap: 15px; }
.stack > button { justify-self: start; }
.stack h2 + p { margin-top: 6px; }
.field-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid .wide { grid-column: span 2; }
.inventory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 4px; color: var(--ink); font-size: .87rem; font-weight: 650; min-width: 0; }
label small { font-weight: 400; color: var(--muted); }
input:not([type=checkbox]), select { width: 100%; min-width: 0; border: 1px solid #c8cdc0; background: #fff; padding: 8px 9px; border-radius: 7px; color: var(--ink); }
input[type=checkbox] { accent-color: var(--green); width: 19px; height: 19px; cursor: pointer; margin: 0 auto; }
.taste-head, .taste-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(55px, 80px) minmax(61px, 80px); gap: 8px; align-items: center; }
.taste-head { font-size: .85rem; font-weight: 700; }
.taste-row + .taste-row { border-top: 1px solid var(--line); padding-top: 8px; }
.taste-head span:not(:first-child) { text-align: center; }
.shopping-row { display: grid; grid-template-columns: 33px minmax(0, 1fr) auto 67px; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.shopping-row:last-child { border-bottom: 0; }
.shopping-row strong:last-child { text-align: right; }
.shopping-row > span:nth-last-child(2) { color: var(--muted); font-size: .83rem; }
.shopping-row small, .price-row small { color: var(--muted); display: block; }
.shopping-row.checked > span > strong { text-decoration: line-through; color: var(--muted); }
.check { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--soft-green); color: var(--green); font-weight: 700; }
.list-summary { display: flex; justify-content: space-between; gap: 10px; padding: 13px; }
.list-summary span { color: var(--muted); font-size: .85rem; }
.category { padding: 7px 12px; background: #ebeee5; font-size: .79rem; }
.store-card { display: grid; gap: 9px; }
.store-title { display: flex; align-items: center; gap: 9px; }
.store-title p { font-size: .83rem; }
.store-total { font-family: var(--serif); font-size: 1.9rem; color: var(--green); font-weight: 500; }
.store-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.store-reference { color: var(--green); font-weight: 650; font-size: .87rem; }
.price-select { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.price-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(75px, .7fr) minmax(75px, .7fr) minmax(100px, 1fr); gap: 8px; align-items: end; padding: 9px 0; border-top: 1px solid var(--line); }
.price-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--soft-green); }
.gate-card { width: min(100%, 415px); padding: 28px; border-radius: 14px; background: var(--paper); }
.gate-card h1 { font-size: 3.45rem; margin: 8px 0; }
.gate-card form { margin-top: 18px; }
.gate-card .notice { margin-top: 10px; }
@media (max-width: 830px) {
    .shell { display: block; }
    .sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; padding: 12px 16px; gap: 10px; }
    .nav { display: flex; flex-wrap: wrap; grid-column: span 2; grid-row: 2; gap: 3px; }
    .signout { margin: 0; align-self: center; }
    .nav a { padding: 7px 8px; gap: 4px; }
    .main { padding-top: 14px; }
}
@media (max-width: 530px) {
    .main { padding-inline: 12px; }
    .sidebar { padding-inline: 12px; }
    .nav a { font-size: .8rem; }
    .nav-icon { min-width: 14px; }
    .page-head { align-items: flex-start; flex-direction: column; gap: 10px; margin-block: 18px; }
    .metrics { gap: 5px; }
    .metric { padding: 8px 6px; border-radius: 8px; }
    .metric > strong { font-size: 1.26rem; }
    .metric > span, .metric > small, .metric > a { font-size: .71rem; }
    .meal-grid, .store-grid { grid-template-columns: 1fr; }
    .inventory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shopping-row { grid-template-columns: 29px minmax(0, 1fr) 77px 54px; gap: 5px; padding-inline: 6px; font-size: .83rem; }
    .shopping-row small, .shopping-row > span:nth-last-child(2) { font-size: .72rem; }
    .price-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .price-row > span, .price-actions { grid-column: span 2; }
}
