html, body { width: 100%; height: 100%; }
body {
  overflow: hidden; display: grid; place-items: center; background: #2d2119;
  box-sizing: border-box; padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#TrialViewport { width: 100%; height: 100%; display: grid; place-items: center; container-type: size; }
#GameDiv {
  width: min(100vw, calc(100vh * 16 / 9)) !important;
  width: min(100cqw, calc(100cqh * 16 / 9)) !important;
  height: auto !important; aspect-ratio: 16 / 9;
  margin: 0; border: 0; border-radius: 0; box-shadow: none;
}
#GameCanvas { display: block; touch-action: none; }
.header, .footer, #RotateNotice { display: none; }
#TrialLoading:not([hidden]) {
  position: fixed; inset: 0; z-index: 1; display: grid; place-content: center; gap: 0.75rem;
  text-align: center; color: #fff6e8; background: #2d2119; padding: 24px;
}
#TrialLoading progress { width: min(240px, 70vw); accent-color: #ffd98a; }
@media (orientation: portrait) and (pointer: coarse) {
  #TrialViewport { visibility: hidden; }
  #RotateNotice {
    position: fixed; inset: 0; display: grid; place-content: center; gap: 0.75rem;
    text-align: center; color: #fff6e8; padding: 24px;
  }
  #RotateNotice strong { font-size: 1.5rem; }
}
