/* Approved meal flow R3, scoped to meal arrangements only. */
.meal-flow-page{--flow-purple:#6c4cf1;width:100%;max-width:none;margin:0;padding:0 16px 120px;background:#faf8f5;color:#28252d;font-size:15px;line-height:1.6}.meal-flow-page h1{font-size:28px}.meal-flow-page h2{font-size:20px}.meal-flow-page h3{font-size:16px}.meal-flow-page small,.flow-muted{font-size:12px;color:#655e6c}.meal-flow-page button{min-height:44px}.meal-flow-page .card{padding:16px;border:1px solid #eee6df;border-radius:16px;box-shadow:none;margin:12px 0}.flow-heading,.flow-chef,.flow-stamp{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0}.flow-stamp{background:#f2eeff;border-left:3px solid #6c4cf1;border-radius:0 12px 12px 0;padding:10px 12px}.flow-stamp p{font-size:12px}.flow-stamp button,.flow-chef button,.flow-heading button,.flow-note button{color:#4f35c8}.flow-note{background:#f2eeff;border-radius:12px;padding:12px 14px;margin:16px 0}.flow-section{margin-top:20px}.flow-member{display:inline-flex;gap:5px;align-items:center;vertical-align:middle;white-space:nowrap;font-size:15px}.flow-avatar{height:24px;width:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#f2eeff;overflow:hidden;flex-shrink:0}.flow-avatar img{width:100%;height:100%;object-fit:cover}.flow-people{display:flex;align-items:center;flex-wrap:wrap;gap:4px;font-size:15px;margin:5px 0}.meal-flow-page .flow-dish{display:block;min-height:0;height:auto;overflow:hidden}.flow-dish-top{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px}.flow-photo,.flow-photo .dish-photo{width:72px!important;height:72px!important;min-height:0!important;aspect-ratio:1!important;border-radius:12px;overflow:hidden}.flow-photo img{width:100%!important;height:100%!important;object-fit:cover}.meal-flow-page .order-actions{display:flex;align-items:center;gap:8px;grid-template-columns:none;margin-top:12px;position:static}.meal-flow-page .order-actions .primary-button,.meal-flow-page .order-actions .secondary-button{flex:1;min-width:0;width:auto;padding:10px 12px;min-height:46px;border-radius:12px;font-size:15px}.meal-flow-page .primary-button{background:#6c4cf1;color:white}.meal-flow-page .secondary-button{background:#f2eeff;color:#4f35c8}.flow-text{color:#4f35c8;padding:0 4px;white-space:nowrap;font-size:15px}.flow-success{padding:12px;background:#edf6ef;color:#287344;border-radius:12px}.flow-entry{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:14px 0;border-bottom:1px solid #eee6df;gap:12px;color:#28252d}.flow-entry small,.flow-history small{display:block}.flow-history summary{min-height:44px;cursor:pointer}.flow-time{width:min(90vw,400px);margin:auto!important}.flow-time label{display:block;margin:16px 0}.flow-time input,.flow-time select{display:block;width:100%;padding:12px;border:1px solid #ddd5e5;border-radius:12px}.meal-flow-page .order-tabs{margin:0 0 20px}.meal-flow-page .shopping-card{width:100%;min-width:0}.meal-flow-page .shopping-r7-row{min-width:0}.flow-note p{margin:4px 0}.meal-flow-page .safe-top{height:0}
.meal-flow-page button{font-family:inherit;box-shadow:none;cursor:pointer}.meal-flow-page .order-tabs .order-tab{font-size:15px}.meal-flow-page .order-tabs .order-tab.active{background:#fff}.meal-flow-page .primary-button{background:#6c4cf1!important}.meal-flow-page .secondary-button{background:#f2eeff!important}.meal-flow-page .flow-text{border:0!important;background:none!important;border-radius:0!important}.flow-stamp h2,.flow-stamp p,.flow-dish h3,.flow-note p{margin:0}.flow-ingredient{border-bottom:1px solid #eee6df;padding:12px 0}.flow-ingredient:last-child{border:0}.flow-ingredient-name{display:flex;justify-content:space-between;gap:12px}.flow-chef button{margin-left:auto}.flow-stamp button{white-space:nowrap}
/* Keep the inherited price selector readable inside the narrower meal panel. */
.meal-flow-page .shopping-price-mode{align-items:stretch;flex-direction:column;gap:8px;padding:8px 0}
.meal-flow-page .shopping-price-mode>div{width:100%;box-sizing:border-box}
.meal-flow-page .shopping-price-mode button{flex:1;white-space:nowrap;min-width:0}
.meal-flow-page .shopping-price-mode>span{font-size:12px;line-height:1.5}
/* Preserve the approved calendar and meal actions after the page-level button reset above. */
.meal-flow-page .flow-week-calendar>header button{min-width:40px;min-height:40px;padding:0 6px;border-radius:20px;color:var(--flow-purple);background:#f2eeff;font-size:18px}
.meal-flow-page .flow-week-calendar>header button:last-child{background:transparent;font-size:12px;font-weight:700}
.meal-flow-page .flow-week-day{min-height:62px;padding:5px 0;border-radius:14px;background:transparent;text-align:center;font-size:14px}
.meal-flow-page .flow-week-day.active{color:#fff;background:var(--flow-purple);font-weight:800}
.meal-flow-page .flow-date-summary button{min-height:40px;padding:0;color:#4f35c8;background:transparent;font-size:12px;font-weight:700;white-space:nowrap}
.meal-flow-page .meal-inline-add{width:100%;min-height:42px;margin-top:8px;border:1px dashed #b8aaf5;border-radius:11px;color:#4f35c8;background:#fff;font-size:12px;font-weight:700}
.meal-flow-page .meal-inline-add.is-empty{border-style:solid}
.meal-flow-page .meal-slot-start{width:100%;min-height:44px;margin-top:10px;border-radius:12px;color:#33241c;background:#ff8a34;font-size:13px;font-weight:750}
/* Approved R4 compact ingredient checklist. */
.meal-flow-page .flow-checklist{padding:12px}.flow-check-row{display:grid;grid-template-columns:minmax(0,1fr) 62px 66px;align-items:center;gap:8px;min-height:58px;border-bottom:1px solid #eee6df}.flow-check-row:first-child{min-height:28px;border:0}.flow-check-row:last-child{border:0}.meal-flow-page .flow-check-category{font-size:17px;background:#f2eeff;border-radius:8px;padding:7px 10px;margin:12px 0 0}.flow-check-row summary{list-style:none;min-height:44px;display:flex;align-items:center;cursor:pointer}.flow-check-row summary::-webkit-details-marker{display:none}.flow-check-row details[open]{padding:8px 0}.flow-check-row details[open] summary{min-height:28px}.flow-check-row small{display:block}.meal-flow-page .flow-buy-check{min-height:44px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:4px 0}.flow-buy-check>span{width:22px;height:22px;border:1px solid #655e6c;border-radius:4px;display:flex;align-items:center;justify-content:center}.flow-buy-check[aria-checked=true]>span{background:#6c4cf1;border-color:#6c4cf1;color:white}.flow-buy-check:disabled>span{background:#ddd8e3;border-color:#aaa4b0}.flow-check-confirm{position:sticky;bottom:86px;background:#faf8f5f5;padding:12px 0 6px;display:flex;flex-direction:column;gap:8px;z-index:2}.meal-flow-page .flow-check-confirm button{width:100%;border-radius:12px;min-height:46px;padding:10px 16px;font-weight:600}

/* Keep the shared family-workspace header on the same vertical baseline as the menu tab. */
.meal-flow-page .safe-top{height:env(safe-area-inset-top, 0px)}
.meal-flow-page .family-workspace-head{font-size:16px;line-height:normal}
.meal-flow-page .family-workspace-summary small{font-size:11px}
.meal-flow-page .family-workspace-tabs>button{min-height:48px;line-height:normal}

/* Approved R6 ingredient layout: quantities stay with their names, buying remains optional. */
.meal-flow-page .meal-ingredient-context{display:flex;align-items:center;gap:9px;margin:0 0 14px;padding:10px 12px;border-radius:13px;background:#f2eeff}
.meal-flow-page .meal-ingredient-context-photos{display:flex;flex:none;padding-left:6px}
.meal-flow-page .meal-ingredient-context-photos .dish-photo{width:34px;height:34px;min-height:0;aspect-ratio:1;overflow:hidden;border-radius:8px}
.meal-flow-page .meal-ingredient-context-photos img{width:30px;height:30px;margin-left:-6px;border:2px solid #f2eeff;border-radius:8px;object-fit:cover}
.meal-flow-page .meal-ingredient-context>div:last-child{min-width:0}
.meal-flow-page .meal-ingredient-context b,.meal-flow-page .meal-ingredient-context small{display:block}
.meal-flow-page .meal-ingredient-context b{font-size:13px}
.meal-flow-page .meal-ingredient-context small{margin-top:2px;color:#655e6c;font-size:11px}
.meal-flow-page .meal-ingredient-hint{margin:0 0 13px;font-size:13px}
.meal-flow-page .flow-checklist{overflow:hidden;padding:0;border-radius:17px}
.meal-flow-page .flow-check-row{grid-template-columns:minmax(62px,1.05fr) minmax(42px,.65fr) minmax(64px,1fr) 48px;gap:6px;min-height:61px;margin:0 12px;font-size:14px}
.meal-flow-page .flow-check-row.flow-check-header{min-height:43px;margin:0;padding:0 15px;border-bottom:1px solid #eee6df;color:#655e6c;font-size:12px}
.meal-flow-page .flow-check-header span:last-child{text-align:center}
.meal-flow-page .flow-check-category{margin:0;padding:5px 12px;border-radius:0;background:#f3f0ec;color:#3f3945;font-size:11px;font-weight:650;line-height:1.4}
.meal-flow-page .flow-check-name,.meal-flow-page .flow-check-amount,.meal-flow-page .flow-check-source{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:1.35}
.meal-flow-page .flow-check-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:13px}
.meal-flow-page .flow-check-amount{font-size:12px;color:#4f4855}
.meal-flow-page .flow-check-source{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:11px;color:#655e6c}
.meal-flow-page .meal-ingredient-name{min-width:0}
.meal-flow-page .meal-ingredient-name b{display:block;font-size:15px}
.meal-flow-page .meal-ingredient-name small{display:block;margin-top:3px;color:#655e6c;font-size:11px;line-height:1.35}
.meal-flow-page .flow-buy-check{min-height:45px}
.meal-flow-page .flow-buy-check.is-existing>span{background:#ddd8e3;border-color:#aaa4b0;color:#fff}
.meal-flow-page .flow-existing-label{margin-top:2px;color:#817987;font-size:9px;line-height:1.2;white-space:nowrap}
.meal-flow-page .flow-check-confirm{position:fixed;left:50%;bottom:82px;transform:translateX(-50%);width:min(100%,480px);box-sizing:border-box;gap:6px;margin:0;padding:10px 16px calc(8px + env(safe-area-inset-bottom,0px));background:rgba(250,248,245,.98);box-shadow:0 -7px 20px rgba(64,45,72,.08);z-index:39}
.meal-flow-page .flow-check-confirm>small{color:#655e6c;font-size:11px}
.meal-flow-page .flow-check-confirm button{min-height:48px;padding:10px 14px;font-size:14px;font-weight:600}
.meal-flow-page .flow-check-confirm button.secondary{border:1px solid #d9cfff;background:#fff;color:#5d3fdb;min-height:48px;padding:8px 14px;font-size:13px}
.meal-flow-page .flow-check-confirm p{margin:0;color:#655e6c;font-size:12px}
.meal-select-row.is-pending{opacity:.55}
.meal-select-row.is-pending em{color:#b65a19;font-weight:700}
.flow-existing-sheet{position:fixed;inset:0;z-index:60;display:flex;align-items:flex-end;justify-content:center;background:rgba(37,32,47,.48)}
.flow-existing-sheet-card{display:flex;flex-direction:column;gap:8px;width:100%;max-width:430px;box-sizing:border-box;padding:18px 18px calc(14px + env(safe-area-inset-bottom,0px));border-radius:18px 18px 0 0;background:#fff}
.flow-existing-sheet-card>b{font-size:16px}
.flow-existing-sheet-card>small{margin-top:-6px;color:#817987;font-size:11px}
.flow-existing-sheet-card button{min-height:42px;border:1px solid #d5c7ff;border-radius:11px;background:#fff;color:#5d3fdb;font-size:14px;font-weight:700}
.flow-existing-sheet-card button.secondary{border:0;background:transparent;color:#655e6c;font-weight:400}

/* Compact ingredient review keeps a small-phone meal visible without hiding actions. */
.ingredient-review-page .flow-heading{margin:6px 0 2px}
.ingredient-review-page .flow-heading h1{font-size:24px;line-height:1.25}
.ingredient-review-page .flow-heading small{font-size:11px}
.ingredient-review-page .ingredient-review-summary{margin:0 0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ingredient-review-page .meal-ingredient-hint{margin-bottom:4px!important;font-size:11px!important;white-space:nowrap}
.ingredient-review-page .flow-check-row{min-height:50px;margin:0 12px}
.ingredient-review-page .flow-check-row.flow-check-header{min-height:32px;padding:0 12px;margin:0}
.ingredient-review-page .flow-check-category{padding:5px 12px 1px;line-height:20px}
.ingredient-review-page .meal-ingredient-name{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:8px}
.ingredient-review-page .meal-ingredient-name b{white-space:nowrap}
.ingredient-review-page .meal-ingredient-name small{min-width:0;margin-top:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ingredient-review-page .flow-check-confirm{margin-top:4px}
.ingredient-review-page .flow-checklist{margin-bottom:230px}
.shopping-empty{display:grid;gap:10px;text-align:center}
.shopping-empty h2{margin:0;font-size:18px}
.shopping-empty p{margin:0 0 5px;color:#655e6c;font-size:13px}
.shopping-empty button{width:100%;min-height:48px;border:0;border-radius:12px;background:#6c4cf1;color:#fff;font-size:14px;font-weight:650}
.shopping-empty button.secondary{border:1px solid #d9cfff;background:#fff;color:#5d3fdb}
.meal-flow-page .flow-check-confirm button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;text-align:center;line-height:1.35}
