:root {
  --bg: #FDF6F0;
  --fg: #8b7bd8;
  --accent: #7b6acb;
}

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

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--fg); overflow: hidden;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
}

#game-root { width: 100%; height: 100%; }

/* The loading layer. Opaque and on top of the canvas: BootScene removes it on EVERY route
   (VIS-08), or a first-run player taps blind on an invisible language picker. */
.boot-message {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg); z-index: 100;
  pointer-events: none;
}

.boot-title {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700; color: var(--accent);
  text-align: center; margin: 0 1rem 1rem;
}

.boot-dots span {
  display: inline-block; width: 12px; height: 12px; margin: 0 6px;
  border-radius: 50%; background: var(--fg); opacity: 0.3;
  animation: boot-pulse 1s infinite ease-in-out;
}
.boot-dots span:nth-child(2) { animation-delay: 0.15s; }
.boot-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes boot-pulse { 50% { opacity: 0.9; } }

canvas { display: block; }

@media (prefers-reduced-motion: reduce) {
  .boot-dots span { animation: none; }
}
