html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #bbb;
  font: 16px/1.4 system-ui, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

a { color: #e8d36a; }

/* The game canvas is 100x20 real pixels; app.js picks an integer scale. */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
#canvas {
  width: var(--game-w, 100px) !important;
  height: var(--game-h, 20px) !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Touch surface covers the whole screen. */
#touch {
  position: fixed;
  inset: 0;
  z-index: 1;
}
.stick-ring, .stick-knob {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.stick-ring {
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border: 2px solid rgba(255, 255, 255, 0.18);
}
.stick-knob {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  background: rgba(255, 255, 255, 0.14);
}
#touch.active .stick-ring,
#touch.active .stick-knob { opacity: 1; }

#rotate-hint {
  display: none;
  position: fixed;
  bottom: 12%;
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: #666;
  pointer-events: none;
}
@media (orientation: portrait) {
  body.playing #rotate-hint { display: block; }
}

/* Start / credits screen */
#start {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  padding: 6vh 8vw;
  box-sizing: border-box;
  background: #000;
  text-align: center;
  touch-action: pan-y;
}
#start h1 {
  margin: 0 0 4px;
  font-weight: normal;
  letter-spacing: 0.2em;
  color: #fff;
}
#begin {
  margin: 20px 0;
  padding: 14px 36px;
  font: inherit;
  font-size: 20px;
  color: #000;
  background: #e8d36a;
  border: 0;
  border-radius: 4px;
}
#start .how { max-width: 32em; margin: 8px auto; }
#start .credits { max-width: 32em; margin: 20px auto 0; font-size: 13px; color: #777; }
#status { font-size: 13px; color: #777; min-height: 1.4em; }
body.playing #start { display: none; }
