:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #10141b;
  color: #eef3fc;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: #10141b;
}
.game {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 390px;
  position: relative;
  overflow: hidden;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background: #131923;
}
#viewport { width: 100%; height: 100%; }
#viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#boot {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  padding: 24px; text-align: center; background: #131923; color: #cbd6e7;
  font-size: 14px;
}
#boot[hidden] { display: none; }
.spinner {
  width: 28px; height: 28px;
  border: 2px solid #46516a; border-top-color: #ffd28a; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 560px) {
  body { background: radial-gradient(ellipse at 50% 6%, #273241, #10141b 68%); }
  .game { height: 100dvh; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }
