* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
}
body {
  background: radial-gradient(ellipse at 30% 15%, #f8f4e9, #ded9cb);
  font-family:
    system-ui,
    -apple-system,
    "Microsoft YaHei",
    sans-serif;
  color: #39392f;
  touch-action: manipulation;
}
main {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#stage {
  position: relative;
  height: min(900px, calc(100dvh - 44px));
  max-width: 100vw;
  aspect-ratio: 420/900;
  background: #faf7ed;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 80px #4b50332b;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#controls {
  position: absolute;
  inset: 0;
}
#controls button {
  position: absolute;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: transparent;
  cursor: pointer;
  font-size: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
#controls button:disabled {
  cursor: default;
}
#controls button:focus-visible {
  outline: 3px solid #3c6756;
  outline-offset: 3px;
  background: #8fba9d25;
}
#loading {
  position: absolute;
  top: 45%;
  width: 100%;
  text-align: center;
  font-size: 16px;
}
.edition {
  margin: 9px 0;
  font-size: 11px;
  letter-spacing: 2px;
  color: #8c8b76;
}
@media (max-width: 500px) {
  #stage {
    height: min(100dvh, calc(100vw * 900 / 420));
    border-radius: 0;
    box-shadow: none;
  }
  .edition {
    display: none;
  }
  body {
    background: #faf7ed;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}
