        /* ── CSS VARIABLES & RESET ── */
        :root {
            --bg-color: #050505;
            --panel-bg: #0a0a0a;
            --primary-orange: #FF3300; 
            --primary-orange-dim: rgba(255, 51, 0, 0.2);
            --cyan: #00BFFF;
            --text-light: #e6e6dc;
            --text-dim: #777777;
            --border-thick: 4px solid var(--primary-orange);
            --border-thin: 1px solid var(--text-dim);
            --glow-orange: 0 0 10px rgba(255, 51, 0, 0.6);
            --glow-cyan: 0 0 10px rgba(0, 191, 255, 0.6);

            /* Tipografía fluida (Clamp) */
            --font-sm: clamp(0.7rem, 1.2vw, 0.9rem);
            --font-md: clamp(0.9rem, 1.5vw, 1.1rem);
            --font-lg: clamp(1.2rem, 2vw, 1.6rem);
            --font-xl: clamp(1.8rem, 4vw, 3rem);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            cursor: crosshair;
            user-select: none;
        }

        body {
            background-color: #000;
            color: var(--text-light);
            font-family: 'Share Tech Mono', monospace;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            /* Aberración cromática global */
            text-shadow: 2px 0px 1px rgba(255, 0, 0, 0.7), -2px 0px 1px rgba(0, 255, 255, 0.7);
        }

        /* ── EFECTOS CRT INMERSIVOS ── */
        .crt-shell { position: fixed; inset: 0; background: #000; z-index: -10; }
        
        .screen-container {
            width: 100vw;
            height: 100vh;
            display: flex;
            flex-direction: column;
            padding: 2vw;
            position: relative;
            z-index: 10;
            background-color: var(--bg-color);
            box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
            border-radius: 10px;
            overflow: hidden;
        }

        .crt-overlay {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            pointer-events: none; /* CRÍTICO para móviles: permite tocar elementos debajo */
            z-index: 100;
            background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
            background-size: 100% 4px, 4px 100%;
            box-shadow: inset 0 0 150px rgba(0,0,0,0.9);
        }

        .crt-overlay::after {
            content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(255, 255, 255, 0.02);
            animation: flicker 0.12s infinite;
            pointer-events: none;
        }

        .scanline {
            width: 100%; height: 100px;
            z-index: 102; position: absolute; top: 0; left: 0;
            pointer-events: none;
            background: linear-gradient(0deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
            animation: scanband 8s linear infinite;
        }

        @keyframes scanband { 0% { transform: translateY(-100px); } 100% { transform: translateY(100vh); } }
        @keyframes flicker { 0% { opacity: 0.01; } 50% { opacity: 0.04; } 100% { opacity: 0.01; } }
        @keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

        /* ── HEADER ── */
        .top-bar {
            display: flex; justify-content: space-between; align-items: flex-end;
            margin-bottom: 15px; position: relative; z-index: 20;
        }
        
        .logo-left, .logo-right {
            color: var(--text-dim); font-size: var(--font-sm); letter-spacing: 2px; line-height: 1.4;
        }
        .logo-left span { display: block; }
        
        .tabs { display: flex; }
        .tab {
            color: var(--text-dim); border: var(--border-thin); border-left: none;
            padding: 4px 25px; font-size: var(--font-md); background: var(--bg-color);
            letter-spacing: 1px; transition: all 0.2s;
        }
        .tab:first-child { border-left: var(--border-thin); }
        .tab.active {
            color: var(--text-light); border-color: var(--text-light);
            background: rgba(255,255,255,0.05); box-shadow: inset 0 0 10px rgba(255,255,255,0.1);
        }
        
        .logo-right { text-align: right; }
        .logo-right .lstr {
            color: var(--cyan); font-weight: bold; font-size: var(--font-lg);
            text-decoration: none; display: block; letter-spacing: 3px; cursor: pointer;
        }
        .logo-right .lstr:hover { color: var(--text-light); text-shadow: var(--glow-cyan); }
        .logo-right .lstr span { color: var(--primary-orange); text-shadow: var(--glow-orange); }

        /* ── INVENTORY ROW (SLOTS) ── */
        .inventory-row {
            display: flex; align-items: center; justify-content: center;
            gap: 15px; margin-bottom: 15px; z-index: 20; position: relative;
        }
        .nav-arrow { color: var(--text-dim); font-size: 2rem; cursor: pointer; transition: color 0.2s; }
        .nav-arrow:hover { color: var(--primary-orange); text-shadow: var(--glow-orange); }

        .slot-container { display: flex; gap: 10px; }

        .slot {
            width: 140px; height: 90px;
            border: var(--border-thin); display: flex; flex-direction: column;
            position: relative; background: var(--bg-color); color: var(--text-dim);
            transition: border-color 0.1s, transform 0.1s;
        }

        .slot-title {
            font-size: var(--font-sm); padding: 4px; text-transform: uppercase;
            text-align: center; border-bottom: 1px solid transparent;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            text-decoration: none; color: inherit; z-index: 10; cursor: pointer;
        }
        .slot-title:hover { color: var(--text-light); text-shadow: 0 0 5px var(--text-light); }

        .slot-content {
            flex-grow: 1; display: flex; justify-content: center; align-items: center; position: relative; cursor: pointer;
        }

        .slot-icon { font-family: 'VT323', monospace; font-size: 2.5rem; color: var(--text-dim); line-height: 1; }
        .slot-count { position: absolute; bottom: 3px; right: 5px; font-size: 0.8rem; pointer-events: none; }

        .slot.empty .slot-content::before, .slot.empty .slot-content::after {
            content: ''; position: absolute; background: var(--text-dim); opacity: 0.3;
        }
        .slot.empty .slot-content::before { width: 45px; height: 1px; transform: rotate(45deg); }
        .slot.empty .slot-content::after { width: 45px; height: 1px; transform: rotate(-45deg); }

        .slot.active {
            border: 2px solid var(--text-light); color: var(--text-light);
            transform: scaleY(1.05); z-index: 5; background: rgba(255, 255, 255, 0.05);
        }
        .slot.active .slot-title { background: var(--primary-orange); color: var(--bg-color); font-weight: bold; }
        .slot.active .slot-icon { color: var(--text-light); text-shadow: 0 0 10px rgba(255,255,255,0.3); }

        /* ── MAIN LAYOUT GRID ── */
        .main-grid {
            display: grid; grid-template-columns: 280px 1fr 380px; flex-grow: 1;
            border: var(--border-thick); box-shadow: var(--glow-orange); z-index: 20;
            position: relative; overflow: hidden; background: var(--panel-bg);
            background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                              linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
            background-size: 20px 20px;
        }

        .panel { display: flex; flex-direction: column; position: relative; padding: 15px; min-height: 0; }
        .panel-left { border-right: var(--border-thick); overflow: hidden; }
        .panel-center { display: flex; align-items: center; justify-content: center; }
        .panel-right { border-left: var(--border-thick); }

        /* ── PANEL IZQUIERDO (STATUS) ── */
        .status-header {
            background: var(--text-light); color: var(--bg-color); padding: 2px 10px;
            display: inline-block; font-weight: bold; margin-bottom: 12px; align-self: flex-start;
            letter-spacing: 2px;
        }

        .profile-pic {
            border: 2px solid var(--text-light); width: 100%; aspect-ratio: 1 / 1; flex: none;
            margin-bottom: 15px; position: relative; background: #000;
            display: flex; justify-content: center; align-items: center; overflow: hidden;
            image-rendering: pixelated; cursor: pointer;
        }
        .profile-pic::after {
            content: ''; position: absolute; inset: 0; background: var(--cyan);
            mix-blend-mode: multiply; opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
        }
        .profile-pic:hover::after { opacity: 1; }
        
        .profile-img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.3s ease; }
        .profile-pic:hover .profile-img { filter: grayscale(100%) contrast(1.5); }
        
        .health {
            position: absolute; bottom: 5px; left: 5px; color: var(--cyan); background: rgba(0,0,0,0.7);
            padding: 2px 5px; font-size: 0.9rem; display: flex; align-items: center; gap: 5px;
            text-shadow: var(--glow-cyan); border: 1px solid var(--cyan); pointer-events: none;
        }
        .health::before { content: 'SYS_INT:'; font-size: 0.7rem; color: var(--text-light); text-shadow: none;}

        /* RADIO MODULE (Estética intacta) */
        .radio-module {
            margin-top: auto; border: 1px solid var(--primary-orange); background: #000;
            padding: 6px; display: flex; flex-direction: column; gap: 5px;
            box-shadow: inset 0 0 10px rgba(255, 51, 0, 0.1);
        }
        .radio-header { font-size: 0.7rem; color: var(--bg-color); background: var(--text-light); letter-spacing: 2px; text-align: center; padding: 2px 0; font-weight: bold; }
        .radio-tuner-box { border: 1px solid rgba(255,51,0,0.5); background: #020202; padding: 4px 0; display: flex; justify-content: center; align-items: center; }
        .radio-freq-large { font-family: 'VT323', monospace; font-size: 2.8rem; color: var(--primary-orange); text-align: center; text-shadow: 0 0 15px rgba(255, 51, 0, 0.8); line-height: 1; letter-spacing: 3px; }
        .radio-freq-large .mhz { font-family: 'Share Tech Mono', monospace; font-size: 1rem; color: var(--text-dim); margin-left: 5px; text-shadow: none; letter-spacing: 0; }
        .radio-bars { display: flex; align-items: flex-end; justify-content: space-between; height: 25px; border: 1px solid rgba(255,255,255,0.1); background: #030303; padding: 2px; gap: 2px; }
        .r-bar { flex: 1; background: var(--text-dim); opacity: 0.8; }
        .r-bar-1 { animation: jitter1 1.2s infinite; } .r-bar-2 { animation: jitter2 0.9s infinite; } .r-bar-3 { animation: jitter3 1.5s infinite; } .r-bar-4 { animation: jitter2 1.1s infinite reverse; } .r-bar-5 { animation: jitter1 1.4s infinite reverse; }
        
        @keyframes jitter1 { 0%, 100% { height: 20%; background: var(--text-dim); box-shadow: none; } 15% { height: 80%; background: var(--text-light); box-shadow: 0 0 8px rgba(255,255,255,0.8); } 30% { height: 40%; background: var(--text-dim); box-shadow: none; } 45% { height: 95%; background: var(--primary-orange); box-shadow: 0 0 8px var(--primary-orange); } 60% { height: 10%; background: var(--text-dim); box-shadow: none; } 80% { height: 60%; background: var(--text-light); box-shadow: 0 0 5px rgba(255,255,255,0.5); } }
        @keyframes jitter2 { 0%, 100% { height: 40%; background: var(--text-dim); box-shadow: none; } 10% { height: 15%; background: var(--text-dim); box-shadow: none; } 25% { height: 100%; background: var(--primary-orange); box-shadow: 0 0 8px var(--primary-orange); } 40% { height: 35%; background: var(--text-dim); box-shadow: none; } 65% { height: 85%; background: var(--text-light); box-shadow: 0 0 8px rgba(255,255,255,0.8); } 85% { height: 25%; background: var(--text-dim); box-shadow: none; } }
        @keyframes jitter3 { 0%, 100% { height: 15%; background: var(--text-dim); box-shadow: none; } 20% { height: 90%; background: var(--text-light); box-shadow: 0 0 8px rgba(255,255,255,0.8); } 35% { height: 50%; background: var(--text-dim); box-shadow: none; } 55% { height: 75%; background: var(--primary-orange); box-shadow: 0 0 8px var(--primary-orange); } 75% { height: 30%; background: var(--text-dim); box-shadow: none; } 90% { height: 100%; background: var(--text-light); box-shadow: 0 0 8px rgba(255,255,255,0.8); } }

        /* Ocultar radio cuando no hay espacio vertical en PC para evitar el scrollbar */
        @media (max-height: 600px) and (min-width: 769px) {
            .radio-module { display: none; }
        }

        /* ── PANEL CENTRAL (VIEWER) ── */
        .crosshairs { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
        .crosshair { position: absolute; color: var(--text-light); font-size: 1.5rem; opacity: 0.3; }
        .ch-tl { top: 10%; left: 10%; } .ch-tr { top: 10%; right: 10%; } .ch-bl { bottom: 10%; left: 10%; } .ch-br { bottom: 10%; right: 10%; }

        .big-icon-display {
            font-family: 'VT323', monospace; font-size: clamp(6rem, 12vw, 12rem); color: var(--text-light);
            text-shadow: 0 0 30px rgba(255,255,255,0.15); animation: float 4s ease-in-out infinite;
            text-align: center; line-height: 1; position: relative; z-index: 5;
        }
        .viewer-img {
            max-width: 250px; max-height: 250px; object-fit: contain; animation: hologramSpin 12s linear infinite;
            opacity: 0.95; mix-blend-mode: screen; 
        }
        model-viewer::part(default-progress-bar) {
            display: none;
        }
        @keyframes hologramSpin { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(360deg); } }
        @keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
        
        /* Greebles Center */
        .tech-info { position: absolute; font-size: 0.7rem; color: var(--text-dim); letter-spacing: 1px; line-height: 1.5; z-index: 2; }
        .tech-info.top-left { top: 20px; left: 20px; } .tech-info.bottom-left { bottom: 20px; left: 20px; } .tech-info.top-right { top: 20px; right: 20px; text-align: right; }
        .tech-highlight { color: var(--cyan); opacity: 0.9; }
        
        .center-radar {
            position: absolute; width: 300px; height: 300px; border-radius: 50%;
            border: 1px dashed rgba(255, 51, 0, 0.2); display: flex; justify-content: center; align-items: center;
            animation: spin 20s linear infinite; pointer-events: none; z-index: 1;
        }
        .center-radar::before { content: ''; position: absolute; width: 70%; height: 70%; border-radius: 50%; border: 1px solid rgba(0, 191, 255, 0.15); animation: spin 12s linear infinite reverse; }
        .center-radar::after { content: ''; position: absolute; width: 140%; height: 140%; border-radius: 50%; border: 1px dotted rgba(255, 255, 255, 0.1); animation: spin 35s linear infinite; }
        @keyframes spin { 100% { transform: rotate(360deg); } }

        .greeble-coord { position: absolute; bottom: 10px; right: 15px; font-size: 0.7rem; color: var(--text-dim); opacity: 0.6; }
        .greeble-blink { position: absolute; top: 15px; right: 15px; width: 8px; height: 8px; background: var(--primary-orange); box-shadow: var(--glow-orange); animation: blink 2s infinite; }

        .mobile-interact-prompt { display: none; }

        /* ── PANEL DERECHO (DIAGNOSTIC) ── */
        .desc-title {
            color: var(--primary-orange); font-size: var(--font-lg); margin-bottom: 15px;
            text-transform: uppercase; text-shadow: var(--glow-orange); letter-spacing: 2px; min-height: 2.2rem; flex-shrink: 0;
        }
        .desc-report {
            font-size: var(--font-md); line-height: 1.6; color: var(--text-light); flex-grow: 1; min-height: 0;
            white-space: pre-line; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--primary-orange) var(--bg-color);
            border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.5); padding: 10px;
        }
        .desc-report::-webkit-scrollbar { width: 4px; }
        .desc-report::-webkit-scrollbar-thumb { background: var(--primary-orange); }

        .action-btns { display: flex; gap: 10px; margin-top: 15px; flex-shrink: 0; }
        .action-btn {
            flex: 1; padding: 10px 0; background: transparent; border: 2px solid var(--text-light); color: var(--text-light);
            text-decoration: none; font-weight: bold; text-transform: uppercase; transition: all 0.2s; text-align: center;
            letter-spacing: 2px; font-size: 0.9rem; display: none; cursor: pointer;
        }
        .action-btn:hover { background: var(--text-light); color: var(--bg-color); box-shadow: 0 0 15px rgba(255, 255, 255, 0.4); }
        .action-btn.primary { border-color: var(--primary-orange); color: var(--primary-orange); }
        .action-btn.primary:hover { background: var(--primary-orange); color: var(--bg-color); box-shadow: var(--glow-orange); }

        /* ── FOOTER ── */
        .bottom-bar { margin-top: 15px; display: flex; justify-content: space-between; color: var(--text-dim); font-size: 0.8rem; z-index: 20; position: relative; }
        .bottom-controls { display: flex; gap: 20px; }
        .control-item { display: flex; align-items: center; gap: 6px; }

        .text-glitch { animation: textGlitch 0.2s infinite; }
        @keyframes textGlitch { 0% { text-shadow: 2px 0 var(--primary-orange), -2px 0 var(--cyan); } 50% { text-shadow: -2px 0 var(--primary-orange), 2px 0 var(--cyan); } 100% { text-shadow: 2px 0 var(--primary-orange), -2px 0 var(--cyan); } }

        /* ── MODAL PARA DISPOSITIVOS MÓVILES ── */
        .modal-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95);
            z-index: 10000; display: flex; justify-content: center; align-items: center;
            padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s;
        }
        .modal-overlay.active { opacity: 1; pointer-events: auto; }
        .modal-content {
            border: var(--border-thick); background: #000; width: 100%; max-width: 500px;
            max-height: 90vh; display: flex; flex-direction: column; position: relative; box-shadow: var(--glow-orange);
        }
        .modal-header { background: var(--primary-orange); color: #000; display: flex; justify-content: space-between; padding: 10px 15px; font-weight: bold; }
        .modal-close { background: none; border: none; color: #000; font-weight: bold; font-family: inherit; font-size: 1.2rem; cursor: pointer; }
        .modal-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }

        /* ── RESPONSIVE MAGIA ── */
        @media (max-width: 1024px) {
            .main-grid { grid-template-columns: 240px 1fr; } /* Ocultamos panel derecho en tablet */
            .panel-right { display: none; }
            .radio-freq-large { font-size: 2.2rem; }
        }

        @media (max-width: 768px) {
            body { overflow-y: auto; overflow-x: hidden; }
            .screen-container { height: auto; min-height: 100vh; overflow-y: visible; padding: 10px; }
            
            .top-bar { flex-direction: column; align-items: center; gap: 10px; }
            .logo-right { text-align: center; }
            .tabs { flex-wrap: wrap; justify-content: center; width: 100%; }
            .tab { flex: 1 1 30%; text-align: center; padding: 6px; }
            
            /* Inventory */
            .inventory-row { flex-wrap: wrap; margin-bottom: 10px; }
            .slot-container { flex-wrap: wrap; justify-content: center; }
            .nav-arrow { display: none; }
            .slot { width: 100px; height: 70px; }
            .slot-icon { font-size: 2rem; }

            /* Transformar Panel Izquierdo en ID Card */
            .main-grid { grid-template-columns: 1fr; gap: 10px; border: none; box-shadow: none; background: transparent; overflow: visible; }
            .panel-left { 
                order: -1; flex-direction: row; flex-wrap: nowrap; align-items: stretch; 
                gap: 15px; padding: 10px; border: var(--border-thick); background: var(--panel-bg); 
            }
            .status-header { display: none; }
            .profile-pic { width: 90px; margin-bottom: 0; flex-shrink: 0; align-self: center; }
            .health { font-size: 0.45rem; padding: 2px 3px; gap: 3px; bottom: 3px; left: 3px; }
            .health::before { font-size: 0.35rem; }
            
            .radio-module { display: flex; flex: 1; min-width: 0; margin-top: 0; padding: 4px; }
            .radio-freq-large { font-size: 1.8rem; }
            
            /* Center Panel */
            .panel-center { 
                min-height: 280px; padding: 10px; border: var(--border-thick); background: var(--panel-bg);
            }
            .center-radar { width: 220px; height: 220px; }
            .big-icon-display { font-size: 6rem; }
            model-viewer { width: 200px !important; height: 200px !important; }
            .viewer-img { max-width: 180px; max-height: 180px; }
            .tech-info, .greeble-blink, .greeble-coord { display: none; }

            .mobile-interact-prompt {
                display: flex;
                align-items: center;
                justify-content: center;
                position: absolute;
                bottom: 25px;
                left: 50%;
                transform: translateX(-50%);
                background: rgba(0, 0, 0, 0.85);
                border: var(--border-thick);
                color: var(--primary-orange);
                padding: 6px 16px;
                font-size: 1rem;
                font-weight: bold;
                letter-spacing: 2px;
                box-shadow: 0 0 10px rgba(255, 51, 0, 0.4);
                pointer-events: none; /* Allows tapping through to the viewer */
                z-index: 50;
                white-space: nowrap;
                /* Slight flicker on the whole box to fit the CRT vibe */
                animation: promptBoxFlicker 4s infinite;
            }
            .mobile-interact-prompt .interact-btn {
                color: var(--text-light);
                margin-right: 8px;
                /* Sharp, retro terminal blink for the prompt */
                animation: blink 1.2s infinite;
            }

            .bottom-bar { flex-direction: column; align-items: center; gap: 10px; text-align: center; }
            .bottom-controls { flex-wrap: wrap; justify-content: center; }

            /* BOOT MOBILE ALIGNMENT */
            .boot-overlay { justify-content: flex-start; align-items: flex-start; padding: 20px; }
            .boot-text { width: 100%; margin: 0; }
        }

        /* ── BOOT SCREEN ── */
        .boot-overlay {
            position: fixed; inset: 0; background: #000; z-index: 99999;
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            color: var(--primary-orange); font-family: 'Share Tech Mono', monospace; text-shadow: var(--glow-orange);
            transition: opacity 0.5s ease-out;
        }
        .boot-text {
            font-size: var(--font-md); text-align: left; width: 80%; max-width: 600px;
            white-space: pre-wrap; line-height: 1.5; margin-bottom: 20px;
        }

        @keyframes promptBoxFlicker {
            0%, 96%, 98%, 100% { opacity: 1; border-color: var(--primary-orange); }
            97% { opacity: 0.6; border-color: rgba(255, 51, 0, 0.4); }
            99% { opacity: 0.9; box-shadow: none; }
        }
