@jacksontian/kite-server 0.4.0 → 0.5.0

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/web/style.css ADDED
@@ -0,0 +1,486 @@
1
+ /**
2
+ * Kite 控制台单页应用样式(视觉层像素级对齐 mwt:同一套色板/尺寸/组件样式,见 .mwt-src 参照):
3
+ * 移动端与 PC 端共用一份 HTML,触屏差异(按键工具条等)用媒体查询
4
+ */
5
+
6
+ :root {
7
+ --radius: 6px;
8
+ --radius-sm: 4px;
9
+ --transition: 150ms ease;
10
+ }
11
+
12
+ /* mwt 色板(dark):--bg/--panel/--line 等旧名保留给业务语义(状态色/表单),组件外观走 mwt 变量 */
13
+ [data-theme="dark"], :root:not([data-theme]) {
14
+ --bg-primary: #0c0e14;
15
+ --bg-secondary: #151824;
16
+ --bg-tertiary: #1c2035;
17
+ --bg-toolbar: #121520;
18
+ --bg-hover: #252a3d;
19
+ --bg-active: #2d3352;
20
+ --accent: #6c8cff;
21
+ --accent-hover: #8aa4ff;
22
+ --shortcut-terminal-accent: #6c8cff;
23
+ --shortcut-navigation-accent: #48c7a6;
24
+ --shortcut-window-accent: #c587ff;
25
+ --text-primary: #d4d8e8;
26
+ --text-secondary: #9aa3bc;
27
+ --text-dim: #6f788f;
28
+ --border: #252a3d;
29
+ --pane-border-idle: #1e2333;
30
+ --danger: #e05560;
31
+ --danger-hover: #ff6b76;
32
+ --terminal-bg: #0a0c12;
33
+ --pane-header: #141725;
34
+ }
35
+
36
+ [data-theme="light"] {
37
+ --bg-primary: #f0f2f5;
38
+ --bg-secondary: #e4e7ec;
39
+ --bg-tertiary: #d8dce4;
40
+ --bg-toolbar: #ffffff;
41
+ --bg-hover: #dde0e8;
42
+ --bg-active: #cdd2de;
43
+ --accent: #4a6cf7;
44
+ --accent-hover: #3955d4;
45
+ --shortcut-terminal-accent: #4a6cf7;
46
+ --shortcut-navigation-accent: #1f9d7a;
47
+ --shortcut-window-accent: #8c5cf6;
48
+ --text-primary: #1a1d2e;
49
+ --text-secondary: #5a6178;
50
+ --text-dim: #9098b0;
51
+ --border: #d0d5e0;
52
+ --pane-border-idle: #c5cad6;
53
+ --danger: #d43d4e;
54
+ --danger-hover: #c02838;
55
+ --terminal-bg: #ffffff;
56
+ --pane-header: #f5f6f9;
57
+ }
58
+
59
+ /* 业务状态色(与 mwt 无关的既有语义,保持不变) */
60
+ :root {
61
+ --bg: var(--bg-primary); --panel: var(--bg-secondary); --line: var(--border);
62
+ --text: var(--text-primary); --dim: var(--text-secondary);
63
+ --ok: #22c55e; --err: #ef4444; --warn: #f59e0b;
64
+ --term-bg: var(--terminal-bg);
65
+ --head: var(--pane-header);
66
+ }
67
+ :root[data-theme="light"] { --ok: #16a34a; --err: #dc2626; --warn: #d97706; }
68
+
69
+ * { box-sizing: border-box; margin: 0; padding: 0; }
70
+
71
+ html, body {
72
+ height: 100%;
73
+ overflow: hidden;
74
+ background: var(--bg-primary);
75
+ color: var(--text-primary);
76
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "PingFang SC", sans-serif;
77
+ font-size: 13px;
78
+ }
79
+
80
+ body {
81
+ display: flex;
82
+ flex-direction: column;
83
+ height: 100dvh;
84
+ }
85
+
86
+ /* ---------- 单页骨架:topbar 吸顶(mwt #toolbar:42px、bg-toolbar、1px 底边) ---------- */
87
+ #topbar {
88
+ flex: none; position: relative;
89
+ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
90
+ min-height: 42px; padding: 4px 12px;
91
+ padding-top: max(4px, env(safe-area-inset-top));
92
+ background: var(--bg-toolbar); border-bottom: 1px solid var(--border);
93
+ gap: 8px;
94
+ }
95
+ .tb-left, .tb-right {
96
+ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; flex: 1;
97
+ }
98
+ .tb-right { justify-content: flex-end; gap: 4px; }
99
+
100
+ #hd-logo { width: 16px; height: 16px; flex: none; }
101
+ #hd-title { font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text-primary); margin-right: 4px; }
102
+
103
+ /* 新建会话:mwt #btn-new-terminal(accent 实心、白字、+ 图标) */
104
+ #hdr-new-session {
105
+ display: inline-flex; align-items: center; gap: 6px;
106
+ padding: 5px 14px; background: var(--accent); color: #fff;
107
+ border: none; border-radius: var(--radius);
108
+ font-size: 12px; font-weight: 500; cursor: pointer;
109
+ transition: background var(--transition); white-space: nowrap;
110
+ }
111
+ #hdr-new-session:hover { background: var(--accent-hover); }
112
+ #hdr-new-session:disabled { opacity: .5; cursor: default; }
113
+ #hdr-new-session .ic { width: 12px; height: 12px; }
114
+
115
+ /* Worker 状态簇:Worker 下拉 + 在线状态 + 连接通道 合并为一个胶囊(mwt 分段容器样式) */
116
+ #worker-cluster {
117
+ display: inline-flex; align-items: stretch; min-width: 0; height: 30px;
118
+ background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
119
+ overflow: hidden;
120
+ }
121
+ #worker-cluster:focus-within { border-color: var(--accent); }
122
+ #worker-cluster > * + * { border-left: 1px solid var(--border); }
123
+ #hdr-worker {
124
+ width: auto; max-width: min(24vw, 140px); height: 100%; font-size: 12px; padding: 0 6px; cursor: pointer;
125
+ background: transparent; color: var(--text-secondary); border: none;
126
+ white-space: nowrap; text-overflow: ellipsis;
127
+ }
128
+ #hdr-worker:hover { background: var(--bg-hover); color: var(--text-primary); }
129
+ #hdr-worker:focus { outline: none; }
130
+ #worker-status, #conn-mode {
131
+ display: inline-flex; align-items: center; padding: 0 6px;
132
+ color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
133
+ }
134
+ #worker-status { font-size: 12px; max-width: min(22vw, 100px); }
135
+ #conn-mode { font-size: 11px; max-width: 12vw; }
136
+ #conn-mode.realtime, #worker-status.online { color: var(--ok); }
137
+ #conn-mode.polling { color: var(--warn); }
138
+ #worker-status.offline { color: var(--err); }
139
+
140
+ /* 项目目录下拉 + 右上角图标钮:mwt 工具条按钮(30px、bg-secondary、1px 边、圆角 6) */
141
+ #hdr-project, #hdr-theme, #hdr-fullscreen, #hdr-settings {
142
+ display: inline-flex; align-items: center; justify-content: center; gap: 6px;
143
+ height: 30px; padding: 0 8px;
144
+ background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
145
+ color: var(--text-secondary); font-size: 12px; cursor: pointer;
146
+ transition: all var(--transition); white-space: nowrap;
147
+ }
148
+ #hdr-theme { width: 30px; padding: 0; }
149
+ #hdr-project { width: auto; max-width: 40vw; text-overflow: ellipsis; }
150
+ #hdr-project:disabled { opacity: .5; cursor: default; }
151
+ #hdr-project:hover:not(:disabled), #hdr-theme:hover, #hdr-fullscreen:hover, #hdr-settings:hover {
152
+ background: var(--bg-hover); color: var(--text-primary);
153
+ }
154
+ #hdr-project:focus, #hdr-theme:focus, #hdr-fullscreen:focus, #hdr-settings:focus {
155
+ outline: none; border-color: var(--accent);
156
+ }
157
+
158
+ /* 终端布局切换器:mwt .layout-switcher(分段组,活动段 bg-active + accent 字) */
159
+ #term-layout-btns {
160
+ display: inline-flex; align-items: stretch;
161
+ background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border);
162
+ overflow: hidden;
163
+ }
164
+ #term-layout-btns button {
165
+ display: flex; align-items: center; justify-content: center; gap: 5px;
166
+ padding: 5px 10px; background: transparent; color: var(--text-secondary);
167
+ border: none; font-size: 12px; cursor: pointer;
168
+ transition: all var(--transition); white-space: nowrap;
169
+ }
170
+ #term-layout-btns button:not(:last-child) { border-right: 1px solid var(--border); }
171
+ #term-layout-btns button:hover { background: var(--bg-hover); color: var(--text-primary); }
172
+ #term-layout-btns button.active { background: var(--bg-active); color: var(--accent); }
173
+ #term-layout-btns .ic { width: 16px; height: 16px; flex-shrink: 0; }
174
+
175
+ /* ---------- 会话 tab 条:仅「标签页」布局且有会话时显示(mwt #tab-bar:34px、bg-toolbar、1px 底边) ---------- */
176
+ #tabs {
177
+ flex: none; display: flex; align-items: flex-end;
178
+ height: 34px; padding: 0 8px;
179
+ background: var(--bg-toolbar); border-bottom: 1px solid var(--border);
180
+ }
181
+ #tab-list {
182
+ flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 2px;
183
+ overflow-x: auto;
184
+ }
185
+ #tab-list::-webkit-scrollbar { height: 2px; }
186
+ #tab-list::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 1px; }
187
+
188
+ .term-tab {
189
+ display: flex; align-items: center; gap: 8px;
190
+ padding: 6px 14px;
191
+ background: var(--bg-secondary); color: var(--text-secondary);
192
+ border: 1px solid var(--border); border-bottom: none;
193
+ border-radius: var(--radius-sm) var(--radius-sm) 0 0;
194
+ font-size: 12px; cursor: pointer; transition: all var(--transition);
195
+ white-space: nowrap; min-width: 0; max-width: 180px; flex: none; user-select: none;
196
+ }
197
+ .term-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
198
+ .term-tab.active { background: var(--terminal-bg); color: var(--accent); border-color: var(--border); }
199
+ .term-tab .tt-title { overflow: hidden; text-overflow: ellipsis; }
200
+ .term-tab.pending { color: var(--warn); }
201
+ .term-tab.pending.active { color: var(--warn); }
202
+ .term-tab.ended { opacity: .6; }
203
+ /* 活动圆点:新输出标记(mwt 活动点为 accent 色 + 呼吸动画) */
204
+ .term-tab .tt-dot {
205
+ flex: none; width: 6px; height: 6px; border-radius: 50%;
206
+ background: var(--accent); display: none;
207
+ }
208
+ .term-tab.dirty .tt-dot { display: block; animation: activity-pulse 1.2s ease-in-out infinite; }
209
+ .term-tab .tt-close {
210
+ display: flex; align-items: center; justify-content: center;
211
+ width: 16px; height: 16px; flex: none; border: none; background: none; padding: 0;
212
+ border-radius: var(--radius-sm); color: var(--text-dim); font-size: 14px; line-height: 1;
213
+ cursor: pointer; transition: all var(--transition);
214
+ }
215
+ .term-tab .tt-close:hover { background: var(--danger); color: #fff; }
216
+
217
+ @keyframes activity-pulse {
218
+ 0%, 100% { opacity: 1; }
219
+ 50% { opacity: 0.2; }
220
+ }
221
+
222
+ /* ---------- 工作台 ---------- */
223
+ #content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
224
+ #view-main {
225
+ flex: 1; min-height: 0; display: flex; flex-direction: column;
226
+ position: relative; background: var(--bg-primary); overflow: hidden;
227
+ }
228
+ #workspace { flex: 1; min-height: 0; display: flex; flex-direction: column; }
229
+
230
+ /* 终端容器:mwt #terminal-container(2px 缝隙,窗格自带 1px 边) */
231
+ #term-body { flex: 1; min-height: 0; position: relative; background: var(--bg-primary); }
232
+ #term-body.tiled {
233
+ display: grid; gap: 2px; padding: 2px;
234
+ grid-auto-rows: minmax(0, 1fr);
235
+ }
236
+ #term-body.tiled[data-layout='grid'] { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
237
+ #term-body.tiled[data-layout='columns'] {
238
+ grid-auto-flow: column;
239
+ grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
240
+ }
241
+ #term-body.tiled[data-layout='rows'] { grid-template-columns: minmax(0, 1fr); }
242
+
243
+ /* 终端窗格:mwt .terminal-pane(1px 闲边、圆角 4、聚焦段 accent 边 + 外圈光) */
244
+ .term-pane {
245
+ position: absolute; inset: 0; display: none; flex-direction: column;
246
+ background: var(--terminal-bg); overflow: hidden;
247
+ }
248
+ .term-pane.active { display: flex; }
249
+ .term-pane.minimized { display: none !important; }
250
+ #term-body.tiled .term-pane {
251
+ position: relative; inset: auto; display: flex; min-width: 0; min-height: 0;
252
+ border: 1px solid var(--pane-border-idle); border-radius: var(--radius-sm);
253
+ transition: border-color var(--transition), box-shadow var(--transition);
254
+ }
255
+ #term-body.tiled .term-pane.active {
256
+ border-color: var(--accent);
257
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
258
+ z-index: 1;
259
+ }
260
+ #term-body.tiled .term-pane.active .tp-head {
261
+ background: color-mix(in srgb, var(--accent) 12%, var(--pane-header));
262
+ border-bottom-color: color-mix(in srgb, var(--accent) 35%, var(--border));
263
+ }
264
+ #term-body.tiled .term-pane.active .tp-title { color: var(--text-primary); font-weight: 500; }
265
+
266
+ #term-body.maxed .term-pane:not(.maxed) { display: none !important; }
267
+ #term-body.maxed .term-pane.maxed { display: flex; position: absolute; inset: 0; min-height: 0; }
268
+ #term-body.maxed.tiled .term-pane.maxed { border: none; border-radius: 0; }
269
+
270
+ /* 标签页布局:窗格无框无角(mwt .layout-tabs),头部整条隐藏(标题/关闭由 tab 条承接) */
271
+ #term-body[data-layout='tabs'] .term-pane { border-radius: 0; border: none; box-shadow: none; }
272
+ #term-body[data-layout='tabs'] .term-pane.active { box-shadow: inset 0 0 0 1px var(--accent); }
273
+ #term-body[data-layout='tabs'] .tp-head { display: none; }
274
+
275
+ /* 窗格头部:mwt .pane-header(28px、pane-header 底、1px 底边) */
276
+ .tp-head {
277
+ display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px;
278
+ background: var(--pane-header); border-bottom: 1px solid var(--border);
279
+ flex: none; user-select: none;
280
+ transition: background var(--transition), border-color var(--transition);
281
+ }
282
+ .tp-title {
283
+ font-size: 11px; color: var(--text-secondary);
284
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30%;
285
+ transition: color var(--transition), font-weight var(--transition);
286
+ }
287
+ .tp-status { flex: 1; font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
288
+ .tp-min, .tp-max, .tp-close {
289
+ display: flex; align-items: center; justify-content: center;
290
+ width: 18px; height: 18px; flex: none; padding: 0;
291
+ background: transparent; border: none; border-radius: var(--radius-sm);
292
+ color: var(--text-dim); font-size: 13px; line-height: 1; cursor: pointer;
293
+ transition: all var(--transition);
294
+ }
295
+ .tp-min:hover, .tp-max:hover { background: var(--bg-hover); color: var(--text-primary); }
296
+ .tp-close { font-size: 14px; }
297
+ .tp-close:hover { background: var(--danger); color: #fff; }
298
+ .tp-cancel {
299
+ flex: none; font-size: 11px; padding: 1px 8px; border-radius: var(--radius-sm); cursor: pointer;
300
+ background: none; color: var(--warn); border: 1px solid var(--warn);
301
+ }
302
+ .tp-cancel:hover { background: color-mix(in srgb, var(--warn) 12%, transparent); }
303
+ .tp-cancel:disabled { opacity: .5; cursor: default; }
304
+ /* 终端正文:mwt .terminal-body(4px 内边距) */
305
+ .tp-term { flex: 1; min-height: 0; padding: 4px; }
306
+ .tp-term .xterm { height: 100%; }
307
+ /* xterm 视口底色与主题一致,避免 vendor 默认 #000 与画布色差 */
308
+ .tp-term .xterm-viewport { overflow-y: auto !important; background-color: var(--terminal-bg) !important; }
309
+
310
+ /* 空态:mwt #empty-state(logo + 应用名 + 快捷键列表 + 操作按钮) */
311
+ #term-empty {
312
+ position: absolute; inset: 0; z-index: 10;
313
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
314
+ gap: 20px; color: var(--text-secondary); background: var(--bg-primary);
315
+ }
316
+ #term-empty .empty-state-logo { display: flex; }
317
+ #term-empty .empty-state-logo img, #term-empty .empty-state-logo svg { width: 40px; height: 40px; }
318
+ .empty-state-app-name { font-size: 16px; font-weight: 600; opacity: 0.7; letter-spacing: 0.5px; }
319
+ .empty-state-shortcuts, .empty-state-layouts {
320
+ display: flex; flex-direction: column; gap: 6px; min-width: 260px;
321
+ }
322
+ .empty-state-section {
323
+ font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
324
+ opacity: 0.5; margin-bottom: 2px;
325
+ }
326
+ .empty-state-row {
327
+ display: flex; justify-content: space-between; align-items: center;
328
+ font-size: 13px; opacity: 0.75; position: relative; padding-left: 14px;
329
+ --shortcut-accent: var(--shortcut-terminal-accent);
330
+ }
331
+ .empty-state-row::before {
332
+ content: ''; position: absolute; left: 0; top: 50%;
333
+ width: 6px; height: 6px; border-radius: 999px; transform: translateY(-50%);
334
+ background: color-mix(in srgb, var(--shortcut-accent) 80%, white);
335
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--shortcut-accent) 16%, transparent);
336
+ }
337
+ .empty-state-row[data-shortcut-kind="navigation"] { --shortcut-accent: var(--shortcut-navigation-accent); }
338
+ .empty-state-row[data-shortcut-kind="window"] { --shortcut-accent: var(--shortcut-window-accent); }
339
+ .empty-state-row kbd {
340
+ font-family: inherit; font-size: 11px;
341
+ color: color-mix(in srgb, var(--shortcut-accent) 48%, var(--text-primary));
342
+ background: color-mix(in srgb, var(--shortcut-accent) 12%, var(--bg-secondary));
343
+ border: 1px solid color-mix(in srgb, var(--shortcut-accent) 28%, var(--border));
344
+ border-radius: 999px; padding: 2px 8px; opacity: 0.9;
345
+ box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--shortcut-accent) 20%, transparent);
346
+ }
347
+ .empty-state-layout-list { font-size: 13px; opacity: 0.75; }
348
+ .empty-state-actions {
349
+ display: flex; align-items: center; justify-content: center; gap: 10px;
350
+ margin-top: 8px; flex-wrap: wrap;
351
+ }
352
+ #empty-new-session {
353
+ display: inline-flex; align-items: center; gap: 8px;
354
+ padding: 6px 16px; font-size: 13px;
355
+ background: var(--bg-secondary); color: var(--text-primary);
356
+ border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
357
+ }
358
+ #empty-new-session:hover { background: var(--bg-hover); }
359
+
360
+ /* 触屏按键工具条(手机无物理键盘):仅 (pointer: coarse) 显示 */
361
+ #term-bar { display: none; align-items: center; gap: 6px; padding: 8px; background: var(--bg-toolbar); border-top: 1px solid var(--border); }
362
+ #term-bar button {
363
+ min-width: 44px; padding: 9px 0; font-size: 13px; border-radius: var(--radius);
364
+ background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border);
365
+ }
366
+ #term-bar-status { flex: 1; font-size: 11px; color: var(--text-dim); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
367
+ /* 手机键盘代理:藏在屏幕外承接击键 */
368
+ #term-input { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: .01; border: none; }
369
+
370
+ /* ---------- 页面级状态栏:mwt #statusbar(22px、bg-toolbar、1px 顶边、11px dim 字) ---------- */
371
+ #status-bar {
372
+ flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
373
+ height: calc(22px + env(safe-area-inset-bottom));
374
+ padding: 0 12px env(safe-area-inset-bottom);
375
+ background: var(--bg-toolbar); border-top: 1px solid var(--border);
376
+ font-size: 11px; color: var(--text-dim); user-select: none; white-space: nowrap;
377
+ }
378
+ .sb-left, .sb-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
379
+ .sb-left { flex: 1; }
380
+ #tf-active { overflow: hidden; text-overflow: ellipsis; }
381
+ #tf-hints { overflow: hidden; text-overflow: ellipsis; }
382
+
383
+ /* 最小化栏:mwt #minimized-bar(停靠图标:bg-tertiary、1px 边、圆角 4、11px 字,活动点亮 accent) */
384
+ #minimized-bar { display: flex; align-items: center; gap: 4px; }
385
+ .min-icon {
386
+ display: flex; align-items: center; gap: 4px; padding: 1px 6px;
387
+ background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-sm);
388
+ font-size: 11px; color: var(--text-secondary); cursor: pointer;
389
+ white-space: nowrap; flex-shrink: 0;
390
+ }
391
+ .min-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
392
+ .min-icon.dirty { border-color: var(--accent); }
393
+ .min-icon .mi-title { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
394
+ .min-icon .mi-dot {
395
+ display: none; width: 6px; height: 6px; border-radius: 50%;
396
+ background: var(--accent); flex-shrink: 0;
397
+ }
398
+ .min-icon.dirty .mi-dot { display: block; }
399
+ #min-restore-all {
400
+ flex-shrink: 0; display: flex; align-items: center; justify-content: center;
401
+ width: 16px; height: 16px; padding: 0;
402
+ background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
403
+ color: var(--text-secondary); cursor: pointer;
404
+ }
405
+ #min-restore-all:hover { background: var(--bg-hover); color: var(--text-primary); }
406
+
407
+ /* 明文 HTTP 部署的风险提示(仅非 localhost 的 http: 环境显示) */
408
+ #http-warn {
409
+ flex: none;
410
+ background: color-mix(in srgb, var(--danger) 12%, transparent);
411
+ border: 1px solid var(--danger); color: var(--danger);
412
+ border-radius: var(--radius); padding: 8px 12px; font-size: 12px; line-height: 1.6; margin: 8px 12px 0;
413
+ }
414
+
415
+ /* 设置下拉面板(topbar「设置」入口):mwt 弹层/模态风格 */
416
+ #settings-pop {
417
+ position: absolute; right: 12px; top: calc(100% + 4px); z-index: 1000;
418
+ width: 320px; max-width: calc(100vw - 24px);
419
+ background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
420
+ padding: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.25);
421
+ }
422
+ #settings-pop label { margin-top: 0; }
423
+ #secret-state { font-size: 12px; color: var(--ok); margin-top: 8px; }
424
+ .secret-row { display: flex; gap: 8px; margin-top: 4px; }
425
+ .secret-row input { flex: 1; }
426
+ #btn-eye {
427
+ flex: none; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius);
428
+ background: var(--bg-tertiary); color: var(--text-secondary); font-size: 12px; cursor: pointer;
429
+ }
430
+ #btn-eye:hover { background: var(--bg-hover); color: var(--text-primary); }
431
+ #btn-eye.on { color: var(--accent); border-color: var(--accent); }
432
+
433
+ label { display: block; font-size: 12px; color: var(--text-secondary); margin: 10px 0 4px; }
434
+ input, textarea, select {
435
+ width: 100%; background: var(--bg-tertiary); color: var(--text-primary);
436
+ border: 1px solid var(--border); border-radius: var(--radius-sm);
437
+ padding: 8px 10px; font-size: 13px; font-family: inherit;
438
+ }
439
+ input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
440
+
441
+ /* 滚动条:mwt 同款(8px、dim 滑块) */
442
+ ::-webkit-scrollbar { width: 8px; }
443
+ ::-webkit-scrollbar-track { background: transparent; }
444
+ ::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 4px; }
445
+ ::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
446
+
447
+ #toast {
448
+ position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
449
+ background: rgba(0,0,0,.8); color: #fff; padding: 8px 16px; border-radius: var(--radius);
450
+ font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none;
451
+ }
452
+ .hidden { display: none !important; }
453
+
454
+ /* 图标:内联 SVG sprite(自包含,不走 CDN),currentColor 随按钮文字变色 */
455
+ .ic { width: 14px; height: 14px; flex: none; }
456
+ #topbar button, .secret-row button { display: inline-flex; align-items: center; gap: 5px; }
457
+
458
+ /* ---------- PC(宽屏 + 精确指针):留白放宽 ---------- */
459
+ @media (min-width: 768px) and (pointer: fine) {
460
+ #topbar { padding-left: 16px; padding-right: 16px; }
461
+ #tabs { padding-left: 12px; padding-right: 12px; }
462
+ label { margin: 12px 0 5px; }
463
+ #http-warn { padding: 10px 14px; margin: 8px 16px 0; }
464
+ #btn-eye { padding: 0 14px; }
465
+ #toast { padding: 9px 18px; }
466
+ }
467
+
468
+ /* ---------- 触屏(手机/平板):按键工具条上场,快捷键提示让位 ---------- */
469
+ @media (pointer: coarse) {
470
+ #term-bar { display: flex; }
471
+ #tf-hints { display: none; }
472
+ }
473
+
474
+ /* ---------- 中等宽度(<1536px):topbar 太挤——品牌文字与布局按钮文字让位(图标+tooltip 保留),
475
+ 保住左区控件(含「新建会话」)整行排下 ---------- */
476
+ @media (max-width: 1535px) {
477
+ #hd-title { display: none; }
478
+ #term-layout-btns button { padding: 5px 8px; }
479
+ #term-layout-btns button .bl { display: none; }
480
+ }
481
+
482
+ /* ---------- 窄屏:状态栏收紧间距 ---------- */
483
+ @media (max-width: 640px) {
484
+ #status-bar { padding-left: 8px; padding-right: 8px; gap: 8px; }
485
+ .sb-left, .sb-right { gap: 8px; }
486
+ }