/* shared page chrome: HUD, nav, progress bar, section cards (index.html + b2.html) */
  :root { --ink: #e9edf2; --dim: #8a94a3; --hot: #ffd400; --bg: #05070a; }
  * { box-sizing: border-box; margin: 0; }
  html, body { background: var(--bg); color: var(--ink); font: 15px/1.5 ui-sans-serif, -apple-system, "Helvetica Neue", Arial, sans-serif; }
  canvas#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
  #scroll { height: 900vh; }
  .hud { position: fixed; pointer-events: none; font: 600 11px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
  #tl { top: 18px; left: 20px; } #tr { top: 18px; right: 20px; text-align: right; }
  #bar { position: fixed; left: 20px; right: 20px; bottom: 16px; height: 2px; background: #ffffff1a; } #bar i { display: block; height: 100%; width: 0; background: var(--hot); }
  nav { position: fixed; right: 20px; bottom: 34px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
  nav button { all: unset; cursor: pointer; font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; padding: 2px 0; }
  nav button.on { color: var(--hot); } nav button:hover { color: var(--ink); }
  .sec { position: fixed; left: 6vw; bottom: 14vh; max-width: min(520px, 88vw); opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; pointer-events: none; }
  .sec.on { opacity: 1; transform: none; pointer-events: auto; }
  .sec::before { content: ""; position: absolute; inset: -60px -80px -60px -40vw; background: radial-gradient(ellipse at 30% 60%, #05070ae6 30%, #05070a00 70%); z-index: -1; }
  .sec h2 { font-size: clamp(30px, 5vw, 58px); line-height: 1; letter-spacing: -.01em; margin-bottom: 12px; }
  .sec p { color: #c6ccd5; max-width: 44ch; } .sec a { color: var(--hot); }
  .tag { font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .2em; color: var(--hot); margin-bottom: 10px; display: block; }
  #logo { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); text-align: center; max-width: none; } #logo.on { transform: translate(-50%, -50%); }
  #logo::before { inset: -80px -120px; background: radial-gradient(ellipse, #05070acc 30%, #05070a00 70%); }
  #logo .ds { font-size: clamp(90px, 18vw, 220px); font-weight: 900; line-height: .85; letter-spacing: -.04em; }
  #logo .dl { font-size: clamp(16px, 2.4vw, 26px); font-weight: 600; letter-spacing: .5em; margin-left: .5em; color: #cfd5de; }
  #logo .hint { margin-top: 26px; font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .2em; color: var(--dim); }
  .credits { margin-top: 14px; font: 11px/1.5 ui-monospace, Menlo, monospace; color: var(--dim); }
  #load { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); }
  @media (max-width: 640px) { nav { display: none; } .sec { left: 16px; right: 16px; bottom: 10vh; } }

/* game controls + sound (2026-11-16) */
#music, #flybtn { position: fixed; left: 20px; bottom: 30px; z-index: 5; font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); background: #0b0f16cc; border: 1px solid #ffffff22; padding: 8px 12px; cursor: pointer; }
#flybtn { bottom: 70px; display: none; } #flybtn.on { color: var(--hot); border-color: var(--hot); }
#music:focus-visible, #flybtn:focus-visible { outline: 2px solid var(--hot); }
#keys { bottom: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
#flypad { position: fixed; inset: 0; z-index: 4; touch-action: none; }
#flypad .ring { position: fixed; width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 2px solid #ffffff44; border-radius: 50%; display: none; }
#flypad .ring.on { display: block; }
#flypad .ring i { position: absolute; left: 40px; top: 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--hot); }
#flypad .thr { position: fixed; right: 20px; bottom: 90px; width: 120px; padding: 30px 0; text-align: center; border: 2px solid #ffffff33; color: var(--dim); font: 600 11px ui-monospace, Menlo, monospace; }
@media (hover: none), (max-width: 640px) { #flybtn { display: block; } #keys { display: none; } }
#crash { top: 40%; left: 50%; transform: translateX(-50%); color: #ff5a5a; font-size: 16px; }

#logo.gone { opacity: 0 !important; pointer-events: none; transition: opacity .8s; }

#crafts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 6; flex-wrap: wrap; justify-content: center; max-width: 70vw; }
#crafts button { font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); background: #0b0f16cc; border: 1px solid #ffffff22; padding: 6px 10px; cursor: pointer; }
#crafts button.on { color: var(--hot); border-color: var(--hot); }
#credit { bottom: 4px; left: 20px; font-size: 9px; text-transform: none; letter-spacing: .04em; }

#flyit { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 6; font: 700 13px ui-monospace, Menlo, monospace; letter-spacing: .12em; color: #1b1600; background: var(--hot); border: 0; padding: 12px 16px; cursor: pointer; }
#hudGame { top: 120px; right: 20px; text-align: right; }
#radar i { display: inline-block; width: 120px; height: 6px; background: #ffffff22; vertical-align: middle; margin: 0 6px; }
#radar b { display: block; height: 100%; width: 0; background: #3ccf8e; }
#radarState { color: var(--ink); }
#boost { margin-top: 6px; color: var(--hot); font-size: 14px; }
body.playing .sec, body.playing #nav { display: none; }

/* v7 (Theo 2026-11-16): sci-fi movie lettering. Orbitron (SIL OFL) with a neon glow */
@font-face { font-family: Orbitron; src: url(assets/fonts/Orbitron.ttf); font-weight: 400 900; font-display: swap; }
:root { --neon: #3fe6ff; --neon2: #ff3ad9; }
#logo .ds { font-family: Orbitron, sans-serif; letter-spacing: .02em; text-shadow: 0 0 18px #3fe6ff88, 0 0 60px #ff3ad944; }
#logo .dl, .sec h2, .tag, #logo .hint { font-family: Orbitron, sans-serif; }
#logo .dl { color: var(--neon); text-shadow: 0 0 12px #3fe6ffaa; }
#logo .tagline { margin-top: 18px; font: 500 clamp(11px, 1.4vw, 15px) Orbitron, sans-serif; letter-spacing: .42em; text-transform: uppercase; color: #e9e4ff; text-shadow: 0 0 10px #ff3ad9aa; }
#logo .tagline i { font-style: normal; color: var(--neon2); margin: 0 .3em; }
.sec h2 { font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: clamp(24px, 3.8vw, 46px); text-shadow: 0 0 16px #3fe6ff55; }
.tag { color: var(--neon); }

/* v8: BOGEY warning (enemy.js) + Edit text panel (edit.js, this computer only) */
#bogey { top: 32%; left: 50%; transform: translateX(-50%); color: #ff4d4d; font: 700 15px Orbitron, sans-serif; letter-spacing: .3em; text-shadow: 0 0 12px #ff000088; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
#editbtn { position: fixed; left: 20px; top: 44px; z-index: 20; font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .1em; color: var(--ink); background: #0b0f16cc; border: 1px solid #ffffff33; padding: 6px 10px; cursor: pointer; }
#editpanel { position: fixed; left: 20px; top: 80px; bottom: 60px; width: min(440px, 90vw); z-index: 20; overflow: auto; background: #0b0f16f2; border: 1px solid #3fe6ff55; padding: 12px; font: 13px system-ui, sans-serif; color: var(--ink); }
#editpanel label { display: block; margin: 8px 0; } #editpanel label span { display: block; font: 600 10px ui-monospace, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--neon, #3fe6ff); margin-bottom: 3px; }
#editpanel textarea { width: 100%; background: #05070a; color: var(--ink); border: 1px solid #ffffff22; font: 13px/1.4 system-ui, sans-serif; padding: 6px; resize: vertical; }
#editpanel .act { position: sticky; bottom: -12px; background: #0b0f16; padding: 8px 0; display: flex; gap: 8px; align-items: center; }
#editpanel .act button { font: 700 12px system-ui; padding: 6px 14px; cursor: pointer; border: 0; background: var(--hot); color: #111; } #editpanel .act button[data-a=close] { background: #333; color: #eee; }
#editpanel .msg { font-size: 12px; color: var(--dim); }

/* v11 (Theo 2026-11-18): one movie. Sections roll in like film credits (HAIC Studio Titles "Credits block" look: small spaced role
   line over a big name, lines fading in one after another), 2.39 letterbox bars + vignette during the scroll intro, radio subtitles. */
#bars, #vig { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
#bars i { position: absolute; left: 0; right: 0; height: calc((100vh - 100vw / 2.39) / 2); min-height: 0; background: #000; transition: height 1.2s cubic-bezier(.6,0,.2,1); }
#bars i:first-child { top: 0; } #bars i:last-child { bottom: 0; }
#vig { background: radial-gradient(ellipse at center, #0000 55%, #000a 100%); transition: opacity 1.2s; }
body.playing #bars i { height: 0; } body.playing #vig { opacity: .35; }
body.intro #tl, body.intro #tr, body.intro #keys { opacity: 0; }
body.intro #bar { bottom: calc((100vh - 100vw / 2.39) / 2 - 1px); left: 0; right: 0; height: 1px; z-index: 4; }
body.intro #music { bottom: max(10px, calc((100vh - 100vw / 2.39) / 4 - 16px)); }
body.intro nav { left: 50%; right: auto; transform: translateX(-50%); bottom: max(10px, calc((100vh - 100vw / 2.39) / 4 - 10px)); flex-direction: row; gap: 22px; z-index: 4; }
body.intro #music { z-index: 4; }

.sec:not(#logo) { left: 50%; right: auto; bottom: calc((100vh - 100vw / 2.39) / 2 + 9vh); transform: translate(-50%, 10px); text-align: center; max-width: min(760px, 90vw); filter: blur(8px);
  transition: opacity 1.1s ease, transform 2.2s cubic-bezier(.2,.7,.2,1), filter 1.1s ease; z-index: 4; }
.sec:not(#logo).on { transform: translate(-50%, 0); filter: none; }
.sec:not(#logo)::before { inset: -70px -160px; background: radial-gradient(ellipse at center, #000c 25%, #0000 70%); }
.sec .tag { font: 500 12px/1 Orbitron, sans-serif; letter-spacing: .5em; color: #9aa3ad; margin-bottom: 14px; transition: letter-spacing 3s ease; }
.sec.on .tag { letter-spacing: .38em; }
.sec h2 { margin-bottom: 14px; }
.sec:not(#logo) > * { opacity: 0; transition: opacity .9s ease; }
.sec:not(#logo).on > * { opacity: 1; } .sec.on > :nth-child(2) { transition-delay: .35s; } .sec.on > :nth-child(3) { transition-delay: .7s; } .sec.on > :nth-child(4) { transition-delay: 1.05s; }
.sec p { margin: 0 auto; letter-spacing: .04em; }
.sec .credits { max-width: 80ch; }
#logo { z-index: 4; }
#flyit { top: auto; bottom: max(10px, calc((100vh - 100vw / 2.39) / 4 - 16px)); transform: none; background: #0000; color: var(--hot); border: 1px solid var(--hot); font: 600 11px Orbitron, sans-serif; letter-spacing: .25em; padding: 10px 14px; }
#flyit:hover { background: var(--hot); color: #111; }

/* radio subtitle: callsign + words, like a film subtitle with a radio tint */
#radio { position: fixed; left: 50%; top: calc((100vh - 100vw / 2.39) / 2 + 22px); transform: translate(-50%, -6px); z-index: 7; pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s;
  max-width: min(720px, 90vw); text-align: center; font: 500 15px/1.45 ui-monospace, Menlo, monospace; color: #e6fff0; text-shadow: 0 1px 3px #000, 0 0 12px #000; }
body.playing #radio { top: 70px; }
#radio.on { opacity: 1; transform: translate(-50%, 0); }
#radio b { display: block; font: 700 10px Orbitron, sans-serif; letter-spacing: .4em; color: #5dffa0; margin-bottom: 4px; }
#radio b::before { content: "◉ "; color: #ff4d4d; animation: blink .8s steps(2) infinite; }
@media (max-width: 640px) { #radio { font-size: 13px; } .sec:not(#logo) { bottom: 16vh; } }
#radiobtn { position: fixed; left: 130px; top: 44px; z-index: 20; font: 600 11px ui-monospace, Menlo, monospace; letter-spacing: .1em; color: #5dffa0; background: #0b0f16cc; border: 1px solid #5dffa055; padding: 6px 10px; text-decoration: none; }
/* v12 dogfight */
#dfhelp { top: 166px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #cfd8e0; white-space: nowrap; }
#dfpad { position: fixed; right: 16px; bottom: 200px; z-index: 6; display: none; flex-direction: column; gap: 10px; }
#dfpad.on { display: flex; } #dfpad button { width: 74px; height: 74px; border-radius: 50%; border: 2px solid #ff4d4d; background: #2a0b0bcc; color: #fff; font: 800 13px Orbitron, sans-serif; touch-action: none; }
@media (max-width: 640px) { #dfhelp { display: none; } }
