
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { background: #0f172a; font-family: 'Segoe UI', sans-serif; overflow: hidden; }
        model-viewer { width: 100vw; height: 100vh; --poster-color: transparent; }

        /* Botón AR */
        .ar-buttons {
            position: fixed; top: 16px; right: 16px;
            display: flex; gap: 8px; z-index: 100;
        }
        .btn-ar {
            background: white; color: #333; border: 1px solid #ccc;
            border-radius: 50px; padding: 10px 18px;
            font-weight: bold; font-size: 13px; cursor: pointer;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            display: flex; align-items: center; gap: 6px;
        }
        .btn-ar-ia {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white; border: 1px solid rgba(99,102,241,0.3);
        }

        /* Botón IA (orbe animado) */
        .btn-mic {
            position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%);
            width: 64px; height: 64px;
            background: linear-gradient(135deg, #6366f1, #8b5cf6, #6366f1);
            background-size: 200% 200%;
            color: white; border: none;
            border-radius: 50%; font-size: 20px; cursor: pointer;
            box-shadow: 0 0 20px rgba(99,102,241,0.4), 0 0 40px rgba(139,92,246,0.15);
            z-index: 100;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.3s;
            animation: orbIdle 3s ease-in-out infinite;
        }
        .btn-mic .orb-icon {
            width: 28px; height: 28px;
            border: 2.5px solid rgba(255,255,255,0.9);
            border-radius: 50%;
            position: relative;
            display: flex; align-items: center; justify-content: center;
        }
        .btn-mic .orb-icon::before {
            content: '';
            width: 10px; height: 10px;
            background: white;
            border-radius: 50%;
            animation: orbDot 2s ease-in-out infinite;
        }
        .btn-mic.grabando {
            background: linear-gradient(135deg, #ef4444, #f97316, #ef4444);
            background-size: 200% 200%;
            animation: orbActive 1s ease-in-out infinite;
            box-shadow: 0 0 25px rgba(239,68,68,0.5), 0 0 50px rgba(249,115,22,0.2);
        }
        .btn-mic.grabando .orb-icon {
            animation: orbRingPulse 0.8s ease-in-out infinite;
        }
        .btn-mic.grabando .orb-icon::before {
            animation: orbDotActive 0.5s ease-in-out infinite;
        }
        .btn-mic:disabled {
            background: #475569;
            box-shadow: none; cursor: not-allowed;
            animation: none;
        }
        @keyframes orbIdle {
            0%, 100% { background-position: 0% 50%; box-shadow: 0 0 20px rgba(99,102,241,0.4); }
            50% { background-position: 100% 50%; box-shadow: 0 0 30px rgba(139,92,246,0.5); }
        }
        @keyframes orbActive {
            0%, 100% { background-position: 0% 50%; transform: translateX(-50%) scale(1); }
            50% { background-position: 100% 50%; transform: translateX(-50%) scale(1.08); }
        }
        @keyframes orbDot {
            0%, 100% { transform: scale(1); opacity: 0.9; }
            50% { transform: scale(0.7); opacity: 0.6; }
        }
        @keyframes orbDotActive {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.4); }
        }
        @keyframes orbRingPulse {
            0%, 100% { transform: scale(1); border-color: rgba(255,255,255,0.9); }
            50% { transform: scale(1.15); border-color: rgba(255,255,255,0.5); }
        }

        /* Panel respuesta */
        .panel {
            position: fixed; bottom: 210px; left: 12px; right: 12px;
            max-width: 400px; margin: 0 auto;
            background: rgba(255,255,255,0.96);
            backdrop-filter: blur(12px);
            border-radius: 16px; padding: 16px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.3);
            border-top: 4px solid #6366f1;
            z-index: 101; display: none;
        }
        .panel-titulo { color: #6366f1; font-weight: bold; font-size: 14px; margin-bottom: 8px; }
        .panel-transcripcion { color: #64748b; font-size: 13px; font-style: italic; margin-bottom: 10px; min-height: 18px; }
        .panel-respuesta { color: #1e293b; font-size: 14px; line-height: 1.7; max-height: 160px; overflow-y: auto; }
        .btn-cerrar { margin-top: 12px; background: #e2e8f0; border: none; padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 12px; }

        /* Spinner */
        .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #6366f1; border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; margin-right: 6px; }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Panel API Key */
        .panel-key {
            position: fixed; inset: 0;
            background: rgba(15,23,42,0.97);
            display: flex; align-items: center; justify-content: center;
            z-index: 200; padding: 24px;
        }
        .panel-key-card {
            background: white; border-radius: 20px;
            padding: 28px 24px; width: 100%; max-width: 380px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.4);
            border-top: 4px solid #6366f1;
        }
        .panel-key-card h3 { color: #6366f1; font-size: 18px; margin-bottom: 8px; }
        .panel-key-card p { color: #64748b; font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
        .panel-key-card input {
            width: 100%; border: 1px solid #cbd5e1; border-radius: 10px;
            padding: 11px 14px; font-size: 14px; outline: none;
            margin-bottom: 12px; box-sizing: border-box;
            font-family: monospace;
        }
        .panel-key-card input:focus { border-color: #6366f1; }
        .btn-activar {
            width: 100%; background: #6366f1; color: white;
            border: none; border-radius: 10px; padding: 12px;
            font-size: 15px; font-weight: bold; cursor: pointer;
        }
        .btn-activar:hover { background: #4f46e5; }
        .panel-key-link { display: block; text-align: center; margin-top: 12px; color: #6366f1; font-size: 12px; text-decoration: none; }

        /* Hotspots BIM */
        .hotspot-bim {
            background: rgba(99,102,241,0.9); color: white; border: 2px solid white;
            border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: bold;
            cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            white-space: nowrap; transition: transform 0.2s;
        }
        .hotspot-bim:hover { transform: scale(1.15); background: rgba(79,70,229,1); }
        .hotspot-bim.oculto { display: none; }

        /* Filtros BIM */
        .filtros-bim {
            position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
            display: none; gap: 6px; z-index: 50;
            background: rgba(15,23,42,0.85); backdrop-filter: blur(8px);
            padding: 6px 10px; border-radius: 30px;
        }
        .filtros-bim.show { display: flex; }
        .filtro-btn {
            background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.7);
            border: none; border-radius: 20px; padding: 6px 14px;
            font-size: 11px; font-weight: 700; cursor: pointer;
            transition: all 0.15s;
        }
        .filtro-btn.activo { background: #6366f1; color: white; }
        .filtro-btn:hover { background: rgba(255,255,255,0.25); }

        /* Watermark */
        .watermark {
            position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
            background: rgba(255,255,255,0.95); padding: 10px 20px;
            border-radius: 50px; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
            text-decoration: none; color: #2563eb; font-weight: bold;
            font-size: 13px; z-index: 10;
        }

        /* Banner Samsung */
        .banner-chrome {
            position: fixed; top: 0; left: 0; right: 0;
            background: linear-gradient(135deg, #1e40af, #3b82f6);
            color: white; padding: 14px 16px;
            display: flex; align-items: center; gap: 12px;
            z-index: 300; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            font-size: 13px; line-height: 1.5;
        }
        .banner-chrome-icon { font-size: 28px; flex-shrink: 0; }
        .banner-chrome-text { flex: 1; }
        .banner-chrome-text strong { display: block; font-size: 14px; margin-bottom: 2px; }
        .banner-chrome-btn {
            background: white; color: #1e40af; border: none;
            border-radius: 8px; padding: 8px 14px; font-weight: 700;
            font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
        }
        .banner-chrome-close {
            background: none; border: none; color: rgba(255,255,255,0.7);
            font-size: 20px; cursor: pointer; padding: 4px; flex-shrink: 0;
        }
    