        /* ============================================
           MOBILE-FIRST CSS
           Base styles are for mobile, enhanced via min-width
           ============================================ */
        
        :root {
            --primary: #7c3aed;
            --secondary: #ec4899;
            --accent: #06b6d4;
            --success: #10b981;
            --warning: #f59e0b;
            
            --bg-primary: #fafafa;
            --bg-secondary: #ffffff;
            --bg-card: rgba(255, 255, 255, 0.85);
            --bg-glass: rgba(255, 255, 255, 0.6);
            
            --text-primary: #18181b;
            --text-secondary: #52525b;
            --text-muted: #a1a1aa;
            
            --border: rgba(0, 0, 0, 0.1);
            --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.15);
            --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.3);
            
            --gradient-primary: linear-gradient(135deg, #7c3aed, #ec4899);
            
            --color-input: #f43f5e;
            --color-hidden1: #f59e0b;
            --color-hidden2: #06b6d4;
            --color-hidden3: #8b5cf6;
            --color-output: #10b981;
            
            /* Mobile-first spacing */
            --spacing-xs: 0.5rem;
            --spacing-sm: 0.75rem;
            --spacing-md: 1rem;
            --spacing-lg: 1.5rem;
            
            /* Safe area for notched phones */
            --safe-top: env(safe-area-inset-top);
            --safe-bottom: env(safe-area-inset-bottom);
            --safe-left: env(safe-area-inset-left);
            --safe-right: env(safe-area-inset-right);
        }

        [data-theme="dark"] {
            --bg-primary: #030305;
            --bg-secondary: #0a0a0f;
            --bg-card: rgba(10, 10, 20, 0.85);
            --bg-glass: rgba(10, 10, 20, 0.6);
            
            --text-primary: #fafafa;
            --text-secondary: #a1a1aa;
            --text-muted: #71717a;
            
            --border: rgba(255, 255, 255, 0.08);
            --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
            --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.7);
            --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.2);
            
            --color-input: #ff0055;
            --color-hidden1: #ff9500;
            --color-hidden2: #00f0ff;
            --color-hidden3: #bf00ff;
            --color-output: #00ff88;
        }

        /* Apply dark theme automatically if OS prefers dark (prevents flash before JS) */
        @media (prefers-color-scheme: dark) {
            :root:not([data-theme="light"]) {
                --bg-primary: #030305;
                --bg-secondary: #0a0a0f;
                --bg-card: rgba(10, 10, 20, 0.85);
                --bg-glass: rgba(10, 10, 20, 0.6);
                --text-primary: #fafafa;
                --text-secondary: #a1a1aa;
                --text-muted: #71717a;
                --border: rgba(255, 255, 255, 0.08);
                --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
                --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.7);
                --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.2);
                --color-input: #ff0055;
                --color-hidden1: #ff9500;
                --color-hidden2: #00f0ff;
                --color-hidden3: #bf00ff;
                --color-output: #00ff88;
            }
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        html {
            /* Prevent pull-to-refresh and double scrollbar */
            overscroll-behavior: none;
            overflow: hidden;
            height: 100%;
            width: 100%;
        }

        body {
            font-family: 'Syne', sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            overflow: hidden;
            height: 100%;
            width: 100%;
            min-height: 100vh;
            min-height: -webkit-fill-available;
            transition: background 0.5s ease, color 0.3s ease;
            /* Prevent text selection on drag */
            -webkit-user-select: none;
            user-select: none;
        }

        ::selection { background: var(--primary); color: white; }
        ::-webkit-scrollbar { width: 4px; height: 4px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 2px; }

        /* Global focus-visible for keyboard navigation */
        :focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
            border-radius: 4px;
        }

        [data-theme="dark"] :focus-visible {
            outline-color: #00f0ff;
        }

        /* Respect user motion preferences */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
            .loading-screen { transition: none !important; }
            .loading-screen.hidden { opacity: 0; visibility: hidden; }
        }

        /* ============================================
           CANVAS - Mobile Base
           ============================================ */
        #canvas-container { 
            position: fixed; 
            inset: 0; 
            z-index: 1; 
            touch-action: none; /* Prevent browser gestures */
        }

        /* ============================================
           GLASS PANEL - Premium Glassmorphism
           ============================================ */
        .glass-panel {
            background: var(--bg-glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        /* Animated gradient border for glass panels */
        .glass-panel.glow-border::before {
            content: '';
            position: absolute;
            inset: -1px;
            border-radius: inherit;
            padding: 1px;
            background: var(--gradient-primary);
            -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            opacity: 0;
            transition: opacity 0.6s ease;
            pointer-events: none;
            z-index: -1;
        }

        .glass-panel.glow-border:hover::before,
        .glass-panel.glow-border:focus-within::before {
            opacity: 1;
        }

        [data-theme="dark"] .glass-panel.glow-border::before {
            background: linear-gradient(135deg, #00f0ff, #bf00ff, #00f0ff);
            background-size: 200% 100%;
            animation: gradientShift 3s ease infinite;
        }

        @keyframes gradientShift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        /* ============================================
           CUSTOM CURSOR - Desktop Only
           ============================================ */
        @media (hover: hover) and (pointer: fine) {
            .custom-cursor {
                position: fixed;
                width: 20px;
                height: 20px;
                border-radius: 50%;
                pointer-events: none;
                z-index: 9998;
                border: 2px solid var(--primary);
                transform: translate(-50%, -50%);
                transition: width 0.25s ease, height 0.25s ease, border-color 0.3s ease;
                mix-blend-mode: difference;
            }

            .custom-cursor-dot {
                position: fixed;
                width: 4px;
                height: 4px;
                border-radius: 50%;
                pointer-events: none;
                z-index: 9999;
                background: var(--primary);
                transform: translate(-50%, -50%);
                transition: transform 0.1s ease-out;
            }

            [data-theme="dark"] .custom-cursor {
                border-color: #00f0ff;
                box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
            }

            [data-theme="dark"] .custom-cursor-dot {
                background: #00f0ff;
                box-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
            }

            .custom-cursor.hovering {
                width: 44px;
                height: 44px;
                border-width: 1.5px;
                background: rgba(124, 58, 237, 0.08);
            }

            [data-theme="dark"] .custom-cursor.hovering {
                background: rgba(0, 240, 255, 0.08);
            }

            body { cursor: none; }
            .interactive, button, a, input, select { cursor: none; }
        }

        /* ============================================
           MAGNETIC BUTTONS - Desktop Only
           ============================================ */
        @media (hover: hover) and (pointer: fine) {
            .magnetic {
                transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            }
        }

        /* ============================================
           UI LAYER - Mobile Base
           ============================================ */
        #ui-layer {
            position: relative;
            z-index: 10;
            width: 100%;
            height: 100vh;
            height: 100dvh; /* Dynamic viewport height for mobile */
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: var(--spacing-md);
            padding-top: calc(var(--spacing-md) + var(--safe-top));
            pointer-events: none;
        }

        .interactive { pointer-events: auto; }

        /* ============================================
           HEADER - Mobile Base
           ============================================ */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            animation: fadeSlideDown 0.6s ease-out;
        }

        @keyframes fadeSlideDown {
            from { opacity: 0; transform: translateY(-20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .logo-section h1 {
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: -0.03em;
        }

        .logo-section h1 .dot {
            background: var(--gradient-primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: dotPulse 2s ease-in-out infinite;
        }

        @keyframes dotPulse {
            0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 transparent); }
            50% { opacity: 0.7; filter: drop-shadow(0 0 8px currentColor); }
        }

        [data-theme="dark"] .logo-section h1 .dot {
            background: linear-gradient(135deg, #00f0ff, #bf00ff);
            -webkit-background-clip: text;
            background-clip: text;
        }

        .tagline { display: none; } /* Hidden on mobile */

        .badge {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            font-weight: 600;
            padding: 0.3rem 0.6rem;
            background: rgba(124, 58, 237, 0.15);
            border: 1px solid rgba(124, 58, 237, 0.3);
            border-radius: 100px;
            color: var(--primary);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            animation: badgeGlow 3s ease-in-out infinite;
        }

        @keyframes badgeGlow {
            0%, 100% { box-shadow: 0 0 0 rgba(124, 58, 237, 0); }
            50% { box-shadow: 0 0 12px rgba(124, 58, 237, 0.2); }
        }

        [data-theme="dark"] .badge {
            background: rgba(0, 240, 255, 0.1);
            border-color: rgba(0, 240, 255, 0.3);
            color: #00f0ff;
            animation: badgeGlowDark 3s ease-in-out infinite;
        }

        @keyframes badgeGlowDark {
            0%, 100% { box-shadow: 0 0 0 rgba(0, 240, 255, 0); }
            50% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.25); }
        }

        /* Header Right - Mobile */
        .header-right { 
            display: flex; 
            align-items: center; 
            gap: var(--spacing-xs); 
        }

        .icon-btn {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-primary);
            font-size: 0.9rem;
            transition: all 0.2s ease;
            /* Better touch target */
            min-width: 44px;
            min-height: 44px;
        }

        .icon-btn:active {
            transform: scale(0.95);
            background: var(--primary);
            color: white;
        }

        .icon-btn.active {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        [data-theme="dark"] .icon-btn.active {
            background: #00f0ff;
            border-color: #00f0ff;
            color: black;
        }

        .sun-icon { display: none; }
        .moon-icon { display: block; }
        [data-theme="dark"] .sun-icon { display: block; }
        [data-theme="dark"] .moon-icon { display: none; }

        /* Nav hidden on mobile - use bottom sheet instead */
        .nav-center { display: none; }

        /* ============================================
           BOTTOM SHEET - Mobile Primary Navigation
           ============================================ */
        .bottom-sheet {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-top: 1px solid var(--border);
            border-radius: 20px 20px 0 0;
            z-index: 100;
            max-height: 45vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(calc(100% - 64px - var(--safe-bottom)));
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .bottom-sheet.expanded {
            transform: translateY(0);
        }

        .bottom-sheet-handle {
            width: 36px;
            height: 4px;
            background: var(--text-muted);
            border-radius: 2px;
            margin: var(--spacing-md) auto var(--spacing-xs);
            opacity: 0.5;
            cursor: pointer;
            flex-shrink: 0;
        }

        .bottom-sheet-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 var(--spacing-md) var(--spacing-sm);
            cursor: pointer;
            flex-shrink: 0;
        }

        .bottom-sheet-title {
            font-size: 1.1rem;
            font-weight: 700;
        }

        .bottom-sheet-title .highlight {
            background: var(--gradient-primary);
            background-size: 200% 100%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: shimmer 3s ease infinite;
        }

        @keyframes shimmer {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        [data-theme="dark"] .bottom-sheet-title .highlight {
            background: linear-gradient(135deg, #00f0ff, #bf00ff, #00f0ff);
            background-size: 200% 100%;
            -webkit-background-clip: text;
            background-clip: text;
            animation: shimmer 3s ease infinite;
        }

        .sheet-toggle {
            width: 40px;
            height: 40px;
            min-width: 44px;
            min-height: 44px;
            border-radius: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .sheet-toggle i {
            transition: transform 0.3s ease;
        }

        .bottom-sheet.expanded .sheet-toggle i {
            transform: rotate(180deg);
        }

        .sheet-content {
            display: none;
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            overscroll-behavior: contain;
            padding: 0 var(--spacing-md) var(--spacing-md);
            padding-bottom: calc(var(--spacing-md) + var(--safe-bottom));
            scrollbar-width: thin;
            scrollbar-color: transparent transparent;
            transition: scrollbar-color 0.3s ease;
        }

        .bottom-sheet.expanded .sheet-content {
            display: block;
        }

        .sheet-content:hover,
        .sheet-content:active {
            scrollbar-color: var(--text-muted) transparent;
        }

        .sheet-content::-webkit-scrollbar {
            width: 3px;
        }

        .sheet-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .sheet-content::-webkit-scrollbar-thumb {
            background: transparent;
            border-radius: 3px;
        }

        .sheet-content:hover::-webkit-scrollbar-thumb {
            background: var(--text-muted);
        }

        /* Quick Actions - Mobile */
        .quick-actions {
            display: flex;
            gap: var(--spacing-xs);
            margin-bottom: var(--spacing-md);
            flex-wrap: wrap;
        }

        .quick-btn {
            flex: 1;
            min-width: calc(50% - var(--spacing-xs));
            padding: 0.75rem;
            border-radius: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            /* Touch feedback */
            -webkit-tap-highlight-color: transparent;
        }

        .quick-btn:active { 
            transform: scale(0.96);
            transition: transform 0.1s ease;
        }

        .quick-btn-primary {
            background: var(--gradient-primary);
            background-size: 150% 100%;
            border: none;
            color: white;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.5s ease;
        }

        .quick-btn-primary:hover {
            background-position: 100% 0%;
            box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
        }

        [data-theme="dark"] .quick-btn-primary {
            background: linear-gradient(135deg, #00f0ff, #00a8ff);
            background-size: 150% 100%;
            color: black;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.5s ease;
        }

        [data-theme="dark"] .quick-btn-primary:hover {
            background-position: 100% 0%;
            box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
        }

        .quick-btn-secondary {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            color: var(--text-primary);
        }

        /* Navigation Tabs - Mobile */
        .nav-tabs {
            display: flex;
            gap: var(--spacing-xs);
            background: var(--bg-secondary);
            padding: 4px;
            border-radius: 12px;
            margin-bottom: var(--spacing-md);
        }

        .nav-tab {
            flex: 1;
            padding: 0.6rem;
            background: transparent;
            border: none;
            border-radius: 8px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            text-transform: uppercase;
        }

        .nav-tab.active {
            background: var(--gradient-primary);
            color: white;
        }

        [data-theme="dark"] .nav-tab.active {
            background: linear-gradient(135deg, #00f0ff, #00a8ff);
            color: black;
        }

        /* Social Links - Mobile */
        .social-row {
            display: flex;
            justify-content: center;
            gap: var(--spacing-sm);
            padding-top: var(--spacing-sm);
            border-top: 1px solid var(--border);
        }

        .social-link {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 1rem;
            text-decoration: none;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        .social-link:active,
        .social-link:hover {
            transform: scale(1.1);
            color: var(--primary);
            box-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
        }

        [data-theme="dark"] .social-link:active,
        [data-theme="dark"] .social-link:hover {
            color: #00f0ff;
            box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
        }

        /* Stats bar - hidden on mobile */
        .stats-bar {
            display: none;
        }

        /* ============================================
           FLOATING ACTION BUTTONS - Mobile
           ============================================ */
        .fab-container {
            position: fixed;
            right: var(--spacing-md);
            bottom: calc(72px + var(--safe-bottom));
            display: flex;
            flex-direction: column;
            gap: var(--spacing-sm);
            z-index: 90;
        }

        .fab {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: var(--shadow);
            color: var(--text-primary);
            background: var(--bg-card);
            border: 1px solid var(--border);
        }

        .fab:active { transform: scale(0.9); }

        .fab.active { 
            background: var(--gradient-primary);
            color: white;
            border-color: transparent;
            box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
            animation: fabPulse 2s ease-in-out infinite;
        }

        @keyframes fabPulse {
            0%, 100% { box-shadow: 0 0 12px rgba(124, 58, 237, 0.4); }
            50% { box-shadow: 0 0 24px rgba(124, 58, 237, 0.7); }
        }
        
        [data-theme="dark"] .fab.active { 
            background: linear-gradient(135deg, #00f0ff, #00a8ff);
            color: black;
            box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
            animation: fabPulseDark 2s ease-in-out infinite;
        }

        @keyframes fabPulseDark {
            0%, 100% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.4); }
            50% { box-shadow: 0 0 24px rgba(0, 240, 255, 0.7); }
        }

        .fab-label {
            position: absolute;
            right: 60px;
            background: var(--bg-card);
            padding: 0.4rem 0.6rem;
            border-radius: 6px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--text-secondary);
            white-space: nowrap;
            opacity: 0;
            transform: translateX(10px);
            transition: all 0.2s ease;
            pointer-events: none;
            border: 1px solid var(--border);
        }

        .fab:active .fab-label,
        .fab:focus .fab-label {
            opacity: 1;
            transform: translateX(0);
        }

        /* ============================================
           SEARCH OVERLAY - Mobile Optimized
           ============================================ */
        .search-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            z-index: 200;
            padding: var(--spacing-md);
            padding-top: calc(var(--spacing-md) + var(--safe-top));
            display: none;
            flex-direction: column;
        }

        .search-overlay.visible { display: flex; }

        .search-header {
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
            margin-bottom: var(--spacing-md);
        }

        .search-back {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            color: var(--text-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .search-input-wrapper {
            flex: 1;
            position: relative;
        }

        .search-input-wrapper i {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 0.85rem;
        }

        .search-input {
            width: 100%;
            padding: 0.75rem 0.75rem 0.75rem 2.5rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 1rem; /* Prevents zoom on iOS */
            color: var(--text-primary);
            outline: 2px solid transparent;
            outline-offset: 2px;
            transition: outline-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .search-input:focus-visible {
            outline-color: var(--primary);
        }

        .search-input:focus { 
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
            outline: none;
        }
        [data-theme="dark"] .search-input:focus-visible {
            outline-color: #00f0ff;
        }
        [data-theme="dark"] .search-input:focus { 
            border-color: #00f0ff;
            box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
        }

        .search-results {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .search-result-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .search-result-item:active { background: rgba(124, 58, 237, 0.1); }

        .search-result-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            color: white;
            flex-shrink: 0;
        }

        .search-result-info { flex: 1; min-width: 0; }

        .search-result-name {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .search-result-layer {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        /* ============================================
           PATH TRACER - Mobile Full Screen
           ============================================ */
        .path-tracer {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-card);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            z-index: 200;
            padding: var(--spacing-md);
            padding-top: calc(var(--spacing-md) + var(--safe-top));
            display: none;
            flex-direction: column;
        }

        .path-tracer.visible { display: flex; }

        .path-tracer-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--spacing-md);
        }

        .path-tracer-header-actions {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .path-tracer-title {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .path-tracer-minimize,
        .path-tracer-close {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            border-radius: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            transition: all 0.2s ease;
        }

        .path-tracer-minimize:hover,
        .path-tracer-close:hover {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        [data-theme="dark"] .path-tracer-minimize:hover,
        [data-theme="dark"] .path-tracer-close:hover {
            background: #00f0ff;
            border-color: #00f0ff;
            color: black;
        }

        /* Minimized state — collapse to a thin top bar */
        .path-tracer.minimized {
            top: 0;
            bottom: auto;
            left: 0;
            right: 0;
            max-height: none;
            height: auto;
            border-radius: 0 0 16px 16px;
            padding: var(--spacing-sm) var(--spacing-md);
            padding-top: calc(var(--spacing-sm) + var(--safe-top));
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            background: var(--bg-glass);
            box-shadow: var(--shadow-lg);
        }

        .path-tracer.minimized .path-tracer-header {
            margin-bottom: 0;
            flex: 1;
        }

        .path-tracer.minimized .path-tracer-title {
            font-size: 0.7rem;
        }

        .path-tracer.minimized > *:not(.path-tracer-header) {
            display: none;
        }

        /* Hide the floating indicator on mobile — the minimized bar itself serves as indicator */
        @media (max-width: 767px) {
            .path-minimized-indicator {
                display: none !important;
            }
        }

        /* Floating minimized indicator bar */
        .path-minimized-indicator {
            position: fixed;
            top: 5.5rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.6rem 1.25rem;
            border-radius: 100px;
            z-index: 201;
            cursor: pointer;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            color: var(--primary);
            animation: indicatorPulse 2s ease-in-out infinite;
        }

        @keyframes indicatorPulse {
            0%, 100% { box-shadow: 0 0 8px rgba(124, 58, 237, 0.3); }
            50% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.6); }
        }

        [data-theme="dark"] .path-minimized-indicator {
            color: #00f0ff;
            animation: indicatorPulseDark 2s ease-in-out infinite;
        }

        @keyframes indicatorPulseDark {
            0%, 100% { box-shadow: 0 0 8px rgba(0, 240, 255, 0.3); }
            50% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.6); }
        }

        .preset-paths {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
            margin-bottom: var(--spacing-md);
        }

        .preset-path-btn {
            padding: 0.55rem 0.7rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-secondary);
            cursor: pointer;
            text-align: left;
            line-height: 1.3;
        }

        .preset-path-btn:active { border-color: var(--primary); color: var(--primary); }

        .path-selectors {
            display: flex;
            flex-direction: column;
            gap: var(--spacing-sm);
            margin-bottom: var(--spacing-md);
        }

        .path-selector label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: 0.25rem;
            display: block;
        }

        .path-selector select {
            width: 100%;
            padding: 0.75rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 1rem; /* Prevents zoom */
            color: var(--text-primary);
            cursor: pointer;
        }

        .path-arrow-center {
            text-align: center;
            color: var(--primary);
            font-size: 1.5rem;
            padding: var(--spacing-xs) 0;
        }

        [data-theme="dark"] .path-arrow-center { color: #00f0ff; }

        .path-actions {
            display: flex;
            gap: var(--spacing-sm);
            margin-bottom: var(--spacing-md);
        }

        .path-btn {
            flex: 1;
            padding: 0.85rem;
            border-radius: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .path-btn-primary {
            background: var(--gradient-primary);
            background-size: 150% 100%;
            border: none;
            color: white;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.5s ease;
        }

        .path-btn-primary:hover {
            background-position: 100% 0%;
            box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
        }

        [data-theme="dark"] .path-btn-primary {
            background: linear-gradient(135deg, #00f0ff, #00a8ff);
            background-size: 150% 100%;
            color: black;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.5s ease;
        }

        [data-theme="dark"] .path-btn-primary:hover {
            background-position: 100% 0%;
            box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
        }

        .path-btn-secondary {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            color: var(--text-primary);
        }

        .path-result {
            flex: 1;
            padding: var(--spacing-md);
            background: var(--bg-secondary);
            border-radius: 12px;
            border: 1px solid var(--border);
            overflow-y: auto;
        }

        .path-result-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
            margin-bottom: var(--spacing-sm);
        }

        .path-nodes {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: var(--spacing-xs);
        }

        .path-node-chip {
            padding: 0.5rem 0.75rem;
            background: rgba(124, 58, 237, 0.1);
            border: 1px solid rgba(124, 58, 237, 0.2);
            border-radius: 8px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            color: var(--primary);
            cursor: pointer;
        }

        [data-theme="dark"] .path-node-chip {
            background: rgba(0, 240, 255, 0.1);
            border-color: rgba(0, 240, 255, 0.2);
            color: #00f0ff;
        }

        .path-arrow-small { color: var(--text-muted); font-size: 0.8rem; }

        /* ============================================
           INFO PANEL - Content Entrance Animation
           ============================================ */
        .info-panel-body {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: var(--spacing-md);
            padding-bottom: calc(var(--spacing-lg) + var(--safe-bottom));
        }

        .info-panel-body > * {
            animation: contentReveal 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
        }
        .info-panel-body > *:nth-child(1) { animation-delay: 0.05s; }
        .info-panel-body > *:nth-child(2) { animation-delay: 0.1s; }
        .info-panel-body > *:nth-child(3) { animation-delay: 0.15s; }
        .info-panel-body > *:nth-child(4) { animation-delay: 0.2s; }
        .info-panel-body > *:nth-child(5) { animation-delay: 0.25s; }
        .info-panel-body > *:nth-child(6) { animation-delay: 0.3s; }
        .info-panel-body > *:nth-child(7) { animation-delay: 0.35s; }

        @keyframes contentReveal {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ============================================
           INFO PANEL - Mobile Bottom Sheet Style
           ============================================ */
        .info-panel {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            max-height: 75vh;
            z-index: 300;
            display: flex;
            flex-direction: column;
            border-radius: 20px 20px 0 0;
            transform: translateY(100%);
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            overflow: hidden;
        }

        .info-panel.open { transform: translateY(0); }

        .info-panel-header-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: var(--spacing-md) var(--spacing-md) 0;
            flex-shrink: 0;
            z-index: 5;
        }

        .info-panel-handle {
            width: 36px;
            height: 4px;
            background: var(--text-muted);
            border-radius: 2px;
            opacity: 0.5;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
        }

        .info-close {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            border-radius: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-left: auto;
        }

        .info-header {
            display: flex;
            align-items: flex-start;
            gap: var(--spacing-sm);
            margin-bottom: var(--spacing-md);
        }

        .info-title-wrap {
            flex: 1;
            min-width: 0;
        }

        .info-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            color: white;
            flex-shrink: 0;
        }

        .info-title {
            font-size: 1.25rem;
            font-weight: 700;
            letter-spacing: -0.02em;
            margin-bottom: 0.2rem;
        }

        .info-subtitle {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--primary);
            text-transform: uppercase;
        }

        [data-theme="dark"] .info-subtitle { color: #00f0ff; }

        .info-accent-line {
            width: 2.5rem;
            height: 3px;
            background: var(--gradient-primary);
            border-radius: 2px;
            margin-top: 0.4rem;
        }

        [data-theme="dark"] .info-accent-line { background: linear-gradient(90deg, #00f0ff, #bf00ff); }

        .info-description {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: var(--spacing-md);
        }

        .info-section { margin-bottom: var(--spacing-md); }

        .info-section-title {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: var(--spacing-sm);
        }

        .info-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
        }

        .info-tag {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            padding: 0.3rem 0.6rem;
            background: rgba(124, 58, 237, 0.1);
            border: 1px solid rgba(124, 58, 237, 0.2);
            border-radius: 6px;
            color: var(--primary);
        }

        [data-theme="dark"] .info-tag {
            background: rgba(0, 240, 255, 0.1);
            border-color: rgba(0, 240, 255, 0.2);
            color: #00f0ff;
        }

        .info-connections {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }

        .info-connection {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.6rem;
            background: var(--bg-secondary);
            border-radius: 6px;
        }

        .connection-name { font-size: 0.8rem; }
        .connection-weight {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            color: var(--success);
            font-weight: 600;
        }

        .activation-meter {
            padding: 0.75rem;
            background: var(--bg-secondary);
            border-radius: 10px;
            border: 1px solid var(--border);
        }

        .activation-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.4rem;
        }

        .activation-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.6rem;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .activation-value {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            color: var(--primary);
            font-weight: 700;
        }

        [data-theme="dark"] .activation-value { color: #00f0ff; }

        .activation-bar {
            height: 5px;
            background: var(--border);
            border-radius: 3px;
            overflow: hidden;
        }

        .activation-fill {
            height: 100%;
            background: var(--gradient-primary);
            border-radius: 3px;
            transition: width 0.5s ease;
        }

        [data-theme="dark"] .activation-fill { background: linear-gradient(90deg, #00f0ff, #bf00ff); }

        .share-link-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.75rem;
            margin-top: var(--spacing-md);
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
            color: var(--text-secondary);
            cursor: pointer;
        }

        .share-link-btn:active { border-color: var(--primary); color: var(--primary); }
        .share-link-btn.copied { background: var(--success); border-color: var(--success); color: white; }

        /* ============================================
           ONBOARDING - Mobile Optimized
           ============================================ */
        .onboarding-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 9000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: var(--spacing-md);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
        }

        .onboarding-overlay.visible { opacity: 1; pointer-events: auto; }

        .onboarding-card {
            background: var(--bg-card);
            backdrop-filter: blur(20px);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: var(--spacing-lg);
            width: 100%;
            max-width: 400px;
            text-align: center;
            position: relative;
            transform: scale(0.9) translateY(20px);
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .onboarding-overlay.visible .onboarding-card { transform: scale(1) translateY(0); }

        .onboarding-icon {
            width: 64px;
            height: 64px;
            margin: 0 auto var(--spacing-md);
            background: var(--gradient-primary);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: white;
        }

        [data-theme="dark"] .onboarding-icon { background: linear-gradient(135deg, #00f0ff, #bf00ff); }

        .onboarding-title {
            font-size: 1.4rem;
            font-weight: 800;
            margin-bottom: var(--spacing-sm);
        }

        .onboarding-description {
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.6;
            margin-bottom: var(--spacing-md);
        }

        .onboarding-steps {
            display: flex;
            justify-content: center;
            gap: 0.4rem;
            margin-bottom: var(--spacing-md);
        }

        .onboarding-step {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--border);
            transition: all 0.3s ease;
        }

        .onboarding-step.active {
            background: var(--primary);
            width: 20px;
            border-radius: 4px;
        }

        [data-theme="dark"] .onboarding-step.active { background: #00f0ff; }

        .onboarding-buttons {
            display: flex;
            gap: var(--spacing-sm);
            justify-content: center;
        }

        .onboarding-btn {
            padding: 0.75rem 1.25rem;
            border-radius: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .onboarding-btn-primary {
            background: var(--gradient-primary);
            border: none;
            color: white;
        }

        [data-theme="dark"] .onboarding-btn-primary {
            background: linear-gradient(135deg, #00f0ff, #00a8ff);
            color: black;
        }

        .onboarding-btn-secondary {
            background: transparent;
            border: 1px solid var(--border);
            color: var(--text-secondary);
        }

        .onboarding-skip {
            position: absolute;
            top: var(--spacing-sm);
            right: var(--spacing-sm);
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 0.7rem;
            cursor: pointer;
            padding: 0.5rem;
        }

        .onboarding-highlight {
            position: fixed;
            border: 3px solid var(--primary);
            border-radius: 16px;
            box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
            pointer-events: none;
            z-index: 8999;
            transition: all 0.5s ease;
            opacity: 0;
        }

        .onboarding-highlight.visible { opacity: 1; }

        [data-theme="dark"] .onboarding-highlight { border-color: #00f0ff; }

        /* ============================================
           ATMOSPHERIC TEXTURE - Noise & Scanlines
           ============================================ */
        .noise-overlay {
            position: fixed;
            inset: 0;
            z-index: 5;
            pointer-events: none;
            opacity: 0.03;
            mix-blend-mode: overlay;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
            background-repeat: repeat;
            background-size: 200px 200px;
        }

        [data-theme="dark"] .noise-overlay {
            opacity: 0.04;
        }

        .scanlines {
            position: fixed;
            inset: 0;
            z-index: 4;
            pointer-events: none;
            opacity: 0.015;
            background: repeating-linear-gradient(
                0deg,
                transparent,
                transparent 2px,
                rgba(0, 240, 255, 0.03) 2px,
                rgba(0, 240, 255, 0.03) 4px
            );
        }

        [data-theme="dark"] .scanlines {
            opacity: 0.025;
        }

        /* Ambient CSS floating particles */
        .ambient-particles {
            position: fixed;
            inset: 0;
            z-index: 3;
            pointer-events: none;
            overflow: hidden;
        }

        .ambient-particle {
            position: absolute;
            border-radius: 50%;
            animation: ambientFloat linear infinite;
            opacity: 0;
        }

        @keyframes ambientFloat {
            0% { 
                transform: translateY(100vh) scale(0); 
                opacity: 0; 
            }
            10% { opacity: 0.6; }
            90% { opacity: 0.6; }
            100% { 
                transform: translateY(-10vh) scale(1); 
                opacity: 0; 
            }
        }

        /* ============================================
           LOADING SCREEN - Premium Preloader
           ============================================ */
        .loading-screen {
            position: fixed;
            inset: 0;
            background: var(--bg-primary);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.8s cubic-bezier(0.76, 0, 0.24, 1), visibility 0.8s;
        }

        .loading-screen.hidden { 
            opacity: 0; 
            pointer-events: none; 
            visibility: hidden;
        }

        .loading-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            transform: scale(0.95);
            transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .loading-screen:not(.hidden) .loading-content {
            transform: scale(1);
        }

        .loading-screen.exiting .loading-content {
            transform: scale(1.08);
            transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
        }

        .loading-logo {
            font-size: 3rem;
            font-weight: 800;
            letter-spacing: -0.04em;
            background: var(--gradient-primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: var(--spacing-md);
            animation: logoReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
        }

        @keyframes logoReveal {
            from { transform: translateY(20px); opacity: 0; filter: blur(8px); }
            to { transform: translateY(0); opacity: 1; filter: blur(0); }
        }

        [data-theme="dark"] .loading-logo {
            background: linear-gradient(135deg, #00f0ff, #bf00ff);
            -webkit-background-clip: text;
            background-clip: text;
            text-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
        }

        .loading-ring {
            position: relative;
            width: 64px;
            height: 64px;
            margin-bottom: var(--spacing-md);
        }

        .loading-ring svg {
            width: 100%;
            height: 100%;
            animation: ringSpin 2s linear infinite;
        }

        @keyframes ringSpin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .loading-ring-progress {
            fill: none;
            stroke: var(--primary);
            stroke-width: 2.5;
            stroke-linecap: round;
            stroke-dasharray: 283;
            stroke-dashoffset: 283;
            animation: ringProgress 2s ease-in-out infinite;
        }

        [data-theme="dark"] .loading-ring-progress {
            stroke: #00f0ff;
            filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
        }

        @keyframes ringProgress {
            0% { stroke-dashoffset: 283; }
            50% { stroke-dashoffset: 50; }
            100% { stroke-dashoffset: 283; }
        }

        .loading-text {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.65rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.18em;
            margin-bottom: 0;
            animation: textFadeIn 0.6s ease-out 0.3s both;
        }

        @keyframes textFadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .loading-dots {
            display: flex;
            gap: 10px;
            margin-top: var(--spacing-sm);
        }

        .loading-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            animation: loadingPulse 1.4s ease-in-out infinite;
            filter: blur(0.5px);
        }

        .loading-dot:nth-child(1) { background: var(--color-input); animation-delay: 0s; }
        .loading-dot:nth-child(2) { background: var(--color-hidden1); animation-delay: 0.15s; }
        .loading-dot:nth-child(3) { background: var(--color-hidden2); animation-delay: 0.3s; }
        .loading-dot:nth-child(4) { background: var(--color-hidden3); animation-delay: 0.45s; }
        .loading-dot:nth-child(5) { background: var(--color-output); animation-delay: 0.6s; }

        @keyframes loadingPulse {
            0%, 100% { transform: scale(0.8); opacity: 0.4; }
            30% { transform: scale(1.6); opacity: 1; }
            60% { transform: scale(0.9); opacity: 0.7; }
        }

        /* ============================================
           TOOLTIP - Hidden on Mobile (use tap instead)
           ============================================ */
        #tooltip { display: none; }

        /* ============================================
           LEGEND - Hidden on Mobile
           ============================================ */
        .legend { display: none; }

        /* View toggle and timeline bar - Hidden on Mobile */
        .view-toggle { display: none; }
        .timeline-bar { display: none; }

        /* ============================================
           TABLET BREAKPOINT (min-width: 768px)
           ============================================ */
        @media (min-width: 768px) {
            :root {
                --spacing-md: 1.25rem;
                --spacing-lg: 2rem;
            }

            .logo-section h1 { font-size: 2rem; }

            .tagline {
                display: flex;
                align-items: center;
                gap: 0.75rem;
                margin-top: 0.5rem;
            }

            .divider-line { width: 2rem; height: 1px; background: var(--text-muted); }

            .typewriter {
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.75rem;
                color: var(--text-secondary);
            }

            .typewriter .cursor {
                color: var(--primary);
                animation: blink 1s step-end infinite;
            }

            [data-theme="dark"] .typewriter .cursor { color: #00f0ff; }

            @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

            .bottom-sheet {
                max-height: 40vh;
            }

            .quick-btn {
                min-width: auto;
                flex: none;
                padding: 0.75rem 1.25rem;
            }

            .preset-paths {
                flex-direction: row;
                flex-wrap: wrap;
            }

            .preset-path-btn {
                flex: none;
            }

            .path-selectors {
                flex-direction: row;
                align-items: flex-end;
                gap: var(--spacing-md);
            }

            .path-selector { flex: 1; }

            .path-arrow-center {
                display: none;
            }

            /* Show tooltip on tablet */
            #tooltip {
                display: block;
                position: fixed;
                z-index: 2000;
                padding: 0.5rem 0.85rem;
                border-radius: 8px;
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.7rem;
                color: var(--primary);
                text-transform: uppercase;
                letter-spacing: 0.05em;
                pointer-events: none;
                opacity: 0;
                transform: translateY(5px);
                transition: all 0.2s ease;
                white-space: nowrap;
            }

            [data-theme="dark"] #tooltip { color: #00f0ff; }

            #tooltip.visible { opacity: 1; transform: translateY(0); }

            .tooltip-tag { color: var(--text-muted); margin-left: 0.5rem; }

            .info-panel {
                left: auto;
                right: 0;
                top: 0;
                bottom: 0;
                max-height: 100%;
                width: 380px;
                border-radius: 20px 0 0 20px;
                transform: translateX(100%);
            }

            .info-panel.open { transform: translateX(0); }

            .info-panel-handle { display: none; }

            .info-panel-body {
                padding-bottom: var(--spacing-lg);
            }

            .onboarding-card {
                padding: 2rem;
            }

            .onboarding-title { font-size: 1.6rem; }
        }

        /* ============================================
           DESKTOP BREAKPOINT (min-width: 1024px)
           ============================================ */
        @media (min-width: 1024px) {
            :root {
                --spacing-lg: 2.5rem;
            }

            .logo-section h1 { font-size: 2.5rem; }

            /* Show desktop nav — centered on page */
            .nav-center {
                display: flex;
                gap: 0.5rem;
                padding: 0.35rem;
                border-radius: 100px;
                position: fixed;
                top: 1rem;
                left: 50%;
                transform: translateX(-50%);
                z-index: 50;
            }

            .nav-center button {
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.7rem;
                padding: 0.5rem 1rem;
                background: transparent;
                border: none;
                color: var(--text-secondary);
                border-radius: 100px;
                cursor: pointer;
                transition: all 0.3s ease;
                text-transform: uppercase;
            }

            .nav-center button:hover,
            .nav-center button.active {
                background: var(--gradient-primary);
                color: white;
            }

            .icon-btn {
                width: 44px;
                height: 44px;
            }

            .icon-btn:hover {
                background: var(--primary);
                border-color: var(--primary);
                color: white;
                transform: scale(1.05);
            }

            [data-theme="dark"] .icon-btn:hover {
                background: #00f0ff;
                border-color: #00f0ff;
                color: black;
            }

            /* Convert bottom sheet to sidebar */
            .bottom-sheet {
                position: fixed;
                top: 8.5rem;
                left: var(--spacing-lg);
                right: auto;
                bottom: var(--spacing-md);
                width: 320px;
                max-height: none;
                border-radius: 20px;
                transform: none;
                display: flex;
                flex-direction: column;
                overflow: hidden;
            }

            .bottom-sheet .sheet-content { 
                display: block;
                padding-bottom: var(--spacing-md);
            }
            .bottom-sheet .sheet-toggle { display: none; }
            .bottom-sheet-handle { display: none; }

            .bottom-sheet-header {
                padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
            }

            /* Hide FAB on desktop */
            .fab-container { display: none; }

            /* Search as dropdown instead of fullscreen */
            .search-overlay {
                position: fixed;
                top: 5.5rem;
                right: var(--spacing-lg);
                left: auto;
                bottom: auto;
                width: 320px;
                border-radius: 16px;
                padding: var(--spacing-sm);
                max-height: 400px;
            }

            .search-header { display: none; }

            .search-input-wrapper {
                margin-bottom: var(--spacing-sm);
            }

            /* Path tracer as dropdown */
            .path-tracer {
                position: fixed;
                top: 5.5rem;
                left: 50%;
                transform: translateX(-50%);
                right: auto;
                bottom: auto;
                width: 500px;
                border-radius: 16px;
                padding: var(--spacing-md);
                max-height: 500px;
            }

            .path-tracer.visible {
                display: flex;
                transform: translateX(-50%);
            }

            .path-tracer.minimized {
                max-height: none;
                width: auto;
                min-width: 300px;
                top: 5.5rem;
                bottom: auto;
                left: 50%;
                right: auto;
                border-radius: 16px;
                padding: var(--spacing-sm) var(--spacing-md);
                display: flex;
                flex-direction: row;
                align-items: center;
            }

            .path-tracer.minimized .path-tracer-header {
                margin-bottom: 0;
                flex: 1;
            }

            .path-tracer.minimized .path-tracer-title {
                font-size: 0.7rem;
            }

            .path-minimized-indicator {
                top: 5.5rem;
            }

            /* View toggle buttons */
            .view-toggle {
                position: fixed;
                top: 50%;
                right: var(--spacing-lg);
                transform: translateY(-50%);
                display: flex;
                flex-direction: column;
                gap: 0.5rem;
                z-index: 100;
            }

            .view-btn {
                width: 50px;
                height: 50px;
                border-radius: 12px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.1rem;
                cursor: pointer;
                transition: all 0.3s ease;
            }

            .view-btn:hover { transform: scale(1.1); }
            .view-btn.active { box-shadow: 0 0 20px rgba(124, 58, 237, 0.5); }
            [data-theme="dark"] .view-btn.active { box-shadow: 0 0 20px rgba(0, 240, 255, 0.5); }

            /* Show legend */
            .legend {
                display: block;
                position: fixed;
                bottom: var(--spacing-lg);
                right: var(--spacing-lg);
                padding: 1rem;
                border-radius: 16px;
                z-index: 100;
                max-width: 180px;
            }

            .legend-title {
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.6rem;
                color: var(--text-muted);
                text-transform: uppercase;
                letter-spacing: 0.1em;
                margin-bottom: 0.75rem;
            }

            .legend-item {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                margin-bottom: 0.5rem;
                font-size: 0.75rem;
                color: var(--text-secondary);
            }

            .legend-color { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

            /* Timeline bar */
            .timeline-bar {
                position: fixed;
                bottom: var(--spacing-lg);
                left: 50%;
                transform: translateX(-50%);
                display: flex;
                align-items: center;
                padding: 0.75rem 1.5rem;
                border-radius: 100px;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.5s ease;
                z-index: 100;
            }

            .timeline-bar.visible { opacity: 1; pointer-events: auto; }

            .timeline-year {
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.7rem;
                color: var(--text-muted);
                padding: 0.5rem 1rem;
                cursor: pointer;
                transition: all 0.3s ease;
                position: relative;
            }

            .timeline-year::after {
                content: '';
                position: absolute;
                top: 50%;
                right: 0;
                width: 20px;
                height: 2px;
                background: var(--border);
            }

            .timeline-year:last-child::after { display: none; }

            .timeline-year:hover,
            .timeline-year.active { color: var(--primary); }

            [data-theme="dark"] .timeline-year:hover,
            [data-theme="dark"] .timeline-year.active { color: #00f0ff; }

            .timeline-year.active::before {
                content: '';
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 6px;
                height: 6px;
                background: var(--primary);
                border-radius: 50%;
            }

            [data-theme="dark"] .timeline-year.active::before { background: #00f0ff; }

            /* Stats bar — centered below nav */
            .stats-bar {
                position: fixed;
                top: 5.5rem;
                left: 50%;
                transform: translateX(-50%);
                display: flex;
                gap: 1.5rem;
                padding: 0.6rem 1.25rem;
                border-radius: 100px;
                z-index: 50;
                animation: statsFloat 4s ease-in-out infinite;
            }

            @keyframes statsFloat {
                0%, 100% { transform: translateX(-50%) translateY(0); }
                50% { transform: translateX(-50%) translateY(-4px); }
            }

            .stat-item { display: flex; align-items: center; gap: 0.4rem; }

            .stat-value {
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.9rem;
                font-weight: 700;
                color: var(--primary);
            }

            [data-theme="dark"] .stat-value { color: #00f0ff; }

            .stat-label {
                font-size: 0.7rem;
                color: var(--text-muted);
                text-transform: uppercase;
            }

            /* Keyboard hints */
            .keyboard-hints {
                display: flex;
                flex-direction: column;
                gap: 0.3rem;
                margin-top: 0.75rem;
                padding-top: 0.75rem;
                border-top: 1px solid var(--border);
            }

            .keyboard-hints span {
                font-family: 'JetBrains Mono', monospace;
                font-size: 0.6rem;
                color: var(--text-muted);
            }

            .keyboard-hints kbd {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 18px;
                height: 18px;
                padding: 0 0.3rem;
                background: var(--bg-secondary);
                border: 1px solid var(--border);
                border-radius: 4px;
                font-size: 0.55rem;
                margin-right: 0.3rem;
            }

            .info-panel {
                width: 420px;
            }

            .info-panel-body {
                padding-bottom: var(--spacing-lg);
            }
        }

        /* ============================================
           LARGE DESKTOP (min-width: 1280px)
           ============================================ */
        @media (min-width: 1280px) {
            .bottom-sheet {
                width: 360px;
            }

            .hero-description {
                display: block;
                font-size: 0.9rem;
                color: var(--text-secondary);
                line-height: 1.6;
                margin-bottom: var(--spacing-md);
            }
        }
