:root {
  color-scheme: dark;
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #080b12;
  color: white;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}
body { position: fixed; inset: 0; }
#game-shell {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: radial-gradient(circle at center, #1d2742 0%, #080b12 72%);
}
#game {
  width: 100vw;
  height: 100dvh;
  display: block;
  image-rendering: auto;
  outline: none;
  border: 0;
  touch-action: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}
#rotateHint {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: radial-gradient(circle at center, #1d2742 0%, #080b12 72%);
  color: rgba(255,255,255,.94);
  text-align: center;
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 900;
  line-height: 1.28;
  z-index: 10;
}
@supports (height: 100svh) {
  #game-shell { height: 100svh; }
  #game { height: 100svh; }
}
@media (orientation: portrait) {
  #game { visibility: hidden; pointer-events: none; }
  #rotateHint { display: flex; }
}
@media (orientation: landscape) {
  #game { visibility: visible; pointer-events: auto; }
  #rotateHint { display: none; }
}
