/* Native dialogs must override the site-wide margin:0 reset. */
body > dialog {
 position:fixed !important;
 inset:0 !important;
 margin:auto !important;
 height:fit-content;
 max-width:calc(100vw - 28px) !important;
 max-height:calc(100vh - 32px) !important;
 max-height:calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
 box-sizing:border-box;
 overflow-y:auto;
 overscroll-behavior:contain;
 -webkit-overflow-scrolling:touch;
}
body > dialog::backdrop { background:rgba(23,23,37,.6); }
body > .studio-dialog {
 inset:0 !important;
 padding:16px max(14px, env(safe-area-inset-right, 0px)) 16px max(14px, env(safe-area-inset-left, 0px));
 align-items:center;
 justify-content:center;
}
body > .studio-dialog > .box {
 margin:0;
 max-height:calc(100vh - 32px);
 max-height:calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
 overflow-y:auto;
 overscroll-behavior:contain;
}
