/* ==========================================================
   v179.9.75 — PWA BOTTOM BAR + HOME CONTROL ANCHOR
   Narrow geometry-only correction from v179.9.74 / v179.9.72.
   - Installed-PWA bottom navigation uses the iPhone safe area once.
   - Home control is anchored in the normal Scorecard header instead of
     floating independently over game content.
   No modal/editor/scoring/stat structure changes in this pass.
   ========================================================== */

@media (max-width:900px){
  /* The bar background still reaches the physical bottom edge, while its
     interactive row stays above the Home indicator. Earlier generations
     stacked a 78px content reserve on top of a second safe-area reserve. */
  body:not(.home-page){
    padding-bottom:calc(58px + env(safe-area-inset-bottom))!important;
  }
  body:not(.home-page) #mobileActionBar{
    box-sizing:border-box!important;
    height:calc(58px + env(safe-area-inset-bottom))!important;
    min-height:calc(58px + env(safe-area-inset-bottom))!important;
    padding:3px max(7px,env(safe-area-inset-right)) calc(3px + env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left))!important;
    align-items:start!important;
  }
  body:not(.home-page) #mobileActionBar>button{
    height:50px!important;
    min-height:50px!important;
    margin-top:0!important;
  }
  body:not(.home-page) #mobileActionBar>.score-command{
    height:58px!important;
    min-height:58px!important;
    margin-top:-7px!important;
    transform:none!important;
    border-radius:19px!important;
  }

  /* Stop the Home control from becoming a separate fixed overlay. It remains
     in the existing topbar grid, so every theme gets the same geometry and it
     can never land on Game Information, standings, or a team card. */
  body:not(.home-page) .topbar #homeBtn,
  body:not(.home-page) .topbar .home-icon{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    z-index:auto!important;
    align-self:center!important;
    justify-self:start!important;
    transform:none!important;
    translate:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
}
