/* v504 recovery: restores v501 page bodies; footer reach only. No game/menu body or gameplay changes. */
@media (max-width: 768px){
  body.game-page .freshFooterV500{
    display:block !important;
    position:relative !important;
    z-index:5 !important;
    margin-top:22px !important;
    margin-bottom:calc(430px + env(safe-area-inset-bottom)) !important;
  }
  body.game-page::after{
    content:"" !important;
    display:block !important;
    height:calc(340px + env(safe-area-inset-bottom)) !important;
    width:100% !important;
    flex:0 0 auto !important;
  }
}


/* v505 targeted layout recovery
   - menu: remove dead vertical space before footer
   - game: header/logo/social/footer zones only; no game panels/cards/JS touched */
body.m-page .m-shell{
  min-height:auto!important;
  padding-bottom:0!important;
}
body.m-page .freshFooterV500{
  margin-top:12px!important;
  margin-bottom:26px!important;
}
@media (min-width:901px){
  body.game-page > .header{
    position:relative!important;
    height:150px!important;
    min-height:150px!important;
    max-height:150px!important;
    padding:18px 22px 0!important;
    margin:0!important;
    text-align:center!important;
    overflow:visible!important;
  }
  body.game-page .brandLogo{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:170px!important;
    height:auto!important;
    min-height:0!important;
    margin:0 auto!important;
    position:relative!important;
    z-index:2!important;
  }
  body.game-page .brandLogoLink{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:170px!important;
    height:auto!important;
    line-height:0!important;
    text-decoration:none!important;
  }
  body.game-page .brandLogoImg{
    display:block!important;
    width:170px!important;
    max-width:170px!important;
    height:auto!important;
    max-height:none!important;
    object-fit:contain!important;
    visibility:visible!important;
    opacity:1!important;
  }
  body.game-page .subtitle{
    position:absolute!important;
    top:66px!important;
    right:clamp(42px,6vw,92px)!important;
    margin:0!important;
    padding:0!important;
    max-width:420px!important;
    text-align:right!important;
    line-height:1.25!important;
    z-index:2!important;
  }
  body.game-page .site-social-links{
    position:absolute!important;
    top:88px!important;
    right:clamp(42px,6vw,92px)!important;
    gap:18px!important;
    z-index:3!important;
  }
  body.game-page .freshFooterV500{
    margin-top:12px!important;
    margin-bottom:28px!important;
  }
}
@media (max-width:768px){
  body.game-page{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    padding-bottom:calc(520px + env(safe-area-inset-bottom))!important;
  }
  body.game-page > .header{
    padding:calc(8px + env(safe-area-inset-top)) 8px 6px!important;
    margin:0!important;
  }
  body.game-page .brandLogo{
    width:108px!important;
    margin:0 auto 8px!important;
  }
  body.game-page .brandLogoLink,
  body.game-page .brandLogoImg{
    width:108px!important;
    max-width:108px!important;
    height:auto!important;
    max-height:none!important;
  }
  body.game-page .subtitle{
    display:block!important;
    max-width:340px!important;
    margin:8px auto 0!important;
    text-align:center!important;
  }
  body.game-page .site-social-links{
    position:absolute!important;
    top:calc(32px + env(safe-area-inset-top))!important;
    right:18px!important;
    gap:14px!important;
  }
  body.game-page .freshFooterV500{
    display:block!important;
    position:relative!important;
    z-index:5!important;
    clear:both!important;
    margin-top:22px!important;
    margin-bottom:calc(520px + env(safe-area-inset-bottom))!important;
  }
}
