/* 斑斓研习社页面母版框架样式 v10.8：
 * 右侧工具栏、浮动菜单、收藏夹、颜色吸管与操作反馈修复版。
 * 上传到火山引擎 TOS 后，通过缝合器的“框架资源”地址外链引用。
 */
:root {
            --aurora-1: #38bdf8; --aurora-2: #818cf8; --aurora-3: #c084fc; --aurora-4: #fbbf24; 
            --bs-bg-body: #000000; 
            --bs-bg-glass: #0c0c0e; 
            --bs-glass-tint: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
            --bs-font: "SF Pro SC", "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
            --bs-ease: cubic-bezier(0.23, 1, 0.32, 1);
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
            --header-height: calc(58px + var(--safe-top));
            --footer-height: calc(32px + var(--safe-bottom));
        }

        * { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }
        html { background-color: #000; color-scheme: dark; }
        body { font-family: var(--bs-font); background-color: var(--bs-bg-body); color: #e5e5e5; overflow: hidden; width: 100vw; height: 100vh; display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; overscroll-behavior-y: none; }
        iframe { background-color: #000; color-scheme: dark; border: none; }

        #bs-global-header { 
            height: var(--header-height); padding-top: var(--safe-top); flex-shrink: 0; width: 100%; z-index: 1000; 
            display: flex; align-items: center; justify-content: space-between; padding-left: 24px; padding-right: 24px; 
            position: relative; transition: transform 0.3s var(--bs-ease), opacity 0.3s var(--bs-ease); 
            background-color: var(--bs-bg-glass); background-image: var(--bs-glass-tint);
            border-bottom: 1px solid rgba(255,255,255,0.05); 
        }
        
        #bs-progress { position: absolute; bottom: 0; left: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--aurora-1), var(--aurora-2), var(--aurora-4), transparent); width: 0%; opacity: 0.8; pointer-events: none; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); z-index: 1001; }

        .bs-logo-wrapper { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex-shrink: 0; cursor: pointer; }
        .bs-cube-icon { width: 18px; height: 18px; border: 1.5px solid rgba(255,255,255,0.9); transform: rotate(45deg); transition: transform 0.6s var(--bs-ease), border-color 0.3s; flex-shrink: 0; }
        .bs-logo-text { font-weight: 700; font-size: 16px; letter-spacing: 0.05em; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }

        #bs-main-container { 
            flex: 1; position: relative; width: 100%; height: 100%; 
            background: transparent; 
            overflow: hidden; display: flex; z-index: 10; 
        }
        
        .bs-tab-wrapper { 
            position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; pointer-events: none; 
            background: transparent; 
            z-index: 1; transition: opacity 0.3s var(--bs-ease), visibility 0.3s var(--bs-ease); 
            overflow: hidden !important; 
        }

        /* 【核心优化】修复滚动，使用垂直 Flex 流，不再强制 100% 裁切 */
        .bs-tab-wrapper > .bs-subpage-wrapper {
            width: 100% !important;
            height: 100% !important;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow-y: auto !important; /* 开启原生滚动条 */
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
        }
        
        /* 定制工具滚动条 */
        .bs-tab-wrapper::-webkit-scrollbar { width: 6px !important; display: block !important; }
        .bs-tab-wrapper::-webkit-scrollbar-track { background: transparent; }
        .bs-tab-wrapper::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

        .bs-tab-wrapper.active { opacity: 1; visibility: visible; pointer-events: auto; z-index: 3; }
        .bs-tab-wrapper.leaving { opacity: 0; visibility: visible; pointer-events: none; z-index: 2; }

        /* 【核心优化】首屏沉浸式工作区，高度固定，保持纯净全屏 */
        .immersive-tool-area {
            position: relative;
            width: 100%;
            height: 100%; /* 占满当前视口内容区 */
            min-height: 600px;
            flex-shrink: 0;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        /* iframe 沙盒容器样式 */
        .tactical-sandbox-frame {
            position: absolute; top: 0; left: 0;
            width: 100%; height: 100%; border: none; display: block;
            background: #000; margin: 0; padding: 0; overflow: hidden; 
            z-index: 10;
        }

        /* 【核心优化】原生 SEO 文章模块：与上方 iframe 工具区等高，内部滚动，减少外层重排闪烁 */
        .native-seo-article {
            width: 100%;
            height: 100%;
            min-height: 600px;
            background: var(--bs-bg-body);
            padding: clamp(18px, 2.2vw, 34px) clamp(14px, 2vw, 36px);
            display: flex;
            justify-content: center;
            flex-shrink: 0;
            position: relative;
            overflow: hidden;
            contain: layout paint style;
            transform: translateZ(0);
            backface-visibility: hidden;
            isolation: isolate;
        }

        .native-seo-article::before {
            content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
            pointer-events: none;
        }

        .article-content-wrapper {
            width: min(1920px, calc(100vw - clamp(24px, 3.2vw, 64px)));
            max-width: none;
            height: 100%;
            min-height: 0;
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(520px, 720px);
            gap: clamp(18px, 2.4vw, 42px);
            align-items: stretch;
            overflow: hidden;
            transform: translateZ(0);
        }
        .bs-seo-main {
            min-width: 0;
            height: 100%;
            min-height: 0;
            padding: clamp(18px, 2.2vw, 34px);
            border-radius: 22px;
            background: linear-gradient(180deg, rgba(255,255,255,0.032), rgba(255,255,255,0.014));
            border: 1px solid rgba(255,255,255,0.065);
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-gutter: stable;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            contain: layout paint;
        }
        .bs-seo-main::-webkit-scrollbar,
        .bs-profile-link-list::-webkit-scrollbar,
        .bs-profile-preview::-webkit-scrollbar { width: 6px; }
        .bs-seo-main::-webkit-scrollbar-track,
        .bs-profile-link-list::-webkit-scrollbar-track,
        .bs-profile-preview::-webkit-scrollbar-track { background: transparent; }
        .bs-seo-main::-webkit-scrollbar-thumb,
        .bs-profile-link-list::-webkit-scrollbar-thumb,
        .bs-profile-preview::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }
        .bs-seo-side {
            position: relative;
            top: auto;
            align-self: stretch;
            min-width: 0;
            height: 100%;
            min-height: 0;
            overflow: hidden;
            contain: layout paint;
            transform: translateZ(0);
        }

        @media (min-width: 1680px) {
            .article-content-wrapper {
                grid-template-columns: minmax(0, 1fr) minmax(620px, 760px);
                gap: clamp(24px, 2.6vw, 48px);
            }
        }

        @media (max-width: 1280px) {
            .article-content-wrapper {
                grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
            }
        }

        .article-h1-title {
            color: var(--aurora-1);
            font-size: clamp(23px, 1.9vw, 31px);
            font-weight: 750;
            margin-bottom: 22px;
            line-height: 1.32;
            text-align: left;
            letter-spacing: -0.02em;
        }

        /* 专业的文本排版系统 */
        .bs-seo-text-container {
            color: rgba(255, 255, 255, 0.76);
            font-size: clamp(15px, 0.9vw, 16px);
            line-height: 1.86;
            text-align: justify;
            user-select: text;
        }
        .bs-seo-text-container p { margin-bottom: 16px; }
        .bs-seo-text-container h1, .bs-seo-text-container h2, .bs-seo-text-container h3 {
            color: #fff; font-size: 18px; margin-top: 32px; margin-bottom: 16px; font-weight: 600;
        }
        .bs-seo-text-container strong, .bs-seo-text-container b { color: var(--aurora-1); font-weight: 600; }
        .bs-seo-text-container ul, .bs-seo-text-container ol { margin-left: 20px; margin-bottom: 16px; }
        .bs-seo-text-container li { margin-bottom: 8px; }
        .bs-seo-text-container a, .bs-site-trust-box a { color: var(--aurora-1); text-decoration: none; border-bottom: 1px solid rgba(56,189,248,0.35); }
        .bs-seo-text-container a:hover, .bs-site-trust-box a:hover { color: #fff; border-bottom-color: #fff; }
        .bs-site-trust-box {
            margin-top: 30px; padding: clamp(18px, 1.8vw, 24px); border-radius: 18px;
            background: rgba(255,255,255,0.032); border: 1px solid rgba(255,255,255,0.075);
            color: rgba(255,255,255,0.72); line-height: 1.78; font-size: 14px;
        }
        .bs-site-trust-box h2 { color: #fff; font-size: 18px; margin: 0 0 12px; }
        .bs-site-trust-box p { margin-bottom: 12px; }
        .bs-site-trust-links { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 8px; }
        .bs-site-trust-meta { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); font-size: 12px; }
        .bs-profile-links-box {
            height: 100%;
            min-height: 0;
            padding: clamp(16px, 1.35vw, 22px); border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.022));
            border: 1px solid rgba(255,255,255,0.085); box-shadow: 0 18px 48px rgba(0,0,0,0.22);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            contain: layout paint;
            transform: translateZ(0);
        }
        .bs-profile-links-title { color: #fff; font-size: 17px; font-weight: 750; margin-bottom: 8px; letter-spacing: -0.01em; flex-shrink: 0; }
        .bs-profile-links-desc { color: rgba(255,255,255,0.48); font-size: 12px; line-height: 1.7; margin-bottom: 14px; flex-shrink: 0; }
        .bs-profile-links-layout {
            flex: 1;
            min-height: 0;
            display: grid;
            grid-template-columns: minmax(210px, 0.9fr) minmax(220px, 1fr);
            gap: 14px;
            align-items: stretch;
            overflow: hidden;
        }
        .bs-profile-link-list {
            display: grid;
            grid-template-columns: 1fr;
            gap: 9px;
            align-content: start;
            min-width: 0;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 2px;
            scrollbar-gutter: stable;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
        }
        .bs-profile-link-tag {
            display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 12px;
            border-radius: 14px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.07);
            color: rgba(255,255,255,0.84); text-decoration: none; transition: background 0.2s var(--bs-ease), border-color 0.2s var(--bs-ease), color 0.2s var(--bs-ease); text-align: left; font-family: inherit;
            flex-shrink: 0;
        }
        button.bs-profile-link-tag { cursor: pointer; appearance: none; -webkit-appearance: none; }
        .bs-profile-link-tag:hover, .bs-profile-link-tag.active { background: rgba(56,189,248,0.10); border-color: rgba(56,189,248,0.28); color: #fff; }
        .bs-profile-link-tag.active { box-shadow: inset 0 0 0 1px rgba(56,189,248,0.15); }
        .bs-profile-link-static { cursor: default; }
        .bs-profile-link-static:hover { background: rgba(255,255,255,0.045); border-color: rgba(255,255,255,0.07); }
        .bs-profile-icon { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: rgba(255,255,255,0.06); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--aurora-1); font-weight: 700; }
        .bs-profile-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 650; }
        .bs-profile-arrow { color: rgba(255,255,255,0.32); font-size: 13px; flex-shrink: 0; }
        .bs-profile-divider { height: 1px; margin: 4px 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); }
        .bs-profile-preview {
            min-height: 0;
            height: 100%;
            border-radius: 18px; border: 1px solid rgba(255,255,255,0.07);
            background: radial-gradient(circle at 50% 0%, rgba(56,189,248,0.08), transparent 42%), rgba(0,0,0,0.22);
            display: flex; align-items: center; justify-content: center; padding: 12px;
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-gutter: stable;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            transform: translateZ(0);
            backface-visibility: hidden;
        }
        .bs-profile-preview-empty { color: rgba(255,255,255,0.38); font-size: 12px; line-height: 1.7; text-align: center; padding: 20px; }
        .bs-profile-preview-card { display: none; width: 100%; height: 100%; min-height: 0; }
        .bs-profile-preview-card.active { display: flex; flex-direction: column; }
        .bs-profile-preview-title { color: rgba(255,255,255,0.82); font-size: 13px; font-weight: 700; margin-bottom: 10px; text-align: center; flex-shrink: 0; }
        .bs-profile-image { width: 100%; flex: 1; min-height: 0; max-height: 100%; object-fit: contain; padding: 10px; border-radius: 14px; background: rgba(0,0,0,0.26); border: 1px solid rgba(255,255,255,0.06); }
        .bs-profile-preview-link { display: flex; align-items: center; justify-content: center; margin-top: 10px; min-height: 36px; border-radius: 12px; color: var(--aurora-1); background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.18); text-decoration: none; font-size: 12px; font-weight: 700; flex-shrink: 0; }
        .bs-profile-preview-link:hover { color: #fff; border-color: rgba(56,189,248,0.38); background: rgba(56,189,248,0.13); }

        @media (max-width: 1120px) {
            .bs-profile-links-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(150px, 0.72fr); }
            .bs-profile-preview { min-height: 0; }
        }
        @media (max-width: 980px) {
            .native-seo-article { padding: 18px 16px; }
            .article-content-wrapper { display: flex; flex-direction: column; width: 100%; max-width: none; height: 100%; gap: 14px; }
            .bs-seo-main { flex: 1 1 56%; height: auto; padding: 18px; border-radius: 18px; }
            .bs-seo-side { flex: 1 1 44%; height: auto; position: relative; top: auto; margin-top: 0; }
            .bs-profile-links-layout { grid-template-columns: minmax(0, 0.95fr) minmax(160px, 1fr); grid-template-rows: none; }
        }
        @media (max-width: 560px) {
            .native-seo-article { padding: 14px 12px; }
            .bs-seo-main { padding: 16px; }
            .bs-profile-links-box { padding: 14px; border-radius: 18px; }
            .bs-profile-links-desc { display: none; }
            .bs-profile-links-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(120px, 0.65fr); gap: 10px; }
            .bs-profile-link-tag { padding: 10px 11px; min-height: 42px; }
            .bs-profile-preview-title { font-size: 12px; }
        }

        .bs-iframe-fallback { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; text-align:center; color:rgba(255,255,255,0.62); background:#000; z-index:1; }

        @media (max-width: 980px) {
            .native-seo-article { padding-left: 16px; padding-right: 16px; }
            .article-content-wrapper { display: block; width: 100%; max-width: none; }
            .bs-seo-main { padding: 18px; border-radius: 18px; }
            .bs-seo-side { position: relative; top: auto; margin-top: 22px; }
        }
        @media (max-width: 560px) {
            .native-seo-article { padding: 34px 12px 82px; }
            .bs-seo-main { padding: 16px; }
            .bs-profile-link-tag { padding: 11px 12px; }
        }

        #bs-status-bar { 
            height: var(--footer-height); padding-bottom: var(--safe-bottom); flex-shrink: 0; width: 100%; 
            display: flex; align-items: center; justify-content: space-between; padding-left: 16px; padding-right: 16px; 
            border-top: 1px solid rgba(255,255,255,0.05); font-family: "JetBrains Mono", monospace; font-size: 10px; color: rgba(255,255,255,0.4); z-index: 9998; 
            transition: transform 0.3s var(--bs-ease); position: relative;
            background-color: var(--bs-bg-glass); background-image: var(--bs-glass-tint);
        }
        .sb-divider { width: 1px; height: 10px; background: rgba(255,255,255,0.1); margin: 0 10px; }

        #bs-grayscale-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 2147483647; pointer-events: none; backdrop-filter: grayscale(100%); -webkit-backdrop-filter: grayscale(100%); opacity: 0; transition: opacity 0.5s var(--bs-ease); display: none; }
        body.bs-grayscale-active #bs-grayscale-overlay { display: block; opacity: 1; }
        
        body.bs-focus-mode #bs-global-header { transform: translateY(-100%); opacity: 0; pointer-events: none; }
        body.bs-focus-mode #bs-status-bar { transform: translateY(100%); opacity: 0; pointer-events: none; }
        body.bs-focus-mode #bs-main-container { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 100; margin: 0; }
        #bs-top-sensor { position: fixed; top: 0; left: 0; width: 100%; height: 10px; z-index: 2000; display: none; }
        body.bs-focus-mode #bs-top-sensor { display: block; pointer-events: auto; }
        body.bs-focus-mode #bs-global-header.visible-by-hover { transform: translateY(0); opacity: 1; pointer-events: auto; }

        .bs-nav-trigger { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); padding: 6px 12px; border-radius: 100px; max-width: 55%; cursor: pointer; transition: background 0.2s; }
        .bs-nav-trigger:active { background: rgba(255,255,255,0.1); }
        .bs-current-title { font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .bs-nav-item:active, .bs-sheet-close:active, .bs-logo-wrapper:active { opacity: 0.6; transform: scale(0.96); transition: transform 0.1s, opacity 0.1s; }

        #bs-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 9998; }
        #bs-sheet-overlay.visible { opacity: 1; visibility: visible; }
        
        .bs-sheet { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(18, 18, 20, 0.95); backdrop-filter: blur(24px); border-radius: 24px 24px 0 0; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1); z-index: 9999; padding-bottom: var(--safe-bottom); display: flex; flex-direction: column; max-height: 88vh; border-top: 1px solid rgba(255,255,255,0.1); box-shadow: 0 -10px 40px rgba(0,0,0,0.5); }
        .bs-sheet.visible { transform: translateY(0); }
        .bs-sheet-handle-wrap { width: 100%; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: grab; }
        .bs-sheet-handle { width: 40px; height: 5px; background: rgba(255,255,255,0.2); border-radius: 4px; }
        .bs-sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 0 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
        .bs-sheet-title { font-size: 16px; font-weight: 600; color: #fff; }
        .bs-sheet-close { width: 30px; height: 30px; background: rgba(255,255,255,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: rgba(255,255,255,0.7); cursor: pointer; }
        .bs-sheet-content { overflow-y: auto; padding: 0; flex: 1; }
        .bs-sheet-content::-webkit-scrollbar { display: none; }
        .bs-nav-list { display: flex; flex-direction: column; padding: 12px 16px; }
        .bs-nav-item { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 12px; background: rgba(255,255,255,0.03); margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.04); transition: all 0.2s; cursor: pointer; }
        .bs-nav-item-title { font-size: 14px; color: rgba(255,255,255,0.85); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
        .bs-nav-item.active { background: rgba(255, 255, 255, 0.08); border-color: transparent; }
        .bs-nav-item.active .bs-nav-item-title { color: #fff; font-weight: 700; }
        .bs-nav-item-icon { color: rgba(255,255,255,0.2); font-size: 14px; margin-left: 10px; }
        .bs-nav-item.active .bs-nav-item-icon { color: var(--aurora-1); }

        @media (max-width: 768px) {
            :root { --header-height: calc(46px + var(--safe-top)); }
            .bs-logo-text { font-size: 14px; }
            .bs-cube-icon { width: 16px; height: 16px; }
            #bs-global-header { padding-left: 16px; padding-right: 16px; }
            #bs-progress, #bs-dynamic-nav, .bs-status, .sb-status-indicator, #sb-battery, #sb-uptime, #bs-fab-cluster, #bs-fab-feedback, #bs-fab-download, #bs-fab-scroll-hint, .bs-float-panel, #bs-menu-overlay, .sb-right-panel .sb-divider { display: none !important; }
            .sb-right-panel { width: 100%; display: flex; justify-content: space-between; align-items: center; }
        }

        @media (min-width: 769px) {
            .bs-nav-trigger, #bs-sheet-overlay, .bs-sheet { display: none !important; }
            .bs-logo-wrapper:hover .bs-cube-icon { transform: rotate(225deg); border-color: var(--aurora-1); }
            .bs-nav { display: flex; gap: 6px; height: 32px; align-items: center; background: rgba(255,255,255,0.02); border-radius: 99px; padding: 0 4px; border: 1px solid rgba(255,255,255,0.04); }
            .bs-link { position: relative; display: flex; align-items: center; justify-content: center; height: 24px; padding: 0 14px; min-width: 40px; color: rgba(255,255,255,0.5); text-decoration: none; font-size: 12px; font-weight: 500; border-radius: 100px; transition: all 0.3s var(--bs-ease); cursor: pointer; white-space: nowrap; }
            .bs-link.active { color: #fff; background: rgba(255,255,255,0.12); border: 1px solid transparent; font-weight: 600; box-shadow: none; outline: none; }
            .bs-link:hover { color: #fff; background: rgba(255,255,255,0.04); }
            .bs-text-layer { position: relative; display: inline-block; }
            .bs-text-layer::after { content: attr(data-value); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(120deg, transparent 20%, var(--aurora-1) 40%, var(--aurora-2) 60%, transparent 80%); background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--bs-ease); }
            .bs-link:hover .bs-text-layer::after { opacity: 1; animation: bs-aurora-sweep 1.2s linear infinite; }
            @keyframes bs-aurora-sweep { 0% { background-position: -50% center; } 100% { background-position: 150% center; } }
            .bs-nav-separator { font-family: "SF Mono", monospace; font-size: 14px; color: rgba(255, 255, 255, 0.15); margin: 0 2px; display: flex; align-items: center; pointer-events: none;}

            .bs-status { display: flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(255,255,255,0.35); font-feature-settings: "tnum"; font-family: "SF Mono", monospace; }
            .bs-dot { width: 5px; height: 5px; background: var(--aurora-2); border-radius: 50%; opacity: 0.8; }
            .bs-status-divider { width: 1px; height: 10px; background: rgba(255,255,255,0.08); margin: 0 2px; }

            .sb-status-indicator { display: flex; align-items: center; gap: 8px; }
            .sb-dot { width: 6px; height: 6px; background: #444; border-radius: 50%; transition: background 0.3s; }
            .sb-dot.fast { background: #10b981; } .sb-dot.medium { background: var(--aurora-4); } .sb-dot.slow { background: #ef4444; }
            .sb-right-panel { display: flex; gap: 16px; align-items: center; }

            #bs-fab-cluster { position: fixed; top: 50%; right: 24px; display: flex; flex-direction: column; gap: 16px; z-index: 9997; align-items: center; transition: opacity 0.3s var(--bs-ease), transform 0.3s var(--bs-ease); transform: translateY(-50%) translateZ(0); isolation: isolate; pointer-events: auto; }
            
            .bs-fab, #bs-fab-feedback, #bs-fab-download, #bs-fab-scroll-hint { 
                width: 40px; height: 40px; background: rgba(18, 18, 20, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.3; transition: opacity 0.3s, transform 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s; color: #fff; font-size: 16px; position: relative; pointer-events: auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; 
            }
            #bs-fab-feedback, #bs-fab-download, #bs-fab-scroll-hint { position: fixed; bottom: calc(var(--footer-height) + 24px); opacity: 0.4; z-index: 9997; transform: translateZ(0); }
            
            #bs-fab-feedback { right: 24px; }
            #bs-fab-download { right: 80px; }
            #bs-fab-scroll-hint { right: 136px; animation: bs-float-pulse 2s infinite; }
            @keyframes bs-float-pulse { 0% { transform: translateY(0); opacity: 0.4;} 50% { transform: translateY(4px); opacity: 0.8;} 100% { transform: translateY(0); opacity: 0.4;} }

            .bs-fab:focus-visible { outline: 2px solid var(--aurora-1); outline-offset: 2px; opacity: 1; }
            .bs-fab.disabled, .bs-control-btn.disabled { opacity: 0.12 !important; pointer-events: none !important; cursor: default !important; }
            .bs-fab.is-busy { opacity: 1 !important; animation: bs-tool-busy 0.9s linear infinite; }
            @keyframes bs-tool-busy { to { transform: rotate(360deg); } }
            .bs-fab:hover, #bs-fab-feedback:hover, #bs-fab-download:hover, #bs-fab-scroll-hint:hover { opacity: 1 !important; transform: scale(1.1); background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 0 15px rgba(56, 189, 248, 0.2); }
            #bs-fab-cluster:hover .bs-fab { opacity: 0.8; }
            
            #bs-fab-trigger .bs-dots-icon { display: flex; gap: 3px; }
            #bs-fab-trigger .bs-dots-icon span { width: 3px; height: 3px; background: #fff; border-radius: 50%; }
            .bs-fab-separator { width: 24px; height: 1px; background: rgba(255,255,255,0.15); margin: 4px auto; }
            
            #bs-tools-group { display: flex; flex-direction: column; gap: 16px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s var(--bs-ease), opacity 0.3s var(--bs-ease), margin-top 0.3s var(--bs-ease); align-items: center; pointer-events: none; }
            #bs-tools-group.visible { max-height: 400px; opacity: 1; margin-top: 16px; overflow: visible; pointer-events: auto; }
            .bs-toggle-icon { font-size: 18px; transition: transform 0.3s var(--bs-ease); }
            #bs-tools-toggle.active .bs-toggle-icon { transform: rotate(45deg); }
            .bs-sub-fab { opacity: 0; transform: scale(0.8); transition: all 0.3s ease; }
            #bs-tools-group.visible .bs-sub-fab { opacity: 0.8; transform: scale(1); }
            #bs-tools-group.visible .bs-sub-fab:hover { opacity: 1; transform: scale(1.1); }
            
            body.bs-hide-toolbar #bs-fab-cluster { opacity: 0; pointer-events: none; transform: translateY(-50%) translateX(100px) translateZ(0); }
            body.bs-hide-toolbar #bs-fab-feedback, body.bs-hide-toolbar #bs-fab-download, body.bs-hide-toolbar #bs-fab-scroll-hint { opacity: 0; pointer-events: none; transform: translateX(100px) translateZ(0); }

            .bs-float-panel { position: fixed; z-index: 9999; background: rgba(10, 10, 12, 0.95); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.2); display: none; opacity: 0; transition: opacity 0.2s var(--bs-ease), transform 0.2s var(--bs-ease); overflow: hidden; transform: scale(0.98) translateZ(0); }
            .bs-float-panel.visible { display: block; opacity: 1; transform: scale(1) translateZ(0); }
            .bs-float-panel.pinned { border-color: rgba(56, 189, 248, 0.3); }
            #bs-context-menu { min-width: 160px; padding: 4px; }
            .bs-menu-controls { display: flex; gap: 4px; padding: 4px; margin-bottom: 4px; }
            .bs-control-btn { flex: 1; height: 28px; background: rgba(255,255,255,0.05); border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 14px; color: rgba(255,255,255,0.6); }
            .bs-control-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
            .bs-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 12px; color: rgba(255,255,255,0.7); border-radius: 6px; cursor: pointer; transition: all 0.2s; }
            .bs-menu-item:hover { background: rgba(255,255,255,0.08); color: #fff; padding-left: 14px; }
            .bs-menu-icon { opacity: 0.6; width: 16px; text-align: center; color: var(--aurora-2); }
            .bs-menu-separator { height: 1px; background: rgba(255,255,255,0.06); margin: 4px 8px; }
            #bs-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9998; display: none; }
            #bs-menu-overlay.visible { display: block; }
            .bs-menu-drag-handle { height: 20px; display: flex; align-items: center; justify-content: center; cursor: move; opacity: 0.3; transition: opacity 0.2s; }
            .bs-menu-drag-handle:hover { opacity: 0.8; }
            .bs-menu-drag-indicator { width: 30px; height: 3px; background: rgba(255,255,255,0.5); border-radius: 2px; }
            .bs-menu-pin-btn { position: absolute; right: 8px; top: 6px; width: 16px; height: 16px; border-radius: 50%; cursor: pointer; opacity: 0.2; display: flex; align-items: center; justify-content: center; font-size: 10px; transition: all 0.2s; }
            .bs-menu-pin-btn:hover, .bs-menu-pin-btn.active { opacity: 1; color: var(--aurora-1); }

            .bs-panel-header { height: 32px; background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; cursor: move; position: relative; }
            .bs-panel-title { font-size: 10px; color: var(--aurora-1); font-weight: 700; letter-spacing: 0.1em; }
            .bs-panel-close { width: 20px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; opacity: 0.5; transition: all 0.2s; }
            .bs-panel-close:hover { opacity: 1; background: rgba(255,255,255,0.1); color: #fff; }
            
            #bs-panel-about { width: 260px; }
            .bs-about-content { padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
            .bs-avatar { width: 72px; height: 72px; border-radius: 50%; background: #111; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; border: 2px solid rgba(255,255,255,0.1); overflow: hidden; }
            .bs-profile-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; color: #fff; }
            .bs-profile-bio { font-size: 12px; color: rgba(255,255,255,0.4); margin-bottom: 20px; line-height: 1.4; }
            .bs-social-links { display: flex; gap: 8px; }
            .bs-social-btn { padding: 6px 12px; background: rgba(255,255,255,0.05); border-radius: 4px; font-size: 10px; text-decoration: none; color: rgba(255,255,255,0.6); transition: all 0.2s; border: 1px solid transparent; cursor: pointer; }
            .bs-social-btn:hover { background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.2); color: #fff; }

            #bs-panel-log { width: 320px; height: 450px; max-height: 80vh; flex-direction: column; display: none; }
            #bs-panel-log.visible { display: flex; } 
            .bs-log-content { padding: 20px; overflow-y: auto; flex: 1; }
            .bs-log-content::-webkit-scrollbar { width: 4px; }
            .bs-log-content::-webkit-scrollbar-track { background: transparent; }
            .bs-log-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
            .bs-log-item { position: relative; padding-left: 16px; margin-bottom: 24px; border-bottom: none; }
            .bs-log-item::before { content: ''; position: absolute; top: 6px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--aurora-2); box-shadow: 0 0 5px var(--aurora-2); }
            .bs-log-item::after { content: ''; position: absolute; top: 14px; left: 2.5px; width: 1px; height: calc(100% + 10px); background: rgba(255,255,255,0.1); }
            .bs-log-item:last-child::after { display: none; }
            .bs-log-date { font-size: 11px; color: var(--aurora-1); margin-bottom: 6px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
            .bs-log-text { font-size: 13px; color: rgba(255,255,255,0.75); line-height: 1.6; white-space: pre-wrap; background: rgba(255,255,255,0.03); padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.05); }

            #bs-panel-favorites { width: 280px; flex-direction: column; display: none; }
            #bs-panel-favorites.visible { display: flex; }
            .hidden-by-filter { display: none !important; }
            .bs-switch { position: relative; display: inline-block; width: 34px; height: 20px; flex-shrink: 0;}
            .bs-switch input { opacity: 0; width: 0; height: 0; }
            .bs-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .3s; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); }
            .bs-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: white; transition: .3s; border-radius: 50%; }
            .bs-switch input:checked + .bs-slider { background-color: var(--aurora-1); border-color: transparent; }
            .bs-switch input:checked + .bs-slider:before { transform: translateX(14px); }
            .bs-fav-list-content { padding: 10px; overflow-y: auto; max-height: 400px; flex: 1; }
            .bs-fav-list-content::-webkit-scrollbar { width: 4px; }
            .bs-fav-list-content::-webkit-scrollbar-track { background: transparent; }
            .bs-fav-list-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
            .bs-fav-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; margin-bottom: 6px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; transition: all 0.2s var(--bs-ease); cursor: pointer; }
            .bs-fav-item:hover { background: rgba(56, 189, 248, 0.08); border-color: rgba(56, 189, 248, 0.2); transform: translateX(2px); }
            .bs-fav-item-title { font-size: 13px; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; flex: 1; }
            .bs-fav-mark-btn { appearance: none; -webkit-appearance: none; padding: 0; border: 0; outline: 0; background: transparent; color: rgba(255,255,255,0.2); font: inherit; font-size: 16px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background 0.2s, color 0.2s, transform 0.2s; flex-shrink: 0; cursor: pointer; }
            .bs-fav-item:focus-visible, .bs-fav-mark-btn:focus-visible { outline: 2px solid rgba(56,189,248,0.72); outline-offset: 2px; }
            .bs-fav-mark-btn.active { color: var(--aurora-4); filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.4)); }
            .bs-fav-mark-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
            .bs-fav-empty { text-align: center; padding: 40px 10px; color: rgba(255,255,255,0.3); font-size: 12px; line-height: 1.8; }
        }


/* 10.4 快捷键高亮与 iframe 快捷键状态提示 */
#sb-shortcuts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.42);
}

.sb-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.34);
    background: rgba(56, 189, 248, 0.08);
    color: var(--aurora-1);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.025), 0 0 0 rgba(56, 189, 248, 0);
    transition: color 0.22s var(--bs-ease), background 0.22s var(--bs-ease), border-color 0.22s var(--bs-ease), box-shadow 0.22s var(--bs-ease), transform 0.22s var(--bs-ease);
}

.sb-shortcut-label {
    color: rgba(255,255,255,0.48);
}

.sb-shortcut-separator {
    color: rgba(255,255,255,0.18);
    margin: 0 2px;
}

.sb-key.bs-shortcut-pulse,
body.bs-hide-toolbar .sb-key[data-shortcut-key="N"],
body.bs-focus-mode .sb-key[data-shortcut-key="CtrlSpace"] {
    color: #fff;
    border-color: rgba(56, 189, 248, 0.88);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(129, 140, 248, 0.24));
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.34), inset 0 0 0 1px rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

.sb-key.bs-shortcut-pulse {
    animation: bs-shortcut-pulse 0.52s var(--bs-ease) both;
}

@keyframes bs-shortcut-pulse {
    0% { transform: translateY(0) scale(1); box-shadow: 0 0 0 rgba(56, 189, 248, 0); }
    45% { transform: translateY(-1px) scale(1.12); box-shadow: 0 0 20px rgba(56, 189, 248, 0.48); }
    100% { transform: translateY(0) scale(1); }
}


/* ===== v10.8 右侧工具栏稳定补丁 ===== */
#bs-framework-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--footer-height) + 28px);
    z-index: 2147483646;
    max-width: min(440px, calc(100vw - 32px));
    padding: 9px 14px;
    border: 1px solid rgba(56,189,248,0.28);
    border-radius: 999px;
    background: rgba(8,10,14,0.92);
    color: rgba(255,255,255,0.9);
    font-family: var(--bs-font);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 12px 34px rgba(0,0,0,0.46), 0 0 20px rgba(56,189,248,0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity .22s ease, transform .28s var(--bs-ease), visibility .22s ease;
}
#bs-framework-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.bs-hidden-color-input {
    position: fixed !important;
    right: 24px !important;
    top: 50% !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0.001 !important;
    pointer-events: none !important;
}
.tactical-sandbox-frame[aria-busy="true"] {
    opacity: 0.72;
    transition: opacity .2s ease;
}
#bs-context-menu,
.bs-float-panel {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
}
.bs-menu-drag-handle,
.bs-panel-header {
    touch-action: none;
}
[role="button"] {
    -webkit-tap-highlight-color: transparent;
}
@media (max-width: 767px) {
    #bs-framework-toast {
        bottom: calc(var(--footer-height) + 16px);
        font-size: 11px;
    }
}


/* ===== v10.8.2：彻底移除屏幕拾色功能 ===== */
#bs-fab-color { display: none !important; pointer-events: none !important; }
body.bs-eyedropper-active { cursor: auto !important; }


/* v10.8.3 收藏筛选联动：确保 hidden 状态不被导航组件自身 display 样式覆盖。 */
#bs-dynamic-nav .bs-link[hidden],
#bs-dynamic-nav .bs-nav-separator[hidden],
#bs-dynamic-nav-list .bs-nav-item[hidden],
.bs-fav-filter-hidden {
    display: none !important;
}
