/* Warfront v4.89.2 — scroll recovery for the existing legacy mobile Army Builder.
   v4.89.1 put native header and account bar back in the document; this patch
   restores the document as the ONLY vertical scroller. CSS only: no game events,
   gold, saved armies, battle routes, auth or pixel art are changed.
*/
@media (max-width:700px), (orientation:landscape) and (max-height:550px) and (max-width:1100px) {
  /* Undo game-wide viewport locks ONLY while the legacy Army Builder is open.
     Both html and body must be scrollable; fixing only #builder is insufficient
     when an ancestor remains height:100vh / overflow:hidden. */
  html:has(body.ui-build) {
    position:static!important;
    height:auto!important;
    min-height:100%!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
  }
  html body.ui-build {
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    padding-bottom:calc(20px + env(safe-area-inset-bottom))!important;
  }
  /* Keep the existing v4.89.1 in-flow header, builder and account bar intact. */
  html body.ui-build #uiBuildNav {
    position:relative!important;
    top:auto!important;
    bottom:auto!important;
  }
  html body.ui-build #builder {
    position:relative!important;
    top:auto!important;
    bottom:auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-x:clip!important;
    overflow-y:visible!important;
    margin-bottom:18px!important;
  }
  html body.ui-build #builder > .layout {
    position:relative!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  /* Existing action: never float across or conceal the last unit cards. */
  html body.ui-build #builder #fightBtn {
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    float:none!important;
    clear:both!important;
    transform:none!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-height:50px!important;
    height:auto!important;
    margin:12px auto!important;
    z-index:1!important;
  }
  html body.ui-build #wf348Toolbar {
    position:relative!important;
    inset:auto!important;
    max-height:none!important;
    margin-bottom:calc(18px + env(safe-area-inset-bottom))!important;
  }
}
