:root {
  color-scheme: dark;
  --route-height: 550vh;
  font-family: Arial, Helvetica, sans-serif;
  color: #e6e4ec;
  background: #10121e;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-anchor: none; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid #a4bcd5; outline-offset: 7px; }
a:hover { color: #c6c2e7; }
.site-header {
  position: fixed; z-index: 5; inset: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(26px, env(safe-area-inset-top)) 4.3vw 24px;
  background: linear-gradient(#10121eaa, transparent);
}
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: .24em; }
.wordmark span { margin-left: 12px; font-size: 10px; font-weight: 400; letter-spacing: .13em; color: #a19cae; }
.classic-link { display: inline-flex; min-height: 44px; align-items: center; gap: 20px; font-size: 12px; color: #c1bdca; }
.viewport, .fallback { position: fixed; inset: 0; }
.viewport { visibility: hidden; height: var(--stage-height, 100svh); bottom: auto; overflow: hidden; }
#space { display: block; width: 100%; height: 100%; pointer-events: none; }
.fallback svg { width: 100%; height: 100%; display: block; }
:root[data-render="webgl"] .viewport { visibility: visible; }
:root[data-render="webgl"] .fallback { visibility: hidden; }
main { position: relative; min-height: 100svh; overflow-anchor: none; }
:root[data-render="webgl"] main { height: var(--route-height); }
.intro {
  position: fixed; z-index: 2; left: 5vw; top: 32vh;
  pointer-events: none; text-shadow: 0 2px 35px #0c0d1f;
}
.eyebrow { font-size: 10px; line-height: 1.8; letter-spacing: .24em; text-transform: uppercase; color: #b5adcc; margin: 0 0 22px; }
h1, h2 { font-size: clamp(42px, 5.4vw, 78px); font-weight: 400; line-height: 1.02; letter-spacing: -.045em; margin: 0; }
.intro-note { color: #c5bfcf; font-size: 12px; margin: 25px 0 0; letter-spacing: .08em; }
.scroll-hint { display: none; align-items: center; gap: 12px; font-size: 11px; color: #b3aec2; margin-top: 44px; }
.scroll-hint span { font-size: 22px; color: #d7c9ba; }
:root[data-render="webgl"] .scroll-hint { display: flex; }
.ending {
  display: none; position: fixed; z-index: 2; left: 5vw; bottom: 18vh;
  opacity: 0; text-shadow: 0 2px 35px #0c0d1f;
}
:root[data-render="webgl"] .ending { display: block; }
.ending h2 { font-size: clamp(36px, 4vw, 60px); }
.ending a { display: inline-flex; align-items: center; gap: 22px; font-size: 12px; min-height: 44px; margin-top: 20px; }
.fallback-copy { position: absolute; left: 5vw; bottom: 17vh; font-size: 12px; line-height: 2; color: #c8c1d3; }
:root[data-render="webgl"] .fallback-copy { display: none; }
.noscript-note { position: absolute; left: 5vw; bottom: 9vh; max-width: 80vw; font-size: 12px; }
.scene-footer {
  position: fixed; z-index: 3; bottom: max(25px, env(safe-area-inset-bottom)); left: 4.3vw; right: 4.3vw;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: .12em; color: #bbb5c8; pointer-events: none;
}
.world-number { margin-right: 18px; color: #e4cbb2; }
.footer-note { font-size: 10px; letter-spacing: .02em; color: #aaa4b8; }
.progress-track { display: none; position: fixed; z-index: 6; inset: auto 0 0; height: 2px; background: #ffffff0d; }
:root[data-render="webgl"] .progress-track { display: block; }
.progress-fill { height: 100%; background: #b9a9cc; transform: scaleX(0); transform-origin: left; }
@media (max-width: 700px) {
  .site-header { padding: max(17px, env(safe-area-inset-top)) 22px 18px; }
  .wordmark { font-size: 13px; letter-spacing: .18em; }
  .wordmark span { margin-left: 7px; font-size: 9px; }
  .classic-link { font-size: 10px; gap: 8px; }
  .intro { left: 25px; top: 17svh; }
  h1 { font-size: clamp(38px, 10.3vw, 55px); }
  .eyebrow { font-size: 8px; letter-spacing: .19em; margin-bottom: 13px; }
  .intro-note { margin-top: 18px; font-size: 10px; }
  .scroll-hint { margin-top: 23px; font-size: 10px; }
  .ending { left: 25px; bottom: 14svh; }
  .ending h2 { font-size: 38px; }
  .ending a { font-size: 11px; }
  .scene-footer { left: 25px; right: 25px; bottom: max(24px, env(safe-area-inset-bottom)); font-size: 9px; }
  .footer-note { max-width: 140px; text-align: right; line-height: 1.6; font-size: 9px; }
  .fallback-copy { left: 25px; bottom: 13svh; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (pointer: coarse) and (max-width: 1000px) {
  .intro { top: calc(var(--stage-height, 100svh) * .17); }
}
