.skip-nav { position: fixed; left: 18px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; color: white; background: var(--green); }
.skip-nav:focus { top: 12px; }
.planner-main { max-width: 1480px; margin: 0 auto; padding: 34px 40px 64px; }
.planner-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; margin: 34px 0 44px; }
.planner-hero h1 { font-size: clamp(48px,6.4vw,86px); line-height: .92; }
.planner-hero h1 em { color: var(--orange); font-weight: 600; }
.planner-hero > div:first-child > p:last-child { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.week-summary { display: grid; grid-template-columns: repeat(3,1fr); min-width: 390px; border: 1px solid var(--line); border-radius: 22px; background: rgba(251,250,245,.72); box-shadow: var(--shadow); overflow: hidden; }
.week-summary div { padding: 20px; text-align: center; }
.week-summary div + div { border-left: 1px solid var(--line); }
.week-summary strong, .week-summary span { display: block; }
.week-summary strong { color: var(--green); font-family: "Fraunces",serif; font-size: 28px; }
.week-summary span { margin-top: 4px; color: var(--muted); font-size: 10px; }

.week-toolbar { display: grid; grid-template-columns: 44px 1fr auto 44px; align-items: center; gap: 8px; margin-bottom: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.week-toolbar > button { min-height: 40px; border: 0; border-radius: 11px; color: var(--green); background: #eef3d7; cursor: pointer; font-weight: 700; }
.week-toolbar .today-button { padding: 0 16px; background: transparent; text-decoration: underline; }
.week-toolbar div { padding-left: 7px; }
.week-toolbar span, .week-toolbar strong { display: block; }
.week-toolbar span { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.week-toolbar strong { margin-top: 2px; font-family: "Fraunces",serif; font-size: 18px; }

.planner-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(350px,.65fr); align-items: start; gap: 18px; }
.week-board { min-width: 0; border: 1px solid var(--line); border-radius: 24px; background: rgba(251,250,245,.58); overflow: hidden; }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(210px,1fr)); gap: 10px; padding: 14px; overflow-x: auto; scrollbar-color: var(--green) transparent; scroll-snap-type: x proximity; }
.day-card { min-height: 390px; display: flex; flex-direction: column; scroll-snap-align: start; border: 1px solid rgba(28,43,34,.1); border-radius: 18px; background: var(--paper); overflow: hidden; }
.day-card.today { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(238,123,58,.12); }
.day-head { display: flex; justify-content: space-between; gap: 8px; padding: 15px 15px 11px; border-bottom: 1px solid var(--line); }
.day-head span, .day-head strong { display: block; }
.day-head span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.day-head strong { margin-top: 2px; font-family: "Fraunces",serif; font-size: 20px; }
.today-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--orange); }
.day-meals { display: grid; gap: 9px; padding: 10px; }
.meal-card { position: relative; border-radius: 13px; background: #f0efe7; overflow: hidden; }
.meal-card[draggable="true"] { cursor: grab; }
.meal-card.dragging { opacity: .45; }
.day-card.drag-over { border-color: var(--orange); background: #fff7ed; box-shadow: inset 0 0 0 2px rgba(238,123,58,.18); }
.meal-card img { width: 100%; height: 84px; display: block; object-fit: cover; }
.meal-copy { padding: 10px; }
.meal-copy strong { display: block; padding-right: 22px; font-size: 12px; line-height: 1.3; }
.meal-substitution { display: inline-block; margin-top: 4px; padding: 3px 6px; border-radius: 999px; color: var(--green); background: #e8efd4; font-size: 8px; font-weight: 750; }
.meal-meta { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.meal-meta select { min-width: 0; padding: 4px 18px 4px 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); font-size: 9px; }
.remove-meal { position: absolute; right: 7px; top: 91px; width: 26px; height: 26px; border: 0; border-radius: 50%; color: #8b5b4a; background: rgba(255,255,255,.82); cursor: pointer; }
.leftover-card { margin: 0 0 1px; padding: 11px; border: 1px solid #d7e3bd; border-radius: 12px; background: #f5f8e9; }
.leftover-card span, .leftover-card strong, .leftover-card small { display: block; }
.leftover-card span { color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.leftover-card strong { margin-top: 3px; font-size: 11px; }
.leftover-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.leftover-card label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; margin-top: 8px; color: var(--green); font-size: 8px; font-weight: 700; }
.leftover-card select { width: 100%; min-width: 0; padding: 5px; border: 1px solid #cfd9b3; border-radius: 7px; background: white; font-size: 9px; }
.mealprep-controls { display: grid; gap: 5px; margin-top: 8px; }
.mealprep-controls label { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.mealprep-controls select { width: 100%; min-width: 0; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); font-size: 9px; }
.prep-split { display: grid; gap: 5px; padding: 7px; border-radius: 9px; background: rgba(255,255,255,.55); }
.prep-allocation { display: grid; grid-template-columns: 1fr 66px 22px; align-items: center; gap: 4px; }
.prep-allocation label { display: flex; gap: 3px; color: var(--muted); font-size: 8px; }
.prep-allocation input { width: 38px; min-width: 0; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 9px; }
.prep-allocation input[readonly] { color: var(--green); background: #eef3d7; font-weight: 700; }
.prep-allocation button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; color: #945d49; background: #f6e5dd; cursor: pointer; }
.split-prep { min-height: 29px; border: 1px dashed rgba(38,79,59,.35); border-radius: 7px; color: var(--green); background: transparent; cursor: pointer; font-size: 8px; font-weight: 700; }
.prep-split > small { color: var(--muted); font-size: 7px; line-height: 1.35; }
.meal-extras, .meal-move { margin-top: 8px; border-top: 1px solid rgba(28,43,34,.09); padding-top: 7px; }
.meal-extras summary, .meal-move summary { color: var(--green); cursor: pointer; font-size: 9px; font-weight: 700; }
.meal-extras summary b { float: right; min-width: 18px; padding: 1px 5px; border-radius: 9px; color: white; background: var(--green); text-align: center; }
.meal-extras label { display: flex; gap: 6px; align-items: start; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.3; }
.meal-extras input { accent-color: var(--green); }
.meal-move label { display: grid; gap: 3px; margin-top: 7px; color: var(--muted); font-size: 8px; }
.meal-move select { width: 100%; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); font-size: 9px; }
.meal-move div { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 5px; }
.meal-move button { min-height: 28px; padding: 4px; border: 1px solid var(--green); border-radius: 7px; color: var(--green); background: transparent; cursor: pointer; font-size: 8px; font-weight: 700; }
.add-meal { margin: auto 10px 10px; min-height: 42px; border: 1px dashed rgba(38,79,59,.35); border-radius: 12px; color: var(--green); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.add-meal:hover, .add-meal:focus-visible { border-style: solid; background: #eef3d7; }

.weekly-shop { position: sticky; top: 18px; padding: 24px; border-radius: 24px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.shop-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.shop-heading h2 { margin: 0; font-size: 27px; }
.week-price { flex: 0 0 auto; text-align: right; }
.week-price span, .week-price strong { display: block; }
.week-price span { color: var(--muted); font-size: 9px; }
.week-price strong { margin-top: 2px; color: var(--orange); font-size: 20px; }
.shop-intro { margin: 12px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.offer-controls { display: grid; grid-template-columns: 1fr 84px; gap: 8px; padding: 10px; border-radius: 14px; background: #f0efe7; }
.offer-controls label { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.offer-controls select, .offer-controls input { width: 100%; min-width: 0; height: 34px; margin-top: 4px; border: 1px solid transparent; border-radius: 8px; padding: 7px; color: var(--ink); background: var(--paper); font-size: 11px; }
.offer-controls button { grid-column: 1/-1; min-height: 36px; border: 0; border-radius: 9px; color: white; background: var(--green); cursor: pointer; font-size: 11px; font-weight: 700; }
.offer-controls button:disabled { opacity: .65; cursor: wait; }
.offer-status { min-height: 16px; margin: 9px 2px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.budget-box { margin: 0 0 12px; padding: 12px; border: 1px solid #d9dfbf; border-radius: 14px; background: #f7f8ed; }
.budget-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--green); font-size: 10px; font-weight: 800; }
.budget-head div { display: flex; align-items: center; gap: 4px; }
.budget-head input { width: 76px; height: 31px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: white; text-align: right; }
.budget-track { height: 6px; margin-top: 9px; border-radius: 99px; background: #e2e6cf; overflow: hidden; }
.budget-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.budget-track span.over { background: var(--orange); }
.budget-box p { margin: 7px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.weekly-shopping-list { max-height: 410px; margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.weekly-shopping-list li { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.weekly-shopping-list li > strong { font-size: 12px; }
.weekly-shopping-list li > small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.weekly-shopping-list .item-price { grid-column: 2; grid-row: 1/3; align-self: center; text-align: right; }
.weekly-shopping-list .item-price strong, .weekly-shopping-list .item-price small { display: block; }
.weekly-shopping-list .item-price strong { color: var(--green); font-size: 12px; }
.weekly-shopping-list .item-price small { color: var(--orange); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.weekly-shopping-list .shopping-category { display: block; padding: 14px 2px 5px; border: 0; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.weekly-shopping-list .shopping-item { grid-template-columns: 25px 1fr auto; align-items: start; }
.shop-check { grid-row: 1/3; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; }
.shop-check input { position: absolute; opacity: 0; pointer-events: none; }
.shop-check span { display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #bdc6aa; border-radius: 6px; color: transparent; background: white; font-size: 11px; }
.shop-check input:checked + span { color: white; border-color: var(--green); background: var(--green); }
.shop-item-copy strong, .shop-item-copy small { display: block; }
.shop-item-copy strong { font-size: 12px; }
.shop-item-copy > small { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.3; }
.shopping-item.checked .shop-item-copy { opacity: .5; text-decoration: line-through; }
.shop-amount { display: flex; gap: 4px; margin-top: 6px; }
.shop-amount input, .shop-amount select { width: 59px; height: 26px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; color: var(--ink); background: white; font-size: 9px; }
.shop-amount select { width: 62px; }
.weekly-shopping-list .shopping-item .item-price { grid-column: 3; grid-row: 1/3; }
.item-price button { display: block; margin: 6px 0 0 auto; border: 0; color: #945d49; background: transparent; cursor: pointer; }
.custom-item-form { display: grid; grid-template-columns: 1fr 56px 65px 34px; gap: 5px; margin: 12px 0; }
.custom-item-form input, .custom-item-form select { min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: white; font-size: 9px; }
.custom-item-form button { border: 0; border-radius: 8px; color: white; background: var(--green); cursor: pointer; font-size: 18px; }
.smart-suggestions { margin: 12px 0; padding: 12px; border-radius: 14px; background: #fff4e9; }
.smart-suggestions.deals { background: #eef3d7; }
.suggestion-heading span, .suggestion-heading small { display: block; }
.suggestion-heading span { color: var(--orange); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.smart-suggestions.deals .suggestion-heading span { color: var(--green); }
.suggestion-heading small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.smart-suggestions article { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(28,43,34,.1); }
.smart-suggestions article strong, .smart-suggestions article small { display: block; }
.smart-suggestions article strong { font-size: 10px; }
.smart-suggestions article small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.smart-suggestions article button { flex: none; min-height: 28px; border: 0; border-radius: 7px; padding: 5px 8px; color: white; background: var(--green); cursor: pointer; font-size: 8px; font-weight: 700; }
.shopping-empty { display: block !important; padding: 26px 8px !important; color: var(--muted); text-align: center; font-size: 11px; }
.savings-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 13px; padding: 10px 12px; border-radius: 11px; color: var(--green); background: #eef3d7; font-size: 10px; }
.price-disclaimer { margin: 12px 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.bring-week { width: 100%; min-height: 44px; border: 0; border-radius: 12px; color: white; background: var(--orange); cursor: pointer; font-size: 11px; font-weight: 800; }
.bring-week:disabled { opacity: .45; cursor: not-allowed; }
.bring-week-status { min-height: 15px; margin: 8px 0 0; color: var(--muted); font-size: 9px; text-align: center; }
.balance-panel { display: grid; grid-template-columns: minmax(250px,.7fr) 1.3fr; gap: 30px; margin-top: 20px; padding: 30px; border: 1px solid var(--line); border-radius: 24px; background: var(--green); color: white; }
.balance-intro h2 { margin: 4px 0 10px; color: white; font-size: 30px; }
.balance-intro .kicker { color: #dce6bd; }
.balance-intro > p:last-child { margin: 0; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.5; }
.balance-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; align-items: stretch; }
.balance-metric { display: flex; flex-direction: column; justify-content: center; min-height: 118px; padding: 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 16px; background: rgba(255,255,255,.08); }
.balance-metric strong, .balance-metric span, .balance-metric small { display: block; }
.balance-metric strong { color: #f3bb80; font-family: "Fraunces",serif; font-size: 29px; }
.balance-metric span { margin-top: 7px; font-size: 10px; font-weight: 700; }
.balance-metric small { margin-top: 3px; color: rgba(255,255,255,.6); font-size: 8px; }
.balance-empty { grid-column: 1/-1; align-self: center; color: rgba(255,255,255,.7); text-align: center; }

.recipe-picker { width: min(880px,calc(100% - 28px)); max-height: min(780px,calc(100vh - 28px)); padding: 0; border: 0; border-radius: 26px; color: var(--ink); background: var(--paper); box-shadow: 0 28px 90px rgba(20,35,27,.28); }
.recipe-picker::backdrop { background: rgba(22,35,28,.55); backdrop-filter: blur(5px); }
.picker-shell { position: relative; padding: 28px; }
.picker-shell h2 { margin: 0 0 17px; font-size: 30px; }
.picker-close { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f0efe7; cursor: pointer; font-size: 21px; }
.picker-search input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 13px; padding: 0 15px; color: var(--ink); background: white; }
.picker-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; max-height: 510px; margin-top: 14px; overflow-y: auto; }
.picker-recipe { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 11px; min-width: 0; padding: 8px; border: 1px solid transparent; border-radius: 13px; background: #f0efe7; text-align: left; cursor: pointer; }
.picker-recipe:hover, .picker-recipe:focus-visible { border-color: var(--green); background: #eef3d7; }
.picker-recipe img { width: 82px; height: 62px; border-radius: 9px; object-fit: cover; }
.picker-recipe strong, .picker-recipe small { display: block; }
.picker-recipe strong { font-size: 12px; }
.picker-recipe small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.picker-recipe > span:last-child { color: var(--orange); font-size: 20px; font-weight: 700; }

@media (max-width: 1050px) {
  .planner-hero { grid-template-columns: 1fr; }
  .week-summary { min-width: 0; }
  .planner-layout { grid-template-columns: 1fr; }
  .weekly-shop { position: static; }
  .balance-panel { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .planner-main { padding: 18px 14px 45px; }
  .planner-hero { margin: 26px 0 30px; gap: 24px; }
  .planner-hero h1 { font-size: 48px; }
  .week-summary div { padding: 14px 8px; }
  .week-summary strong { font-size: 23px; }
  .week-toolbar { grid-template-columns: 42px 1fr 42px; }
  .week-toolbar .today-button { grid-column: 1/-1; grid-row: 2; min-height: 34px; }
  .week-grid { grid-template-columns: repeat(7,minmax(78vw,1fr)); }
  .day-card { min-height: 360px; }
  .weekly-shop { padding: 20px; border-radius: 20px; }
  .picker-list { grid-template-columns: 1fr; }
  .picker-shell { padding: 24px 18px; }
  .balance-panel { padding: 22px; }
  .balance-metrics { grid-template-columns: repeat(2,1fr); }
  .custom-item-form { grid-template-columns: 1fr 54px 60px 34px; }
}
@media (prefers-reduced-motion: reduce) { .week-grid { scroll-behavior: auto; } }
