html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  overflow: hidden;
  align-items: center;
  justify-content: center;
  background: #252d32;
}

/* Wide desktop windows retain a centered portrait play area. */
#GameDiv {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-width: 56.25vh;
  max-width: 56.25dvh;
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
  touch-action: none;
}

#Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

/* A phone's address/navigation bars change its height, never its game width. */
@media (orientation: portrait) and (max-width: 768px), (orientation: portrait) and (pointer: coarse) {
  #GameDiv { max-width: none; }
}
