:root {
  color-scheme: light;
  --ink: #18312c;
  --muted: #687873;
  --forest: #193c35;
  --forest-2: #28584e;
  --cream: #f7f4ec;
  --paper: #fffdf8;
  --sage: #dce6d7;
  --coral: #dc6f51;
  --line: #dfe4dc;
  --shadow: 0 14px 40px rgba(28, 57, 50, .10);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); min-height: 100vh; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(220,111,81,.35); outline-offset: 2px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { background: var(--forest); color: white; padding: 30px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { font: 600 2rem/1 "Newsreader", serif; letter-spacing: -.03em; padding: 0 12px; }
.brand small { display: block; margin-top: 8px; font: 500 .72rem/1.2 "DM Sans"; letter-spacing: .14em; text-transform: uppercase; color: #b9cec7; }
.nav { display: grid; gap: 8px; margin-top: 48px; }
.nav button { min-height: 52px; border: 0; border-radius: 14px; padding: 0 14px; display: flex; align-items: center; gap: 12px; background: transparent; color: #c9d8d3; font-weight: 600; text-align: left; }
.nav button.active { background: rgba(255,255,255,.12); color: white; }
.nav svg { width: 22px; height: 22px; }
.side-note { margin-top: auto; padding: 16px 12px; color: #a9c1ba; font-size: .85rem; line-height: 1.5; }
.side-kicker { display: block; margin-bottom: 8px; color: white; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.main { padding: 38px clamp(24px, 5vw, 72px) 80px; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 34px; }
.app-controls { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex: none; }
.connection-status { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,248,.8); color: var(--muted); font-size: .78rem; font-weight: 700; }
.connection-status i { width: 7px; height: 7px; border-radius: 50%; background: #4f9a6d; box-shadow: 0 0 0 3px rgba(79,154,109,.12); }
.connection-status.offline i { background: var(--coral); box-shadow: 0 0 0 3px rgba(220,111,81,.12); }
.install-button { min-height: 38px; border: 1px solid var(--forest); border-radius: 999px; padding: 0 14px; background: var(--forest); color: white; font-weight: 700; }
.settings-button { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; background: var(--paper); color: var(--forest); font-weight: 700; }
.offline-banner { margin: -12px 0 24px; padding: 11px 14px; border: 1px solid #e2b09f; border-radius: 12px; background: #fff0ea; color: #7b3c2b; font-size: .88rem; font-weight: 600; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: .76rem; font-weight: 700; color: var(--coral); margin: 0 0 8px; }
h1, h2, h3 { font-family: "Newsreader", serif; margin: 0; letter-spacing: -.025em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: .98; max-width: 780px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { line-height: 1.6; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--sage); color: var(--forest); font-weight: 700; }
.hero { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero:after { content: ""; width: 320px; height: 320px; border-radius: 50%; background: #e9c9a8; filter: blur(2px); position: absolute; right: -160px; top: -180px; opacity: .65; }
.hero p { color: var(--muted); max-width: 630px; font-size: 1.08rem; }
.home-overview { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.home-overview button { min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label value" "detail value"; gap: 2px 14px; align-items: center; padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.72); color: var(--ink); text-align: left; }
.home-overview button:hover { border-color: #b9c9bd; background: var(--paper); }
.home-overview span { grid-area: label; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.home-overview strong { grid-area: value; font: 600 2rem/1 "Newsreader", serif; }
.home-overview small { grid-area: detail; color: var(--muted); }
.import-drawer { margin-bottom: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 8px 24px rgba(28,57,50,.05); overflow: hidden; }
.import-drawer > summary { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; cursor: pointer; list-style: none; }
.import-drawer > summary::-webkit-details-marker { display: none; }
.import-drawer > summary span, .import-drawer > summary strong, .import-drawer > summary small { display: block; }
.import-drawer > summary small { margin-top: 3px; color: var(--muted); }
.import-drawer > summary b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: var(--forest); font-size: 1.3rem; transition: transform .2s; }
.import-drawer[open] > summary b { transform: rotate(45deg); }
.import-drawer-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.import-drawer .import-form { margin-top: 18px; }
.cookbook-nav { display: flex; gap: 6px; overflow-x: auto; margin: 6px 0 28px; padding: 5px; border-radius: 14px; background: #e9eee7; scrollbar-width: none; }
.cookbook-nav::-webkit-scrollbar { display: none; }
.cookbook-nav button { min-height: 42px; flex: none; border: 0; border-radius: 10px; padding: 0 14px; background: transparent; color: var(--muted); font-weight: 750; white-space: nowrap; }
.cookbook-nav button.active { background: white; color: var(--forest); box-shadow: 0 2px 9px rgba(28,57,50,.1); }
.cookbook-nav button span { display: inline-grid; min-width: 23px; height: 23px; margin-left: 4px; place-items: center; border-radius: 999px; background: var(--sage); font-size: .72rem; }
.cookbook-heading { margin-top: 0; align-items: center; }
.cookbook-heading .text-button { display: block; border: 0; background: transparent; color: var(--coral); padding: 0 0 6px; font-weight: 800; }
.recipe-shelf { margin-top: 34px; }
.shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.shelf-head p { margin: 5px 0 0; color: var(--muted); }
.shelf-grid { display: flex; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shelf-grid .recipe-card { width: min(285px, 78vw); flex: 0 0 auto; scroll-snap-align: start; }
.recipe-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.recipe-signals span { padding: 4px 7px; border-radius: 7px; background: #edf1ea; color: var(--forest); font-size: .72rem; font-weight: 750; }
.library-search-row { grid-template-columns: minmax(280px, 1fr) 180px auto; }
.display-toggle { display: inline-flex; align-self: end; padding: 4px; border-radius: 12px; background: #e8ede6; }
.display-toggle button { width: 42px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 1.2rem; }
.display-toggle button.active { background: white; color: var(--forest); box-shadow: 0 2px 8px rgba(28,57,50,.1); }
.facet-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.facet-panel > summary { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 14px; cursor: pointer; list-style: none; font-weight: 800; }
.facet-panel > summary::-webkit-details-marker { display: none; }
.facet-panel > summary span:not(:empty) { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: white; font-size: .72rem; }
.facet-grid { display: grid; grid-template-columns: repeat(4, minmax(135px,1fr)); gap: 10px; padding: 0 14px 14px; }
.facet-grid label { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: capitalize; }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 14px; }
.active-filters button { min-height: 34px; border: 1px solid #cbd4cb; border-radius: 999px; padding: 0 11px; background: white; color: var(--forest); font-size: .78rem; font-weight: 700; }
.active-filters .clear-all { border: 0; color: var(--coral); }
.results-summary { display: flex; gap: 7px; margin: 4px 0 14px; color: var(--muted); font-size: .86rem; }
.recipe-grid.list-view { grid-template-columns: 1fr; gap: 9px; }
.recipe-grid.list-view .recipe-card { display: grid; grid-template-columns: 112px 1fr; min-height: 112px; }
.recipe-grid.list-view .recipe-card > img, .recipe-grid.list-view .recipe-card > .image-fallback { width: 112px; height: 100%; min-height: 112px; }
.recipe-grid.list-view .card-body { padding: 15px 18px; }
.recipe-grid.list-view .card-tags { margin-top: 8px; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 16px; }
.collection-card { min-width: 0; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); text-align: left; }
.collection-card:hover { box-shadow: var(--shadow); }
.collection-card > span:last-child, .collection-card strong, .collection-card small { display: block; min-width: 0; }
.collection-card strong { font: 600 1.35rem "Newsreader", serif; }
.collection-card small { margin-top: 5px; color: var(--muted); }
.collection-stack { width: 112px; height: 84px; display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; overflow: hidden; border-radius: 12px; background: var(--sage); }
.collection-stack img, .collection-stack .image-fallback { width: 100%; height: 84px; object-fit: cover; font-size: 1rem; }
.collection-empty { grid-column: 1/-1; display: grid; place-items: center; font: 600 2rem "Newsreader", serif; }
.collection-modal { width: min(820px, 100%); }
.collection-picker-field { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.collection-picker-field legend { padding: 0 6px; font-weight: 800; }
.collection-picker-field legend span { color: var(--muted); }
.collection-recipe-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: 390px; overflow: auto; }
.collection-recipe-option input { position: absolute; opacity: 0; }
.collection-recipe-option > span { min-height: 68px; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: 1fr 1fr; gap: 0 10px; align-items: end; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; }
.collection-recipe-option img, .collection-recipe-option .image-fallback { grid-row: 1/3; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; font-size: .9rem; }
.collection-recipe-option b { align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-recipe-option small { align-self: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.collection-recipe-option input:checked + span { border-color: var(--forest); background: var(--sage); box-shadow: inset 0 0 0 1px var(--forest); }
.collection-checks { display: grid; gap: 8px; }
.collection-check { position: relative; }
.collection-check input { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; accent-color: var(--forest); }
.collection-check span { display: block; padding: 13px 48px 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.collection-check b, .collection-check small { display: block; }
.collection-check small { margin-top: 3px; color: var(--muted); }
.muted { color: var(--muted); }
.actions .action-wide { grid-column: 1/-1; }
.ingredient-section { margin-top: 24px; }
.ingredient-section:first-of-type { margin-top: 18px; }
.ingredient-section h3 { font: 800 .84rem "DM Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.ingredient-section .ingredients { margin-top: 8px; }
.method-section + .method-section { margin-top: 24px; }
.method-section h3 { margin-top: 18px; font: 800 .84rem "DM Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--coral); }
.method-section h3 + .steps { margin-top: 8px; }
.import-form { position: relative; z-index: 1; margin-top: 28px; max-width: 760px; display: flex; gap: 10px; background: white; border: 1px solid #cfd8cf; border-radius: 18px; padding: 8px; box-shadow: 0 8px 25px rgba(28,57,50,.08); }
.import-form input { flex: 1; min-width: 0; border: 0; padding: 12px; color: var(--ink); outline: none; }
.bulk-import-form { align-items: end; }
.bulk-link-field { display: grid; flex: 1; min-width: 0; gap: 5px; padding: 4px 4px 4px 8px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.bulk-link-field textarea { width: 100%; min-height: 82px; border: 0; padding: 7px 4px; resize: vertical; color: var(--ink); line-height: 1.45; outline: none; }
.bulk-link-field small { font-weight: 500; }
.bulk-import-form > button { margin-bottom: 4px; }
.import-options { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); }
.import-options small { font-size: .78rem; }
.primary, .secondary, .ghost, .danger { min-height: 46px; border-radius: 12px; padding: 0 18px; border: 1px solid transparent; font-weight: 700; }
.primary { background: var(--forest); color: white; }
.primary:hover { background: var(--forest-2); }
.secondary { background: var(--sage); color: var(--forest); }
.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.danger { background: #f8e3dd; color: #913f2b; }
.primary[disabled] { opacity: .65; cursor: wait; }
.section-head { margin-top: 42px; margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.library-tools { display: grid; gap: 14px; margin-bottom: 22px; }
.recipe-search { display: flex; gap: 8px; max-width: 650px; }
.recipe-search input { flex: 1; min-width: 0; min-height: 48px; border: 1px solid #cbd4cb; border-radius: 12px; background: white; padding: 0 14px; color: var(--ink); }
.tag-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
.tag-filter button, .detail-tags button, .tag-picker button { min-height: 38px; border: 1px solid #cbd4cb; border-radius: 999px; padding: 0 13px; background: var(--paper); color: var(--forest); font-weight: 700; white-space: nowrap; }
.tag-filter button.active, .tag-picker button.active { border-color: var(--forest); background: var(--forest); color: white; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.recipe-card { border: 1px solid var(--line); background: var(--paper); border-radius: 20px; overflow: hidden; text-align: left; padding: 0; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.recipe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.recipe-card img, .image-fallback { width: 100%; height: 185px; object-fit: cover; background: linear-gradient(145deg,#c5d5ba,#e7d3ae); }
.image-fallback { display: grid; place-items: center; font: 600 2.5rem "Newsreader"; color: var(--forest); }
.card-body { padding: 19px; }
.card-title, .recipe-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.card-body h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favorite-mark { color: #d99735; font-size: 1.25rem; line-height: 1; }
.favorite-button { width: 48px; height: 48px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: white; color: #a5aca4; font-size: 1.4rem; }
.favorite-button.active { color: #d99735; border-color: #e3bd7f; background: #fff6dc; }
.favorite-filter { color: #9a6a20 !important; }
.favorite-filter.active { background: #d99735 !important; border-color: #d99735 !important; color: white !important; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .88rem; margin-top: 11px; }
.card-tags, .detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.card-tags span { padding: 5px 9px; border-radius: 999px; background: var(--sage); color: var(--forest); font-size: .76rem; font-weight: 700; }
.detail-tags button { min-height: 32px; padding: 0 10px; background: var(--sage); border: 0; font-size: .8rem; }
.empty { border: 1px dashed #b9c6ba; border-radius: 20px; padding: 40px; text-align: center; color: var(--muted); background: rgba(255,255,255,.35); }
.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 28px; }
.detail-hero { min-height: 360px; border-radius: 24px; overflow: hidden; position: relative; background: var(--sage); }
.detail-hero img { width: 100%; height: 100%; min-height: 360px; position: absolute; inset: 0; object-fit: cover; }
.detail-hero .image-fallback { height: 100%; min-height: 360px; }
.back { margin-bottom: 20px; }
.panel { border: 1px solid var(--line); background: var(--paper); border-radius: 22px; padding: 24px; }
.detail-copy { display: flex; flex-direction: column; }
.detail-copy .source { color: var(--coral); font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.detail-copy h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); }
.detail-copy .description { color: var(--muted); }
.servings { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 16px; background: var(--sage); margin: 16px 0; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: white; color: var(--forest); font-size: 1.3rem; }
.stepper strong { min-width: 28px; text-align: center; font-size: 1.15rem; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.actions button { width: 100%; min-width: 0; padding-inline: 12px; }
.delete-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 32px; padding: 20px 4px 4px; border-top: 1px solid #ead5cf; }
.delete-zone strong, .delete-zone span { display: block; }
.delete-zone span { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.content-cols { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; margin-top: 28px; }
.ingredients, .steps, .grocery-list { list-style: none; padding: 0; margin: 20px 0 0; }
.ingredients li { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.ingredients li:before { content: ""; width: 8px; height: 8px; margin-top: 8px; flex: none; border-radius: 50%; background: var(--coral); }
.steps { counter-reset: steps; }
.steps li { counter-increment: steps; display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 14px 0; line-height: 1.6; }
.steps li:before { content: counter(steps); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: var(--forest); font-weight: 700; }
.nutrition { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.nutrition-heading { margin-top: 16px; color: var(--muted); font-size: .84rem; font-weight: 700; }
.nutrition-heading span { color: var(--coral); }
.nutrition-estimate-note { display: block; margin-top: 8px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.nutrition div { padding: 12px 8px; text-align: center; border: 1px solid var(--line); border-radius: 12px; }
.nutrition strong { display: block; }
.nutrition span { color: var(--muted); font-size: .76rem; }
.planner { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 12px; overflow-x: auto; padding: 3px 3px 18px; }
.day { min-height: 265px; border: 1px solid var(--line); border-radius: 18px; padding: 15px; background: rgba(255,255,255,.5); }
.day.today { border-color: var(--coral); }
.day.drop-target { border-color: var(--forest-2); background: var(--sage); box-shadow: inset 0 0 0 2px var(--forest-2); }
.plan-range { display: inline-flex; gap: 4px; margin: -4px 0 20px; padding: 4px; border-radius: 12px; background: #e8ede6; }
.plan-range button { min-height: 40px; border: 0; border-radius: 9px; padding: 0 14px; background: transparent; color: var(--muted); font-weight: 750; }
.plan-range button.active { background: white; color: var(--forest); box-shadow: 0 2px 8px rgba(28,57,50,.1); }
.plan-navigation { display: grid; grid-template-columns: repeat(4, minmax(100px,1fr)); gap: 5px; margin: -6px 0 26px; padding: 5px; border-radius: 15px; background: #e4e9e1; }
.plan-navigation button { min-height: 48px; border: 0; border-radius: 11px; padding: 0 14px; background: transparent; color: var(--muted); font-weight: 800; }
.plan-navigation button.active { background: white; color: var(--forest); box-shadow: 0 3px 10px rgba(28,57,50,.1); }
.meal-date-group { max-width: 800px; margin-bottom: 22px; }
.meal-date-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--muted); }
.meal-date-head strong { color: var(--ink); }
.meal-date-head button { border: 0; padding: 0; background: transparent; text-align: left; }
.meal-date-head button strong { text-decoration: underline; text-decoration-color: rgba(224,107,77,.45); text-underline-offset: 4px; }
.timeline-meal { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 8px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; background: white; text-align: left; }
.timeline-meal strong, .timeline-meal span { display: block; }
.timeline-meal div span { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.timeline-meal div small { display: block; margin-top: 5px; color: var(--muted); }
.plan-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.meal-prep-intro, .meal-prep-empty { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(22px,4vw,38px); border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.meal-prep-intro p:last-child, .meal-prep-empty p:last-child { max-width: 650px; margin-bottom: 0; color: var(--muted); }
.meal-prep-intro > button, .meal-prep-empty > button { flex: none; min-height: 54px; }
.prep-batch-section { margin-top: 38px; }
.prep-batch-section > .section-head { margin-top: 0; }
.prep-batch-section > .section-head > span { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: var(--sage); color: var(--forest); font-weight: 800; }
.prep-batch-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); gap: 16px; }
.prep-batch-card { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: 0 8px 24px rgba(28,57,50,.06); }
.prep-batch-card.past { opacity: .8; }
.prep-batch-card > header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.prep-batch-card > header h2 { font-size: 1.8rem; }
.prep-batch-card > header div > span, .prep-components { color: var(--muted); font-size: .86rem; }
.prep-batch-status { padding: 5px 8px; border-radius: 999px; background: var(--sage); color: var(--forest); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.prep-batch-card.past .prep-batch-status { background: #eceeea; color: var(--muted); }
.prep-components { margin: 15px 0; }
.prep-batch-days { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 5px; }
.prep-batch-days button { min-width: 70px; min-height: 58px; display: grid; place-items: center; gap: 1px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); }
.prep-batch-days button:hover { border-color: var(--coral); }
.prep-batch-days button strong { font-size: .78rem; }
.prep-batch-days button span { color: var(--muted); font-size: .72rem; }
.prep-batch-card > footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.day-head { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; border: 0; padding: 0; background: transparent; color: var(--ink); text-align: left; }
.day-head strong { display: block; }
.day-head span { color: var(--muted); font-size: .8rem; }
.day-head .day-open-label { max-width: 76px; color: var(--coral); font-size: .7rem; font-weight: 800; line-height: 1.3; text-align: right; }
.day-head:hover strong, .day-head:focus-visible strong { color: var(--coral); }
.meal { border: 0; width: 100%; background: white; box-shadow: 0 3px 10px rgba(28,57,50,.07); color: var(--ink); border-radius: 12px; padding: 12px; margin-bottom: 8px; text-align: left; }
.meal[draggable="true"] { cursor: grab; }
.meal.dragging { opacity: .45; cursor: grabbing; }
.meal span { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
.meal small { display: inline-block; margin-top: 7px; padding: 3px 6px; border-radius: 999px; background: var(--sage); color: var(--forest); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.meal.meal-prep { border-left: 3px solid var(--coral); }
.planned-meal-title { display: block; }
.plan-recipe-links { display: grid; gap: 3px; }
.plan-recipe-link { width: fit-content; max-width: 100%; min-height: 30px; border: 0; padding: 2px 0; background: transparent; color: var(--forest); font: inherit; font-weight: 800; text-align: left; text-decoration: underline; text-decoration-color: rgba(224,107,77,.55); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.plan-recipe-link:hover, .plan-recipe-link:focus-visible { color: var(--coral); text-decoration-color: currentColor; }
.meal-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.meal-edit { min-height: 32px; border: 0; padding: 4px 0 0 10px; background: transparent; color: var(--coral); font-weight: 800; }
.timeline-recipe-links { gap: 5px; }
.timeline-meal > div { min-width: 0; }
.timeline-meal > .meal-edit { flex: none; padding: 8px 4px 8px 12px; }
.day-view-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 22px 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.day-view-head p:last-child { margin-top: 5px; color: var(--muted); }
.day-view-actions { display: flex; align-items: end; gap: 9px; }
.day-sort { display: grid; gap: 4px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.day-sort select { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; padding: 0 34px 0 11px; background: white; color: var(--forest); font: 700 .82rem "DM Sans", sans-serif; text-transform: none; letter-spacing: 0; }
.day-recipe-list { display: grid; gap: 12px; max-width: 900px; }
.day-meal-section { max-width: 960px; margin: 28px 0 38px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.42); }
.day-meal-section > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.day-meal-section > header h2 { margin: 1px 0 0; font-size: 2rem; }
.day-meal-section > header span { color: var(--muted); font-size: .82rem; }
.day-meal-section > header .primary { min-height: 50px; }
.day-recipe-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 4px 14px rgba(28,57,50,.05); }
.day-recipe-main { display: grid; gap: 7px; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--ink); text-align: left; }
button.day-recipe-main:hover > strong, button.day-recipe-main:focus-visible > strong { color: var(--coral); }
.day-recipe-main > strong { font: 700 1.25rem "Fraunces", serif; transition: color .15s; }
.day-recipe-type { color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.day-recipe-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.day-recipe-meta > span { display: inline-flex; gap: 4px; align-items: center; padding: 5px 8px; border-radius: 8px; background: #f0f3ec; color: var(--forest); font-size: .78rem; }
.day-recipe-meta > span.muted { color: var(--muted); }
.day-recipe-switcher { position: sticky; z-index: 4; top: 0; display: flex; gap: 7px; margin: -8px -8px 20px; padding: 10px 8px; overflow-x: auto; background: rgba(247,245,238,.94); backdrop-filter: blur(10px); scrollbar-width: none; }
.day-recipe-switcher::-webkit-scrollbar { display: none; }
.day-recipe-switcher button { flex: none; min-height: 40px; max-width: 240px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: white; color: var(--forest); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.day-recipe-switcher button.active { border-color: var(--forest); background: var(--forest); color: white; }
.day-recipe-switcher .day-overview-link { border-color: var(--coral); color: var(--coral); }
.swipe-hint { margin: -14px 0 18px; color: var(--muted); font-size: .76rem; text-align: center; }
.day-recipe-switcher + .swipe-hint + .back + .detail, .day-recipe-switcher ~ .detail { touch-action: pan-y; }
.day-recipe-controls-spacer { height: 86px; }
.day-recipe-controls { position: fixed; z-index: 9; left: max(270px, calc(50% - 310px)); bottom: 18px; width: min(620px, calc(100vw - 300px)); display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 6px; padding: 7px; border: 1px solid rgba(28,57,50,.16); border-radius: 17px; background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(21,50,44,.2); backdrop-filter: blur(12px); }
.day-recipe-controls button { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 11px; padding: 7px 10px; background: #eef2ea; color: var(--forest); }
.day-recipe-controls button strong { font-size: .86rem; }
.day-recipe-controls button span { font-size: 1.1rem; }
.day-recipe-controls button.overview { background: var(--forest); color: white; }
.add-meal { width: 100%; min-height: 42px; border: 1px dashed #afbbb0; border-radius: 12px; background: transparent; color: var(--forest); }
.grocery-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 24px; }
.grocery-sources { margin: 20px 0; padding: 16px; border-radius: 16px; background: #f0f3ec; }
.grocery-sources-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grocery-sources-head h3 { font: 700 1rem "DM Sans"; letter-spacing: 0; }
.grocery-sources-head > span { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--forest); font-size: .8rem; font-weight: 700; }
.grocery-sources ul { list-style: none; padding: 0; margin: 9px 0 0; }
.grocery-sources li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #d8dfd5; }
.grocery-sources li strong, .grocery-sources li span { display: block; }
.grocery-sources li span { margin-top: 3px; color: var(--muted); font-size: .8rem; }
.grocery-head { align-items: center; }
.quantity-toggle { display: inline-flex; flex: none; padding: 4px; border-radius: 12px; background: #edf0e9; }
.quantity-toggle button { min-height: 38px; border: 0; border-radius: 9px; padding: 0 13px; background: transparent; color: var(--muted); font-weight: 700; white-space: nowrap; }
.quantity-toggle button.active { background: white; color: var(--forest); box-shadow: 0 2px 8px rgba(28,57,50,.10); }
.grocery-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.grocery-section { padding: 22px 4px 5px; color: var(--coral); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.grocery-item input { width: 22px; height: 22px; accent-color: var(--forest); }
.grocery-item.checked .item-name { text-decoration: line-through; color: var(--muted); }
.grocery-item small { color: var(--muted); display: block; margin-top: 4px; }
.item-sources span { display: block; line-height: 1.45; }
.grocery-item-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.pantry-action { min-height: 34px; border: 1px solid #cbd4cb; border-radius: 9px; background: white; padding: 0 9px; color: var(--forest); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.pantry-panel { margin: 18px 0; border: 1px solid var(--line); border-radius: 15px; background: #f4f6ef; overflow: hidden; }
.pantry-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; cursor: pointer; list-style: none; }
.pantry-heading::-webkit-details-marker { display: none; }
.pantry-heading::after { content: "⌄"; flex: none; color: var(--forest); font-size: 1.2rem; transition: transform .18s ease; }
.pantry-panel[open] .pantry-heading::after { transform: rotate(180deg); }
.pantry-heading h3, .pantry-heading p { margin: 0; }
.pantry-heading p { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.pantry-heading > span { order: 2; min-width: 30px; padding: 5px 8px; margin-left: auto; border-radius: 999px; background: var(--sage); color: var(--forest); text-align: center; font-size: .76rem; font-weight: 800; }
.pantry-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.pantry-body-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 16px; }
.pantry-body-actions h4, .pantry-body-actions p { margin: 0; }
.pantry-body-actions p { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.pantry-body-actions button { flex: none; }
.pantry-modal { width: min(760px, 100%); }
.pantry-modal-meta { display: inline-flex; align-items: baseline; gap: 5px; margin-top: 18px; padding: 7px 11px; border-radius: 999px; background: var(--sage); color: var(--forest); font-size: .78rem; }
.pantry-modal-meta strong { font-size: 1rem; }
.pantry-starter { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 24px; margin-top: 14px; }
.pantry-starter-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.pantry-starter-group legend { margin-bottom: 7px; color: var(--coral); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.pantry-starter-group > div { display: grid; gap: 5px; }
.pantry-starter-group label { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 3px 5px; border-radius: 8px; cursor: pointer; font-size: .85rem; }
.pantry-starter-group label:hover { background: rgba(255,255,255,.7); }
.pantry-starter-group input { width: 18px; height: 18px; flex: none; accent-color: var(--forest); }
.pantry-modal-custom { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.pantry-modal-custom h3, .pantry-modal-custom p { margin: 0; }
.pantry-modal-custom p { margin-top: 4px; color: var(--muted); font-size: .82rem; }
.pantry-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 13px; }
.pantry-add input { min-width: 0; min-height: 42px; border: 1px solid #cbd4cb; border-radius: 10px; background: white; padding: 0 12px; color: var(--ink); }
.pantry-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0 0; padding: 0; list-style: none; }
.pantry-list li { display: inline-flex; align-items: center; gap: 3px; min-height: 34px; padding-left: 11px; border: 1px solid #d1d9ce; border-radius: 999px; background: white; font-size: .8rem; }
.pantry-list .icon-button { width: 30px; height: 30px; font-size: .95rem; }
.pantry-empty { display: block; margin-top: 12px; color: var(--muted); }
.icon-button { border: 0; background: transparent; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); font-size: 1.2rem; }
.add-item { display: flex; gap: 8px; margin-top: 16px; }
.add-item .quantity-input { width: 74px; flex: none; }
.grocery-controls { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.sort-control { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.sort-control select { min-height: 46px; border: 1px solid #cbd4cb; border-radius: 12px; background: white; padding: 0 34px 0 12px; color: var(--ink); }
.add-item input, .field { width: 100%; max-width: 100%; min-width: 0; min-height: 46px; border: 1px solid #cbd4cb; border-radius: 12px; background: white; padding: 0 13px; color: var(--ink); }
.summary-card { position: sticky; top: 38px; align-self: start; }
.summary-card .big { font: 600 3.5rem "Newsreader"; margin: 12px 0 0; }
.grocery-reset-actions { display: grid; gap: 8px; margin-top: 14px; }
.grocery-reset-actions button { width: 100%; }
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(16,40,35,.55); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; }
.modal { background: var(--paper); width: min(560px, 100%); max-width: 100%; border-radius: 24px; padding: 28px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal.tag-modal { width: min(720px, 100%); }
.modal.version-modal { width: min(760px, 100%); }
.modal.prep-modal { width: min(880px, 100%); }
.modal.settings-modal { width: min(820px, 100%); }
.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.form-grid { display: grid; min-width: 0; gap: 16px; margin-top: 22px; }
.form-grid label { display: grid; min-width: 0; gap: 7px; font-weight: 700; font-size: .88rem; }
.form-grid label > span { color: var(--muted); font-size: .76rem; font-weight: 500; }
.measurement-options { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; }
.measurement-options legend { margin-bottom: 8px; font-weight: 800; }
.measurement-options label { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; }
.measurement-options input { width: 18px; height: 18px; accent-color: var(--forest); }
.measurement-options strong, .measurement-options small { display: block; }
.measurement-options small { margin-top: 4px; color: var(--muted); font-weight: 500; }
.equipment-settings { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 15px; }
.equipment-settings legend { padding: 0 6px; font-weight: 800; }
.equipment-settings > p { margin-bottom: 13px; color: var(--muted); font-size: .82rem; }
.equipment-settings > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.equipment-settings label { display: grid; gap: 6px; font-size: .8rem; font-weight: 750; }
.equipment-settings.detailed-equipment > .equipment-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.equipment-card { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.equipment-card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.text-button { min-height: 32px; border: 0; background: transparent; font-weight: 750; }
.danger-text { color: #a34535; }
.equipment-card-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.55fr); gap: 10px; }
.outdoor-card-fields { display: grid; grid-template-columns: 1fr 1fr 150px 1.2fr; gap: 10px; align-items: end; }
.input-with-suffix { position: relative; }
.input-with-suffix input { width: 100%; padding-right: 42px; }
.input-with-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .74rem; }
.equipment-add-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.add-equipment { margin-top: 11px; }
.compact-equipment-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.equipment-empty { padding: 12px; border-radius: 10px; background: #f5f4ee; color: var(--muted); font-size: .83rem; }
.form-grid textarea.field { padding: 12px 13px; resize: vertical; line-height: 1.5; }
.library-search-row { display: grid; grid-template-columns: minmax(280px, 1fr) 140px 170px; gap: 12px; align-items: end; }
.library-search-row > label { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.card-rating { margin-top: 10px; color: #b56b23; letter-spacing: .08em; }
.original-attribution { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin: -4px 0 18px; padding: 11px 13px; border-radius: 11px; background: var(--sage); color: var(--muted); font-size: .82rem; }
.original-attribution a { color: var(--forest); font-weight: 800; }
.recipe-notebook { margin-top: 24px; }
.notebook-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.version-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.version-actions > span { padding: 8px 10px; border-radius: 999px; background: var(--sage); color: var(--forest); font-size: .78rem; font-weight: 800; }
.rating-picker { display: flex; align-items: center; gap: 3px; margin: 20px 0; }
.rating-picker button { border: 0; background: transparent; color: #c7ccc5; font-size: 1.75rem; line-height: 1; padding: 3px; }
.rating-picker button.active { color: #b56b23; }
.rating-picker span { margin-left: 10px; color: var(--muted); font-size: .85rem; }
.notebook-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notebook-fields label { display: grid; gap: 7px; font-size: .88rem; font-weight: 700; }
.notebook-fields textarea { width: 100%; border: 1px solid #cbd4cb; border-radius: 12px; background: white; padding: 12px 13px; color: var(--ink); resize: vertical; line-height: 1.5; }
.current-version { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 16px; border-radius: 14px; background: var(--sage); }
.current-version span { color: var(--muted); }
.version-list { list-style: none; margin: 14px 0 0; padding: 0; }
.version-list li { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.version-list strong, .version-list span, .version-list small { display: block; }
.version-list span { margin-top: 4px; color: var(--muted); }
.version-list small { margin-top: 4px; color: var(--muted); }
.empty.compact { margin-top: 16px; padding: 24px; }
.prep-basics { display: grid; grid-template-columns: 1.5fr .7fr .8fr; gap: 12px; }
.manual-recipe-basics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.manual-recipe-basics label { display: grid; gap: 7px; }
.prep-basics label, .prep-custom label { display: grid; gap: 7px; font-weight: 700; font-size: .88rem; }
.prep-section { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; }
.prep-section legend { padding: 0 6px; font-weight: 800; }
.prep-section legend small { color: var(--muted); font-weight: 500; }
.day-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.day-option input, .component-option input { position: absolute; opacity: 0; pointer-events: none; }
.day-option span { display: grid; gap: 2px; min-height: 58px; place-content: center; border: 1px solid var(--line); border-radius: 11px; background: white; text-align: center; color: var(--muted); cursor: pointer; }
.day-option input:checked + span { border-color: var(--forest); background: var(--sage); color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.component-picker { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-height: 220px; overflow: auto; }
.component-option span { display: block; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; cursor: pointer; }
.component-option strong, .component-option small { display: block; }
.component-option small { margin-top: 4px; color: var(--muted); }
.component-option input:checked + span { border-color: var(--forest); background: var(--sage); box-shadow: inset 0 0 0 1px var(--forest); }
.prep-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prep-custom textarea.field { padding: 12px 13px; resize: vertical; line-height: 1.5; }
.prep-summary, .batch-detail { padding: 14px 16px; border-radius: 13px; background: var(--sage); color: var(--forest); font-weight: 800; }
.batch-detail strong, .batch-detail span, .batch-detail small { display: block; }
.batch-detail span, .batch-detail small { margin-top: 5px; color: var(--muted); font-weight: 500; }
.tag-group { border: 1px solid var(--line); border-radius: 14px; padding: 0; margin: 0; background: white; }
.tag-group summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; cursor: pointer; font-weight: 700; font-size: .9rem; list-style: none; }
.tag-group summary::-webkit-details-marker { display: none; }
.tag-group summary span:not(:empty) { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: var(--forest); font-size: .75rem; }
.tag-group .tag-picker { padding: 0 12px 14px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.cook { position: fixed; inset: 0; z-index: 30; background: #163c34; color: white; overflow: auto; padding: clamp(20px, 4vw, 54px); }
.cook-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.cook-top h1 { max-width: 800px; }
.cook .eyebrow { color: #f0aa8f; }
.cook .primary { min-height: 50px; background: white; color: var(--forest); }
.cook-recipe-tabs { position: sticky; z-index: 3; top: -1px; display: flex; gap: 7px; margin: 24px 0; padding: 9px 0; overflow-x: auto; background: rgba(22,60,52,.96); backdrop-filter: blur(10px); scrollbar-width: none; }
.cook-recipe-tabs button { flex: none; min-height: 46px; max-width: 280px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 0 15px; background: transparent; color: white; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.cook-recipe-tabs button.active { border-color: #f0aa8f; background: white; color: var(--forest); }
.cook-phase-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; max-width: 620px; margin: 24px 0 22px; padding: 5px; border-radius: 17px; background: rgba(0,0,0,.16); }
.cook-phase-nav button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 13px; padding: 0 15px; background: transparent; color: rgba(255,255,255,.7); font-weight: 800; }
.cook-phase-nav button > span { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .72rem; }
.cook-phase-nav button > small { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.12); }
.cook-phase-nav button.active { background: white; color: var(--forest); box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.timer-peek { min-height: 44px; margin: -10px 0 4px; border: 1px solid #f0aa8f; border-radius: 999px; padding: 0 15px; background: transparent; color: white; font-weight: 800; }
.timer-peek strong { min-width: 22px; height: 22px; display: inline-grid; place-items: center; margin-right: 5px; border-radius: 50%; background: #f0aa8f; color: var(--forest); }
.recipe-reference { margin-top: 4px; }
.meal-prep-board { margin: 24px 0 30px; padding: clamp(18px,3vw,28px); border-radius: 24px; background: #f7f5ee; color: var(--ink); }
.meal-prep-board > header { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.meal-prep-board .eyebrow { color: var(--coral); }
.meal-prep-board > header p:last-child { max-width: 640px; margin-top: 6px; color: var(--muted); }
.meal-prep-board > header > strong { font-size: 1.7rem; color: var(--forest); white-space: nowrap; }
.meal-prep-board > header > strong span { display: block; color: var(--muted); font-size: .7rem; text-align: right; }
.prep-task-list { display: grid; gap: 8px; margin-top: 20px; }
.meal-prep-board .conductor-task { border-color: #d7ddd4; background: white; }
.meal-prep-board .conductor-task .task-time span, .meal-prep-board .task-copy small { color: var(--muted); }
.meal-prep-board .task-copy > button { color: var(--coral); }
.meal-prep-board .task-actions button { border-color: #cbd5cb; color: var(--forest); }
.meal-prep-board .task-actions button.done { background: var(--forest); color: white; }
.prep-complete { margin-top: 18px; padding: 16px; border-radius: 13px; background: var(--sage); color: var(--forest); font-weight: 800; }
.completed-prep { margin-top: 16px; }
.completed-prep summary { cursor: pointer; color: var(--muted); font-weight: 800; }
.completed-prep .conductor-task { margin-top: 8px; }
.meal-conductor { margin: 24px 0 30px; padding: clamp(18px,3vw,28px); border: 1px solid rgba(255,255,255,.2); border-radius: 24px; background: rgba(255,255,255,.07); }
.meal-conductor > header { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.meal-conductor > header > div > p:last-child { max-width: 640px; margin-top: 6px; color: rgba(255,255,255,.7); }
#meal-conductor-form { display: flex; align-items: end; gap: 8px; }
#meal-conductor-form label { display: grid; gap: 5px; color: rgba(255,255,255,.75); font-size: .75rem; font-weight: 800; }
#meal-conductor-form input, #meal-conductor-form button { min-height: 46px; border: 0; border-radius: 10px; padding: 0 12px; }
#meal-conductor-form button { background: white; color: var(--forest); font-weight: 800; }
.conductor-warnings { margin-top: 18px; padding: 14px 16px; border-radius: 13px; background: #fff0d9; color: #633d0e; }
.conductor-warnings p { margin-top: 5px; }
.conductor-warnings button { min-height: 38px; margin-top: 9px; border: 1px solid #c58c45; border-radius: 9px; background: transparent; color: #633d0e; font-weight: 800; }
.conductor-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.conductor-summary span { padding: 8px 11px; border-radius: 9px; background: rgba(255,255,255,.1); font-size: .8rem; }
.conductor-groups { display: grid; gap: 18px; margin-top: 22px; }
.conductor-group > header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 8px; }
.conductor-group > header h3 { font-size: 1.45rem; }
.conductor-group > header > span { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-weight: 800; }
.conductor-group > div { display: grid; gap: 8px; }
.conductor-task { display: grid; grid-template-columns: 90px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 13px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(8,30,25,.26); }
.conductor-task .task-time strong, .conductor-task .task-time span { display: block; }
.conductor-task .task-time span { margin-top: 3px; color: rgba(255,255,255,.65); font-size: .72rem; }
.task-copy > button { border: 0; padding: 0; background: transparent; color: #f0aa8f; font-weight: 800; text-align: left; }
.task-copy > strong { display: inline; margin-left: 7px; font-size: .75rem; }
.task-copy p { margin-top: 4px; line-height: 1.4; }
.task-copy small { display: block; margin-top: 5px; color: rgba(255,255,255,.67); }
.task-actions { display: flex; gap: 5px; }
.task-actions button { min-height: 40px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: transparent; color: white; font-weight: 800; }
.task-actions button.done { background: white; color: var(--forest); }
.conductor-task.active { border-color: #f0aa8f; box-shadow: inset 4px 0 #f0aa8f; }
.conductor-task.done { opacity: .55; }
.conductor-task.done .task-copy p { text-decoration: line-through; }
.more-conductor-tasks { margin-top: 8px; }
.more-conductor-tasks summary { min-height: 46px; display: flex; align-items: center; justify-content: center; border: 1px dashed rgba(255,255,255,.26); border-radius: 11px; color: rgba(255,255,255,.78); cursor: pointer; font-weight: 800; }
.more-conductor-tasks .conductor-task { margin-top: 8px; }
.cook-timer-dock { margin: 20px 0 28px; padding: 18px; border-radius: 20px; background: #f7f5ee; color: var(--ink); }
.cook-timer-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.cook-timer-head .eyebrow { color: var(--coral); }
.cook-timer-head h2 { font-size: 1.35rem; }
.manual-timer { display: grid; grid-template-columns: minmax(130px,1fr) 90px auto; gap: 7px; }
.manual-timer input { min-width: 0; min-height: 44px; border: 1px solid #cad4ca; border-radius: 10px; padding: 0 11px; color: var(--ink); }
.manual-timer button { min-height: 44px; border: 0; border-radius: 10px; padding: 0 14px; background: var(--forest); color: white; font-weight: 800; }
.cook-timers { display: grid; gap: 8px; margin-top: 14px; }
.cook-timer { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #d5ddd3; border-radius: 13px; background: white; }
.cook-timer small, .cook-timer strong { display: block; }
.cook-timer small { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.cook-timer > b { color: var(--forest); font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.cook-timer > div:last-child { display: flex; gap: 5px; }
.cook-timer button { min-height: 38px; border: 1px solid #ced7ce; border-radius: 9px; background: white; color: var(--forest); font-weight: 750; }
.cook-timer.finished { border-color: var(--coral); background: #fff0eb; }
.cook-timer.finished > b { color: var(--coral); }
.timer-empty { color: var(--muted); }
.cook-active-recipe { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; }
.cook-active-recipe h2 { font-size: clamp(1.7rem,4vw,3rem); }
.cook-settings { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.cook-settings span { padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.1); font-size: .82rem; }
.cook-grid { display: grid; grid-template-columns: minmax(280px,.7fr) minmax(0,1.3fr); gap: clamp(26px, 5vw, 70px); margin-top: 32px; }
.cook-grid > aside { align-self: start; position: sticky; top: 80px; }
.cook-ingredients { list-style: none; margin: 16px 0 0; padding: 0; }
.cook-ingredients li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.15); line-height: 1.45; }
.cook-ingredients input, .cook-step > input { width: 22px; height: 22px; accent-color: #e26e50; }
.cook-method-section + .cook-method-section { margin-top: 25px; }
.cook-steps { display: grid; gap: 10px; margin-top: 14px; }
.cook-step { display: grid; grid-template-columns: 24px 38px minmax(0,1fr) auto; gap: 11px; align-items: start; padding: 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.07); }
.cook-step-number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.13); font-weight: 800; }
.cook-step p { font-size: 1.08rem; line-height: 1.55; }
.cook-step > button { min-height: 42px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 0 11px; background: white; color: var(--forest); font-weight: 800; }
.cook-step.complete { opacity: .55; }
.cook-step.complete p { text-decoration: line-through; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 120px); opacity: 0; background: #122b26; color: white; border-radius: 999px; padding: 12px 20px; transition: .25s; box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.error { color: #9f3d29; font-weight: 600; margin-top: 12px; }
@media (max-width: 1100px) {
  .library-search-row { grid-template-columns: minmax(0,1fr) auto; }
  .library-search-row .recipe-search { grid-column: 1/-1; }
  .facet-grid { grid-template-columns: repeat(3,minmax(125px,1fr)); }
}
@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 10; height: 72px; inset: auto 0 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); flex-direction: row; }
  .brand, .side-note { display: none; }
  .nav { margin: 0; width: 100%; grid-template-columns: repeat(4,1fr); gap: 5px; }
  .nav button { min-height: 54px; justify-content: center; flex-direction: column; gap: 2px; font-size: .72rem; padding: 3px; }
  .nav svg { width: 20px; height: 20px; }
  .main { padding: calc(22px + env(safe-area-inset-top)) 18px 110px; }
  .detail, .content-cols, .grocery-layout, .cook-grid { grid-template-columns: 1fr; }
  .cook-grid > aside { position: static; }
  .detail-copy { min-height: auto; }
  .summary-card { position: static; order: -1; }
  .day-recipe-controls { left: 12px; right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); width: auto; }
}
@media (max-width: 700px) {
  .meal-prep-intro, .meal-prep-empty { align-items: stretch; flex-direction: column; }
  .meal-prep-intro > button, .meal-prep-empty > button { width: 100%; }
  .home-overview { grid-template-columns: 1fr; }
  .home-overview button { padding: 14px 16px; }
  .facet-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .collection-recipe-grid { grid-template-columns: 1fr; }
  .grocery-controls { grid-template-columns: 1fr; }
  .sort-control select { width: 100%; }
  .library-search-row, .notebook-fields { grid-template-columns: 1fr; }
  .notebook-head { display: block; }
  .version-actions { justify-content: flex-start; margin-top: 14px; }
  .prep-basics, .prep-custom, .manual-recipe-basics { grid-template-columns: 1fr; }
  .day-picker { grid-template-columns: repeat(4, 1fr); }
  .component-picker { grid-template-columns: 1fr; }
  .cook-timer-head { align-items: stretch; flex-direction: column; }
  .manual-timer { grid-template-columns: 1fr 80px auto; }
  .equipment-settings > div { grid-template-columns: repeat(2,1fr); }
  .equipment-settings.detailed-equipment > .equipment-list { grid-template-columns: 1fr; }
  .outdoor-card-fields { grid-template-columns: 1fr 1fr; }
  .meal-conductor > header { align-items: stretch; flex-direction: column; }
  #meal-conductor-form { align-items: stretch; }
  #meal-conductor-form label { flex: 1; }
  .conductor-task { grid-template-columns: 72px minmax(0,1fr); }
  .task-actions { grid-column: 2; }
}
@media (max-width: 560px) {
  .equipment-card-fields, .outdoor-card-fields, .compact-equipment-fields { grid-template-columns: 1fr; }
  .equipment-add-actions { display: grid; }
  .cook-phase-nav { overflow-x: auto; }
  .meal-prep-board > header { display: block; }
  .meal-prep-board > header > strong { display: inline-block; margin-top: 12px; }
  .meal-prep-board > header > strong span { display: inline; }
  .topbar { margin-bottom: 24px; display: grid; }
  .app-controls { justify-content: flex-start; flex-wrap: wrap; }
  .avatar { display: none; }
  .connection-status.online { display: none; }
  .install-button { min-height: 36px; }
  .import-drawer > summary { min-height: 60px; }
  .cookbook-nav { margin-inline: -8px; border-radius: 0; }
  .shelf-head { align-items: start; }
  .shelf-head .ghost { min-height: 38px; padding-inline: 11px; }
  .library-search-row { grid-template-columns: 1fr auto; }
  .library-search-row .recipe-search { grid-column: 1/-1; }
  .facet-grid { grid-template-columns: 1fr; }
  .recipe-grid.list-view .recipe-card { grid-template-columns: 88px 1fr; }
  .recipe-grid.list-view .recipe-card > img, .recipe-grid.list-view .recipe-card > .image-fallback { width: 88px; }
  .recipe-grid.list-view .card-tags { display: none; }
  .collection-grid { grid-template-columns: 1fr; }
  .hero { padding: 25px 19px; border-radius: 22px; }
  .import-form { flex-direction: column; background: transparent; border: 0; padding: 0; box-shadow: none; }
  .import-form input { min-height: 52px; border: 1px solid #cfd8cf; border-radius: 12px; background: white; }
  .bulk-link-field { width: 100%; padding: 0; }
  .bulk-link-field textarea { min-height: 112px; border: 1px solid #cfd8cf; border-radius: 12px; background: white; padding: 12px; }
  .bulk-import-form > button { width: 100%; margin: 0; }
  .import-options { align-items: stretch; flex-wrap: wrap; }
  .import-options small { width: 100%; }
  .recipe-grid { grid-template-columns: 1fr; }
  .recipe-search { display: grid; grid-template-columns: 1fr auto; }
  .nutrition { grid-template-columns: repeat(2,1fr); }
  .grocery-head { align-items: stretch; flex-direction: column; }
  .grocery-item { grid-template-columns: 28px minmax(0,1fr); }
  .grocery-item-actions { grid-column: 2; justify-content: flex-start; }
  .pantry-add { grid-template-columns: 1fr; }
  .pantry-body-actions { align-items: stretch; flex-direction: column; }
  .pantry-body-actions button { width: 100%; }
  .pantry-starter { grid-template-columns: 1fr; gap: 14px; }
  .quantity-toggle { width: 100%; }
  .quantity-toggle button { flex: 1; }
  .detail-hero, .detail-hero img, .detail-hero .image-fallback { min-height: 250px; }
  .panel { padding: 19px; }
  .modal-wrap { padding: 12px; }
  .modal { padding: 22px 18px; border-radius: 20px; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-actions button { width: 100%; min-width: 0; padding-inline: 10px; }
  .delete-zone { display: grid; }
  .delete-zone .danger { width: 100%; }
  .plan-navigation { grid-template-columns: repeat(4, minmax(86px,1fr)); margin-inline: -18px; padding-inline: 18px; overflow-x: auto; border-radius: 0; }
  .plan-navigation button { min-height: 52px; padding-inline: 10px; }
  .day-view-head { align-items: stretch; flex-direction: column; }
  .day-view-actions { align-items: stretch; flex-direction: column; }
  .day-view-actions > button, .day-sort select { width: 100%; }
  .day-recipe-card { grid-template-columns: 1fr; padding: 16px; }
  .day-recipe-card > .meal-edit { justify-self: start; padding-left: 0; }
  .day-recipe-switcher { margin-inline: -18px; padding-inline: 18px; }
  .day-recipe-controls { grid-template-columns: 1fr 1.25fr 1fr; gap: 4px; padding: 6px; }
  .day-recipe-controls button { min-height: 54px; padding-inline: 6px; }
  .day-recipe-controls button strong { font-size: .76rem; }
  .day-meal-section { margin-inline: -6px; padding: 16px; }
  .day-meal-section > header { align-items: stretch; flex-direction: column; }
  .day-meal-section > header .primary { width: 100%; }
  .cook { padding: 18px 14px calc(30px + env(safe-area-inset-bottom)); }
  .cook-top { align-items: stretch; flex-direction: column; }
  .cook-top .primary { width: 100%; }
  .cook-recipe-tabs { margin-inline: -14px; padding-inline: 14px; }
  .cook-timer-dock { padding: 14px; }
  .manual-timer { grid-template-columns: 1fr 76px; }
  .manual-timer button { grid-column: 1/-1; }
  .cook-timer { grid-template-columns: 1fr auto; }
  .cook-timer > div:last-child { grid-column: 1/-1; }
  .cook-timer > div:last-child button { flex: 1; }
  .cook-step { grid-template-columns: 24px 32px 1fr; padding: 14px 12px; }
  .cook-step > button { grid-column: 2/-1; width: 100%; }
  #meal-conductor-form { flex-direction: column; }
  #meal-conductor-form input, #meal-conductor-form button { width: 100%; }
  .conductor-task { grid-template-columns: 1fr; }
  .task-time { display: flex; align-items: center; gap: 8px; }
  .conductor-task .task-time span { margin: 0; }
  .task-actions { grid-column: 1; }
  .task-actions button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
