/* 从 index.html 内联 <style> 抽离(2026-06-20) */
    * { margin: 0; padding: 0; box-sizing: border-box; }
    :root {
      --bg: #0d0d0d; --bg2: #1a1a1a; --bg3: #252525;
      --fg: #e8e8e8; --fg2: #888; --fg3: #555;
      --accent: #d8d8d8; --accent2: #8f8f8f;
      --border: #2f2f2f; --radius: 8px;
    }
    body { font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; background: var(--bg); color: var(--fg); height: 100vh; overflow: hidden; }
    body, button, input, textarea, select, option { font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; }
    * { scrollbar-color: var(--border, #3f3f3f) transparent; scrollbar-width: thin; }
    *::-webkit-scrollbar { width: 12px; height: 12px; background: #171717; }
    *::-webkit-scrollbar-track { background: #171717; border-radius: 8px; }
    *::-webkit-scrollbar-thumb { background: #3f3f3f; border: 3px solid #171717; border-radius: 8px; }
    *::-webkit-scrollbar-thumb:hover { background: #555; }
    *::-webkit-scrollbar-corner { background: #171717; }

    html.ic-fa-fallback-active i.fas,
    html.ic-fa-fallback-active i.fa-solid,
    html.ic-fa-fallback-active i.far,
    html.ic-fa-fallback-active i.fa-regular {
      font-family: Arial, sans-serif !important;
      font-style: normal;
      font-weight: 700;
    }
    html.ic-fa-fallback-active i.fas::before,
    html.ic-fa-fallback-active i.fa-solid::before,
    html.ic-fa-fallback-active i.far::before,
    html.ic-fa-fallback-active i.fa-regular::before {
      content: "\25cf";
      display: inline-block;
      min-width: 1em;
      text-align: center;
    }

    /* 启动页入口图标兜底：本机 Font Awesome 字形渲染异常（显示空方块 □），
       入口关键图标改用系统 emoji 渲染，确保始终可见（与 FA 是否加载无关）。 */
    #app.startup-mode i.fa-table-list::before { content: "\1F4CA" !important; }
    #app.startup-mode i.fa-magnifying-glass::before { content: "\1F50D" !important; }
    #app.startup-mode i.fa-vector-square::before { content: "\1F3A8" !important; }
    #app.startup-mode i.fa-folder::before { content: "\1F4C1" !important; }
    #app.startup-mode i.fa-clone::before { content: "\1F3AC" !important; }
    #app.startup-mode i.fa-film::before { content: "\1F39E" !important; }
    #app.startup-mode i.fa-clock::before { content: "\1F552" !important; }
    #app.startup-mode i.fa-location-dot::before { content: "\1F4CD" !important; }
    #app.startup-mode i.fa-plus::before { content: "\2795" !important; }
    #app.startup-mode i.fa-list-check::before { content: "\1F4DD" !important; }
    #app.startup-mode i.fa-rotate-right::before { content: "\1F504" !important; }
    #app.startup-mode i.fa-arrow-right::before { content: "\2192" !important; }
    #app.startup-mode i.fa-arrow-up::before { content: "\2191" !important; }
    #app.startup-mode i.fa-table-list::before,
    #app.startup-mode i.fa-magnifying-glass::before,
    #app.startup-mode i.fa-vector-square::before,
    #app.startup-mode i.fa-folder::before,
    #app.startup-mode i.fa-clone::before,
    #app.startup-mode i.fa-film::before,
    #app.startup-mode i.fa-clock::before,
    #app.startup-mode i.fa-location-dot::before,
    #app.startup-mode i.fa-plus::before,
    #app.startup-mode i.fa-list-check::before,
    #app.startup-mode i.fa-rotate-right::before,
    #app.startup-mode i.fa-arrow-right::before,
    #app.startup-mode i.fa-arrow-up::before {
      font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif !important;
      font-weight: 400 !important;
      font-style: normal !important;
    }
    html.ic-fa-fallback-active .fa-plus::before { content: "+"; }
    html.ic-fa-fallback-active .fa-minus::before { content: "-"; }
    html.ic-fa-fallback-active .fa-times::before,
    html.ic-fa-fallback-active .fa-xmark::before { content: "x"; }
    html.ic-fa-fallback-active .fa-folder::before,
    html.ic-fa-fallback-active .fa-folder-open::before,
    html.ic-fa-fallback-active .fa-hard-drive::before { content: "\25a3"; }
    html.ic-fa-fallback-active .fa-clone::before,
    html.ic-fa-fallback-active .fa-copy::before { content: "\25a6"; }
    html.ic-fa-fallback-active .fa-film::before,
    html.ic-fa-fallback-active .fa-video::before { content: "\25a4"; }
    html.ic-fa-fallback-active .fa-location-dot::before,
    html.ic-fa-fallback-active .fa-location-crosshairs::before { content: "\25ce"; }
    html.ic-fa-fallback-active .fa-arrow-up::before { content: "\2191"; }
    html.ic-fa-fallback-active .fa-arrow-down::before { content: "\2193"; }
    html.ic-fa-fallback-active .fa-arrow-left::before,
    html.ic-fa-fallback-active .fa-chevron-left::before { content: "\2039"; }
    html.ic-fa-fallback-active .fa-arrow-right::before,
    html.ic-fa-fallback-active .fa-chevron-right::before { content: "\203a"; }
    html.ic-fa-fallback-active .fa-undo::before,
    html.ic-fa-fallback-active .fa-rotate-left::before { content: "\21ba"; }
    html.ic-fa-fallback-active .fa-redo::before { content: "\21bb"; }
    html.ic-fa-fallback-active .fa-search::before,
    html.ic-fa-fallback-active .fa-search-plus::before,
    html.ic-fa-fallback-active .fa-search-minus::before { content: "\2315"; }
    html.ic-fa-fallback-active .fa-expand::before,
    html.ic-fa-fallback-active .fa-expand-alt::before,
    html.ic-fa-fallback-active .fa-maximize::before { content: "\26f6"; }
    html.ic-fa-fallback-active .fa-bars::before,
    html.ic-fa-fallback-active .fa-list::before,
    html.ic-fa-fallback-active .fa-list-ul::before,
    html.ic-fa-fallback-active .fa-list-ol::before { content: "\2630"; }
    html.ic-fa-fallback-active .fa-star::before { content: "*"; }
    html.ic-fa-fallback-active .fa-pen::before,
    html.ic-fa-fallback-active .fa-paint-brush::before { content: "\270e"; }
    html.ic-fa-fallback-active .fa-eraser::before,
    html.ic-fa-fallback-active .fa-trash-alt::before { content: "\232b"; }
    html.ic-fa-fallback-active .fa-broom::before { content: "\2571"; }
    html.ic-fa-fallback-active .fa-image::before { content: "\25a7"; }
    html.ic-fa-fallback-active .fa-play::before,
    html.ic-fa-fallback-active .fa-play-circle::before { content: "\25b6"; }
    html.ic-fa-fallback-active .fa-pause::before { content: "\23f8"; }
    html.ic-fa-fallback-active .fa-microphone::before { content: "\266b"; }
    html.ic-fa-fallback-active .fa-volume-up::before { content: "\266a"; }
    html.ic-fa-fallback-active .fa-volume-xmark::before { content: "\00d7"; }
    html.ic-fa-fallback-active .fa-sun::before { content: "\2609"; }
    html.ic-fa-fallback-active .fa-lightbulb::before { content: "\25cc"; }
    html.ic-fa-fallback-active .fa-cube::before { content: "\25a8"; }
    html.ic-fa-fallback-active .fa-table-cells-large::before,
    html.ic-fa-fallback-active .fa-th-large::before,
    html.ic-fa-fallback-active .fa-border-all::before { content: "\25a6"; }
    html.ic-fa-fallback-active .fa-layer-group::before,
    html.ic-fa-fallback-active .fa-object-group::before { content: "\2261"; }
    html.ic-fa-fallback-active .fa-crop-alt::before { content: "\2317"; }
    html.ic-fa-fallback-active .fa-cog::before,
    html.ic-fa-fallback-active .fa-gear::before { content: "\2699"; }
    html.ic-fa-fallback-active .fa-sign-out-alt::before { content: "\21e5"; }

    /* Unified control centering */
    button:not(.shot-thumb):not(.ic-v2-page *),
    .btn-sm,
    .btn-primary,
    .lt-btn,
    .tray-tab,
    .mode-row button,
    .agent-round-btn,
    .chat-in button,
    .modal-actions button,
    .ui-delete-btn,
    .user-delete-btn,
    .team-delete-btn,
    .shot-delete-btn,
    .shot-create-btn,
    .shot-path-pick,
    .shot-detail-tab,
    .startup-pill-btn,
    .startup-square-btn,
    .startup-send,
    .startup-help,
    .startup-chip,
    .startup-mini-btn,
    .startup-icon-btn,
    .workspace-action-btn,
    .agent-rich-chip,
    .context-pill,
    .iep-ref-tag,
    .iep-inline-ref,
    .iep-rich-chip,
    .iep-add-ref-btn,
    .iep-layer-btn,
    .iep-tool-btn,
    .iep-ratio-trigger,
    .iep-ratio-btn,
    .iep-quality-btn,
    .iep-bottom-item,
    .iep-count-pill,
    .iep-apply-sm,
    .video-flow-settings-btn,
    .video-flow-model-control,
    .video-flow-count-select,
    .outpaint-toolbar button,
    .outpaint-ratio-menu button,
    .redraw-tool-btn,
    .redraw-send,
    .text-node-send,
    .selection-align-toolbar button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      vertical-align: middle;
      text-align: center;
    }

    button > i,
    button > svg,
    .btn-sm > i,
    .btn-primary > i,
    .context-pill i,
    .workspace-action-btn i,
    .startup-pill-btn i,
    .startup-chip i,
    .agent-ref-chip i,
    .agent-rich-chip i,
    .iep-bottom-item i,
    .iep-count-pill i,
    .iep-inline-ref i,
    .iep-rich-chip i,
    .outpaint-toolbar button i,
    .video-flow-model-control i {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      flex: 0 0 auto;
    }

    button > span,
    .btn-sm > span,
    .btn-primary > span,
    .context-pill span,
    .workspace-action-btn span,
    .startup-pill-btn span,
    .startup-chip span,
    .agent-ref-chip span,
    .agent-rich-chip span,
    .iep-bottom-item span,
    .iep-count-pill span,
    .iep-inline-ref span,
    .iep-rich-chip span,
    .outpaint-toolbar button span,
    .video-flow-model-control span {
      display: inline-flex;
      align-items: center;
      line-height: 1;
      min-height: 1em;
    }

    /* Login */
    .login-box { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--bg2); padding: 48px; border-radius: 20px; width: 380px; max-width: calc(100vw - 40px); box-sizing: border-box; border: 1px solid var(--border); flex-direction: column; align-items: stretch; }
    .login-box h1 { font-size: 28px; margin: 0 0 4px; color: #f2f2f2; }
    .login-box .sub { color: var(--fg2); margin: 0 0 28px; font-size: 13px; line-height: 1.55; }
    .form-group { margin-bottom: 16px; }
    .form-group input, .form-group select { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--fg); font-size: 14px; outline: none; }
    .form-group input:focus { border-color: var(--accent); }
    .btn-primary { background: #242424; color: #f2f2f2; border: 1px solid #3a3a3a; padding: 12px 24px; border-radius: var(--radius); cursor: pointer; font-size: 14px; font-weight: 600; transition: .2s; width: 100%; }
    .btn-primary:hover { opacity: .9; transform: translateY(-1px); }
    .btn-secondary { background: #181818; color: #d8d8d8; border: 1px solid #343434; padding: 10px 18px; border-radius: var(--radius); cursor: pointer; font-size: 13px; font-weight: 700; transition: .2s; }
    .btn-secondary:hover { background: #242424; color: #fff; border-color: #4a4a4a; }
    #bootstrapAdminBtn { display: none !important; }
    #bootstrapAdminBtn.can-show { display: inline-flex !important; }
    .btn-sm { background: transparent; border: 1px solid var(--border); color: var(--fg2); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; }
    .btn-sm:hover { border-color: var(--accent); color: var(--fg); }
    .error { color: #ef4444; font-size: 13px; margin-top: 12px; text-align: center; }

    /* Top Bar - Minimal */
    #topBar { position: fixed; top: 0; left: 0; right: 0; height: 40px; background: rgba(13,13,13,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 100; }
    .bar-left, .bar-right { display: flex; align-items: center; gap: 12px; }
    .app-title { font-weight: 700; font-size: 14px; color: #f2f2f2; }
    .project-info { font-size: 12px; color: var(--fg2); }
    .cr { font-size: 12px; color: var(--fg2); background: var(--bg3); padding: 2px 10px; border-radius: 10px; }
    .storage-status { color: var(--fg2); }
    .storage-status.disk { border-color: #5a5a5a; color: #d8d8d8; }
    .storage-status.memory { border-color: #5a5a5a; color: #bdbdbd; }

    /* Left Toolbar - Vertical */
    #leftToolbar { position: fixed; top: 40px; left: -52px; bottom: 0; width: 48px; background: rgba(13,13,13,.85); backdrop-filter: blur(12px); border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 2px; z-index: 180; transition: left .18s ease, box-shadow .18s ease; box-shadow: 10px 0 28px rgba(0,0,0,0); }
    .lt-btn { width: 36px; height: 36px; border: none; background: transparent; color: var(--fg2); border-radius: 8px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }
    .lt-btn:hover { background: var(--bg3); color: var(--fg); }
    .lt-btn.active { background: #f2f2f2; color: #111; }
    .lt-sep { width: 24px; height: 1px; background: var(--border); margin: 4px 0; }

    /* Asset Tray - Slide from left */
    #assetTray { position: fixed; top: 40px; left: 48px; bottom: 0; width: 0; background: linear-gradient(180deg, rgba(17,17,17,.98), rgba(18,18,18,.94)); backdrop-filter: blur(18px); border-right: 0; overflow: hidden; transition: width .2s; z-index: 85; box-shadow: 16px 0 48px rgba(0,0,0,.32); }
    #assetTray.open { width: 320px; border-right: 1px solid #303030; }
    .asset-library { width: 320px; height: 100%; box-sizing: border-box; padding: 10px 8px 14px; display: flex; flex-direction: column; color: #f2f2f2; }
    .asset-head { height: 38px; display: grid; grid-template-columns: 30px 1fr 32px; align-items: center; gap: 8px; }
    .asset-back, .asset-add { width: 30px; height: 30px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #d8d8d8; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; }
    .asset-back:hover, .asset-add:hover { background: #252525; border-color: #3a3a3a; color: #fff; }
    .asset-title { font-size: 22px; font-weight: 900; letter-spacing: 0; white-space: nowrap; }
    .asset-project-pill { display: none; }
    .asset-segment { height: 38px; border: 1px solid #3a3a3a; border-radius: 18px; background: #1e1e1e; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 8px 0 12px; }
    .asset-segment button { border: none; border-radius: 14px; background: transparent; color: #bdbdbd; font-size: 15px; font-weight: 900; cursor: pointer; }
    .asset-segment button.active { background: #555; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
    .asset-search { position: relative; margin-bottom: 14px; }
    .asset-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #777; font-size: 13px; pointer-events: none; }
    .asset-search input { width: 100%; height: 34px; border-radius: 17px; border: 1px solid #303030; background: #111; color: #e8e8e8; outline: none; padding: 0 12px 0 34px; box-sizing: border-box; font-size: 14px; }
    .asset-search input::placeholder { color: #777; }
    .asset-fav { height: 34px; border: none; background: transparent; color: #e4e4e4; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 11px; font-size: 14px; font-weight: 800; cursor: pointer; border-radius: 8px; }
    .asset-fav:hover, .asset-fav.active, .asset-folder-row:hover, .asset-folder-row.active { background: #2b2b2b; }
    .asset-fav i { color: #d6d6d6; width: 15px; text-align: center; }
    .asset-divider { height: 1px; background: #2f2f2f; margin: 10px 4px 14px; }
    .asset-view-switch { height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: -2px 4px 8px; }
    .asset-view-switch button { width: 30px; height: 28px; border: 1px solid #303030; border-radius: 7px; background: #171717; color: #aaa; cursor: pointer; }
    .asset-view-switch button.active { background: #f2f2f2; color: #111; border-color: #f2f2f2; }
    .asset-section-label { color: #8b8b8b; font-size: 13px; font-weight: 800; padding: 0 8px 7px; text-align: left; display: flex; align-items: center; justify-content: space-between; }
    .asset-section-label button { width: 24px; height: 24px; border: none; border-radius: 7px; background: transparent; color: #aaa; cursor: pointer; }
    .asset-section-label button:hover { background: #2b2b2b; color: #fff; }
    .asset-folder-list { display: grid; gap: 4px; overflow: auto; min-height: 0; align-content: start; justify-items: stretch; }
    .asset-folder-row { width: 100%; height: 36px; border: none; border-radius: 7px; background: transparent; color: #e2e2e2; padding: 0 6px; display: grid; grid-template-columns: 14px 26px minmax(0, 1fr) 24px; align-items: center; gap: 8px; cursor: pointer; text-align: left; font-size: 14px; justify-items: start; }
    .asset-folder-row .chev { color: #9a9a9a; font-size: 11px; }
    .asset-folder-icon { width: 25px; height: 20px; border-radius: 3px 3px 4px 4px; background: linear-gradient(180deg, #f0f0f0, #9d9d9d); box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 1px 3px rgba(0,0,0,.38); position: relative; }
    .asset-folder-icon::before { content: ""; position: absolute; left: 2px; top: -3px; width: 11px; height: 5px; border-radius: 3px 3px 0 0; background: #d9d9d9; }
    .asset-folder-row .more { width: 24px; height: 26px; border: none; border-radius: 6px; background: transparent; color: #9a9a9a; justify-self: end; opacity: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
    .asset-folder-row .more:hover { background: #3a3a3a; color: #fff; }
    .asset-folder-row.active .more, .asset-folder-row:hover .more { opacity: 1; }
    .asset-folder-row.drop-target { background: #353535; box-shadow: inset 0 0 0 1px #666; }
    .asset-folder-children { margin: -2px 0 6px 0; padding-left: 26px; border-left: 1px solid #2f2f2f; display: grid; gap: 4px; justify-items: stretch; }
    .asset-folder-empty { height: 34px; display: flex; align-items: center; padding: 0 10px; color: #757575; font-size: 13px; font-weight: 800; }
    .asset-results { margin-top: 12px; padding: 0 4px; overflow: auto; min-height: 0; flex: 1; display: grid; align-content: start; gap: 8px; }
    .asset-folder-list .asset-result-item { width: 100%; height: 34px; border: none; border-radius: 7px; background: transparent; grid-template-columns: 30px minmax(0, 1fr); padding: 2px 8px; justify-self: stretch; }
    .asset-result-item { height: 50px; border: 1px solid #303030; border-radius: 8px; background: rgba(255,255,255,.035); color: #e8e8e8; display: grid; grid-template-columns: 48px 1fr; gap: 9px; align-items: center; padding: 5px; cursor: pointer; text-align: left; }
    .asset-result-item:hover { background: #2b2b2b; border-color: #454545; }
    .asset-result-item img { width: 48px; height: 38px; object-fit: cover; border-radius: 5px; background: #101010; }
    .asset-folder-list .asset-result-item img { width: 28px; height: 28px; border-radius: 6px; }
    .asset-result-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; }
    .asset-result-meta { color: #8c8c8c; font-size: 11px; margin-top: 2px; }
    .asset-empty { color: #777; font-size: 12px; padding: 10px 8px; }
    .asset-context-menu { position: fixed; z-index: 300010; display: none; min-width: 128px; padding: 5px; border: 1px solid #3a3a3a; border-radius: 10px; background: #1d1d1d; box-shadow: 0 16px 36px rgba(0,0,0,.55); }
    #assetFolderMenu { min-width: 240px; padding: 10px; border-radius: 13px; background: #2b2b2b; border-color: #555; }
    .asset-context-menu button { width: 100%; height: 34px; border: none; border-radius: 7px; background: transparent; color: #f2f2f2; display: flex; align-items: center; gap: 11px; padding: 0 10px; cursor: pointer; font-size: 13px; font-weight: 800; }
    .asset-context-menu button i { width: 16px; text-align: center; }
    .asset-context-menu button:hover { background: #303030; }
    .asset-menu-sep { height: 1px; background: #484848; margin: 8px -10px 6px; }
    .asset-context-menu button.danger { color: #ff6b6b; }
    .asset-library.thumb-mode .asset-folder-children,
    .asset-library.thumb-mode .asset-results { grid-template-columns: repeat(auto-fill, 54px); gap: 8px; border-left: none; margin-left: 0; padding-left: 0; justify-content: start; align-items: start; }
    .asset-library.thumb-mode .asset-result-item,
    .asset-library.thumb-mode .asset-folder-list .asset-result-item { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; grid-template-columns: none; gap: 0; padding: 3px; border-radius: 8px; overflow: hidden; text-align: left; }
    .asset-library.thumb-mode .asset-result-item img,
    .asset-library.thumb-mode .asset-folder-list .asset-result-item img { width: 48px; height: 48px; border-radius: 7px; object-fit: cover; }
    .asset-library.thumb-mode .asset-result-item > span { display: none; }
    .asset-library.thumb-mode .asset-folder-empty,
    .asset-library.thumb-mode .asset-empty { grid-column: 1 / -1; width: 100%; height: 34px; justify-content: flex-start; white-space: nowrap; writing-mode: horizontal-tb; }

    /* Canvas - Full remaining space */
    #canvasArea { position: fixed; top: 40px; left: 48px; right: 0; bottom: 0; background: #111; }
    #canvasArea.right-open { right: 360px; }

    /* Right Panel - Slide from right */
    #rightPanel { position: fixed; top: 40px; right: -360px; bottom: 0; width: 360px; background: rgba(13,13,13,.95); backdrop-filter: blur(12px); border-left: 1px solid var(--border); transition: right .25s; z-index: 95; }
    #rightPanel.open { right: 0; }
    .rp-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #1d1d1d; }
    .rp-header span { font-size: 13px; font-weight: 600; }
    .rp-header button { position: relative; z-index: 4; width: 30px; height: 30px; background: none; border: none; color: var(--fg2); cursor: pointer; font-size: 16px; padding: 4px; border-radius: 8px; }
    .rp-header button:hover { color: var(--fg); }
    .rp-body { padding: 12px; overflow-y: auto; height: calc(100% - 48px); }

    /* Agent Chat */
    .chat-msgs { height: 100%; display: flex; flex-direction: column; gap: 12px; }
    .agent-home { flex: 0 0 auto; padding: 4px 0 0; }
    .agent-home-hello { display: flex; align-items: center; gap: 8px; color: #f4f4f4; font-size: 22px; line-height: 1.25; font-weight: 800; margin-bottom: 16px; }
    .agent-home-mark { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(from 35deg, #fff 0 16%, transparent 16% 24%, #fff 24% 40%, transparent 40% 48%, #fff 48% 64%, transparent 64% 72%, #fff 72% 88%, transparent 88%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); flex: 0 0 auto; }
    .agent-home-title { min-height: 74px; color: #fff; font-size: 26px; line-height: 1.42; font-weight: 900; letter-spacing: 0; margin: 0 0 18px; text-shadow: 0 1px 0 rgba(0,0,0,.45); }
    .agent-home-title.typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; background: #fff; vertical-align: -2px; animation: agentCaret .8s steps(1) infinite; }
    @keyframes agentCaret { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }
    .chat-msgs.agent-compact-home { gap: 8px; }
    .chat-msgs.agent-compact-home .agent-home { padding-top: 0; }
    .chat-msgs.agent-compact-home .agent-home-hello { margin-bottom: 4px; padding-right: 46px; }
    .chat-msgs.agent-compact-home .agent-home-title { display: none; min-height: 0; margin: 0; }
    .agent-dock-close { display: none; position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,.86); border-radius: 7px; background: rgba(255,255,255,.06); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
    .agent-dock-close:hover { background: rgba(255,255,255,.16); color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
    .agent-dock-close:active { transform: translateY(1px); }
    .chat-msgs .msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 0; user-select: text; -webkit-user-select: text; }
    .msg { display: flex; gap: 8px; margin-bottom: 12px; }
    .msg.user { flex-direction: row-reverse; }
    .msg-av { width: 26px; height: 26px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
    .msg.agent .msg-av { background: #2f2f2f; color: #f2f2f2; }
    .msg-txt { position: relative; max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; user-select: text; -webkit-user-select: text; cursor: text; }
    .msg.agent .msg-txt { background: var(--bg3); border: 1px solid var(--border); }
    .msg.user .msg-txt { background: #f2f2f2; color: #111; border-radius: 12px 4px 12px 12px; }
    .msg-copy-btn { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; background: rgba(22,22,22,.82); color: #d8d8d8; display: none; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; }
    .msg.agent .msg-txt:hover .msg-copy-btn { display: inline-flex; }
    .msg-copy-btn:hover { background: #303030; color: #fff; border-color: #555; }
    .agent-refs { display: none; gap: 6px; flex-wrap: wrap; padding: 0; }
    .agent-refs.show { display: flex; }
    .agent-ref-chip { max-width: 100%; height: 34px; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; background: rgba(255,255,255,.08); color: #e8e8e8; display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 12px; }
    .agent-ref-chip img { width: 24px; height: 24px; object-fit: cover; border-radius: 5px; background: #111; }
    .agent-ref-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .agent-ref-chip button { border: none; background: transparent; color: #aaa; cursor: pointer; padding: 0; }
    .chat-in { display: grid; grid-template-columns: 34px 1fr 28px 34px; grid-template-rows: minmax(44px, auto) 34px; align-items: center; gap: 4px 8px; padding: 10px; border: 1px solid #3b3b3b; border-radius: 14px; background: #202020; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
    .chat-in textarea { grid-column: 1 / -1; width: 100%; box-sizing: border-box; padding: 0 4px; border: none; border-radius: 0; background: transparent; color: #f2f2f2; font-size: 14px; line-height: 1.6; outline: none; resize: none; min-height: 44px; max-height: 108px; font-family: inherit; }
    .chat-in textarea#chatInput { display: none; }
    .agent-rich-input { grid-column: 1 / -1; width: 100%; box-sizing: border-box; padding: 0 4px; border: none; border-radius: 0; background: transparent; color: #f2f2f2; font-size: 14px; line-height: 1.65; outline: none; resize: none; min-height: 44px; max-height: 108px; overflow: auto; font-family: inherit; white-space: pre-wrap; word-break: break-word; }
    .agent-rich-input:empty::before { content: attr(data-placeholder); color: #9b9b9b; pointer-events: none; }
    .agent-rich-chip { position: relative; display: inline-flex; align-items: center; gap: 4px; max-width: 180px; height: 24px; margin: 0 3px; padding: 2px 5px 2px 3px; border-radius: 7px; background: #303030; border: 1px solid #454545; color: #e7efff; font-size: 12px; font-weight: 800; vertical-align: -5px; user-select: none; cursor: default; }
    .agent-rich-chip img { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; flex: 0 0 18px; background: #151515; }
    .agent-rich-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .agent-rich-chip .agent-rich-remove { width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #bdbdbd; font-size: 11px; line-height: 1; margin-left: 1px; }
    .agent-rich-chip .agent-rich-remove:hover { background: #555; color: #fff; }
    .chat-in textarea::placeholder { color: #9b9b9b; }
    .chat-in textarea:focus { border-color: transparent; }
    .agent-round-btn, .chat-in button { width: 31px; height: 31px; border: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
    .agent-plus { grid-column: 1; background: transparent; color: #f2f2f2; border: 1px solid #4a4a4a; font-size: 16px; }
    .agent-plus:hover { background: #303030; }
    .agent-input-spacer { grid-column: 2; }
    .agent-mic { grid-column: 3; width: 28px; height: 31px; border: none; border-radius: 50%; background: transparent; color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; }
    .agent-mic:hover { background: #303030; }
    .agent-mic.listening { color: #fff; background: #555; box-shadow: 0 0 0 2px rgba(255,255,255,.14); }
    .chat-in #chatBtn { grid-column: 4; background: #a8a8a8; color: #202020; font-size: 14px; }
    .chat-in #chatBtn:hover { filter: brightness(1.12); }

    /* Generator */
    .gen-section { margin-bottom: 12px; }
    .gen-section label { display: block; font-size: 11px; color: var(--fg2); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
    .gen-section textarea, .gen-section select { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--fg); font-size: 13px; outline: none; resize: vertical; }
    .gen-section textarea:focus, .gen-section select:focus { border-color: var(--accent); }
    .sz-grid { display: flex; gap: 4px; }
    .sz-btn { flex: 1; padding: 6px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: var(--fg3); cursor: pointer; font-size: 11px; text-align: center; }
    .sz-btn.active { border-color: #d8d8d8; color: #f2f2f2; background: rgba(255,255,255,.08); }
    .mode-row { display: flex; gap: 8px; }
    .mode-row button { flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: transparent; color: var(--fg2); cursor: pointer; font-size: 12px; text-align: center; }
    .mode-row button.active { border-color: var(--accent); background: #f2f2f2; color: #111; }
    .gen-result { margin-top: 8px; }
    .gen-result img { width: 100%; border-radius: var(--radius); }
    .canvas-metro { position: fixed; left: 6px; bottom: 8px; z-index: 82; width: 200px; color: #f2f2f2; font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; }
    .canvas-metro-preview { position: relative; height: 148px; border: 1px solid #303030; border-radius: 9px; background: #17171a; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 16px 44px rgba(0,0,0,.38); }
    .canvas-metro-preview canvas { width: 100%; height: 100%; display: block; opacity: .92; }
    .canvas-metro.map-collapsed .canvas-metro-preview { display: none; }
    .canvas-metro-stats { min-height: 22px; margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: rgba(238,238,238,.82); font-size: 10px; font-weight: 800; line-height: 1; }
    .canvas-metro-stats-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .canvas-metro-fps { flex: 0 0 auto; min-width: 48px; height: 18px; padding: 0 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: rgba(38,74,48,.82); color: #c8ffd9; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; line-height: 1; pointer-events: none; box-shadow: 0 5px 14px rgba(0,0,0,.24); }
    .canvas-metro-controls { height: 40px; display: grid; grid-template-columns: 40px 34px 34px 1fr; align-items: center; gap: 4px; margin-top: 6px; }
    .canvas-metro-btn { width: 34px; height: 34px; border: 1px solid #303030; border-radius: 11px; background: #17171a; color: #f1f1f1; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.24); }
    .canvas-metro-btn:hover, .canvas-metro-btn.active { background: #252525; border-color: #444; }
    .canvas-metro-btn.enabled { background: #f2f2f2; color: #111; border-color: #f2f2f2; }
    .canvas-metro-focus { border-radius: 50%; }
    .canvas-metro-slider { --metro-progress: 24%; height: 34px; display: flex; align-items: center; padding: 0 7px 0 2px; border-radius: 17px; background: #17171a; border: 1px solid transparent; }
    .canvas-metro-slider input { width: 100%; height: 4px; appearance: none; -webkit-appearance: none; border-radius: 999px; outline: none; background: linear-gradient(90deg, #f2f2f2 0 var(--metro-progress), #5a5a5a var(--metro-progress) 100%); }
    .canvas-metro-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: #f2f2f2; border: none; box-shadow: 0 2px 8px rgba(0,0,0,.42); cursor: pointer; }
    .canvas-metro-slider input::-moz-range-thumb { width: 17px; height: 17px; border-radius: 50%; background: #f2f2f2; border: none; box-shadow: 0 2px 8px rgba(0,0,0,.42); cursor: pointer; }
    .agent-gen-panel { height: 100%; display: flex; flex-direction: column; gap: 12px; }
    .agent-gen-prompt { flex: 1; min-height: 360px; border: 1px solid var(--accent); border-radius: 7px; background: #050505; color: #e8e8e8; padding: 12px; resize: none; outline: none; font-family: inherit; font-size: 13px; line-height: 1.5; }
    .agent-gen-prompt::placeholder { color: #777; }
    .agent-gen-footer { display: grid; gap: 12px; }
    .agent-gen-result { min-height: 0; }
    .agent-gen-result img { width: 100%; border-radius: 8px; border: 1px solid var(--border); display: block; background: #050505; object-fit: cover; }

    /* Zoom indicator */
    #zoomBadge { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); color: var(--fg2); padding: 4px 14px; border-radius: 12px; font-size: 11px; pointer-events: none; z-index: 80; }
    #app.workspace-mode #zoomBadge:not(.canvas-zoom-hud) { display: none !important; }

    /* Modals */
    .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 999; }
    .modal-c { background: var(--bg2); border-radius: 16px; max-height: 80vh; overflow-y: auto; min-width: 400px; border: 1px solid var(--border); }
    .modal-c.lg { min-width: 700px; }
    .modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border); }
    #adminModal .modal-h { cursor: default; user-select: none; }
    .modal-h h2 { font-size: 16px; }
    .modal-h button { background: none; border: none; color: var(--fg2); font-size: 24px; cursor: pointer; }
    .modal-b { padding: 24px; }
    #adminModal .modal-c { position: relative; display: flex; flex-direction: column; max-height: calc(100vh - 48px); overflow: hidden; }
    #adminModal .modal-b { flex: 1 1 auto; min-height: 0; padding: 24px 28px; max-height: none; overflow: auto; }
    #adminModal.admin-maximized { padding: 12px; align-items: stretch; justify-content: stretch; }
    #adminModal.admin-maximized .modal-c.lg { width: 100%; max-width: none; height: calc(100vh - 24px); max-height: none; display: flex; flex-direction: column; }
    #adminModal.admin-maximized .modal-b { flex: 1; min-height: 0; max-height: none; overflow: auto; padding: 24px 28px; }
    #adminModal.admin-maximized .shot-admin { min-height: calc(100vh - 230px); }
    #adminModal.admin-maximized .team-list { max-height: calc(100vh - 380px); overflow: auto; padding-right: 4px; }
    .modal-actions { display: inline-flex; align-items: center; gap: 8px; }
    .modal-actions button { width: 28px; height: 28px; background: transparent; border: none; border-radius: 7px; color: var(--fg2); cursor: pointer; font-size: 15px; }
    .modal-actions button:hover { color: #fff; background: #2a2a2a; }
    .admin-account-footer { flex: 0 0 auto; display: grid; gap: 5px; justify-items: end; justify-content: end; text-align: right; color: #f2f2f2; padding: 12px 28px 18px; border-top: 1px solid var(--border); background: var(--bg2); }
    .admin-version { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; font-size: 9px; font-weight: 800; color: #e5e5e5; }
    .admin-version i { color: #d8d8d8; font-size: 14px; }
    .admin-version-mark { width: 18px; height: 18px; border-radius: 5px; border: 1px solid #3f3f3f; background: #232323; color: #e8e8e8; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 900; line-height: 1; letter-spacing: 0; }
    .admin-logout { border: none; background: transparent; color: #d8d8d8; padding: 0; display: inline-flex; align-items: center; justify-content: flex-end; justify-self: end; gap: 10px; font-size: 14px; font-weight: 900; cursor: pointer; text-align: right; }
    .admin-logout:hover { color: #fff; }
    .ui-delete-btn, .user-delete-btn, .team-delete-btn, .shot-delete-btn { width: 26px; height: 26px; border: 1px solid #444; border-radius: 7px; background: #202020; color: #d8d8d8; display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 18px; font-weight: 900; line-height: 1; cursor: pointer; }
    .ui-delete-btn:hover, .user-delete-btn:hover, .team-delete-btn:hover, .shot-delete-btn:hover { background: #292929; border-color: #666; color: #fff; }
    .ui-delete-btn:disabled, .user-delete-btn:disabled, .team-delete-btn:disabled, .shot-delete-btn:disabled { opacity: .35; cursor: not-allowed; }
    .proj-card, .scene-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 6px; cursor: pointer; }
    .proj-card:hover, .scene-card:hover { border-color: var(--accent); }
    .proj-card h4 { font-size: 14px; }
    .proj-card p, .scene-card p { font-size: 12px; color: var(--fg2); }
    .scene-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .scene-card { text-align: left; }
    .scene-card h4 { font-size: 22px; color: var(--accent); }
    .admin-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
    .admin-tab { padding: 8px 16px; border: none; background: transparent; color: var(--fg2); cursor: pointer; font-size: 13px; }
    .admin-tab.active { color: #f2f2f2; border-bottom: 2px solid #d8d8d8; }
    .admin-api-lock { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; max-width: 380px; }
    .admin-api-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr); gap: 12px; align-items: start; grid-auto-flow: row dense; }
    .admin-api-side { grid-column: 2; grid-row: 1; display: grid; gap: 10px; min-width: 0; align-content: start; align-items: start; grid-auto-rows: min-content; }
    .admin-api-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; align-self: start; align-content: start; grid-auto-rows: min-content; min-width: 0; }
    .admin-api-card-video { grid-column: 1; grid-row: 1; align-self: start; }
    .admin-api-card-image { gap: 10px; order: 1; }
    .admin-api-card-agent { order: 2; margin-top: 0; }
    .admin-api-card h3 { font-size: 14px; margin: 0; color: var(--fg); }
    .api-field { display: grid; gap: 5px; }
    .api-field label { font-size: 12px; color: var(--fg2); }
    .admin-user-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
    .admin-user-table th, .admin-user-table td { height: 40px; padding: 0 10px; border-bottom: 1px solid #2a2a2a; text-align: center; vertical-align: middle; line-height: 40px; box-sizing: border-box; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .admin-user-table th { color: #9a9a9a; font-weight: 800; }
    .admin-user-table th:first-child, .admin-user-table td:first-child { text-align: left; }
    .admin-user-sort-btn { width: 100%; height: 40px; border: 0; background: transparent; color: inherit; padding: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font: inherit; font-weight: 800; line-height: 1; cursor: pointer; white-space: nowrap; }
    .admin-user-table th:first-child .admin-user-sort-btn { justify-content: flex-start; }
    .admin-user-sort-btn i { font-size: 9px; opacity: .72; width: 9px; text-align: center; }
    .admin-user-table td .rb { min-width: 34px; height: 28px; padding: 0 7px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; line-height: 1; box-sizing: border-box; white-space: nowrap; }
    .admin-user-table td .user-delete-btn { vertical-align: middle; }
    .admin-user-table td.user-quota-td { overflow: visible; white-space: normal; line-height: 1.2; padding: 6px 12px; }
    .user-quota-cell { display: flex; flex-direction: column; align-items: center; gap: 7px; }
    .user-quota-line { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; line-height: 1; }
    .user-quota-used { color: #f2f2f2; min-width: 24px; text-align: right; }
    .user-quota-sep { color: #6a6a6a; }
    .user-quota-inf { color: #9a9a9a; font-size: 15px; }
    .user-quota-input { width: 78px; height: 26px; }
    .user-quota-bar { width: 100%; max-width: 220px; height: 6px; border-radius: 6px; background: #666; overflow: hidden; }
    .user-quota-fill { height: 100%; border-radius: 6px; background: #d8d8d8; }
    .api-field input, .api-field textarea { width: 100%; min-width: 0; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: #090909; color: var(--fg); outline: none; font-family: inherit; font-size: 13px; box-sizing: border-box; pointer-events: auto; user-select: text; -webkit-user-select: text; position: relative; z-index: 1; }
    .api-field textarea { resize: vertical; line-height: 1.5; min-height: 150px; }
    .api-field input:focus, .api-field textarea:focus { border-color: var(--accent); }
    /* === 后台管理统一深色配色：底图/行类目/可选框/线条 各一色（用户·功能·API·统计·日志一致） === */
    /* 与「快捷键」tab 同款配色：底色 #0d0d0d、卡片/行 #171717、线条 #303030、表头 #202020、行分隔 #2a2a2a、按钮 #242424 */
    #adminModal { --ad-bg: #0d0d0d; --ad-row: #171717; --ad-field: #242424; --ad-line: #303030; --ad-line2: #2a2a2a; --ad-head: #202020; --ad-text: #f2f2f2; --ad-muted: #9a9a9a; --ad-accent: #4a8cff; }
    #adminModal .modal-c, #adminModal .modal-h, #adminModal .modal-b { background: var(--ad-bg) !important; color: var(--ad-text) !important; }
    #adminModal .modal-c { border: 1px solid var(--ad-line) !important; }
    #adminModal .modal-h { border-bottom: 1px solid var(--ad-line) !important; }
    #adminModal .admin-tabs { border-bottom: 1px solid var(--ad-line) !important; }
    #adminModal .admin-tab { color: var(--ad-muted) !important; background: transparent !important; }
    #adminModal .admin-tab.active { color: #fff !important; border-bottom: 2px solid var(--ad-accent) !important; }
    #adminModal .admin-api-card, #adminModal .admin-api-lock, #adminModal .feature-card, #adminModal .stat-c, #adminModal .team-row, #adminModal .admin-section { background: var(--ad-row) !important; border: 1px solid var(--ad-line) !important; border-radius: 8px !important; }
    #adminModal .admin-user-table th { background: var(--ad-head) !important; color: var(--ad-muted) !important; border-bottom: 1px solid var(--ad-line) !important; }
    #adminModal .admin-user-table tbody td { border-bottom: 1px solid var(--ad-line2) !important; background: var(--ad-row) !important; }
    #adminModal .admin-user-table tbody tr:hover td { background: var(--ad-head) !important; }
    #adminModal input, #adminModal textarea, #adminModal select, #adminModal .api-field input, #adminModal .api-field textarea { background: var(--ad-field) !important; border: 1px solid var(--ad-line) !important; color: var(--ad-text) !important; }
    #adminModal input:focus, #adminModal textarea:focus, #adminModal select:focus { border-color: var(--ad-accent) !important; }
    /* === 后台配色 END === */
    .admin-image-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
    .admin-image-field-grid .api-field.wide { grid-column: 1 / -1; }
    .admin-model-head, .admin-video-model-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
    .admin-model-head strong, .admin-video-model-head strong { font-size: 13px; color: var(--fg); }
    .admin-model-add, .admin-video-model-add { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: #111; color: var(--fg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
    .admin-model-add:hover, .admin-video-model-add:hover { background: #242424; border-color: #666; }
    .admin-model-list, .admin-video-model-list { display: grid; gap: 10px; }
    .admin-model-row, .admin-video-model-row { border: 1px solid #343434; border-radius: 8px; background: #151515; padding: 10px; display: grid; gap: 8px; }
    .admin-model-row-top, .admin-video-model-row-top { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; align-items: end; }
    .admin-model-row-grid, .admin-video-model-row-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .admin-model-row label, .admin-video-model-row label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
    .admin-model-row input, .admin-video-model-row input { width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: #090909; color: var(--fg); outline: none; font-family: inherit; font-size: 13px; box-sizing: border-box; }
    .admin-model-row input:focus, .admin-video-model-row input:focus { border-color: var(--accent); }
    .admin-model-remove, .admin-video-model-remove { width: 34px; height: 34px; border: 1px solid #444; border-radius: 8px; background: #111; color: #ddd; cursor: pointer; }
    .admin-model-remove:hover, .admin-video-model-remove:hover { background: #2a1515; border-color: #774444; color: #fff; }
    .admin-api-actions { display: flex; justify-content: flex-end; gap: 8px; grid-column: 1 / -1; }
    @media (max-width: 980px) {
      .admin-api-grid { grid-template-columns: 1fr; }
      .admin-api-card-video, .admin-api-side, .admin-api-actions { grid-column: 1; }
      .admin-image-field-grid { grid-template-columns: 1fr; }
      .admin-image-field-grid .api-field.wide { grid-column: auto; }
    }
    .shortcut-panel { display: grid; gap: 12px; color: #f2f2f2; }
    .shortcut-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #303030; border-radius: 8px; background: #171717; padding: 12px; }
    .shortcut-head h3 { margin: 0; font-size: 14px; }
    .shortcut-head small { display: block; margin-top: 4px; color: #999; font-size: 12px; line-height: 1.4; }
    .shortcut-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
    .shortcut-table-wrap { border: 1px solid #303030; border-radius: 8px; background: #171717; overflow: auto; min-height: 360px; }
    .shortcut-table { width: 100%; min-width: 760px; border-collapse: collapse; }
    .shortcut-table th, .shortcut-table td { padding: 10px 12px; border-bottom: 1px solid #2a2a2a; text-align: left; font-size: 12px; vertical-align: middle; }
    .shortcut-table th { color: #aaa; background: #202020; font-weight: 800; position: sticky; top: 0; z-index: 1; }
    .shortcut-table tr:last-child td { border-bottom: none; }
    .shortcut-table tr:hover td { background: #202020; }
    .shortcut-group { color: #aaa; font-weight: 800; white-space: nowrap; }
    .shortcut-name { font-weight: 900; color: #f2f2f2; }
    .shortcut-desc { margin-top: 3px; color: #8f8f8f; line-height: 1.35; }
    .shortcut-key-btn { min-width: 122px; height: 30px; border: 1px solid #3a3a3a; border-radius: 7px; background: #101010; color: #f2f2f2; padding: 0 10px; cursor: pointer; font-size: 12px; font-weight: 900; font-family: inherit; }
    .shortcut-key-btn:hover { background: #242424; border-color: #555; }
    .shortcut-key-btn.capturing { border-color: #f2f2f2; background: #303030; color: #fff; }
    .shortcut-reset-btn { height: 28px; border: 1px solid #3a3a3a; border-radius: 7px; background: #242424; color: #f2f2f2; padding: 0 10px; cursor: pointer; font-size: 12px; font-family: inherit; }
    .shortcut-reset-btn:hover { background: #303030; border-color: #555; }
    .shortcut-hint { color: #999; font-size: 12px; line-height: 1.5; }
    #adminModal .modal-c.lg { width: min(1240px, calc(100vw - 44px)); }
    .shot-admin { --shot-filter-w: 240px; --shot-detail-w: 360px; display: grid; grid-template-columns: var(--shot-filter-w) 10px minmax(680px, 1fr) 10px var(--shot-detail-w); gap: 0; min-height: min(680px, calc(100vh - 220px)); color: #f2f2f2; overflow: auto; align-items: stretch; }
    .shot-filter-panel, .shot-table-panel, .shot-detail-panel { border: 1px solid #303030; border-radius: 8px; background: #171717; overflow: hidden; min-width: 0; }
    .shot-filter-panel { min-width: 180px; }
    .shot-table-panel { display: flex; flex-direction: column; min-width: 620px; min-height: 460px; }
    .shot-detail-panel { min-width: 300px; }
    .shot-splitter { position: relative; cursor: col-resize; min-width: 10px; }
    .shot-splitter::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; border-radius: 2px; background: #303030; }
    .shot-splitter:hover::before, .shot-splitter.dragging::before { background: #5a5a5a; }
    .shot-panel-head { height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #303030; background: #1f1f1f; font-size: 13px; font-weight: 900; }
    .shot-filter-body { padding: 12px; display: grid; gap: 12px; }
    .shot-filter-group { display: grid; gap: 6px; }
    .shot-filter-group label { font-size: 12px; color: #9a9a9a; }
    .shot-filter-group select, .shot-filter-group input, .shot-detail-panel select, .shot-detail-panel input, .shot-detail-panel textarea {
      width: 100%; height: 32px; border: 1px solid #3a3a3a; border-radius: 8px; background: #101010; color: #f2f2f2; padding: 0 9px; outline: none; font-size: 12px;
    }
    .shot-filter-group textarea, .shot-detail-panel textarea { height: 112px; padding: 9px; resize: vertical; line-height: 1.5; }
    .shot-filter-group select:focus, .shot-filter-group input:focus, .shot-detail-panel select:focus, .shot-detail-panel input:focus, .shot-detail-panel textarea:focus { border-color: #d8d8d8; }
    .shot-table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; flex-wrap: wrap; }
    .shot-create-btn { height: 28px; border: 1px solid #3a3a3a; border-radius: 7px; background: #242424; color: #f2f2f2; padding: 0 10px; cursor: pointer; font-size: 12px; font-weight: 800; }
    .shot-create-btn:hover { background: #303030; border-color: #555; }
    .shot-search { width: clamp(150px, 18vw, 240px); height: 28px; border: 1px solid #3a3a3a; border-radius: 7px; background: #111; color: #f2f2f2; padding: 0 9px; outline: none; }
    .shot-create-form { border-bottom: 1px solid #303030; background: #151515; padding: 10px; display: grid; grid-template-columns: repeat(5, minmax(112px, 1fr)) 132px; gap: 8px; align-items: end; min-width: 760px; }
    .shot-create-form label { display: grid; gap: 5px; color: #999; font-size: 12px; }
    .shot-create-form input, .shot-create-form select { height: 30px; border: 1px solid #3a3a3a; border-radius: 7px; background: #101010; color: #f2f2f2; padding: 0 8px; outline: none; }
    .shot-create-action { grid-column: 6; width: 100%; }
    .shot-path-control { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .shot-path-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .shot-path-history { height: 30px; border: 1px solid #3a3a3a; border-radius: 7px; background: #242424; color: #f2f2f2; padding: 0 8px; outline: none; cursor: pointer; font-size: 12px; font-weight: 800; }
    .shot-path-history option { background: #242424; color: #f2f2f2; }
    .shot-path-history:focus { border-color: #555; }
    .shot-path-pick { width: 100%; height: 30px; border: 1px solid #3a3a3a; border-radius: 7px; background: #242424; color: #f2f2f2; padding: 0 8px; cursor: pointer; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
    .shot-path-pick:hover { background: #303030; border-color: #555; }
    .shot-create-new-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
    .shot-table-wrap { flex: 1; min-height: 360px; overflow: auto; }
    .shot-admin table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
    .shot-admin th, .shot-admin td { height: 40px; padding: 0 10px; border-bottom: 1px solid #2a2a2a; font-size: 12px; line-height: 40px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; vertical-align: middle; box-sizing: border-box; }
    .shot-admin th { color: #aaa; background: #202020; font-weight: 800; position: sticky; top: 0; z-index: 1; }
    .shot-admin td > strong, .shot-admin td > span:not(.shot-status-pill) { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
    .shot-sort-btn { width: 100%; height: 40px; border: 0; background: transparent; color: inherit; padding: 0; display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; font: inherit; font-weight: 800; line-height: 1; cursor: pointer; white-space: nowrap; }
    .shot-admin th .shot-sort-btn { justify-content: flex-start !important; text-align: left !important; }
    .shot-admin th:first-child .shot-sort-btn, .shot-admin td:first-child { justify-content: center !important; text-align: center; padding-left: 0; padding-right: 0; }
    .shot-sort-btn:hover, .shot-sort-btn.active { color: #f2f2f2; }
    .shot-sort-btn i { width: 10px; font-size: 10px; line-height: 1; color: #bdbdbd; display: inline-flex; justify-content: center; }
    .shot-admin th:last-child, .shot-admin td:last-child { text-align: center; }
    .shot-admin td:last-child .shot-delete-btn { margin: 0 auto; vertical-align: middle; }
    .shot-admin tr { cursor: pointer; }
    .shot-admin tr:hover td { background: #222; }
    .shot-admin tr.active td { background: #303030; color: #fff; }
    .shot-subline { display: block; margin-top: 3px; color: #8f8f8f; font-size: 11px; line-height: 1.2; font-weight: 700; }
    .shot-admin select.inline-select { display: block; width: 100%; min-width: 0; height: 28px; margin: 6px 0; border-radius: 7px; border: 1px solid #3a3a3a; background: #101010; color: #f2f2f2; padding: 0 6px; font-size: 12px; line-height: 28px; }
    .shot-admin select.shot-review-check { color: #55a7ff !important; border-color: rgba(85,167,255,.56) !important; }
    .shot-admin select.shot-review-retake { color: #ff5f63 !important; border-color: rgba(255,95,99,.56) !important; }
    .shot-admin select.shot-review-approve { color: #41d879 !important; border-color: rgba(65,216,121,.56) !important; }
    .shot-status-pill { min-height: 24px; padding: 0 9px; border: 1px solid #3a3a3a; border-radius: 999px; background: #101010; color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; line-height: 1; }
    .shot-status-pill.shot-review-check { color: #55a7ff; border-color: rgba(85,167,255,.56); background: rgba(85,167,255,.1); }
    .shot-status-pill.shot-review-retake { color: #ff5f63; border-color: rgba(255,95,99,.56); background: rgba(255,95,99,.1); }
    .shot-status-pill.shot-review-approve { color: #41d879; border-color: rgba(65,216,121,.56); background: rgba(65,216,121,.1); }
    .shot-admin option.shot-review-check { color: #55a7ff; }
    .shot-admin option.shot-review-retake { color: #ff5f63; }
    .shot-admin option.shot-review-approve { color: #41d879; }
    .my-task-admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 10px; min-height: min(680px, calc(100vh - 220px)); color: #f2f2f2; overflow: hidden; align-items: stretch; }
    .my-task-summary { border: 1px solid #303030; border-radius: 8px; background: #171717; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: #aaa; }
    .my-task-summary strong { color: #f2f2f2; font-size: 14px; }
    .my-task-project { border: 1px solid #303030; border-radius: 8px; background: #171717; overflow: hidden; }
    .my-task-project-head { height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #303030; background: #1f1f1f; font-size: 13px; font-weight: 900; }
    .my-task-project-head small { color: #9a9a9a; font-weight: 700; }
    .my-task-project-divider td { background: #1f1f1f !important; color: #f2f2f2; cursor: default; text-align: left !important; padding-left: 62px !important; padding-right: 10px !important; }
    .my-task-project-divider strong { margin-right: 8px; }
    .my-task-project-divider small { color: #9a9a9a; font-weight: 700; }
    .my-task-admin.shot-admin { grid-template-columns: 240px minmax(0, 1fr); gap: 10px; overflow: hidden; }
    .my-task-admin .shot-filter-panel, .my-task-admin .shot-table-panel { min-height: 560px; }
    .my-task-admin .shot-filter-panel { width: 240px; min-width: 240px; max-width: 240px; align-self: stretch; display: flex; flex-direction: column; }
    .my-task-admin .shot-filter-body { flex: 1; min-height: 0; overflow: hidden; align-content: start; }
    .my-task-admin .shot-table-panel { min-width: 0; }
    .my-task-notes-box { margin-top: 12px; padding-top: 12px; border-top: 1px solid #303030; display: grid; gap: 8px; }
    .my-task-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #f2f2f2; font-size: 12px; font-weight: 900; }
    .my-task-notes-head small { color: #8f8f8f; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .my-task-notes-box textarea { width: 100%; min-height: 160px; border: 1px solid #3a3a3a; border-radius: 8px; background: #101010; color: #f2f2f2; padding: 9px 10px; outline: none; resize: vertical; line-height: 1.5; font-family: inherit; font-size: 12px; }
    .my-task-notes-box textarea:focus { border-color: #d8d8d8; background: #121212; }
    .my-task-admin .shot-table-wrap { flex: 1; max-height: none; }
    .my-task-admin table { min-width: 1040px; }
    .my-task-empty { grid-column: 1 / -1; }
    .shot-count { color: #aaa; font-size: 12px; font-weight: 700; }
    .shot-detail-body { padding: 12px; display: grid; gap: 12px; }
    .shot-thumb { height: 128px; border: 1px solid #333; border-radius: 8px; background: #111; display: grid; place-items: center; color: #777; font-size: 34px; overflow: hidden; cursor: pointer; padding: 0; }
    .shot-thumb:hover { border-color: #5a5a5a; background: #171717; }
    .shot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .shot-detail-title strong { display: block; font-size: 16px; margin-bottom: 4px; }
    .shot-detail-title small { color: #aaa; }
    .shot-detail-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .shot-detail-tab { height: 30px; border: 1px solid #383838; border-radius: 7px; background: #222; color: #aaa; cursor: pointer; font-size: 12px; font-weight: 800; }
    .shot-detail-tab.active { background: #f2f2f2; color: #111; border-color: #f2f2f2; }
    .shot-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .shot-meta-field { display: grid; gap: 5px; }
    .shot-meta-field label { font-size: 12px; color: #999; }
    .shot-history-list { display: grid; gap: 8px; max-height: 190px; overflow: auto; }
    .shot-history-item { border: 1px solid #303030; border-radius: 8px; background: #111; padding: 8px; font-size: 12px; color: #ddd; }
    .shot-history-item small { display: block; color: #888; margin-top: 4px; }
    .shot-storyboard-panel { border-top: 1px solid #303030; background: #151515; padding: 10px; display: grid; gap: 10px; }
    .shot-storyboard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
    .shot-storyboard-head strong { display: block; color: #f2f2f2; font-size: 13px; line-height: 1.2; }
    .shot-storyboard-head small { display: block; margin-top: 3px; color: #8f8f8f; font-size: 11px; line-height: 1.25; }
    .shot-storyboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
    .shot-storyboard-actions button, .shot-storyboard-card-actions button { min-height: 28px; border: 1px solid #3a3a3a; border-radius: 7px; background: #242424; color: #f2f2f2; padding: 0 9px; cursor: pointer; font-size: 12px; font-weight: 800; }
    .shot-storyboard-actions button:hover, .shot-storyboard-card-actions button:hover { background: #303030; border-color: #555; }
    .shot-storyboard-actions button:disabled, .shot-storyboard-card-actions button:disabled { opacity: .42; cursor: not-allowed; }
    .shot-storyboard-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; }
    .shot-storyboard-card { border: 1px solid #303030; border-radius: 8px; background: #111; padding: 8px; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; min-height: 106px; cursor: pointer; }
    .shot-storyboard-card:hover { border-color: #4a4a4a; background: #161616; }
    .shot-storyboard-thumb { width: 58px; height: 58px; border: 1px solid #303030; border-radius: 7px; background: #202020; display: grid; place-items: center; overflow: hidden; color: #aaa; font-size: 12px; font-weight: 900; }
    .shot-storyboard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .shot-storyboard-meta { min-width: 0; display: grid; gap: 5px; align-content: start; }
    .shot-storyboard-meta strong, .shot-storyboard-meta span, .shot-storyboard-meta small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .shot-storyboard-meta strong { color: #f2f2f2; font-size: 13px; line-height: 1.2; }
    .shot-storyboard-meta span { color: #aaa; font-size: 11px; line-height: 1.25; }
    .shot-storyboard-meta small { color: #777; font-size: 11px; line-height: 1.25; }
    .shot-storyboard-card-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
    .shot-storyboard-empty { min-height: 72px; border: 1px dashed #333; border-radius: 8px; display: grid; place-items: center; color: #777; font-size: 12px; text-align: center; padding: 12px; }
    .shot-storyboard-check { width: 16px; height: 16px; accent-color: #f2f2f2; vertical-align: middle; }
    .shot-empty { height: 260px; display: grid; place-items: center; color: #777; font-size: 13px; }
    .team-panel { display: grid; gap: 22px; color: #f2f2f2; }
    .team-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 96px; padding: 18px 20px; border: 1px solid #292929; border-radius: 12px; background: #151515; }
    .team-head > div:first-child { display: flex; align-items: center; gap: 22px; min-width: 0; }
    .admin-password-card { display: grid; grid-template-columns: minmax(160px, 1fr) 180px 180px 120px; gap: 12px; align-items: end; padding: 12px; margin: 0 0 12px; border: 1px solid #343434; border-radius: 12px; background: #202020; }
    .admin-password-card strong { display: block; color: #f2f2f2; font-size: 14px; margin-bottom: 4px; }
    .admin-password-card small { color: #9a9a9a; font-size: 12px; }
    .admin-password-card input { height: 36px; border-radius: 8px; border: 1px solid #3a3a3a; background: #111; color: #f2f2f2; padding: 0 12px; }
    .team-profile { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center; min-width: 0; }
    .team-profile-text { min-height: 56px; display: flex; flex-direction: column; justify-content: center; }
    .team-avatar { position: relative; width: 56px; height: 56px; border-radius: 13px; border: none; background: #5a5a5a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; cursor: pointer; overflow: visible; padding: 0; }
    .team-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
    .team-avatar::after { content: "\f040"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%; background: #f5f5f5; color: #111; display: flex; align-items: center; justify-content: center; font-size: 10px; }
    .team-profile strong { display: block; font-size: 18px; line-height: 56px; margin: 0; }
    .team-profile small { color: #777; font-size: 13px; filter: blur(2px); }
    .team-title { font-size: 20px; font-weight: 900; margin: 0; padding-left: 22px; border-left: 1px solid #343434; white-space: nowrap; }
    .team-actions { display: flex; align-items: center; gap: 12px; }
    .team-refresh { width: 34px; height: 34px; border: none; border-radius: 9px; background: transparent; color: #858585; cursor: pointer; }
    .team-refresh:hover { color: #f2f2f2; background: #202020; }
    .team-refresh.refreshing i { animation: teamRefreshSpin .32s linear; }
    @keyframes teamRefreshSpin { to { transform: rotate(360deg); } }
    .team-search { width: 260px; height: 38px; border: 1px solid #333; border-radius: 8px; background: #0f0f0f; color: #e8e8e8; padding: 0 13px; outline: none; }
    .team-add { height: 38px; border: none; border-radius: 9px; background: #242424; color: #f2f2f2; border: 1px solid #3a3a3a; padding: 0 22px; font-size: 15px; font-weight: 900; cursor: pointer; }
    .team-columns { display: grid; grid-template-columns: minmax(260px, 1.35fr) minmax(280px, 1fr) 150px 80px; align-items: center; gap: 22px; min-height: 42px; padding: 0 24px; color: #929292; font-size: 12px; box-sizing: border-box; }
    .team-columns > span { min-width: 0; display: flex; align-items: center; min-height: 42px; }
    .team-row > div { min-width: 0; height: 100%; min-height: 96px; display: flex; align-items: center; }
    .team-columns > span:nth-child(2), .team-row > div:nth-child(2) { justify-content: center; }
    .team-columns > span:nth-child(3), .team-row > div:nth-child(3),
    .team-columns > span:nth-child(4), .team-row > div:nth-child(4) { justify-content: center; text-align: center; }
    .team-sort-group { display: inline-flex; align-items: center; gap: 8px; }
    .team-sort-btn { border: none; background: transparent; color: #929292; padding: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
    .team-sort-btn:hover, .team-sort-btn.active { color: #f2f2f2; }
    .team-sort-btn i { font-size: 10px; color: #d8d8d8; }
    .team-list { display: grid; gap: 12px; }
    .team-row { display: grid; grid-template-columns: minmax(260px, 1.35fr) minmax(280px, 1fr) 150px 80px; align-items: stretch; gap: 22px; min-height: 98px; padding: 0 24px; border: 1px solid #292929; border-radius: 12px; background: #151515; box-sizing: border-box; }
    .team-member { display: flex; align-items: center; gap: 16px; min-width: 0; }
    .team-member-avatar { width: 48px; height: 48px; border-radius: 50%; background: #2b2b2b; border: 1px solid #474747; color: #d8d8d8; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
    .team-member-info { min-width: 0; }
    .team-member-info strong { display: block; font-size: 16px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .team-member-info small { display: block; color: #d2d2d2; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .team-name-input { width: min(220px, 100%); height: 28px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #f2f2f2; font-size: 16px; font-weight: 900; padding: 0 7px; outline: none; }
    .team-name-input:hover, .team-name-input:focus { border-color: #3a3a3a; background: #101010; }
    .team-self { color: #d8d8d8; font-size: 13px; margin-left: 3px; }
    .team-usage { min-width: 0; color: inherit; font-family: inherit; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; }
    .team-quota-line { width: 260px; max-width: 100%; display: grid; grid-template-columns: 76px minmax(48px, 1fr) auto minmax(56px, 1fr); align-items: center; gap: 8px; }
    .team-quota-period, .team-quota-input { height: 26px; min-width: 0; border: 1px solid #343434; border-radius: 8px; background: #202020; color: #e8e8e8; font-family: inherit; font-size: 12px; font-weight: 800; outline: none; }
    .team-quota-period { padding: 0 6px; cursor: pointer; }
    .team-quota-input { padding: 0 7px; text-align: center; appearance: textfield; }
    .team-quota-input::-webkit-outer-spin-button, .team-quota-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .team-quota-sep { color: #8f8f8f; font-size: 12px; font-weight: 900; text-align: center; }
    .team-quota-readonly { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 26px; color: #d8d8d8; font-size: 13px; font-weight: 900; }
    .team-usage-bar { width: 250px; max-width: 100%; height: 7px; border-radius: 8px; background: #666; overflow: hidden; margin-top: 10px; }
    .team-usage-fill { height: 100%; border-radius: 8px; background: #d8d8d8; }
    .team-role-select { width: 112px; height: 38px; border: 1px solid #3a3a3a; border-radius: 9px; background: #101010; color: #fff; padding: 0 12px; font-weight: 800; outline: none; display: block; align-self: center; }
    .team-role-select:disabled { color: #777; opacity: .7; }
    .team-delete-cell { height: 100%; display: flex; align-items: center; justify-content: center; }
    .team-empty { border: 1px dashed #3a3a3a; border-radius: 12px; padding: 28px; color: #858585; text-align: center; }
    .feature-settings { display: grid; gap: 10px; max-width: 480px; }
    .feature-card { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .feature-card strong { display: block; color: var(--fg); font-size: 14px; margin-bottom: 5px; }
    .feature-card small { color: var(--fg2); font-size: 12px; line-height: 1.45; }
    .feature-switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
    .feature-switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
    .feature-switch span { position: absolute; inset: 0; border-radius: 999px; background: #303030; border: 1px solid #444; transition: .18s; }
    .feature-switch span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; border-radius: 50%; background: #d8d8d8; transition: .18s; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
    .feature-switch input:checked + span { background: #8f8f8f; border-color: #d8d8d8; }
    .feature-switch input:checked + span::after { transform: translateX(20px); background: #fff; }

    .stats-g { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 20px; }
    .stat-c { background: var(--bg); padding: 14px; border-radius: var(--radius); text-align: center; }
    .stat-c .n { font-size: 24px; font-weight: 700; color: var(--accent); }
    .stat-c .l { font-size: 11px; color: var(--fg2); }
    .stats-panel { display: flex; flex-direction: column; gap: 12px; }
    .stats-controls { --stats-dim-col: 16%; width: 50%; max-width: 100%; display: grid; grid-template-columns: var(--stats-dim-col) repeat(6, minmax(0, 1fr)); gap: 0; align-items: end; border: 1px solid var(--border); border-radius: 8px 8px 0 0; border-bottom: 0; background: rgba(0,0,0,.12); padding: 8px 0 7px; }
    .stats-filter { display: grid; grid-template-rows: 14px 30px; gap: 4px; min-width: 0; color: var(--fg2); font-size: 11px; font-weight: 800; box-sizing: border-box; padding: 0 5px; text-align: center; }
    .stats-filter select { width: 100%; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--fg); padding: 0 8px; font-size: 12px; outline: none; text-align: center; text-align-last: center; }
    .stats-filter select:focus { border-color: #555; }
    .stats-table-wrap { border: 1px solid var(--border); border-radius: 0 0 8px 8px; overflow: auto; max-height: 430px; background: rgba(0,0,0,.12); }
    .stats-table { --stats-dim-col: 16%; width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 920px; }
    .stats-table th, .stats-table td { padding: 9px 6px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; text-align: center; vertical-align: middle; }
    .stats-table th { position: sticky; top: 0; background: #1b1b1b; color: var(--fg2); font-weight: 700; z-index: 1; }
    .stats-table th:first-child, .stats-table td:first-child { text-align: center; }
    .stats-table td.num, .stats-table th.num { text-align: center; font-variant-numeric: tabular-nums; }
    .stats-empty { padding: 26px; text-align: center; color: var(--fg2); font-size: 12px; }
    table { width: 100%; border-collapse: collapse; font-size: 12px; }
    th { text-align: left; padding: 6px 10px; border-bottom: 2px solid var(--border); color: var(--fg2); font-weight: 600; }
    td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
    .rb { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; display: inline-block; }
    .rb-sa { background: #f2f2f2; color: #111; }
    .rb-ad { background: #a8a8a8; color: #111; }
    .rb-ed { background: var(--bg3); color: var(--fg2); }

    /* Context menu */
    .ctx { position: fixed; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 0; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 200; min-width: 140px; }
    .ctx div { padding: 8px 16px; cursor: pointer; font-size: 12px; }
    .ctx div:hover { background: var(--bg3); }
    .ctx hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

    /* Canvas corner info */
    .corner-info { position: fixed; top: 12px; left: 14px; display: none; align-items: center; gap: 8px; width: clamp(230px, calc(50vw - 250px), 460px); max-width: calc(100vw - 28px); min-width: 0; z-index: 175; pointer-events: none; color: #f2f2f2; font-size: 12px; font-weight: 700; line-height: 1; overflow: hidden; }
    .corner-info.show { display: flex; }
    .corner-info .context-pill { box-sizing: border-box; height: 28px; min-width: 0; max-width: 180px; padding: 0 9px; border-radius: 7px; border: 1px solid #343434; background: rgba(32,32,32,.94); box-shadow: 0 10px 26px rgba(0,0,0,.32); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; line-height: 1; flex: 1 1 0; }
    .corner-info .context-pill i { width: 13px; height: 13px; color: #bdbdbd; font-size: 12px; flex: 0 0 13px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
    .corner-info .context-pill .label { color: #8f8f8f; font-size: 12px; font-weight: 700; flex: 0 0 auto; line-height: 1; display: inline-flex; align-items: center; }
    .corner-info .context-pill .value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f2f2f2; font-size: 12px; font-weight: 700; line-height: 1; display: inline-block; }
    .workspace-actions { position: fixed; top: 12px; right: 14px; z-index: 175; display: none; align-items: center; gap: 8px; font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; font-size: 12px; line-height: 1; }
    #app.workspace-mode .workspace-actions { display: flex; }
    #app.workspace-mode.right-open .workspace-actions, #app.workspace-mode.right-peek .workspace-actions { right: 14px; }
    #app.startup-mode .workspace-actions { display: none !important; }
    .module-switcher { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 190; display: none; align-items: center; justify-content: center; gap: 6px; max-width: min(430px, calc(100vw - 760px)); min-width: 0; padding: 5px; border: 1px solid #333; border-radius: 18px; background: rgba(32,32,32,.94); box-shadow: 0 12px 34px rgba(0,0,0,.48); }
    .module-switcher button { height: 32px; width: 116px; min-width: 0; border: 1px solid #3a3a3a; border-radius: 16px; background: #242424; color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; font: 800 13px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; cursor: pointer; white-space: nowrap; letter-spacing: 0; overflow: hidden; text-align: center; }
    .module-switcher button:hover { background: #303030; border-color: #5a5a5a; }
    .module-switcher button.active { background: #363636; border-color: #a4a4a4; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .module-switcher i { width: 14px; min-width: 14px; text-align: center; color: #d8d8d8; }
    .module-switcher span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #app.workspace-mode .module-switcher { display: inline-flex; }
    body.ic-teamwork-fixed-open .module-switcher,
    body.ic-teamwork-fixed-open #cornerInfo,
    body.ic-teamwork-fixed-open .corner-info,
    body.ic-teamwork-fixed-open #workspaceActions,
    body.ic-teamwork-fixed-open .workspace-actions,
    body.ic-teamwork-fixed-open .side-reveal,
    body.ic-teamwork-fixed-open #canvasMetro,
    body.ic-teamwork-fixed-open .canvas-metro-stats,
    #app.startup-mode .module-switcher { display: none !important; }
    #app.layer-compose-mode .workspace-actions { display: none !important; }
    body.blocking-map-open #cornerInfo, body.blocking-map-open #workspaceActions { display: none !important; }
    .workspace-action-btn { box-sizing: border-box; height: 32px; min-width: 42px; padding: 0 12px; border: 1px solid #343434; border-radius: 8px; background: rgba(32,32,32,.94); color: #f2f2f2; box-shadow: 0 10px 26px rgba(0,0,0,.32); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-size: 12px; font-weight: 700; line-height: 1; vertical-align: middle; }
    .workspace-action-btn:hover { background: #2a2a2a; border-color: #4a4a4a; }
    .workspace-action-btn i { width: 14px; height: 14px; color: #d0d0d0; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; flex: 0 0 14px; }
    .gen-btn { display: inline-block; margin-top: 6px; padding: 5px 12px; background: #f2f2f2; color: #111; border: none; border-radius: 6px; cursor: pointer; font-size: 11px; }
    .gen-btn:hover { opacity: .9; }

    /* Startup workspace */
    #app.startup-mode #topBar { display: none !important; }
    #app.startup-mode .bar-left { pointer-events: auto; }
    #app.startup-mode .app-title { display: inline-flex; align-items: center; gap: 10px; color: #f5f5f5; background: none; -webkit-text-fill-color: #f5f5f5; font-size: 15px; font-weight: 700; }
    #app.startup-mode .app-title::before { content: ""; width: 22px; height: 22px; border-radius: 9px; background: radial-gradient(circle at 35% 35%, #fff 0 10%, transparent 11%), conic-gradient(from 15deg, #6ee7f9, #8b5cf6, #facc15, #22c55e, #6ee7f9); box-shadow: 0 0 12px rgba(124,58,237,.35); }
    #app.startup-mode .project-info { display: none; }
    #app.startup-mode .bar-right { display: none !important; }
    #app.startup-mode .bar-right .btn-sm { height: 32px; min-width: 62px; border: none; border-radius: 8px; background: rgba(42,42,42,.9); color: #e8e8e8; font-size: 14px; font-weight: 700; padding: 0 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
    #app.startup-mode #leftToolbar { display: none !important; }
    #app.startup-mode .lt-btn { width: 34px; height: 34px; color: #d8d8d8; border-radius: 17px; font-size: 14px; }
    #app.startup-mode .lt-btn.active { background: #f5f5f5; color: #111; }
    #app.startup-mode .lt-sep { display: none; }
    #app.startup-mode #assetTray, #app.startup-mode #rightPanel, #app.startup-mode #zoomBadge, #app.startup-mode #canvasMetro, #app.startup-mode #cornerInfo, #app.startup-mode .startup-window-actions { display: none !important; }

    #app.startup-mode #canvasArea { top: 0; left: 0; right: 0; bottom: 0; background-color: #020202; background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 24px 24px; overflow: hidden; }
    #app.startup-mode #canvasArea canvas, #app.startup-mode #canvasArea .upper-canvas, #app.startup-mode #canvasArea .canvas-container, #app.startup-mode #reactFlowContainer { opacity: 0 !important; pointer-events: none !important; }
    body.ic-teamwork-fixed-open #app { display: block !important; }
    body.ic-teamwork-fixed-open #canvasArea { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100dvh !important; overflow: hidden !important; }
    body.ic-teamwork-fixed-open #app.startup-mode #reactFlowContainer,
    body.ic-teamwork-fixed-open #reactFlowContainer { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100dvh !important; opacity: 1 !important; pointer-events: auto !important; z-index: 500000 !important; }
    #reactFlowContainer { position: absolute; inset: 0; z-index: 1; background: #111; overflow: hidden; }
    .startup-image-card { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); width: 264px; height: 264px; border: 2px solid #6f6f6f; border-radius: 20px; background: #242424; display: flex; align-items: center; justify-content: center; color: #666; font-size: 46px; z-index: 25; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); }
    .startup-image-card::before { content: "Image"; position: absolute; top: -28px; left: 4px; color: #a8a8a8; font-size: 14px; font-weight: 700; }
    .startup-upload-pill { position: absolute; left: 50%; top: calc(47% - 154px); transform: translateX(-50%); height: 34px; padding: 0 16px; border-radius: 18px; background: #252525; border: 1px solid #3a3a3a; color: #f2f2f2; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; z-index: 27; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.35); }
    .startup-upload-pill i { color: #f2f2f2; }
    .startup-side-plus { position: absolute; top: 47%; width: 31px; height: 31px; border-radius: 50%; border: 2px solid #666; color: #d8d8d8; background: #050505; display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; z-index: 26; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 8px 20px rgba(0,0,0,.35); }
    .startup-side-plus.left { left: calc(50% - 185px); }
    .startup-side-plus.right { left: calc(50% + 154px); }
    .startup-composer { position: absolute; left: 50%; bottom: 126px; transform: translateX(-50%); width: 544px; height: 164px; border-radius: 14px; border: 1px solid #3b3b3b; background: #202020; z-index: 30; box-shadow: 0 16px 42px rgba(0,0,0,.45); padding: 12px; display: flex; flex-direction: column; }
    .startup-composer-top { display: flex; align-items: center; gap: 10px; }
    .startup-square-btn { width: 31px; height: 31px; border-radius: 8px; border: 1px solid #444; background: #303030; color: #d7d7d7; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .startup-composer textarea { flex: 1; margin-top: 12px; border: none; outline: none; resize: none; background: transparent; color: #f2f2f2; font-size: 14px; font-family: inherit; }
    .startup-composer textarea::placeholder { color: #777; }
    .startup-composer-bottom { display: flex; align-items: center; gap: 12px; color: #f2f2f2; font-size: 13px; font-weight: 700; }
    .startup-composer-bottom .muted { color: #d8d8d8; }
    .startup-composer-bottom .sep { width: 1px; height: 18px; background: #3b3b3b; }
    .startup-send { margin-left: 0; width: 30px; height: 30px; border-radius: 50%; border: none; background: #9d9d9d; color: #202020; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .startup-spacer { flex: 1; }
    .startup-bottom-controls { position: fixed; left: 14px; bottom: 18px; height: 34px; display: flex; align-items: center; gap: 10px; z-index: 155; }
    .startup-control-pill { height: 34px; border-radius: 17px; background: #202020; border: 1px solid #2d2d2d; display: flex; align-items: center; gap: 12px; padding: 0 12px; color: #e2e2e2; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
    .startup-control-pill input { width: 58px; accent-color: #f4f4f4; }
    .startup-help { width: 34px; height: 34px; border-radius: 50%; background: #202020; border: 1px solid #2d2d2d; color: #e2e2e2; display: flex; align-items: center; justify-content: center; }
    .startup-right { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; background: #1d1d1d; z-index: 120; padding: 28px 28px; display: flex; flex-direction: column; justify-content: flex-end; }
    .startup-window-actions { position: fixed; top: 16px; right: 18px; z-index: 180; display: flex; gap: 18px; color: #777; font-size: 13px; }
    .startup-greeting { margin-bottom: 42px; }
    .startup-greeting .hello { color: #bdbdbd; font-size: 22px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
    .startup-greeting h2 { font-size: 24px; line-height: 1.2; margin: 0; color: #fff; }
    .startup-chips { display: flex; gap: 8px; margin: 40px 0 12px; }
    .startup-chip { height: 26px; padding: 0 14px; border-radius: 9px; background: #282828; border: 1px solid #303030; color: #f1f1f1; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
    .startup-ask-box { height: 86px; border-radius: 14px; background: #242424; border: 1px solid #333; padding: 12px; display: flex; flex-direction: column; }
    .startup-ask-box textarea { flex: 1; background: transparent; border: none; resize: none; outline: none; color: #f2f2f2; font-family: inherit; font-size: 13px; }
    .startup-ask-box textarea::placeholder { color: #7a7a7a; }
    .startup-ask-foot { display: flex; align-items: center; gap: 12px; color: #d0d0d0; font-size: 12px; }
    #app.startup-mode .startup-right { display: none; }
    .startup-shot-picker { --startup-entry-panel-height: 376px; --startup-entry-gap: 16px; --startup-entry-section-gap: clamp(34px, 3.2vw, 58px); --startup-entry-radius: 16px; --startup-entry-card-radius: 12px; --startup-entry-ai-head-offset: 71px; --startup-entry-panel-bg: #202020; --startup-entry-card-bg: #252525; --startup-entry-border: #3b3b3b; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1780px, calc(100vw - 96px)); z-index: 45; display: grid; gap: var(--startup-entry-gap); color: #f2f2f2; }
    .startup-entry-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--startup-entry-section-gap) minmax(0, 1fr) var(--startup-entry-gap) minmax(0, 1fr) var(--startup-entry-gap) minmax(0, 1fr) var(--startup-entry-section-gap) minmax(0, 1fr); align-items: start; column-gap: 0; row-gap: var(--startup-entry-gap); }
    .startup-entry-column { min-width: 0; display: grid; gap: var(--startup-entry-gap); align-content: start; }
    .startup-module-label { min-height: 31px; color: #f2f2f2; font-size: 28px; line-height: 1.1; font-weight: 900; letter-spacing: 0; margin: 0; text-align: center; }
    .startup-module-panel { height: var(--startup-entry-panel-height); min-height: var(--startup-entry-panel-height); border: 1px solid var(--startup-entry-border); border-radius: var(--startup-entry-radius); background: var(--startup-entry-panel-bg); box-shadow: 0 16px 42px rgba(0,0,0,.45); padding: 12px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
    .startup-module-head { height: 31px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #bdbdbd; font-size: 13px; font-weight: 800; min-width: 0; }
    .startup-module-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 1.55; padding-block: 1px; font-weight: 800; }
    .startup-module-head small { color: #9c9c9c; font-size: 12px; font-weight: 800; white-space: nowrap; }
    .startup-module-list { flex: 1; min-height: 0; display: flex; flex-direction: column; align-content: start; gap: 8px; overflow: hidden; }
    .startup-module-stack { min-width: 0; display: grid; gap: 10px; align-content: start; }
    .startup-module-item { width: 100%; min-width: 0; min-height: 70px; border: 1px solid #353535; border-radius: var(--startup-entry-card-radius); background: var(--startup-entry-card-bg); color: #f2f2f2; padding: 12px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px; cursor: pointer; text-align: left; font: inherit; opacity: .72; transition: transform .18s ease, opacity .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
    .startup-module-item:hover { border-color: #666; background: #2e2e2e; opacity: .9; }
    .startup-module-item.active { border-color: #a4a4a4; background: #363636; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 14px 28px rgba(0,0,0,.28); opacity: 1; }
    .startup-module-thumb { width: 48px; height: 38px; border: 1px solid #444; border-radius: 10px; background: #303030; display: grid; place-items: center; color: #d7d7d7; font-size: 12px; font-weight: 900; overflow: hidden; }
    .startup-module-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .startup-module-copy { min-width: 0; display: grid; gap: 4px; }
    .startup-module-copy strong, .startup-module-copy small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
    .startup-module-copy strong { color: #f2f2f2; font-size: 15px; line-height: 1.2; }
    .startup-module-copy small { color: #9c9c9c; font-size: 12px; line-height: 1.35; }
    .startup-module-action { width: 100%; height: 34px; min-height: 34px; border-radius: 18px; border: 1px solid #3a3a3a; background: #242424; color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; font: 800 13px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.28); }
    .startup-module-action:hover { background: #303030; border-color: #5a5a5a; }
    .startup-module-grid-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .startup-reference-tile { aspect-ratio: 1 / .72; border: 1px solid #353535; border-radius: 12px; background: #252525; overflow: hidden; display: grid; place-items: center; color: #9c9c9c; font: 900 12px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; cursor: pointer; padding: 0; opacity: .72; transition: transform .18s ease, opacity .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
    .startup-reference-tile:hover { border-color: #666; background: #2e2e2e; opacity: .9; }
    .startup-reference-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .startup-reference-query { min-height: 70px; border: 1px solid #353535; border-radius: var(--startup-entry-card-radius); background: var(--startup-entry-card-bg); padding: 12px; color: #9c9c9c; font-size: 12px; line-height: 1.45; overflow: hidden; }
    .startup-reference-query strong { display: block; margin-bottom: 7px; color: #f2f2f2; font-size: 15px; line-height: 1.2; }
    .startup-teamwork-entry .startup-module-panel,
    .startup-reference-entry .startup-module-panel { margin-top: var(--startup-entry-ai-head-offset); }
    .startup-teamwork-entry { grid-column: 1; }
    /* Teamwork 入口结构与「参考检索」一致（信息框 + 进入按钮 + 预览网格），内容顶部排列 */
    .startup-ai-entry { min-width: 0; display: grid; grid-column: 3 / 8; gap: var(--startup-entry-gap); }
    .startup-reference-entry { grid-column: 9; }
    .startup-ai-entry .startup-module-label { text-align: center; }
    .startup-shot-picker.module-entry-mode .startup-ai-entry { grid-column: 5; }
    .startup-shot-picker.module-entry-mode .startup-ai-entry .startup-shot-head,
    .startup-shot-picker.module-entry-mode .startup-ai-entry .startup-selector-grid,
    .startup-shot-picker.module-entry-mode .startup-ai-entry .startup-selection-bar { display: none !important; }
    /* CANVAS PATCH: hide AI-canvas bottom selection bar (请选择项目/进入画布) per request */
    .startup-shot-picker .startup-ai-entry .startup-selection-bar { display: none !important; }
    .startup-shot-picker:not(.module-entry-mode) .startup-canvas-entry-card { display: none !important; }
    .startup-canvas-entry-card { height: var(--startup-entry-panel-height); min-height: var(--startup-entry-panel-height); border: 1px solid var(--startup-entry-border); border-radius: var(--startup-entry-radius); background: var(--startup-entry-panel-bg); box-shadow: 0 16px 42px rgba(0,0,0,.45); padding: 18px; overflow: hidden; display: grid; align-content: center; justify-items: center; gap: 16px; color: #f2f2f2; text-align: center; cursor: pointer; font: inherit; }
    .startup-canvas-entry-card:hover { border-color: #666; background: #2b2b2b; }
    .startup-canvas-entry-icon { width: 62px; height: 62px; border-radius: 18px; border: 1px solid #444; background: #303030; display: grid; place-items: center; color: #f2f2f2; font-size: 25px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
    .startup-canvas-entry-copy { min-width: 0; display: grid; gap: 8px; justify-items: center; }
    .startup-canvas-entry-copy strong { font-size: 18px; line-height: 1.2; color: #fff; }
    .startup-canvas-entry-copy small { max-width: 220px; color: #9c9c9c; font-size: 12px; line-height: 1.45; }
    .startup-shot-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 18px; }
    .startup-shot-head > div:first-child { min-width: 0; justify-self: start; text-align: left; }
    .startup-shot-kicker { color: #8f8f8f; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
    .startup-shot-title { font-size: 28px; line-height: 1.1; margin: 0; letter-spacing: 0; }
    .startup-shot-actions { display: inline-flex; justify-content: flex-end; align-items: center; gap: 10px; justify-self: end; }
    /* 项目/场次/镜头的新建·编辑·删除统一收口到 Teamwork：画布侧所有结构管理入口一律隐藏。 */
    .startup-structure-action { display: none !important; }
    .startup-shot-actions:empty { display: none !important; }
    .startup-pill-btn { height: 34px; border-radius: 18px; border: 1px solid #3a3a3a; background: #242424; color: #f2f2f2; padding: 0 15px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.28); }
    .startup-pill-btn:hover { background: #303030; border-color: #5a5a5a; }
    .startup-selector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--startup-entry-gap); }
    .startup-selector-col { height: var(--startup-entry-panel-height); min-height: var(--startup-entry-panel-height); border: 1px solid var(--startup-entry-border); border-radius: var(--startup-entry-radius); background: var(--startup-entry-panel-bg); box-shadow: 0 16px 42px rgba(0,0,0,.45); padding: 12px; overflow: hidden; display: flex; flex-direction: column; overscroll-behavior: contain; }
    .startup-col-title { height: 31px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; color: #bdbdbd; font-size: 13px; font-weight: 800; margin-bottom: 10px; }
    .startup-col-title > span:first-child:not(.startup-title-tools) { min-width: 0; display: inline-flex; align-items: center; justify-self: start; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .startup-title-tools { min-width: max-content; display: inline-flex; align-items: center; justify-content: flex-end; justify-self: end; gap: 6px; }
    .startup-col-title > .startup-sort-toggle { justify-self: end; }
    .startup-col-title-restored { height: 52px; align-items: stretch; gap: 10px; margin-bottom: 8px; }
    .startup-col-title-restored .startup-col-main { min-width: 0; display: grid; gap: 5px; align-content: center; justify-self: start; }
    .startup-col-title-restored .startup-col-name { min-width: 0; display: inline-flex; align-items: center; gap: 7px; color: #d8d8d8; }
    .startup-col-title-restored .startup-col-name b { font-size: 13px; line-height: 1; color: #f1f1f1; }
    .startup-col-title-restored .startup-col-name em { min-width: 0; padding: 3px 7px; border: 1px solid #3f3f3f; border-radius: 8px; background: #2d2d2d; color: #b8b8b8; font-style: normal; font-size: 11px; line-height: 1; white-space: nowrap; }
    .startup-col-title-restored .startup-col-main small { display: block; max-width: 140px; color: #8f8f8f; font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .startup-col-title-restored .startup-title-tools { align-items: center; gap: 5px; }
    .startup-sort-toggle { height: 25px; min-width: 56px; max-width: 76px; border: 1px solid #444; border-radius: 8px; background: #303030; color: #d7d7d7; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; cursor: pointer; font-size: 11px; font-weight: 900; line-height: 1; white-space: nowrap; }
    .startup-sort-toggle:hover { background: #3a3a3a; color: #fff; border-color: #666; }
    .startup-sort-toggle i { font-size: 11px; }
    .startup-mini-btn { width: 31px; height: 31px; border-radius: 9px; border: 1px solid #444; background: #303030; color: #d7d7d7; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .startup-mini-btn:hover { background: #3a3a3a; color: #fff; }
    .startup-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overflow-x: hidden; padding: 126px 14px; scroll-behavior: smooth; scroll-snap-type: y mandatory; scroll-padding-block: 126px; overscroll-behavior: contain; touch-action: pan-y; }
    .startup-list::-webkit-scrollbar { width: 0; }
    .startup-list::-webkit-scrollbar-thumb { background: transparent; }
    .startup-select-card { width: 100%; flex: 0 0 auto; box-sizing: border-box; min-height: 70px; border: 1px solid #353535; border-radius: var(--startup-entry-card-radius); background: var(--startup-entry-card-bg); color: #f2f2f2; padding: 12px; text-align: left; cursor: pointer; transition: opacity .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; transform-origin: center; opacity: .72; scroll-snap-align: center; display: block; justify-content: flex-start; align-items: stretch; }
    .startup-select-card { display: block !important; align-items: initial !important; justify-content: initial !important; text-align: left !important; line-height: normal !important; }
    .startup-select-card:hover { border-color: #666; background: #2e2e2e; }
    .startup-select-card.active { border-color: #a4a4a4; background: #363636; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 14px 28px rgba(0,0,0,.28); transform: none; opacity: 1; z-index: 2; }
    .startup-select-card strong { display: block; width: 100%; font-size: 15px; line-height: 1.2; margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; justify-content: flex-start; }
    .startup-select-card small { color: #9c9c9c; font-size: 12px; line-height: 1.35; display: block; width: 100%; text-align: left; justify-content: flex-start; }
    .startup-card-main { min-width: 0; display: block; text-align: left; }
    .startup-card-main, .startup-card-main strong, .startup-card-main small, .startup-select-card > strong, .startup-select-card > small { text-align: left !important; justify-content: flex-start !important; align-items: flex-start !important; }
    .startup-card-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; justify-items: stretch; gap: 8px; width: 100%; text-align: left; }
    .startup-card-actions { display: inline-flex; gap: 4px; opacity: .72; }
    .startup-select-card:hover .startup-card-actions, .startup-select-card.active .startup-card-actions { opacity: 1; }
    .startup-icon-btn { width: 24px; height: 24px; border: 1px solid #444; border-radius: 7px; background: #303030; color: #d4d4d4; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; font-size: 11px; }
    .startup-icon-btn:hover { background: #3a3a3a; color: #fff; border-color: #666; }
    .startup-icon-btn .startup-action-glyph { position: relative; width: 13px; height: 13px; display: inline-block; flex: 0 0 13px; color: currentColor; }
    .startup-icon-btn .startup-action-glyph.edit::before { content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 3px; border-radius: 2px; background: currentColor; transform: rotate(-42deg); transform-origin: center; }
    .startup-icon-btn .startup-action-glyph.edit::after { content: ""; position: absolute; left: 1px; top: 10px; width: 4px; height: 2px; border-radius: 1px; background: currentColor; transform: rotate(-42deg); opacity: .75; }
    .startup-icon-btn .startup-action-glyph.delete::before { content: ""; position: absolute; left: 2px; top: 6px; width: 9px; height: 2px; border-radius: 2px; background: currentColor; }
    .startup-module-item:focus-visible,
    .startup-module-action:focus-visible,
    .startup-reference-tile:focus-visible,
    .startup-icon-btn:focus-visible,
    .startup-mini-btn:focus-visible,
    .startup-sort-toggle:focus-visible,
    .startup-select-card:focus-visible,
    .startup-pill-btn:focus-visible,
    .asset-result-item:focus-visible,
    .asset-folder-row:focus-visible,
    .asset-context-menu button:focus-visible,
    .asset-view-switch button:focus-visible,
    .asset-back:focus-visible,
    .asset-add:focus-visible,
    .asset-fav:focus-visible { outline: 2px solid rgba(255,255,255,.82); outline-offset: 2px; }
    .startup-icon-btn.danger:hover { background: #4a2020; border-color: #7a3838; color: #fff; }
    .startup-shot-card { min-height: 70px; display: grid !important; grid-template-columns: 1fr; align-items: center; justify-content: stretch !important; gap: 12px; text-align: left !important; }
    .startup-shot-card .shot-code { font-size: 20px; font-weight: 900; letter-spacing: 0; text-align: left !important; }
    .shot-batch-box { border: 1px solid #3b3b3b; border-radius: 16px; background: #202020; box-shadow: 0 16px 42px rgba(0,0,0,.45); overflow: hidden; color: #f2f2f2; }
    .shot-batch-title { height: 48px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #343434; color: #f2f2f2; font-size: 13px; font-weight: 900; }
    .shot-batch-title button { border: none; background: transparent; color: #9c9c9c; font-size: 20px; cursor: pointer; }
    .shot-batch-title button:hover { color: #fff; }
    .shot-batch-body { display: grid; gap: 16px; padding: 24px; background: #202020; }
    .shot-batch-row { display: grid; grid-template-columns: 94px 1fr; align-items: center; gap: 12px; }
    .shot-batch-row label { color: #bdbdbd; font-size: 13px; font-weight: 800; }
    .shot-batch-row label span { color: #d8d8d8; }
    .shot-batch-row input { height: 34px; border: 1px solid #353535; border-radius: 9px; background: #252525; color: #f2f2f2; padding: 0 14px; outline: none; font-family: inherit; font-size: 13px; }
    .shot-batch-row input:focus { border-color: #666; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .shot-batch-row input::placeholder { color: #858585; }
    .project-path-box { display: grid; gap: 8px; min-width: 0; }
    .project-path-link { width: fit-content; padding: 0; border: 0; background: transparent; color: #f2f2f2; font: 800 13px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
    .project-path-link:hover { color: #fff; }
    .project-path-panel { display: none; gap: 8px; }
    .project-path-panel.show { display: grid; }
    .project-path-inputline { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
    .project-path-pick { height: 34px; padding: 0 12px; border: 1px solid #3f3f3f; border-radius: 9px; background: #2a2a2a; color: #f2f2f2; font: 800 12px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; cursor: pointer; white-space: nowrap; }
    .project-path-pick:hover { border-color: #666; background: #343434; }
    .project-path-hint { color: #8f8f8f; font-size: 11px; line-height: 1.45; }
    .shot-batch-footer { height: 56px; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; border-top: 1px solid #343434; background: #202020; }
    .shot-confirm { height: 34px; min-width: 72px; border: 1px solid #3a3a3a; border-radius: 18px; background: #242424; color: #f2f2f2; padding: 0 16px; font-size: 13px; font-weight: 900; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.28); }
    .shot-confirm:hover { background: #303030; border-color: #5a5a5a; }
    .startup-empty { flex: 1; min-height: 140px; border: 1px dashed #444; border-radius: 14px; color: #858585; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; padding: 18px; }
    /* CANVAS PATCH: empty Teamwork card — center the 进入Teamwork button vertically inside the dashed area */
    .startup-empty.startup-empty--cta { flex-direction: column; gap: 16px; }
    .startup-empty.startup-empty--cta .startup-empty-hint { color: #858585; font-size: 13px; }
    .startup-empty.startup-empty--cta .startup-module-action { width: auto; min-width: 200px; }
    .startup-selection-bar { width: min(700px, 100%); justify-self: center; min-height: 74px; border: 1px solid #3b3b3b; border-radius: 16px; background: #202020; display: flex; align-items: center; gap: 12px; padding: 12px; box-shadow: 0 16px 42px rgba(0,0,0,.45); }
    .startup-selection-icon { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #444; background: #303030; color: #d7d7d7; display: flex; align-items: center; justify-content: center; }
    .startup-selection-text { flex: 1; min-width: 0; }
    .startup-selection-text strong { display: block; font-size: 14px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .startup-selection-text span { color: #8f8f8f; font-size: 12px; }
    .side-reveal { display: none; position: fixed; top: 50vh; transform: translateY(-50%); width: 36px; height: 54px; padding: 0; border: 1px solid #383838; background: #202020; color: #e7e7e7; z-index: 220; cursor: pointer; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(0,0,0,.45); line-height: 1; transition: opacity .14s ease, transform .18s ease, border-color .14s ease, box-shadow .14s ease; }
    .side-reveal.left { left: 0; border-radius: 0 18px 18px 0; }
    .side-reveal.right { right: 0; border-radius: 18px 0 0 18px; }
    .side-reveal i { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; line-height: 1; font-size: 14px; }
    #app.workspace-mode .side-reveal.left { top: 50vh; right: auto; left: 0; width: 36px; height: 54px; transform: translateY(-50%); border-radius: 0 18px 18px 0; border-color: #383838; background: #202020; box-shadow: 0 10px 30px rgba(0,0,0,.45); z-index: 220; }
    #app.workspace-mode #topBar { display: none; }
    #app.workspace-mode #canvasArea { top: 0; left: 0; right: 0; bottom: 0; background: #020202; background-image: none; }
    #app.startup-mode .startup-bottom-controls { display: none !important; }
    #app.workspace-mode .startup-image-card, #app.workspace-mode .startup-upload-pill, #app.workspace-mode .startup-side-plus, #app.workspace-mode .startup-composer, #app.workspace-mode .startup-shot-picker, #app.workspace-mode .startup-right, #app.workspace-mode .startup-window-actions, #app.workspace-mode .startup-bottom-controls { display: none !important; }
    #app.workspace-mode #leftToolbar { display: flex !important; left: -52px; }
    #app.workspace-mode:has(.side-reveal.left:hover) #leftToolbar,
    #app.workspace-mode #leftToolbar:hover,
    #app.workspace-mode.left-peek #leftToolbar,
    #app.workspace-mode.left-open #leftToolbar { left: 0; box-shadow: 10px 0 28px rgba(0,0,0,.35); }
    #app.workspace-mode #rightPanel { display: block !important; top: auto; bottom: 14px; right: -500px; width: 468px; height: min(50vh, calc(100vh - 390px)); min-height: 322px; max-width: calc(100vw - 28px); transition: right .22s ease, transform .22s ease, opacity .18s ease; z-index: 180; background: #171717; border: 1px solid #3a3a3a; border-radius: 16px; box-shadow: 0 18px 58px rgba(0,0,0,.58); overflow: hidden; opacity: 0; }
    #app.workspace-mode.right-peek #rightPanel, #app.workspace-mode.right-open #rightPanel { right: 58px; opacity: 1; }
    #app.workspace-mode #rightPanel .rp-header { display: none; }
    #app.workspace-mode #rightPanel .rp-body { height: 100%; padding: 14px; overflow: hidden; }
    #app.workspace-mode #rightPanel .agent-dock-close { display: inline-flex; }
    #app.workspace-mode.right-open .side-reveal.right { display: flex; border-color: #8f8f8f; box-shadow: 0 0 0 2px rgba(255,255,255,.14), 0 10px 30px rgba(0,0,0,.45); }
    #app.workspace-mode #canvasArea.right-open { right: 0; }
    #app.workspace-mode .side-reveal { display: flex; }
    /* startup 入口页不显示画布边缘浮动按钮：汉堡（左侧菜单）/ Agent 只属于无限画布 workspace */
    #app.startup-mode .side-reveal,
    #app.startup-mode .side-reveal.left,
    #app.startup-mode .side-reveal.right { display: none !important; }
    #app.workspace-mode.left-peek .side-reveal.left,
    #app.workspace-mode.left-open .side-reveal.left,
    #app.workspace-mode #leftToolbar:hover ~ .side-reveal.left { opacity: 0; pointer-events: none; transform: translate(-12px, -50%); }

    /* UI10 P3 · A + S2 left-rail skin. Visuals only: the existing reveal,
       hover, pin, bridge and keyboard contracts above remain the sole behavior
       source. Keep the uiv2 scope so ?uiv2=0 still restores the legacy skin. */
    body.ic-uiv2-canvas-on #app.workspace-mode #leftToolbar {
      background: color-mix(in srgb, var(--ui-bg) 94%, transparent) !important;
      border-right-color: var(--ui-border) !important;
      border-radius: 0 calc(var(--ui-radius) + 2px) calc(var(--ui-radius) + 2px) 0 !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }
    body.ic-uiv2-canvas-on #app.workspace-mode #leftToolbar .lt-btn {
      background: transparent !important;
      border-color: transparent !important;
      border-radius: var(--ui-radius) !important;
      color: var(--ui-muted) !important;
      box-shadow: none !important;
    }
    body.ic-uiv2-canvas-on #app.workspace-mode #leftToolbar .lt-btn:hover {
      background: var(--ui-hover) !important;
      border-color: transparent !important;
      color: var(--ui-text) !important;
    }
    body.ic-uiv2-canvas-on #app.workspace-mode #leftToolbar .lt-btn.active {
      background: var(--ui-active) !important;
      border-color: transparent !important;
      color: var(--ui-text-strong) !important;
      box-shadow: none !important;
    }
    body.ic-uiv2-canvas-on #app.workspace-mode #leftToolbar .lt-sep {
      background: var(--ui-border) !important;
    }
    body.ic-uiv2-canvas-on #app.workspace-mode .side-reveal.left {
      background: var(--ui-toolbar-bg) !important;
      border-color: var(--ui-border) !important;
      border-radius: 0 calc(var(--ui-radius) + 2px) calc(var(--ui-radius) + 2px) 0 !important;
      color: var(--ui-text) !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }
    #app.workspace-mode.right-open .side-reveal.right { display: flex; }

    body.ic-teamwork-fixed-open .side-reveal,
    body.ic-teamwork-fixed-open #app.workspace-mode .side-reveal,
    body.ic-teamwork-fixed-open #app.workspace-mode .side-reveal.left,
    body.ic-teamwork-fixed-open #app.workspace-mode .side-reveal.right,
    body.ic-teamwork-fixed-open #app.workspace-mode.right-open .side-reveal.right,
    body.ic-teamwork-fixed-open #canvasMetro,
    body.ic-teamwork-fixed-open .canvas-metro-stats { display: none !important; }

    @media (max-width: 1320px) {
      .module-switcher {
        max-width: 168px;
      }

      .module-switcher button {
        width: 46px;
        padding: 0;
      }

      .module-switcher span {
        display: none;
      }
    }

    @media (max-width: 1240px) {
      .startup-shot-picker { width: min(1180px, calc(100vw - 56px)); top: 52%; max-height: calc(100vh - 36px); overflow: auto; }
      .startup-entry-layout { grid-template-columns: 1fr; gap: 18px; align-items: stretch; }
      .startup-entry-column.startup-ai-entry { grid-column: auto; order: 1; }
      .startup-entry-column.startup-teamwork-entry { grid-column: auto; order: 2; }
      .startup-entry-column.startup-reference-entry { grid-column: auto; order: 3; }
      .startup-teamwork-entry .startup-module-panel,
      .startup-reference-entry .startup-module-panel { margin-top: 0; }
      .startup-module-panel { height: auto; min-height: 220px; }
      .startup-canvas-entry-card { height: auto; min-height: 220px; }
      .startup-teamwork-entry .startup-module-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .startup-teamwork-entry .startup-module-action { grid-column: 1 / -1; }
      .startup-reference-entry .startup-module-list { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); align-items: start; }
      .startup-shot-picker.module-entry-mode .startup-ai-entry { grid-column: auto; }
    }

    @media (max-width: 760px) {
      .startup-shot-picker { width: calc(100vw - 28px); top: 50%; max-height: calc(100vh - 36px); overflow: auto; }
      .startup-selector-grid { grid-template-columns: 1fr; }
      .startup-selector-col { height: 220px; min-height: 220px; }
      .startup-list { padding-block: 54px; scroll-padding-block: 54px; }
      .startup-shot-head { grid-template-columns: 1fr; align-items: stretch; }
      .startup-shot-head, .startup-selection-bar { align-items: stretch; flex-direction: column; }
      .startup-shot-actions { flex-wrap: wrap; }
      .startup-teamwork-entry .startup-module-list,
      .startup-reference-entry .startup-module-list { grid-template-columns: 1fr; }
    }

    /* Context Menu - Canvas Style */
    .context-menu { position: fixed; background: #1c1c1c; border: 1px solid #3f3f3f; border-radius: 14px; padding: 10px 5px; box-shadow: 0 16px 44px rgba(0,0,0,0.45); z-index: 99999; width: 240px; backdrop-filter: none; -webkit-backdrop-filter: none; animation: ctxFadeIn 0.12s ease-out; overflow: hidden; }
    @keyframes ctxFadeIn { from { opacity: 0; transform: scale(0.95) translateY(-4px); } to { opacity: 1; transform: scale(1) translateY(0); } }
    .context-menu div { min-height: 44px; padding: 0 12px; cursor: pointer; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 14px; transition: background 0.1s; color: #f5f5f5; letter-spacing: 0; border-radius: 9px; }
    .context-menu div i { display: none; }
    .context-menu div:hover { background: #303030; color: #fff; }
    .context-menu hr { border: none; border-top: 1px solid #3c3c3c; margin: 6px 0; }
    .context-menu .ctx-shortcut { margin-left: auto; color: #8e8e8e; font-size: 14px; font-weight: 400; }

    /* Selection Bar */
    .sel-bar { display: none !important; }
    .sel-bar span { font-size: 11px; color: var(--fg2); margin-right: 8px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sel-bar button { background: transparent; border: none; color: var(--fg2); padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 4px; }
    .sel-bar button:hover { color: var(--accent); background: rgba(124,58,237,0.15); }



    .iep-flow-close { display: none; position: absolute; top: -38px; right: 2px; z-index: 8; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(18,18,18,.76); color: #f2f2f2; cursor: pointer; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(0,0,0,.32); }
    .iep-flow-close:hover { background: rgba(48,48,48,.92); border-color: rgba(255,255,255,.28); }









    .iep-preview { display: none; }









    .video-flow-model-control, .video-flow-settings-btn, .video-flow-ref, .video-flow-meta, .video-flow-mic, .video-flow-count-select, .video-flow-settings { display: none; }









    .video-flow-top-actions { display: none; align-items: center; gap: 8px; min-height: 34px; margin: 0 0 10px; padding: 0 12px; box-sizing: border-box; overflow: hidden; }

    .video-flow-frame-pair { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; }
    .video-flow-frame-mini { width: 42px; height: 42px; border-radius: 10px; border: 1px solid #444; background: #303030; color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; overflow: hidden; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
    .video-flow-frame-mini:hover { background: #3a3a3a; border-color: #666; }
    .video-flow-frame-mini img, .video-flow-frame-mini video { width: 100%; height: 100%; object-fit: cover; display: block; }
    .video-flow-frame-mini.empty::before, .video-flow-frame-mini.empty::after { content: ""; position: absolute; left: 50%; top: 50%; width: 17px; height: 2px; border-radius: 2px; background: #f5f5f5; transform: translate(-50%, -50%); pointer-events: none; }
    .video-flow-frame-mini.empty::after { width: 2px; height: 17px; }
    .video-flow-frame-arrow-mini { color: #898989; font-size: 14px; flex: 0 0 auto; }
    .video-flow-ref-mini-group { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
    .video-flow-ref-mini-group .ref-count { position: absolute; right: -5px; top: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #5aa0ff; color: #fff; font-size: 10px; font-weight: 900; line-height: 16px; box-shadow: 0 0 0 2px #202020; }
    .video-flow-add-btn { height: 34px; min-width: 112px; padding: 0 11px; border: 1px solid #444; border-radius: 9px; background: #303030; color: #e8e8e8; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 800; cursor: pointer; position: relative; overflow: visible; }
    .video-flow-add-btn:hover { background: #3a3a3a; border-color: #666; color: #fff; }
    .video-flow-add-btn img, .video-flow-add-btn video { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; background: #111; flex: 0 0 22px; }
    .video-flow-add-btn.empty { min-width: 142px; border-style: dashed; }
    .video-flow-add-btn i { font-size: 12px; }
    .video-flow-add-btn.empty i { display: none; }
    .video-flow-add-btn.empty::before, .video-flow-add-btn.empty::after { content: ""; position: absolute; left: 18px; top: 50%; width: 15px; height: 2px; border-radius: 2px; background: #f5f5f5; transform: translate(-50%, -50%); pointer-events: none; }
    .video-flow-add-btn.empty::after { width: 2px; height: 15px; }
    .video-flow-add-btn.empty span:first-of-type { padding-left: 16px; }
    .video-flow-add-btn .ref-count { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #5aa0ff; color: #fff; font-size: 10px; font-weight: 900; line-height: 16px; }
    .video-flow-play { width: 50px; height: 50px; border-radius: 12px; border: 4px solid #505050; color: #555; display: flex; align-items: center; justify-content: center; font-size: 20px; }
    .video-flow-play i { transform: translateX(2px); }
    .video-flow-result { position: relative; width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: #111; }
    .video-flow-result video { width: 100%; height: 100%; display: block; object-fit: contain; background: #111; border-radius: inherit; }
    .video-flow-result .video-result-badge { position: absolute; left: 12px; top: 10px; max-width: calc(100% - 24px); height: 24px; padding: 0 9px; border-radius: 8px; background: rgba(16,16,16,.72); color: #f5f5f5; font-size: 12px; font-weight: 800; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); pointer-events: none; }
    .video-flow-loading { position: relative; width: 100%; height: 100%; min-height: 240px; border-radius: 20px; overflow: hidden; background-color: #171717; background-image: radial-gradient(circle, rgba(255,255,255,.18) 1px, transparent 1.5px); background-size: 18px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #e8e8e8; }
    .video-flow-loading::before { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.03) 44%, rgba(155,196,255,.34) 50%, rgba(255,255,255,.04) 58%, transparent 66%); transform: translateX(-42%); animation: videoFlowSweep 4.8s ease-in-out infinite; }
    .video-flow-loading > * { position: relative; z-index: 1; }
    .video-flow-loading .label { font-size: 13px; font-weight: 800; color: #f2f2f2; display: inline-flex; align-items: center; gap: 8px; }
    .video-flow-loading .elapsed { font-size: 22px; font-weight: 900; letter-spacing: 0; color: #fff; text-shadow: 0 0 18px rgba(255,255,255,.26); }
    .video-flow-loading .hint { font-size: 12px; color: #9d9d9d; }
    @keyframes videoFlowSweep { 0% { transform: translateX(-48%); opacity: .25; } 45% { opacity: 1; } 100% { transform: translateX(48%); opacity: .25; } }































    .video-frame-slot { position: relative; width: 34px; height: 34px; border-radius: 9px; border: 1px solid #454545; background: #303030; color: #d7d7d7; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; flex: 0 0 auto; }
    .video-frame-slot.empty { border-style: solid; background: #343434; }
    .video-frame-slot:hover { background: #3a3a3a; border-color: #666; color: #fff; }
    .video-frame-slot.empty > i { display: none; }
    .video-frame-slot.empty::before, .video-frame-slot.empty::after { content: ""; position: absolute; left: 50%; top: 50%; width: 17px; height: 2px; border-radius: 2px; background: #f5f5f5; transform: translate(-50%, -50%); pointer-events: none; }
    .video-frame-slot.empty::after { width: 2px; height: 17px; }
    .video-frame-slot .frame-badge { position: absolute; left: 3px; bottom: 3px; height: 13px; min-width: 13px; padding: 0 3px; border-radius: 7px; background: rgba(0,0,0,.62); color: #fff; font-size: 9px; font-weight: 900; line-height: 13px; pointer-events: none; }
    .video-frame-arrow { width: 14px; height: 1px; background: rgba(255,255,255,.22); position: relative; flex: 0 0 14px; }
    .video-frame-arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 5px solid rgba(255,255,255,.32); border-top: 3px solid transparent; border-bottom: 3px solid transparent; }








    .video-flow-settings-btn, .video-flow-mic { height: 32px; min-width: 32px; border: 0; border-radius: 10px; background: transparent; color: #dedede; align-items: center; justify-content: center; cursor: pointer; }
    .video-flow-settings-btn:hover, .video-flow-mic:hover { background: #313131; }


































    .video-flow-config-popover { display: none; position: absolute; right: 0; bottom: calc(100% + 10px); width: 430px; padding: 14px 14px 16px; border-radius: 14px; background: rgba(48,48,48,0.97); border: none; box-shadow: 0 18px 46px rgba(0,0,0,.55); color: #eaeaea; z-index: 100020; }

    .video-flow-model-card { height: 62px; padding: 10px 34px 9px 12px; border-radius: 11px; background: #444; color: #f3f3f3; position: relative; box-sizing: border-box; cursor: pointer; }
    .video-flow-model-card div { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
    .video-flow-model-card strong { font-size: 14px; }
    .video-flow-model-card span { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; background: #3d3d3d; color: #bdbdbd; font-size: 11px; margin-right: 4px; }
    .video-flow-model-card > i { position: absolute; right: 14px; top: 20px; color: #fff; font-size: 13px; }
    .video-flow-config-label { margin: 10px 0 8px; color: #8c8c8c; font-size: 13px; }
    .video-flow-segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; min-height: 38px; padding: 3px; border-radius: 11px; background: #3b3b3b; }
    .video-flow-segment button { border: 0; border-radius: 9px; background: transparent; color: #898989; font-weight: 700; cursor: pointer; }
    .video-flow-segment button.active { background: #505050; color: #fff; }
    .video-flow-segment button.primary.active { outline: 2px solid #fff; outline-offset: -1px; background: #4a4a4a; }
    .video-flow-ratio-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; min-height: 48px; padding: 4px; border-radius: 11px; background: #3b3b3b; }
    .video-flow-ratio-grid button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: #8f8f8f; display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; }
    .video-flow-ratio-grid button.active { background: #515151; color: #fff; }
    .video-flow-ratio-icon { display: block; width: 16px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; }
    .video-flow-ratio-icon.r43 { width: 14px; height: 11px; }
    .video-flow-ratio-icon.r11 { width: 12px; height: 12px; }
    .video-flow-ratio-icon.r34 { width: 11px; height: 15px; }
    .video-flow-ratio-icon.r916 { width: 9px; height: 16px; }
    .video-flow-ratio-icon.r219 { width: 20px; height: 7px; }
    .video-flow-duration { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; min-height: 42px; padding: 4px; border-radius: 11px; background: #3b3b3b; box-sizing: border-box; }
    .video-flow-duration button { min-width: 0; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #858585; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; touch-action: manipulation; }
    .video-flow-duration button:hover { background: #464646; color: #dcdcdc; }
    .video-flow-duration button.active { background: #595959; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .video-flow-duration button:focus-visible { outline: 2px solid #d8d8d8; outline-offset: 2px; }
    .video-flow-duration-select { display: none !important; }
    .video-flow-duration-slider { display: grid; gap: 7px; min-height: 58px; padding: 9px 10px 10px; border: 1px solid rgba(255,255,255,.06); border-radius: 11px; background: #3b3b3b; box-sizing: border-box; }
    .video-flow-duration-readout { display: flex; align-items: center; justify-content: space-between; color: #8f8f8f; font-size: 12px; font-weight: 800; }
    .video-flow-duration-readout strong { color: #fff; font-size: 14px; font-weight: 900; }
    .video-flow-duration-track { display: block; min-width: 0; }
    .video-flow-duration-track input[type="range"] { width: 100%; height: 18px; margin: 0; accent-color: #8f8f8f; cursor: pointer; }
    .video-flow-duration-scale { display: flex; justify-content: space-between; color: #777; font-size: 10px; font-weight: 800; }
    .video-flow-duration-scale span.active { color: #fff; }
    #videoFlowAudioBtns { margin-bottom: 2px; }
    .video-flow-config-popover .video-flow-config-label:last-of-type { margin-top: 14px; }
    .iep-flow-link { position: fixed; inset: 0; display: none; width: 100vw; height: 100vh; z-index: 99997; pointer-events: none; overflow: visible; }
    .iep-flow-link path { fill: none; stroke: rgba(176,183,192,.72); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(0,0,0,.28)); }
    .iep-flow-link circle { fill: rgba(176,183,192,.92); stroke: rgba(255,255,255,.62); stroke-width: 1.2; }
    .iep-header { display: grid; grid-template-columns: auto auto auto auto auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 0; border-bottom: none; min-height: 40px; }
    .iep-header span { width: 38px; height: 38px; border-radius: 9px; border: 1px solid #444; background: #303030; color: #d7d7d7; display: flex; align-items: center; justify-content: center; font-size: 0; cursor: pointer; }
    .iep-header span.focus-pick-active { border-color: #d8d8d8; color: #fff; box-shadow: none; }
    .iep-header span i { color: #d7d7d7; font-size: 14px; }
    .iep-header button { width: 34px; height: 34px; background: transparent; border: none; color: #d7d7d7; cursor: pointer; font-size: 13px; padding: 0; border-radius: 8px; justify-self: end; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
    .iep-header button.iep-compose-btn, .iep-header button.iep-layer-btn, .iep-header button.iep-panorama-btn, .iep-header button.iep-four-view-btn { width: 38px; height: 38px; border: 1px solid #444; background: #303030; }
    .iep-header button.iep-panorama-btn.active { border-color: #16936f; background: rgba(13,106,81,.78); color: #fff; }
    .iep-header button:hover { background: #303030; color: #fff; }
    .iep-refs { display: none !important; }
    .iep-refs:empty { display: none; }
    .iep-ref-tag { position: relative; height: 22px; min-width: 0; max-width: 92px; display: inline-flex; align-items: center; justify-content: flex-start; gap: 4px; padding: 2px 7px 2px 3px; background: #303030; border: 1px solid #444; border-radius: 5px; font-size: 11px; color: #d7d7d7; overflow: visible; flex: 0 0 auto; cursor: pointer; box-sizing: border-box; }
    .iep-ref-tag:hover { z-index: 80; }
    .iep-ref-tag i { font-size: 10px; }
    .iep-ref-thumb { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 3px; object-fit: cover; border: none; background: #2a2a2a; }
    .iep-ref-tag:hover .iep-ref-thumb { transform: none; box-shadow: none; outline: 1px solid #5a5a5a; }
    .iep-ref-meta { min-width: 0; max-width: 56px; display: inline-flex; align-items: center; line-height: 1; }
    .iep-ref-meta b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d8d8d8; font-size: 11px; font-weight: 800; }
    .iep-ref-meta small { display: none; }
    .iep-ref-remove { position: absolute; right: -5px; top: -5px; width: 15px; height: 15px; border-radius: 50%; border: none; background: #585858; color: #fff; font-size: 11px; line-height: 15px; text-align: center; cursor: pointer; opacity: 1; z-index: 3; }
    .iep-ref-remove:hover { background: #777; opacity: 1; }
    .iep-ref-link { width: 10px; height: 10px; flex: 0 0 10px; color: #9d9d9d; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; line-height: 1; pointer-events: none; }
    .iep-ref-tag:hover .iep-ref-link { border-color: #fff; color: #fff; }
    .iep-ref-tag.has-preview::before, .iep-material-chip.has-preview::before, .iep-inline-ref.has-preview::before, .iep-source-ref.has-preview::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 12px); width: 150px; height: 94px; border-radius: 12px; background-image: var(--iep-preview-image); background-size: cover; background-position: center; opacity: 0; transform: translate(-50%, 8px) scale(.92); pointer-events: none; z-index: 70; box-shadow: 0 16px 34px rgba(0,0,0,.46), inset 0 0 0 1px rgba(255,255,255,.15); transition: opacity .16s ease, transform .16s ease; }
    .iep-ref-tag.has-preview::after, .iep-material-chip.has-preview::after, .iep-inline-ref.has-preview::after, .iep-source-ref.has-preview::after { content: attr(data-preview-label); position: absolute; left: 50%; bottom: calc(100% + 13px); max-width: 136px; height: 18px; padding: 0 7px; border-radius: 9px; background: rgba(22,22,22,.78); color: #f2f2f2; font-size: 11px; font-weight: 800; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translate(-50%, 80px); pointer-events: none; z-index: 71; transition: opacity .16s ease, transform .16s ease; }
    .iep-ref-tag.has-preview:hover::before, .iep-material-chip.has-preview:hover::before, .iep-inline-ref.has-preview:hover::before, .iep-source-ref.has-preview:hover::before { opacity: 1; transform: translate(-50%, 0) scale(1); }
    .iep-ref-tag.has-preview:hover::after, .iep-material-chip.has-preview:hover::after, .iep-inline-ref.has-preview:hover::after, .iep-source-ref.has-preview:hover::after { opacity: 1; transform: translate(-50%, 82px); }
    .iep-body { padding: 8px 0 0; position: relative; }
    .iep-body.has-inline-refs .iep-input { padding-top: calc(var(--iep-inline-refs-h, 28px) + 8px); min-height: calc(82px + var(--iep-inline-refs-h, 28px)); }
    .iep-inline-refs { display: none !important; }
    .iep-inline-refs:empty { display: none; }
    .iep-body:not(.has-inline-refs) .iep-inline-refs { display: none; }
    .iep-inline-ref { position: relative; min-height: 24px; max-width: 310px; display: inline-flex; align-items: center; gap: 5px; padding: 0; border-radius: 6px; background: transparent; border: none; color: #d9e8ff; font-size: 13px; font-weight: 800; cursor: default; box-sizing: border-box; pointer-events: auto; }
    .iep-inline-ref:hover { color: #fff; }
    .iep-inline-ref img { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; flex: 0 0 18px; transition: transform .14s ease, box-shadow .14s ease; transform-origin: center; }
    .iep-inline-ref:hover img { transform: scale(1.28); box-shadow: 0 6px 16px rgba(0,0,0,.38); z-index: 2; }
    .iep-inline-ref i { color: #8bbcff; font-size: 12px; flex: 0 0 auto; }
    .iep-inline-ref .inline-ref-locate { display: none; }
    .iep-inline-ref span { min-width: 0; max-width: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .iep-inline-note { display: inline-block; width: 76px; min-width: 52px; height: 22px; border: none; border-radius: 5px; background: transparent; color: #f3f3f3; outline: none; padding: 0 4px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: text; }
    .iep-inline-note::placeholder { color: rgba(255,255,255,.34); font-weight: 700; }
    .iep-inline-note:focus { background: rgba(255,255,255,.08); border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
    .iep-inline-ref.editing { z-index: 8; }
    .iep-inline-note::placeholder { color: #8f8f8f; }
    .iep-inline-note:focus { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
    .iep-inline-ref small { display: none; }
    .iep-inline-ref .inline-ref-remove { width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #bdbdbd; font-size: 11px; line-height: 1; cursor: pointer; flex: 0 0 14px; }
    .iep-inline-ref .inline-ref-remove:hover { background: #555; color: #fff; }
    .iep-input { position: relative; z-index: 1; width: 100%; height: 82px; box-sizing: border-box; padding: 0 2px; border: none; border-radius: 0; background: transparent; color: #f4f4f4; font-size: 15px; line-height: 1.45; outline: none; resize: none; font-family: inherit; transition: none; }
    .iep-input { display: none !important; }
    .iep-rich-input { position: relative; z-index: 4; width: 100%; min-height: 82px; box-sizing: border-box; padding: 0 38px 0 2px; border: none; border-radius: 0; background: transparent; color: #f4f4f4; font-size: 15px; line-height: 1.55; outline: none; font-family: inherit; white-space: pre-wrap; word-break: break-word; overflow: auto; }
    .iep-rich-input:empty::before { content: attr(data-placeholder); color: #858585; pointer-events: none; }



    .iep-rich-chip { position: relative; display: inline-flex; align-items: center; gap: 3px; max-width: 92px; height: 22px; margin: 0 3px; padding: 1px 5px 1px 3px; border-radius: 6px; background: #303030; border: 1px solid #454545; color: #d9e8ff; font-size: 12px; font-weight: 800; vertical-align: -4px; user-select: none; cursor: default; }
    .iep-rich-chip img { width: 17px; height: 17px; border-radius: 4px; object-fit: cover; flex: 0 0 17px; }
    .iep-rich-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .iep-rich-note { width: 34px; min-width: 34px; max-width: 130px; height: 18px; border: none; border-radius: 4px; background: transparent; color: #f3f3f3; outline: none; padding: 0 3px; font-size: 12px; font-weight: 700; font-family: inherit; }
    .iep-rich-note::placeholder { color: rgba(255,255,255,.38); }
    .iep-rich-chip.editing .iep-rich-note, .iep-rich-note:focus { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
    .iep-rich-chip .rich-chip-remove { width: 12px; height: 12px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #bdbdbd; font-size: 10px; line-height: 1; margin-left: 1px; }
    .iep-rich-chip .rich-chip-remove:hover { background: #555; color: #fff; }
    .iep-rich-chip.has-preview::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 12px); width: 150px; height: 94px; border-radius: 12px; background-image: var(--iep-preview-image); background-size: cover; background-position: center; opacity: 0; transform: translate(-50%, 8px) scale(.92); pointer-events: none; z-index: 70; box-shadow: 0 16px 34px rgba(0,0,0,.46), inset 0 0 0 1px rgba(255,255,255,.15); transition: opacity .16s ease, transform .16s ease; }
    .iep-rich-chip.has-preview::after { content: attr(data-preview-label); position: absolute; left: 50%; bottom: calc(100% + 13px); max-width: 136px; height: 18px; padding: 0 7px; border-radius: 9px; background: rgba(22,22,22,.78); color: #f2f2f2; font-size: 11px; font-weight: 800; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translate(-50%, 80px); pointer-events: none; z-index: 71; transition: opacity .16s ease, transform .16s ease; }
    .iep-rich-chip.has-preview:hover::before { opacity: 1; transform: translate(-50%, 0) scale(1); }
    .iep-rich-chip.has-preview:hover::after { opacity: 1; transform: translate(-50%, 82px); }
    .iep-ref-tag.has-preview::before, .iep-ref-tag.has-preview::after, .iep-material-chip.has-preview::before, .iep-material-chip.has-preview::after, .iep-inline-ref.has-preview::before, .iep-inline-ref.has-preview::after, .iep-source-ref.has-preview::before, .iep-source-ref.has-preview::after, .iep-rich-chip.has-preview::before, .iep-rich-chip.has-preview::after, .agent-rich-chip.has-preview::before, .agent-rich-chip.has-preview::after { display: none !important; }
    .iep-hover-preview { position: fixed; left: 0; top: 0; width: 176px; min-height: 116px; border-radius: 14px; padding: 6px; background: rgba(31,31,31,.72); border: 1px solid rgba(255,255,255,.15); box-shadow: 0 18px 42px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); z-index: 100050; opacity: 0; transform: translate(-50%, 8px) scale(.94); pointer-events: none; transition: opacity .14s ease, transform .14s ease; overflow: hidden; }
    .iep-hover-preview.visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
    .iep-hover-preview img, .iep-hover-preview video { display: block; width: 100%; height: 104px; object-fit: cover; border-radius: 10px; background: #111; }
    .iep-hover-preview-label { height: 20px; margin-top: 6px; padding: 0 8px; border-radius: 10px; background: rgba(0,0,0,.34); color: #f2f2f2; font-size: 11px; font-weight: 800; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }





    .iep-input:focus { border-color: transparent; }
    .iep-input::placeholder { color: #858585; }
    .iep-material-row { display: none; align-items: center; gap: 8px; min-height: 38px; margin: 0 0 8px; }

    .iep-material-tool, .iep-material-add, .iep-material-chip { width: 38px; height: 38px; border-radius: 9px; border: 1px solid #444; background: #303030; color: #d7d7d7; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; flex: 0 0 auto; overflow: visible; }
    .iep-material-tool:hover, .iep-material-add:hover, .iep-material-chip:hover { background: #363636; color: #fff; }
    .iep-material-chip { position: relative; }
    .iep-material-chip img, .iep-material-chip video { width: 100%; height: 100%; object-fit: cover; display: block; }
    .iep-material-chip i { font-size: 13px; }
    .iep-material-note { display: none; width: 58px; height: 24px; border: none; border-radius: 6px; background: transparent; color: #f3f3f3; outline: none; padding: 0 5px; font-size: 12px; font-weight: 800; font-family: inherit; }
    .iep-material-note::placeholder { color: rgba(255,255,255,.42); }
    .iep-material-note:focus { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }



    .iep-material-add { font-size: 15px; }
    .iep-material-list { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; overflow-y: hidden; flex: 1 1 auto; max-width: 100%; min-height: 44px; padding: 6px 10px 0 0; scroll-behavior: smooth; overscroll-behavior: contain; scrollbar-width: none; box-sizing: border-box; }
    .iep-material-list::-webkit-scrollbar { display: none; }
    .iep-source-refs { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: visible; }
    .iep-header .iep-source-refs { align-self: center; justify-self: start; max-width: 100%; }

    .iep-source-ref { position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #444; border-radius: 9px; background: #303030; color: #d9e8ff; cursor: default; box-sizing: border-box; flex: 0 0 38px; overflow: visible; }
    .iep-source-ref img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: 0 0 34px; }
    .iep-source-ref span { display: none; }
    .iep-material-remove { position: absolute; right: 1px; top: 1px; width: 15px; height: 15px; border-radius: 50%; border: none; background: rgba(88,88,88,.92); color: #fff; font-size: 11px; line-height: 15px; padding: 0; display: none; cursor: pointer; }
    .iep-material-chip:hover .iep-material-remove { display: block; }
    .iep-actions { display: flex; align-items: center; gap: 10px; padding: 8px 0 0; min-height: 34px; min-width: 0; overflow: visible; }
    .iep-actions .btn-sm { font-size: 11px; padding: 6px 12px; }
    .iep-control { height: 34px; display: flex; flex-direction: row; align-items: center; gap: 6px; min-width: 176px; flex: 0 0 176px; }
    .iep-control span { display: none; }
    .iep-select { width: 176px; min-width: 176px; height: 34px; line-height: 34px; padding: 0 22px 0 8px; border: 1px solid #343434; border-radius: 8px; background: #303030; color: #f2f2f2; font-size: 14px; font-weight: 700; outline: none; text-align: left; }
    .iep-select option { color: #f2f2f2; background: #303030; }
    .iep-ratio-control, .iep-quality-control { position: relative; align-self: center; height: 34px; display: flex; align-items: center; }
    .iep-ratio-trigger { height: 34px; min-width: 106px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #343434; border-radius: 8px; background: #303030; color: #f2f2f2; cursor: pointer; font-size: 14px; font-weight: 700; line-height: 34px; padding: 0 10px; box-sizing: border-box; }
    .iep-ratio-trigger:hover, .iep-ratio-trigger.active { border-color: #555; background: #383838; }
    .iep-ratio-popover { display: none; position: absolute; left: 0; bottom: calc(100% + 10px); width: 308px; padding: 10px; border-radius: 14px; background: rgba(48,48,48,0.97); box-shadow: 0 18px 46px rgba(0,0,0,0.55); z-index: 100010; }
    .iep-ratio-popover.open { display: block; }
    .iep-ratio-title { color: #9ca3af; font-size: 12px; font-weight: 700; margin: 0 0 8px 2px; }
    .iep-ratio-panel { display: grid; grid-template-columns: repeat(5, minmax(42px, 1fr)); gap: 3px; padding: 6px; border-radius: 10px; background: rgba(255,255,255,0.08); }
    .iep-ratio-btn { height: 42px; border: none; border-radius: 8px; background: transparent; color: #a1a1aa; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; transition: .15s; }
    .iep-ratio-btn:hover { background: rgba(255,255,255,0.08); color: #e5e7eb; }
    .iep-ratio-btn.active { background: rgba(255,255,255,0.14); color: #fff; }
    .iep-ratio-icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
    .iep-ratio-rect { width: calc(16px * var(--rw)); height: calc(16px * var(--rh)); max-width: 18px; max-height: 18px; min-width: 4px; min-height: 4px; border: 1.5px solid currentColor; border-radius: 2px; }
    .iep-ratio-trigger span, .iep-ratio-trigger i { display: inline-flex; align-items: center; line-height: 1; }
    .iep-quality-popover { width: 178px; }
    .iep-quality-panel { grid-template-columns: repeat(3, minmax(42px, 1fr)); }
    .iep-quality-btn { height: 38px; border: none; border-radius: 8px; background: transparent; color: #a1a1aa; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; transition: .15s; }
    .iep-quality-btn:hover { background: rgba(255,255,255,0.08); color: #e5e7eb; }
    .iep-quality-btn.active { background: rgba(255,255,255,0.14); color: #fff; }
    .iep-apply-sm { height: 34px; line-height: 34px; padding: 0 5px 0 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.12)); color: #f2f2f2; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 28px rgba(0,0,0,.22); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); }
    .iep-actions .iep-apply-sm { margin-left: auto; min-width: 42px; max-width: 172px; height: 34px; flex: 0 1 auto; overflow: hidden; white-space: nowrap; }
    .iep-input-expand-btn { position: absolute; right: 10px; top: 8px; width: 28px; height: 28px; min-width: 28px; padding: 0; border: 1px solid #3f3f3f; border-radius: 8px; background: #303030; color: #d8d8d8; display: inline-flex; align-items: center; justify-content: center; gap: 0; font-size: 12px; font-weight: 800; cursor: pointer; z-index: 2; }

    .iep-input-expand-btn:hover { background: #3a3a3a; color: #fff; border-color: #555; }
    .iep-input-expand-btn span { display: none; }




    .iep-apply-sm i { font-size: 14px; }
    .iep-progress-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
    .iep-apply-sm .generate-count { display: inline-flex; align-items: center; gap: 5px; }
    .iep-apply-sm .iep-send-circle { width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.92); color: #181818; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 25px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 10px rgba(0,0,0,.24); }
    .iep-apply-sm .iep-generate-label { display: inline-flex; align-items: center; line-height: 1; color: #fff; }
    .iep-apply-sm .iep-send-circle i { font-size: 13px; }
    .iep-apply-sm .iep-credit-pill { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: rgba(255,255,255,.88); }
    .iep-apply-sm.is-generating { padding: 0 13px; gap: 0; }
    .iep-apply-sm.is-generating .iep-credit-pill { justify-content: center; width: 100%; }
    .iep-apply-sm.is-generating .iep-credit-pill i, .iep-apply-sm.is-generating .iep-send-circle { display: none !important; }
    .iep-apply-sm:hover { filter: none; transform: translateY(-1px); background: linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,255,255,.18)); border-color: rgba(255,255,255,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 16px 34px rgba(0,0,0,.28); }
    .iep-apply-sm:disabled { opacity: .78; cursor: progress; transform: none; }
    .iep-tool-group { display: inline-flex; align-items: center; justify-content: center; gap: 16px; height: 34px; margin-left: 10px; }
    .iep-tool-btn { width: 34px; height: 34px; line-height: 34px; border: none; border-radius: 9px; background: transparent; color: #d7d7d7; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; padding: 0; }
    .iep-tool-btn:hover, .iep-tool-btn.active { background: #303030; color: #fff; }
    .panorama-panel { display: none; margin-top: 10px; border: 1px solid #3a3a3a; border-radius: 14px; background: #151515; padding: 10px; color: #f2f2f2; box-shadow: 0 16px 42px rgba(0,0,0,.38); }
    .panorama-panel.open { display: block; }
    .panorama-head { height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
    .panorama-head strong { font-size: 13px; font-weight: 900; }
    .panorama-close { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #cfcfcf; cursor: pointer; }
    .panorama-close:hover { background: #303030; color: #fff; }
    .panorama-ref { display: flex; align-items: center; gap: 8px; color: #9a9a9a; font-size: 12px; font-weight: 700; margin-bottom: 8px; min-width: 0; }
    .panorama-ref img { width: 54px; height: 34px; border-radius: 6px; object-fit: cover; background: #252525; flex: 0 0 auto; }
    .panorama-stage { position: relative; height: 260px; margin-top: 8px; border: 1px solid #333; border-radius: 12px; background: #080808; overflow: hidden; cursor: default; user-select: none; }
    .panorama-stage.has-result { cursor: grab; }
    .panorama-stage.dragging { cursor: grabbing; }
    .panorama-stage.loading::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(238,246,255,.38) 1.2px, transparent 1.6px); background-size: 18px 18px; opacity: .5; animation: panoramaDots 3.8s linear infinite; }
    .panorama-stage.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.14) 48%, transparent 100%); transform: translateX(-120%); animation: panoramaSweep 2.4s ease-in-out infinite; }
    @keyframes panoramaDots { from { background-position: 0 0; } to { background-position: 54px 18px; } }
    @keyframes panoramaSweep { 0% { transform: translateX(-120%); } 55%,100% { transform: translateX(120%); } }
    .panorama-viewer { position: absolute; inset: 0; width: 100%; height: 100%; display: none; background: #050505; }
    .panorama-stage.has-result .panorama-viewer { display: block; }
    .panorama-strip { position: absolute; inset: 0; background-size: auto 100%; background-repeat: repeat-x; background-position: 50% center; transform: scale(var(--pano-zoom, 1)); transform-origin: center; opacity: 0; pointer-events: none; }
    .panorama-stage.has-result.flat-preview .panorama-strip { opacity: 1; }
    .panorama-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 0 16px; color: #707070; font-size: 13px; font-weight: 800; line-height: 1.4; text-align: center; pointer-events: none; }
    .panorama-stage.loading .panorama-empty, .panorama-stage.has-result .panorama-empty { display: none; }
    .panorama-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; pointer-events: none; }
    .panorama-stage:not(.has-result) .panorama-play, .panorama-stage.loading .panorama-play, .panorama-stage.has-result .panorama-play { display: none; }
    .panorama-progress-pill { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); min-width: 82px; height: 28px; padding: 0 12px; border-radius: 14px; background: rgba(18,18,18,.84); border: 1px solid rgba(255,255,255,.18); color: #f2f6ff; display: none; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; box-shadow: 0 10px 24px rgba(0,0,0,.32); z-index: 2; }
    .panorama-stage.loading .panorama-progress-pill { display: inline-flex; }
    .panorama-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
    .panorama-action { height: 36px; border: 1px solid #3d3d3d; border-radius: 9px; background: #242424; color: #f2f2f2; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 900; cursor: pointer; }
    .panorama-action:hover { background: #303030; border-color: #555; }
    .panorama-action.primary { background: #0d6a51; border-color: #16936f; }
    .panorama-action.canvas-node { display: none !important; }
    .panorama-status { margin-left: auto; min-height: 20px; color: #8f8f8f; font-size: 12px; font-weight: 800; }
    .brush-settings-popover { display: none; position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); width: 218px; padding: 12px; border-radius: 12px; background: #202020; border: 1px solid #3a3a3a; box-shadow: 0 18px 44px rgba(0,0,0,.55); color: #f2f2f2; z-index: 100012; }
    .brush-settings-popover.open { display: block; }
    .brush-settings-title { font-size: 13px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
    .brush-settings-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
    .brush-settings-row label { width: 38px; color: #9a9a9a; font-size: 12px; font-weight: 700; }
    .brush-size-range { flex: 1; accent-color: #f2f2f2; }
    .brush-size-value { min-width: 34px; text-align: right; color: #d8d8d8; font-size: 12px; font-weight: 700; }
    .brush-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
    .brush-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); cursor: pointer; padding: 0; box-sizing: border-box; }
    .brush-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
    .brush-color-input { width: 26px; height: 26px; padding: 0; border: none; background: transparent; cursor: pointer; }
    .image-lightbox { position: fixed; inset: 0; z-index: 250000; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; padding: 28px; cursor: zoom-out; }
    .image-lightbox.open { display: flex; }
    .image-lightbox img, .image-lightbox video { max-width: 96vw; max-height: 94vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 80px rgba(0,0,0,.6); }
    .image-lightbox video { display: none; background: #000; }
    .image-lightbox button { position: fixed; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #444; background: #202020; color: #f2f2f2; cursor: pointer; }
    .angle-panel { display: none; margin-top: 10px; border: 1px solid #343434; border-radius: 14px; background: #1f1f1f; color: #f2f2f2; overflow: hidden; }
    .angle-panel.open { display: block; }
    .angle-head { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid #343434; font-weight: 900; }
    .angle-head button { width: 30px; height: 30px; border: none; border-radius: 9px; background: transparent; color: #aaa; cursor: pointer; font-size: 15px; }
    .angle-head button:hover { background: #303030; color: #fff; }
    .angle-body { display: grid; grid-template-columns: 200px minmax(260px, 1fr); gap: 14px; padding: 12px; }
    .angle-preview { min-height: 168px; border: 1px solid #3a3a3a; border-radius: 12px; background: #252525; display: flex; align-items: center; justify-content: center; overflow: hidden; perspective: 900px; }
    .angle-preview img { max-width: 88%; max-height: 145px; border-radius: 8px; object-fit: contain; box-shadow: 0 12px 30px rgba(0,0,0,.4); transform-style: preserve-3d; }
    .angle-controls { display: grid; gap: 10px; align-content: start; }
    .angle-row { display: grid; grid-template-columns: 72px 1fr 54px; align-items: center; gap: 10px; font-weight: 800; }
    .angle-row input[type="range"] { width: 100%; accent-color: #f2f2f2; }
    .angle-value { text-align: right; color: #fff; font-weight: 900; }
    .angle-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 800; padding-top: 4px; }
    .angle-toggle input { width: 42px; height: 22px; accent-color: #f2f2f2; }
    .angle-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 2px; }
    .angle-actions button { height: 34px; border: none; border-radius: 18px; padding: 0 14px; font-weight: 900; cursor: pointer; }
    .angle-reset { background: transparent; color: #aaa; }
    .angle-apply { background: #d8d8d8; color: #202020; min-width: 112px; }
    .lighting-panel { display: none; margin-top: 10px; border: 1px solid #343434; border-radius: 14px; background: #1f1f1f; color: #f2f2f2; overflow: hidden; }
    .lighting-panel.open { display: block; }
    .lighting-head { height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid #343434; font-weight: 900; }
    .lighting-head button { width: 30px; height: 30px; border: none; border-radius: 9px; background: transparent; color: #aaa; cursor: pointer; font-size: 15px; }
    .lighting-head button:hover { background: #303030; color: #fff; }
    .lighting-body { display: grid; grid-template-columns: minmax(286px, 308px) minmax(260px, 1fr); gap: 14px; padding: 12px; }
    .lighting-stage { position: relative; min-height: 318px; border: 1px solid #3a3a3a; border-radius: 18px; background: #2a2a2a; overflow: hidden; touch-action: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
    .lighting-tabs { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: inline-flex; padding: 3px; border-radius: 20px; background: #3a3a3a; border: 1px solid #484848; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 20px rgba(0,0,0,.26); z-index: 8; }
    .lighting-tab { height: 32px; min-width: 64px; border: none; border-radius: 17px; background: transparent; color: #a8a8a8; font-weight: 900; cursor: pointer; font-size: 14px; }
    .lighting-tab.active { background: linear-gradient(#666, #505050); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 1px 5px rgba(0,0,0,.36); }
    .lighting-orbit { position: absolute; left: 50%; top: 55%; width: 232px; height: 232px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 33% 26%, rgba(255,255,255,.3) 0, rgba(255,255,255,.14) 13%, rgba(255,255,255,.06) 31%, rgba(255,255,255,.025) 56%, rgba(0,0,0,.24) 100%), radial-gradient(circle at 62% 72%, rgba(0,0,0,.4), transparent 48%), linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.1); box-shadow: inset -34px -42px 58px rgba(0,0,0,.38), inset 22px 18px 34px rgba(255,255,255,.07), 0 20px 46px rgba(0,0,0,.36); cursor: crosshair; }
    .lighting-orbit::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle at 28% 24%, rgba(255,255,255,.2), transparent 21%); box-shadow: inset 0 0 70px rgba(255,255,255,.025); pointer-events: none; }
    .lighting-orbit::after { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; height: 1px; border-radius: 50%; background: rgba(255,255,255,.07); box-shadow: 0 -56px 0 rgba(255,255,255,.025), 0 56px 0 rgba(0,0,0,.1), 56px 0 0 rgba(255,255,255,.025), -56px 0 0 rgba(255,255,255,.025); transform: rotate(-16deg); pointer-events: none; }
    .lighting-card { position: absolute; left: 51%; top: 54%; width: 56px; height: 76px; border-radius: 5px; transform: translate(-50%, -50%) perspective(240px) rotateY(-28deg) rotateZ(1deg); background: #4e4e4e; border: 1px solid rgba(255,255,255,.18); overflow: hidden; box-shadow: 10px 12px 24px rgba(0,0,0,.34); z-index: 5; }
    .lighting-card img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
    .lighting-beam { position: absolute; left: var(--lighting-beam-left, 50%); top: var(--lighting-beam-top, 53%); width: var(--lighting-beam-width, 138px); height: 104px; transform-origin: left center; transform: translateY(-50%) rotate(var(--lighting-beam-angle, 0deg)); background: linear-gradient(90deg, rgba(255,255,255,.78), rgba(255,255,255,.24) 42%, rgba(255,255,255,.05) 76%, transparent 100%); clip-path: polygon(0 49%, 100% 2%, 100% 98%); opacity: .7; filter: blur(.35px); pointer-events: none; z-index: 4; mix-blend-mode: screen; }
    .lighting-dot { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff, #f2f5f7 48%, #aeb8c1 100%); border: 2px solid rgba(16,16,16,.9); box-shadow: 0 0 20px rgba(255,255,255,.82), 0 8px 18px rgba(0,0,0,.36); transform: translate(-50%, -50%); cursor: grab; z-index: 7; }
    .lighting-dot::before, .lighting-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 1px; transform-origin: left center; background: linear-gradient(90deg, rgba(255,255,255,.66), transparent); pointer-events: none; }
    .lighting-dot::before { transform: rotate(-84deg); }
    .lighting-dot::after { transform: rotate(24deg); }
    .lighting-dot:active { cursor: grabbing; }
    .lighting-source-label { position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); height: 34px; min-width: 102px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px 16px 0 0; border: 1px solid #4a4a4a; border-bottom: none; background: rgba(42,42,42,.88); color: #f2f2f2; font-size: 15px; font-weight: 900; z-index: 8; }
    .lighting-stage-reset { position: absolute; right: 12px; bottom: 10px; border: none; background: transparent; color: #aaa; cursor: pointer; font-size: 14px; font-weight: 800; z-index: 8; }
    .lighting-controls { display: grid; gap: 12px; align-content: start; }
    .lighting-section-title { font-size: 18px; font-weight: 900; }
    .lighting-row { display: grid; grid-template-columns: 72px 1fr 86px; align-items: center; gap: 10px; font-weight: 900; }
    .lighting-row input[type="range"] { width: 100%; accent-color: #f2f2f2; }
    .lighting-value { height: 34px; border-radius: 12px; background: #303030; border: 1px solid #3a3a3a; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #fff; font-weight: 900; }
    .lighting-directions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .lighting-dir-btn { height: 34px; border: none; border-radius: 10px; background: #2b2b2b; color: #aaa; font-weight: 900; cursor: pointer; }
    .lighting-dir-btn.active, .lighting-dir-btn:hover { background: #5f5f5f; color: #fff; }
    .lighting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid #353535; font-weight: 900; }
    .lighting-toggle input { width: 42px; height: 22px; accent-color: #f2f2f2; }
    .lighting-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
    .lighting-actions button { height: 34px; border: none; border-radius: 18px; padding: 0 14px; font-weight: 900; cursor: pointer; }
    .lighting-apply { background: #d8d8d8; color: #202020; min-width: 112px; }
    .redraw-editor { position: fixed; inset: 0; z-index: 260000; display: none; background-color: #020202; background-image: radial-gradient(circle, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 42px 42px; color: #f2f2f2; overflow: hidden; }
    .redraw-editor.open { display: block; }
    .redraw-title { position: fixed; left: 50%; top: 38px; transform: translateX(-50%); width: min(76vw, 1500px); display: flex; align-items: center; gap: 12px; color: #bfc2c8; font-size: 34px; font-weight: 500; letter-spacing: 0; z-index: 2; }
    .redraw-title i { font-size: 31px; color: #9ca3af; }
    .redraw-stage { position: fixed; left: 50%; top: 108px; transform: translateX(-50%); width: min(76vw, 1500px); height: calc(100vh - 250px); display: flex; align-items: center; justify-content: center; }
    .redraw-image-wrap { position: relative; display: inline-block; max-width: 100%; max-height: 100%; border: 1px solid rgba(34,211,238,.55); background: #000; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 90px rgba(0,0,0,.65); }
    .redraw-image-wrap img { display: block; max-width: 100%; max-height: calc(100vh - 250px); object-fit: contain; user-select: none; pointer-events: none; }
    #redrawMaskCanvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
    .redraw-toolbar { position: fixed; left: 50%; top: 44px; transform: translateX(-50%); height: 50px; border-radius: 24px; border: 1px solid #333; background: rgba(32,32,32,.94); box-shadow: 0 18px 48px rgba(0,0,0,.55); display: flex; align-items: center; gap: 8px; padding: 0 12px; z-index: 4; }
    .redraw-tool-btn { width: 34px; height: 34px; border: none; border-radius: 17px; background: transparent; color: #cfcfcf; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .redraw-tool-btn:hover, .redraw-tool-btn.active { background: #3a3a3a; color: #fff; }
    .redraw-toolbar .sep { width: 1px; height: 24px; background: #3b3b3b; margin: 0 4px; }
    .redraw-brush-size { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; color: #f2f2f2; }
    .redraw-brush-size input { width: 86px; accent-color: #f2f2f2; }
    .redraw-prompt { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(392px, calc(100vw - 40px)); min-height: 86px; border-radius: 12px; border: 1px solid #343434; background: rgba(32,32,32,.96); box-shadow: 0 18px 54px rgba(0,0,0,.6); padding: 10px; z-index: 4; }
    .redraw-prompt textarea { width: 100%; height: 42px; border: none; outline: none; resize: none; background: #242424; color: #f2f2f2; border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: 13px; }
    .redraw-prompt textarea::placeholder { color: #777; }
    .redraw-prompt-foot { height: 28px; display: flex; align-items: center; gap: 10px; color: #8e8e8e; font-size: 12px; }
    .redraw-send { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: none; background: #9d9d9d; color: #202020; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .outpaint-editor { position: fixed; inset: 0; z-index: 270000; display: none; background-color: #020202; background-image: radial-gradient(circle, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 42px 42px; color: #f2f2f2; overflow: hidden; }
    .outpaint-editor.open { display: block; }
    .outpaint-stage { position: fixed; inset: 34px 28px 118px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
    .outpaint-frame { position: relative; display: flex; align-items: center; justify-content: center; background: #000; border: 1px solid rgba(255,255,255,.72); box-shadow: 0 24px 90px rgba(0,0,0,.68); pointer-events: auto; }
    .outpaint-frame.custom-resizing { outline: 1px solid rgba(255,255,255,.32); }
    .outpaint-frame.custom-resizing .outpaint-image { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; filter: none; }
    .outpaint-frame::before, .outpaint-frame::after { content: ""; position: absolute; left: 50%; width: 34px; height: 4px; margin-left: -17px; background: #f5f5f5; border-radius: 3px; pointer-events: none; }
    .outpaint-frame::before { top: -3px; }
    .outpaint-frame::after { bottom: -3px; }
    .outpaint-corner { position: absolute; width: 22px; height: 22px; border-color: #fff; pointer-events: auto; z-index: 2; }
    .outpaint-corner.tl { left: -2px; top: -2px; border-left: 4px solid #fff; border-top: 4px solid #fff; }
    .outpaint-corner.tr { right: -2px; top: -2px; border-right: 4px solid #fff; border-top: 4px solid #fff; }
    .outpaint-corner.bl { left: -2px; bottom: -2px; border-left: 4px solid #fff; border-bottom: 4px solid #fff; }
    .outpaint-corner.br { right: -2px; bottom: -2px; border-right: 4px solid #fff; border-bottom: 4px solid #fff; }
    .outpaint-corner.tl, .outpaint-corner.br { cursor: nwse-resize; }
    .outpaint-corner.tr, .outpaint-corner.bl { cursor: nesw-resize; }
    .outpaint-side-handle { position: absolute; background: #f5f5f5; border-radius: 3px; pointer-events: auto; z-index: 2; }
    .outpaint-side-handle.left, .outpaint-side-handle.right { top: 50%; width: 4px; height: 34px; margin-top: -17px; }
    .outpaint-side-handle.left { left: -3px; }
    .outpaint-side-handle.right { right: -3px; }
    .outpaint-side-handle.top, .outpaint-side-handle.bottom { left: 50%; width: 34px; height: 4px; margin-left: -17px; cursor: ns-resize; }
    .outpaint-side-handle.top { top: -3px; }
    .outpaint-side-handle.bottom { bottom: -3px; }
    .outpaint-side-handle.left, .outpaint-side-handle.right { cursor: ew-resize; }
    .outpaint-size-badge { position: absolute; right: 10px; bottom: 9px; min-width: 74px; height: 24px; border: 1px solid rgba(255,255,255,.22); border-radius: 7px; background: rgba(12,12,12,.72); color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; font-size: 11px; font-weight: 900; pointer-events: none; }
    .outpaint-image { display: block; max-width: 70%; max-height: 70%; object-fit: contain; user-select: none; filter: drop-shadow(0 14px 34px rgba(0,0,0,.58)); }
    .outpaint-toolbar { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); min-width: min(640px, calc(100vw - 32px)); height: 54px; border-radius: 18px; border: 1px solid #303030; background: rgba(28,28,28,.94); box-shadow: 0 18px 54px rgba(0,0,0,.62); display: flex; align-items: center; gap: 10px; padding: 0 10px; z-index: 4; }
    .outpaint-toolbar button, .outpaint-toolbar select { height: 34px; border: 1px solid #3c3c3c; border-radius: 10px; background: #2a2a2a; color: #f2f2f2; font-weight: 800; cursor: pointer; }
    .outpaint-close { width: 34px; padding: 0; border-color: transparent !important; background: transparent !important; color: #aaa !important; font-size: 17px; }
    .outpaint-ratio-wrap { position: relative; }
    .outpaint-ratio-trigger { min-width: 94px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
    .outpaint-ratio-menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 150px; padding: 7px; border-radius: 10px; border: 1px solid #3a3a3a; background: rgba(43,43,43,.98); box-shadow: 0 16px 42px rgba(0,0,0,.54); display: none; }
    .outpaint-ratio-menu.open { display: block; }
    .outpaint-ratio-menu button { width: 100%; height: 32px; border: none; border-radius: 7px; background: transparent; color: #d0d0d0; display: flex; align-items: center; justify-content: flex-start; padding: 0 10px; }
    .outpaint-ratio-menu button:hover, .outpaint-ratio-menu button.active { background: #484848; color: #fff; }
    .outpaint-ratio-menu .outpaint-custom-ratio-btn { margin-top: 5px; border-top: 1px solid rgba(255,255,255,.1); border-radius: 0 0 7px 7px; padding-top: 5px; color: #e5e5e5; }
    .outpaint-hint { color: #8f8f8f; font-size: 13px; white-space: nowrap; }
    .outpaint-spacer { flex: 1 1 auto; }
    .outpaint-mini-pill { min-width: 42px; padding: 0 10px; color: #aaa !important; }
    .outpaint-quality-wrap .outpaint-ratio-menu { left: auto; right: 0; width: 92px; }
    .outpaint-quality-menu button { display: flex; align-items: center; justify-content: center; padding: 0; text-align: center; line-height: 1; }
    .outpaint-quality-trigger { color: #d8d8d8 !important; display: inline-flex !important; align-items: center; justify-content: center; text-align: center; line-height: 1; }
    .outpaint-generate { width: 42px; padding: 0 5px !important; border-radius: 20px !important; background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.12)) !important; border-color: rgba(255,255,255,.2) !important; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 28px rgba(0,0,0,.22); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); }
    .outpaint-generate:hover { background: linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,255,255,.18)) !important; border-color: rgba(255,255,255,.3) !important; }
    .outpaint-generate span { width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.92); color: #181818; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 25px; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 10px rgba(0,0,0,.24); }
    .iep-add-ref-btn { justify-self: start !important; background: #303030 !important; border: 1px solid #444 !important; }
    .iep-panorama-btn, .iep-four-view-btn { justify-self: start !important; }
    .iep-layer-btn, .iep-four-view-btn { justify-self: start !important; background: #303030 !important; border: 1px solid #555 !important; border-radius: 9px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; box-shadow: inset 0 -2px 0 rgba(255,255,255,.16), inset 0 1px 0 rgba(255,255,255,.08), 0 4px 10px rgba(0,0,0,.22) !important; }
    .iep-layer-btn:hover, .iep-four-view-btn:hover { border-color: #707070 !important; background: #383838 !important; box-shadow: inset 0 -2px 0 rgba(255,255,255,.22), inset 0 1px 0 rgba(255,255,255,.12), 0 5px 12px rgba(0,0,0,.28) !important; }
    .iep-layer-btn.busy, .iep-four-view-btn.busy { color: #fff !important; pointer-events: none; }
    .outpaint-entry-icon { width: 17px; height: 17px; display: block; color: currentColor; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; fill: none; }
    .layer-compose-editor { position: fixed; inset: 0; z-index: 280000; display: none; background: rgba(3,3,3,.94); color: #eee; overflow: hidden; }
    .layer-compose-editor.open { display: grid; grid-template-columns: minmax(0, 1fr) 292px; }
    .layer-compose-stage-wrap { position: relative; display: flex; align-items: center; justify-content: center; padding: 38px; background-color: #050505; background-image: radial-gradient(circle, rgba(255,255,255,.15) 1px, transparent 1px); background-size: 34px 34px; }
    .layer-compose-stage-shell { position: relative; max-width: 100%; max-height: 100%; padding: 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(12,12,12,.78); box-shadow: 0 24px 90px rgba(0,0,0,.7); }
    #layerComposeCanvas { display: block; max-width: calc(100vw - 420px); max-height: calc(100vh - 100px); background-image: linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.08) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.08) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.08) 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; cursor: grab; }
    #layerComposeCanvas.dragging { cursor: grabbing; }
    .layer-compose-panel { border-left: 1px solid rgba(255,255,255,.12); background: rgba(28,28,28,.96); box-shadow: -22px 0 60px rgba(0,0,0,.42); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
    .layer-compose-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .layer-compose-title { font-size: 14px; font-weight: 800; }
    .layer-compose-close { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #303030; color: #ddd; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .layer-compose-list { display: flex; flex-direction: column; gap: 8px; min-height: 90px; max-height: 32vh; overflow: auto; }
    .layer-compose-item { height: 52px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: #242424; color: #ddd; display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 5px; cursor: grab; text-align: left; }
    .layer-compose-item:active { cursor: grabbing; }
    .layer-compose-item.active { border-color: #7ab8ff; background: #31445a; color: #fff; }
    .layer-compose-item.dragging { opacity: .52; }
    .layer-compose-item.drag-over { border-color: #f2f2f2; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
    .layer-compose-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: #111; }
    .layer-compose-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 700; }
    .layer-compose-meta { font-size: 10px; color: #aaa; margin-top: 2px; }
    .layer-compose-stack { display: flex; gap: 4px; }
    .layer-compose-stack button { width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(255,255,255,.06); color: #ddd; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .layer-compose-controls { display: flex; flex-direction: column; gap: 11px; min-height: 0; overflow: auto; padding-right: 2px; }
    .layer-compose-row { display: grid; grid-template-columns: 58px minmax(0,1fr) 42px; align-items: center; gap: 8px; font-size: 12px; color: #aaa; }
    .layer-compose-row input[type="range"] { width: 100%; }
    .layer-compose-row select { grid-column: 2 / span 2; height: 30px; border-radius: 8px; border: 1px solid #3c3c3c; background: #151515; color: #eee; padding: 0 8px; }
    .layer-compose-size { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: #202020; }
    .layer-compose-size label { display: flex; flex-direction: column; gap: 5px; color: #aaa; font-size: 11px; font-weight: 700; }
    .layer-compose-size input { height: 30px; border-radius: 8px; border: 1px solid #3c3c3c; background: #111; color: #eee; padding: 0 8px; font: 700 12px "Microsoft YaHei", Arial, sans-serif; }
    .layer-compose-size button { height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: #2c2c2c; color: #eee; padding: 0 10px; font-weight: 800; cursor: pointer; white-space: nowrap; }
    .layer-compose-actions { margin-top: auto; display: grid; grid-template-columns: 36px 36px minmax(0, 1fr); align-items: center; gap: 8px; padding-bottom: 2px; }
    .layer-compose-actions button { min-width: 0; height: 36px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: #2d2d2d; color: #eee; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; white-space: nowrap; }
    .layer-compose-actions button:nth-child(1), .layer-compose-actions button:nth-child(2) { width: 36px; padding: 0; }
    .layer-compose-actions button:nth-child(4) { grid-column: 1 / -1; }
    .layer-compose-actions .primary { background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.12)); color: #fff; backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); }
    .layer-compose-actions .layer-compose-main { margin-left: 0; }
    .layer-compose-note { color: #8e8e8e; font-size: 11px; line-height: 1.45; }
    .blocking-map-editor { position: fixed; inset: 0; z-index: 285000; display: none; grid-template-rows: 56px minmax(0, 1fr); background: rgba(5,5,5,.96); color: #ededed; overflow: hidden; }
    .blocking-map-editor.open { display: grid; }
    .blocking-map-topbar { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.12); background: rgba(26,26,26,.96); box-shadow: 0 14px 44px rgba(0,0,0,.38); }
    .blocking-map-title { min-width: 108px; font-size: 15px; font-weight: 900; color: #f3f3f3; }
    .blocking-map-subtitle { min-width: 0; flex: 1 1 auto; color: #9b9b9b; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .blocking-map-tools { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 13px; background: #242424; border: 1px solid rgba(255,255,255,.1); }
    .blocking-tool-btn { width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: #bfbfbf; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; }
    .blocking-tool-btn:hover, .blocking-tool-btn.active { background: #444; color: #fff; }
    .blocking-tool-btn.camera.active { background: rgba(80,156,255,.28); color: #d8eaff; }
    .blocking-tool-btn.light.active { background: rgba(242,190,70,.24); color: #fff0bf; }
    .blocking-tool-btn.actor.active { background: rgba(65,196,132,.24); color: #d8ffe8; }
    .blocking-tool-btn.arrow.active { background: rgba(239,95,95,.25); color: #ffd9d9; }
    .blocking-map-main { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
    .blocking-map-stage-wrap { min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background-color: #070707; background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 34px 34px; }
    .blocking-map-stage-shell { position: relative; max-width: 100%; max-height: 100%; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(12,12,12,.78); box-shadow: 0 24px 88px rgba(0,0,0,.68); }
    #blockingMapCanvas { display: block; max-width: calc(100vw - 380px); max-height: calc(100vh - 112px); background: #101010; border-radius: 8px; cursor: crosshair; }
    .blocking-map-side { min-width: 0; border-left: 1px solid rgba(255,255,255,.1); background: rgba(28,28,28,.96); padding: 15px; display: flex; flex-direction: column; gap: 12px; }
    .blocking-map-section-title { height: 22px; display: flex; align-items: center; gap: 7px; color: #d9d9d9; font-size: 13px; font-weight: 900; }
    .blocking-map-list { min-height: 130px; max-height: 30vh; overflow: auto; display: flex; flex-direction: column; gap: 7px; padding-right: 2px; }
    .blocking-map-item { min-height: 38px; display: grid; grid-template-columns: 24px minmax(0,1fr) 24px; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 9px; background: #242424; border: 1px solid rgba(255,255,255,.08); color: #e8e8e8; }
    .blocking-map-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; }
    .blocking-map-item button { width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: #aaa; cursor: pointer; }
    .blocking-map-item button:hover { background: #383838; color: #fff; }
    .blocking-map-tip { padding: 10px; border-radius: 10px; background: #222; color: #969696; font-size: 12px; line-height: 1.55; }
    .blocking-map-prompt { width: 100%; min-height: 96px; resize: vertical; border: 1px solid #3b3b3b; border-radius: 10px; background: #151515; color: #eee; outline: none; padding: 10px; box-sizing: border-box; font: 700 12px/1.5 "Microsoft YaHei", Arial, sans-serif; }
    .blocking-map-prompt:focus { border-color: #666; }
    .blocking-map-actions { margin-top: auto; display: grid; grid-template-columns: 36px 36px minmax(0,1fr); gap: 8px; }
    .blocking-map-actions button { height: 36px; min-width: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: #2d2d2d; color: #eee; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; white-space: nowrap; }
    .blocking-map-actions button.primary { background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.12)); color: #fff; }
    .blocking-map-actions button:hover { background: #3a3a3a; }
    .blocking-map-close { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #303030; color: #ddd; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    @media (max-width: 860px) {
      .blocking-map-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 270px; }
      .blocking-map-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
      #blockingMapCanvas { max-width: calc(100vw - 48px); max-height: calc(100vh - 382px); }
      .blocking-map-subtitle { display: none; }
    }
    .iep-canvas-ref-menu { position: fixed; display: none; z-index: 100020; width: 300px; max-height: 320px; overflow: auto; padding: 10px; border-radius: 12px; border: 1px solid #3a3a3a; background: #202020; box-shadow: 0 18px 48px rgba(0,0,0,.55); color: #f2f2f2; }
    .iep-canvas-ref-menu-title { height: 28px; display: flex; align-items: center; color: #a6a6a6; font-size: 12px; font-weight: 800; }
    .iep-canvas-ref-menu-title.video-section { color: #f2f2f2; }
    .iep-canvas-ref-menu-title.empty-section { height: auto; min-height: 26px; line-height: 1.35; color: #858585; font-weight: 700; }
    .iep-canvas-ref-item { width: 100%; min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: #f2f2f2; display: grid; grid-template-columns: 34px minmax(0,1fr) 18px; align-items: center; gap: 9px; padding: 5px 6px; cursor: pointer; text-align: left; }
    .iep-canvas-ref-item.video-item { background: rgba(216,216,216,.08); }
    .iep-canvas-ref-item:hover { background: #303030; }
    .iep-canvas-ref-item.video-item:hover { background: rgba(216,216,216,.14); }
    .iep-canvas-ref-item img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; background: #333; }
    .iep-canvas-ref-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; }
    .iep-canvas-ref-item small { margin-left: 6px; color: #9a9a9a; font-size: 11px; font-weight: 800; }
    .iep-canvas-ref-video-badge { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 8px; background: #303030; color: #f2f2f2 !important; font-size: 10px !important; font-weight: 900 !important; vertical-align: 1px; }
    .iep-canvas-ref-item i { color: #9a9a9a; font-size: 12px; }
    .iep-bottom-item { height: 34px; line-height: 34px; display: inline-flex; align-items: center; gap: 7px; color: #f2f2f2; font-size: 14px; font-weight: 700; white-space: nowrap; }
    .iep-bottom-item i { color: #f2f2f2; font-size: 13px; }
    .iep-bottom-muted { max-width: 116px; overflow: hidden; text-overflow: ellipsis; }
    .iep-divider { width: 1px; height: 20px; background: #3a3a3a; }
    .iep-spacer { min-width: 0; flex: 1 1 auto; }
    .iep-count-pill { height: 34px; min-width: 58px; padding: 0 9px; border-radius: 18px; background: #343434; border: 1px solid #4d4d4d; color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 700; }










    .media-name-editor { position: fixed; display: none; z-index: 99997; height: 24px; min-width: 72px; max-width: 240px; padding: 0 8px; border: 1px solid rgba(255,255,255,0.18); border-radius: 6px; background: rgba(18,18,18,0.92); color: #f2f2f2; font: 700 14px 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; outline: none; box-sizing: border-box; }
    .media-name-editor:focus { border-color: rgba(124,58,237,0.8); box-shadow: 0 0 0 2px rgba(124,58,237,0.18); }
    .video-hover-layer { position: absolute; inset: 0; z-index: 12; pointer-events: none; overflow: hidden; }
    .video-hover-card { position: absolute; display: none; border-radius: 22px; overflow: hidden; pointer-events: none; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 18px 42px rgba(0,0,0,.42); }
    .video-hover-card.visible { display: block; pointer-events: none; }
    .video-hover-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,.04) 42%, rgba(0,0,0,.62) 100%); }
    .video-hover-actions { position: absolute; left: 14px; top: 14px; display: flex; gap: 8px; pointer-events: auto; }
    .video-hover-pill { width: 34px; height: 34px; border-radius: 12px; background: rgba(10,10,10,.58); border: 1px solid rgba(255,255,255,.13); color: #f4f4f4; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); cursor: pointer; }
    .video-hover-pill.active { color: #ffd666; border-color: rgba(255,214,102,.46); background: rgba(46,36,12,.72); }
    .video-hover-controls { position: absolute; left: 16px; right: 16px; bottom: 14px; display: grid; grid-template-columns: 28px auto 1fr auto 28px; align-items: center; gap: 10px; font: 800 13px/1 'Microsoft YaHei','微软雅黑',Arial,sans-serif; text-shadow: 0 1px 8px rgba(0,0,0,.72); pointer-events: auto; }
    .video-hover-play { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; pointer-events: auto; }
    .video-hover-time { min-width: 34px; text-align: left; }
    .video-hover-duration { min-width: 34px; text-align: right; }
    .video-hover-bar { position: relative; height: 4px; border-radius: 999px; background: rgba(255,255,255,.42); overflow: visible; cursor: ew-resize; pointer-events: auto; }
    .video-hover-bar::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
    .video-hover-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: inherit; background: #fff; }
    .video-hover-knob { position: absolute; left: 0%; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0,0,0,.36); }
    .video-hover-full { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; pointer-events: auto; }
    
    /* Add Menu Dropdown */
    .add-menu { position: fixed; background: #202020; border: 1px solid #3a3a3a; border-radius: 8px; padding: 6px; box-shadow: 0 16px 42px rgba(0,0,0,0.45); z-index: 99999; min-width: 200px; backdrop-filter: none; -webkit-backdrop-filter: none; animation: ctxFadeIn 0.12s ease-out; }
    .add-menu div { min-height: 38px; padding: 0 12px; cursor: pointer; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 10px; color: #f2f2f2; transition: background 0.1s, color 0.1s; border-radius: 7px; }
    .add-menu div i { width: 18px; text-align: center; font-size: 13px; color: #a8a8a8; }
    .add-menu div:hover { background: #303030; color: #fff; }
    .add-menu div:hover i { color: #fff; }
    .add-menu hr { border: none; border-top: 1px solid #303030; margin: 6px 4px; }
    .selection-align-toolbar { position: fixed; display: none; align-items: center; gap: 4px; min-height: 34px; max-width: calc(100vw - 16px); padding: 3px; border-radius: 10px; background: rgba(28,28,28,.96); border: 1px solid #3f3f3f; box-shadow: 0 12px 34px rgba(0,0,0,.42); z-index: 99997; flex-wrap: wrap; box-sizing: border-box; }
    .selection-align-toolbar button { width: 28px; height: 28px; flex: 0 0 28px; border: none; border-radius: 8px; background: transparent; color: #d8d8d8; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; padding: 0; }
    .selection-align-toolbar button:hover { background: #303030; color: #fff; }
    .selection-align-toolbar button:disabled { opacity: .36; cursor: default; pointer-events: none; }
    .selection-align-toolbar .sep { width: 1px; height: 18px; flex: 0 0 1px; background: #3a3a3a; margin: 0 2px; }
    .selection-align-toolbar .selection-action-primary { color: #f2f2f2; }
    .text-format-toolbar { position: fixed; display: none; align-items: center; gap: 4px; min-height: 40px; padding: 5px 8px; border-radius: 20px; background: rgba(31,31,31,.96); border: 1px solid rgba(255,255,255,.11); box-shadow: 0 14px 38px rgba(0,0,0,.46); color: #d6d6d6; z-index: 100010; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transform-origin: 0 0; }
    .text-format-toolbar button { width: 30px; height: 30px; border: none; border-radius: 15px; background: transparent; color: #cfcfcf; font: 800 13px/1 'Microsoft YaHei','微软雅黑',Arial,sans-serif; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
    .text-format-toolbar button:hover, .text-format-toolbar button.active { background: rgba(255,255,255,.13); color: #fff; }
    .text-format-toolbar .tf-sep { width: 1px; height: 21px; background: rgba(255,255,255,.12); margin: 0 3px; }
    .text-format-toolbar .tf-color-btn { position: relative; background: transparent; }
    .text-format-toolbar .tf-color-dot { width: 24px; height: 24px; border-radius: 50%; background: #f2f2f2; border: 1px solid rgba(255,255,255,.45); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); display: block; }
    .text-format-toolbar input[type="color"] { position: absolute; inset: 0; width: 30px; height: 30px; opacity: 0; cursor: pointer; padding: 0; border: none; }
    .text-format-toolbar .tf-font,
    .text-format-toolbar .tf-size { height: 30px; border: none; border-radius: 15px; background: rgba(255,255,255,.08); color: #e9e9e9; padding: 0 10px; font: 700 12px/30px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; outline: none; cursor: pointer; }
    .text-format-toolbar .tf-font { width: 92px; }
    .text-format-toolbar .tf-size { width: 58px; text-align: center; padding: 0 8px; }
    .text-format-toolbar .tf-font option,
    .text-format-toolbar .tf-size option { background: #2d2d2d; color: #fff; }
    .text-format-toolbar .tf-pill { width: 36px; }
    .text-format-toolbar i { font-size: 13px; line-height: 1; }
    .node-add-menu { position: fixed; display: none; width: 286px; padding: 8px; border-radius: 12px; background: rgba(27,27,27,0.97); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 18px 48px rgba(0,0,0,0.55); z-index: 100006; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
    .node-add-title { padding: 6px 8px 8px; color: #8f8f8f; font-size: 14px; font-weight: 700; }
    .node-add-item { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; min-height: 52px; padding: 8px; border-radius: 12px; color: #d6d6d6; cursor: pointer; transition: .15s; }
    .node-add-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
    .node-add-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: #d9d9d9; font-size: 16px; }
    .node-add-item > span:last-child { display: flex; flex-direction: column; justify-content: center; min-height: 36px; line-height: 1.2; }
    .node-add-item strong { display: block; font-size: 15px; line-height: 18px; margin: 0 0 2px; }
    .node-add-item small { display: block; color: #7f7f7f; font-size: 12px; line-height: 16px; }
    .text-node-editor { position: fixed; display: none; inset: 0; z-index: 100003; pointer-events: none; color: #f2f2f2; }
    .text-node-stage { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); width: min(1040px, calc(100vw - 260px)); min-width: 560px; pointer-events: auto; }
    .text-node-stage.moving, .text-node-stage.resizing { user-select: none; }
    .text-node-card { position: relative; width: 100%; min-height: 320px; height: 520px; max-height: calc(100vh - 260px); margin: 0 auto 16px; border: 2px solid #707070; border-radius: 22px; background: #202020; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 18px 42px rgba(0,0,0,.5); overflow: visible; cursor: move; }
    .text-node-card.selected { border-color: #858585; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 0 0 1px rgba(255,255,255,.1), 0 18px 42px rgba(0,0,0,.5); }
    .text-node-drag-handle { position: absolute; top: -31px; left: 2px; width: 22px; height: 26px; border: none; background: transparent; color: #8f8f8f; cursor: move; display: flex; align-items: center; justify-content: center; font-size: 13px; padding: 0; z-index: 4; }
    .text-node-label { position: absolute; top: -31px; left: 28px; min-width: 42px; max-width: 190px; height: 26px; padding: 0 5px; background: #5aa0ff; color: #fff; font-size: 18px; line-height: 26px; font-weight: 700; outline: none; overflow: hidden; white-space: nowrap; }
    .text-node-label:focus { box-shadow: none; }
    .text-node-placeholder { height: 100%; color: #888; font-size: 20px; line-height: 1.45; cursor: move; white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; padding: 24px 22px; outline: none; border-radius: 20px; background: #202020; user-select: none; -webkit-user-select: none; }
    .text-node-placeholder.editing { cursor: text; user-select: text; -webkit-user-select: text; }
    .text-node-placeholder::-webkit-scrollbar { width: 14px; }
    .text-node-placeholder::-webkit-scrollbar-track { background: transparent; margin: 18px 0; }
    .text-node-placeholder::-webkit-scrollbar-thumb { background: #555; border-radius: 7px; border: 5px solid #202020; min-height: 36px; }
    .text-node-placeholder::-webkit-scrollbar-thumb:hover { background: #686868; }
    .text-node-resize { position: absolute; right: 10px; bottom: 10px; width: 22px; height: 22px; cursor: nwse-resize; opacity: .9; z-index: 5; }
    .text-node-resize::before { content: ""; position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-right: 2px solid #777; border-bottom: 2px solid #777; }
    .text-node-side-plus { position: absolute; top: 110px; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ec4899); color: #fff; border: 2px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; cursor: pointer; z-index: 2; box-shadow: 0 4px 16px rgba(124,58,237,0.4); transition: all .2s; }
    .text-node-side-plus:hover { transform: scale(1.15); box-shadow: 0 6px 24px rgba(124,58,237,0.6); }
    .text-node-side-plus.left { left: -48px; }
    .text-node-side-plus.right { right: -48px; }
    .text-flow-link { position: fixed; inset: 0; display: none; width: 100vw; height: 100vh; z-index: 100004; pointer-events: none; overflow: visible; }
    .text-flow-link path { fill: none; stroke: rgba(120,128,138,.48); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(0,0,0,.18)); }
    .text-flow-link circle { fill: rgba(132,140,150,.82); stroke: rgba(255,255,255,.42); stroke-width: 1.2; }
    .text-flow-menu { position: fixed; display: none; width: 286px; padding: 12px; border-radius: 13px; background: #181818; border: 1px solid #343434; box-shadow: 0 18px 52px rgba(0,0,0,.55); z-index: 100005; color: #d8d8d8; }
    .text-flow-title { padding: 0 2px 10px; color: #9a9a9a; font-size: 14px; }
    .text-flow-item { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: .14s; }
    .text-flow-item:hover, .text-flow-item.primary { background: #2c2c2c; }
    .text-flow-item.loading { background: #2c2c2c; pointer-events: none; opacity: .9; }
    .text-flow-icon { width: 30px; height: 30px; border-radius: 9px; background: #404040; display: flex; align-items: center; justify-content: center; color: #d9d9d9; font-size: 15px; }
    .text-flow-item > span:last-child { display: flex; flex-direction: column; justify-content: center; min-height: 34px; line-height: 1.2; }
    .text-flow-item strong { display: block; color: #eeeeee; font-size: 15px; line-height: 18px; margin: 0 0 2px; }
    .text-flow-item small { display: block; color: #858585; font-size: 12px; line-height: 16px; }
    .text-node-composer { width: 100%; height: 138px; border-radius: 14px; border: 1px solid #3b3b3b; background: #202020; box-shadow: 0 16px 42px rgba(0,0,0,.45); padding: 12px; display: flex; flex-direction: column; }
    .text-node-composer textarea { flex: 1; width: 100%; min-height: 0; resize: none; border: none; outline: none; background: transparent; color: #f2f2f2; padding: 0; font-size: 14px; line-height: 1.45; font-family: inherit; }
    .text-node-composer textarea::placeholder { color: #777; }
    .text-node-actions { display: flex; align-items: center; gap: 10px; min-height: 34px; color: #f2f2f2; font-size: 14px; font-weight: 700; overflow: visible; }
    .text-node-model { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 176px; max-width: 210px; height: 34px; line-height: 34px; border: 1px solid #343434; border-radius: 8px; background: #303030; color: #f2f2f2; font: inherit; font-size: 14px; font-weight: 700; outline: none; cursor: pointer; padding: 0 26px 0 10px; text-align: left; }
    .text-node-model option { background: #303030; color: #f2f2f2; }
    .text-node-model:focus { border-color: #555; background: #343434; }
    .text-node-spacer { flex: 1; }
    .text-node-divider { width: 1px; height: 18px; background: #3b3b3b; }
    .text-node-mini { width: 34px; height: 34px; border: none; border-radius: 9px; background: transparent; color: #d8d8d8; padding: 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
    .text-node-mini:hover { background: #303030; color: #fff; }
    .text-node-send { height: 34px; min-width: 72px; max-width: 172px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.12)); color: #f2f2f2; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-size: 13px; font-weight: 800; line-height: 1; padding: 0 10px 0 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 28px rgba(0,0,0,.22); backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
    .text-node-send:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(255,255,255,.42), rgba(255,255,255,.18)); border-color: rgba(255,255,255,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 16px 34px rgba(0,0,0,.28); }
    .text-node-send i { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.92); color: #181818; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; font-size: 13px; line-height: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 3px 10px rgba(0,0,0,.24); }
    .text-node-send span { display: inline-flex; align-items: center; justify-content: center; line-height: 1; height: 24px; }
    .text-node-send:disabled { opacity: .78; cursor: progress; transform: none; }
    .text-node-close { position: absolute; right: -4px; top: -34px; width: 28px; height: 28px; border: none; border-radius: 50%; background: transparent; color: #888; cursor: pointer; }



    .text-node-editor, .text-node-editor textarea, .text-node-editor select, .text-node-editor button, .text-node-composer, .text-node-actions, .text-node-send, .text-flow-title, .text-flow-item strong, .text-flow-item small { font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; font-size: 14px; }
    .add-menu div, .add-menu div i, .node-add-title, .node-add-item strong, .node-add-item small { font-size: 14px; }
    #rightPanel, #rightPanel textarea, #rightPanel button, #assetTray, #assetTray button, .modal-c, .modal-c input, .modal-c select, .modal-c button, .context-menu, .ctx { font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; font-size: 14px; }
    .msg-txt, .chat-in textarea, .agent-ref-chip, .gen-section label, .gen-section textarea, .gen-section select, .sz-btn, .mode-row button, .agent-gen-prompt, .tray-header span, .tray-tab, .drop-area, .context-menu div, .ctx div { font-size: 14px; }

    /* Global grayscale UI normalization */
    body, button, input, textarea, select, option { font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; letter-spacing: 0; }
    button, input, textarea, select, .modal-c, .ctx, .context-menu, .workspace-action-btn, .startup-select-card, .startup-pill-btn, .startup-selector-col, .startup-selection-bar { border-color: #343434; }
    input, textarea, select { background: #202020; color: #f2f2f2; border: 1px solid #343434; border-radius: 8px; }
    input:focus, textarea:focus, select:focus { border-color: #666 !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .btn-primary, .gen-btn, .team-add, #imageApiSave, #agentApiSave { background: #242424 !important; color: #f2f2f2 !important; border: 1px solid #3a3a3a !important; border-radius: 8px !important; box-shadow: none !important; }
    .btn-primary:hover, .gen-btn:hover, .team-add:hover, #imageApiSave:hover, #agentApiSave:hover { background: #303030 !important; border-color: #5a5a5a !important; transform: none !important; }
    .lt-btn.active, .mode-row button.active { background: #f2f2f2 !important; color: #111 !important; border-color: #f2f2f2 !important; }
    .tray-tab.active, .admin-tab.active { color: #f2f2f2 !important; border-bottom-color: #d8d8d8 !important; }
    .feature-switch input:checked + span { background: #8f8f8f !important; border-color: #d8d8d8 !important; }
    .team-usage-fill { background: #d8d8d8 !important; }
    .agent-ref-chip, .sel-bar button:hover { border-color: #444 !important; background: rgba(255,255,255,.08) !important; color: #f2f2f2 !important; }


    .text-node-side-plus { width: 34px !important; height: 34px !important; border-radius: 50% !important; background: rgba(14,14,14,0.86) !important; color: #f4f4f4 !important; border: 2px solid rgba(245,245,245,0.88) !important; box-shadow: 0 8px 20px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.12) !important; font-size: 0 !important; }
    .text-node-side-plus i { display: none !important; }
    .text-node-side-plus::before, .text-node-side-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 17px; height: 2px; border-radius: 2px; background: #f5f5f5; transform: translate(-50%, -50%); pointer-events: none; }
    .text-node-side-plus::after { width: 2px; height: 17px; }
    .text-node-side-plus:hover { background: rgba(22,22,22,0.94) !important; border-color: #fff !important; box-shadow: 0 10px 24px rgba(0,0,0,.48), inset 0 0 0 1px rgba(255,255,255,.16) !important; }
    .text-node-side-plus.left { left: -55px !important; }
    .text-node-side-plus.right { right: -55px !important; }

    .media-name-editor:focus { border-color: #666 !important; box-shadow: 0 0 0 2px rgba(255,255,255,.12) !important; }
    .ui-delete-btn, .user-delete-btn, .team-delete-btn, .shot-delete-btn { border-color: #444 !important; background: #202020 !important; color: #d8d8d8 !important; }
    .ui-delete-btn:hover, .user-delete-btn:hover, .team-delete-btn:hover, .shot-delete-btn:hover { border-color: #666 !important; background: #292929 !important; color: #fff !important; }
    #app.startup-mode .app-title::before { background: radial-gradient(circle at 35% 35%, #fff 0 10%, transparent 11%), conic-gradient(from 15deg, #f2f2f2, #8f8f8f, #d8d8d8, #5a5a5a, #f2f2f2) !important; box-shadow: 0 0 12px rgba(255,255,255,.12) !important; }
    .team-add, .team-role-select, .team-search, .team-refresh, .team-row, .feature-card, .admin-api-card, .stat-c { border-radius: 8px; }
    .login-box, .modal-c, .startup-selector-col, .startup-selection-bar, .shot-batch-box { border-radius: 16px; }
    .rb-sa, .rb-ad, .rb-ed { background: #2f2f2f !important; color: #f2f2f2 !important; border: 1px solid #444; }

    /* Startup entry final alignment pass */
    .startup-shot-picker {
      --startup-entry-panel-height: 376px;
      --startup-entry-gap: 16px;
      --startup-entry-section-gap: clamp(50px, 4vw, 72px);
      --startup-entry-radius: 8px;
      --startup-entry-card-radius: 8px;
      --startup-entry-panel-bg: #202020;
      --startup-entry-card-bg: #282828;
      --startup-entry-hover-bg: #303030;
      --startup-entry-active-bg: #363636;
      --startup-entry-border: #3a3a3a;
    }
    .startup-module-label {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      text-align: center !important;
    }
    .startup-module-panel,
    .startup-selector-col,
    .startup-selection-bar {
      box-sizing: border-box !important;
      border-color: var(--startup-entry-border) !important;
      border-radius: var(--startup-entry-radius) !important;
      background: var(--startup-entry-panel-bg) !important;
    }
    .startup-module-list,
    .startup-module-stack,
    .startup-list {
      gap: 10px !important;
    }
    .startup-module-item,
    .startup-select-card {
      box-sizing: border-box !important;
      width: 100% !important;
      height: 72px !important;
      min-height: 72px !important;
      border-radius: var(--startup-entry-card-radius) !important;
      background: var(--startup-entry-card-bg) !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-start !important;
      text-align: left !important;
      line-height: normal !important;
      opacity: .76 !important;
    }
    .startup-module-item {
      gap: 10px !important;
    }
    .startup-select-card {
      position: relative !important;
      padding: 12px 44px 12px 12px !important;
    }
    .startup-module-item:hover,
    .startup-select-card:hover {
      background: var(--startup-entry-hover-bg) !important;
      border-color: #666 !important;
      opacity: .92 !important;
    }
    .startup-module-item.active,
    .startup-select-card.active {
      background: var(--startup-entry-active-bg) !important;
      border-color: #a4a4a4 !important;
      opacity: 1 !important;
    }
    .startup-module-thumb {
      flex: 0 0 48px !important;
      border-radius: 8px !important;
    }
    .startup-module-copy,
    .startup-card-main {
      min-width: 0 !important;
      max-width: 100% !important;
      display: grid !important;
      gap: 4px !important;
      justify-items: start !important;
      text-align: left !important;
    }
    .startup-module-copy {
      max-width: calc(100% - 58px) !important;
    }
    .startup-card-row {
      position: relative !important;
      width: 100% !important;
      min-width: 0 !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-start !important;
      text-align: left !important;
    }
    .startup-module-copy strong,
    .startup-module-copy small,
    .startup-card-main,
    .startup-card-main strong,
    .startup-card-main small,
    .startup-select-card > strong,
    .startup-select-card > small,
    .startup-select-card strong,
    .startup-select-card small,
    .startup-shot-card .shot-code {
      max-width: 100% !important;
      text-align: left !important;
      justify-content: flex-start !important;
      align-items: flex-start !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    .startup-card-actions {
      position: absolute !important;
      right: -36px !important;
      top: 50% !important;
      transform: translateY(-50%) !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 4px !important;
    }
    .startup-icon-btn,
    .startup-mini-btn,
    .startup-selection-icon {
      border-radius: 8px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    .startup-icon-btn {
      width: 28px !important;
      height: 28px !important;
    }
    .startup-mini-btn {
      width: 32px !important;
      height: 32px !important;
    }
    .startup-pill-btn,
    .startup-module-action,
    .startup-sort-toggle {
      box-sizing: border-box !important;
      border-radius: 8px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      line-height: 1 !important;
    }
    .startup-pill-btn,
    .startup-module-action {
      height: 36px !important;
      min-height: 36px !important;
      background: #242424 !important;
    }
    .startup-pill-btn:hover,
    .startup-module-action:hover {
      background: var(--startup-entry-hover-bg) !important;
    }
    .startup-sort-toggle {
      height: 28px !important;
      min-height: 28px !important;
    }
    .startup-reference-query {
      min-height: 72px !important;
      border-radius: var(--startup-entry-card-radius) !important;
      background: var(--startup-entry-card-bg) !important;
      display: grid !important;
      align-content: center !important;
      justify-items: start !important;
      text-align: left !important;
    }
    .startup-reference-query strong,
    .startup-reference-query small {
      text-align: left !important;
    }
    .startup-reference-tile,
    .startup-empty {
      border-radius: 8px !important;
    }
    .startup-selection-bar {
      width: 100% !important;
      justify-self: stretch !important;
      min-height: 76px !important;
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr) auto !important;
      align-items: center !important;
      gap: 12px !important;
      padding: 12px !important;
    }
    .startup-selection-icon {
      width: 36px !important;
      height: 36px !important;
      justify-self: center !important;
    }
    .startup-selection-text {
      min-width: 0 !important;
      display: grid !important;
      gap: 5px !important;
      align-content: center !important;
      text-align: left !important;
    }
    .startup-selection-text strong,
    .startup-selection-text span {
      margin: 0 !important;
      text-align: left !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    /* Startup entry text alignment: only the three module titles are centered. */
    .startup-shot-picker .startup-module-label {
      align-items: center !important;
      justify-content: center !important;
      text-align: center !important;
    }
    .startup-shot-picker .startup-module-panel,
    .startup-shot-picker .startup-selector-col,
    .startup-shot-picker .startup-selection-bar,
    .startup-shot-picker .startup-module-head,
    .startup-shot-picker .startup-module-list,
    .startup-shot-picker .startup-module-stack,
    .startup-shot-picker .startup-shot-head,
    .startup-shot-picker .startup-shot-head > div,
    .startup-shot-picker .startup-list,
    .startup-shot-picker .startup-module-item,
    .startup-shot-picker .startup-module-copy,
    .startup-shot-picker .startup-card-row,
    .startup-shot-picker .startup-card-main,
    .startup-shot-picker .startup-reference-query,
    .startup-shot-picker .startup-selection-text {
      text-align: left !important;
    }
    .startup-shot-picker .startup-module-head {
      align-items: center !important;
      justify-content: flex-start !important;
      gap: 12px !important;
    }
    .startup-shot-picker .startup-col-title {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      align-items: center !important;
      justify-content: stretch !important;
      justify-items: stretch !important;
      gap: 10px !important;
    }
    .startup-shot-picker .startup-col-title-restored {
      height: 52px !important;
      align-items: stretch !important;
      gap: 10px !important;
      margin-bottom: 8px !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-main {
      min-width: 0 !important;
      display: grid !important;
      gap: 5px !important;
      align-content: center !important;
      justify-items: start !important;
      justify-self: start !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-name {
      min-width: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 7px !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-name em {
      padding: 3px 7px !important;
      border: 1px solid #3f3f3f !important;
      border-radius: 8px !important;
      background: #2d2d2d !important;
      color: #b8b8b8 !important;
      font-style: normal !important;
      font-size: 11px !important;
      line-height: 1 !important;
      white-space: nowrap !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-main small {
      display: block !important;
      max-width: 140px !important;
      color: #8f8f8f !important;
      font-size: 11px !important;
      line-height: 1.2 !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    .startup-shot-picker .startup-shot-head {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      align-items: flex-end !important;
      justify-content: stretch !important;
      justify-items: stretch !important;
      gap: 18px !important;
    }
    .startup-shot-picker .startup-shot-head > div:first-child {
      min-width: 0 !important;
      justify-self: start !important;
      text-align: left !important;
    }
    .startup-shot-picker .startup-shot-actions,
    .startup-shot-picker .startup-title-tools {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
      justify-self: end !important;
      min-width: max-content !important;
      white-space: nowrap !important;
    }
    .startup-shot-picker .startup-shot-actions {
      gap: 10px !important;
    }
    .startup-shot-picker .startup-title-tools {
      gap: 5px !important;
    }
    .startup-shot-picker .startup-col-title > .startup-sort-toggle {
      justify-self: end !important;
    }
    .startup-shot-picker .startup-module-item {
      display: grid !important;
      grid-template-columns: 48px minmax(0, 1fr) !important;
      align-items: center !important;
      justify-content: stretch !important;
      padding: 12px !important;
      text-align: left !important;
    }
    .startup-shot-picker .startup-select-card {
      display: block !important;
      position: relative !important;
      padding: 12px 44px 12px 12px !important;
      text-align: left !important;
    }
    .startup-shot-picker .startup-card-row {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      align-items: center !important;
      justify-items: stretch !important;
      width: 100% !important;
      text-align: left !important;
    }
    .startup-shot-picker .startup-card-main,
    .startup-shot-picker .startup-module-copy,
    .startup-shot-picker .startup-selection-text {
      display: grid !important;
      gap: 4px !important;
      align-content: center !important;
      justify-items: start !important;
      min-width: 0 !important;
      text-align: left !important;
    }
    .startup-shot-picker .startup-shot-title,
    .startup-shot-picker .startup-shot-kicker,
    .startup-shot-picker .startup-module-head strong,
    .startup-shot-picker .startup-module-head small,
    .startup-shot-picker .startup-col-title,
    .startup-shot-picker .startup-col-title > span:first-child:not(.startup-title-tools),
    .startup-shot-picker .startup-module-copy strong,
    .startup-shot-picker .startup-module-copy small,
    .startup-shot-picker .startup-card-main,
    .startup-shot-picker .startup-card-main strong,
    .startup-shot-picker .startup-card-main small,
    .startup-shot-picker .startup-select-card > strong,
    .startup-shot-picker .startup-select-card > small,
    .startup-shot-picker .startup-select-card strong,
    .startup-shot-picker .startup-select-card small,
    .startup-shot-picker .startup-reference-query,
    .startup-shot-picker .startup-reference-query strong,
    .startup-shot-picker .startup-reference-query small,
    .startup-shot-picker .startup-selection-text,
    .startup-shot-picker .startup-selection-text strong,
    .startup-shot-picker .startup-selection-text span {
      text-align: left !important;
      justify-content: flex-start !important;
      justify-self: start !important;
      align-items: flex-start !important;
    }
    .startup-shot-picker .startup-reference-query {
      display: block !important;
      align-content: initial !important;
      justify-items: stretch !important;
    }
    .startup-shot-picker .startup-col-title > span:first-child:not(.startup-title-tools) {
      align-items: center !important;
    }
    .startup-shot-picker .startup-selection-bar {
      display: grid !important;
      grid-template-columns: 42px minmax(0, 1fr) auto !important;
      align-items: center !important;
      justify-items: stretch !important;
    }
    .startup-shot-picker .startup-card-actions {
      right: 8px !important;
    }
    #leftToolbar {
      box-sizing: border-box !important;
      width: 48px !important;
      background: rgba(18,18,18,.92) !important;
      border-right-color: #343434 !important;
      padding: 10px 6px !important;
      gap: 6px !important;
    }
    .lt-sep {
      background: #343434 !important;
      margin: 6px 0 !important;
    }
    .side-reveal {
      width: 40px !important;
      border-radius: 8px !important;
    }
    .side-reveal.left,
    #app.workspace-mode .side-reveal.left {
      border-radius: 0 8px 8px 0 !important;
    }
    .side-reveal.right {
      border-radius: 8px 0 0 8px !important;
    }
    @media (max-width: 760px) {
      .startup-shot-picker .startup-shot-head {
        grid-template-columns: 1fr !important;
      }
      .startup-shot-picker .startup-shot-actions {
        justify-self: stretch !important;
      }
      .startup-selection-bar {
        grid-template-columns: 1fr !important;
        justify-items: stretch !important;
      }
      .startup-selection-icon {
        justify-self: center !important;
      }
      .startup-selection-bar .startup-pill-btn {
        width: 100% !important;
      }
    }

    /* Startup selector final height lock: keep 项目 / 场次 / 镜头 visually identical. */
    .startup-shot-picker .startup-selector-col {
      padding: 12px !important;
    }
    .startup-shot-picker .startup-col-title,
    .startup-shot-picker .startup-col-title-restored {
      box-sizing: border-box !important;
      height: 48px !important;
      min-height: 48px !important;
      margin-bottom: 10px !important;
      align-items: center !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-main {
      height: 48px !important;
      align-content: center !important;
      gap: 4px !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-name {
      height: 20px !important;
      align-items: center !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-name b,
    .startup-shot-picker .startup-col-title > span:first-child:not(.startup-title-tools) {
      font-size: 13px !important;
      line-height: 20px !important;
    }
    .startup-shot-picker .startup-col-title-restored .startup-col-main small {
      height: 14px !important;
      max-width: 150px !important;
      line-height: 14px !important;
    }
    .startup-shot-picker .startup-title-tools {
      height: 48px !important;
      align-items: center !important;
      gap: 5px !important;
    }
    .startup-shot-picker .startup-sort-toggle {
      box-sizing: border-box !important;
      width: 64px !important;
      min-width: 64px !important;
      max-width: 64px !important;
      height: 28px !important;
      min-height: 28px !important;
      padding: 0 8px !important;
      border-radius: 8px !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 5px !important;
    }
    .startup-shot-picker .startup-mini-btn {
      box-sizing: border-box !important;
      width: 28px !important;
      min-width: 28px !important;
      height: 28px !important;
      min-height: 28px !important;
      border-radius: 8px !important;
      padding: 0 !important;
      align-items: center !important;
      justify-content: center !important;
    }
    .startup-shot-picker .startup-list {
      padding-top: 126px !important;
      padding-bottom: 126px !important;
    }
    .startup-shot-picker .startup-select-card,
    .startup-shot-picker .startup-shot-card {
      box-sizing: border-box !important;
      height: 72px !important;
      min-height: 72px !important;
      padding: 12px 44px 12px 12px !important;
      align-content: center !important;
    }
    .startup-shot-picker .startup-shot-card .shot-code {
      font-size: 15px !important;
      line-height: 1.2 !important;
      font-weight: 900 !important;
      letter-spacing: 0 !important;
    }
    .startup-reference-entry .startup-module-stack,
    .startup-reference-entry .startup-reference-query,
    .startup-reference-entry .startup-module-action,
    .startup-teamwork-entry .startup-module-stack,
    .startup-teamwork-entry .startup-reference-query,
    .startup-teamwork-entry .startup-module-action {
      box-sizing: border-box !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      justify-self: stretch !important;
    }
    .startup-reference-entry .startup-reference-query,
    .startup-teamwork-entry .startup-reference-query {
      display: block !important;
    }
    #app.workspace-mode #leftToolbar {
      top: 50vh !important;
      bottom: auto !important;
      height: auto !important;
      max-height: min(430px, calc(100vh - 96px)) !important;
      transform: translateY(-50%) !important;
      justify-content: center !important;
      overflow-y: auto !important;
      border-radius: 0 8px 8px 0 !important;
      padding: 6px 0 !important;
      gap: 0 !important;
    }
    #app.workspace-mode #leftToolbar > div[style*="flex:1"] {
      display: none !important;
    }
    #app.workspace-mode #leftToolbar .lt-btn {
      width: 34px !important;
      height: 26px !important;
      min-height: 26px !important;
      flex: 0 0 26px !important;
      border-radius: 7px !important;
      font-size: 14px !important;
      margin: 0 !important;
      padding: 0 !important;
    }
    #app.workspace-mode #leftToolbar .lt-sep {
      width: 22px !important;
      height: 1px !important;
      min-height: 1px !important;
      flex: 0 0 1px !important;
      margin: 2px 0 !important;
    }
    #app.workspace-mode.left-peek #leftToolbar,
    #app.workspace-mode.left-open #leftToolbar,
    #app.workspace-mode:has(.side-reveal.left:hover) #leftToolbar,
    #app.workspace-mode #leftToolbar:hover {
      left: 0 !important;
      top: 50vh !important;
      bottom: auto !important;
      transform: translateY(-50%) !important;
    }

    /* Startup module entry: keep the three product entries as one centered group. */
    .startup-shot-picker.module-entry-mode {
      width: min(1060px, calc(100vw - 96px)) !important;
    }
    .startup-shot-picker.module-entry-mode .startup-entry-layout {
      grid-template-columns: repeat(3, minmax(240px, 1fr)) !important;
      column-gap: 18px !important;
      row-gap: 18px !important;
      align-items: stretch !important;
    }
    .startup-shot-picker.module-entry-mode .startup-entry-column,
    .startup-shot-picker.module-entry-mode .startup-teamwork-entry,
    .startup-shot-picker.module-entry-mode .startup-ai-entry,
    .startup-shot-picker.module-entry-mode .startup-reference-entry {
      grid-column: auto !important;
      order: initial !important;
      min-width: 0 !important;
      display: grid !important;
      grid-template-rows: 24px minmax(0, 1fr) !important;
      gap: 10px !important;
    }
    .startup-shot-picker.module-entry-mode .startup-teamwork-entry .startup-module-panel,
    .startup-shot-picker.module-entry-mode .startup-reference-entry .startup-module-panel {
      margin-top: 0 !important;
    }
    .startup-shot-picker.module-entry-mode .startup-module-panel,
    .startup-shot-picker.module-entry-mode .startup-canvas-entry-card {
      box-sizing: border-box !important;
      height: 286px !important;
      min-height: 286px !important;
      max-height: 286px !important;
    }
    .startup-shot-picker.module-entry-mode .startup-canvas-entry-card {
      width: 100% !important;
      align-self: stretch !important;
    }
    .startup-shot-picker.module-entry-mode .startup-module-list,
    .startup-shot-picker.module-entry-mode .startup-module-stack {
      min-height: 0 !important;
      overflow: hidden !important;
    }
    @media (max-width: 960px) {
      .startup-shot-picker.module-entry-mode {
        width: calc(100vw - 32px) !important;
        max-height: calc(100vh - 36px) !important;
        overflow: auto !important;
      }
      .startup-shot-picker.module-entry-mode .startup-entry-layout {
        grid-template-columns: 1fr !important;
      }
      .startup-shot-picker.module-entry-mode .startup-module-panel,
      .startup-shot-picker.module-entry-mode .startup-canvas-entry-card {
        height: auto !important;
        min-height: 238px !important;
        max-height: none !important;
      }
    }

    /* ftrack-inspired production tracking workspace */
    #adminModal.ftrack-pipeline-mode { padding: 0; background: #0c1013; align-items: stretch; justify-content: stretch; }
    #adminModal.ftrack-pipeline-mode .modal-c.lg { width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: none; margin: 8px; border-radius: 5px; background: #20282e; border: 1px solid #323d45; box-shadow: 0 28px 86px rgba(0,0,0,.62); overflow: hidden; }
    #adminModal.ftrack-pipeline-mode .modal-h { flex: 0 0 32px; min-height: 32px; padding: 0 8px 0 10px; background: #13191e; border-bottom: 1px solid #2d363d; color: #d8e0e6; }
    #adminModal.ftrack-pipeline-mode .modal-h h2 { display: inline-flex; align-items: center; gap: 9px; margin: 0; color: #d8e0e6; font-size: 12px; font-weight: 800; line-height: 1; }
    #adminModal.ftrack-pipeline-mode .modal-h h2 i { display: none; }
    #adminModal.ftrack-pipeline-mode .modal-h h2 small { color: #77838d; font-size: 11px; font-weight: 800; }
    .ftrack-logo-word { width: 46px; height: 17px; border-radius: 3px; background: #0d1217; border: 1px solid #2b333a; color: #dce6ed; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 900; letter-spacing: .04em; }
    #adminModal.ftrack-pipeline-mode .modal-actions button { width: auto; min-width: 52px; height: 26px; padding: 0 8px; color: #aeb8c0; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; font-weight: 900; }
    #adminModal.ftrack-pipeline-mode .modal-actions button:hover { background: #252f36; color: #fff; }
    #adminModal.ftrack-pipeline-mode .modal-b { padding: 0; overflow: hidden; background: #20282e; }
    #adminModal.ftrack-pipeline-mode .admin-account-footer { display: none; }
    #adminModal.ftrack-pipeline-mode .admin-tabs { display: none; }
    #adminModal.ftrack-pipeline-mode .admin-tab { height: 42px; padding: 0 16px; color: #c3ccd3; border: 0; border-right: 1px solid rgba(255,255,255,.035); font-size: 13px; font-weight: 800; }
    #adminModal.ftrack-pipeline-mode .admin-tab:hover { background: #242d34; color: #f3f8fb; }
    #adminModal.ftrack-pipeline-mode .admin-tab.active { background: #9f52b9 !important; color: #fff !important; border-bottom: 0 !important; }
    #adminModal.ftrack-pipeline-mode #adminPipeline,
    #adminModal.ftrack-pipeline-mode #adminShots,
    #adminModal.ftrack-pipeline-mode #adminMytasks { height: 100%; overflow: hidden; }
    .ftrack-workbench { height: 100%; min-height: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr); background: #20282e; color: #d7e0e6; font-family: 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .ftrack-sidebar { min-width: 0; background: #172027; border-right: 1px solid #303a42; display: flex; flex-direction: column; overflow: hidden; }
    .ftrack-sidebar-brand { height: 50px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #2c353c; }
    .ftrack-mark { width: 22px; height: 22px; border-radius: 5px; background: #0e1419; border: 1px solid #2c363e; color: #e5eef5; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 900; }
    .ftrack-sidebar-brand strong { display: block; color: #f3f8fb; font-size: 13px; line-height: 1.15; }
    .ftrack-sidebar-brand small { display: block; margin-top: 2px; color: #87949e; font-size: 10px; line-height: 1.1; }
    .ftrack-nav { padding: 8px; display: grid; gap: 10px; border-bottom: 1px solid #2c353c; overflow: auto; }
    .ftrack-nav-group { display: grid; gap: 3px; }
    .ftrack-nav-caption { height: 18px; display: flex; align-items: center; padding: 0 8px; color: #76848e; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
    .ftrack-nav button { height: 30px; border: 0; border-radius: 3px; background: transparent; color: #c4ced6; display: flex; align-items: center; gap: 9px; padding: 0 10px; cursor: pointer; text-align: left; font-size: 12px; font-weight: 800; }
    .ftrack-nav button i { width: 14px; color: #9aa6af; text-align: center; }
    .ftrack-nav button:hover { background: #242d34; color: #fff; }
    .ftrack-nav button.active { background: #2d3740; color: #fff; box-shadow: inset 3px 0 0 #8e4ca8; }
    .ftrack-sidebar-section { padding: 10px 8px; border-bottom: 1px solid #2c353c; min-height: 0; }
    .ftrack-section-title { height: 22px; display: flex; align-items: center; justify-content: space-between; color: #8d99a2; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
    .ftrack-bookmark { height: 26px; display: flex; align-items: center; gap: 8px; color: #c6d0d7; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ftrack-project-list { display: grid; gap: 6px; overflow: hidden; }
    .ftrack-project-row { border: 0; background: transparent; color: #d5dde3; padding: 5px 6px; border-radius: 4px; display: grid; gap: 4px; text-align: left; cursor: pointer; }
    .ftrack-project-row:hover { background: #242d34; }
    .ftrack-project-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.2; }
    .ftrack-project-row small { color: #87949e; font-size: 10px; line-height: 1.15; }
    .ftrack-progress-track { height: 4px; border-radius: 4px; background: #33404a; overflow: hidden; display: flex; }
    .ftrack-progress-fill { height: 100%; background: linear-gradient(90deg, #30b780, #26a0d8, #a45ab9); }
    .ftrack-sidebar-user { margin-top: auto; height: 42px; padding: 0 10px; border-top: 1px solid #2c353c; display: flex; align-items: center; gap: 9px; color: #d8e0e6; font-size: 12px; font-weight: 800; min-width: 0; }
    .ftrack-avatar { width: 22px; height: 22px; border-radius: 50%; background: #30b780; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; flex: 0 0 auto; }
    .ftrack-shell-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
    .ftrack-topline { height: 48px; flex: 0 0 48px; padding: 0 12px; border-bottom: 1px solid #303a42; background: #20282e; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .ftrack-view-title { min-width: 0; display: flex; align-items: center; gap: 10px; color: #f2f7fb; }
    .ftrack-view-title i { color: #c9d1d7; font-size: 14px; }
    .ftrack-view-title div { min-width: 0; display: grid; gap: 3px; }
    .ftrack-view-title strong { font-size: 15px; line-height: 1; font-weight: 900; }
    .ftrack-view-title small { color: #8f9aa3; font-size: 11px; line-height: 1; font-weight: 700; }
    .ftrack-view-tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
    .ftrack-tool-btn { height: 30px; min-width: 30px; border: 1px solid #39444d; border-radius: 4px; background: #242d34; color: #d8e0e6; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-size: 12px; font-weight: 800; }
    .ftrack-tool-btn.primary { background: #8e4ca8; border-color: #a45ab9; color: #fff; }
    .ftrack-tool-btn:hover { background: #2e3942; color: #fff; border-color: #4b5964; }
    .ftrack-tool-btn.primary:hover { background: #a45ab9; border-color: #b86ac9; }
    .ftrack-content { min-width: 0; min-height: 0; flex: 1; overflow: hidden; }
    .ftrack-panel-scroll { height: 100%; overflow: auto; padding: 12px; background: #20282e; }
    .ftrack-dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
    .ftrack-dashboard-card, .ftrack-list-card, .ftrack-timeline-card { border: 1px solid #323d45; border-radius: 4px; background: #1b2329; min-width: 0; }
    .ftrack-dashboard-card { min-height: 86px; padding: 12px; display: grid; align-content: center; gap: 6px; }
    .ftrack-dashboard-card small { color: #8f9aa3; font-size: 11px; font-weight: 900; text-transform: uppercase; }
    .ftrack-dashboard-card strong { color: #f4f8fb; font-size: 24px; line-height: 1; font-weight: 900; }
    .ftrack-dashboard-card span { color: #a9b5bd; font-size: 12px; }
    .ftrack-panel-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 10px; align-items: start; }
    .ftrack-list-card { overflow: hidden; }
    .ftrack-list-head { height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #303a42; color: #d8e0e6; font-size: 12px; font-weight: 900; }
    .ftrack-list-body { display: grid; gap: 0; }
    .ftrack-row { min-height: 38px; padding: 7px 10px; display: grid; grid-template-columns: minmax(0, 1fr) 86px 86px 78px; align-items: center; gap: 10px; border-bottom: 1px solid #2d373f; color: #d7e0e6; font-size: 12px; }
    .ftrack-row:hover { background: #29333b; }
    .ftrack-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
    .ftrack-row small { color: #8f9aa3; font-size: 10px; }
    .ftrack-row div { min-width: 0; }
    .ftrack-status-chip { min-height: 22px; border-radius: 3px; background: #2f3942; color: #dce5eb; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; font-size: 10px; font-weight: 900; }
    .ftrack-status-chip.check { background: #303030; color: #fff; }
    .ftrack-status-chip.retake { background: #303030; color: #fff; }
    .ftrack-status-chip.approve { background: #303030; color: #fff; }
    .ftrack-board { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 10px; }
    .ftrack-board-col { min-height: 340px; border: 1px solid #323d45; border-radius: 4px; background: #1b2329; overflow: hidden; }
    .ftrack-board-head { height: 34px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #303a42; color: #d8e0e6; font-size: 12px; font-weight: 900; }
    .ftrack-task-card { margin: 8px; border: 1px solid #34414a; border-radius: 4px; background: #232c33; padding: 9px; display: grid; gap: 7px; cursor: pointer; }
    .ftrack-task-card:hover { background: #29333b; border-color: #46545f; }
    .ftrack-task-card strong { color: #f3f8fb; font-size: 12px; }
    .ftrack-task-card small { color: #8f9aa3; font-size: 10px; }
    .ftrack-thumb-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
    .ftrack-thumb-card { min-height: 112px; border: 1px solid #323d45; border-radius: 4px; background: #1b2329; overflow: hidden; display: grid; grid-template-rows: 72px auto; }
    .ftrack-thumb-preview { background: #141b20; display: flex; align-items: center; justify-content: center; color: #62707b; font-weight: 900; }
    .ftrack-thumb-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .ftrack-thumb-meta { padding: 7px; display: grid; gap: 3px; color: #d7e0e6; font-size: 11px; }
    .ftrack-timeline-card { padding: 10px; display: grid; gap: 8px; }
    .ftrack-timeline-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 70px; align-items: center; gap: 10px; min-height: 28px; color: #cbd5dc; font-size: 11px; }
    .ftrack-timeline-bar { height: 10px; border-radius: 2px; background: #2f3942; overflow: hidden; }
    .ftrack-timeline-fill { height: 100%; background: linear-gradient(90deg, #30b780, #26a0d8); }
    .ftrack-empty-card { min-height: 180px; border: 1px dashed #3b4852; border-radius: 4px; background: #1b2329; color: #8f9aa3; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; font-weight: 800; }
    .ftrack-view-segment { height: 25px; display: inline-flex; align-items: center; border: 1px solid #39444d; border-radius: 4px; overflow: hidden; background: #1a2228; }
    .ftrack-view-segment button, .ftrack-view-segment span { height: 100%; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-right: 1px solid #39444d; background: transparent; color: #aab5bd; font-size: 11px; font-weight: 900; cursor: pointer; font-family: inherit; }
    .ftrack-view-segment button:last-child, .ftrack-view-segment span:last-child { border-right: 0; }
    .ftrack-view-segment .active { background: #8e4ca8; color: #fff; }
    .ftrack-view-segment button:hover { background: #2b343c; color: #fff; }
    .ftrack-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 10px; }
    .ftrack-project-card { min-height: 168px; border: 1px solid #323d45; border-radius: 4px; background: #1b2329; color: #dce5eb; overflow: hidden; display: grid; grid-template-rows: 72px minmax(0, 1fr); text-align: left; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
    .ftrack-project-card:hover { border-color: #46545f; background: #202a31; }
    .ftrack-project-banner { position: relative; background: linear-gradient(135deg, var(--accent, #30b780), #172027 68%); overflow: hidden; }
    .ftrack-project-banner::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 8px, transparent 8px 18px); opacity: .24; }
    .ftrack-project-banner img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
    .ftrack-project-dot { position: absolute; left: 10px; bottom: 9px; z-index: 2; width: 13px; height: 13px; border-radius: 50%; background: var(--accent, #30b780); border: 2px solid rgba(13,18,23,.86); box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
    .ftrack-project-card-body { padding: 10px; display: grid; gap: 8px; min-width: 0; }
    .ftrack-project-card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
    .ftrack-project-card-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f4f8fb; font-size: 13px; line-height: 1.15; }
    .ftrack-project-card-title small { flex: 0 0 auto; color: #8f9aa3; font-size: 10px; font-weight: 900; }
    .ftrack-project-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .ftrack-project-meta span { min-height: 34px; border: 1px solid #303a42; border-radius: 3px; background: #20282e; padding: 5px 6px; display: grid; gap: 2px; color: #8f9aa3; font-size: 10px; font-weight: 900; }
    .ftrack-project-meta b { color: #dfe7ed; font-size: 12px; line-height: 1; }
    .ftrack-compact-toolbar { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #303a42; background: #1d252b; color: #c9d1d7; }
    .ftrack-compact-toolbar .left, .ftrack-compact-toolbar .right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .ftrack-compact-toolbar small { color: #8f9aa3; font-size: 10px; font-weight: 900; text-transform: uppercase; }
    .ftrack-table-card { border: 1px solid #323d45; border-radius: 4px; background: #1b2329; overflow: auto; }
    .ftrack-spreadsheet { width: 100%; min-width: 980px; border-collapse: collapse; color: #d7e0e6; font-size: 11px; }
    .ftrack-spreadsheet th { height: 30px; padding: 0 8px; border-bottom: 1px solid #303a42; background: #1d252b; color: #c2ccd3; text-align: left; font-weight: 900; white-space: nowrap; }
    .ftrack-spreadsheet td { height: 32px; padding: 0 8px; border-bottom: 1px solid #2d373f; color: #d7e0e6; white-space: nowrap; }
    .ftrack-spreadsheet tr:hover td { background: #28323a; }
    .ftrack-spreadsheet .task-name { color: #35aeea; font-weight: 900; }
    .ftrack-stage-pill { height: 20px; min-width: 72px; border-radius: 3px; color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; font-size: 10px; font-weight: 900; }
    .ftrack-stage-design { background: #8e4ca8; }
    .ftrack-stage-layout { background: #1fa4de; }
    .ftrack-stage-animation { background: #1aae9f; }
    .ftrack-stage-approve { background: #88b942; }
    .ftrack-stage-wait { background: #697781; }
    .ftrack-progress-mini { height: 5px; width: 86px; border-radius: 8px; background: #34414a; overflow: hidden; display: inline-flex; vertical-align: middle; }
    .ftrack-progress-mini span { display: block; height: 100%; background: #28b77e; }
    .ftrack-gantt-card { border: 1px solid #323d45; border-radius: 4px; background: #1b2329; overflow: hidden; }
    .ftrack-gantt { overflow: auto; background: #20282e; }
    .ftrack-gantt-head, .ftrack-gantt-row { display: grid; grid-template-columns: 220px minmax(1044px, 1fr); min-width: 1264px; }
    .ftrack-gantt-head { height: 52px; border-bottom: 1px solid #303a42; background: #1d252b; color: #d8e0e6; font-size: 10px; font-weight: 900; text-transform: uppercase; position: sticky; top: 0; z-index: 2; }
    .ftrack-gantt-left-head, .ftrack-gantt-label { border-right: 1px solid #303a42; display: flex; align-items: center; gap: 8px; padding: 0 10px; min-width: 0; }
    .ftrack-gantt-days { display: grid; grid-template-columns: repeat(18, 58px); background-image: linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 58px 100%; }
    .ftrack-gantt-days span { display: flex; align-items: center; justify-content: center; border-right: 1px solid rgba(255,255,255,.03); color: #c8d1d8; }
    .ftrack-gantt-row { height: 42px; border-bottom: 1px solid #2d373f; color: #d7e0e6; font-size: 11px; }
    .ftrack-gantt-row:hover { background: #26313a; }
    .ftrack-gantt-label { background: #20282e; }
    .ftrack-gantt-label .swatch { width: 11px; height: 11px; border-radius: 50%; background: var(--accent, #30b780); flex: 0 0 auto; }
    .ftrack-gantt-label strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
    .ftrack-gantt-label small { color: #8f9aa3; font-size: 10px; margin-left: auto; }
    .ftrack-gantt-lane { position: relative; min-width: 1044px; background-image: linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px), repeating-linear-gradient(135deg, transparent 0 18px, rgba(0,0,0,.12) 18px 36px); background-size: 58px 100%, 232px 100%; }
    .ftrack-gantt-bar { position: absolute; top: 8px; left: calc(var(--start, 0) * 58px + 4px); width: calc(var(--span, 4) * 58px - 8px); height: 25px; border-radius: 3px; background: var(--accent, #30b780); color: #fff; display: flex; align-items: center; gap: 8px; padding: 0 8px; overflow: hidden; font-size: 10px; font-weight: 900; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 0 rgba(0,0,0,.2); }
    .ftrack-gantt-bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.16) 0 8px, transparent 8px 17px); opacity: .42; pointer-events: none; }
    .ftrack-gantt-bar span, .ftrack-gantt-bar small { position: relative; z-index: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ftrack-gantt-bar small { margin-left: auto; opacity: .9; }
    .ftrack-report-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 10px; align-items: start; }
    .ftrack-widget-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ftrack-chart-card { border: 1px solid #323d45; border-radius: 4px; background: #1b2329; min-height: 208px; padding: 12px; display: grid; gap: 12px; }
    .ftrack-chart-card h3 { margin: 0; color: #d8e0e6; font-size: 12px; line-height: 1; font-weight: 900; }
    .ftrack-donut { width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(#d8d8d8 0 var(--approved, 35%), #a4a4a4 var(--approved, 35%) var(--check, 62%), #777 var(--check, 62%) var(--retake, 78%), #3a4650 var(--retake, 78%) 100%); margin: 4px auto; position: relative; }
    .ftrack-donut::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; background: #1b2329; border: 1px solid #323d45; }
    .ftrack-legend { display: grid; gap: 6px; color: #aab5bd; font-size: 11px; }
    .ftrack-legend span { display: flex; align-items: center; gap: 7px; }
    .ftrack-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
    .ftrack-bar-list { display: grid; gap: 8px; }
    .ftrack-bar-row { display: grid; grid-template-columns: 98px minmax(0, 1fr) 42px; gap: 8px; align-items: center; color: #cbd5dc; font-size: 11px; }
    .ftrack-bar-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
    .ftrack-bar-row .track { height: 12px; border-radius: 2px; background: #303a42; overflow: hidden; }
    .ftrack-bar-row .fill { display: block; height: 100%; background: linear-gradient(90deg, #8e4ca8, #1fa4de, #28b77e); }
    .ftrack-kanban { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 10px; min-width: 920px; }
    .ftrack-kanban-col { min-height: 520px; border: 1px solid #323d45; border-radius: 4px; background: #1b2329; overflow: hidden; display: flex; flex-direction: column; }
    .ftrack-kanban-head { height: 36px; padding: 0 10px; border-bottom: 1px solid #303a42; background: #1d252b; color: #d8e0e6; display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 900; }
    .ftrack-kanban-head small { color: #8f9aa3; font-size: 10px; }
    .ftrack-kanban-body { padding: 8px; display: grid; gap: 8px; align-content: start; overflow: auto; }
    .ftrack-kanban-card { border: 1px solid #34414a; border-radius: 4px; background: #232c33; padding: 9px; display: grid; gap: 7px; color: #d7e0e6; text-align: left; cursor: pointer; }
    .ftrack-kanban-card:hover { background: #29333b; border-color: #46545f; }
    .ftrack-kanban-card strong { color: #f3f8fb; font-size: 12px; line-height: 1.2; }
    .ftrack-kanban-card small { color: #8f9aa3; font-size: 10px; line-height: 1.25; }
    .ftrack-kanban-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .ftrack-task-columns { overflow: auto; border: 1px solid #323d45; border-radius: 4px; background: #1b2329; }
    .ftrack-task-columns table { width: 100%; min-width: 1040px; border-collapse: collapse; color: #d7e0e6; font-size: 11px; }
    .ftrack-task-columns th, .ftrack-task-columns td { height: 34px; padding: 0 8px; border-bottom: 1px solid #2d373f; border-right: 1px solid #2d373f; white-space: nowrap; text-align: left; }
    .ftrack-task-columns th { position: sticky; top: 0; z-index: 1; background: #1d252b; color: #c2ccd3; font-weight: 900; }
    .ftrack-task-columns tr:hover td { background: #28323a; }
    .ftrack-task-columns .shot-cell { color: #35aeea; font-weight: 900; }
    .ftrack-settings-shell { min-height: 640px; border: 1px solid #323d45; border-radius: 4px; background: #10161a; display: grid; grid-template-columns: 230px minmax(0, 1fr); overflow: hidden; }
    .ftrack-settings-menu { border-right: 1px solid #2d363d; background: #151c21; padding: 14px 0; display: grid; align-content: start; gap: 2px; }
    .ftrack-settings-menu button { height: 31px; border: 0; background: transparent; color: #c4ced6; text-align: left; padding: 0 16px; font-size: 12px; font-weight: 900; cursor: pointer; }
    .ftrack-settings-menu button:hover { background: #20282e; color: #fff; }
    .ftrack-settings-menu button.active { color: #d98ce7; background: #20282e; box-shadow: inset 3px 0 0 #a45ab9; }
    .ftrack-settings-menu .menu-gap { height: 14px; }
    .ftrack-settings-main { padding: 28px 42px; overflow: auto; }
    .ftrack-settings-block { max-width: 980px; display: grid; gap: 0; border-top: 1px solid #29333b; }
    .ftrack-settings-row { min-height: 86px; display: grid; grid-template-columns: minmax(0,1fr) 82px; gap: 18px; align-items: center; border-bottom: 1px solid #29333b; }
    .ftrack-settings-row strong { color: #f3f8fb; font-size: 14px; line-height: 1.2; }
    .ftrack-settings-row small { display: block; margin-top: 7px; color: #8f9aa3; font-size: 12px; line-height: 1.35; }
    .ftrack-switch { justify-self: end; width: 38px; height: 20px; border-radius: 999px; background: #303941; border: 1px solid #252d33; position: relative; box-shadow: inset 0 1px 3px rgba(0,0,0,.42); }
    .ftrack-switch::after { content: ""; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; border-radius: 50%; background: #dce3e8; box-shadow: 0 1px 6px rgba(0,0,0,.45); }
    .ftrack-switch.on { background: #806098; border-color: #9f6cb3; }
    .ftrack-switch.on::after { left: 19px; background: #d98ce7; }
    .ftrack-token-list { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
    .ftrack-token { min-height: 22px; border-radius: 4px; background: #20363d; color: #dce5eb; display: inline-flex; align-items: center; gap: 6px; padding: 0 7px; font-size: 11px; font-weight: 900; }
    .ftrack-token i { width: 8px; height: 8px; border-radius: 50%; background: #27dbe4; display: inline-block; }
    .ftrack-alert { min-height: 34px; border: 1px solid #3a4854; border-radius: 4px; background: #1a252d; color: #dbe7ef; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; margin-bottom: 10px; font-size: 12px; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
    .ftrack-alert strong { color: #f3f8fb; font-size: 12px; }
    .ftrack-alert small { color: #9aa8b2; font-size: 11px; }
    .ftrack-action-row { min-height: 36px; border-top: 1px solid #303a42; background: #1d252b; display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 6px 8px; }
    .ftrack-inline-input { height: 28px; border: 1px solid #38434c; border-radius: 4px; background: #172027; color: #dce5eb; padding: 0 8px; font-size: 12px; font-weight: 800; }
    .ftrack-reference-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 10px; align-items: start; }
    .ftrack-reference-searchbar { height: 38px; border-bottom: 1px solid #303a42; background: #1d252b; display: flex; align-items: center; gap: 8px; padding: 0 10px; }
    .ftrack-reference-searchbar input { flex: 1; min-width: 0; height: 28px; border: 1px solid #38434c; border-radius: 4px; background: #172027; color: #dce5eb; padding: 0 9px; font-size: 12px; }
    .ftrack-reference-strip { display: grid; grid-template-columns: repeat(4, minmax(96px, 1fr)); gap: 8px; padding: 10px; }
    .ftrack-reference-thumb { min-height: 118px; border: 1px solid #323d45; border-radius: 4px; background: linear-gradient(135deg, #182c3f, #1b2329 55%, #7b4b26); display: grid; grid-template-rows: 76px auto; overflow: hidden; color: #d7e0e6; }
    .ftrack-reference-thumb span { display: flex; align-items: center; justify-content: center; color: #7f8e98; font-weight: 900; }
    .ftrack-reference-thumb strong { padding: 7px; font-size: 11px; line-height: 1.2; }
    .ftrack-eval-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
    .ftrack-eval-tile { min-height: 76px; border: 1px solid #303a42; border-radius: 4px; background: #20282e; padding: 10px; display: grid; align-content: center; gap: 5px; }
    .ftrack-eval-tile small { color: #8f9aa3; font-size: 10px; font-weight: 900; text-transform: uppercase; }
    .ftrack-eval-tile strong { color: #f4f8fb; font-size: 19px; line-height: 1; }
    .reference-module-modal { position: fixed; inset: 0; z-index: 99970; display: none; background: #111417; color: #d8d8d8; font-family: 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-module-modal button, .reference-module-modal input, .reference-module-modal textarea, .reference-module-modal select, .reference-module-modal option { font-family: 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-module-modal.open { display: block; }
    .reference-workbench { --reference-workbench-left: 8px; --reference-workbench-right: 8px; position: absolute; inset: 8px; border: 1px solid #4b4f55; border-radius: 8px; background: #2e3033; overflow: hidden; display: grid; grid-template-rows: 36px minmax(0, 1fr); box-shadow: 0 30px 90px rgba(0,0,0,.66); }
    .reference-window-bar { height: 36px; background: #46484b; border-bottom: 1px solid #25282b; display: grid; grid-template-columns: 260px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 10px; color: #ededed; }
    .reference-traffic { display: inline-flex; align-items: center; gap: 8px; }
    .reference-dot { width: 12px; height: 12px; border-radius: 50%; background: #7a7d80; }
    .reference-dot.red { background: #ff5f57; }
    .reference-dot.yellow { background: #ffbd2e; }
    .reference-dot.green { background: #28c840; }
    .reference-titlebar { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: #dcdfe2; font-size: 12px; font-weight: 800; }
    .reference-titlebar strong { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
    .reference-titlebar small { color: #b6bcc2; font-size: 11px; font-weight: 800; }
    .reference-window-actions { display: inline-flex; align-items: center; gap: 7px; }
    .reference-icon-btn { width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; color: #d9dde1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; }
    .reference-icon-btn:hover { background: #5a5d60; color: #fff; }
    /* Reference Library 顶部 teamwork 一级菜单：默认隐藏；仅从 teamwork 入口进入时显示，样式对齐 teamwork 一级菜单。 */
    .reference-teamwork-nav { display: none; }
    #referenceModule[data-from-teamwork="1"] .reference-workbench { grid-template-rows: 38px 36px minmax(0, 1fr) !important; }
    #referenceModule[data-from-teamwork="1"] .reference-teamwork-nav { display: flex; align-items: stretch; height: 38px; background: #0b0c0e; border-bottom: 1px solid #34363a; }
    .reference-teamwork-nav button { width: 92px; min-width: 92px; height: 38px; border: 0; border-right: 1px solid #25272b; background: #0b0c0e; color: #f0f0f0; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
    .reference-teamwork-nav button:hover { background: #202124; color: #fff; }
    .reference-teamwork-nav button.active { background: #202124; color: #fff; box-shadow: inset 0 -2px 0 #fff; cursor: default; }
    .reference-shell { --reference-sidebar-w: 286px; --reference-inspector-w: 336px; position: relative; min-width: 0; min-height: 0; display: grid; grid-template-columns: var(--reference-sidebar-w) minmax(0, 1fr) var(--reference-inspector-w); background: #202327; }
    .reference-shell.sidebar-collapsed { grid-template-columns: 14px minmax(0, 1fr) var(--reference-inspector-w); }
    .reference-shell.inspector-collapsed { grid-template-columns: var(--reference-sidebar-w) minmax(0, 1fr) 14px; }
    .reference-shell.sidebar-collapsed.inspector-collapsed { grid-template-columns: 14px minmax(0, 1fr) 14px; }
    .reference-sidebar { min-width: 0; min-height: 0; background: #202327; border-right: 1px solid #16191c; overflow: auto; padding: 10px; color: #d1d5d9; display: flex; flex-direction: column; gap: 10px; }
    .reference-shell.sidebar-collapsed .reference-sidebar { padding: 0; overflow: hidden; border-right-color: #1f252b; }
    .reference-shell.sidebar-collapsed .reference-sidebar > * { display: none; }
    .reference-layout-resizer { position: absolute; top: 0; bottom: 0; z-index: 3; width: 10px; cursor: col-resize; touch-action: none; user-select: none; }
    .reference-layout-resizer::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; border-radius: 2px; background: transparent; }
    .reference-layout-resizer:hover::before, .reference-shell[data-layout-drag-side="sidebar"] .reference-sidebar-resizer::before, .reference-shell[data-layout-drag-side="inspector"] .reference-inspector-resizer::before { background: #2f8dff; box-shadow: 0 0 0 1px rgba(47,141,255,.28); }
    .reference-sidebar-resizer { left: calc(var(--reference-sidebar-w) - 5px); }
    .reference-inspector-resizer { right: calc(var(--reference-inspector-w) - 5px); }
    .reference-shell.sidebar-collapsed .reference-sidebar-resizer, .reference-shell.inspector-collapsed .reference-inspector-resizer { display: none; }
    body.reference-layout-dragging { cursor: col-resize; user-select: none; }
    .reference-sidebar-toggle { position: absolute; z-index: 4; left: calc(var(--reference-sidebar-w) - 9px); top: 50%; transform: translateY(-50%); width: 18px; height: 48px; border: 1px solid #3e464f; border-left-color: #4c5560; border-radius: 7px; background: #4a4d51; color: #c7ccd1; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.34); transition: background .12s ease, border-color .12s ease, color .12s ease; }
    .reference-sidebar-toggle:hover { background: #575b60; color: #fff; }
    .reference-sidebar-toggle:active { transform: translateY(-50%); }
    .reference-shell.sidebar-collapsed .reference-sidebar-toggle { left: 5px; }
    .reference-sidebar-toggle i { font-size: 11px; }
    .reference-inspector-toggle { position: absolute; z-index: 4; right: calc(var(--reference-inspector-w) - 9px); top: 50%; transform: translateY(-50%); width: 18px; height: 48px; border: 1px solid #3e464f; border-right-color: #4c5560; border-radius: 7px; background: #4a4d51; color: #c7ccd1; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,.34); transition: background .12s ease, border-color .12s ease, color .12s ease; }
    .reference-inspector-toggle:hover { background: #575b60; color: #fff; }
    .reference-inspector-toggle:active { transform: translateY(-50%); }
    .reference-shell.inspector-collapsed .reference-inspector-toggle { right: 5px; }
    .reference-inspector-toggle i { font-size: 11px; }
    .reference-library-brand { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 8px 8px; border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 8px; }
    .reference-logo { width: 25px; height: 25px; border-radius: 8px; background: radial-gradient(circle at 38% 34%, #f4fbff 0 18%, transparent 19%), conic-gradient(from 12deg, #2c8cff, #67d4ff, #2d6be6, #1d48af, #2c8cff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); flex: 0 0 auto; }
    .reference-library-brand strong { display: block; color: #f4f6f8; font-size: 13px; line-height: 1.1; }
    .reference-library-brand small { display: block; margin-top: 3px; color: #a7afb7; font-size: 10px; line-height: 1.1; }
    .reference-library-path { display: grid; gap: 4px; margin: 0 0 9px; padding: 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; background: #1e2227; }
    .reference-library-path span { color: #8f98a1; font-size: 10px; font-weight: 900; text-transform: uppercase; }
    .reference-library-path strong { min-width: 0; color: #dce4ea; font-size: 11px; line-height: 1.3; font-weight: 900; overflow-wrap: anywhere; }
    .reference-nav-section { display: grid; gap: 2px; margin: 8px 0 13px; }
    .reference-section-label { height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; color: #a5acb3; font-size: 11px; font-weight: 800; }
    .reference-nav-row { width: 100%; height: 26px; border: 0; border-radius: 3px; background: transparent; color: #d4d9dd; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 0 8px; cursor: pointer; text-align: left; font: 800 12px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-nav-row i { width: 16px; color: #b7bdc3; text-align: center; font-size: 12px; }
    .reference-nav-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-nav-row small { color: #9aa2aa; font-size: 10px; font-weight: 800; }
    .reference-nav-row:hover { background: #3a3c40; color: #fff; }
    .reference-nav-row.active { background: #4b4d52; color: #fff; }
    .reference-nav-row.folder { grid-template-columns: 14px 20px minmax(0,1fr) auto; padding-left: 6px; }
    .reference-nav-row.folder i:first-child { width: 10px; font-size: 9px; color: #9aa2aa; }
    .reference-sidebar::-webkit-scrollbar { width: 8px; }
    .reference-sidebar::-webkit-scrollbar-thumb { background: #454b52; border-radius: 999px; }
    .reference-library-brand.reference-library-brand-v2 { min-height: 58px; height: auto; align-items: flex-start; padding: 8px; margin: 0; border: 1px solid #313a44; border-radius: 8px; background: #232a31; }
    .reference-brand-main { min-width: 0; flex: 1; display: grid; gap: 6px; }
    .reference-brand-title { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .reference-brand-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .reference-brand-title small { flex: 0 0 auto; min-height: 18px; border-radius: 4px; background: #17232e; color: #91c8ff; padding: 0 5px; display: inline-flex; align-items: center; font-size: 9px; font-weight: 900; }
    .reference-brand-edit { min-width: 0; height: 28px; border: 1px solid #394550; border-radius: 6px; background: #161c22; color: #edf4f7; padding: 0 8px; font: 900 11px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; outline: none; }
    .reference-brand-edit:focus, .reference-sidebar-field select:focus, .reference-library-path input:focus { border-color: #5fa4aa; box-shadow: 0 0 0 2px rgba(95,164,170,.18); }
    .reference-library-path.reference-library-path-v2 { margin: 0; border-radius: 8px; border-color: #313a44; background: #171d23; padding: 8px; display: grid; gap: 7px; }
    .reference-path-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #9ba7b2; font-size: 10px; font-weight: 900; text-transform: none; }
    .reference-path-label small { color: #6f7a84; font-size: 9px; font-weight: 900; }
    .reference-library-path input { width: 100%; min-width: 0; height: 30px; border: 1px solid #394550; border-radius: 6px; background: #10161b; color: #dfe8ee; padding: 0 8px; font: 900 11px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; outline: none; }
    .reference-sidebar-section { min-width: 0; border: 1px solid #343a41; border-radius: 7px; background: #24282d; padding: 8px; display: grid; gap: 8px; }
    .reference-sidebar-section-head { min-width: 0; min-height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #dce5ec; font-size: 11px; font-weight: 900; }
    .reference-sidebar-section-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-sidebar-section-head small { color: #8f9ba6; font-size: 10px; font-weight: 900; }
    .reference-sidebar-mini-action { width: 24px; height: 24px; min-width: 24px; border: 1px solid #3a3f45; border-radius: 5px; background: #2f3439; color: #b8c4ce; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
    .reference-sidebar-mini-action:hover { border-color: #565d64; color: #f2f7fb; background: #3a3f45; }
    .reference-metric-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .reference-metric { min-width: 0; min-height: 42px; border: 1px solid #343a41; border-radius: 6px; background: #1b1f23; padding: 7px; display: grid; align-content: center; gap: 3px; }
    .reference-metric strong { color: #edf4f8; font-size: 16px; line-height: 1; }
    .reference-metric span { color: #8f9ba6; font-size: 9px; font-weight: 900; }
    .reference-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .reference-control-btn, .reference-mode-btn { min-width: 0; min-height: 30px; border: 1px solid #3a3f45; border-radius: 6px; background: #2f3439; color: #cbd6df; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 7px; cursor: pointer; font: 900 10px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-control-btn:hover, .reference-mode-btn:hover { border-color: #565d64; color: #f1f6fa; background: #3a3f45; }
    .reference-control-btn.active, .reference-mode-btn.active { border-color: #65727d; color: #f4f8fb; background: #3c474f; }
    .reference-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .reference-sidebar-select-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .reference-sidebar-field { min-width: 0; display: grid; gap: 4px; color: #9ba7b2; font-size: 10px; font-weight: 900; }
    .reference-sidebar-field.wide { grid-column: 1 / -1; }
    .reference-sidebar-field select { width: 100%; min-width: 0; height: 28px; border: 1px solid #3a3f45; border-radius: 6px; background: #1b1f23; color: #e6eef4; padding: 0 7px; font: 900 10px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; outline: none; }
    .reference-nav-section.reference-nav-section-v2 { margin: 0; gap: 5px; }
    .reference-nav-row { height: 32px; border: 1px solid transparent; border-radius: 7px; grid-template-columns: 24px minmax(0, 1fr) auto; background: transparent; padding: 0 7px; justify-items: start; }
    .reference-sidebar .reference-nav-row { display: grid; align-items: center; justify-content: stretch; text-align: left; }
    .reference-nav-row i { width: 18px; color: #94a2ad; }
    .reference-nav-row span { min-width: 0; width: 100%; line-height: 1.05; text-align: left; }
    .reference-nav-row em { display: block; margin-top: 2px; color: #73808b; font-style: normal; font-size: 9px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-nav-row:hover { background: #30343a; border-color: #454b52; }
    .reference-nav-row.active { background: #30363c; border-color: #5a6269; color: #eef3f7; }
    .reference-nav-row.active i { color: #d7dde2; }
    .reference-nav-row small { min-width: 24px; min-height: 18px; border-radius: 999px; background: #1b1f23; display: inline-flex; align-items: center; justify-content: center; justify-self: end; padding: 0 5px; color: #aeb8c2; font-size: 9px; }
    .reference-nav-section-v2 .reference-nav-row { grid-template-columns: 24px minmax(0, 1fr); }
    .reference-nav-row.folder { grid-template-columns: 24px minmax(0, 1fr) auto; padding-left: 7px; }
    .reference-nav-row.folder i:first-child { width: 18px; font-size: 12px; color: #94a2ad; }
    .reference-folder-nav-line, .reference-saved-filter-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 24px 24px; gap: 5px; align-items: center; }
    .reference-folder-nav-line .reference-nav-row, .reference-saved-filter-row .reference-nav-row { min-width: 0; }
    .reference-row-edit { width: 24px; height: 24px; border: 1px solid #343a41; border-radius: 5px; background: #252a2f; color: #94a2ad; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; font-size: 10px; }
    .reference-row-edit:hover { border-color: #565d64; color: #edf4f8; background: #343a40; }
    .reference-sidebar-empty { min-height: 30px; display: flex; align-items: center; color: #78848e; font-size: 10px; line-height: 1.4; }
    .reference-local-filter-section { min-height: 134px; border-color: #343a41; box-shadow: none; }
    .reference-local-filter-path { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 6px; }
    .reference-local-filter-path input { min-width: 0; width: 100%; height: 24px; border: 1px solid #3a3f45; border-radius: 5px; background: #1b1f23; color: #e5edf4; padding: 0 7px; font: 800 10px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; outline: none; }
    .reference-local-filter-path input:focus { border-color: #5fa4aa; box-shadow: 0 0 0 2px rgba(95,164,170,.16); }
    .reference-local-filter-tree { max-height: 120px; min-height: 42px; overflow: auto; border: 1px solid #343a41; border-radius: 6px; background: #1b1f23; padding: 4px; display: grid; align-content: start; gap: 1px; }
    .reference-local-filter-tree .reference-local-tree-row { height: 23px; }
    .reference-local-filter-tree .reference-local-tree-open { height: 20px; font-size: 10px; }
    .reference-local-filter-tree .reference-local-tree-open i { font-size: 11px; }
    .reference-local-filter-tree .reference-local-tree-empty { height: 22px; font-size: 10px; }
    .reference-local-filter-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7e8a95; font-size: 9px; font-weight: 800; }
    .reference-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: 47px 42px minmax(0, 1fr); background: #24272b; overflow: hidden; }
    .reference-main.reference-video-workbench { grid-template-rows: auto minmax(0, 1fr); }
    .reference-toolbar { min-height: 46px; border-bottom: 1px solid #24272a; background: #2f3134; display: grid; grid-template-columns: minmax(310px, .58fr) minmax(360px, 1fr) auto; align-items: center; gap: 8px; padding: 7px 10px; }
    .reference-path { min-width: 0; display: inline-flex; align-items: center; gap: 6px; color: #e4e7ea; font-size: 12px; font-weight: 900; }
    .reference-path input,
    .reference-path select { flex: 1; min-width: 120px; height: 30px; border: 1px solid #454b52; border-radius: 5px; background: #25282c; color: #eef2f5; padding: 0 8px; outline: none; font: 900 12px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-path input:focus,
    .reference-path select:focus { border-color: #5fa4aa; box-shadow: 0 0 0 2px rgba(95,164,170,.16); }
    .reference-path span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-path-action { width: 30px; height: 30px; min-width: 30px; border: 1px solid #444a50; border-radius: 5px; background: #393c40; color: #dce3e8; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
    .reference-path-action:hover { background: #464a4f; border-color: #5a6269; color: #fff; }
    .reference-searchbar-wrap { min-width: 0; display: flex; align-items: center; }
    .reference-searchbox { min-width: 0; width: 100%; height: 30px; border: 1px solid #4b5055; border-radius: 5px; background: #242629; color: #dfe4e8; display: flex; align-items: center; gap: 6px; padding: 0 7px 0 4px; }
    .reference-searchbox > i { flex: 0 0 auto; color: #aeb5bc; font-size: 12px; }
    .reference-searchbox input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: #eef2f5; font: 800 12px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-searchbox input::placeholder { color: #8e969e; }
    .reference-toolbar-actions { display: inline-flex; align-items: center; gap: 7px; }
    .reference-tool-btn { height: 30px; min-width: 30px; border: 1px solid #4b5055; border-radius: 5px; background: #3a3d41; color: #e0e5e9; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font: 900 12px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-tool-btn:hover { background: #46494e; border-color: #5d6369; color: #fff; }
    .reference-tool-btn.primary { background: #2878d9; border-color: #3889ec; color: #fff; }
    .reference-tool-btn.primary:hover { background: #3489ee; }
    .reference-tool-btn.exact-on { background: #d6a92b; border-color: #f0c65a; color: #17120a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
    .reference-tool-btn.semantic-on { background: #1e6ec8; border-color: #3f9cff; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
    .reference-tool-btn.semantic-busy { pointer-events: none; opacity: .72; }
    .reference-ingest-wrap { display: inline-flex; align-items: center; }
    .reference-ingest-trigger { border-color: #8a4d24; background: #7a3d16; color: #fff1e5; }
    .reference-ingest-trigger:hover { border-color: #b7632b; background: #9a4c18; color: #fff; }
    .reference-ingest-trigger.panel-open { border-color: #e07a32; background: #9a4c18; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
    .reference-ingest-workbench { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; color: #e6e6e6; }
    .reference-ingest-hero { min-width: 0; border: 1px solid #30363b; border-radius: 6px; background: #1b1f22; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; }
    .reference-ingest-hero-title { min-width: 0; display: grid; gap: 5px; }
    .reference-ingest-kicker { color: #9ca6af; font-size: 10px; font-weight: 900; letter-spacing: 0; }
    .reference-ingest-hero-title strong { color: #f2f6f8; font-size: 16px; line-height: 1.2; }
    .reference-ingest-hero-title small { min-width: 0; color: #9ca6af; font-size: 11px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-ingest-hero-actions { display: inline-flex; align-items: center; gap: 8px; }
    .reference-ingest-layout { min-height: 0; display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 10px; overflow: hidden; }
    .reference-ingest-panel,
    .reference-ingest-side { min-width: 0; min-height: 0; border: 1px solid #30363b; border-radius: 6px; background: #1b1f22; padding: 12px; overflow: auto; }
    .reference-ingest-panel { display: grid; align-content: start; gap: 12px; }
    .reference-ingest-side { display: grid; align-content: start; gap: 10px; }
    .reference-ingest-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #30363b; }
    .reference-ingest-title { min-width: 0; display: grid; gap: 2px; }
    .reference-ingest-title strong { color: #f4f4f4; font-size: 13px; line-height: 1.15; }
    .reference-ingest-title small { color: #9b9b9b; font-size: 10px; font-weight: 800; }
    .reference-ingest-status { height: 22px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #30363b; border-radius: 999px; background: #15191c; color: #d2d8dc; padding: 0 8px; font-size: 10px; font-weight: 900; white-space: nowrap; }
    .reference-ingest-status.on { border-color: #8a4d24; background: rgba(209,92,21,.16); color: #ffb16e; }
    .reference-ingest-close { width: 24px; height: 24px; min-width: 24px; border: 1px solid #30363b; border-radius: 4px; background: #15191c; color: #c9d8dc; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
    .reference-ingest-close:hover { border-color: #4a535b; background: #24292d; color: #fff; }
    .reference-ingest-row { min-width: 0; display: grid; gap: 5px; }
    .reference-ingest-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #a8a8a8; font-size: 10px; font-weight: 900; }
    .reference-ingest-row-head output { color: #f1f1f1; font-size: 10px; font-variant-numeric: tabular-nums; }
    .reference-ingest-row input[type="range"] { width: 100%; accent-color: #8aa39d; }
    .reference-ingest-path input { min-width: 0; width: 100%; height: 28px; border: 1px solid #30363b; border-radius: 4px; background: #12171a; color: #eef2f4; padding: 0 8px; font-size: 11px; font-weight: 800; outline: none; }
    .reference-ingest-path input:focus { border-color: #6f807a; box-shadow: 0 0 0 2px rgba(138,163,157,.12); }
    .reference-ingest-model-select { position: relative; min-width: 0; z-index: 5; }
    .reference-ingest-model-select.open { z-index: 60; }
    .reference-ingest-model-trigger { width: 100%; height: 28px; min-width: 0; border: 1px solid #30363b; border-radius: 4px; background: #171b1e; color: #eef4f6; padding: 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 8px; font-size: 11px; font-weight: 900; text-align: left; cursor: pointer; }
    .reference-ingest-model-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-ingest-model-trigger:hover,
    .reference-ingest-model-trigger:focus { border-color: #6f807a; background: #1b1f22; box-shadow: 0 0 0 1px rgba(138,163,157,.14); outline: none; }
    .reference-ingest-model-menu { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 60; display: none; border: 1px solid #30363b; border-radius: 5px; background: #1b1f22; box-shadow: 0 10px 24px rgba(0,0,0,.5); padding: 4px; }
    .reference-ingest-model-select.open .reference-ingest-model-menu { display: grid !important; gap: 3px; }
    .reference-ingest-model-option { position: relative; min-width: 0; width: 100%; min-height: 30px; border: 1px solid #30363b; border-radius: 4px; background: #171b1e; color: #d8e0df; padding: 6px 8px; display: grid; grid-template-columns: minmax(0, 1fr) 12px; align-items: center; gap: 4px 8px; font-size: 11px; font-weight: 900; text-align: left; cursor: pointer; }
    .reference-ingest-model-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-ingest-model-option:hover,
    .reference-ingest-model-option:focus { border-color: #6f807a; background: #202826; color: #ffffff; outline: none; }
    .reference-ingest-model-option.active { border-color: #6f807a; background: #202826; color: #ffffff; }
    .reference-ingest-model-option.active:hover,
    .reference-ingest-model-option.active:focus { border-color: #8aa39d; background: #27302e; color: #ffffff; }
    .reference-ingest-model-tip { grid-column: 1 / -1; min-width: 0; display: none; color: #b8c6c3; font-size: 10px; font-weight: 800; line-height: 1.45; white-space: normal; }
    .reference-ingest-model-tip b { display: block; color: #eef6f4; font-size: 10px; margin-bottom: 2px; }
    .reference-ingest-model-option:hover .reference-ingest-model-tip,
    .reference-ingest-model-option:focus .reference-ingest-model-tip { display: block; }
    .reference-ingest-model-option:hover .reference-ingest-model-tip,
    .reference-ingest-model-option:focus .reference-ingest-model-tip { color: #d4dce3; }
    .reference-ingest-model-option:hover .reference-ingest-model-tip b,
    .reference-ingest-model-option:focus .reference-ingest-model-tip b { color: #fff4eb; }
    .reference-ingest-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .reference-ingest-check { min-width: 0; min-height: 30px; display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: center; gap: 6px; border: 1px solid #30363b; border-radius: 5px; background: #171b1e; color: #d8e0df; padding: 0 8px; font-size: 10px; font-weight: 900; cursor: pointer; }
    .reference-ingest-check input { width: 14px; height: 14px; margin: 0; accent-color: #8aa39d; }
    .reference-ingest-check span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-ingest-path { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 6px; }
    .reference-ingest-path button { width: 28px; height: 28px; border: 1px solid #30363b; border-radius: 4px; background: #171b1e; color: #d8e0df; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
    .reference-ingest-path button:hover { border-color: #6f807a; background: #242c2a; color: #fff; }
    .reference-ingest-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding-top: 2px; }
    .reference-ingest-action { height: 30px; border: 1px solid #30363b; border-radius: 5px; background: #171b1e; color: #e8ecef; font-size: 11px; font-weight: 900; cursor: pointer; }
    .reference-ingest-action:hover { border-color: #6f807a; background: #242c2a; color: #fff; }
    .reference-ingest-action.primary { border-color: #6f807a; background: #202826; color: #eef6f4; }
    .reference-ingest-action.primary:hover { border-color: #8aa39d; background: #27302e; color: #fff; }
    .reference-ingest-action.stop { border-color: #4a3430; background: #201817; color: #f0d3c8; }
    .reference-ingest-action.stop:hover { border-color: #a15845; background: #3a211d; color: #fff; }
    .reference-ingest-action:disabled { cursor: progress; opacity: .62; }
    .reference-ingest-meter { display: grid; gap: 7px; border: 1px solid #30363b; border-radius: 5px; background: #171b1e; padding: 10px; }
    .reference-ingest-meter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #9ca6af; font-size: 10px; font-weight: 900; }
    .reference-ingest-meter-row b { color: #f0f4f6; font-size: 14px; font-variant-numeric: tabular-nums; }
    .reference-ingest-meter-track { height: 5px; border-radius: 999px; background: #30363b; overflow: hidden; }
    .reference-ingest-meter-fill { height: 100%; width: var(--reference-ingest-progress, 0%); border-radius: inherit; background: #d15c15; }
    .reference-ingest-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .reference-ingest-stat { min-width: 0; border: 1px solid #30363b; border-radius: 5px; background: #171b1e; padding: 9px; display: grid; gap: 3px; }
    .reference-ingest-stat span { color: #8d98a2; font-size: 10px; font-weight: 900; }
    .reference-ingest-stat b { color: #eef4f6; font-size: 16px; line-height: 1.1; font-variant-numeric: tabular-nums; }
    .reference-ingest-note { border: 1px solid #30363b; border-radius: 5px; background: #171b1e; padding: 10px; color: #c0c8cd; font-size: 11px; font-weight: 800; line-height: 1.55; }
    .reference-sort-wrap { position: relative; display: inline-flex; align-items: center; }
    .reference-sort-trigger { min-width: 104px; justify-content: space-between; }
    .reference-results-head .reference-sort-trigger { height: 26px; min-width: 94px; padding: 0 8px; background: #2f3439; }
    .reference-sort-menu { position: absolute; left: 0; right: auto; top: calc(100% + 6px); z-index: 12; width: 220px; border: 1px solid #3c4147; border-radius: 5px; background: #25282c; color: #dfe4e8; padding: 6px; display: none; box-shadow: 0 14px 34px rgba(0,0,0,.42); font: 900 11px/1.2 'Microsoft YaHei','微软雅黑',Arial,sans-serif; letter-spacing: 0; text-align: left; }
    .reference-sort-wrap:hover .reference-sort-menu, .reference-sort-wrap:focus-within .reference-sort-menu { display: block; }
    .reference-sort-head, .reference-sort-row { min-height: 29px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: stretch; gap: 8px; padding: 0 7px; border: 0; border-radius: 4px; background: transparent; color: #dfe4e8; cursor: pointer; font: 900 11px/1.2 'Microsoft YaHei','微软雅黑',Arial,sans-serif; text-align: left; }
    .reference-sort-head { grid-template-columns: minmax(0, 1fr) auto auto; color: #aeb8c2; }
    .reference-sort-head b { color: #dfe7ed; font-size: 10px; font-weight: 900; }
    .reference-sort-head:hover, .reference-sort-row:hover, .reference-sort-row.has-submenu:hover { background: #30363c; color: #f1f6fa; }
    .reference-sort-row.active { background: #263a46; color: #eef7f8; }
    .reference-sort-row span, .reference-sort-head span { min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-sort-row .radio { width: 14px; height: 14px; border: 1px solid #7b858e; border-radius: 50%; box-sizing: border-box; justify-self: end; }
    .reference-sort-row.active .radio { border: 2px solid #7fd3cf; box-shadow: inset 0 0 0 3px #263a46; background: #7fd3cf; }
    .reference-sort-switch { width: 34px; height: 18px; border-radius: 999px; background: #3b4248; display: inline-flex; align-items: center; padding: 2px; box-sizing: border-box; justify-self: end; }
    .reference-sort-switch i { width: 14px; height: 14px; border-radius: 50%; background: #a2abb3; transform: translateX(0); transition: transform .12s ease, background .12s ease; }
    .reference-sort-switch.on { background: #2878d9; }
    .reference-sort-switch.on i { background: #fff; transform: translateX(16px); }
    .reference-color-ramp { width: 96px; height: 18px; display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid #11161b; border-radius: 3px; overflow: hidden; justify-self: end; }
    .reference-color-ramp span:nth-child(1) { background: #3b4cc0; }
    .reference-color-ramp span:nth-child(2) { background: #9b52d8; }
    .reference-color-ramp span:nth-child(3) { background: #e457b3; }
    .reference-color-ramp span:nth-child(4) { background: #f26b5b; }
    .reference-color-ramp span:nth-child(5) { background: #f1c45b; }
    .reference-color-ramp span:nth-child(6) { background: #8ccf65; }
    .reference-color-ramp span:nth-child(7) { background: #22783e; }
    .reference-sort-submenu { position: relative; }
    .reference-sort-submenu-panel { position: absolute; left: calc(100% + 6px); top: 0; width: 156px; border: 1px solid #3c4147; border-radius: 5px; background: #25282c; padding: 6px; display: none; box-shadow: 0 14px 34px rgba(0,0,0,.42); }
    .reference-sort-submenu:hover .reference-sort-submenu-panel { display: block; }
    .reference-sort-check { width: 14px; height: 14px; border: 1px solid #7b858e; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; justify-self: end; color: #7fd3cf; font-size: 9px; }
    .reference-sort-divider { height: 1px; margin: 6px 2px; background: #3a4046; }
    .reference-sort-menu .reference-sort-head, .reference-sort-menu .reference-sort-row { text-align: left !important; font-family: 'Microsoft YaHei','微软雅黑',Arial,sans-serif !important; }
    .reference-filterbar { min-height: 42px; border-bottom: 1px solid #25282b; background: #2f3134; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; color: #b8c0c7; }
    .reference-filter-left, .reference-filter-right { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .reference-chip { min-height: 24px; border: 1px solid #494f54; border-radius: 4px; background: #373a3e; color: #d7dde2; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 11px; font-weight: 900; }
    .reference-chip.active { background: #4c5f3e; border-color: #6c8f4e; color: #f3ffe9; }
    .reference-chip.blue { background: #2f465b; border-color: #426f96; color: #dff0ff; }
    .reference-slider { width: 86px; accent-color: #e2e6ea; }
    .reference-content-scroll { min-width: 0; min-height: 0; overflow: auto; padding: 12px 16px 24px; }
    .reference-video-workbench .reference-content-scroll { padding: 10px 12px 16px; overflow: hidden; }
    .reference-video-workbench .reference-content-scroll.is-ingest { overflow: auto; }
    .reference-video-workbench .reference-content-scroll.has-storyboard { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
    .reference-toolbar-images { flex: 0 0 auto; min-width: 0; max-width: 116px; height: 24px; display: flex; align-items: center; gap: 4px; overflow: hidden; padding-right: 6px; margin-right: 1px; border-right: 1px solid #3b4248; }
    .reference-toolbar-images small { display: none; }
    .reference-toolbar-image-chip { position: relative; width: 24px; height: 22px; flex: 0 0 24px; border: 1px solid #46525d; border-radius: 4px; background: #161c22; overflow: hidden; display: grid; place-items: center; color: #9ba5ad; cursor: pointer; }
    .reference-toolbar-image-chip.active { border-color: #7ed6d2; box-shadow: 0 0 0 1px rgba(126,214,210,.28); }
    .reference-toolbar-image-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-toolbar-image-chip i { font-size: 10px; }
    .reference-toolbar-image-chip button { position: absolute; right: -1px; top: -1px; width: 14px; height: 14px; border: 0; border-radius: 0 0 0 5px; background: rgba(8,10,12,.78); color: #f1f5f8; display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 8px; cursor: pointer; }
    .reference-toolbar-image-chip.add { width: 26px; flex-basis: 26px; border-style: solid; background: #30343a; color: #e4eaef; }
    .reference-toolbar-image-chip.add:hover { border-color: #67717a; background: #3a3f45; color: #fff; }
    .reference-storyboard-panel { min-width: 0; border: 1px solid #353b42; border-radius: 6px; background: #24282d; overflow: hidden; }
    .reference-storyboard-head { min-height: 34px; border-bottom: 1px solid #373d43; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; color: #e4e9ed; font-size: 12px; font-weight: 900; }
    .reference-storyboard-head small { color: #9ba5ad; font-size: 10px; font-weight: 900; }
    .reference-storyboard-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 8px; }
    .reference-storyboard-cell { min-width: 0; display: grid; grid-template-rows: 86px 26px; gap: 6px; }
    .reference-storyboard-thumb { position: relative; min-width: 0; border: 1px dashed #4d555d; border-radius: 5px; background: #1a2026; overflow: hidden; display: grid; place-items: center; color: #9ba5ad; }
    .reference-storyboard-thumb button { width: 100%; height: 100%; border: 0; background: transparent; color: inherit; display: grid; place-items: center; gap: 5px; cursor: pointer; font: 900 10px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-storyboard-thumb:hover { border-color: #727d87; background: #2b3036; color: #e5ebf0; }
    .reference-storyboard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-storyboard-thumb .remove { position: absolute; right: 5px; top: 5px; width: 20px; height: 20px; border: 0; border-radius: 4px; background: rgba(15,18,21,.78); color: #f1f5f8; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
    .reference-storyboard-cell input { width: 100%; min-width: 0; height: 26px; border: 1px solid #454b52; border-radius: 4px; background: #202327; color: #edf2f5; padding: 0 7px; outline: none; font: 900 10px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-storyboard-cell input:focus { border-color: #5fa4aa; box-shadow: 0 0 0 2px rgba(95,164,170,.16); }
    .reference-retrieval-layout { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .reference-query-pane { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(210px, .44fr) minmax(260px, .56fr); gap: 10px; }
    .reference-query-card { min-width: 0; min-height: 0; border: 1px solid #353b42; border-radius: 6px; background: #24282d; overflow: hidden; display: grid; grid-template-rows: 34px minmax(0, 1fr) auto; }
    .reference-query-card.reference-image-card { grid-template-rows: 34px minmax(0, 1fr); }
    .reference-query-head { min-width: 0; height: 34px; border-bottom: 1px solid #3a3f45; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; color: #e3e7eb; font-size: 12px; font-weight: 900; }
    .reference-query-head small { color: #9ea7af; font-size: 10px; font-weight: 900; }
    .reference-text-search-wrap { min-width: 0; min-height: 0; padding: 10px; display: grid; }
    .reference-text-search { width: 100%; min-width: 0; min-height: 0; resize: none; border: 1px solid #454b52; border-radius: 5px; background: #202327; color: #eef2f5; padding: 12px; font: 900 13px/1.55 'Microsoft YaHei','微软雅黑',Arial,sans-serif; outline: none; }
    .reference-text-search:focus { border-color: #6a737d; box-shadow: 0 0 0 2px rgba(120,132,144,.2); }
    .reference-text-search::placeholder { color: #7f8992; }
    .reference-query-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px 10px; }
    .reference-query-hint { min-width: 0; color: #929ca5; font-size: 10px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-image-dropzone { min-width: 0; min-height: 0; padding: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .reference-image-slot { position: relative; min-width: 0; min-height: 0; border: 1px dashed #4d555d; border-radius: 5px; background: #24282d; overflow: hidden; display: grid; place-items: center; color: #9ba5ad; cursor: pointer; }
    .reference-image-slot:hover { border-color: #727d87; background: #2b3036; color: #e5ebf0; }
    .reference-image-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-image-slot span { display: grid; gap: 6px; place-items: center; text-align: center; padding: 10px; font-size: 11px; font-weight: 900; line-height: 1.25; }
    .reference-image-slot i { font-size: 18px; color: #c1c9d0; }
    .reference-image-remove { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border: 0; border-radius: 4px; background: rgba(20,23,26,.78); color: #f1f5f8; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .reference-results-pane { min-width: 0; min-height: 0; display: grid; grid-template-rows: 34px minmax(0, 1fr); border: 1px solid #353b42; border-radius: 6px; background: #24282d; overflow: hidden; }
    .reference-results-head { min-height: 36px; border-bottom: 1px solid #373d43; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 10px; color: #e4e9ed; font-size: 12px; font-weight: 900; }
    .reference-results-head small { color: #9ba5ad; font-size: 10px; font-weight: 900; }
    .reference-results-title { min-width: 0; display: inline-flex; align-items: center; gap: 8px; }
    .reference-results-controls { min-width: 0; display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
    .reference-view-toggle { display: inline-flex; align-items: center; gap: 3px; padding: 2px; border: 1px solid #3c4650; border-radius: 6px; background: #1c232a; }
    .reference-view-toggle button { width: 26px; height: 24px; border: 0; border-radius: 4px; background: transparent; color: #9faab4; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
    .reference-view-toggle button.active { background: #6f7b86; color: #fff; }
    .reference-thumb-size-control { min-width: 150px; display: inline-grid; grid-template-columns: auto 80px 38px; align-items: center; gap: 7px; color: #9faab4; font-size: 10px; font-weight: 900; }
    .reference-thumb-size-control input { width: 80px; accent-color: #7fd3cf; }
    .reference-thumb-size-control output { color: #dce5ec; text-align: right; }
    .reference-results-scroll { min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; touch-action: pan-y; pointer-events: auto; padding: 8px; background: #222426; }
    .reference-sidebar-local-browser { overflow: hidden; }
    .reference-sidebar-local-browser .reference-sidebar-section { flex: 0 0 auto; }
    .reference-sidebar-local-browser .reference-local-explorer-section { flex: 1 1 auto; min-height: 220px; overflow: hidden; grid-template-rows: auto auto minmax(0, 1fr) auto; }
    .reference-local-explorer-path { margin: 0; }
    .reference-local-tree-tools { display: inline-flex; align-items: center; gap: 4px; }
    .reference-local-tree { min-height: 0; overflow: auto; display: grid; align-content: start; gap: 1px; padding-right: 2px; }
    .reference-local-tree::-webkit-scrollbar { width: 7px; }
    .reference-local-tree::-webkit-scrollbar-thumb { background: #454b52; border-radius: 999px; }
    .reference-local-tree-row { min-width: 0; height: 25px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 1px; padding-left: calc(var(--reference-tree-level, 0) * 14px); border-radius: 4px; }
    .reference-local-tree-row:hover { background: #30343a; }
    .reference-local-tree-row.active { background: #383f45; color: #fff; }
    .reference-local-tree-caret { width: 18px; height: 22px; border: 0; background: transparent; color: #aeb8c1; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .reference-local-tree-row.active .reference-local-tree-caret { color: #fff; }
    .reference-local-tree-caret i { font-size: 9px; }
    .reference-local-tree-open { min-width: 0; height: 22px; border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; gap: 6px; padding: 0 5px 0 0; text-align: left; cursor: pointer; font: 800 12px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; }
    .reference-local-tree-open i { color: #f1c850; font-size: 13px; }
    .reference-local-tree-open .fa-hard-drive { color: #c4ccd3; }
    .reference-local-tree-open span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-local-tree-empty { height: 24px; padding-left: calc(var(--reference-tree-level, 0) * 14px + 22px); display: flex; align-items: center; color: #8b96a0; font-size: 10px; font-weight: 800; }
    .reference-local-browser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--reference-thumb-size, 178px), 1fr)); align-content: start; gap: 10px; }
    .reference-local-file-card { min-width: 0; border: 0; background: transparent; color: #e4e9ef; padding: 0; display: grid; grid-template-rows: auto auto; gap: 6px; overflow: visible; cursor: pointer; text-align: left; font: inherit; }
    .reference-local-file-card:hover .reference-local-file-thumb { outline: 1px solid #5b6670; outline-offset: 0; }
    .reference-local-file-card.active .reference-local-file-thumb { outline: 2px solid #278ee8; outline-offset: 0; }
    .reference-local-file-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 3px; background: #111416; overflow: hidden; display: grid; place-items: center; color: #8f99a3; font-size: 12px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
    .reference-local-file-thumb.folder { background: linear-gradient(135deg, #3b4148, #20252b); color: #f1c850; }
    .reference-local-file-thumb.other { background: #2a2f35; color: #aeb8c1; }
    .reference-local-file-thumb img, .reference-local-file-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #111; }
    .reference-local-file-thumb.video { background: #050607; }
    .reference-local-video-poster, .reference-local-video-preview { grid-area: 1 / 1; }
    .reference-local-video-poster { opacity: 1; transition: opacity .14s ease; }
    .reference-local-file-thumb.video.poster-ready .reference-local-video-poster { opacity: 1; }
    .reference-local-file-thumb.video.poster-failed .reference-local-video-poster { display: none; }
    .reference-local-video-preview { opacity: 0; transition: opacity .14s ease; }
    .reference-local-file-thumb.video.video-ready .reference-local-video-preview { opacity: 1; }
    .reference-local-video-state { position: absolute; inset: 0; display: grid; place-items: center; color: #b8c1c9; font-size: 10px; font-weight: 900; letter-spacing: 0; background: #0b0e10; }
    .reference-local-file-thumb.video:not(.poster-failed) .reference-local-video-state { display: none; }
    .reference-local-file-thumb.video.is-ready .reference-local-video-state { display: none; }
    .reference-local-file-thumb i { font-size: 28px; }
    .reference-local-file-badge { position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; border-radius: 4px; background: rgba(21,23,25,.72); color: #f1f4f7; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; font-size: 10px; font-weight: 900; backdrop-filter: blur(8px); }
    .reference-local-file-thumb.video .reference-local-file-badge { display: none; }
    .reference-local-file-meta { min-width: 0; display: grid; gap: 2px; }
    .reference-local-file-meta strong, .reference-local-file-meta small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-local-file-meta strong { color: #eef3f7; font-size: 12px; line-height: 1.15; font-weight: 800; }
    .reference-local-file-meta small { color: #9ba5ad; font-size: 10px; font-weight: 800; }
    .reference-local-browser-grid.reference-local-thumb-grid { grid-template-columns: repeat(auto-fill, minmax(90px, var(--reference-thumb-size, 150px))); justify-content: start; gap: 8px; }
    .reference-local-thumb-grid .reference-local-file-card { width: var(--reference-thumb-size, 150px); grid-template-rows: 1fr; gap: 0; }
    .reference-local-thumb-grid .reference-local-file-meta { display: none; }
    .reference-local-thumb-grid .reference-local-file-badge,
    .reference-local-thumb-grid .reference-local-video-state { display: none; }
    .reference-local-thumb-grid .reference-local-file-card:hover { background: transparent; }
    .reference-local-file-list-head,
    .reference-local-browser-list,
    .reference-local-file-row { min-width: 920px; width: 100%; box-sizing: border-box; }
    .reference-local-file-list-head,
    .reference-local-file-row { display: grid; grid-template-columns: minmax(420px, 1fr) 88px 110px 94px 142px; align-items: center; justify-items: stretch; }
    .reference-local-file-list-head { height: 30px; background: #2b2b2f; border-bottom: 1px solid #3a3a3d; color: #cfd6de; font-size: 12px; font-weight: 900; }
    .reference-list-sort-cell { min-width: 0; height: 100%; border: 0; border-left: 1px solid #3d4147; border-radius: 0; background: transparent; color: inherit; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 10px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; box-shadow: none; }
    .reference-list-sort-cell:first-child { border-left: 0; justify-content: flex-start; text-align: left; padding-left: 14px; }
    .reference-list-sort-cell span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-list-sort-cell i { flex: 0 0 auto; width: 13px; color: #89939c; font-size: 10px; text-align: center; opacity: .8; }
    .reference-list-sort-cell:hover { background: #323438; color: #f4f8fb; }
    .reference-list-sort-cell.active { background: #293746; color: #f5fbff; }
    .reference-list-sort-cell.active i { color: #6eb6ff; opacity: 1; }
    .reference-local-browser-list { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: stretch; }
    .reference-local-file-row { min-height: 28px; border: 0; border-radius: 0; background: #1b1b1c; color: #dce4ec; padding: 0; cursor: pointer; text-align: left; font: inherit; justify-self: stretch; }
    .reference-local-file-row:nth-child(even) { background: #202020; }
    .reference-local-file-row:hover { background: #2a2a2c; }
    .reference-local-file-row.active { background: #23384a; color: #f6fbff; }
    .reference-local-name-cell { min-width: 0; width: 100%; height: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; justify-items: start; gap: 7px; padding: 0 10px 0 14px; justify-self: stretch; }
    .reference-local-row-title { min-width: 0; width: 100%; justify-self: stretch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 12px; font-weight: 700; }
    .reference-local-list-thumb { width: 24px; height: 14px; min-width: 24px; aspect-ratio: auto; border-radius: 1px; box-shadow: none; }
    .reference-local-list-thumb i { font-size: 12px; }
    .reference-local-file-cell { min-width: 0; height: 100%; display: flex; align-items: center; justify-content: flex-end; padding: 0 14px 0 10px; border-left: 1px solid rgba(255,255,255,.035); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; color: #cbd4dc; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
    .reference-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--reference-thumb-size, 184px), 1fr)); align-content: start; gap: 10px; }
    .reference-file-list-head { min-width: 990px; width: 100%; height: 30px; display: grid; grid-template-columns: minmax(420px, 1fr) 82px 108px 92px 78px 132px; align-items: center; border-bottom: 1px solid #303338; background: #2c2c2f; color: #dce5ec; font-size: 12px; font-weight: 900; box-sizing: border-box; }
    .reference-video-grid.reference-video-list { min-width: 920px; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: stretch; gap: 0; }
    .reference-video-list .reference-video-card { min-height: 28px; width: 100%; display: grid; grid-template-columns: minmax(420px, 1fr) 82px 108px 92px 78px 132px; align-items: center; justify-items: stretch; border-radius: 0; background: #1f2020; box-shadow: none; }
    .reference-video-list .reference-video-card:nth-child(even) { background: #252525; }
    .reference-video-list .reference-video-card:hover { background: #30343a; box-shadow: none; }
    .reference-video-list .reference-video-card.active { background: #095b8d; color: #f4fbff; box-shadow: none; }
    .reference-video-row-name { min-width: 0; width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; justify-items: start; gap: 7px; padding: 0 10px 0 14px; justify-self: stretch; }
    .reference-video-list .reference-video-thumb { width: 24px; height: 14px; aspect-ratio: auto; border-radius: 1px; box-shadow: none; }
    .reference-video-list .reference-video-foot { min-width: 0; width: 100%; height: auto; min-height: 0; background: transparent; color: inherit; display: grid; align-items: center; justify-content: stretch; gap: 1px; padding: 0; text-align: left; }
    .reference-video-list .reference-video-foot strong { color: inherit; font-size: 12px; font-weight: 800; text-align: left; }
    .reference-video-list .reference-video-foot small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9da6ad; font-size: 9px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
    .reference-file-cell { min-width: 0; height: 100%; display: flex; align-items: center; justify-content: flex-end; padding: 0 14px 0 10px; color: inherit; font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
    .reference-video-card { min-width: 0; border: 0; border-radius: 3px; background: transparent; color: #e4e9ef; padding: 0; display: grid; grid-template-rows: auto; overflow: visible; cursor: pointer; text-align: left; font: inherit; box-shadow: none; }
    .reference-video-card:hover .reference-video-thumb { outline: 1px solid #5b6670; outline-offset: 0; }
    .reference-video-card.active .reference-video-thumb { outline: 2px solid #278ee8; outline-offset: 0; }
    .reference-video-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 3px; background: #111416; overflow: hidden; display: grid; place-items: center; color: #7f8992; font-size: 12px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
    .reference-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-video-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #111; }
    .reference-video-poster { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; transition: opacity .12s ease; }
    .reference-video-hover { position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none; }
    .reference-video-thumb.poster-failed .reference-video-poster { opacity: 0; }
    .reference-video-thumb.poster-fallback-ready .reference-video-hover { opacity: 1; }
    .reference-video-thumb.is-playing .reference-video-poster { opacity: 0; }
    .reference-video-thumb.is-playing .reference-video-hover { opacity: 1; }
    .reference-video-duration { position: absolute; right: 5px; bottom: 5px; min-width: 34px; height: 18px; border-radius: 3px; background: rgba(12,14,16,.78); color: #f3f6f8; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; font-size: 10px; font-weight: 900; transition: opacity .12s ease; }
    .reference-video-card:hover .reference-video-duration,
    .reference-video-card:focus-visible .reference-video-duration,
    .reference-video-thumb.is-playing .reference-video-duration { opacity: 0; }
    .reference-segment-track { position: absolute; left: 6px; right: 6px; bottom: 5px; height: 22px; border-radius: 3px; background: transparent; overflow: visible; display: block; z-index: 4; opacity: 0; transform: translateY(3px); transition: opacity .12s ease, transform .12s ease; pointer-events: none; }
    .reference-segment-track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 3px; border-radius: 3px; background: rgba(18,21,24,.74); box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
    .reference-video-card:hover .reference-segment-track,
    .reference-video-card:focus-visible .reference-segment-track,
    .reference-video-thumb.is-playing .reference-segment-track { opacity: 1; transform: translateY(0); }
    .reference-segment-range { position: absolute; bottom: 3px; height: 3px; border-radius: 3px; background: #e4e8ed; box-shadow: 0 0 0 1px rgba(0,0,0,.36); }
    .reference-segment-label { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); max-width: calc(100% - 4px); min-height: 15px; border-radius: 3px; background: rgba(17,20,23,.82); color: #eef4f8; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; font-size: 9px; line-height: 15px; font-weight: 900; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
    .reference-video-list .reference-segment-track { left: 2px; right: 2px; bottom: 1px; height: 3px; }
    .reference-video-list .reference-segment-track::before,
    .reference-video-list .reference-segment-range { bottom: 0; height: 2px; }
    .reference-video-list .reference-segment-label { display: none; }
    .reference-video-foot { min-width: 0; height: 23px; display: none; align-items: center; justify-content: center; padding: 0 4px; background: transparent; color: #eef3f7; }
    .reference-video-foot strong { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1; font-weight: 800; text-align: center; }
    .reference-video-foot span { display: inline-flex; align-items: center; gap: 7px; color: #b7bdc4; font-size: 11px; }
    .reference-video-actions i { cursor: pointer; }
    .reference-video-actions i:hover { color: #fff; }
    .reference-video-actions .active-star { color: #f0c15c; }
    .reference-segment-player { display: grid; gap: 8px; }
    .reference-segment-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 5px; background: #171a1d; overflow: hidden; display: grid; place-items: center; color: #8b959e; font-size: 12px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); cursor: crosshair; user-select: none; touch-action: none; }
    .reference-segment-preview img, .reference-segment-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-roi-box { position: absolute; left: calc(var(--roi-x, 12) * 1%); top: calc(var(--roi-y, 12) * 1%); width: calc(var(--roi-w, 42) * 1%); height: calc(var(--roi-h, 42) * 1%); border: 2px solid #48a6ff; border-radius: 3px; background-color: rgba(72,166,255,.13); background-image: linear-gradient(to right, transparent 33%, rgba(255,255,255,.5) 33%, rgba(255,255,255,.5) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255,255,255,.5) 66%, rgba(255,255,255,.5) calc(66% + 1px), transparent calc(66% + 1px)), linear-gradient(to bottom, transparent 33%, rgba(255,255,255,.5) 33%, rgba(255,255,255,.5) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255,255,255,.5) 66%, rgba(255,255,255,.5) calc(66% + 1px), transparent calc(66% + 1px)); box-shadow: 0 0 0 1px rgba(5,11,18,.7), 0 0 0 999px rgba(0,0,0,.16); pointer-events: auto; cursor: grab; }
    .reference-segment-preview:active .reference-roi-box { cursor: grabbing; }
    .reference-roi-handle { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #eef7ff; box-shadow: 0 0 0 2px #2878d9; pointer-events: auto; }
    .reference-roi-handle.tl { left: -5px; top: -5px; cursor: nwse-resize; }
    .reference-roi-handle.tr { right: -5px; top: -5px; cursor: nesw-resize; }
    .reference-roi-handle.bl { left: -5px; bottom: -5px; cursor: nesw-resize; }
    .reference-roi-handle.br { right: -5px; bottom: -5px; cursor: nwse-resize; }
    .reference-roi-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; color: #9fa8b1; font-size: 10px; font-weight: 900; }
    .reference-roi-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-segment-meta { display: grid; gap: 6px; color: #cbd2d8; font-size: 11px; font-weight: 800; line-height: 1.35; }
    .reference-segment-timebar { height: 8px; border-radius: 5px; background: #202429; overflow: hidden; }
    .reference-segment-timebar span { display: block; height: 100%; border-radius: 5px; background: #d7dde2; }
    .reference-sidebar-local-search { order: -10; }
    .reference-sidebar-local-search .reference-segment-preview { border-radius: 6px; }
    .reference-sidebar-local-search .reference-segment-meta { font-size: 10px; gap: 5px; }
    .reference-sidebar-local-search .reference-segment-timebar { height: 6px; }
    .reference-query-image-player .reference-segment-preview { border: 1px solid #3f4a54; }
    .reference-query-image-empty { min-height: 128px; width: 100%; border: 1px dashed #4d5964; border-radius: 6px; background: #242a30; color: #aab4bd; display: grid; place-items: center; gap: 6px; padding: 14px; text-align: center; cursor: pointer; font: inherit; }
    .reference-query-image-empty:hover { border-color: #6c7783; background: #2a3138; color: #eef4f8; }
    .reference-query-image-empty i { font-size: 18px; }
    .reference-query-image-empty strong { font-size: 12px; color: #eef4f8; }
    .reference-query-image-empty span { font-size: 10px; line-height: 1.35; }
    .reference-query-image-copy { min-width: 0; display: grid; gap: 3px; }
    .reference-query-image-copy small { color: #98a3ac; font-size: 10px; font-weight: 800; line-height: 1.35; }
    .reference-folder-row { margin-bottom: 18px; }
    .reference-folder-title { height: 24px; display: flex; align-items: center; justify-content: space-between; color: #dfe3e7; font-size: 12px; font-weight: 900; margin-bottom: 8px; }
    .reference-folder-title small { color: #a1a9b1; font-size: 11px; }
    .reference-folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
    .reference-folder-card { min-height: 132px; border: 0; background: transparent; color: #e5e8eb; padding: 0; display: grid; grid-template-rows: 96px auto; gap: 8px; text-align: left; cursor: pointer; font: inherit; }
    .reference-folder-card:hover .reference-folder-thumb, .reference-asset-card:hover .reference-asset-thumb { outline: 2px solid rgba(255,255,255,.24); outline-offset: 1px; }
    .reference-folder-thumb { border-radius: 4px; background: #3a3d41; overflow: hidden; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
    .reference-folder-thumb span { background: linear-gradient(135deg, #46535b, #272b2f); border-radius: 2px; overflow: hidden; display: grid; place-items: center; color: #88919a; font-size: 10px; font-weight: 900; }
    .reference-folder-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-folder-meta, .reference-asset-meta { min-width: 0; display: grid; gap: 3px; }
    .reference-folder-meta strong, .reference-asset-meta strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f0f3f6; font-size: 12px; line-height: 1.15; }
    .reference-folder-meta small, .reference-asset-meta small { color: #9aa2aa; font-size: 10px; line-height: 1.2; font-weight: 800; }
    .reference-asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--reference-thumb-size, 184px), 1fr)); align-items: start; gap: 18px; }
    .reference-asset-card { min-width: 0; border: 0; background: transparent; color: #e6eaee; padding: 0; display: grid; grid-template-rows: auto auto; gap: 7px; text-align: left; cursor: pointer; font: inherit; }
    .reference-asset-card.active .reference-asset-thumb { outline: 2px solid #3889ec; outline-offset: 2px; }
    .reference-asset-thumb { position: relative; width: 100%; aspect-ratio: 1 / .68; border-radius: 5px; background: linear-gradient(135deg, #223448, #1b2025 56%, #614527); overflow: hidden; display: grid; place-items: center; color: #89929a; font-size: 12px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .reference-asset-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-media-badge { position: absolute; left: 6px; top: 6px; height: 20px; min-width: 20px; border-radius: 4px; background: rgba(21,23,25,.72); color: #f1f4f7; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; font-size: 10px; font-weight: 900; backdrop-filter: blur(8px); }
    .reference-score-badge { position: absolute; right: 6px; top: 6px; height: 20px; border-radius: 4px; background: rgba(40,120,217,.86); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; font-size: 10px; font-weight: 900; }
    .reference-color-strip { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 4px; }
    .reference-color-strip i { height: 7px; flex: 1; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.22); }
    .reference-tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-height: 19px; }
    .reference-tag { min-height: 17px; border-radius: 3px; background: #3b4147; color: #bec7cf; padding: 0 5px; display: inline-flex; align-items: center; font-size: 9px; font-weight: 900; }
    .reference-inspector { min-width: 0; min-height: 0; background: #25282c; border-left: 1px solid #1b1d20; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
    .reference-shell.inspector-collapsed .reference-inspector { border-left-color: #1f252b; }
    .reference-shell.inspector-collapsed .reference-inspector > * { display: none; }
    .reference-inspector.reference-inspector-filtered { grid-template-rows: minmax(0, 1fr); background: #1d2228; }
    .reference-inspector-preview { padding: 12px; border-bottom: 1px solid #24272a; display: grid; gap: 10px; }
    .reference-inspector-filtered .reference-inspector-preview { border: 1px solid #343a41; border-radius: 5px; background: #2b2f34; }
    .reference-preview-frame { aspect-ratio: 1 / .68; border-radius: 5px; background: #1f2225; overflow: hidden; display: grid; place-items: center; color: #7f8790; font-size: 12px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .reference-preview-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-inspector-player-section { min-height: 0; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr); }
    .reference-inspector-player-section .reference-info-body { min-height: 0; padding: 8px; gap: 8px; display: grid; grid-template-rows: minmax(0, 1fr); }
    .reference-inspector-media-title { min-width: 0; min-height: 34px; border: 1px solid #303840; border-radius: 5px; background: #171c20; padding: 6px 8px; display: grid; align-content: center; gap: 3px; }
    .reference-inspector-media-title strong { min-width: 0; color: #f1f5f8; font-size: 11px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-inspector-media-title small { min-width: 0; color: #8f9ba6; font-size: 9px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .reference-inspector-player { min-height: 0; height: 100%; border: 1px solid #343a41; border-radius: 6px; background: #10161b; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); }
    .reference-inspector-player-frame { position: relative; aspect-ratio: auto; min-height: 0; background: #080a0d; display: grid; place-items: center; overflow: hidden; cursor: pointer; user-select: none; touch-action: none; }
    .reference-inspector-player-frame video,
    .reference-inspector-player-frame img { width: 100%; height: 100%; object-fit: contain; display: block; background: #080a0d; }
    .reference-inspector-player-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .reference-inspector-player-frame.scrubbing { cursor: grabbing; }
    .reference-inspector-player-frame.scrubbing::before { content: none; }
    .reference-player-controls { display: grid; grid-template-rows: 18px 32px; gap: 7px; padding: 8px; border-top: 1px solid #26323b; background: #182028; pointer-events: auto; }
    .reference-player-top-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; }
    .reference-player-badge { height: 20px; padding: 0 7px; border: 1px solid #33414d; border-radius: 4px; background: #101820; color: #dce7ef; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 900; letter-spacing: 0; white-space: nowrap; }
    .reference-player-control-row { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
    .reference-player-control-group { min-width: 0; height: 32px; border: 1px solid #31404b; border-radius: 6px; background: #111820; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; color: #f2f4f6; pointer-events: auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
    .reference-player-transport { justify-self: start; }
    .reference-player-transport .reference-player-badge { width: 24px; justify-content: center; padding: 0; overflow: hidden; }
    .reference-player-utilities { min-width: 0; justify-self: stretch; }
    .reference-player-actions { justify-self: stretch; width: 100%; max-width: 100%; overflow: hidden; scrollbar-width: none; }
    .reference-player-actions::-webkit-scrollbar { display: none; }
    .reference-player-actions .reference-player-control { flex: 0 0 26px; }
    .reference-player-actions-main { min-width: 0; display: inline-flex; align-items: center; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
    .reference-player-actions-main::-webkit-scrollbar { display: none; }
    .reference-player-actions-end { flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
    .reference-player-end-controls { justify-self: end; width: auto; max-width: 100%; }
    .reference-player-control { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: #f0f3f6; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; font-size: 13px; }
    .reference-player-control:hover, .reference-player-control.active { background: rgba(209,92,21,.35); color: #ff8a2c; }
    .reference-player-control.active { box-shadow: inset 0 0 0 1px rgba(255,124,32,.45); }
    .reference-player-control.reference-player-main { width: 28px; height: 28px; color: #fff; }
    .reference-player-control.reference-player-wide { width: 28px; }
    .reference-player-control.reference-player-active-orange { background: rgba(212,96,22,.42); color: #ff8a2c; box-shadow: inset 0 0 0 1px rgba(255,127,38,.48); }
    .reference-player-time { min-width: 58px; color: #f0f2f4; font-size: 10px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; text-align: left; }
    .reference-player-timeline { position: relative; height: 18px; display: flex; align-items: center; cursor: ew-resize; touch-action: none; pointer-events: auto; }
    .reference-player-track { position: relative; width: 100%; height: 4px; border-radius: 999px; background: #303c46; box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); overflow: visible; }
    .reference-player-segment-window { position: absolute; top: -3px; bottom: -3px; left: 0%; width: 100%; border-radius: 999px; background: rgba(241,120,38,.24); box-shadow: inset 0 0 0 1px rgba(241,120,38,.55); pointer-events: none; }
    .reference-player-fill { position: absolute; inset: 0 auto 0 0; width: 0%; border-radius: inherit; background: #f17826; }
    .reference-player-knob { position: absolute; left: 0%; top: 50%; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid #f17826; transform: translate(-50%, -50%); box-shadow: 0 2px 9px rgba(0,0,0,.5); pointer-events: none; }
    .reference-export-clip-control.busy i { animation: referenceSpin .8s linear infinite; }
    @keyframes referenceSpin { to { transform: rotate(360deg); } }
    .reference-player-volume { min-width: 84px; flex: 0 0 84px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
    .reference-player-volume input { width: 64px; accent-color: #f17826; }
    .reference-player-image-controls { grid-template-rows: 32px; }
    .reference-player-image-controls .reference-player-control-row { grid-template-columns: minmax(0, 1fr); }
    .reference-inspector-title { display: grid; gap: 4px; }
    .reference-inspector-title strong { min-width: 0; max-height: 34px; overflow: hidden; color: #f1f4f7; font-size: 12px; line-height: 1.22; word-break: break-word; overflow-wrap: anywhere; }
    .reference-inspector-title small { min-width: 0; max-height: 28px; overflow: hidden; color: #9fa7ae; font-size: 10px; font-weight: 800; line-height: 1.25; word-break: break-word; overflow-wrap: anywhere; }
    .reference-inspector-scroll { min-height: 0; overflow: auto; padding: 12px; display: grid; align-content: start; gap: 12px; }
    .reference-inspector-filtered .reference-inspector-scroll { padding: 8px; gap: 8px; }
    .reference-inspector-filtered .reference-sidebar-section { border-color: #303943; border-radius: 7px; background: #222930; }
    .reference-inspector-filtered .reference-sidebar-local-search { order: 0; }
    .reference-inspector-filtered .reference-segment-preview { border-radius: 6px; }
    .reference-inspector-filtered .reference-segment-meta { font-size: 10px; gap: 5px; }
    .reference-inspector-filtered .reference-segment-timebar { height: 6px; }
    .reference-inspector-filtered .reference-info-section { border-color: #303943; border-radius: 7px; background: #222930; }
    .reference-inspector-filtered .reference-info-head { height: 28px; padding: 0 7px; border-bottom-color: #303943; }
    .reference-inspector-filtered .reference-info-body { padding: 7px; }
    .reference-inspector-filtered .reference-filter-panel { min-height: 0; overflow: visible; }
    .reference-inspector-filtered .reference-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .reference-inspector-filtered .reference-filter-grid select,
    .reference-inspector-filtered .reference-filter-grid input { height: 28px; border-color: #394550; border-radius: 6px; background: #151b21; }
    .reference-info-section { border: 1px solid #3c4147; border-radius: 5px; background: #303337; overflow: hidden; }
    .reference-info-head { height: 30px; padding: 0 9px; border-bottom: 1px solid #3a3f45; display: flex; align-items: center; justify-content: space-between; color: #dde3e8; font-size: 11px; font-weight: 900; }
    .reference-info-body { padding: 9px; display: grid; gap: 8px; color: #c3cad1; font-size: 11px; line-height: 1.35; }
    .reference-filter-panel .reference-info-body { padding: 8px; gap: 7px; }
    .reference-filter-panel { min-height: 312px; overflow: visible; }
    .reference-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .reference-filter-grid label { min-width: 0; display: grid; gap: 4px; }
    .reference-filter-grid label span { color: #98a2ab; font-size: 10px; line-height: 1; font-weight: 900; }
    .reference-filter-select-row { min-width: 0; display: flex; align-items: center; gap: 4px; }
    .reference-filter-select-row select { flex: 1 1 auto; min-width: 0; }
    .reference-filter-custom-btn { width: 24px; min-width: 24px; height: 26px; border: 1px solid #454b52; border-radius: 4px; background: #252a2f; color: #c8d0d7; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
    .reference-filter-custom-btn:hover:not(:disabled) { border-color: #6a737d; background: #31373d; color: #fff; }
    .reference-filter-custom-btn:disabled { opacity: .34; cursor: default; }
    .reference-filter-custom-btn i { font-size: 10px; line-height: 1; }
    .reference-filter-grid select, .reference-filter-grid input { width: 100%; min-width: 0; height: 26px; border: 1px solid #454b52; border-radius: 4px; background: #202327; color: #edf2f5; padding: 0 7px; font: 900 10px 'Microsoft YaHei','微软雅黑',Arial,sans-serif; outline: none; }
    .reference-filter-grid select:focus, .reference-filter-grid input:focus { border-color: #6a737d; box-shadow: 0 0 0 2px rgba(120,132,144,.18); }
    .reference-sidebar .reference-filter-panel { min-height: 0; border-color: #303943; border-radius: 7px; background: #1a2128; }
    .reference-sidebar .reference-filter-panel .reference-info-head { height: 28px; padding: 0 7px; border-bottom-color: #303943; }
    .reference-sidebar .reference-filter-panel .reference-info-body { padding: 7px; }
    .reference-sidebar .reference-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .reference-sidebar .reference-filter-grid select,
    .reference-sidebar .reference-filter-grid input { height: 28px; border-color: #394550; border-radius: 6px; background: #151b21; }
    .reference-property-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: start; }
    .reference-property-row span:first-child { color: #929ba3; font-weight: 900; }
    .reference-property-row span:last-child { min-width: 0; overflow-wrap: anywhere; color: #dce1e6; font-weight: 800; }
    .reference-swatch-row { display: flex; gap: 6px; flex-wrap: wrap; }
    .reference-swatch { width: 28px; height: 20px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 0 0 1px rgba(0,0,0,.28); }
    .reference-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
    .reference-action-grid .reference-tool-btn { width: 100%; }
    .reference-moodboard-mini { height: 118px; position: relative; border-radius: 5px; background: #24272a; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
    .reference-mood-tile { position: absolute; border-radius: 4px; background: linear-gradient(135deg, #425063, #1d2228); overflow: hidden; box-shadow: 0 6px 14px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.08); }
    .reference-mood-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .reference-empty-state { min-height: 260px; border: 1px dashed #4b5259; border-radius: 5px; background: #2b2d30; color: #9ca5ad; display: grid; place-items: center; text-align: center; font-size: 12px; font-weight: 900; padding: 24px; }
    .reference-toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3; max-width: min(560px, calc(100% - 48px)); min-height: 32px; border: 1px solid #52606d; border-radius: 5px; background: rgba(28,31,34,.94); color: #edf3f8; display: none; align-items: center; justify-content: center; padding: 0 12px; font-size: 12px; font-weight: 900; box-shadow: 0 14px 36px rgba(0,0,0,.38); }
    .reference-toast.show { display: flex; }
    #referenceModule { background: #171a1d; color: #d9e0e5; }
    #referenceModule .reference-workbench { inset: 0; border-radius: 0; border-color: #343a40; background: #1f2225; box-shadow: none; grid-template-rows: 34px minmax(0, 1fr); }
    #referenceModule .reference-window-bar { height: 34px; background: #202428; border-bottom-color: #343a40; color: #dfe5ea; grid-template-columns: 180px minmax(0, 1fr) auto; }
    #referenceModule .reference-titlebar { justify-content: start; }
    #referenceModule .reference-titlebar strong { font-size: 12px; color: #eef3f6; }
    #referenceModule .reference-titlebar small { color: #98a3ad; }
    #referenceModule .reference-dot { width: 8px; height: 8px; background: #737b83; }
    #referenceModule .reference-dot.red, #referenceModule .reference-dot.yellow, #referenceModule .reference-dot.green { background: #737b83; }
    #referenceModule .reference-icon-btn { border-radius: 4px; color: #b8c2cb; }
    #referenceModule .reference-icon-btn:hover { background: #30363b; color: #fff; }
    #referenceModule .reference-shell { background: #1f2225; }
    #referenceModule .reference-sidebar { background: #20262b; border-right-color: #343a40; padding: 10px; gap: 10px; scrollbar-color: #59636c transparent; }
    #referenceModule .reference-main { background: #202326; }
    #referenceModule .reference-inspector { background: #202326; border-left-color: #343a40; }
    #referenceModule .reference-inspector.reference-inspector-filtered { background: #202326; }
    #referenceModule .reference-layout-resizer::before { background: #303840; }
    #referenceModule .reference-layout-resizer:hover::before,
    #referenceModule .reference-shell[data-layout-drag-side="sidebar"] .reference-sidebar-resizer::before,
    #referenceModule .reference-shell[data-layout-drag-side="inspector"] .reference-inspector-resizer::before { background: #7ddbd8; box-shadow: 0 0 0 1px rgba(125,219,216,.22); }
    #referenceModule .reference-sidebar-toggle,
    #referenceModule .reference-inspector-toggle { border-color: #424a52; background: #3d454d; color: #c2ccd5; box-shadow: none; }
    #referenceModule .reference-sidebar-toggle:hover,
    #referenceModule .reference-inspector-toggle:hover { background: #4b535b; color: #fff; }
    #referenceModule .reference-toolbar { min-height: 42px; padding: 6px 10px; grid-template-columns: minmax(360px, .72fr) minmax(260px, 1fr) auto; background: #202428; border-bottom-color: #343a40; gap: 8px; }
    #referenceModule .reference-path { min-width: 0; display: grid; grid-template-columns: auto minmax(190px, 1fr); gap: 5px; align-items: center; }
    #referenceModule .reference-path-scope { min-width: 72px; height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid #3b444d; border-radius: 4px; background: #2a2f34; color: #e8eef2; font-size: 11px; font-weight: 900; white-space: nowrap; }
    #referenceModule .reference-path-scope b { font: inherit; color: inherit; }
    #referenceModule .reference-path i { color: #b8c1c9; }
    #referenceModule .reference-path input,
    #referenceModule .reference-path select { min-width: 0; width: 100%; height: 28px; border-color: #3b444d; border-radius: 4px; background: #171b1f; color: #e8eef2; font-size: 11px; }
    #referenceModule .reference-path input:focus,
    #referenceModule .reference-path select:focus,
    #referenceModule .reference-searchbox:focus-within,
    #referenceModule .reference-sidebar-field select:focus,
    #referenceModule .reference-filter-grid select:focus,
    #referenceModule .reference-filter-grid input:focus { border-color: #76d7d3; box-shadow: 0 0 0 2px rgba(118,215,211,.16); }
    #referenceModule .reference-path-action,
    #referenceModule .reference-sidebar-mini-action { width: 28px; height: 28px; min-width: 28px; border-color: #3f4850; border-radius: 4px; background: #2a3035; color: #c8d0d7; }
    #referenceModule .reference-path-action:hover,
    #referenceModule .reference-sidebar-mini-action:hover { border-color: #59646d; background: #343b42; color: #fff; }
    #referenceModule .reference-searchbox { height: 28px; border-color: #3b444d; border-radius: 4px; background: #171b1f; padding-left: 6px; }
    #referenceModule .reference-searchbox input { font-size: 12px; color: #edf3f7; }
    #referenceModule .reference-toolbar-actions { gap: 6px; }
    #referenceModule .reference-tool-btn,
    #referenceModule .reference-control-btn,
    #referenceModule .reference-mode-btn { height: 28px; min-height: 28px; border-color: #3f4850; border-radius: 4px; background: #30363b; color: #d9e1e7; box-shadow: none; }
    #referenceModule .reference-tool-btn:hover,
    #referenceModule .reference-control-btn:hover,
    #referenceModule .reference-mode-btn:hover { border-color: #5b6670; background: #3a4249; color: #fff; }
    #referenceModule .reference-tool-btn.primary { background: #2e7fd2; border-color: #4192e2; color: #fff; }
    #referenceModule .reference-tool-btn.primary:hover { background: #3a8fe3; }
    #referenceModule .reference-control-btn.active,
    #referenceModule .reference-mode-btn.active,
    #referenceModule .reference-nav-row.active { border-color: #70d8d3; background: rgba(112,216,211,.16); color: #eefefe; }
    #referenceModule .reference-mode-btn.active i,
    #referenceModule .reference-nav-row.active i { color: #8ce6e1; }
    #referenceModule .reference-sidebar-section,
    #referenceModule .reference-info-section,
    #referenceModule .reference-results-pane,
    #referenceModule .reference-storyboard-panel,
    #referenceModule .reference-query-card { border-color: #343c43; border-radius: 5px; background: #22282d; box-shadow: none; }
    #referenceModule .reference-sidebar-section-head,
    #referenceModule .reference-info-head,
    #referenceModule .reference-results-head,
    #referenceModule .reference-storyboard-head,
    #referenceModule .reference-query-head { min-height: 30px; color: #e2e8ed; border-bottom-color: #343c43; background: transparent; }
    #referenceModule .reference-sidebar-section-head small,
    #referenceModule .reference-info-head small,
    #referenceModule .reference-results-head small { color: #8e99a3; }
    #referenceModule .reference-metric { border-color: #343c43; border-radius: 5px; background: #171c20; }
    #referenceModule .reference-metric strong { font-size: 15px; }
    #referenceModule .reference-filter-grid select,
    #referenceModule .reference-filter-grid input,
    #referenceModule .reference-sidebar-field select { border-color: #3b444d; border-radius: 4px; background: #171c20; color: #e8eef2; }
    #referenceModule .reference-sidebar .reference-filter-panel { background: #22282d; border-color: #343c43; }
    #referenceModule .reference-query-image-empty,
    #referenceModule .reference-empty-state { border-color: #3d454c; border-radius: 4px; background: #202428; color: #9fa9b2; }
    #referenceModule .reference-query-image-empty:hover { border-color: #59646d; background: #262c31; color: #edf3f7; }
    #referenceModule .reference-segment-preview { border-radius: 4px; background: #15191d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
    #referenceModule .reference-roi-box { border-color: #79deda; background-color: rgba(121,222,218,.12); box-shadow: 0 0 0 1px rgba(5,11,18,.72), 0 0 0 999px rgba(0,0,0,.18); }
    #referenceModule .reference-roi-handle { background: #efffff; box-shadow: 0 0 0 2px #58c9c5; }
    #referenceModule .reference-segment-timebar,
    #referenceModule .reference-player-track { background: #303941; }
    #referenceModule .reference-segment-timebar span,
    #referenceModule .reference-player-fill { background: #76d7d3; }
    #referenceModule .reference-player-knob { border-color: #76d7d3; }
    #referenceModule .reference-player-volume input,
    #referenceModule .reference-thumb-size-control input { accent-color: #76d7d3; }
    #referenceModule .reference-content-scroll { background: #202326; padding: 10px; }
    #referenceModule .reference-video-workbench .reference-content-scroll { padding: 10px; }
    #referenceModule .reference-results-pane { border-radius: 5px; background: #202326; }
    #referenceModule .reference-results-head { padding: 4px 10px; }
    #referenceModule .reference-results-scroll { background: #202326; padding: 10px; }
    #referenceModule .reference-view-toggle { border-color: #3f4850; border-radius: 4px; background: #171c20; }
    #referenceModule .reference-view-toggle button { border-radius: 3px; color: #aeb8c1; }
    #referenceModule .reference-view-toggle button.active { background: #3f4850; color: #fff; }
    #referenceModule .reference-sort-menu,
    #referenceModule .reference-sort-submenu-panel { border-color: #3d454c; border-radius: 4px; background: #252b30; }
    #referenceModule .reference-sort-row.active { background: rgba(118,215,211,.12); color: #eaffff; }
    #referenceModule .reference-sort-row.active .radio { border-color: #76d7d3; box-shadow: inset 0 0 0 3px #252b30; background: #76d7d3; }
    #referenceModule .reference-sort-switch.on { background: #5fc7c3; }
    #referenceModule .reference-local-file-card.active .reference-local-file-thumb,
    #referenceModule .reference-video-card.active .reference-video-thumb,
    #referenceModule .reference-asset-card.active .reference-asset-thumb { outline-color: #76d7d3; }
    #referenceModule .reference-local-file-thumb,
    #referenceModule .reference-video-thumb,
    #referenceModule .reference-asset-thumb { border-radius: 4px; background: #15191d; }
    #referenceModule .reference-local-file-thumb.folder,
    #referenceModule .reference-folder-thumb,
    #referenceModule .reference-folder-thumb span,
    #referenceModule .reference-mood-tile { background: #2d343a; color: #cdd6de; }
    #referenceModule .reference-score-badge { background: rgba(118,215,211,.82); color: #071011; }
    #referenceModule .reference-chip.active,
    #referenceModule .reference-chip.blue { background: rgba(118,215,211,.14); border-color: #5dbfbb; color: #e8ffff; }
    #referenceModule .reference-inspector-scroll { padding: 10px; gap: 10px; }
    #referenceModule .reference-inspector-filtered .reference-inspector-scroll { padding: 10px; gap: 10px; grid-template-rows: minmax(0, 1fr); align-content: stretch; }
    #referenceModule .reference-inspector-player-section { min-height: 0; background: transparent; border: 0; border-radius: 0; overflow: visible; }
    #referenceModule .reference-inspector-player-section .reference-info-body { min-height: 0; padding: 0; gap: 8px; grid-template-rows: minmax(0, 1fr); }
    #referenceModule .reference-inspector-media-title { padding: 6px 8px; border-color: #343c43; background: #1a2025; }
    #referenceModule .reference-inspector-media-title strong { font-size: 12px; white-space: normal; max-height: 36px; }
    #referenceModule .reference-inspector-media-title small { font-size: 9px; color: #9aa5ae; white-space: normal; max-height: 28px; }
    #referenceModule .reference-inspector-player { min-height: 0; height: 100%; border-color: #343c43; border-radius: 4px; background: #111518; }
    #referenceModule .reference-inspector-player-frame { min-height: 0; background: #080a0c; }
    #referenceModule .reference-player-controls { border-top-color: #303840; background: #1a2025; }
    #referenceModule .reference-player-badge,
    #referenceModule .reference-player-control-group { border-color: #35404a; border-radius: 4px; background: #141a1f; color: #e5edf2; }
    #referenceModule .reference-player-control-group.reference-player-actions { display: inline-flex; }
    #referenceModule .reference-player-control:hover,
    #referenceModule .reference-player-control.active,
    #referenceModule .reference-player-control.reference-player-active-orange { background: rgba(118,215,211,.16); color: #8ce6e1; box-shadow: inset 0 0 0 1px rgba(118,215,211,.34); }
    #referenceModule .reference-player-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    #referenceModule .reference-player-action-grid .reference-tool-btn { width: 100%; }
    #referenceModule .reference-local-tree,
    #referenceModule.reference-module-modal {
      --reference-ui-bg: #0d0d0d;
      --reference-ui-bg-soft: #111111;
      --reference-ui-panel: #1a1a1a;
      --reference-ui-card: #202020;
      --reference-ui-card-hover: #2a2a2a;
      --reference-ui-card-active: #363636;
      --reference-ui-input: #090909;
      --reference-ui-border: #2f2f2f;
      --reference-ui-border-strong: #3a3a3a;
      --reference-ui-border-hover: #4a4a4a;
      --reference-ui-text: #e8e8e8;
      --reference-ui-text-strong: #f2f2f2;
      --reference-ui-muted: #888;
      --reference-ui-muted-2: #555;
      --reference-ui-accent: #d8d8d8;
      --reference-ui-accent-strong: #f2f2f2;
      background: var(--reference-ui-bg);
      color: var(--reference-ui-text);
      font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
      letter-spacing: 0;
      scrollbar-color: var(--border, #3f3f3f) transparent;
    }
    #referenceModule,
    #referenceModule button,
    #referenceModule input,
    #referenceModule textarea,
    #referenceModule select,
    #referenceModule option {
      font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
      letter-spacing: 0;
    }
    #referenceModule *::-webkit-scrollbar { background: #171717; }
    #referenceModule *::-webkit-scrollbar-track { background: #171717; border-radius: 8px; }
    #referenceModule *::-webkit-scrollbar-thumb { background: #3f3f3f; border: 3px solid #171717; border-radius: 8px; }
    #referenceModule *::-webkit-scrollbar-thumb:hover { background: #555; }
    #referenceModule .reference-workbench {
      background: var(--reference-ui-panel);
      border: 1px solid var(--reference-ui-border);
      box-shadow: none;
    }
    #referenceModule .reference-window-bar,
    #referenceModule .reference-toolbar {
      background: rgba(13,13,13,.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--reference-ui-border);
      color: var(--reference-ui-text);
    }
    #referenceModule .reference-shell,
    #referenceModule .reference-main,
    #referenceModule .reference-content-scroll,
    #referenceModule .reference-results-scroll,
    #referenceModule .reference-inspector,
    #referenceModule .reference-inspector.reference-inspector-filtered {
      background: var(--reference-ui-panel);
    }
    #referenceModule .reference-sidebar {
      background: rgba(13,13,13,.95);
      border-right: 1px solid var(--reference-ui-border);
      color: var(--reference-ui-text);
      scrollbar-color: var(--border, #3f3f3f) transparent;
    }
    #referenceModule .reference-inspector { border-left: 1px solid var(--reference-ui-border); }
    #referenceModule .reference-titlebar strong,
    #referenceModule .reference-results-title,
    #referenceModule .reference-inspector-media-title strong,
    #referenceModule .reference-folder-meta strong,
    #referenceModule .reference-asset-meta strong,
    #referenceModule .reference-video-foot strong,
    #referenceModule .reference-local-file-meta strong {
      color: var(--reference-ui-text-strong);
    }
    #referenceModule .reference-titlebar small,
    #referenceModule .reference-sidebar-section-head small,
    #referenceModule .reference-info-head small,
    #referenceModule .reference-results-head small,
    #referenceModule .reference-inspector-media-title small,
    #referenceModule .reference-local-file-meta small,
    #referenceModule .reference-folder-meta small,
    #referenceModule .reference-asset-meta small,
    #referenceModule .reference-filter-grid label span,
    #referenceModule .reference-sidebar-field,
    #referenceModule .reference-path-label,
    #referenceModule .reference-metric span,
    #referenceModule .reference-nav-row em,
    #referenceModule .reference-nav-row small {
      color: var(--reference-ui-muted);
    }
    #referenceModule .reference-sidebar-section,
    #referenceModule .reference-info-section,
    #referenceModule .reference-results-pane,
    #referenceModule .reference-storyboard-panel,
    #referenceModule .reference-query-card,
    #referenceModule .reference-metric,
    #referenceModule .reference-filter-panel,
    #referenceModule .reference-local-filter-section,
    #referenceModule .reference-inspector-media-title,
    #referenceModule .reference-inspector-player,
    #referenceModule .reference-view-toggle,
    #referenceModule .reference-sort-menu,
    #referenceModule .reference-sort-submenu-panel,
    #referenceModule .reference-query-image-empty,
    #referenceModule .reference-empty-state,
    #referenceModule .reference-segment-preview,
    #referenceModule .reference-local-file-thumb,
    #referenceModule .reference-video-thumb,
    #referenceModule .reference-asset-thumb,
    #referenceModule .reference-folder-thumb,
    #referenceModule .reference-local-tree,
    #referenceModule .reference-local-filter-tree {
      border-color: var(--reference-ui-border);
      border-width: 1px;
      background: var(--reference-ui-card);
      color: var(--reference-ui-text);
      box-shadow: none;
    }
    #referenceModule .reference-sidebar-section,
    #referenceModule .reference-info-section,
    #referenceModule .reference-results-pane,
    #referenceModule .reference-storyboard-panel,
    #referenceModule .reference-query-card,
    #referenceModule .reference-metric,
    #referenceModule .reference-filter-panel,
    #referenceModule .reference-view-toggle,
    #referenceModule .reference-sort-menu,
    #referenceModule .reference-sort-submenu-panel,
    #referenceModule .reference-inspector-player,
    #referenceModule .reference-query-image-empty,
    #referenceModule .reference-empty-state {
      border-radius: 8px;
    }
    #referenceModule .reference-sidebar-section-head,
    #referenceModule .reference-info-head,
    #referenceModule .reference-results-head,
    #referenceModule .reference-storyboard-head,
    #referenceModule .reference-query-head {
      color: var(--reference-ui-text);
      border-bottom: 1px solid var(--reference-ui-border);
      background: transparent;
    }
    #referenceModule .reference-tool-btn,
    #referenceModule .reference-control-btn,
    #referenceModule .reference-mode-btn,
    #referenceModule .reference-path-action,
    #referenceModule .reference-sidebar-mini-action,
    #referenceModule .reference-icon-btn,
    #referenceModule .reference-view-toggle button,
    #referenceModule .reference-player-control-group,
    #referenceModule .reference-player-badge,
    #referenceModule .reference-local-tree-open,
    #referenceModule .reference-row-edit,
    #referenceModule .reference-sort-trigger,
    #referenceModule .reference-sort-row,
    #referenceModule .reference-sort-head {
      border-color: var(--reference-ui-border-strong);
      background: #242424;
      color: var(--reference-ui-text);
      box-shadow: none;
    }
    #referenceModule .reference-tool-btn:hover,
    #referenceModule .reference-control-btn:hover,
    #referenceModule .reference-mode-btn:hover,
    #referenceModule .reference-path-action:hover,
    #referenceModule .reference-sidebar-mini-action:hover,
    #referenceModule .reference-icon-btn:hover,
    #referenceModule .reference-view-toggle button:hover,
    #referenceModule .reference-local-tree-open:hover,
    #referenceModule .reference-row-edit:hover,
    #referenceModule .reference-sort-row:hover,
    #referenceModule .reference-sort-head:hover {
      border-color: var(--reference-ui-border-hover);
      background: #303030;
      color: #fff;
    }
    #referenceModule .reference-tool-btn.primary,
    #referenceModule .reference-tool-btn.primary:hover,
    #referenceModule .reference-tool-btn.reference-exact-toggle.exact-on,
    #referenceModule .reference-tool-btn.reference-semantic-toggle.semantic-on,
    #referenceModule .reference-control-btn.active,
    #referenceModule .reference-mode-btn.active,
    #referenceModule .reference-nav-row.active,
    #referenceModule .reference-view-toggle button.active,
    #referenceModule .reference-sort-row.active,
    #referenceModule .reference-player-control.active,
    #referenceModule .reference-player-control.reference-player-active-orange {
      border-color: var(--reference-ui-accent);
      background: var(--reference-ui-accent-strong);
      color: #111;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    }
    #referenceModule .reference-control-btn.active i,
    #referenceModule .reference-mode-btn.active i,
    #referenceModule .reference-nav-row.active i,
    #referenceModule .reference-player-control.active i,
    #referenceModule .reference-player-control.reference-player-active-orange i {
      color: #111;
    }
    #referenceModule .reference-nav-row,
    #referenceModule .reference-local-file-card,
    #referenceModule .reference-video-card,
    #referenceModule .reference-asset-card,
    #referenceModule .reference-folder-card {
      color: var(--reference-ui-text);
    }
    #referenceModule .reference-nav-row:hover,
    #referenceModule .reference-local-file-card:hover,
    #referenceModule .reference-video-card:hover,
    #referenceModule .reference-asset-card:hover,
    #referenceModule .reference-folder-card:hover {
      background: var(--reference-ui-card-hover);
    }
    #referenceModule .reference-local-file-card.active .reference-local-file-thumb,
    #referenceModule .reference-video-card.active .reference-video-thumb,
    #referenceModule .reference-asset-card.active .reference-asset-thumb,
    #referenceModule .reference-folder-card:hover .reference-folder-thumb,
    #referenceModule .reference-asset-card:hover .reference-asset-thumb {
      outline-color: var(--reference-ui-accent);
    }
    #referenceModule .reference-path input,
    #referenceModule .reference-path select,
    #referenceModule .reference-searchbox,
    #referenceModule .reference-searchbox input,
    #referenceModule .reference-brand-edit,
    #referenceModule .reference-library-path input,
    #referenceModule .reference-sidebar-field select,
    #referenceModule .reference-filter-grid select,
    #referenceModule .reference-filter-grid input,
    #referenceModule .reference-local-filter-path input,
    #referenceModule .reference-storyboard-cell input {
      border: 1px solid var(--reference-ui-border-strong);
      border-radius: 8px;
      background: var(--reference-ui-input);
      color: var(--reference-ui-text);
      box-shadow: none;
    }
    #referenceModule .reference-path input:focus,
    #referenceModule .reference-searchbox:focus-within,
    #referenceModule .reference-brand-edit:focus,
    #referenceModule .reference-library-path input:focus,
    #referenceModule .reference-sidebar-field select:focus,
    #referenceModule .reference-filter-grid select:focus,
    #referenceModule .reference-filter-grid input:focus,
    #referenceModule .reference-local-filter-path input:focus,
    #referenceModule .reference-storyboard-cell input:focus {
      border-color: #666;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    }
    #referenceModule .reference-layout-resizer::before,
    #referenceModule .reference-shell[data-layout-drag-side="sidebar"] .reference-sidebar-resizer::before,
    #referenceModule .reference-shell[data-layout-drag-side="inspector"] .reference-inspector-resizer::before {
      background: var(--reference-ui-border);
      box-shadow: none;
    }
    #referenceModule .reference-layout-resizer:hover::before {
      background: var(--reference-ui-accent);
      box-shadow: none;
    }
    #referenceModule .reference-sidebar-toggle,
    #referenceModule .reference-inspector-toggle {
      border-color: var(--reference-ui-border-strong);
      background: var(--reference-ui-card);
      color: var(--reference-ui-text);
      box-shadow: 0 10px 30px rgba(0,0,0,.45);
    }
    #referenceModule .reference-sidebar-toggle:hover,
    #referenceModule .reference-inspector-toggle:hover {
      border-color: var(--reference-ui-border-hover);
      background: #303030;
      color: #fff;
    }
    #referenceModule .reference-sidebar-toggle,
    #referenceModule .reference-sidebar-toggle:hover,
    #referenceModule .reference-sidebar-toggle:focus-visible,
    #referenceModule .reference-sidebar-toggle:active,
    #referenceModule .reference-inspector-toggle,
    #referenceModule .reference-inspector-toggle:hover,
    #referenceModule .reference-inspector-toggle:focus-visible,
    #referenceModule .reference-inspector-toggle:active {
      transform: translateY(-50%) !important;
    }
    #referenceModule .reference-inspector-player-frame,
    #referenceModule .reference-preview-frame {
      background: #050505;
    }
    #referenceModule .reference-player-controls {
      border-top: 1px solid var(--reference-ui-border);
      background: #171717;
    }
    #referenceModule .reference-player-track,
    #referenceModule .reference-segment-timebar {
      background: #555;
      box-shadow: none;
    }
    #referenceModule .reference-player-fill,
    #referenceModule .reference-segment-timebar span {
      background: var(--reference-ui-accent-strong);
    }
    #referenceModule .reference-player-knob {
      background: var(--reference-ui-accent-strong);
      border-color: var(--reference-ui-accent);
      box-shadow: 0 2px 8px rgba(0,0,0,.42);
    }
    #referenceModule .reference-player-volume input,
    #referenceModule .reference-thumb-size-control input,
    #referenceModule .reference-local-thumb-size-control input {
      accent-color: var(--reference-ui-accent-strong);
    }
    #referenceModule .reference-roi-box {
      border-color: var(--reference-ui-accent-strong);
      background-color: rgba(255,255,255,.08);
      box-shadow: 0 0 0 1px rgba(0,0,0,.72), 0 0 0 999px rgba(0,0,0,.2);
    }
    #referenceModule .reference-roi-handle {
      background: var(--reference-ui-accent-strong);
      box-shadow: 0 0 0 2px #555;
    }
    #referenceModule .reference-score-badge,
    #referenceModule .reference-chip.active,
    #referenceModule .reference-chip.blue,
    #referenceModule .reference-sort-switch.on {
      background: var(--reference-ui-accent-strong);
      border-color: var(--reference-ui-accent);
      color: #111;
    }
    #referenceModule .reference-sort-row.active .radio {
      border-color: var(--reference-ui-accent);
      background: var(--reference-ui-accent-strong);
      box-shadow: inset 0 0 0 3px #252525;
    }
    #referenceModule .reference-query-image-empty:hover,
    #referenceModule .reference-empty-state:hover {
      border-color: var(--reference-ui-border-hover);
      background: var(--reference-ui-card-hover);
      color: var(--reference-ui-text);
    }
    #referenceModule .reference-toast {
      border-color: var(--reference-ui-border-strong);
      border-radius: 8px;
      background: rgba(13,13,13,.95);
      color: var(--reference-ui-text-strong);
      box-shadow: 0 16px 42px rgba(0,0,0,.45);
    }
    #referenceModule.reference-module-modal {
      --reference-ui-bg: var(--bg);
      --reference-ui-bg-soft: #111;
      --reference-ui-panel: var(--bg2);
      --reference-ui-card: #202020;
      --reference-ui-card-hover: #2a2a2a;
      --reference-ui-card-active: #363636;
      --reference-ui-input: #090909;
      --reference-ui-border: var(--border);
      --reference-ui-border-strong: #3a3a3a;
      --reference-ui-border-hover: #4a4a4a;
      --reference-ui-text: var(--fg);
      --reference-ui-text-strong: #f2f2f2;
      --reference-ui-muted: var(--fg2);
      --reference-ui-muted-2: var(--fg3);
      --reference-ui-accent: var(--accent);
      --reference-ui-accent-strong: #f2f2f2;
      background: var(--bg);
      color: var(--fg);
    }
    #referenceModule .reference-workbench {
      inset: 0;
      border: 0;
      border-radius: 0;
      background: var(--bg);
      grid-template-rows: 40px minmax(0, 1fr);
      box-shadow: none;
    }
    #referenceModule .reference-window-bar {
      height: 40px;
      background: rgba(13,13,13,.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      color: var(--fg);
      grid-template-columns: 180px minmax(0, 1fr) auto;
    }
    #referenceModule .reference-toolbar,
    #referenceModule .reference-filterbar {
      background: #1d1d1d;
      border-bottom: 1px solid var(--border);
      color: var(--fg);
      box-shadow: none;
    }
    #referenceModule .reference-shell,
    #referenceModule .reference-main,
    #referenceModule .reference-content-scroll,
    #referenceModule .reference-results-scroll {
      background: #111;
    }
    #referenceModule .reference-results-scroll {
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      scrollbar-gutter: stable;
      touch-action: pan-y;
      pointer-events: auto;
    }
    #referenceModule .reference-sidebar {
      background: rgba(13,13,13,.95);
      border-right: 1px solid var(--border);
      color: var(--fg);
    }
    #referenceModule .reference-inspector,
    #referenceModule .reference-inspector.reference-inspector-filtered {
      background: var(--bg2);
      border-left: 1px solid var(--border);
    }
    #referenceModule .reference-library-brand,
    #referenceModule .reference-library-brand.reference-library-brand-v2,
    #referenceModule .reference-library-path,
    #referenceModule .reference-library-path.reference-library-path-v2,
    #referenceModule .reference-sidebar-section,
    #referenceModule .reference-info-section,
    #referenceModule .reference-results-pane,
    #referenceModule .reference-storyboard-panel,
    #referenceModule .reference-query-card,
    #referenceModule .reference-metric,
    #referenceModule .reference-filter-panel,
    #referenceModule .reference-local-filter-section,
    #referenceModule .reference-inspector-media-title,
    #referenceModule .reference-inspector-player,
    #referenceModule .reference-view-toggle,
    #referenceModule .reference-sort-menu,
    #referenceModule .reference-sort-submenu-panel,
    #referenceModule .reference-query-image-empty,
    #referenceModule .reference-image-slot,
    #referenceModule .reference-storyboard-thumb,
    #referenceModule .reference-text-search,
    #referenceModule .reference-empty-state,
    #referenceModule .reference-segment-preview,
    #referenceModule .reference-local-tree,
    #referenceModule .reference-local-filter-tree,
    #referenceModule .reference-toolbar-image-chip,
    #referenceModule .reference-file-list-head,
    #referenceModule .reference-local-file-thumb,
    #referenceModule .reference-video-thumb,
    #referenceModule .reference-asset-thumb,
    #referenceModule .reference-folder-thumb,
    #referenceModule .reference-folder-thumb span,
    #referenceModule .reference-moodboard-mini,
    #referenceModule .reference-mood-tile {
      border-color: var(--border);
      border-width: 1px;
      background: #202020;
      color: var(--fg);
      box-shadow: none;
    }
    #referenceModule .reference-library-brand,
    #referenceModule .reference-library-brand.reference-library-brand-v2,
    #referenceModule .reference-library-path,
    #referenceModule .reference-library-path.reference-library-path-v2,
    #referenceModule .reference-sidebar-section,
    #referenceModule .reference-info-section,
    #referenceModule .reference-results-pane,
    #referenceModule .reference-storyboard-panel,
    #referenceModule .reference-query-card,
    #referenceModule .reference-filter-panel,
    #referenceModule .reference-inspector-player,
    #referenceModule .reference-empty-state,
    #referenceModule .reference-query-image-empty {
      border-radius: var(--radius);
    }
    #referenceModule .reference-sidebar-section-head,
    #referenceModule .reference-info-head,
    #referenceModule .reference-results-head,
    #referenceModule .reference-storyboard-head,
    #referenceModule .reference-query-head {
      border-bottom: 1px solid var(--border);
      background: transparent;
      color: var(--fg);
      font-weight: 700;
    }
    #referenceModule .reference-titlebar strong,
    #referenceModule .reference-library-brand strong,
    #referenceModule .reference-brand-title strong,
    #referenceModule .reference-results-title,
    #referenceModule .reference-folder-title,
    #referenceModule .reference-folder-meta strong,
    #referenceModule .reference-asset-meta strong,
    #referenceModule .reference-local-file-meta strong,
    #referenceModule .reference-video-foot strong,
    #referenceModule .reference-inspector-media-title strong,
    #referenceModule .reference-query-image-empty strong {
      color: #f2f2f2;
      font-weight: 700;
    }
    #referenceModule .reference-titlebar small,
    #referenceModule .reference-library-brand small,
    #referenceModule .reference-brand-title small,
    #referenceModule .reference-path-label,
    #referenceModule .reference-path-label small,
    #referenceModule .reference-sidebar-section-head small,
    #referenceModule .reference-info-head small,
    #referenceModule .reference-results-head small,
    #referenceModule .reference-storyboard-head small,
    #referenceModule .reference-query-head small,
    #referenceModule .reference-folder-title small,
    #referenceModule .reference-folder-meta small,
    #referenceModule .reference-asset-meta small,
    #referenceModule .reference-local-file-meta small,
    #referenceModule .reference-filter-grid label span,
    #referenceModule .reference-sidebar-field,
    #referenceModule .reference-local-filter-status,
    #referenceModule .reference-sidebar-empty,
    #referenceModule .reference-query-hint,
    #referenceModule .reference-roi-meta,
    #referenceModule .reference-segment-meta,
    #referenceModule .reference-thumb-size-control,
    #referenceModule .reference-file-list-head,
    #referenceModule .reference-file-cell,
    #referenceModule .reference-nav-row em,
    #referenceModule .reference-nav-row small {
      color: var(--fg2);
      font-weight: 700;
    }
    #referenceModule .reference-dot,
    #referenceModule .reference-dot.red,
    #referenceModule .reference-dot.yellow,
    #referenceModule .reference-dot.green,
    #referenceModule .reference-logo {
      background: #555;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
    }
    #referenceModule .reference-brand-title small,
    #referenceModule .reference-nav-row small,
    #referenceModule .reference-tag,
    #referenceModule .reference-chip,
    #referenceModule .reference-media-badge,
    #referenceModule .reference-local-file-badge,
    #referenceModule .reference-video-duration,
    #referenceModule .reference-player-badge {
      border: 1px solid #343434;
      background: rgba(32,32,32,.94);
      color: #d8d8d8;
      border-radius: 7px;
      box-shadow: none;
      backdrop-filter: none;
    }
    #referenceModule .reference-path input,
    #referenceModule .reference-searchbox,
    #referenceModule .reference-brand-edit,
    #referenceModule .reference-library-path input,
    #referenceModule .reference-sidebar-field select,
    #referenceModule .reference-filter-grid select,
    #referenceModule .reference-filter-grid input,
    #referenceModule .reference-local-filter-path input,
    #referenceModule .reference-storyboard-cell input,
    #referenceModule .reference-text-search {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: #090909;
      color: var(--fg);
      font-weight: 700;
      box-shadow: none;
      outline: none;
    }
    #referenceModule .reference-path-scope {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: #242424;
      color: #f2f2f2;
      font-weight: 700;
      box-shadow: none;
    }
    #referenceModule .reference-searchbox input {
      border: 0;
      background: transparent;
      color: var(--fg);
      font-weight: 700;
    }
    #referenceModule .reference-path input::placeholder,
    #referenceModule .reference-searchbox input::placeholder,
    #referenceModule .reference-text-search::placeholder {
      color: #777;
    }
    #referenceModule .reference-path input:focus,
    #referenceModule .reference-path select:focus,
    #referenceModule .reference-searchbox:focus-within,
    #referenceModule .reference-brand-edit:focus,
    #referenceModule .reference-library-path input:focus,
    #referenceModule .reference-sidebar-field select:focus,
    #referenceModule .reference-filter-grid select:focus,
    #referenceModule .reference-filter-grid input:focus,
    #referenceModule .reference-local-filter-path input:focus,
    #referenceModule .reference-storyboard-cell input:focus,
    #referenceModule .reference-text-search:focus {
      border-color: var(--accent);
      box-shadow: none;
    }
    #referenceModule .reference-tool-btn,
    #referenceModule .reference-control-btn,
    #referenceModule .reference-mode-btn,
    #referenceModule .reference-path-action,
    #referenceModule .reference-sidebar-mini-action,
    #referenceModule .reference-icon-btn,
    #referenceModule .reference-view-toggle button,
    #referenceModule .reference-row-edit,
    #referenceModule .reference-sort-trigger,
    #referenceModule .reference-sort-head,
    #referenceModule .reference-sort-row,
    #referenceModule .reference-local-tree-open,
    #referenceModule .reference-local-tree-caret,
    #referenceModule .reference-toolbar-image-chip.add,
    #referenceModule .reference-image-remove,
    #referenceModule .reference-storyboard-thumb .remove,
    #referenceModule .reference-toolbar-image-chip button {
      border-color: #343434;
      border-width: 1px;
      border-radius: var(--radius);
      background: #242424;
      color: #f2f2f2;
      font-weight: 700;
      box-shadow: none;
    }
    #referenceModule .reference-icon-btn,
    #referenceModule .reference-local-tree-caret,
    #referenceModule .reference-toolbar-image-chip button,
    #referenceModule .reference-image-remove,
    #referenceModule .reference-storyboard-thumb .remove {
      background: transparent;
      border-color: transparent;
      color: var(--fg2);
    }
    #referenceModule .reference-tool-btn:hover,
    #referenceModule .reference-control-btn:hover,
    #referenceModule .reference-mode-btn:hover,
    #referenceModule .reference-path-action:hover,
    #referenceModule .reference-sidebar-mini-action:hover,
    #referenceModule .reference-icon-btn:hover,
    #referenceModule .reference-view-toggle button:hover,
    #referenceModule .reference-row-edit:hover,
    #referenceModule .reference-sort-head:hover,
    #referenceModule .reference-sort-row:hover,
    #referenceModule .reference-local-tree-open:hover,
    #referenceModule .reference-local-tree-row:hover,
    #referenceModule .reference-toolbar-image-chip.add:hover,
    #referenceModule .reference-image-slot:hover,
    #referenceModule .reference-storyboard-thumb:hover,
    #referenceModule .reference-query-image-empty:hover {
      border-color: #4a4a4a;
      background: #2a2a2a;
      color: #fff;
    }
    #referenceModule .reference-tool-btn.primary,
    #referenceModule .reference-tool-btn.primary:hover,
    #referenceModule .reference-control-btn.active,
    #referenceModule .reference-mode-btn.active,
    #referenceModule .reference-nav-row.active,
    #referenceModule .reference-view-toggle button.active,
    #referenceModule .reference-sort-row.active,
    #referenceModule .reference-chip.active,
    #referenceModule .reference-chip.blue,
    #referenceModule .reference-sort-switch.on,
    #referenceModule .reference-toolbar-image-chip.active,
    #referenceModule .reference-local-tree-row.active,
    #referenceModule .reference-video-list .reference-video-card.active,
    #referenceModule .reference-player-control.active,
    #referenceModule .reference-player-control.reference-player-active-orange {
      border-color: #a4a4a4;
      background: #363636;
      color: #fff;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    }
    #referenceModule .reference-tool-btn.reference-semantic-toggle.semantic-on {
      border-color: #2f8dff;
      background: #1e6ec8;
      color: #fff;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 1px rgba(47,141,255,.14);
    }
    #referenceModule .reference-tool-btn.reference-exact-toggle.exact-on {
      border-color: #f0c65a;
      background: #d6a92b;
      color: #15120a;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 1px rgba(240,198,90,.16);
    }
    #referenceModule .reference-tool-btn.reference-exact-toggle:not(.exact-on) {
      border-color: #282828;
      background: #191919;
      color: #666;
      opacity: .72;
    }
    #referenceModule .reference-tool-btn.reference-exact-toggle:not(.exact-on) i {
      color: #5f5f5f;
    }
    #referenceModule .reference-tool-btn.reference-exact-toggle:not(.exact-on):hover {
      border-color: #3e3e3e;
      background: #242424;
      color: #a8a8a8;
      opacity: .9;
    }
    #referenceModule .reference-tool-btn.reference-exact-toggle:not(.exact-on):hover i {
      color: #9f9f9f;
    }
    #referenceModule .reference-tool-btn.reference-semantic-toggle:not(.semantic-on) {
      border-color: #343434;
      background: #242424;
      color: #d2d2d2;
    }
    #referenceModule .reference-tool-btn.reference-semantic-toggle.semantic-busy {
      cursor: progress;
      opacity: .72;
      pointer-events: none;
    }
    #referenceModule .reference-ingest-trigger,
    #referenceModule .reference-ingest-action.primary {
      border-color: #6f807a;
      background: #202826;
      color: #eef6f4;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
    }
    #referenceModule .reference-ingest-trigger:hover,
    #referenceModule .reference-ingest-action.primary:hover {
      border-color: #8aa39d;
      background: #27302e;
      color: #fff;
    }
    #referenceModule .reference-ingest-trigger.panel-open {
      border-color: #8aa39d;
      background: #27302e;
      color: #fff;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
    }
    #referenceModule .reference-toolbar {
      grid-template-columns: minmax(260px, .58fr) minmax(160px, 1fr) max-content;
      container: reference-toolbar / inline-size;
    }
    #referenceModule .reference-toolbar-actions {
      min-width: max-content;
      justify-self: end;
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      overflow: visible;
      white-space: nowrap;
    }
    #referenceModule .reference-toolbar-actions .reference-tool-btn,
    #referenceModule .reference-toolbar-actions .reference-ingest-wrap {
      flex: 0 0 auto;
      white-space: nowrap;
    }
    #referenceModule .reference-toolbar-actions .reference-tool-btn span {
      display: inline-block;
      max-width: none;
      overflow: visible;
      text-overflow: clip;
      white-space: nowrap;
      line-height: 1;
    }
    #referenceModule .reference-toolbar-actions .reference-semantic-toggle {
      min-width: 92px;
    }
    #referenceModule .reference-toolbar-actions .reference-exact-toggle {
      min-width: 118px;
    }
    #referenceModule .reference-toolbar-actions .reference-ingest-trigger {
      min-width: 84px;
    }
    @container reference-toolbar (max-width: 680px) {
      #referenceModule .reference-toolbar-actions .reference-exact-toggle,
      #referenceModule .reference-toolbar-actions .reference-semantic-toggle,
      #referenceModule .reference-toolbar-actions .reference-ingest-trigger {
        width: 30px;
        min-width: 30px;
        padding: 0;
      }
      #referenceModule .reference-toolbar-actions .reference-exact-toggle span,
      #referenceModule .reference-toolbar-actions .reference-semantic-toggle span,
      #referenceModule .reference-toolbar-actions .reference-ingest-trigger span {
        display: none;
      }
    }
    #referenceModule .reference-tool-btn.primary i,
    #referenceModule .reference-control-btn.active i,
    #referenceModule .reference-mode-btn.active i,
    #referenceModule .reference-nav-row.active i,
    #referenceModule .reference-view-toggle button.active i,
    #referenceModule .reference-player-control.active i,
    #referenceModule .reference-player-control.reference-player-active-orange i {
      color: #fff;
    }
    #referenceModule .reference-nav-row {
      border: 1px solid transparent;
      border-radius: 7px;
      background: transparent;
      color: var(--fg);
      font-weight: 700;
    }
    #referenceModule .reference-nav-row i,
    #referenceModule .reference-path i,
    #referenceModule .reference-searchbox > i,
    #referenceModule .reference-image-slot i,
    #referenceModule .reference-local-tree-open i,
    #referenceModule .reference-local-tree-open .fa-hard-drive,
    #referenceModule .reference-video-actions .active-star {
      color: #d8d8d8;
    }
    #referenceModule .reference-local-file-card,
    #referenceModule .reference-video-card,
    #referenceModule .reference-asset-card,
    #referenceModule .reference-folder-card {
      color: var(--fg);
      background: transparent;
      box-shadow: none;
    }
    #referenceModule .reference-local-file-card:hover .reference-local-file-thumb,
    #referenceModule .reference-video-card:hover .reference-video-thumb,
    #referenceModule .reference-folder-card:hover .reference-folder-thumb,
    #referenceModule .reference-asset-card:hover .reference-asset-thumb,
    #referenceModule .reference-toolbar-image-chip:hover {
      outline: 1px solid #4a4a4a;
      outline-offset: 0;
    }
    #referenceModule .reference-local-file-card.active .reference-local-file-thumb,
    #referenceModule .reference-video-card.active .reference-video-thumb,
    #referenceModule .reference-asset-card.active .reference-asset-thumb,
    #referenceModule .reference-toolbar-image-chip.active {
      outline: 1px solid var(--accent);
      outline-offset: 0;
      border-color: var(--accent);
      box-shadow: none;
    }
    #referenceModule .reference-local-file-thumb,
    #referenceModule .reference-video-thumb,
    #referenceModule .reference-asset-thumb,
    #referenceModule .reference-folder-thumb,
    #referenceModule .reference-local-file-thumb.folder,
    #referenceModule .reference-local-file-thumb.other,
    #referenceModule .reference-folder-thumb span,
    #referenceModule .reference-mood-tile {
      background: #171717;
      color: var(--fg2);
      border-radius: 7px;
      box-shadow: inset 0 0 0 1px var(--border);
    }
    #referenceModule .reference-local-file-thumb.video {
      background: #050607;
      color: var(--fg2);
    }
    #referenceModule .reference-local-video-state {
      background: #0b0e10;
      color: var(--fg2);
      box-shadow: none;
    }
    #referenceModule .reference-file-list-head {
      background: #202020;
      border-bottom: 1px solid var(--border);
      color: var(--fg2);
    }
    #referenceModule .reference-file-list-head .reference-list-sort-cell {
      border-left: 1px solid var(--border);
    }
    #referenceModule .reference-local-browser-grid.reference-local-thumb-grid {
      gap: 8px;
      grid-template-columns: repeat(auto-fill, minmax(90px, var(--reference-thumb-size, 150px)));
      justify-content: start;
    }
    #referenceModule .reference-local-thumb-grid .reference-local-file-card {
      width: var(--reference-thumb-size, 150px);
      background: transparent;
      gap: 0;
    }
    #referenceModule .reference-local-thumb-grid .reference-local-file-meta {
      display: none !important;
    }
    #referenceModule .reference-local-thumb-grid .reference-local-file-badge,
    #referenceModule .reference-local-thumb-grid .reference-local-video-state {
      display: none !important;
    }
    #referenceModule .reference-local-thumb-grid .reference-local-file-card:hover {
      background: transparent;
    }
    #referenceModule .reference-file-list-head,
    #referenceModule .reference-local-file-list-head {
      display: grid;
      min-width: 920px;
      width: 100%;
      height: 30px;
      box-sizing: border-box;
    }
    #referenceModule .reference-file-list-head {
      min-width: 990px;
      grid-template-columns: minmax(420px, 1fr) 82px 108px 92px 78px 132px;
    }
    #referenceModule .reference-local-file-list-head {
      grid-template-columns: minmax(420px, 1fr) 88px 110px 94px 142px;
    }
    #referenceModule .reference-file-list-head .reference-list-sort-cell,
    #referenceModule .reference-local-file-list-head .reference-list-sort-cell {
      justify-content: flex-end;
      padding: 0 14px 0 10px;
      text-align: right;
    }
    #referenceModule .reference-file-list-head .reference-list-sort-cell:first-child,
    #referenceModule .reference-local-file-list-head .reference-list-sort-cell:first-child {
      justify-content: flex-start;
      padding-left: 14px;
      text-align: left;
    }
    #referenceModule .reference-video-grid.reference-video-list,
    #referenceModule .reference-local-browser-list {
      display: grid;
      min-width: 920px;
      width: 100%;
      grid-template-columns: minmax(0, 1fr);
      justify-items: stretch;
    }
    #referenceModule .reference-video-list .reference-video-card,
    #referenceModule .reference-local-file-row {
      display: grid;
      align-items: center;
      min-height: 28px;
      width: 100%;
      justify-content: stretch;
      justify-self: stretch;
      justify-items: stretch;
      text-align: left;
      box-sizing: border-box;
    }
    #referenceModule .reference-video-list .reference-video-card {
      grid-template-columns: minmax(420px, 1fr) 82px 108px 92px 78px 132px;
    }
    #referenceModule .reference-local-file-row {
      grid-template-columns: minmax(420px, 1fr) 88px 110px 94px 142px;
    }
    #referenceModule .reference-video-row-name,
    #referenceModule .reference-local-name-cell {
      display: grid;
      align-items: center;
      width: 100%;
      grid-template-columns: 28px minmax(0, 1fr);
      justify-self: stretch;
      justify-items: start;
      padding: 0 10px 0 14px;
      box-sizing: border-box;
    }
    #referenceModule .reference-video-list .reference-video-thumb,
    #referenceModule .reference-local-list-thumb,
    #referenceModule .reference-local-file-row .reference-local-file-thumb,
    #referenceModule .reference-local-file-row .reference-local-file-thumb.folder,
    #referenceModule .reference-local-file-row .reference-local-file-thumb.other {
      width: 24px;
      height: 14px;
      min-width: 24px;
      aspect-ratio: auto;
      border-radius: 1px;
      box-shadow: none;
    }
    #referenceModule .reference-video-list .reference-video-foot,
    #referenceModule .reference-local-row-title {
      min-width: 0;
      width: 100%;
      justify-self: stretch;
      justify-content: flex-start;
      text-align: left;
    }
    #referenceModule .reference-video-list .reference-video-foot strong,
    #referenceModule .reference-local-row-title {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #referenceModule .reference-file-cell,
    #referenceModule .reference-local-file-cell {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 0 14px 0 10px;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }
    #referenceModule .reference-results-controls.is-list-view .reference-thumb-size-control {
      display: none;
    }
    #referenceModule .reference-local-file-list-head {
      background: #2b2b2f;
      border-bottom: 1px solid var(--border);
      color: var(--fg2);
      box-shadow: none;
    }
    #referenceModule .reference-local-file-list-head .reference-list-sort-cell,
    #referenceModule .reference-local-file-cell {
      border-left: 1px solid rgba(255,255,255,.045);
    }
    #referenceModule .reference-local-file-list-head .reference-list-sort-cell:first-child {
      border-left: 0;
    }
    #referenceModule .reference-local-file-row {
      background: #1a1a1a;
      color: var(--fg);
      box-shadow: none;
    }
    #referenceModule .reference-local-file-row:nth-child(even) {
      background: #202020;
    }
    #referenceModule .reference-local-file-row:hover {
      background: #2a2a2a;
    }
    #referenceModule .reference-local-file-row.active {
      background: #25394a;
      color: #fff;
    }
    #referenceModule .reference-local-file-row .reference-local-file-thumb,
    #referenceModule .reference-local-file-row .reference-local-file-thumb.folder,
    #referenceModule .reference-local-file-row .reference-local-file-thumb.other {
      width: 24px;
      height: 14px;
      min-width: 24px;
      aspect-ratio: auto;
      border-radius: 1px;
      background: #111;
      box-shadow: none;
    }
    #referenceModule .reference-local-file-row .reference-local-file-thumb.folder {
      background: transparent;
      color: #d6d6d6;
    }
    #referenceModule .reference-local-file-row .reference-local-file-badge,
    #referenceModule .reference-local-file-row .reference-local-video-state {
      display: none !important;
    }
    #referenceModule .reference-video-list .reference-video-card {
      background: #1a1a1a;
    }
    #referenceModule .reference-video-list .reference-video-card:nth-child(even) {
      background: #202020;
    }
    #referenceModule .reference-video-list .reference-video-card:hover {
      background: #2a2a2a;
    }
    #referenceModule .reference-player-controls,
    #referenceModule .reference-player-control-group {
      border-color: var(--border);
      background: #171717;
      color: var(--fg);
      box-shadow: none;
    }
    #referenceModule .reference-player-control {
      background: transparent;
      color: var(--fg);
      box-shadow: none;
    }
    #referenceModule .reference-player-control:hover {
      background: #2a2a2a;
      color: #fff;
      box-shadow: none;
    }
    #referenceModule .reference-inspector-player-frame,
    #referenceModule .reference-inspector-player-frame video,
    #referenceModule .reference-inspector-player-frame img,
    #referenceModule .reference-preview-frame {
      background: #050505;
    }
    #referenceModule .reference-inspector-player-frame::after {
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
    }
    #referenceModule .reference-player-track,
    #referenceModule .reference-segment-timebar {
      background: #555;
      box-shadow: none;
    }
    #referenceModule .reference-segment-track {
      background: transparent;
      box-shadow: none;
    }
    #referenceModule .reference-segment-track::before {
      background: rgba(18,21,24,.74);
      box-shadow: 0 0 0 1px rgba(242,242,242,.28);
    }
    #referenceModule .reference-player-segment-window {
      background: rgba(242,242,242,.18);
      box-shadow: inset 0 0 0 1px rgba(242,242,242,.7);
    }
    #referenceModule .reference-player-fill,
    #referenceModule .reference-player-knob,
    #referenceModule .reference-segment-timebar span,
    #referenceModule .reference-segment-range {
      background: #f2f2f2;
    }
    #referenceModule .reference-player-knob {
      border: 1px solid #d8d8d8;
      box-shadow: 0 2px 8px rgba(0,0,0,.42);
    }
    #referenceModule .reference-player-volume input,
    #referenceModule .reference-thumb-size-control input,
    #referenceModule .reference-local-thumb-size-control input,
    #referenceModule .reference-slider {
      accent-color: #f2f2f2;
    }
    #referenceModule .reference-roi-box {
      border: 1px solid #f2f2f2;
      background-color: rgba(255,255,255,.08);
      box-shadow: 0 0 0 1px rgba(0,0,0,.72), 0 0 0 999px rgba(0,0,0,.2);
    }
    #referenceModule .reference-roi-handle {
      background: #f2f2f2;
      box-shadow: 0 0 0 2px #555;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-empty {
      min-height: 82px !important;
      display: grid !important;
      grid-template-columns: 28px minmax(0, 1fr) !important;
      align-items: center !important;
      justify-items: stretch !important;
      place-items: unset !important;
      gap: 10px !important;
      padding: 10px 12px !important;
      text-align: left !important;
      line-height: 1.25 !important;
      white-space: normal !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-empty i {
      width: 28px !important;
      height: 28px !important;
      display: inline-grid !important;
      place-items: center !important;
      border: 1px solid #454545 !important;
      border-radius: 6px !important;
      background: #1b1b1b !important;
      color: #f2f2f2 !important;
      font-size: 12px !important;
      line-height: 1 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy {
      min-width: 0 !important;
      display: grid !important;
      gap: 3px !important;
      align-content: center !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy strong,
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy small {
      min-width: 0 !important;
      display: block !important;
      margin: 0 !important;
      overflow-wrap: anywhere !important;
      white-space: normal !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy strong {
      color: #f2f2f2 !important;
      font-size: 12px !important;
      font-weight: 700 !important;
      line-height: 1.2 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy small {
      color: #8f8f8f !important;
      font-size: 10px !important;
      font-weight: 600 !important;
      line-height: 1.35 !important;
    }
    #referenceModule .reference-score-badge,
    #referenceModule .reference-sort-row.active .radio {
      border-color: #d8d8d8;
      background: #f2f2f2;
      color: #111;
      box-shadow: none;
    }
    #referenceModule .reference-sort-switch {
      background: #3a3a3a;
    }
    #referenceModule .reference-sort-switch i {
      background: #d8d8d8;
    }
    #referenceModule .reference-color-ramp {
      border-color: var(--border);
      filter: grayscale(1);
      opacity: .72;
    }
    .ftrack-reference-searchbar {
      border-bottom: 1px solid var(--border);
      background: #1d1d1d;
      color: var(--fg);
    }
    .ftrack-reference-searchbar input,
    .ftrack-eval-tile,
    .ftrack-reference-thumb {
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: #202020;
      color: var(--fg);
      box-shadow: none;
    }
    .ftrack-reference-thumb {
      background: #171717;
    }
    .ftrack-reference-thumb span,
    .ftrack-eval-tile small {
      color: var(--fg2);
    }
    .ftrack-eval-tile strong {
      color: #f2f2f2;
    }
    @media (max-width: 1280px) {
      .reference-shell { grid-template-columns: var(--reference-sidebar-w) minmax(0, 1fr) var(--reference-inspector-w); }
      .reference-shell.sidebar-collapsed { grid-template-columns: 14px minmax(0, 1fr) var(--reference-inspector-w); }
      .reference-shell.inspector-collapsed { grid-template-columns: var(--reference-sidebar-w) minmax(0, 1fr) 14px; }
      .reference-shell.sidebar-collapsed.inspector-collapsed { grid-template-columns: 14px minmax(0, 1fr) 14px; }
      .reference-shell.sidebar-collapsed .reference-sidebar-toggle { left: 5px; }
      .reference-shell.inspector-collapsed .reference-inspector-toggle { right: 5px; }
      .reference-sidebar-select-grid { grid-template-columns: minmax(0, 1fr); }
      .reference-retrieval-layout { grid-template-columns: minmax(0, 1fr); }
      .reference-folder-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
      .reference-asset-grid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); }
      .reference-tool-btn span { display: none; }
      .reference-sort-trigger { min-width: 30px; padding: 0 8px; }
    }
    @media (max-width: 980px) {
      .reference-workbench { inset: 0; border-radius: 0; }
      .reference-window-bar { grid-template-columns: auto minmax(0, 1fr) auto; }
      .reference-shell { --reference-sidebar-w: 232px; grid-template-columns: var(--reference-sidebar-w) minmax(0, 1fr); }
      .reference-shell.sidebar-collapsed { grid-template-columns: 14px minmax(0, 1fr); }
      .reference-shell.inspector-collapsed, .reference-shell.sidebar-collapsed.inspector-collapsed { grid-template-columns: var(--reference-sidebar-w) minmax(0, 1fr); }
      .reference-shell.sidebar-collapsed .reference-sidebar-toggle { left: 5px; }
      .reference-inspector-toggle { display: none; }
      .reference-layout-resizer { display: none; }
      .reference-sidebar { padding: 8px; gap: 8px; }
      .reference-control-grid, .reference-mode-grid, .reference-metric-strip { grid-template-columns: minmax(0, 1fr); }
      .reference-inspector { display: none; }
      .reference-retrieval-layout { grid-template-columns: 1fr; overflow: auto; }
      .reference-query-pane { min-height: 520px; }
      .reference-toolbar { grid-template-columns: minmax(0, 1fr); min-height: 118px; padding: 8px; align-content: center; }
      .reference-searchbox { width: 100%; }
      .reference-toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }
      .reference-filterbar { align-items: flex-start; padding: 8px; }
    }
    .ftrack-course-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px; }
    .ftrack-course-item { min-height: 70px; border: 1px solid #303a42; border-radius: 4px; background: #20282e; padding: 9px; display: grid; gap: 5px; }
    .ftrack-course-item strong { color: #f3f8fb; font-size: 11px; line-height: 1.2; }
    .ftrack-course-item small { color: #8f9aa3; font-size: 10px; line-height: 1.3; }
    #adminModal.ftrack-pipeline-mode .shot-admin { height: 100%; min-height: 0; overflow: hidden; background: #20282e; grid-template-columns: var(--shot-filter-w) 1px minmax(680px, 1fr) 1px var(--shot-detail-w); }
    #adminModal.ftrack-pipeline-mode .my-task-admin.shot-admin { grid-template-columns: 240px minmax(0, 1fr); gap: 0; }
    #adminModal.ftrack-pipeline-mode .shot-filter-panel,
    #adminModal.ftrack-pipeline-mode .shot-table-panel,
    #adminModal.ftrack-pipeline-mode .shot-detail-panel { border-radius: 0; border: 0; border-right: 1px solid #303a42; background: #20282e; }
    #adminModal.ftrack-pipeline-mode .shot-detail-panel { border-right: 0; background: #1d252b; }
    #adminModal.ftrack-pipeline-mode .shot-panel-head { height: 34px; padding: 0 10px; background: #1d252b; border-bottom: 1px solid #303a42; color: #d8e0e6; font-size: 12px; font-weight: 900; }
    #adminModal.ftrack-pipeline-mode .shot-filter-body { padding: 10px; gap: 9px; background: #1f282f; }
    #adminModal.ftrack-pipeline-mode .shot-filter-group { gap: 4px; }
    #adminModal.ftrack-pipeline-mode .shot-filter-group label,
    #adminModal.ftrack-pipeline-mode .shot-meta-field label { color: #8f9aa3; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
    #adminModal.ftrack-pipeline-mode .shot-filter-group select,
    #adminModal.ftrack-pipeline-mode .shot-filter-group input,
    #adminModal.ftrack-pipeline-mode .shot-detail-panel select,
    #adminModal.ftrack-pipeline-mode .shot-detail-panel input,
    #adminModal.ftrack-pipeline-mode .shot-detail-panel textarea,
    #adminModal.ftrack-pipeline-mode .shot-search { height: 28px; border-radius: 4px; border-color: #38434c; background: #172027; color: #dce5eb; font-size: 12px; }
    #adminModal.ftrack-pipeline-mode .shot-create-btn,
    #adminModal.ftrack-pipeline-mode .btn-sm { height: 28px; border-radius: 4px; border: 1px solid #39444d; background: #242d34; color: #d8e0e6; font-size: 12px; font-weight: 800; }
    #adminModal.ftrack-pipeline-mode .shot-create-btn:hover,
    #adminModal.ftrack-pipeline-mode .btn-sm:hover { background: #2e3942; border-color: #4b5964; color: #fff; }
    #adminModal.ftrack-pipeline-mode .shot-create-form { background: #1d252b; border-bottom: 1px solid #303a42; }
    #adminModal.ftrack-pipeline-mode .shot-table-wrap { min-height: 0; background: #20282e; }
    #adminModal.ftrack-pipeline-mode .shot-admin table { min-width: 1080px; font-size: 12px; }
    #adminModal.ftrack-pipeline-mode .shot-admin th,
    #adminModal.ftrack-pipeline-mode .shot-admin td { height: 34px; padding: 0 8px; border-bottom: 1px solid #2d373f; color: #d7e0e6; line-height: 34px; font-size: 12px; }
    #adminModal.ftrack-pipeline-mode .shot-admin th { background: #1b2329; color: #c0cad2; font-weight: 900; }
    #adminModal.ftrack-pipeline-mode .shot-admin tr:hover td { background: #29333b; }
    #adminModal.ftrack-pipeline-mode .shot-admin tr.active td { background: #303a42; color: #fff; box-shadow: inset 3px 0 0 #a45ab9; }
    #adminModal.ftrack-pipeline-mode .shot-sort-btn { height: 34px; color: inherit; }
    #adminModal.ftrack-pipeline-mode .shot-subline { color: #8f9aa3; font-size: 10px; }
    #adminModal.ftrack-pipeline-mode .shot-admin select.inline-select { height: 24px; margin: 5px 0; border-radius: 3px; border-color: transparent; background: #2f3942; color: #dce5eb; font-size: 11px; font-weight: 900; text-align: center; }
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-check { color: #fff !important; background: #303030 !important; border-color: #4a4a4a !important; }
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-retake { color: #fff !important; background: #303030 !important; border-color: #4a4a4a !important; }
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-approve { color: #fff !important; background: #303030 !important; border-color: #4a4a4a !important; }
    #adminModal.ftrack-pipeline-mode .shot-status-pill { min-height: 22px; border-radius: 3px; border: 0; background: #2f3942; color: #dce5eb; font-size: 11px; font-weight: 900; }
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-check { background: #303030; color: #fff; }
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-retake { background: #303030; color: #fff; }
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-approve { background: #303030; color: #fff; }
    #adminModal.ftrack-pipeline-mode .shot-thumb { height: 118px; border-radius: 3px; border-color: #323d45; background: #141b20; }
    #adminModal.ftrack-pipeline-mode .shot-detail-body { padding: 12px; gap: 11px; }
    #adminModal.ftrack-pipeline-mode .shot-detail-title strong { font-size: 15px; color: #f2f7fb; }
    #adminModal.ftrack-pipeline-mode .shot-detail-title small { color: #8f9aa3; font-size: 11px; }
    #adminModal.ftrack-pipeline-mode .shot-detail-tabs { gap: 0; border-bottom: 1px solid #303a42; }
    #adminModal.ftrack-pipeline-mode .shot-detail-tab { height: 31px; border: 0; border-radius: 0; background: transparent; color: #aeb8c0; font-size: 12px; }
    #adminModal.ftrack-pipeline-mode .shot-detail-tab.active { background: transparent; color: #fff; border-bottom: 2px solid #a45ab9; }
    #adminModal.ftrack-pipeline-mode .shot-history-item,
    #adminModal.ftrack-pipeline-mode .shot-storyboard-card { border-radius: 3px; background: #20282e; border-color: #323d45; }
    #adminModal.ftrack-pipeline-mode .shot-storyboard-panel { background: #1d252b; border-top: 1px solid #303a42; }
    #adminModal.ftrack-pipeline-mode .shot-splitter { min-width: 1px; background: #303a42; cursor: col-resize; }
    #adminModal.ftrack-pipeline-mode .shot-splitter::before { display: none; }
    @media (max-width: 1380px) {
      .ftrack-workbench { grid-template-columns: 218px minmax(0, 1fr); }
      .ftrack-panel-grid, .ftrack-report-grid, .ftrack-reference-grid { grid-template-columns: 1fr; }
      .ftrack-dashboard-grid, .ftrack-course-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      #adminModal.ftrack-pipeline-mode .shot-admin { grid-template-columns: minmax(190px, var(--shot-filter-w)) 1px minmax(520px, 1fr) 1px minmax(300px, var(--shot-detail-w)); }
    }

    /* Whole-app Infinite Canvas visual skin */
    :root {
      --ui-bg: var(--bg);
      --ui-bg-soft: #111;
      --ui-panel: var(--bg2);
      --ui-card: #202020;
      --ui-card-2: #242424;
      --ui-hover: #2a2a2a;
      --ui-active: #363636;
      --ui-input: #090909;
      --ui-border: var(--border);
      --ui-border-strong: #3a3a3a;
      --ui-border-hover: #4a4a4a;
      --ui-text: var(--fg);
      --ui-text-strong: #f2f2f2;
      --ui-muted: var(--fg2);
      --ui-muted-2: var(--fg3);
      --ui-accent: var(--accent);
      --ui-radius: var(--radius);
      --ui-toolbar-bg: rgba(13,13,13,.85);
      --ui-panel-bg: rgba(13,13,13,.95);
    }

    #app,
    body,
    #canvasArea,
    #reactFlowContainer {
      background-color: var(--ui-bg) !important;
      color: var(--ui-text) !important;
    }
    #topBar,
    #leftToolbar,
    #assetTray,
    #rightPanel,
    .workspace-actions,
    .module-switcher,
    .side-reveal,
    .canvas-metro,
    .outpaint-toolbar,
    .selection-align-toolbar,
    .modal,
    .ctx,
    .context-menu,
    .asset-context-menu,
    .iep-canvas-ref-menu,
    .add-menu,
    .node-add-menu,
    .text-flow-menu,
    .brush-settings-popover,
    .ftrack-compact-toolbar,
    .ftrack-topline,
    .ftrack-sidebar,
    .ftrack-sidebar-brand,
    #adminModal.ftrack-pipeline-mode .modal-h,
    #adminModal.ftrack-pipeline-mode .modal-b {
      background: var(--ui-toolbar-bg) !important;
      border-color: var(--ui-border) !important;
      color: var(--ui-text) !important;
      box-shadow: none !important;
    }

    .startup-module-item,
    .startup-select-card,
    .startup-reference-query,
    .startup-reference-tile,
    .startup-empty,
    .asset-result-item,
    .asset-folder-row,
    .feature-card,
    .stat-c,
    .admin-api-card,
    .admin-api-lock,
    .admin-model-row,
    .admin-video-model-row,
    .proj-card:not(.ic-v2-page *),
    .scene-card:not(.ic-v2-page *),
    .msg.agent .msg-txt,
    .agent-ref-chip,
    .agent-rich-chip,
    .iep-ref-tag,
    .iep-inline-ref,
    .iep-rich-chip,
    .iep-count-pill,
    .video-flow-ref,
    .video-frame-slot,
    .video-flow-add-btn,
    .video-flow-segment,
    .video-flow-duration,
    .ftrack-row,
    .ftrack-project-row,
    .ftrack-status-chip,
    .ftrack-stage-pill,
    .ftrack-token,
    .ftrack-view-segment,
    .ftrack-progress-track,
    .ftrack-progress-mini,
    .ftrack-timeline-bar,
    .ftrack-bar-row .track,
    .ftrack-switch,
    #adminModal.ftrack-pipeline-mode .shot-status-pill,
    #adminModal.ftrack-pipeline-mode .shot-admin select.inline-select {
      background: var(--ui-card-2) !important;
      border-color: var(--ui-border-strong) !important;
      color: var(--ui-text) !important;
      box-shadow: none !important;
    }
    button:not(.shot-thumb):not(.lt-btn):not(.ic-v2-page *),
    .btn-primary,
    .btn-secondary,
    .btn-sm,
    .workspace-action-btn,
    .module-switcher button,
    .startup-pill-btn,
    .startup-square-btn,
    .startup-mini-btn,
    .startup-icon-btn,
    .startup-module-action,
    .startup-sort-toggle,
    .asset-back,
    .asset-add,
    .asset-fav,
    .asset-view-switch button,
    .asset-context-menu button,
    .modal-actions button,
    .admin-model-add,
    .admin-video-model-add,
    .admin-model-remove,
    .admin-video-model-remove,
    .ui-delete-btn,
    .user-delete-btn,
    .team-delete-btn,
    .shot-delete-btn,
    .shot-create-btn,
    .shot-path-pick,
    .shot-detail-tab,
    .agent-round-btn,
    .chat-in button,
    .iep-add-ref-btn,
    .iep-layer-btn,
    .iep-tool-btn,
    .iep-ratio-trigger,
    .iep-ratio-btn,
    .iep-quality-btn,
    .iep-apply-sm,
    .iep-bottom-item,
    .video-flow-settings-btn,
    .video-flow-model-control,
    .video-flow-count-select,
    .outpaint-toolbar button,
    .outpaint-toolbar select,
    .outpaint-ratio-menu button,
    .selection-align-toolbar button,
    .canvas-metro-btn,
    .ftrack-tool-btn,
    .ftrack-nav button,
    .ftrack-view-segment button,
    .ftrack-settings-menu button,
    .ftrack-project-row,
    .ftrack-task-card,
    .ftrack-kanban-card,
    .iep-canvas-ref-item,
    .node-add-menu button,
    .text-flow-menu button {
      background: var(--ui-card-2) !important;
      border-color: var(--ui-border-strong) !important;
      border-width: 1px !important;
      color: var(--ui-text-strong) !important;
      box-shadow: none !important;
      text-shadow: none !important;
    }
    button:not(.ic-v2-page *):hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-sm:hover,
    .workspace-action-btn:hover,
    .module-switcher button:hover,
    .startup-pill-btn:hover,
    .startup-square-btn:hover,
    .startup-mini-btn:hover,
    .startup-icon-btn:hover,
    .startup-module-action:hover,
    .startup-module-item:hover,
    .startup-select-card:hover,
    .asset-fav:hover,
    .asset-folder-row:hover,
    .asset-result-item:hover,
    .asset-context-menu button:hover,
    .modal-actions button:hover,
    .agent-plus:hover,
    .agent-mic:hover,
    .iep-canvas-ref-item:hover,
    .outpaint-ratio-menu button:hover,
    .canvas-metro-btn:hover,
    .ftrack-nav button:hover,
    .ftrack-project-row:hover,
    .ftrack-row:hover,
    .ftrack-task-card:hover,
    .ftrack-kanban-card:hover,
    .ftrack-spreadsheet tr:hover td,
    .ftrack-task-columns tr:hover td,
    #adminModal.ftrack-pipeline-mode .shot-admin tr:hover td {
      background: var(--ui-hover) !important;
      border-color: var(--ui-border-hover) !important;
      color: #fff !important;
      box-shadow: none !important;
      transform: none !important;
      filter: none !important;
    }
    .active,
    button.active,
    .lt-btn.active,
    .module-switcher button.active,
    .startup-module-item.active,
    .startup-select-card.active,
    .startup-sort-toggle.active,
    .asset-fav.active,
    .asset-folder-row.active,
    .asset-segment button.active,
    .asset-view-switch button.active,
    .mode-row button.active,
    .sz-btn.active,
    .admin-tab.active,
    .tray-tab.active,
    .shot-detail-tab.active,
    .canvas-metro-btn.enabled,
    .canvas-metro-btn.active,
    .ftrack-nav button.active,
    .ftrack-view-segment .active,
    .ftrack-settings-menu button.active,
    #adminModal.ftrack-pipeline-mode .admin-tab.active,
    #adminModal.ftrack-pipeline-mode .shot-admin tr.active td,
    #adminModal.ftrack-pipeline-mode .shot-detail-tab.active,
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-check,
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-retake,
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-approve,
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-check,
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-retake,
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-approve {
      background: var(--ui-active) !important;
      border-color: #a4a4a4 !important;
      color: #fff !important;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important;
    }
    input:not(.ic-v2-page *),
    textarea:not(.ic-v2-page *),
    select:not(.ic-v2-page *),
    .form-group input,
    .form-group select,
    .api-field input,
    .api-field textarea,
    .admin-model-row input,
    .admin-video-model-row input,
    .shot-filter-group select,
    .shot-filter-group input,
    .shot-detail-panel select,
    .shot-detail-panel input,
    .shot-detail-panel textarea,
    .shot-search,
    .shot-create-form input,
    .shot-create-form select,
    .team-name-input,
    .team-quota-period,
    .team-quota-input,
    .agent-gen-prompt,
    .iep-input,
    .iep-select,
    .iep-rich-input,
    .brush-settings-popover input,
    .brush-settings-popover select,
    .ftrack-inline-input,
    #adminModal.ftrack-pipeline-mode .shot-filter-group select,
    #adminModal.ftrack-pipeline-mode .shot-filter-group input,
    #adminModal.ftrack-pipeline-mode .shot-detail-panel select,
    #adminModal.ftrack-pipeline-mode .shot-detail-panel input,
    #adminModal.ftrack-pipeline-mode .shot-detail-panel textarea,
    #adminModal.ftrack-pipeline-mode .shot-search,
    [style*="background:#0f172a"],
    [style*="background:#111827"],
    [style*="background:#172033"] {
      background: var(--ui-input) !important;
      border: 1px solid var(--ui-border) !important;
      border-radius: var(--ui-radius) !important;
      color: var(--ui-text) !important;
      box-shadow: none !important;
      outline: none !important;
    }
    input:not(.ic-v2-page *):focus,
    textarea:not(.ic-v2-page *):focus,
    select:not(.ic-v2-page *):focus,
    .api-field input:focus,
    .api-field textarea:focus,
    .iep-input:focus,
    .iep-rich-input:focus,
    .agent-gen-prompt:focus {
      border-color: var(--ui-accent) !important;
      box-shadow: none !important;
    }
    ::placeholder,
    input::placeholder,
    textarea::placeholder,
    .agent-rich-input:empty::before,
    .iep-rich-input:empty::before {
      color: #777 !important;
    }
    h1:not(.ic-v2-page *),
    h2:not(.ic-v2-page *),
    h3:not(.ic-v2-page *),
    strong:not(.ic-v2-page *),
    .app-title,
    .asset-title,
    .startup-shot-title,
    .startup-module-head strong,
    .startup-module-copy strong,
    .startup-card-main strong,
    .startup-selection-text strong,
    .agent-home-title,
    .ftrack-view-title strong,
    .ftrack-dashboard-card strong,
    .ftrack-list-head,
    .ftrack-board-head,
    .ftrack-kanban-head,
    .ftrack-chart-card h3,
    .ftrack-project-card-title strong,
    .ftrack-settings-row strong,
    .ftrack-alert strong,
    #adminModal.ftrack-pipeline-mode .modal-h h2,
    #adminModal.ftrack-pipeline-mode .shot-detail-title strong {
      color: var(--ui-text-strong) !important;
      text-shadow: none !important;
    }
    small:not(.ic-v2-page *),
    label:not(.ic-v2-page *),
    .project-info,
    .asset-result-meta,
    .startup-shot-kicker,
    .startup-module-head small,
    .startup-module-copy small,
    .startup-card-main small,
    .startup-selection-text span,
    .ftrack-view-title small,
    .ftrack-dashboard-card small,
    .ftrack-dashboard-card span,
    .ftrack-row small,
    .ftrack-task-card small,
    .ftrack-kanban-card small,
    .ftrack-settings-row small,
    .ftrack-alert small,
    .ftrack-nav-caption,
    .ftrack-section-title,
    .ftrack-compact-toolbar small,
    #adminModal.ftrack-pipeline-mode .shot-filter-group label,
    #adminModal.ftrack-pipeline-mode .shot-meta-field label,
    #adminModal.ftrack-pipeline-mode .shot-subline,
    #adminModal.ftrack-pipeline-mode .shot-detail-title small {
      color: var(--ui-muted) !important;
    }
    .lt-sep,
    .asset-divider,
    .asset-menu-sep,
    .iep-divider,
    hr,
    .modal-h,
    .admin-tabs,
    .rp-header,
    .ftrack-list-head,
    .ftrack-row,
    .ftrack-board-head,
    .ftrack-kanban-head,
    .ftrack-spreadsheet th,
    .ftrack-spreadsheet td,
    .ftrack-task-columns th,
    .ftrack-task-columns td,
    .ftrack-gantt-head,
    .ftrack-gantt-row,
    .ftrack-gantt-left-head,
    .ftrack-gantt-label,
    .ftrack-settings-row,
    #adminModal.ftrack-pipeline-mode .shot-panel-head,
    #adminModal.ftrack-pipeline-mode .shot-admin th,
    #adminModal.ftrack-pipeline-mode .shot-admin td,
    #adminModal.ftrack-pipeline-mode .shot-splitter {
      border-color: var(--ui-border) !important;
      background-color: transparent !important;
    }
    .startup-module-thumb,
    .startup-selection-icon,
    .asset-folder-icon,
    .asset-folder-icon::before,
    .ftrack-logo-word,
    .ftrack-mark,
    .ftrack-avatar,
    .ftrack-thumb-preview,
    .ftrack-project-banner,
    .ftrack-project-dot,
    .ftrack-donut,
    .ftrack-donut::after,
    .ftrack-gantt-label .swatch,
    .ftrack-gantt-bar,
    .ftrack-gantt-bar::after,
    .ftrack-legend i,
    .ftrack-token i,
    .agent-home-mark,
    .video-flow-loading,
    .video-flow-loading::before {
      background: #303030 !important;
      border-color: var(--ui-border-strong) !important;
      color: var(--ui-text-strong) !important;
      box-shadow: none !important;
      opacity: 1 !important;
      filter: none !important;
    }
    .ftrack-progress-fill,
    .ftrack-timeline-fill,
    .ftrack-bar-row .fill,
    .ftrack-progress-mini span,
    .team-usage-fill,
    .canvas-metro-slider input,
    .feature-switch input:checked + span,
    .ftrack-switch.on,
    .ftrack-switch.on::after {
      background: #d8d8d8 !important;
      border-color: #d8d8d8 !important;
      color: #111 !important;
      box-shadow: none !important;
    }
    .ftrack-stage-design,
    .ftrack-stage-layout,
    .ftrack-stage-animation,
    .ftrack-stage-approve,
    .ftrack-stage-wait,
    .ftrack-status-chip.check,
    .ftrack-status-chip.retake,
    .ftrack-status-chip.approve,
    .shot-status-pill,
    .shot-review-check,
    .shot-review-retake,
    .shot-review-approve,
    .iep-canvas-ref-video-badge,
    .video-flow-ref .ref-count,
    .video-flow-add-btn .ref-count,
    .ref-count,
    .rb.danger,
    .danger {
      background: var(--ui-active) !important;
      border-color: #a4a4a4 !important;
      color: #fff !important;
      box-shadow: none !important;
    }
    .ftrack-spreadsheet .task-name,
    .ftrack-task-columns .shot-cell,
    .admin-model-remove:hover,
    .admin-video-model-remove:hover,
    .ui-delete-btn:hover,
    .user-delete-btn:hover,
    .team-delete-btn:hover,
    .shot-delete-btn:hover,
    .error,
    .active-star {
      color: #f2f2f2 !important;
      background: var(--ui-hover) !important;
      border-color: var(--ui-border-hover) !important;
    }
    [style*="#7c3aed"],
    [style*="#0f172a"],
    [style*="#111827"],
    [style*="#172033"],
    [style*="#1e293b"],
    [style*="#60a5fa"],
    [style*="#94a3b8"],
    [style*="#bfdbfe"],
    [style*="#cbd5e1"],
    [style*="#e2e8f0"] {
      background-color: var(--ui-card) !important;
      border-color: var(--ui-border) !important;
      color: var(--ui-text) !important;
      box-shadow: none !important;
    }
    [style*="#7c3aed"] button,
    [style*="#0f172a"] button,
    [style*="#111827"] button,
    [style*="#172033"] button,
    [style*="#1e293b"] button,
    #imageApiSave,
    #agentApiSave {
      background: var(--ui-card-2) !important;
      border: 1px solid var(--ui-border-strong) !important;
      color: var(--ui-text-strong) !important;
      box-shadow: none !important;
    }
    .image-lightbox img,
    .agent-gen-result img,
    .asset-result-item img,
    .startup-reference-tile img,
    .ftrack-thumb-preview img,
    .ftrack-project-banner img,
    .shot-thumb img,
    .video-flow-result video,
    .video-flow-ref img,
    .video-flow-ref video,
    .iep-canvas-ref-item img {
      border-color: var(--ui-border) !important;
      box-shadow: none !important;
    }
    /* Final Infinite Canvas UI closure: keep every chrome surface in the same black/gray language. */
    #app.startup-mode .app-title::before {
      background: #303030 !important;
      border: 1px solid var(--ui-border-strong) !important;
      border-radius: var(--ui-radius) !important;
      box-shadow: none !important;
    }



    .text-node-side-plus,
    .agent-dock-close {
      background: var(--ui-active) !important;
      border: 1px solid var(--ui-border-strong) !important;
      border-radius: var(--ui-radius) !important;
      color: var(--ui-text-strong) !important;
      box-shadow: none !important;
      transform: none !important;
    }
    .text-node-side-plus:hover,
    .agent-dock-close:hover {
      background: var(--ui-hover) !important;
      border-color: var(--ui-border-hover) !important;
      box-shadow: none !important;
      transform: none !important;
    }
    .sel-bar button:hover,
    .media-name-editor:focus,
    .iep-header span.focus-pick-active,
    .shot-detail-tab.active,
    #adminModal.ftrack-pipeline-mode .shot-detail-tab.active {
      color: var(--ui-text-strong) !important;
      border-color: var(--ui-border-hover) !important;
      border-bottom-color: #d8d8d8 !important;
      background: var(--ui-hover) !important;
      box-shadow: none !important;
    }
    .ftrack-nav button.active,
    .ftrack-settings-menu button.active,
    #adminModal.ftrack-pipeline-mode .shot-admin tr.active td {
      background: var(--ui-active) !important;
      border-color: var(--ui-border-hover) !important;
      color: #fff !important;
      box-shadow: inset 1px 0 0 #d8d8d8 !important;
    }
    .ftrack-tool-btn.primary,
    .ftrack-tool-btn.primary:hover,
    .ftrack-view-segment .active,
    .ftrack-status-chip.check,
    .ftrack-status-chip.retake,
    .ftrack-status-chip.approve,
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-check,
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-retake,
    #adminModal.ftrack-pipeline-mode .shot-admin select.shot-review-approve,
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-check,
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-retake,
    #adminModal.ftrack-pipeline-mode .shot-status-pill.shot-review-approve {
      background: var(--ui-active) !important;
      border: 1px solid var(--ui-border-hover) !important;
      color: var(--ui-text-strong) !important;
      box-shadow: none !important;
    }
    .ftrack-donut {
      background: conic-gradient(#d8d8d8 0 var(--approved, 35%), #a4a4a4 var(--approved, 35%) var(--check, 62%), #777 var(--check, 62%) var(--retake, 78%), #3a3a3a var(--retake, 78%) 100%) !important;
    }
    .brush-swatch,
    [style*="#ff3838"],
    [style*="#f59e0b"],
    [style*="#22c55e"],
    [style*="#38bdf8"],
    [style*="#a855f7"],
    [style*="#5aa0ff"],
    [style*="#2c9add"],
    [style*="#d85a67"],
    [style*="#18b992"],
    [style*="#30b780"],
    [style*="#26a0d8"],
    [style*="#a45ab9"],
    [style*="#8e4ca8"],
    [style*="#1fa4de"],
    [style*="#28b77e"],
    [style*="#1aae9f"],
    [style*="#06b6d4"],
    [style*="#f97316"],
    [style*="#e11d48"],
    [style*="#facc15"],
    [style*="rgba(96,165,250"],
    [style*="rgba(124,58,237"],
    [style*="rgba(90,160,255"],
    [style*="rgba(47,140,255"] {
      background: var(--ui-active) !important;
      background-color: var(--ui-active) !important;
      border-color: var(--ui-border-hover) !important;
      color: var(--ui-text-strong) !important;
      box-shadow: none !important;
    }
    /* Reference search left control deck: keep the sidebar in the same Infinite Canvas gray system. */
    #referenceModule .reference-sidebar.reference-sidebar-control-deck {
      background: #0d0d0d !important;
      border-right: 1px solid #2f2f2f !important;
      color: #e8e8e8 !important;
      box-shadow: none !important;
      scrollbar-color: var(--border, #3f3f3f) transparent !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-section,
    #referenceModule .reference-sidebar-control-deck .reference-local-filter-section {
      background: #202020 !important;
      border: 1px solid #2f2f2f !important;
      color: #e8e8e8 !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-section-head {
      background: transparent !important;
      border-bottom-color: #2f2f2f !important;
      color: #e8e8e8 !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-section-head small,
    #referenceModule .reference-sidebar-control-deck .reference-filter-grid label span,
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-field,
    #referenceModule .reference-sidebar-control-deck .reference-nav-row small,
    #referenceModule .reference-sidebar-control-deck .reference-nav-row em,
    #referenceModule .reference-sidebar-control-deck .reference-metric span,
    #referenceModule .reference-sidebar-control-deck .reference-query-hint,
    #referenceModule .reference-sidebar-control-deck .reference-segment-meta {
      color: #888 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-empty,
    #referenceModule .reference-sidebar-control-deck .reference-metric,
    #referenceModule .reference-sidebar-control-deck .reference-nav-row,
    #referenceModule .reference-sidebar-control-deck .reference-segment-preview {
      background: #242424 !important;
      border-color: #3a3a3a !important;
      color: #f2f2f2 !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-control-btn,
    #referenceModule .reference-sidebar-control-deck .reference-mode-btn,
    #referenceModule .reference-sidebar-control-deck .reference-filter-custom-btn,
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-mini-action {
      background: #242424 !important;
      border: 1px solid #3a3a3a !important;
      color: #f2f2f2 !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-control-btn:hover,
    #referenceModule .reference-sidebar-control-deck .reference-mode-btn:hover,
    #referenceModule .reference-sidebar-control-deck .reference-filter-custom-btn:hover:not(:disabled),
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-mini-action:hover,
    #referenceModule .reference-sidebar-control-deck .reference-nav-row:hover,
    #referenceModule .reference-sidebar-control-deck .reference-query-image-empty:hover {
      background: #2a2a2a !important;
      border-color: #4a4a4a !important;
      color: #fff !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-filter-custom-btn:disabled {
      background: #1b1b1b !important;
      border-color: #2c2c2c !important;
      color: #777 !important;
      opacity: .55 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-control-btn.active,
    #referenceModule .reference-sidebar-control-deck .reference-mode-btn.active,
    #referenceModule .reference-sidebar-control-deck .reference-nav-row.active {
      background: #363636 !important;
      border-color: #4a4a4a !important;
      color: #f2f2f2 !important;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-control-btn.active i,
    #referenceModule .reference-sidebar-control-deck .reference-mode-btn.active i,
    #referenceModule .reference-sidebar-control-deck .reference-nav-row.active i {
      color: #f2f2f2 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-section {
      gap: 8px !important;
      padding: 8px !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-section-body {
      display: grid;
      gap: 8px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-control-grid,
    #referenceModule .reference-sidebar-control-deck .reference-mode-grid {
      gap: 6px !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-control-btn,
    #referenceModule .reference-sidebar-control-deck .reference-mode-btn {
      height: 28px !important;
      min-height: 28px !important;
      align-items: center !important;
      justify-content: center !important;
      padding: 0 7px !important;
      line-height: 1 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-control-btn i,
    #referenceModule .reference-sidebar-control-deck .reference-mode-btn i {
      width: 14px !important;
      min-width: 14px !important;
      line-height: 1 !important;
      text-align: center !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-empty {
      min-height: 70px !important;
      display: grid !important;
      grid-template-columns: 26px minmax(0, 1fr) !important;
      align-items: center !important;
      justify-items: start !important;
      justify-content: start !important;
      gap: 9px !important;
      padding: 10px 12px !important;
      text-align: left !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-empty i {
      width: 26px !important;
      height: 26px !important;
      min-width: 26px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      border: 1px solid #555 !important;
      border-radius: 5px !important;
      background: #202020 !important;
      color: #f2f2f2 !important;
      font-size: 13px !important;
      line-height: 1 !important;
      align-self: center !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy {
      min-width: 0 !important;
      display: grid !important;
      align-content: center !important;
      gap: 3px !important;
      line-height: 1.2 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy strong {
      color: #f2f2f2 !important;
      font-size: 11px !important;
      line-height: 1.15 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-query-image-copy small {
      color: #888 !important;
      font-size: 9px !important;
      line-height: 1.25 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-filter-grid select,
    #referenceModule .reference-sidebar-control-deck .reference-filter-grid input,
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-field select,
    #referenceModule .reference-sidebar-control-deck .reference-local-filter-path input {
      background: #090909 !important;
      border: 1px solid #2f2f2f !important;
      color: #e8e8e8 !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-filter-grid select:focus,
    #referenceModule .reference-sidebar-control-deck .reference-filter-grid input:focus,
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-field select:focus,
    #referenceModule .reference-sidebar-control-deck .reference-local-filter-path input:focus {
      border-color: #666 !important;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-sidebar-section.reference-sidebar-section-collapsed {
      gap: 0 !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-section {
      flex: 1 1 260px;
      min-height: 240px;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      overflow: hidden;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-section .reference-sidebar-section-body {
      min-height: 0;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 6px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-section .reference-local-tree {
      min-height: 0;
    }
    #referenceModule .reference-sidebar-section-title {
      min-width: 0;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      overflow: hidden;
    }
    #referenceModule .reference-sidebar-drag-handle {
      width: 20px;
      height: 22px;
      min-width: 20px;
      border: 0;
      background: transparent;
      color: #777;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      cursor: grab;
    }
    #referenceModule .reference-sidebar-drag-handle:active {
      cursor: grabbing;
    }
    #referenceModule .reference-sidebar-drag-handle:hover {
      color: #f2f2f2;
    }
    #referenceModule .reference-sidebar-section-dragging {
      opacity: .58;
      outline: 1px dashed #666;
    }
    #referenceModule .reference-sidebar-section-drop-target {
      border-color: #777 !important;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.18) !important;
    }
    #referenceModule .reference-sidebar-section-actions {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-left: auto;
    }
    #referenceModule .reference-sidebar-collapse-btn {
      width: 24px;
      height: 24px;
      min-width: 24px;
      border: 1px solid #3a3a3a;
      border-radius: 7px;
      background: #242424;
      color: #f2f2f2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      cursor: pointer;
      box-shadow: none;
    }
    #referenceModule .reference-sidebar-collapse-btn:hover {
      background: #2a2a2a;
      border-color: #4a4a4a;
      color: #fff;
    }
    #referenceModule .reference-sidebar-collapse-btn i {
      font-size: 10px;
      line-height: 1;
    }
    #referenceModule .reference-sidebar-section-collapsed .reference-sidebar-section-body {
      display: none !important;
    }
    #referenceModule .reference-sidebar-section-collapsed.reference-filter-panel .reference-info-body {
      display: none !important;
    }
    /* Reference local explorer: VS Code-like tree, not cards inside a framed box. */
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-section {
      background: #1f1f1f !important;
      border-color: #2b2b2b !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-section .reference-sidebar-section-body {
      gap: 5px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-path {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 24px;
      gap: 4px;
      margin: 0 0 2px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-path input {
      height: 24px !important;
      border-radius: 4px !important;
      background: #0f0f0f !important;
      border-color: #303030 !important;
      color: #dcdcdc !important;
      font-size: 11px !important;
      font-weight: 600 !important;
      padding: 0 7px !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-explorer-path .reference-sidebar-mini-action {
      width: 24px;
      min-width: 24px;
      height: 24px;
      border-radius: 4px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree,
    #referenceModule .reference-sidebar-control-deck .reference-local-filter-tree {
      border: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      padding: 0 !important;
      gap: 0 !important;
      box-shadow: none !important;
      display: block !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree::-webkit-scrollbar {
      width: 8px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree::-webkit-scrollbar-track {
      background: #1f1f1f;
      border: 0;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree::-webkit-scrollbar-thumb {
      background: #424242;
      border: 2px solid #1f1f1f;
      border-radius: 8px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-row {
      position: relative;
      height: 22px;
      min-height: 22px;
      grid-template-columns: 16px minmax(0, 1fr);
      gap: 0;
      padding-left: calc(var(--reference-tree-level, 0) * 16px);
      border-radius: 0;
      color: #d4d4d4;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-row::before {
      content: "";
      position: absolute;
      left: var(--reference-tree-guide-x, -40px);
      top: -11px;
      bottom: -11px;
      width: 1px;
      background: rgba(120,120,120,.18);
      opacity: var(--reference-tree-guide-opacity, 0);
      pointer-events: none;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-row::after {
      content: "";
      position: absolute;
      left: var(--reference-tree-elbow-x, -40px);
      top: 11px;
      width: 8px;
      height: 1px;
      background: rgba(120,120,120,.18);
      opacity: var(--reference-tree-guide-opacity, 0);
      pointer-events: none;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-row:hover {
      background: #2a2d2e !important;
      color: #f2f2f2;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-row.active,
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-node.active > .reference-local-tree-row {
      background: #2b83d3 !important;
      color: #fff !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-caret,
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-open {
      border: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-caret {
      width: 16px;
      height: 22px;
      color: #c5c5c5 !important;
      position: relative;
      z-index: 1;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-caret i {
      font-size: 9px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-open {
      width: 100%;
      height: 22px;
      min-width: 0;
      gap: 4px;
      padding: 0 4px 0 0;
      color: inherit !important;
      font-size: 12px;
      font-weight: 500;
      line-height: 22px;
      position: relative;
      z-index: 1;
      justify-content: flex-start;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-open i {
      width: 15px;
      min-width: 15px;
      font-size: 13px;
      color: #dcb85c !important;
      text-align: left;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-open .fa-hard-drive {
      color: #aeb4ba !important;
      font-size: 12px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-open span {
      color: inherit;
      font-weight: 500;
      line-height: 22px;
    }
    #referenceModule .reference-sidebar-control-deck .reference-local-tree-empty {
      height: 22px;
      padding-left: calc(var(--reference-tree-level, 0) * 17px + 20px);
      color: #8a8a8a;
      font-size: 11px;
      font-weight: 500;
    }
    /* Keep the three-module startup entry exactly in its original visual system. */
    #app.startup-mode #canvasArea {
      background-color: #020202 !important;
      background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1px) !important;
      background-size: 24px 24px !important;
    }
    #app.startup-mode .startup-shot-picker {
      --startup-entry-panel-height: 376px;
      --startup-entry-gap: 16px;
      --startup-entry-section-gap: clamp(34px, 3.2vw, 58px);
      --startup-entry-radius: 16px;
      --startup-entry-card-radius: 12px;
      --startup-entry-ai-head-offset: 71px;
      --startup-entry-panel-bg: #202020;
      --startup-entry-card-bg: #252525;
      --startup-entry-border: #3b3b3b;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      box-shadow: none !important;
      color: #f2f2f2 !important;
    }
    #app.startup-mode .startup-module-label {
      min-height: 31px !important;
      color: #f2f2f2 !important;
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      font-size: 28px !important;
      line-height: 1.1 !important;
      font-weight: 900 !important;
      text-align: center !important;
    }
    #app.startup-mode .startup-module-panel,
    #app.startup-mode .startup-selector-col,
    #app.startup-mode .startup-canvas-entry-card,
    #app.startup-mode .startup-selection-bar {
      border: 1px solid var(--startup-entry-border) !important;
      border-radius: var(--startup-entry-radius) !important;
      background: var(--startup-entry-panel-bg) !important;
      color: #f2f2f2 !important;
      box-shadow: 0 16px 42px rgba(0,0,0,.45) !important;
    }
    #app.startup-mode .startup-module-panel,
    #app.startup-mode .startup-selector-col {
      padding: 12px !important;
    }
    #app.startup-mode .startup-canvas-entry-card {
      padding: 18px !important;
    }
    #app.startup-mode .startup-module-item,
    #app.startup-mode .startup-select-card,
    #app.startup-mode .startup-reference-query {
      border: 1px solid #353535 !important;
      border-radius: var(--startup-entry-card-radius) !important;
      background: var(--startup-entry-card-bg) !important;
      color: #f2f2f2 !important;
      box-shadow: none !important;
      opacity: .72 !important;
    }
    /* 信息区固定高度：参考检索的「最近检索上下文」会随选中项目/场次/镜头长短变化（如 test/test/SC001），
       固定高度 + 裁剪溢出后，Teamwork 与参考检索两卡的「进入」按钮始终对齐在同一水平线。 */
    #app.startup-mode .startup-reference-query {
      height: 92px !important;
      min-height: 92px !important;
      max-height: 92px !important;
    }
    #app.startup-mode .startup-module-item:hover,
    #app.startup-mode .startup-select-card:hover {
      border-color: #666 !important;
      background: #2e2e2e !important;
      opacity: .9 !important;
    }
    #app.startup-mode .startup-module-item.active,
    #app.startup-mode .startup-select-card.active {
      border-color: #a4a4a4 !important;
      background: #363636 !important;
      color: #f2f2f2 !important;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 14px 28px rgba(0,0,0,.28) !important;
      opacity: 1 !important;
    }
    #app.startup-mode .startup-module-thumb {
      width: 48px !important;
      height: 38px !important;
      border: 1px solid #444 !important;
      border-radius: 10px !important;
      background: #303030 !important;
      color: #d7d7d7 !important;
      box-shadow: none !important;
    }
    #app.startup-mode .startup-reference-tile {
      border: 1px solid #353535 !important;
      border-radius: 12px !important;
      background: #252525 !important;
      color: #9c9c9c !important;
      box-shadow: none !important;
      opacity: .72 !important;
    }
    #app.startup-mode .startup-reference-tile:hover {
      border-color: #666 !important;
      background: #2e2e2e !important;
      opacity: .9 !important;
    }
    #app.startup-mode .startup-module-action,
    #app.startup-mode .startup-pill-btn {
      height: 34px !important;
      border: 1px solid #3a3a3a !important;
      border-radius: 18px !important;
      background: #242424 !important;
      color: #f2f2f2 !important;
      box-shadow: 0 10px 26px rgba(0,0,0,.28) !important;
      font-size: 13px !important;
      font-weight: 800 !important;
    }
    #app.startup-mode .startup-module-action:hover,
    #app.startup-mode .startup-pill-btn:hover {
      border-color: #5a5a5a !important;
      background: #303030 !important;
    }
    #app.startup-mode .startup-mini-btn {
      width: 31px !important;
      height: 31px !important;
      border: 1px solid #444 !important;
      border-radius: 9px !important;
      background: #303030 !important;
      color: #d7d7d7 !important;
      box-shadow: none !important;
    }
    #app.startup-mode .startup-sort-toggle {
      height: 25px !important;
      min-width: 56px !important;
      border: 1px solid #444 !important;
      border-radius: 8px !important;
      background: #303030 !important;
      color: #d7d7d7 !important;
      box-shadow: none !important;
      font-size: 11px !important;
      font-weight: 900 !important;
    }
    #app.startup-mode .startup-icon-btn {
      width: 24px !important;
      height: 24px !important;
      border: 1px solid #444 !important;
      border-radius: 7px !important;
      background: #303030 !important;
      color: #d4d4d4 !important;
      box-shadow: none !important;
    }
    #app.startup-mode .startup-mini-btn:hover,
    #app.startup-mode .startup-sort-toggle:hover,
    #app.startup-mode .startup-icon-btn:hover {
      border-color: #666 !important;
      background: #3a3a3a !important;
      color: #fff !important;
    }
    #app.startup-mode .startup-selection-bar {
      width: min(700px, 100%) !important;
      min-height: 74px !important;
      padding: 12px !important;
      gap: 12px !important;
    }
    #app.startup-mode .startup-selection-icon {
      width: 34px !important;
      height: 34px !important;
      border: 1px solid #444 !important;
      border-radius: 9px !important;
      background: #303030 !important;
      color: #d7d7d7 !important;
      box-shadow: none !important;
    }
    #app.startup-mode .startup-canvas-entry-icon {
      width: 62px !important;
      height: 62px !important;
      border: 1px solid #444 !important;
      border-radius: 18px !important;
      background: #303030 !important;
      color: #f2f2f2 !important;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.05) !important;
    }
    #app.startup-mode .startup-empty {
      border: 1px dashed #444 !important;
      border-radius: 14px !important;
      background: transparent !important;
      color: #858585 !important;
      box-shadow: none !important;
    }
    #app.startup-mode .startup-shot-title,
    #app.startup-mode .startup-module-copy strong,
    #app.startup-mode .startup-card-main strong,
    #app.startup-mode .startup-selection-text strong,
    #app.startup-mode .startup-canvas-entry-copy strong,
    #app.startup-mode .startup-reference-query strong {
      color: #f2f2f2 !important;
    }
    #app.startup-mode .startup-shot-kicker,
    #app.startup-mode .startup-module-head,
    #app.startup-mode .startup-module-head small,
    #app.startup-mode .startup-module-copy small,
    #app.startup-mode .startup-card-main small,
    #app.startup-mode .startup-selection-text span,
    #app.startup-mode .startup-canvas-entry-copy small {
      color: #9c9c9c !important;
    }
    #app.startup-mode .startup-reference-tile img,
    #app.startup-mode .startup-module-thumb img {
      border: 0 !important;
      border-radius: inherit !important;
      box-shadow: none !important;
    }
    #app.startup-mode .startup-shot-picker.module-entry-mode {
      width: min(1060px, calc(100vw - 96px)) !important;
    }
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-entry-layout {
      grid-template-columns: repeat(3, minmax(240px, 1fr)) !important;
      column-gap: 18px !important;
      row-gap: var(--startup-entry-gap) !important;
    }
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-entry-column,
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-teamwork-entry,
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-ai-entry,
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-reference-entry {
      grid-column: auto !important;
      order: initial !important;
    }
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-teamwork-entry .startup-module-panel,
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-reference-entry .startup-module-panel {
      margin-top: 0 !important;
    }
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-module-panel,
    #app.startup-mode .startup-shot-picker.module-entry-mode .startup-canvas-entry-card {
      height: 286px !important;
      min-height: 286px !important;
    }
    * {
      scrollbar-color: var(--border, #3f3f3f) transparent;
    }
    /* Reference module icon scale lock: thumbnails can resize, small UI glyphs cannot. */
    #referenceModule {
      --reference-ui-icon-btn: 24px;
      --reference-ui-icon-font: 12px;
      --reference-ui-thumb-icon: 18px;
    }
    #referenceModule .reference-icon-btn,
    #referenceModule .reference-path-action,
    #referenceModule .reference-sidebar-mini-action,
    #referenceModule .reference-filter-custom-btn,
    #referenceModule .reference-sidebar-collapse-btn,
    #referenceModule .reference-view-toggle button,
    #referenceModule .reference-row-edit,
    #referenceModule .reference-image-remove,
    #referenceModule .reference-toolbar-image-chip button {
      width: var(--reference-ui-icon-btn) !important;
      min-width: var(--reference-ui-icon-btn) !important;
      height: var(--reference-ui-icon-btn) !important;
      min-height: var(--reference-ui-icon-btn) !important;
      padding: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      flex: 0 0 var(--reference-ui-icon-btn) !important;
      line-height: 1 !important;
      box-sizing: border-box !important;
    }
    #referenceModule .reference-icon-btn i,
    #referenceModule .reference-path-action i,
    #referenceModule .reference-sidebar-mini-action i,
    #referenceModule .reference-filter-custom-btn i,
    #referenceModule .reference-sidebar-collapse-btn i,
    #referenceModule .reference-view-toggle button i,
    #referenceModule .reference-row-edit i,
    #referenceModule .reference-image-remove i,
    #referenceModule .reference-toolbar-image-chip button i,
    #referenceModule .reference-control-btn i,
    #referenceModule .reference-mode-btn i,
    #referenceModule .reference-tool-btn i {
      width: var(--reference-ui-icon-font) !important;
      min-width: var(--reference-ui-icon-font) !important;
      height: var(--reference-ui-icon-font) !important;
      min-height: var(--reference-ui-icon-font) !important;
      font-size: var(--reference-ui-icon-font) !important;
      line-height: var(--reference-ui-icon-font) !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      flex: 0 0 var(--reference-ui-icon-font) !important;
    }
    #referenceModule .reference-player-control {
      width: 24px !important;
      min-width: 24px !important;
      height: 24px !important;
      min-height: 24px !important;
      flex: 0 0 24px !important;
      padding: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      box-sizing: border-box !important;
      font-size: 12px !important;
      line-height: 1 !important;
    }
    #referenceModule .reference-player-actions {
      display: inline-flex !important;
      align-items: center !important;
      gap: 4px !important;
      overflow: hidden !important;
    }
    #referenceModule .reference-player-actions-main {
      min-width: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 4px !important;
      overflow-x: auto !important;
      overflow-y: hidden !important;
      scrollbar-width: none !important;
    }
    #referenceModule .reference-player-actions-main::-webkit-scrollbar {
      display: none !important;
    }
    #referenceModule .reference-player-actions-end {
      flex: 0 0 auto !important;
      margin-left: auto !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
      gap: 4px !important;
    }
    #referenceModule .reference-player-end-controls {
      flex: 0 0 auto !important;
      justify-self: end !important;
      width: auto !important;
      max-width: 124px !important;
      padding: 0 5px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
      gap: 4px !important;
      overflow: hidden !important;
    }
    #referenceModule .reference-player-volume {
      min-width: 86px !important;
      flex: 0 0 86px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: flex-end !important;
      gap: 4px !important;
    }
    #referenceModule .reference-player-volume .reference-volume-input {
      width: 56px !important;
      min-width: 56px !important;
      max-width: 56px !important;
      flex: 0 0 56px !important;
    }
    #referenceModule .reference-player-control.reference-player-main,
    #referenceModule .reference-player-control.reference-player-wide {
      width: 24px !important;
      min-width: 24px !important;
      height: 24px !important;
      min-height: 24px !important;
      flex-basis: 24px !important;
    }
    #referenceModule .reference-player-control i {
      width: 12px !important;
      min-width: 12px !important;
      height: 12px !important;
      min-height: 12px !important;
      font-size: 12px !important;
      line-height: 12px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    #referenceModule .reference-local-thumb-grid .reference-local-file-thumb.folder,
    #referenceModule .reference-local-thumb-grid .reference-local-file-thumb.other {
      display: grid !important;
      place-items: center !important;
    }
    #referenceModule .reference-local-thumb-grid .reference-local-file-thumb.folder > i,
    #referenceModule .reference-local-thumb-grid .reference-local-file-thumb.other > i,
    #referenceModule .reference-local-thumb-grid .reference-local-video-state > i,
    #referenceModule .reference-video-grid:not(.reference-video-list) .reference-video-poster > i,
    #referenceModule .reference-asset-thumb > i,
    #referenceModule .reference-folder-thumb > i {
      width: var(--reference-ui-thumb-icon) !important;
      min-width: var(--reference-ui-thumb-icon) !important;
      height: var(--reference-ui-thumb-icon) !important;
      min-height: var(--reference-ui-thumb-icon) !important;
      font-size: var(--reference-ui-thumb-icon) !important;
      line-height: var(--reference-ui-thumb-icon) !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      flex: 0 0 var(--reference-ui-thumb-icon) !important;
    }
    #referenceModule .reference-local-file-badge,
    #referenceModule .reference-media-badge {
      width: 20px !important;
      min-width: 20px !important;
      height: 20px !important;
      min-height: 20px !important;
      padding: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      box-sizing: border-box !important;
    }
    #referenceModule .reference-local-file-badge i,
    #referenceModule .reference-media-badge i {
      width: 12px !important;
      min-width: 12px !important;
      height: 12px !important;
      min-height: 12px !important;
      font-size: 12px !important;
      line-height: 12px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    #referenceModule .reference-local-tree-caret i,
    #referenceModule .reference-local-tree-open i,
    #referenceModule .reference-sidebar-drag-handle i {
      width: 12px !important;
      min-width: 12px !important;
      font-size: 12px !important;
      line-height: 12px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }
    /* Reference sort dropdown: match compact dark resource-manager menu. */
    #referenceModule .reference-sort-wrap {
      position: relative !important;
      display: inline-flex !important;
      align-items: center !important;
      z-index: 30 !important;
    }
    #referenceModule .reference-sort-trigger {
      height: 24px !important;
      min-width: 86px !important;
      max-width: 118px !important;
      padding: 0 7px !important;
      border: 1px solid #2f2f2f !important;
      border-radius: 3px !important;
      background: #252525 !important;
      color: #e5e5e5 !important;
      gap: 6px !important;
      font: 700 12px/1 'Microsoft YaHei','微软雅黑',Arial,sans-serif !important;
      box-shadow: none !important;
    }
    #referenceModule .reference-sort-trigger:hover,
    #referenceModule .reference-sort-wrap:focus-within .reference-sort-trigger {
      background: #303030 !important;
      border-color: #4a4a4a !important;
      color: #fff !important;
    }
    #referenceModule .reference-sort-trigger span {
      min-width: 0 !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
    }
    #referenceModule .reference-sort-trigger i {
      width: 12px !important;
      min-width: 12px !important;
      height: 12px !important;
      font-size: 12px !important;
      line-height: 12px !important;
    }
    #referenceModule .reference-sort-menu,
    #referenceModule .reference-sort-submenu-panel {
      border: 1px solid #242424 !important;
      border-radius: 4px !important;
      background: #111 !important;
      color: #f2f2f2 !important;
      box-shadow: 0 16px 36px rgba(0,0,0,.58), inset 0 0 0 1px rgba(255,255,255,.035) !important;
      padding: 6px 0 !important;
      font: 600 12px/1 'Microsoft YaHei','微软雅黑',Arial,sans-serif !important;
      letter-spacing: 0 !important;
    }
    #referenceModule .reference-sort-menu {
      top: calc(100% + 4px) !important;
      left: 0 !important;
      width: 188px !important;
      z-index: 80 !important;
    }
    #referenceModule .reference-sort-submenu {
      position: relative !important;
    }
    #referenceModule .reference-sort-submenu-panel {
      left: calc(100% + 4px) !important;
      top: -6px !important;
      width: 166px !important;
      display: none !important;
    }
    #referenceModule .reference-sort-submenu:hover .reference-sort-submenu-panel,
    #referenceModule .reference-sort-submenu:focus-within .reference-sort-submenu-panel {
      display: block !important;
    }
    #referenceModule .reference-sort-head,
    #referenceModule .reference-sort-row {
      width: 100% !important;
      min-height: 28px !important;
      height: 28px !important;
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      align-items: center !important;
      gap: 8px !important;
      padding: 0 10px !important;
      border: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      color: #f0f0f0 !important;
      text-align: left !important;
      font: 600 12px/1 'Microsoft YaHei','微软雅黑',Arial,sans-serif !important;
      box-shadow: none !important;
      cursor: pointer !important;
    }
    #referenceModule .reference-sort-head {
      grid-template-columns: minmax(0, 1fr) auto auto !important;
      color: #8d8d8d !important;
      min-height: 26px !important;
      height: 26px !important;
    }
    #referenceModule .reference-sort-head b {
      color: #f2f2f2 !important;
      font-size: 12px !important;
      font-weight: 700 !important;
    }
    #referenceModule .reference-sort-row span,
    #referenceModule .reference-sort-head span {
      min-width: 0 !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
      text-align: left !important;
    }
    #referenceModule .reference-sort-row:hover,
    #referenceModule .reference-sort-row.has-submenu:hover,
    #referenceModule .reference-sort-head:hover,
    #referenceModule .reference-sort-submenu:hover > .reference-sort-row {
      background: #2f2f2f !important;
      color: #fff !important;
    }
    #referenceModule .reference-sort-row.active {
      background: transparent !important;
      color: #fff !important;
    }
    #referenceModule .reference-sort-row .radio {
      width: 14px !important;
      min-width: 14px !important;
      height: 14px !important;
      min-height: 14px !important;
      border: 1px solid #8a8a8a !important;
      border-radius: 50% !important;
      background: transparent !important;
      box-shadow: none !important;
      justify-self: end !important;
      position: relative !important;
      box-sizing: border-box !important;
    }
    #referenceModule .reference-sort-row.active .radio {
      border-color: #168cff !important;
      background: #168cff !important;
      box-shadow: inset 0 0 0 3px #111 !important;
    }
    #referenceModule .reference-sort-check {
      width: 14px !important;
      min-width: 14px !important;
      height: 14px !important;
      min-height: 14px !important;
      border: 1px solid #8a8a8a !important;
      border-radius: 1px !important;
      background: transparent !important;
      color: #e8e8e8 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      justify-self: end !important;
      box-sizing: border-box !important;
    }
    #referenceModule .reference-sort-row.checked .reference-sort-check {
      border-color: #bdbdbd !important;
      background: #2a2a2a !important;
    }
    #referenceModule .reference-sort-check i {
      width: 10px !important;
      min-width: 10px !important;
      height: 10px !important;
      min-height: 10px !important;
      font-size: 10px !important;
      line-height: 10px !important;
      color: #f2f2f2 !important;
    }
    #referenceModule .reference-sort-switch {
      width: 30px !important;
      height: 16px !important;
      min-width: 30px !important;
      border-radius: 999px !important;
      padding: 2px !important;
      background: #515151 !important;
      border: 0 !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-self: end !important;
      box-sizing: border-box !important;
    }
    #referenceModule .reference-sort-switch i {
      width: 12px !important;
      height: 12px !important;
      min-width: 12px !important;
      border-radius: 50% !important;
      background: #8e8e8e !important;
      transform: translateX(0) !important;
      transition: transform .12s ease, background .12s ease !important;
    }
    #referenceModule .reference-sort-switch.on {
      background: #1d8fff !important;
    }
    #referenceModule .reference-sort-switch.on i {
      background: #fff !important;
      transform: translateX(14px) !important;
    }
    #referenceModule .reference-color-ramp {
      width: 88px !important;
      height: 14px !important;
      display: grid !important;
      grid-template-columns: repeat(7, 1fr) !important;
      border: 1px solid #333 !important;
      border-radius: 3px !important;
      overflow: hidden !important;
      justify-self: end !important;
      filter: none !important;
      opacity: 1 !important;
    }
    #referenceModule .reference-color-ramp span {
      display: block !important;
      width: auto !important;
      min-width: 0 !important;
      height: 100% !important;
      min-height: 100% !important;
      overflow: hidden !important;
    }
    #referenceModule .reference-color-ramp span:nth-child(1) { background: #4f6ccf !important; }
    #referenceModule .reference-color-ramp span:nth-child(2) { background: #8a5cc8 !important; }
    #referenceModule .reference-color-ramp span:nth-child(3) { background: #c85ba8 !important; }
    #referenceModule .reference-color-ramp span:nth-child(4) { background: #d36b5c !important; }
    #referenceModule .reference-color-ramp span:nth-child(5) { background: #d2aa54 !important; }
    #referenceModule .reference-color-ramp span:nth-child(6) { background: #83b960 !important; }
    #referenceModule .reference-color-ramp span:nth-child(7) { background: #3f8a54 !important; }
    #referenceModule .reference-sort-submenu > .reference-sort-row {
      background: #2a2a2a !important;
    }
    #referenceModule .reference-sort-submenu > .reference-sort-row > i.fa-chevron-right {
      width: 12px !important;
      min-width: 12px !important;
      height: 12px !important;
      font-size: 10px !important;
      line-height: 12px !important;
      color: #cfcfcf !important;
      justify-self: end !important;
    }
    #referenceModule .reference-sort-divider {
      height: 1px !important;
      margin: 5px 0 !important;
      background: #2a2a2a !important;
    }

/* 从 index.html 内联 style 抽离(2026-06-20) */
[data-is="1"] { width:100%;margin-top:10px;display:none }
[data-is="2"] { display:none }
[data-is="3"] { flex:1 }
[data-is="4"] { display:none }
[data-is="5"] { display:none }
[data-is="6"] { display:none }
[data-is="7"] { display:none }
[data-is="8"] { display:none }
[data-is="9"] { --rw:1.77;--rh:1 }
[data-is="10"] { --rw:1;--rh:1 }
[data-is="11"] { --rw:1.33;--rh:1 }
[data-is="12"] { --rw:.75;--rh:1 }
[data-is="13"] { --rw:1.25;--rh:1 }
[data-is="14"] { --rw:.8;--rh:1 }
[data-is="15"] { --rw:1.5;--rh:1 }
[data-is="16"] { --rw:.66;--rh:1 }
[data-is="17"] { --rw:1.77;--rh:1 }
[data-is="18"] { --rw:.56;--rh:1 }
[data-is="19"] { --rw:2.33;--rh:1 }
[data-is="20"] { --rw:.43;--rh:1 }
[data-is="21"] { background:#ff3838 }
[data-is="22"] { background:#f59e0b }
[data-is="23"] { background:#22c55e }
[data-is="24"] { background:#38bdf8 }
[data-is="25"] { background:#a855f7 }
[data-is="26"] { display:none }
[data-is="27"] { display:none }
[data-is="28"] { display:none }
[data-is="29"] { display:none }
[data-is="30"] { position:fixed;bottom:4px;left:50%;transform:translateX(-50%);background:rgba(0,0,0,0.9);color:#ff0;padding:2px 10px;border-radius:6px;font-size:10px;z-index:99999;pointer-events:none;display:none }
[data-is="31"] { display:none }
[data-is="32"] { display:none }
[data-is="33"] { display:none }
[data-is="34"] { display:flex;gap:8px;margin-bottom:12px }
[data-is="35"] { width:auto }
[data-is="36"] { display:none }
[data-is="37"] { font-size:14px;margin:12px 0 }
[data-is="38"] { display:none }
[data-is="39"] { display:none }
[data-is="40"] { display:none }
[data-is="41"] { display:none }
[data-is="42"] { display:none }
[data-is="43"] { display:none }
[data-is="44"] { display:none }
[data-is="45"] { display:none }
[data-is="46"] { width:520px }
[data-is="47"] { display:none }
[data-is="48"] { width:520px }
[data-is="49"] { display:none }
[data-is="50"] { width:380px }
[data-is="51"] { display:none }
[data-is="52"] { display:block;font-size:12px;color:var(--fg2);margin-bottom:4px }
[data-is="53"] { display:block;font-size:12px;color:var(--fg2);margin-bottom:4px }
[data-is="54"] { display:block;font-size:12px;color:var(--fg2);margin-bottom:4px }
[data-is="55"] { display:block;font-size:12px;color:var(--fg2);margin-bottom:4px }
[data-is="56"] { display:block;font-size:12px;color:var(--fg2);margin-bottom:4px }

/* 剧集入口（AI 选镜头标题行右上角 .startup-shot-actions 内，按总指挥截图红框位置）。
   纯文字、无底框，与「选择一个镜头开始创作」标题同字号(28px)；右对齐到下方镜头列右缘
   由 .startup-shot-actions{justify-self:end} 保证（shot-head 与 selector-grid 同宽）。 */
.startup-series-entry-btn {
  display: inline-flex; align-items: center;
  padding: 0; border: none; background: none;
  color: #f2f2f2;
  font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: 0;
  white-space: nowrap; cursor: pointer;
}
.startup-series-entry-btn:hover { color: #fff; text-decoration: underline; }
