:root {
  color-scheme: light;
  --ink: #18332d;
  --ink-soft: #50625d;
  --forest: #173f35;
  --forest-2: #245e4d;
  --cream: #f6f0e4;
  --paper: #fffdf8;
  --terracotta: #d86643;
  --terracotta-dark: #a94328;
  --sage: #dbe8d4;
  --yellow: #f4c968;
  --line: #d8d6cb;
  --shadow: 0 16px 45px rgba(34, 54, 45, .11);
  --radius: 22px;
  --focus: 0 0 0 4px rgba(216, 102, 67, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 3%, rgba(244, 201, 104, .35), transparent 24rem),
    radial-gradient(circle at 95% 20%, rgba(219, 232, 212, .8), transparent 30rem),
    var(--cream);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon.solid, .solid { fill: currentColor; stroke: none; }
.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; }
.shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 32px;
  align-items: center;
  min-height: 330px;
  padding: clamp(30px, 6vw, 72px);
  color: #fffdf6;
  background: var(--forest);
  border-radius: 30px;
  box-shadow: var(--shadow);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 999px; pointer-events: none; }
.hero::before { width: 360px; height: 360px; right: -120px; top: -165px; background: var(--terracotta); opacity: .92; }
.hero::after { width: 280px; height: 280px; left: 43%; bottom: -235px; border: 54px solid var(--yellow); opacity: .86; }
.hero-copy { position: relative; z-index: 1; max-width: 700px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: #f3d788; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.05; letter-spacing: -.025em; }
h1 { max-width: 760px; font-size: clamp(2.65rem, 6vw, 5.4rem); font-weight: 500; }
.hero-copy > p { max-width: 620px; margin: 22px 0 0; color: rgba(255, 253, 246, .82); font-size: clamp(1rem, 2vw, 1.2rem); }
.hero-art { position: relative; z-index: 1; display: grid; place-items: center; min-height: 220px; }
.plate { position: relative; display: grid; place-items: center; width: min(250px, 70vw); aspect-ratio: 1; color: var(--forest); background: #fffaf0; border: 20px solid rgba(255,255,255,.38); border-radius: 50%; box-shadow: 0 28px 55px rgba(0,0,0,.22), inset 0 0 0 2px rgba(23,63,53,.08); transform: rotate(-7deg); }
.plate .icon { width: 46%; height: 46%; color: var(--terracotta); stroke-width: 1.35; }
.plate-leaf { position: absolute; width: 34px; height: 74px; border-radius: 100% 0 100% 0; background: #80a86b; }
.plate-leaf.one { top: 17%; left: 13%; transform: rotate(-35deg); }
.plate-leaf.two { right: 12%; bottom: 19%; transform: rotate(35deg) scale(.75); background: var(--yellow); }

.toolbar { position: relative; z-index: 3; display: grid; grid-template-columns: auto auto minmax(220px,1fr) auto; gap: 14px; align-items: end; width: min(1120px,calc(100% - 40px)); margin: -42px auto 22px; padding: 18px; background: rgba(255,253,248,.96); border: 1px solid rgba(255,255,255,.75); border-radius: 18px; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.field { display: grid; gap: 6px; min-width: 105px; }
.field span { color: var(--ink-soft); font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
input[type="number"], input[type="search"] { width: 100%; min-height: 46px; padding: 10px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 11px; }
input[type="number"] { width: 96px; }
input[type="search"] { padding-left: 42px; }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 14px; bottom: 14px; color: var(--ink-soft); }
.primary, .secondary, .icon-button { min-height: 46px; border: 0; border-radius: 12px; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 19px; color: #fff; background: var(--terracotta); font-weight: 800; box-shadow: 0 8px 20px rgba(169,67,40,.22); }
.primary:hover { background: var(--terracotta-dark); transform: translateY(-1px); }
.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; background: #edf1eb; font-weight: 750; }
.secondary:hover { background: var(--sage); }
.icon-button { display: grid; place-items: center; width: 44px; padding: 0; background: #edf1eb; }
.icon-button:hover { color: #fff; background: var(--terracotta); }

.filter-panel { margin-bottom: 22px; padding: 18px 20px; background: rgba(255,255,255,.5); border: 1px solid rgba(23,63,53,.11); border-radius: 18px; }
.filter-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 12px; }
.filter-heading strong { font-family: Georgia, serif; font-size: 1.15rem; }
.filter-heading small { color: var(--ink-soft); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { position: relative; cursor: pointer; }
.filter-chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip-content { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; font-weight: 700; transition: .16s ease; }
.filter-chip input:checked + .chip-content { color: #fff; background: var(--forest-2); border-color: var(--forest-2); }
.filter-chip input:focus-visible + .chip-content { box-shadow: var(--focus); }

.content-grid { display: grid; grid-template-columns: minmax(310px,.82fr) minmax(0,1.35fr); gap: 22px; align-items: start; }
.card { background: var(--paper); border: 1px solid rgba(23,63,53,.11); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(34,54,45,.07); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 22px 15px; }
.card-head h2 { font-size: clamp(1.55rem,3vw,2rem); font-weight: 500; }
.count { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; color: var(--forest-2); background: var(--sage); border-radius: 999px; font-size: .78rem; font-weight: 800; }
.meal-list { list-style: none; margin: 0; padding: 0 10px 12px; }
.meal-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 44px; gap: 10px; align-items: center; margin: 2px 0; padding: 9px 8px; border-radius: 13px; }
.meal-row:hover { background: #f3f1e9; }
.meal-row.active { background: var(--sage); }
.meal-number { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: var(--forest); border-radius: 50%; font-size: .82rem; font-weight: 800; }
.meal-entry { min-width: 0; }
.meal-heading-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.meal-select { min-width: 0; padding: 3px 0; text-align: left; background: none; border: 0; cursor: pointer; }
.meal-title-select { flex: 1 1 auto; overflow: hidden; }
.meal-detail-select { display: block; width: 100%; padding-top: 0; }
.meal-level-switch { display: inline-flex; flex: 0 0 auto; gap: 1px; padding: 1px; background: rgba(255,255,255,.72); border: 1px solid rgba(23,63,53,.14); border-radius: 6px; }
.meal-level-switch button { min-height: 23px; padding: 2px 5px; color: var(--ink-soft); background: transparent; border: 0; border-radius: 4px; cursor: pointer; font-size: .59rem; line-height: 1; font-weight: 850; }
.meal-level-switch button[aria-pressed="true"] { color: #fff; background: var(--forest); }
.meal-level-switch button:focus-visible { box-shadow: var(--focus); }
.meal-title, .meal-side { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meal-title { font-weight: 800; }
.meal-side { color: var(--ink-soft); font-size: .82rem; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; color: var(--ink-soft); background: rgba(255,255,255,.7); border: 1px solid rgba(23,63,53,.1); border-radius: 999px; font-size: .68rem; font-weight: 800; }
.badge .icon { width: 12px; height: 12px; }
.empty-state { padding: 34px 22px 42px; color: var(--ink-soft); text-align: center; }

.recipe-card { overflow: hidden; }
.recipe-cover { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,38%); min-height: 280px; color: #fff; background: linear-gradient(135deg,#245e4d,#173f35); }
.recipe-cover-copy { align-self: end; padding: 30px; }
.recipe-kicker { display: block; margin-bottom: 8px; color: #f3d788; font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.recipe-cover h2 { max-width: 650px; font-size: clamp(2rem,5vw,3.5rem); font-weight: 500; }
.recipe-cover .badges { margin-top: 14px; }
.recipe-cover .badge { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); }
.recipe-visual { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--terracotta); }
.recipe-visual::before { content: ""; position: absolute; width: 190px; height: 190px; border: 32px solid rgba(255,255,255,.16); border-radius: 50%; }
.recipe-visual .icon { position: relative; width: 90px; height: 90px; color: #fff7e8; stroke-width: 1.25; }
.recipe-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recipe-body { padding: 24px 28px 30px; }
.recipe-level { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 13px 15px; background: #fff6d8; border: 1px solid #ead38d; border-radius: 13px; }
.recipe-level > div:first-child { flex: 1; min-width: 0; }
.recipe-level strong, .recipe-level small { display: block; }
.recipe-level small { margin-top: 2px; color: var(--ink-soft); }
.mini-level-switch { display: inline-flex; gap: 4px; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.mini-level-switch button { min-height: 36px; padding: 6px 10px; background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: .78rem; font-weight: 800; }
.mini-level-switch button[aria-pressed="true"] { color: #fff; background: var(--forest); }
.level-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 6px; color: var(--terracotta-dark); background: #ffe6a7; border-radius: 999px; font-size: .62rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; vertical-align: middle; }
.time-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 22px; }
.time-item { padding: 12px; background: #f3f1e9; border-radius: 12px; }
.time-item small { display: block; color: var(--ink-soft); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.time-item strong { font-size: 1rem; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 12px; color: var(--ink-soft); background: none; border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; }
.tab.active { color: var(--forest); background: var(--sage); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.recipe-part + .recipe-part { margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--line); }
.recipe-part h3 { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font: 800 1rem/1.3 ui-sans-serif,system-ui,sans-serif; letter-spacing: 0; }
.ingredient-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 22px; margin: 0; padding: 0; list-style: none; }
.ingredient-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #ece9df; }
.ingredient-list strong { white-space: nowrap; }
.instructions { margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.instructions li { position: relative; min-height: 48px; margin-bottom: 10px; padding-left: 50px; counter-increment: steps; border-radius: 12px; transition: background .18s ease, opacity .18s ease; }
.instructions li::before { content: counter(steps); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--terracotta); border-radius: 50%; font-weight: 850; }
.instructions li label { display: grid; grid-template-columns: minmax(0,1fr) 30px; gap: 12px; align-items: start; min-height: 48px; padding: 4px 4px 8px 0; cursor: pointer; }
.instructions .instruction-copy { line-height: 1.55; transition: color .18s ease, text-decoration-color .18s ease; }
.instructions input { width: 26px; height: 26px; margin: 0; accent-color: var(--forest-2); cursor: pointer; }
.instructions input:focus-visible { outline: 3px solid rgba(36,94,77,.25); outline-offset: 3px; }
.instructions li.completed { background: rgba(154,181,160,.16); }
.instructions li.completed::before { background: var(--forest-2); }
.instructions li.completed .instruction-copy { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: rgba(73,89,80,.48); }

.lower-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; margin-top: 22px; }
details.card > summary { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 20px 22px; cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2 { font-size: 1.65rem; font-weight: 500; }
details.card > summary .chevron { margin-left: auto; transition: transform .2s ease; }
details[open].card > summary .chevron { transform: rotate(180deg); }
.shopping-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 0; padding: 0 22px 24px; list-style: none; }
.shopping-group { break-inside: avoid; }
.shopping-group h3 { margin-bottom: 8px; font: 800 .82rem/1.3 ui-sans-serif,system-ui,sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.shopping-group ul { margin: 0; padding: 0; list-style: none; }
.shopping-group li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #ece9df; }
.shopping-group li strong { white-space: nowrap; }
.action-stack { display: grid; gap: 10px; padding: 0 22px 24px; }
.action-stack .secondary { justify-content: flex-start; }
.notice { display: flex; gap: 12px; margin-top: 22px; padding: 18px 20px; color: var(--ink-soft); background: rgba(255,255,255,.45); border: 1px solid rgba(23,63,53,.1); border-radius: 16px; font-size: .82rem; }
.seo-section { margin-top: 22px; padding: clamp(28px,5vw,58px); color: #fffdf6; background: var(--forest); border-radius: var(--radius); box-shadow: var(--shadow); }
.seo-intro { max-width: 790px; }
.seo-intro .eyebrow { margin-bottom: 12px; }
.seo-intro h2 { max-width: 700px; font-size: clamp(2rem,4vw,3.35rem); font-weight: 500; }
.seo-intro > p:last-child { max-width: 760px; margin: 18px 0 0; color: rgba(255,253,246,.78); font-size: 1.05rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 38px; }
.feature-grid article { padding: 22px; background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.13); border-radius: 16px; }
.feature-number { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px; color: var(--forest); background: var(--yellow); border-radius: 50%; font-size: .74rem; font-weight: 900; }
.feature-grid h3 { font: 800 1rem/1.3 ui-sans-serif,system-ui,sans-serif; letter-spacing: 0; }
.feature-grid p { margin: 9px 0 0; color: rgba(255,253,246,.72); font-size: .9rem; }
.faq { margin-top: 42px; }
.faq > h3 { margin-bottom: 14px; font-size: 1.65rem; font-weight: 500; }
.faq details { border-top: 1px solid rgba(255,255,255,.16); }
.faq details:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.faq summary { position: relative; padding: 17px 42px 17px 0; cursor: pointer; list-style: none; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 11px; color: var(--yellow); font: 400 1.7rem/1 Georgia,serif; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 760px; margin: -4px 0 18px; color: rgba(255,253,246,.72); }
footer { display: flex; justify-content: space-between; gap: 16px; padding: 28px 4px 0; color: var(--ink-soft); font-size: .82rem; }
dialog { width: min(620px,calc(100% - 28px)); padding: 0; color: var(--ink); background: var(--paper); border: 0; border-radius: 22px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(16,38,32,.66); backdrop-filter: blur(5px); }
.dialog-body { padding: 28px; }
.dialog-body h2 { font-size: 2rem; font-weight: 500; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.print-only { display: none; }

@media (max-width: 900px) {
  .shell { width: min(100% - 22px,760px); padding-top: 11px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 36px 26px 90px; border-radius: 23px; }
  .hero-art { display: none; }
  .toolbar { grid-template-columns: 1fr 1fr; width: calc(100% - 20px); margin-top: -64px; }
  .search-field, .primary { grid-column: 1 / -1; }
  .field, input[type="number"] { width: 100%; }
  .content-grid, .lower-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .recipe-cover { grid-template-columns: 1fr 130px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .shell { width: calc(100% - 16px); }
  .hero { padding: 30px 20px 88px; }
  h1 { font-size: clamp(2.45rem,13vw,4rem); }
  .hero-copy > p { font-size: 1rem; }
  .toolbar { padding: 13px; gap: 10px; }
  .filter-panel { padding: 15px; }
  .filter-heading { display: block; }
  .filter-heading small { display: block; margin-top: 4px; }
  .chip-content { min-height: 44px; }
  .card { border-radius: 17px; }
  .card-head { padding: 18px 16px 12px; }
  .recipe-cover { grid-template-columns: 1fr; min-height: 0; }
  .recipe-cover-copy { padding: 24px 20px; }
  .recipe-visual { display: block; min-height: 220px; grid-row: 1; }
  .recipe-cover-copy { grid-row: 2; }
  .recipe-body { padding: 18px 16px 24px; }
  .recipe-level { display: grid; }
  .mini-level-switch { width: 100%; }
  .mini-level-switch button { flex: 1; }
  .time-summary { gap: 5px; }
  .time-item { padding: 9px 8px; }
  .ingredient-list, .shopping-list { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .tab { flex: 1 0 auto; justify-content: center; }
  details.card > summary { padding: 18px 16px; }
  .shopping-list, .action-stack { padding-left: 16px; padding-right: 16px; }
  .seo-section { border-radius: 17px; }
  footer { display: block; text-align: center; }
  footer span { display: block; margin-bottom: 5px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  body { background: white; color: #111; font-size: 11pt; }
  .shell, dialog { display: none !important; }
  .print-only { display: block !important; }
  .print-only h1 { font-size: 24pt; }
  .print-only h2 { margin-top: 18pt; font-size: 17pt; }
  .print-only h3 { margin-top: 12pt; font: bold 12pt/1.3 sans-serif; }
  .page-break { break-before: page; }
}

/* Mobile-first workflow */
[hidden] { display: none !important; }
body { background: #f2ede2; }
.app-shell { width: min(100% - 20px, 1080px); margin: 0 auto; padding: 10px 0 48px; }
.workflow-screen { animation: view-in .22s ease both; }
.workflow-screen:focus { outline: 0; }
h1[tabindex="-1"]:focus { outline: 0; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.mobile-hero { position: relative; overflow: hidden; padding: 28px 22px 78px; color: #fffdf6; background: var(--forest); border-radius: 22px; }
.mobile-hero::after { content: ""; position: absolute; width: 170px; height: 170px; right: -72px; bottom: -105px; background: var(--terracotta); border: 26px solid var(--yellow); border-radius: 50%; opacity: .92; }
.mobile-hero .brand { display: flex; align-items: center; gap: 8px; margin: 0 0 28px; color: #f3d788; font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.mobile-hero h1, .workflow-header h1 { font-size: clamp(2.35rem, 12vw, 4.4rem); font-weight: 500; }
.mobile-hero > p:last-child { max-width: 560px; margin: 14px 0 0; color: rgba(255,253,246,.8); }

.settings-card { position: relative; z-index: 2; display: grid; gap: 0; margin: -54px 10px 0; padding: 6px 16px 18px; background: var(--paper); border: 1px solid rgba(23,63,53,.1); border-radius: 19px; box-shadow: var(--shadow); }
.setting-section { min-width: 0; margin: 0; padding: 19px 0; border: 0; border-bottom: 1px solid #e9e5da; }
.setting-section:last-of-type { border-bottom: 0; }
.setting-section legend { padding: 0; font: 700 1.25rem/1.2 Georgia,serif; letter-spacing: -.015em; }
.setting-help { margin: 5px 0 13px; color: var(--ink-soft); font-size: .84rem; line-height: 1.45; }
.planning-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.planning-grid .field { min-width: 0; }
.planning-grid .field span { color: var(--ink); font-size: .78rem; letter-spacing: .02em; text-transform: none; }
.planning-grid .field small { min-height: 38px; color: var(--ink-soft); font-size: .72rem; line-height: 1.3; }
.planning-grid input[type="number"] { width: 100%; min-height: 52px; padding: 10px 12px; font-size: 1.15rem; font-weight: 800; }

.choice-grid { display: grid; gap: 9px; }
.choice-grid.two { grid-template-columns: 1fr; }
.choice-card { position: relative; cursor: pointer; }
.choice-card input, .choice-chips input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card > span { display: grid; min-height: 76px; padding: 13px 14px; background: #f5f3eb; border: 1px solid var(--line); border-radius: 13px; transition: .16s ease; }
.choice-card strong { font-size: .92rem; }
.choice-card small { margin-top: 3px; color: var(--ink-soft); font-size: .75rem; line-height: 1.35; }
.choice-card input:checked + span { color: #fff; background: var(--forest); border-color: var(--forest); }
.choice-card input:checked + span small { color: rgba(255,255,255,.72); }
.choice-card input:focus-visible + span, .choice-chips input:focus-visible + span { box-shadow: var(--focus); }

.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chips label { position: relative; cursor: pointer; }
.choice-chips label > span { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 12px; background: #f5f3eb; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; font-weight: 800; transition: .16s ease; }
.choice-chips input:checked + span { color: #fff; background: var(--forest-2); border-color: var(--forest-2); }
.allergy-section .choice-chips input:checked + span { background: var(--terracotta-dark); border-color: var(--terracotta-dark); }
.allergy-note { display: flex; gap: 7px; align-items: flex-start; margin: 13px 0 0; color: var(--ink-soft); font-size: .75rem; }
.allergy-note .icon { margin-top: 2px; color: var(--terracotta-dark); }
.form-error { margin: 3px 0 12px; padding: 12px 13px; color: #792b1b; background: #ffe4dc; border-radius: 11px; font-size: .84rem; font-weight: 750; }
.spin-button { width: 100%; min-height: 56px; margin-top: 5px; font-size: 1rem; }
.resume-menu-button { width: 100%; min-height: 50px; margin-top: 9px; color: var(--forest); border: 1px solid rgba(23,63,53,.14); }

.about-panel { margin: 14px 10px 0; background: rgba(255,255,255,.55); border: 1px solid rgba(23,63,53,.11); border-radius: 15px; }
.about-panel > summary { padding: 15px 16px; cursor: pointer; list-style: none; font-weight: 850; }
.about-panel > summary::-webkit-details-marker { display: none; }
.about-panel > summary::after { content: "+"; float: right; color: var(--terracotta-dark); font-size: 1.35rem; line-height: 1; }
.about-panel[open] > summary::after { content: "−"; }
.about-content { padding: 2px 16px 20px; }
.about-content h2 { margin-top: 8px; font-size: 1.75rem; font-weight: 500; }
.about-content > p { color: var(--ink-soft); }
.about-content .feature-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 22px; }
.about-content .feature-grid article { color: var(--ink); background: var(--paper); border-color: rgba(23,63,53,.1); }
.about-content .feature-grid p { color: var(--ink-soft); }
.about-content .faq { margin-top: 28px; }
.about-content .faq > h3 { font-size: 1.35rem; }
.about-content .faq details { border-color: rgba(23,63,53,.13); }
.about-content .faq summary { color: var(--ink); }
.about-content .faq details p { color: var(--ink-soft); }
.about-content .faq summary::after { color: var(--terracotta-dark); }
.workflow-screen > footer { display: block; padding: 18px 0 0; text-align: center; }

.workflow-header { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; padding: 20px 4px 12px; }
.workflow-header .back-button { grid-column: 1 / -1; justify-self: start; }
.workflow-header h1 { color: var(--ink); font-size: clamp(2.35rem, 11vw, 4rem); }
.workflow-header.compact { grid-template-columns: 1fr; }
.step-label { margin: 0 0 4px; color: var(--terracotta-dark); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.view-intro { margin: 0 4px 17px; color: var(--ink-soft); }
.back-button { display: inline-flex; align-items: center; gap: 5px; min-height: 42px; padding: 6px 2px; color: var(--forest-2); background: transparent; border: 0; cursor: pointer; font-weight: 850; }
.back-button .icon { transform: rotate(90deg); }
.count { align-self: center; }

.meal-panels { display: grid; gap: 10px; }
.meal-panel { overflow: hidden; background: var(--paper); border: 1px solid rgba(23,63,53,.12); border-radius: 16px; box-shadow: 0 8px 24px rgba(34,54,45,.055); }
.meal-panel.open { border-color: rgba(36,94,77,.34); box-shadow: 0 12px 30px rgba(34,54,45,.1); }
.meal-summary { display: grid; grid-template-columns: 36px minmax(0,1fr) 24px; gap: 10px; align-items: center; width: 100%; min-height: 70px; padding: 10px 13px; text-align: left; background: transparent; border: 0; cursor: pointer; }
.meal-number { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--forest); border-radius: 50%; font-size: .8rem; font-weight: 900; }
.meal-summary-copy { min-width: 0; }
.meal-summary-copy strong, .meal-summary-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meal-summary-copy strong { font-size: .94rem; }
.meal-summary-copy small { margin-top: 3px; color: var(--ink-soft); font-size: .75rem; }
.expand-icon { display: grid; place-items: center; color: var(--ink-soft); transition: transform .2s ease; }
.meal-panel.open .expand-icon { transform: rotate(180deg); }
.meal-preview { border-top: 1px solid #ece8dd; }
.meal-image { aspect-ratio: 4 / 2.45; overflow: hidden; background: var(--terracotta); }
.meal-image img { width: 100%; height: 100%; object-fit: cover; }
.image-fallback { display: grid; place-items: center; height: 100%; color: #fff; }
.image-fallback .icon { width: 70px; height: 70px; }
.meal-preview-body { padding: 15px; }
.meal-preview-body > p { margin: 10px 0 14px; color: var(--ink-soft); font-size: .84rem; }
.level-switch { display: inline-flex; width: 100%; gap: 3px; padding: 3px; background: #eef0e8; border-radius: 10px; }
.level-switch button { flex: 1; min-height: 38px; padding: 6px 9px; color: var(--ink-soft); background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: .78rem; font-weight: 850; }
.level-switch button[aria-pressed="true"] { color: #fff; background: var(--forest); }
.meal-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.meal-buttons button { min-height: 46px; }
.reroll-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 42px; margin-top: 8px; color: var(--forest-2); background: transparent; border: 1px dashed rgba(36,94,77,.34); border-radius: 10px; cursor: pointer; font-size: .78rem; font-weight: 850; }
.reroll-button:hover { background: var(--sage); }
.menu-actions { position: sticky; z-index: 5; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #f2ede2 16%); }
.menu-actions button { min-height: 52px; }
.menu-actions #openShoppingButton { grid-column: 1 / -1; }
.share-status { min-height: 1.25em; margin: 3px 0 0; color: var(--ink-soft); font-size: .78rem; text-align: center; }
.share-copy-field { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.workflow-nav { position: sticky; z-index: 8; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; background: rgba(242,237,226,.94); backdrop-filter: blur(10px); }
.workflow-nav > span { color: var(--ink-soft); font-size: .78rem; font-weight: 850; }
.recipe-nav-controls { display: flex; align-items: center; gap: 5px; }
.recipe-nav-controls span { min-width: 42px; color: var(--ink-soft); text-align: center; font-size: .76rem; font-weight: 850; }
.recipe-nav-controls button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--forest-2); background: var(--paper); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.recipe-nav-controls button:first-child .icon { transform: rotate(90deg); }
.recipe-nav-controls button:last-child .icon { transform: rotate(-90deg); }
.recipe-nav-controls button:disabled { opacity: .35; cursor: not-allowed; }
#recipeView .recipe-card { overflow: hidden; background: var(--paper); border: 1px solid rgba(23,63,53,.11); border-radius: 18px; box-shadow: var(--shadow); }
#recipeView .recipe-cover { display: grid; grid-template-columns: 1fr; min-height: 0; }
#recipeView .recipe-visual { min-height: 230px; grid-row: 1; }
#recipeView .recipe-cover-copy { grid-row: 2; padding: 23px 18px; }
#recipeView .recipe-cover h1 { font-size: clamp(2rem, 10vw, 3.5rem); font-weight: 500; }
#recipeView .recipe-body { padding: 16px 15px 24px; }
#recipeView .recipe-level { display: grid; margin-bottom: 14px; }
#recipeView .recipe-level .level-switch { margin-top: 12px; }
.recipe-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.recipe-pager button:first-child .icon { transform: rotate(90deg); }
.recipe-pager button:last-child .icon { transform: rotate(-90deg); }
.recipe-pager button:disabled { opacity: .4; cursor: not-allowed; }

.shopping-accordion { display: grid; gap: 9px; }
.shopping-group { overflow: hidden; background: var(--paper); border: 1px solid rgba(23,63,53,.12); border-radius: 14px; box-shadow: 0 7px 20px rgba(34,54,45,.05); }
.shopping-group > summary { display: grid; grid-template-columns: 1fr auto 20px; gap: 10px; align-items: center; min-height: 58px; padding: 10px 14px; cursor: pointer; list-style: none; }
.shopping-group > summary::-webkit-details-marker { display: none; }
.shopping-group > summary span { font-weight: 850; }
.shopping-group > summary small { color: var(--ink-soft); }
.shopping-group > summary .icon { transition: transform .2s ease; }
.shopping-group[open] > summary .icon { transform: rotate(180deg); }
.shopping-group ul { margin: 0; padding: 0 14px 11px; list-style: none; border-top: 1px solid #ece8dd; }
.shopping-group li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 45px; padding: 7px 0; border-bottom: 1px solid #efebe1; }
.shopping-group li:last-child { border-bottom: 0; }
.shopping-group li label { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
.shopping-group li input { width: 20px; height: 20px; accent-color: var(--forest-2); }
.shopping-group li input:checked + span { color: var(--ink-soft); text-decoration: line-through; }
.shopping-group li strong { white-space: nowrap; }
#shoppingView .notice { margin-top: 14px; }

@media (min-width: 700px) {
  .app-shell { padding-top: 24px; }
  .mobile-hero { padding: 48px 50px 96px; border-radius: 28px; }
  .settings-card { margin: -62px 38px 0; padding: 14px 32px 28px; border-radius: 22px; }
  .planning-grid { gap: 22px; }
  .choice-grid.two { grid-template-columns: 1fr 1fr; }
  .about-panel { margin-left: 38px; margin-right: 38px; }
  .workflow-header { padding-top: 34px; }
  .meal-preview { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); }
  .meal-image { min-height: 100%; aspect-ratio: auto; }
  .meal-preview-body { padding: 22px; }
  .menu-actions { position: static; justify-content: end; grid-template-columns: auto auto auto; background: none; }
  .menu-actions #openShoppingButton { grid-column: auto; }
  #recipeView .recipe-cover { grid-template-columns: minmax(0,1fr) minmax(310px,42%); min-height: 330px; }
  #recipeView .recipe-visual { grid-column: 2; grid-row: 1; min-height: 100%; }
  #recipeView .recipe-cover-copy { grid-column: 1; grid-row: 1; align-self: end; padding: 36px; }
  #recipeView .recipe-body { padding: 26px 30px 32px; }
  #recipeView .recipe-level { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  #recipeView .recipe-level .level-switch { width: auto; min-width: 220px; margin-top: 0; }
  .shopping-accordion { grid-template-columns: 1fr 1fr; align-items: start; }
}
