@xiangyixie/dsh-superagent 0.15.1 → 0.15.3

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
@@ -8,6 +8,30 @@ along with the next code release. A doc-only version leaves `lib/` and `bin/`
8
8
  byte-identical to the version before it, and the pinned install line in the
9
9
  README is updated to the version being released.
10
10
 
11
+ ## 0.15.3 — 2026-11-17
12
+
13
+ ### 变化
14
+
15
+ - **控制台改成宿主自己的样子。** 配色不再自备一套,直接从 DSH 的主题定义里取:
16
+ 底色、层级、边框、三级文字、强调色全部对齐宿主,绿色不再当主色;深色与浅色
17
+ 两套都是宿主真实的色值,不是把一套反相凑出来。
18
+ - **跟着宿主换主题。** 控制台不再自带主题开关:打开时按宿主当前主题渲染,宿主
19
+ 切换外观后即时跟随,不用刷新页面。
20
+ - **控件对齐宿主。** 主/次/图标/危险按钮、输入框、分段选择、标签、分隔线、滚动条、
21
+ 焦点环、提示条、空状态都按宿主的尺寸与状态统一:32px 高、8px 圆角、13px/500,
22
+ hover 与 active 用宿主交互色,焦点环 2px 用宿主业务色。
23
+ - **提示与出错面板**改用宿主 token(文字层级、描边、悬停底色),不再自带一套圆药丸。
24
+
25
+ ## 0.15.2 — 2026-11-17
26
+
27
+ ### 变化
28
+
29
+ - **桌面端点开「超级智能体」不再白屏。** 控制台页面原先只允许本地 http 页面把它嵌进
30
+ 主面板,而桌面端的界面跑在自己的 `dsh-app://` 地址上,浏览器按页面声明的安全策略
31
+ 拒绝渲染,右侧就只剩一片白。现在页面按「谁在嵌入我」放行:本地回环地址照旧,桌面端
32
+ 这种非 http(s) 的自定义地址由界面把自己的地址告诉页面,以后换 scheme 也不用再改
33
+ 插件。网络上的站点仍然嵌不进来,token 仍是唯一入口。
34
+
11
35
  ## 0.15.1 — 2026-11-16
12
36
 
13
37
  ### 变化
package/README.en.md CHANGED
@@ -36,12 +36,12 @@ Three steps. The desktop app and the CLI install the same plugin; each step says
36
36
 
37
37
  ### 1. Install
38
38
 
39
- Desktop: **Plugins** → **Add plugin** → enter `@xiangyixie/dsh-superagent@0.15.1` → install.
39
+ Desktop: **Plugins** → **Add plugin** → enter `@xiangyixie/dsh-superagent@0.15.3` → install.
40
40
 
41
41
  CLI:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.15.1
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.15.3
45
45
  ```
46
46
 
47
47
  **Restart DSH** afterwards — plugins are loaded once at host startup. You can also add the [plugin index](https://raw.githubusercontent.com/LittleChenLiya/dsh-superagent/main/plugin-index.json) on the **Discover** page for one-click installs; upgrades are always remove-then-add.
@@ -1666,7 +1666,7 @@ appears to "hang" until the ignored-abort child returns.
1666
1666
 
1667
1667
  | What you see | What it means | What to do |
1668
1668
  | --- | --- | --- |
1669
- | `superagent_*` tools do not exist | The bundle row is not mounted, or the host refused to load the plugin. | Run `--dump-config` and check for the `@xiangyixie/dsh-superagent` block; reinstall with `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.15.1` and read the host log for `[dsh-superagent]` lines. |
1669
+ | `superagent_*` tools do not exist | The bundle row is not mounted, or the host refused to load the plugin. | Run `--dump-config` and check for the `@xiangyixie/dsh-superagent` block; reinstall with `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.15.3` and read the host log for `[dsh-superagent]` lines. |
1670
1670
  | `Cannot find module .../lib/control.js` (or `watch.js` / `report.js` / `wizard.js`), or `[dsh-superagent] dsh-superagent failed to load because a file it imports is missing: ...` in the host log | The copy in that profile is incomplete — an `add` that was interrupted leaves a partial extraction. From 0.14.3 the entry point names the missing file itself. The published package is not the cause: every version ships all thirty-four `lib/` files. | Delete the plugin's directory under the profile's `node_modules` (scoped `@xiangyixie/dsh-superagent`, or unscoped `dsh-superagent` from an older tarball install) and run the same `add` command again, with the version number. Do not copy files in by hand. |
1671
1671
  | `[error] the model provider rejected the API key` | The key env var is missing in the process that started the host. | Export `DEEPSEEK_API_KEY` (the default route) or the variable your route names, then restart `dsh`. |
1672
1672
  | `MISSING_CREDENTIAL ... no API key for provider route "..."` | The profile's route has no credential in the environment. | Set the env var named for that route and restart. The error line names the route, so use that, not this page. |
package/README.md CHANGED
@@ -36,12 +36,12 @@ dsh-superagent 把这件事接过去:你说一句目标,它负责拆、负
36
36
 
37
37
  ### 1. 装
38
38
 
39
- 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.15.1` → 安装。
39
+ 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.15.3` → 安装。
40
40
 
41
41
  命令行:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.15.1
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.15.3
45
45
  ```
46
46
 
47
47
  装完**重启 DSH**(插件只在宿主启动时加载一次)。也可以从「发现」页添加[插件索引](https://raw.githubusercontent.com/LittleChenLiya/dsh-superagent/main/plugin-index.json)一键安装;升级一律先 `remove` 再 `add`。
@@ -1090,7 +1090,7 @@ SHA-256)。`--format html` 把同样的内容写成一个自包含
1090
1090
 
1091
1091
  | 你看到的 | 含义 | 怎么办 |
1092
1092
  | --- | --- | --- |
1093
- | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.15.1` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1093
+ | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.15.3` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1094
1094
  | `Cannot find module .../lib/control.js`(或 `watch.js` / `report.js` / `wizard.js`),或宿主日志里的 `[dsh-superagent] dsh-superagent failed to load because a file it imports is missing: ...` | 那个 profile 里的副本不完整——被中断的 `add` 会留下残缺的解包结果。0.14.3 起的入口会直接点名缺哪个文件。已发布的包不是原因:每个版本都带全部三十四个 `lib/` 文件。 | 删掉 profile 的 `node_modules` 下该插件的目录(带 scope 的 `@xiangyixie/dsh-superagent`,或旧 tarball 安装留下的无 scope 的 `dsh-superagent`),再用同一条 `add` 命令重装,并带上版本号。不要手工拷贝文件进去。 |
1095
1095
  | `[error] the model provider rejected the API key` | 启动宿主的那个进程里缺 key 环境变量。 | 导出 `DEEPSEEK_API_KEY`(默认路由)或你那条路由声明的变量,然后重启 `dsh`。 |
1096
1096
  | `MISSING_CREDENTIAL ... no API key for provider route "..."` | profile 的路由在环境里没有凭据。 | 设置该路由对应的环境变量并重启。错误行里写了路由名,以它为准,不要照本文。 |
package/README.zh.md CHANGED
@@ -36,12 +36,12 @@ dsh-superagent 把这件事接过去:你说一句目标,它负责拆、负
36
36
 
37
37
  ### 1. 装
38
38
 
39
- 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.15.1` → 安装。
39
+ 桌面端:侧边栏 **插件** → **Add plugin** → 输入 `@xiangyixie/dsh-superagent@0.15.3` → 安装。
40
40
 
41
41
  命令行:
42
42
 
43
43
  ```bash
44
- dsh plugin --profile web add @xiangyixie/dsh-superagent@0.15.1
44
+ dsh plugin --profile web add @xiangyixie/dsh-superagent@0.15.3
45
45
  ```
46
46
 
47
47
  装完**重启 DSH**(插件只在宿主启动时加载一次)。也可以从「发现」页添加[插件索引](https://raw.githubusercontent.com/LittleChenLiya/dsh-superagent/main/plugin-index.json)一键安装;升级一律先 `remove` 再 `add`。
@@ -1090,7 +1090,7 @@ SHA-256)。`--format html` 把同样的内容写成一个自包含
1090
1090
 
1091
1091
  | 你看到的 | 含义 | 怎么办 |
1092
1092
  | --- | --- | --- |
1093
- | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.15.1` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1093
+ | `superagent_*` 工具不存在 | bundle 行没挂上,或者宿主拒绝加载插件。 | 跑 `--dump-config` 查 `@xiangyixie/dsh-superagent` 块;用 `dsh plugin --profile <p> add @xiangyixie/dsh-superagent@0.15.3` 重装,并在宿主日志里找 `[dsh-superagent]` 行。 |
1094
1094
  | `Cannot find module .../lib/control.js`(或 `watch.js` / `report.js` / `wizard.js`),或宿主日志里的 `[dsh-superagent] dsh-superagent failed to load because a file it imports is missing: ...` | 那个 profile 里的副本不完整——被中断的 `add` 会留下残缺的解包结果。0.14.3 起的入口会直接点名缺哪个文件。已发布的包不是原因:每个版本都带全部三十四个 `lib/` 文件。 | 删掉 profile 的 `node_modules` 下该插件的目录(带 scope 的 `@xiangyixie/dsh-superagent`,或旧 tarball 安装留下的无 scope 的 `dsh-superagent`),再用同一条 `add` 命令重装,并带上版本号。不要手工拷贝文件进去。 |
1095
1095
  | `[error] the model provider rejected the API key` | 启动宿主的那个进程里缺 key 环境变量。 | 导出 `DEEPSEEK_API_KEY`(默认路由)或你那条路由声明的变量,然后重启 `dsh`。 |
1096
1096
  | `MISSING_CREDENTIAL ... no API key for provider route "..."` | profile 的路由在环境里没有凭据。 | 设置该路由对应的环境变量并重启。错误行里写了路由名,以它为准,不要照本文。 |
package/lib/client.js CHANGED
@@ -61,27 +61,60 @@ window.__ModuleLoader__.load({
61
61
 
62
62
  const frameStyle = { position: 'absolute', inset: 0, width: '100%', height: '100%', border: '0', display: 'block' }
63
63
  const seatStyle = { position: 'relative', width: '100%', height: '100%', minHeight: '520px', background: 'transparent' }
64
- const noteStyle = {
65
- position: 'absolute',
66
- inset: 0,
67
- display: 'flex',
68
- flexDirection: 'column',
69
- alignItems: 'center',
70
- justifyContent: 'center',
71
- gap: '10px',
72
- padding: '24px',
73
- textAlign: 'center',
74
- font: '13px/1.6 system-ui, sans-serif',
75
- color: 'inherit',
64
+ const STYLE_ID = 'dsh-superagent-seat-style'
65
+
66
+ /**
67
+ * The loading/error seat borrows the host's own tokens instead of its own
68
+ * palette: label aliases for text, border-l2 for the outline, the
69
+ * interactive hover/active fills and the 2px business focus ring.
70
+ */
71
+ function ensureSeatStyle() {
72
+ if (typeof document === 'undefined') return
73
+ if (!document.head || document.getElementById(STYLE_ID)) return
74
+ const style = document.createElement('style')
75
+ style.id = STYLE_ID
76
+ style.textContent = [
77
+ '.dsh-superagent-note{position:absolute;inset:0;display:flex;flex-direction:column;',
78
+ 'align-items:center;justify-content:center;gap:10px;padding:24px;text-align:center;',
79
+ 'font-size:13px;line-height:1.6;color:var(--dsw-alias-label-secondary,inherit)}',
80
+ '.dsh-superagent-note-hint{color:var(--dsw-alias-label-caption,inherit);font-size:12px}',
81
+ '.dsh-superagent-retry{height:32px;padding:0 12px;border-radius:8px;font:inherit;',
82
+ 'font-size:13px;font-weight:500;cursor:pointer;',
83
+ 'border:1px solid var(--dsw-alias-border-l2,currentColor);background:transparent;',
84
+ 'color:var(--dsw-alias-label-primary,inherit);transition:background .12s ease}',
85
+ '.dsh-superagent-retry:hover{background:var(--dsw-alias-interactive-bg-hover,transparent)}',
86
+ '.dsh-superagent-retry:active{background:var(--dsw-alias-interactive-bg-active,transparent)}',
87
+ '.dsh-superagent-retry:focus-visible{outline:2px solid ',
88
+ 'var(--dsw-alias-state-business-primary,currentColor);outline-offset:2px}',
89
+ ].join('')
90
+ document.head.appendChild(style)
76
91
  }
77
- const buttonStyle = {
78
- font: 'inherit',
79
- padding: '6px 14px',
80
- borderRadius: '999px',
81
- border: '1px solid currentColor',
82
- background: 'transparent',
83
- color: 'inherit',
84
- cursor: 'pointer',
92
+
93
+ /** The shell's own theme, as the console page expects it. */
94
+ function shellTheme() {
95
+ try {
96
+ return document.body?.hasAttribute('data-ds-dark-theme') ? 'dark' : 'light'
97
+ } catch {
98
+ return 'light'
99
+ }
100
+ }
101
+
102
+ /**
103
+ * The page this module runs inside, as `protocol//host`. The console page
104
+ * has to name its framer in `frame-ancestors`, and a desktop shell serves
105
+ * its chrome from a custom scheme, so passing the scheme along keeps that
106
+ * list correct when the shell switches to another one.
107
+ * @returns {string} the framing page's scheme and host, or '' when opaque.
108
+ */
109
+ function parentOrigin() {
110
+ try {
111
+ const protocol = String(window.location?.protocol ?? '')
112
+ if (!/^[a-z][a-z0-9+.-]*:$/i.test(protocol)) return ''
113
+ const host = String(window.location?.host ?? '')
114
+ return host ? `${protocol}//${host}` : protocol
115
+ } catch {
116
+ return ''
117
+ }
85
118
  }
86
119
 
87
120
  /**
@@ -104,7 +137,9 @@ window.__ModuleLoader__.load({
104
137
  }
105
138
  const data = body?.data
106
139
  if (response.ok && data?.ready === true && data.url && data.token) {
107
- return { src: `${data.url}/?token=${encodeURIComponent(data.token)}` }
140
+ const parent = parentOrigin()
141
+ const hint = parent ? `&parent=${encodeURIComponent(parent)}` : ''
142
+ return { src: `${data.url}/?token=${encodeURIComponent(data.token)}${hint}&theme=${shellTheme()}` }
108
143
  }
109
144
  const reason = body?.message
110
145
  ?? (typeof data?.reason === 'string' ? data.reason : null)
@@ -152,24 +187,50 @@ window.__ModuleLoader__.load({
152
187
  }
153
188
  }, [attempt])
154
189
 
190
+ let frame = null
191
+ // The shell can switch appearance while the panel is open; hand the new
192
+ // theme to the page instead of reloading it (a reload would drop the
193
+ // conversation the page is showing).
194
+ react.useEffect(() => {
195
+ const push = () => {
196
+ try {
197
+ frame?.contentWindow?.postMessage({ type: 'dsh-superagent-theme', theme: shellTheme() }, '*')
198
+ } catch {
199
+ // The frame may be gone between renders; the next mount re-reads it.
200
+ }
201
+ }
202
+ push()
203
+ if (typeof MutationObserver === 'undefined' || typeof document === 'undefined' || !document.body) return
204
+ const observer = new MutationObserver(push)
205
+ observer.observe(document.body, { attributes: true, attributeFilter: ['data-ds-dark-theme'] })
206
+ return () => observer.disconnect()
207
+ }, [view.phase, attempt])
208
+
155
209
  const children = []
156
210
  if (view.phase === 'ready') {
157
211
  children.push(h('iframe', {
158
212
  key: 'frame',
213
+ ref: element => {
214
+ frame = element
215
+ },
159
216
  src: view.src,
160
217
  title: 'Superagent 专属空间',
161
218
  style: frameStyle,
162
219
  allow: 'clipboard-write',
163
220
  }))
164
221
  } else if (view.phase === 'loading') {
165
- children.push(h('div', { key: 'note', style: noteStyle }, '正在连接 Superagent 专属空间…'))
222
+ children.push(h('div', { key: 'note', className: 'dsh-superagent-note' }, '正在连接 Superagent 专属空间…'))
166
223
  } else {
167
224
  children.push(h(
168
225
  'div',
169
- { key: 'note', style: noteStyle },
226
+ { key: 'note', className: 'dsh-superagent-note' },
170
227
  h('div', null, view.reason),
171
- h('div', { style: { opacity: 0.7 } }, '在「高级」里确认控制台端口已开启(consolePort),或重试。'),
172
- h('button', { style: buttonStyle, type: 'button', onClick: () => setAttempt(n => n + 1) }, '重试'),
228
+ h('div', { className: 'dsh-superagent-note-hint' }, '在「高级」里确认控制台端口已开启(consolePort),或重试。'),
229
+ h('button', {
230
+ className: 'dsh-superagent-retry',
231
+ type: 'button',
232
+ onClick: () => setAttempt(n => n + 1),
233
+ }, '重试'),
173
234
  ))
174
235
  }
175
236
  return h('div', { style: seatStyle }, children)
@@ -179,6 +240,7 @@ window.__ModuleLoader__.load({
179
240
  function apply(ctx) {
180
241
  try {
181
242
  if (!h) return
243
+ ensureSeatStyle()
182
244
  ctx.slots.inject('main', () => ctx.slots.register(
183
245
  { name: 'main', key: PANEL_ID },
184
246
  ConsoleSurface,
package/lib/console.js CHANGED
@@ -96,6 +96,50 @@ const ARTIFACT_TYPES = new Map([
96
96
  ['.pdf', 'application/pdf'],
97
97
  ])
98
98
 
99
+ // The host seats this page in its main panel, so the page has to name the
100
+ // framing origin in `frame-ancestors`. A desktop shell serves its chrome from a
101
+ // custom scheme (`dsh-app://app` today); CSP has no wildcard that covers
102
+ // "whatever scheme the shell uses", so the list is the loopback origins plus the
103
+ // scheme in use, and the client half reports the page's own `protocol//host` on
104
+ // `parent` — a scheme change then needs no new release here.
105
+ const LOOPBACK_NAMES = new Set(['127.0.0.1', 'localhost', '[::1]'])
106
+ const BASE_FRAME_ANCESTORS = Object.freeze([
107
+ "'self'",
108
+ 'http://127.0.0.1:*',
109
+ 'http://localhost:*',
110
+ 'http://[::1]:*',
111
+ 'dsh-app:',
112
+ ])
113
+ // One source expression, nothing else: a scheme, optionally followed by `//host`.
114
+ // No quotes, spaces, semicolons or commas can slip through into the header.
115
+ const ANCESTOR_TOKEN = /^[a-z][a-z0-9+.-]*:(?:\/\/[a-z0-9._~%\-[\]:]+)?$/i
116
+
117
+ /**
118
+ * Turn the `parent` hint from the client half into one CSP source expression.
119
+ *
120
+ * Only two kinds of framer are legitimate: the loopback page the web profile
121
+ * serves, and the desktop shell's own non-http(s) scheme. An http(s) parent that
122
+ * is not loopback is refused, so a page on the internet cannot seat itself
123
+ * around the token even if the token leaked into a link.
124
+ *
125
+ * @param {string} reported - the framing page's `protocol//host`, or ''.
126
+ * @returns {string} a source expression, or '' when the value is not usable.
127
+ */
128
+ function ancestorSource(reported) {
129
+ const raw = reported.trim()
130
+ if (!raw || raw.length > 200 || !ANCESTOR_TOKEN.test(raw)) return ''
131
+ let url = null
132
+ try {
133
+ url = new URL(raw)
134
+ } catch {
135
+ return ''
136
+ }
137
+ if (!url.hostname) return ''
138
+ const scheme = url.protocol.slice(0, -1).toLowerCase()
139
+ if ((scheme === 'http' || scheme === 'https') && !LOOPBACK_NAMES.has(url.hostname)) return ''
140
+ return `${url.protocol}//${url.host}`
141
+ }
142
+
99
143
  /**
100
144
  * An artifact page runs with an opaque origin so its scripts cannot reach the
101
145
  * console's token or storage, while still rendering its own styles and CDNs.
@@ -1050,11 +1094,15 @@ export function createConsole({
1050
1094
  if (method !== 'GET') throw new WorkbenchError(405, 'only GET is allowed here', { id: 'method-not-allowed' })
1051
1095
  authorize(req, { allowQuery: true })
1052
1096
  // The host seats this page in the "超级智能体" main panel, so framing is
1053
- // allowed from loopback origins only — the token still gates the page.
1097
+ // allowed from loopback origins and from the shell scheme the client
1098
+ // half reports — the token still gates the page.
1099
+ const ancestors = [...BASE_FRAME_ANCESTORS]
1100
+ const reported = ancestorSource(parsed.searchParams.get('parent') ?? '')
1101
+ if (reported && !ancestors.includes(reported)) ancestors.push(reported)
1054
1102
  sendText(res, 200, page, 'text/html; charset=utf-8', {
1055
1103
  'content-security-policy': "default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; "
1056
1104
  + "connect-src 'self'; img-src 'self' data:; frame-src 'self'; base-uri 'none'; form-action 'none'; "
1057
- + "frame-ancestors 'self' http://127.0.0.1:* http://localhost:* http://[::1]:*",
1105
+ + `frame-ancestors ${ancestors.join(' ')}`,
1058
1106
  })
1059
1107
  return
1060
1108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiangyixie/dsh-superagent",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "description": "长周期自主执行插件:一个目标拆成可并行的子任务,交付一份合并报告,重启后仍可继续。",
5
5
  "author": "Admire (LittleChenLiya)",
6
6
  "type": "module",
@@ -4,36 +4,100 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>Superagent 控制台</title>
7
+ <script>
8
+ /* The shell decides the palette: it reports its own theme (its body carries
9
+ `data-ds-dark-theme`), and the OS scheme is the fallback. This runs before
10
+ the stylesheet paints so the page never flashes the wrong theme. */
11
+ (function () {
12
+ var asked = new URLSearchParams(location.search).get('theme')
13
+ if (asked !== 'dark' && asked !== 'light') {
14
+ asked = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
15
+ }
16
+ document.documentElement.dataset.theme = asked
17
+ })()
18
+ /* The shell may switch appearance while this page is open; it posts the new
19
+ theme, and the palette follows without a reload. */
20
+ window.addEventListener('message', function (event) {
21
+ if (event.source !== window.parent) return
22
+ var data = event.data
23
+ if (!data || data.type !== 'dsh-superagent-theme') return
24
+ if (data.theme === 'dark' || data.theme === 'light') document.documentElement.dataset.theme = data.theme
25
+ })
26
+ </script>
7
27
  <style>
28
+ /* Palette taken from the host's design tokens
29
+ (@deepseek-ai/dsh-client-ui-theme/src/styles/design-platform.css):
30
+ bg-base / bg-layer-1..3, border-l1..l4, label-primary..caption,
31
+ brand-primary, state-*, radius 4/8/12/16/20/28, 2px focus ring.
32
+ Light is the host default; `[data-theme='dark']` is the host's dark set. */
8
33
  :root {
34
+ color-scheme: light;
35
+ --bg: rgb(255, 255, 255);
36
+ --panel: rgb(255, 255, 255);
37
+ --panel-2: rgb(250, 250, 250);
38
+ --line: rgba(0, 0, 0, .10);
39
+ --line-soft: rgba(0, 0, 0, .06);
40
+ --line-strong: rgba(0, 0, 0, .16);
41
+ --text: rgb(15, 17, 21);
42
+ --muted: rgb(97, 102, 107);
43
+ --faint: rgb(129, 133, 140);
44
+ --accent: rgb(65, 118, 230);
45
+ --accent-ink: rgb(255, 255, 255);
46
+ --amber: rgb(221, 134, 41);
47
+ --amber-soft: color-mix(in srgb, rgb(245, 158, 11) 10%, transparent);
48
+ --red: rgb(236, 19, 19);
49
+ --green: rgb(34, 197, 94);
50
+ --blue: var(--accent);
51
+ --violet: rgb(124, 58, 237);
52
+ --hover: rgba(38, 49, 72, .06);
53
+ --active: rgba(38, 49, 72, .10);
54
+ --primary-bg: rgb(15, 17, 21);
55
+ --primary-fg: rgb(255, 255, 255);
56
+ --input-bg: rgb(255, 255, 255);
57
+ --card-bg: rgb(250, 250, 250);
58
+ --scroll-thumb: rgb(229, 229, 229);
59
+ --scroll-thumb-hover: rgb(212, 212, 212);
60
+ --toast-bg: rgb(53, 54, 56);
61
+ --toast-fg: rgb(255, 255, 255);
62
+ --radius: 16px;
63
+ --mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, ui-monospace, monospace;
64
+ --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
65
+ }
66
+ :root[data-theme='dark'] {
9
67
  color-scheme: dark;
10
- --bg: #0b0f12;
11
- --panel: #11171c;
12
- --panel-2: #151d23;
13
- --line: #233039;
14
- --line-soft: #1a242b;
15
- --text: #e7eef4;
16
- --muted: #8b9aa7;
17
- --faint: #5f707c;
18
- --accent: #5eead4;
19
- --accent-ink: #06231f;
20
- --amber: #f6c177;
21
- --amber-soft: rgba(246, 193, 119, .10);
22
- --red: #ff7b72;
23
- --green: #63d6a4;
24
- --blue: #7fb4ff;
25
- --radius: 14px;
26
- --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
27
- --sans: ui-sans-serif, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
68
+ --bg: rgb(21, 21, 23);
69
+ --panel: rgb(35, 35, 36);
70
+ --panel-2: rgb(44, 44, 46);
71
+ --line: rgba(255, 255, 255, .12);
72
+ --line-soft: rgba(255, 255, 255, .06);
73
+ --line-strong: rgba(255, 255, 255, .20);
74
+ --text: rgb(249, 250, 251);
75
+ --muted: rgb(207, 211, 214);
76
+ --faint: rgb(129, 133, 140);
77
+ --accent: rgb(122, 170, 255);
78
+ --accent-ink: rgb(15, 17, 21);
79
+ --amber: rgb(245, 158, 11);
80
+ --amber-soft: color-mix(in srgb, rgb(245, 158, 11) 12%, transparent);
81
+ --red: rgb(242, 90, 90);
82
+ --green: rgb(34, 197, 94);
83
+ --blue: var(--accent);
84
+ --violet: rgb(167, 139, 250);
85
+ --hover: rgba(255, 255, 255, .08);
86
+ --active: rgba(255, 255, 255, .14);
87
+ --primary-bg: rgb(249, 250, 251);
88
+ --primary-fg: rgb(15, 17, 21);
89
+ --input-bg: rgb(44, 44, 46);
90
+ --card-bg: rgb(44, 44, 46);
91
+ --scroll-thumb: rgb(60, 60, 61);
92
+ --scroll-thumb-hover: rgb(84, 85, 87);
93
+ --toast-bg: rgb(67, 69, 74);
94
+ --toast-fg: rgb(255, 255, 255);
28
95
  }
29
96
  * { box-sizing: border-box; }
30
97
  html, body { height: 100%; }
31
98
  body {
32
99
  margin: 0;
33
- background:
34
- radial-gradient(900px 480px at 12% -10%, rgba(94, 234, 212, .07), transparent 60%),
35
- radial-gradient(720px 420px at 100% 0%, rgba(127, 180, 255, .05), transparent 55%),
36
- var(--bg);
100
+ background: var(--bg);
37
101
  color: var(--text);
38
102
  font: 14px/1.55 var(--sans);
39
103
  -webkit-font-smoothing: antialiased;
@@ -50,17 +114,17 @@
50
114
  display: flex; align-items: center; gap: 18px;
51
115
  padding: 0 20px;
52
116
  border-bottom: 1px solid var(--line-soft);
53
- background: rgba(11, 15, 18, .82);
117
+ background: color-mix(in srgb, var(--bg) 82%, transparent);
54
118
  backdrop-filter: blur(10px);
55
119
  }
56
120
  .brand { display: flex; align-items: center; gap: 10px; min-width: 176px; }
57
121
  .mark {
58
122
  width: 30px; height: 30px; border-radius: 9px;
59
123
  display: grid; place-items: center;
60
- background: linear-gradient(145deg, var(--accent), #2aa99a);
124
+ background: var(--accent);
61
125
  color: var(--accent-ink);
62
126
  font-weight: 800; font-size: 15px;
63
- box-shadow: 0 0 0 1px rgba(94, 234, 212, .35), 0 8px 24px rgba(94, 234, 212, .12);
127
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 24px color-mix(in srgb, var(--accent) 12%, transparent);
64
128
  }
65
129
  .brand strong { display: block; font-size: 14px; letter-spacing: .2px; }
66
130
  .brand span { display: block; color: var(--faint); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
@@ -71,29 +135,29 @@
71
135
  border: 1px solid var(--line); background: var(--panel);
72
136
  color: var(--muted); font-size: 12px; white-space: nowrap;
73
137
  }
74
- .badge.chat { color: var(--green); border-color: rgba(99, 214, 164, .32); background: rgba(99, 214, 164, .08); }
75
- .badge.off { color: var(--amber); border-color: rgba(246, 193, 119, .32); background: var(--amber-soft); }
138
+ .badge.chat { color: var(--green); border-color: color-mix(in srgb, var(--green) 32%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
139
+ .badge.off { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 32%, transparent); background: var(--amber-soft); }
76
140
  .badge .pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
77
141
  .session-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
78
142
  .topbar-actions { display: flex; align-items: center; gap: 12px; }
79
143
  .conn { display: inline-flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12px; white-space: nowrap; }
80
144
  .conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
81
- .conn.live i { background: var(--green); box-shadow: 0 0 0 4px rgba(99, 214, 164, .12); }
145
+ .conn.live i { background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 12%, transparent); }
82
146
  .conn.warn i { background: var(--amber); }
83
147
  .btn {
84
148
  height: 30px; padding: 0 12px; border-radius: 8px;
85
149
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
86
150
  font-size: 12px;
87
151
  }
88
- .btn:hover { color: var(--text); border-color: #35464f; background: #172028; }
152
+ .btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--hover); }
89
153
  .btn:disabled { opacity: .45; cursor: default; }
90
- .btn.danger { color: var(--red); border-color: rgba(255, 123, 114, .3); }
91
- .btn.danger:hover { background: rgba(255, 123, 114, .08); border-color: rgba(255, 123, 114, .45); }
154
+ .btn.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
155
+ .btn.danger:hover { background: color-mix(in srgb, var(--red) 8%, transparent); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
92
156
 
93
157
  .panel {
94
158
  min-height: 0; display: flex; flex-direction: column;
95
159
  border: 1px solid var(--line-soft); border-radius: var(--radius);
96
- background: linear-gradient(180deg, var(--panel), #0f1519);
160
+ background: var(--panel);
97
161
  overflow: hidden;
98
162
  }
99
163
  .chat-head {
@@ -115,7 +179,7 @@
115
179
  }
116
180
  .messages::-webkit-scrollbar, .run-list::-webkit-scrollbar, pre::-webkit-scrollbar { width: 10px; height: 10px; }
117
181
  .messages::-webkit-scrollbar-thumb, .run-list::-webkit-scrollbar-thumb, pre::-webkit-scrollbar-thumb {
118
- background: #26343d; border: 3px solid transparent; background-clip: padding-box; border-radius: 999px;
182
+ background: var(--scroll-thumb); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px;
119
183
  }
120
184
  .msg { display: flex; flex-direction: column; max-width: 820px; margin: 0 0 18px; animation: rise .18s ease-out; }
121
185
  @keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@@ -129,18 +193,18 @@
129
193
  white-space: pre-wrap; word-break: break-word;
130
194
  }
131
195
  .msg.user .bubble {
132
- background: linear-gradient(180deg, rgba(94, 234, 212, .13), rgba(94, 234, 212, .07));
133
- border-color: rgba(94, 234, 212, .26);
196
+ background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 13%, transparent), color-mix(in srgb, var(--accent) 7%, transparent));
197
+ border-color: color-mix(in srgb, var(--accent) 26%, transparent);
134
198
  border-bottom-right-radius: 4px;
135
199
  }
136
200
  .msg.assistant .bubble { border-bottom-left-radius: 4px; }
137
201
  .msg.pending .bubble { opacity: .72; }
138
- .msg.failed .bubble { border-color: rgba(255, 123, 114, .48); }
202
+ .msg.failed .bubble { border-color: color-mix(in srgb, var(--red) 48%, transparent); }
139
203
  .msg .text { min-height: 1em; }
140
204
  .msg .text .para { white-space: pre-wrap; }
141
205
  .msg .text pre {
142
206
  margin: 8px 0; padding: 10px 11px; border-radius: 8px;
143
- border: 1px solid var(--line); background: #0a0f12;
207
+ border: 1px solid var(--line); background: var(--bg);
144
208
  overflow: auto; font: 12px/1.6 var(--mono); white-space: pre;
145
209
  }
146
210
  .msg .text .cursor {
@@ -165,7 +229,7 @@
165
229
  .tool {
166
230
  display: inline-flex; align-items: center; gap: 6px;
167
231
  padding: 3px 8px; border-radius: 999px;
168
- border: 1px solid var(--line); background: #0e1418;
232
+ border: 1px solid var(--line); background: var(--bg);
169
233
  color: var(--muted); font: 11px/1.5 var(--mono);
170
234
  }
171
235
  .tool .tdot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
@@ -180,17 +244,17 @@
180
244
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
181
245
  color: var(--faint); font-size: 10.5px;
182
246
  }
183
- .tool.err { border-color: #5a2c2c; }
247
+ .tool.err { border-color: color-mix(in srgb, var(--red) 40%, transparent); }
184
248
  .tool .err-mark { color: var(--red); }
185
249
 
186
250
  .empty { max-width: 560px; margin: 7vh auto 0; text-align: center; }
187
251
  .empty .orb {
188
252
  width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 18px;
189
253
  display: grid; place-items: center;
190
- background: linear-gradient(145deg, rgba(94, 234, 212, .22), rgba(47, 126, 115, .18));
191
- border: 1px solid rgba(94, 234, 212, .3);
254
+ background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 14%, transparent));
255
+ border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
192
256
  color: var(--accent); font-size: 24px; font-weight: 800;
193
- box-shadow: 0 18px 50px rgba(94, 234, 212, .08);
257
+ box-shadow: 0 18px 50px color-mix(in srgb, var(--accent) 8%, transparent);
194
258
  }
195
259
  .empty h1 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.02em; }
196
260
  .empty p { margin: 0 auto 18px; max-width: 460px; color: var(--muted); }
@@ -200,21 +264,21 @@
200
264
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
201
265
  font-size: 12px;
202
266
  }
203
- .examples button:hover { color: var(--text); border-color: rgba(94, 234, 212, .35); }
204
- .empty.unavailable .orb { background: var(--amber-soft); border-color: rgba(246, 193, 119, .35); color: var(--amber); }
267
+ .examples button:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
268
+ .empty.unavailable .orb { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--amber); }
205
269
  .empty.unavailable h1 { font-size: 20px; }
206
270
  .empty .reason {
207
271
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
208
- border: 1px solid rgba(246, 193, 119, .28); background: var(--amber-soft);
209
- color: #e8c690; font-size: 12px; text-align: left; white-space: pre-wrap;
272
+ border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); background: var(--amber-soft);
273
+ color: var(--amber); font-size: 12px; text-align: left; white-space: pre-wrap;
210
274
  }
211
275
 
212
- .composer { padding: 12px 14px 14px; border-top: 1px solid var(--line-soft); background: #0e1418; }
276
+ .composer { padding: 12px 14px 14px; border-top: 1px solid var(--line-soft); background: var(--bg); }
213
277
  .composer-box {
214
- border: 1px solid var(--line); border-radius: 12px; background: #0a1014;
278
+ border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
215
279
  transition: border-color .15s, box-shadow .15s;
216
280
  }
217
- .composer-box:focus-within { border-color: rgba(94, 234, 212, .42); box-shadow: 0 0 0 3px rgba(94, 234, 212, .07); }
281
+ .composer-box:focus-within { border-color: color-mix(in srgb, var(--accent) 42%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 7%, transparent); }
218
282
  .composer textarea {
219
283
  display: block; width: 100%; min-height: 46px; max-height: 180px;
220
284
  padding: 12px 13px 4px; border: 0; outline: 0; resize: none;
@@ -222,16 +286,16 @@
222
286
  }
223
287
  .composer textarea::placeholder { color: var(--faint); }
224
288
  .composer-bar { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px 10px; }
225
- .segmented { display: inline-flex; padding: 2px; border-radius: 8px; background: #111a20; border: 1px solid var(--line-soft); }
289
+ .segmented { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--hover); border: 1px solid var(--line-soft); }
226
290
  .segmented button {
227
291
  height: 24px; padding: 0 8px; border: 0; border-radius: 6px;
228
292
  background: transparent; color: var(--faint); font-size: 11px;
229
293
  }
230
- .segmented button.active { background: #1d2a31; color: var(--text); }
294
+ .segmented button.active { background: var(--panel-2); color: var(--text); }
231
295
  .hint { flex: 1; color: var(--faint); font-size: 11px; text-align: right; }
232
296
  .send {
233
- width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(94, 234, 212, .4);
234
- background: linear-gradient(145deg, var(--accent), #35c7b5); color: var(--accent-ink);
297
+ width: 32px; height: 32px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
298
+ background: var(--accent); color: var(--accent-ink);
235
299
  font-size: 17px; font-weight: 800; line-height: 1;
236
300
  }
237
301
  .send:disabled { opacity: .35; cursor: default; }
@@ -240,7 +304,7 @@
240
304
  .count {
241
305
  min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px;
242
306
  display: inline-grid; place-items: center;
243
- background: #172129; border: 1px solid var(--line); color: var(--muted);
307
+ background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
244
308
  font: 11px var(--mono);
245
309
  }
246
310
  .tools:empty { display: none; }
@@ -248,120 +312,120 @@
248
312
  .tool-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; max-height: 132px; overflow-y: auto; }
249
313
  .tool-name {
250
314
  padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line);
251
- background: #121a20; color: var(--muted); font: 10.5px var(--mono);
315
+ background: var(--panel-2); color: var(--muted); font: 10.5px var(--mono);
252
316
  }
253
- .tool-name.on { border-color: #2c5a48; color: #9fe0c2; }
317
+ .tool-name.on { border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--green); }
254
318
  .status-pill {
255
319
  flex: none; padding: 2px 7px; border-radius: 999px;
256
320
  border: 1px solid var(--line); color: var(--muted); font-size: 10.5px; white-space: nowrap;
257
321
  }
258
- .status-pill.running { color: var(--amber); border-color: rgba(246, 193, 119, .32); background: var(--amber-soft); }
259
- .status-pill.completed { color: var(--green); border-color: rgba(99, 214, 164, .32); background: rgba(99, 214, 164, .07); }
260
- .status-pill.failed, .status-pill.interrupted { color: var(--red); border-color: rgba(255, 123, 114, .32); background: rgba(255, 123, 114, .07); }
261
- .progress { height: 3px; margin: 9px 0 0; border-radius: 999px; background: #1b252c; overflow: hidden; }
262
- .progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3dc6b5, var(--accent)); transition: width .3s; }
322
+ .status-pill.running { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 32%, transparent); background: var(--amber-soft); }
323
+ .status-pill.completed { color: var(--green); border-color: color-mix(in srgb, var(--green) 32%, transparent); background: color-mix(in srgb, var(--green) 7%, transparent); }
324
+ .status-pill.failed, .status-pill.interrupted { color: var(--red); border-color: color-mix(in srgb, var(--red) 32%, transparent); background: color-mix(in srgb, var(--red) 7%, transparent); }
325
+ .progress { height: 3px; margin: 9px 0 0; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
326
+ .progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
263
327
  .attention-card {
264
328
  margin-top: 10px; padding: 10px; border-radius: 9px;
265
- border: 1px solid rgba(246, 193, 119, .36); background: var(--amber-soft);
329
+ border: 1px solid color-mix(in srgb, var(--amber) 36%, transparent); background: var(--amber-soft);
266
330
  }
267
331
  .attention-card .kicker {
268
332
  color: var(--amber); font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
269
333
  }
270
- .attention-card p { margin: 5px 0 0; color: #edd7b2; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
271
- .attention-card .reason { color: #b9a789; font-size: 11px; }
334
+ .attention-card p { margin: 5px 0 0; color: var(--amber); font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
335
+ .attention-card .reason { color: var(--faint); font-size: 11px; }
272
336
  .approval-card {
273
337
  margin-top: 10px; padding: 10px 12px; border-radius: 9px;
274
- border: 1px solid rgba(246, 193, 119, .40); background: var(--amber-soft);
338
+ border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); background: var(--amber-soft);
275
339
  }
276
340
  .approval-card .kicker {
277
341
  color: var(--amber); font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
278
342
  }
279
- .approval-card .what { margin-top: 6px; color: #e9d9bd; font-size: 11.5px; }
280
- .approval-card .what b { color: #f6e3c4; font-weight: 600; }
343
+ .approval-card .what { margin-top: 6px; color: var(--amber); font-size: 11.5px; }
344
+ .approval-card .what b { color: var(--amber); font-weight: 600; }
281
345
  .approval-card .where {
282
346
  margin-top: 6px; padding: 5px 7px; border-radius: 6px;
283
- background: rgba(10, 15, 18, .5); color: #f0dcbb;
347
+ background: var(--bg); color: var(--amber);
284
348
  font: 11px var(--mono); word-break: break-all;
285
349
  }
286
350
  .approval-card .why {
287
- margin: 6px 0 0; color: #edd7b2; font-size: 12px; line-height: 1.55; white-space: pre-wrap;
351
+ margin: 6px 0 0; color: var(--amber); font-size: 12px; line-height: 1.55; white-space: pre-wrap;
288
352
  }
289
- .approval-card .state { margin-top: 8px; color: #b9a789; font-size: 11px; }
353
+ .approval-card .state { margin-top: 8px; color: var(--faint); font-size: 11px; }
290
354
  .approval-card .options { margin-top: 8px; }
291
355
  .approval-card .options button.allow {
292
- border-color: rgba(126, 214, 160, .5); background: rgba(126, 214, 160, .12); color: #cdeed8;
356
+ border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green);
293
357
  }
294
358
  .approval-card .options button.reject {
295
- border-color: rgba(240, 130, 130, .5); background: rgba(240, 130, 130, .1); color: #f3cccc;
359
+ border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red);
296
360
  }
297
361
  .options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
298
362
  .options button {
299
363
  padding: 4px 9px; border-radius: 7px;
300
- border: 1px solid rgba(246, 193, 119, .38); background: rgba(246, 193, 119, .08);
301
- color: #f3d8ac; font-size: 11px;
364
+ border: 1px solid color-mix(in srgb, var(--amber) 38%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent);
365
+ color: var(--amber); font-size: 11px;
302
366
  }
303
- .options button:hover { background: rgba(246, 193, 119, .18); }
367
+ .options button:hover { background: color-mix(in srgb, var(--amber) 18%, transparent); }
304
368
  .options button:disabled { opacity: .45; }
305
369
  .approval-card .options button.allow-tool {
306
- border-color: rgba(94, 234, 212, .38); background: rgba(94, 234, 212, .1); color: #c2efe7;
370
+ border-color: color-mix(in srgb, var(--accent) 38%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent);
307
371
  }
308
372
  .approval-card .call { margin-top: 7px; }
309
373
  .approval-card .call summary {
310
- color: #cbb794; font-size: 11px; cursor: pointer; list-style: none;
374
+ color: var(--faint); font-size: 11px; cursor: pointer; list-style: none;
311
375
  }
312
376
  .approval-card .call summary::-webkit-details-marker { display: none; }
313
377
  .approval-card .call summary::before { content: '▸ '; }
314
378
  .approval-card .call[open] summary::before { content: '▾ '; }
315
379
  .approval-card .call pre {
316
380
  max-height: 240px; overflow: auto; margin: 6px 0 0; padding: 8px 9px;
317
- border-radius: 7px; border: 1px solid rgba(246, 193, 119, .22);
318
- background: rgba(10, 15, 18, .62); color: #e9dcc4;
381
+ border-radius: 7px; border: 1px solid color-mix(in srgb, var(--amber) 22%, transparent);
382
+ background: var(--input-bg); color: var(--text);
319
383
  font: 11px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word;
320
384
  }
321
- .approval-card .call .note { margin: 5px 0 0; color: #b9a789; font-size: 10.5px; }
322
- .approval-card .expiry { margin-top: 6px; color: #b9a789; font-size: 11px; }
385
+ .approval-card .call .note { margin: 5px 0 0; color: var(--faint); font-size: 10.5px; }
386
+ .approval-card .expiry { margin-top: 6px; color: var(--faint); font-size: 11px; }
323
387
  .approval-card .expiry.soon { color: var(--amber); }
324
388
  .approval-card .expiry.over { color: var(--red); }
325
389
  .free { display: flex; gap: 6px; margin-top: 7px; }
326
390
  .free input {
327
391
  flex: 1; min-width: 0; height: 29px; padding: 0 8px;
328
- border: 1px solid rgba(246, 193, 119, .28); border-radius: 7px;
329
- background: rgba(10, 15, 18, .65); color: var(--text); font-size: 11.5px; outline: 0;
392
+ border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); border-radius: 7px;
393
+ background: var(--input-bg); color: var(--text); font-size: 11.5px; outline: 0;
330
394
  }
331
- .free input:focus { border-color: rgba(246, 193, 119, .55); }
395
+ .free input:focus { border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
332
396
  .free button {
333
- height: 29px; padding: 0 9px; border-radius: 7px; border: 1px solid rgba(246, 193, 119, .4);
334
- background: rgba(246, 193, 119, .14); color: #f3d8ac; font-size: 11px;
397
+ height: 29px; padding: 0 9px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
398
+ background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); font-size: 11px;
335
399
  }
336
400
  .report { margin-top: 9px; border-top: 1px dashed var(--line-soft); padding-top: 8px; }
337
401
  .report summary { color: var(--muted); font-size: 11px; cursor: pointer; }
338
402
  .report pre {
339
403
  max-height: 280px; overflow: auto; margin: 7px 0 0; padding: 9px;
340
- border-radius: 8px; border: 1px solid var(--line-soft); background: #0a0f12;
404
+ border-radius: 8px; border: 1px solid var(--line-soft); background: var(--bg);
341
405
  color: var(--muted); font: 11px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word;
342
406
  }
343
407
  .env-bar {
344
408
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
345
409
  padding: 6px 20px; border-bottom: 1px solid var(--line-soft);
346
- background: rgba(11, 15, 18, .55);
410
+ background: var(--panel-2);
347
411
  }
348
412
  .env-bar[hidden] { display: none; }
349
413
  .env-title { color: var(--faint); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
350
414
  .env-items { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
351
415
  .env-item {
352
416
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
353
- border-radius: 999px; border: 1px solid var(--line-soft); background: #10171c;
417
+ border-radius: 999px; border: 1px solid var(--line-soft); background: var(--panel-2);
354
418
  color: var(--muted); font-size: 11px;
355
419
  cursor: pointer; font-family: inherit;
356
420
  }
357
421
  .env-item:hover { border-color: var(--line); }
358
422
  .env-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
359
423
  .env-item.ok .dot { background: var(--green); }
360
- .env-item.bad { border-color: rgba(246, 193, 119, .34); color: #e8c690; background: var(--amber-soft); }
424
+ .env-item.bad { border-color: color-mix(in srgb, var(--amber) 34%, transparent); color: var(--amber); background: var(--amber-soft); }
361
425
  .env-item.bad .dot { background: var(--amber); }
362
426
  .env-item .env-action { color: var(--accent); font-size: 10.5px; }
363
427
  .env-item .env-value { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
364
- .env-item.bad .env-value { color: #c9ab7f; }
428
+ .env-item.bad .env-value { color: var(--faint); }
365
429
  .btn.tiny { height: 24px; padding: 0 9px; font-size: 11px; }
366
430
 
367
431
  #wizardDialog { width: min(720px, calc(100vw - 32px)); }
@@ -372,36 +436,36 @@
372
436
  .wiz-steps { display: flex; gap: 6px; padding: 12px 18px 0; }
373
437
  .wiz-step {
374
438
  flex: 1; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line-soft);
375
- background: #0e1418; color: var(--faint); font-size: 11px; text-align: center;
439
+ background: var(--bg); color: var(--faint); font-size: 11px; text-align: center;
376
440
  }
377
- .wiz-step.active { border-color: rgba(94, 234, 212, .4); color: var(--text); background: rgba(94, 234, 212, .07); }
378
- .wiz-step.done { color: var(--green); border-color: rgba(99, 214, 164, .25); }
441
+ .wiz-step.active { border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); background: color-mix(in srgb, var(--accent) 7%, transparent); }
442
+ .wiz-step.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, transparent); }
379
443
  .wiz-body { padding: 14px 18px 8px; overflow: auto; max-height: calc(100vh - 270px); }
380
444
  .wiz-lead { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
381
445
  .wiz-checks { display: flex; flex-direction: column; gap: 7px; }
382
446
  .wiz-check {
383
447
  display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px;
384
- border-radius: 9px; border: 1px solid var(--line-soft); background: #0e1418;
448
+ border-radius: 9px; border: 1px solid var(--line-soft); background: var(--bg);
385
449
  }
386
- .wiz-check.bad { border-color: rgba(246, 193, 119, .3); background: var(--amber-soft); }
450
+ .wiz-check.bad { border-color: color-mix(in srgb, var(--amber) 30%, transparent); background: var(--amber-soft); }
387
451
  .wiz-check .dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--green); }
388
452
  .wiz-check.bad .dot { background: var(--amber); }
389
453
  .wiz-check .body { flex: 1; min-width: 0; }
390
454
  .wiz-check .label { font-size: 12px; color: var(--text); }
391
455
  .wiz-check .value { margin-left: 6px; color: var(--muted); font: 11px var(--mono); word-break: break-all; }
392
- .wiz-check .hint { margin-top: 3px; color: #c9ab7f; font-size: 11px; line-height: 1.55; }
456
+ .wiz-check .hint { margin-top: 3px; color: var(--faint); font-size: 11px; line-height: 1.55; }
393
457
  .wiz-check button {
394
458
  flex: none; height: 25px; padding: 0 8px; border-radius: 6px;
395
- border: 1px solid rgba(246, 193, 119, .4); background: rgba(246, 193, 119, .1);
396
- color: #f3d8ac; font-size: 11px;
459
+ border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent);
460
+ color: var(--amber); font-size: 11px;
397
461
  }
398
462
  .wiz-form { display: grid; gap: 10px; }
399
463
  .wiz-field label { display: block; margin-bottom: 4px; color: var(--faint); font-size: 11px; }
400
464
  .wiz-field input {
401
465
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line);
402
- border-radius: 8px; background: #0a1014; color: var(--text); outline: 0; font-size: 12.5px;
466
+ border-radius: 8px; background: var(--bg); color: var(--text); outline: 0; font-size: 12.5px;
403
467
  }
404
- .wiz-field input:focus { border-color: rgba(94, 234, 212, .48); }
468
+ .wiz-field input:focus { border-color: color-mix(in srgb, var(--accent) 48%, transparent); }
405
469
  .wiz-key-row { display: flex; align-items: center; gap: 8px; }
406
470
  .wiz-key-row input { flex: 1; min-width: 0; }
407
471
  .wiz-key-row .wiz-badge { flex: none; }
@@ -410,27 +474,27 @@
410
474
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px;
411
475
  border: 1px solid var(--line); color: var(--faint); font-size: 10.5px;
412
476
  }
413
- .wiz-badge.ok { color: var(--green); border-color: rgba(99, 214, 164, .3); background: rgba(99, 214, 164, .07); }
414
- .wiz-badge.bad { color: var(--amber); border-color: rgba(246, 193, 119, .3); background: var(--amber-soft); }
477
+ .wiz-badge.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); background: color-mix(in srgb, var(--green) 7%, transparent); }
478
+ .wiz-badge.bad { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); background: var(--amber-soft); }
415
479
  .wiz-error {
416
480
  margin-top: 10px; padding: 9px 10px; border-radius: 9px; font-size: 11.5px; line-height: 1.6;
417
- border: 1px solid rgba(255, 123, 114, .32); background: rgba(255, 123, 114, .07); color: #ffc0bb;
481
+ border: 1px solid color-mix(in srgb, var(--red) 32%, transparent); background: color-mix(in srgb, var(--red) 7%, transparent); color: var(--red);
418
482
  }
419
- .wiz-error b { display: block; color: #ffd6d2; font-size: 12px; }
483
+ .wiz-error b { display: block; color: var(--red); font-size: 12px; }
420
484
  .wiz-summary { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
421
485
  .wiz-summary li { position: relative; padding-left: 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
422
486
  .wiz-summary li::before { content: "✓"; position: absolute; left: 0; color: var(--green); }
423
487
  .wiz-kv {
424
488
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; padding: 10px;
425
- border-radius: 9px; border: 1px solid var(--line-soft); background: #0e1418;
489
+ border-radius: 9px; border: 1px solid var(--line-soft); background: var(--bg);
426
490
  color: var(--faint); font-size: 11px;
427
491
  }
428
492
  .wiz-kv b { color: var(--muted); font-weight: 500; }
429
493
  .wiz-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line-soft); }
430
494
  .wiz-foot .spacer { flex: 1; }
431
495
  .wiz-primary {
432
- height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(94, 234, 212, .4);
433
- background: linear-gradient(145deg, var(--accent), #35c7b5); color: var(--accent-ink);
496
+ height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
497
+ background: var(--accent); color: var(--accent-ink);
434
498
  font-weight: 700; font-size: 12px;
435
499
  }
436
500
  .wiz-primary:disabled { opacity: .45; cursor: default; }
@@ -440,17 +504,17 @@
440
504
  }
441
505
  .wiz-trial-verdict {
442
506
  display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 10px;
443
- border: 1px solid var(--line-soft); background: #0e1418;
507
+ border: 1px solid var(--line-soft); background: var(--bg);
444
508
  }
445
- .wiz-trial-verdict.ok { border-color: rgba(99, 214, 164, .3); background: rgba(99, 214, 164, .06); color: #b8ecd5; }
446
- .wiz-trial-verdict.bad { border-color: rgba(246, 193, 119, .3); background: var(--amber-soft); color: #e8c690; }
509
+ .wiz-trial-verdict.ok { border-color: color-mix(in srgb, var(--green) 30%, transparent); background: color-mix(in srgb, var(--green) 6%, transparent); color: var(--green); }
510
+ .wiz-trial-verdict.bad { border-color: color-mix(in srgb, var(--amber) 30%, transparent); background: var(--amber-soft); color: var(--amber); }
447
511
  .wiz-trial-verdict .big { font-size: 20px; }
448
512
  .wiz-trial-verdict .t { font-size: 12.5px; }
449
513
  .wiz-trial-verdict .d { color: var(--faint); font-size: 11px; }
450
514
  .wiz-steps-list { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
451
515
  .wiz-task {
452
516
  display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border-radius: 7px;
453
- border: 1px solid var(--line-soft); background: #0e1418; font-size: 11.5px;
517
+ border: 1px solid var(--line-soft); background: var(--bg); font-size: 11.5px;
454
518
  }
455
519
  .wiz-task .dot { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--amber); }
456
520
  .wiz-task.completed .dot { background: var(--green); }
@@ -458,7 +522,7 @@
458
522
  .wiz-task .name { color: var(--text); font-family: var(--mono); font-size: 11px; }
459
523
  .wiz-task .detail { margin-top: 2px; color: var(--faint); font-size: 11px; word-break: break-word; }
460
524
  .wiz-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
461
- .wiz-stat { padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line-soft); background: #0e1418; }
525
+ .wiz-stat { padding: 9px 10px; border-radius: 9px; border: 1px solid var(--line-soft); background: var(--bg); }
462
526
  .wiz-stat .k { color: var(--faint); font-size: 10.5px; }
463
527
  .wiz-stat .v { margin-top: 2px; color: var(--text); font: 13px var(--mono); word-break: break-all; }
464
528
  .wiz-file {
@@ -475,25 +539,25 @@
475
539
  .toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 30; pointer-events: none; }
476
540
  .toast {
477
541
  max-width: 520px; padding: 9px 13px; border-radius: 9px;
478
- border: 1px solid var(--line); background: #182229; color: var(--text);
542
+ border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
479
543
  box-shadow: 0 12px 36px rgba(0, 0, 0, .35); font-size: 12px;
480
544
  animation: rise .16s ease-out;
481
545
  }
482
- .toast.err { border-color: rgba(255, 123, 114, .4); color: #ffc0bb; }
483
- .toast.ok { border-color: rgba(99, 214, 164, .35); }
484
- .toast.warn { border-color: rgba(246, 193, 119, .4); color: #ffd8a1; }
546
+ .toast.err { border-color: color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); }
547
+ .toast.ok { border-color: color-mix(in srgb, var(--green) 35%, transparent); }
548
+ .toast.warn { border-color: color-mix(in srgb, var(--amber) 40%, transparent); color: var(--amber); }
485
549
 
486
550
  .notice-btn { position: relative; }
487
- .notice-btn.has-unread { border-color: rgba(246, 193, 119, .5); color: var(--amber); }
551
+ .notice-btn.has-unread { border-color: color-mix(in srgb, var(--amber) 50%, transparent); color: var(--amber); }
488
552
  .notice-btn .count {
489
553
  display: inline-block; min-width: 16px; margin-left: 6px; padding: 0 4px;
490
- border-radius: 8px; background: rgba(246, 193, 119, .18); color: var(--amber);
554
+ border-radius: 8px; background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber);
491
555
  font-size: 11px; text-align: center;
492
556
  }
493
557
  .notice-panel {
494
558
  position: fixed; top: 58px; right: 14px; z-index: 26; width: 322px; max-height: 62vh;
495
559
  display: flex; flex-direction: column; padding: 10px 10px 8px;
496
- border: 1px solid var(--line); border-radius: 12px; background: #111a1f;
560
+ border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2);
497
561
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
498
562
  }
499
563
  .notice-panel[hidden] { display: none; }
@@ -502,9 +566,9 @@
502
566
  .notice-list { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
503
567
  .notice-item {
504
568
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 9px; border-radius: 9px;
505
- border: 1px solid var(--line-soft); background: #0e1418; font-size: 12px; cursor: pointer;
569
+ border: 1px solid var(--line-soft); background: var(--bg); font-size: 12px; cursor: pointer;
506
570
  }
507
- .notice-item.unread { border-color: rgba(246, 193, 119, .35); background: rgba(246, 193, 119, .06); }
571
+ .notice-item.unread { border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: color-mix(in srgb, var(--amber) 6%, transparent); }
508
572
  .notice-item .dot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--faint); flex: none; }
509
573
  .notice-item.unread .dot { background: var(--amber); }
510
574
  .notice-item .body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
@@ -513,13 +577,13 @@
513
577
  .notice-item .when { color: var(--faint); font-size: 11px; }
514
578
  .notice-empty { padding: 14px 6px; color: var(--faint); font-size: 12px; text-align: center; }
515
579
  .composer.dragover .composer-box {
516
- border-color: rgba(94, 234, 212, .7); background: rgba(94, 234, 212, .06);
517
- box-shadow: 0 0 0 4px rgba(94, 234, 212, .12);
580
+ border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent);
581
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
518
582
  }
519
583
 
520
584
  .gate {
521
585
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
522
- background: rgba(7, 10, 12, .86); backdrop-filter: blur(8px); padding: 20px;
586
+ background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(8px); padding: 20px;
523
587
  }
524
588
  .gate[hidden] { display: none; }
525
589
  .gate-card {
@@ -533,12 +597,12 @@
533
597
  .gate-card label { display: block; color: var(--faint); font-size: 11px; }
534
598
  .gate-card input {
535
599
  display: block; width: 100%; height: 38px; margin-top: 6px; padding: 0 10px;
536
- border: 1px solid var(--line); border-radius: 8px; background: #0a1014; color: var(--text); outline: 0;
600
+ border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); outline: 0;
537
601
  }
538
- .gate-card input:focus { border-color: rgba(94, 234, 212, .48); }
602
+ .gate-card input:focus { border-color: color-mix(in srgb, var(--accent) 48%, transparent); }
539
603
  .gate-card button {
540
- width: 100%; height: 38px; margin-top: 12px; border-radius: 8px; border: 1px solid rgba(94, 234, 212, .4);
541
- background: linear-gradient(145deg, var(--accent), #35c7b5); color: var(--accent-ink); font-weight: 700;
604
+ width: 100%; height: 38px; margin-top: 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
605
+ background: var(--accent); color: var(--accent-ink); font-weight: 700;
542
606
  }
543
607
  .gate-card .error { margin: 10px 0 0; color: var(--red); font-size: 12px; min-height: 1em; }
544
608
 
@@ -548,7 +612,7 @@
548
612
  background: var(--panel); color: var(--text);
549
613
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
550
614
  }
551
- dialog::backdrop { background: rgba(5, 8, 10, .72); backdrop-filter: blur(4px); }
615
+ dialog::backdrop { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(4px); }
552
616
  .dialog-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
553
617
  .dialog-head h2 { flex: 1; margin: 0; font-size: 14px; line-height: 1.5; }
554
618
  .dialog-head button { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
@@ -556,7 +620,7 @@
556
620
  .dialog-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; color: var(--faint); font-size: 11px; }
557
621
  .dialog-body pre {
558
622
  margin: 0; padding: 13px; border-radius: 9px; border: 1px solid var(--line-soft);
559
- background: #0a0f12; font: 12px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word;
623
+ background: var(--bg); font: 12px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word;
560
624
  }
561
625
  .dialog-report { font-size: 12.5px; line-height: 1.7; }
562
626
  .dialog-report h1, .dialog-report h2, .dialog-report h3, .dialog-report h4 {
@@ -568,7 +632,7 @@
568
632
  .dialog-report ul, .dialog-report ol { margin: 0 0 10px; padding-left: 22px; }
569
633
  .dialog-report li { margin: 3px 0; }
570
634
  .dialog-report code {
571
- padding: 1px 5px; border-radius: 5px; background: rgba(94, 234, 212, .1);
635
+ padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 10%, transparent);
572
636
  font: 11.5px var(--mono); color: var(--text);
573
637
  }
574
638
  .dialog-report pre { margin: 10px 0; }
@@ -588,7 +652,7 @@
588
652
  .lane-group {
589
653
  margin: 0 0 18px; padding: 10px 12px 12px;
590
654
  border: 1px solid var(--line-soft); border-radius: 12px;
591
- background: rgba(16, 23, 28, .72);
655
+ background: var(--panel);
592
656
  animation: rise .18s ease-out;
593
657
  }
594
658
  .lane-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--faint); font-size: 11px; letter-spacing: .03em; }
@@ -596,7 +660,7 @@
596
660
  .lane-group-head.done .dot { background: var(--green); animation: none; }
597
661
  .lane {
598
662
  position: relative; margin-top: 8px; padding: 10px 11px;
599
- border: 1px solid var(--line-soft); border-radius: 10px; background: #0f1519;
663
+ border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel);
600
664
  }
601
665
  .lane:first-of-type { margin-top: 0; }
602
666
  .lane::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--line); }
@@ -612,18 +676,18 @@
612
676
  .lane-time { flex: none; padding-top: 1px; color: var(--faint); font: 10.5px var(--mono); white-space: nowrap; }
613
677
  .lane-stop {
614
678
  flex: none; height: 22px; padding: 0 9px; border-radius: 999px; cursor: pointer;
615
- border: 1px solid rgba(255, 123, 114, .3); background: rgba(255, 123, 114, .06);
679
+ border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 6%, transparent);
616
680
  color: var(--red); font-size: 10.5px;
617
681
  }
618
- .lane-stop:hover { background: rgba(255, 123, 114, .13); }
682
+ .lane-stop:hover { background: color-mix(in srgb, var(--red) 13%, transparent); }
619
683
  .lane-stop:disabled { opacity: .55; cursor: default; }
620
684
  .steps { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
621
685
  .step { display: flex; align-items: flex-start; gap: 7px; color: var(--faint); font-size: 11px; line-height: 1.5; }
622
- .step .sdot { flex: none; width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: #3a4a55; }
686
+ .step .sdot { flex: none; width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: var(--line-strong); }
623
687
  .step.completed { color: var(--muted); }
624
688
  .step.completed .sdot { background: var(--green); }
625
689
  .step.running .sdot { background: var(--amber); animation: blink 1.1s infinite; }
626
- .step.failed { color: #ffb4ae; }
690
+ .step.failed { color: var(--red); }
627
691
  .step.failed .sdot { background: var(--red); }
628
692
  .lane-progress-text { margin-top: 5px; color: var(--faint); font-size: 10.5px; }
629
693
 
@@ -631,7 +695,7 @@
631
695
  .sched-rail {
632
696
  position: fixed; top: 58px; right: 0; bottom: 0; z-index: 19;
633
697
  width: 320px; display: flex; flex-direction: column;
634
- border-left: 1px solid var(--line); background: #0d1317;
698
+ border-left: 1px solid var(--line); background: var(--bg);
635
699
  box-shadow: -18px 0 50px rgba(0, 0, 0, .32);
636
700
  transition: transform .18s ease-out;
637
701
  }
@@ -639,9 +703,9 @@
639
703
  position: absolute; left: 0; top: 10px; z-index: 2;
640
704
  width: 27px; height: 27px; padding: 0;
641
705
  border: 1px solid var(--line); border-left: 0; border-radius: 0 7px 7px 0;
642
- background: #162027; color: var(--muted); font-size: 14px; line-height: 1;
706
+ background: var(--panel-2); color: var(--muted); font-size: 14px; line-height: 1;
643
707
  }
644
- .rail-toggle:hover { color: var(--text); background: #1c2831; }
708
+ .rail-toggle:hover { color: var(--text); background: var(--panel-2); }
645
709
  .rail-strip { display: none; }
646
710
  body.rail-collapsed .sched-rail { transform: translateX(calc(100% - 34px)); }
647
711
  body.rail-collapsed .rail-main { visibility: hidden; }
@@ -655,7 +719,7 @@
655
719
  }
656
720
  .rail-count {
657
721
  min-width: 18px; padding: 1px 4px; border-radius: 9px; text-align: center;
658
- background: rgba(246, 193, 119, .16); color: var(--amber); font-size: 10px;
722
+ background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); font-size: 10px;
659
723
  }
660
724
  .rail-count[hidden] { display: none; }
661
725
  .rail-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
@@ -671,15 +735,15 @@
671
735
  position: relative; aspect-ratio: 1 / 1; min-width: 0; overflow: hidden;
672
736
  display: flex; flex-direction: column; gap: 3px;
673
737
  padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: 10px;
674
- background: #10171c; color: var(--text); text-align: left;
738
+ background: var(--panel-2); color: var(--text); text-align: left;
675
739
  }
676
- .rail-card:hover { border-color: #35464f; background: #131c22; }
677
- .rail-card.current { border-color: #3a5a52; background: #101b1a; }
678
- .rail-card.k-attention, .rail-card.k-approval { border-color: rgba(246, 193, 119, .42); background: rgba(246, 193, 119, .05); }
679
- .rail-card.k-failed { border-color: rgba(255, 123, 114, .32); }
680
- .rail-card.k-done { border-color: rgba(99, 214, 164, .22); }
740
+ .rail-card:hover { border-color: var(--line-strong); background: var(--panel-2); }
741
+ .rail-card.current { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--panel-2); }
742
+ .rail-card.k-attention, .rail-card.k-approval { border-color: color-mix(in srgb, var(--amber) 42%, transparent); background: color-mix(in srgb, var(--amber) 5%, transparent); }
743
+ .rail-card.k-failed { border-color: color-mix(in srgb, var(--red) 32%, transparent); }
744
+ .rail-card.k-done { border-color: color-mix(in srgb, var(--green) 22%, transparent); }
681
745
  .rail-card-top { display: flex; align-items: center; gap: 5px; min-width: 0; }
682
- .rail-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #3a4a55; }
746
+ .rail-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
683
747
  .rail-dot.running { background: var(--amber); animation: blink 1.1s infinite; }
684
748
  .rail-dot.attention, .rail-dot.approval { background: var(--amber); }
685
749
  .rail-dot.done { background: var(--green); }
@@ -716,7 +780,7 @@
716
780
  .rail-detail-facts { color: var(--faint); font-size: 10.5px; line-height: 1.55; }
717
781
  .rail-run {
718
782
  margin-bottom: 8px; padding: 8px 9px; border-radius: 9px;
719
- border: 1px solid var(--line-soft); background: #0e1418;
783
+ border: 1px solid var(--line-soft); background: var(--bg);
720
784
  }
721
785
  .rail-run:last-child { margin-bottom: 0; }
722
786
  .rail-run-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
@@ -738,27 +802,27 @@
738
802
 
739
803
  .summary {
740
804
  margin-top: 10px; padding: 10px 11px; border-radius: 10px;
741
- border: 1px solid rgba(99, 214, 164, .28); background: rgba(99, 214, 164, .05);
805
+ border: 1px solid color-mix(in srgb, var(--green) 28%, transparent); background: color-mix(in srgb, var(--green) 5%, transparent);
742
806
  }
743
- .summary.bad { border-color: rgba(255, 123, 114, .3); background: rgba(255, 123, 114, .05); }
807
+ .summary.bad { border-color: color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 5%, transparent); }
744
808
  .summary .st { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
745
809
  .summary .sd { margin-top: 3px; color: var(--faint); font-size: 11px; }
746
810
  .artifacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
747
811
  .artifact {
748
812
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
749
813
  padding: 4px 9px; border-radius: 8px; text-decoration: none;
750
- border: 1px solid rgba(94, 234, 212, .3); background: rgba(94, 234, 212, .07); color: #bdf3e8;
814
+ border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--accent);
751
815
  font-size: 11.5px; font-family: inherit; text-align: left; cursor: pointer;
752
816
  }
753
- .artifact:hover { background: rgba(94, 234, 212, .14); }
817
+ .artifact:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
754
818
  .artifact .ak { color: var(--faint); font: 10px var(--mono); }
755
819
  .artifact .an { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
756
820
  .sum-run { margin-top: 8px; }
757
821
  .sum-run-title { color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }
758
- .msg.flash .bubble { box-shadow: 0 0 0 3px rgba(94, 234, 212, .18); transition: box-shadow .2s; }
822
+ .msg.flash .bubble { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); transition: box-shadow .2s; }
759
823
 
760
824
  /* ---- drawers ---- */
761
- .scrim { position: fixed; inset: 58px 0 0; z-index: 20; background: rgba(5, 8, 10, .55); backdrop-filter: blur(2px); }
825
+ .scrim { position: fixed; inset: 58px 0 0; z-index: 20; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(2px); }
762
826
  .scrim[hidden] { display: none; }
763
827
  .drawer {
764
828
  position: fixed; top: 58px; right: 0; bottom: 0; z-index: 21;
@@ -785,17 +849,17 @@
785
849
  .adv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
786
850
  .adv-note { margin: 8px 0 0; color: var(--faint); font-size: 11px; line-height: 1.6; }
787
851
  .adv-runs { display: flex; flex-direction: column; gap: 8px; }
788
- .adv-run { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line-soft); background: #0e1418; }
852
+ .adv-run { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line-soft); background: var(--bg); }
789
853
  .adv-run .t { color: var(--muted); font-size: 11.5px; margin-bottom: 3px; word-break: break-word; }
790
854
  .adv-run .m { color: var(--faint); font: 10.5px var(--mono); word-break: break-all; }
791
855
  .adv-run .btn { margin-top: 7px; }
792
856
  .hist-item {
793
857
  display: block; width: 100%; margin-bottom: 10px; padding: 10px 11px;
794
- border: 1px solid var(--line-soft); border-radius: 10px; background: #0f1519;
858
+ border: 1px solid var(--line-soft); border-radius: 10px; background: var(--panel);
795
859
  color: var(--text); text-align: left; cursor: pointer;
796
860
  }
797
- .hist-item:hover { border-color: #35464f; }
798
- .hist-item.current { border-color: #3a5a52; background: #101b1a; cursor: default; }
861
+ .hist-item:hover { border-color: var(--line-strong); }
862
+ .hist-item.current { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--panel-2); cursor: default; }
799
863
  .hist-state + .hist-state { margin-left: 6px; }
800
864
  .hist-top { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 10.5px; }
801
865
  .hist-state { margin-left: auto; }
@@ -815,6 +879,80 @@
815
879
  .rail-body { padding-left: 14px; }
816
880
  .rail-grid { gap: 7px; }
817
881
  }
882
+
883
+ /* ——— 控件与宿主对齐 ———
884
+ 尺寸取自宿主的输入栏与设置页:按钮 32px 高、8px 圆角、13px/500;
885
+ 输入框无边框、底色用 specific-input-major;焦点环 2px 用
886
+ state-business-primary;滚动条用 scrollbar-bg-l1。 */
887
+ :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
888
+ .btn, .examples button, .free button, .wiz-primary, .wiz-secondary,
889
+ .gate-card button, .approval-card .options button, .msg-actions button,
890
+ .rail-toggle, .drawer-close, .adv-actions .btn {
891
+ height: 32px; padding: 0 12px; border-radius: 8px;
892
+ font-size: 13px; font-weight: 500;
893
+ transition: background .12s ease, border-color .12s ease, color .12s ease;
894
+ }
895
+ .btn { border-color: var(--line); background: transparent; color: var(--muted); }
896
+ .btn:hover, .examples button:hover, .wiz-secondary:hover, .rail-toggle:hover,
897
+ .drawer-close:hover, .approval-card .options button:hover {
898
+ background: var(--hover); color: var(--text); border-color: transparent;
899
+ }
900
+ .btn:active, .examples button:active, .free button:active, .wiz-primary:active,
901
+ .wiz-secondary:active, .gate-card button:active, .approval-card .options button:active,
902
+ .msg-actions button:active, .rail-toggle:active, .drawer-close:active { background: var(--active); }
903
+ .btn:disabled, .free button:disabled, .wiz-primary:disabled, .wiz-secondary:disabled,
904
+ .gate-card button:disabled {
905
+ opacity: .4; cursor: default; pointer-events: none;
906
+ }
907
+ .wiz-primary, .send, .gate-card button, .free button {
908
+ border-color: transparent; background: var(--primary-bg); color: var(--primary-fg);
909
+ }
910
+ .wiz-primary:hover, .gate-card button:hover, .free button:hover {
911
+ background: color-mix(in srgb, var(--primary-bg) 88%, var(--text)); color: var(--primary-fg);
912
+ }
913
+ .send { width: 32px; height: 32px; padding: 0; border-radius: 999px; }
914
+ .btn.danger, .approval-card .options button.reject { color: var(--red); }
915
+ .btn.danger:hover, .approval-card .options button.reject:hover {
916
+ background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red);
917
+ }
918
+ .btn.tiny { height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; }
919
+
920
+ .free input, .wiz-field input, .gate-card input, .composer textarea, .composer-box {
921
+ background: var(--input-bg); color: var(--text);
922
+ }
923
+ .free input, .wiz-field input, .gate-card input { border-radius: 8px; }
924
+ .composer-box { border-radius: var(--radius); }
925
+ .composer-box:focus-within {
926
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
927
+ }
928
+ .free input:focus, .wiz-field input:focus, .gate-card input:focus {
929
+ border-color: var(--accent);
930
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
931
+ outline: 0;
932
+ }
933
+
934
+ .segmented { border-color: transparent; background: var(--hover); border-radius: 8px; }
935
+ .segmented button { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12px; }
936
+ .segmented button.active { background: var(--card-bg); color: var(--text); }
937
+
938
+ .badge, .status-pill, .tool-name, .wiz-badge, .rail-state, .count {
939
+ border-radius: 999px; font-size: 12px; font-weight: 500;
940
+ }
941
+ .rail-card, .notice-item, .hist-item, .summary, .artifact, .tool, .msg .bubble {
942
+ border-radius: 12px;
943
+ }
944
+ .toast { background: var(--toast-bg); color: var(--toast-fg); border-radius: 12px; font-size: 13px; }
945
+ .toast.ok, .toast.warn, .toast.err { background: var(--toast-bg); }
946
+
947
+ :root { --divider: var(--line-soft); }
948
+ *::-webkit-scrollbar { width: 10px; height: 10px; }
949
+ *::-webkit-scrollbar-track { background: transparent; }
950
+ *::-webkit-scrollbar-thumb {
951
+ background: var(--scroll-thumb); border: 3px solid transparent;
952
+ background-clip: padding-box; border-radius: 999px;
953
+ }
954
+ *::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
955
+ * { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
818
956
  </style>
819
957
  </head>
820
958
  <body>