
        /* Centralized Design Token Typography */
        :root {
            --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --font-serif: 'Lora', Georgia, Cambria, "Times New Roman", Times, serif;
            --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        }

        html, body {
            overflow-x: clip;
            max-width: 100%;
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE/Edge */
        }
        html::-webkit-scrollbar,
        body::-webkit-scrollbar {
            display: none; /* Hide root scrollbar for clean native presentation */
            width: 0;
            height: 0;
        }
        body {
            font-family: var(--font-sans);
            background-color: #050506;
            color: #E4E4E7;
            position: relative;
            transition: background-color 0.8s ease;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Enforce Glass Theme Typography SSOT */
        body:not([data-theme]) {
            font-family: var(--font-sans);
        }
        body:not([data-theme]) .font-sans {
            font-family: var(--font-sans) !important;
        }
        body:not([data-theme]) .font-serif {
            font-family: var(--font-serif) !important;
        }
        body:not([data-theme]) .font-mono {
            font-family: var(--font-mono) !important;
        }
        #app-drawer {
            overscroll-behavior: contain;
        }
        /* Glassmorphism utility */
        .glass {
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }
        /* PERF: The fixed top status bar skips backdrop-filter entirely.
           A fixed blurred element forces the GPU to re-blur the page behind it on every scrolled frame. */
        .top-statusbar {
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            background: rgba(8, 8, 10, 0.85) !important;
        }
        /* Grid background pattern */
        .grid-bg {
            background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
                              linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
            background-size: 40px 40px;
        }
        /* Keyframe animations */
        @keyframes wavePulse {
            0%, 100% { transform: scaleY(0.3); }
            50% { transform: scaleY(1); }
        }
        .wave-bar {
            animation: wavePulse 1.2s ease-in-out infinite;
        }
        @keyframes scanline {
            0% { top: 0%; }
            100% { top: 100%; }
        }
        .scanline-active::after {
            content: '';
            position: absolute;
            width: 100%;
            height: 4px;
            background: rgba(16, 185, 129, 0.5);
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
            animation: scanline 1.5s linear infinite;
        }
        /* Magnetic hover button state */
        .magnetic-btn {
            transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease;
        }
        @keyframes scroll-line-trace {
            0% { transform: translateY(-100%); }
            70%, 100% { transform: translateY(200%); }
        }
        .scroll-line-animate {
            animation: scroll-line-trace 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
        }
        /* PERF: Composited transform-based flow. Animating left/right forced a
           layout recalculation on every single frame of these infinite loops. */
        @keyframes flow-right {
            0% { transform: translateX(-10%) translateZ(0); opacity: 0; }
            20%, 80% { opacity: 1; }
            100% { transform: translateX(110%) translateZ(0); opacity: 0; }
        }
        @keyframes flow-left {
            0% { transform: translateX(10%) translateZ(0); opacity: 0; }
            20%, 80% { opacity: 1; }
            100% { transform: translateX(-110%) translateZ(0); opacity: 0; }
        }
        .animate-flow-right {
            animation: flow-right 2s infinite linear;
            will-change: transform, opacity;
        }
        .animate-flow-left {
            animation: flow-left 2s infinite linear;
            animation-delay: 1s; /* Offset loops to create conversational feel */
            will-change: transform, opacity;
        }

        /* Preset: Paper Notebook Theme with ruled horizontal stripes and classic serif typography */
        body[data-theme="paper"] {
            background-color: #f9f6f0 !important;
            color: #2b2a27 !important;
            font-family: 'EB Garamond', serif !important;
        }
        body[data-theme="paper"].grid-bg {
            background-image: linear-gradient(rgba(160, 82, 45, 0.06) 1px, transparent 1px) !important;
            background-size: 100% 28px !important;
            background-attachment: fixed !important;
        }
        body[data-theme="paper"] .glass {
            background: #ffffff !important;
            border-color: rgba(160, 82, 45, 0.15) !important;
            color: #2b2a27 !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
        }
        body[data-theme="paper"] h1, 
        body[data-theme="paper"] h2, 
        body[data-theme="paper"] h3, 
        body[data-theme="paper"] h4,
        body[data-theme="paper"] h5,
        body[data-theme="paper"] p,
        body[data-theme="paper"] span,
        body[data-theme="paper"] button,
        body[data-theme="paper"] strong,
        body[data-theme="paper"] a,
        body[data-theme="paper"] li {
            font-family: 'EB Garamond', serif !important;
            color: #2b2a27 !important;
        }
        body[data-theme="paper"] .text-white,
        body[data-theme="paper"] .text-zinc-100,
        body[data-theme="paper"] .text-zinc-200,
        body[data-theme="paper"] .text-zinc-300,
        body[data-theme="paper"] .text-emerald-300,
        body[data-theme="paper"] .text-emerald-400 {
            color: #2b2a27 !important;
        }
        body[data-theme="paper"] .text-zinc-400,
        body[data-theme="paper"] .text-zinc-500,
        body[data-theme="paper"] .text-zinc-600 {
            color: #6e6b64 !important;
        }
        body[data-theme="paper"] .border-white\/5,
        body[data-theme="paper"] .border-white\/10 {
            border-color: rgba(160, 82, 45, 0.1) !important;
        }

        /* Fixed book seam shadow on the right side of the screen - pronounced dithered curve to prevent banding */
        body[data-theme="paper"]::after {
            content: '';
            position: fixed;
            top: 0;
            right: 0;
            width: 25%;
            height: 100vh;
            background: linear-gradient(
                to left, 
                rgba(15, 12, 10, 0.95) 0%,
                rgba(15, 12, 10, 0.70) 8%,
                rgba(15, 12, 10, 0.42) 22%,
                rgba(15, 12, 10, 0.20) 45%,
                rgba(15, 12, 10, 0.06) 72%,
                transparent 100%
            ) !important;
            pointer-events: none;
            z-index: 9999;
        }

        /* Style the App Directory Drawer to match Paper Notebook lines */
        body[data-theme="paper"] #app-drawer {
            background-color: #f9f6f0 !important;
            border-left: 1px solid rgba(160, 82, 45, 0.15) !important;
            color: #2b2a27 !important;
            background-image: linear-gradient(rgba(160, 82, 45, 0.06) 1px, transparent 1px) !important;
            background-size: 100% 28px !important;
        }
        body[data-theme="paper"] #app-drawer .drawer-app-card {
            background: #ffffff !important;
            border: 1px solid rgba(160, 82, 45, 0.15) !important;
            box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
        }
        body[data-theme="paper"] #app-drawer h5,
        body[data-theme="paper"] #app-drawer p,
        body[data-theme="paper"] #app-drawer span,
        body[data-theme="paper"] #app-drawer button,
        body[data-theme="paper"] #app-drawer div {
            color: #2b2a27 !important;
        }
        body[data-theme="paper"] #app-drawer svg {
            color: rgba(160, 82, 45, 0.8) !important;
            stroke: rgba(160, 82, 45, 0.8) !important;
        }
        body[data-theme="paper"] #app-drawer .bg-purple-500\/10,
        body[data-theme="paper"] #app-drawer .bg-red-500\/10,
        body[data-theme="paper"] #app-drawer .bg-blue-500\/10 {
            background: rgba(160, 82, 45, 0.05) !important;
            border-color: rgba(160, 82, 45, 0.15) !important;
        }

        /* Preset: Retro Arcade Theme */
        body[data-theme="arcade"] {
            background-color: #050510 !important;
            color: #39ff14 !important;
            font-family: 'VT323', monospace !important;
        }
        body[data-theme="arcade"].grid-bg {
            background-image: none !important;
        }
        body[data-theme="arcade"] .glass {
            background: #0c0c1e !important;
            border-color: #39ff14 !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
        }
        body[data-theme="arcade"] h1, 
        body[data-theme="arcade"] h2, 
        body[data-theme="arcade"] h3,
        body[data-theme="arcade"] h4,
        body[data-theme="arcade"] h5,
        body[data-theme="arcade"] p,
        body[data-theme="arcade"] span,
        body[data-theme="arcade"] strong,
        body[data-theme="arcade"] button,
        body[data-theme="arcade"] a,
        body[data-theme="arcade"] code {
            color: #39ff14 !important;
            font-family: 'VT323', monospace !important;
        }
        body[data-theme="arcade"] .text-white,
        body[data-theme="arcade"] .text-zinc-100,
        body[data-theme="arcade"] .text-zinc-200,
        body[data-theme="arcade"] .text-zinc-300,
        body[data-theme="arcade"] .text-emerald-300,
        body[data-theme="arcade"] .text-emerald-400 {
            color: #39ff14 !important;
        }
        body[data-theme="arcade"] .text-zinc-400,
        body[data-theme="arcade"] .text-zinc-500,
        body[data-theme="arcade"] .text-zinc-600 {
            color: #ff007f !important;
        }
        body[data-theme="arcade"] .border-white\/5,
        body[data-theme="arcade"] .border-white\/10 {
            border-color: #39ff14 !important;
        }

        /* Preset: Retro LCD Theme (Monochrome Olive-Green Matrix) */
        body[data-theme="lcd"] {
            background-color: #8bac0f !important;
            color: #0f380f !important;
            font-family: 'VT323', monospace !important;
        }
        body[data-theme="lcd"].grid-bg {
            background-image: none !important;
        }
        body[data-theme="lcd"] .glass {
            background: #9bbc0f !important;
            border-color: #306230 !important;
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            box-shadow: none !important;
        }
        body[data-theme="lcd"] h1, 
        body[data-theme="lcd"] h2, 
        body[data-theme="lcd"] h3,
        body[data-theme="lcd"] h4,
        body[data-theme="lcd"] h5,
        body[data-theme="lcd"] p,
        body[data-theme="lcd"] span,
        body[data-theme="lcd"] strong,
        body[data-theme="lcd"] button,
        body[data-theme="lcd"] a,
        body[data-theme="lcd"] code {
            color: #0f380f !important;
            font-family: 'VT323', monospace !important;
        }
        body[data-theme="lcd"] .text-white,
        body[data-theme="lcd"] .text-zinc-100,
        body[data-theme="lcd"] .text-zinc-200,
        body[data-theme="lcd"] .text-zinc-300,
        body[data-theme="lcd"] .text-emerald-300,
        body[data-theme="lcd"] .text-emerald-400 {
            color: #0f380f !important;
        }
        body[data-theme="lcd"] .text-zinc-400,
        body[data-theme="lcd"] .text-zinc-500,
        body[data-theme="lcd"] .text-zinc-600 {
            color: #306230 !important;
        }
        body[data-theme="lcd"] .border-white\/5,
        body[data-theme="lcd"] .border-white\/10 {
            border-color: #306230 !important;
        }
        body[data-theme="lcd"] svg {
            color: #0f380f !important;
            stroke: #0f380f !important;
        }
        /* Style badges, inputs, and container fills to match solid Game Boy elements */
        body[data-theme="lcd"] .bg-emerald-500\/10,
        body[data-theme="lcd"] .bg-emerald-500\/20,
        body[data-theme="lcd"] .bg-zinc-800\/40,
        body[data-theme="lcd"] .bg-zinc-950\/50,
        body[data-theme="lcd"] .bg-purple-500\/10,
        body[data-theme="lcd"] .bg-red-500\/10,
        body[data-theme="lcd"] .bg-blue-500\/10,
        body[data-theme="lcd"] .bg-yellow-500\/10,
        body[data-theme="lcd"] .bg-emerald-500\/5 {
            background: #9bbc0f !important;
            border: 1px solid #306230 !important;
        }

        /* Force all dynamic pings, active points, and orange badges to monochrome dark LCD green */
        body[data-theme="lcd"] .rounded-full.bg-emerald-400,
        body[data-theme="lcd"] .rounded-full.bg-emerald-500,
        body[data-theme="lcd"] .rounded-full.animate-pulse,
        body[data-theme="lcd"] .rounded-full.animate-ping {
            background-color: #0f380f !important;
            box-shadow: 0 0 6px #0f380f !important;
        }
        body[data-theme="lcd"] .bg-amberShield\/10 {
            background-color: #9bbc0f !important;
            border: 1px solid #306230 !important;
        }
        body[data-theme="lcd"] .text-amberShield {
            color: #0f380f !important;
            border-color: #306230 !important;
            background-color: #9bbc0f !important;
        }

        /* Prevent scroll leak on body when off-canvas modals are active */
        body.overflow-hidden {
            overflow: hidden !important;
        }

        /* Style the App Directory Drawer to match the solid monochrome Game Boy LCD */
        body[data-theme="lcd"] #app-drawer {
            background-color: #9bbc0f !important;
            border-left: 1px solid #306230 !important;
            color: #0f380f !important;
        }
        body[data-theme="lcd"] #app-drawer .drawer-app-card {
            background: #8bac0f !important;
            border: 1px solid #306230 !important;
        }
        body[data-theme="lcd"] #app-drawer h5,
        body[data-theme="lcd"] #app-drawer p,
        body[data-theme="lcd"] #app-drawer span,
        body[data-theme="lcd"] #app-drawer button,
        body[data-theme="lcd"] #app-drawer div {
            color: #0f380f !important;
        }
        body[data-theme="lcd"] #app-drawer svg {
            color: #0f380f !important;
            stroke: #0f380f !important;
        }
        body[data-theme="lcd"] #app-drawer .bg-purple-500\/10,
        body[data-theme="lcd"] #app-drawer .bg-red-500\/10,
        body[data-theme="lcd"] #app-drawer .bg-blue-500\/10 {
            background: #9bbc0f !important;
            border-color: #306230 !important;
        }

        /* Reusable Semantic Chat Bubble Classes */
        .bubble-human {
            background: rgba(39, 39, 42, 0.4) !important;
            color: #e4e4e7 !important;
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
        }
        .bubble-human-highlight {
            background: rgba(39, 39, 42, 0.8) !important;
            color: #ffffff !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
            font-weight: 500 !important;
        }
        .bubble-ai {
            background: rgba(16, 185, 129, 0.1) !important;
            color: #a7f3d0 !important;
            border: 1px solid rgba(16, 185, 129, 0.2) !important;
        }

        /* Interoperability Vector Bridge Styles */
        .interop-line {
            background: rgba(16, 185, 129, 0.25);
        }
        .interop-pulse {
            background: #10B981;
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
        }

        /* Scrollbar track and thumb overrides for Paper Theme */
        body[data-theme="paper"] ::-webkit-scrollbar-track {
            background: #f1ebd9 !important;
        }
        body[data-theme="paper"] ::-webkit-scrollbar-thumb {
            background: #c2b59b !important;
        }

        /* Scrollbar track and thumb overrides for Retro LCD Theme */
        body[data-theme="lcd"] ::-webkit-scrollbar-track {
            background: #9bbc0f !important;
        }
        body[data-theme="lcd"] ::-webkit-scrollbar-thumb {
            background: #306230 !important;
            border-radius: 0px !important; /* Pixel-perfect square corners */
        }

        /* Semantic Bubble Overrides for Paper Theme */
        body[data-theme="paper"] .bubble-human {
            background: #f1ebd9 !important;
            color: #2b2a27 !important;
            border-color: rgba(160, 82, 45, 0.15) !important;
        }
        body[data-theme="paper"] .bubble-human-highlight {
            background: #e6dcc3 !important;
            color: #121211 !important;
            border-color: rgba(160, 82, 45, 0.25) !important;
            font-weight: 600 !important;
        }
        body[data-theme="paper"] .bubble-ai {
            background: #e6edd8 !important;
            color: #3b5323 !important;
            border-color: rgba(85, 107, 47, 0.2) !important;
        }
        body[data-theme="paper"] .interop-line {
            background: rgba(160, 82, 45, 0.2) !important;
        }
        body[data-theme="paper"] .interop-pulse {
            background: #8b4513 !important;
            box-shadow: none !important;
        }

        /* Semantic Bubble Overrides for Retro LCD Theme */
        body[data-theme="lcd"] .bubble-human {
            background: #8bac0f !important;
            color: #0f380f !important;
            border-color: #306230 !important;
        }
        body[data-theme="lcd"] .bubble-human-highlight {
            background: #306230 !important;
            color: #9bbc0f !important;
            border-color: #0f380f !important;
            font-weight: bold !important;
        }
        body[data-theme="lcd"] .bubble-ai {
            background: #9bbc0f !important;
            color: #0f380f !important;
            border-color: #306230 !important;
        }
        body[data-theme="lcd"] .interop-line {
            background: #306230 !important;
            opacity: 0.35 !important;
        }
        body[data-theme="lcd"] .interop-pulse {
            background: #0f380f !important;
            box-shadow: none !important;
        }

        /* Theme Slider Overrides */
        body[data-theme="paper"] #theme-slider {
            background-color: rgba(160, 82, 45, 0.12) !important;
        }
        body[data-theme="arcade"] #theme-slider {
            background-color: #39ff14 !important;
            box-shadow: 0 0 12px rgba(57, 255, 20, 0.6) !important;
            opacity: 1 !important;
        }
        body[data-theme="arcade"] .theme-tab-btn.active {
            color: #050510 !important;
            font-weight: bold !important;
        }
        body[data-theme="lcd"] #theme-slider {
            background-color: #306230 !important;
            border-radius: 0px !important;
        }
        body[data-theme="lcd"] .theme-tab-btn.active {
            color: #9bbc0f !important;
        }

        /* Ensure uppercase span kickers can be GPU animated */
        section span.uppercase {
            display: block;
        }

        /* High-Performance Scroll Reveal with will-change Layer Promotion */
        .reveal-on-scroll {
            opacity: 0;
            transform: translateY(20px) translateZ(0); /* translateZ forces GPU layer promotion */
            transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
            will-change: opacity, transform;
        }
        .reveal-on-scroll.revealed {
            opacity: 1;
            transform: translateY(0) translateZ(0);
            /* PERF: Release the GPU layer once the entrance animation has completed */
            will-change: auto;
        }

        /* Kinetic detailing for Live Loop callout */
        @keyframes spin-slow {
            0% { transform: rotate(360deg); }
            100% { transform: rotate(0deg); }
        }
        .animate-spin-slow {
            animation: spin-slow 12s linear infinite;
        }

        @keyframes float-gentle {
            0%, 100% { transform: translateY(0) translateZ(0); }
            50% { transform: translateY(-6px) translateZ(0); }
        }
        .animate-float-gentle {
            animation: float-gentle 4s ease-in-out infinite;
            will-change: transform;
        }

        /* PERF: Simmer rebuilt as a composited opacity pulse on a pseudo-element.
           Animating box-shadow directly forces expensive repaints every frame. */
        .animate-simmer {
            position: relative;
            box-shadow: 0 0 25px rgba(16, 185, 129, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
        }
        .animate-simmer::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            box-shadow: 0 0 55px rgba(16, 185, 129, 0.35), inset 0 0 24px rgba(16, 185, 129, 0.12), inset 0 0 0 1px rgba(16, 185, 129, 0.45);
            opacity: 0;
            animation: simmer-opacity 6s ease-in-out infinite;
            will-change: opacity;
        }
        @keyframes simmer-opacity {
            0%, 100% { opacity: 0; }
            50% { opacity: 1; }
        }

        /* Custom Simmer styling for Paper Theme (Tactile Drop-Shadow Breathing) */
        body[data-theme="paper"] .animate-simmer {
            box-shadow: 0 4px 15px rgba(43, 42, 39, 0.08), inset 0 0 0 1px rgba(160, 82, 45, 0.1) !important;
        }
        body[data-theme="paper"] .animate-simmer::after {
            box-shadow: 0 16px 35px rgba(43, 42, 39, 0.22), inset 0 0 0 1px rgba(160, 82, 45, 0.2);
        }

        /* Custom Simmer styling for Arcade Theme (Unchanged high-contrast neon green pulse) */
        body[data-theme="arcade"] .animate-simmer {
            box-shadow: 0 0 15px rgba(57, 255, 20, 0.1), inset 0 0 0 1px rgba(57, 255, 20, 0.25) !important;
        }
        body[data-theme="arcade"] .animate-simmer::after {
            box-shadow: 0 0 35px rgba(57, 255, 20, 0.35), inset 0 0 0 1px rgba(57, 255, 20, 0.6);
            animation-duration: 4s;
        }

        /* Custom Simmer styling for LCD Theme (Sharp pixelated drop-shadow pulse) */
        body[data-theme="lcd"] .animate-simmer {
            box-shadow: 0 3px 0px rgba(15, 56, 15, 0.25), inset 0 0 0 1px rgba(48, 98, 48, 0.3) !important;
        }
        body[data-theme="lcd"] .animate-simmer::after {
            box-shadow: 0 8px 0px rgba(15, 56, 15, 0.8), inset 0 0 0 1px rgba(15, 56, 15, 0.6);
        }

        /* Fail-Safe stable state smooth recovery transition (Fade & Descend) */
        @keyframes failsafeFadeDescend {
            0% {
                opacity: 0;
                transform: translateY(-16px) translateZ(0);
            }
            100% {
                opacity: 1;
                transform: translateY(0) translateZ(0);
            }
        }
        .animate-failsafe-restore {
            animation: failsafeFadeDescend 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
            will-change: opacity, transform;
        }

        /* macOS Spring Zoom Animation for Cascading Windows */
        @keyframes macosSpringZoom {
            0% {
                opacity: 0;
                transform: scale(0.82) translateZ(0);
            }
            70% {
                opacity: 1;
                transform: scale(1.04) translateZ(0); /* Gentle elastic spring overshoot */
            }
            100% {
                opacity: 1;
                transform: scale(1) translateZ(0);
            }
        }
        .macos-window {
            opacity: 0;
            transform: scale(0.82) translateZ(0);
            will-change: opacity, transform;
        }
        .macos-window.animate-in {
            animation: macosSpringZoom 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) both;
        }

        /* Chat Sequence Animations */
        .chat-bubble-hidden {
            display: none !important;
        }
        .md-doc-hidden {
            opacity: 0 !important;
            pointer-events: none !important;
        }
        .chat-animate {
            animation: chatPopIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
            pointer-events: auto !important;
        }
        @keyframes chatPopIn {
            0% { opacity: 0; transform: translateY(10px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        /* Mobile Overlay for Step 3 Document */
        .doc-overlay {
            position: absolute;
            inset: 0;
            padding: 1.5rem;
            z-index: 20;
            background: rgba(5, 5, 6, 0.98);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }
        body[data-theme="paper"] .doc-overlay { background: rgba(249, 246, 240, 0.98); }
        body[data-theme="lcd"] .doc-overlay { background: rgba(139, 172, 15, 0.98); }
        body[data-theme="arcade"] .doc-overlay { background: rgba(5, 5, 16, 0.98); }
        
        @media (min-width: 768px) {
            .doc-overlay {
                position: relative !important;
                inset: auto !important;
                padding: 0 !important;
                padding-left: 0.5rem !important;
                z-index: auto !important;
                background: transparent !important;
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
            }
        }

        /* Random Staggered Slide-In Animation */
        @keyframes themeSlideIn {
            0% { opacity: 0; transform: translateX(-40px); }
            100% { opacity: 1; transform: translateX(0); }
        }
        .theme-slide-active {
            animation: themeSlideIn var(--theme-anim-dur, 1s) cubic-bezier(0.2, 0.8, 0.2, 1) both !important;
            animation-delay: var(--theme-anim-del, 0s) !important;
        }

        /* Diagonal Wipe View Transition */
        ::view-transition-old(root),
        ::view-transition-new(root) {
            animation-duration: 1.2s;
            animation-timing-function: cubic-bezier(0.25, 1, 0.4, 1);
            mix-blend-mode: normal;
        }
        ::view-transition-old(root) {
            animation: none;
            z-index: 1;
            opacity: 1;
        }
        ::view-transition-new(root) {
            animation-name: diagonal-wipe;
            z-index: 2;
        }
        @keyframes diagonal-wipe {
            0% {
                clip-path: polygon(0 100%, 0 100%, 0 100%);
            }
            100% {
                clip-path: polygon(0 -100%, 200% 100%, 0 100%);
            }
        }

        /* View Transition Layering Fix for Theme Slider & Buttons */
        #theme-slider { view-transition-name: theme-slider; }
        .btn-glass-vt { view-transition-name: btn-glass-vt; }
        .btn-paper-vt { view-transition-name: btn-paper-vt; }
        .btn-arcade-vt { view-transition-name: btn-arcade-vt; }
        .btn-lcd-vt { view-transition-name: btn-lcd-vt; }

        /* Accelerate the UI slide to be snappy while the background wipe takes 1.2s */
        ::view-transition-group(theme-slider),
        ::view-transition-group(btn-glass-vt),
        ::view-transition-group(btn-paper-vt),
        ::view-transition-group(btn-arcade-vt),
        ::view-transition-group(btn-lcd-vt) {
            animation-duration: 0.5s;
            animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
        }

        /* Enforce absolute Z-Index hierarchy so the slider NEVER covers the text */
        ::view-transition-group(theme-slider) {
            z-index: 9999;
        }
        ::view-transition-group(btn-glass-vt),
        ::view-transition-group(btn-paper-vt),
        ::view-transition-group(btn-arcade-vt),
        ::view-transition-group(btn-lcd-vt) {
            z-index: 10000;
        }

        /* Instantly show the new slider color to prevent muddy/dark cross-fades */
        ::view-transition-old(theme-slider) {
            display: none;
        }

        /* Constrain PWA Studio compiled SVGs globally inside LaunchSite app indicators */
        .app-grid-icon-btn svg,
        .drawer-icon-wrap svg {
            width: 100% !important;
            height: 100% !important;
            display: block;
            max-width: 100%;
            max-height: 100%;
        }

        /* PERF: Fully detach the closed alert modal from the compositor.
           Its full-viewport backdrop-blur layer otherwise stays alive at all times. */
        #custom-alert-modal.pointer-events-none {
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0s linear 0.3s;
        }

        /* ==========================================
           WOW LAYER: Hero Aurora Orbs (transform-only composited drift)
           Softness is baked into the radial-gradient — no runtime filter cost.
           ========================================== */
        .aurora-orb {
            position: absolute;
            border-radius: 50%;
            pointer-events: none;
            z-index: -1;
            will-change: transform;
        }
        .aurora-orb-1 {
            width: 620px;
            height: 620px;
            top: -12%;
            left: -14%;
            background: radial-gradient(circle at center, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0.05) 42%, transparent 70%);
            animation: aurora-drift-1 16s ease-in-out infinite alternate;
        }
        .aurora-orb-2 {
            width: 520px;
            height: 520px;
            bottom: -14%;
            right: -10%;
            background: radial-gradient(circle at center, rgba(99, 102, 241, 0.14) 0%, rgba(99, 102, 241, 0.04) 45%, transparent 70%);
            animation: aurora-drift-2 20s ease-in-out infinite alternate;
        }
        @keyframes aurora-drift-1 {
            from { transform: translate3d(0, 0, 0) scale(1); }
            to { transform: translate3d(70px, 45px, 0) scale(1.18); }
        }
        @keyframes aurora-drift-2 {
            from { transform: translate3d(0, 0, 0) scale(1.1); }
            to { transform: translate3d(-60px, -35px, 0) scale(0.92); }
        }
        /* Themed presets are flat aesthetics; the ambient aurora belongs to the default glass theme only */
        body[data-theme] .aurora-orb {
            display: none;
        }

        /* ==========================================
           WOW LAYER: Hand-drawn SVG underline stroke for the hero keyword
           ========================================== */
        .hero-underline {
            position: relative;
            display: inline-block;
        }
        .hero-underline-svg {
            position: absolute;
            left: 0;
            bottom: -0.14em;
            width: 100%;
            height: 0.24em;
            overflow: visible;
            opacity: 0.85;
        }
        .hero-underline-svg path {
            stroke-dasharray: 130;
            stroke-dashoffset: 130;
            animation: hero-underline-draw 1.0s cubic-bezier(0.65, 0, 0.35, 1) 0.8s forwards;
        }
        @keyframes hero-underline-draw {
            to { stroke-dashoffset: 0; }
        }
    