/* Lock the document only in combat. Menus retain their normal scrolling. */
html.battle-viewport-locked {
  height:100%;
  overflow:hidden;
  overscroll-behavior:none;
}
body.v60-battle {
  position:fixed;
  inset:0;
  width:100%;
  height:100vh;
  height:var(--battle-viewport-height,100dvh);
  overflow:hidden;
  overscroll-behavior:none;
  padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px);
}
body.v60-battle #gameMain {
  width:100%;
  min-height:0!important;
  margin:0 auto;
}
body.v60-battle #opponentArena,
body.v60-battle #arena {
  width:100%!important;
  height:var(--battle-arena-height,auto)!important;
}
body.v60-battle #gameMain.battle-arenas-compact .arena .unit-shape {
  aspect-ratio:1!important;
  width:auto!important;
}
body.v60-battle .arena,
body.v60-battle .v123-top,
body.v60-battle .v123-hud,
body.v60-battle .deck,
body.v60-battle #summon {
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
body.v60-battle #overlay .battle-report-modal {
  touch-action:pan-y;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

/* Recover vertical room for the two arenas on phones without shrinking the game or its controls. */
@media (max-width:600px) {
  body.v60-battle #gameMain {padding-bottom:4px!important;}
  body.v60-battle .v123-top {height:56px;padding:2px 6px;}
  body.v60-battle .v123-opponent-deck span {height:39px;}
  body.v60-battle .v123-opponent-crest {width:40px;height:40px;}
  body.v60-battle .v123-hud {min-height:46px;padding:2px 7px;}
  body.v60-battle .v123-info-row {margin-top:3px;}
  body.v60-battle .v123-next img {width:20px;height:20px;}
  body.v60-battle .deck {padding-top:6px!important;padding-bottom:8px!important;}
}
