        /* ================= V50 Design System & International Style ================= */
        :root {
            --mica-bg: rgba(255, 255, 255, 0.95);
            --mica-border: 1px solid rgba(0, 0, 0, 0.12);
            --mica-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
            --blur-amt: blur(24px) saturate(110%);
            --radius-win: 8px;
            --accent-green: #000000; /* Modified to black for minimalist design */
            --accent-red: #e81123;
            --text-primary: #000000;
            --bg-color: #f0f0f0;
            --font-stack: 'Helvetica Neue', Helvetica, Arial, sans-serif;
        }

        body { 
            margin: 0; overflow: hidden; 
            background-color: var(--bg-color);
            font-family: var(--font-stack); color: var(--text-primary);
            user-select: none; -webkit-tap-highlight-color: transparent;
            touch-action: none; 
        }

        #app-background-layer {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            z-index: -1; pointer-events: none; overflow: hidden;
            background-color: var(--bg-color); transition: background-color 0.3s;
        }

        #bg-custom-image {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background-position: center; background-size: cover; background-repeat: no-repeat;
            opacity: 0; transition: opacity 0.5s;
        }
        #bg-custom-image.active { opacity: 1; }

        #bg-camera-video {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            object-fit: cover; opacity: 0; transition: opacity 0.5s; transform: scaleX(1);
        }
        #bg-camera-video.active { opacity: 1; }

        #canvas-container { width: 100vw; height: 100vh; display: block; outline: none; position: relative; z-index: 1; }
        body.mode-ruler #canvas-container { cursor: crosshair; }
        body.mode-hide #canvas-container { cursor: alias; }

        .fluent-glass {
            background: var(--mica-bg); backdrop-filter: var(--blur-amt);
            -webkit-backdrop-filter: var(--blur-amt);
            border: var(--mica-border); box-shadow: var(--mica-shadow);
            border-radius: var(--radius-win);
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }

        /* --- Recording Overlay --- */
        #recording-status {
            position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
            background: rgba(232, 17, 35, 0.9); color: white;
            padding: 8px 24px; border-radius: 20px; font-weight: 600; font-size: 14px;
            display: flex; align-items: center; gap: 10px; z-index: 200;
            opacity: 0; pointer-events: none; transition: 0.3s;
            box-shadow: 0 4px 15px rgba(232, 17, 35, 0.3);
        }
        #recording-status.active { opacity: 1; transform: translateX(-50%) translateY(0); }
        .rec-dot { width: 10px; height: 10px; background: white; border-radius: 50%; animation: pulse-red 1s infinite; }
        @keyframes pulse-red { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

        /* ================= Redesigned Loader Screen (Swiss / International Style) ================= */
        #loader-screen { 
            position: fixed; inset: 0; background: #ffffff; 
            display: grid; grid-template-rows: 1fr auto; 
            z-index: 100; opacity: 1; visibility: visible;
            transition: opacity 0.5s ease-out, visibility 0s 0s; 
            overflow-y: auto; overflow-x: hidden;
            touch-action: pan-y !important; -webkit-overflow-scrolling: touch;
        }
        #loader-screen.hidden-ui { 
            opacity: 0; visibility: hidden; transition: opacity 0.5s ease-out, visibility 0s 0.5s; 
            pointer-events: none !important; 
        }
        #loader-screen.hidden-ui * { pointer-events: none !important; }

        .loader-content { 
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4vw;
            align-content: center;
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
            padding: 4vw;
            box-sizing: border-box;
        }
        
        .loader-left-col {
            display: flex;
            flex-direction: column;
            justify-content: center;
            border-right: 2px solid #000;
            padding-right: 4vw;
        }

        .loader-right-col {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 2rem;
        }

        @media (max-width: 900px) {
            .loader-content {
                grid-template-columns: 1fr;
                gap: 2rem;
                padding-top: 80px;
                align-content: start;
            }
            .loader-left-col {
                border-right: none;
                border-bottom: 2px solid #000;
                padding-right: 0;
                padding-bottom: 2rem;
            }
        }

        .app-title { 
            font-size: clamp(3rem, 6vw, 6rem); 
            font-weight: 800; 
            margin-bottom: 1rem; 
            color: #000000; 
            text-align: left; 
            line-height: 1;
            letter-spacing: -0.03em;
            text-transform: uppercase;
        }
        
        .app-subtitle {
            font-size: clamp(1rem, 1.5vw, 1.25rem);
            font-weight: 400;
            color: #333;
            line-height: 1.6;
            margin-bottom: 1rem;
        }

        .action-row { display: flex; flex-direction: column; gap: 1rem; width: 100%; position: relative; }

        .load-btn { 
            background: #000; color: white; padding: 18px 24px; 
            border: 2px solid #000; border-radius: 0; 
            font-weight: 700; font-size: 1.1rem; letter-spacing: 0.05em;
            cursor: not-allowed; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
            pointer-events: auto; display: flex; align-items: center; justify-content: center; 
            width: 100%; position: relative; overflow: hidden; text-transform: uppercase;
        }
        .load-btn.ready { cursor: pointer; }
        .load-btn.ready:hover { background: #fff; color: #000; }
        .load-btn.ready:active { transform: scale(0.99); }
        .load-btn.loading { background: #333; cursor: wait; animation: pulse 1.5s infinite; }
        
        .mini-btn {
            background: transparent; border: 1px solid #000; color: #000;
            padding: 12px 20px; border-radius: 0; font-size: 0.85rem; font-weight: 600;
            cursor: pointer; transition: 0.2s; text-decoration: none; display: inline-flex; 
            align-items: center; text-transform: uppercase;
        }
        .mini-btn:hover { background: #000; color: #fff; }
        .mini-btn:active { transform: scale(0.98); }

        .tech-info-tip { 
            font-size: 0.85rem; color: #333; background: #fafafa; padding: 1.5rem; 
            border: 1px solid #eaeaea; border-left: 4px solid #000; 
            line-height: 1.6; text-align: left; border-radius: 0;
        }
        
        .nav-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
        .sub-link-item { 
            text-decoration: none; background: transparent; padding-bottom: 2px;
            font-size: 0.85rem; border-bottom: 1px solid #000; color: #000; 
            transition: 0.2s; font-weight: 600; text-transform: uppercase;
        }
        .sub-link-item:hover { opacity: 0.5; border-color: #666; }

        .loader-footer { width: 100%; display: flex; flex-direction: column; align-items: center; background: transparent; z-index: 1; padding-bottom: 20px; }
        .footer-banner-frame { width: 100%; height: 120px; border: none; display: block; pointer-events: none; margin-bottom: -10px; }
        .loader-copyright { font-size: 11px; color: #555; font-family: 'Consolas', monospace; text-align: center; position: relative; z-index: 10; line-height: 1.6; }
        .contact-info { position: fixed; bottom: 10px; width: 100%; text-align: center; font-size: 10px; color: #555; z-index: 10; pointer-events: none; font-family: 'Consolas', monospace; line-height: 1.4; }

        /* 微信上传模态框样式 */
        #wechat-upload-modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:1000; justify-content:center; align-items:center; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
        .modal-content { background:white; padding:24px; border-radius:0; max-width:90%; width: 400px; text-align:center; border: 2px solid #000; }

        /* --- Dashboard --- */
        #dashboard { position: fixed; top: 20px; left: 20px; width: 260px; z-index: 40; transform-origin: top left; overflow: hidden; max-height: 400px; transition: max-height 0.3s ease-in-out, width 0.3s ease-in-out; }
        #dashboard.collapsed { max-height: 42px; width: 140px; }
        #dashboard.mobile-mini { width: 36px !important; height: 36px !important; max-height: 36px !important; border-radius: 50%; padding: 0; cursor: pointer; background: rgba(255,255,255,0.9); box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: none !important; top: 20px !important; left: 20px !important; margin: 0 !important; display: block !important; }
        #dashboard.mobile-mini .dash-content, #dashboard.mobile-mini .dash-toggle-icon, #dashboard.mobile-mini .dash-header span { display: none; }
        #dashboard.mobile-mini::after { content: ''; display: block; width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23333333' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z' /%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 18px; }
        #dashboard.mobile-mini.expanded { width: 200px !important; height: auto !important; max-height: 300px !important; border-radius: var(--radius-win); display: block !important; }
        #dashboard.mobile-mini.expanded .dash-content { display: block; }
        #dashboard.mobile-mini.expanded .dash-header span { display: inline; }
        #dashboard.mobile-mini.expanded::after { content: none; }
        .dash-header { padding: 12px 16px; font-size: 12px; font-weight: 700; color: #333; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; border-bottom: 1px solid rgba(0,0,0,0.05); background: rgba(255,255,255,0.5); }
        .dash-content { padding: 12px 16px; }
        .dash-toggle-icon { transition: transform 0.3s; font-size: 10px; color: #666; }
        #dashboard.collapsed .dash-toggle-icon { transform: rotate(-90deg); }
        .dash-row { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; }
        .dash-row .val { font-weight: 700; color: #000; font-family: 'Consolas', monospace; }
        .dash-sec { margin: 12px 0 6px 0; font-size: 11px; font-weight: 700; color: #888; letter-spacing: 0.5px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 4px; }

        /* --- Info Panel --- */
        #info-panel { position: fixed; bottom: 90px; left: 20px; width: 240px; z-index: 40; max-height: 300px; overflow: hidden; display: none; }
        #info-panel.collapsed { max-height: 40px; width: 120px; }
        .info-header { padding: 10px 16px; font-weight: 700; font-size: 12px; color: #000; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: rgba(255,255,255,0.5); }
        .info-content { padding: 12px 16px; }
        .warning-box { background: #fff7ed; border-left: 3px solid #f97316; padding: 8px; margin-bottom: 10px; font-size: 11px; color: #9a3412; line-height: 1.4; }
        .key-item { display: flex; justify-content: space-between; margin-bottom: 6px; color: #444; font-size: 12px; }
        .key-badge { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 4px; font-family: 'Consolas', monospace; font-size: 11px; }

        /* --- lil-gui --- */
        .lil-gui { --background-color: transparent !important; --text-color: var(--text-primary) !important; --title-background-color: #f0f0f0 !important; --widget-color: #ffffff !important; --hover-color: #f5f5f5 !important; --focus-color: #000 !important; --number-color: #000 !important; --string-color: #000 !important; font-family: var(--font-stack) !important; font-size: 13px !important; width: 100% !important; --name-width: 40% !important; }
        .lil-gui.root { position: absolute; top: 20px; right: 20px; z-index: 50; background: rgba(255, 255, 255, 0.98) !important; backdrop-filter: blur(40px) !important; border: 1px solid rgba(0,0,0,0.12) !important; border-radius: var(--radius-win) !important; box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important; padding: 0 !important; width: 340px; min-width: 280px; max-width: 500px; resize: horizontal; display: flex; flex-direction: column; max-height: 85vh; overflow: auto; } /* Added overflow: auto */
        .lil-gui .title { color: #111 !important; font-weight: 700 !important; font-size: 14px !important; height: 36px !important; line-height: 36px !important; text-align: center; border-bottom: 1px solid rgba(0,0,0,0.1) !important; }
        .lil-gui .children { padding: 12px 16px 12px 12px !important; overflow-y: auto; overflow-x: visible !important; }
        .lil-gui .controller { margin-bottom: 14px !important; border-bottom: 1px solid rgba(0,0,0,0.03); }
        .lil-gui input[type="checkbox"]::after { content: none !important; display: none !important; }
        .lil-gui input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; background: #e5e5e5 !important; border: 1px solid #999 !important; border-radius: 4px; cursor: pointer; margin-right: 8px; vertical-align: middle; transition: all 0.2s; }
        .lil-gui input[type="checkbox"]:checked { background-color: #000 !important; border-color: #000 !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); background-size: 12px 12px; background-position: center; background-repeat: no-repeat; }
        .lil-gui .slider { background-color: #d1d1d1 !important; border-radius: 4px; height: 8px !important; margin-top: -2px; }
        .lil-gui .slider-fg { background-color: #000 !important; border-radius: 4px; }
        .lil-gui .slider-fg::after { content: ''; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; background: #fff; border: 3px solid #000; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.25); cursor: grab; z-index: 10; }

        /* --- Toolbar --- */
        .toolbar-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: 95vw; z-index: 45; display: flex; align-items: center; }
        .toolbar { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border: 1px solid rgba(0,0,0,0.1); padding: 6px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; max-width: 100%; } /* Added max-width */
        .toolbar::-webkit-scrollbar { display: none; }
        .scroll-hint-wrapper { position: absolute; right: 0; top: 0; bottom: 0; width: 30px; pointer-events: none; background: linear-gradient(to right, transparent, rgba(255,255,255,0.9)); border-top-right-radius: 12px; border-bottom-right-radius: 12px; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; opacity: 0; transition: opacity 0.3s; }
        .scroll-hint-wrapper.active { opacity: 1; }
        .scroll-arrow { color: #000; font-weight: bold; font-size: 16px; animation: bounceRight 1.5s infinite; }
        .t-btn { padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #444; background: transparent; border: none; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.1s; flex-shrink: 0; white-space: nowrap;}
        .t-btn:hover { background: rgba(0,0,0,0.05); }
        .t-btn.active { background: #e6f7e6; color: #000; border: 1px solid rgba(0, 0, 0, 0.2); }
        .t-btn.primary { background: #1a1a1a; color: white; }
        .t-btn.record { background: transparent; color: #d93025; border: 1px solid transparent; }
        .t-btn.record:hover { background: #fff0f0; }
        .t-btn.action { color: #000; background: rgba(0, 0, 0, 0.05); }
        .t-btn.warning { color: #d97706; }
        .panel-split-anchor { position: relative; display: flex; align-items: center; flex-shrink: 0; }
        .panel-split-btn { display: flex; align-items: stretch; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,0.08); background: rgba(255,255,255,0.92); }
        #btn-settings-toggle { display: flex !important; border-radius: 0; }
        .panel-menu-trigger { min-width: 34px; justify-content: center; padding-left: 10px; padding-right: 10px; border-radius: 0; border-left: 1px solid rgba(0,0,0,0.08); }
        .panel-menu-trigger.active { background: rgba(0,0,0,0.08); }
        .panel-hierarchy-menu { position: fixed; left: 0; top: 0; display: none; flex-direction: column; min-width: 132px; padding: 6px; gap: 4px; z-index: 260; pointer-events: auto; box-shadow: 0 10px 26px rgba(0,0,0,0.14); }
        .panel-hierarchy-menu.active { display: flex; }
        .panel-hierarchy-item { border: none; background: transparent; color: #222; font-size: 12px; font-weight: 600; text-align: left; padding: 10px 12px; border-radius: 6px; cursor: pointer; }
        .panel-hierarchy-item:hover { background: rgba(0,0,0,0.06); }
        .panel-hierarchy-item.active { background: #e6f7e6; color: #000; }
        #sel-camera { appearance: none; padding-right: 28px; border: 1px solid transparent; background-color: transparent; font-weight: 600; color: #333; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23333'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 12px; }

        /* --- Modals --- */
        #warn-modal, #unit-modal, #ai-animation-modal, #smart-export-modal, #smart-export-preview-modal { 
            position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; 
            display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); 
        }
        #warn-modal.active, #unit-modal.active, #ai-animation-modal.active, #smart-export-modal.active, #smart-export-preview-modal.active { 
            display: flex; 
        }
        .modal-box { background: white; width: 90%; max-width: 420px; padding: 24px; border-radius: 0; border: 2px solid #000; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
        
        /* AI动画模态框特定样式 */
        #ai-animation-modal .modal-box, #smart-export-modal .modal-box, #smart-export-preview-modal .modal-box { 
            max-width: 500px; text-align: left; 
        }
        .smart-export-preview-box { max-width: 680px !important; }
        .smart-export-preview-frame { width: 100%; min-height: 240px; max-height: 60vh; display: flex; align-items: center; justify-content: center; background: #f7f7f7; border: 1px solid #ddd; margin-bottom: 12px; overflow: hidden; }
        .smart-export-preview-image { width: 100%; height: auto; display: block; object-fit: contain; max-height: 60vh; }
        .smart-export-preview-meta { font-size: 11px; color: #666; margin-bottom: 12px; font-family: 'Consolas', monospace; }
        #advanced-panel-modal {
            position: fixed;
            top: 20px;
            right: 20px;
            left: auto;
            bottom: auto;
            width: min(420px, calc(100vw - 40px));
            z-index: 50;
            display: none;
            background: transparent;
            pointer-events: none;
        }
        #advanced-panel-modal.active {
            display: block;
        }
        .advanced-panel-box {
            width: 100%;
            max-height: 85vh;
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 14px;
            background: rgba(255, 255, 255, 0.98) !important;
            backdrop-filter: blur(40px) !important;
            -webkit-backdrop-filter: blur(40px) !important;
            border: 1px solid rgba(0,0,0,0.12) !important;
            border-radius: var(--radius-win) !important;
            box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
            pointer-events: auto;
            overflow: auto;
            box-sizing: border-box;
        }
        .advanced-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 12px; }
        .advanced-panel-title { font-size: 18px; font-weight: 700; color: #111; }
        .advanced-panel-subtitle { font-size: 12px; color: #666; margin-top: 4px; }
        .advanced-panel-close { border: 1px solid #000; background: #fff; color: #000; padding: 8px 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
        .advanced-panel-section { display: flex; flex-direction: column; gap: 10px; }
        .advanced-panel-section-title { font-size: 14px; font-weight: 700; color: #111; }
        .advanced-panel-label { font-size: 12px; font-weight: 600; color: #333; }
        .advanced-panel-select { width: 100%; padding: 10px 12px; border: 1px solid #000; background: #fff; font-size: 13px; }
        .advanced-panel-checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #333; }
        .advanced-panel-action { border: 1px solid #000; background: #000; color: #fff; padding: 12px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
        .advanced-panel-note { font-size: 11px; line-height: 1.5; color: #777; }
        .ai-prompt-input, .export-prompt-input { 
            width: 100%; padding: 12px; border: 1px solid #000; border-radius: 0; font-size: 13px; font-family: var(--font-stack); margin-bottom: 12px; resize: vertical; min-height: 80px; box-sizing: border-box;
        }
        .ai-prompt-input:focus, .export-prompt-input:focus { outline: none; border-width: 2px; }
        .ai-example-text, .export-example-text { font-size: 11px; color: #666; margin-bottom: 8px; font-style: italic; }
        .ai-warning-box, .export-warning-box { background: #fff8e6; border-left: 3px solid #ffc107; padding: 10px 12px; margin: 12px 0; font-size: 12px; color: #856404; line-height: 1.4; border-radius: 0; }
        .ai-action-row, .export-action-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
        .ai-action-btn, .export-action-btn { flex: 1; padding: 10px 16px; border-radius: 0; border: 1px solid #000; background: white; font-weight: 600; font-size: 13px; cursor: pointer; transition: 0.2s; min-width: 120px; }
        .ai-action-btn:hover, .export-action-btn:hover { background: #f5f5f5; border-color: #000; }
        .ai-action-btn.primary, .export-action-btn.primary { background: #000; color: white; border-color: #000; }
        .ai-action-btn.secondary, .export-action-btn.secondary { background: white; color: #000; border-color: #000; }
        .ai-footer-note, .export-footer-note { font-size: 10px; color: #888; text-align: center; margin-top: 20px; padding-top: 12px; border-top: 1px solid #eee; line-height: 1.4; }
        .ai-loading, .export-loading { display: none; text-align: center; padding: 20px; color: #666; font-size: 13px; }
        .ai-loading.active, .export-loading.active { display: block; }
        .ai-loading-spinner, .export-loading-spinner { border: 3px solid #f3f3f3; border-top: 3px solid #000; border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; margin: 0 auto 10px; }
        .ai-loading-stage { font-size: 13px; color: #222; font-weight: 600; margin-bottom: 6px; }
        .ai-loading-meta { font-size: 11px; color: #888; margin-bottom: 10px; font-family: 'Consolas', monospace; }
        .ai-loading-log { margin: 0; max-height: 150px; overflow: auto; padding: 12px; background: #0f1115; color: #7ee787; border: 1px solid #202938; border-radius: 8px; text-align: left; white-space: pre-wrap; word-break: break-word; font-size: 11px; line-height: 1.5; font-family: 'Consolas', monospace; }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        
        /* 智能出图模态框特定样式 */
        .export-preset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
        .export-preset-btn { padding: 8px 12px; border: 1px solid #ddd; background: white; border-radius: 0; font-size: 12px; cursor: pointer; transition: 0.2s; text-align: left; }
        .export-preset-btn:hover { background: #f0f0f0; border-color: #bbb; }
        .export-preset-btn.active { background: #e6f7e6; border-color: #000; color: #000; }
        .export-config-section { background: #f9fafb; padding: 12px; border-radius: 0; margin-bottom: 16px; }
        .export-config-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: #333; }
        .export-checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; }
        .export-checkbox-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; }
        .export-checkbox-item input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }

        .unit-btn-group { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
        .unit-btn { flex: 1; padding: 12px; border-radius: 0; border: 1px solid #000; background: white; font-weight: 600; color: #000; cursor: pointer; transition: 0.2s; }
        .unit-btn:hover { background: #000; color: white; }
        .unit-btn.primary { background: #000; color: white; border-color: #000; }

        #toast-msg { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: #000; color: white; padding: 10px 24px; border-radius: 30px; font-weight: 600; font-size: 14px; z-index: 200; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        #toast-msg.show { transform: translateX(-50%) translateY(0); }
        .dim-label { position: absolute; background: rgba(0,0,0,0.8); color: white; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-family: monospace; pointer-events: none; transform: translate(-50%, -50%); white-space: nowrap; z-index: 30; }
        .ruler-tooltip { background: #000; z-index: 60; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
        .grid-line { position: absolute; background: rgba(0,0,0,0.4); }
        #comp-grid { position: fixed; inset: 0; pointer-events: none; z-index: 35; opacity: 0; transition: 0.3s; }
        #comp-grid.active { opacity: 1; }
        .icon { width: 16px; height: 16px; stroke-width: 2; }
        .transparent-preview { background-image: linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%) !important; background-size: 20px 20px !important; background-color: #fff !important; }
        @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }
        @keyframes bounceRight { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }

        /* [增强响应式] 平板和横屏适配 */
        @media (max-width: 768px) { 
            .lil-gui.root { display: none; top: 60px !important; right: 10px !important; width: auto !important; min-width: 250px !important; max-width: 90vw !important; } 
            .lil-gui.root.active { display: flex !important; } /* 修复移动端点击显示 */
            #advanced-panel-modal { top: 60px !important; right: 10px !important; width: auto !important; max-width: 90vw !important; }
        }

        /* 针对平板的特定断点 */
        @media (max-width: 1024px) and (min-width: 769px) {
            .lil-gui.root {
                right: 10px !important; max-width: 300px !important; max-height: 70vh !important; display: none;
            }
            .lil-gui.root.active { display: flex !important; }
            #advanced-panel-modal {
                right: 10px !important;
                width: min(300px, calc(100vw - 20px)) !important;
            }
            #dashboard { max-height: 320px; }
        }

        /* 针对横屏且高度有限时的UI调整 */
        @media (orientation: landscape) and (max-height: 600px) {
            .toolbar-container { bottom: 10px; max-width: 98vw; }
            .toolbar { padding: 4px; }
            .t-btn { padding: 8px 12px; font-size: 12px; }
            .panel-menu-trigger { padding-left: 8px; padding-right: 8px; }
            #ai-animation-modal .modal-box, #smart-export-modal .modal-box, #smart-export-preview-modal .modal-box { max-width: 90vw; max-height: 90vh; overflow-y: auto; }
            .advanced-panel-box { max-height: 90vh; }
        }

        /* 高分辨率平板适配 */
        @media (min-resolution: 2dppx) and (max-width: 1024px) {
            .lil-gui { font-size: 14px !important; }
        }
    
