dsh-session-superagent 0.9.267 → 0.9.269

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,68 @@
2
2
 
3
3
  格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## [0.9.269] - 2026-11-05 —— Tooltip 不再丢焦点,Orbit 触发按钮去 inline 化
6
+
7
+ ### Tooltip scroll-close 保留焦点
8
+
9
+ `ui-host-primitives.js` 与主面板内联 Tooltip 同步:
10
+
11
+ - scroll 前记录焦点是否在 trigger 或其内部;
12
+ - 合并适配 ref 与原函数/对象 ref,不吞宿主 handlers;
13
+ - remount 后仅对原先位于 trigger 的焦点调用 `focus({preventScroll:true})`;
14
+ - 焦点在别处不抢,防止 scroll → remount 循环。
15
+
16
+ ### StatusOrbit 触发按钮原生化
17
+
18
+ 删除整段 inline `style`,改为 `dt-btn dt-btn-ghost sa-orbit-trigger`:
19
+ hover/open 使用官方 `--dsw-alias-interactive-bg-hover/active`,不再写死 rgba;
20
+ 初始读取使用 `is-loading`,透明度 0.4 对齐官方 disabled 档。
21
+ 最左位置、OrbitMark、aria 与开关行为不变,DSH/fallback 共用同一按钮。
22
+
23
+ ### 证据
24
+
25
+ ```
26
+ Tooltip 焦点适配 11/11;Orbit trigger 7/7
27
+ npm test → 535/535
28
+ scripts/ui-audit.mjs → 11/11,100 分
29
+ 对比度 → 浅色 16 组 ≤ 基线 16;深色 13 组 ≤ 基线 13
30
+ ```
31
+
32
+ 真实 WebView 的焦点、键鼠与 computed style 仍列入走查,不用测试桩冒充宿主验收。
33
+
34
+ ## [0.9.268] - 2026-11-05 —— InfoTip 与卫星环接入 DSH 原生浮层
35
+
36
+ ### InfoTip → DSH Tooltip
37
+
38
+ - 保留 `{text,icon,warn}` 与原 trigger;使用 `top / portal / openOnClick / gap=8`;
39
+ - capture scroll → remount key 清掉 pinned,effect 对称清理;
40
+ - DSH 的 `aria-describedby` 映射为 `aria-expanded`;不添加受控 open 假 API;
41
+ - 仅缺 Tooltip 时只回退 InfoTip,不连带降级 Modal/Toast。
42
+
43
+ ### StatusOrbit → OrbitPopover
44
+
45
+ 新增 `ui-orbit-popover.js` 与 UMD 同源适配:
46
+
47
+ - `useAnchoredPosition + useDismissOnOutsidePointer + MenuSurface`;
48
+ - `top / end / gap=8 / margin=8`,不传 center,不宣称自动 flip;
49
+ - 主 surface 通过宿主 `react-dom.createPortal` 到 body,`role=dialog`;
50
+ - 空态 252 / 常规 368、watcher rows、轮询和动作全部保留;
51
+ - DSH 路径不再使用手算 left/bottom 或极大 z-index;缺原语时完整保留旧实现。
52
+
53
+ 删除确认改为「先关 orbit → 独立 ConfirmDialog → 取消/完成后回焦圆环」,
54
+ 不再让浮层层级压住确认框,也不把焦点还给已卸载的删除按钮。
55
+
56
+ ### 证据
57
+
58
+ ```
59
+ Tooltip 定向 5/5;Orbit 适配 10/10;Orbit 集成 7/7;主线锚点 2/2
60
+ npm test → 524/524
61
+ scripts/ui-audit.mjs → 11/11,100 分
62
+ 对比度 → 浅色 16 组 ≤ 基线 16;深色 13 组 ≤ 基线 13
63
+ ```
64
+
65
+ 真实 WebView 的 portal、键鼠、焦点、读屏与叠层仍列入走查,不宣称已验。
66
+
5
67
  ## [0.9.267] - 2026-11-05 —— 修掉行内编辑透明遮挡,主面板接入 DSH Modal/Toast
6
68
 
7
69
  ### 修复「展开后只能看,不能改」
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <img src="assets/icon-180.png" width="88" height="88" alt="">
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
- [![Version](https://img.shields.io/badge/version-0.9.267-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
6
+ [![Version](https://img.shields.io/badge/version-0.9.269-green.svg)](https://github.com/MYCF711/dsh-session-superagent/releases)
7
7
  [![npm](https://img.shields.io/npm/v/dsh-session-superagent.svg)](https://www.npmjs.com/package/dsh-session-superagent)
8
8
  [![dsh](https://img.shields.io/badge/DeepSeek%20Harness-plugin-orange.svg)](https://github.com/topics/dsh-plugin)
9
9
  [![awesome](https://img.shields.io/badge/awesome-dsh--plugin-%E2%9C%93-success.svg)](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)
@@ -46,11 +46,13 @@ GitHub 有新动态 → watcher 轮询 → Agent.followup(消息) → 会话跑
46
46
  | 位置 | 是什么 |
47
47
  |---|---|
48
48
  | 输入框下面那一行的**最左端**(`轮/步 · token · 上下文环` 同一行) | **总卫星环**:一个环代表这台机器,环上每一颗卫星 = 一个在运行的会话级 superagent。绿=主理中,琥珀=已暂停,红=上次轮询失败;一圈转起来说明至少还有一个在盯。**点一下**展开详情:仓库 / 会话标题 / 间隔 / 上次轮询 / 上次唤醒 / 状态 / 错误原文。 |
49
- | 中间栏「主理鱼」标签页 | **移植自官方 superagent 的 GUI**:总览(统计 + 需要关注 + 最近被过滤)/ 判定(每轮唤醒结果与原因)/ 触发(新增 + 行内编辑)/ 设置(来源 · 凭证 · 版本与更新 · 分诊信号 · 会话 goal;术语表是独立弹层) |
49
+ | 中间栏「主理鱼」标签页 | **DSH 原生结构树、素材与设计语言**(superagent 同源控件作为适配):总览 / 判定 / 触发 / 设置;Modal、Toast 等优先使用宿主 primitives,官方确无同物才最小 derived |
50
50
  | 会话头部 | 不再挂徽章(0.3.2 起移到上面那行) |
51
51
 
52
52
  没有主理鱼时这里画一个**灰色空环**(不转、无卫星),点开提示怎么添加 —— 不占位但也不消失,免得看着像功能坏了。
53
53
 
54
+ UI 开发先读 `AGENTS.md` 的「原生 DSH 优先,最小自制」;`dsh-session-superagent/host-primitives` 与 `dsh-session-superagent/orbit-popover` 导出经测试的薄适配,不实现第二套弹层。
55
+
54
56
  ## 环境要求
55
57
 
56
58
  - DSH ≥ 0.2.1-rc.5(`engines.dsh`)
@@ -146,7 +148,7 @@ Gitee 私有仓库要在「设置 → 凭证」填私人令牌;公开仓库不
146
148
  ## 开发
147
149
 
148
150
  ```sh
149
- npm test # 500 项单测(带离线开关;裸 node --test 会真去 spawn gh,两分半)
151
+ npm test # 535 项单测(带离线开关;裸 node --test 会真去 spawn gh,两分半)
150
152
  ```
151
153
 
152
154
  ### 工具输出:文本给人和 agent,JSON 给程序
@@ -206,7 +208,7 @@ dsh plugin --profile <profile> add dsh-session-superagent@latest
206
208
 
207
209
 
208
210
  ```bash
209
- npm test # 500 项单测(带离线开关,约 1.6 秒)
211
+ npm test # 535 项单测(带离线开关,约 1.6 秒)
210
212
  node scripts/ui-audit.mjs # 11 项 UI 指标(写死颜色 / 自造 token / 官方结构采用 …)
211
213
  node scripts/preflight.mjs # 41 项门禁(含上面两条,外加 profile 一致性、路由面、包内容)
212
214
  node scripts/render-preview.mjs preview.html # 双主题静态预览,直接浏览器打开
package/client.js CHANGED
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
14
14
  const { useCallback, useEffect, useRef, useState } = React
15
15
 
16
16
  // client.js 是 UMD:宿主原语只能走 factory 注入的 require,不能 import 相对 ESM 适配模块。
17
- // 这里的参数与 ui-host-primitives.js 的 createHostUi 保持一致,仅接入本面板需要的 Modal/Toast。
17
+ // 这里的参数与 ui-host-primitives.js 的 createHostUi 保持一致,仅接入本面板需要的 Modal/Toast/Tooltip。
18
18
  function dismissToast(current, id) {
19
19
  return current && current.id === id ? null : current
20
20
  }
@@ -51,6 +51,69 @@ window.__ModuleLoader__.load({
51
51
  onDone: () => onDone(item.id),
52
52
  })
53
53
  }
54
+ // DSH 只给 trigger 合并 aria-describedby,不维护 aria-expanded。
55
+ // forwardRef 把宿主 ref/事件原样落到原 button;expanded 仅映射 DSH 已管理的 describedby,不另管 open。
56
+ const TooltipTrigger = primitives.Tooltip && typeof HostReact.forwardRef === 'function'
57
+ ? HostReact.forwardRef(function InfoTipTrigger({ text, icon = 'question', warn, triggerRef, 'aria-describedby': describedBy, ...triggerProps }, ref) {
58
+ const triggerIcon = HostReact.isValidElement(icon) ? icon : hostH(Icon, { name: icon, size: 14 })
59
+ const setTriggerRefs = (node) => {
60
+ if (triggerRef) triggerRef.current = node
61
+ if (typeof ref === 'function') ref(node)
62
+ else if (ref && typeof ref === 'object') ref.current = node
63
+ }
64
+ return hostH('button', {
65
+ ...triggerProps,
66
+ ref: setTriggerRefs,
67
+ type: 'button',
68
+ className: cx('dt-info', warn && 'dt-info-warn'),
69
+ 'aria-label': text,
70
+ 'aria-describedby': describedBy,
71
+ 'aria-expanded': Boolean(describedBy),
72
+ }, triggerIcon)
73
+ })
74
+ : null
75
+ const HostTooltip = ({ text, icon = 'question', warn = false } = {}) => {
76
+ const TooltipPrimitive = primitive('Tooltip')
77
+ if (!TooltipTrigger) throw new Error('DSH Tooltip 需要宿主 React.forwardRef')
78
+ const [remountKey, setRemountKey] = HostReact.useState(0)
79
+ const triggerNodeRef = HostReact.useRef(null)
80
+ const restoreFocusRef = HostReact.useRef(false)
81
+ HostReact.useEffect(() => {
82
+ if (typeof window === 'undefined') return undefined
83
+ const closeOnScroll = () => {
84
+ const triggerNode = triggerNodeRef.current
85
+ const activeElement = typeof document === 'undefined' ? null : document.activeElement
86
+ // 滚动卸载前记录:只有焦点原本位于 trigger 或其内部才允许恢复。
87
+ restoreFocusRef.current = Boolean(triggerNode && activeElement && (
88
+ activeElement === triggerNode
89
+ || (typeof triggerNode.contains === 'function' && triggerNode.contains(activeElement))
90
+ ))
91
+ setRemountKey((current) => current + 1)
92
+ }
93
+ // Tooltip 没有受控 open API;capture 覆盖主面板及任意嵌套滚动容器。
94
+ window.addEventListener('scroll', closeOnScroll, true)
95
+ return () => window.removeEventListener('scroll', closeOnScroll, true)
96
+ }, [])
97
+ HostReact.useEffect(() => {
98
+ if (!restoreFocusRef.current) return undefined
99
+ restoreFocusRef.current = false
100
+ const triggerNode = triggerNodeRef.current
101
+ if (triggerNode && typeof triggerNode.focus === 'function'
102
+ && (!('isConnected' in triggerNode) || triggerNode.isConnected)) {
103
+ // 防止焦点归还再次滚动容器,形成 scroll -> remount 循环。
104
+ triggerNode.focus({ preventScroll: true })
105
+ }
106
+ return undefined
107
+ }, [remountKey])
108
+ return hostH(TooltipPrimitive, {
109
+ key: remountKey,
110
+ label: text,
111
+ side: 'top',
112
+ portal: true,
113
+ openOnClick: true,
114
+ gap: 8,
115
+ }, hostH(TooltipTrigger, { text, icon, warn, triggerRef: triggerNodeRef }))
116
+ }
54
117
  const createToastState = () => {
55
118
  const [item, setItem] = HostReact.useState(null)
56
119
  const sequence = HostReact.useRef(0)
@@ -65,22 +128,229 @@ window.__ModuleLoader__.load({
65
128
  }, [])
66
129
  return { item, notify, dismiss }
67
130
  }
68
- return { Modal: HostModal, Toast: HostToast, createToastState }
131
+ return { Modal: HostModal, Toast: HostToast, Tooltip: HostTooltip, createToastState }
132
+ }
133
+
134
+ // 以下来源:ui-orbit-popover.js(L84e)的同一薄适配,因 client.js 是 UMD 而在 factory 内镜像。
135
+ // createOrbitPopover({React, primitives}) 的参数、OrbitPopover/useOrbitConfirm 调用面与来源模块一致;
136
+ // React.createPortal 由调用方用宿主 require('react-dom').createPortal 注入,不伪造 primitives.createPortal。
137
+ const DEFAULT_ORBIT_Z_INDEX = 1100
138
+
139
+ function focusIfConnected(node) {
140
+ if (!node || typeof node.focus !== 'function') return false
141
+ if ('isConnected' in node && !node.isConnected) return false
142
+ try {
143
+ node.focus()
144
+ return true
145
+ } catch {
146
+ return false
147
+ }
148
+ }
149
+
150
+ function closeReason(detail) {
151
+ if (detail === false) return { reason: 'outside-pointer' }
152
+ if (typeof detail === 'string') return { reason: detail }
153
+ if (detail && typeof detail === 'object' && typeof detail.reason === 'string') return detail
154
+ return { reason: 'dismiss' }
155
+ }
156
+
157
+ // 单独抽出确认 hook 只为让 StatusOrbit 在 fallback 也无条件执行同样数量的 hooks;
158
+ // 弹层创建仍严格要求完整 DSH 能力,缺少能力不会创建替代 Popover。
159
+ function createOrbitConfirm({ React: HostReact }) {
160
+ return function useOrbitConfirm({ orbitRef, onCloseOrbit, onRequestConfirm } = {}) {
161
+ const orbitRefRef = HostReact.useRef(orbitRef)
162
+ const onCloseOrbitRef = HostReact.useRef(onCloseOrbit)
163
+ const onRequestConfirmRef = HostReact.useRef(onRequestConfirm)
164
+ const restoreFocusRef = HostReact.useRef(null)
165
+ orbitRefRef.current = orbitRef
166
+ onCloseOrbitRef.current = onCloseOrbit
167
+ onRequestConfirmRef.current = onRequestConfirm
168
+
169
+ const requestConfirm = HostReact.useCallback((detail = {}) => {
170
+ restoreFocusRef.current = 'orbit'
171
+ if (typeof onCloseOrbitRef.current === 'function') {
172
+ onCloseOrbitRef.current({ reason: 'confirm' })
173
+ }
174
+ const request = onRequestConfirmRef.current
175
+ if (typeof request === 'function') {
176
+ const extra = detail && typeof detail === 'object' ? detail : { value: detail }
177
+ return request({ ...extra, reason: 'confirm', restoreFocus: 'orbit' })
178
+ }
179
+ return undefined
180
+ }, [])
181
+
182
+ const onConfirmClose = HostReact.useCallback(() => {
183
+ if (restoreFocusRef.current !== 'orbit') return false
184
+ restoreFocusRef.current = null
185
+ const ref = orbitRefRef.current
186
+ return focusIfConnected(ref && ref.current)
187
+ }, [])
188
+
189
+ return {
190
+ onRequestConfirm: requestConfirm,
191
+ onConfirmClose,
192
+ restoreFocus: restoreFocusRef.current,
193
+ }
194
+ }
195
+ }
196
+
197
+ const useOrbitConfirm = createOrbitConfirm({ React })
198
+
199
+ function createOrbitPopover({ React: HostReact, primitives } = {}) {
200
+ if (!HostReact || typeof HostReact.createElement !== 'function') {
201
+ throw new TypeError('createOrbitPopover 需要宿主 React.createElement')
202
+ }
203
+ for (const hook of ['useRef', 'useCallback', 'useEffect']) {
204
+ if (typeof HostReact[hook] !== 'function') {
205
+ throw new TypeError(`createOrbitPopover 需要宿主 React.${hook}`)
206
+ }
207
+ }
208
+ if (typeof HostReact.createPortal !== 'function') {
209
+ throw new TypeError('createOrbitPopover 需要宿主 React.createPortal(从 react-dom 注入)')
210
+ }
211
+ if (!primitives || (typeof primitives !== 'object' && typeof primitives !== 'function')) {
212
+ throw new TypeError('createOrbitPopover 需要 DSH primitives')
213
+ }
214
+
215
+ const primitive = (name, kind) => {
216
+ const value = primitives[name]
217
+ if (kind === 'function' ? typeof value !== 'function' : !value) {
218
+ throw new Error(`DSH primitives.${name} 不可用;OrbitPopover 不会创建替代弹层`)
219
+ }
220
+ return value
221
+ }
222
+ const useAnchoredPosition = primitive('useAnchoredPosition', 'function')
223
+ const useDismissOnOutsidePointer = primitive('useDismissOnOutsidePointer', 'function')
224
+ const MenuSurface = primitive('MenuSurface')
225
+ const hostH = HostReact.createElement
226
+ const createPortal = HostReact.createPortal
227
+
228
+ function OrbitPopover({
229
+ open,
230
+ anchorRef,
231
+ orbitRef,
232
+ panelRef: suppliedPanelRef,
233
+ onClose,
234
+ width,
235
+ zIndex = DEFAULT_ORBIT_Z_INDEX,
236
+ portalTarget: suppliedPortalTarget,
237
+ className,
238
+ style,
239
+ ariaLabel,
240
+ children,
241
+ } = {}) {
242
+ const internalPanelRef = HostReact.useRef(null)
243
+ const panelRef = suppliedPanelRef || internalPanelRef
244
+ const returnFocusRef = orbitRef || anchorRef
245
+ const onCloseRef = HostReact.useRef(onClose)
246
+ onCloseRef.current = onClose
247
+
248
+ const close = HostReact.useCallback((detail) => {
249
+ const callback = onCloseRef.current
250
+ if (typeof callback === 'function') callback(closeReason(detail))
251
+ }, [])
252
+
253
+ // 与来源适配器一致:宿主 hooks 和本地 effect 都在 open 分支前无条件调用。
254
+ const position = useAnchoredPosition({
255
+ open: Boolean(open),
256
+ anchorRef,
257
+ panelRef,
258
+ side: 'top',
259
+ align: 'end',
260
+ gap: 8,
261
+ margin: 8,
262
+ })
263
+ useDismissOnOutsidePointer(panelRef, Boolean(open), close, anchorRef)
264
+
265
+ const portalTarget = suppliedPortalTarget === undefined
266
+ ? (typeof document !== 'undefined' ? document.body : null)
267
+ : suppliedPortalTarget
268
+ const ownerDocument = portalTarget && portalTarget.ownerDocument
269
+ ? portalTarget.ownerDocument
270
+ : (typeof document !== 'undefined' ? document : null)
271
+
272
+ HostReact.useEffect(() => {
273
+ if (!open || !ownerDocument || typeof ownerDocument.addEventListener !== 'function') return undefined
274
+ focusIfConnected(panelRef.current)
275
+ const onKeyDown = (event) => {
276
+ if (!event || event.key !== 'Escape' || event.repeat) return
277
+ if (typeof event.preventDefault === 'function') event.preventDefault()
278
+ if (typeof event.stopPropagation === 'function') event.stopPropagation()
279
+ close({ reason: 'escape' })
280
+ }
281
+ ownerDocument.addEventListener('keydown', onKeyDown, true)
282
+ return () => {
283
+ ownerDocument.removeEventListener('keydown', onKeyDown, true)
284
+ focusIfConnected(returnFocusRef && returnFocusRef.current)
285
+ }
286
+ }, [open, close, ownerDocument, panelRef, returnFocusRef])
287
+
288
+ if (!open) return null
289
+ if (!anchorRef || typeof anchorRef !== 'object') {
290
+ throw new TypeError('OrbitPopover 需要调用方传入 anchorRef')
291
+ }
292
+ if (!Number.isFinite(width) || width <= 0) {
293
+ throw new TypeError('OrbitPopover 需要调用方传入正数 width;适配器不推导业务宽度')
294
+ }
295
+ if (!portalTarget) {
296
+ throw new Error('OrbitPopover portal target 不可用;不会退化为非 portal surface')
297
+ }
298
+
299
+ const surface = hostH(MenuSurface, {
300
+ ref: panelRef,
301
+ role: 'dialog',
302
+ 'aria-label': ariaLabel,
303
+ tabIndex: -1,
304
+ className,
305
+ style: {
306
+ ...style,
307
+ position: 'fixed',
308
+ left: position ? position.left : 0,
309
+ top: position ? position.top : 0,
310
+ width,
311
+ zIndex,
312
+ visibility: position ? 'visible' : 'hidden',
313
+ },
314
+ }, children)
315
+ return createPortal(surface, portalTarget)
316
+ }
317
+
318
+ return { OrbitPopover, useOrbitConfirm: createOrbitConfirm({ React: HostReact }) }
69
319
  }
70
320
 
71
321
  // 老宿主没有这个映射时 require 会抛错;可选探测失败必须完整保留本地实现。
72
322
  let hostUi = null
323
+ let hostTooltip = null
324
+ let hostOrbit = null
73
325
  try {
74
326
  const primitives = require('@deepseek-ai/dsh-client-ui-primitives')
75
327
  if (primitives && primitives.Modal && primitives.Toast && primitives.IconWarningOutlineMedium) {
76
328
  hostUi = createHostUi({ React, primitives })
329
+ // Tooltip 独立探测:缺少它只回退 InfoTip,不把已接入的 Modal/Toast 一起降级。
330
+ if (primitives.Tooltip && typeof React.forwardRef === 'function') hostTooltip = hostUi.Tooltip
77
331
  }
78
332
  } catch {
79
333
  hostUi = null
334
+ hostTooltip = null
335
+ }
336
+
337
+ // Orbit 独立探测:缺 MenuSurface/定位/外点 hook 或 react-dom.createPortal 任一能力,完整保留旧 StatusOrbit。
338
+ try {
339
+ const primitives = require('@deepseek-ai/dsh-client-ui-primitives')
340
+ if (primitives && primitives.MenuSurface
341
+ && typeof primitives.useAnchoredPosition === 'function'
342
+ && typeof primitives.useDismissOnOutsidePointer === 'function') {
343
+ const reactDom = require('react-dom')
344
+ if (reactDom && typeof reactDom.createPortal === 'function') {
345
+ hostOrbit = createOrbitPopover({ React: { ...React, createPortal: reactDom.createPortal }, primitives })
346
+ }
347
+ }
348
+ } catch {
349
+ hostOrbit = null
80
350
  }
81
351
 
82
352
  // 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
83
- const CLIENT_VERSION = '0.9.267'
353
+ const CLIENT_VERSION = '0.9.269'
84
354
  let BASE = '/session-superagent'
85
355
  /**
86
356
  * 挑「最新的那个服务端实例」。
@@ -183,7 +453,7 @@ window.__ModuleLoader__.load({
183
453
  // 官方 GUI 的 376 条选择器 / 40KB 样式原样搬过来,类名统一 `dt-` 前缀,不污染宿主。
184
454
  // 两个表单都有这个开关:文案只写一份,改的时候不会漏掉另一处
185
455
  const ISOLATED_HINT = '隔离执行(每次唤醒开一个临时副本;在副本里改,用完自动回收)'
186
- const PORTED_CSS = "/* Panel layout and local UI controls styled with DSH `--dsw-alias-*` design tokens; one rule per line. */\n.dt-page { box-sizing: border-box; height: 100%; overflow: auto; scrollbar-gutter: stable; scroll-padding: 48px 0 72px; container-type: inline-size; padding: 28px clamp(24px, 4vw, 48px) 0; color: var(--dsw-alias-label-primary); }\n/* Deployment page rendered inside DSH Plugin Manager, which owns scrolling and padding. */\n.dt-embedded { container-type: inline-size; color: var(--dsw-alias-label-primary); }\n/* Disable sticky positioning inside DSH Plugin Manager, where the host container owns scrolling and bottom padding. */\n.dt-embedded .dt-savebar { position: static; }\n.dt-page > * + * { margin-top: 16px; }\n.dt-page > .dt-column { max-width: 960px; margin: 0 auto; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }\n.dt-head { position: relative; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }\n.dt-search { position: relative; width: 240px; max-width: 100%; }\n.dt-search-results { position: absolute; top: calc(100% + 6px); right: 0; width: min(560px, 90cqw); max-height: 60vh; overflow: auto; padding: 8px 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); z-index: 5; display: flex; flex-direction: column; gap: 8px; }\n.dt-mark { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 25%, transparent); color: inherit; border-radius: 2px; }\n[data-platform='darwin'] .dt-page .dt-head { padding-top: var(--dsh-frame-top-clearance, 0px); }\n.dt-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.dt-page .dt-tabs { overflow-x: auto; display: flex; gap: 20px; max-width: none; padding: 0; border-radius: 0; background: none; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-segmented { width: 100%; max-width: 420px; box-sizing: border-box; display: inline-grid; gap: 2px; padding: 3px; border-radius: 9px; background: var(--dsw-alias-interactive-bg-hover); }\n.dt-ticket-body .dt-form { position: relative; z-index: 1; }\n.dt-form.dt-block { padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; gap: 16px; }\n.dt-block-title { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.dt-section-title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-primary); }\n.dt-section-name { white-space: nowrap; }\n.dt-count { font-size: 14px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; font-weight: 400; } .dt-section-sub { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-hint { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-tertiary); }\n.dt-error { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-state-error-primary); }\n.dt-banner { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 20px; background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 10%, transparent); overflow-wrap: anywhere; }\n.dt-banner.dt-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: var(--dsw-alias-state-error-primary); }\n.dt-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-row { position: relative; min-width: 0; border-radius: 12px; padding: 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-start; }\n.dt-row.dt-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-row-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }\n.dt-disclosure-body .dt-row-main { flex-basis: 0; }\n.dt-row-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; }\n.dt-open { max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-open::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }\n.dt-open:focus-visible { outline: none; }\n.dt-open-wrap { white-space: normal; }\n.dt-open:focus-visible::after { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-caption); overflow-wrap: anywhere; }\n.dt-row-quote { font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n/* Transparent block borders preserve vertical spacing when line clamping clips padding. */\n.dt-banner:is(.dt-clamp, .dt-clamp-8) { padding-block: 0; border-block: 8px solid transparent; }\n.dt-banner-label { font-weight: 500; }\n.dt-banner .dt-md { display: inline; }\n.dt-banner .dt-md > p:first-child { display: inline; }\n.dt-row-buttons { position: relative; z-index: 1; gap: 8px; margin-top: 4px; }\n.dt-row-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; font-size: 13px; line-height: 20px; }\n.dt-dot { flex: none; margin-top: 5px; }\n.dt-inline-link { position: relative; z-index: 1; color: var(--dsw-alias-link); text-decoration: none; }\n.dt-inline-link:hover { text-decoration: underline; }\n.dt-textlink { padding: 0; border: 0; background: none; font: inherit; color: var(--dsw-alias-link); cursor: pointer; text-align: left; }\n.dt-textlink:hover { text-decoration: underline; }\n.dt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; }\n.dt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13px; line-height: 20px; }\n.dt-kv dt { color: var(--dsw-alias-label-tertiary); }\n.dt-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }\n@container (max-width: 640px) { .dt-kv dt { margin-top: 4px; } .dt-kv dt:first-of-type { margin-top: 0; } }\n.dt-timeline-day { position: sticky; top: 0; z-index: 1; padding: 6px 0 2px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); font-weight: 500; list-style: none; background: var(--dsw-alias-bg-base); }\n.dt-event-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }\n.dt-event-head .dt-event-time { margin-left: auto; flex: none; font-size: 12px; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-event-nums { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }\n.dt-event { padding: 12px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }\n.dt-event:last-child { border-bottom: 0; }\n.dt-event.dt-highlight { background: var(--dsw-alias-interactive-bg-hover); border-radius: 8px; padding-inline: 8px; margin-inline: -8px; }\n.dt-event-text { margin: 0; font-size: 13px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.dt-event-actor { font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-event-quiet .dt-event-text { color: var(--dsw-alias-label-tertiary); }\n.dt-flow { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-clamp-8 { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-more { align-self: flex-start; font-size: 12px; }\n.dt-reveal { opacity: 0; }\n.dt-event:hover .dt-reveal, .dt-reveal:focus-visible { opacity: 1; }\n@media (hover: none) {\n .dt-reveal { opacity: 1; }\n}\n.dt-event-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-filters .dt-search { margin-left: auto; }\n.dt-form { display: flex; flex-direction: column; gap: 24px; }\n.dt-fieldset { display: flex; flex-direction: column; gap: inherit; min-width: 0; margin: 0; padding: 0; border: 0; }\n.dt-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; min-width: 0; }\n.dt-field small { color: var(--dsw-alias-label-caption); font-size: 12px; }\n.dt-textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); resize: vertical; }\n.dt-select { box-sizing: border-box; width: 100%; min-width: 0; height: 32px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; padding: 0 28px 0 8px; text-overflow: ellipsis; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); }\n.dt-textarea:focus-visible, .dt-select:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-mono { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; overflow-wrap: anywhere; }\n.dt-detail { margin-top: 2px; color: var(--dsw-alias-label-secondary); }\n.dt-savebar .dt-error { white-space: pre-line; }\n.dt-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; font-size: 13px; }\n.dt-subhead-actions { display: inline-flex; align-items: center; gap: 4px; }\n.dt-btn-busy .dt-btn-icon svg { animation: dt-spin 1s linear infinite; }\n.dt-subhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-rules, .dt-changes { list-style: none; margin: 0; padding: 0; }\n.dt-field-head { display: inline-flex; align-items: center; gap: 4px; color: var(--dsw-alias-label-secondary); }\n.dt-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--dsw-alias-label-caption); cursor: help; }\n.dt-info:hover, .dt-info:focus-visible { color: var(--dsw-alias-label-secondary); }\n.dt-info:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; border-radius: 50%; }\n.dt-tooltip { position: fixed; z-index: 1100; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 3px 7px; border-radius: 8px; background: var(--dsw-alias-tooltip-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 13px; line-height: 20px; overflow-wrap: break-word; pointer-events: none; animation: dt-tooltip-in 150ms ease-in-out; }\n@keyframes dt-tooltip-in { from { opacity: 0; } }\n.dt-rules { border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule > :first-child { flex: 1; min-width: 0; }\n.dt-rule-preview { flex: 1; min-width: 0; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-rule-switch { margin-top: 2px; flex: none; }\n.dt-rule-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dsw-alias-label-caption); }\n.dt-rule-dot[data-enabled] { background: var(--dsw-alias-brand-primary); }\n.dt-rule-body { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 8px 28px; }\n.dt-model { display: flex; flex-direction: column; gap: 6px; }\n.dt-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }\n.dt-changes { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 20px; }\n.dt-changes li::before { content: '· '; color: var(--dsw-alias-label-caption); }\n.dt-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }\n.dt-modal.dt-glossary-modal { width: min(680px, 100%); }\n.dt-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-nav-item[aria-current='true'] { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-nav-item:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-changed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dsw-alias-brand-primary); flex: none; }\n.dt-add-skill { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-prompt-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }\n.dt-editor { min-height: 360px; }\n.dt-inline-select { width: auto; }\n.dt-preview-part { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-border-l3); }\n.dt-preview-head { font-size: 13px; line-height: 20px; display: flex; align-items: baseline; gap: 8px; }\ndiv.dt-preview-head { color: var(--dsw-alias-label-secondary); }\n.dt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; min-width: 0; }\n.dt-card-head { display: flex; align-items: center; gap: 12px; min-height: 28px; }\n.dt-card-head .dt-row-main { flex: 1 1 0; min-width: 64px; }\n.dt-card-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-row-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }\n.dt-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }\n.dt-rows-item { display: grid; grid-template-columns: repeat(var(--dt-columns), minmax(0, 1fr)) auto; gap: 8px; align-items: center; }\n.dt-filter-gap { flex: 1; }\n.dt-page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; width: 100%; }\n.dt-page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-page-head .dt-toolbar { flex: 0 1 auto; margin-left: auto; }\n.dt-page-head > .dt-btn { margin-left: -10px; }\n.dt-page-title { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; width: 100%; }\n.dt-page-title h2 { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 20px; line-height: 28px; font-weight: 500; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-status-line { margin-top: -16px; }\n.dt-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 20px; }\n.dt-plain-list > li { position: relative; padding-left: 12px; }\n.dt-plain-list > li::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 1px; background: currentColor; opacity: 0.45; }\n.dt-details { display: flex; flex-direction: column; gap: 2px; border-top: 0.5px solid var(--dsw-alias-border-l2); padding-top: 8px; }\n.dt-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-danger-zone .dt-btn { color: var(--dsw-alias-state-error-primary); }\n.dt-md { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }\n.dt-md p, .dt-md ul, .dt-md ol { margin: 0; }\n.dt-md ul, .dt-md ol { padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }\n.dt-md-heading { font-weight: 500; }\n.dt-code { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; padding: 0 4px; border-radius: 4px; background: var(--dsw-alias-bg-module-platform); }\n.dt-dot-wrap { display: inline-flex; flex: none; }\n.dt-search-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.dt-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }\n.dt-legend-title { margin: 16px 0 6px; font-size: 13px; color: var(--dsw-alias-label-tertiary); }\n.dt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }\n.dt-legend li { display: flex; align-items: center; gap: 6px; }\n.dt-legend .dt-dot { margin-top: 0; }\n.dt-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0; background: var(--dsw-alias-bg-base, var(--dsw-alias-bg-layer-1)); border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-savebar .dt-hint { margin-right: auto; }\n.dt-card > .dt-savebar, .dt-block > .dt-savebar { margin: 0 -16px -16px; padding: 12px 16px; border-radius: 0 0 16px 16px; }\n.dt-glossary { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }\n.dt-glossary th, .dt-glossary td { text-align: left; padding: 6px 8px; border-bottom: 0.5px solid var(--dsw-alias-border-l2); vertical-align: top; }\n.dt-glossary th { color: var(--dsw-alias-label-tertiary); font-weight: 400; }\n.dt-glossary th.dt-glossary-group { color: var(--dsw-alias-label-secondary); font-weight: 600; padding-top: 14px; }\n.dt-glossary th:nth-child(-n+2), .dt-glossary td:nth-child(-n+2) { white-space: nowrap; }\n.dt-values { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 13px; }\n.dt-values dt { color: var(--dsw-alias-label-tertiary); }\n.dt-values dd { margin: 0; }\n.dt-pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--dsw-alias-bg-module-platform); font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }\n.dt-pre ins { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, green) 18%, transparent); text-decoration: none; }\n.dt-pre del { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent); text-decoration: none; }\n.dt-prompt { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }\n.dt-prompt-nav { display: flex; flex-direction: column; gap: 2px; }\n.dt-prompt-nav button { justify-content: flex-start; }\n.dt-disclosure-body { padding: 8px 0 8px 28px; display: flex; flex-direction: column; gap: 8px; }\n@container (max-width: 640px) {\n .dt-tab { padding: 0 8px; font-size: 13px; }\n .dt-segment { padding: 0 10px; }\n .dt-head { align-items: center; }\n .dt-search-results { right: auto; left: 0; width: 100%; }\n .dt-page-title h2 { font-size: 17px; line-height: 24px; }\n .dt-status-line { margin-top: -12px; }\n .dt-page .dt-tabs { display: flex; flex-wrap: nowrap; scrollbar-width: thin; }\n .dt-page .dt-tab { flex: none; }\n .dt-page .dt-tabs[data-more='end'] { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }\n .dt-page .dt-tabs[data-more='start'] { mask-image: linear-gradient(to right, transparent, #000 40px); }\n .dt-page .dt-tabs[data-more='both'] { mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }\n .dt-kv { grid-template-columns: 1fr; gap: 6px; }\n .dt-grid3, .dt-prompt { grid-template-columns: 1fr; }\n .dt-search { width: 100%; }\n .dt-filters .dt-search { margin-left: 0; }\n}\n/* Local UI primitive styles (see controls.tsx). */\n.dt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: none; border-radius: 18px; cursor: pointer; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: transparent; padding: 0 14px; white-space: nowrap; }\n.dt-btn:disabled { cursor: not-allowed; opacity: 0.4; }\n.dt-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-btn-md { height: 36px; }\n.dt-btn-sm { height: 28px; font-size: 12px; line-height: 18px; padding: 0 10px; border-radius: 14px; }\n/* 主按钮:深色下 label-primary-foreground(深色)压绿底只有 4.09 —— 深色主题里前景该是浅的。 */\n/* 往白色混 70%:浅色下仍是浅字(4.5+),深色下变浅(>4.5),两边都过。 */\n.dt-btn-primary { background: var(--dsw-alias-button-primary-fill); color: var(--dsw-static-neutral-bluish-00); }\n.dt-btn-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); }\n.dt-btn-ghost { background: transparent; border: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-label-secondary); }\n.dt-btn-ghost:hover:not(:disabled), .dt-btn-outline:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-btn-ghost:active:not(:disabled) { background: var(--dsw-alias-interactive-bg-active); }\n.dt-btn-outline { border: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-btn-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; }\n.dt-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 11px; line-height: 17px; font-weight: 500; white-space: nowrap; }\n.dt-tag[data-tone='outline'] { border: 0.5px solid var(--dsw-alias-border-l4); color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='neutral'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); }\n.dt-tag[data-tone='quiet'] { color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='success'] { background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-success-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='info'] { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent); color: var(--dsw-alias-state-business-primary); }\n/* 胶囊是「暂停/退避/判断」唯一的状态色:文字与 12% 同色底叠起来,浅色下警告只有 4.17。 */\n/* 往 label-primary 混 28%:浅色变深、深色变浅,两档都留出余量。 */\n.dt-tag[data-tone='warning'] { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='danger'] { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 76%, var(--dsw-alias-label-primary)); }\n.dt-pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: none; border-radius: 12px; font: inherit; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-bg-layer-2); cursor: pointer; }\n.dt-pill:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-pill-active, .dt-pill-active:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-button-ghost-active-fill); box-shadow: inset 0 0 0 1px var(--dsw-alias-button-ghost-active-border); }\n.dt-tabs { display: grid; padding: 4px; border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-tab { box-sizing: border-box; height: 34px; padding: 0 12px; border: 0.5px solid transparent; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: color 180ms ease, background 180ms ease; }\n.dt-tab:hover { color: var(--dsw-alias-label-primary); }\n.dt-tab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 600; background: var(--dsw-alias-bg-layer-3); border-color: var(--dsw-alias-border-l3); }\n.dt-tab:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }\n.dt-segment { height: 28px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 120ms ease, background 160ms ease; }\n.dt-segment:hover:not(:disabled), .dt-segment[aria-selected='true'] { color: var(--dsw-alias-label-primary); }\n.dt-segment[aria-selected='true'] { background: var(--dsw-alias-bg-layer-1); box-shadow: var(--dsw-elevation-soft); }\n.dt-segment:disabled { cursor: default; opacity: 0.4; }\n.dt-segment:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-input { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 0; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); }\n.dt-input:focus-within { border-color: var(--dsw-alias-brand-primary); }\n.dt-input-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--dsw-alias-label-tertiary); }\n.dt-input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); }\n.dt-input input/* 占位符:label-dimmed 在浅色下只有 2.17(深色 3.81),必须能读出来才叫占位符。 */\n/* 往 label-tertiary 混 60%:浅色变深、深色变浅,两档都过 4.5。 */\n::placeholder { color: color-mix(in srgb, var(--dsw-alias-label-dimmed) 40%, var(--dsw-alias-label-tertiary)); }\n.dt-input input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }\n.dt-field .dt-input, .dt-search .dt-input, .dt-add-skill .dt-input { display: flex; width: 100%; }\n.dt-switch { box-sizing: border-box; flex: 0 0 auto; width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 10px; background: var(--dsw-alias-border-l3); cursor: pointer; }\n.dt-switch[aria-checked='true'] { background: var(--dsw-alias-brand-primary); }\n.dt-switch:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-switch-thumb { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--dsw-alias-label-primary-foreground); transition: transform 120ms ease; }\n.dt-switch[aria-checked='true'] .dt-switch-thumb { transform: translateX(16px); }\n.dt-state-dot { position: relative; display: inline-block; flex: none; width: 10px; height: 10px; color: var(--dsw-alias-state-idle-primary); }\n.dt-state-dot::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; background: currentColor; }\n.dt-state-dot[data-state='done'] { color: var(--dsw-alias-state-success-primary); }\n.dt-state-dot[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-state-dot[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-spinner { flex: none; color: var(--dsw-alias-label-tertiary); }\n.dt-spinner g { transform-origin: center; animation: dt-spin 1.5s linear infinite; }\n.dt-spinner circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }\n.dt-spinner circle:first-child { opacity: 0.25; }\n.dt-spinner circle:last-child { stroke-dasharray: 18 150; }\n@keyframes dt-spin { to { transform: rotate(360deg); } }\n.dt-disclosure-row { display: flex; align-items: center; gap: 4px; min-height: 28px; min-width: 0; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-disclosure-row:hover { color: var(--dsw-alias-label-primary); }\n.dt-disclosure-row:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-disclosure-lead { position: relative; display: inline-flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; }\n.dt-disclosure-icon { display: inline-flex; align-items: center; justify-content: center; }\n.dt-disclosure-chevron { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }\n.dt-disclosure-row:hover .dt-disclosure-icon, .dt-disclosure[data-open] .dt-disclosure-icon { visibility: hidden; }\n.dt-disclosure-row:hover .dt-disclosure-chevron, .dt-disclosure[data-open] .dt-disclosure-chevron { display: inline-flex; }\n.dt-disclosure-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-modal-root { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: max(24px, var(--dsh-frame-top-clearance, 24px)) 24px; }\n.dt-modal-mask { position: absolute; inset: 0; background: var(--dsw-alias-bg-mask-1); backdrop-filter: var(--dsw-mask-blur); }\n.dt-modal { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; width: min(380px, 100%); max-height: 100%; padding: 0 0 24px; overflow: hidden; border-radius: 24px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); color: var(--dsw-alias-label-primary); outline: none; }\n.dt-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 14px 0 24px; }\n.dt-modal-header h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; cursor: pointer; color: var(--dsw-alias-label-secondary); }\n.dt-modal-close:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-modal-description { margin: -8px 0 0; padding: 0 24px; font-size: 14px; line-height: 22px; }\n.dt-modal-body { min-width: 0; min-height: 0; overflow: auto; padding: 0 24px; }\n.dt-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 24px; }\n.dt-toast { position: fixed; top: 40px; left: 50%; z-index: 1100; pointer-events: none; width: max-content; max-width: min(640px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 14px; background: var(--dsw-alias-toast-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 14px; line-height: 22px; box-shadow: var(--dsw-shadow-lv3); transform: translateX(-50%); animation: dt-toast-in 160ms ease-out, dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n@keyframes dt-toast-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }\n@keyframes dt-toast-fade { to { opacity: 0; visibility: hidden; } }\n@media (prefers-reduced-motion: reduce) {\n .dt-tab, .dt-segment, .dt-switch-thumb, .dt-spinner g, .dt-btn-busy .dt-btn-icon svg, .dt-tooltip { transition: none; animation: none; }\n .dt-toast { animation: dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n}\n.dt-page .dt-tab { height: 34px; padding: 0 2px; border: 0; border-radius: 0; color: var(--dsw-alias-label-tertiary); font-size: 14px; }\n.dt-page .dt-tab[aria-selected='true'] { background: none; color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-status-head { display: flex; align-items: center; gap: 8px; }\n.dt-status-title { margin: 0; flex: 1; display: flex; align-items: center; gap: 4px; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-status-text { margin-left: auto; flex: none; font-size: 12px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-status-line .dt-status-text { margin-left: 0; }\n.dt-status-text[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-status-text[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n.dt-lv { white-space: nowrap; }\n.dt-lv-label { color: var(--dsw-alias-label-caption); }\n.dt-lv-value { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-chip { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 6px; overflow: hidden; font-size: 11px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.dt-chip-source { padding: 0 6px; color: var(--dsw-alias-label-tertiary); background: var(--dsw-alias-bg-module-platform); }\n.dt-chip-fact { padding: 0 6px; border-left: 0.5px solid var(--dsw-alias-border-l3); white-space: nowrap; }\n.dt-chip-label { margin-right: 4px; color: var(--dsw-alias-label-caption); }\n.dt-chip-link { position: relative; z-index: 1; text-decoration: none; cursor: pointer; transition: border-color 120ms ease; }\n.dt-chip-link:hover { border-color: var(--dsw-alias-brand-primary); }\n.dt-chip-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-chip-open { display: inline-flex; align-items: center; padding: 0 5px; border-left: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-brand-primary); }\n.dt-chip-problem, .dt-chip-problem .dt-chip-label { color: var(--dsw-alias-state-error-primary); }\n.dt-cards { gap: 8px; }\n.dt-att .dt-inline-link { font-size: 13px; font-weight: 500; }\n.dt-list > .dt-att { margin: 2px 8px; }\n.dt-att { padding: 10px 12px 10px 16px; border: 0; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-att::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-att-error::before { background: var(--dsw-alias-state-error-primary); }\n.dt-att-what { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-att-error .dt-att-what, .dt-att-error .dt-att-what .dt-open { color: var(--dsw-alias-state-error-primary); }\n.dt-stats { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 10px 14px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-stat { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 可点的统计数字:去掉原生按钮外观,保留文字排版;选中时用浅底提示 */\n.dt-stat-btn { border: 0; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 8px; font: inherit; color: inherit; cursor: pointer; }\n.dt-stat-btn:hover { background: var(--dsw-alias-interactive-bg-hover); }\n/* 浅色下 interactive-bg-hover 与白底只差 1.03:点了统计数字在按筛选,零视觉反馈。 */\n/* 换成品牌色 12% 底 + 0.5px 品牌色描边(两个主题都分得开)。 */\n.dt-stat-btn[aria-pressed='true'] { background: color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent); box-shadow: inset 0 0 0 0.5px var(--dsw-alias-brand-primary); }\n.dt-stat-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n/* 统计条单位:按钮上的 color:inherit 会把单位染成数字色,所以单位单独一档。 */\n/* 浅色下 caption(#818b98)在白底只有 3.14–3.45,深色下同一档 4.34–5.07。 */\n/* 往 label-primary 混 30%:浅色变深、深色变浅,两个主题的对比度同时变好(不用新 token)。 */\n/* 注意选择器**不带** .dt-stat-btn 前缀 —— 带前缀就只作用于可点的格子,不可点的仍是旧色(真机踩过)。 */\n.dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 70%, var(--dsw-alias-label-primary)); }\n/* 选中的统计格:品牌色 12% 底会把单位压到 4.20,再往主色多混 10% 拉回来。 */\n.dt-stat-btn[aria-pressed='true'] .dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 58%, var(--dsw-alias-label-primary)); }\n.dt-stat-value { font-size: 14px; font-weight: 500; color: var(--dsw-alias-label-primary); font-variant-numeric: tabular-nums; }\n.dt-more-link { font-size: 12px; font-weight: 400; }\n.dt-settings { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; }\n.dt-settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-settings-link { padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-settings-link:hover { color: var(--dsw-alias-label-primary); }\n.dt-settings-link[aria-current='page'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 10px; }\n.dt-settings-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; background: var(--dsw-alias-bg-layer-1); }\n.dt-settings-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-settings-body .dt-section-title { font-size: 15px; line-height: 22px; }\n.dt-subtabs { display: flex; gap: 16px; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-subtab { padding: 0 0 6px; border: 0; background: none; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 13px; cursor: pointer; }\n.dt-subtab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-part { display: flex; flex-direction: column; gap: 12px; }\n.dt-rows-summary { text-align: left; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }\n.dt-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 18px; }\n.dt-table th { text-align: left; font-weight: 400; color: var(--dsw-alias-label-caption); padding: 2px 8px 2px 0; }\n.dt-table td { padding: 4px 8px 4px 0; border-top: 0.5px solid var(--dsw-alias-border-l3); vertical-align: top; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n@container (max-width: 640px) {\n .dt-settings { grid-template-columns: 1fr; gap: 12px; }\n .dt-settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }\n .dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 0; }\n .dt-page .dt-tabs { gap: 14px; }\n}\n.dt-list > .dt-ticket { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 0; padding: 12px 8px 12px 18px; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-list > .dt-ticket[data-state]::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-list > .dt-ticket[data-state='error']::before { background: var(--dsw-alias-state-error-primary); }\n.dt-ticket-stage { align-self: stretch; padding-top: 1px; border-right: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-ticket-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-ticket-body .dt-row-title .dt-open { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-ticket-meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }\n.dt-ticket-meta .dt-chip { flex: none; }\n.dt-ticket-meta .dt-ticket-actions { margin-top: 0; margin-left: auto; min-height: 0; flex-wrap: nowrap; }\n@container (max-width: 640px) { .dt-ticket-meta { flex-wrap: wrap; white-space: normal; } .dt-ticket-meta .dt-ticket-actions { flex-wrap: wrap; } }\n.dt-ticket-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--dsw-alias-label-primary); }\n.dt-ticket-note-error { color: var(--dsw-alias-state-error-primary); }\n.dt-ticket-note-pause { font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-ticket-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; margin-top: 2px; }\n/* Pass pointer events through action containers to the row link, keeping only child controls interactive. */\n.dt-ticket-actions, .dt-row-buttons, .dt-row-actions { pointer-events: none; }\n.dt-ticket-actions > *, .dt-row-buttons > *, .dt-row-actions > * { pointer-events: auto; }\n.dt-line { min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.dt-row-meta.dt-line { flex-wrap: nowrap; }\n.dt-line-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-secondary); }\n.dt-error-text { color: var(--dsw-alias-state-error-primary); }\n.dt-stage { display: inline-flex; align-items: flex-start; gap: 5px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-stage svg { flex: none; margin-top: 2px; }\n.dt-stage[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-stage[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-stage[data-state='ongoing'] { color: var(--dsw-alias-state-business-primary); }\n.dt-icon-link { display: inline-flex; align-items: center; gap: 4px; }\na.dt-btn, a.dt-btn:hover { text-decoration: none; }\n.dt-section-icon { display: inline-flex; align-self: center; color: var(--dsw-alias-label-tertiary); }\n.dt-trigger-link { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: -4px 0 -4px -8px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }\n.dt-trigger-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-trigger-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-trigger-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-kv-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-banner-actions { margin-top: 6px; }\n@container (max-width: 640px) {\n .dt-list > .dt-ticket { grid-template-columns: 1fr; row-gap: 4px; }\n .dt-ticket-stage { border-right: 0; }\n}\n.dt-nav-group { margin: 10px 10px 2px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-nav-group:first-child { margin-top: 0; }\n.dt-prompt-nav .dt-nav-item { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }\n.dt-nav-item > span { display: inline-flex; align-items: center; gap: 6px; }\n.dt-nav-item small { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-preview-part[data-editable] { border-left-color: var(--dsw-alias-brand-primary); }\n.dt-preview-head b { font-weight: 500; }\n.dt-preview-head > span { font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-changed-tag { margin-left: 6px; padding: 0 5px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-updated-tag { border-color: var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-primary); }\n.dt-default-updated { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-state-warn-primary); }\n.dt-diff-fold { color: var(--dsw-alias-label-caption); font-style: italic; }\n.dt-compare { margin-left: auto; }\n.dt-admission th { white-space: nowrap; }\n.dt-admission thead tr:first-child th:not(:first-child) { color: var(--dsw-alias-label-secondary); font-weight: 500; }\n.dt-admission td { vertical-align: middle; }\n.dt-admission-scope { color: var(--dsw-alias-label-primary); font-size: 13px; }\n.dt-admission-scope small { display: block; font-size: 11px; color: var(--dsw-alias-label-caption); }\n.dt-admission-na { color: var(--dsw-alias-label-caption); }\n.dt-admission-cell { display: flex; align-items: center; gap: 4px; }\n.dt-admission-cell .dt-select { flex: 1; min-width: 0; }\n.dt-admission-slot { display: inline-flex; flex: none; width: 16px; }\n.dt-info-warn { color: var(--dsw-alias-state-warn-primary); }\n.dt-field-segmented { max-width: 240px; }\n/* 活跃时段:两个原生 time 选择器 + 全天按钮 */\n/* 表单控件不必满宽:短数字撑到 900px 只会显得空 */\n.dt-form > .dt-field > .dt-input { max-width: 480px; }\n.dt-error-card { border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 35%, var(--dsw-alias-border-l3)); }\n.dt-error-card .dt-card-title { color: var(--dsw-alias-state-error-primary); }\n/* 空态引导:圆形步骤号 + 标题 + 说明,替代「① + 列表符号」的重复 */\n.dt-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: none; }\n.dt-step { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }\n.dt-step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }\n.dt-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-step-title { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--dsw-alias-label-primary); }\n.dt-empty { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; }\n.dt-step-detail { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-time { box-sizing: border-box; height: 32px; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-label-primary); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }\n.dt-time:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-hours-sep { color: var(--dsw-alias-label-tertiary); }\n.dt-hours-hint { font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 分诊信号表(设置 → 诊断):左列「名字 + 两个标签」成组,右列 `+N 分` 定宽贴右、数字等宽。只挂局部类,全局 .dt-row-title 一行没动 —— 别的列表还在用它。 */\n.dt-signal-title { display: grid; grid-template-columns: minmax(0, 1fr) 4.5em; align-items: baseline; column-gap: 12px; }\n.dt-signal-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }\n.dt-signal-meta { display: block; justify-self: stretch; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }\n/* 同一个维度(默认开/关)的两档要等权:`默认关` 原本是 49×19 的裸字,`默认开` 是 51×21 的描边胶囊。 */\n.dt-signal-lead .dt-tag[data-tone='quiet'] { border: 0.5px solid var(--dsw-alias-border-l4); }\n";
456
+ const PORTED_CSS = "/* Panel layout and local UI controls styled with DSH `--dsw-alias-*` design tokens; one rule per line. */\n.dt-page { box-sizing: border-box; height: 100%; overflow: auto; scrollbar-gutter: stable; scroll-padding: 48px 0 72px; container-type: inline-size; padding: 28px clamp(24px, 4vw, 48px) 0; color: var(--dsw-alias-label-primary); }\n/* Deployment page rendered inside DSH Plugin Manager, which owns scrolling and padding. */\n.dt-embedded { container-type: inline-size; color: var(--dsw-alias-label-primary); }\n/* Disable sticky positioning inside DSH Plugin Manager, where the host container owns scrolling and bottom padding. */\n.dt-embedded .dt-savebar { position: static; }\n.dt-page > * + * { margin-top: 16px; }\n.dt-page > .dt-column { max-width: 960px; margin: 0 auto; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }\n.dt-head { position: relative; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }\n.dt-search { position: relative; width: 240px; max-width: 100%; }\n.dt-search-results { position: absolute; top: calc(100% + 6px); right: 0; width: min(560px, 90cqw); max-height: 60vh; overflow: auto; padding: 8px 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); z-index: 5; display: flex; flex-direction: column; gap: 8px; }\n.dt-mark { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 25%, transparent); color: inherit; border-radius: 2px; }\n[data-platform='darwin'] .dt-page .dt-head { padding-top: var(--dsh-frame-top-clearance, 0px); }\n.dt-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }\n.dt-page .dt-tabs { overflow-x: auto; display: flex; gap: 20px; max-width: none; padding: 0; border-radius: 0; background: none; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-segmented { width: 100%; max-width: 420px; box-sizing: border-box; display: inline-grid; gap: 2px; padding: 3px; border-radius: 9px; background: var(--dsw-alias-interactive-bg-hover); }\n.dt-ticket-body .dt-form { position: relative; z-index: 1; }\n.dt-form.dt-block { padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; gap: 16px; }\n.dt-block-title { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; }\n.dt-section-title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--dsw-alias-label-primary); }\n.dt-section-name { white-space: nowrap; }\n.dt-count { font-size: 14px; color: var(--dsw-alias-label-caption); font-variant-numeric: tabular-nums; font-weight: 400; } .dt-section-sub { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-hint { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-tertiary); }\n.dt-error { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-state-error-primary); }\n.dt-banner { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 20px; background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 10%, transparent); overflow-wrap: anywhere; }\n.dt-banner.dt-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: var(--dsw-alias-state-error-primary); }\n.dt-list { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-row { position: relative; min-width: 0; border-radius: 12px; padding: 10px 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-start; }\n.dt-row.dt-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-row-main { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }\n.dt-disclosure-body .dt-row-main { flex-basis: 0; }\n.dt-row-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 20px; font-weight: 500; }\n.dt-open { max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; line-height: 20px; font-weight: 500; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-open::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }\n.dt-open:focus-visible { outline: none; }\n.dt-open-wrap { white-space: normal; }\n.dt-open:focus-visible::after { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-caption); overflow-wrap: anywhere; }\n.dt-row-quote { font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n/* Transparent block borders preserve vertical spacing when line clamping clips padding. */\n.dt-banner:is(.dt-clamp, .dt-clamp-8) { padding-block: 0; border-block: 8px solid transparent; }\n.dt-banner-label { font-weight: 500; }\n.dt-banner .dt-md { display: inline; }\n.dt-banner .dt-md > p:first-child { display: inline; }\n.dt-row-buttons { position: relative; z-index: 1; gap: 8px; margin-top: 4px; }\n.dt-row-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; font-size: 13px; line-height: 20px; }\n.dt-dot { flex: none; margin-top: 5px; }\n.dt-inline-link { position: relative; z-index: 1; color: var(--dsw-alias-link); text-decoration: none; }\n.dt-inline-link:hover { text-decoration: underline; }\n.dt-textlink { padding: 0; border: 0; background: none; font: inherit; color: var(--dsw-alias-link); cursor: pointer; text-align: left; }\n.dt-textlink:hover { text-decoration: underline; }\n.dt-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; }\n.dt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13px; line-height: 20px; }\n.dt-kv dt { color: var(--dsw-alias-label-tertiary); }\n.dt-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }\n@container (max-width: 640px) { .dt-kv dt { margin-top: 4px; } .dt-kv dt:first-of-type { margin-top: 0; } }\n.dt-timeline-day { position: sticky; top: 0; z-index: 1; padding: 6px 0 2px; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); font-weight: 500; list-style: none; background: var(--dsw-alias-bg-base); }\n.dt-event-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }\n.dt-event-head .dt-event-time { margin-left: auto; flex: none; font-size: 12px; color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-event-nums { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }\n.dt-event { padding: 12px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }\n.dt-event:last-child { border-bottom: 0; }\n.dt-event.dt-highlight { background: var(--dsw-alias-interactive-bg-hover); border-radius: 8px; padding-inline: 8px; margin-inline: -8px; }\n.dt-event-text { margin: 0; font-size: 13px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.dt-event-actor { font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-event-quiet .dt-event-text { color: var(--dsw-alias-label-tertiary); }\n.dt-flow { margin: 0; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-clamp-8 { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-more { align-self: flex-start; font-size: 12px; }\n.dt-reveal { opacity: 0; }\n.dt-event:hover .dt-reveal, .dt-reveal:focus-visible { opacity: 1; }\n@media (hover: none) {\n .dt-reveal { opacity: 1; }\n}\n.dt-event-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-filters .dt-search { margin-left: auto; }\n.dt-form { display: flex; flex-direction: column; gap: 24px; }\n.dt-fieldset { display: flex; flex-direction: column; gap: inherit; min-width: 0; margin: 0; padding: 0; border: 0; }\n.dt-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; min-width: 0; }\n.dt-field small { color: var(--dsw-alias-label-caption); font-size: 12px; }\n.dt-textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); resize: vertical; }\n.dt-select { box-sizing: border-box; width: 100%; min-width: 0; height: 32px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; padding: 0 28px 0 8px; text-overflow: ellipsis; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: var(--dsw-alias-bg-layer-1, transparent); }\n.dt-textarea:focus-visible, .dt-select:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-mono { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; overflow-wrap: anywhere; }\n.dt-detail { margin-top: 2px; color: var(--dsw-alias-label-secondary); }\n.dt-savebar .dt-error { white-space: pre-line; }\n.dt-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; font-size: 13px; }\n.dt-subhead-actions { display: inline-flex; align-items: center; gap: 4px; }\n.dt-btn-busy .dt-btn-icon svg { animation: dt-spin 1s linear infinite; }\n.dt-subhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-rules, .dt-changes { list-style: none; margin: 0; padding: 0; }\n.dt-field-head { display: inline-flex; align-items: center; gap: 4px; color: var(--dsw-alias-label-secondary); }\n.dt-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; border: 0; background: none; color: var(--dsw-alias-label-caption); cursor: help; }\n.dt-info:hover, .dt-info:focus-visible { color: var(--dsw-alias-label-secondary); }\n.dt-info:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; border-radius: 50%; }\n.dt-tooltip { position: fixed; z-index: 1100; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 3px 7px; border-radius: 8px; background: var(--dsw-alias-tooltip-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 13px; line-height: 20px; overflow-wrap: break-word; pointer-events: none; animation: dt-tooltip-in 150ms ease-in-out; }\n@keyframes dt-tooltip-in { from { opacity: 0; } }\n.dt-rules { border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-rule > :first-child { flex: 1; min-width: 0; }\n.dt-rule-preview { flex: 1; min-width: 0; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-rule-switch { margin-top: 2px; flex: none; }\n.dt-rule-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dsw-alias-label-caption); }\n.dt-rule-dot[data-enabled] { background: var(--dsw-alias-brand-primary); }\n.dt-rule-body { display: flex; flex-direction: column; gap: 12px; padding: 8px 0 8px 28px; }\n.dt-model { display: flex; flex-direction: column; gap: 6px; }\n.dt-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }\n.dt-changes { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 20px; }\n.dt-changes li::before { content: '· '; color: var(--dsw-alias-label-caption); }\n.dt-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }\n.dt-modal.dt-glossary-modal { width: min(680px, 100%); }\n.dt-nav-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-nav-item[aria-current='true'] { background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-nav-item:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-changed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dsw-alias-brand-primary); flex: none; }\n.dt-add-skill { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-prompt-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }\n.dt-editor { min-height: 360px; }\n.dt-inline-select { width: auto; }\n.dt-preview-part { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-border-l3); }\n.dt-preview-head { font-size: 13px; line-height: 20px; display: flex; align-items: baseline; gap: 8px; }\ndiv.dt-preview-head { color: var(--dsw-alias-label-secondary); }\n.dt-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; min-width: 0; }\n.dt-card-head { display: flex; align-items: center; gap: 12px; min-height: 28px; }\n.dt-card-head .dt-row-main { flex: 1 1 0; min-width: 64px; }\n.dt-card-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-row-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }\n.dt-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }\n.dt-rows-item { display: grid; grid-template-columns: repeat(var(--dt-columns), minmax(0, 1fr)) auto; gap: 8px; align-items: center; }\n.dt-filter-gap { flex: 1; }\n.dt-page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; width: 100%; }\n.dt-page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-page-head .dt-toolbar { flex: 0 1 auto; margin-left: auto; }\n.dt-page-head > .dt-btn { margin-left: -10px; }\n.dt-page-title { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; width: 100%; }\n.dt-page-title h2 { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 20px; line-height: 28px; font-weight: 500; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-status-line { margin-top: -16px; }\n.dt-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 20px; }\n.dt-plain-list > li { position: relative; padding-left: 12px; }\n.dt-plain-list > li::before { content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 1px; background: currentColor; opacity: 0.45; }\n.dt-details { display: flex; flex-direction: column; gap: 2px; border-top: 0.5px solid var(--dsw-alias-border-l2); padding-top: 8px; }\n.dt-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-danger-zone .dt-btn { color: var(--dsw-alias-state-error-primary); }\n.dt-md { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }\n.dt-md p, .dt-md ul, .dt-md ol { margin: 0; }\n.dt-md ul, .dt-md ol { padding-left: 20px; display: flex; flex-direction: column; gap: 2px; }\n.dt-md-heading { font-weight: 500; }\n.dt-code { font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; padding: 0 4px; border-radius: 4px; background: var(--dsw-alias-bg-module-platform); }\n.dt-dot-wrap { display: inline-flex; flex: none; }\n.dt-search-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }\n.dt-ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }\n.dt-legend-title { margin: 16px 0 6px; font-size: 13px; color: var(--dsw-alias-label-tertiary); }\n.dt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }\n.dt-legend li { display: flex; align-items: center; gap: 6px; }\n.dt-legend .dt-dot { margin-top: 0; }\n.dt-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0; background: var(--dsw-alias-bg-base, var(--dsw-alias-bg-layer-1)); border-top: 0.5px solid var(--dsw-alias-border-l2); }\n.dt-savebar .dt-hint { margin-right: auto; }\n.dt-card > .dt-savebar, .dt-block > .dt-savebar { margin: 0 -16px -16px; padding: 12px 16px; border-radius: 0 0 16px 16px; }\n.dt-glossary { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }\n.dt-glossary th, .dt-glossary td { text-align: left; padding: 6px 8px; border-bottom: 0.5px solid var(--dsw-alias-border-l2); vertical-align: top; }\n.dt-glossary th { color: var(--dsw-alias-label-tertiary); font-weight: 400; }\n.dt-glossary th.dt-glossary-group { color: var(--dsw-alias-label-secondary); font-weight: 600; padding-top: 14px; }\n.dt-glossary th:nth-child(-n+2), .dt-glossary td:nth-child(-n+2) { white-space: nowrap; }\n.dt-values { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 13px; }\n.dt-values dt { color: var(--dsw-alias-label-tertiary); }\n.dt-values dd { margin: 0; }\n.dt-pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--dsw-alias-bg-module-platform); font-family: var(--ds-font-family-code, Menlo, monospace); font-size: 12px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 480px; overflow: auto; }\n.dt-pre ins { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, green) 18%, transparent); text-decoration: none; }\n.dt-pre del { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent); text-decoration: none; }\n.dt-prompt { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }\n.dt-prompt-nav { display: flex; flex-direction: column; gap: 2px; }\n.dt-prompt-nav button { justify-content: flex-start; }\n.dt-disclosure-body { padding: 8px 0 8px 28px; display: flex; flex-direction: column; gap: 8px; }\n@container (max-width: 640px) {\n .dt-tab { padding: 0 8px; font-size: 13px; }\n .dt-segment { padding: 0 10px; }\n .dt-head { align-items: center; }\n .dt-search-results { right: auto; left: 0; width: 100%; }\n .dt-page-title h2 { font-size: 17px; line-height: 24px; }\n .dt-status-line { margin-top: -12px; }\n .dt-page .dt-tabs { display: flex; flex-wrap: nowrap; scrollbar-width: thin; }\n .dt-page .dt-tab { flex: none; }\n .dt-page .dt-tabs[data-more='end'] { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }\n .dt-page .dt-tabs[data-more='start'] { mask-image: linear-gradient(to right, transparent, #000 40px); }\n .dt-page .dt-tabs[data-more='both'] { mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }\n .dt-kv { grid-template-columns: 1fr; gap: 6px; }\n .dt-grid3, .dt-prompt { grid-template-columns: 1fr; }\n .dt-search { width: 100%; }\n .dt-filters .dt-search { margin-left: 0; }\n}\n/* Local UI primitive styles (see controls.tsx). */\n.dt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: none; border-radius: 18px; cursor: pointer; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); background: transparent; padding: 0 14px; white-space: nowrap; }\n.dt-btn:disabled { cursor: not-allowed; opacity: 0.4; }\n.dt-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-btn-md { height: 36px; }\n.dt-btn-sm { height: 28px; font-size: 12px; line-height: 18px; padding: 0 10px; border-radius: 14px; }\n/* 主按钮:深色下 label-primary-foreground(深色)压绿底只有 4.09 —— 深色主题里前景该是浅的。 */\n/* 往白色混 70%:浅色下仍是浅字(4.5+),深色下变浅(>4.5),两边都过。 */\n.dt-btn-primary { background: var(--dsw-alias-button-primary-fill); color: var(--dsw-static-neutral-bluish-00); }\n.dt-btn-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); }\n.dt-btn-ghost { background: transparent; border: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-label-secondary); }\n.dt-btn-ghost:hover:not(:disabled), .dt-btn-outline:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-btn-ghost:active:not(:disabled) { background: var(--dsw-alias-interactive-bg-active); }\n.dt-btn-outline { border: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-btn-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; }\n.dt-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 1px 8px; font-size: 11px; line-height: 17px; font-weight: 500; white-space: nowrap; }\n.dt-tag[data-tone='outline'] { border: 0.5px solid var(--dsw-alias-border-l4); color: var(--dsw-alias-label-tertiary); }\n.dt-tag[data-tone='neutral'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); }\n.dt-tag[data-tone='quiet'] { color: var(--dsw-alias-label-secondary); }\n.dt-tag[data-tone='success'] { background: color-mix(in srgb, var(--dsw-alias-state-success-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-success-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='info'] { background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent); color: var(--dsw-alias-state-business-primary); }\n/* 胶囊是「暂停/退避/判断」唯一的状态色:文字与 12% 同色底叠起来,浅色下警告只有 4.17。 */\n/* 往 label-primary 混 28%:浅色变深、深色变浅,两档都留出余量。 */\n.dt-tag[data-tone='warning'] { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 72%, var(--dsw-alias-label-primary)); }\n.dt-tag[data-tone='danger'] { background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent); color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 76%, var(--dsw-alias-label-primary)); }\n.dt-pill { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border: none; border-radius: 12px; font: inherit; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary); background: var(--dsw-alias-bg-layer-2); cursor: pointer; }\n.dt-pill:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-pill-active, .dt-pill-active:hover { color: var(--dsw-alias-label-primary); background: var(--dsw-alias-button-ghost-active-fill); box-shadow: inset 0 0 0 1px var(--dsw-alias-button-ghost-active-border); }\n.dt-tabs { display: grid; padding: 4px; border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-tab { box-sizing: border-box; height: 34px; padding: 0 12px; border: 0.5px solid transparent; border-radius: 8px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: color 180ms ease, background 180ms ease; }\n.dt-tab:hover { color: var(--dsw-alias-label-primary); }\n.dt-tab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 600; background: var(--dsw-alias-bg-layer-3); border-color: var(--dsw-alias-border-l3); }\n.dt-tab:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }\n.dt-segment { height: 28px; padding: 0 16px; border: 0; border-radius: 7px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: color 120ms ease, background 160ms ease; }\n.dt-segment:hover:not(:disabled), .dt-segment[aria-selected='true'] { color: var(--dsw-alias-label-primary); }\n.dt-segment[aria-selected='true'] { background: var(--dsw-alias-bg-layer-1); box-shadow: var(--dsw-elevation-soft); }\n.dt-segment:disabled { cursor: default; opacity: 0.4; }\n.dt-segment:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }\n.dt-input { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 0; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); }\n.dt-input:focus-within { border-color: var(--dsw-alias-brand-primary); }\n.dt-input-icon { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; color: var(--dsw-alias-label-tertiary); }\n.dt-input input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; font-size: 14px; line-height: 22px; color: var(--dsw-alias-label-primary); }\n.dt-input input/* 占位符:label-dimmed 在浅色下只有 2.17(深色 3.81),必须能读出来才叫占位符。 */\n/* 往 label-tertiary 混 60%:浅色变深、深色变浅,两档都过 4.5。 */\n::placeholder { color: color-mix(in srgb, var(--dsw-alias-label-dimmed) 40%, var(--dsw-alias-label-tertiary)); }\n.dt-input input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }\n.dt-field .dt-input, .dt-search .dt-input, .dt-add-skill .dt-input { display: flex; width: 100%; }\n.dt-switch { box-sizing: border-box; flex: 0 0 auto; width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 10px; background: var(--dsw-alias-border-l3); cursor: pointer; }\n.dt-switch[aria-checked='true'] { background: var(--dsw-alias-brand-primary); }\n.dt-switch:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-switch-thumb { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--dsw-alias-label-primary-foreground); transition: transform 120ms ease; }\n.dt-switch[aria-checked='true'] .dt-switch-thumb { transform: translateX(16px); }\n.dt-state-dot { position: relative; display: inline-block; flex: none; width: 10px; height: 10px; color: var(--dsw-alias-state-idle-primary); }\n.dt-state-dot::after { content: ''; position: absolute; inset: 20%; border-radius: 50%; background: currentColor; }\n.dt-state-dot[data-state='done'] { color: var(--dsw-alias-state-success-primary); }\n.dt-state-dot[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-state-dot[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-spinner { flex: none; color: var(--dsw-alias-label-tertiary); }\n.dt-spinner g { transform-origin: center; animation: dt-spin 1.5s linear infinite; }\n.dt-spinner circle { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }\n.dt-spinner circle:first-child { opacity: 0.25; }\n.dt-spinner circle:last-child { stroke-dasharray: 18 150; }\n@keyframes dt-spin { to { transform: rotate(360deg); } }\n.dt-disclosure-row { display: flex; align-items: center; gap: 4px; min-height: 28px; min-width: 0; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 20px; color: var(--dsw-alias-label-secondary); }\n.dt-disclosure-row:hover { color: var(--dsw-alias-label-primary); }\n.dt-disclosure-row:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }\n.dt-disclosure-lead { position: relative; display: inline-flex; flex: none; width: 24px; height: 24px; align-items: center; justify-content: center; }\n.dt-disclosure-icon { display: inline-flex; align-items: center; justify-content: center; }\n.dt-disclosure-chevron { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }\n.dt-disclosure-row:hover .dt-disclosure-icon, .dt-disclosure[data-open] .dt-disclosure-icon { visibility: hidden; }\n.dt-disclosure-row:hover .dt-disclosure-chevron, .dt-disclosure[data-open] .dt-disclosure-chevron { display: inline-flex; }\n.dt-disclosure-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-modal-root { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: max(24px, var(--dsh-frame-top-clearance, 24px)) 24px; }\n.dt-modal-mask { position: absolute; inset: 0; background: var(--dsw-alias-bg-mask-1); backdrop-filter: var(--dsw-mask-blur); }\n.dt-modal { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; width: min(380px, 100%); max-height: 100%; padding: 0 0 24px; overflow: hidden; border-radius: 24px; background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); color: var(--dsw-alias-label-primary); outline: none; }\n.dt-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 14px 0 24px; }\n.dt-modal-header h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }\n.dt-modal-close { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 8px; background: transparent; cursor: pointer; color: var(--dsw-alias-label-secondary); }\n.dt-modal-close:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-modal-description { margin: -8px 0 0; padding: 0 24px; font-size: 14px; line-height: 22px; }\n.dt-modal-body { min-width: 0; min-height: 0; overflow: auto; padding: 0 24px; }\n.dt-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 24px; }\n.dt-toast { position: fixed; top: 40px; left: 50%; z-index: 1100; pointer-events: none; width: max-content; max-width: min(640px, calc(100vw - 48px)); padding: 12px 16px; border-radius: 14px; background: var(--dsw-alias-toast-bg); color: var(--dsw-static-neutral-bluish-00); font-size: 14px; line-height: 22px; box-shadow: var(--dsw-shadow-lv3); transform: translateX(-50%); animation: dt-toast-in 160ms ease-out, dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n@keyframes dt-toast-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }\n@keyframes dt-toast-fade { to { opacity: 0; visibility: hidden; } }\n@media (prefers-reduced-motion: reduce) {\n .dt-tab, .dt-segment, .dt-switch-thumb, .dt-spinner g, .dt-btn-busy .dt-btn-icon svg, .dt-tooltip { transition: none; animation: none; }\n .dt-toast { animation: dt-toast-fade 1000ms ease var(--dt-toast-hold, 3000ms) forwards; }\n}\n.dt-page .dt-tab { height: 34px; padding: 0 2px; border: 0; border-radius: 0; color: var(--dsw-alias-label-tertiary); font-size: 14px; }\n.dt-page .dt-tab[aria-selected='true'] { background: none; color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-status-head { display: flex; align-items: center; gap: 8px; }\n.dt-status-title { margin: 0; flex: 1; display: flex; align-items: center; gap: 4px; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-status-text { margin-left: auto; flex: none; font-size: 12px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-status-line .dt-status-text { margin-left: 0; }\n.dt-status-text[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-status-text[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n.dt-lv { white-space: nowrap; }\n.dt-lv-label { color: var(--dsw-alias-label-caption); }\n.dt-lv-value { color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums; }\n.dt-chip { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 6px; overflow: hidden; font-size: 11px; line-height: 18px; color: var(--dsw-alias-label-secondary); }\n.dt-chip-source { padding: 0 6px; color: var(--dsw-alias-label-tertiary); background: var(--dsw-alias-bg-module-platform); }\n.dt-chip-fact { padding: 0 6px; border-left: 0.5px solid var(--dsw-alias-border-l3); white-space: nowrap; }\n.dt-chip-label { margin-right: 4px; color: var(--dsw-alias-label-caption); }\n.dt-chip-link { position: relative; z-index: 1; text-decoration: none; cursor: pointer; transition: border-color 120ms ease; }\n.dt-chip-link:hover { border-color: var(--dsw-alias-brand-primary); }\n.dt-chip-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-chip-open { display: inline-flex; align-items: center; padding: 0 5px; border-left: 0.5px solid var(--dsw-alias-border-l3); color: var(--dsw-alias-brand-primary); }\n.dt-chip-problem, .dt-chip-problem .dt-chip-label { color: var(--dsw-alias-state-error-primary); }\n.dt-cards { gap: 8px; }\n.dt-att .dt-inline-link { font-size: 13px; font-weight: 500; }\n.dt-list > .dt-att { margin: 2px 8px; }\n.dt-att { padding: 10px 12px 10px 16px; border: 0; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-att::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-att-error::before { background: var(--dsw-alias-state-error-primary); }\n.dt-att-what { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-att-error .dt-att-what, .dt-att-error .dt-att-what .dt-open { color: var(--dsw-alias-state-error-primary); }\n.dt-stats { display: flex; flex-wrap: wrap; gap: 6px 24px; padding: 10px 14px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; background: var(--dsw-alias-bg-module-platform); }\n.dt-stat { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 可点的统计数字:去掉原生按钮外观,保留文字排版;选中时用浅底提示 */\n.dt-stat-btn { border: 0; background: none; padding: 2px 6px; margin: -2px -6px; border-radius: 8px; font: inherit; color: inherit; cursor: pointer; }\n.dt-stat-btn:hover { background: var(--dsw-alias-interactive-bg-hover); }\n/* 浅色下 interactive-bg-hover 与白底只差 1.03:点了统计数字在按筛选,零视觉反馈。 */\n/* 换成品牌色 12% 底 + 0.5px 品牌色描边(两个主题都分得开)。 */\n.dt-stat-btn[aria-pressed='true'] { background: color-mix(in srgb, var(--dsw-alias-brand-primary) 12%, transparent); box-shadow: inset 0 0 0 0.5px var(--dsw-alias-brand-primary); }\n.dt-stat-btn:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n/* 统计条单位:按钮上的 color:inherit 会把单位染成数字色,所以单位单独一档。 */\n/* 浅色下 caption(#818b98)在白底只有 3.14–3.45,深色下同一档 4.34–5.07。 */\n/* 往 label-primary 混 30%:浅色变深、深色变浅,两个主题的对比度同时变好(不用新 token)。 */\n/* 注意选择器**不带** .dt-stat-btn 前缀 —— 带前缀就只作用于可点的格子,不可点的仍是旧色(真机踩过)。 */\n.dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 70%, var(--dsw-alias-label-primary)); }\n/* 选中的统计格:品牌色 12% 底会把单位压到 4.20,再往主色多混 10% 拉回来。 */\n.dt-stat-btn[aria-pressed='true'] .dt-stat-unit { color: color-mix(in srgb, var(--dsw-alias-label-caption) 58%, var(--dsw-alias-label-primary)); }\n.dt-stat-value { font-size: 14px; font-weight: 500; color: var(--dsw-alias-label-primary); font-variant-numeric: tabular-nums; }\n.dt-more-link { font-size: 12px; font-weight: 400; }\n.dt-settings { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: start; }\n.dt-settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }\n.dt-settings-link { padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 13px; line-height: 20px; text-align: left; cursor: pointer; }\n.dt-settings-link:hover { color: var(--dsw-alias-label-primary); }\n.dt-settings-link[aria-current='page'] { background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-primary); font-weight: 500; }\n.dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 10px; }\n.dt-settings-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 16px; background: var(--dsw-alias-bg-layer-1); }\n.dt-settings-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }\n.dt-settings-body .dt-section-title { font-size: 15px; line-height: 22px; }\n.dt-subtabs { display: flex; gap: 16px; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-subtab { padding: 0 0 6px; border: 0; background: none; color: var(--dsw-alias-label-tertiary); font: inherit; font-size: 13px; cursor: pointer; }\n.dt-subtab[aria-selected='true'] { color: var(--dsw-alias-label-primary); font-weight: 500; box-shadow: inset 0 -1.5px 0 var(--dsw-alias-label-primary); }\n.dt-part { display: flex; flex-direction: column; gap: 12px; }\n.dt-rows-summary { text-align: left; color: var(--dsw-alias-label-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }\n.dt-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 18px; }\n.dt-table th { text-align: left; font-weight: 400; color: var(--dsw-alias-label-caption); padding: 2px 8px 2px 0; }\n.dt-table td { padding: 4px 8px 4px 0; border-top: 0.5px solid var(--dsw-alias-border-l3); vertical-align: top; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n@container (max-width: 640px) {\n .dt-settings { grid-template-columns: 1fr; gap: 12px; }\n .dt-settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }\n .dt-settings-link[data-stage] + .dt-settings-link:not([data-stage]) { margin-top: 0; }\n .dt-page .dt-tabs { gap: 14px; }\n}\n.dt-list > .dt-ticket { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 0; padding: 12px 8px 12px 18px; border-radius: 0; border-bottom: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-list > .dt-ticket[data-state]::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; background: var(--dsw-alias-state-warn-primary); opacity: 0.7; }\n.dt-list > .dt-ticket[data-state='error']::before { background: var(--dsw-alias-state-error-primary); }\n.dt-ticket-stage { align-self: stretch; padding-top: 1px; border-right: 0.5px solid var(--dsw-alias-border-l3); }\n.dt-ticket-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.dt-ticket-body .dt-row-title .dt-open { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.dt-ticket-meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }\n.dt-ticket-meta .dt-chip { flex: none; }\n.dt-ticket-meta .dt-ticket-actions { margin-top: 0; margin-left: auto; min-height: 0; flex-wrap: nowrap; }\n@container (max-width: 640px) { .dt-ticket-meta { flex-wrap: wrap; white-space: normal; } .dt-ticket-meta .dt-ticket-actions { flex-wrap: wrap; } }\n.dt-ticket-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--dsw-alias-label-primary); }\n.dt-ticket-note-error { color: var(--dsw-alias-state-error-primary); }\n.dt-ticket-note-pause { font-weight: 500; color: var(--dsw-alias-state-warn-primary); }\n.dt-ticket-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; margin-top: 2px; }\n/* Pass pointer events through action containers to the row link, keeping only child controls interactive. */\n.dt-ticket-actions, .dt-row-buttons, .dt-row-actions { pointer-events: none; }\n.dt-ticket-actions > *, .dt-row-buttons > *, .dt-row-actions > * { pointer-events: auto; }\n.dt-line { min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.dt-row-meta.dt-line { flex-wrap: nowrap; }\n.dt-line-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-secondary); }\n.dt-error-text { color: var(--dsw-alias-state-error-primary); }\n.dt-stage { display: inline-flex; align-items: flex-start; gap: 5px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--dsw-alias-label-secondary); }\n.dt-stage svg { flex: none; margin-top: 2px; }\n.dt-stage[data-state='warning'] { color: var(--dsw-alias-state-warn-primary); }\n.dt-stage[data-state='error'] { color: var(--dsw-alias-state-error-primary); }\n.dt-stage[data-state='ongoing'] { color: var(--dsw-alias-state-business-primary); }\n.dt-icon-link { display: inline-flex; align-items: center; gap: 4px; }\na.dt-btn, a.dt-btn:hover { text-decoration: none; }\n.dt-section-icon { display: inline-flex; align-self: center; color: var(--dsw-alias-label-tertiary); }\n.dt-trigger-link { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: -4px 0 -4px -8px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }\n.dt-trigger-link:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.dt-trigger-link:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-trigger-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.dt-kv-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-banner-actions { margin-top: 6px; }\n@container (max-width: 640px) {\n .dt-list > .dt-ticket { grid-template-columns: 1fr; row-gap: 4px; }\n .dt-ticket-stage { border-right: 0; }\n}\n.dt-nav-group { margin: 10px 10px 2px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary); }\n.dt-nav-group:first-child { margin-top: 0; }\n.dt-prompt-nav .dt-nav-item { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }\n.dt-nav-item > span { display: inline-flex; align-items: center; gap: 6px; }\n.dt-nav-item small { font-size: 12px; line-height: 18px; font-weight: 400; color: var(--dsw-alias-label-caption); }\n.dt-preview-part[data-editable] { border-left-color: var(--dsw-alias-brand-primary); }\n.dt-preview-head b { font-weight: 500; }\n.dt-preview-head > span { font-size: 12px; color: var(--dsw-alias-label-caption); }\n.dt-changed-tag { margin-left: 6px; padding: 0 5px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 400; color: var(--dsw-alias-label-secondary); }\n.dt-updated-tag { border-color: var(--dsw-alias-state-warn-primary); color: var(--dsw-alias-state-warn-primary); }\n.dt-default-updated { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 2px 12px; border-left: 2px solid var(--dsw-alias-state-warn-primary); }\n.dt-diff-fold { color: var(--dsw-alias-label-caption); font-style: italic; }\n.dt-compare { margin-left: auto; }\n.dt-admission th { white-space: nowrap; }\n.dt-admission thead tr:first-child th:not(:first-child) { color: var(--dsw-alias-label-secondary); font-weight: 500; }\n.dt-admission td { vertical-align: middle; }\n.dt-admission-scope { color: var(--dsw-alias-label-primary); font-size: 13px; }\n.dt-admission-scope small { display: block; font-size: 11px; color: var(--dsw-alias-label-caption); }\n.dt-admission-na { color: var(--dsw-alias-label-caption); }\n.dt-admission-cell { display: flex; align-items: center; gap: 4px; }\n.dt-admission-cell .dt-select { flex: 1; min-width: 0; }\n.dt-admission-slot { display: inline-flex; flex: none; width: 16px; }\n.dt-info-warn { color: var(--dsw-alias-state-warn-primary); }\n.dt-field-segmented { max-width: 240px; }\n/* 活跃时段:两个原生 time 选择器 + 全天按钮 */\n/* 表单控件不必满宽:短数字撑到 900px 只会显得空 */\n.dt-form > .dt-field > .dt-input { max-width: 480px; }\n.dt-error-card { border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 35%, var(--dsw-alias-border-l3)); }\n.dt-error-card .dt-card-title { color: var(--dsw-alias-state-error-primary); }\n/* 空态引导:圆形步骤号 + 标题 + 说明,替代「① + 列表符号」的重复 */\n.dt-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: none; }\n.dt-step { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }\n.dt-step-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }\n.dt-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }\n.dt-step-title { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--dsw-alias-label-primary); }\n.dt-empty { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 0.5px solid var(--dsw-alias-border-l3); border-radius: 12px; }\n.dt-step-detail { font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }\n.dt-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }\n.dt-time { box-sizing: border-box; height: 32px; padding: 0 8px; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: 8px; background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-label-primary); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }\n.dt-time:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }\n.dt-hours-sep { color: var(--dsw-alias-label-tertiary); }\n.dt-hours-hint { font-size: 12px; color: var(--dsw-alias-label-caption); }\n/* 分诊信号表(设置 → 诊断):左列「名字 + 两个标签」成组,右列 `+N 分` 定宽贴右、数字等宽。只挂局部类,全局 .dt-row-title 一行没动 —— 别的列表还在用它。 */\n.dt-signal-title { display: grid; grid-template-columns: minmax(0, 1fr) 4.5em; align-items: baseline; column-gap: 12px; }\n.dt-signal-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }\n.dt-signal-meta { display: block; justify-self: stretch; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }\n/* 同一个维度(默认开/关)的两档要等权:`默认关` 原本是 49×19 的裸字,`默认开` 是 51×21 的描边胶囊。 */\n.dt-signal-lead .dt-tag[data-tone='quiet'] { border: 0.5px solid var(--dsw-alias-border-l4); }\n";
187
457
 
188
458
  /** 把移植过来的样式挂到 document 上,只挂一次。 */
189
459
  /**
@@ -191,6 +461,12 @@ window.__ModuleLoader__.load({
191
461
  * 以前这里是一整套自成体系的 inline style,和原生界面放一起能看出断层。
192
462
  */
193
463
  const DOCK_CSS = `
464
+ /* Composer dock 入口:保留 20px derived 几何;交互色与焦点复用官方 dt-btn / ghost 规则。 */
465
+ .dt-btn.sa-orbit-trigger { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 20px; padding: 0 2px; margin: 0 2px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; color: inherit; font: inherit; opacity: 1; }
466
+ .dt-btn.sa-orbit-trigger:hover { background: var(--dsw-alias-interactive-bg-hover); }
467
+ .dt-btn.sa-orbit-trigger:active, .dt-btn.sa-orbit-trigger[aria-expanded='true'] { background: var(--dsw-alias-interactive-bg-active); }
468
+ /* 初始读取仍可点击;0.4 与官方 .dt-btn:disabled 同档,不再手写 0.45 inline。 */
469
+ .dt-btn.sa-orbit-trigger.is-loading { opacity: 0.4; }
194
470
  /* 弹层:卡片 + 一行摘要 + 比例条,全部走 dt-* 与 --dsw-alias-* token(官方弹层的做法) */
195
471
  /* dt-card 只有边框没有底色,弹层叠在聊天内容上会透字 —— 官方弹层是实心 layer-2 */
196
472
  .sa-dock-panel { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border: 0.5px solid var(--dsw-alias-border-l3); background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); border-radius: 16px; font-size: 12px; line-height: 18px; max-width: calc(100vw - 16px); box-sizing: border-box; }
@@ -484,8 +760,8 @@ window.__ModuleLoader__.load({
484
760
  open ? children : null)
485
761
  }
486
762
 
487
- /** 官方 InfoTip:点一下出气泡(我们之前只有 dt-info 的样式,没有组件)。 */
488
- function InfoTip({ text, icon = 'question', warn }) {
763
+ /** 无 DSH Tooltip 时完整保留原实现:原 trigger、点击/失焦与本地气泡都不改写。 */
764
+ function FallbackInfoTip({ text, icon = 'question', warn }) {
489
765
  const [open, setOpen] = useState(false)
490
766
  return h('span', { style: { position: 'relative', display: 'inline-flex' } },
491
767
  h('button', {
@@ -496,6 +772,11 @@ window.__ModuleLoader__.load({
496
772
  open ? h('span', { className: 'dt-tooltip', role: 'tooltip', style: { position: 'absolute', bottom: '130%', left: 0, visibility: 'visible' } }, text) : null)
497
773
  }
498
774
 
775
+ // 保持 InfoTip({text,icon,warn}) 调用面;静态分支不会在组件生命周期内改变 hooks 顺序。
776
+ function InfoTip(props) {
777
+ return hostTooltip ? h(hostTooltip, props) : h(FallbackInfoTip, props)
778
+ }
779
+
499
780
  const Hint = ({ children }) => h('p', { className: 'dt-hint' }, children)
500
781
 
501
782
  // ── L84c WatcherForm:新增与行内编辑共用的一份字段 schema 与草稿控件 ──
@@ -822,12 +1103,10 @@ window.__ModuleLoader__.load({
822
1103
  // 直接别名而不是 h(Component, props) 转发,避免测试桩与真 React 的 children 处理差异。
823
1104
  const PanelModal = hostUi ? hostUi.Modal : Modal
824
1105
 
825
- /** 官方 ConfirmButton 动线:触发按钮只开 Modal,取消不执行,确认期间 busy 防重复。 */
826
- function ConfirmButton({ label, confirmLabel = '确定执行', title = confirmLabel, message, onConfirm, variant = 'ghost', icon, size, modalContext = 'panel' }) {
827
- const [open, setOpen] = useState(false)
1106
+ /** 确认层与触发器分离:DSH orbit 关闭后,同一个本地 Modal 仍能由 StatusOrbit 持有。 */
1107
+ function ConfirmDialog({ open, label, confirmLabel = '确定执行', title = confirmLabel, message, onConfirm, onClose, modalContext = 'panel' }) {
828
1108
  const [busy, setBusy] = useState(false)
829
1109
  const busyRef = useRef(false)
830
- const close = useCallback(() => setOpen(false), [])
831
1110
  const confirm = async () => {
832
1111
  // state 还没来得及重渲染时也可能连点;同步 ref 是第二道锁。
833
1112
  if (busyRef.current) return false
@@ -835,15 +1114,38 @@ window.__ModuleLoader__.load({
835
1114
  setBusy(true)
836
1115
  try {
837
1116
  const done = await onConfirm()
838
- if (done) setOpen(false)
1117
+ if (done) onClose()
839
1118
  return done
840
1119
  } finally {
841
1120
  busyRef.current = false
842
1121
  setBusy(false)
843
1122
  }
844
1123
  }
845
- // orbit 与官方 portal 的叠放/焦点归还策略尚未验收,删除确认明确保留本地 Modal。
1124
+ // orbit 删除明确保留 superagent 同源 Modal;普通主面板删除仍走 PanelModal,不换 RiskConfirmation。
846
1125
  const ModalView = modalContext === 'orbit' ? Modal : PanelModal
1126
+ return h(ModalView, {
1127
+ open,
1128
+ title,
1129
+ description: message || ('确定要执行「' + label + '」操作吗?'),
1130
+ onClose,
1131
+ children: null,
1132
+ footer: h(React.Fragment, null,
1133
+ h(Btn, { variant: 'ghost', onClick: onClose }, '取消'),
1134
+ h(Btn, {
1135
+ variant: 'primary',
1136
+ className: cx('dt-danger', busy && 'dt-btn-busy'),
1137
+ disabled: busy,
1138
+ 'aria-label': confirmLabel,
1139
+ 'aria-busy': busy ? 'true' : undefined,
1140
+ onClick: confirm,
1141
+ }, confirmLabel)),
1142
+ })
1143
+ }
1144
+
1145
+ /** 官方 ConfirmButton 动线:触发按钮只开 Modal,取消不执行,确认期间 busy 防重复。 */
1146
+ function ConfirmButton({ label, confirmLabel = '确定执行', title = confirmLabel, message, onConfirm, variant = 'ghost', icon, size, modalContext = 'panel' }) {
1147
+ const [open, setOpen] = useState(false)
1148
+ const close = useCallback(() => setOpen(false), [])
847
1149
  return h(React.Fragment, null,
848
1150
  h(Btn, {
849
1151
  variant,
@@ -853,23 +1155,7 @@ window.__ModuleLoader__.load({
853
1155
  'aria-haspopup': 'dialog',
854
1156
  onClick: () => setOpen(true),
855
1157
  }, label),
856
- h(ModalView, {
857
- open,
858
- title,
859
- description: message || ('确定要执行「' + label + '」操作吗?'),
860
- onClose: close,
861
- children: null,
862
- footer: h(React.Fragment, null,
863
- h(Btn, { variant: 'ghost', onClick: close }, '取消'),
864
- h(Btn, {
865
- variant: 'primary',
866
- className: cx('dt-danger', busy && 'dt-btn-busy'),
867
- disabled: busy,
868
- 'aria-label': confirmLabel,
869
- 'aria-busy': busy ? 'true' : undefined,
870
- onClick: confirm,
871
- }, confirmLabel)),
872
- }))
1158
+ h(ConfirmDialog, { open, label, confirmLabel, title, message, onConfirm, onClose: close, modalContext }))
873
1159
  }
874
1160
 
875
1161
  const watcherId = (w) => (w && w.id) || String((w && w.repo) || '') + '#' + String((w && w.sessionId) || '')
@@ -1078,6 +1364,12 @@ window.__ModuleLoader__.load({
1078
1364
  const [anchor, setAnchor] = useState(null)
1079
1365
  const btnRef = useRef(null)
1080
1366
  const panelRef = useRef(null)
1367
+ const orbitConfirm = useOrbitConfirm({
1368
+ orbitRef: btnRef,
1369
+ onCloseOrbit: () => setOpen(false),
1370
+ // DSH 路径复用旧 anchor 槽保存待删 watcher;fallback 仍只保存手算坐标,状态槽位不变。
1371
+ onRequestConfirm: ({ watcher }) => setAnchor(watcher),
1372
+ })
1081
1373
 
1082
1374
  // 弹层的样式(DOCK_CSS)挂在 PORTED_CSS 同一张 <style> 里,而那张表以前只有「主理鱼」面板挂载时才注入。
1083
1375
  // 用户从没打开过面板就直接点状态栏圆环时,弹层就是一堆无样式的裸文字(真机复现过)。
@@ -1104,7 +1396,8 @@ window.__ModuleLoader__.load({
1104
1396
  useEffect(() => { if (open) ensurePortedCss(true) }, [open])
1105
1397
 
1106
1398
  useEffect(() => {
1107
- if (!open) return undefined
1399
+ // 仅旧路径保留 capture mousedown / 手算焦点;DSH 由 OrbitPopover 与宿主 dismiss hook 接管。
1400
+ if (!open || hostOrbit) return undefined
1108
1401
  const onDown = (event) => {
1109
1402
  const target = event.target
1110
1403
  if (panelRef.current && panelRef.current.contains(target)) return
@@ -1141,10 +1434,12 @@ window.__ModuleLoader__.load({
1141
1434
  + '(共 ' + list.length + ' 条)'
1142
1435
 
1143
1436
  const toggle = () => {
1144
- const el = btnRef.current
1145
- if (el) {
1146
- const rect = el.getBoundingClientRect()
1147
- setAnchor({ x: rect.left + rect.width / 2, y: rect.top })
1437
+ if (!hostOrbit) {
1438
+ const el = btnRef.current
1439
+ if (el) {
1440
+ const rect = el.getBoundingClientRect()
1441
+ setAnchor({ x: rect.left + rect.width / 2, y: rect.top })
1442
+ }
1148
1443
  }
1149
1444
  setOpen((value) => !value)
1150
1445
  }
@@ -1157,26 +1452,19 @@ window.__ModuleLoader__.load({
1157
1452
  : '还没有主理鱼 —— 在「主理鱼」页加一条',
1158
1453
  'aria-label': summary,
1159
1454
  'aria-expanded': open ? 'true' : 'false',
1455
+ className: cx('dt-btn', 'dt-btn-ghost', 'sa-orbit-trigger', watchers === null && 'is-loading'),
1160
1456
  onClick: toggle,
1161
- style: {
1162
- display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
1163
- height: 20, minWidth: 20, padding: '0 2px', margin: '0 2px',
1164
- border: 'none', borderRadius: 6,
1165
- background: open ? 'rgba(128,128,128,.16)' : 'transparent',
1166
- cursor: 'pointer', color: 'inherit', opacity: watchers === null ? 0.45 : 1,
1167
- },
1168
1457
  }, h(OrbitMark, { watchers: list }))
1169
1458
 
1170
- if (!open) return button
1171
-
1172
- // 空态没什么内容,窄一点更像提示而不是一张空表格
1173
- // 弹层宽度是固定的,但窗口可能更窄:按可视宽度夹一下,别溢出屏幕
1459
+ // DSH 固定业务宽度 252/368,坐标全部交给 useAnchoredPosition;只有 fallback 保留视口夹紧与手算 bottom。
1174
1460
  const viewport = Number(window && window.innerWidth) || 1200
1175
- const width = Math.min(list.length === 0 ? 252 : PANEL_W, Math.max(240, viewport - 16))
1176
- const left = anchor
1461
+ const width = hostOrbit
1462
+ ? (list.length === 0 ? 252 : PANEL_W)
1463
+ : Math.min(list.length === 0 ? 252 : PANEL_W, Math.max(240, viewport - 16))
1464
+ const left = !hostOrbit && anchor
1177
1465
  ? Math.max(8, Math.min(anchor.x - width / 2, (window.innerWidth || 1200) - width - 8))
1178
1466
  : 8
1179
- const bottom = anchor ? Math.max(8, (window.innerHeight || 800) - anchor.y + 8) : 64
1467
+ const bottom = !hostOrbit && anchor ? Math.max(8, (window.innerHeight || 800) - anchor.y + 8) : 64
1180
1468
 
1181
1469
  const act = async (w, action) => {
1182
1470
  // 删除只走 ConfirmButton + Modal;不要再叠一层原生确认框(同一动作问两次)。
@@ -1199,6 +1487,13 @@ window.__ModuleLoader__.load({
1199
1487
  return true
1200
1488
  }
1201
1489
 
1490
+ // fallback 完全保留原提前返回;DSH 即使 orbit 已关,也要继续渲染由本组件持有的确认 Modal。
1491
+ if (!open && !hostOrbit) return button
1492
+ const closeConfirm = () => {
1493
+ setAnchor(null)
1494
+ orbitConfirm.onConfirmClose()
1495
+ }
1496
+
1202
1497
  // 悬浮面板也走移植来的 dt-* 设计系统(以前这里是一套自成体系的 inline style,
1203
1498
  // 和原生界面放在一起能看出断层;ui-audit ⑥ 就是在盯这件事)。
1204
1499
  // 摘要行(官方弹层的写法):主名一行 + 一行 muted 细节,细节超长就省略号。
@@ -1248,11 +1543,18 @@ window.__ModuleLoader__.load({
1248
1543
  h(Btn, { size: 'sm', variant: 'ghost', onClick: () => act(w, 'poll') }, '立刻'),
1249
1544
  h(Btn, { size: 'sm', variant: 'ghost', onClick: () => act(w, w.enabled ? 'pause' : 'resume') },
1250
1545
  w.enabled ? '暂停' : '恢复'),
1251
- h(ConfirmButton, {
1252
- label: '删除', confirmLabel: '确认删除', variant: 'ghost', size: 'sm', modalContext: 'orbit',
1253
- icon: h(Icon, { name: 'trash' }),
1254
- onConfirm: () => act(w, 'delete'),
1255
- })))
1546
+ hostOrbit
1547
+ ? h(Btn, {
1548
+ variant: 'ghost', size: 'sm', icon: h(Icon, { name: 'trash' }),
1549
+ 'aria-label': '删除', 'aria-haspopup': 'dialog',
1550
+ // 适配器保证先 onCloseOrbit,再由 onRequestConfirm 选中待删 watcher。
1551
+ onClick: () => orbitConfirm.onRequestConfirm({ watcher: w }),
1552
+ }, '删除')
1553
+ : h(ConfirmButton, {
1554
+ label: '删除', confirmLabel: '确认删除', variant: 'ghost', size: 'sm', modalContext: 'orbit',
1555
+ icon: h(Icon, { name: 'trash' }),
1556
+ onConfirm: () => act(w, 'delete'),
1557
+ })))
1256
1558
  })
1257
1559
 
1258
1560
  // 比例条:和官方的「上下文已用」同一种表达(一眼看出多少在跑)
@@ -1262,10 +1564,7 @@ window.__ModuleLoader__.load({
1262
1564
  const bar = barCounts.length === 0 ? null : h('div', { className: 'sa-dock-bar', 'aria-hidden': 'true' },
1263
1565
  barCounts.map(([tone, n]) => h('span', { key: tone, 'data-tone': tone, style: { flexGrow: n } })))
1264
1566
 
1265
- const panel = h('div', {
1266
- ref: panelRef, role: 'dialog', 'aria-label': summary, tabIndex: -1, className: 'dt-card sa-dock-panel',
1267
- style: { position: 'fixed', left, bottom, width, zIndex: 2147483000 },
1268
- },
1567
+ const panelBody = h(React.Fragment, null,
1269
1568
  h('div', { className: 'sa-dock-head' },
1270
1569
  h('span', { className: 'sa-dock-title' }, '主理鱼'),
1271
1570
  // 和面板统计条同一套官方素材:dt-stat(数值强 + 单位弱),不再自己发明 sa-dock-metric-*
@@ -1280,8 +1579,36 @@ window.__ModuleLoader__.load({
1280
1579
  ? h('div', { className: 'sa-dock-foot' }, '详细状态与凭证在「主理鱼」标签页')
1281
1580
  : null)
1282
1581
 
1582
+ const panel = hostOrbit
1583
+ ? h(hostOrbit.OrbitPopover, {
1584
+ open,
1585
+ anchorRef: btnRef,
1586
+ orbitRef: btnRef,
1587
+ panelRef,
1588
+ onClose: () => setOpen(false),
1589
+ width,
1590
+ className: 'dt-card sa-dock-panel',
1591
+ ariaLabel: summary,
1592
+ }, panelBody)
1593
+ : h('div', {
1594
+ ref: panelRef, role: 'dialog', 'aria-label': summary, tabIndex: -1, className: 'dt-card sa-dock-panel',
1595
+ style: { position: 'fixed', left, bottom, width, zIndex: 2147483000 },
1596
+ }, panelBody)
1597
+
1598
+ // 选中待删 watcher 时 open 已被适配器先置 false:portal surface 卸载,本地确认 Modal 才打开。
1599
+ const confirmation = hostOrbit && anchor
1600
+ ? h(ConfirmDialog, {
1601
+ open: true,
1602
+ label: '删除',
1603
+ confirmLabel: '确认删除',
1604
+ title: '确认删除',
1605
+ modalContext: 'orbit',
1606
+ onConfirm: () => act(anchor, 'delete'),
1607
+ onClose: closeConfirm,
1608
+ })
1609
+ : null
1283
1610
 
1284
- return h(React.Fragment, null, button, panel)
1611
+ return h(React.Fragment, null, button, panel, confirmation)
1285
1612
  }
1286
1613
 
1287
1614
 
package/lib/index.js CHANGED
@@ -47,7 +47,7 @@ import {
47
47
 
48
48
  export const name = 'dsh-session-superagent'
49
49
  /** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
50
- export const SERVER_VERSION = '0.9.267'
50
+ export const SERVER_VERSION = '0.9.269'
51
51
  export const inject = ['tools', 'agents', 'webServer']
52
52
  /** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
53
53
  // 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-session-superagent",
3
- "version": "0.9.267",
3
+ "version": "0.9.269",
4
4
  "description": "Session-level superagent for DeepSeek Harness: watch a GitHub repository and wake a session when something needs doing. Credentials never reach the model.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -10,7 +10,8 @@
10
10
  "./redact": "./lib/redact.js",
11
11
  "./package.json": "./package.json",
12
12
  "./client": "./client.js",
13
- "./host-primitives": "./ui-host-primitives.js"
13
+ "./host-primitives": "./ui-host-primitives.js",
14
+ "./orbit-popover": "./ui-orbit-popover.js"
14
15
  },
15
16
  "files": [
16
17
  "lib/index.js",
@@ -27,6 +28,7 @@
27
28
  "LICENSE",
28
29
  "client.js",
29
30
  "ui-host-primitives.js",
31
+ "ui-orbit-popover.js",
30
32
  "bin/check.mjs",
31
33
  "assets/icon-180.png",
32
34
  "docs/whats-new-0.9.md",
@@ -19,8 +19,8 @@ export function dismissToast(current, id) {
19
19
  * 原语必须由调用方通过 factory require 取得;本模块不做文件系统包解析。
20
20
  */
21
21
  export function createHostUi({ React, primitives } = {}) {
22
- if (!React || typeof React.createElement !== 'function' || typeof React.isValidElement !== 'function') {
23
- throw new TypeError('createHostUi 需要宿主 React.createElement 与 React.isValidElement')
22
+ if (!React || typeof React.createElement !== 'function' || typeof React.cloneElement !== 'function' || typeof React.isValidElement !== 'function') {
23
+ throw new TypeError('createHostUi 需要宿主 React.createElement、React.cloneElement 与 React.isValidElement')
24
24
  }
25
25
  if (!primitives || (typeof primitives !== 'object' && typeof primitives !== 'function')) {
26
26
  throw new TypeError('createHostUi 需要 DSH primitives')
@@ -72,10 +72,21 @@ export function createHostUi({ React, primitives } = {}) {
72
72
  function Tooltip({ text, icon = 'question', warn = false, children } = {}) {
73
73
  const HostTooltip = primitive('Tooltip')
74
74
  const [remountKey, setRemountKey] = React.useState(0)
75
+ const triggerNodeRef = React.useRef(null)
76
+ const restoreFocusRef = React.useRef(false)
75
77
  React.useEffect(() => {
76
78
  if (typeof window === 'undefined') return undefined
77
79
  const target = window
78
- const closeOnScroll = () => setRemountKey((current) => current + 1)
80
+ const closeOnScroll = () => {
81
+ const triggerNode = triggerNodeRef.current
82
+ const activeElement = typeof document === 'undefined' ? null : document.activeElement
83
+ // 必须在卸载前记录;只有焦点原本位于 trigger 或其内部才允许恢复。
84
+ restoreFocusRef.current = Boolean(triggerNode && activeElement && (
85
+ activeElement === triggerNode
86
+ || (typeof triggerNode.contains === 'function' && triggerNode.contains(activeElement))
87
+ ))
88
+ setRemountKey((current) => current + 1)
89
+ }
79
90
  // DSH Tooltip 没有受控 open 或 scroll listener;capture 可同时覆盖嵌套滚动容器。
80
91
  target.addEventListener('scroll', closeOnScroll, true)
81
92
  return () => target.removeEventListener('scroll', closeOnScroll, true)
@@ -91,7 +102,25 @@ export function createHostUi({ React, primitives } = {}) {
91
102
  if (!React.isValidElement(trigger)) {
92
103
  throw new TypeError('Tooltip children 必须是单个 React element')
93
104
  }
94
- // 只以 key 重挂载宿主 Tooltip 来清掉内部 pinned 状态;不克隆 trigger、不增加 DOM 或事件层。
105
+ const originalRef = trigger.ref
106
+ const setTriggerRef = React.useCallback((node) => {
107
+ triggerNodeRef.current = node
108
+ if (typeof originalRef === 'function') originalRef(node)
109
+ else if (originalRef && typeof originalRef === 'object') originalRef.current = node
110
+ }, [originalRef])
111
+ React.useEffect(() => {
112
+ if (!restoreFocusRef.current) return undefined
113
+ // 标记只消费一次;即使新 ref 缺失,也不能在后续无关渲染中抢焦点。
114
+ restoreFocusRef.current = false
115
+ const triggerNode = triggerNodeRef.current
116
+ if (triggerNode && typeof triggerNode.focus === 'function'
117
+ && (!('isConnected' in triggerNode) || triggerNode.isConnected)) {
118
+ // 避免焦点归还自身再次滚动容器,形成 scroll -> remount 循环。
119
+ triggerNode.focus({ preventScroll: true })
120
+ }
121
+ return undefined
122
+ }, [remountKey])
123
+ // DSH 会再次 cloneElement 并合并 ref/handlers;这里只补适配 ref,保留原 ref 与全部 props。
95
124
  return h(HostTooltip, {
96
125
  key: remountKey,
97
126
  label: text,
@@ -99,7 +128,7 @@ export function createHostUi({ React, primitives } = {}) {
99
128
  portal: true,
100
129
  openOnClick: true,
101
130
  gap: 8,
102
- }, trigger)
131
+ }, React.cloneElement(trigger, { ref: setTriggerRef }))
103
132
  }
104
133
 
105
134
  // 无第二套 timer:notify 只替换当前项,dismiss 交给 Toast.onDone(id) 调用。
@@ -0,0 +1,202 @@
1
+ // L84e:StatusOrbit 的宿主弹层薄适配器。
2
+ // 定位与外点交给 DSH primitives;portal 交给宿主 react-dom 注入的 createPortal。
3
+ // 这里不包含 watcher 轮询、行数据、删除请求、确认 Modal 或另一套定位实现。
4
+
5
+ const DEFAULT_ORBIT_Z_INDEX = 1100
6
+
7
+ function focusIfConnected(node) {
8
+ if (!node || typeof node.focus !== 'function') return false
9
+ if ('isConnected' in node && !node.isConnected) return false
10
+ try {
11
+ node.focus()
12
+ return true
13
+ } catch {
14
+ return false
15
+ }
16
+ }
17
+
18
+ function closeReason(detail) {
19
+ // DSH useDismissOnOutsidePointer 固定调用 close(false)。
20
+ if (detail === false) return { reason: 'outside-pointer' }
21
+ if (typeof detail === 'string') return { reason: detail }
22
+ if (detail && typeof detail === 'object' && typeof detail.reason === 'string') return detail
23
+ return { reason: 'dismiss' }
24
+ }
25
+
26
+ /**
27
+ * 用宿主注入的 React 与 @deepseek-ai/dsh-client-ui-primitives 创建 Orbit 弹层。
28
+ *
29
+ * React.createPortal 必须由调用方从宿主 react-dom 注入;普通 React export 没有它。
30
+ * 缺少任何必需能力都会显式报错,由调用方决定是否完整保留旧实现。
31
+ */
32
+ export function createOrbitPopover({ React, primitives } = {}) {
33
+ if (!React || typeof React.createElement !== 'function') {
34
+ throw new TypeError('createOrbitPopover 需要宿主 React.createElement')
35
+ }
36
+ for (const hook of ['useRef', 'useCallback', 'useEffect']) {
37
+ if (typeof React[hook] !== 'function') {
38
+ throw new TypeError(`createOrbitPopover 需要宿主 React.${hook}`)
39
+ }
40
+ }
41
+ if (typeof React.createPortal !== 'function') {
42
+ throw new TypeError('createOrbitPopover 需要宿主 React.createPortal(从 react-dom 注入)')
43
+ }
44
+ if (!primitives || (typeof primitives !== 'object' && typeof primitives !== 'function')) {
45
+ throw new TypeError('createOrbitPopover 需要 DSH primitives')
46
+ }
47
+
48
+ const primitive = (name, kind) => {
49
+ const value = primitives[name]
50
+ if (kind === 'function' ? typeof value !== 'function' : !value) {
51
+ throw new Error(`DSH primitives.${name} 不可用;OrbitPopover 不会创建替代弹层`)
52
+ }
53
+ return value
54
+ }
55
+ const useAnchoredPosition = primitive('useAnchoredPosition', 'function')
56
+ const useDismissOnOutsidePointer = primitive('useDismissOnOutsidePointer', 'function')
57
+ const MenuSurface = primitive('MenuSurface')
58
+ const h = React.createElement
59
+ const createPortal = React.createPortal
60
+
61
+ /**
62
+ * 非 Modal 的 orbit 主 surface。width 必须由调用方按业务内容给出(例如 252/368)。
63
+ * side/align 不开放成 props,避免误传宿主未实现的 center 或虚构自动 flip。
64
+ */
65
+ function OrbitPopover({
66
+ open,
67
+ anchorRef,
68
+ orbitRef,
69
+ panelRef: suppliedPanelRef,
70
+ onClose,
71
+ width,
72
+ zIndex = DEFAULT_ORBIT_Z_INDEX,
73
+ portalTarget: suppliedPortalTarget,
74
+ className,
75
+ style,
76
+ ariaLabel,
77
+ children,
78
+ } = {}) {
79
+ const internalPanelRef = React.useRef(null)
80
+ const panelRef = suppliedPanelRef || internalPanelRef
81
+ const returnFocusRef = orbitRef || anchorRef
82
+ const onCloseRef = React.useRef(onClose)
83
+ onCloseRef.current = onClose
84
+
85
+ // stable close:父级轮询重渲染只更新 ref,不重建外点 effect 或焦点 effect。
86
+ const close = React.useCallback((detail) => {
87
+ const callback = onCloseRef.current
88
+ if (typeof callback === 'function') callback(closeReason(detail))
89
+ }, [])
90
+
91
+ // 两个宿主 hooks 与本地 effect 都在 if (!open) return 之前无条件调用。
92
+ const position = useAnchoredPosition({
93
+ open: Boolean(open),
94
+ anchorRef,
95
+ panelRef,
96
+ side: 'top',
97
+ align: 'end',
98
+ gap: 8,
99
+ margin: 8,
100
+ })
101
+ useDismissOnOutsidePointer(panelRef, Boolean(open), close, anchorRef)
102
+
103
+ const portalTarget = suppliedPortalTarget === undefined
104
+ ? (typeof document !== 'undefined' ? document.body : null)
105
+ : suppliedPortalTarget
106
+ const ownerDocument = portalTarget && portalTarget.ownerDocument
107
+ ? portalTarget.ownerDocument
108
+ : (typeof document !== 'undefined' ? document : null)
109
+
110
+ React.useEffect(() => {
111
+ if (!open || !ownerDocument || typeof ownerDocument.addEventListener !== 'function') return undefined
112
+
113
+ // effect 在 portal mount 后运行;非 Modal dialog 自身接收初始焦点,不做焦点陷阱。
114
+ focusIfConnected(panelRef.current)
115
+ const onKeyDown = (event) => {
116
+ if (!event || event.key !== 'Escape' || event.repeat) return
117
+ if (typeof event.preventDefault === 'function') event.preventDefault()
118
+ if (typeof event.stopPropagation === 'function') event.stopPropagation()
119
+ close({ reason: 'escape' })
120
+ }
121
+ ownerDocument.addEventListener('keydown', onKeyDown, true)
122
+ return () => {
123
+ ownerDocument.removeEventListener('keydown', onKeyDown, true)
124
+ // 永远回圆环,不回面板里可能已随关闭/删除卸载的按钮。
125
+ focusIfConnected(returnFocusRef && returnFocusRef.current)
126
+ }
127
+ }, [open, close, ownerDocument, panelRef, returnFocusRef])
128
+
129
+ if (!open) return null
130
+ if (!anchorRef || typeof anchorRef !== 'object') {
131
+ throw new TypeError('OrbitPopover 需要调用方传入 anchorRef')
132
+ }
133
+ if (!Number.isFinite(width) || width <= 0) {
134
+ throw new TypeError('OrbitPopover 需要调用方传入正数 width;适配器不推导业务宽度')
135
+ }
136
+ if (!portalTarget) {
137
+ throw new Error('OrbitPopover portal target 不可用;不会退化为非 portal surface')
138
+ }
139
+
140
+ const surface = h(MenuSurface, {
141
+ ref: panelRef,
142
+ role: 'dialog',
143
+ 'aria-label': ariaLabel,
144
+ tabIndex: -1,
145
+ className,
146
+ style: {
147
+ ...style,
148
+ position: 'fixed',
149
+ left: position ? position.left : 0,
150
+ top: position ? position.top : 0,
151
+ width,
152
+ zIndex,
153
+ // useAnchoredPosition 首帧尚未测量时不在 0,0 闪现;不自行计算另一套坐标。
154
+ visibility: position ? 'visible' : 'hidden',
155
+ },
156
+ }, children)
157
+ return createPortal(surface, portalTarget)
158
+ }
159
+
160
+ /**
161
+ * 删除确认的调用方策略。此 hook 不创建 Modal,也不保存 watcher/请求状态。
162
+ * requestConfirm 永远先关闭 orbit,再调用可选 onRequestConfirm 打开调用方的确认层。
163
+ */
164
+ function useOrbitConfirm({ orbitRef, onCloseOrbit, onRequestConfirm } = {}) {
165
+ const orbitRefRef = React.useRef(orbitRef)
166
+ const onCloseOrbitRef = React.useRef(onCloseOrbit)
167
+ const onRequestConfirmRef = React.useRef(onRequestConfirm)
168
+ const restoreFocusRef = React.useRef(null)
169
+ orbitRefRef.current = orbitRef
170
+ onCloseOrbitRef.current = onCloseOrbit
171
+ onRequestConfirmRef.current = onRequestConfirm
172
+
173
+ const requestConfirm = React.useCallback((detail = {}) => {
174
+ restoreFocusRef.current = 'orbit'
175
+ if (typeof onCloseOrbitRef.current === 'function') {
176
+ onCloseOrbitRef.current({ reason: 'confirm' })
177
+ }
178
+ const request = onRequestConfirmRef.current
179
+ if (typeof request === 'function') {
180
+ const extra = detail && typeof detail === 'object' ? detail : { value: detail }
181
+ return request({ ...extra, reason: 'confirm', restoreFocus: 'orbit' })
182
+ }
183
+ return undefined
184
+ }, [])
185
+
186
+ const onConfirmClose = React.useCallback(() => {
187
+ if (restoreFocusRef.current !== 'orbit') return false
188
+ restoreFocusRef.current = null
189
+ const ref = orbitRefRef.current
190
+ // 特意只读取圆环 ref;requestConfirm 的删除按钮/opener 不参与焦点归还。
191
+ return focusIfConnected(ref && ref.current)
192
+ }, [])
193
+
194
+ return {
195
+ onRequestConfirm: requestConfirm,
196
+ onConfirmClose,
197
+ restoreFocus: restoreFocusRef.current,
198
+ }
199
+ }
200
+
201
+ return { OrbitPopover, useOrbitConfirm }
202
+ }