#game{display:block;width:100%;height:100%;border:0;background:#0179c9}#stage{aspect-ratio:16/9}#stage:fullscreen #game{width:100%;height:100%}@media(max-width:640px){#stage{height:70svh;aspect-ratio:auto;min-height:360px}}
#stage:fullscreen{height:100vh;width:100vw;min-height:0;max-height:none;aspect-ratio:auto}

/* Fit the desktop game inside the visible browser window and center its frame. */
@media(min-width:641px){
  main.without-ranking #stage{
    width:min(100%,max(320px,calc((100vh - 210px) * 16 / 9)));
    width:min(100%,max(320px,calc((100svh - 210px) * 16 / 9)));
    justify-self:center;
  }
  main.without-ranking #stage:fullscreen{width:100vw;height:100vh;}
}
