/* Modal — el cierre permanece accesible por encima de encabezados y barras. */
:root{--dinamex-visual-height:100dvh;--dinamex-visual-top:0px}
.app-modal>.modal-x{position:sticky!important;top:0!important;z-index:1000!important;float:right;pointer-events:auto!important}
.app-modal{max-height:calc(var(--dinamex-visual-height,100dvh) - max(12px,env(safe-area-inset-top)) - max(10px,env(safe-area-inset-bottom)))!important}
.dinamex-system-dialog-portal{top:var(--dinamex-visual-top,0px)!important;bottom:auto!important;height:var(--dinamex-visual-height,100dvh)!important;max-height:var(--dinamex-visual-height,100dvh)!important}
.dinamex-system-dialog-portal .dinamex-system-dialog{max-height:calc(var(--dinamex-visual-height,100dvh) - max(24px,env(safe-area-inset-top)) - max(24px,env(safe-area-inset-bottom)))!important}
body.dinamex-keyboard-open .dinamex-system-dialog-portal[open]{place-items:start center}
body.dinamex-keyboard-open .dinamex-system-dialog-portal{padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
body.dinamex-keyboard-open .app-modal{margin-top:max(4px,env(safe-area-inset-top))!important;margin-bottom:max(4px,env(safe-area-inset-bottom))!important}
