:root {
  --ink: #f6f1ff;
  --ink-soft: #bdb2d1;
  --cream: #100a1b;
  --paper: #1d142c;
  --line: #3d2e53;
  --lime: #b996ff;
  --lime-strong: #8b5cf6;
  --coral: #ff78b6;
  --coral-soft: #3b203d;
  --gold: #f5c86d;
  --sky: #9b8cdd;
  --white: #281b3b;
  --accent-ink: #170d26;
  --surface-strong: #160c25;
  --shadow: 0 22px 60px rgba(3, 0, 10, 0.42);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --font-display: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% 7%, rgba(139, 92, 246, 0.22), transparent 31rem),
    radial-gradient(circle at 8% 38%, rgba(255, 120, 182, 0.1), transparent 26rem),
    linear-gradient(180deg, #100a1b 0%, #160d25 54%, #0d0816 100%);
  background-attachment: fixed;
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  left: 12px;
  top: -80px;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--accent-ink);
  border-radius: 10px;
}
.skip-link:focus { top: 12px; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }

.topbar {
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  gap: 34px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 10, 27, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(185, 150, 255, 0.13);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 1.24rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px 13px 13px 4px; background: linear-gradient(145deg, #c9adff, var(--lime-strong)); color: var(--accent-ink); font-size: 0.9rem; transform: rotate(-3deg); box-shadow: 0 8px 24px rgba(139, 92, 246, 0.28); }
.desktop-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link, .mobile-nav-button { border: 0; background: transparent; cursor: pointer; }
.nav-link { padding: 10px 14px; border-radius: 999px; color: var(--ink-soft); font-weight: 750; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); background: rgba(185, 150, 255, 0.14); }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--coral); color: var(--accent-ink); font-style: normal; font-size: 0.72rem; font-weight: 850; }
.ghost-button, .primary-button, .secondary-button { border-radius: 999px; font-weight: 800; cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.ghost-button { border: 1px solid var(--line); background: transparent; padding: 10px 16px; }
.primary-button { border: 0; background: linear-gradient(135deg, #c09cff, var(--lime-strong)); color: var(--accent-ink); padding: 13px 20px; box-shadow: 0 12px 30px rgba(139, 92, 246, 0.28); }
.secondary-button { border: 1px solid rgba(185, 150, 255, 0.24); background: var(--white); padding: 12px 18px; }
.ghost-button:hover, .primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:hover { background: linear-gradient(135deg, #cfb6ff, #9d73fa); box-shadow: 0 15px 36px rgba(139, 92, 246, 0.36); }
.full-width { width: 100%; }

.view { display: none; }
.view.is-active { display: block; animation: view-in 240ms ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: 0.74rem; line-height: 1.2; font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.035em; line-height: 1.05; }
h1 { margin: 0; font-size: clamp(3rem, 6vw, 5.6rem); }
h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.55rem); }
h3 { margin: 0; font-size: 1.16rem; }

.hero { min-height: 610px; display: grid; grid-template-columns: 1.12fr 0.88fr; align-items: center; gap: 60px; padding-block: 70px 62px; }
.hero h1 span { color: var(--coral); }
.hero-intro { max-width: 650px; margin: 24px 0 0; color: var(--ink-soft); font-size: clamp(1.05rem, 1.8vw, 1.28rem); }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 32px; }
.hero-actions p { margin: 0; max-width: 170px; color: var(--ink-soft); font-size: 0.85rem; }
.hero-actions strong { color: var(--ink); }
.hero-visual { position: relative; min-height: 420px; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; width: 390px; height: 390px; border-radius: 44% 56% 57% 43% / 48% 45% 55% 52%; background: linear-gradient(145deg, #c4a5ff, #7c4ee5); transform: rotate(-8deg); box-shadow: 0 32px 90px rgba(111, 66, 215, 0.32); }
.hero-visual::after { content: ""; position: absolute; width: 112px; height: 112px; left: 10px; bottom: 20px; border-radius: 50%; background: var(--coral-soft); }
.plate-illustration { position: relative; z-index: 2; width: 325px; height: 325px; border: 24px solid #eee6ff; border-radius: 50%; background: #2a1c3c; box-shadow: 0 30px 80px rgba(2, 0, 8, 0.45); transform: rotate(4deg); }
.plate-illustration span { position: absolute; display: grid; place-items: center; filter: drop-shadow(0 10px 10px rgba(2, 0, 8, 0.28)); }
.plate-protein { inset: 52px auto auto 55px; font-size: 5.5rem; transform: rotate(-22deg); }
.plate-greens { right: 30px; top: 50px; font-size: 5rem; }
.plate-carbs { right: 46px; bottom: 32px; font-size: 5.7rem; }
.hero-note { position: absolute; z-index: 3; right: -10px; bottom: 34px; min-width: 190px; padding: 17px 20px; border: 1px solid rgba(185, 150, 255, 0.18); border-radius: 18px 18px 4px 18px; background: var(--surface-strong); color: var(--ink); box-shadow: var(--shadow); }
.hero-note span, .hero-note strong { display: block; }
.hero-note .note-label { color: var(--lime); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; }
.hero-note strong { margin-top: 3px; font-size: 1.08rem; }
.hero-note > span:last-child { margin-top: 1px; color: var(--ink-soft); font-size: 0.82rem; }

.plan-section { padding-block: 46px 70px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.legend { display: flex; gap: 18px; color: var(--ink-soft); font-size: 0.82rem; font-weight: 800; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; }
.dot-lunch { background: var(--gold); }
.dot-dinner { background: var(--sky); }
.week-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.day-card { overflow: hidden; background: rgba(29, 20, 44, 0.94); border: 1px solid rgba(185, 150, 255, 0.13); border-radius: var(--radius-lg); box-shadow: 0 12px 34px rgba(2, 0, 8, 0.2); }
.day-card:last-child { grid-column: 1 / -1; }
.day-head { min-height: 76px; padding: 16px 18px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid rgba(185, 150, 255, 0.12); }
.day-number { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; background: var(--lime); color: var(--accent-ink); font-family: var(--font-display); font-size: 1.2rem; }
.day-title { flex: 1; }
.day-title strong { display: block; font-family: var(--font-display); font-size: 1.12rem; }
.day-title span { color: var(--ink-soft); font-size: 0.76rem; }
.serving-control { display: flex; align-items: center; gap: 3px; padding: 4px; background: var(--cream); border-radius: 999px; }
.serving-control button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--paper); cursor: pointer; font-weight: 900; }
.serving-control span { min-width: 46px; text-align: center; font-size: 0.72rem; font-weight: 850; }
.serving-control button:disabled { cursor: not-allowed; opacity: 0.45; }
.meal-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px; }
.meal-row + .meal-row { border-top: 1px dashed var(--line); }
.meal-thumb { width: 74px; height: 66px; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 17px; background: var(--meal-color, var(--coral-soft)); font-size: 2.25rem; }
.meal-thumb::after { content: ""; position: absolute; width: 44px; height: 44px; border: 10px solid rgba(255,255,255,0.45); border-radius: 50%; }
.meal-thumb span { position: relative; z-index: 1; }
.meal-info { min-width: 0; }
.meal-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.meal-serving-control { flex: 0 0 auto; }
.meal-kind { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.09em; }
.meal-info h3 { margin-top: 4px; }
.meal-meta { margin: 5px 0 0; color: var(--ink-soft); font-size: 0.77rem; }
.meal-meta strong { color: var(--ink); }
.swap-pill { display: inline-block; margin-top: 7px; padding: 4px 8px; border-radius: 999px; background: var(--coral-soft); color: #ff9dca; font-size: 0.68rem; font-weight: 900; }
.cuisine-pill { display: inline-block; margin: 7px 5px 0 0; padding: 4px 8px; border: 1px solid rgba(183, 244, 95, 0.22); border-radius: 999px; background: rgba(183, 244, 95, 0.1); color: var(--lime); font-size: 0.66rem; font-weight: 900; }
.history-pill { display: inline-block; margin: 7px 5px 0 0; padding: 4px 8px; border: 1px solid rgba(255, 202, 92, 0.28); border-radius: 999px; background: rgba(255, 202, 92, 0.1); color: #ffd47b; font-size: 0.66rem; font-weight: 900; }
.history-notice { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(255, 202, 92, 0.24); border-radius: 16px; background: rgba(255, 202, 92, 0.08); color: var(--muted); }
.history-notice strong { display: block; margin-bottom: 5px; color: #ffd47b; }
.history-notice p { margin: 0; }
.meal-actions { display: flex; align-items: center; gap: 8px; }
.recipe-button { border: 0; background: transparent; padding: 8px 4px; color: var(--coral); font-size: 0.76rem; font-weight: 900; cursor: pointer; }
.check-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); cursor: pointer; color: transparent; font-weight: 900; }
.check-button.is-checked { color: var(--accent-ink); background: var(--lime); border-color: var(--lime-strong); }

.prep-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin-bottom: 44px; padding: 28px; border: 1px solid rgba(185, 150, 255, 0.16); border-radius: var(--radius-xl); background: linear-gradient(135deg, #1b102d, #28173e); color: var(--ink); box-shadow: var(--shadow); }
.prep-banner .eyebrow { color: var(--lime); }
.prep-banner p:not(.eyebrow) { margin: 8px 0 0; max-width: 680px; color: var(--ink-soft); }
.prep-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 20px; background: var(--lime); color: var(--accent-ink); font-size: 2rem; transform: rotate(-3deg); }
.nutrition-note { margin-bottom: 90px; padding: 0 20px; color: var(--ink-soft); text-align: center; font-size: 0.78rem; }

.page-heading { padding-block: 72px 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.page-heading h1 { max-width: 830px; font-size: clamp(2.6rem, 5.5vw, 5rem); }
.page-heading > div > p:last-child { max-width: 670px; margin: 18px 0 0; color: var(--ink-soft); font-size: 1.06rem; }
.progress-card { min-width: 260px; padding: 18px; border-radius: var(--radius-md); background: var(--paper); box-shadow: var(--shadow); }
.progress-card > span { display: block; margin-bottom: 10px; font-size: 0.78rem; font-weight: 850; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #38294d; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--coral); transition: width 240ms ease; }
.shopping-toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.search-field { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 9px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.search-field input { width: 100%; padding: 12px 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.shopping-layout { display: grid; grid-template-columns: 1fr 290px; gap: 24px; align-items: start; padding-bottom: 90px; }
.shopping-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.category-card { overflow: hidden; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid rgba(185, 150, 255, 0.13); }
.category-title { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-display); }
.category-title span:first-child { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--lime); color: var(--accent-ink); }
.category-title small { margin-left: auto; color: var(--ink-soft); font-family: var(--font-body); }
.shopping-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px 18px; cursor: pointer; }
.shopping-item + .shopping-item { border-top: 1px dashed var(--line); }
.shopping-item input, .pantry-item input { position: absolute; opacity: 0; pointer-events: none; }
.visual-checkbox { width: 23px; height: 23px; display: grid; place-items: center; border: 1.5px solid #726384; border-radius: 7px; background: var(--white); font-size: 0.76rem; color: transparent; }
.shopping-item input:checked + .visual-checkbox, .pantry-item input:checked + .visual-checkbox, .food-option input:checked + .visual-checkbox { border-color: var(--lime-strong); background: var(--lime); color: var(--accent-ink); }
.shopping-item input:checked ~ .item-name { color: #887d99; text-decoration: line-through; }
.item-name { min-width: 0; }
.item-name strong, .item-name small, .item-quantity strong, .item-quantity small { display: block; }
.item-name strong { overflow-wrap: anywhere; font-size: 0.84rem; line-height: 1.25; }
.item-name small { margin-top: 4px; color: var(--ink-soft); font-size: 0.66rem; line-height: 1.35; }
.retail-brand { display: inline-block; margin-right: 4px; color: var(--lime-strong); font-size: 0.62rem; font-weight: 950; letter-spacing: 0.04em; text-transform: uppercase; }
.item-quantity { min-width: 62px; color: var(--ink-soft); text-align: right; }
.item-quantity strong { color: var(--ink); font-size: 0.76rem; font-weight: 900; white-space: nowrap; }
.item-quantity small { margin-top: 3px; font-size: 0.62rem; white-space: nowrap; }
.shopping-summary { position: sticky; top: 96px; padding: 22px; border: 1px solid rgba(185, 150, 255, 0.16); border-radius: var(--radius-lg); background: linear-gradient(145deg, #1a102b, #28173e); color: var(--ink); box-shadow: var(--shadow); }
.shopping-summary .eyebrow { color: var(--lime); }
.shopping-summary dl { margin: 22px 0; }
.shopping-summary dl > div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.13); }
.shopping-summary dt { color: var(--ink-soft); }
.shopping-summary dd { margin: 0; font-family: var(--font-display); }
.shopping-summary .small-note { color: var(--ink-soft); }
.budget-card { margin: 16px -7px 20px; padding: 17px; border: 1px solid rgba(213, 255, 106, 0.24); border-radius: 18px; background: rgba(255,255,255,0.055); }
.budget-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.budget-head span, .budget-head strong { display: block; }
.budget-head > div > span { color: var(--ink-soft); font-size: 0.67rem; font-weight: 800; }
.budget-head > div > strong { margin-top: 4px; font-family: var(--font-display); font-size: 1.52rem; letter-spacing: -0.035em; white-space: nowrap; }
.quality-chip { padding: 6px 8px; border-radius: 999px; background: rgba(213, 255, 106, 0.14); color: var(--lime); font-size: 0.58rem; font-weight: 950; line-height: 1.1; text-align: center; }
.budget-track { height: 8px; margin: 15px 0 10px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,0.12); }
.budget-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--lime), #bc8dff); transition: width 240ms ease; }
.budget-card.is-over .budget-track span { background: linear-gradient(90deg, var(--lime), var(--coral)); }
.budget-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 0.66rem; }
.budget-foot strong { color: var(--ink); }
.budget-breakdown { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }
.budget-breakdown > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 7px; color: var(--ink-soft); font-size: 0.67rem; }
.budget-breakdown strong { color: var(--ink); white-space: nowrap; }
.budget-card > p { margin: 12px 0 0; color: var(--ink-soft); font-size: 0.62rem; line-height: 1.45; }
.carrefour-transfer { margin: 18px -7px 20px; padding: 16px; border: 1px solid rgba(255,255,255,0.17); border-radius: 18px; background: linear-gradient(145deg, #0d62d5, #073b91); box-shadow: 0 16px 34px rgba(2, 20, 70, 0.28); }
.carrefour-transfer-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.carrefour-transfer-head strong, .carrefour-transfer-head small { display: block; }
.carrefour-transfer-head strong { font-family: var(--font-display); font-size: 1.03rem; letter-spacing: -0.02em; }
.carrefour-transfer-head small { margin-top: 2px; color: #dce9ff; font-size: 0.7rem; }
.carrefour-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: white; color: #073b91; font-size: 1.12rem; box-shadow: 0 7px 18px rgba(2, 20, 70, 0.22); }
.carrefour-button { min-height: 46px; border: 0; border-radius: 999px; background: white; color: #073b91; font-weight: 900; cursor: pointer; box-shadow: 0 9px 22px rgba(2, 20, 70, 0.25); transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease; }
.carrefour-button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(2, 20, 70, 0.32); }
.carrefour-button:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.carrefour-transfer > p { margin: 10px 2px 0; color: #dce9ff; font-size: 0.69rem; line-height: 1.4; }
.empty-state { padding: 34px; border: 1px dashed var(--line); border-radius: var(--radius-lg); background: var(--paper); text-align: center; color: var(--ink-soft); }

.food-heading { align-items: center; }
.food-heading-art { width: 130px; height: 130px; display: grid; place-items: center; border-radius: 38% 62% 58% 42% / 54% 40% 60% 46%; background: var(--coral-soft); color: var(--coral); font-family: var(--font-display); font-size: 4.6rem; transform: rotate(-7deg); }
.food-preferences-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; padding-bottom: 90px; }
.food-groups { display: grid; gap: 18px; }
.food-group-card { overflow: hidden; border: 1px solid rgba(185, 150, 255, 0.13); border-radius: var(--radius-lg); background: var(--paper); }
.food-group-title { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.food-group-title > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--lime); color: var(--accent-ink); font-size: 1.25rem; }
.food-group-title h2 { font-size: 1.32rem; }
.food-group-title small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 0.72rem; }
.food-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; }
.food-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 72px; padding: 12px; border-radius: 15px; cursor: pointer; transition: background 150ms ease; }
.food-option:hover { background: var(--cream); }
.food-option input { position: absolute; opacity: 0; pointer-events: none; }
.food-option-copy strong, .food-option-copy small { display: block; }
.food-option-copy strong { line-height: 1.2; }
.food-option-copy small { margin-top: 4px; color: var(--ink-soft); font-size: 0.7rem; }
.food-switch { padding: 5px 8px; border-radius: 999px; background: #332546; color: var(--ink-soft); font-size: 0.64rem; font-weight: 900; }
.food-option.is-excluded { background: rgba(255, 120, 182, 0.09); }
.food-option.is-excluded .food-switch { background: var(--coral); color: var(--accent-ink); }
.food-option.is-excluded .visual-checkbox { border-color: var(--coral); background: var(--paper); }
.food-summary-card { position: sticky; top: 96px; padding: 22px; border: 1px solid rgba(185, 150, 255, 0.16); border-radius: var(--radius-lg); background: linear-gradient(145deg, #1a102b, #28173e); color: var(--ink); box-shadow: var(--shadow); }
.food-summary-card .eyebrow { color: var(--lime); }
.food-summary-count { display: block; margin: 8px 0; font-family: var(--font-display); font-size: 1.65rem; line-height: 1.1; }
.food-summary-card > p:not(.eyebrow):not(.small-note) { color: var(--ink-soft); font-size: 0.84rem; }
.food-summary-card .small-note { color: var(--ink-soft); }
.food-summary-card .secondary-button, .shopping-summary .secondary-button { color: var(--ink); }
.future-foods-notice { display: grid; gap: 5px; margin: 18px 0; padding: 14px; border: 1px solid rgba(185, 150, 255, 0.22); border-radius: 15px; background: rgba(185, 150, 255, 0.1); }
.future-foods-notice strong { color: var(--lime); font-size: 0.76rem; }
.future-foods-notice span { font-size: 0.78rem; font-weight: 760; line-height: 1.45; }
.future-foods-notice small { color: var(--ink-soft); font-size: 0.68rem; line-height: 1.45; }
.swap-notice { margin: 18px 0 0; padding: 14px; border: 1px solid rgba(185, 150, 255, 0.13); border-radius: 14px; background: rgba(185, 150, 255, 0.09); color: var(--ink); font-size: 0.78rem; }
.swap-notice strong { display: block; margin-bottom: 5px; }
.swap-notice ul { margin: 0; padding-left: 18px; }

.pantry-heading { align-items: center; }
.pantry-art { width: 130px; height: 130px; display: grid; place-items: center; border-radius: 34% 66% 46% 54% / 55% 43% 57% 45%; background: var(--lime); color: var(--accent-ink); font-size: 4rem; transform: rotate(5deg); }
.pantry-card { margin-bottom: 90px; padding: 26px; border-radius: var(--radius-xl); background: var(--paper); box-shadow: var(--shadow); }
.pantry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pantry-item { position: relative; display: flex; align-items: flex-start; gap: 11px; min-height: 54px; padding: 15px 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 760; }
.pantry-item:hover { background: var(--cream); }
.pantry-item .ingredient-emoji { position: absolute; top: 12px; right: 12px; margin: 0; }
.pantry-product { display: block; min-width: 0; padding-right: 15px; }
.pantry-product > strong { display: block; padding-right: 8px; }
.pantry-product small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 0.62rem; font-weight: 500; line-height: 1.5; }
.pantry-product .pantry-brand { color: var(--lime-strong); font-size: 0.56rem; font-weight: 850; letter-spacing: 0.025em; }
.pantry-price { display: block; margin-top: 9px; font-size: 0.85rem; }
.pantry-price small { display: inline; margin-left: 6px; font-size: 0.58rem; }
.custom-pantry-form { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.custom-pantry-form > label { display: block; margin-bottom: 9px; font-weight: 850; }
.custom-pantry-form > div { display: flex; gap: 9px; }
.custom-pantry-form input { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); }

.dialog { width: min(660px, calc(100% - 30px)); max-height: min(820px, calc(100dvh - 30px)); overflow: auto; padding: 0; border: 1px solid rgba(185, 150, 255, 0.18); border-radius: 28px; color: var(--ink); background: var(--paper); box-shadow: 0 35px 100px rgba(2, 0, 8, 0.68); }
.dialog::backdrop { background: rgba(7, 3, 13, 0.76); backdrop-filter: blur(6px); }
.dialog-close { position: sticky; z-index: 3; float: right; top: 16px; right: 16px; width: 40px; height: 40px; margin: 16px 16px -56px 0; border: 1px solid rgba(185, 150, 255, 0.2); border-radius: 50%; background: rgba(29, 20, 44, 0.92); cursor: pointer; font-size: 1.5rem; }
.recipe-hero { padding: 34px; background: linear-gradient(135deg, #c5a7ff, #9d76f6 56%, #ff91c5); color: var(--accent-ink); }
.recipe-hero .recipe-emoji { font-size: 3.8rem; }
.recipe-hero h2 { max-width: 520px; margin-top: 14px; }
.recipe-hero p { margin: 11px 0 0; color: #3c2855; }
.recipe-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.recipe-stats span { padding: 7px 10px; border-radius: 99px; background: rgba(255,255,255,0.5); font-size: 0.75rem; font-weight: 820; }
.recipe-body { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; padding: 30px 34px 38px; }
.recipe-body h3 { margin-bottom: 14px; }
.ingredient-list, .step-list, .prep-list { margin: 0; padding: 0; list-style: none; }
.ingredient-list li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 0.86rem; }
.ingredient-list strong { white-space: nowrap; }
.step-list { counter-reset: steps; }
.step-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-bottom: 14px; font-size: 0.86rem; }
.step-list li::before { counter-increment: steps; content: counter(steps); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; background: var(--coral-soft); color: var(--coral); font-weight: 900; }
.prep-dialog { padding: 34px; }
.prep-dialog h2 { margin: 10px 0 26px; }
.prep-list li { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 16px 0; border-top: 1px dashed var(--line); }
.prep-list strong { color: var(--coral); }
.small-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 0.75rem; }
.carrefour-dialog { padding: 34px; }
.carrefour-dialog h2 { margin: 10px 0 12px; }
.carrefour-dialog > p:not(.eyebrow):not(.small-note) { margin: 0 0 18px; color: var(--ink-soft); }
.carrefour-dialog .carrefour-transfer-count { color: var(--ink) !important; font-weight: 850; }
.carrefour-transfer-status { display: grid; gap: 9px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(185,150,255,.07); }
.carrefour-transfer-status p { margin: 0; color: var(--ink-soft); font-size: .78rem; line-height: 1.5; }
.carrefour-transfer-status [data-status="success"] { color: #b9e5ce; }
.carrefour-transfer-status [data-status="warning"] { color: #ffd59b; }
.carrefour-list-label { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 800; }
.carrefour-batch-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 15px; }
.carrefour-batch-nav button { padding: 9px 12px; font-size: .72rem; }
.carrefour-batch-nav button:disabled { opacity: .4; cursor: default; }
.carrefour-batch-nav span { color: var(--ink-soft); text-align: center; font-size: .72rem; line-height: 1.5; }
.carrefour-dialog textarea { width: 100%; min-height: 250px; resize: vertical; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--ink); font: 0.78rem/1.5 var(--font-body); }
.carrefour-dialog-actions { display: flex; gap: 10px; margin-top: 16px; }
.carrefour-link-button { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 28px; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 12px 14px 12px 18px; border: 1px solid rgba(185, 150, 255, 0.28); border-radius: 999px; background: var(--surface-strong); color: var(--ink); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: 200ms ease; font-size: 0.84rem; font-weight: 760; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { flex-shrink: 0; min-height: 36px; padding: 8px 12px; border-radius: 999px; background: var(--lime); color: var(--accent-ink); font: inherit; font-size: .72rem; cursor: pointer; }
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .shell { width: min(100% - 32px, 720px); }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 18px; padding-block: 54px 28px; }
  .hero-visual { min-height: 370px; }
  .hero-note { right: 8%; }
  .week-grid { grid-template-columns: 1fr; }
  .day-card:last-child { grid-column: auto; }
  .shopping-layout { grid-template-columns: 1fr; }
  .shopping-summary { position: static; order: -1; }
  .food-preferences-layout { grid-template-columns: 1fr; }
  .food-summary-card { position: static; order: -1; }
  .pantry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .shell { width: min(100% - 24px, 520px); }
  .topbar { height: 64px; padding: 0 14px; }
  .desktop-nav, .topbar > .ghost-button { display: none; }
  .brand { font-size: 1.12rem; }
  .brand-mark { width: 34px; height: 34px; }
  h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .hero { padding-top: 38px; }
  .hero-intro { margin-top: 18px; font-size: 1rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 24px; }
  .hero-actions .primary-button { width: 100%; }
  .hero-visual { min-height: 290px; }
  .hero-visual::before { width: 270px; height: 270px; }
  .hero-visual::after { width: 80px; height: 80px; }
  .plate-illustration { width: 230px; height: 230px; border-width: 18px; }
  .plate-protein { inset: 34px auto auto 34px; font-size: 3.8rem; }
  .plate-greens { right: 18px; top: 36px; font-size: 3.5rem; }
  .plate-carbs { right: 30px; bottom: 22px; font-size: 3.8rem; }
  .hero-note { right: 0; bottom: 10px; min-width: 165px; padding: 13px 15px; }
  .plan-section { padding-block: 38px 52px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .day-head { padding: 14px; gap: 11px; }
  .day-number { width: 40px; height: 40px; }
  .serving-control span { min-width: 38px; font-size: 0.67rem; }
  .meal-row { grid-template-columns: 60px 1fr; gap: 11px; padding: 14px; }
  .meal-thumb { width: 60px; height: 60px; }
  .meal-info h3 { font-size: 1rem; }
  .meal-topline { gap: 7px; }
  .meal-serving-control { padding: 3px; }
  .meal-serving-control button { width: 26px; height: 26px; }
  .meal-actions { grid-column: 2; justify-content: space-between; margin-top: -4px; }
  .prep-banner { grid-template-columns: auto 1fr; padding: 22px; }
  .prep-banner .secondary-button { grid-column: 1 / -1; }
  .prep-icon { width: 54px; height: 54px; }
  .page-heading { align-items: flex-start; flex-direction: column; padding-block: 46px 25px; }
  .progress-card { width: 100%; min-width: 0; }
  .shopping-toolbar { align-items: stretch; flex-direction: column; }
  .search-field { max-width: none; }
  .shopping-list { grid-template-columns: 1fr; }
  .shopping-item { grid-template-columns: auto minmax(0, 1fr); }
  .item-quantity { grid-column: 2; display: flex; align-items: baseline; gap: 7px; min-width: 0; margin-top: -5px; text-align: left; }
  .item-quantity small { margin-top: 0; }
  .pantry-art { display: none; }
  .food-heading-art { display: none; }
  .food-options { grid-template-columns: 1fr; }
  .pantry-grid { grid-template-columns: 1fr; }
  .pantry-item { align-items: flex-start; flex-direction: row; gap: 11px; }
  .pantry-product small { font-size: 0.7rem; }
  .pantry-product .pantry-brand { font-size: 0.62rem; }
  .pantry-item .ingredient-emoji { margin: 0; }
  .custom-pantry-form > div { flex-direction: column; }
  .recipe-body { grid-template-columns: 1fr; }
  .recipe-hero, .recipe-body, .prep-dialog, .carrefour-dialog { padding-left: 22px; padding-right: 22px; }
  .carrefour-dialog-actions { flex-direction: column; }
  .carrefour-batch-nav { gap: 6px; }
  .carrefour-batch-nav button { padding: 9px 7px; font-size: .66rem; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 10px calc(8px + env(safe-area-inset-bottom)) 10px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border: 1px solid rgba(185, 150, 255, 0.2); border-radius: 20px; background: rgba(22, 12, 37, 0.96); box-shadow: 0 15px 45px rgba(2, 0, 8, 0.52); backdrop-filter: blur(15px); }
  .mobile-nav-button { min-height: 49px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px; border-radius: 14px; color: #c8bdd8; font-size: 0.61rem; font-weight: 800; }
  .mobile-nav-button > span { font-size: 1.08rem; }
  .mobile-nav-button.is-active { background: var(--lime); color: var(--accent-ink); }
  .mobile-nav-button .count-badge { position: absolute; margin: -26px 0 0 42px; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}

[hidden] { display: none !important; }
.week-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin: 0 0 32px; padding: 26px; border: 1px solid rgba(185,150,255,.28); border-radius: 24px; background: linear-gradient(125deg, #2c1947, #1b112b); }
.week-tools h2 { margin: 5px 0 9px; font-size: 1.5rem; }
.week-tools p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: .79rem; line-height: 1.5; }
.week-tools .eyebrow { margin: 0; }
.week-tools-actions { display: flex; flex-direction: column; gap: 9px; align-items: center; }
.favorite-button { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: 1.3rem; }
.favorite-button.is-favorite { color: #ff9cc8; background: rgba(255,156,200,.12); border-color: rgba(255,156,200,.35); }
.leftover-pill, .prepared-pill { display: inline-block; margin-top: 8px; padding: 4px 8px; border-radius: 99px; color: #b9e5ce; background: rgba(121,210,164,.1); font-size: .65rem; }
.prepared-pill { color: var(--ink-soft); background: rgba(255,255,255,.06); }
.meal-stock-help { margin-top: 18px; line-height: 1.6; }
.meal-actions { flex-wrap: wrap; justify-content: flex-end; }
.shopping-toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stock-summary-note { margin: 0 0 20px; padding: 12px 16px; color: var(--ink-soft); background: rgba(185,150,255,.07); border: 1px solid var(--line); border-radius: 14px; font-size: .74rem; }
.surplus-note, .tracked-note { color: #b9e5ce !important; }
.stock-panel { margin-bottom: 24px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--paper); }
.stock-panel .section-heading { margin-bottom: 12px; }
.stock-panel h2 { font-size: 1.6rem; }
.stock-panel > .small-note { margin: 0 0 18px; max-width: 760px; line-height: 1.6; }
.stock-count { flex-shrink: 0; padding: 7px 12px; border-radius: 99px; background: rgba(185,150,255,.12); color: var(--lime); font-size: .7rem; font-weight: 800; }
.stock-importer { display: grid; gap: 14px; margin: 20px 0; padding: 18px; border: 1px solid #684894; border-radius: 20px; background: linear-gradient(135deg, rgba(142,91,216,.16), rgba(30,17,46,.75)); }
.stock-import-dropzone { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 15px; align-items: center; }
.stock-import-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(135deg, #c49cff, #8f64de); color: #281538; font-size: .72rem; font-weight: 900; letter-spacing: .06em; }
.stock-import-dropzone strong { display: block; font-size: .92rem; }
.stock-import-dropzone p { margin: 5px 0 0; color: var(--ink-soft); font-size: .72rem; line-height: 1.55; }
.stock-file-button { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; white-space: nowrap; }
.stock-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stock-document-preview { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); }
.stock-pdf-badge { display: grid; place-items: center; width: 58px; height: 64px; border: 1px solid rgba(216,190,255,.35); border-radius: 10px; background: linear-gradient(150deg, rgba(196,156,255,.23), rgba(88,52,131,.28)); color: #edddff; font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.stock-document-details { display: grid; gap: 5px; min-width: 0; }
.stock-document-preview strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.stock-document-preview small { color: var(--ink-soft); font-size: .68rem; }
.stock-importer progress { width: 100%; height: 8px; accent-color: #b88cf5; }
.stock-import-status { min-height: 1.2em; margin: 0; color: var(--ink-soft); font-size: .75rem; line-height: 1.5; }
.stock-import-status[data-state="success"] { color: #b9e5ce; }
.stock-import-status[data-state="error"] { color: #ffd59b; }
.stock-import-review-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 4px; }
.stock-import-review-heading strong { font-size: .88rem; }
.stock-import-review-heading span { color: var(--ink-soft); font-size: .68rem; }
.stock-import-details { border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.02); }
.stock-import-details summary { display: flex; align-items: center; min-height: 46px; padding: 0 14px; color: #dbc2ff; cursor: pointer; font-size: .74rem; font-weight: 800; }
.stock-import-details[open] summary { border-bottom: 1px solid var(--line); }
.stock-import-review { display: grid; gap: 9px; margin-top: 10px; }
.stock-import-details .stock-import-review { margin: 0; padding: 10px; }
.stock-import-row { display: grid; grid-template-columns: minmax(0,1fr) 95px; gap: 11px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); }
.stock-import-product { min-width: 0; }
.stock-import-product strong, .stock-import-product small { display: block; }
.stock-import-product strong { font-size: .8rem; }
.stock-import-product small { margin-top: 4px; color: var(--ink-soft); font-size: .65rem; line-height: 1.4; }
.stock-import-packs { display: grid; gap: 5px; color: var(--ink-soft); font-size: .63rem; }
.stock-import-packs input { width: 100%; min-height: 40px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; }
.stock-import-warning { margin: 9px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255,187,105,.1); color: #ffd59b; font-size: .72rem; }
.manual-stock-entry { margin: 18px 0 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 14px; }
.manual-stock-entry summary { min-height: 48px; display: flex; align-items: center; color: #d7bcf6; cursor: pointer; font-size: .77rem; font-weight: 800; }
.stock-form { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 12px; align-items: end; margin: 20px 0 12px; }
.stock-form label, .stock-quantity { display: grid; gap: 7px; color: var(--ink-soft); font-size: .72rem; font-weight: 700; min-width: 0; }
.stock-form input, .stock-form select, .stock-quantity input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); font: inherit; font-size: .8rem; }
.stock-form select option { background: var(--paper); }
.stock-form > button { min-height: 44px; white-space: nowrap; }
.stock-list { display: grid; gap: 10px; margin-top: 20px; }
.stock-row { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }
.stock-row.is-stock-updated { border-color: #9b77d0; box-shadow: inset 3px 0 #b991f1; background: linear-gradient(90deg, rgba(177,137,241,.11), rgba(255,255,255,.025) 42%); }
.stock-row-copy { flex: 1; min-width: 0; }
.stock-row-copy strong { display: block; font-size: .86rem; }
.stock-row-copy small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: .69rem; line-height: 1.5; }
.stock-row-copy .stock-live-note { color: #caa8ff; font-weight: 800; }
.stock-quantity { flex: 0 0 130px; }
.stock-quantity small { color: var(--ink-soft); }
.stock-remove { flex: 0 0 35px; min-width: 35px; padding: 8px; font-size: 1.2rem; }
.stock-empty { margin: 0; padding: 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--ink-soft); font-size: .8rem; }
.stock-movement-panel { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.stock-movement-panel h3 { margin: 4px 0 0; font-size: 1.15rem; }
.live-badge { color: #b9e5ce; font-size: .63rem; font-weight: 900; letter-spacing: .08em; }
.stock-movement-feed { display: grid; gap: 10px; }
.stock-movement { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.stock-movement.is-latest { border-color: rgba(185,150,255,.58); background: rgba(185,150,255,.08); }
.stock-movement-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.stock-movement-heading span, .stock-movement-heading strong { display: block; }
.stock-movement-heading span { margin-bottom: 4px; color: #c6a4f5; font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.stock-movement-heading strong { font-size: .82rem; }
.stock-movement time { color: var(--ink-soft); font-size: .64rem; white-space: nowrap; }
.stock-movement ul { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.stock-movement li { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; border-top: 1px dashed rgba(190,154,239,.22); font-size: .7rem; }
.stock-movement li span { color: var(--ink-soft); }
.stock-movement li i { color: #bd98ed; font-style: normal; }
.purchases-dialog { max-width: 720px; padding: 32px; }
.purchases-dialog > p:not(.eyebrow) { color: var(--ink-soft); font-size: .85rem; }
.purchases-dialog .full-width { margin-top: 20px; }
@media (max-width: 900px) {
  .stock-form { grid-template-columns: minmax(0, 1fr) 140px; }
  .stock-form > button { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .week-tools { grid-template-columns: 1fr; gap: 18px; padding: 21px; }
  .week-tools-actions, .week-tools-actions > button { width: 100%; }
  .week-tools h2 { font-size: 1.35rem; }
  .meal-actions { justify-content: flex-start; }
  .recipe-button { margin-right: auto; }
  .stock-panel { padding: 18px; }
  .stock-panel h2 { font-size: 1.35rem; }
  .stock-importer { padding: 14px; }
  .stock-import-dropzone { grid-template-columns: auto minmax(0,1fr); }
  .stock-file-button { grid-column: 1 / -1; width: 100%; }
  .stock-document-preview { grid-template-columns: 52px minmax(0,1fr); }
  .stock-pdf-badge { width: 52px; height: 58px; }
  .stock-import-row { grid-template-columns: minmax(0,1fr) 82px; }
  .stock-import-packs { width: 82px; }
  .stock-import-review-heading { align-items: flex-start; flex-direction: column; }
  .stock-form { grid-template-columns: 1fr; }
  .stock-form > button { grid-column: auto; }
  .stock-row { flex-wrap: wrap; gap: 12px; }
  .stock-row-copy { flex: 1 1 100%; }
  .stock-quantity { flex: 1; max-width: 180px; }
  .stock-row > .secondary-button { flex: 1; }
  .stock-movement-heading { flex-direction: column; }
  .stock-movement li { align-items: flex-start; flex-direction: column; }
  .shopping-toolbar-actions { flex-direction: column; }
  .purchases-dialog { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.automatic-cart { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; margin: 0 0 24px; padding: 22px; border: 1px solid #745298; border-radius: 18px; background: linear-gradient(120deg,#2d1d3d,#21162f); }
.automatic-cart strong { display: block; color: #e8d5ff; }
.automatic-cart p { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; margin: 10px 0; }
.automatic-cart details { margin: 12px 0; font-size: 12px; }
.automatic-cart summary { color: #d6b9fc; cursor: pointer; padding: 6px 0; }
.automatic-cart a { color: #d6b9fc; }
.automatic-cart button { margin-top: 10px; white-space: normal; line-height: 1.4; }
.automatic-cart button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; filter: saturate(.5); }
#automaticCarrefourPreview { max-height: 230px; overflow-y: auto; padding-right: 6px; }
#automaticCarrefourPreview p { padding: 9px 0; border-bottom: 1px dashed #654780; line-height: 1.6; overflow-wrap: anywhere; }
#automaticCarrefourStatus { border-left: 2px solid #ae7ef3; padding-left: 10px; }
.automatic-cart-outcomes { grid-column: 1 / -1; min-width: 0; border-top: 1px solid #654780; padding-top: 8px; }
.automatic-cart-outcomes h4 { color: #e8d5ff; font-size: .85rem; margin: 14px 0 8px; }
.replacement-list, .unresolved-list { list-style: none; margin: 0; padding: 0; }
.replacement-list li { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.25fr); gap: 9px; padding: 12px 0; border-bottom: 1px dashed #654780; font-size: .78rem; line-height: 1.6; }
.replacement-list span, .unresolved-list li { min-width: 0; overflow-wrap: anywhere; }
.replacement-arrow { color: #c795ff; text-align: center; }
.replacement-to small, .unresolved-list small { display: block; color: #d2bcdf; line-height: 1.6; margin-top: 4px; font-size: .72rem; }
.unresolved-list li { padding: 10px 12px; margin: 8px 0; border-radius: 9px; background: #38243b; font-size: .78rem; }
.automatic-cart-outcomes a:focus-visible { outline: 2px solid #d8b1ff; outline-offset: 3px; }
@media (max-width: 480px) { .replacement-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; } .replacement-arrow { text-align: left; } }
.purchase-format { display: grid; gap: 6px; font-size: 12px; margin-top: 10px; }
.purchase-format select { width: 100%; max-width: 390px; background: #21162d; color: #f6ecff; border: 1px solid #765191; border-radius: 8px; padding: 8px; }
@media (max-width: 700px) { .automatic-cart { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 4px; } }

/* Une fiche lisible sur le plan de travail comme sur téléphone. */
.recipe-sheet { width: min(1080px, calc(100% - 30px)); }
.recipe-sheet .recipe-hero { background: linear-gradient(125deg, #39224e, #24172f 70%); color: var(--ink); }
.recipe-sheet .recipe-hero .recipe-emoji { font-size: 2.4rem; }
.recipe-sheet .recipe-hero h2 { max-width: 870px; font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1.18; padding-right: 30px; }
.recipe-sheet .recipe-hero p { color: #d2bcdf; }
.recipe-sheet .recipe-stats span { background: #543969; color: #f2e6ff; }
.recipe-sheet .recipe-body { grid-template-columns: minmax(210px, 270px) minmax(0, 1fr); align-items: start; gap: 32px; }
.recipe-ingredients { position: sticky; top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #1b1326; }
.recipe-ingredients .eyebrow { font-size: .64rem; margin-bottom: 8px; }
.recipe-ingredients .ingredient-list li { font-size: .8rem; line-height: 1.6; }
.recipe-ingredients .ingredient-list strong { color: #dac1ff; }
.recipe-ingredients .small-note { line-height: 1.7; }
.recipe-execution { min-width: 0; }
.recipe-execution h3 { font-size: 1.35rem; }
.cooking-intro h4 { font-size: .8rem; margin: 20px 0 10px; }
.cooking-time, .equipment-list { display: flex; flex-wrap: wrap; gap: 7px; }
.cooking-time span { padding: 8px 11px; border-radius: 10px; background: #352246; color: #e3c9ff; font-size: .75rem; font-weight: 750; }
.equipment-list { list-style: none; padding: 0; margin: 0; }
.equipment-list li { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: .73rem; color: var(--ink-soft); }
.cooking-tip { padding: 15px 17px; margin: 18px 0; border-left: 3px solid #b895f2; border-radius: 0 12px 12px 0; background: #2c203a; line-height: 1.75; font-size: .83rem; }
.cooking-tip strong { display: block; color: #d6b8ff; margin-bottom: 4px; }
.cooking-basics { font-size: .8rem; color: var(--ink-soft); line-height: 1.8; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.cooking-basics summary { min-height: 44px; display: list-item; cursor: pointer; color: #d5baf5; padding: 10px 0; }
.cooking-basics a { color: #d5baf5; }
.cooking-method { margin-top: 26px; }
.cooking-method-heading { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; justify-content: space-between; }
.cooking-method-heading h3 { margin: 8px 0 15px; }
.cooking-method-heading .eyebrow { margin: 0; font-size: .61rem; }
.cooking-method-heading button { min-height: 44px; font-size: .78rem; white-space: normal; }
.cooking-progress { display: grid; gap: 8px; margin: 16px 0; }
.cooking-progress label { font-size: .8rem; color: var(--ink-soft); }
.cooking-progress strong { color: var(--ink); }
.cooking-progress progress { width: 100%; height: 7px; appearance: none; border: 0; border-radius: 20px; overflow: hidden; background: #392647; }
.cooking-progress progress::-webkit-progress-bar { background: #392647; }
.cooking-progress progress::-webkit-progress-value { background: #bc94ff; }
.cooking-progress progress::-moz-progress-bar { background: #bc94ff; }
.cooking-progress small { font-size: .69rem; line-height: 1.7; color: var(--ink-soft); }
.cooking-step-list { padding: 0; margin: 20px 0 0; list-style: none; display: grid; gap: 16px; }
.cooking-step { border: 1px solid #543e68; padding: 21px; border-radius: 18px; background: #21172d; }
.cooking-step.is-done { border-color: #8e78ad; background: #251e31; }
.cooking-step-heading { display: flex; align-items: flex-start; gap: 13px; }
.cooking-step-number { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 11px; background: #b88cf5; color: #21112e; font-size: 1rem; font-weight: 900; }
.cooking-step h4 { font-size: 1rem; line-height: 1.5; margin: 0 0 9px; }
.cooking-step h4:focus-visible { outline: 2px solid #be9aef; outline-offset: 4px; }
.cooking-step-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.cooking-step-meta span { padding: 4px 8px; background: #382348; color: #d8baf5; font-size: .72rem; border-radius: 7px; }
.step-video { overflow: hidden; margin: 17px 0 4px; border: 1px solid #523a6a; border-radius: 16px; background: #160f20; box-shadow: 0 12px 30px rgba(8,4,13,.24); }
.step-video-stage { position: relative; aspect-ratio: 2 / 1; min-height: 150px; background: linear-gradient(135deg,#2b1b3c,#171020); }
.step-video-player { display: block; width: 100%; height: 100%; object-fit: cover; }
.step-video-loop-badge { position: absolute; z-index: 2; right: 12px; top: 12px; padding: 6px 9px; border: 1px solid rgba(232,209,255,.36); border-radius: 999px; background: rgba(24,14,34,.8); backdrop-filter: blur(8px); color: #ecdcff; font-size: .63rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.step-video-toggle { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid rgba(232,209,255,.45); border-radius: 50%; background: rgba(24,14,34,.82); color: #fff; font: inherit; cursor: pointer; backdrop-filter: blur(8px); }
.step-video-toggle:hover { background: rgba(76,43,99,.94); }
.step-video-toggle:focus-visible { outline: 3px solid #d8b5ff; outline-offset: 3px; }
.step-video figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid #49345d; color: #dbc6f4; font-size: .68rem; font-weight: 850; line-height: 1.4; text-transform: uppercase; letter-spacing: .06em; }
.step-video figcaption span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #b98aef; color: #23142f; font-size: .64rem; }
.step-ingredients { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.step-ingredients span { padding: 5px 8px; border: 1px solid #49365b; border-radius: 7px; font-size: .73rem; line-height: 1.5; color: #d6c6e6; overflow-wrap: anywhere; }
.cooking-instruction { font-size: .87rem; line-height: 1.9; margin: 16px 0; }
.cooking-cue { font-size: .77rem; color: #ccb4e2; line-height: 1.8; margin: 0; padding: 12px 14px; border-radius: 11px; background: #30203e; }
.cooking-step-check { display: flex; align-items: center; gap: 10px; font-size: .85rem; min-height: 44px; cursor: pointer; margin-top: 12px; }
.cooking-step-check input { width: 20px; height: 20px; accent-color: #bd98ed; }
.cooking-navigation { display: flex; justify-content: space-between; align-items: center; gap: 8px; position: sticky; bottom: -1px; padding: 15px 0 5px; background: var(--paper); }
.cooking-navigation button { min-height: 44px; font-size: .78rem; padding: 11px 15px; }
.cooking-navigation span { color: #d3b8ef; font-size: .8rem; white-space: nowrap; }
.cooking-step[hidden], .cooking-navigation[hidden] { display: none; }
@media (max-width: 760px) {
  .recipe-sheet .recipe-body { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 22px 18px 28px; }
  .recipe-ingredients { position: static; }
  .recipe-sheet .recipe-hero { padding: 26px 22px; }
  .recipe-sheet .recipe-hero h2 { padding-right: 20px; }
  .cooking-step { padding: 16px; }
  .step-video-stage { min-height: 0; }
  .step-video-loop-badge { top: 9px; right: 9px; font-size: .58rem; }
  .step-video-toggle { right: 9px; bottom: 9px; width: 36px; height: 36px; }
  .cooking-step h4 { font-size: .95rem; }
  .cooking-instruction { font-size: .88rem; }
  .cooking-method-heading button { width: 100%; }
  .cooking-navigation button { padding: 11px 10px; font-size: .73rem; }
}
