/* ==========================================================================
   MARIO S. MALDONADO — LIN 2206 DIGITAL PORTFOLIO (V5.0 PHOTOREALISTIC SPACE)
   Fixes:
   - Crisp, realistic micro-starfield + orbital planetary arrival per section
   - Seamless UPNFM logo medallions (mix-blend-mode: multiply + strict clip)
   - Chiaroscuro Darth Vader Rogue One corridor (no cartoon body outlines)
   - General Grievous 4-Lightsaber module
   - Enlarged Grand "Coming Soon" Chambers
   ========================================================================== */

:root {
    --bg-space: #010308;
    --bg-sector: rgba(6, 12, 26, 0.82);
    --bg-sector-hover: rgba(9, 18, 38, 0.92);

    /* Default Kyber: Nerazzurri Guardian Blue */
    --inter-royal: #0055A5;
    --saber-core: #00B4FF;
    --saber-glow: rgba(0, 180, 255, 0.65);
    --saber-soft: rgba(0, 180, 255, 0.14);

    /* Gold & Crimson Accents */
    --gold-accent: #E5B842;
    --gold-glow: rgba(229, 184, 66, 0.45);
    --sith-red: #FF1E27;

    /* Text Hierarchy */
    --text-bright: #F8FAFC;
    --text-body: #CBD5E1;
    --text-dim: #94A3B8;

    /* Borders */
    --border-holo: rgba(0, 180, 255, 0.28);
    --border-holo-bright: rgba(0, 180, 255, 0.78);

    /* Fonts */
    --font-sci: 'Orbitron', sans-serif;
    --font-epic: 'Cinzel', serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Kyber Crystal Variations */
[data-kyber="sith"] {
    --inter-royal: #7F1D1D;
    --saber-core: #FF2A36;
    --saber-glow: rgba(255, 42, 54, 0.7);
    --saber-soft: rgba(255, 42, 54, 0.15);
    --border-holo: rgba(255, 42, 54, 0.32);
}

[data-kyber="yoda"] {
    --inter-royal: #065F46;
    --saber-core: #10B981;
    --saber-glow: rgba(16, 185, 129, 0.68);
    --saber-soft: rgba(16, 185, 129, 0.15);
    --border-holo: rgba(16, 185, 129, 0.32);
}

[data-kyber="gold"] {
    --inter-royal: #9A6F0B;
    --saber-core: #FFD166;
    --saber-glow: rgba(255, 209, 102, 0.68);
    --saber-soft: rgba(255, 209, 102, 0.15);
    --border-holo: rgba(255, 209, 102, 0.32);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-space);
    color: var(--text-bright);
    font-family: var(--font-sans);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Clear Starlight Window Mode inside Hyperspace */
body.cockpit-pure-window .sector-views,
body.cockpit-pure-window .site-footer,
body.cockpit-pure-window .orbital-watermark {
    opacity: 0.04;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

/* =========================================================
   PHOTOREALISTIC DEEP SPACE CANVAS & PLANETARY WATERMARK
   ========================================================= */
#galaxyCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Subtle Planetary Name in the Background Sky */
.orbital-watermark {
    position: fixed;
    top: 96px;
    right: 4%;
    z-index: -1;
    text-align: right;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.orb-sys-code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 3px;
    color: rgba(0, 180, 255, 0.45);
}

.orb-sys-name {
    display: block;
    font-family: var(--font-sci);
    font-size: clamp(1.4rem, 3vw, 2.6rem);
    font-weight: 900;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.07);
    text-transform: uppercase;
}

.container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================================
   SLEEK HOLOGRAPHIC HYPERSPACE CRUISE HUD
   ========================================================= */
.hyperspace-cruise-hud {
    position: fixed;
    inset: 0;
    z-index: 950;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5.5rem 2rem 1.5rem;
    background: radial-gradient(circle at center, transparent 45%, rgba(0, 12, 30, 0.55) 100%);
}

.hyperspace-cruise-hud.active {
    opacity: 1;
}

.cruise-top-telemetry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
    padding: 0.55rem 1.25rem;
    background: rgba(2, 8, 22, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 180, 255, 0.4);
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #BAE6FD;
}

.cruise-signal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38BDF8;
    box-shadow: 0 0 10px #38BDF8;
    animation: pulseLed 1s infinite alternate;
}

.cruise-center-reticle {
    margin: auto;
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.45;
}

.reticle-fine-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed #7DD3FC;
    animation: spin360 18s linear infinite;
}

.reticle-cross {
    width: 16px;
    height: 16px;
    border: 1px solid #ffffff;
    border-radius: 50%;
}

.cruise-bottom-bar {
    pointer-events: auto;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    background: rgba(3, 9, 24, 0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 16px;
    padding: 0.9rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.25);
}

.cruise-stat {
    display: flex;
    flex-direction: column;
    font-family: var(--font-mono);
}

.cruise-stat.right {
    text-align: right;
}

.c-lbl {
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.c-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
}

.c-val.cyan {
    color: #38BDF8;
}

.cruise-controls {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-cruise-toggle,
.btn-cruise-exit {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-cruise-toggle {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38BDF8;
    color: #ffffff;
}

.btn-cruise-toggle:hover {
    background: rgba(56, 189, 248, 0.3);
}

.btn-cruise-exit {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #F87171;
    color: #FECACA;
}

.btn-cruise-exit:hover {
    background: #DC2626;
    color: #ffffff;
}

/* Brief Page Jump Flash */
.hyperspace-hud-flash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hyperspace-hud-flash.active {
    opacity: 1;
}

.hyperspace-coordinates {
    text-align: center;
    background: rgba(2, 6, 16, 0.9);
    border: 1px solid rgba(186, 230, 253, 0.6);
    padding: 0.85rem 1.85rem;
    border-radius: 12px;
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.4);
}

.hyper-tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: #7DD3FC;
    letter-spacing: 2.5px;
}

.hyper-dest {
    font-family: var(--font-sci);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.5px;
}

/* =========================================================
   STICKY HOLOCRON HEADER & HYPERSPACE BUTTON
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(2, 5, 13, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
}

.brand-holocron {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-bright);
    flex-shrink: 0;
}

.inter-galactic-crest {
    width: 42px;
    height: 42px;
}

.brand-meta {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-sci);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-subtitle {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--saber-core);
    letter-spacing: 1px;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.nav-link:hover {
    color: #ffffff;
    background: var(--saber-soft);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--inter-royal), rgba(0, 180, 255, 0.25));
    border-color: var(--saber-core);
    box-shadow: 0 0 14px var(--saber-glow);
}

.nav-link.nav-transmission {
    border-color: rgba(229, 184, 66, 0.45);
    color: var(--gold-accent);
}

.header-right-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Realistic Sleek Hyperspace Toggle Pill */
.btn-hyperdrive-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(6, 16, 36, 0.9);
    border: 1px solid rgba(125, 211, 252, 0.55);
    color: #F0F9FF;
    padding: 0.46rem 0.95rem;
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.hyper-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38BDF8;
    box-shadow: 0 0 8px #38BDF8;
}

.btn-hyperdrive-toggle:hover,
.btn-hyperdrive-toggle.active {
    background: rgba(56, 189, 248, 0.22);
    border-color: #ffffff;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
}

.header-lightsaber-bar {
    display: flex;
    align-items: center;
    width: 100%;
    height: 3px;
}

.hilt-mini {
    width: 55px;
    height: 5px;
    background: linear-gradient(90deg, #475569, #E2E8F0, #1E293B, var(--gold-accent));
}

.blade-line {
    flex: 1;
    height: 2px;
    background: #ffffff;
    box-shadow: 0 0 10px var(--saber-core), 0 0 20px var(--saber-core);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(0, 180, 255, 0.1);
    border: 1px solid var(--border-holo);
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.mobile-menu-btn .saber-bar {
    width: 22px;
    height: 2px;
    background: #ffffff;
}

/* =========================================================
   SECTOR VIEWS & HERO
   ========================================================= */
.sector-views {
    flex: 1;
    padding: 2rem 0 4rem;
    transition: opacity 0.4s ease;
}

.sector-page {
    display: none;
    animation: sectorFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sector-page.active {
    display: block;
}

@keyframes sectorFadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.telemetry-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.6rem 1.15rem;
    background: rgba(4, 10, 24, 0.82);
    border: 1px solid var(--border-holo);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
}

.tele-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tele-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--saber-core);
    box-shadow: 0 0 8px var(--saber-core);
}

.gold-text {
    color: var(--gold-accent);
}

.hero-command-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.85fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3.5rem;
}

.holocron-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.73rem;
    letter-spacing: 1.5px;
    color: var(--saber-core);
    background: var(--saber-soft);
    border: 1px solid var(--border-holo);
    padding: 0.38rem 0.95rem;
    border-radius: 99px;
    margin-bottom: 1.2rem;
}

.epic-hero-title {
    font-family: var(--font-epic);
    font-size: clamp(2.15rem, 4.2vw, 3.45rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

.text-saber-glow {
    color: #ffffff;
    text-shadow: 0 0 18px var(--saber-core), 0 0 32px var(--inter-royal);
}

.text-gold-glow {
    color: var(--gold-accent);
    text-shadow: 0 0 18px var(--gold-glow);
}

/* Single Lightsaber */
.lightsaber-assembly {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 540px;
    height: 28px;
    margin: 1.2rem 0 1.6rem;
    cursor: pointer;
    user-select: none;
}

.saber-hilt {
    display: flex;
    align-items: center;
    width: 105px;
    height: 14px;
    background: linear-gradient(180deg, #F1F5F9 0%, #64748B 50%, #0F172A 100%);
    border-radius: 4px 2px 2px 4px;
    border: 1px solid #94A3B8;
    flex-shrink: 0;
    z-index: 2;
}

.hilt-pommel {
    width: 13px;
    height: 16px;
    background: #334155;
    border-right: 2px solid var(--gold-accent);
}

.hilt-grip {
    width: 48px;
    height: 100%;
    background: repeating-linear-gradient(90deg, #0F172A 0px, #0F172A 4px, #64748B 4px, #64748B 6px);
}

.hilt-switch {
    width: 16px;
    height: 18px;
    background: var(--gold-accent);
    border-radius: 2px;
    margin: 0 4px;
}

.hilt-emitter {
    flex: 1;
    height: 18px;
    background: linear-gradient(90deg, #475569, #F8FAFC);
    border-left: 2px solid #0F172A;
}

.saber-plasma-blade {
    flex: 1;
    height: 11px;
    position: relative;
    display: flex;
    align-items: center;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightsaber-assembly.ignited .saber-plasma-blade {
    transform: scaleX(1);
}

.plasma-core {
    width: 100%;
    height: 6px;
    background: #ffffff;
    border-radius: 0 99px 99px 0;
    position: relative;
    z-index: 2;
}

.plasma-aura {
    position: absolute;
    inset: -5px -8px -5px 0;
    background: var(--saber-core);
    border-radius: 0 99px 99px 0;
    filter: blur(5px);
    box-shadow: 0 0 18px var(--saber-core), 0 0 36px var(--saber-core);
}

.hero-lead-text {
    color: var(--text-body);
    font-size: 1.02rem;
    margin-bottom: 1.85rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-holocron {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.65rem;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.28s ease;
    border: 1px solid var(--border-holo);
}

.btn-holocron.primary {
    background: linear-gradient(135deg, var(--inter-royal), var(--saber-core));
    color: #ffffff;
    box-shadow: 0 8px 25px var(--saber-glow);
}

.btn-holocron.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px var(--saber-glow);
}

.btn-holocron.secondary {
    background: rgba(8, 18, 40, 0.85);
    color: var(--gold-accent);
    border-color: rgba(229, 184, 66, 0.55);
}

.btn-holocron.secondary:hover {
    background: rgba(229, 184, 66, 0.16);
    transform: translateY(-3px);
}

/* Profile Card */
.portrait-holocron-card {
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
    background: linear-gradient(165deg, rgba(8, 18, 40, 0.92), rgba(3, 7, 16, 0.96));
    border: 1px solid var(--border-holo-bright);
    border-radius: 20px;
    padding: 1.35rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.hud-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--gold-accent);
    border-style: solid;
    pointer-events: none;
}

.hud-corner.tl {
    top: 8px;
    left: 8px;
    border-width: 2px 0 0 2px;
}

.hud-corner.tr {
    top: 8px;
    right: 8px;
    border-width: 2px 2px 0 0;
}

.hud-corner.bl {
    bottom: 8px;
    left: 8px;
    border-width: 0 0 2px 2px;
}

.hud-corner.br {
    bottom: 8px;
    right: 8px;
    border-width: 0 2px 2px 0;
}

.portrait-viewport {
    width: 100%;
    aspect-ratio: 1 / 1.05;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #040B1A;
    border: 1px solid rgba(0, 180, 255, 0.4);
    margin-bottom: 1.1rem;
}

.portrait-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portrait-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sci);
    font-size: 2.2rem;
    color: var(--saber-core);
}

.portrait-scanline {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 180, 255, 0.1) 50%, transparent 100%);
    background-size: 100% 200%;
    animation: scanPortrait 5s linear infinite;
    pointer-events: none;
}

@keyframes scanPortrait {
    0% {
        background-position: 0 -100%;
    }

    100% {
        background-position: 0 200%;
    }
}

.portrait-caption {
    text-align: center;
}

.caption-stars {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--gold-accent);
    letter-spacing: 1.5px;
    margin-bottom: 0.25rem;
}

.caption-name {
    font-family: var(--font-epic);
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.caption-role {
    font-size: 0.82rem;
    color: var(--text-body);
    margin-bottom: 0.7rem;
}

.caption-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.caption-badges span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    background: var(--saber-soft);
    border: 1px solid var(--border-holo);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    color: var(--saber-core);
}

/* =========================================================
   DIVIDERS (TWIN SUNS & DARTH MAUL DOUBLE SABER)
   ========================================================= */
.galactic-divider {
    margin: 3.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.twin-suns-divider {
    gap: 1.25rem;
}

.divider-line-left,
.divider-line-right {
    flex: 1;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--saber-core), var(--gold-accent));
}

.divider-line-right {
    background: linear-gradient(90deg, var(--gold-accent), var(--saber-core), transparent);
}

.twin-suns-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(6, 13, 28, 0.9);
    border: 1px solid rgba(229, 184, 66, 0.45);
    padding: 0.45rem 1.15rem;
    border-radius: 99px;
}

.sun-binary {
    border-radius: 50%;
    display: inline-block;
}

.sun-1 {
    width: 15px;
    height: 15px;
    background: #FFF3B0;
    box-shadow: 0 0 12px #F59E0B;
}

.sun-2 {
    width: 10px;
    height: 10px;
    background: #FDE68A;
    box-shadow: 0 0 8px #EF4444;
}

.divider-tag-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gold-accent);
    letter-spacing: 2px;
}

.maul-double-saber-divider {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    height: 30px;
    cursor: pointer;
}

.maul-long-hilt {
    width: 150px;
    height: 13px;
    background: linear-gradient(180deg, #E2E8F0, #64748B, #0F172A);
    border: 1px solid #94A3B8;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    flex-shrink: 0;
    z-index: 2;
}

.m-emitter {
    width: 14px;
    height: 17px;
    background: #CBD5E1;
    border: 1px solid #1E293B;
}

.m-grip {
    width: 42px;
    height: 9px;
    background: repeating-linear-gradient(90deg, #090D16 0px, #090D16 4px, #475569 4px, #475569 6px);
}

.m-Button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sith-red);
}

.maul-blade {
    flex: 1;
    height: 10px;
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.maul-blade.left-blade {
    transform-origin: right center;
}

.maul-blade.right-blade {
    transform-origin: left center;
}

.maul-double-saber-divider.retracted .maul-blade {
    transform: scaleX(0);
}

.m-core {
    width: 100%;
    height: 5px;
    background: #ffffff;
    border-radius: 99px;
    position: relative;
    z-index: 2;
}

.m-glow {
    position: absolute;
    inset: -5px -4px;
    background: var(--sith-red);
    border-radius: 99px;
    filter: blur(5px);
    box-shadow: 0 0 18px var(--sith-red), 0 0 36px #990006;
}

/* =========================================================
   CHIAROSCURO DARTH VADER "ROGUE ONE" DARK CORRIDOR
   ========================================================= */
.vader-corridor-section {
    margin: 3.5rem 0;
    background: #010103;
    border: 1px solid rgba(255, 30, 39, 0.28);
    border-radius: 22px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.vader-corridor-section.vader-ignited {
    border-color: rgba(255, 30, 39, 0.75);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 50px rgba(220, 10, 20, 0.25);
}

.corridor-red-fog {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(200, 10, 20, 0.28) 0%, rgba(70, 0, 5, 0.12) 45%, transparent 75%);
    opacity: 0;
    transition: opacity 0.55s ease;
    pointer-events: none;
}

.vader-corridor-section.vader-ignited .corridor-red-fog {
    opacity: 1;
}

.corridor-content-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 0.98fr 1.12fr;
    gap: 2.5rem;
    align-items: center;
}

.vader-hallway-stage {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.vader-cinematic-svg {
    width: 100%;
    max-width: 350px;
    height: auto;
}

/* When extinguished, Vader is almost completely hidden in pitch darkness! */
.vader-aura-glow,
.vader-chiaroscuro-body {
    opacity: 0.04;
    transition: opacity 0.48s ease;
}

.vader-crimson-blade {
    transform: scaleY(0);
    transform-origin: 296px 250px;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.vader-corridor-section.vader-ignited .vader-aura-glow,
.vader-corridor-section.vader-ignited .vader-chiaroscuro-body {
    opacity: 1;
}

.vader-corridor-section.vader-ignited .vader-crimson-blade {
    transform: scaleY(1);
}

.hallway-prompt-badge {
    position: absolute;
    bottom: 12px;
    background: rgba(5, 5, 8, 0.92);
    border: 1px solid rgba(255, 30, 39, 0.45);
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: #FCA5A5;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.pulse-red-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sith-red);
    box-shadow: 0 0 8px var(--sith-red);
    animation: pulseLed 1s infinite;
}

.vader-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--sith-red);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}

.vader-heading {
    font-family: var(--font-epic);
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    color: #ffffff;
    margin-bottom: 1rem;
}

.vader-literary-info p {
    color: var(--text-body);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.btn-vader-ignite {
    background: linear-gradient(135deg, #7F1D1D, var(--sith-red));
    border: 1px solid #FCA5A5;
    color: #ffffff;
    padding: 0.8rem 1.4rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 30, 39, 0.4);
    transition: transform 0.25s ease;
}

.btn-vader-ignite:hover {
    transform: translateY(-2px);
}

/* =========================================================
   GENERAL GRIEVOUS 4-LIGHTSABER MODULE
   ========================================================= */
.grievous-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 2rem;
    align-items: center;
}

.grievous-info h4 {
    font-family: var(--font-epic);
    font-size: 1.3rem;
    margin-bottom: 0.65rem;
}

.grievous-info p {
    color: var(--text-body);
    font-size: 0.92rem;
    margin-bottom: 0.95rem;
}

.grievous-saber-rack {
    background: rgba(2, 6, 15, 0.92);
    border: 1px solid var(--border-holo);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.g-saber {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.g-hilt {
    width: 52px;
    height: 10px;
    background: linear-gradient(90deg, #334155, #CBD5E1, #1E293B);
    border-radius: 2px;
    flex-shrink: 0;
}

.g-blade {
    flex: 1;
    height: 7px;
    border-radius: 0 99px 99px 0;
    display: flex;
    align-items: center;
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.grievous-saber-rack.retracted .g-blade {
    transform: scaleX(0);
}

.g-core {
    width: 100%;
    height: 4px;
    background: #ffffff;
    border-radius: 0 99px 99px 0;
}

.blue-1 .g-blade,
.blue-2 .g-blade {
    background: #00B4FF;
    box-shadow: 0 0 14px #00B4FF, 0 0 24px #0055A5;
}

.green-1 .g-blade,
.green-2 .g-blade {
    background: #10FF78;
    box-shadow: 0 0 14px #10FF78, 0 0 24px #059669;
}

.g-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-body);
    width: 135px;
    text-align: right;
    flex-shrink: 0;
}

/* =========================================================
   THE 3 UPNFM LOGOS (FIXED SQUARE-IN-CIRCLE VISUAL NOISE)
   ========================================================= */
.holo-seals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.holo-seal-pod {
    background: linear-gradient(165deg, rgba(8, 18, 40, 0.88), rgba(3, 7, 18, 0.94));
    border: 1px solid var(--border-holo);
    border-radius: 22px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.35s ease, border-color 0.35s ease;
}

.holo-seal-pod:hover {
    transform: translateY(-6px);
    border-color: var(--saber-core);
}

/* Pure White Clipped Medallion + mix-blend-mode: multiply eliminates rectangular JPEG corners! */
.seal-medallion-frame {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--saber-core);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 180, 255, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    margin-bottom: 1.2rem;
}

.seal-medallion-frame.gold-medallion {
    border-color: var(--gold-accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 24px rgba(229, 184, 66, 0.35);
}

.smart-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    mix-blend-mode: multiply;
}

.pod-caption {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-body);
    text-align: center;
}

.gold-caption {
    color: var(--gold-accent);
}

/* =========================================================
   ENLARGED GRAND "COMING SOON" STANDBY CHAMBERS
   ========================================================= */
.holocron-standby-chamber.grand-chamber,
.theater-screen-standby.grand-chamber {
    margin-top: 2rem;
    min-height: 430px;
    padding: 4.5rem 2.5rem;
    background: radial-gradient(circle at center, rgba(0, 104, 168, 0.22) 0%, rgba(4, 10, 24, 0.92) 80%);
    border: 1.5px dashed var(--border-holo-bright);
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

.chamber-laser-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--saber-core), #fff, var(--saber-core), transparent);
    box-shadow: 0 0 15px var(--saber-core);
    animation: sweepVertical 4.5s ease-in-out infinite;
}

@keyframes sweepVertical {

    0%,
    100% {
        top: 2%;
    }

    50% {
        top: 96%;
    }
}

.chamber-astrogation-icon.large-icon {
    width: 118px;
    height: 118px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.65rem;
}

.astro-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.astro-circle.c1 {
    border: 2px dashed var(--saber-core);
    animation: spin360 14s linear infinite;
}

.astro-circle.c2 {
    inset: 12px;
    border: 1.5px solid var(--gold-accent);
    animation: spin360 10s linear infinite reverse;
}

@keyframes spin360 {
    to {
        transform: rotate(360deg);
    }
}

.large-icon .astro-core {
    font-size: 2.35rem;
    color: var(--gold-accent);
    text-shadow: 0 0 18px var(--gold-accent);
}

.chamber-code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--saber-core);
    letter-spacing: 2.5px;
    margin-bottom: 0.65rem;
}

.grand-chamber .chamber-title {
    font-family: var(--font-epic);
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    color: #ffffff;
    margin-bottom: 0.85rem;
    max-width: 760px;
}

.grand-chamber .chamber-desc {
    max-width: 620px;
    color: var(--text-body);
    font-size: 1.04rem;
    margin-bottom: 1.65rem;
}

.chamber-status-pill {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--gold-accent);
    background: rgba(229, 184, 66, 0.12);
    border: 1px solid rgba(229, 184, 66, 0.4);
    padding: 0.45rem 1.2rem;
    border-radius: 99px;
    letter-spacing: 1.5px;
}

/* =========================================================
   PANELS, TERMINALS & SECTOR MODULES
   ========================================================= */
.section-heading-block,
.sector-top-banner {
    text-align: center;
    margin-bottom: 2.25rem;
}

.kicker-mono {
    font-family: var(--font-mono);
    font-size: 0.73rem;
    letter-spacing: 2.5px;
    color: var(--saber-core);
    display: block;
    margin-bottom: 0.4rem;
}

.section-main-title,
.sector-hero-heading {
    font-family: var(--font-epic);
    font-size: clamp(1.75rem, 3.2vw, 2.45rem);
    color: #ffffff;
}

.bento-narrative-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.holocron-panel {
    background: var(--bg-sector);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-holo);
    border-radius: 18px;
    padding: 2.1rem 2.3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.bento-wide {
    grid-column: span 2;
}

.panel-nerazzurri-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: repeating-linear-gradient(180deg, var(--inter-royal) 0px, var(--inter-royal) 20px, #02050D 20px, #02050D 40px, var(--gold-accent) 40px, var(--gold-accent) 44px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.panel-code {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--saber-core);
}

.panel-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    background: var(--saber-soft);
    color: var(--saber-core);
    border: 1px solid var(--border-holo);
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
}

.panel-tag.gold {
    background: rgba(229, 184, 66, 0.14);
    color: var(--gold-accent);
    border-color: rgba(229, 184, 66, 0.4);
}

.panel-title {
    font-family: var(--font-epic);
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 0.9rem;
}

.panel-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
}

.holocron-panel p {
    color: var(--text-body);
    font-size: 0.96rem;
    margin-bottom: 0.85rem;
}

.holocron-panel p:last-child {
    margin-bottom: 0;
}

.terminals-asymmetric-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.75rem;
    margin-bottom: 4rem;
}

.span-7 {
    grid-column: span 7;
}

.span-5 {
    grid-column: span 5;
}

.holocron-terminal-card {
    background: linear-gradient(160deg, rgba(8, 19, 42, 0.9), rgba(3, 7, 18, 0.95));
    border: 1px solid var(--border-holo);
    border-radius: 18px;
    padding: 1.65rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

.terminal-top-bar,
.terminal-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

.terminal-top-bar {
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-footer-bar {
    padding-top: 0.8rem;
    margin-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.term-title {
    color: var(--saber-core);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.term-sub {
    color: var(--gold-accent);
}

.blink-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--saber-core);
    box-shadow: 0 0 8px var(--saber-core);
    animation: pulseLed 1.4s infinite;
}

@keyframes pulseLed {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.databank-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.db-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    padding: 0.5rem 0.4rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.db-tab.active,
.db-tab:hover {
    background: var(--saber-soft);
    color: #ffffff;
    border-color: var(--saber-core);
}

.databank-screen {
    background: radial-gradient(circle at center, rgba(0, 180, 255, 0.12) 0%, rgba(2, 6, 15, 0.88) 85%);
    border: 1px solid var(--border-holo);
    border-radius: 14px;
    padding: 1.5rem;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    transition: opacity 0.25s ease;
}

.hologram-icon {
    font-size: 1.65rem;
    margin-bottom: 0.4rem;
}

.db-quote-text {
    font-family: var(--font-epic);
    font-size: 1.04rem;
    color: #ffffff;
    margin-bottom: 0.55rem;
}

.db-sub-text {
    font-size: 0.85rem;
    color: var(--text-body);
}

.btn-terminal-action {
    background: linear-gradient(135deg, var(--inter-royal), var(--saber-core));
    border: none;
    color: #ffffff;
    padding: 0.55rem 1.05rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
}

.forge-saber-chamber {
    background: rgba(2, 6, 15, 0.9);
    border: 1px solid var(--border-holo);
    border-radius: 14px;
    padding: 1.5rem 1rem;
    margin: 0.75rem 0;
}

.interactive-saber {
    margin: 0;
    max-width: 100%;
}

.kyber-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
}

.kyber-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-body);
    padding: 0.5rem 0.3rem;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.kyber-btn.active {
    border-color: var(--saber-core);
    background: var(--saber-soft);
    color: #ffffff;
}

.crystal-gem {
    width: 13px;
    height: 13px;
    transform: rotate(45deg);
    border-radius: 2px;
}

.crystal-gem.blue {
    background: #00B4FF;
    box-shadow: 0 0 8px #00B4FF;
}

.crystal-gem.red {
    background: #FF2A36;
    box-shadow: 0 0 8px #FF2A36;
}

.crystal-gem.green {
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
}

.crystal-gem.gold {
    background: #FFD166;
    box-shadow: 0 0 8px #FFD166;
}

/* Special Modules */
.special-sector-module {
    margin-top: 2.25rem;
    background: linear-gradient(160deg, rgba(8, 20, 44, 0.88), rgba(3, 8, 20, 0.94));
    border: 1px solid var(--border-holo);
    border-radius: 18px;
    padding: 1.85rem;
}

.module-top-ribbon {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--saber-core);
    padding-bottom: 0.85rem;
    margin-bottom: 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.red-ribbon {
    color: #FCA5A5;
}

.gold-ribbon {
    color: var(--gold-accent);
}

.yoda-interactive-grid,
.matchday-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.75rem;
    align-items: center;
}

.yoda-left h4,
.matchday-crests-col h4 {
    font-family: var(--font-epic);
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.yoda-left p,
.matchday-crests-col p {
    color: var(--text-body);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.yoda-pills,
.atlas-selector,
.club-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.yoda-btn,
.atlas-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-holo);
    color: var(--text-body);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.yoda-btn.active,
.atlas-btn.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10B981;
    color: #ffffff;
}

.yoda-right-screen,
.matchday-quiz-box,
.atlas-display {
    background: rgba(2, 6, 16, 0.88);
    border: 1px solid var(--border-holo);
    border-radius: 14px;
    padding: 1.4rem;
}

.yoda-tag,
.q-header,
.atlas-coord {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gold-accent);
    display: block;
    margin-bottom: 0.45rem;
}

.yoda-def {
    color: var(--text-bright);
    font-size: 0.92rem;
    margin-bottom: 0.6rem;
}

.yoda-example {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #34D399;
}

.club-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
    border-radius: 99px;
    font-weight: 600;
}

.inter-pill {
    background: rgba(0, 85, 165, 0.28);
    border: 1px solid #00B4FF;
    color: #ffffff;
}

.olimpia-pill {
    background: rgba(220, 38, 38, 0.22);
    border: 1px solid #FCA5A5;
    color: #ffffff;
}

.q-text {
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
    color: var(--text-bright);
}

.q-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.q-opt-btn {
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-body);
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
}

.q-feedback {
    margin-top: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.maul-intro {
    color: var(--text-body);
    font-size: 0.94rem;
    margin-bottom: 1.5rem;
}

.maul-arena-stage {
    padding: 1rem 0 1.5rem;
}

.maul-dual-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.maul-side-box {
    background: rgba(15, 4, 8, 0.8);
    border: 1px solid rgba(255, 30, 39, 0.35);
    border-radius: 12px;
    padding: 1.15rem;
}

.m-side-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--sith-red);
}

.maul-side-box h5 {
    font-family: var(--font-epic);
    font-size: 1.05rem;
    margin: 0.3rem 0;
}

.maul-side-box p {
    font-size: 0.86rem;
    color: var(--text-body);
}

.atlas-selector {
    margin-bottom: 1.15rem;
}

.atlas-display h4 {
    font-family: var(--font-epic);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.atlas-display p {
    color: var(--text-body);
    font-size: 0.94rem;
}

.targeting-computer-screen {
    background: #02050A;
    border: 2px solid var(--gold-accent);
    border-radius: 14px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.trench-wireframe {
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.trench-box {
    position: absolute;
    border: 1.5px solid rgba(229, 184, 66, 0.55);
    animation: trenchPulse 2.4s linear infinite;
}

.b-outer {
    width: 220px;
    height: 110px;
}

.b-mid {
    width: 140px;
    height: 70px;
    animation-delay: 0.8s;
}

.b-inner {
    width: 70px;
    height: 35px;
    animation-delay: 1.6s;
}

@keyframes trenchPulse {
    0% {
        transform: scale(0.5);
        opacity: 0.2;
    }

    50% {
        opacity: 0.9;
    }

    100% {
        transform: scale(1.45);
        opacity: 0;
    }
}

.trench-crosshair {
    width: 24px;
    height: 24px;
    border: 2px solid var(--sith-red);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--sith-red);
}

.t-dist {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--gold-accent);
    letter-spacing: 2px;
}

.t-quote {
    font-style: italic;
    color: var(--text-body);
    font-size: 0.88rem;
    margin-top: 0.4rem;
}

.council-closing-text {
    color: var(--text-body);
    font-size: 0.95rem;
}

.holocron-theater-frame {
    margin-top: 1.75rem;
    background: var(--bg-sector);
    border: 1px solid var(--border-holo-bright);
    border-radius: 20px;
    padding: 1.4rem;
}

.theater-top-hud {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding-bottom: 0.9rem;
}

.hud-rec-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--saber-core);
}

.red-rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #EF4444;
    box-shadow: 0 0 8px #EF4444;
}

.hud-speaker {
    color: var(--gold-accent);
}

.sector-jump-bar {
    margin-top: 2.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-holo);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-jump-prev,
.btn-jump-next {
    background: rgba(8, 19, 42, 0.88);
    border: 1px solid var(--border-holo);
    color: #ffffff;
    padding: 0.9rem 1.4rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.btn-jump-next {
    text-align: right;
    margin-left: auto;
}

.btn-jump-prev:hover,
.btn-jump-next:hover {
    border-color: var(--saber-core);
    background: var(--saber-soft);
    box-shadow: 0 0 20px var(--saber-glow);
}

.jump-meta {
    display: flex;
    flex-direction: column;
}

.jump-small {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    color: var(--saber-core);
    letter-spacing: 1.5px;
}

.jump-title {
    font-family: var(--font-epic);
    font-size: 1.02rem;
    font-weight: 700;
}

.site-footer {
    background: rgba(1, 3, 9, 0.94);
    border-top: 1px solid var(--border-holo);
    padding: 2.1rem 0 1.6rem;
    margin-top: auto;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.f-author {
    display: block;
    font-family: var(--font-epic);
    font-weight: 700;
    font-size: 1.02rem;
}

.f-sub,
.footer-right {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.footer-anniversary-banner {
    padding-top: 1.1rem;
    text-align: center;
    font-family: var(--font-epic);
    font-size: 0.86rem;
    color: var(--gold-accent);
}

/* =========================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================= */
@media (max-width: 1120px) {
    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: rgba(2, 6, 16, 0.98);
        border-bottom: 2px solid var(--saber-core);
        padding: 1.25rem 1.5rem;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.35s ease;
    }

    .main-nav.open {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-link {
        padding: 0.7rem 1rem;
        font-size: 0.92rem;
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 920px) {

    .hero-command-grid,
    .bento-narrative-grid,
    .panel-columns,
    .corridor-content-grid,
    .terminals-asymmetric-grid,
    .holo-seals-grid,
    .yoda-interactive-grid,
    .matchday-grid,
    .grievous-grid,
    .maul-dual-cards {
        grid-template-columns: 1fr;
    }

    .bento-wide,
    .span-7,
    .span-5 {
        grid-column: span 1;
    }

    .hero-right-col {
        order: -1;
    }
}

@media (max-width: 600px) {

    .vader-corridor-section,
    .holocron-panel,
    .holocron-terminal-card,
    .special-sector-module {
        padding: 1.35rem;
    }

    .kyber-selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sector-jump-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-jump-prev,
    .btn-jump-next {
        width: 100%;
    }

    .holocron-standby-chamber.grand-chamber {
        min-height: 360px;
        padding: 3rem 1.35rem;
    }
}

/* CINEMATIC ORBIT — depth, restrained light and a completely clear jump. */
:root {
    --bg-sector: rgba(8, 15, 27, 0.91);
    --bg-sector-hover: rgba(13, 23, 38, 0.95);
    --gold-accent: #d7bb7b;
    --border-holo: rgba(141, 179, 205, 0.22);
    --border-holo-bright: rgba(151, 204, 236, 0.56);
    --panel-shadow: 0 2px 3px rgba(0, 0, 0, .28), 0 16px 36px rgba(0, 0, 0, .33),
        0 42px 80px -32px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(229, 241, 255, .055);
}

body { isolation: isolate; }
#galaxyCanvas { z-index: -2; width: 100%; height: 100%; }
.orbital-watermark { z-index: -1; opacity: .42; top: 100px; }
.sector-views { padding-top: 0; }
.sector-page { animation: sectorFadeIn .65s ease both; }
.sector-page > .container { position: relative; }
.orbital-window {
    position: relative;
    width: min(1360px, 100%);
    min-height: clamp(245px, 29vw, 320px);
    margin: 0 auto 2.25rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.6rem clamp(1.5rem, 5vw, 4rem);
    border-bottom: 1px solid rgba(163, 189, 213, .16);
    background: linear-gradient(0deg, rgba(2, 5, 13, .9), transparent 44%);
}
.orbital-window-caption { display: grid; gap: .28rem; pointer-events: none; }
.orbit-eyebrow {
    font-family: var(--font-mono);
    color: #abc0d4;
    font-size: .62rem;
    letter-spacing: .17em;
}
.orbit-window-title {
    font-family: var(--font-epic);
    font-size: clamp(1.1rem, 2.5vw, 1.65rem);
    letter-spacing: .025em;
    color: #edf1ef;
    text-shadow: 0 2px 18px #000;
}
.orbit-window-meta { color: #849aaa; font-family: var(--font-mono); font-size: .59rem; letter-spacing: .09em; }
.orbit-explore {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .65rem;
    flex-shrink: 0;
    min-height: 44px;
    padding: .6rem .95rem;
    border: 1px solid rgba(173, 203, 224, .34);
    border-radius: 7px;
    background: rgba(6, 14, 25, .76);
    color: #d7e5ef;
    font: 500 .72rem var(--font-mono);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: border-color .2s ease, background .2s ease;
}
.orbit-explore:hover { background: #152536; border-color: #b8d9ea; }
.orbit-explore > span:first-child { font-size: 1.4rem; line-height: 1; color: #a2c6df; }
.orbit-controls {
    position: fixed;
    z-index: 1600;
    bottom: max(1.5rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    width: min(700px, calc(100% - 2rem));
    padding: 1rem;
    background: rgba(4, 11, 21, .78);
    border: 1px solid rgba(167, 195, 213, .25);
    border-radius: 12px;
    backdrop-filter: blur(14px);
    box-shadow: var(--panel-shadow);
    touch-action: pan-y;
}
.orbit-controls[hidden] { display: none; }
.orbit-controls p { margin: .2rem 0 0; color: #a6bacb; font-size: .75rem; }

/* Visibility is immediate: no ghost text during acceleration, even with keyboard focus. */
body:is(.is-jumping, .is-cruising, .is-observing) :is(.site-header, .sector-views, .site-footer, .orbital-watermark) {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: none;
}
body:is(.is-jumping, .is-cruising, .is-observing) { overflow: hidden; touch-action: none; }
body:is(.is-jumping, .is-cruising, .is-observing) #galaxyCanvas { z-index: 1500; }
body.is-jumping .hyperspace-hud-flash { visibility: hidden; }
.hyperspace-cruise-hud {
    z-index: 1600;
    padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
}
.hyperspace-cruise-hud:not(.active) { visibility: hidden; }
body.cockpit-pure-window .hyperspace-cruise-hud { background: none; }
body.cockpit-pure-window :is(.cruise-top-telemetry, .cruise-center-reticle, .cruise-stat) { visibility: hidden; }
body.cockpit-pure-window .cruise-bottom-bar {
    width: auto;
    max-width: 100%;
    margin: auto 0 0 auto;
    padding: .5rem;
    background: rgba(2, 8, 18, .42);
    border-color: rgba(173, 203, 224, .18);
    box-shadow: none;
}
body.cockpit-pure-window .cruise-stat { display: none; }
.hyperspace-hud-flash { inset: auto 1rem max(1rem, env(safe-area-inset-bottom)); z-index: 1300; }
.hyperspace-coordinates { padding: .6rem 1rem; box-shadow: 0 8px 32px #0008; border-color: #9ebace44; }
.hyper-dest { font-size: .76rem; }
.hyper-tag { font-size: .57rem; }
.cruise-center-reticle { opacity: .35; }
.btn-cruise-exit { border-color: #b5d0e36b; color: #e2eef7; background: #0a1729b3; }
.btn-cruise-exit:hover { background: #21364b; }
.btn-cruise-toggle { border-color: #94bbd34f; background: #10243b80; }

/* Soft contact shadow, metallic top edge, quiet accent. */
:is(.holocron-panel, .holocron-terminal-card, .special-sector-module, .portrait-holocron-card, .holocron-theater-frame) {
    background: linear-gradient(145deg, rgba(20, 32, 48, .94), rgba(7, 13, 24, .96) 60%, rgba(5, 11, 20, .96));
    border-color: var(--border-holo);
    box-shadow: var(--panel-shadow);
}
.holocron-panel { transition: border-color .25s ease, box-shadow .25s ease; }
@media (hover: hover) and (pointer: fine) {
    .holocron-panel:hover { border-color: rgba(166, 196, 218, .38); box-shadow: var(--panel-shadow), 0 0 30px rgba(40, 90, 130, .04); }
}
.text-saber-glow { color: #d8efff; text-shadow: 0 0 24px rgba(77, 170, 231, .27); }
.text-gold-glow { text-shadow: 0 0 24px rgba(215, 187, 123, .15); }
.panel-nerazzurri-accent { width: 3px; opacity: .7; }
.portrait-viewport { background: #0a111c; }
.portrait-photo { filter: saturate(.88) contrast(1.03); }
.portrait-scanline { opacity: .3; }
.site-header { border-bottom: 1px solid #a4bdd018; box-shadow: 0 4px 28px #0004; }
.nav-link.active { background: linear-gradient(135deg, var(--saber-soft), #0c1a2c); border-color: #7295b057; box-shadow: inset 0 1px 0 #c2e7ff0d; }
.header-lightsaber-bar { opacity: .7; }
.blade-line { box-shadow: 0 0 7px var(--saber-core); }
.telemetry-strip { border-color: #91b0c12b; background: #091321d9; }
.btn-terminal-action { background: linear-gradient(135deg, #16466c, #246289); border: 1px solid #9acceb4a; min-height: 44px; }
.holocron-badge-pill { border-color: #92afc22f; background: #102236b3; color: #accde4; }
.btn-vader-ignite { background: linear-gradient(135deg, #4b131d, #8b2e3b); border-color: #b96e7666; box-shadow: 0 5px 20px #0005; }
.vader-corridor-section { border-color: #c07e872e; box-shadow: var(--panel-shadow); }
.vader-corridor-section.vader-ignited { border-color: #ba5e695c; box-shadow: var(--panel-shadow), 0 0 60px -30px #bf183a42; }
.vader-hallway-stage { min-height: 430px; background: #020307; box-shadow: inset 0 0 40px #000; }
.vader-cinematic-svg { max-width: 420px; display: block; }
.vader-crimson-blade { transform-origin: 316px 282px; }
.vader-chiaroscuro-body { opacity: .15; }
.vader-corridor-section.vader-ignited .vader-chiaroscuro-body { opacity: 1; }
.hallway-prompt-badge { max-width: calc(100% - 1.25rem); border-radius: 6px; line-height: 1.5; text-align: center; font-size: .57rem; padding: .5rem .6rem; }
.grievous-saber-rack { padding: .5rem 1.25rem 1.25rem; gap: .8rem; background: radial-gradient(ellipse at 50% 35%, #182c2b90, #040a13 75%); border-color: #a4c0b333; box-shadow: inset 0 1px 0 #e0efde08, 0 12px 36px #0005; }
.grievous-figure { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto .5rem; overflow: visible; }
.grievous-plasma { opacity: 1; transition: opacity .25s ease; }
.retracted .grievous-plasma { opacity: 0; }
.grievous-saber-rack .g-hilt { width: 28px; height: 8px; }
.grievous-saber-rack .g-label { width: auto; flex: 0 1 155px; font-size: .62rem; }
.grievous-saber-rack .g-blade { min-width: 25px; opacity: .65; height: 4px; }
.grievous-saber-rack .g-core { height: 2px; }
.spinning .grievous-plasma { animation: plasmaSweep .65s ease both; transform-origin: 240px 190px; }
@keyframes plasmaSweep { 0% { opacity: 0; transform: scale(.8); } 45% { opacity: .8; } 100% { opacity: 1; transform: scale(1); } }

/* Intrinsic sizing prevents long telemetry, headings and archive cards from widening the page. */
:is(.hero-command-grid, .bento-narrative-grid, .panel-columns, .corridor-content-grid,
    .terminals-asymmetric-grid, .holo-seals-grid, .yoda-interactive-grid, .matchday-grid,
    .grievous-grid, .maul-dual-cards) > * { min-width: 0; }
img, video, iframe { max-width: 100%; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid #c3e2f5; outline-offset: 5px; }
.tele-item, .panel-code, .module-top-ribbon, .chamber-code, .terminal-top-bar, .brand-meta { overflow-wrap: anywhere; }
.tele-dot, .hyper-dot, .pulse-red-dot { flex-shrink: 0; }

@media (max-width: 1120px) {
    .main-nav { top: 100%; max-height: calc(100dvh - 76px); overflow-y: auto; }
    .main-nav:not(.open) { visibility: hidden; pointer-events: none; }
    .main-nav.open { visibility: visible; pointer-events: auto; }
    .nav-link { min-height: 44px; }
}
@media (min-width: 921px) and (max-width: 1120px) {
    .header-container { padding-inline: 1.5rem; }
}
@media (max-width: 920px) {
    .hero-right-col { order: 0; }
    .hero-command-grid { gap: 2rem; }
    .portrait-holocron-card { margin-inline: auto; }
    .orbital-window { min-height: 290px; }
    .corridor-content-grid { gap: 1.75rem; }
    .vader-hallway-stage { max-width: 480px; width: 100%; margin-inline: auto; }
    .grievous-saber-rack { max-width: 520px; width: 100%; margin-inline: auto; }
}
@media (max-width: 600px) {
    .container { padding-inline: 1rem; }
    .header-container { padding: .65rem .85rem; gap: .5rem; }
    .brand-holocron { gap: .45rem; flex-shrink: 1; min-width: 0; }
    .inter-galactic-crest { width: 31px; height: 31px; flex-shrink: 0; }
    .brand-title { font-size: clamp(.59rem, 2.4vw, .8rem); letter-spacing: .025em; }
    .brand-subtitle { font-size: .49rem; letter-spacing: 0; }
    .header-right-controls { gap: .3rem; flex-shrink: 0; }
    .btn-hyperdrive-toggle { padding: .5rem .6rem; min-height: 44px; font-size: .6rem; letter-spacing: 0; gap: .35rem; }
    .mobile-menu-btn { min-width: 38px; min-height: 44px; }
    .orbital-window { min-height: 270px; padding: 1rem; margin-bottom: 1.5rem; gap: .6rem; }
    .orbit-window-title { max-width: 220px; font-size: 1.05rem; }
    .orbit-window-meta { max-width: 210px; font-size: .5rem; }
    .orbit-eyebrow { font-size: .51rem; letter-spacing: .1em; }
    .orbit-explore { font-size: .61rem; padding: .5rem .6rem; gap: .4rem; }
    .orbital-window .orbit-explore { margin-bottom: .1rem; }
    .orbital-window .orbit-explore > span:first-child { display: none; }
    .orb-sys-name { font-size: 1.1rem; letter-spacing: .12em; }
    .orb-sys-code { font-size: .5rem; letter-spacing: .07em; }
    .epic-hero-title { font-size: clamp(2rem, 8.6vw, 3rem); line-height: 1.18; }
    .telemetry-strip { font-size: .61rem; padding: .8rem; margin-bottom: 1.6rem; }
    .holocron-badge-pill { font-size: .6rem; letter-spacing: .045em; border-radius: 8px; }
    .hero-actions { width: 100%; gap: .75rem; }
    .hero-actions .btn-holocron { width: 100%; justify-content: center; }
    .hero-lead-text { font-size: .96rem; }
    .bento-narrative-grid, .terminals-asymmetric-grid { gap: 1rem; }
    .panel-title { font-size: 1.25rem; }
    .panel-header { align-items: flex-start; }
    .vader-corridor-section { padding: 1rem; border-radius: 16px; }
    .vader-hallway-stage { min-height: 0; }
    .vader-heading { font-size: 1.4rem; }
    .vader-kicker { letter-spacing: .08em; }
    .btn-vader-ignite { padding: .7rem 1rem; width: 100%; font-size: .75rem; min-height: 44px; }
    .grievous-saber-rack { padding-inline: .75rem; }
    .grievous-saber-rack .g-label { flex-basis: 143px; font-size: .57rem; }
    .kyber-btn, .db-tab, .q-opt-btn, .yoda-btn, .atlas-btn { min-height: 44px; }
    .cruise-bottom-bar { padding: .75rem; gap: .6rem; }
    .cruise-top-telemetry { border-radius: 10px; padding: .7rem; font-size: .55rem; }
    .cruise-coords { overflow-wrap: anywhere; }
    .cruise-stat .c-val { font-size: .65rem; }
    .cruise-controls { display: grid; grid-template-columns: 1fr; gap: .45rem; width: 100%; }
    .cruise-controls button { min-height: 44px; font-size: .64rem; padding: .5rem .75rem; }
    body.cockpit-pure-window .cruise-bottom-bar { width: min(270px, 100%); }
    .orbit-controls { gap: .75rem; flex-direction: column; align-items: stretch; bottom: max(1rem, env(safe-area-inset-bottom)); }
    .orbit-controls p { font-size: .7rem; }
    .orbit-controls .orbit-explore { min-height: 44px; }
    .hyperspace-cruise-hud { padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom)); }
    .chamber-title, .sector-title, .epic-section-title { overflow-wrap: anywhere; }
    .targeting-computer-screen { padding: 1.25rem .8rem; }
    .b-outer { max-width: 90%; }
    .site-footer { padding-top: 1.5rem; }
}
@media (max-width: 360px) {
    .brand-title { font-size: .56rem; }
    .brand-subtitle { font-size: .42rem; }
    .inter-galactic-crest { width: 26px; }
    .btn-hyperdrive-toggle { font-size: .56rem; padding-inline: .45rem; }
    .orbital-window { align-items: flex-end; }
    .orbit-window-title { max-width: 180px; }
    .orbit-window-meta { max-width: 178px; }
    .special-sector-module, .holocron-panel, .holocron-terminal-card { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}
