/* touch-action and overscroll: the Scan button sits near the bottom of the screen, and
   without these a swipe near it pulls the page to refresh or double-tap zooms the canvas. */
body { padding: 0; margin: 0; background: #000; overscroll-behavior: none }
#unity-container { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center }

/* Full height always, with the width capped so the canvas can never turn landscape. A phone
   held upright is narrower than the cap and so fills the screen edge to edge; anything wider
   - a tablet on its side, a desktop window - gets a portrait box with black either side.
   Fixing a single aspect instead would letterbox a modern 9:19.5 phone, which is the case
   that matters most here.
   ponytail: 3/4 is the widest the app is allowed to get. Loosen it if a tablet held upright
   ends up with bars you would rather not have. */
#unity-canvas {
  background: #231F20;
  touch-action: none;
  height: 100vh;
  width:  min(100vw, calc(100vh * 3 / 4));
  /* Repeated in dynamic viewport units, which follow the mobile browser's toolbar sliding
     in and out. Browsers without dvh keep the vh pair above. */
  height: 100dvh;
  width:  min(100dvw, calc(100dvh * 3 / 4));
}
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
/* The Unity/WebGL logo bar has no place on a phone, and inside the centring flex container
   it would push the canvas off-centre. */
#unity-footer { display: none }
#unity-webgl-logo { float:left; width: 204px; height: 38px; background: url('webgl-logo.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }
