/* タイトルと本編で共通する、16:9の画面枠と端末の余白処理です。 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  height: 100dvh;
  overflow: hidden;
  background: var(--page-black);
  color: var(--page-text);
  font-family:
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.page-shell {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.game-stage {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--stage-background);
  box-shadow: var(--stage-shadow);
}

/* 16:9より横長の端末では高さを基準にし、画面全体を切らずに表示します。 */
@media (min-aspect-ratio: 16 / 9) {
  .game-stage {
    width: auto;
    height: 100%;
    max-height: 100%;
  }
}
