/* Full-screen mobile shell; desktop gets the same viewport-sized layout. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  overscroll-behavior: none; /* only works from the root: kills pull-to-refresh */
  touch-action: manipulation; /* no double-tap or pinch zoom anywhere */
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh; /* 100vh alone hides the bottom behind the mobile address bar */
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #050409; /* the canvas clears to THIS live (game.js reads it), so background edits show in the game */
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, [contenteditable] {
  user-select: text;
  -webkit-user-select: text;
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none; /* taps and drags feed the game, never scroll the page */
}

/* Overlays routed by GAME.setScreen(); only tappables catch taps — text and
   wrappers let them through to the canvas. */
.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
  gap: 0.75rem;
}
.screen, .screen * { pointer-events: none; }
.screen :is(button, a, input, [data-action]) { pointer-events: auto; }
.screen[hidden] { display: none; } /* display: grid above would defeat [hidden] */

button {
  font: inherit;
  font-size: 1.15rem;
  min-height: 48px;
  padding: 0.7rem 2.4rem;
  border: 0;
  border-radius: 999px;
  background: #7c6cff;
  color: #fff;
  cursor: pointer;
  justify-self: center;
}
button:active { transform: scale(0.96); }

h1 { margin: 0; font-size: 2.4rem; }
h2 { margin: 0; font-size: 2rem; }
#tagline { margin: 0 0 1rem; color: #8f8ba8; }
#resume-note { margin: 0; color: #8f8ba8; font-size: 0.95rem; }
#final-score { margin: 0 0 1rem; color: #8f8ba8; font-size: 1.1rem; }
