claude-remote 0.5.2 → 0.6.1

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/styles.css ADDED
@@ -0,0 +1,1959 @@
1
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
2
+ :root {
3
+ --keyboard-offset: 0px;
4
+ --bg: #f5f5f0;
5
+ --bg-white: #ffffff;
6
+ --bg-hover: #eeeee8;
7
+ --border: #e2e2da;
8
+ --border-light: #ebebeb;
9
+ --text: #1a1a1a;
10
+ --text-secondary: #6b6b6b;
11
+ --text-muted: #9a9a9a;
12
+ --accent: #2d8a6e;
13
+ --accent-light: #e8f5ef;
14
+ --accent-bg: #f0faf5;
15
+ --accent-active: #247a5e;
16
+ --user-accent: #1967d2;
17
+ --error: #d93025;
18
+ --error-bg: #fce8e6;
19
+ --error-border: rgba(217,48,37,.3);
20
+ --timeline: #d0d0c8;
21
+ --code-bg: #f8f8f5;
22
+ --overlay-bg: rgba(0,0,0,.35);
23
+ --overlay-heavy: rgba(0,0,0,.45);
24
+ --overlay-light: rgba(0,0,0,.25);
25
+ --shadow-sm: rgba(0,0,0,.08);
26
+ --shadow-md: rgba(0,0,0,.12);
27
+ --shadow-lg: rgba(0,0,0,.18);
28
+ --status-unstable: #d5a000;
29
+ --status-offline: #bbb;
30
+ --status-probing: #e8a000;
31
+ --ping-excellent-bg: #daf5e8;
32
+ --ping-excellent-text: #18794e;
33
+ --ping-good-bg: #dff1ff;
34
+ --ping-good-text: #0f5ea8;
35
+ --ping-warn-bg: #fff0bf;
36
+ --ping-warn-text: #9a6b00;
37
+ --ping-bad-bg: #fde2de;
38
+ --ping-bad-text: #b42318;
39
+ --ping-stale-shadow: rgba(154,107,0,.18);
40
+ --hub-overlay-bg: rgba(245,247,250,.82);
41
+ --hub-card-bg: rgba(255,255,255,.96);
42
+ --hub-card-border: rgba(33,98,76,.12);
43
+ --hub-card-shadow: rgba(18,35,28,.14);
44
+ --spinner-track: rgba(42,138,107,.16);
45
+ --user-msg-bg: #1967d2;
46
+ --user-msg-text: #fff;
47
+ --user-msg-code-bg: rgba(255,255,255,.18);
48
+ --user-msg-pre-bg: rgba(255,255,255,.12);
49
+ --user-msg-link: #b3d4ff;
50
+ --toast-bg: rgba(26,26,26,.96);
51
+ --toast-text: #fff;
52
+ --toast-border: rgba(255,255,255,.08);
53
+ --shimmer-1: rgba(45,138,110,.06);
54
+ --shimmer-2: rgba(45,138,110,.12);
55
+ --shimmer-light-1: rgba(45,138,110,.05);
56
+ --shimmer-light-2: rgba(45,138,110,.10);
57
+ --diff-del-bg: rgba(255,0,0,.06);
58
+ --diff-del-sign: #d73a49;
59
+ --diff-del-code: #6e3630;
60
+ --diff-del-ln-bg: rgba(255,0,0,.08);
61
+ --diff-add-bg: rgba(0,180,0,.06);
62
+ --diff-add-sign: #22863a;
63
+ --diff-add-code: #24602e;
64
+ --diff-add-ln-bg: rgba(0,180,0,.08);
65
+ --diff-hunk-bg: #f1f8ff;
66
+ --diff-hunk-text: #7b93a8;
67
+ --todo-done-color: #4caf50;
68
+ --todo-done-bg: #e8f5e9;
69
+ --warn-bg: #fff3e0;
70
+ --warn-text: #e8a000;
71
+ --warn-active: #d49200;
72
+ --delete-hover-bg: #f5c6c2;
73
+ --plan-icon-bg: #e8f0fe;
74
+ --plan-icon-text: #1967d2;
75
+ --banner-warn-bg: #e8a000;
76
+ --banner-warn-text: #1a1a1a;
77
+ --radius: 12px;
78
+ --radius-sm: 8px;
79
+ --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
80
+ }
81
+ html, body {
82
+ height: 100%; background: var(--bg);
83
+ color: var(--text);
84
+ font-family: 'Noto Sans SC', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
85
+ font-size: 15px; line-height: 1.65; overflow: hidden;
86
+ -webkit-font-smoothing: antialiased;
87
+ -webkit-tap-highlight-color: transparent;
88
+ -webkit-touch-callout: none;
89
+ }
90
+ .hidden { display: none !important; }
91
+
92
+ /* ===== Hub Screen ===== */
93
+ #connect-screen {
94
+ display: flex; flex-direction: column;
95
+ height: 100vh; height: 100dvh;
96
+ background: var(--bg);
97
+ }
98
+ .hub-header {
99
+ display: flex; align-items: center; justify-content: space-between;
100
+ padding: 12px 16px;
101
+ padding-top: calc(12px + env(safe-area-inset-top, 0px));
102
+ border-bottom: 1px solid var(--border);
103
+ flex-shrink: 0;
104
+ min-height: calc(52px + env(safe-area-inset-top, 0px));
105
+ }
106
+ .hub-header-left {
107
+ display: flex; align-items: center; gap: 10px;
108
+ }
109
+ .hub-logo-icon { color: var(--accent); opacity: .7; }
110
+ .hub-header-title {
111
+ font-size: 18px; font-weight: 700; color: var(--text);
112
+ }
113
+ .hub-add-btn {
114
+ width: 40px; height: 40px; border: none; border-radius: 10px;
115
+ background: transparent; color: var(--accent); cursor: pointer;
116
+ display: flex; align-items: center; justify-content: center;
117
+ transition: all .15s;
118
+ }
119
+ .hub-add-btn:hover, .hub-add-btn:active { background: var(--accent-light); }
120
+
121
+ .hub-body {
122
+ flex: 1; overflow-y: auto; overflow-x: hidden;
123
+ padding: 8px 0 24px;
124
+ -webkit-overflow-scrolling: touch;
125
+ }
126
+
127
+ .hub-empty {
128
+ display: flex; flex-direction: column; align-items: center; justify-content: center;
129
+ padding: 80px 24px; color: var(--text-muted); text-align: center;
130
+ }
131
+ .hub-empty svg { opacity: .3; margin-bottom: 16px; }
132
+ .hub-empty p { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
133
+ .hub-empty-sub { font-size: 14px; font-weight: 400; color: var(--text-muted); margin-top: 4px; }
134
+
135
+ .hub-section { padding: 0 16px; }
136
+ .hub-section-header {
137
+ font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
138
+ color: var(--text-muted); padding: 12px 0 6px;
139
+ }
140
+ .hub-card-list { display: flex; flex-direction: column; gap: 6px; }
141
+
142
+ .hub-card {
143
+ display: flex; align-items: center; gap: 12px;
144
+ padding: 14px 16px; border-radius: var(--radius);
145
+ background: var(--bg-white); border: 1px solid var(--border);
146
+ cursor: pointer; transition: all .15s;
147
+ }
148
+ .hub-card:hover, .hub-card:active { border-color: var(--accent); background: var(--accent-bg); }
149
+
150
+ .hub-card-status {
151
+ width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
152
+ }
153
+ .hub-card-status.online { background: var(--accent); }
154
+ .hub-card-status.unstable { background: var(--status-unstable); animation: pulse 1.2s infinite; }
155
+ .hub-card-status.offline { background: var(--status-offline); }
156
+ .hub-card-status.probing { background: var(--status-probing); animation: pulse 1.2s infinite; }
157
+
158
+ .hub-card-info { flex: 1; min-width: 0; }
159
+ .hub-card-name {
160
+ font-size: 15px; font-weight: 600; color: var(--text);
161
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
162
+ }
163
+ .hub-card-addr {
164
+ font-size: 13px; color: var(--text-muted); font-family: var(--mono);
165
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
166
+ }
167
+ .hub-card-side {
168
+ display: flex; flex-direction: column; align-items: center; gap: 4px;
169
+ min-width: 72px; flex-shrink: 0;
170
+ }
171
+ .hub-card-ping {
172
+ min-width: 58px; padding: 3px 8px; border-radius: 999px;
173
+ font-size: 11px; font-weight: 700; text-align: center;
174
+ background: var(--bg-hover); color: var(--text-muted);
175
+ }
176
+ .hub-card-ping.excellent { background: var(--ping-excellent-bg); color: var(--ping-excellent-text); }
177
+ .hub-card-ping.good { background: var(--ping-good-bg); color: var(--ping-good-text); }
178
+ .hub-card-ping.warn { background: var(--ping-warn-bg); color: var(--ping-warn-text); }
179
+ .hub-card-ping.bad { background: var(--ping-bad-bg); color: var(--ping-bad-text); }
180
+ .hub-card-ping.probing { background: var(--ping-warn-bg); color: var(--ping-warn-text); }
181
+ .hub-card-ping.offline { background: var(--bg-hover); color: var(--text-muted); }
182
+ .hub-card-ping.stale { box-shadow: inset 0 0 0 1px var(--ping-stale-shadow); }
183
+ .hub-card-time {
184
+ font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0;
185
+ }
186
+ .hub-card-edit {
187
+ width: 32px; height: 32px; border: none; border-radius: 8px;
188
+ background: transparent; color: var(--text-muted); cursor: pointer;
189
+ display: flex; align-items: center; justify-content: center;
190
+ transition: all .15s; flex-shrink: 0;
191
+ }
192
+ .hub-card-edit:hover, .hub-card-edit:active { background: var(--bg-hover); color: var(--text); }
193
+
194
+ @media (max-width: 420px) {
195
+ .hub-card { gap: 10px; padding: 12px 14px; }
196
+ .hub-card-side { min-width: 62px; }
197
+ .hub-card-ping { min-width: 52px; padding: 3px 6px; }
198
+ }
199
+
200
+ #hub-connect-overlay {
201
+ position: fixed; inset: 0;
202
+ background: var(--hub-overlay-bg);
203
+ backdrop-filter: blur(6px);
204
+ display: none; align-items: center; justify-content: center;
205
+ z-index: 180;
206
+ }
207
+ #hub-connect-overlay.visible { display: flex; }
208
+ .hub-connect-card {
209
+ width: min(280px, calc(100vw - 32px));
210
+ padding: 22px 20px;
211
+ border-radius: 18px;
212
+ background: var(--hub-card-bg);
213
+ border: 1px solid var(--hub-card-border);
214
+ box-shadow: 0 16px 40px var(--hub-card-shadow);
215
+ text-align: center;
216
+ }
217
+ .hub-connect-spinner {
218
+ width: 34px; height: 34px; margin: 0 auto 14px;
219
+ border-radius: 50%;
220
+ border: 3px solid var(--spinner-track);
221
+ border-top-color: var(--accent);
222
+ animation: spin .8s linear infinite;
223
+ }
224
+ .hub-connect-title {
225
+ font-size: 17px; font-weight: 700; color: var(--text);
226
+ }
227
+ .hub-connect-sub {
228
+ margin-top: 6px;
229
+ font-size: 13px; color: var(--text-muted);
230
+ word-break: break-word;
231
+ }
232
+
233
+ /* Hub Add/Edit Dialog */
234
+ #hub-add-overlay {
235
+ position: fixed; inset: 0; background: var(--overlay-bg);
236
+ display: none; align-items: flex-end; justify-content: center;
237
+ z-index: 200;
238
+ }
239
+ #hub-add-overlay.visible { display: flex; }
240
+ #hub-add-dialog {
241
+ width: 100%; max-width: 420px;
242
+ background: var(--bg-white); border-radius: 16px 16px 0 0;
243
+ padding: 24px 20px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
244
+ animation: slideUp .2s ease;
245
+ margin-bottom: var(--keyboard-offset);
246
+ max-height: calc(100dvh - var(--keyboard-offset) - env(safe-area-inset-top, 0px) - 12px);
247
+ overflow-y: auto;
248
+ -webkit-overflow-scrolling: touch;
249
+ }
250
+ @keyframes slideUp { from{transform:translateY(100%)}to{transform:translateY(0)} }
251
+ .hub-dialog-title {
252
+ font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 16px;
253
+ }
254
+ .hub-dialog-label {
255
+ display: block; font-size: 13px; font-weight: 600;
256
+ color: var(--text-secondary); margin-bottom: 6px; margin-top: 12px;
257
+ }
258
+ .hub-dialog-label:first-of-type { margin-top: 0; }
259
+ #hub-dialog-addr, #hub-dialog-alias, #hub-dialog-token {
260
+ width: 100%; height: 46px; padding: 0 14px;
261
+ border: 1.5px solid var(--border); border-radius: var(--radius-sm);
262
+ font-size: 15px; color: var(--text); background: var(--bg);
263
+ outline: none; transition: border-color .15s;
264
+ }
265
+ #hub-dialog-addr { font-family: var(--mono); }
266
+ #hub-dialog-addr:focus, #hub-dialog-alias:focus, #hub-dialog-token:focus { border-color: var(--accent); }
267
+ .hub-dialog-token-row {
268
+ display: flex; gap: 8px; align-items: center;
269
+ }
270
+ .hub-dialog-token-row #hub-dialog-token { flex: 1; font-family: var(--mono); }
271
+ .hub-dialog-token-toggle {
272
+ width: 46px; height: 46px; border: 1.5px solid var(--border);
273
+ border-radius: var(--radius-sm); background: var(--bg);
274
+ color: var(--text-secondary); cursor: pointer; display: flex;
275
+ align-items: center; justify-content: center; flex-shrink: 0;
276
+ transition: border-color .15s, color .15s;
277
+ }
278
+ .hub-dialog-token-toggle:hover { border-color: var(--accent); color: var(--text); }
279
+ .hub-dialog-error {
280
+ margin-top: 8px; font-size: 13px; color: var(--error); min-height: 18px;
281
+ }
282
+ .hub-dialog-actions {
283
+ display: flex; gap: 8px; margin-top: 16px;
284
+ }
285
+ .hub-dialog-btn {
286
+ flex: 1; height: 46px; border: none; border-radius: var(--radius-sm);
287
+ font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s;
288
+ }
289
+ .hub-dialog-btn.cancel {
290
+ background: var(--bg-hover); color: var(--text-secondary);
291
+ }
292
+ .hub-dialog-btn.cancel:hover { background: var(--border); }
293
+ .hub-dialog-btn.save {
294
+ background: var(--accent); color: #fff;
295
+ }
296
+ .hub-dialog-btn.save:hover { background: var(--accent-active); }
297
+ .hub-dialog-btn.delete {
298
+ background: var(--error-bg); color: var(--error); flex: 0 0 auto; padding: 0 20px;
299
+ }
300
+ .hub-dialog-btn.delete:hover { background: var(--delete-hover-bg); }
301
+
302
+ /* ===== Main App ===== */
303
+ #app {
304
+ display: flex; flex-direction: column;
305
+ height: 100vh; height: 100dvh;
306
+ }
307
+
308
+ /* ===== Header ===== */
309
+ header {
310
+ display: flex; align-items: center; justify-content: space-between;
311
+ padding: 10px 12px;
312
+ padding-top: 10px;
313
+ padding-top: calc(16px + env(safe-area-inset-top, 0px));
314
+ background: var(--bg);
315
+ border-bottom: 1px solid var(--border);
316
+ flex-shrink: 0; z-index: 10;
317
+ gap: 0;
318
+ min-height: 56px;
319
+ min-height: calc(56px + env(safe-area-inset-top, 0px));
320
+ }
321
+ .header-left {
322
+ display: flex; align-items: center; gap: 8px;
323
+ min-width: 0; flex: 1;
324
+ }
325
+ .header-info { min-width: 0; flex: 1; }
326
+ .header-left h1 {
327
+ font-size: 14px; font-weight: 600; color: var(--text);
328
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
329
+ line-height: 1.3;
330
+ }
331
+ .header-meta {
332
+ font-size: 11px; color: var(--text-muted); font-weight: 400;
333
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
334
+ display: flex; align-items: center; gap: 6px; line-height: 1.3;
335
+ }
336
+ .hbtn {
337
+ width: 40px; height: 40px; border: none; border-radius: 10px;
338
+ background: transparent; color: var(--text-muted); cursor: pointer;
339
+ display: flex; align-items: center; justify-content: center;
340
+ transition: all 0.15s; flex-shrink: 0;
341
+ }
342
+ .hbtn:hover, .hbtn:active { background: var(--bg-hover); color: var(--text); }
343
+ .status-dot {
344
+ width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
345
+ }
346
+ .status-dot.connected { background: var(--accent); }
347
+ .status-dot.disconnected { background: var(--error); }
348
+ .status-dot.starting { background: var(--status-probing); animation: pulse 1.2s infinite; }
349
+ @keyframes pulse { 0%,100%{opacity:1}50%{opacity:.3} }
350
+
351
+ /* ===== Chat Area ===== */
352
+ #chat-area {
353
+ flex: 1; overflow-y: auto; overflow-x: hidden;
354
+ padding: 0 0 16px;
355
+ -webkit-overflow-scrolling: touch;
356
+ overscroll-behavior: contain;
357
+ min-height: 0;
358
+ }
359
+ #chat-area::-webkit-scrollbar { width: 3px; }
360
+ #chat-area::-webkit-scrollbar-thumb { background: var(--timeline); border-radius: 2px; }
361
+ #messages { max-width: 720px; margin: 0 auto; padding: 12px 16px; }
362
+
363
+ /* ===== User Message ===== */
364
+ .user-msg {
365
+ margin: 16px 0 8px;
366
+ margin-left: auto;
367
+ max-width: 80%;
368
+ width: fit-content;
369
+ padding: 10px 16px;
370
+ background: var(--user-msg-bg);
371
+ color: var(--user-msg-text);
372
+ border-radius: 18px 18px 4px 18px;
373
+ font-size: 15px; line-height: 1.5;
374
+ word-break: break-word;
375
+ animation: fadeUp .2s ease;
376
+ }
377
+ .user-msg p { margin: 0; }
378
+ .user-msg p + p { margin-top: 4px; }
379
+ .user-msg code {
380
+ background: var(--user-msg-code-bg); border: none;
381
+ padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: .88em;
382
+ color: var(--user-msg-text);
383
+ }
384
+ .user-msg pre {
385
+ background: var(--user-msg-pre-bg);
386
+ border: none; border-radius: 8px; padding: 10px; margin: 6px 0;
387
+ overflow-x: auto;
388
+ }
389
+ .user-msg pre code { background: none; padding: 0; font-size: 13px; }
390
+ .user-msg a { color: var(--user-msg-link); }
391
+ @keyframes fadeUp { from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)} }
392
+
393
+ /* Toast */
394
+ #toast-container {
395
+ position: fixed;
396
+ left: 12px;
397
+ right: 12px;
398
+ top: 12px;
399
+ top: calc(12px + env(safe-area-inset-top, 0px));
400
+ z-index: 9999; display: flex; flex-direction: column; gap: 8px;
401
+ align-items: center;
402
+ pointer-events: none;
403
+ }
404
+ .toast {
405
+ width: min(100%, 420px);
406
+ background: var(--toast-bg);
407
+ color: var(--toast-text);
408
+ padding: 12px 14px;
409
+ border-radius: 16px;
410
+ font-size: 14px;
411
+ line-height: 1.5;
412
+ white-space: pre-wrap;
413
+ word-break: break-word;
414
+ overflow-wrap: anywhere;
415
+ text-align: left;
416
+ animation: toastIn .3s ease, toastOut .3s ease 3.1s forwards;
417
+ box-shadow: 0 10px 24px var(--shadow-lg);
418
+ border: 1px solid var(--toast-border);
419
+ }
420
+ @keyframes toastIn { from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)} }
421
+ @keyframes toastOut { from{opacity:1}to{opacity:0;transform:translateY(-10px)} }
422
+
423
+ @media (max-width: 640px) {
424
+ #toast-container {
425
+ left: 10px;
426
+ right: 10px;
427
+ top: calc(10px + env(safe-area-inset-top, 0px));
428
+ }
429
+ .toast {
430
+ width: 100%;
431
+ font-size: 13px;
432
+ padding: 11px 12px;
433
+ border-radius: 14px;
434
+ }
435
+ }
436
+
437
+ /* ===== Assistant Text ===== */
438
+ .assistant-text {
439
+ margin: 0px 0;
440
+ font-size: 15px; line-height: 1.7;
441
+ color: var(--text);
442
+ animation: fadeUp .2s ease;
443
+ }
444
+ .assistant-text p { margin: 8px 0; }
445
+ .assistant-text h1,.assistant-text h2,.assistant-text h3 { margin: 16px 0 8px; font-weight: 600; color: var(--text); }
446
+ .assistant-text h1{font-size:1.25em} .assistant-text h2{font-size:1.12em} .assistant-text h3{font-size:1.05em}
447
+ .assistant-text ul,.assistant-text ol { margin: 8px 0 8px 24px; }
448
+ .assistant-text li { margin: 4px 0; }
449
+ .assistant-text a { color: var(--user-accent); text-decoration: none; }
450
+ .assistant-text a:hover { text-decoration: underline; }
451
+ .assistant-text code {
452
+ background: var(--code-bg); border: 1px solid var(--border);
453
+ padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: .88em;
454
+ }
455
+ .assistant-text pre {
456
+ background: var(--code-bg); border: 1px solid var(--border);
457
+ border-radius: var(--radius-sm); padding: 14px; margin: 10px 0;
458
+ overflow-x: auto;
459
+ }
460
+ .assistant-text pre code {
461
+ background: none; border: none; padding: 0;
462
+ font-size: 13px; line-height: 1.55;
463
+ }
464
+ .assistant-text blockquote {
465
+ border-left: 3px solid var(--accent); padding-left: 14px;
466
+ margin: 10px 0; color: var(--text-secondary);
467
+ }
468
+ .assistant-text table { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: 14px; }
469
+ .assistant-text th,.assistant-text td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
470
+ .assistant-text th { background: var(--bg-hover); font-weight: 600; }
471
+ .assistant-text hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
472
+
473
+ /* ===== Thinking ===== */
474
+ .thinking {
475
+ margin: 0; border-radius: var(--radius-sm);
476
+ overflow: hidden; animation: fadeUp .2s ease;
477
+ }
478
+ .thinking-toggle {
479
+ display: flex; align-items: baseline; gap: 8px;
480
+ padding: 0; cursor: pointer; user-select: none;
481
+ color: var(--text-muted); font-size: 13px;
482
+ line-height: 1.7;
483
+ }
484
+ .thinking-toggle:hover { color: var(--text-secondary); }
485
+ .thinking-chevron {
486
+ width: 16px; height: 16px; transition: transform .2s;
487
+ display: inline-flex; align-items: center; justify-content: center;
488
+ flex-shrink: 0; align-self: center;
489
+ }
490
+ .thinking.open .thinking-chevron { transform: rotate(90deg); }
491
+ .thinking-content {
492
+ display: none; padding: 8px 0 8px 24px;
493
+ font-size: 13px; color: var(--text-muted); line-height: 1.6;
494
+ white-space: pre-wrap; word-break: break-word;
495
+ max-height: 300px; overflow-y: auto;
496
+ overscroll-behavior-y: contain;
497
+ }
498
+ .thinking.open .thinking-content { display: block; }
499
+ .thinking + .assistant-text { margin-top: 0; }
500
+
501
+ /* ===== Step Group (tool calls) ===== */
502
+ .step-group { margin: 0; animation: fadeUp .2s ease; }
503
+ .assistant-text + .step-group { margin-top: -4px; }
504
+ .step-group-header {
505
+ display: flex; align-items: center; gap: 8px;
506
+ padding: 4px 0; cursor: pointer; user-select: none;
507
+ color: var(--text-muted); font-size: 14px; font-weight: 500;
508
+ min-height: 36px;
509
+ }
510
+ .step-group-header:hover { color: var(--text-secondary); }
511
+ .step-chevron {
512
+ width: 18px; height: 18px; transition: transform .2s;
513
+ display: flex; align-items: center; justify-content: center;
514
+ }
515
+ .step-group.open .step-chevron { transform: rotate(90deg); }
516
+ .step-list { display: none; padding: 0; }
517
+ .step-group.open .step-list { display: block; }
518
+
519
+ /* ===== Step Item (single tool call) ===== */
520
+ .step-item {
521
+ display: flex; align-items: baseline; gap: 10px;
522
+ padding: 6px 8px 6px 0; min-height: 40px;
523
+ position: relative; cursor: pointer;
524
+ border-radius: var(--radius-sm);
525
+ transition: background .1s;
526
+ overflow: hidden;
527
+ }
528
+ .step-item:hover, .step-item:active { background: var(--bg-hover); }
529
+ .step-item::before {
530
+ content: ''; position: absolute;
531
+ left: 15px; top: 0; bottom: 0; width: 1.5px;
532
+ background: var(--timeline);
533
+ }
534
+ .step-item:first-child::before { top: 50%; }
535
+ .step-item:last-child::before { bottom: 50%; }
536
+ .step-item:only-child::before { display: none; }
537
+
538
+ /* Shimmer loading effect for running tools */
539
+ .step-item.loading::after {
540
+ content: ''; position: absolute;
541
+ inset: 0;
542
+ background: linear-gradient(
543
+ 90deg,
544
+ transparent 0%,
545
+ var(--shimmer-1) 30%,
546
+ var(--shimmer-2) 50%,
547
+ var(--shimmer-1) 70%,
548
+ transparent 100%
549
+ );
550
+ animation: shimmer 1.8s infinite ease-in-out;
551
+ pointer-events: none;
552
+ }
553
+ @keyframes shimmer {
554
+ 0% { transform: translateX(-100%); }
555
+ 100% { transform: translateX(100%); }
556
+ }
557
+ .step-item.loading .step-icon {
558
+ border-color: var(--accent);
559
+ animation: pulse 1.2s infinite;
560
+ }
561
+ .step-icon {
562
+ width: 32px; height: 32px; border-radius: 50%;
563
+ background: var(--bg); border: 1.5px solid var(--timeline);
564
+ display: flex; align-items: center; justify-content: center;
565
+ flex-shrink: 0; z-index: 1; font-size: 14px; color: var(--text-secondary);
566
+ }
567
+ .step-name {
568
+ font-weight: 600; font-size: 14px; color: var(--text);
569
+ white-space: nowrap; flex-shrink: 0;
570
+ }
571
+ .step-desc {
572
+ flex: 1; min-width: 0;
573
+ font-size: 13px; color: var(--text-muted);
574
+ font-family: var(--mono);
575
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
576
+ }
577
+ .step-duration {
578
+ font-size: 12px; color: var(--text-muted);
579
+ white-space: nowrap; flex-shrink: 0;
580
+ }
581
+ .step-arrow {
582
+ color: var(--text-muted); flex-shrink: 0;
583
+ font-size: 14px; opacity: .5;
584
+ }
585
+ .step-detail {
586
+ display: none; margin: 0 0 4px 0;
587
+ background: var(--code-bg); border: 1px solid var(--border);
588
+ border-radius: var(--radius-sm); overflow: hidden;
589
+ animation: fadeUp .15s ease;
590
+ }
591
+ .step-detail.open { display: block; }
592
+ .step-detail pre {
593
+ margin: 0; padding: 12px; font-size: 12px;
594
+ font-family: var(--mono); line-height: 1.5;
595
+ overflow-x: auto; white-space: pre-wrap; word-break: break-word;
596
+ max-height: 300px; overflow-y: auto;
597
+ overscroll-behavior-y: contain;
598
+ color: var(--text-secondary);
599
+ }
600
+ .step-detail.error pre { color: var(--error); }
601
+ .step-detail .detail-input {
602
+ padding: 10px 12px; font-size: 12px; font-family: var(--mono);
603
+ color: var(--text-secondary); border-bottom: 1px solid var(--border);
604
+ white-space: pre-wrap; word-break: break-word;
605
+ }
606
+ .step-detail .detail-result {
607
+ padding: 10px 12px; font-size: 12px; font-family: var(--mono);
608
+ white-space: pre-wrap; word-break: break-word;
609
+ max-height: 250px; overflow-y: auto;
610
+ overscroll-behavior-y: contain;
611
+ }
612
+ .result-image-block {
613
+ margin: 12px 0; animation: fadeUp .2s ease;
614
+ }
615
+ .result-image-block img {
616
+ max-width: 100%; border-radius: 10px; cursor: pointer;
617
+ border: 1px solid var(--border);
618
+ box-shadow: 0 2px 8px var(--shadow-md);
619
+ }
620
+ .image-overlay {
621
+ display: none; position: fixed; inset: 0; z-index: 9999;
622
+ background: rgba(0,0,0,.85); align-items: center; justify-content: center;
623
+ cursor: pointer; -webkit-tap-highlight-color: transparent;
624
+ }
625
+ .image-overlay.visible { display: flex; }
626
+ .image-overlay img {
627
+ max-width: 95vw; max-height: 95vh; object-fit: contain;
628
+ border-radius: 8px;
629
+ }
630
+
631
+ /* ===== Diff View ===== */
632
+ .diff-view {
633
+ overflow: hidden;
634
+ }
635
+ .diff-header {
636
+ display: flex; align-items: center; gap: 6px;
637
+ padding: 8px 12px;
638
+ background: var(--bg-hover);
639
+ border-bottom: 1px solid var(--border);
640
+ font-size: 12px; font-family: var(--mono);
641
+ color: var(--text-secondary);
642
+ }
643
+ .diff-header .diff-file-icon {
644
+ opacity: .5; flex-shrink: 0;
645
+ }
646
+ .diff-header .diff-file-path {
647
+ font-weight: 600; color: var(--text);
648
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
649
+ min-width: 0;
650
+ }
651
+ .diff-body {
652
+ overflow-x: auto; max-height: 350px; overflow-y: auto;
653
+ overscroll-behavior-y: contain;
654
+ }
655
+ .diff-table {
656
+ width: 100%; border-collapse: collapse;
657
+ font-size: 12px; font-family: var(--mono);
658
+ line-height: 1.6;
659
+ }
660
+ .diff-table td {
661
+ padding: 0; vertical-align: top;
662
+ border: none;
663
+ }
664
+ .diff-ln {
665
+ min-width: 32px; width: 32px;
666
+ white-space: nowrap;
667
+ padding: 0 6px;
668
+ text-align: right;
669
+ color: var(--text-muted);
670
+ opacity: .5;
671
+ user-select: none;
672
+ font-size: 11px;
673
+ }
674
+ .diff-sign {
675
+ width: 16px; min-width: 16px;
676
+ white-space: nowrap;
677
+ padding: 0;
678
+ text-align: center;
679
+ user-select: none;
680
+ font-weight: 700;
681
+ }
682
+ .diff-code {
683
+ padding: 0 12px 0 0;
684
+ white-space: pre-wrap;
685
+ word-break: break-all;
686
+ }
687
+ /* Delete line */
688
+ .diff-del { background: var(--diff-del-bg); }
689
+ .diff-del .diff-sign { color: var(--diff-del-sign); }
690
+ .diff-del .diff-code { color: var(--diff-del-code); }
691
+ .diff-del .diff-ln { background: var(--diff-del-ln-bg); }
692
+ /* Add line */
693
+ .diff-add { background: var(--diff-add-bg); }
694
+ .diff-add .diff-sign { color: var(--diff-add-sign); }
695
+ .diff-add .diff-code { color: var(--diff-add-code); }
696
+ .diff-add .diff-ln { background: var(--diff-add-ln-bg); }
697
+ /* Context line */
698
+ .diff-ctx { background: var(--code-bg); }
699
+ .diff-ctx .diff-sign { color: transparent; }
700
+ .diff-ctx .diff-code { color: var(--text-secondary); }
701
+ /* Hunk separator */
702
+ .diff-hunk {
703
+ background: var(--diff-hunk-bg); color: var(--diff-hunk-text);
704
+ font-size: 11px;
705
+ }
706
+ .diff-hunk td { padding: 4px 12px; }
707
+ /* Stats badge */
708
+ .diff-stats {
709
+ display: inline-flex; align-items: center; gap: 4px;
710
+ margin-left: auto; font-size: 11px; font-weight: 600;
711
+ }
712
+ .diff-stats .ds-add { color: var(--diff-add-sign); }
713
+ .diff-stats .ds-del { color: var(--diff-del-sign); }
714
+
715
+ /* Token count */
716
+ .token-count {
717
+ font-size: 12px; color: var(--accent);
718
+ padding: 2px 0 4px;
719
+ opacity: .8;
720
+ }
721
+
722
+ /* ===== Todo Panel ===== */
723
+ #todo-panel {
724
+ flex-shrink: 0;
725
+ background: var(--bg-white);
726
+ border-top: 1px solid var(--border);
727
+ overflow: hidden;
728
+ max-height: 0;
729
+ opacity: 0;
730
+ transition: max-height .3s ease, opacity .2s ease;
731
+ pointer-events: none;
732
+ }
733
+ #todo-panel.has-tasks {
734
+ max-height: 44px;
735
+ opacity: 1;
736
+ pointer-events: auto;
737
+ }
738
+ #todo-panel.has-tasks.open {
739
+ max-height: 320px;
740
+ }
741
+ #todo-header {
742
+ display: flex;
743
+ align-items: center;
744
+ gap: 8px;
745
+ padding: 10px 16px;
746
+ cursor: pointer;
747
+ user-select: none;
748
+ min-height: 44px;
749
+ }
750
+ #todo-header:active { background: var(--bg-hover); }
751
+ .todo-header-left {
752
+ display: flex; align-items: center; gap: 8px;
753
+ flex-shrink: 0;
754
+ }
755
+ .todo-chevron {
756
+ transition: transform .2s;
757
+ color: var(--text-muted);
758
+ flex-shrink: 0;
759
+ }
760
+ #todo-panel.open .todo-chevron { transform: rotate(90deg); }
761
+ .todo-title {
762
+ font-size: 13px; font-weight: 600; color: var(--text);
763
+ white-space: nowrap;
764
+ }
765
+ .todo-badge {
766
+ min-width: 20px; height: 20px;
767
+ border-radius: 10px;
768
+ background: var(--accent);
769
+ color: #fff;
770
+ font-size: 11px; font-weight: 700;
771
+ display: flex; align-items: center; justify-content: center;
772
+ padding: 0 6px;
773
+ }
774
+ .todo-badge.done { background: var(--text-muted); }
775
+ .todo-progress-mini {
776
+ flex: 1; height: 4px; min-width: 40px;
777
+ background: var(--border);
778
+ border-radius: 2px;
779
+ overflow: hidden;
780
+ }
781
+ .todo-progress-bar {
782
+ height: 100%; width: 0%;
783
+ background: var(--accent);
784
+ border-radius: 2px;
785
+ transition: width .4s ease;
786
+ }
787
+ .todo-progress-bar.all-done { background: var(--todo-done-color); }
788
+ .todo-summary {
789
+ font-size: 12px; color: var(--text-muted);
790
+ white-space: nowrap; flex-shrink: 0;
791
+ }
792
+ #todo-list {
793
+ display: none;
794
+ padding: 0 12px 10px;
795
+ max-height: 260px;
796
+ overflow-y: auto;
797
+ }
798
+ #todo-panel.open #todo-list { display: block; }
799
+ .todo-item {
800
+ display: flex; align-items: flex-start; gap: 10px;
801
+ padding: 8px 8px;
802
+ border-radius: var(--radius-sm);
803
+ transition: background .1s;
804
+ animation: fadeUp .2s ease;
805
+ }
806
+ .todo-item + .todo-item { border-top: 1px solid var(--border-light); }
807
+ .todo-icon {
808
+ width: 22px; height: 22px;
809
+ border-radius: 50%;
810
+ display: flex; align-items: center; justify-content: center;
811
+ flex-shrink: 0;
812
+ margin-top: 1px;
813
+ font-size: 12px;
814
+ border: 1.5px solid var(--border);
815
+ background: var(--bg);
816
+ color: var(--text-muted);
817
+ transition: all .3s ease;
818
+ }
819
+ .todo-item.pending .todo-icon {
820
+ border-color: var(--border);
821
+ color: var(--text-muted);
822
+ }
823
+ .todo-item.in_progress .todo-icon {
824
+ border-color: var(--accent);
825
+ background: var(--accent-light);
826
+ color: var(--accent);
827
+ animation: pulse 1.2s infinite;
828
+ }
829
+ .todo-item.completed .todo-icon {
830
+ border-color: var(--todo-done-color);
831
+ background: var(--todo-done-bg);
832
+ color: var(--todo-done-color);
833
+ }
834
+ .todo-body { flex: 1; min-width: 0; }
835
+ .todo-subject {
836
+ font-size: 13px; font-weight: 500; color: var(--text);
837
+ line-height: 1.4;
838
+ word-break: break-word;
839
+ }
840
+ .todo-item.completed .todo-subject {
841
+ color: var(--text-muted);
842
+ text-decoration: line-through;
843
+ }
844
+ .todo-active-form {
845
+ font-size: 11px; color: var(--accent);
846
+ margin-top: 2px;
847
+ display: flex; align-items: center; gap: 4px;
848
+ }
849
+ .todo-active-form::before {
850
+ content: '';
851
+ width: 4px; height: 4px;
852
+ border-radius: 50%;
853
+ background: var(--accent);
854
+ animation: pulse 1.2s infinite;
855
+ flex-shrink: 0;
856
+ }
857
+ .todo-status-tag {
858
+ font-size: 10px; font-weight: 600;
859
+ padding: 2px 6px;
860
+ border-radius: 4px;
861
+ flex-shrink: 0;
862
+ margin-top: 2px;
863
+ }
864
+ .todo-item.pending .todo-status-tag {
865
+ background: var(--bg); color: var(--text-muted);
866
+ }
867
+ .todo-item.in_progress .todo-status-tag {
868
+ background: var(--accent-light); color: var(--accent);
869
+ }
870
+ .todo-item.completed .todo-status-tag {
871
+ background: var(--todo-done-bg); color: var(--todo-done-color);
872
+ }
873
+
874
+ /* ===== Input Area ===== */
875
+ #input-area {
876
+ flex-shrink: 0;
877
+ padding: 10px 12px;
878
+ padding-bottom: 10px;
879
+ padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
880
+ background: var(--bg); border-top: 1px solid var(--border);
881
+ position: relative;
882
+ }
883
+ #input-row {
884
+ max-width: 720px; margin: 0 auto;
885
+ display: flex; align-items: center; gap: 8px;
886
+ }
887
+ .input-pill {
888
+ flex: 1; display: flex; align-items: center; gap: 6px;
889
+ background: var(--bg-white); border: 1px solid var(--border);
890
+ border-radius: 24px; padding: 0 6px 0 16px;
891
+ transition: border-color .15s;
892
+ }
893
+ .input-pill:focus-within { border-color: var(--accent); }
894
+ #input {
895
+ flex: 1; border: none; background: none; outline: none;
896
+ font-size: 16px; font-family: inherit; color: var(--text);
897
+ padding: 12px 0; line-height: 1.4;
898
+ resize: none; max-height: 120px;
899
+ }
900
+ #input::placeholder { color: var(--text-muted); }
901
+ #btn-send {
902
+ width: 40px; height: 40px; border-radius: 50%;
903
+ background: var(--accent-light); border: 1px solid var(--border);
904
+ color: var(--accent); cursor: pointer;
905
+ display: flex; align-items: center; justify-content: center;
906
+ transition: all .15s; flex-shrink: 0; margin: 2px;
907
+ }
908
+ #btn-send:hover, #btn-send:active { background: var(--accent); color: #fff; }
909
+ #btn-send.stop-mode {
910
+ background: var(--bg); color: var(--text-muted); border-color: var(--border);
911
+ opacity: 1; pointer-events: auto;
912
+ animation: pulse 1.5s infinite ease-in-out;
913
+ }
914
+ #btn-send.stop-mode:hover, #btn-send.stop-mode:active {
915
+ background: var(--error-bg); color: var(--error); border-color: var(--error-border);
916
+ }
917
+
918
+ /* ===== Welcome ===== */
919
+ .welcome {
920
+ text-align: center; padding: 60px 24px; color: var(--text-muted);
921
+ display: flex; flex-direction: column; align-items: center; gap: 10px;
922
+ }
923
+ .welcome svg { opacity: .2; }
924
+ .welcome h2 { font-size: 18px; color: var(--text-secondary); font-weight: 500; }
925
+ .welcome p { font-size: 14px; max-width: 360px; line-height: 1.6; }
926
+
927
+ /* ===== Command Overlay (compact spinner etc.) ===== */
928
+ #cmd-overlay {
929
+ display: none; position: fixed; inset: 0; z-index: 150;
930
+ background: var(--overlay-light);
931
+ align-items: center; justify-content: center;
932
+ }
933
+ #cmd-overlay.visible { display: flex; }
934
+ .cmd-overlay-card {
935
+ display: flex; flex-direction: column; align-items: center; gap: 16px;
936
+ padding: 32px 40px; border-radius: 16px;
937
+ background: var(--bg-white);
938
+ box-shadow: 0 8px 32px var(--shadow-md);
939
+ animation: fadeUp .2s ease;
940
+ }
941
+ .cmd-overlay-spinner {
942
+ width: 36px; height: 36px;
943
+ border: 3px solid var(--border);
944
+ border-top-color: var(--accent);
945
+ border-radius: 50%;
946
+ animation: spin .8s linear infinite;
947
+ }
948
+ @keyframes spin { to { transform: rotate(360deg); } }
949
+ .cmd-overlay-label {
950
+ font-size: 14px; font-weight: 500; color: var(--text-secondary);
951
+ }
952
+
953
+ /* ===== Compact Summary Divider ===== */
954
+ .compact-divider {
955
+ display: flex; align-items: center; gap: 12px;
956
+ margin: 20px 0 16px; animation: fadeUp .3s ease;
957
+ }
958
+ .compact-line {
959
+ flex: 1; height: 1px; background: var(--border);
960
+ }
961
+ .compact-badge {
962
+ display: flex; align-items: center; gap: 6px;
963
+ padding: 6px 14px; border-radius: 16px;
964
+ background: var(--bg-white); border: 1px solid var(--border);
965
+ font-size: 12px; color: var(--text-muted); font-weight: 500;
966
+ white-space: nowrap; flex-shrink: 0;
967
+ }
968
+ .compact-badge svg { opacity: .6; }
969
+
970
+ /* ===== Working Indicator ===== */
971
+ .working-indicator {
972
+ display: flex; align-items: center; gap: 8px;
973
+ padding: 10px 0; animation: fadeUp .2s ease;
974
+ color: var(--text-muted); font-size: 13px;
975
+ }
976
+ .working-spinner {
977
+ width: 14px; height: 14px; border-radius: 50%;
978
+ border: 2px solid var(--border);
979
+ border-top-color: var(--accent);
980
+ animation: spin .8s linear infinite;
981
+ }
982
+
983
+ /* ===== Elapsed Time Badge ===== */
984
+ .elapsed-time {
985
+ display: inline-flex; align-items: center; gap: 5px;
986
+ padding: 4px 0; animation: fadeUp .2s ease;
987
+ color: var(--text-muted); font-size: 12px; opacity: .7;
988
+ }
989
+ .elapsed-time svg { opacity: .6; }
990
+
991
+ /* ===== Interrupt Banner ===== */
992
+ .interrupt-banner {
993
+ display: flex; align-items: center; justify-content: center; gap: 8px;
994
+ padding: 6px 16px; width: fit-content;
995
+ background: var(--bg);
996
+ border-radius: 20px;
997
+ color: var(--text-muted); font-size: 12px; font-weight: 500;
998
+ animation: fadeUp .2s ease;
999
+ position: relative; z-index: 1;
1000
+ margin: 0 auto;
1001
+ }
1002
+ .interrupt-banner svg { opacity: .5; }
1003
+
1004
+ /* ===== Input Disabled State ===== */
1005
+ #input-area.waiting .input-pill {
1006
+ border-color: var(--border);
1007
+ background: var(--bg);
1008
+ position: relative;
1009
+ overflow: hidden;
1010
+ }
1011
+ #input-area.waiting .input-pill::after {
1012
+ content: '';
1013
+ position: absolute;
1014
+ inset: 0;
1015
+ background: linear-gradient(
1016
+ 90deg,
1017
+ transparent 0%,
1018
+ var(--shimmer-light-1) 40%,
1019
+ var(--shimmer-light-2) 50%,
1020
+ var(--shimmer-light-1) 60%,
1021
+ transparent 100%
1022
+ );
1023
+ animation: inputShimmer 2s infinite ease-in-out;
1024
+ pointer-events: none;
1025
+ border-radius: inherit;
1026
+ }
1027
+ @keyframes inputShimmer {
1028
+ 0% { transform: translateX(-100%); }
1029
+ 100% { transform: translateX(100%); }
1030
+ }
1031
+ #input-area.waiting #input {
1032
+ color: var(--text-muted); pointer-events: none;
1033
+ }
1034
+ #input-area.waiting #btn-send {
1035
+ /* Overridden by .stop-mode when waiting — keep button clickable */
1036
+ }
1037
+ #input-area.waiting #btn-send.stop-mode {
1038
+ opacity: 1; pointer-events: auto;
1039
+ }
1040
+ #btn-send.empty {
1041
+ opacity: .35; pointer-events: none;
1042
+ }
1043
+
1044
+ /* ===== Image Upload Button ===== */
1045
+ .pill-icon-btn {
1046
+ width: 36px; height: 36px; border-radius: 50%;
1047
+ background: transparent; border: none;
1048
+ color: var(--text-muted); cursor: pointer;
1049
+ display: flex; align-items: center; justify-content: center;
1050
+ transition: all .15s; flex-shrink: 0;
1051
+ -webkit-tap-highlight-color: transparent;
1052
+ }
1053
+ .pill-icon-btn:hover, .pill-icon-btn:active { color: var(--accent); background: var(--accent-light); }
1054
+ #input-area.waiting .pill-icon-btn { opacity: .3; pointer-events: none; }
1055
+
1056
+ /* ===== Image Preview Strip ===== */
1057
+ #image-preview {
1058
+ max-width: 720px; margin: 0 auto 8px;
1059
+ padding: 0 6px;
1060
+ }
1061
+ #image-preview-inner {
1062
+ display: inline-flex; align-items: center; gap: 6px;
1063
+ background: var(--bg-white); border: 1px solid var(--border);
1064
+ border-radius: var(--radius-sm); padding: 6px;
1065
+ animation: fadeUp .2s ease;
1066
+ position: relative;
1067
+ overflow: hidden;
1068
+ }
1069
+ #image-preview-img {
1070
+ max-height: 80px; max-width: 160px;
1071
+ border-radius: 6px; object-fit: cover;
1072
+ }
1073
+ #image-upload-overlay {
1074
+ position: absolute; inset: 0;
1075
+ display: flex; align-items: center; justify-content: center;
1076
+ background: var(--overlay-heavy);
1077
+ backdrop-filter: blur(2px);
1078
+ border-radius: var(--radius-sm);
1079
+ color: #fff;
1080
+ pointer-events: none;
1081
+ z-index: 1;
1082
+ }
1083
+ #image-upload-overlay.hidden { display: none; }
1084
+ .upload-ring-wrap {
1085
+ position: relative;
1086
+ display: flex; align-items: center; justify-content: center;
1087
+ width: 52px; height: 52px;
1088
+ }
1089
+ .upload-ring {
1090
+ position: absolute; inset: 0;
1091
+ width: 52px; height: 52px;
1092
+ transform: rotate(-90deg);
1093
+ filter: drop-shadow(0 0 4px rgba(255,255,255,.25));
1094
+ }
1095
+ .upload-ring-track,
1096
+ .upload-ring-progress {
1097
+ fill: none;
1098
+ stroke-width: 3.5;
1099
+ stroke-linecap: round;
1100
+ stroke-dasharray: 97.4;
1101
+ }
1102
+ .upload-ring-track { stroke: rgba(255,255,255,.18); }
1103
+ .upload-ring-progress {
1104
+ stroke: #fff;
1105
+ stroke-dashoffset: 97.4;
1106
+ transition: stroke-dashoffset .25s cubic-bezier(.4,0,.2,1);
1107
+ }
1108
+ #image-upload-text {
1109
+ position: relative;
1110
+ font-size: 12px;
1111
+ font-weight: 700;
1112
+ letter-spacing: .03em;
1113
+ text-shadow: 0 1px 3px rgba(0,0,0,.4);
1114
+ }
1115
+ #image-preview-remove {
1116
+ position: absolute; top: -6px; right: -6px; z-index: 2;
1117
+ width: 22px; height: 22px; border-radius: 50%;
1118
+ background: var(--text); color: #fff; border: 2px solid var(--bg);
1119
+ font-size: 13px; line-height: 1; cursor: pointer;
1120
+ display: flex; align-items: center; justify-content: center;
1121
+ }
1122
+ #image-preview-remove:active { background: var(--error); }
1123
+ #image-preview-remove[disabled] {
1124
+ opacity: .45;
1125
+ pointer-events: none;
1126
+ }
1127
+
1128
+ /* ===== Scroll-to-bottom ===== */
1129
+ #btn-scroll {
1130
+ width: 40px; height: 40px; border-radius: 50%;
1131
+ background: var(--bg-white); border: 1px solid var(--border);
1132
+ color: var(--text-muted); cursor: pointer;
1133
+ display: none; align-items: center; justify-content: center;
1134
+ transition: all .15s; flex-shrink: 0;
1135
+ }
1136
+ #btn-scroll.visible { display: flex; }
1137
+ #btn-scroll:hover, #btn-scroll:active { background: var(--bg-hover); color: var(--text); }
1138
+
1139
+ /* ===== Connection Banner ===== */
1140
+ #conn-banner {
1141
+ display: none; align-items: center; justify-content: center; gap: 8px;
1142
+ padding: 6px 16px; font-size: 13px; font-weight: 500;
1143
+ color: #fff; background: var(--error);
1144
+ flex-shrink: 0; z-index: 11;
1145
+ animation: fadeUp .2s ease;
1146
+ }
1147
+ #conn-banner.visible { display: flex; }
1148
+ #conn-banner.reconnecting { background: var(--banner-warn-bg); color: var(--banner-warn-text); }
1149
+ #conn-banner .banner-dot {
1150
+ width: 6px; height: 6px; border-radius: 50%;
1151
+ background: currentColor; animation: pulse 1.2s infinite;
1152
+ }
1153
+
1154
+ /* ===== Permission Overlay ===== */
1155
+ #perm-overlay {
1156
+ display: none; position: fixed; inset: 0; z-index: 200;
1157
+ background: var(--overlay-bg);
1158
+ align-items: flex-end; justify-content: center;
1159
+ animation: fadeIn .15s ease;
1160
+ }
1161
+ #perm-overlay.visible { display: flex; }
1162
+ @keyframes fadeIn { from{opacity:0}to{opacity:1} }
1163
+
1164
+ #perm-dialog {
1165
+ width: 100%; max-width: 480px;
1166
+ background: var(--bg-white); border-radius: 16px 16px 0 0;
1167
+ padding: 20px 20px 24px;
1168
+ padding-bottom: 24px;
1169
+ padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
1170
+ box-shadow: 0 -4px 24px var(--shadow-md);
1171
+ animation: slideUp .2s ease;
1172
+ }
1173
+ @keyframes slideUp { from{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1} }
1174
+
1175
+ .perm-header {
1176
+ display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
1177
+ }
1178
+ .perm-icon {
1179
+ width: 40px; height: 40px; border-radius: 10px;
1180
+ background: var(--warn-bg); color: var(--warn-text);
1181
+ display: flex; align-items: center; justify-content: center;
1182
+ flex-shrink: 0;
1183
+ }
1184
+ .perm-title { font-size: 16px; font-weight: 600; color: var(--text); }
1185
+ .perm-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
1186
+
1187
+ .perm-detail {
1188
+ background: var(--code-bg); border: 1px solid var(--border);
1189
+ border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px;
1190
+ font-family: var(--mono); font-size: 13px; color: var(--text-secondary);
1191
+ white-space: pre-wrap; word-break: break-word;
1192
+ max-height: 200px; overflow-y: auto; line-height: 1.5;
1193
+ }
1194
+
1195
+ .perm-actions {
1196
+ display: flex; gap: 10px;
1197
+ }
1198
+ .perm-actions button {
1199
+ flex: 1; padding: 14px; border-radius: 12px;
1200
+ font-size: 15px; font-weight: 600; cursor: pointer;
1201
+ border: none; transition: all .15s;
1202
+ min-height: 48px;
1203
+ }
1204
+ .perm-btn-deny {
1205
+ background: var(--bg); color: var(--text-secondary);
1206
+ border: 1px solid var(--border) !important;
1207
+ }
1208
+ .perm-btn-deny:hover, .perm-btn-deny:active { background: var(--error-bg); color: var(--error); }
1209
+ .perm-btn-allow {
1210
+ background: var(--accent); color: #fff;
1211
+ }
1212
+ .perm-btn-allow:hover, .perm-btn-allow:active { background: var(--accent-active); }
1213
+
1214
+ /* ===== Question Overlay (AskUserQuestion) ===== */
1215
+ #question-overlay {
1216
+ display: none; position: fixed; inset: 0; z-index: 200;
1217
+ background: var(--overlay-bg);
1218
+ align-items: flex-end; justify-content: center;
1219
+ animation: fadeIn .15s ease;
1220
+ }
1221
+ #question-overlay.visible { display: flex; }
1222
+ #question-dialog {
1223
+ width: 100%; max-width: 480px;
1224
+ background: var(--bg-white); border-radius: 16px 16px 0 0;
1225
+ padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
1226
+ box-shadow: 0 -4px 24px var(--shadow-md);
1227
+ animation: slideUp .2s ease;
1228
+ margin-bottom: var(--keyboard-offset);
1229
+ max-height: calc(100dvh - var(--keyboard-offset) - env(safe-area-inset-top, 0px) - 12px);
1230
+ overflow-y: auto;
1231
+ -webkit-overflow-scrolling: touch;
1232
+ }
1233
+ .question-header {
1234
+ display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
1235
+ }
1236
+ .question-icon {
1237
+ width: 36px; height: 36px; border-radius: 10px;
1238
+ background: var(--accent-light); color: var(--accent);
1239
+ display: flex; align-items: center; justify-content: center;
1240
+ flex-shrink: 0;
1241
+ }
1242
+ .question-title { font-size: 15px; font-weight: 600; color: var(--text); }
1243
+ .question-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
1244
+ .question-text {
1245
+ font-size: 14px; color: var(--text); margin-bottom: 14px; line-height: 1.5;
1246
+ }
1247
+ .question-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
1248
+ .question-opt {
1249
+ display: flex; align-items: flex-start; gap: 10px;
1250
+ padding: 12px 14px; border-radius: var(--radius-sm);
1251
+ background: var(--bg); border: 1px solid var(--border);
1252
+ cursor: pointer; transition: all .15s; text-align: left;
1253
+ font-family: inherit; font-size: 14px; color: var(--text);
1254
+ -webkit-tap-highlight-color: transparent;
1255
+ }
1256
+ .question-opt:active { transform: scale(.98); background: var(--accent-bg); border-color: var(--accent); }
1257
+ .question-opt-num {
1258
+ width: 24px; height: 24px; border-radius: 50%;
1259
+ background: var(--accent-light); color: var(--accent);
1260
+ display: flex; align-items: center; justify-content: center;
1261
+ font-size: 12px; font-weight: 700; flex-shrink: 0;
1262
+ }
1263
+ .question-opt-body { min-width: 0; }
1264
+ .question-opt-label { font-weight: 600; }
1265
+ .question-opt-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
1266
+ .question-other-row {
1267
+ display: flex; gap: 8px;
1268
+ }
1269
+ .question-other-input {
1270
+ flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
1271
+ border: 1px solid var(--border); font-family: inherit;
1272
+ font-size: 14px; color: var(--text); background: var(--bg-white);
1273
+ outline: none;
1274
+ }
1275
+ .question-other-input:focus { border-color: var(--accent); }
1276
+ .question-other-btn {
1277
+ padding: 10px 18px; border-radius: var(--radius-sm);
1278
+ background: var(--accent); color: #fff; border: none;
1279
+ font-size: 14px; font-weight: 600; cursor: pointer;
1280
+ font-family: inherit;
1281
+ }
1282
+ .question-other-btn:active { background: var(--accent-active); }
1283
+ .question-opt.selected { background: var(--accent-bg); border-color: var(--accent); }
1284
+ .question-opt-num.active { background: var(--accent); color: #fff; }
1285
+ .question-opt-check {
1286
+ width: 24px; height: 24px; border-radius: 4px;
1287
+ display: flex; align-items: center; justify-content: center;
1288
+ font-size: 18px; flex-shrink: 0; color: var(--text-muted); line-height: 1;
1289
+ }
1290
+ .question-opt.selected .question-opt-check { color: var(--accent); }
1291
+ .question-progress {
1292
+ font-size: 12px; font-weight: 600; color: var(--accent);
1293
+ background: var(--accent-light); border-radius: 12px;
1294
+ padding: 2px 10px; white-space: nowrap; flex-shrink: 0; line-height: 1.5;
1295
+ }
1296
+ .question-nav { display: flex; gap: 8px; margin-top: 4px; }
1297
+ .question-nav-btn {
1298
+ flex: 1; padding: 10px; border-radius: var(--radius-sm);
1299
+ font-family: inherit; font-size: 14px; font-weight: 600;
1300
+ cursor: pointer; border: 1px solid var(--border);
1301
+ background: var(--bg-white); color: var(--text);
1302
+ -webkit-tap-highlight-color: transparent;
1303
+ }
1304
+ .question-nav-btn:active { background: var(--bg); }
1305
+ .question-nav-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
1306
+ .question-nav-primary:active { background: var(--accent-active); }
1307
+
1308
+ /* ===== Plan Approval Overlay (ExitPlanMode) ===== */
1309
+ #plan-overlay {
1310
+ display: none; position: fixed; inset: 0; z-index: 200;
1311
+ background: var(--overlay-bg);
1312
+ align-items: flex-end; justify-content: center;
1313
+ animation: fadeIn .15s ease;
1314
+ }
1315
+ #plan-overlay.visible { display: flex; }
1316
+ #plan-dialog {
1317
+ width: 100%; max-width: 480px;
1318
+ background: var(--bg-white); border-radius: 16px 16px 0 0;
1319
+ padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
1320
+ box-shadow: 0 -4px 24px var(--shadow-md);
1321
+ animation: slideUp .2s ease;
1322
+ margin-bottom: var(--keyboard-offset);
1323
+ max-height: calc(100dvh - var(--keyboard-offset) - env(safe-area-inset-top, 0px) - 12px);
1324
+ overflow-y: auto;
1325
+ -webkit-overflow-scrolling: touch;
1326
+ }
1327
+ .plan-header {
1328
+ display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
1329
+ }
1330
+ .plan-icon {
1331
+ width: 36px; height: 36px; border-radius: 10px;
1332
+ background: var(--plan-icon-bg); color: var(--plan-icon-text);
1333
+ display: flex; align-items: center; justify-content: center;
1334
+ flex-shrink: 0;
1335
+ }
1336
+ .plan-title { font-size: 15px; font-weight: 600; color: var(--text); }
1337
+ .plan-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
1338
+ .plan-content {
1339
+ background: var(--code-bg); border: 1px solid var(--border);
1340
+ border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
1341
+ font-size: 13px; color: var(--text-secondary);
1342
+ max-height: 200px; overflow-y: auto; line-height: 1.6;
1343
+ }
1344
+ .plan-content h1,.plan-content h2,.plan-content h3 {
1345
+ font-size: 14px; margin: 8px 0 4px; color: var(--text);
1346
+ }
1347
+ .plan-content p { margin: 4px 0; }
1348
+ .plan-content ul,.plan-content ol { padding-left: 18px; margin: 4px 0; }
1349
+ .plan-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
1350
+ .plan-other-row {
1351
+ display: flex; gap: 8px;
1352
+ }
1353
+ .plan-other-input {
1354
+ flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
1355
+ border: 1px solid var(--border); font-family: inherit;
1356
+ font-size: 14px; color: var(--text); background: var(--bg-white);
1357
+ outline: none;
1358
+ }
1359
+ .plan-other-input:focus { border-color: var(--accent); }
1360
+ .plan-other-btn {
1361
+ padding: 10px 18px; border-radius: var(--radius-sm);
1362
+ background: var(--accent); color: #fff; border: none;
1363
+ font-size: 14px; font-weight: 600; cursor: pointer;
1364
+ font-family: inherit;
1365
+ }
1366
+ .plan-other-btn:active { background: var(--accent-active); }
1367
+
1368
+ /* ===== Settings Overlay ===== */
1369
+ #settings-overlay {
1370
+ display: none; position: fixed; inset: 0; z-index: 300;
1371
+ background: var(--overlay-bg);
1372
+ align-items: flex-end; justify-content: center;
1373
+ animation: fadeIn .15s ease;
1374
+ }
1375
+ #settings-overlay.visible { display: flex; }
1376
+ #settings-dialog {
1377
+ width: 100%; max-width: 480px;
1378
+ background: var(--bg-white); border-radius: 16px 16px 0 0;
1379
+ padding: 20px 20px 24px;
1380
+ padding-bottom: 24px;
1381
+ padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
1382
+ box-shadow: 0 -4px 24px var(--shadow-md);
1383
+ animation: slideUp .2s ease;
1384
+ max-height: 80vh; overflow-y: auto;
1385
+ }
1386
+ .settings-header {
1387
+ display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;
1388
+ }
1389
+ .settings-title { font-size: 17px; font-weight: 700; color: var(--text); }
1390
+ .settings-close {
1391
+ width: 36px; height: 36px; border: none; border-radius: 8px;
1392
+ background: var(--bg); color: var(--text-muted); cursor: pointer;
1393
+ display: flex; align-items: center; justify-content: center;
1394
+ transition: all .15s;
1395
+ }
1396
+ .settings-close:active { background: var(--bg-hover); color: var(--text); }
1397
+ .settings-section { margin-bottom: 16px; }
1398
+ .settings-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
1399
+ .settings-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
1400
+ .settings-options { display: flex; flex-direction: column; gap: 8px; }
1401
+ .settings-opt {
1402
+ display: flex; align-items: flex-start; gap: 10px;
1403
+ padding: 12px; border-radius: var(--radius-sm);
1404
+ border: 1.5px solid var(--border); cursor: pointer;
1405
+ transition: all .15s; background: var(--bg-white);
1406
+ }
1407
+ .settings-opt.active { border-color: var(--accent); background: var(--accent-bg); }
1408
+ .settings-opt input[type="radio"] {
1409
+ margin-top: 2px; accent-color: var(--accent); flex-shrink: 0;
1410
+ }
1411
+ .settings-opt-label { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
1412
+ .settings-opt-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
1413
+ .header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
1414
+
1415
+ /* ===== Confirm Dialog ===== */
1416
+ #confirm-overlay {
1417
+ display: none; position: fixed; inset: 0; z-index: 400;
1418
+ background: var(--overlay-heavy);
1419
+ align-items: center; justify-content: center;
1420
+ animation: fadeIn .15s ease;
1421
+ }
1422
+ #confirm-overlay.visible { display: flex; }
1423
+ #confirm-dialog {
1424
+ width: calc(100% - 48px); max-width: 340px;
1425
+ background: var(--bg-white); border-radius: 16px;
1426
+ padding: 24px; box-shadow: 0 8px 32px var(--shadow-lg);
1427
+ text-align: center; animation: slideUp .2s ease;
1428
+ }
1429
+ .confirm-icon {
1430
+ width: 48px; height: 48px; border-radius: 50%;
1431
+ background: var(--warn-bg); color: var(--warn-text);
1432
+ display: flex; align-items: center; justify-content: center;
1433
+ margin: 0 auto 12px;
1434
+ }
1435
+ .confirm-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
1436
+ .confirm-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 18px; }
1437
+ .confirm-actions { display: flex; gap: 10px; }
1438
+ .confirm-actions button {
1439
+ flex: 1; padding: 10px; border-radius: 10px;
1440
+ font-size: 14px; font-weight: 600; cursor: pointer;
1441
+ border: none; transition: all .15s; font-family: inherit;
1442
+ }
1443
+ .confirm-btn-cancel { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border) !important; }
1444
+ .confirm-btn-cancel:active { background: var(--bg-hover); }
1445
+ .confirm-btn-ok { background: var(--warn-text); color: #fff; }
1446
+ .confirm-btn-ok:active { background: var(--warn-active); }
1447
+
1448
+ /* ===== Slash Command Menu ===== */
1449
+ #cmd-menu {
1450
+ display: none; position: absolute; bottom: 100%; left: 0; right: 0;
1451
+ background: var(--bg-white); border: 1px solid var(--border);
1452
+ border-radius: var(--radius) var(--radius) 0 0;
1453
+ box-shadow: 0 -4px 16px var(--shadow-sm);
1454
+ max-height: 260px; overflow-y: auto; z-index: 20;
1455
+ }
1456
+ #cmd-menu.visible { display: block; }
1457
+ .cmd-item {
1458
+ display: flex; align-items: center; gap: 10px;
1459
+ padding: 12px 16px; cursor: pointer; transition: background .1s;
1460
+ min-height: 48px;
1461
+ }
1462
+ .cmd-item:hover, .cmd-item.active { background: var(--bg-hover); }
1463
+ .cmd-icon {
1464
+ width: 32px; height: 32px; border-radius: 8px;
1465
+ background: var(--accent-light); color: var(--accent);
1466
+ display: flex; align-items: center; justify-content: center;
1467
+ flex-shrink: 0; font-size: 14px;
1468
+ }
1469
+ .cmd-name { font-size: 14px; font-weight: 600; color: var(--text); }
1470
+ .cmd-desc { font-size: 12px; color: var(--text-muted); }
1471
+
1472
+ /* ===== Model Picker Overlay ===== */
1473
+ #model-picker {
1474
+ display: none; position: fixed; inset: 0; z-index: 200;
1475
+ background: var(--overlay-bg);
1476
+ align-items: flex-end; justify-content: center;
1477
+ }
1478
+ #model-picker.visible { display: flex; }
1479
+ #model-dialog {
1480
+ width: 100%; max-width: 400px;
1481
+ background: var(--bg-white); border-radius: 16px 16px 0 0;
1482
+ padding: 16px 0 20px;
1483
+ padding-bottom: 20px;
1484
+ padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
1485
+ box-shadow: 0 -4px 24px var(--shadow-md);
1486
+ animation: slideUp .2s ease;
1487
+ }
1488
+ .model-title {
1489
+ padding: 0 20px 12px; font-size: 15px; font-weight: 600;
1490
+ color: var(--text); border-bottom: 1px solid var(--border);
1491
+ }
1492
+ .model-item {
1493
+ display: flex; align-items: center; gap: 10px;
1494
+ padding: 14px 20px; cursor: pointer; transition: background .1s;
1495
+ min-height: 52px;
1496
+ }
1497
+ .model-item:hover, .model-item:active { background: var(--bg-hover); }
1498
+ .model-item .mi-num {
1499
+ width: 24px; height: 24px; border-radius: 6px;
1500
+ background: var(--bg); border: 1px solid var(--border);
1501
+ display: flex; align-items: center; justify-content: center;
1502
+ font-size: 12px; font-weight: 600; color: var(--text-muted); flex-shrink: 0;
1503
+ }
1504
+ .model-item .mi-info { display: flex; flex-direction: column; gap: 2px; }
1505
+ .model-item .mi-name { font-size: 14px; color: var(--text); }
1506
+ .model-item .mi-desc { font-size: 12px; color: var(--text-muted); }
1507
+
1508
+ /* ===== Cost Card ===== */
1509
+ .cost-card {
1510
+ margin: 12px 0; padding: 0;
1511
+ background: var(--bg-white); border: 1px solid var(--border);
1512
+ border-radius: var(--radius); overflow: hidden;
1513
+ animation: fadeUp .25s ease; font-size: 14px;
1514
+ }
1515
+ .cost-header {
1516
+ display: flex; align-items: center; gap: 8px;
1517
+ padding: 12px 16px; font-weight: 600; font-size: 14px;
1518
+ color: var(--accent); border-bottom: 1px solid var(--border);
1519
+ background: var(--accent-bg);
1520
+ }
1521
+ .cost-header svg { flex-shrink: 0; }
1522
+ .cost-grid {
1523
+ display: grid; grid-template-columns: 1fr 1fr;
1524
+ gap: 0;
1525
+ }
1526
+ .cost-item {
1527
+ padding: 12px 16px;
1528
+ border-bottom: 1px solid var(--border-light);
1529
+ }
1530
+ .cost-item:nth-child(odd) { border-right: 1px solid var(--border-light); }
1531
+ .cost-label {
1532
+ font-size: 11px; color: var(--text-muted); text-transform: uppercase;
1533
+ letter-spacing: .5px; margin-bottom: 2px;
1534
+ }
1535
+ .cost-value {
1536
+ font-size: 15px; font-weight: 600; color: var(--text);
1537
+ font-family: var(--mono);
1538
+ }
1539
+ .cost-highlight { color: var(--accent); }
1540
+ .cost-models {
1541
+ padding: 12px 16px;
1542
+ }
1543
+ .cost-models-title {
1544
+ font-size: 11px; color: var(--text-muted); text-transform: uppercase;
1545
+ letter-spacing: .5px; margin-bottom: 8px;
1546
+ }
1547
+ .cost-model-row {
1548
+ padding: 8px 12px; margin-bottom: 6px;
1549
+ background: var(--bg); border-radius: var(--radius-sm);
1550
+ border: 1px solid var(--border-light);
1551
+ }
1552
+ .cost-model-row:last-child { margin-bottom: 0; }
1553
+ .cost-model-name {
1554
+ font-size: 13px; font-weight: 600; color: var(--text);
1555
+ font-family: var(--mono); margin-bottom: 2px;
1556
+ }
1557
+ .cost-model-detail {
1558
+ font-size: 12px; color: var(--text-secondary); line-height: 1.5;
1559
+ }
1560
+ .cost-model-cost {
1561
+ font-size: 13px; font-weight: 600; color: var(--accent);
1562
+ font-family: var(--mono); margin-top: 2px;
1563
+ }
1564
+
1565
+ /* ===== Plan Inline Card (session switch) ===== */
1566
+ .plan-inline-card {
1567
+ margin: 12px 0; padding: 0;
1568
+ background: var(--bg-white); border: 1px solid var(--border);
1569
+ border-radius: var(--radius); overflow: hidden;
1570
+ animation: fadeUp .25s ease; font-size: 14px;
1571
+ }
1572
+ .plan-inline-header {
1573
+ display: flex; align-items: center; gap: 8px;
1574
+ padding: 12px 16px; font-weight: 600; font-size: 14px;
1575
+ color: var(--plan-icon-text); border-bottom: 1px solid var(--border);
1576
+ background: var(--plan-icon-bg);
1577
+ }
1578
+ .plan-inline-header svg { flex-shrink: 0; }
1579
+ .plan-inline-body {
1580
+ padding: 12px 16px; font-size: 13px; color: var(--text-secondary);
1581
+ line-height: 1.6; max-height: 300px; overflow-y: auto;
1582
+ }
1583
+ .plan-inline-body h1,.plan-inline-body h2,.plan-inline-body h3 {
1584
+ font-size: 14px; margin: 8px 0 4px; color: var(--text);
1585
+ }
1586
+ .plan-inline-body p { margin: 4px 0; }
1587
+ .plan-inline-body ul,.plan-inline-body ol { padding-left: 18px; margin: 4px 0; }
1588
+ .plan-inline-body code {
1589
+ background: var(--code-bg); padding: 1px 4px; border-radius: 3px;
1590
+ font-size: 12px;
1591
+ }
1592
+
1593
+ /* ===== Mobile-specific ===== */
1594
+ @media (max-width: 600px) {
1595
+ #messages { padding: 10px 14px; }
1596
+ .step-desc { max-width: 100px; }
1597
+ }
1598
+
1599
+ /* ===== Session Drawer ===== */
1600
+ #session-overlay {
1601
+ position: fixed; inset: 0; z-index: 350;
1602
+ background: var(--overlay-bg);
1603
+ display: none; opacity: 0;
1604
+ transition: opacity .2s ease;
1605
+ }
1606
+ #session-overlay.visible { display: flex; opacity: 1; }
1607
+ #session-drawer {
1608
+ position: fixed; right: 0; top: 0; bottom: 0;
1609
+ width: 280px; max-width: 85vw;
1610
+ background: var(--bg-white);
1611
+ display: flex; flex-direction: column;
1612
+ transform: translateX(100%);
1613
+ transition: transform .25s cubic-bezier(.4,0,.2,1);
1614
+ box-shadow: -4px 0 20px rgba(0,0,0,.1);
1615
+ }
1616
+ #session-overlay.visible #session-drawer { transform: translateX(0); }
1617
+ .drawer-header {
1618
+ display: flex; align-items: center; justify-content: space-between;
1619
+ padding: 16px;
1620
+ padding-top: calc(16px + env(safe-area-inset-top, 0px));
1621
+ border-bottom: 1px solid var(--border);
1622
+ flex-shrink: 0;
1623
+ }
1624
+ .drawer-title { font-size: 16px; font-weight: 600; color: var(--text); }
1625
+ .drawer-close {
1626
+ width: 32px; height: 32px; border: none; border-radius: 8px;
1627
+ background: transparent; color: var(--text-muted); cursor: pointer;
1628
+ display: flex; align-items: center; justify-content: center;
1629
+ }
1630
+ .drawer-close:active { background: var(--bg-hover); }
1631
+ .drawer-body {
1632
+ flex: 1; overflow-y: auto; padding: 8px;
1633
+ -webkit-overflow-scrolling: touch;
1634
+ }
1635
+ .drawer-loading {
1636
+ padding: 24px; text-align: center;
1637
+ color: var(--text-muted); font-size: 14px;
1638
+ }
1639
+ .session-item {
1640
+ padding: 12px; margin-bottom: 4px;
1641
+ border-radius: var(--radius-sm);
1642
+ border-left: 3px solid transparent;
1643
+ cursor: pointer; transition: background .15s;
1644
+ }
1645
+ .session-item:active { background: var(--bg-hover); }
1646
+ .session-item.active {
1647
+ border-left-color: var(--accent);
1648
+ background: var(--accent-bg);
1649
+ cursor: default;
1650
+ }
1651
+ .session-summary {
1652
+ font-size: 14px; font-weight: 500; color: var(--text);
1653
+ line-height: 1.4;
1654
+ overflow: hidden; text-overflow: ellipsis;
1655
+ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
1656
+ }
1657
+ .session-meta {
1658
+ display: flex; align-items: center; gap: 8px;
1659
+ margin-top: 4px; font-size: 12px; color: var(--text-muted);
1660
+ }
1661
+ .session-branch {
1662
+ background: var(--code-bg); border: 1px solid var(--border);
1663
+ padding: 1px 6px; border-radius: 4px;
1664
+ font-family: var(--mono); font-size: 11px;
1665
+ }
1666
+ .drawer-footer {
1667
+ padding: 12px; border-top: 1px solid var(--border);
1668
+ padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
1669
+ flex-shrink: 0;
1670
+ }
1671
+ .drawer-btn-new {
1672
+ width: 100%; height: 42px; border: 1.5px dashed var(--border);
1673
+ border-radius: var(--radius-sm);
1674
+ background: transparent; color: var(--text-secondary);
1675
+ font-size: 14px; font-weight: 500; cursor: pointer;
1676
+ transition: all .15s;
1677
+ }
1678
+ .drawer-btn-new:active {
1679
+ border-color: var(--accent); color: var(--accent);
1680
+ background: var(--accent-bg);
1681
+ }
1682
+
1683
+ /* ===== Settings: CWD Section ===== */
1684
+ .settings-cwd-current {
1685
+ margin: 8px 0; padding: 8px 12px;
1686
+ background: var(--code-bg); border: 1px solid var(--border);
1687
+ border-radius: var(--radius-sm);
1688
+ font-family: var(--mono); font-size: 13px;
1689
+ color: var(--text); word-break: break-all;
1690
+ line-height: 1.5;
1691
+ }
1692
+ .settings-cwd-list {
1693
+ display: flex; flex-wrap: wrap; gap: 6px;
1694
+ margin-bottom: 8px; min-height: 0;
1695
+ }
1696
+ .cwd-chip {
1697
+ padding: 5px 10px; border-radius: 14px;
1698
+ background: var(--bg); border: 1px solid var(--border);
1699
+ font-size: 12px; font-family: var(--mono);
1700
+ color: var(--text-secondary); cursor: pointer;
1701
+ transition: all .15s; max-width: 100%;
1702
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
1703
+ }
1704
+ .cwd-chip:active { border-color: var(--accent); color: var(--accent); }
1705
+ .settings-cwd-input-row {
1706
+ display: flex; gap: 8px; margin-top: 4px;
1707
+ }
1708
+ .settings-cwd-input-row input {
1709
+ flex: 1; height: 40px; padding: 0 12px;
1710
+ border: 1.5px solid var(--border); border-radius: var(--radius-sm);
1711
+ font-size: 14px; font-family: var(--mono);
1712
+ color: var(--text); background: var(--bg-white);
1713
+ outline: none; transition: border-color .15s;
1714
+ }
1715
+ .settings-cwd-input-row input:focus { border-color: var(--accent); }
1716
+ .settings-cwd-input-row input[readonly] { cursor: pointer; }
1717
+ .settings-cwd-btn {
1718
+ height: 40px; padding: 0 16px; border: none;
1719
+ border-radius: var(--radius-sm);
1720
+ background: var(--accent); color: #fff;
1721
+ font-size: 14px; font-weight: 500; cursor: pointer;
1722
+ flex-shrink: 0; transition: background .15s;
1723
+ }
1724
+ .settings-cwd-btn:active { background: var(--accent-active); }
1725
+
1726
+ /* ===== Directory Picker ===== */
1727
+ #dir-overlay {
1728
+ position: fixed; inset: 0; z-index: 360;
1729
+ background: var(--overlay-bg);
1730
+ display: none; opacity: 0;
1731
+ transition: opacity .2s ease;
1732
+ }
1733
+ #dir-overlay.visible { display: flex; opacity: 1; }
1734
+ #dir-drawer {
1735
+ position: fixed; left: 0; right: 0; bottom: 0;
1736
+ width: 100%; max-width: 480px; margin: 0 auto;
1737
+ max-height: 85vh;
1738
+ background: var(--bg-white);
1739
+ border-radius: 16px 16px 0 0;
1740
+ display: flex; flex-direction: column;
1741
+ transform: translateY(100%);
1742
+ transition: transform .25s cubic-bezier(.4,0,.2,1);
1743
+ box-shadow: 0 -4px 20px var(--shadow-md);
1744
+ }
1745
+ #dir-overlay.visible #dir-drawer { transform: translateY(0); }
1746
+ .dir-toolbar {
1747
+ padding: 12px 16px 8px;
1748
+ border-bottom: 1px solid var(--border);
1749
+ display: flex; flex-direction: column; gap: 10px;
1750
+ }
1751
+ .dir-current {
1752
+ font-family: var(--mono); font-size: 12px; line-height: 1.5;
1753
+ color: var(--text-secondary); word-break: break-all;
1754
+ }
1755
+ .dir-roots {
1756
+ display: flex; flex-wrap: wrap; gap: 6px;
1757
+ }
1758
+ .dir-root-chip {
1759
+ padding: 5px 10px; border-radius: 999px;
1760
+ border: 1px solid var(--border); background: var(--bg);
1761
+ color: var(--text-secondary); font-size: 12px; font-family: var(--mono);
1762
+ cursor: pointer;
1763
+ }
1764
+ .dir-root-chip:active,
1765
+ .dir-root-chip.active {
1766
+ border-color: var(--accent); color: var(--accent); background: var(--accent-bg);
1767
+ }
1768
+ .dir-item {
1769
+ display: flex; align-items: center; justify-content: space-between;
1770
+ gap: 12px; padding: 12px; border-radius: var(--radius-sm);
1771
+ cursor: pointer; transition: background .15s;
1772
+ }
1773
+ .dir-item:active { background: var(--bg-hover); }
1774
+ .dir-item-main {
1775
+ min-width: 0; display: flex; align-items: center; gap: 10px;
1776
+ }
1777
+ .dir-item-icon {
1778
+ width: 28px; height: 28px; border-radius: 8px;
1779
+ background: var(--accent-bg); color: var(--accent);
1780
+ display: flex; align-items: center; justify-content: center;
1781
+ flex-shrink: 0;
1782
+ }
1783
+ .dir-item-name {
1784
+ font-size: 14px; color: var(--text);
1785
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
1786
+ }
1787
+ .dir-item-path {
1788
+ font-size: 11px; color: var(--text-muted); font-family: var(--mono);
1789
+ }
1790
+ .dir-item-arrow {
1791
+ color: var(--text-muted); font-size: 16px; flex-shrink: 0;
1792
+ }
1793
+ .dir-empty {
1794
+ padding: 24px; text-align: center;
1795
+ color: var(--text-muted); font-size: 14px;
1796
+ }
1797
+ .drawer-btn-select {
1798
+ width: 100%; height: 42px; border: none;
1799
+ border-radius: var(--radius-sm);
1800
+ background: var(--accent); color: #fff;
1801
+ font-size: 14px; font-weight: 600; cursor: pointer;
1802
+ }
1803
+ .drawer-btn-select:active { background: var(--accent-active); }
1804
+
1805
+ /* ===== Dark Mode ===== */
1806
+ @media (prefers-color-scheme: dark) {
1807
+ html:not([data-theme="light"]) {
1808
+ --bg: #1e1e1e;
1809
+ --bg-white: #252526;
1810
+ --bg-hover: #2a2d2e;
1811
+ --border: #3c3c3c;
1812
+ --border-light: #333333;
1813
+ --text: #cccccc;
1814
+ --text-secondary: #9d9d9d;
1815
+ --text-muted: #6a6a6a;
1816
+ --accent: #3dab8e;
1817
+ --accent-light: #1a3a2e;
1818
+ --accent-bg: #1e2e26;
1819
+ --accent-active: #2f9576;
1820
+ --user-accent: #569cd6;
1821
+ --error: #f14c4c;
1822
+ --error-bg: #3b1e1e;
1823
+ --error-border: rgba(241,76,76,.3);
1824
+ --timeline: #444444;
1825
+ --code-bg: #1e1e1e;
1826
+ --overlay-bg: rgba(0,0,0,.55);
1827
+ --overlay-heavy: rgba(0,0,0,.65);
1828
+ --overlay-light: rgba(0,0,0,.4);
1829
+ --shadow-sm: rgba(0,0,0,.2);
1830
+ --shadow-md: rgba(0,0,0,.3);
1831
+ --shadow-lg: rgba(0,0,0,.4);
1832
+ --status-unstable: #d5a000;
1833
+ --status-offline: #555;
1834
+ --status-probing: #e8a000;
1835
+ --ping-excellent-bg: #1a3a2e;
1836
+ --ping-excellent-text: #4ec89a;
1837
+ --ping-good-bg: #1a2d3e;
1838
+ --ping-good-text: #6cb6ff;
1839
+ --ping-warn-bg: #3a2e1a;
1840
+ --ping-warn-text: #dba84c;
1841
+ --ping-bad-bg: #3b1e1e;
1842
+ --ping-bad-text: #f87171;
1843
+ --ping-stale-shadow: rgba(219,168,76,.2);
1844
+ --hub-overlay-bg: rgba(20,20,20,.85);
1845
+ --hub-card-bg: rgba(40,40,40,.96);
1846
+ --hub-card-border: rgba(61,171,142,.15);
1847
+ --hub-card-shadow: rgba(0,0,0,.4);
1848
+ --spinner-track: rgba(61,171,142,.2);
1849
+ --user-msg-bg: #264f78;
1850
+ --user-msg-text: #e0e0e0;
1851
+ --user-msg-code-bg: rgba(255,255,255,.12);
1852
+ --user-msg-pre-bg: rgba(255,255,255,.08);
1853
+ --user-msg-link: #6cb6ff;
1854
+ --toast-bg: rgba(50,50,50,.96);
1855
+ --toast-text: #e0e0e0;
1856
+ --toast-border: rgba(255,255,255,.12);
1857
+ --shimmer-1: rgba(61,171,142,.08);
1858
+ --shimmer-2: rgba(61,171,142,.16);
1859
+ --shimmer-light-1: rgba(61,171,142,.06);
1860
+ --shimmer-light-2: rgba(61,171,142,.12);
1861
+ --diff-del-bg: rgba(255,80,80,.1);
1862
+ --diff-del-sign: #f97583;
1863
+ --diff-del-code: #ffa6a6;
1864
+ --diff-del-ln-bg: rgba(255,80,80,.14);
1865
+ --diff-add-bg: rgba(80,255,80,.08);
1866
+ --diff-add-sign: #85e89d;
1867
+ --diff-add-code: #a5d6a7;
1868
+ --diff-add-ln-bg: rgba(80,255,80,.1);
1869
+ --diff-hunk-bg: #1e2d3d;
1870
+ --diff-hunk-text: #6a8fad;
1871
+ --todo-done-color: #66bb6a;
1872
+ --todo-done-bg: #1a2e1e;
1873
+ --warn-bg: #3a2e1a;
1874
+ --warn-text: #e8a000;
1875
+ --warn-active: #c28600;
1876
+ --delete-hover-bg: #3b2020;
1877
+ --plan-icon-bg: #1a2d3e;
1878
+ --plan-icon-text: #6cb6ff;
1879
+ --banner-warn-bg: #e8a000;
1880
+ --banner-warn-text: #1a1a1a;
1881
+ color-scheme: dark;
1882
+ }
1883
+ }
1884
+ html[data-theme="dark"] {
1885
+ --bg: #1e1e1e;
1886
+ --bg-white: #252526;
1887
+ --bg-hover: #2a2d2e;
1888
+ --border: #3c3c3c;
1889
+ --border-light: #333333;
1890
+ --text: #cccccc;
1891
+ --text-secondary: #9d9d9d;
1892
+ --text-muted: #6a6a6a;
1893
+ --accent: #3dab8e;
1894
+ --accent-light: #1a3a2e;
1895
+ --accent-bg: #1e2e26;
1896
+ --accent-active: #2f9576;
1897
+ --user-accent: #569cd6;
1898
+ --error: #f14c4c;
1899
+ --error-bg: #3b1e1e;
1900
+ --error-border: rgba(241,76,76,.3);
1901
+ --timeline: #444444;
1902
+ --code-bg: #1e1e1e;
1903
+ --overlay-bg: rgba(0,0,0,.55);
1904
+ --overlay-heavy: rgba(0,0,0,.65);
1905
+ --overlay-light: rgba(0,0,0,.4);
1906
+ --shadow-sm: rgba(0,0,0,.2);
1907
+ --shadow-md: rgba(0,0,0,.3);
1908
+ --shadow-lg: rgba(0,0,0,.4);
1909
+ --status-unstable: #d5a000;
1910
+ --status-offline: #555;
1911
+ --status-probing: #e8a000;
1912
+ --ping-excellent-bg: #1a3a2e;
1913
+ --ping-excellent-text: #4ec89a;
1914
+ --ping-good-bg: #1a2d3e;
1915
+ --ping-good-text: #6cb6ff;
1916
+ --ping-warn-bg: #3a2e1a;
1917
+ --ping-warn-text: #dba84c;
1918
+ --ping-bad-bg: #3b1e1e;
1919
+ --ping-bad-text: #f87171;
1920
+ --ping-stale-shadow: rgba(219,168,76,.2);
1921
+ --hub-overlay-bg: rgba(20,20,20,.85);
1922
+ --hub-card-bg: rgba(40,40,40,.96);
1923
+ --hub-card-border: rgba(61,171,142,.15);
1924
+ --hub-card-shadow: rgba(0,0,0,.4);
1925
+ --spinner-track: rgba(61,171,142,.2);
1926
+ --user-msg-bg: #264f78;
1927
+ --user-msg-text: #e0e0e0;
1928
+ --user-msg-code-bg: rgba(255,255,255,.12);
1929
+ --user-msg-pre-bg: rgba(255,255,255,.08);
1930
+ --user-msg-link: #6cb6ff;
1931
+ --toast-bg: rgba(50,50,50,.96);
1932
+ --toast-text: #e0e0e0;
1933
+ --toast-border: rgba(255,255,255,.12);
1934
+ --shimmer-1: rgba(61,171,142,.08);
1935
+ --shimmer-2: rgba(61,171,142,.16);
1936
+ --shimmer-light-1: rgba(61,171,142,.06);
1937
+ --shimmer-light-2: rgba(61,171,142,.12);
1938
+ --diff-del-bg: rgba(255,80,80,.1);
1939
+ --diff-del-sign: #f97583;
1940
+ --diff-del-code: #ffa6a6;
1941
+ --diff-del-ln-bg: rgba(255,80,80,.14);
1942
+ --diff-add-bg: rgba(80,255,80,.08);
1943
+ --diff-add-sign: #85e89d;
1944
+ --diff-add-code: #a5d6a7;
1945
+ --diff-add-ln-bg: rgba(80,255,80,.1);
1946
+ --diff-hunk-bg: #1e2d3d;
1947
+ --diff-hunk-text: #6a8fad;
1948
+ --todo-done-color: #66bb6a;
1949
+ --todo-done-bg: #1a2e1e;
1950
+ --warn-bg: #3a2e1a;
1951
+ --warn-text: #e8a000;
1952
+ --warn-active: #c28600;
1953
+ --delete-hover-bg: #3b2020;
1954
+ --plan-icon-bg: #1a2d3e;
1955
+ --plan-icon-text: #6cb6ff;
1956
+ --banner-warn-bg: #e8a000;
1957
+ --banner-warn-text: #1a1a1a;
1958
+ color-scheme: dark;
1959
+ }