/* Keep mobile modal actions reachable above the phone navigation. */
@media(max-width:760px){
  .modal-bg,.goal-modal-bg{
    z-index:2147483600!important;
    padding:0!important;
    align-items:flex-end!important;
  }
  .modal,.goal-modal{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:none!important;
    max-height:calc(100dvh - env(safe-area-inset-top) - 8px)!important;
    overflow:hidden!important;
    border-radius:24px 24px 0 0!important;
  }
  .modal>.mh,.goal-modal>.mh{
    flex:0 0 auto;
    position:relative!important;
    top:auto!important;
  }
  .modal>.mb,.goal-modal>.mb{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  .modal>.mf,.goal-modal>.mf{
    flex:0 0 auto;
    position:relative!important;
    bottom:auto!important;
    z-index:3;
    padding:12px 16px calc(12px + env(safe-area-inset-bottom))!important;
    background:#fff;
  }
  body:has(.modal-bg.open) #mobileBottomNav,
  body:has(.goal-modal-bg.open) #mobileBottomNav,
  body:has(.modal-bg.open) #asset-cloud-sync,
  body:has(.goal-modal-bg.open) #asset-cloud-sync{
    visibility:hidden!important;
    pointer-events:none!important;
  }
}
