/* Shared dark-comic surface. Loaded after the specialized glass styles.
   Preserve each dialog's size, scroll owner, footer and keyboard behavior. */
#dialog,#menu-viewer{--dialog-surface:linear-gradient(#090d13e8,#090d13f2),url('/glass-architecture.webp') center/cover,#090d13;--dialog-panel:#10141bd9}
#dialog[open],
#dialog[open]:not(.management-editor):not(:has(.glass-profile-pane)),
#dialog[open].management-editor,
#dialog[open].management-editor.schedule-dialog:not(.schedule-sheet),
#dialog[open].management-editor.schedule-sheet,
#dialog[open]:has(.glass-profile-pane),
#menu-viewer{background:var(--dialog-surface);color:#f4f3f0;backdrop-filter:none;-webkit-backdrop-filter:none}
#dialog::backdrop,#menu-viewer::backdrop{background:#05080c88;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
/* One continuous artwork layer beneath passive text, never a panel per
   paragraph. Keep controls, selected states and validation feedback intact. */
#dialog.management-editor .dialog-head,
#dialog:has(.glass-profile-pane) .dialog-head,
#dialog.management-editor .management-body,
#dialog:not(.management-editor):not(:has(.glass-profile-pane)) .dialog-head,
#dialog:not(.management-editor):not(:has(.glass-profile-pane))>p:not(#dialog-status):not(.bad),
#dialog:not(.management-editor):not(:has(.glass-profile-pane)) :is(.recipe-detail>section,.comment-entry),
#dialog.management-editor .management-body :is(.management-list,.management-inline-item,.management-summary:not(.management-beam),.management-log-card,.schedule-notice,.schedule-day-card,.schedule-swap-card),
#dialog .glass-profile-pane>.card{background:transparent}
/* Sticky controls still need their own surface so scrolling text cannot
   show through underneath an action. */
#menu-viewer .menu-viewer-head,
#menu-viewer .menu-viewer-controls,
#dialog.management-editor .management-footer,
#dialog.management-editor.schedule-dialog .schedule-footer{background:var(--dialog-panel)}
#dialog.management-editor .management-body :is(input,textarea,select){background:#17191d;color:#f4f3f0}
#dialog.management-editor .management-body :is(input,textarea)::placeholder{color:#b9c3ce}
#dialog.management-editor.schedule-dialog .schedule-choice:not(.chosen){background:var(--dialog-panel)}
/* Every shared modal owns its scrolling; short profile/forms previously fell
   outside the .management-editor-only document lock. Closing releases it. */
html:has(#dialog[open],#menu-viewer[open]),body:has(#dialog[open],#menu-viewer[open]){overflow:hidden;overscroll-behavior:none}
#dialog{overscroll-behavior:none}

/* Menu import is a page, not a management dialog. Give that page one inner
   scroll area while keeping the brand header and bottom navigation in place.
   The management hub and label-editing pages still scroll normally. */
html:has(body[data-page=menu-admin]),body[data-page=menu-admin]{overflow:hidden;overscroll-behavior:none}
body[data-page=menu-admin] .app-v3{display:flex;flex-direction:column;height:100dvh;min-height:0;overflow:hidden;padding-bottom:0}
body[data-page=menu-admin] .app-header{flex:none}
body[data-page=menu-admin] #content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none;padding-bottom:calc(105px + env(safe-area-inset-bottom));scroll-padding:16px}
