/* Native modal dialogs need their own centering after page-wide margin resets.
   Type-level specificity beats universal resets while component classes/inline
   styles retain deliberate drawers, bottom sheets and full-screen workspaces.
   Do not set display: closed dialogs must stay hidden, and flex dialogs keep it. */
dialog:where(:modal) {
    position: fixed;
    inset: 0;
    margin: auto;
    box-sizing: border-box;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    overscroll-behavior: contain;
}
