/* V8: Flutter Home / Switch Service has NO persistent service-navigation rail.
   Earlier styles can still force a stale fallback nav visible when the nav
   coordinator has a stale owner (root/service), even though #bottomNav is hidden.
   Scope by the *rendered screen*, not the SPA body classes. Never touch playerHost.
*/
@supports selector(body:has(#page .mxso-page)) {
  @media (max-width: 767px) {
    html body:has(#page .mxso-page) #app > nav#bottomNav,
    html body:has(#page .mxss-screen) #app > nav#bottomNav,
    html body:has(#page .mxso-page) #mxNavRescue,
    html body:has(#page .mxss-screen) #mxNavRescue,
    html body:has(#page .mxso-page) #mxPhoneNavUnified,
    html body:has(#page .mxss-screen) #mxPhoneNavUnified,
    html body:has(#page .mxso-page) #mxRemainingFlutterWorkspace,
    html body:has(#page .mxss-screen) #mxRemainingFlutterWorkspace,
    html body:has(#page .mxso-page) #mxFlutterMarketTabs,
    html body:has(#page .mxss-screen) #mxFlutterMarketTabs,
    html body:has(#page .mxso-page) .mx-rescue-service-nav,
    html body:has(#page .mxss-screen) .mx-rescue-service-nav {
      display:none!important;visibility:hidden!important;opacity:0!important;
      pointer-events:none!important;width:0!important;height:0!important;
      min-height:0!important;max-height:0!important;padding:0!important;
      margin:0!important;border:0!important;box-shadow:none!important;
    }
    html body:has(#page .mxso-page),
    html body:has(#page .mxss-screen) {
      height:auto!important;min-height:100%!important;
      overflow-x:hidden!important;overflow-y:auto!important;
      background:#020912!important;
    }
    html body:has(#page .mxso-page) #app,
    html body:has(#page .mxss-screen) #app,
    html body:has(#page .mxso-page) #page,
    html body:has(#page .mxss-screen) #page {
      height:auto!important;max-height:none!important;
      min-height:100dvh!important;
      overflow-y:visible!important;overflow-x:clip!important;
      margin-bottom:0!important;padding-bottom:0!important;
      background:#020912!important;
    }
    html body:has(#page .mxso-page) #page > .mxso-page,
    html body:has(#page .mxss-screen) #page > .mxss-screen {
      height:auto!important;max-height:none!important;
      overflow:visible!important;
      padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))!important;
      background:#020912!important;
    }
    /* Do not leave a fixed-height, empty footer when the nav owner is stale. */
    html body:has(#page .mxso-page) #app > footer:empty,
    html body:has(#page .mxss-screen) #app > footer:empty {
      display:none!important;
    }
  }
}
