:root {
  --ink: #03143e;
  --navy: #061d58;
  --blue: #0757be;
  --electric: #18b9ff;
  --red: #e22338;
  --scarlet: #ff324b;
  --gold: #ffc83d;
  --cream: #fff6dc;
  --white: #fffdfa;
  --black: #020611;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body { margin: 0; color: var(--white); background: var(--black); font-family: var(--body); overflow-x: hidden; cursor: none; }
button, a, input { font: inherit; }
button, a { cursor: none; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }

.boot { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; gap: 18px; text-align: center; background: var(--ink); transition: transform .9s cubic-bezier(.76,0,.24,1); }
.boot.done { transform: translateY(-110%); }
.boot-mark { font: 7rem/.8 var(--display); color: var(--gold); -webkit-text-stroke: 4px var(--red); filter: drop-shadow(10px 12px 0 #000); transform: rotate(-4deg); }
.boot p { margin: 0; font-size: .72rem; font-weight: 900; letter-spacing: .35em; }
.boot-line { width: 280px; height: 4px; background: #163678; overflow: hidden; }
.boot-line i { display: block; width: 100%; height: 100%; background: var(--red); transform-origin: left; animation: boot 1.35s cubic-bezier(.65,0,.35,1) both; }
@keyframes boot { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; border-radius: 50%; mix-blend-mode: difference; }
.cursor-dot { width: 8px; height: 8px; background: white; margin: -4px; }
.cursor-ring { width: 34px; height: 34px; border: 1px solid white; margin: -17px; transition: width .2s, height .2s, margin .2s, background .2s; }
.cursor-ring.hover { width: 54px; height: 54px; margin: -27px; background: rgba(255,255,255,.12); }
.noise { position: fixed; inset: -50%; z-index: 900; opacity: .045; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); animation: noise .25s steps(2) infinite; }
@keyframes noise { 0% { transform: translate(2%, -2%); } 50% { transform: translate(-1%, 2%); } 100% { transform: translate(1%, 1%); } }

.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 78px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(2,6,17,.82), rgba(2,6,17,.18)); backdrop-filter: blur(15px); }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 1.1rem var(--display); letter-spacing: .09em; }
.brand-shield { width: 46px; height: 40px; display: grid; place-items: center; color: var(--gold); background: var(--red); clip-path: polygon(8% 0,92% 0,100% 50%,50% 100%,0 50%); -webkit-text-stroke: 1px var(--ink); }
.topbar nav { display: flex; gap: clamp(16px,3vw,48px); font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.topbar nav a { position: relative; padding: 12px 0; }
.topbar nav a::after { content:""; position: absolute; left: 0; bottom: 4px; width: 100%; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s; }
.topbar nav a:hover::after { transform: scaleX(1); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-link { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); font-weight: 900; }

.btn { min-height: 52px; padding: 0 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.4); border-radius: 2px; background: transparent; color: white; font-size: .78rem; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translate(-3px,-3px); box-shadow: 6px 6px 0 var(--gold); }
.btn-small { min-height: 42px; padding: 0 18px; background: var(--red); border-color: var(--red); }
.btn-primary { background: var(--red); border-color: var(--red); }
.btn-ghost { backdrop-filter: blur(10px); }

.scene-rail { position: fixed; z-index: 80; right: 22px; top: 50%; transform: translateY(-50%); display: grid; gap: 14px; }
.scene-dot { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: white; font-size: .55rem; font-weight: 900; }
.scene-dot::before { content:""; position: absolute; width: 8px; height: 8px; margin: 10px; border: 1px solid white; transform: rotate(45deg); transition: .25s; }
.scene-dot span { position: relative; opacity: 0; transition: opacity .25s; }
.scene-dot:hover span, .scene-dot.active span { opacity: 1; }
.scene-dot.active::before { width: 26px; height: 26px; margin: 1px; border-color: var(--gold); background: var(--red); }

.scene { position: relative; min-height: 100vh; overflow: hidden; }
.hero { min-height: 940px; display: grid; grid-template-columns: 1fr minmax(360px, .82fr); align-items: center; padding: 120px 8vw 80px; isolation: isolate; background: var(--ink); }
.world-layer { position: absolute; inset: -4%; z-index: -3; background: linear-gradient(90deg, rgba(2,13,48,.85) 0%, rgba(2,13,48,.4) 42%, rgba(2,13,48,.05) 70%), url("assets/ape-night-world.png") center/cover no-repeat; transform: scale(1.07); }
.hero::after { content:""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 70% 50%, transparent 0 20%, rgba(1,7,28,.38) 60%, rgba(1,7,28,.78)), linear-gradient(180deg, transparent 70%, var(--black)); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; max-width: 720px; }
.eyebrow, .section-kicker { font-size: .72rem; font-weight: 950; letter-spacing: .3em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 32px; height: 3px; background: var(--red); }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 900; letter-spacing: -.035em; text-transform: uppercase; }
h1 { font-size: clamp(6.2rem, 13vw, 13.5rem); line-height: .68; transform: skewY(-3deg); text-shadow: 8px 8px 0 rgba(1,4,16,.7); }
h1 em, h2 em { color: var(--red); font-style: normal; -webkit-text-stroke: 2px var(--cream); }
.hero-line { max-width: 520px; margin: 38px 0 28px; font-size: clamp(1.05rem,1.5vw,1.35rem); line-height: 1.5; font-weight: 600; text-wrap: balance; }
.hero-actions { display: flex; align-items: center; gap: 22px; }
.round-action { width: 94px; height: 94px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(1,9,40,.35); display: grid; grid-template-columns: 1fr 1fr; place-items: center; backdrop-filter: blur(8px); transform: rotate(-7deg); transition: .3s; }
.round-action:hover { transform: rotate(5deg) scale(1.08); background: var(--gold); color: var(--ink); }
.round-action span { font-size: 2rem; }
.round-action small { font-size: .56rem; font-weight: 950; line-height: 1.2; text-align: left; }
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.status-strip span { padding: 8px 10px; border-left: 2px solid var(--gold); background: rgba(2,8,30,.55); font-size: .62rem; letter-spacing: .1em; }
.status-strip b { color: var(--gold); margin-right: 5px; }

.portrait-wrap { position: relative; z-index: 1; width: min(39vw, 570px); justify-self: end; border: 3px solid rgba(255,255,255,.7); box-shadow: 18px 22px 0 rgba(226,35,56,.75), 0 30px 90px rgba(0,0,0,.55); transform: rotate(2deg); transform-style: preserve-3d; }
.portrait-wrap img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.portrait-halo { position: absolute; z-index: -1; width: 112%; aspect-ratio: 1; left: -6%; top: -6%; border: 1px solid rgba(255,200,61,.6); border-radius: 50%; animation: halo 8s linear infinite; }
.portrait-halo::before, .portrait-halo::after { content:""; position: absolute; inset: 7%; border: 1px dashed rgba(24,185,255,.5); border-radius: 50%; }
.portrait-halo::after { inset: -6%; border-color: rgba(255,255,255,.2); }
@keyframes halo { to { transform: rotate(360deg); } }
.portrait-label { position: absolute; left: -32px; top: 34px; padding: 10px 14px; background: var(--gold); color: var(--ink); font: .74rem/1.2 var(--display); letter-spacing: .13em; transform: translateZ(30px) rotate(-7deg); }
.sound-tag { position: absolute; right: -35px; bottom: 24px; padding: 10px 14px; background: var(--blue); font: .68rem/1.3 var(--display); letter-spacing: .1em; transform: translateZ(34px) rotate(4deg); }

.relic-game { position: absolute; z-index: 4; left: 4vw; bottom: 25px; width: 230px; padding: 14px; background: rgba(1,8,31,.72); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(12px); }
.relic-game p { display: flex; justify-content: space-between; margin: 0 0 8px; font-size: .65rem; letter-spacing: .12em; }
.relic-game small { display: block; margin-top: 8px; opacity: .7; font-size: .65rem; }
.relic-meter { height: 3px; background: #203566; }
.relic-meter i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .35s; }
.hotspot { position: absolute; z-index: 4; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(24,185,255,.18); box-shadow: 0 0 20px var(--electric); }
.hotspot i { position: absolute; inset: 8px; border-radius: 50%; background: white; animation: pulse 1.2s ease-in-out infinite; }
.hotspot.found { border-color: var(--gold); background: var(--gold); box-shadow: none; }
.hotspot.found i { background: var(--red); animation: none; }
@keyframes pulse { 50% { transform: scale(.35); opacity: .4; } }
.hotspot.phone { left: 20%; top: 25%; }
.hotspot.cross { left: 11%; top: 37%; }
.hotspot.beanie { right: 9%; top: 17%; }
.hotspot.headphones { left: 18%; bottom: 20%; }
.hotspot.cassette { right: 23%; bottom: 13%; }
.relic-toast { position: absolute; z-index: 8; left: 50%; top: 93px; transform: translate(-50%,-30px); max-width: 460px; padding: 14px 20px; background: var(--gold); color: var(--ink); font-weight: 800; opacity: 0; pointer-events: none; transition: .35s; }
.relic-toast.show { transform: translate(-50%,0); opacity: 1; }
.scroll-cue { position: absolute; z-index: 6; right: 4vw; bottom: 25px; display: flex; gap: 14px; align-items: center; border: 0; background: none; font-size: .6rem; font-weight: 900; letter-spacing: .18em; }
.scroll-cue i { width: 64px; height: 1px; background: white; position: relative; }
.scroll-cue i::after { content:""; position: absolute; right: 0; top: -3px; border: 4px solid transparent; border-left-color: white; }

.ticker { overflow: hidden; background: var(--gold); color: var(--ink); border-block: 4px solid var(--ink); transform: rotate(-1deg) scale(1.02); }
.ticker div { width: max-content; padding: 14px 0; font: 1rem var(--display); letter-spacing: .12em; animation: ticker 24s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }

.origin { padding: 120px 8vw; background: linear-gradient(135deg, #f8efd2 0%, #fffefa 48%, #eeddae 100%); color: var(--ink); }
.section-kicker { color: var(--red); margin-bottom: 38px; }
.origin-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 7vw; align-items: start; }
.origin-title > p { font-size: .7rem; font-weight: 950; letter-spacing: .22em; }
.origin h2, .lab h2, .skyloop h2, .finale h2 { font-size: clamp(4rem, 8vw, 9rem); line-height: .82; }
.origin h2 em { -webkit-text-stroke-color: var(--ink); }
.story-console { position: relative; margin-top: 20px; border-top: 8px solid var(--ink); border-bottom: 2px solid var(--ink); }
.chapter-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid rgba(3,20,62,.3); }
.chapter-tabs button { flex: 1; min-width: 110px; padding: 17px 10px; border: 0; border-right: 1px solid rgba(3,20,62,.25); background: transparent; color: var(--ink); font-size: .68rem; font-weight: 950; letter-spacing: .1em; }
.chapter-tabs button.active { background: var(--ink); color: white; }
.chapter { min-height: 405px; padding: 42px 7%; }
.chapter > span { float: left; margin-right: 22px; font: 5rem/.8 var(--display); color: var(--red); }
.chapter h3 { margin: 0 0 25px; font: clamp(2rem,3vw,3.5rem)/.9 var(--display); text-transform: uppercase; }
.chapter p { margin: 0 0 16px; font-size: 1.05rem; line-height: 1.75; }
.chapter-controls { display: grid; grid-template-columns: 44px 1fr 44px; gap: 15px; align-items: center; padding: 18px 7%; border-top: 1px solid rgba(3,20,62,.3); }
.chapter-controls button, .mission-nav button { width: 44px; height: 44px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.chapter-controls > span { height: 3px; background: rgba(3,20,62,.2); }
.chapter-controls i { display: block; width: 25%; height: 100%; background: var(--red); transition: width .35s; }
.quote-band { margin-top: 100px; padding: 60px 7vw; position: relative; background: var(--blue); color: white; transform: rotate(1deg); box-shadow: 16px 16px 0 var(--red); }
.quote-band::before { content:'“'; position: absolute; left: 2vw; top: 0; color: var(--gold); font: 7rem/1 var(--display); }
.quote-band p { margin: 0; font: clamp(2.5rem,5vw,6rem)/.95 var(--display); text-transform: uppercase; text-wrap: balance; }
.quote-band span { display: block; margin-top: 24px; font-size: .7rem; letter-spacing: .18em; }

.lab { padding: 120px 8vw; background: radial-gradient(circle at 50% 30%, #0f4599, var(--ink) 55%, #010611); }
.lab::before { content:""; position: absolute; inset: 0; opacity: .16; background: linear-gradient(90deg, transparent 49.8%, white 50%, transparent 50.2%), linear-gradient(0deg, transparent 49.8%, white 50%, transparent 50.2%); background-size: 80px 80px; pointer-events: none; }
.lab-head { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 8vw; align-items: end; }
.lab-head h2 em, .skyloop h2 em, .finale h2 em { -webkit-text-stroke-color: white; }
.lab-head > p { max-width: 430px; font-size: 1.05rem; line-height: 1.7; }
.radio-deck { position: relative; margin: 70px auto 0; max-width: 1040px; min-height: 380px; padding: 36px; display: grid; grid-template-columns: .58fr 1.4fr .4fr; gap: 30px; align-items: center; background: linear-gradient(145deg, #203a63, #071631); border: 4px solid #5c7398; border-radius: 18px; box-shadow: 0 35px 80px rgba(0,0,0,.5), inset 0 0 0 3px #020916; transform-style: preserve-3d; }
.radio-deck::after { content:"SUPER APE SIGNAL DEVICE · 2026"; position: absolute; bottom: 10px; left: 36px; font-size: .58rem; letter-spacing: .17em; color: #9caccc; }
.speaker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 22px; aspect-ratio: 1; align-content: center; border-radius: 50%; background: #020713; border: 5px solid #425577; }
.speaker i { aspect-ratio: 1; border-radius: 50%; background: #182b4c; box-shadow: inset 0 0 9px black; }
.radio-screen { padding: 24px; background: #03102e; border: 2px solid #4f658a; box-shadow: inset 0 0 24px #000; }
.freq-line { display: flex; justify-content: space-between; color: #6f89b8; font-size: .57rem; }
.wave { height: 60px; margin: 16px 0; background: repeating-linear-gradient(90deg, transparent 0 8px, var(--electric) 9px 11px); mask-image: linear-gradient(180deg, transparent 0%, black 20% 80%, transparent 100%); clip-path: polygon(0 48%,8% 38%,16% 60%,23% 20%,30% 72%,38% 42%,46% 52%,54% 12%,62% 80%,70% 48%,78% 58%,86% 28%,94% 70%,100% 48%,100% 54%,94% 76%,86% 34%,78% 64%,70% 54%,62% 86%,54% 18%,46% 58%,38% 48%,30% 78%,23% 26%,16% 66%,8% 44%,0 54%); transition: filter .2s; }
.radio-screen strong { display: block; color: var(--gold); font: 4.4rem/.9 var(--display); letter-spacing: .04em; }
.radio-screen p { min-height: 52px; font-size: 1rem; color: #dceaff; }
.radio-screen input { width: 100%; accent-color: var(--red); }
.signal-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: .55rem; letter-spacing: .14em; color: #7f96be; }
.deck-controls { display: grid; gap: 28px; }
.dial { border: 0; background: transparent; font-size: .6rem; font-weight: 900; letter-spacing: .12em; }
.dial i { display: block; width: 72px; height: 72px; margin: 0 auto 10px; border: 8px solid #263d63; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8796ad, #111d32 45%, #020710 50%); box-shadow: 0 5px 0 #01040b; transition: transform .35s; }
.dial:hover i, .dial.active i { transform: rotate(130deg); }
.mission-drawer { position: relative; display: grid; grid-template-columns: 300px 1fr; gap: 38px; margin-top: 90px; }
.drawer-intro span { color: var(--gold); font-size: .65rem; font-weight: 900; letter-spacing: .2em; }
.drawer-intro h3 { margin: 18px 0 0; font: 2.8rem/.95 var(--display); text-transform: uppercase; }
.mission-track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 18px; scrollbar-color: var(--red) rgba(255,255,255,.15); cursor: grab; }
.mission-track.dragging { cursor: grabbing; }
.mission-track article { min-width: min(330px,80vw); padding: 30px; scroll-snap-align: start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); }
.mission-track article span { font: 3rem var(--display); color: var(--red); }
.mission-track article b { display: block; margin-top: 35px; font: 1.8rem/1 var(--display); text-transform: uppercase; }
.mission-track article p { color: #a9bce4; }

.skyloop { padding: 120px 8vw; min-height: 1180px; background: #020611; }
.skyloop::before { content:""; position: absolute; inset: 0; opacity: .3; background: url("assets/ape-night-world.png") center/cover fixed; filter: saturate(.8) brightness(.45); }
.skyloop::after { content:""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 58%, transparent, #020611 68%); pointer-events: none; }
.skyloop > * { position: relative; z-index: 2; }
.skyloop-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.skyloop-head p { width: min(360px,100%); line-height: 1.7; }
.orbit-stage { width: min(760px, 82vw); aspect-ratio: 1; margin: 40px auto; position: relative; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; touch-action: none; }
.orbit-lines, .orbit-lines i { position: absolute; inset: 0; border: 1px dashed rgba(24,185,255,.35); border-radius: 50%; animation: orbitspin 32s linear infinite; }
.orbit-lines i:nth-child(1) { inset: 13%; border-color: rgba(255,200,61,.35); animation-direction: reverse; }
.orbit-lines i:nth-child(2) { inset: 27%; border-style: solid; border-color: rgba(255,255,255,.14); }
.orbit-lines i:nth-child(3) { inset: 43%; border: 2px dotted var(--red); }
@keyframes orbitspin { to { transform: rotate(360deg); } }
.orbit-core { position: absolute; inset: 37%; z-index: 3; display: grid; place-content: center; text-align: center; border-radius: 50%; background: var(--red); box-shadow: 0 0 70px rgba(226,35,56,.6); }
.orbit-core span { font: 5rem/.8 var(--display); color: var(--gold); }
.orbit-core small { margin-top: 8px; font-size: .55rem; font-weight: 900; letter-spacing: .13em; }
.orbit-node { position: absolute; z-index: 4; width: 94px; height: 94px; padding: 0; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: #071a4d; color: white; box-shadow: 0 0 0 10px rgba(3,20,62,.7); transition: transform .3s, background .3s; }
.orbit-node:hover, .orbit-node.active { transform: scale(1.14); background: var(--gold); color: var(--ink); }
.orbit-node span { display: block; font: 1.6rem var(--display); }
.orbit-node b { font-size: .53rem; letter-spacing: .12em; }
.orbit-node.n0 { left: 50%; top: -4%; transform: translateX(-50%); }
.orbit-node.n0:hover, .orbit-node.n0.active { transform: translateX(-50%) scale(1.14); }
.orbit-node.n1 { right: -2%; top: 31%; }
.orbit-node.n2 { right: 16%; bottom: 1%; }
.orbit-node.n3 { left: 16%; bottom: 1%; }
.orbit-node.n4 { left: -2%; top: 31%; }
.mission-panel { max-width: 950px; margin: 0 auto; display: grid; grid-template-columns: 130px 1fr 110px; gap: 28px; align-items: center; padding: 25px 30px; border: 1px solid rgba(255,255,255,.2); background: rgba(3,20,62,.72); backdrop-filter: blur(15px); }
.mission-panel > span { color: var(--gold); font: 1rem var(--display); letter-spacing: .08em; }
.mission-panel h3 { margin: 0; font: 2.3rem var(--display); text-transform: uppercase; }
.mission-panel p { margin: 7px 0 0; color: #bdc9e5; line-height: 1.55; }
.mission-nav { display: flex; gap: 8px; }
.mission-nav button { color: white; border-color: rgba(255,255,255,.5); }

.finale { min-height: 850px; position: relative; padding: 100px 8vw; display: grid; grid-template-columns: 1fr .7fr; align-items: center; overflow: hidden; isolation: isolate; background: var(--ink); }
.finale-world { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(3,20,62,.95), rgba(3,20,62,.35)), url("assets/ape-night-world.png") center/cover no-repeat; }
.finale::after { content:""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg,#020611,transparent 50%); }
.finale-copy { position: relative; z-index: 2; }
.finale-copy > p { font-size: .7rem; font-weight: 900; letter-spacing: .3em; color: var(--gold); }
.finale-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 35px; }
.charge { position: relative; width: min(520px,100%); height: 62px; margin-top: 26px; padding: 0 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.5); background: rgba(2,6,17,.6); color: white; font-size: .66rem; font-weight: 950; letter-spacing: .15em; }
.charge span { position: relative; z-index: 2; }
.charge i { position: absolute; inset: 0; width: 0; background: var(--gold); }
.charge.charged { color: var(--ink); }
.final-portrait { width: min(470px,34vw); justify-self: end; transform: rotate(5deg); border: 5px solid var(--cream); box-shadow: 18px 18px 0 var(--red); }
.final-portrait img { display: block; width: 100%; }

footer { min-height: 130px; padding: 32px 4vw; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: var(--red); color: white; }
footer p { font-size: .65rem; font-weight: 900; letter-spacing: .18em; }
footer > div { display: flex; gap: 24px; font-size: .7rem; font-weight: 900; letter-spacing: .12em; }

.cape-trail { position: fixed; inset: 0; z-index: 500; pointer-events: none; overflow: hidden; }
.cape-shard { position: absolute; width: 18px; height: 9px; background: var(--red); clip-path: polygon(0 0,100% 40%,20% 100%); animation: fly 1.3s cubic-bezier(.15,.7,.2,1) forwards; }
@keyframes fly { to { transform: translate(var(--tx),var(--ty)) rotate(var(--rot)); opacity: 0; } }
.scan-mode { filter: saturate(.45) contrast(1.35) hue-rotate(170deg); }
.beat .wave { animation: beat .35s ease-in-out 5; }
@keyframes beat { 50% { transform: scaleY(.35); filter: hue-rotate(110deg); } }
.signal-flash { position: fixed; inset: 0; z-index: 700; pointer-events: none; background: var(--gold); animation: flash .8s forwards; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }

@media (max-width: 1000px) {
  body, button, a { cursor: auto; }
  .cursor-dot, .cursor-ring, .scene-rail { display: none; }
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-inline: 6vw; padding-top: 150px; }
  .hero-copy { z-index: 3; }
  h1 { font-size: clamp(6rem,20vw,11rem); }
  .portrait-wrap { width: min(78vw,520px); justify-self: center; margin-top: 60px; }
  .origin-grid { grid-template-columns: 1fr; }
  .lab-head { grid-template-columns: 1fr; }
  .radio-deck { grid-template-columns: 170px 1fr; }
  .deck-controls { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .mission-drawer { grid-template-columns: 1fr; }
  .finale { grid-template-columns: 1fr; }
  .final-portrait { width: min(70vw,430px); margin-top: 55px; justify-self: center; }
}

@media (max-width: 680px) {
  .topbar { height: 66px; padding-inline: 16px; }
  .brand > span:last-child, .top-actions .icon-link { display: none; }
  .hero { min-height: 1020px; padding: 110px 22px 80px; align-content: start; }
  h1 { font-size: clamp(5.3rem,28vw,8rem); margin-top: 32px; }
  .hero-line { font-size: 1rem; }
  .hero-actions { align-items: stretch; }
  .round-action { width: 74px; height: 74px; }
  .status-strip { display: none; }
  .portrait-wrap { width: 78vw; margin-top: 55px; }
  .portrait-label { left: -12px; }
  .sound-tag { right: -10px; }
  .relic-game { left: 18px; bottom: 20px; }
  .scroll-cue { display: none; }
  .hotspot.phone { left: 12%; top: 22%; }
  .hotspot.cross { left: 6%; top: 44%; }
  .origin, .lab, .skyloop { padding: 90px 22px; }
  .origin h2, .lab h2, .skyloop h2, .finale h2 { font-size: 4.2rem; }
  .chapter-tabs button { min-width: 50%; }
  .chapter { padding: 35px 4px; min-height: 540px; }
  .chapter > span { float: none; display: block; margin-bottom: 18px; }
  .quote-band { margin-top: 60px; padding: 50px 26px; }
  .radio-deck { grid-template-columns: 1fr; padding: 18px; }
  .speaker { width: 150px; margin: auto; }
  .radio-screen strong { font-size: 3.6rem; }
  .orbit-stage { width: 88vw; margin-left: -6vw; margin-block: 70px; }
  .orbit-node { width: 68px; height: 68px; }
  .orbit-core span { font-size: 3.2rem; }
  .mission-panel { grid-template-columns: 1fr; }
  .skyloop { min-height: 1050px; }
  .finale { padding: 90px 22px; }
  .finale-actions { display: grid; }
  .final-portrait { width: 74vw; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
