/* One workbench keeps meal content and its member-facing presentation together. */
.modal.large.unified-meal-modal{max-width:1080px;width:min(1080px,96vw)}
.meal-workbench{font-size:14px;line-height:1.6}
.workbench-save{display:flex;flex-direction:column;gap:3px;padding:12px 16px;background:#edf3e7;border-radius:10px;color:var(--sage-deep);margin-bottom:20px}
.workbench-save small{color:var(--muted);font-size:11px}
.workbench-notice{background:#faf1d9;border:1px solid #e8d7a7;border-radius:12px;padding:15px;margin:15px 0;overflow-wrap:anywhere}
.workbench-notice p{white-space:pre-wrap;margin:7px 0}
.workbench-notice .text-link{white-space:normal;margin-left:6px}
.workbench-section{border-top:1px solid var(--line);padding:24px 0 6px;margin-top:20px}
.workbench-section h3{font-size:19px;margin-bottom:18px}
.workbench-section h3 small{font-weight:400;color:var(--muted);margin-left:8px;letter-spacing:0}
.workbench-section h4{font-size:14px;margin:12px 0}
.workbench-section .field{margin:0 0 18px}
.workbench-section .field small{display:block;margin-top:6px;color:var(--muted);font-size:12px}
.workbench-mode{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:18px}
.workbench-mode .btn{min-height:44px}
.workbench-section .food-builder{margin-top:8px;gap:24px;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
.workbench-section .food-builder #food-results{max-height:430px;overscroll-behavior:contain}
.workbench-section .food-filters{flex-wrap:wrap}
.workbench-section .food-filters input{flex-basis:100%}
.workbench-section .food-filters select{max-width:100%;width:100%;min-height:44px}
.workbench-section .food-dish-head{flex-wrap:wrap}
.workbench-section .food-dish-head input{flex:1;min-width:85px;width:auto}
.workbench-section .food-ingredient .icon-btn{min-width:36px;min-height:40px}
.workbench-section .food-ingredient input{font-size:14px}
.workbench-favorites{border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:#f6f7f0}
.workbench-favorites>summary{display:flex;align-items:center;gap:9px;cursor:pointer;min-height:30px;font-weight:600}
.workbench-favorites>summary:after{content:'＋';margin-left:auto;font-size:18px}
.workbench-favorites[open]>summary:after{content:'−'}
.workbench-favorites>summary span{font-size:12px;font-weight:500;background:#dfe8d4;border-radius:20px;padding:2px 9px}
.workbench-favorites>p{margin-top:16px;font-size:12px}
.workbench-favorite-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:end;margin-top:18px}
.workbench-favorite-grid .field{margin:0;min-width:0}
.workbench-favorite-grid select{min-height:44px;width:100%}
.workbench-favorite-grid button{justify-self:start}
.workbench-recipe-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.workbench-recipe-grid textarea{min-height:155px}
.workbench-assist{border:1px solid var(--line);border-radius:10px;padding:12px 15px;margin-bottom:10px}
.workbench-assist summary{cursor:pointer;color:var(--sage-deep);font-size:13px;min-height:30px}
.workbench-assist p{font-size:12px}
.workbench-portion-helper{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,.75fr) auto;align-items:end;gap:10px;margin:12px 0}
.workbench-portion-helper label{font-size:12px;min-width:0}
.workbench-portion-helper input,.workbench-portion-helper select{display:block;width:100%;min-height:44px;border:1px solid #d9dfd2;border-radius:8px;background:white;padding:8px}
.workbench-days{padding:14px;border:1px solid var(--line);border-radius:12px;display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 16px}
.workbench-days legend{font-size:13px;font-weight:600;padding:0 6px}
.workbench-days label{display:flex;align-items:center;gap:7px;min-height:38px;font-size:13px;cursor:pointer}
.workbench-days input,.workbench-check input{width:18px;height:18px;accent-color:var(--sage-deep);flex-shrink:0}
.workbench-check{display:flex;gap:11px;align-items:flex-start;background:#edf3e7;border:1px solid #d7e4ce;border-radius:10px;padding:15px;margin:10px 0;cursor:pointer;font-size:13px;line-height:1.7}
.workbench-check input{margin-top:2px}
.workbench-check.warning{background:#faf1d9;border-color:#e8d7a7}
.workbench-footer{border-top:1px solid var(--line);padding-top:15px;margin-top:18px}
.workbench-footer small{display:block;color:var(--muted);font-size:11px;margin-top:10px;text-align:right}
.workbench-footer .form-actions{margin-top:10px;flex-wrap:wrap}
.workbench-footer .form-error:empty{display:none}
.workbench-footer .form-error:not(:empty){padding:12px;border-radius:8px;background:#fff1d8;color:#735222}
@media(max-width:760px){
 .modal.large.unified-meal-modal{width:96vw}
 .workbench-section .food-builder,.workbench-recipe-grid,.workbench-favorite-grid{grid-template-columns:1fr}
 .workbench-section .food-builder #food-results{max-height:260px}
 .workbench-portion-helper{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
 .workbench-portion-helper button{grid-column:1/-1;justify-self:start}
 .workbench-days label{flex:1 0 40%}
 .workbench-section h3 small{display:block;margin:5px 0 0}
 .workbench-footer .form-actions{flex-direction:column;align-items:stretch}
 .workbench-footer small{text-align:left}
 .meal-workbench input:not([type=checkbox]),.meal-workbench textarea,.meal-workbench select{font-size:16px}
}
