/* taste-gate: allow T7 T2 because the week and review already use Frank's serif. Setup v2 controls share the approved pencil palette. Layout is independent of the top progress rail. */
.setup-schedule,.setup-prep,.setup-meal-body {display:grid;gap:24px;min-width:0;overflow-anchor:auto}
.setup-schedule [hidden],.setup-review-groups [hidden],.setup-receipts [hidden],.store-panel [hidden] {display:none!important}
.setup-schedule fieldset {min-width:0;margin:0;padding:0;border:0;container-type:inline-size}
.setup-schedule legend {font-weight:600;margin:0 0 12px;padding:0;font-size:16px}
.setup-days {display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:4px;min-width:0}
@container (min-width:332px){.setup-days{grid-template-columns:repeat(7,minmax(44px,1fr))}}
#app .setup-day {position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:6px 2px;box-sizing:border-box;min-width:44px;min-height:56px;border:1px solid var(--line);border-radius:9px;background:var(--white);color:var(--ink);font-size:14px;line-height:1.1;text-align:center;cursor:pointer}
.setup-day input {position:absolute;inset:0;width:100%!important;height:100%!important;padding:0!important;margin:0!important;opacity:0;cursor:pointer}
.setup-day-tick {display:grid;place-items:center;width:16px;height:16px;box-sizing:border-box;border:1px solid currentColor;border-radius:2px;color:transparent}
.setup-day:has(input:checked) .setup-day-tick {color:inherit;border-color:transparent}
#app .setup-day:has(input:checked){background:var(--green);border-color:var(--green);color:var(--white)}
#app .setup-prep-days .setup-day:has(input:checked){background:var(--ochre);border-color:var(--ochre);color:var(--ink)}
.setup-day:has(:focus-visible),.setup-person-chip:has(:focus-visible){outline:2px solid var(--focus);outline-offset:2px}
.setup-day-full{display:none}
.setup-days[data-fit=tight]{grid-template-columns:minmax(44px,1fr)}
.setup-days[data-fit=tight] .setup-day{flex-direction:row;gap:12px;min-height:44px}
.setup-days[data-fit=tight] .setup-day-short{display:none}
.setup-days[data-fit=tight] .setup-day-full{display:inline}
.setup-meal{border-top:1px solid var(--line);padding:20px 0;min-width:0}
#app .setup-meal-toggle{display:flex;align-items:center;gap:10px;min-height:44px;font-size:18px;font-weight:600;margin-bottom:12px}
.setup-meal-toggle input,.setup-person-chip input,.setup-allergies input{appearance:auto!important;accent-color:var(--green);width:18px!important;height:18px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;flex:none}
#app .setup-meal-toggle input[aria-invalid=true]{border:0!important;outline:none!important;box-shadow:none!important}
.setup-people,.setup-allergies{display:flex;flex-wrap:wrap;gap:8px}
#app .setup-person-chip{display:flex;align-items:center;gap:8px;min-height:44px;border:1px solid var(--line);border-radius:9px;padding:8px 12px;box-sizing:border-box}
.setup-person-chip:has(input:checked){background:var(--sage);border-color:var(--green)}
.setup-person-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;border-bottom:1px solid var(--line);padding:16px 0}
.setup-person-row strong,.setup-food-needs{overflow-wrap:anywhere}
.setup-food-needs{font-size:14px;line-height:1.4;margin:4px 0 8px}
.setup-servings{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:flex-end}
.setup-servings-label{width:100%;font-size:14px;text-align:right}
.setup-servings button{min-width:44px!important;min-height:44px!important;padding:8px!important;font-size:20px}
.setup-servings output{min-width:22px;text-align:center;font-size:16px}
.setup-total{font-size:15px;margin:0;color:var(--ink)}
.setup-person-editor{border-left:3px solid var(--blue);padding:16px 0 16px 12px;margin:16px 0;display:grid;gap:12px;min-width:0}
.setup-person-editor h3{margin:0;font:400 24px/1.2 Georgia,serif}
.setup-person-editor textarea{min-height:88px;resize:vertical}
.setup-person-editor .check{min-height:44px;padding:6px 10px;border:1px solid var(--line);border-radius:9px;box-sizing:border-box}
.setup-person-editor .check:has(input:checked){background:var(--sage)}
.setup-person-editor p{margin:0}
.setup-person-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.setup-person-editor .inline-actions{display:flex;flex-wrap:wrap;gap:8px;position:sticky;bottom:0;z-index:2;background:var(--paper);padding:8px 0;scroll-margin-bottom:180px}
#app .setup-schedule button,#app .setup-review-groups button,#app .stores-step .secondary,#app .stores-step .primary{min-height:44px}
.setup-review-groups{min-width:0}
.setup-review-block{padding:24px 0;border-bottom:1px solid var(--line);min-width:0}
.setup-review-block:first-child{padding-top:0}
.setup-review-block:last-child{border:0;padding-bottom:0}
.setup-review-block>header{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;margin-bottom:12px}
#app .setup-review-block h2{font:400 24px/1.15 Georgia,serif;margin:0}
.review-patch{display:grid;place-items:center;width:48px;height:48px;background:var(--wheat);border-radius:9px}
.review-patch img{width:40px;height:40px;object-fit:contain}
.review-food .review-patch{background:var(--ochre)}
.review-week .review-patch{background:var(--blue)}
.review-style .review-patch{background:var(--ochre)}
.review-stores .review-patch{background:var(--sage)}
.review-block-body{padding-left:60px;overflow-wrap:anywhere}
.review-block-body p{margin:0 0 8px}
.review-note{display:grid;grid-template-columns:76px minmax(0,1fr);gap:8px;margin:10px 0}
.review-note>strong{font-size:14px}
.review-allergies>strong{color:var(--red)}
.review-clamped{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.review-expand{font-size:14px;margin-bottom:8px}
.setup-week{border-collapse:separate;border-spacing:4px;table-layout:fixed;width:100%;max-width:470px;margin:0 0 16px}
.setup-week th,.setup-week td{text-align:center;border:0;padding:2px;height:28px;font-size:14px}
.setup-week th:first-child,.setup-week td:first-child{width:52px;text-align:left;font-size:13px}
.setup-week abbr{text-decoration:none}
.setup-week .chosen{border-radius:4px}
.week-fresh .chosen{background:var(--green);color:var(--white)}
.week-prep .chosen{background:var(--ochre);color:var(--ink)}
.week-lunch .chosen{background:var(--blue);color:var(--ink)}
.week-dinner .chosen{background:var(--wheat);color:var(--ink);outline:1px solid var(--wheat-line)}
.review-week-facts{font-size:15px;line-height:1.5}
#app .setup [aria-invalid=true]:is(input,textarea,select){border:2px solid var(--red)}
.setup .field-error{color:var(--red);font-size:14px;margin:8px 0;line-height:1.4}
.setup :is(input,button,textarea,fieldset){scroll-margin-block:100px 80px}
.setup-connection-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.setup-collapsed{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.setup-receipts>p{margin:0;overflow-wrap:anywhere}
.setup-connection-error{color:var(--red);font-size:14px}
@media(max-width:700px){.review-block-body{padding-left:0}.setup-review-block>header{gap:8px}.setup-person-row{grid-template-columns:minmax(0,1fr)}.setup-servings{justify-self:start}.setup-connection-actions{display:grid;grid-template-columns:minmax(0,1fr)}.setup-person-editor{padding-left:10px}.review-note{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.setup-schedule *{animation:none!important;transition:none!important}}
@media(forced-colors:active){#app .setup-day:has(input:checked),#app .setup-person-chip:has(input:checked),.setup-week .chosen{forced-color-adjust:none;background:Highlight;color:HighlightText;border-color:Highlight}.setup-day-tick{border-color:CanvasText}.setup-day:has(input:checked) .setup-day-tick{border-color:transparent}}
#app .setup-review-hero {display:flex;flex-direction:row;align-items:center;justify-content:space-between}
#app .setup-review-hero h1 {font-size:clamp(36px,5vw,54px);line-height:1.06}
#app .setup-review-hero .wizard-art {width:120px;height:120px;background:var(--wheat)}
@media(max-width:390px){#app .setup-review-hero .wizard-art{width:80px;height:80px}}

.setup-schedule .fresh-optional[hidden]{display:inline!important;visibility:hidden}
.setup-day-tick{border-color:var(--line)}
.setup-day:has(input:checked) .setup-day-tick{border-color:transparent}
.setup-review-block h2{overflow-wrap:anywhere}
/* Vera acceptance pass: name and serving controls share a line, needs remain readable below. */
#app .setup-person-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 12px}
.setup-person-row>div:first-child{display:contents}
.setup-person-row>div:first-child>strong{grid-column:1;grid-row:1}
.setup-person-row .setup-food-needs{grid-column:1 / -1;grid-row:2;margin:0}
.setup-person-row>div:first-child>button{grid-column:1 / -1;grid-row:3;justify-self:start}
.setup-person-row .setup-servings{grid-column:2;grid-row:1;display:grid;grid-template-columns:44px 22px 44px;gap:3px 6px;justify-self:end}
.setup-servings-label{grid-column:1 / -1;text-align:center;font-size:13px;font-weight:400}
#app .setup-schedule + .form-grid>label{font-size:16px;font-weight:600}
.setup-meal:has(.setup-meal-body[hidden]){padding:12px 0 0}
#app .setup-meal:has(.setup-meal-body[hidden]) .setup-meal-toggle{margin-bottom:0}
.setup-collapsed{width:100%;gap:8px}
.setup-collapsed>span{flex:1 1 auto}
.setup-collapsed>button{flex:none}
@media(max-width:700px){.setup-receipts .setup-connection-actions{width:100%}#app .setup-receipts .setup-connection-actions button{width:100%;min-height:48px}}
#app .setup-schedule ~ .segmented-field legend{font-size:16px;font-weight:600}

/* The selection cue survives system colors: an unchecked box has no tick. */
.setup-day:not(:has(input:checked)) .setup-day-tick svg {visibility:hidden}

/* Rhythm color uses the existing pencil patches. Fresh nights stay green. */
.setup[data-step="rhythm"] .setup-schedule > fieldset > legend { background: var(--blue); color: var(--ink); display: table; padding: 2px 8px; border-radius: 9px; }
.setup[data-step="rhythm"] [data-field="cookingDays"] > legend { background: var(--sage); }
.setup[data-step="rhythm"] [data-field="prepDay"] > legend { background: var(--ochre); }
.setup[data-step="rhythm"] .setup-meal[data-meal="lunch"] > .setup-meal-toggle { background: var(--blue); border-radius: 9px; padding: 4px 8px; }
.setup[data-step="rhythm"] .setup-meal[data-meal="dinner"] > .setup-meal-toggle { background: var(--wheat); border-radius: 9px; padding: 4px 8px; }
.setup[data-step="rhythm"] .setup-day { border-color: var(--blue); }
.setup[data-step="rhythm"] .segmented-field legend { background: var(--wheat); display: table; padding: 2px 8px; border-radius: 9px; }

.review-facts { display: grid; gap: 12px; margin: 0; }
.review-facts > div { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 2px 12px; align-items: baseline; }
.review-facts dt { margin: 0; font-size: 13px; font-weight: 700; color: var(--green); }
.review-facts dd { margin: 0; font: 400 18px/1.35 Georgia,serif; color: var(--ink); }
.review-money dt { color: var(--red); }
.review-money dd { color: var(--red); }
.review-note > strong { color: var(--green); font-size: 13px; letter-spacing: 0; }
.review-allergies > strong { color: var(--red); }
.review-note p { font: 400 18px/1.35 Georgia,serif; }
.setup-frank-hat { display: block; width: 40px; height: 40px; background: var(--wheat); border-radius: 12px; }
@media(max-width:700px){ .review-facts > div { grid-template-columns: minmax(0,1fr); gap: 2px; } }
