/* 基础重置 */
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { 
            display: flex; 
            height: 100vh; 
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            overflow: hidden; 
        }

        /* ================= 统一弹窗样式 ================= */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; width: 100vw; height: 100vh;
            background: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }
        .modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }
        .modal-content {
            background: #ffffff;
            width: 90%;
            max-width: 440px;
            border-radius: 16px;
            padding: 32px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            position: relative;
            transform: translateY(20px) scale(0.95);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            color: #334155;
        }
        .modal-overlay.show .modal-content {
            transform: translateY(0) scale(1);
        }
        /* 分享 / 分享结果：无过渡，避免叠层切换时闪到上一层 */
        #shareModalOverlay.modal-overlay,
        #shareModalOverlay.modal-overlay .modal-content,
        #shareFeedbackModalOverlay.modal-overlay,
        #shareFeedbackModalOverlay.modal-overlay .modal-content {
            transition: none !important;
        }

        /* 分享结果弹窗按钮：成功态与「确认分享」弹窗同款横排（左灰确定、右蓝复制） */
        .share-feedback-btn-group:not(.share-feedback-btn-group--message-only) {
            flex-direction: row;
            align-items: stretch;
        }
        .share-feedback-btn-group:not(.share-feedback-btn-group--message-only) > .modal-btn {
            flex: 1;
            width: auto;
            min-width: 0;
        }
        #shareFeedbackCopyBtn.is-hidden {
            display: none !important;
        }
        /* 仅提示（失败/空/断网）：单列，主按钮铺满 */
        .share-feedback-btn-group--message-only {
            flex-direction: column;
            align-items: stretch;
        }
        .share-feedback-btn-group--message-only > .share-feedback-ok-btn {
            width: 100%;
        }
        .share-feedback-btn-group--message-only .share-feedback-ok-btn {
            background-color: #3b82f6 !important;
            color: #fff !important;
            border: none !important;
        }
        .share-feedback-btn-group--message-only .share-feedback-ok-btn:hover {
            background-color: #2563eb !important;
        }

        .modal-title {
            font-size: 22px;
            font-weight: 800;
            color: #0f172a;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .modal-body p {
            font-size: 15px;
            line-height: 1.7;
            margin-bottom: 12px;
            color: #475569;
        }
        /* 分享确认弹窗：合规提示，略小、略淡，介于主文案与脚注之间 */
        .share-modal-disclaimer {
            font-size: 10px;
            line-height: 1.5;
            color: #64748b;
            margin: 12px 0 0;
            padding: 9px 11px;
            background: #f1f5f9;
            border-radius: 8px;
            border: 1px solid #e8eef3;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
        }
        .modal-btn {
            width: 100%;
            padding: 12px;
            font-size: 16px;
            font-weight: 600;
            border-radius: 8px;
            background-color: #3b82f6;
            color: white;
            border: none;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s;
        }
        .modal-btn:hover { background-color: #2563eb; }
        .modal-btn:active { transform: scale(0.98); }
        .mt-24 { margin-top: 24px; } 

        .modal-btn-group {
            display: flex;
            gap: 12px;
            margin-top: 24px;
        }
        .modal-btn-secondary { background-color: #f1f5f9; color: #475569; }
        .modal-btn-secondary:hover { background-color: #e2e8f0; }
        .modal-btn-danger { background-color: #ef4444; }
        .modal-btn-danger:hover { background-color: #dc2626; }

        .modal-close {
            position: absolute; top: 16px; right: 16px;
            background: none; border: none; font-size: 24px;
            line-height: 1; color: #94a3b8; cursor: pointer; padding: 4px;
        }
        .modal-close:hover { color: #0f172a; }

        /* 赞赏按钮样式 */
        .donate-btn {
            background-color: #fef3c7;
            color: #d97706;
            border: 1px solid #fde047;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
        }
        .donate-btn:hover {
            background-color: #fde047;
            color: #b45309;
            transform: translateY(-1px);
        }
        .donate-btn:active {
            transform: translateY(1px);
        }

        /* 左侧编辑器面板 */
        .editor-panel {
            width: 50%; min-width: 10%; 
            display: flex; flex-direction: column; background-color: #1e1e1e;
        }

        /* 拖拽条样式 */
        .resizer {
            width: 6px; background-color: #2d2d2d; 
            cursor: col-resize; transition: background-color 0.2s ease; z-index: 10; 
        }
        .resizer:hover, .resizer.active { background-color: #3b82f6; }

        /* 右侧预览面板 */
        .preview-panel {
            flex: 1; display: flex; flex-direction: column;
            background-color: #ffffff; min-width: 10%; position: relative; 
        }

        /* 顶部标题栏 */
        .header {
            padding: 10px 20px; font-size: 14px; font-weight: bold;
            color: #d4d4d4; background-color: #252526; border-bottom: 1px solid #333;
            display: flex; justify-content: space-between; align-items: center;
            height: 50px; user-select: none; 
        }
        .preview-panel .header {
            background-color: #f8fafc; color: #374151; border-bottom: 1px solid #e5e7eb;
        }

        .header-actions, .controls-group {
            display: flex; align-items: center; gap: 10px; white-space: nowrap; 
        }

        .panel-title {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            margin: -6px -8px;
            padding: 6px 10px 6px 8px;
            border-radius: 8px;
            transition: background-color 0.2s ease;
        }
        .editor-panel .panel-header:hover .panel-title {
            background-color: rgba(255, 255, 255, 0.05);
        }
        .preview-panel .panel-header:hover .panel-title {
            background-color: rgba(59, 130, 246, 0.08);
        }
        .panel-icon {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            transition: color 0.2s ease, opacity 0.2s ease;
            opacity: 0.85;
        }
        .panel-header:hover .panel-icon {
            opacity: 1;
        }
        .editor-icon {
            color: #8b8b8b;
        }
        .editor-panel .panel-header:hover .editor-icon {
            color: #c5c5c5;
        }
        .preview-icon {
            color: #94a3b8;
        }
        .preview-panel .panel-header:hover .preview-icon {
            color: #3b82f6;
        }

        /* ================= 上方悬浮工具栏 ================= */
        #floatingToolbarWrapper {
            position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 100;
        }

        .dynamic-toolbar {
            background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 50px; padding: 8px 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0,0,0,0.05);
            display: flex; align-items: center; gap: 12px; white-space: nowrap; 
            transition: opacity 0.2s ease, background 0.3s, box-shadow 0.3s, border-radius 0.3s, padding 0.3s, border-color 0.3s;
            opacity: 1;
        }
        .dynamic-toolbar.docked {
            background: rgba(255, 255, 255, 0.65); backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(209, 213, 219, 0.6);
            border-radius: 8px; padding: 0 12px; height: 32px; box-shadow: none;
            cursor: pointer; gap: 5px; display: flex; align-items: center;
        }
        .dynamic-toolbar.docked:hover { background: rgba(243, 244, 246, 0.85); }
        .expand-content { display: flex; align-items: center; gap: 12px; }
        .dynamic-toolbar.docked .expand-content { display: none; }
        .dock-content { display: none; align-items: center; gap: 5px; color: #4b5563; font-size: 12px; font-weight: normal; height: 100%; }
        .dynamic-toolbar.docked .dock-content { display: flex; }

        .zoom-controls {
            display: flex; align-items: center; height: 32px; 
            background-color: rgba(229, 231, 235, 0.8); border-radius: 20px; 
            overflow: hidden; border: 1px solid rgba(209, 213, 219, 0.8);
        }
        .zoom-btn {
            background: none; border: none; padding: 0 12px; height: 100%; font-size: 16px;
            font-weight: bold; color: #4b5563; cursor: pointer; transition: background 0.2s; display: flex; align-items: center;
        }
        .zoom-btn:hover { background-color: rgba(209, 213, 219, 0.8); }
        .zoom-btn:active { background-color: #9ca3af; color: white; }
        
        .zoom-input-wrapper { display: flex; align-items: center; background: rgba(255, 255, 255, 0.7); padding: 0 5px; height: 100%; }
        .zoom-input { width: 40px; text-align: center; border: none; outline: none; background: transparent; font-size: 13px; color: #111827; font-family: inherit; }
        .zoom-input::-webkit-outer-spin-button, .zoom-input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

        /* 按钮通用 */
        .btn {
            background-color: #3b82f6; color: white; border: none; height: 32px; 
            padding: 0 14px; border-radius: 20px; font-size: 12px; cursor: pointer;
            transition: all 0.2s; font-weight: normal; white-space: nowrap; 
            display: inline-flex; align-items: center; justify-content: center;
        }
        .btn:hover { background-color: #2563eb; }
        .btn:active { transform: translateY(1px); }

        .btn-export { background-color: #10b981; border-radius: 6px; }
        .btn-export:hover { background-color: #059669; }
        .btn-clear { background-color: transparent; border: 1px solid #4b5563; color: #d4d4d4; border-radius: 6px; }
        .btn-clear:hover { background-color: #ef4444; border-color: #ef4444; color: white; }
        .btn-split { background-color: transparent; border: 1px solid #3b82f6; color: #60a5fa; border-radius: 6px; }
        .btn-split:hover { background-color: #3b82f6; color: white; }
        .btn-format { background-color: transparent; border: 1px solid #14b8a6; color: #2dd4bf; border-radius: 6px; }
        .btn-format:hover { background-color: #0d9488; color: white; border-color: #0d9488; }
        .btn-icon { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
        .btn-screenshot { background-color: #8b5cf6; }
        .btn-screenshot:hover { background-color: #7c3aed; }
        .btn-sketch {
            background-color: rgba(255, 255, 255, 0.8); color: #4b5563; border: 1px solid rgba(209, 213, 219, 0.8);
            border-radius: 6px; height: 32px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
        }
        .btn-sketch:hover { background-color: rgba(243, 244, 246, 0.9); }
        .btn-mode-toggle { background-color: #64748b; }
        .btn-mode-toggle:hover { background-color: #475569; }
        .btn-mode-toggle.active { background-color: #f59e0b; color: white; border-color: #f59e0b; }
        .btn-mode-toggle.active:hover { background-color: #d97706; }

        .btn-dock {
            background: transparent; color: #64748b; width: 28px; height: 28px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; transition: all 0.2s;
        }
        .btn-dock:hover { background-color: rgba(226, 232, 240, 0.8); color: #0f172a; }

        .lang-select {
            background-color: rgba(255, 255, 255, 0.8); border: 1px solid rgba(209, 213, 219, 0.8);
            color: #4b5563; height: 32px; padding: 0 26px 0 10px; border-radius: 6px; font-size: 13px;
            font-weight: 600; cursor: pointer; outline: none; transition: all 0.2s; appearance: none; 
            background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
        }
        .lang-select:hover { background-color: rgba(243, 244, 246, 0.9); }

        /* ================= 编辑器与分类侧边栏 ================= */
        .editor-body {
            position: relative; flex: 1; display: flex; flex-direction: row; overflow: hidden; background-color: #1e1e1e;
        }

        .category-sidebar {
            width: 72px; 
            background-color: #222224; 
            border-right: 1px solid #333;
            display: flex; flex-direction: column; align-items: center;
            padding: 16px 0; gap: 8px; overflow-y: auto; z-index: 30;
        }
        .category-sidebar::-webkit-scrollbar { width: 0px; } 
        
        .cat-btn {
            width: 56px;
            height: 56px;
            background: transparent;
            border: 1px solid transparent;
            color: #8b949e;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }
        .cat-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: all 0.2s; }
        .cat-btn:hover { background-color: #2d2d30; color: #d4d4d4; }
        .cat-btn.active {
            background-color: #3b82f6; color: white;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }

        .tag-tray {
            position: absolute;
            left: 72px; 
            top: 0;
            min-width: 160px;
            background: rgba(30, 30, 30, 0.85); 
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-left: none;
            border-radius: 0 16px 16px 0;
            padding: 16px 14px;
            display: flex; flex-direction: column; gap: 8px;
            z-index: 20; opacity: 0; visibility: hidden;
            transform: translateX(-15px);
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            max-height: calc(100% - 24px); overflow-y: auto;
            box-shadow: 12px 12px 40px rgba(0,0,0,0.4);
        }
        .tag-tray.show { opacity: 1; visibility: visible; transform: translateX(0); }
        .tag-tray::-webkit-scrollbar { width: 4px; }
        .tag-tray::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

        .tray-tag-wrapper { display: flex; flex-direction: column; gap: 6px; width: 100%; }
        
        .tray-tag-btn {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.05);
            color: #d1d5db;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 13px;
            font-family: 'Courier New', Courier, monospace;
            cursor: pointer;
            transition: all 0.2s;
            text-align: left;
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .tray-tag-btn:hover {
            background: #3b82f6; color: #fff; border-color: #3b82f6; transform: translateX(2px);
        }
        
        .tray-tag-btn.has-sub svg { width: 16px; height: 16px; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); opacity: 0.6; }
        .tray-tag-btn.has-sub.expanded { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.2); transform: none; }
        .tray-tag-btn.has-sub.expanded svg { transform: rotate(180deg); }

        .sub-tags-grid {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
            max-height: 0; overflow: hidden; opacity: 0;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            padding: 0 4px; margin-top: -2px;
        }
        .sub-tags-grid.show {
            max-height: 100px; 
            opacity: 1; padding-top: 4px; padding-bottom: 4px;
        }
        .sub-tag-btn {
            background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
            color: #a1a1aa; padding: 6px 0; border-radius: 6px;
            font-size: 12px; font-family: 'Courier New', Courier, monospace;
            cursor: pointer; transition: all 0.2s; text-align: center;
        }
        .sub-tag-btn:hover { background: #3b82f6; color: #fff; border-color: #3b82f6; }

        .tag-tooltip {
            position: fixed;
            background: rgba(32, 33, 36, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            color: #e5e7eb;
            padding: 10px 14px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 400;
            pointer-events: none; 
            z-index: 99999;
            opacity: 0;
            visibility: hidden;
            transform: translateX(10px) translateY(0);
            transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.08);
            border-left: 3px solid #3b82f6;
            max-width: 220px;
            line-height: 1.5;
            letter-spacing: 0.5px;
        }
        .tag-tooltip.show {
            opacity: 1;
            visibility: visible;
            transform: translateX(0) translateY(0);
        }

        .editor-main { flex: 1; position: relative; display: flex; flex-direction: column; overflow: hidden; width: calc(100% - 72px); }

        .CodeMirror { flex: 1; width: 100%; height: 100%; font-family: 'Courier New', Courier, monospace; font-size: 15px; line-height: 1.6; }
        .cm-s-monokai.CodeMirror { background: #1e1e1e; color: #d4d4d4; }
        .cm-s-monokai .CodeMirror-gutters { background: #1e1e1e; border-right: 1px solid #333; }
        .CodeMirror-placeholder { color: #6b7280 !important; }

        /* ================= 代码搜索框 UI ================= */
        #editorSearchBar {
            position: absolute; top: 20px; left: 50%; z-index: 60;
            background: rgba(40, 40, 40, 0.65); backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 50px; padding: 8px 16px; display: flex; align-items: center; gap: 8px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
            opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(-10px);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        #editorSearchBar.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
        .editor-search-input {
            background: transparent; border: none; color: #d4d4d4; font-size: 13px;
            outline: none; width: 160px; font-family: inherit;
        }
        .editor-search-input::placeholder { color: #6b7280; }
        .editor-search-count { color: #9ca3af; font-size: 12px; min-width: 45px; text-align: center; font-variant-numeric: tabular-nums; }
        .editor-search-divider { width: 1px; height: 14px; background: rgba(255,255,255,0.1); }
        .editor-search-btn {
            background: transparent; border: none; color: #9ca3af; cursor: pointer;
            display: flex; align-items: center; justify-content: center; padding: 4px; border-radius: 4px; transition: all 0.2s;
        }
        .editor-search-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
        
        /* 搜索高亮样式 */
        .cm-search-match { background: rgba(250, 204, 21, 0.3); border-radius: 2px; }
        .cm-search-match-active { background: rgba(245, 158, 11, 0.7); border-radius: 2px; color: white !important; }

        #splitFloatingBar {
            position: absolute; top: 20px; left: 50%; transform: translateX(-50%) translateY(-10px); 
            background: rgba(40, 40, 40, 0.65); backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 50px; padding: 8px 16px; gap: 8px; z-index: 50;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4); display: flex; align-items: center;
            opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        #splitFloatingBar.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
        #splitFloatingBar.show.idle-fade { opacity: 0.3; }
        #splitFloatingBar.show:hover { opacity: 1; }
        
        .split-tab-btn { background: transparent; border: none; color: #9ca3af; padding: 6px 14px; font-size: 13px; font-weight: 600; border-radius: 20px; cursor: pointer; transition: all 0.2s; }
        .split-tab-btn:hover { background: rgba(55, 65, 81, 0.8); color: #f3f4f6; }
        .split-tab-btn.active { background: #3b82f6; color: white; }
        
        .split-tab-exit { display: flex; align-items: center; justify-content: center; padding: 6px 8px; margin-left: 4px; color: #ef4444; background: transparent; border: none; cursor: pointer; transition: all 0.2s; }
        .split-tab-exit:hover { color: #f87171; transform: scale(1.1); }

        iframe { flex: 1; width: 100%; border: none; background-color: #ffffff; }
        .preview-panel:fullscreen { width: 100vw; height: 100vh; }

        #toast {
            position: fixed; bottom: 40px; top: auto; left: 50%; transform: translateX(-50%);
            background: rgba(16, 185, 129, 0.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            color: white; padding: 10px 24px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            font-size: 14px; font-weight: bold; opacity: 0; visibility: hidden;
            transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; pointer-events: none;
            /* 高于画中画悬浮窗(9999)与恢复按钮，且挂在 body 上避免被父级 transform 劫持 fixed */
            z-index: 100020;
            display: flex; align-items: center; justify-content: center;
        }
        #toast.show { opacity: 1; visibility: visible; }
        #toast.error { background: rgba(239, 68, 68, 0.75); }  
        #toast.warning { background: rgba(245, 158, 11, 0.75); } 

        #dragHint {
            position: fixed; bottom: 90px; top: auto; left: 50%; transform: translateX(-50%); 
            background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
            color: #334155; border: 1px solid rgba(203, 213, 225, 0.8); padding: 8px 24px; border-radius: 30px;
            font-size: 13px; letter-spacing: 0.5px; font-weight: 500; pointer-events: none; opacity: 0; visibility: hidden; 
            transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; z-index: 10000; box-shadow: 0 4px 15px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 6px;
        }
        #dragHint.show { opacity: 1; visibility: visible; }

        /* 更加精致的拖拽条标志 */
        #resizer {
            position: relative;
            /* 确保 resizer 本身有足够的层级 */
            z-index: 10;
        }

        #resizer::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            width: 2px;
            height: 2px;
            background-color: transparent;
            border-radius: 50%;
            /* 深色条上需浅色点；每项加 spread，否则中间 0 0 0 无厚度看不见 */
            box-shadow:
                0 -6px 0 1px rgba(255, 255, 255, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.5),
                0 6px 0 1px rgba(255, 255, 255, 0.5);
            transition: all 0.3s ease;
        }

        /* 条身为蓝时，用白点保持对比（原先用同色蓝点会“消失”） */
        #resizer:hover::after,
        #resizer.active::after {
            box-shadow:
                0 -6px 0 1px rgba(255, 255, 255, 0.95),
                0 0 0 1px rgba(255, 255, 255, 0.95),
                0 6px 0 1px rgba(255, 255, 255, 0.95);
            transform: translate(-50%, -50%) scale(1.2);
        }

/* ================= 画中画 (PiP) 模式 ================= */
/* 预览区 fixed 后若仍保留 flex:1，会在横向 flex 里占一列，左侧出现大块留白 */
body.pip-mode #editorPanel {
    width: 100% !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
}

body.pip-mode #resizer {
    display: none;
}

/* 横屏悬浮窗 480×320；overflow 防止 scale 后内容溢出圆角 */
body.pip-mode #previewPanel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 480px;
    height: 320px;
    flex: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 9999;
    background: #fff;
    transition: width 0.3s, height 0.3s, box-shadow 0.3s, border-radius 0.3s;
    /* 仅顶栏可发起拖拽；预览区由 iframe 接管事件，整块 grab 会造成「看起来能拖却拖不动」 */
    cursor: default;
    overflow: hidden;
}

body.pip-mode #previewPanel .panel-header {
    position: relative;
    z-index: 2;
    cursor: grab;
}

body.pip-mode #previewPanel.is-dragging {
    cursor: default;
    will-change: transform;
}

body.pip-mode #previewPanel.is-dragging .panel-header {
    cursor: grabbing;
}

body.pip-mode #previewPanel.is-dragging iframe {
    pointer-events: none;
}

/* 微缩景观：1920×1280 桌面画布 → scale(0.25) 贴合 480×320；解除 Flex 挤压 */
body.pip-mode #previewPanel iframe {
    flex: none !important;
    max-width: none !important;
    min-width: 1920px !important;
    width: 1920px !important;
    min-height: 1280px !important;
    height: 1280px !important;
    transform: scale(0.25) !important;
    transform-origin: top left !important;
}

body.pip-mode #iframeContainer {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

body.pip-mode #previewPanel #langSelect,
body.pip-mode #previewPanel #aboutBtn,
body.pip-mode #previewPanel #sketchBtn,
body.pip-mode #previewPanel #screenshotBtn,
body.pip-mode #previewPanel #fullscreenBtn,
body.pip-mode #previewPanel #toggleDockBtn,
body.pip-mode #previewPanel .zoom-controls,
body.pip-mode #previewPanel #dynamicToolbar,
body.pip-mode #previewPanel #floatingToolbarWrapper {
    display: none !important;
}

body.pip-mode #previewPanel:fullscreen,
body.pip-mode #previewPanel:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    left: 0 !important;
    top: 0 !important;
    bottom: auto !important;
    right: auto !important;
    border-radius: 0 !important;
}

body.pip-mode #previewPanel:fullscreen iframe,
body.pip-mode #previewPanel:-webkit-full-screen iframe {
    min-width: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
}

.restore-pip-btn {
    display: none;
    position: absolute;
    top: 25px;
    right: 12px;
    bottom: auto;
    left: auto;
    /* 顶栏高 50px：以顶栏垂直中线对齐，不改变按钮自身高度 */
    transform: translateY(-50%);
    z-index: 3;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.8) !important;
    color: white !important;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 6px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.restore-pip-btn:hover {
    background: #0f172a !important;
}

.restore-pip-btn:active {
    transform: translateY(-50%);
}

body.pip-mode .restore-pip-btn {
    display: flex;
    align-items: center;
}

body.pip-mode #previewPanel:fullscreen .restore-pip-btn,
body.pip-mode #previewPanel:-webkit-full-screen .restore-pip-btn {
    display: none !important;
}

/* 右下角「分享」悬浮按钮 */
.float-share-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #4cd9e8;
    color: #1e1e1e;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(76, 217, 232, 0.35);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10050;
}

.float-share-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 217, 232, 0.45);
}

.float-share-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

