/* 覆盖 devpanel.js 注入的样式（须在 devpanel.js 之后加载） */

:root {
    --inspect-bg: #0d1117;
    --inspect-surface: #161b22;
    --inspect-surface-2: #1c2333;
    --inspect-border: #30363d;
    --inspect-accent: #0e639c;
    --inspect-accent-hover: #1177bb;
    --inspect-text: #c9d1d9;
    --inspect-text-muted: #8b949e;
    --inspect-name: #ff9dc3;
    --inspect-value: #b5cea8;
    --inspect-node: #dcdcaa;
    --inspect-fgui-node: var(--inspect-name);
    --inspect-fgui-resource: #56d4dd;
    --inspect-highlight: rgba(14, 99, 156, 0.55);
    --inspect-selection: #1a4a7a;
    --inspect-selection-border: #3d9eff;
}

.copilot-root {
    display: flex;
    flex-direction: row;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: var(--inspect-bg);
    position: relative;
}

.copilot-root.ai-collapsed #ai-pane {
    display: none !important;
}

.copilot-root.ai-collapsed .inspect-pane {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-right: none;
}

.copilot-root.ai-collapsed .copilot-split {
    flex: 0 0 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    background: transparent !important;
    cursor: default;
    overflow: visible;
    border: none;
}

.copilot-root.ai-collapsed .copilot-split.dragging {
    background: transparent !important;
}

/* ── 分隔条上的 AI 折叠标签（显示/隐藏仅此一处） ── */
.copilot-root .copilot-split {
    position: relative;
    flex: 0 0 5px;
    width: 5px;
    min-width: 5px;
    height: 100%;
    cursor: col-resize;
    background: var(--inspect-border);
    z-index: 40;
    overflow: visible;
    transition: background 0.15s;
}

.copilot-root .ai-split-tab {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 5px;
    margin: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    color: #c9d1d9;
    background: linear-gradient(180deg, #1a2332 0%, #21262d 100%);
    border: 1px solid var(--inspect-border);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    user-select: none;
}

.copilot-root .ai-split-tab:hover {
    color: #fff;
    background: var(--inspect-accent);
    border-color: var(--inspect-accent-hover);
    box-shadow: 0 2px 14px rgba(14, 99, 156, 0.45);
}

.copilot-root .ai-split-tab-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.copilot-root .ai-split-tab-chevron {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.9;
}

/* 展开：标签在分隔条上，箭头指向右侧（收起 AI） */
.copilot-root:not(.ai-collapsed) .ai-split-tab-chevron {
    transform: rotate(0deg);
}

/* 折叠：仅露出右侧一小条，悬停滑出 */
.copilot-root.ai-collapsed .copilot-split {
    overflow: visible;
    z-index: 100;
    background: transparent !important;
}

.copilot-root.ai-collapsed .ai-split-tab {
    position: fixed;
    left: auto;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(calc(100% - 22px));
    min-width: 34px;
    padding: 12px 6px;
    border-radius: 8px 0 0 8px;
    border: 1px solid #58a6ff;
    border-right: none;
    color: #fff;
    background: linear-gradient(180deg, #1f6feb 0%, #0e639c 55%, #0a4d7a 100%);
    box-shadow: -4px 0 18px rgba(31, 111, 235, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, background 0.15s, box-shadow 0.18s;
}

.copilot-root.ai-collapsed .ai-split-tab:hover {
    transform: translateY(-50%) translateX(0);
    background: linear-gradient(180deg, #388bfd 0%, #1177bb 55%, #0e639c 100%);
    box-shadow: -6px 0 22px rgba(56, 139, 253, 0.65);
}

.copilot-root.ai-collapsed .ai-split-tab-label {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.copilot-root.ai-collapsed .ai-split-tab-chevron {
    transform: rotate(180deg);
    color: #dbeafe;
}

/* 注入面板打开时仍使用分隔条 AI 按钮（避免被遮挡的右缘重复按钮） */
.copilot-root .inspect-pane > .gi-panel-ai-tab {
    display: none !important;
}

.copilot-root:has(.inspect-pane #codeEditorView.gi-panel-open:not([hidden])) #ai-split-tab,
.copilot-root:has(.inspect-pane #gameControlView.gi-panel-open:not([hidden])) #ai-split-tab,
.copilot-root:has(.inspect-pane #skeletonAssetView.gi-panel-open:not([hidden])) #ai-split-tab,
.copilot-root:has(.inspect-pane #gamePerformanceView.gi-panel-open:not([hidden])) #ai-split-tab {
    display: flex !important;
}

.copilot-root .copilot-split:hover:not(:has(.ai-split-tab:hover)) {
    background: var(--inspect-accent);
}

.copilot-root .copilot-split.dragging {
    background: var(--inspect-accent);
}

/* ── 左侧 GameInspect 容器 ── */
.copilot-root .inspect-pane {
    position: relative;
    flex: 0 0 58%;
    width: 58%;
    min-width: 480px;
    max-width: calc(100% - 300px);
    height: 100%;
    overflow: hidden;
    background: var(--inspect-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    border-right: 1px solid var(--inspect-border);
}

.copilot-root .inspect-pane > .dev-panel {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    overflow: hidden !important;
    background-color: var(--inspect-bg) !important;
    color: var(--inspect-text) !important;
}

/* ── 顶栏 ── */
.copilot-root .inspect-pane .dev-panel > .top {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: auto !important;
    min-height: 38px;
    line-height: 1.4;
    padding: 6px 10px !important;
    box-sizing: border-box;
    clear: both;
    overflow: hidden;
    background: linear-gradient(180deg, #1a2332 0%, var(--inspect-surface) 100%) !important;
    border-bottom: 1px solid var(--inspect-border) !important;
}

.copilot-root .inspect-pane .dev-panel .topLeft {
    float: none !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 52%;
}

.copilot-root .inspect-pane .dev-panel .topRight {
    float: none !important;
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.copilot-root .inspect-pane .dev-panel .topRight div {
    float: none !important;
    margin-right: 0 !important;
}

.copilot-root .inspect-pane .dev-panel #gameInfo,
.copilot-root .inspect-pane .dev-panel .gi-info {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-weight: normal;
}

.copilot-root .inspect-pane .dev-panel .gi-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copilot-root .inspect-pane .dev-panel .gi-badge.gi-game {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 600;
    color: #4ec9b0;
    background: rgba(78, 201, 176, 0.12);
    border: 1px solid rgba(78, 201, 176, 0.28);
    max-width: 120px;
}

.copilot-root .inspect-pane .dev-panel .gi-badge.gi-engine {
    color: #79c0ff;
    background: rgba(121, 192, 255, 0.1);
    border: 1px solid rgba(121, 192, 255, 0.25);
    max-width: none;
}

.copilot-root .inspect-pane .dev-panel .gi-badge.gi-ext {
    color: #f97583;
    background: rgba(249, 117, 131, 0.1);
    border: 1px solid rgba(249, 117, 131, 0.25);
    max-width: 100px;
}

.copilot-root .inspect-pane .dev-panel .gi-badge.gi-ver {
    color: var(--inspect-text-muted);
    background: var(--inspect-surface-2);
    border: 1px solid var(--inspect-border);
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    max-width: none;
}

.copilot-root .inspect-pane .dev-panel .gi-badge.gi-wait {
    color: var(--inspect-text-muted);
    background: var(--inspect-surface-2);
    border: 1px dashed var(--inspect-border);
    max-width: none;
    font-style: italic;
}

.copilot-root .inspect-pane .dev-panel .topLeft > label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin: 0;
    padding: 3px 8px;
    font-size: 11px;
    color: var(--inspect-text-muted);
    background: var(--inspect-surface-2);
    border: 1px solid var(--inspect-border);
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.copilot-root .inspect-pane .dev-panel .topLeft > label:hover {
    background: #243044;
    border-color: var(--inspect-accent);
    color: var(--inspect-text);
}

.copilot-root .inspect-pane .dev-panel .topLeft > label input[type="checkbox"] {
    accent-color: var(--inspect-accent);
    margin: 0;
    cursor: pointer;
}

.copilot-root .inspect-pane .dev-panel #btnGameCtr {
    display: none !important;
}

.copilot-root .inspect-pane .dev-panel .gi-game-ctrl {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
}

.copilot-root .inspect-pane .dev-panel .gi-game-ctrl .gi-gc-btn,
.copilot-root .inspect-pane .dev-panel .gi-game-ctrl #gameControlPlay,
.copilot-root .inspect-pane .dev-panel .gi-game-ctrl #gameControlNextFrame,
.copilot-root .inspect-pane .dev-panel .gi-game-ctrl #gameControlRefush {
    height: auto !important;
    min-height: 0;
    padding: 3px 8px !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.3;
    border-radius: 5px !important;
    background: var(--inspect-surface-2) !important;
    border: 1px solid var(--inspect-border) !important;
    color: var(--inspect-text) !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.copilot-root .inspect-pane .dev-panel .gi-game-ctrl .gi-gc-btn:hover,
.copilot-root .inspect-pane .dev-panel .gi-game-ctrl #gameControlPlay:hover,
.copilot-root .inspect-pane .dev-panel .gi-game-ctrl #gameControlNextFrame:hover,
.copilot-root .inspect-pane .dev-panel .gi-game-ctrl #gameControlRefush:hover {
    background: var(--inspect-accent) !important;
    border-color: var(--inspect-accent-hover) !important;
    color: #fff !important;
}

.copilot-root .inspect-pane .dev-panel .topButton {
    text-align: center;
    background: var(--inspect-surface-2) !important;
    border: 1px solid var(--inspect-border) !important;
    color: var(--inspect-text) !important;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.3;
    padding: 4px 8px !important;
    margin: 0 !important;
    vertical-align: top;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.copilot-root .inspect-pane .dev-panel .topButton:hover {
    background: var(--inspect-accent) !important;
    border-color: var(--inspect-accent-hover) !important;
    color: #fff !important;
}

.copilot-root .inspect-pane .dev-panel .gameName,
.copilot-root .inspect-pane .dev-panel .gameEngin,
.copilot-root .inspect-pane .dev-panel .gameVersion {
    color: #4ec9b0;
}

.copilot-root .inspect-pane .dev-panel .gameExtends {
    color: #f97583;
}

/* ── 工具栏（树 / 属性 controls） ── */
.copilot-root .inspect-pane .dev-panel .controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 6px 8px !important;
    font-size: 11px;
    white-space: normal;
    overflow: visible;
    background: var(--inspect-surface);
    border-bottom: 1px solid var(--inspect-border);
}

.copilot-root .inspect-pane .dev-panel .controls label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 3px 8px;
    border-radius: 5px;
    background: var(--inspect-surface-2);
    border: 1px solid transparent;
    color: var(--inspect-text-muted);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.copilot-root .inspect-pane .dev-panel .controls label:hover {
    background: #243044;
    border-color: var(--inspect-border);
    color: var(--inspect-text);
}

.copilot-root .inspect-pane .dev-panel .controls input[type="checkbox"] {
    accent-color: var(--inspect-accent);
    cursor: pointer;
}

.copilot-root .inspect-pane .dev-panel .controls .topButton {
    flex-shrink: 0;
}

.copilot-root .inspect-pane .dev-panel .controls .refresh {
    border-radius: 10px !important;
    width: 18px !important;
    height: 18px !important;
    padding: 0;
    outline: none;
    vertical-align: middle;
    background-color: #fff !important;
    border: none !important;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
}

.copilot-root .inspect-pane .dev-panel .controls .refresh::before {
    content: "↻";
    font-size: 14px;
    line-height: 1;
    color: #5a6270;
}

.copilot-root .inspect-pane .dev-panel .controls .refresh:hover {
    opacity: 0.8;
    background-color: #fff !important;
    transform: none;
}

/* ── 节点树 ── */
.copilot-root .inspect-pane .dev-panel .left,
.copilot-root .inspect-pane .dev-panel .right {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.copilot-root .inspect-pane .dev-panel .left {
    background: var(--inspect-bg);
}

.copilot-root .inspect-pane .dev-panel .right {
    padding-top: 0 !important;
    background: var(--inspect-bg);
    border-left: 1px solid var(--inspect-border);
}

.copilot-root .inspect-pane .dev-panel .nodes,
.copilot-root .inspect-pane .dev-panel .props {
    flex: 1 1 auto;
    min-height: 0;
}

.copilot-root .inspect-pane .dev-panel .nodes {
    color: var(--inspect-text);
}

.copilot-root .inspect-pane .dev-panel .gi-tree-loading,
.copilot-root .inspect-pane .dev-panel .gi-tree-error {
    padding: 8px 10px;
    color: var(--inspect-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.copilot-root .inspect-pane .dev-panel .gi-tree-error {
    color: #f97583;
}


.copilot-root .inspect-pane .dev-panel .handle-v.handle {
    background: var(--inspect-border) !important;
    flex-shrink: 0;
    transition: background 0.15s;
}

.copilot-root .inspect-pane .dev-panel .handle-v.handle:hover {
    background: var(--inspect-accent) !important;
}

.copilot-root .inspect-pane .dev-panel .nodes,
.copilot-root .inspect-pane .dev-panel .props {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.35;
    scrollbar-width: thin;
    scrollbar-color: #444 var(--inspect-bg);
}

.copilot-root .inspect-pane .dev-panel .nodes::-webkit-scrollbar,
.copilot-root .inspect-pane .dev-panel .props::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.copilot-root .inspect-pane .dev-panel .nodes::-webkit-scrollbar-track,
.copilot-root .inspect-pane .dev-panel .props::-webkit-scrollbar-track {
    background: var(--inspect-bg);
}

.copilot-root .inspect-pane .dev-panel .nodes::-webkit-scrollbar-thumb,
.copilot-root .inspect-pane .dev-panel .props::-webkit-scrollbar-thumb {
    background: #3a424a;
    border-radius: 4px;
}

.copilot-root .inspect-pane .dev-panel .nodes::-webkit-scrollbar-thumb:hover,
.copilot-root .inspect-pane .dev-panel .props::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.copilot-root .inspect-pane .dev-panel .parent {
    padding: 1px 6px;
    border-left: 2px solid transparent;
    border-radius: 0 3px 3px 0;
    transition: background 0.1s, border-color 0.1s;
}

.copilot-root .inspect-pane .dev-panel .parent:hover {
    background-color: rgba(14, 99, 156, 0.2) !important;
}

.copilot-root .inspect-pane .dev-panel .parent.selected {
    background-color: var(--inspect-selection) !important;
    background-image: linear-gradient(
        90deg,
        rgba(61, 158, 255, 0.22) 0%,
        rgba(26, 74, 122, 0.95) 18%,
        rgba(26, 74, 122, 0.85) 100%
    ) !important;
    border-left: 3px solid var(--inspect-selection-border) !important;
    box-shadow: inset 0 0 0 1px rgba(61, 158, 255, 0.35);
}

.copilot-root .inspect-pane .dev-panel .parent.selected .node,
.copilot-root .inspect-pane .dev-panel .parent.selected .memberName {
    color: #ffffff !important;
    font-weight: 600;
}

.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .parent.selected .node,
.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .parent.selected .memberName,
.copilot-root .inspect-pane .dev-panel .display-object.fgui-node > .parent.selected .node,
.copilot-root .inspect-pane .dev-panel .display-object.fgui-node > .parent.selected .memberName {
    color: #ffffff !important;
}

.copilot-root .inspect-pane .dev-panel .parent.searchResult {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-radius: 3px;
}

.copilot-root .inspect-pane .dev-panel .parent.searchResult.searchCurrent {
    background-color: rgba(210, 153, 34, 0.38) !important;
    border-left: 2px solid #e3b341 !important;
    box-shadow: inset 0 0 0 1px rgba(227, 179, 65, 0.45);
}

.copilot-root .inspect-pane .dev-panel .property.searchResult {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.copilot-root .inspect-pane .dev-panel .property {
    padding: 0 4px !important;
    margin: 0 !important;
    line-height: 1.35;
    border-radius: 2px;
    transition: background 0.1s;
}

.copilot-root .inspect-pane .dev-panel .props ol {
    padding-left: 1.4em;
    margin: 0;
}

.copilot-root .inspect-pane .dev-panel .props li.expandable ul {
    padding-left: 1.4em;
}

.copilot-root .inspect-pane .dev-panel .propCheck {
    height: 12px !important;
    margin-left: 4px !important;
    vertical-align: middle;
}

.copilot-root .inspect-pane .dev-panel .propColor {
    height: 12px !important;
    width: 12px !important;
    margin-left: 4px !important;
}

.copilot-root .inspect-pane .dev-panel .property:hover {
    background: rgba(255, 255, 255, 0.04);
}

.copilot-root .inspect-pane .dev-panel .property .name {
    color: var(--inspect-name);
}

.copilot-root .inspect-pane .dev-panel .property .prop-hint {
    margin-left: 4px;
    color: #d29922;
    font-size: 11px;
    cursor: help;
    user-select: none;
}

.copilot-root .inspect-pane .dev-panel .property .value {
    color: var(--inspect-value);
}

.copilot-root .inspect-pane .dev-panel .display-object {
    color: var(--inspect-node);
}

.copilot-root .inspect-pane .dev-panel .memberName {
    color: var(--inspect-name);
}

/* Cocos 2.x/3.x 场景树：节点名 #dcdcaa（对齐 Egret 检视），无冒号，字号 +1px */
.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode {
    font-size: 13px;
}

.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .display-object,
.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .memberName,
.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .node {
    color: #dcdcaa;
}

.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .memberName:after {
    content: none;
}

.copilot-root .inspect-pane .dev-panel .treeNodeSpecialName {
    color: #f97583;
}

/* FairyGUI 对齐 Egret：name 粉色，类名浅黄，冒号中性；树中不显示 ui:// */
.copilot-root .inspect-pane .dev-panel .display-object.fgui-node .memberName {
    color: var(--inspect-name);
}

.copilot-root .inspect-pane .dev-panel .display-object.fgui-node .memberName:after {
    content: " : ";
    color: #8b949e;
}

.copilot-root .inspect-pane .dev-panel .display-object.fgui-node .node {
    color: var(--inspect-node);
}

.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .display-object.fgui-node .memberName {
    color: var(--inspect-name);
}

.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .display-object.fgui-node .memberName:after {
    content: " : ";
    color: #8b949e;
}

.copilot-root .inspect-pane .dev-panel #nodes.cocos-tree-mode .display-object.fgui-node .node {
    color: var(--inspect-node);
}

.copilot-root .inspect-pane .dev-panel .display-object.fgui-node > .parent.selected .memberName:after {
    color: rgba(255, 255, 255, 0.7) !important;
}

.copilot-root .inspect-pane .dev-panel #gi-frame-select {
    max-width: 180px;
    height: 22px;
    margin-left: 4px;
    padding: 0 4px;
    border: 1px solid var(--inspect-border);
    border-radius: 4px;
    background: #21262d;
    color: #c9d1d9;
    font-size: 11px;
    vertical-align: middle;
}

.copilot-root .inspect-pane .dev-panel #gi-frame-select:focus {
    outline: none;
    border-color: #388bfd;
}

.copilot-root .inspect-pane .dev-panel #gi-frame-select[hidden] {
    display: none !important;
}

.copilot-root .inspect-pane .dev-panel span.value input {
    background-color: var(--inspect-surface-2) !important;
    color: var(--inspect-value) !important;
    border-bottom: 1px solid var(--inspect-border) !important;
    border-radius: 2px;
    padding: 0 4px;
}

.copilot-root .inspect-pane .dev-panel .property.searchResult.searchCurrent {
    background-color: rgba(210, 153, 34, 0.34);
    border-left: 2px solid #e3b341;
    box-shadow: inset 0 0 0 1px rgba(227, 179, 65, 0.5);
    border-radius: 2px;
}

.copilot-root .inspect-pane .dev-panel .property.searchResult.searchCurrent .name {
    color: #ffe082;
}

.copilot-root .inspect-pane .dev-panel .property.searchResult.searchCurrent .value {
    color: #e6ffed;
}

/* ── 底部搜索栏（参考 egret-inspector） ── */
.copilot-root .inspect-pane .dev-panel .gi-search-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #555;
    border-top: 1px solid var(--inspect-border);
    position: relative;
}

.copilot-root .inspect-pane .dev-panel .gi-search-kbd {
    flex: 0 0 auto;
    display: inline-block;
    padding: 1px 5px;
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.4;
    color: #ddd;
    background: #444;
    border: 1px solid #666;
    border-radius: 3px;
    white-space: nowrap;
    user-select: none;
    cursor: default;
}

.copilot-root .inspect-pane .dev-panel .gi-search-bar input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 22px;
    padding: 0 8px;
    border: none;
    border-radius: 3px;
    outline: none;
    font-size: 11px;
    font-family: Consolas, "Courier New", monospace;
    color: #1e1e1e;
    background: #fff;
}

.copilot-root .inspect-pane .dev-panel .gi-search-bar input::placeholder {
    color: #888;
}

.copilot-root .inspect-pane .dev-panel .gi-search-bar input:focus {
    box-shadow: 0 0 0 2px rgba(14, 99, 156, 0.45);
}

.copilot-root .inspect-pane .dev-panel .gi-search-bar[data-search-count] input {
    padding-right: 42px;
}

.copilot-root .inspect-pane .dev-panel .gi-search-bar[data-search-count]::after {
    content: attr(data-search-count);
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #ccc;
    pointer-events: none;
    font-family: Consolas, "Courier New", monospace;
}

/* ── 右键菜单 ── */
.copilot-root .inspect-pane .dev-panel .contextmenu {
    background: var(--inspect-surface) !important;
    color: var(--inspect-text) !important;
    border: 1px solid var(--inspect-border) !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    font-family: inherit;
    font-size: 12px;
}

.copilot-root .inspect-pane .dev-panel .contextmenu li {
    border-left: 3px solid transparent;
}

.copilot-root .inspect-pane .dev-panel .contextmenu li:hover {
    background: var(--inspect-surface-2) !important;
    border-left-color: var(--inspect-accent) !important;
}

.copilot-root .inspect-pane .dev-panel .contextmenu li span:hover {
    color: #58a6ff !important;
}

.copilot-root .inspect-pane .authorInfo {
    display: none;
}

/* ── 外侧 Copilot 分隔条（拖拽区域，标签见 .ai-split-tab） ── */

/* ── 右侧 AI 面板 ── */
.copilot-root .ai-pane {
    flex: 1 1 auto;
    min-width: 300px;
    height: 100%;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    background: #1e1e1e;
    z-index: 10;
}

/* 功能面板限定在左侧 inspect 区域内，避免 fixed 导致错位/裁切 */
.copilot-root .inspect-pane #gameControlView,
.copilot-root .inspect-pane #skeletonAssetView,
.copilot-root .inspect-pane #gamePerformanceView,
.copilot-root .inspect-pane #alertView {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000 !important;
    box-sizing: border-box;
}

.copilot-root .inspect-pane #gameControlView[hidden],
.copilot-root .inspect-pane #skeletonAssetView[hidden],
.copilot-root .inspect-pane #gamePerformanceView[hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Cocos 专用属性面板 */
.copilot-root .inspect-pane .dev-panel .cocos-prop-engine-ref .cocos-engine-ref-btn {
    background: var(--inspect-surface-2);
    border: 1px solid var(--inspect-accent);
    color: #79c0ff;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 11px;
    cursor: pointer;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-engine-ref .cocos-engine-ref-btn:hover {
    background: var(--inspect-accent);
    color: #fff;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-component > .name {
    color: #3fb950;
    font-weight: 600;
    font-size: 14px;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-section-header {
    margin-top: 4px;
    padding: 2px 0 1px;
    border-top: 1px solid #30363d;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-section-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-section-header > .icon {
    flex: 0 0 10px;
    order: 0;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-section-header > .name {
    flex: 1 1 auto;
    max-width: none;
    order: 1;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-section-header > .getter,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-section-header > .separator,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-section-header > .cocos-section-value-hidden {
    display: none !important;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-section-header:first-child {
    margin-top: 0;
    border-top: none;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-section-header > .cocos-section-value-hidden {
    display: none;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-section-body {
    list-style: none;
    margin: 0;
    padding: 2px 0 6px 12px;
    width: 100%;
    flex: 0 0 100%;
    order: 10;
    border-left: 1px solid rgba(35, 134, 54, 0.4);
    box-sizing: border-box;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-prop-section-body .property {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-prop-section-body li.expandable > ul {
    padding-left: 12px !important;
    margin-left: 0;
    border-left: 1px solid rgba(35, 134, 54, 0.25);
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-section-body > li {
    margin: 0;
    padding: 1px 0;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-section-expanded > .icon {
    color: #3fb950;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-user-script > .name {
    color: #d2a8ff;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-enum > .name {
    color: #79c0ff;
}

.copilot-root .inspect-pane .dev-panel .cocos-enum-select {
    max-width: 100%;
    min-width: 100px;
    padding: 2px 4px;
    font-size: 11px;
    background: var(--inspect-surface-2);
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #e6edf3;
}

.copilot-root .inspect-pane .dev-panel .cocos-enum-select:focus {
    border-color: var(--inspect-accent);
    outline: none;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-vec > .name {
    color: #4ec9b0;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-vec-inline > .name {
    color: #4ec9b0;
}

/* Cocos 属性面板（#props.cocos-prop-mode）：正文/轴标签 14px，输入框/下拉 20px */
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode {
    font-size: 14px;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .props ol,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .properties {
    padding-left: 4px !important;
    margin: 0;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 24px;
    line-height: 24px;
    gap: 2px;
    text-indent: 0 !important;
    padding: 0 2px !important;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property:not(.cocos-prop-section-header) > .icon {
    display: none;
    flex: 0 0 0 !important;
    width: 0 !important;
    overflow: hidden;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property > .getter {
    display: none !important;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-section-header > .icon {
    display: block;
    flex: 0 0 10px !important;
    width: 10px !important;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property > .name {
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: 14px;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property > .separator {
    flex: 0 0 auto;
    margin: 0 1px 0 0;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property > .value {
    flex: 1 1 0;
    min-width: 0;
    font-size: 14px;
    overflow: hidden;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .property.cocos-prop-vec-inline > .value {
    display: flex;
    align-items: center;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode span.value input,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-vec-input,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-scalar-input {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    height: 20px;
    padding: 0 4px;
    font-size: 14px;
    line-height: 18px;
    box-sizing: border-box;
    font-family: Consolas, "Courier New", Courier, monospace;
    background: var(--inspect-surface-2) !important;
    color: #ce9178 !important;
    border: 1px solid #30363d !important;
    border-radius: 3px;
    vertical-align: middle;
    -moz-appearance: textfield;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-vec-input::-webkit-inner-spin-button,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-vec-input::-webkit-outer-spin-button,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode span.value input::-webkit-inner-spin-button,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode span.value input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode span.value input:focus,
.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-vec-input:focus {
    border-color: var(--inspect-accent) !important;
    outline: none;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-vec-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 2px 4px;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-vec-field {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: #8b949e;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-vec-axis {
    flex: 0 0 auto;
    min-width: 8px;
    font-size: 14px;
    color: #8b949e;
    user-select: none;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-enum-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 20px;
    padding: 0 4px;
    font-size: 14px;
    box-sizing: border-box;
    line-height: 18px;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .propCheck {
    height: 14px !important;
    width: 14px !important;
    margin-left: 2px !important;
}

.copilot-root .inspect-pane .dev-panel #props.cocos-prop-mode .cocos-prop-section-body .property > .name {
    flex-basis: auto;
    max-width: none;
}

/* 非 Cocos 模式下的 vec 回退样式 */
.copilot-root .inspect-pane .dev-panel .cocos-vec-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: center;
    width: 100%;
}

.copilot-root .inspect-pane .dev-panel .cocos-vec-field {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #8b949e;
}

.copilot-root .inspect-pane .dev-panel .cocos-vec-field .cocos-vec-input {
    width: 52px;
    padding: 1px 4px;
    font-size: 11px;
    background: var(--inspect-surface-2);
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #e6edf3;
}

.copilot-root .inspect-pane .dev-panel .cocos-vec-field .cocos-vec-input:focus {
    border-color: var(--inspect-accent);
    outline: none;
}

.copilot-root .inspect-pane .dev-panel .cocos-prop-image .cocos-sf-preview {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    border: 1px solid #30363d;
    border-radius: 3px;
    padding: 2px 6px;
    background: var(--inspect-surface-2);
    max-width: 100%;
}

.copilot-root .inspect-pane .dev-panel .cocos-sf-thumb {
    width: 28px;
    height: 28px;
    object-fit: contain;
    cursor: pointer;
    flex-shrink: 0;
}

.copilot-root .inspect-pane .dev-panel .cocos-sf-desc {
    font-size: 11px;
    color: #8b949e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.copilot-root .inspect-pane .dev-panel .cocos-sf-missing {
    font-size: 11px;
    color: #6e7681;
    flex-shrink: 0;
}

/* 功能面板详细样式见 copilot-modals.css */
