#editor:has(.shopping-demand){width:min(900px,calc(100vw - 24px))}.shopping-demand{min-width:0}.shopping-demand>p{margin:0 0 16px}.shopping-demand-line{border:1px solid var(--line);border-radius:12px;margin:12px 0;background:var(--white)}.shopping-demand-line summary{display:flex;justify-content:space-between;gap:12px;padding:16px;cursor:pointer}.shopping-demand-line summary span{color:var(--muted);white-space:nowrap}.shopping-demand-fields{padding:0 16px 16px}.shopping-demand-fields label{display:flex;flex-direction:column;gap:8px;margin:12px 0;min-width:0}.shopping-demand-fields input,.shopping-demand-fields select{width:100%;min-width:0;box-sizing:border-box}.shopping-material{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:end}.shopping-material>button{margin-bottom:12px}.shopping-demand-result-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 16px;padding:12px 0;border-bottom:1px solid var(--line)}.shopping-demand-result-row small{grid-column:1/-1;color:var(--muted)}.shopping-demand [hidden]{display:none!important}@media(max-width:600px){.shopping-demand-line summary{flex-direction:column;gap:4px}.shopping-material{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.shopping-material>label:first-child{grid-column:1/-1}.shopping-material label{margin:4px 0}.shopping-material{margin-bottom:14px}.shopping-demand-fields{padding:0 12px 12px}}
/* Date/time controls must fit their own tracks, including iOS native inputs. */
@media(max-width:800px){.occupancy-controls{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 12px!important;align-items:end}.occupancy-controls>label{display:flex;flex-direction:column;gap:8px;min-width:0!important;width:100%;margin:0}.occupancy-controls input{display:block;box-sizing:border-box;width:100%;min-width:0!important;max-width:100%;padding-inline:10px}.occupancy-controls>button{justify-self:start}.room-booking-list>.muted{margin:0;padding:20px 16px;line-height:1.5}}
@media(max-width:360px){.occupancy-controls{grid-template-columns:minmax(0,1fr)}}
/* Prevent scroll chaining and elastic blank areas without blocking vertical planning. */
@media(max-width:1099px){html:has(#shifts-content){overscroll-behavior-y:none;background:var(--paper)}body:has(#shifts-content){overscroll-behavior-y:none}.shift-board-scroll{overscroll-behavior:none;min-height:0;-webkit-overflow-scrolling:touch;background:var(--white)}}
.shopping-demand-event{display:block;width:100%;text-align:left;margin:10px 0;white-space:normal}

.shopping-demand [data-demand-result] h3{margin:24px 0 12px}
.shopping-list-card{padding:20px;margin-bottom:16px;min-width:0}.shopping-list-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.shopping-list-heading h2{margin:0 0 6px}.shopping-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex-shrink:0}.shopping-row-actions .danger,.shopping-toolbar .danger{color:var(--danger,#b64135)}.shopping-list-card .workflow-item{border-top:1px solid var(--border,#dce5df);gap:16px}.shopping-list-card .check-row{min-width:0;flex:1}.shopping-list-card .check-row span{min-width:0;overflow-wrap:anywhere}.shopping-list-card .workflow-item:last-child{margin-bottom:0}@media(min-width:1100px){#shopping-overview{max-width:1280px;margin-inline:auto}.shopping-list-card .workflow-item{padding-block:12px}}@media(max-width:600px){.shopping-list-heading{align-items:flex-start;flex-direction:column}.shopping-list-card{padding:16px}.shopping-list-card .workflow-item{align-items:flex-start;flex-direction:column;gap:8px}.shopping-list-card .shopping-row-actions{width:100%;justify-content:flex-start}.shopping-row-actions button{min-height:44px}.shopping-list-card .workflow-item>.shopping-row-actions{padding-left:32px}}

/* Recipe planning: readable quantities, instant calculation and explicit exceptions. */
#editor:has(.shopping-demand){width:min(1040px,calc(100vw - 24px))}.demand-base{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 16px;background:var(--paper);border-radius:10px;margin:14px 0}.demand-base>span{color:var(--muted)}.demand-adjust{border:1px solid var(--line);border-radius:10px;padding:12px 16px;margin:14px 0}.demand-adjust>summary,.demand-ingredients>summary,.demand-notes>summary,.service-recipe-settings>summary{cursor:pointer;font-weight:600;line-height:1.6}.demand-amount-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,.5fr);gap:12px}.demand-live{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;background:var(--soft);padding:16px;border-radius:10px;line-height:1.6;margin:14px 0}.demand-live>span{font-size:.9rem}.demand-live>strong{white-space:nowrap}.demand-incomplete{color:var(--muted)}.demand-ingredients{padding:12px 0}.demand-ingredients ul{list-style:none;padding:0;margin:12px 0}.demand-ingredients li{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--line)}.shopping-demand-fields .demand-remember{display:flex;flex-direction:row;align-items:flex-start;gap:10px;margin:16px 0 4px;line-height:1.6}.shopping-demand-fields .demand-remember>input{width:20px;min-width:20px;height:20px;margin-top:2px;flex:0 0 20px}.shopping-demand-fields small{display:block;line-height:1.6}.demand-notes{margin-top:20px}.demand-notes p{font-size:.9rem;color:var(--muted);line-height:1.6}.demand-preview-status{min-height:1.6em;line-height:1.6}.service-recipe-settings{border:1px solid var(--line);border-radius:12px;padding:16px;margin:20px 0}.service-recipe-settings [hidden]{display:none!important}.service-recipe-settings label{display:flex;flex-direction:column;gap:8px;margin:12px 0;min-width:0}.service-recipe-settings input,.service-recipe-settings select{max-width:100%;min-width:0;width:100%}.recipe-basis-note{padding:12px 16px;background:var(--soft);border-radius:10px;font-weight:600;line-height:1.6}@media(max-width:600px){.demand-base{align-items:flex-start;flex-direction:column;gap:4px}.demand-live{align-items:flex-start;flex-direction:column;gap:6px}.demand-amount-fields{grid-template-columns:minmax(0,1fr)}.demand-adjust{padding:12px}.service-recipe-settings{padding:12px}.demand-ingredients li>span{min-width:0;overflow-wrap:anywhere}.demand-ingredients li>strong{flex-shrink:0}}

.demand-adjust>summary::after,.demand-ingredients>summary::after,.demand-notes>summary::after,.service-recipe-settings>summary::after{content:'⌄';float:right;margin-left:12px;transition:transform .15s}.demand-adjust[open]>summary::after,.demand-ingredients[open]>summary::after,.demand-notes[open]>summary::after,.service-recipe-settings[open]>summary::after{transform:rotate(180deg)}@media(prefers-reduced-motion:reduce){.demand-adjust>summary::after,.demand-ingredients>summary::after,.demand-notes>summary::after,.service-recipe-settings>summary::after{transition:none}}
/* Keep navigation and confirmation visible while only the planning content scrolls. */
#editor:has(.shopping-demand){padding:0;overflow:hidden;max-height:calc(100dvh - 32px)}#editor:has(.shopping-demand)>form{display:flex;flex-direction:column;min-height:0;max-height:calc(100dvh - 36px)}#editor:has(.shopping-demand) .dialog-heading,#editor:has(.shopping-demand) .dialog-footer{flex:0 0 auto;position:relative}#editor:has(.shopping-demand) .dialog-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
