/* Profile dialogs must remain escapable on Android WebView 101 and short views. */
#modal{z-index:420!important;align-items:center!important;padding:8px!important}
#modal>.modal-card{min-height:0!important;max-height:calc(100vh - 16px)!important;max-height:calc(var(--sdf-dialog-height,100vh) - 16px)!important}
#modal>.phone-profile-modal-v232{
 display:flex!important;flex-direction:column!important;overflow:hidden!important;
 height:calc(100vh - 16px)!important;height:calc(var(--sdf-dialog-height,100vh) - 16px)!important;
 padding:8px!important;align-self:center!important;border-radius:14px!important;
}
#modal>.phone-profile-modal-v232>#closeModal{
 position:relative!important;top:auto!important;right:auto!important;align-self:flex-end!important;
 flex:0 0 44px!important;width:44px!important;height:44px!important;min-height:44px!important;
 margin:0 0 6px!important;padding:0!important;z-index:30!important;
}
#modal>.phone-profile-modal-v232>#modalBody{
 flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;
 -webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding-bottom:24px!important;
}
/* Other long overlays share the same legacy-height and visible-exit guarantees. */
#appSettingsModal>.modal-card,.game-result-modal>.game-result-card,.dynasty-build-card,
.journey-preview,#dynastyStory237,.supporter-credits-dialog,#systemMessage243,
#sdfPlayShop>.sdf-premium-box,#sdfAndroidEditor>.sdf-premium-box{
 min-height:0!important;max-height:calc(100vh - 24px)!important;
 max-height:calc(var(--sdf-dialog-height,100vh) - 24px)!important;overflow-y:auto!important;
}
#appSettingsModal{z-index:420!important;align-items:center!important;padding:8px!important}
#appSettingsModal>.app-settings-card,#modal.phone-coach-create-v232>.modal-card{
 height:calc(100vh - 24px)!important;height:calc(var(--sdf-dialog-height,100vh) - 24px)!important;
}
#modal:not(.phone-coach-create-v232)>.modal-card:not(.phone-profile-modal-v232)>#closeModal,
#appSettingsModal .modal-close,#gameResultModal .modal-close,.supporter-credits-dialog>.modal-close{
 position:sticky!important;top:0!important;right:0!important;margin-left:auto!important;
 min-width:44px!important;min-height:44px!important;z-index:30!important;
}
#sdfPlayShop .sdf-premium-head,#sdfAndroidEditor .sdf-premium-head,
.journey-preview>.journey-heading,#dynastyStory237>header{
 position:sticky!important;top:0!important;z-index:30!important;background:#071722;
}
#sdfContextHelp .sdf-help-box,#sdfHelpCenter .sdf-help-box,#tutorialPanel.sdf-guided-welcome .tutorial-card{
 max-height:calc(100vh - 24px)!important;max-height:calc(var(--sdf-dialog-height,100vh) - 24px)!important;
}
#systemMessage243>.btn:last-child{position:sticky;bottom:0;z-index:30;min-height:44px}
#gameSimBody .gc-header{position:sticky;top:0;z-index:30;background:#0c151c}
.journey-preview>[data-close],.journey-preview>[data-cancel]{position:sticky;bottom:0;z-index:30;min-height:44px}
@media(max-width:800px){
 #gameSimModal>.game-sim-card{height:100vh!important;height:var(--sdf-dialog-height,100vh)!important;max-height:100vh!important;max-height:var(--sdf-dialog-height,100vh)!important}
}
