:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --fg: #1b1f24;
  --muted: #5b6472;
  --accent: #3fb8ff;
  --card: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #8b949e;
    --accent: #5fd0ff;
    --card: #12161c;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

main {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 4px;
}

p.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);
  touch-action: none;
}

@media (prefers-color-scheme: dark) {
  .stage {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

canvas#scene {
  display: none;
  width: 100%;
  height: 100%;
}

img.poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.webgl-ready canvas#scene {
  display: block;
}

body.webgl-ready img.poster {
  display: none;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #06202b;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(63, 184, 255, 0.35);
}

.cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

footer {
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a {
  color: inherit;
}
