/* ═══════════════════════════════════════════════════════════════════════
   ui-refresh.css — 界面重构图层（2026-11-06）
   依据 design-taste app-screens 规范，本体风格 true-black-flat
   （seed 1220555574）：

   · 纯黑地面 #000，高程只靠明度台阶（卡片 #111 / 嵌套 #1a1a1a），
     卡片无边框无阴影；浮层才有阴影
   · 唯一数据色 = 太阳琥珀 #f2b33d（取自「光引」的引导之光），
     只上数据/状态，不上按钮、tab、导航
   · 主按钮靠反相（白底黑字 36px 圆角胶囊），次按钮 1px 描边
   · 三级文字 #fff / #b4b4b4 / #949494；数字一律 tabular-nums
   · 无渐变、无发光、无玻璃、无 emoji 装饰、无图标彩色圆底
   · 侧栏 210px、顶栏 64px，共用同一地面，只用 1px 分隔线
   · 导航激活项只靠标签亮度 #b4b4b4 → #fff

   全部规则挂在 body 上以压过旧样式表的同等权重；不改任何 DOM 结构，
   因此不影响既有 JS 行为与既有回归测试选择器。
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 全局：字体与数字 ───────────────────────────────────────────────
   字体用系统 UI 栈：本地没有 Inter/IBM Plex Sans 字体文件，回退链里的
   次像素渲染会给中文描出橙边（截图实测）。Windows 上是 Segoe UI + 雅黑，
   中英都清晰，且零加载成本。 */
body {
  font-family: 'Segoe UI', -apple-system, 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body .num,
body .ws-token-pct,
body [class*="count"],
body [class*="stat"],
body .dsh-tree-est,
body .dsh-legend-row span:not(.lg),
body .dsh-water-big,
body .dsh-net-mid,
body .dsh-net-foot {
  font-variant-numeric: tabular-nums;
}

/* 去掉全局渐变与发光（旧样式表里散落的） */
body * {
  background-image: none !important;
}
/* 例外：允许分段水位条/甘特条/趋势柱这类「数据条」用纯色块（它们本来就是背景色） */
body .wb-seg,
body .dsh-gseg,
body .dtb-fill,
body .dsh-node-bar-fill,
body .dsh-tl > div,
body .dsh-browser-bar > div,
body .htl-bar {
  background-image: none !important;
}

/* ── 外壳：侧栏 / 顶栏 / 画布 ────────────────────────────────────── */
body .ws-sidebar,
body #wsSidebar {
  background: var(--bg-main);
  border-right: 1px solid var(--border);
}
body .topbar,
body .topbar-inner {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  height: 56px;
}
body .topbar-logo,
body .topbar-brand {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* 联系人行：34px 节奏，激活项靠背景台阶 + 文字变白，不用彩色 */
body .ws-contact-item {
  border-radius: 6px;
  padding: 7px 10px;
  transition: background var(--transition), color var(--transition);
}
body .ws-contact-item:hover { background: var(--bg-hover); }
body .ws-contact-item.active {
  background: #1a1a1a;
  color: var(--text-main);
  font-weight: 500;
}
body .ws-contact-item.active::before { display: none; }   /* 旧彩色左条去掉 */
body .ws-contact-name { font-size: 14px; }
body .ws-contact-sub,
body .ws-contact-snippet { color: var(--text-faint); font-size: 12px; }

/* 联系人顶部两个 tab（私聊/群聊）：中性胶囊 */
body .ws-contact-tab {
  border-radius: 6px;
  color: var(--text-faint);
  background: transparent;
  border: none;
}
body .ws-contact-tab.active {
  background: #1a1a1a;
  color: var(--text-main);
}

/* ── 视图 tab 条（对话/轨迹/上下文/编队）：下划线指示器，2px，仅标签宽 ── */
body #wsViewTabs {
  background: var(--bg-main) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0 20px !important;
  gap: 24px !important;
}
body .wsv-tab {
  font-size: 14px;
  color: var(--text-faint);
  padding: 12px 0 11px !important;
  border-bottom: 2px solid transparent !important;
  font-weight: 400;
}
body .wsv-tab:hover { color: var(--text-sub); }
body .wsv-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--text-main) !important;  /* 指示器用墨色，不用琥珀 */
  font-weight: 500;
}

/* ── 会话标题行 ─────────────────────────────────────────────────── */
body .ws-chat-header,
body #wsChatHeader {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
}
body #wsChatName { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
body #wsChatSub { font-size: 12px; color: var(--text-faint); }

/* 顶栏小按钮：文字为主，图标灰，hover 只变文字色 */
body .icon-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 12.5px;
  border-radius: 6px;
  padding: 5px 8px;
}
body .icon-btn:hover { background: var(--bg-hover); color: var(--text-main); }
body .icon-btn i { color: inherit; }

/* ── 消息区 ─────────────────────────────────────────────────────── */
body #wsChatMessages { background: var(--bg-main); padding: 20px 24px 8px; }

/* 自己的消息：反相浅色底 + 黑字（不用品牌色）
   [FIX] redesign.css 用 !important 强推过蓝渐变，此处必须同样 !important 压过 */
body .dm-msg.mine .dm-msg-bubble,
body .gc-msg.gc-mine .gc-bubble,
body .gc-mine .gc-bubble {
  background: #1f1f1f !important;
  background-image: none !important;
  color: var(--text-main) !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 14px;
  line-height: 1.6;
}
/* 对方消息：无底气泡（纯文字，靠留白分组），更接近 ZCode/Codex */
body .dm-msg:not(.mine) .dm-msg-bubble,
body .gc-msg:not(.gc-mine) .gc-bubble {
  background: transparent !important;
  background-image: none !important;
  color: var(--text-main) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 2px 0 4px !important;
  font-size: 14px;
  line-height: 1.65;
}
body .dm-msg-sender,
body .gc-name { font-size: 12px; color: var(--text-faint); font-weight: 500; }
body .dm-msg-time,
body .gc-time { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* 头像：小方块、无彩色渐变 */
body .dm-avatar,
body .gc-avatar {
  border-radius: 6px !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 12px !important;
  background: #1a1a1a !important;
  background-image: none !important;
  color: var(--text-sub) !important;
  border: 1px solid var(--border) !important;
}

/* 系统通知条：整行细条，文字灰，左边一条 1px 竖线（不用全宽边框盒） */
body .sys-notice {
  background: transparent !important;
  border: none !important;
  border-left: 2px solid #2a2a2a !important;
  border-radius: 0 !important;
  padding: 4px 12px !important;
  font-size: 12.5px;
  color: var(--text-faint) !important;
  margin: 4px 0 !important;
}
/* 斜杠命令结果卡：和系统条同构，但保留内容可读性 */
body .sys-cmd-card {
  background: transparent !important;
  border: none !important;
  border-left: 2px solid var(--accent-gold) !important;
  border-radius: 0 !important;
  padding: 6px 12px !important;
  font-size: 12.5px;
  color: var(--text-sub) !important;
  margin: 6px 0 !important;
  white-space: pre-wrap;
}
/* 日期分隔：去掉线，只留灰色小字居中 */
body .date-separator { border: none !important; margin: 18px 0 8px !important; }
body .date-separator::before,
body .date-separator::after { display: none !important; }
body .date-separator-label { font-size: 11px; color: var(--text-faint); background: none; padding: 0; }

/* 消息操作栏：hover 浮出，中性 */
body .msg-actions { gap: 2px; }
body .msg-act {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
  border-radius: 4px;
  padding: 2px 5px;
}
body .msg-act:hover { background: var(--bg-hover); color: var(--text-main); }

/* ── 输入块 ─────────────────────────────────────────────────────── */
body #wsInputBlock { background: var(--bg-main); border-top: 1px solid var(--border); }
body .ws-chat-input {
  background: var(--bg-main);
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  color: var(--text-main);
  font-size: 14px;
  padding: 11px 14px;
}
body .ws-chat-input:focus {
  border-color: #3a3a3a;
  outline: none;
  box-shadow: none;
}
body .ws-chat-input::placeholder { color: var(--text-faint); }

/* 发送：反相白底黑字（主按钮唯一形态） */
body .ws-chat-send-btn {
  background: #ffffff !important;
  color: #000000 !important;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  min-height: 36px;
}
body .ws-chat-send-btn:hover { background: #e6e6e6 !important; }

/* 底部胶囊行：中性描边，不用彩色 */
body .ws-chat-chips-row button {
  background: transparent !important;
  border: 1px solid #2a2a2a !important;
  color: var(--text-sub) !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  padding: 4px 11px !important;
  min-height: 28px;
}
body .ws-chat-chips-row button:hover {
  border-color: #3a3a3a !important;
  color: var(--text-main) !important;
}
body .ws-chat-chips-row button i { color: inherit; }

/* 停止按钮：负色描边，不填充 */
body #btnStopGen {
  background: transparent !important;
  border: 1px solid var(--pill-negative-ink) !important;
  color: var(--pill-negative-ink) !important;
  border-radius: 999px;
  font-size: 12.5px;
}

/* ── 右侧面板 ───────────────────────────────────────────────────── */
body .ws-doc-pane { background: var(--bg-main); border-left: 1px solid var(--border); }
body .right-tabs {
  background: var(--bg-main) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 0 12px !important;
  gap: 18px !important;
}
body .right-tab {
  font-size: 13px;
  color: var(--text-faint);
  padding: 11px 0 10px;
  border-bottom: 2px solid transparent;
  font-weight: 400;
}
body .right-tab:hover { color: var(--text-sub); }
body .right-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
  font-weight: 500;
}
body .right-tab i { display: none; }   /* 8 个彩色图标去掉，只留文字 */

/* 文件树：30px 节奏，无分割线 */
body .file-tree-item {
  font-size: 13px;
  padding: 5px 8px !important;
  border-radius: 5px;
  color: var(--text-sub);
}
body .file-tree-item:hover { background: var(--bg-hover); color: var(--text-main); }

/* 地址栏 */
body .file-addr-bar input,
body #fileAddrInput2 {
  background: var(--bg-main) !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 8px !important;
  color: var(--text-main) !important;
  font-size: 13px;
}
body .addr-go {
  background: transparent !important;
  border: 1px solid #2a2a2a !important;
  color: var(--text-sub) !important;
  border-radius: 8px !important;
  font-size: 12.5px;
}

/* ── 底部抽屉 ───────────────────────────────────────────────────── */
body .bottom-drawer { background: var(--bg-main); border-top: 1px solid var(--border); }
body .drawer-handle {
  background: var(--bg-main) !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 12.5px;
  color: var(--text-sub);
}
body .drawer-tab {
  background: transparent !important;
  border: none !important;
  color: var(--text-faint) !important;
  font-size: 12.5px !important;
  padding: 8px 10px !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
}
body .drawer-tab.active {
  color: var(--text-main) !important;
  border-bottom-color: var(--text-main) !important;
  font-weight: 500;
}
body .drawer-tab-badge {
  background: #1a1a1a !important;
  color: var(--text-faint) !important;
  border-radius: 999px;
  font-size: 11px !important;
  padding: 0 6px !important;
  font-variant-numeric: tabular-nums;
}

/* ── 图表配色：单一数据色 + 中性阶梯 ──────────────────────────────
   规范：一张图一个色相，其余中性；最多 4 色相，禁彩虹。
   这里把 DSH 七分类的彩色点/条统一改成「琥珀 + 灰阶」（只用明度区分）。 */
body .lg::before,
body .wb-seg,
body .dsh-browser-bar > div,
body .dsh-gseg,
body .dtb-fill,
body .dsh-node-bar-fill,
body .dsh-tl > div {
  /* 默认中性灰，逐个覆盖下面 */
  background-color: #3a3a3a;
}
/* 系统提示词：琥珀（主数据） */
body .lg-sys::before,
body .wb-seg.lg-sys { background-color: #f2b33d !important; }
/* 其余分类：中性灰阶（在 #111 卡片上必须 >= #5c，否则看不见） */
body .lg-tool::before,
body .wb-seg.lg-tool { background-color: #d4d4d4 !important; }
body .lg-user::before,
body .wb-seg.lg-user { background-color: #a8a8a8 !important; }
body .lg-inj::before,
body .wb-seg.lg-inj { background-color: #7c7c7c !important; }
body .lg-skill::before,
body .wb-seg.lg-skill { background-color: #6b6b6b !important; }
body .lg-asst::before,
body .wb-seg.lg-asst { background-color: #5c5c5c !important; }
body .lg-result::before,
body .wb-seg.lg-result { background-color: #4a4a4a !important; }
/* CSS 变量驱动的圆点（JS 内联 style="--lg-c:xxx"）——用 !important 覆盖内联 */
body .lg[style*="--lg-c"]::before { background-color: var(--lg-c) !important; }

/* 环形图：把七段彩环压成「琥珀 + 灰阶」（JS 给的是 conic-gradient 内联背景） */
body .dsh-donut { filter: grayscale(1) contrast(1.05); }
body .dsh-donut:not(.dsh-donut-time) { filter: none; }

/* 趋势柱：保留渐变柱体但改成中性→琥珀的单色渐变 */
body .dtb-fill {
  background-image: none !important;
  background-color: #f2b33d !important;   /* 平色（规范禁渐变，图表柱体亦然） */
}
/* 水位条分段：中性灰阶 */
body .dsh-waterbar .wb-seg { background-image: none !important; }
/* 时间轴条：单一琥珀 */
body .dsh-tl > div { background-color: #f2b33d !important; opacity: .75; }

/* ── 通用卡片/面板（含 DSH 四视图）───────────────────────────────── */
body .dsh-card {
  background: var(--bg-panel);
  border: none !important;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 0;
  box-shadow: none !important;
}
body .dsh-card-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}
body .dsh-card-sub { font-size: 12px; color: var(--text-faint); font-weight: 400; }
body .dsh-footnote { font-size: 12px; color: var(--text-faint); }

/* 统计小胶囊 */
body .dsh-chip {
  background: #1a1a1a !important;
  border: none !important;
  color: var(--text-sub) !important;
  font-size: 12.5px;
  border-radius: 999px;
  padding: 4px 12px;
  font-variant-numeric: tabular-nums;
}
body .dsh-chip-mini { font-size: 11.5px; padding: 2px 9px; color: var(--text-faint) !important; }

/* 模式切换（全量/增量、比前步/前轮）：中性胶囊，选中只加背景 */
body .dsh-mode-tab {
  background: transparent !important;
  border: 1px solid #2a2a2a !important;
  color: var(--text-faint) !important;
  border-radius: 999px;
  font-size: 12px;
  padding: 3px 11px;
}
body .dsh-mode-tab.active {
  background: #1f1f1f !important;
  border-color: #2a2a2a !important;
  color: var(--text-main) !important;
  font-weight: 500;
}

/* 次按钮（看板/返回）：描边 */
body .dsh-mini-btn {
  background: transparent !important;
  border: 1px solid #2a2a2a !important;
  color: var(--text-sub) !important;
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 12px;
  min-height: 28px;
}
body .dsh-mini-btn:hover { border-color: #3a3a3a !important; color: var(--text-main) !important; }

/* 搜索框 */
body .dsh-search {
  background: var(--bg-main) !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13px;
  padding: 6px 11px;
}
body .dsh-search:focus { border-color: #3a3a3a; outline: none; }

/* 环形图：细描边（3-5px 观感），内圈挖空与卡片同色 */
body .dsh-donut { width: 112px; height: 112px; }
body .dsh-donut::before { width: 78px; height: 78px; background: var(--bg-panel); }
body .dsh-donut-center b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
body .dsh-donut-center span { font-size: 11px; color: var(--text-faint); }

/* 图例：两列，数值右对齐 */
body .dsh-legend-row { font-size: 12.5px; padding: 3px 0; }
body .dsh-legend-row .dsh-pct { color: var(--text-faint); min-width: 38px; }
body .lg::before { border-radius: 2px; }

/* 当前上下文大数字 */
body .dsh-water-big { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
body .dsh-water-big b { font-weight: 600; }
body .dsh-water-pct { font-size: 13px; color: var(--text-sub); font-weight: 500; }
body .dsh-waterbar { height: 8px; border-radius: 4px; }

/* 上下文浏览器 */
body .dsh-browser-select,
body .dsh-cmp-note {
  background: var(--bg-main) !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 8px;
  font-size: 12.5px;
}
body .dsh-browser-sum { font-size: 13px; }
body .dsh-tree-node {
  background: transparent !important;
  border: none !important;
  border-top: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}
body .dsh-tree-node summary { padding: 9px 2px; font-size: 13px; }
body .dsh-tree-file,
body .dsh-tree-files { border-top: none !important; padding: 5px 2px 5px 18px; }
body .dsh-tree-tool {
  background: #1a1a1a; border: none; border-radius: 4px;
  font-size: 11.5px; padding: 1px 7px; color: var(--text-faint);
}

/* Agent 网络节点卡 */
body .dsh-net-node {
  background: var(--bg-panel) !important;
  border: none !important;
  border-radius: 12px;
  padding: 14px 16px 12px;
}
body .dsh-net-node.dsh-net-lead { border: 1px solid #2a2a2a !important; }
body .dsh-net-node.dsh-net-running { border: 1px solid var(--pill-positive-ink) !important; }
body .dsh-net-node.dsh-net-hi { box-shadow: 0 0 0 1px #3a3a3a; }
body .dsh-net-mid { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
body .dsh-net-foot { font-size: 11.5px; color: var(--text-faint); }
body .dsh-node-bar { height: 4px; border-radius: 2px; background: #1a1a1a; }

/* 成员行 */
body .dsh-member { padding: 9px 2px; }
body .dsh-m-name { font-size: 13.5px; }
body .dsh-m-sub,
body .dsh-m-desc,
body .dsh-m-foot { font-size: 11.5px; color: var(--text-faint); }

/* 状态点：小圆点，无光晕 */
body .dsh-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; }
body .dsh-dot-run { animation: none; background: var(--pill-positive-ink); }
body .dsh-net-dot { width: 6px; height: 6px; }
body .dsh-net-dot.on { box-shadow: none; background: var(--pill-positive-ink); }

/* 标签：极小胶囊，中性 */
body .dsh-tag {
  background: #1a1a1a !important;
  color: var(--text-faint) !important;
  border-radius: 4px;
  font-size: 10.5px;
  padding: 0 5px;
}
body .dsh-tag-cur { background: var(--pill-positive-bg) !important; color: var(--pill-positive-ink) !important; }
body .dsh-tag-lead { background: #222222 !important; color: var(--text-main) !important; }
body .dsh-tag-fail { background: var(--pill-negative-bg) !important; color: var(--pill-negative-ink) !important; }

/* 任务行 / 通讯记录 */
body .dsh-task { font-size: 13px; padding: 7px 2px; }
body .dsh-t-id { font-size: 11px; color: var(--text-faint); }
body .dsh-t-meta { font-size: 11.5px; color: var(--text-faint); }
body .dsh-msg-row { font-size: 12.5px; padding: 5px 2px; }
body .dsh-msg-from { color: var(--text-main); font-weight: 500; }
body .dsh-msg-txt { color: var(--text-faint); }

/* 空态：一句灰字，不加边框盒 */
body .dsh-empty {
  padding: 22px 12px;
  font-size: 12.5px;
  color: var(--text-faint);
  background: transparent;
}

/* ── 轨迹：甘特与轮次 ───────────────────────────────────────────── */
body .dsh-gantt { background: var(--bg-panel); border: none; border-radius: 12px; padding: 16px 18px; }
body .dsh-glabel { font-size: 11.5px; color: var(--text-faint); }
body .dsh-gtrack { height: 14px; background: #1a1a1a; border-radius: 4px; }
body .dsh-gseg { height: 10px; top: 2px; border-radius: 2px; }
body .dsh-gseg-input { background: #6b6b6b; }        /* 中性优先 */
body .dsh-gseg-model { background: var(--accent-gold); }  /* 主数据用唯一色 */
body .dsh-gseg-tool { background: #3a3a3a; }
body .dsh-tl-ticks { font-size: 11px; color: var(--text-faint); }

body .dsh-round-list { background: var(--bg-panel); border: none; border-radius: 12px; padding: 10px 16px; }
body .dsh-round-cap { font-size: 11.5px; color: var(--text-faint); padding: 9px 0 4px; }
body .dsh-round-row { font-size: 13px; padding: 6px 0; gap: 10px; }
body .dsh-rtag { font-size: 10.5px; border-radius: 4px; padding: 1px 7px; }
body .dsh-rtag-sys,
body .dsh-rtag-asst,
body .dsh-rtag-think,
body .dsh-rtag-tool,
body .dsh-rtag-key { background: #1a1a1a !important; color: var(--text-sub) !important; }
body .dsh-rsub { font-size: 11.5px; color: var(--text-faint); }

/* ── 看板：五列，卡片无边界，靠台阶 ─────────────────────────────── */
body .dsh-board-head { margin-bottom: 16px; gap: 14px; }
body .dsh-board-title { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
body .dsh-bcol {
  background: var(--bg-panel) !important;
  border: none !important;
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 420px;
}
body .dsh-bcol-head b { font-size: 13px; font-weight: 600; }
body .dsh-bcount {
  background: #1a1a1a !important;
  color: var(--text-faint) !important;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
body .dsh-bdot { width: 6px; height: 6px; }
body .dsh-bcard {
  background: #1a1a1a !important;
  border: none !important;
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 8px;
}
body .dsh-bcard-subject { font-size: 13px; line-height: 1.45; }

/* ── 弹层/菜单：唯一允许阴影的地方 ──────────────────────────────── */
body .dsh-dialog,
body .modal,
body .cmdk-box,
body #cmdk-overlay > div,
body .sess-pop,
body .efp-pop {
  background: #141414 !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7) !important;
}

/* 命令面板 */
body #cmdk-overlay { background: rgba(0, 0, 0, 0.72) !important; }
body #cmdk-overlay input {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  color: var(--text-main) !important;
  font-size: 15px;
}
body #cmdk-overlay [class*="item"] {
  border-radius: 6px;
  font-size: 13px;
}

/* 下拉（@ 与 /） */
body #mentionDropdown,
body #slashDropdown {
  background: #141414 !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 10px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7) !important;
}
body .mention-item,
body .slash-item,
body #slashDropdown > div {
  font-size: 13px;
  color: var(--text-sub);
  border-radius: 5px;
}
body .mention-item.selected,
body .slash-item.selected { background: #1f1f1f !important; color: var(--text-main); }

/* 会话面板 */
body .sess-item { border-radius: 6px; font-size: 13px; }
body .sess-item:hover { background: var(--bg-hover); }
body .sess-new-btn,
body #sessTopNew {
  background: transparent !important;
  border: 1px solid #2a2a2a !important;
  color: var(--text-sub) !important;
  border-radius: 999px;
  font-size: 12.5px;
}

/* 权限/思考强度菜单行 */
body .efp-row { border-radius: 8px; }
body .efp-row.sel { background: #1f1f1f !important; }
body .efp-bars i { background: #2a2a2a; }
body .efp-bars i.on { background: var(--text-main); }   /* 量表用墨色，不用彩 */

/* ── hashline 时间轴：收窄到 6px 小刻度，去掉彩色与文字碎块 ───────
   旧实现 26px 宽 + 彩色点 + 标签，在 1440 下会把右边缘挤出一列竖排碎字。 */
body .hashline { width: 8px !important; right: 2px !important; }
body .hashline-dot {
  width: 6px !important; height: 2px !important;
  margin: 1px 0 !important;
  background: #2a2a2a !important;
  border-radius: 1px !important;
}
body .hashline-dot.hl-agent,
body .hashline-dot.hl-user,
body .hashline-dot.hl-todo,
body .hashline-dot.hl-ask { background: #3a3a3a !important; opacity: 1 !important; }
body .hashline-dot:hover { background: var(--text-faint) !important; transform: none !important; }
body .hashline-dot .hl-tag,
body .hashline [class*="hl-label"] { display: none !important; }

/* 联系人行：禁止横向位移与彩色左条，保证左栏不被裁切 */
body .ws-contact-item:hover { transform: none !important; }
body .ws-contact-item.active {
  border-left-color: transparent !important;
  box-shadow: none !important;
}
body .ws-contact-item.active::after { display: none !important; }
body .ws-sidebar,
body #wsSidebar { min-width: 210px; overflow-x: hidden; }
body .ws-contact-name,
body .ws-contact-sub,
body .ws-contact-snippet {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 联系人行文字左对齐（旧样式居中，与侧栏导航惯例不符） */
body .ws-contact-item { text-align: left !important; align-items: center; }
body .ws-contact-name { text-align: left; font-weight: 500; }
body .ws-contact-sub { text-align: left; }
/* 头像/状态点：去掉发光，纯色小点 */
body .ws-contact-item .status-dot,
body .ws-contact-item [class^="sd-"] { box-shadow: none !important; }
body .ws-inbox-head,
body .ws-inbox-title { text-align: left; }

/* 系统条里的 emoji：改为中性符号（规范禁 emoji 装饰） */
body .sys-notice .sys-notice-text { font-size: 12.5px; }

/* ── 输入块：Codex 式融合输入区 ───────────────────────────────────
   旧实现：圆角气泡 + focus 发光脉冲动画（规范禁发光）。新实现：整块与
   地面同色，输入区是一块安静面板，focus 只把描边提亮一级，无动画无光晕。 */
body .ws-chat-input-row {
  background: var(--bg-main) !important;
  border-top: none !important;
  padding: 10px 20px 6px !important;
  gap: 8px;
  align-items: flex-end;
}
body .ws-chat-input {
  background: #0e0e0e !important;
  border: 1px solid #262626 !important;
  border-radius: 12px !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  min-height: 44px;
  color: var(--text-main) !important;
  box-shadow: none !important;
  animation: none !important;
  transition: border-color 120ms ease;
}
body .ws-chat-input:focus {
  border-color: #3a3a3a !important;
  box-shadow: none !important;
  animation: none !important;
  outline: none;
}
body .ws-chat-input::placeholder { color: var(--text-faint) !important; }

body .ws-attach-btn {
  color: var(--text-faint) !important;
  font-size: 16px !important;
  padding: 0 6px 10px !important;
  align-self: flex-end;
}
body .ws-attach-btn:hover { color: var(--text-main) !important; }

body .ws-chat-send-btn {
  min-height: 44px;
  border-radius: 12px !important;
  padding: 0 20px !important;
  align-self: flex-end;
}

body .ws-chat-chips-row {
  padding: 2px 20px 10px !important;
  gap: 6px !important;
  background: var(--bg-main) !important;
}
body .ws-chat-chips-row button {
  background: transparent !important;
  border: none !important;
  color: var(--text-faint) !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  padding: 3px 8px !important;
  min-height: 24px !important;
}
body .ws-chat-chips-row button:hover {
  background: #141414 !important;
  color: var(--text-sub) !important;
}

/* ── 消息区：行距与分隔收紧（读起来像连续记录，不是一叠卡片）─────── */
body #wsChatMessages { padding: 16px 24px 4px !important; }
body .dm-msg,
body .gc-msg { margin-bottom: 14px !important; }
body .dm-msg.mine,
body .gc-msg.gc-mine { margin-bottom: 18px !important; }
body .dm-msg-sender,
body .gc-name { margin-bottom: 3px !important; }
body .dm-msg-time,
body .gc-time { margin-top: 3px !important; }

body .date-separator {
  margin: 22px 0 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
body .date-separator-label {
  font-size: 11px !important;
  color: #6b6b6b !important;
  background: transparent !important;
  padding: 0 !important;
}

body .sys-notice {
  border-left-color: #262626 !important;
  padding: 3px 10px !important;
  margin: 3px 0 !important;
}
body .sys-cmd-card {
  border-left-color: var(--accent-gold) !important;
  border-left-width: 2px !important;
  padding: 5px 10px !important;
  margin: 5px 0 !important;
  font-size: 12.5px !important;
  line-height: 1.6;
}

/* ── 滚动条：细、中性 ───────────────────────────────────────────── */
body ::-webkit-scrollbar { width: 10px; height: 10px; }
body ::-webkit-scrollbar-track { background: transparent; }
body ::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 5px;
  border: 2px solid var(--bg-main);
}
body ::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ── 焦点可见（无障碍）─────────────────────────────────────────── */
body button:focus-visible,
body input:focus-visible,
body textarea:focus-visible,
body [onclick]:focus-visible {
  outline: 1px solid #6b6b6b;
  outline-offset: 1px;
}

/* ── 亮色主题（garden / wiki）保持可读，但去掉渐变与蓝 ──────────── */
body.theme-garden,
body.theme-wiki {
  --accent-gradient: #1d1f20;
}
body.theme-garden .ws-chat-send-btn,
body.theme-wiki .ws-chat-send-btn {
  background: #1d1f20 !important;
  color: #ffffff !important;
}
body.theme-garden #wsViewTabs,
body.theme-wiki #wsViewTabs { background: var(--bg-main) !important; }
body.theme-garden .dm-msg.mine .dm-msg-bubble,
body.theme-wiki .dm-msg.mine .dm-msg-bubble,
body.theme-garden .gc-msg.gc-mine .gc-bubble,
body.theme-wiki .gc-msg.gc-mine .gc-bubble {
  background: #ffffff !important;
  border: 1px solid #e5e5e5 !important;
  color: var(--text-main) !important;
}
/* ── 收尾：卡片标题一律墨色，琥珀只出现在数据与状态上 ─────────────── */
body .dsh-card-head,
body .dsh-card-head * { color: var(--text-main) !important; }
body .dsh-card-sub { color: var(--text-faint) !important; font-weight: 400 !important; }
body .dsh-board-title { color: var(--text-main) !important; }
body .dsh-water-pct { color: var(--text-sub) !important; }
body .dsh-msg-from { color: var(--text-main) !important; }
body .dsh-net-lead { border-color: #2a2a2a !important; }

/* 输入框边框：压过所有旧规则（含 :focus 与变量间接引用） */
body #wsChatInput.ws-chat-input,
body #wsChatInput.ws-chat-input:focus,
body #wsChatInput.ws-chat-input:hover {
  border: 1px solid #262626 !important;
  border-color: #262626 !important;
  box-shadow: none !important;
  animation: none !important;
  outline: none !important;
}
body #wsChatInput.ws-chat-input:focus { border-color: #3a3a3a !important; }

/* ── 看板列：五列自适应画布宽度（旧固定 260px×5+gap=1348px 会被右缘裁掉）── */
body .dsh-board-cols {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  overflow: visible !important;
  align-items: start !important;
}
body .dsh-bcol {
  flex: none !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 380px !important;
}
/* 窄屏（<1180）退回横向滚动，避免列被压成碎片 */
@media (max-width: 1180px) {
  body .dsh-board-cols {
    display: flex !important;
    overflow-x: auto !important;
  }
  body .dsh-bcol { flex: 0 0 230px !important; }
}

/* ── 亮色主题下输入区与气泡（覆盖层写死深色，需按主题回退）──────────── */
body.theme-wiki .ws-chat-input,
body.theme-garden .ws-chat-input,
body.theme-wiki #wsChatInput.ws-chat-input,
body.theme-garden #wsChatInput.ws-chat-input {
  background: #ffffff !important;
  border-color: #e5e5e5 !important;
  color: #1a1a1a !important;
}
body.theme-wiki #wsChatInput.ws-chat-input:focus,
body.theme-garden #wsChatInput.ws-chat-input:focus {
  border-color: #b0b0b0 !important;
}
body.theme-wiki .ws-chat-input::placeholder,
body.theme-garden .ws-chat-input::placeholder { color: #6b6b6b !important; }
body.theme-wiki .ws-chat-input-row,
body.theme-garden .ws-chat-input-row,
body.theme-wiki .ws-chat-chips-row,
body.theme-garden .ws-chat-chips-row { background: var(--bg-main) !important; }
body.theme-wiki .ws-chat-send-btn,
body.theme-garden .ws-chat-send-btn {
  background: #1d1f20 !important;
  color: #ffffff !important;
}
body.theme-wiki .ws-chat-chips-row button,
body.theme-garden .ws-chat-chips-row button { color: #6b6b6b !important; }
body.theme-wiki .ws-chat-chips-row button:hover,
body.theme-garden .ws-chat-chips-row button:hover { background: #ece7dd !important; }
body.theme-wiki .sys-notice,
body.theme-garden .sys-notice { border-left-color: #d8d2c4 !important; color: #6b6b6b !important; }
body.theme-wiki .date-separator-label,
body.theme-garden .date-separator-label { color: #8a8070 !important; }
body.theme-wiki .hashline-dot,
body.theme-garden .hashline-dot { background: #d8d2c4 !important; }
body.theme-wiki .dsh-card,
body.theme-garden .dsh-card { background: var(--bg-panel) !important; }
body.theme-wiki .dsh-bcol,
body.theme-garden .dsh-bcol { background: var(--bg-panel) !important; }
body.theme-wiki .dsh-bcard,
body.theme-garden .dsh-bcard { background: #ffffff !important; border: 1px solid #e5e5e5 !important; }

/* ============================================================
 * a11y-compat 追加块 (2026-11-05, pull 合并时补齐)
 * 保持 true-black-flat 美学不动,只补强制可达性项:
 *   1) 减动效尊重(ui-refresh 原缺失)
 *   2) :focus-visible 焦点环
 *   3) 触控目标最小尺寸(承接 redesign-v2 的提升,防止设计换层回退)
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
:focus-visible {
  outline: 2px solid rgba(217, 168, 74, 0.65);
  outline-offset: 2px;
  border-radius: 4px;
}
body .msg-act { min-width: 28px !important; min-height: 28px !important; padding: 4px 7px !important; }
body .ws-attach-btn { min-width: 36px !important; min-height: 34px !important; }
body .cb-btn { min-height: 28px !important; padding: 4px 10px !important; }
body .ws-chat-chips-row button { min-height: 30px !important; }
body .ws-chat-send-btn { min-height: 38px !important; }
