/*
  COSMOS 10 // Two-World 3D Edition Stylesheet (100% Complete & Uncut)
*/

:root {
    --bg-main: #0B0D17;
    --bg-deep: #04060e;
    --bg-card: rgba(13, 20, 44, 0.84);
    --border-glow: rgba(0, 243, 255, 0.32);
    --border-dim: rgba(255, 255, 255, 0.14);
    --text-main: #FFFFFF;
    --text-muted: #8b9bb4;
    --accent-1: #00F0FF;
    --cyan: #00f3ff;
    --cyan-glow: rgba(0, 243, 255, 0.45);
    --blue: #2575fc;
    --purple: #bc13fe;
    --purple-glow: rgba(188, 19, 254, 0.4);
    --accent-2: #FF9E5E;
    --accent-2-bg: #D98268;
    --alert-red: #FF2A54;
    --red: #ff3366;
    --red-glow: rgba(255, 51, 102, 0.4);
    --ok-green: #00FF88;
    --green: #00ff9d;
    --green-glow: rgba(0, 255, 157, 0.4);
    --neon-yellow: #D0FF00;
    --gold: #ffc400;
    --surf-1: #101424;
    --surf-2: #161C33;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-io: cubic-bezier(.86, 0, .07, 1);
    --edge-1: rgba(0, 240, 255, .28);
    --edge-2: rgba(255, 158, 94, .35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: 74px;
    transition: background 0.8s ease;
}

body.world-earth-mode { background: linear-gradient(180deg, #0d1326 0%, #1d152b 45%, #2b1825 100%); }
body.world-moon-mode  { background: radial-gradient(circle at 50% 15%, #0a1931 0%, #03060c 70%); }
.hidden { display: none !important; }

h1, h2, h3, h4, .syne { font-family: 'Syne', sans-serif; font-weight: 800; line-height: .95; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
.mono-label { font-size: .7rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-1); }

.step-badge {
    display: inline-block; background: var(--accent-1); color: var(--bg-main);
    font-weight: 700; font-size: .68rem; letter-spacing: .18em; padding: 4px 10px;
    text-transform: uppercase; margin-bottom: 8px;
}

.game-next-btn {
    display: inline-block; font-family: 'Syne', sans-serif; font-weight: 800; font-size: .9rem;
    letter-spacing: .06em; text-transform: uppercase; background: var(--ok-green); color: var(--bg-main);
    padding: 12px 26px; border: 2px solid var(--ok-green); cursor: pointer;
    transition: transform .25s var(--ease-out), background .25s;
}
.game-next-btn:hover { background: var(--neon-yellow); border-color: var(--neon-yellow); transform: scale(1.03); }

.sound-toggle-btn, .world-switch-btn {
    background: var(--surf-2); border: 1px solid var(--edge-1); color: var(--accent-1);
    font-family: 'JetBrains Mono', monospace; font-size: .64rem; font-weight: 700;
    padding: 6px 12px; cursor: pointer; text-transform: uppercase;
}
.world-switch-btn { background: var(--accent-2); color: var(--bg-main); border-color: var(--accent-2); }
.world-switch-btn.earth-back { background: rgba(0, 240, 255, 0.15); color: var(--accent-1); border-color: var(--accent-1); }

/* ---------- 3D LAUNCH CUTSCENE MODAL ---------- */
.launch-cutscene-backdrop {
    position: fixed; inset: 0; z-index: 300; background: #02040a;
    display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer;
}
#launchCutsceneCanvas { width: 100vw; height: 100vh; object-fit: cover; display: block; }
.cutscene-hud {
    position: absolute; bottom: 60px; text-align: center; background: rgba(11, 13, 23, 0.88);
    border: 2px solid var(--accent-1); padding: 18px 36px; box-shadow: 0 0 50px rgba(0, 240, 255, 0.4);
}
.cutscene-hud h2 { font-size: clamp(1.6rem, 4vw, 2.8rem); color: var(--neon-yellow); margin-top: 6px; }

/* ---------- Welcome Story Briefing Modal ---------- */
.story-modal-backdrop {
    position: fixed; inset: 0; z-index: 200; background: rgba(7, 9, 18, 0.92);
    backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.story-modal {
    max-width: 600px; width: 100%; background: var(--surf-1); border: 2px solid var(--accent-2);
    padding: 28px; text-align: center; box-shadow: 0 0 80px rgba(255, 158, 94, 0.3);
}
.story-hero-art { background: var(--bg-main); border: 1px solid var(--edge-2); margin-bottom: 16px; padding: 8px; }
.brief-svg { width: 100%; height: 105px; }
.story-modal h2 { font-size: 2.2rem; margin: 8px 0 10px; }
.story-modal h2 i { color: var(--accent-2); font-style: normal; }
.story-lead { font-size: .8rem; line-height: 1.55; opacity: .9; margin-bottom: 16px; }
.story-steps { display: flex; flex-direction: column; gap: 8px; text-align: left; margin-bottom: 20px; }
.s-step { display: flex; align-items: center; gap: 14px; background: var(--surf-2); border: 1px solid var(--edge-1); padding: 10px 14px; }
.s-num { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.s-step strong { display: block; font-size: .8rem; color: var(--neon-yellow); }
.s-step small { font-size: .7rem; opacity: .85; }
.start-game-btn { width: 100%; background: var(--accent-2) !important; color: var(--bg-main) !important; font-size: 1.05rem !important; }

/* ---------- Commander Nova Guide & Topbar ---------- */
.nova-guide {
    position: fixed; top: 56px; left: 50%; transform: translateX(-50%); z-index: 65;
    background: rgba(16, 20, 36, 0.94); border: 1px solid var(--accent-1); border-left: 4px solid var(--neon-yellow);
    padding: 7px 16px; display: flex; align-items: center; gap: 12px; max-width: 780px; width: 92vw;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.nova-avatar { font-size: 1.6rem; line-height: 1; }
.nova-name { font-size: .56rem; letter-spacing: .2em; color: var(--neon-yellow); display: block; }
.nova-text p { font-size: .74rem; color: var(--text-main); }

.topbar {
    position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; align-items: center; justify-content: space-between;
    padding: 12px clamp(18px, 4vw, 46px); background: rgba(11, 13, 23, 0.9); backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--text-main); }
.brand span { color: var(--accent-1); }
.brand b { color: var(--accent-2); font-size: 0.85rem; }
.nav-index { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-index a { font-size: .64rem; letter-spacing: .15em; text-transform: uppercase; padding: 6px 10px; }
.nav-index a:hover { background: var(--accent-1); color: var(--bg-main); }

/* ---------- Sticky Live Resource Dashboard ---------- */
.live-dashboard {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: rgba(11, 13, 23, 0.96);
    border-top: 2px solid var(--edge-1); backdrop-filter: blur(10px); display: grid;
    grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 10px clamp(18px, 4vw, 46px);
}
.dash-item { display: flex; flex-direction: column; border-left: 3px solid var(--ok-green); padding-left: 10px; }
.dash-item.is-warning { border-left-color: var(--alert-red); background: rgba(255, 42, 84, 0.14); }
.dash-item.is-warning .dash-val { color: var(--alert-red); }
.dash-label { font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.dash-val { font-family: 'Syne', sans-serif; font-size: .88rem; font-weight: 800; color: var(--ok-green); margin-top: 2px; }
@media (max-width: 900px) { .live-dashboard { grid-template-columns: repeat(3, 1fr); } }

.orbit-toast-wrap { position: fixed; top: 115px; right: clamp(18px, 4vw, 46px); z-index: 85; display: flex; flex-direction: column; gap: 10px; max-width: 380px; pointer-events: none; }
.orbit-toast { background: rgba(25, 12, 22, 0.96); border: 1px solid var(--alert-red); border-left: 5px solid var(--alert-red); color: var(--text-main); padding: 12px 16px; font-size: .74rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .65); }

/* =========================================================
   🌍 WORLD 1: CAPE CANAVERAL SUNSET HERO & HANGAR
   ========================================================= */
.earth-sunset-hero {
    position: relative; height: 100vh; min-height: 700px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; user-select: none;
    background: radial-gradient(circle at 50% 95%, rgba(255, 115, 55, 0.42) 0%, rgba(168, 50, 121, 0.22) 40%, transparent 75%),
                linear-gradient(180deg, #090d1e 0%, #1c1433 55%, #3d1c2e 85%, #6b292b 100%);
}
.earth-horizon-glow { position: absolute; bottom: 0; left: 0; right: 0; height: 90px; background: linear-gradient(0deg, rgba(255, 140, 66, 0.35), transparent); pointer-events: none; }
.ksc-searchlight { position: absolute; bottom: -20px; width: 120px; height: 85vh; background: linear-gradient(0deg, rgba(255, 220, 160, 0.22) 0%, transparent 90%); transform-origin: bottom center; pointer-events: none; z-index: 1; }
.beam-left  { left: 18%; animation: sweepLeft 7s ease-in-out infinite alternate; }
.beam-right { right: 18%; animation: sweepRight 8s ease-in-out infinite alternate; }
@keyframes sweepLeft  { from { transform: rotate(-22deg); } to { transform: rotate(18deg); } }
@keyframes sweepRight { from { transform: rotate(20deg); } to { transform: rotate(-18deg); } }

.slingshot-targets { position: absolute; top: 118px; left: clamp(18px, 4vw, 46px); right: clamp(18px, 4vw, 46px); z-index: 4; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.target-zone { background: rgba(20, 16, 36, 0.88); border: 2px dashed rgba(255, 158, 94, 0.45); padding: 12px 14px; text-align: center; cursor: pointer; border-radius: 8px; transition: transform .25s, border-color .25s, background .25s; }
.target-zone:hover { border-color: var(--accent-2); transform: translateY(-3px); }
.target-zone.is-selected { border: 2px solid var(--neon-yellow); background: rgba(208, 255, 0, 0.15); box-shadow: 0 0 25px rgba(208, 255, 0, 0.3); }
.tz-badge { font-size: .6rem; letter-spacing: .16em; display: block; margin-bottom: 3px; }
.target-zone strong { font-family: 'Syne', sans-serif; font-size: 1.05rem; display: block; margin-bottom: 3px; }
.target-zone small { font-size: .68rem; color: var(--accent-2); }

.hero-title { font-size: clamp(2.8rem, 14vw, 11rem); text-align: center; color: var(--text-main); position: relative; z-index: 2; opacity: 0.2; pointer-events: none; }
.hero-title b { color: var(--accent-2); }
.string-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; cursor: grab; }
.string-path { fill: none; stroke: var(--accent-2); stroke-width: 4; filter: drop-shadow(0 0 12px rgba(255, 158, 94, .85)); }
.string-anchor { fill: var(--accent-2); }
.string-grip { fill: var(--neon-yellow); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 12px var(--neon-yellow)); }
.slingshot-probe { fill: #00F0FF; filter: drop-shadow(0 0 14px #00F0FF); }

.slingshot-Bottom-cta { position: absolute; bottom: 54px; left: clamp(18px, 4vw, 46px); right: clamp(18px, 4vw, 46px); z-index: 4; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.slingshot-Bottom-cta a { pointer-events: auto; }
.sling-instruction { background: rgba(11, 13, 23, 0.88); border: 1px solid var(--edge-2); padding: 7px 16px; font-size: .75rem; color: var(--neon-yellow); }
.hero-foot { position: absolute; left: clamp(18px, 4vw, 46px); bottom: 18px; z-index: 4; pointer-events: none; }
.hero-hint { position: absolute; right: clamp(18px, 4vw, 46px); bottom: 18px; z-index: 4; font-size: .64rem; letter-spacing: .2em; color: var(--accent-2); pointer-events: none; }

/* Stage 2 Earth Hangar */
.earth-hangar-section { padding: clamp(60px, 8vh, 100px) clamp(18px, 4vw, 46px); max-width: 1580px; margin: 0 auto; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.section-head h2 i { color: var(--accent-2); font-style: normal; }
.section-head p { font-size: .78rem; line-height: 1.5; opacity: .88; max-width: 50ch; }

.hangar-workspace { display: grid; grid-template-columns: 400px 1fr; gap: 28px; align-items: start; }
@media (max-width: 1060px) { .hangar-workspace { grid-template-columns: 1fr; } }
.hangar-left { position: sticky; top: 112px; }
.hangar-bay-card { background: rgba(20, 18, 36, 0.92); border: 2px solid var(--accent-2); border-radius: 10px; padding: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6); }
.hangar-bay-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ship-callsign-tag { background: var(--neon-yellow); color: var(--bg-main); font-family: 'Syne', sans-serif; font-weight: 800; font-size: .72rem; padding: 3px 8px; }

.earth-pad-stage { background: linear-gradient(180deg, #11162b 0%, #2b192e 65%, #4a2328 100%); border: 1px solid var(--edge-2); height: 330px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.cryo-steam { position: absolute; bottom: 8px; width: 90px; height: 55px; background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, transparent 70%); border-radius: 50%; pointer-events: none; animation: steamRise 3.2s infinite ease-out; }
.cryo-steam.s1 { left: 18%; animation-delay: 0s; }
.cryo-steam.s2 { left: 42%; animation-delay: 1.1s; }
.cryo-steam.s3 { left: 60%; animation-delay: 2.1s; }
@keyframes steamRise { 0% { transform: translateY(10px) scale(0.7); opacity: 0.7; } 100% { transform: translateY(-55px) scale(1.6); opacity: 0; } }

.live-ship-svg { width: 100%; height: 100%; position: relative; z-index: 2; transition: transform .35s var(--ease-out); }
.live-ship-svg.snap-bounce { transform: scale(1.06); }
.customizer-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--bg-main); border: 1px solid var(--edge-2); padding: 8px 12px; margin-top: 10px; }
.paint-picker { display: flex; align-items: center; gap: 6px; }
.cust-label { font-size: .6rem; color: var(--accent-2); }
.paint-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); cursor: pointer; }
.paint-swatch.is-active { border-color: var(--neon-yellow); transform: scale(1.2); }
.ship-name-input { width: 120px; background: var(--surf-2); border: 1px solid var(--edge-2); color: var(--neon-yellow); font-family: 'JetBrains Mono', monospace; font-size: .72rem; font-weight: 700; padding: 5px 8px; text-transform: uppercase; outline: none; }

.telemetry-bars-box { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; background: var(--bg-main); padding: 12px; }
.t-bar-row { display: flex; flex-direction: column; gap: 3px; }
.t-bar-labels { display: flex; justify-content: space-between; font-size: .64rem; }
.t-bar-track { width: 100%; height: 8px; background: #1a2138; overflow: hidden; }
.t-bar-fill { height: 100%; background: var(--ok-green); transition: width .35s var(--ease-out); }
.t-bar-fill.is-bad { background: var(--alert-red); }
.checklist-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: .64rem; }
.chk-pill { padding: 4px 8px; border: 1px solid currentColor; font-weight: 700; }
.chk-pill.ok  { color: var(--ok-green); background: rgba(0, 255, 136, 0.1); }
.chk-pill.bad { color: var(--alert-red); background: rgba(255, 42, 84, 0.15); }

.hangar-right { display: flex; flex-direction: column; gap: 20px; }
.part-category-group { background: rgba(18, 18, 34, 0.85); border: 1px solid var(--edge-2); border-radius: 10px; padding: 18px; }
.cat-group-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cat-step-num { font-size: .6rem; letter-spacing: .18em; color: var(--bg-main); background: var(--accent-2); padding: 3px 8px; font-weight: 700; }
.cat-group-header h3 { font-size: 1.25rem; }

.photo-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; perspective: 900px; }
.photo-cards-grid.two-col-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .photo-cards-grid, .photo-cards-grid.two-col-grid { grid-template-columns: 1fr; } }

.photo-part-card {
    background: var(--bg-main); border: 2px solid rgba(255, 158, 94, 0.28); border-radius: 8px;
    display: flex; flex-direction: column; cursor: pointer; position: relative; overflow: hidden;
    transform-style: preserve-3d; transition: transform .18s ease-out, border-color .25s, box-shadow .25s;
}
.photo-part-card:hover { border-color: var(--accent-2); box-shadow: 0 12px 30px rgba(255, 158, 94, 0.25); }
.photo-part-card.is-equipped { border-color: var(--ok-green); box-shadow: 0 0 25px rgba(0, 255, 136, 0.25); }
.part-img-wrap { position: relative; height: 130px; background: radial-gradient(circle at 50% 50%, #2a1f3d 0%, #090d1a 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.part-img-wrap img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
.part-fallback-icon { font-size: 2.8rem; position: absolute; z-index: 1; }
.part-cost-tag { position: absolute; top: 8px; right: 8px; z-index: 3; background: rgba(11, 13, 23, 0.92); border: 1px solid var(--accent-2); color: var(--neon-yellow); font-family: 'Syne', sans-serif; font-weight: 800; font-size: .78rem; padding: 3px 8px; }
.part-card-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.part-card-body h4 { font-size: 1.05rem; }
.part-mini-specs { display: flex; flex-wrap: wrap; gap: 5px; font-size: .64rem; }
.part-mini-specs span { background: var(--surf-2); padding: 3px 7px; border-radius: 4px; }
.equip-part-btn { width: 100%; padding: 9px; font-family: 'Syne', sans-serif; font-weight: 800; font-size: .76rem; text-transform: uppercase; background: var(--surf-2); color: var(--accent-2); border: 1px solid var(--accent-2); cursor: pointer; }
.photo-part-card.is-equipped .equip-part-btn { background: var(--ok-green); color: var(--bg-main); border-color: var(--ok-green); }

.earth-launch-portal-box { margin-top: 8px; }
.ignite-moon-btn {
    width: 100%; padding: 20px; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.15rem;
    letter-spacing: 0.08em; text-transform: uppercase; background: linear-gradient(135deg, #FF9E5E, #FF2A54);
    color: #ffffff; border: 2px solid var(--neon-yellow); border-radius: 10px; cursor: pointer;
    box-shadow: 0 0 35px rgba(255, 42, 84, 0.5); transition: transform 0.25s, box-shadow 0.25s;
}
.ignite-moon-btn:hover { transform: scale(1.02); box-shadow: 0 0 50px rgba(208, 255, 0, 0.7); }

/* =========================================================
   🌑 WORLD 2: THE MOON (3D TILTED CRATER MAP + EARTHRISE)
   ========================================================= */
.moon-abyss-section { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 105px clamp(18px, 4vw, 46px) 70px; max-width: 1220px; margin: 0 auto; }
.lunar-sky-header { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }

.earthrise-globe {
    width: 68px; height: 68px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #a2eeff, #0077ff 55%, #001133 95%);
    box-shadow: 0 0 35px rgba(0, 195, 255, 0.65), inset -12px -10px 20px rgba(0, 0, 0, 0.85);
    margin-bottom: 12px; animation: floatEarth 6s ease-in-out infinite alternate;
}
@keyframes floatEarth { from { transform: translateY(0px); } to { transform: translateY(-8px); } }

.reveal-cap { text-align: center; }
.reveal-cap h2 { font-size: clamp(1.8rem, 4.5vw, 3.2rem); }
.reveal-cap h2 i { color: var(--accent-1); font-style: normal; }
.launch-controls { margin-top: 10px; display: flex; justify-content: center; }
.api-key-field { font-family: 'JetBrains Mono', monospace; font-size: .74rem; background: var(--surf-1); color: var(--accent-1); border: 1px solid var(--edge-1); padding: 8px 14px; min-width: 280px; outline: none; }

.moon-3d-perspective-wrap { width: 100%; perspective: 1100px; padding: 18px 0 28px; }
.moon-map-stage {
    position: relative; width: 100%; border: 2px solid var(--accent-1); background: #101626;
    border-radius: 14px; transform: rotateX(24deg); transform-style: preserve-3d;
    box-shadow: 0 32px 60px rgba(0, 240, 255, 0.22), 0 10px 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.5s var(--ease-out);
}
.moon-map-stage:hover { transform: rotateX(14deg); }
.moon-map-svg { display: block; width: 100%; height: auto; border-radius: 12px; }

.map-pin-btn {
    position: absolute; transform: translate(-50%, -65%) translateZ(36px);
    background: rgba(8, 14, 28, 0.94); border: 2px solid var(--accent-1); color: var(--text-main);
    padding: 9px 14px; cursor: pointer; text-align: center; font-family: 'JetBrains Mono', monospace;
    z-index: 5; min-width: 145px; border-radius: 8px;
    box-shadow: 0 18px 25px rgba(0, 0, 0, 0.75), 0 0 15px rgba(0, 240, 255, 0.35);
    animation: pinBob 2.4s ease-in-out infinite alternate;
}
@keyframes pinBob { from { transform: translate(-50%, -62%) translateZ(32px); } to { transform: translate(-50%, -74%) translateZ(46px); } }
.map-pin-btn.is-active { border-color: var(--neon-yellow); box-shadow: 0 20px 30px rgba(0,0,0,0.8), 0 0 28px rgba(208, 255, 0, 0.65); }
.map-pin-btn.is-cleared { border-color: var(--ok-green); background: rgba(0, 255, 136, 0.18); }
.map-pin-btn.is-locked { opacity: 0.65; border-color: rgba(255, 255, 255, 0.25); }
.pin-num { display: block; font-size: .58rem; letter-spacing: .14em; color: var(--accent-1); }
.pin-title { display: block; font-family: 'Syne', sans-serif; font-size: .9rem; margin: 2px 0; }
.pin-status { display: block; font-size: .6rem; color: var(--neon-yellow); }
.map-pin-btn.is-cleared .pin-status { color: var(--ok-green); }

/* Upgrade Deck & Mini-Games */
.neon-text-blue { color: #fff; text-shadow: 0 0 10px var(--cyan-glow); }
.neon-text-green { color: var(--green); text-shadow: 0 0 12px var(--green-glow); }
.neon-text-red { color: var(--red); text-shadow: 0 0 12px var(--red-glow); }
.neon-text-purple { color: #f1bfff; text-shadow: 0 0 14px var(--purple-glow); }
.text-cyan { color: var(--cyan); }
.text-purple { color: #d66aff; }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-dim { color: var(--text-muted); font-size: 0.8rem; }

.card-glass { background: var(--bg-card); backdrop-filter: blur(14px); border: 1px solid var(--border-glow); border-radius: 12px; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45); }
.ftw-upgrade-deck { width: 100%; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.stats-meters-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .stats-meters-grid { grid-template-columns: 1fr; } }
.stat-gauge-card { background: rgba(8, 12, 28, 0.7); border: 1px solid var(--border-dim); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.gauge-meta { display: flex; justify-content: space-between; align-items: center; }
.stat-name { font-size: 0.75rem; font-weight: 700; }
.stat-val { font-size: 1.2rem; font-weight: 800; }
.gauge-bar-track { height: 7px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden; }
.gauge-bar-fill { height: 100%; transition: width 0.35s ease; }
.cyan-grad { background: linear-gradient(90deg, #0088ff, var(--cyan)); }
.purple-grad { background: linear-gradient(90deg, #8800ff, var(--purple)); }
.gauge-sub, .xp-subinfo { font-size: 0.68rem; color: var(--text-muted); }
.xp-display-card { border-color: rgba(255, 196, 0, 0.4); background: rgba(30, 25, 10, 0.45); }

.upgrade-bay-box { background: rgba(14, 20, 46, 0.65); border: 1px dashed var(--border-glow); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.bay-header { display: flex; justify-content: space-between; align-items: center; }
.bay-title { font-size: 0.76rem; font-weight: 700; color: var(--cyan); }
.upgrade-buttons-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .upgrade-buttons-row { grid-template-columns: 1fr; } }
.upgrade-group { display: flex; gap: 8px; }
.btn-upgrade { flex: 1; background: rgba(0, 243, 255, 0.1); border: 1px solid var(--border-glow); color: var(--text-main); padding: 7px; font-family: inherit; font-weight: 700; font-size: 0.74rem; border-radius: 6px; cursor: pointer; }
.btn-upgrade:hover:not(:disabled) { background: var(--cyan); color: #050713; }
.btn-upgrade:disabled { opacity: 0.38; cursor: not-allowed; }

.pin-mission-Host { width: 100%; }
.pin-story-card { background: var(--surf-1); border: 2px solid var(--accent-1); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.story-chapter-tag { display: inline-block; background: var(--neon-yellow); color: var(--bg-main); font-weight: 800; font-size: .64rem; letter-spacing: .16em; padding: 3px 9px; margin-bottom: 8px; }

.btn { font-family: inherit; font-weight: 700; font-size: 0.84rem; padding: 0.6rem 1.2rem; border-radius: 8px; cursor: pointer; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-primary { background: linear-gradient(135deg, #00d2ff, #0066ff); color: #fff; }
.btn-outline { background: rgba(255, 255, 255, 0.06); color: var(--text-main); border: 1px solid var(--border-dim); }
.btn-tiny { padding: 0.3rem 0.7rem; font-size: 0.7rem; }

.quiz-panel { padding: 1.6rem; width: 100%; }
.quiz-header { display: flex; justify-content: space-between; margin-bottom: 0.8rem; }
.quiz-badge { color: var(--cyan); font-weight: 700; }
.progress-bar-container { height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin-bottom: 1.2rem; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.quiz-question-text { font-size: 1.15rem; margin-bottom: 1.2rem; }
.quiz-options-grid { display: flex; flex-direction: column; gap: 0.65rem; }
.quiz-option-btn { background: rgba(16, 24, 52, 0.7); border: 1px solid var(--border-dim); border-radius: 8px; padding: 0.8rem 1rem; display: flex; align-items: center; gap: 0.8rem; cursor: pointer; color: var(--text-main); text-align: left; font-family: inherit; font-size: 0.88rem; }
.opt-indicator { width: 28px; height: 28px; background: rgba(255,255,255,0.08); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--cyan); }
.quiz-option-btn.correct { background: rgba(0, 255, 157, 0.22) !important; border-color: var(--green) !important; }
.quiz-option-btn.wrong { background: rgba(255, 51, 102, 0.22) !important; border-color: var(--red) !important; }
.quiz-feedback-box { background: rgba(10, 16, 36, 0.9); border: 1px solid var(--border-glow); border-radius: 8px; padding: 1rem; margin-top: 1rem; }
.feedback-correct { color: var(--green); font-weight: 700; }
.feedback-wrong { color: var(--red); font-weight: 700; }

.orbit-panel { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; width: 100%; }
.orbit-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.solar-track-container { background: rgba(6, 10, 26, 0.85); border: 1px solid var(--border-glow); border-radius: 10px; padding: 1rem 0.6rem; overflow-x: auto; }
.solar-slots-grid { display: grid; grid-template-columns: repeat(10, minmax(80px, 1fr)); gap: 0.5rem; }
.orbit-slot { background: rgba(16, 24, 52, 0.55); border: 2px dashed rgba(255,255,255,0.18); border-radius: 8px; min-height: 118px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 0.4rem; cursor: pointer; }
.orbit-slot.orbit-correct { border: 2px solid var(--green); background: rgba(0, 255, 157, 0.12); }
.orbit-slot.orbit-wrong { border: 2px solid var(--red); background: rgba(255, 51, 102, 0.12); }
.slot-number-badge { font-size: 0.66rem; font-weight: 800; color: var(--text-muted); }
.slot-placeholder { font-size: 0.68rem; color: rgba(255,255,255,0.25); margin-top: 1.4rem; }
.planet-bank-section { background: rgba(8, 12, 28, 0.65); border: 1px solid var(--border-dim); border-radius: 10px; padding: 0.9rem; }
.planet-bank-grid { display: flex; flex-wrap: wrap; gap: 0.8rem; min-height: 95px; align-items: center; }
.planet-orb { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; cursor: pointer; padding: 0.4rem; border-radius: 8px; }
.planet-orb.selected { outline: 2px solid var(--cyan); background: rgba(0, 243, 255, 0.18); }
.orb-visual { border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; }
.orb-rings { position: absolute; width: 180%; height: 40%; border: 3px solid rgba(232, 201, 135, 0.85); border-radius: 50%; transform: rotate(-25deg); pointer-events: none; }
.orb-name { font-size: 0.7rem; font-weight: 700; }
.orbit-actions-bar { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.orbit-feedback-banner { border-radius: 8px; padding: 1rem; }
.feedback-banner-success { background: rgba(0, 255, 157, 0.15); border: 1px solid var(--green); }
.feedback-banner-warn { background: rgba(255, 51, 102, 0.15); border: 1px solid var(--red); }

.arcade-panel { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.9rem; width: 100%; }
.arcade-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.arcade-stats-hud { display: flex; gap: 0.7rem; }
.hud-pill { background: rgba(16, 24, 52, 0.8); border: 1px solid var(--border-glow); padding: 0.35rem 0.8rem; border-radius: 6px; font-size: 0.8rem; }
.arcade-canvas-wrapper { position: relative; margin: 0 auto; border: 2px solid var(--border-glow); border-radius: 10px; overflow: hidden; width: 100%; max-width: 720px; }
#arcade-canvas { display: block; width: 100%; height: auto; background: #060814; }
.arcade-overlay { position: absolute; inset: 0; background: rgba(5, 7, 19, 0.88); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; z-index: 10; }
.arcade-controls-bar { display: flex; justify-content: space-between; align-items: center; max-width: 720px; margin: 0 auto; width: 100%; }
.mobile-dpad { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dpad-mid { display: flex; gap: 3px; }
.dpad-btn { width: 42px; height: 42px; background: rgba(255,255,255,0.1); border: 1px solid var(--border-glow); color: var(--cyan); border-radius: 8px; font-size: 1rem; cursor: pointer; }

.blockblast-panel { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; width: 100%; }
.blockblast-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.mission-tag { font-size: 0.7rem; font-weight: 800; color: var(--gold); letter-spacing: 1.5px; }
.blockblast-scoreboard { display: flex; gap: 0.8rem; }
.score-card { background: rgba(14, 20, 46, 0.85); border: 1px solid var(--border-glow); border-radius: 8px; padding: 0.45rem 0.85rem; display: flex; flex-direction: column; align-items: center; }
.score-label { font-size: 0.62rem; color: var(--text-muted); }
.score-value { font-size: 1.35rem; font-weight: 800; color: var(--cyan); }
.score-target { font-size: 1.15rem; font-weight: 800; color: var(--gold); }
.water-progress-section { background: rgba(10, 16, 36, 0.75); border: 1px solid var(--border-dim); border-radius: 8px; padding: 0.7rem 1rem; }
.water-progress-header { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 0.4rem; }
.water-progress-track { height: 12px; background: rgba(255,255,255,0.08); border-radius: 6px; overflow: hidden; border: 1px solid rgba(0, 243, 255, 0.25); }
.water-progress-fill { height: 100%; background: linear-gradient(90deg, #0055ff, #00d2ff, #00ffaa); transition: width 0.3s ease; }
.blast-main-area { display: flex; justify-content: center; }
.blast-board-container { background: #080c1f; border: 2px solid var(--border-glow); border-radius: 10px; padding: 10px; }
.blast-grid { display: grid; grid-template-columns: repeat(8, 40px); grid-template-rows: repeat(8, 40px); gap: 4px; }
.blast-cell { background: rgba(25, 35, 70, 0.48); border: 1px solid rgba(255,255,255,0.09); border-radius: 5px; cursor: pointer; }
.blast-cell.preview-valid { background: rgba(0, 243, 255, 0.42) !important; border-color: var(--cyan); }
.blast-cell.preview-invalid { background: rgba(255, 51, 102, 0.42) !important; border-color: var(--red); }
.blast-tray-section { background: rgba(10, 16, 36, 0.75); border: 1px dashed var(--border-dim); border-radius: 10px; padding: 0.9rem; }
.blast-tray-grid { display: flex; justify-content: space-around; align-items: center; min-height: 98px; flex-wrap: wrap; gap: 10px; }
.tray-slot { width: 120px; height: 98px; background: rgba(18, 26, 56, 0.5); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tray-slot.selected { border: 2px solid var(--cyan); background: rgba(0, 243, 255, 0.22); }
.mini-block { width: 100%; height: 100%; border: 1px solid rgba(255,255,255,0.35); }
.blast-footer-bar { display: flex; justify-content: center; gap: 1rem; }

.summary-box { text-align: center; padding: 1.5rem; }
.summary-icon { font-size: 2.5rem; margin-bottom: 0.4rem; }
.summary-score { font-size: 1.1rem; margin: 0.5rem 0; }
.xp-awarded-badge { background: rgba(255, 196, 0, 0.2); border: 1px solid var(--gold); color: var(--gold); font-weight: 800; padding: 0.4rem 1rem; border-radius: 30px; display: inline-flex; align-items: center; gap: 0.5rem; margin: 0.4rem 0 0.8rem; }
.summary-actions { display: flex; gap: 0.8rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }

/* Stage 4 Newspaper */
.initiate { position: relative; min-height: 110vh; background: var(--accent-2-bg); color: var(--bg-main); display: flex; align-items: center; justify-content: center; padding: 110px clamp(18px, 4vw, 46px); overflow: hidden; }
.initiate-inner { display: flex; flex-direction: column; align-items: center; width: 100%; }
.scatter { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(1.65rem, 7.5vw, 6.2rem); line-height: .92; text-align: center; color: var(--bg-main); display: flex; flex-wrap: wrap; justify-content: center; max-width: 1000px; }
.scatter .glyph { display: inline-block; will-change: transform; cursor: pointer; }
.scatter .glyph.space { width: .32em; }
.scatter .glyph.slash { color: var(--accent-1); }
.press-release-card { max-width: 780px; width: 100%; background: #F4F1EA; color: #0B0D17; border: 2px solid #0B0D17; padding: 26px; text-align: left; box-shadow: 12px 12px 0 rgba(11, 13, 23, 0.85); }
.press-header { display: flex; justify-content: space-between; border-bottom: 2px solid #0B0D17; padding-bottom: 8px; margin-bottom: 12px; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.press-headline { font-size: clamp(1.3rem, 2.5vw, 1.85rem); margin-bottom: 12px; color: #0B0D17; }
.press-body { font-size: .82rem; line-height: 1.65; white-space: pre-line; }
.sub-wrap { margin-top: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.sub-btn { font-family: 'Syne', sans-serif; font-weight: 800; font-size: .92rem; text-transform: uppercase; background: var(--bg-main); color: var(--accent-1); border: 2px solid var(--bg-main); padding: 13px 26px; cursor: pointer; }
.sub-note { margin-top: 12px; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; }
.sig-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(18px, 4vw, 46px); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; }