:root {
  color-scheme: light;
  --ink: #271837;
  --muted: #685d70;
  --accent: #6338a0;
  --accent-dark: #442364;
  --paper: #fffdfa;
  --line: #e6ddeb;
  font: 100%/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eee8f2;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 3px solid #7e54b8; outline-offset: 3px; }
[hidden] { display: none !important; }
.layout { display: grid; grid-template-columns: minmax(300px, 4fr) minmax(0, 6fr); min-height: 100vh; max-width: 1500px; margin: auto; background: var(--paper); }
.cover { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: space-between; height: 100vh; min-height: 610px; isolation: isolate; overflow: hidden; color: #fffaf0; background: #281838 url('./assets/salad.jpg') center 67% / cover no-repeat; }
.cover::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #251532 0%, #261733f7 22%, #26173370 54%, #26173300 75%, #21112bc8 100%); }
.cover-copy { padding: clamp(30px, 5vw, 76px); }
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 750; }
.brand-icon { display: inline-grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; background: #e6f79b; color: #281838; font-size: 1.25rem; }
.cover-title { margin: 49px 0 17px; font: normal clamp(3.6rem, 6.5vw, 6.45rem)/.92 Georgia, "Times New Roman", serif; letter-spacing: -.065em; }
.cover-text { margin: 0; max-width: 23ch; color: #f2e9f4; font-size: 1.08rem; }
.cover-credit { align-self: end; margin: 0; padding: 16px 24px; font-size: .82rem; color: #fffdfa; }
.cover-credit a, .image-credit a { color: inherit; }
.workspace { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 92px) clamp(25px, 5vw, 78px); }
#app { width: 100%; max-width: 670px; margin: 0 auto; }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.step-count { color: var(--accent-dark); font-weight: 750; font-size: .88rem; }
.step-name { color: var(--muted); font-size: .88rem; }
.progress { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-bottom: 34px; }
.progress span { height: 4px; border-radius: 8px; background: #e9e1ed; }
.progress .done { background: #8f70b9; }
.progress .current { background: var(--accent-dark); }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1 { margin: 0 0 12px; font: normal clamp(2.55rem, 4.2vw, 4.3rem)/.99 Georgia, "Times New Roman", serif; letter-spacing: -.056em; }
h1:focus { outline: none; }
h2 { margin: 0 0 12px; font: normal 2rem/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
h3 { margin: 0; font-size: 1.1rem; }
.lead { color: var(--muted); margin: 0 0 27px; max-width: 52ch; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.choice { color: var(--ink); background: #fffdfa; border: 1px solid var(--line); border-radius: 13px; min-height: 55px; padding: 11px 13px; text-align: left; display: flex; align-items: center; gap: 11px; font-weight: 650; }
.choice:hover { border-color: #9a80b3; }
.choice[aria-pressed="true"] { background: #f0e8fa; border-color: #9676c2; }
.choice[aria-pressed="true"] .choice-indicator { background: var(--accent-dark); border-color: var(--accent-dark); color: white; }
.choice-indicator { flex: 0 0 auto; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; border: 1px solid #cabbd9; color: transparent; font-size: .77rem; }
.single .choice-indicator { border-radius: 50%; }
.shop-mark { flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; width: 29px; height: 29px; font-size: .87rem; background: #f0e7f5; color: #472364; }
.choice-text { flex: 1; }
.choice small { display: block; margin-top: 3px; color: var(--muted); font-size: .88rem; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 30px; }
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid transparent; border-radius: 11px; padding: 9px 21px; font-weight: 750; background: #e5f69e; color: #29183a; text-decoration: none; }
.action:not(:disabled):hover { background: #d7ed7d; }
.action.secondary { background: transparent; border-color: var(--line); color: var(--accent-dark); }
.action.secondary:hover { background: #f0e8fa; }
.action.primary { margin-left: auto; min-width: min(190px,100%); }
.quiet { background: transparent; border: 0; color: var(--accent-dark); padding: 8px 0; min-height: 42px; text-decoration: underline; text-underline-offset: 4px; }
.hint, .image-credit, .small { font-size: .88rem; color: var(--muted); }
.hint { margin: 14px 0 0; }
.store-links { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 9px; font-size: .88rem; }
.notice { background: #f2ebf8; border-radius: 13px; padding: 13px 16px; margin: 16px 0 0; }
.notice.problem { background: #fff0d8; }
.field-label { display: block; font-weight: 740; margin: 0 0 8px; }
.field { display: block; min-height: 46px; border: 1px solid #cbbdd4; border-radius: 9px; padding: 8px 12px; width: 100%; color: var(--ink); background: white; }
.field.amount { max-width: 220px; font-size: 1.4rem; }
.select-field { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, #685d70 50%), linear-gradient(135deg, #685d70 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.stock-categories, .stock-presets { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0; }
.stock-category { min-height: 40px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--accent-dark); background: var(--paper); font-size: .91rem; }
.stock-category:hover, .stock-category[aria-pressed="true"] { background: #efe5f7; border-color: #b799d2; }
.stock-category[aria-pressed="true"] { font-weight: 750; }
.stock-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.stock-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; text-align: left; min-height: 77px; padding: 8px 9px; color: var(--ink); font-weight: 650; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; }
.stock-card:hover, .stock-card[data-saved="true"] { background: #f5eef9; border-color: #b799d2; }
.stock-icon { font-size: 1.12rem; align-self: center; }
.stock-name { overflow-wrap: anywhere; font-size: .92rem; }
.stock-card-state { grid-column: 2; font-size: .83rem; color: var(--accent-dark); min-height: 1em; }
.stock-grid .hint { grid-column: 1 / -1; }
.stock-heading { margin: 0 0 7px; }
.stock-picks { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; }
.stock-picked { display: inline-flex; align-items: center; gap: 2px; border-radius: 9px; color: var(--accent-dark); background: #f2e9f7; }
.stock-picked-edit, .stock-remove { background: none; border: 0; color: inherit; padding: 6px 8px; font-size: .86rem; }
.stock-remove { font-size: 1.2rem; min-width: 35px; min-height: 36px; }
.item-link { color: var(--accent-dark); text-underline-offset: 3px; }
.shopping-meta { display: block; margin: 3px 0 0 31px; }
.empty { color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.counter { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.counter output { min-width: 32px; text-align: center; font-weight: 750; }
.counter button { border: 1px solid var(--line); background: #f8f2fa; color: var(--accent-dark); font-weight: 800; width: 37px; height: 37px; border-radius: 8px; }
.counter button:not(:disabled):hover { background: #eee4f4; }
.child-remove { margin-left: auto; }
.family-actions { margin-top: 9px; }
.meal-table { width: 100%; text-align: left; border-collapse: collapse; }
.meal-table th, .meal-table td { border-bottom: 1px solid var(--line); padding: 11px 5px; }
.meal-table th:not(:first-child), .meal-table td:not(:first-child) { text-align: center; }
.meal-table label { display: inline-grid; place-items: center; width: 100%; min-height: 40px; cursor: pointer; }
input[type='radio'], input[type='checkbox'] { accent-color: var(--accent); width: 19px; height: 19px; }
.taste-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden; min-height: 175px; border-radius: 15px; background: #f1e9f5; touch-action: pan-y; }
.taste-card img { display: block; width: 100%; height: 100%; max-height: 210px; object-fit: cover; }
.taste-copy { display: grid; align-content: center; gap: 8px; padding: 16px; }
.taste-card.no-photo { grid-template-columns: 1fr; min-height: 130px; }
.taste-copy :is(.small,.image-credit) { margin: 0; }
.vote-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vote-row .action { min-height: 42px; padding: 7px 13px; }
.vote-row .small { margin-left: auto; }
.field-row { display: flex; align-items: stretch; gap: 8px; }
.field-row .field { min-width: 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 0; }
.chip { display: inline-flex; padding: 5px 10px; border: 1px solid var(--line); border-radius: 25px; background: #f4edf8; color: var(--accent-dark); font-size: .91rem; }
.subheading { margin: 18px 0 9px; font-size: 1rem; }
.cadence-fixed { margin: 0 0 25px; padding: 0; list-style: none; }
.cadence-fixed li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.cadence-options { border: 0; margin: 0; padding: 0; min-width: 0; }
.cadence-options legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.cadence-options .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.results .workspace { justify-content: flex-start; }
.result-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 22px 0; }
.result-number { padding: 12px 10px; border: 1px solid var(--line); border-radius: 12px; }
.result-number strong, .result-number span { display: block; }
.result-number strong { font-size: clamp(1.08rem,2vw,1.4rem); }
.result-number span { color: var(--muted); font-size: .85rem; }
.schedule-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 14px; margin-top: 16px; }
.panel-nav { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 25px 0 15px; }
.panel-nav button { min-height: 42px; background: none; border: 0; border-bottom: 3px solid transparent; padding: 7px 0; color: var(--muted); font-weight: 750; }
.panel-nav button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-dark); }
.day { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin: 0 0 10px; }
.day-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.recipe-button { color: var(--accent-dark); background: none; border: 0; padding: 6px 0; text-align: left; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.dinner-parts { display: grid; gap: 3px; text-decoration: none; }
.dinner-parts span { text-decoration: underline; }
.dinner-parts small { color: var(--muted); font-size: .85rem; font-weight: 550; display: inline-block; min-width: 4.5rem; }
.meal-row { display: grid; grid-template-columns: minmax(62px, .37fr) minmax(0, 1.63fr); align-items: baseline; gap: 11px; border-top: 1px solid #eee8ef; padding: 6px 0; }
.recipe-meta { color: var(--muted); font-size: .84rem; }
.batch-note { margin: 6px 0 1px; color: var(--accent-dark); font-size: .88rem; }
.purchase-label { display: flex; align-items: center; gap: 10px; cursor: pointer; justify-content: space-between; }
.purchase-label span:first-of-type { flex: 1; }
.purchase-label:has(input:checked) span:first-of-type { text-decoration: line-through; color: var(--muted); }
.purchase-list { list-style: none; padding: 0; }
.purchase-list li { border-bottom: 1px solid #eee8ef; padding: 7px 0; }
dialog { width: min(92vw,520px); max-height: 86vh; border: 0; border-radius: 16px; padding: 27px; background: var(--paper); color: var(--ink); box-shadow: 0 18px 75px #14072551; }
dialog::backdrop { background: #20122d96; }
dialog .actions { margin-top: 18px; }
dialog li { margin: 6px 0; }
.recipe-summary { margin: 12px 0; padding: 12px 15px; border-radius: 11px; background: #f1eaf8; }
.recipe-summary p { margin: 0 0 6px; }
.recipe-summary p:last-child, .recipe-summary ul { margin-bottom: 0; }
.recipe-part { margin-top: 18px; }
@media (max-width: 750px) {
  .layout { display: block; }
  .cover { position: relative; height: clamp(170px, 36vw, 240px); min-height: 0; background-position: center 59%; }
  .cover::before { background: linear-gradient(90deg,#251532f7 0%,#251532d9 32%,#2515321a 100%); }
  .cover-copy { padding: 22px max(20px,5vw); }
  .cover-title { font-size: clamp(2.5rem, 8vw, 3.9rem); margin: 12px 0; }
  .cover-title br, .cover-text { display: none; }
  .cover-credit { padding: 7px 12px; background: #251532b9; border-radius: 10px 0 0 0; }
  .workspace { padding: 28px max(16px,5vw) 36px; }
  .progress { margin-bottom: 24px; }
  .stock-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 390px) {
  .choices { gap: 7px; }
  .choice { gap: 6px; padding: 9px; font-size: .92rem; }
  .shop-mark { display: none; }
  .row { gap: 7px; }
  .counter { gap: 6px; }
  .child-remove { font-size: .88rem; }
  .cadence-options .choices { grid-template-columns: 1fr; }
}
@media print {
  :root { background: white; }
  .layout, .workspace { display: block; padding: 0; }
  .cover, .actions, .panel-nav, .schedule-summary button, dialog { display: none; }
  #app { max-width: none; }
  #week-panel, #shopping-panel { display: block !important; }
  #shopping-panel { break-before: page; }
  .day, .purchase-list li { break-inside: avoid; }
}
