:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #061821;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #061821;
}

body {
  display: grid;
  place-items: center;
}

.game-shell {
  width: min(100vw, calc(100vh * 0.45));
  height: min(100vh, calc(100vw * 2.222222));
  aspect-ratio: 9 / 20;
  display: grid;
  place-items: center;
  position: relative;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 20;
  max-height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  background: #0a2934;
  border-radius: 12px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(180, 239, 245, 0.08);
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 420px) {
  .game-shell {
    /* Keep the 9:20 design ratio; narrow phones may letterbox horizontally. */
    width: min(100vw, calc(100vh * 0.45));
    height: min(100vh, calc(100vw * 2.222222));
  }

  #gameCanvas {
    border-radius: 0;
  }
}
