
        * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }
        body { 
            font-family: system-ui, sans-serif; background: #000; overflow: hidden; height: 100vh; height: 100dvh; 
            user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
        }
        #viewer { width: 100%; height: 100%; display: block; touch-action: none; }
        #hotspotLayer { position: absolute; inset: 0; pointer-events: none; }
        .hotspot-marker { position: absolute; transform: translate(-50%, -50%); cursor: pointer; pointer-events: none; z-index: 30; }
        .hotspot-marker .inner { pointer-events: auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; overflow: hidden; }
        .hotspot-marker .hs-icon { display: flex; align-items: center; justify-content: center; line-height: 0; width: 100%; height: 100%; position: absolute; inset: 0; }
        .hotspot-marker .hs-icon svg { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 75%; height: 75%; }
        .hotspot-marker .tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 8px; padding: 4px 10px; white-space: nowrap; border-radius: 6px; opacity: 0; pointer-events: auto; transition: opacity 0.2s; }
        #compare-opacity-slider::-webkit-slider-thumb:hover {
            transform: scale(1.15);
        }

        .mode-btn {
            background: linear-gradient(135deg, #1e8449 0%, #2874a6 100%);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px; 
            width: 80px;
            height: 80px;
            padding: 5px;
            color: white;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-size: 11px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-align: center;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        }
        .mode-btn:hover {
            background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
            transform: translateY(-2px);
            border-color: white;
        }
        .mode-btn.active {
            background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
            border-color: white; 
            color: white;
            box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
            font-weight: bold;
        }
        .mode-btn svg { width: 32px; height: 32px; flex-shrink: 0; stroke-width: 1.5; }

        /* Comparison Lock Button */
        #compare-lock-btn {
            position: absolute;
            background: linear-gradient(135deg, #1e8449 0%, #2874a6 100%);
            border: 2px solid rgba(255, 255, 255, 0.4);
            border-radius: 50%;
            color: white;
            cursor: pointer;
            z-index: 1002;
            display: none;
            align-items: center;
            justify-content: center;
            transition: none !important;
            will-change: left, top, transform;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
            width: 36px;
            height: 36px;
        }
        #compare-lock-btn:hover {
            border-color: white;
        }
        #compare-lock-btn.unlocked {
            background: rgba(220, 38, 38, 0.8) !important;
            border-color: #fca5a5 !important;
            box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
        }
        #compare-lock-btn svg { width: 18px; height: 18px; }

        @media (max-width: 768px) {
            #compare-lock-btn {
                width: 44px;
                height: 44px;
            }
            #compare-lock-btn svg { width: 22px; height: 22px; }
        }
        .hotspot-marker:hover .inner { transform: scale(1.15); }
        .hotspot-marker:hover .tooltip { opacity: 1; }
        .flyout-backdrop { display: none; }
        
        /* CSS3D Pinned Images */
        #css3dWrapper { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
        #css3dScene { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; transition: perspective 0.5s; }
        #css3dCamera { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; left: 50%; top: 50%; }
        .hotspot-pinned { position: absolute; transform-style: preserve-3d; pointer-events: auto; transform: translate(-50%, -50%); cursor: pointer; }
        .hotspot-pinned img { display: block; width: 100%; height: 100%; transition: transform 0.2s; }
        .hotspot-pinned:hover img { transform: scale(1.05); }
        
        /* 3D Media Pins (Image/Video/Web) */
        .pin3d-element { position: absolute; transform-style: preserve-3d; pointer-events: auto; background: rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
        .pin3d-element img { display: block; width: 100%; height: 100%; object-fit: contain; }
        .pin3d-element video { display: block; width: 100%; height: 100%; object-fit: contain; }
        .pin3d-element iframe { display: block; width: 100%; height: 100%; border: none; background: #fff; }
        
        /* Floor Arrow Hotspots */
        .hotspot-floor { position: absolute; transform: translate(-50%, -50%); cursor: pointer; pointer-events: none; z-index: 25; transition: transform 0.3s ease; display: flex; justify-content: center; align-items: center; }
        .hotspot-floor .floor-arrow { pointer-events: auto; position: relative; display: flex; align-items: center; justify-content: center; transform: perspective(200px) rotateX(55deg); transform-origin: center center; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.6)); transition: all 0.3s ease; }
        .hotspot-floor .floor-arrow svg { transition: transform 0.3s ease, filter 0.3s ease; }
        .hotspot-floor:hover .floor-arrow { transform: perspective(200px) rotateX(50deg) scale(1.15); filter: drop-shadow(0 0 20px var(--glow-color, #58a6ff)); }
        .hotspot-floor .glow-effect { position: absolute; inset: -15px; background: radial-gradient(ellipse at center bottom, var(--glow-color, #58a6ff) 0%, transparent 70%); opacity: 0.4; pointer-events: none; z-index: -1; transform: scaleY(0.6); }
        .hotspot-floor:hover .glow-effect { opacity: var(--glow-intensity, 0.7); }
        .hotspot-floor .floor-tooltip { position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); padding: 6px 12px; background: rgba(0,0,0,0.85); color: white; font-size: 12px; white-space: nowrap; border-radius: 6px; opacity: 0; pointer-events: auto; transition: opacity 0.2s; backdrop-filter: blur(4px); }
        .hotspot-floor:hover .floor-tooltip { opacity: 1; }
        @keyframes floor-pulse { 0%, 100% { transform: perspective(200px) rotateX(55deg) scale(1); filter: drop-shadow(0 8px 12px rgba(0,0,0,0.6)); } 50% { transform: perspective(200px) rotateX(55deg) scale(1.1); filter: drop-shadow(0 0 20px var(--glow-color, #58a6ff)); } }
        .hotspot-floor.pulse .floor-arrow { animation: floor-pulse 2s ease-in-out infinite; }
        .hotspot-marker:hover .tooltip { opacity: 1; }
        .hotspot-marker.playing .inner { animation: audio-pulse 1.5s ease-in-out infinite !important; }
        @keyframes audio-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(88,166,255,0.4); } 50% { opacity: 0.8; box-shadow: 0 0 12px 4px rgba(88,166,255,0.6); } }
        @keyframes hs-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
        @keyframes hs-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
        @keyframes hs-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } }
        
        /* Mobile Responsive Hotspots */
        @media (max-width: 768px) {
            .hotspot-marker { min-width: 44px; min-height: 44px; }
            .hotspot-marker .inner { min-width: 40px; min-height: 40px; }
            .hotspot-marker .tooltip { font-size: 11px; padding: 3px 8px; }
            .hotspot-floor .floor-arrow { min-width: 60px; min-height: 60px; }
            .hotspot-floor .floor-tooltip { font-size: 11px; padding: 4px 10px; }
            .hotspot-floor .floor-tooltip { font-size: 11px; padding: 4px 10px; }
        }
        
        /* Radar Cone */
        .floorplan-radar-container { position: absolute; top: 50%; left: 50%; width: 0; height: 0; pointer-events: none; z-index: -1; transform: translate(-50%, -50%); }
        .floorplan-radar-cone { position: absolute; bottom: -6px; left: -40px; width: 80px; height: 60px; background: radial-gradient(circle at 50% 100%, rgba(88, 166, 255, 0.85), rgba(88, 166, 255, 0.1) 70%, transparent 80%); clip-path: polygon(50% 100%, 0 0, 100% 0); transform-origin: 50% 100%; opacity: 1; filter: drop-shadow(0 0 2px rgba(88, 166, 255, 0.5)); }
        
        /* Hide radar cone when Gyro is ON */
        body.gyro-active .floorplan-radar-container { display: none !important; }

        .logo-overlay { position: absolute; z-index: 60; pointer-events: none; top: 0; left: 0; width: 100%; height: 100%; }
        .logo-overlay img, #logoOverlay img { display: block; pointer-events: auto !important; position: absolute; }
        
        /* Responsive logo scaling - handled by JS with clamp() */
        
        /* Info Popup */
        .info-popup {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
            background: rgba(22,27,34,0.98); border: 1px solid #30363d; border-radius: 16px;
            padding: 20px; max-width: 95vw; max-height: 90vh; width: 600px;
            z-index: 2000; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
            display: flex; flex-direction: column; resize: both; overflow: hidden;
        }
        .info-popup h4 { color: white; margin: 0 0 12px; padding-right: 30px; font-size: 1.1rem; flex-shrink: 0; }
        .info-popup .popup-body { color: #c9d1d9; flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; align-items: center; }
        .info-popup p { line-height: 1.6; white-space: pre-wrap; overflow-y: auto; width: 100%; }
        .info-popup img { width: 100%; max-height: 75vh; height: auto; border-radius: 8px; object-fit: contain; }
        .info-popup video { width: 100%; max-height: 75vh; height: auto; border-radius: 8px; }
        .info-popup iframe { width: 100%; flex: 1; min-height: 300px; border: none; border-radius: 8px; }
        .info-popup audio { width: 100%; margin-top: 10px; }
        .popup-close {
            position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.1);
            border: none; color: #8b949e; width: 28px; height: 28px; border-radius: 50%;
            cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
            transition: all 0.2s; z-index: 10;
        }
        .popup-close:hover { background: rgba(255,255,255,0.2); color: white; }
        
        .resize-handle {
            position: absolute; bottom: 0; right: 0;
            width: 20px; height: 20px;
            cursor: nwse-resize;
            background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.5) 50%);
            border-bottom-right-radius: 16px;
            z-index: 20;
        }
        
        @media (max-width: 600px) {
            .info-popup { width: 95%; max-height: 85vh; padding: 15px; }
            .info-popup h4 { font-size: 1rem; margin-bottom: 10px; }
            .info-popup video { max-height: 60vh; }
            .info-popup iframe { max-height: 50vh; }
            .info-popup img { max-height: 65vh; }
        }

        /* Iframe Modal */
        .iframe-modal {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
            width: 80vw; height: 80vh; background: #161b22; border: 1px solid #30363d;
            border-radius: 12px; z-index: 2000; display: none; flex-direction: column;
            box-shadow: 0 20px 60px rgba(0,0,0,0.8); resize: both; overflow: hidden;
            min-width: 320px; min-height: 240px; max-width: 95vw; max-height: 95vh;
        }
        .iframe-modal.show { display: flex; }
        .iframe-header {
            padding: 10px 20px; background: #161b22; display: flex;
            justify-content: space-between; align-items: center; border-bottom: 1px solid #30363d; flex-shrink: 0;
        }
        .iframe-header span { font-size: 0.8rem; color: #8b949e; }
        .iframe-close-btn { background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 1; }
        .iframe-container { flex: 1; width: 100%; height: 100%; position: relative; background: white; }
        .iframe-container iframe { width: 100%; height: 100%; border: none; }
        
        @media (max-width: 600px) {
            .iframe-modal { width: 95vw; height: 80vh; }
        }
        
        /* Carousel */
        .nav-container { position: fixed; bottom: 15px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; }
        .nav-toggle { background: rgba(0,0,0,0.6); border: none; color: white; padding: 6px 14px; border-radius: 15px; cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 5px; transition: all 0.3s; backdrop-filter: blur(5px); }
        .nav-toggle:hover { background: rgba(88,166,255,0.3); }
        .nav-toggle.collapsed .arrow { transition: transform 0.3s; font-size: 10px; }
        .nav-toggle.collapsed .arrow { transform: rotate(180deg); }
        /* Safe Unicode Arrow via CSS only to avoid encoding issues */
        .nav-toggle .arrow::before { content: '\25BC'; }
                 /* Safe Unicode Arrow */
        .nav-toggle:after { content: '\25BC'; display: inline-block; margin-left: 5px; font-size: 10px; transition: transform 0.3s; }
        .nav-toggle.collapsed:after { transform: rotate(180deg); }
        
        .scene-nav { 
            display: flex; gap: 8px; background: rgba(0,0,0,0.6); padding: 10px 15px; border-radius: 12px; backdrop-filter: blur(10px);
            max-width: 90vw; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth;
            scrollbar-width: none; -ms-overflow-style: none; transition: all 0.3s ease; cursor: grab;
        }
        .scene-nav::-webkit-scrollbar { display: none; }
        .scene-nav.grabbing { cursor: grabbing; }
        .scene-nav.hidden { max-height: 0; padding: 0 15px; opacity: 0; pointer-events: none; overflow: hidden; }
        
        .scene-btn { 
            width: 130px; height: 85px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.2); 
            cursor: pointer; overflow: hidden; transition: all 0.2s; flex-shrink: 0; position: relative; background: #222;
        }
        .scene-btn:hover { border-color: #58a6ff; transform: scale(1.05); }
        .scene-btn.active { border-color: #58a6ff; box-shadow: 0 0 12px rgba(88,166,255,0.5); }
        .scene-btn img { 
            width: 100%; height: 100%; object-fit: cover; display: block; 
            opacity: 0; transition: opacity 0.5s ease-in-out;
        }
        .scene-btn img.loaded { opacity: 1; }
        .scene-btn .scene-name { 
            position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.85)); 
            color: white; font-size: 11px; padding: 15px 5px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
        }
        
        .fullscreen-btn {
            position: fixed; 
            top: 20px;
            right: 20px; 
            width: 44px; height: 44px;
            border-radius: 50%; 
            background: rgba(22,27,34,0.85); 
            color: white;
            border: 1px solid rgba(255,255,255,0.2); 
            z-index: 100000; /* Super High Z to ensure visibility */
            display: flex !important; /* Force display */
            align-items: center; justify-content: center;
            cursor: pointer; 
            backdrop-filter: blur(8px); 
            transition: all 0.2s;
            -webkit-tap-highlight-color: transparent;
            box-shadow: 0 4px 15px rgba(0,0,0,0.4);
        }
        .fullscreen-btn:hover { background: rgba(88,166,255,0.3); border-color: #58a6ff; transform: scale(1.05); }
        .fullscreen-btn:active { transform: scale(0.95); }
        .fullscreen-btn .fs-compress { display: none; }
        :fullscreen .fullscreen-btn .fs-expand, :-webkit-full-screen .fullscreen-btn .fs-expand { display: none; }
        :fullscreen .fullscreen-btn .fs-compress, :-webkit-full-screen .fullscreen-btn .fs-compress { display: block; }
        
        /* Gyro button - positioned at bottom-right like editor mobile-fab-group */
        .gyro-btn { bottom: 140px; right: 20px; top: auto; } 
        
        @media (max-width: 600px) {
            .scene-btn { width: 140px; height: 95px; }
            .scene-btn .scene-name { font-size: 11px; padding: 12px 4px 3px; }
        }
        .gyro-btn{position:fixed;bottom:140px;right:20px;top:auto;width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,#238636,#1f6feb);color:white;border:1px solid rgba(255,255,255,0.2);z-index:200;display:none;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 8px 32px rgba(0,0,0,0.4);transition:all 0.3s;backdrop-filter:blur(8px)}
        .gyro-btn.active{background:#238636;border-color:#2ea043;box-shadow:0 0 15px rgba(46,160,67,0.4)}
        .gyro-btn:hover{transform:scale(1.1)}
        @media (max-width:768px){.gyro-btn{display:flex}}
        
        /* Background Audio */
        .bg-audio-controls { position: fixed; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); border-radius: 25px; z-index: 1000; transition: opacity 0.3s; }
        .bg-audio-controls:hover { background: rgba(0,0,0,0.85); }
        
        /* Responsive Positions */
        @media (min-width: 769px) {
            .bg-audio-controls.pos-desktop-bottom-left { bottom: 20px; left: 20px; right: auto; top: auto; }
            .bg-audio-controls.pos-desktop-bottom-right { bottom: 20px; right: 20px; left: auto; top: auto; }
            .bg-audio-controls.pos-desktop-top-left { top: 20px; left: 20px; right: auto; bottom: auto; }
            .bg-audio-controls.pos-desktop-top-right { top: 20px; right: 74px; left: auto; bottom: auto; }
        }
        @media (max-width: 768px) {
            .bg-audio-volume { display: none; }
        }
        .bg-audio-btn { background: transparent; border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.2s; }
        .bg-audio-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }
        .bg-audio-toggle .icon-pause { display: none; }
        .bg-audio-controls.playing .bg-audio-toggle .icon-play { display: none; }
        .bg-audio-controls.playing .bg-audio-toggle .icon-pause { display: flex; }
        .bg-audio-mute .icon-muted { display: none; }
        .bg-audio-controls.muted .bg-audio-mute .icon-volume { display: none; }
        .bg-audio-controls.muted .bg-audio-mute .icon-muted { display: flex; }
        .bg-audio-volume { width: 0; overflow: hidden; transition: width 0.3s ease; }
        .bg-audio-controls:hover .bg-audio-volume { width: 80px; }
        .bg-audio-slider { width: 80px; height: 4px; -webkit-appearance: none; background: rgba(255,255,255,0.3); border-radius: 2px; cursor: pointer; }
        .bg-audio-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; background: #58a6ff; border-radius: 50%; }
        /* Audio Prompt - Modern Design */
        .bg-audio-prompt { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(8px); }
        .prompt-choices { 
             display: flex; 
             gap: 40px; 
             align-items: center;
             justify-content: center;
             background: transparent;
             padding: 20px;
        }
        
        .prompt-choice-btn {
            background: #161b22;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 24px;
            width: 120px;
            height: 120px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #8b949e;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }
        
        /* Comparison Toggle Button */
        #compare-toggle-btn {
            position: fixed;
            bottom: 80px;
            left: 20px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, #238636, #1f6feb);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1002;
            backdrop-filter: blur(8px);
            transition: all 0.2s;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        }
        #compare-toggle-btn svg { width: 22px; height: 22px; }
        #compare-toggle-btn:hover { transform: scale(1.05); border-color: white; filter: brightness(1.1); }
        #compare-toggle-btn.active { background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%); border-color: white; box-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }
        
        /* Comparison Toggle Button Positions */
        #compare-toggle-btn.pos-bottom-left { bottom: 80px; left: 20px; }
        #compare-toggle-btn.pos-bottom-right { bottom: 80px; right: 20px; left: auto; }
        #compare-toggle-btn.pos-top-left { top: 80px; left: 20px; bottom: auto; }
        #compare-toggle-btn.pos-top-right { top: 80px; right: 20px; bottom: auto; left: auto; }
        
        /* Comparison Slider */
        #compare-slider {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 50%;
            width: 4px;
            background: white;
            z-index: 1000;
            display: none;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        }
        #compare-handle {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 44px;
            height: 44px;
            background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
            border-radius: 50%;
            cursor: ew-resize;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
            z-index: 1001;
            border: 2px solid white;
        }
        #compare-handle svg { width: 16px; height: 16px; color: white; }
        #compare-handle:hover { transform: translate(-50%, -50%) scale(1.1); }
        
        @media (max-width: 768px) {
            #compare-toggle-btn { width: 40px; height: 40px; }
            #compare-toggle-btn.pos-bottom-left { bottom: 140px; left: 16px; }
            #compare-toggle-btn.pos-bottom-right { bottom: 140px; right: 16px; }
            #compare-handle { width: 40px; height: 40px; }
        }

        /* Labels */
        .compare-label {
            position: absolute;
            top: 20px;
            width: 50%;
            pointer-events: none;
            display: flex;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 1001;
        }
        #compare-label-left { 
            left: 0; 
            justify-content: flex-start;
            padding-left: 20px;
        }
        #compare-label-right { 
            right: 0;
            justify-content: flex-end;
            padding-right: 20px;
        }
        .compare-label span {
            padding: 8px 16px;
            background: rgba(0, 0, 0, 0.7);
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 20px;
            font-weight: 500;
            font-size: 13px;
            text-shadow: 0 1px 2px black;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            backdrop-filter: blur(4px);
            color: white;
        }
        .compare-label.visible { opacity: 1; }

        /* Auto Rotate Button */
        .autorotate-btn {
            position: fixed;
            z-index: 1000;
            width: 44px; height: 44px;
            border-radius: 50%;
            background: rgba(22,27,34,0.85);
            color: white;
            border: 1px solid rgba(255,255,255,0.2);
            display: flex; align-items: center; justify-content: center;
            cursor: pointer;
            backdrop-filter: blur(8px);
            transition: all 0.2s;
            box-shadow: 0 4px 15px rgba(0,0,0,0.4);
        }
        .autorotate-btn:hover { background: rgba(88,166,255,0.3); border-color: #58a6ff; transform: scale(1.05); }
        .autorotate-btn svg { width: 24px; height: 24px; pointer-events: none; }
        .autorotate-btn .icon-play { display: none; margin-left: 2px; } /* Optical alignment */
        .autorotate-btn .icon-pause { display: flex; }
        .autorotate-btn.paused .icon-play { display: flex; }
        .autorotate-btn.paused .icon-pause { display: none; }
        
        /* Positioning classes */
        .pos-tl { top: 20px; left: 20px; }
        .pos-tr { top: 20px; right: 20px; }
        .pos-bl { bottom: 20px; left: 20px; }
        .pos-br { bottom: 20px; right: 20px; }
        
        /* Mobile overrides if needed */
        @media (max-width: 600px) {
            .pos-tl { top: calc(12px + env(safe-area-inset-top)); left: 16px; }
            .pos-tr { top: calc(12px + env(safe-area-inset-top)); right: 16px; }
            .pos-bl { bottom: 16px; left: 16px; }
            .pos-br { bottom: 16px; right: 16px; }
        }
        
        .prompt-choice-btn:hover { transform: translateY(-5px); }
        
        .prompt-choice-btn svg { width: 48px; height: 48px; margin-bottom: 8px; transition: all 0.2s; }
        
        /* Play Button (Green Accent) */
        .prompt-choice-btn.play:hover { 
            background: linear-gradient(145deg, #1f2428, #1c2126);
            border-color: #2ea043; 
            color: #3fb950; 
            box-shadow: 0 0 30px rgba(46, 160, 67, 0.2); 
        }
        .prompt-choice-btn.play:hover svg { transform: scale(1.1); }

        /* Mute Button (Red Accent) */
        .prompt-choice-btn.mute:hover { 
            background: linear-gradient(145deg, #1f2428, #1c2126);
            border-color: #da3633; 
            color: #f85149; 
            box-shadow: 0 0 30px rgba(218, 54, 51, 0.2); 
        }
        .prompt-choice-btn.mute:hover svg { transform: scale(1.1); }

        /* Label Text */
        .prompt-label { font-size: 14px; font-weight: 500; opacity: 0.8; }
        
        /* ============ FLOORPLAN STYLES ============ */
        .floorplan-modal {
            position: fixed;
            z-index: 9000;
            display: flex;
            flex-direction: column;
            background: rgba(22, 27, 34, 0.02);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.5);
            border: 1px solid rgba(255,255,255,0.1);
            overflow: visible;
            resize: none;
            min-width: 260px;
            min-height: 280px;
            max-width: calc(100vw - 20px);
            max-height: calc(100vh - 100px);
        }
        .floorplan-modal.hidden { display: none !important; }
        .floorplan-modal.minimized {
            width: 56px !important;
            height: 56px !important;
            min-width: 56px !important;
            min-height: 56px !important;
            border-radius: 50% !important;
            resize: none !important;
            background: linear-gradient(135deg, #10b981, #3b82f6) !important;
        }
        .floorplan-minimized-icon {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            cursor: pointer;
        }
        .floorplan-minimized-icon.hidden { display: none !important; }
        .floorplan-modal.minimized .floorplan-modal-content { display: none !important; }
        .floorplan-modal-content {
            display: flex;
            flex-direction: column;
            height: 100%;
            width: 100%;
            overflow: hidden;
            border-radius: 12px;
        }
        .floorplan-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 12px;
            background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
            cursor: move;
            user-select: none;
            flex-shrink: 0;
        }
        .floorplan-title {
            display: flex;
            align-items: center;
            gap: 8px;
            color: white;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .floorplan-actions {
            display: flex;
            gap: 2px;
        }
        .floorplan-actions button {
            background: transparent;
            border: none;
            color: rgba(255,255,255,0.9);
            padding: 6px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .floorplan-actions button:hover { background: rgba(0,0,0,0.2); }
        .floorplan-actions button.close-btn:hover { background: rgba(239,68,68,0.8); }
        .floorplan-tabs {
            display: flex;
            gap: 4px;
            padding: 6px 8px;
            background: rgba(0,0,0,0.3);
            border-bottom: 1px solid rgba(255,255,255,0.05);
            overflow-x: auto;
            flex-shrink: 0;
        }
        .floorplan-level-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 5px 12px;
            font-size: 10px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            white-space: nowrap;
            background: rgba(255,255,255,0.05);
            color: #9ca3af;
            font-family: inherit;
        }
        .floorplan-level-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
        .floorplan-level-btn.active {
            background: #3b82f6;
            color: white;
            font-weight: 700;
        }
        .floorplan-viewport {
            flex: 1;
            position: relative;
            overflow: hidden;
            background: transparent;
            cursor: grab;
        }
        .floorplan-viewport:active { cursor: grabbing; }
        .floorplan-viewport.locked { cursor: default; }
        #floorplan-canvas {
            position: absolute;
            transform-origin: 0 0;
            will-change: transform;
        }
        #floorplan-img {
            display: block;
            pointer-events: none;
            user-select: none;
        }
        #floorplan-points-layer {
            position: absolute;
            inset: 0;
            pointer-events: none;
        }
        .floorplan-point {
            position: absolute;
            transform: translate(-50%, -50%);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            border: 3px solid white;
            box-shadow: 0 2px 10px rgba(0,0,0,0.4);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            pointer-events: auto;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .floorplan-point:hover {
            transform: translate(-50%, -50%) scale(1.15);
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
        }
        .floorplan-point.active {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.4);
            z-index: 20;
            transform: translate(-50%, -50%) scale(1.1);
        }
        .floorplan-point::after {
            content: attr(data-label);
            position: absolute;
            bottom: var(--tooltip-bottom, 38px);
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.9);
            color: white;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: var(--tooltip-font-size, 14px) !important;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0s;
            z-index: 100;
        }
        .floorplan-point:hover::after { opacity: 1; transition: opacity 0.2s; }
        .floorplan-empty-state {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 20px;
            background: #0d1117;
            z-index: 30;
        }
        .floorplan-empty-state.hidden { display: none !important; }
        .floorplan-empty-state p {
            font-size: 13px;
            color: #9ca3af;
            margin: 0;
        }
        .floorplan-empty-state.hidden { display: none !important; }

        /* Resize Btn */
        .fp-resize-btn { 
            background: transparent; 
            border: none; 
            color: rgba(255,255,255,0.7); 
            padding: 4px; 
            cursor: pointer; 
            display: flex; 
            align-items: center; 
            border-radius: 4px;
        }
        .fp-resize-btn:hover { 
            color: white; 
            background: rgba(255,255,255,0.1); 
        }

        .floorplan-lock-indicator {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(239, 68, 68, 0.95);
            color: white;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 4px;
            pointer-events: none;
            transition: opacity 0.2s;
        }
        .floorplan-lock-indicator.opacity-0 { opacity: 0; }
        .floorplan-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 12px;
            background: rgba(0,0,0,0.3);
            border-top: 1px solid rgba(255,255,255,0.05);
            flex-shrink: 0;
        }
        .floorplan-stats {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 10px;
            color: #6b7280;
            font-family: monospace;
        }
        .floorplan-stats .divider {
            width: 1px;
            height: 12px;
            background: rgba(255,255,255,0.1);
        }
        .floorplan-btn-open {
            position: fixed;
            bottom: 20px;
            left: 20px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: linear-gradient(135deg, #10b981, #3b82f6);
            border: none;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
            z-index: 999;
            transition: transform 0.2s;
        }
        .floorplan-btn-open:hover { transform: scale(1.1); }
        .floorplan-btn-open.hidden { display: none !important; }
        /* Resize Handle - BOTH Desktop and Mobile */
        .floorplan-resize-handle {
            position: absolute; bottom: -4px; right: -4px; width: 36px; height: 36px;
            cursor: se-resize; display: flex; align-items: center; justify-content: center;
            color: rgba(255,255,255,0.5); background: linear-gradient(135deg, transparent 40%, rgba(16,185,129,0.3) 40%);
            border-radius: 0 0 12px 0; touch-action: none; z-index: 9999;
            transition: color 0.2s, background 0.2s;
        }
        .floorplan-resize-handle:hover { color: #10b981; background: linear-gradient(135deg, transparent 30%, rgba(16,185,129,0.5) 30%); }
        .floorplan-resize-handle:active { color: #10b981; background: linear-gradient(135deg, transparent 30%, rgba(16,185,129,0.7) 30%); }
        .floorplan-resize-handle svg { pointer-events: none; }
        .floorplan-modal.minimized .floorplan-resize-handle, 
        .floorplan-modal.minimized #floorplan-resize-handle,
        .floorplan-modal.minimized .floorplan-resize-handle-left,
        .floorplan-modal.minimized #floorplan-resize-handle-left { 
            display: none !important; 
        }

        .floorplan-resize-handle-left {
            position: absolute; bottom: -4px; left: -4px; width: 36px; height: 36px;
            cursor: sw-resize; display: flex; align-items: center; justify-content: center;
            color: rgba(255,255,255,0.5); background: linear-gradient(225deg, transparent 40%, rgba(16,185,129,0.3) 40%);
            border-radius: 0 0 0 12px; touch-action: none; z-index: 9999;
            transition: color 0.2s, background 0.2s;
        }
        .floorplan-resize-handle-left:hover { color: #10b981; background: linear-gradient(225deg, transparent 30%, rgba(16,185,129,0.5) 30%); }
        .floorplan-resize-handle-left:active { color: #10b981; background: linear-gradient(225deg, transparent 30%, rgba(16,185,129,0.7) 30%); }
        .floorplan-resize-handle-left svg { pointer-events: none; transform: scaleX(-1); }
        @media (max-width: 768px) {
            .floorplan-modal { min-width: 200px; min-height: 200px; resize: none !important; }
            .floorplan-point { width: 36px; height: 36px; }
            .floorplan-btn-open { bottom: 80px; left: 10px; }
            .floorplan-resize-handle { width: 52px; height: 52px; bottom: -6px; right: -6px; }
            .floorplan-resize-handle-left { width: 52px; height: 52px; bottom: -6px; left: -6px; }
            .floorplan-resize-handle svg, .floorplan-resize-handle-left svg { width: 28px; height: 28px; }
        }
        
        /* PocketSV Loading Overlay */
        .pocketsv-loading-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            z-index: 99999; opacity: 1; transition: opacity 0.4s ease-out;
        }
        .pocketsv-loading-overlay.fade-out { opacity: 0; pointer-events: none; }
        .pocketsv-loading-logo {
            max-width: 280px; max-height: 140px; margin-bottom: 40px;
            animation: pocketsv-pulse 2s ease-in-out infinite;
            filter: drop-shadow(0 4px 20px rgba(88, 166, 255, 0.3));
        }
        @keyframes pocketsv-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.03); opacity: 0.9; } }
        .pocketsv-loading-container { width: 300px; text-align: center; max-width: 85vw; }
        .pocketsv-loading-bar-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
        .pocketsv-loading-bar-fill {
            height: 100%; width: 0%; background: linear-gradient(90deg, #22c55e 0%, #3b82f6 50%, #06b6d4 100%);
            border-radius: 3px; transition: width 0.3s ease-out; position: relative;
        }
        .pocketsv-loading-bar-fill::after {
            content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
            animation: pocketsv-shimmer 1.5s infinite;
        }
        @keyframes pocketsv-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
        .pocketsv-loading-percent { font-size: 24px; font-weight: 600; color: #58a6ff; margin-top: 15px; font-family: system-ui, sans-serif; }
        .pocketsv-loading-text { font-size: 14px; color: rgba(255,255,255,0.8); margin-top: 10px; font-family: system-ui, sans-serif; }
        @media (max-width: 480px) {
            .pocketsv-loading-logo { max-width: 200px; max-height: 100px; }
            .pocketsv-loading-container { width: 250px; }
            .pocketsv-loading-percent { font-size: 20px; }
        }
        