/* Shared base styles for the launcher and every game. */
:root {
  --bg: #111318;
  --panel: #1b1e26;
  --border: #2a2f3a;
  --text: #e8eaf0;
  --muted: #9aa1b2;
  --accent: #6cb2ff;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Respect the phone notch / home bar. */
body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Add class="game" to <body> in a game page: fills the screen and
   stops scrolling, zooming, and text selection while you play. */
body.game {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

a { color: var(--accent); }

button {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
}
button:active { transform: scale(0.97); }

/* Back-to-menu link for game pages. */
.home-link {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  left: calc(env(safe-area-inset-left) + 10px);
  z-index: 10;
  text-decoration: none;
  font-size: 1.4rem;
  opacity: 0.7;
}
