antigravity-chat-proxy 0.1.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.
Files changed (76) hide show
  1. package/README.md +362 -0
  2. package/app/api/v1/artifacts/[convId]/[filename]/route.ts +75 -0
  3. package/app/api/v1/artifacts/[convId]/route.ts +47 -0
  4. package/app/api/v1/artifacts/active/[filename]/route.ts +50 -0
  5. package/app/api/v1/artifacts/active/route.ts +89 -0
  6. package/app/api/v1/artifacts/route.ts +43 -0
  7. package/app/api/v1/chat/action/route.ts +30 -0
  8. package/app/api/v1/chat/approve/route.ts +21 -0
  9. package/app/api/v1/chat/history/route.ts +23 -0
  10. package/app/api/v1/chat/mode/route.ts +59 -0
  11. package/app/api/v1/chat/new/route.ts +21 -0
  12. package/app/api/v1/chat/reject/route.ts +21 -0
  13. package/app/api/v1/chat/route.ts +105 -0
  14. package/app/api/v1/chat/state/route.ts +23 -0
  15. package/app/api/v1/chat/stream/route.ts +258 -0
  16. package/app/api/v1/conversations/active/route.ts +117 -0
  17. package/app/api/v1/conversations/route.ts +189 -0
  18. package/app/api/v1/conversations/select/route.ts +114 -0
  19. package/app/api/v1/debug/dom/route.ts +30 -0
  20. package/app/api/v1/debug/scrape/route.ts +56 -0
  21. package/app/api/v1/health/route.ts +13 -0
  22. package/app/api/v1/windows/cdp-start/route.ts +32 -0
  23. package/app/api/v1/windows/cdp-status/route.ts +32 -0
  24. package/app/api/v1/windows/close/route.ts +67 -0
  25. package/app/api/v1/windows/open/route.ts +49 -0
  26. package/app/api/v1/windows/recent/route.ts +25 -0
  27. package/app/api/v1/windows/route.ts +27 -0
  28. package/app/api/v1/windows/select/route.ts +35 -0
  29. package/app/debug/page.tsx +228 -0
  30. package/app/favicon.ico +0 -0
  31. package/app/globals.css +1234 -0
  32. package/app/layout.tsx +42 -0
  33. package/app/page.tsx +10 -0
  34. package/bin/cli.js +601 -0
  35. package/components/agent-message.tsx +63 -0
  36. package/components/artifact-panel.tsx +133 -0
  37. package/components/chat-container.tsx +82 -0
  38. package/components/chat-input.tsx +92 -0
  39. package/components/conversation-selector.tsx +97 -0
  40. package/components/header.tsx +302 -0
  41. package/components/hitl-dialog.tsx +23 -0
  42. package/components/message-list.tsx +41 -0
  43. package/components/thinking-block.tsx +14 -0
  44. package/components/tool-call-card.tsx +75 -0
  45. package/components/typing-indicator.tsx +11 -0
  46. package/components/user-message.tsx +13 -0
  47. package/components/welcome-screen.tsx +38 -0
  48. package/hooks/use-artifacts.ts +85 -0
  49. package/hooks/use-chat.ts +278 -0
  50. package/hooks/use-conversations.ts +190 -0
  51. package/lib/actions/hitl.ts +113 -0
  52. package/lib/actions/new-chat.ts +116 -0
  53. package/lib/actions/send-message.ts +31 -0
  54. package/lib/actions/switch-conversation.ts +92 -0
  55. package/lib/cdp/connection.ts +95 -0
  56. package/lib/cdp/process-manager.ts +327 -0
  57. package/lib/cdp/recent-projects.ts +137 -0
  58. package/lib/cdp/selectors.ts +11 -0
  59. package/lib/context.ts +38 -0
  60. package/lib/init.ts +48 -0
  61. package/lib/logger.ts +32 -0
  62. package/lib/scraper/agent-mode.ts +122 -0
  63. package/lib/scraper/agent-state.ts +756 -0
  64. package/lib/scraper/chat-history.ts +138 -0
  65. package/lib/scraper/ide-conversations.ts +124 -0
  66. package/lib/sse/diff-states.ts +141 -0
  67. package/lib/types.ts +146 -0
  68. package/lib/utils.ts +7 -0
  69. package/next.config.ts +7 -0
  70. package/package.json +50 -0
  71. package/public/file.svg +1 -0
  72. package/public/globe.svg +1 -0
  73. package/public/next.svg +1 -0
  74. package/public/vercel.svg +1 -0
  75. package/public/window.svg +1 -0
  76. package/tsconfig.json +34 -0
@@ -0,0 +1,1234 @@
1
+ /* ============================================
2
+ Antigravity Chat Proxy — Global Styles
3
+ Mobile-First Design System
4
+ ============================================ */
5
+
6
+ /* ── Design Tokens ── */
7
+ :root {
8
+ --bg-primary: #0a0a0f;
9
+ --bg-secondary: #12121a;
10
+ --bg-tertiary: #1a1a2e;
11
+ --bg-hover: #22223a;
12
+ --bg-glass: rgba(26, 26, 46, 0.7);
13
+ --bg-glass-strong: rgba(26, 26, 46, 0.9);
14
+ --text-primary: #e8e8f0;
15
+ --text-secondary: #9898b0;
16
+ --text-muted: #686888;
17
+ --accent-primary: #6366f1;
18
+ --accent-secondary: #a855f7;
19
+ --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
20
+ --accent-glow: rgba(99, 102, 241, 0.3);
21
+ --border-subtle: rgba(255, 255, 255, 0.06);
22
+ --border-active: rgba(99, 102, 241, 0.4);
23
+ --user-bubble: rgba(99, 102, 241, 0.15);
24
+ --agent-bubble: rgba(255, 255, 255, 0.04);
25
+ --success: #34d399;
26
+ --warning: #fbbf24;
27
+ --error: #ef4444;
28
+ --tool-running-border: rgba(99, 102, 241, 0.4);
29
+ --tool-running-bg: rgba(99, 102, 241, 0.06);
30
+ --tool-done-border: rgba(255, 255, 255, 0.08);
31
+ --tool-done-bg: rgba(255, 255, 255, 0.02);
32
+ --tool-error-border: rgba(239, 68, 68, 0.4);
33
+ --tool-error-bg: rgba(239, 68, 68, 0.06);
34
+ --hitl-bg: rgba(251, 191, 36, 0.08);
35
+ --hitl-border: rgba(251, 191, 36, 0.3);
36
+ --hitl-approve-bg: rgba(52, 211, 153, 0.15);
37
+ --hitl-approve-border: rgba(52, 211, 153, 0.5);
38
+ --hitl-reject-bg: rgba(239, 68, 68, 0.15);
39
+ --hitl-reject-border: rgba(239, 68, 68, 0.5);
40
+
41
+ /* Mobile-first tokens */
42
+ --header-height: 52px;
43
+ --radius-sm: 8px;
44
+ --radius-md: 12px;
45
+ --radius-lg: 14px;
46
+ --radius-xl: 18px;
47
+ --transition-fast: 0.15s ease;
48
+ --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
49
+ --safe-bottom: env(safe-area-inset-bottom, 0px);
50
+ --safe-top: env(safe-area-inset-top, 0px);
51
+ --safe-left: env(safe-area-inset-left, 0px);
52
+ --safe-right: env(safe-area-inset-right, 0px);
53
+ }
54
+
55
+ /* ── Reset ── */
56
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
57
+ html, body {
58
+ height: 100%;
59
+ overflow: hidden;
60
+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
61
+ background: var(--bg-primary);
62
+ color: var(--text-primary);
63
+ -webkit-font-smoothing: antialiased;
64
+ -webkit-text-size-adjust: 100%;
65
+ -webkit-tap-highlight-color: transparent;
66
+ touch-action: manipulation;
67
+ }
68
+
69
+ /* ── Animations ── */
70
+ @keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }
71
+ @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
72
+ @keyframes messageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
73
+ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
74
+ @keyframes toolPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); } 50% { box-shadow: 0 0 12px 0 rgba(99, 102, 241, 0.15); } }
75
+ @keyframes hitlSlideIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
76
+ @keyframes typingBounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
77
+ @keyframes wm-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
78
+
79
+ /* ══════════════════════════════════════════════
80
+ MOBILE-FIRST BASE STYLES (< 480px)
81
+ ══════════════════════════════════════════════ */
82
+
83
+ /* ── App Layout ── */
84
+ .app-container {
85
+ display: flex;
86
+ flex-direction: column;
87
+ height: 100vh;
88
+ height: 100dvh;
89
+ width: 100%;
90
+ padding-top: var(--safe-top);
91
+ }
92
+
93
+ /* ── Header ── */
94
+ .header {
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: space-between;
98
+ height: var(--header-height);
99
+ padding: 0 10px;
100
+ padding-left: calc(10px + var(--safe-left));
101
+ padding-right: calc(10px + var(--safe-right));
102
+ border-bottom: 1px solid var(--border-subtle);
103
+ backdrop-filter: blur(20px);
104
+ background: var(--bg-glass-strong);
105
+ position: sticky;
106
+ top: 0;
107
+ z-index: 100;
108
+ gap: 6px;
109
+ flex-shrink: 0;
110
+ /* Allow dropdowns to overflow the header */
111
+ overflow: visible;
112
+ }
113
+ .header-left {
114
+ display: flex;
115
+ align-items: center;
116
+ gap: 8px;
117
+ min-width: 0;
118
+ flex-shrink: 0;
119
+ }
120
+ .logo {
121
+ width: 32px;
122
+ height: 32px;
123
+ display: flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ flex-shrink: 0;
127
+ }
128
+ .header-title h1 {
129
+ font-size: 14px;
130
+ font-weight: 600;
131
+ letter-spacing: -0.02em;
132
+ white-space: nowrap;
133
+ }
134
+ .header-subtitle {
135
+ font-size: 10px;
136
+ color: var(--text-secondary);
137
+ text-transform: uppercase;
138
+ letter-spacing: 0.06em;
139
+ display: flex;
140
+ align-items: center;
141
+ gap: 5px;
142
+ white-space: nowrap;
143
+ overflow: hidden;
144
+ text-overflow: ellipsis;
145
+ max-width: 140px;
146
+ }
147
+ .header-subtitle::before {
148
+ content: '';
149
+ width: 6px;
150
+ height: 6px;
151
+ border-radius: 50%;
152
+ background: var(--success);
153
+ animation: pulse-dot 2s ease-in-out infinite;
154
+ flex-shrink: 0;
155
+ }
156
+ .status-streaming::before { background: var(--accent-primary); animation: pulse-dot 0.8s ease-in-out infinite; }
157
+ .status-hitl::before { background: var(--warning); animation: pulse-dot 0.6s ease-in-out infinite; }
158
+ .status-error::before { background: var(--error); animation: none; }
159
+ .status-disconnected::before { background: var(--error); animation: none; opacity: 0.5; }
160
+
161
+ .header-right {
162
+ display: flex;
163
+ gap: 1px;
164
+ align-items: center;
165
+ flex-shrink: 1;
166
+ min-width: 0;
167
+ position: relative;
168
+ }
169
+ .icon-btn {
170
+ width: 34px;
171
+ height: 34px;
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: center;
175
+ border: none;
176
+ background: transparent;
177
+ color: var(--text-secondary);
178
+ border-radius: var(--radius-sm);
179
+ cursor: pointer;
180
+ transition: all var(--transition-fast);
181
+ -webkit-tap-highlight-color: transparent;
182
+ flex-shrink: 0;
183
+ }
184
+ .icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
185
+ .icon-btn:active { background: var(--bg-hover); color: var(--text-primary); transform: scale(0.92); }
186
+
187
+ /* ── Messages ── */
188
+ .messages-area {
189
+ flex: 1;
190
+ overflow-y: auto;
191
+ -webkit-overflow-scrolling: touch;
192
+ overscroll-behavior: contain;
193
+ padding: 12px 8px;
194
+ scroll-behavior: smooth;
195
+ }
196
+ /* Hide scrollbar on mobile for cleaner look */
197
+ .messages-area::-webkit-scrollbar { display: none; }
198
+ .messages-area { scrollbar-width: none; }
199
+
200
+ .user-message {
201
+ display: flex;
202
+ justify-content: flex-end;
203
+ margin-bottom: 14px;
204
+ animation: messageIn 0.3s ease-out;
205
+ }
206
+ .message-content {
207
+ max-width: 92%;
208
+ padding: 12px 14px;
209
+ border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
210
+ background: var(--user-bubble);
211
+ border: 1px solid var(--border-active);
212
+ font-size: 14px;
213
+ line-height: 1.6;
214
+ white-space: pre-wrap;
215
+ word-break: break-word;
216
+ }
217
+ .agent-message {
218
+ margin-bottom: 18px;
219
+ animation: messageIn 0.3s ease-out;
220
+ }
221
+ .agent-steps {
222
+ display: flex;
223
+ flex-direction: column;
224
+ gap: 6px;
225
+ margin-bottom: 10px;
226
+ }
227
+ .agent-response {
228
+ padding: 0 2px;
229
+ font-size: 14px;
230
+ line-height: 1.7;
231
+ }
232
+
233
+ /* ── Welcome Screen ── */
234
+ .welcome-screen {
235
+ display: flex;
236
+ flex-direction: column;
237
+ align-items: center;
238
+ justify-content: center;
239
+ height: 55vh;
240
+ text-align: center;
241
+ padding: 0 20px;
242
+ animation: fadeIn 0.6s ease-out;
243
+ }
244
+ .welcome-icon {
245
+ margin-bottom: 16px;
246
+ animation: float 4s ease-in-out infinite;
247
+ }
248
+ .welcome-icon svg {
249
+ width: 48px;
250
+ height: 48px;
251
+ }
252
+ .welcome-screen h2 {
253
+ font-size: 20px;
254
+ font-weight: 700;
255
+ margin-bottom: 6px;
256
+ }
257
+ .welcome-screen p {
258
+ font-size: 13px;
259
+ color: var(--text-secondary);
260
+ margin-bottom: 24px;
261
+ line-height: 1.5;
262
+ }
263
+ .quick-prompts {
264
+ display: flex;
265
+ flex-direction: column;
266
+ gap: 8px;
267
+ width: 100%;
268
+ align-items: stretch;
269
+ }
270
+ .quick-prompt {
271
+ padding: 12px 16px;
272
+ border-radius: var(--radius-xl);
273
+ border: 1px solid var(--border-subtle);
274
+ background: var(--bg-secondary);
275
+ color: var(--text-secondary);
276
+ font-size: 13px;
277
+ cursor: pointer;
278
+ transition: all var(--transition-fast);
279
+ text-align: left;
280
+ -webkit-tap-highlight-color: transparent;
281
+ }
282
+ .quick-prompt:hover {
283
+ border-color: var(--border-active);
284
+ color: var(--text-primary);
285
+ background: var(--bg-tertiary);
286
+ }
287
+ .quick-prompt:active {
288
+ transform: scale(0.98);
289
+ background: var(--bg-tertiary);
290
+ border-color: var(--border-active);
291
+ color: var(--text-primary);
292
+ }
293
+
294
+ /* ── Tool Call Cards ── */
295
+ .tool-call-card {
296
+ border: 1px solid var(--tool-done-border);
297
+ background: var(--tool-done-bg);
298
+ border-radius: var(--radius-sm);
299
+ padding: 10px 10px;
300
+ font-size: 12px;
301
+ transition: all var(--transition-fast);
302
+ display: flex;
303
+ flex-direction: column;
304
+ gap: 5px;
305
+ }
306
+ .tool-call-card.running { border-color: var(--tool-running-border); background: var(--tool-running-bg); animation: toolPulse 2s ease infinite; }
307
+ .tool-call-card.error { border-color: var(--tool-error-border); background: var(--tool-error-bg); }
308
+ .tool-call-card.mcp { border-color: rgba(168, 85, 247, 0.4); background: rgba(168, 85, 247, 0.06); }
309
+ .tool-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
310
+ .tool-icon { display: flex; align-items: center; color: var(--text-muted); flex-shrink: 0; }
311
+ .tool-status-text { font-weight: 500; color: var(--text-primary); }
312
+ .tool-path {
313
+ font-family: 'JetBrains Mono', monospace;
314
+ font-size: 10px;
315
+ color: var(--accent-primary);
316
+ max-width: 100%;
317
+ overflow: hidden;
318
+ text-overflow: ellipsis;
319
+ white-space: nowrap;
320
+ /* On mobile, tool-path goes below tool-status */
321
+ flex-basis: 100%;
322
+ order: 3;
323
+ }
324
+ .tool-command {
325
+ background: rgba(0, 0, 0, 0.3);
326
+ border-radius: 4px;
327
+ padding: 6px 8px;
328
+ margin-top: 4px;
329
+ overflow-x: auto;
330
+ -webkit-overflow-scrolling: touch;
331
+ }
332
+ .tool-command code {
333
+ font-family: 'JetBrains Mono', monospace;
334
+ font-size: 11px;
335
+ color: var(--text-primary);
336
+ white-space: nowrap;
337
+ }
338
+ .tool-exit-code { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
339
+ .tool-footer-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
340
+ .tool-footer-btn {
341
+ padding: 6px 12px;
342
+ border-radius: 4px;
343
+ border: 1px solid var(--border-subtle);
344
+ background: var(--bg-tertiary);
345
+ color: var(--text-secondary);
346
+ font-size: 11px;
347
+ cursor: pointer;
348
+ transition: all var(--transition-fast);
349
+ min-height: 36px;
350
+ -webkit-tap-highlight-color: transparent;
351
+ }
352
+ .tool-footer-btn:hover { border-color: var(--accent-primary); color: var(--text-primary); }
353
+ .tool-footer-btn:active { transform: scale(0.96); }
354
+ .tool-file-changes { display: flex; gap: 6px; font-size: 10px; margin-top: 2px; }
355
+ .tool-additions { color: var(--success); font-family: 'JetBrains Mono', monospace; }
356
+ .tool-deletions { color: var(--error); font-family: 'JetBrains Mono', monospace; }
357
+ .tool-terminal {
358
+ background: rgba(0, 0, 0, 0.4);
359
+ border-radius: 4px;
360
+ padding: 8px;
361
+ margin-top: 6px;
362
+ max-height: 100px;
363
+ overflow-y: auto;
364
+ -webkit-overflow-scrolling: touch;
365
+ font-family: 'JetBrains Mono', monospace;
366
+ font-size: 10px;
367
+ color: var(--text-secondary);
368
+ white-space: pre-wrap;
369
+ word-break: break-all;
370
+ }
371
+
372
+ /* ── Thinking Block ── */
373
+ .thinking-block {
374
+ display: flex;
375
+ align-items: center;
376
+ gap: 8px;
377
+ padding: 8px 10px;
378
+ background: rgba(99, 102, 241, 0.04);
379
+ border-left: 2px solid var(--accent-primary);
380
+ border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
381
+ font-size: 12px;
382
+ color: var(--text-secondary);
383
+ animation: fadeIn 0.3s ease;
384
+ }
385
+ .thinking-icon { color: var(--accent-primary); animation: pulse-dot 2s ease-in-out infinite; }
386
+
387
+ /* ── HITL Dialog ── */
388
+ .hitl-dialog {
389
+ border: 1px solid var(--hitl-border);
390
+ background: var(--hitl-bg);
391
+ border-radius: var(--radius-md);
392
+ padding: 14px 12px;
393
+ animation: hitlSlideIn 0.3s ease-out;
394
+ }
395
+ .hitl-dialog.resolved { opacity: 0.5; pointer-events: none; transition: opacity 0.5s ease; }
396
+ .hitl-label {
397
+ font-size: 13px;
398
+ font-weight: 600;
399
+ color: var(--warning);
400
+ margin-bottom: 8px;
401
+ display: flex;
402
+ align-items: center;
403
+ gap: 6px;
404
+ }
405
+ .hitl-context {
406
+ font-size: 12px;
407
+ color: var(--text-secondary);
408
+ margin-bottom: 12px;
409
+ font-family: 'JetBrains Mono', monospace;
410
+ padding: 6px 8px;
411
+ background: rgba(0, 0, 0, 0.3);
412
+ border-radius: 4px;
413
+ word-break: break-word;
414
+ overflow-x: auto;
415
+ -webkit-overflow-scrolling: touch;
416
+ }
417
+ .hitl-actions {
418
+ display: flex;
419
+ gap: 8px;
420
+ flex-direction: column;
421
+ }
422
+ .hitl-approve-btn, .hitl-reject-btn {
423
+ padding: 12px 16px;
424
+ border-radius: var(--radius-sm);
425
+ border: 1px solid;
426
+ font-size: 13px;
427
+ font-weight: 600;
428
+ cursor: pointer;
429
+ display: flex;
430
+ align-items: center;
431
+ justify-content: center;
432
+ gap: 6px;
433
+ transition: all var(--transition-fast);
434
+ min-height: 44px;
435
+ -webkit-tap-highlight-color: transparent;
436
+ }
437
+ .hitl-approve-btn {
438
+ background: var(--hitl-approve-bg);
439
+ border-color: var(--hitl-approve-border);
440
+ color: var(--success);
441
+ }
442
+ .hitl-approve-btn:hover { background: rgba(52, 211, 153, 0.25); }
443
+ .hitl-approve-btn:active { transform: scale(0.97); }
444
+ .hitl-reject-btn {
445
+ background: var(--hitl-reject-bg);
446
+ border-color: var(--hitl-reject-border);
447
+ color: var(--error);
448
+ }
449
+ .hitl-reject-btn:hover { background: rgba(239, 68, 68, 0.25); }
450
+ .hitl-reject-btn:active { transform: scale(0.97); }
451
+
452
+ /* ── Typing Indicator ── */
453
+ .typing-indicator { display: flex; align-items: center; gap: 4px; padding: 8px 0; }
454
+ .typing-dot {
455
+ width: 6px;
456
+ height: 6px;
457
+ background: var(--accent-primary);
458
+ border-radius: 50%;
459
+ animation: typingBounce 1.4s ease-in-out infinite;
460
+ }
461
+ .typing-dot:nth-child(2) { animation-delay: 0.16s; }
462
+ .typing-dot:nth-child(3) { animation-delay: 0.32s; }
463
+
464
+ /* ── File Change Indicator ── */
465
+ .file-change-indicator {
466
+ display: flex;
467
+ align-items: center;
468
+ gap: 6px;
469
+ padding: 6px 10px;
470
+ font-size: 11px;
471
+ color: var(--text-secondary);
472
+ background: rgba(52, 211, 153, 0.04);
473
+ border-left: 2px solid var(--success);
474
+ border-radius: 0 4px 4px 0;
475
+ }
476
+ .file-change-name { font-family: 'JetBrains Mono', monospace; color: var(--success); }
477
+
478
+ /* ── Error Banner ── */
479
+ .error-banner {
480
+ padding: 10px 12px;
481
+ background: var(--tool-error-bg);
482
+ border: 1px solid var(--tool-error-border);
483
+ border-radius: var(--radius-sm);
484
+ color: var(--error);
485
+ font-size: 13px;
486
+ display: flex;
487
+ align-items: center;
488
+ gap: 8px;
489
+ word-break: break-word;
490
+ }
491
+
492
+ /* ── Input Area ── */
493
+ .input-area {
494
+ padding: 10px 8px;
495
+ padding-left: calc(8px + var(--safe-left));
496
+ padding-right: calc(8px + var(--safe-right));
497
+ padding-bottom: calc(10px + var(--safe-bottom));
498
+ border-top: 1px solid var(--border-subtle);
499
+ background: var(--bg-glass-strong);
500
+ backdrop-filter: blur(20px);
501
+ flex-shrink: 0;
502
+ }
503
+ .input-wrapper {
504
+ display: flex;
505
+ align-items: flex-end;
506
+ gap: 6px;
507
+ background: var(--bg-tertiary);
508
+ border: 1px solid var(--border-subtle);
509
+ border-radius: var(--radius-lg);
510
+ padding: 6px 10px;
511
+ transition: border-color var(--transition-fast);
512
+ }
513
+ .input-wrapper:focus-within { border-color: var(--border-active); }
514
+ .input-wrapper textarea {
515
+ flex: 1;
516
+ background: transparent;
517
+ border: none;
518
+ color: var(--text-primary);
519
+ font-family: inherit;
520
+ /* 16px prevents iOS auto-zoom on focus */
521
+ font-size: 16px;
522
+ line-height: 1.5;
523
+ resize: none;
524
+ outline: none;
525
+ max-height: 120px;
526
+ min-height: 24px;
527
+ }
528
+ .input-wrapper textarea::placeholder { color: var(--text-muted); }
529
+ .send-btn {
530
+ width: 40px;
531
+ height: 40px;
532
+ display: flex;
533
+ align-items: center;
534
+ justify-content: center;
535
+ border: none;
536
+ border-radius: var(--radius-sm);
537
+ background: var(--accent-gradient);
538
+ color: white;
539
+ cursor: pointer;
540
+ transition: all var(--transition-fast);
541
+ flex-shrink: 0;
542
+ -webkit-tap-highlight-color: transparent;
543
+ }
544
+ .send-btn:disabled { opacity: 0.3; cursor: not-allowed; }
545
+ .send-btn:not(:disabled):hover { transform: scale(1.05); box-shadow: 0 0 16px var(--accent-glow); }
546
+ .send-btn:not(:disabled):active { transform: scale(0.95); }
547
+ .input-hint {
548
+ display: none; /* Hidden on mobile — keyboard hints not useful for touch */
549
+ }
550
+
551
+ /* ── Mode Toggle ── */
552
+ .mode-toggle {
553
+ display: flex;
554
+ align-items: center;
555
+ gap: 3px;
556
+ padding: 4px 8px;
557
+ border: 1px solid var(--border-subtle);
558
+ border-radius: var(--radius-xl);
559
+ background: var(--bg-secondary);
560
+ color: var(--text-secondary);
561
+ font-family: inherit;
562
+ font-size: 11px;
563
+ cursor: pointer;
564
+ transition: all var(--transition-smooth);
565
+ flex-shrink: 0;
566
+ white-space: nowrap;
567
+ user-select: none;
568
+ -webkit-tap-highlight-color: transparent;
569
+ min-height: 32px;
570
+ }
571
+ .mode-toggle:active { transform: scale(0.95); }
572
+ .mode-toggle.planning { border-color: rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.08); color: #a5b4fc; }
573
+ .mode-toggle.fast { border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.08); color: #fcd34d; }
574
+ .mode-icon { font-size: 12px; line-height: 1; }
575
+ .mode-label { font-weight: 500; letter-spacing: 0.02em; }
576
+
577
+ /* ── Window Selector & Management ── */
578
+ .window-selector-wrapper { position: relative; overflow: visible; }
579
+ .window-selector-btn {
580
+ display: flex;
581
+ align-items: center;
582
+ gap: 4px;
583
+ padding: 6px 6px;
584
+ border: 1px solid var(--border-subtle);
585
+ border-radius: var(--radius-sm);
586
+ background: var(--bg-tertiary);
587
+ color: var(--text-secondary);
588
+ font-family: inherit;
589
+ font-size: 11px;
590
+ cursor: pointer;
591
+ transition: all var(--transition-fast);
592
+ min-height: 34px;
593
+ min-width: 0;
594
+ flex-shrink: 1;
595
+ -webkit-tap-highlight-color: transparent;
596
+ }
597
+ .window-selector-btn:hover { border-color: var(--border-active); color: var(--text-primary); }
598
+ .window-selector-btn .chevron { transition: transform 0.2s ease; }
599
+ .window-selector-wrapper.open .window-selector-btn { border-color: var(--accent-primary); color: var(--text-primary); }
600
+ .window-selector-wrapper.open .chevron { transform: rotate(180deg); }
601
+
602
+ /* Hide window title text on small screens — show icon only */
603
+ .window-selector-btn > span:not(.cdp-indicator):not(.chevron):nth-child(2) {
604
+ display: none;
605
+ }
606
+
607
+ /* CDP indicator dot */
608
+ .cdp-indicator { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
609
+ .cdp-indicator.active { background: var(--success); box-shadow: 0 0 6px rgba(52, 211, 153, 0.5); animation: pulse-dot 2s ease-in-out infinite; }
610
+ .cdp-indicator.inactive { background: var(--error); opacity: 0.6; }
611
+
612
+ /* Window dropdown — absolute positioning (fixed breaks under backdrop-filter) */
613
+ .window-dropdown {
614
+ position: absolute;
615
+ top: 100%;
616
+ right: 0;
617
+ left: auto;
618
+ width: calc(100vw - 20px);
619
+ max-width: 340px;
620
+ max-height: calc(100dvh - var(--header-height) - 20px);
621
+ background: var(--bg-secondary);
622
+ border: 1px solid var(--border-subtle);
623
+ border-radius: var(--radius-md);
624
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
625
+ z-index: 200;
626
+ opacity: 0;
627
+ transform: translateY(-4px) scale(0.97);
628
+ pointer-events: none;
629
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
630
+ overflow-y: auto;
631
+ overflow-x: hidden;
632
+ -webkit-overflow-scrolling: touch;
633
+ margin-top: 4px;
634
+ }
635
+ .window-dropdown.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
636
+
637
+ /* CDP Status bar */
638
+ .wm-cdp-status {
639
+ display: flex;
640
+ align-items: center;
641
+ justify-content: space-between;
642
+ padding: 12px;
643
+ background: rgba(0, 0, 0, 0.2);
644
+ border-bottom: 1px solid var(--border-subtle);
645
+ }
646
+ .wm-cdp-info { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); }
647
+ .wm-cdp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
648
+ .wm-cdp-dot.active { background: var(--success); box-shadow: 0 0 8px rgba(52, 211, 153, 0.4); }
649
+ .wm-cdp-dot.inactive { background: var(--error); opacity: 0.7; }
650
+ .wm-cdp-start-btn {
651
+ display: flex;
652
+ align-items: center;
653
+ gap: 5px;
654
+ padding: 8px 14px;
655
+ border: 1px solid rgba(52, 211, 153, 0.3);
656
+ border-radius: var(--radius-sm);
657
+ background: rgba(52, 211, 153, 0.08);
658
+ color: var(--success);
659
+ font-family: inherit;
660
+ font-size: 12px;
661
+ font-weight: 500;
662
+ cursor: pointer;
663
+ transition: all var(--transition-fast);
664
+ min-height: 40px;
665
+ -webkit-tap-highlight-color: transparent;
666
+ }
667
+ .wm-cdp-start-btn:hover:not(:disabled) { border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.15); }
668
+ .wm-cdp-start-btn:active:not(:disabled) { transform: scale(0.97); }
669
+ .wm-cdp-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }
670
+
671
+ /* Window list header */
672
+ .window-dropdown-header {
673
+ padding: 10px 14px;
674
+ font-size: 11px;
675
+ font-weight: 600;
676
+ text-transform: uppercase;
677
+ letter-spacing: 0.08em;
678
+ color: var(--text-muted);
679
+ border-bottom: 1px solid var(--border-subtle);
680
+ }
681
+
682
+ /* Individual window item */
683
+ .window-item {
684
+ display: flex;
685
+ align-items: center;
686
+ width: 100%;
687
+ padding: 0;
688
+ border: none;
689
+ background: transparent;
690
+ transition: all var(--transition-fast);
691
+ }
692
+ .window-item:hover { background: var(--bg-hover); }
693
+ .window-item.active { background: var(--tool-running-bg); }
694
+ .window-item-select {
695
+ display: flex;
696
+ align-items: center;
697
+ gap: 10px;
698
+ flex: 1;
699
+ padding: 14px;
700
+ border: none;
701
+ background: transparent;
702
+ color: var(--text-secondary);
703
+ font-family: inherit;
704
+ font-size: 13px;
705
+ cursor: pointer;
706
+ text-align: left;
707
+ transition: color var(--transition-fast);
708
+ min-width: 0;
709
+ min-height: 48px;
710
+ -webkit-tap-highlight-color: transparent;
711
+ }
712
+ .window-item-select:hover { color: var(--text-primary); }
713
+ .window-item.active .window-item-select { color: var(--accent-primary); }
714
+ .window-item-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
715
+ .window-item-close {
716
+ display: flex;
717
+ align-items: center;
718
+ justify-content: center;
719
+ width: 40px;
720
+ height: 40px;
721
+ margin-right: 8px;
722
+ border: none;
723
+ border-radius: 4px;
724
+ background: transparent;
725
+ color: var(--text-muted);
726
+ cursor: pointer;
727
+ transition: all var(--transition-fast);
728
+ flex-shrink: 0;
729
+ /* Always visible on mobile — no hover */
730
+ opacity: 0.6;
731
+ -webkit-tap-highlight-color: transparent;
732
+ }
733
+ .window-item-close:active { background: rgba(239, 68, 68, 0.15); color: var(--error); transform: scale(0.9); }
734
+ .window-dot {
735
+ width: 6px;
736
+ height: 6px;
737
+ border-radius: 50%;
738
+ background: var(--text-muted);
739
+ flex-shrink: 0;
740
+ }
741
+ .window-item.active .window-dot { background: var(--success); box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
742
+
743
+ /* Open new window section */
744
+ .wm-open-section {
745
+ padding: 14px;
746
+ border-top: 1px solid var(--border-subtle);
747
+ background: rgba(0, 0, 0, 0.1);
748
+ }
749
+ .wm-open-label {
750
+ font-size: 11px;
751
+ font-weight: 600;
752
+ text-transform: uppercase;
753
+ letter-spacing: 0.08em;
754
+ color: var(--text-muted);
755
+ margin-bottom: 10px;
756
+ }
757
+ .wm-open-form { display: flex; gap: 8px; }
758
+ .wm-open-input {
759
+ flex: 1;
760
+ padding: 10px 12px;
761
+ border: 1px solid var(--border-subtle);
762
+ border-radius: 6px;
763
+ background: var(--bg-tertiary);
764
+ color: var(--text-primary);
765
+ font-family: 'JetBrains Mono', monospace;
766
+ font-size: 14px; /* Prevent iOS zoom */
767
+ outline: none;
768
+ transition: border-color var(--transition-fast);
769
+ min-width: 0;
770
+ min-height: 44px;
771
+ }
772
+ .wm-open-input::placeholder { color: var(--text-muted); font-family: inherit; }
773
+ .wm-open-input:focus { border-color: var(--accent-primary); }
774
+ .wm-open-input:disabled { opacity: 0.5; }
775
+ .wm-open-btn {
776
+ display: flex;
777
+ align-items: center;
778
+ justify-content: center;
779
+ width: 44px;
780
+ height: 44px;
781
+ border: 1px solid var(--border-active);
782
+ border-radius: 6px;
783
+ background: rgba(99, 102, 241, 0.1);
784
+ color: var(--accent-primary);
785
+ cursor: pointer;
786
+ transition: all var(--transition-fast);
787
+ flex-shrink: 0;
788
+ -webkit-tap-highlight-color: transparent;
789
+ }
790
+ .wm-open-btn:hover:not(:disabled) { background: rgba(99, 102, 241, 0.2); }
791
+ .wm-open-btn:active:not(:disabled) { transform: scale(0.95); }
792
+ .wm-open-btn:disabled { opacity: 0.3; cursor: not-allowed; }
793
+
794
+ /* Action message toasts */
795
+ .wm-action-message {
796
+ padding: 10px 14px;
797
+ font-size: 12px;
798
+ border-top: 1px solid var(--border-subtle);
799
+ animation: fadeIn 0.2s ease;
800
+ word-break: break-word;
801
+ }
802
+ .wm-action-message.success { color: var(--success); background: rgba(52, 211, 153, 0.06); }
803
+ .wm-action-message.error { color: var(--error); background: rgba(239, 68, 68, 0.06); }
804
+
805
+ /* Recent Projects section */
806
+ .wm-recent-section { border-top: 1px solid var(--border-subtle); }
807
+ .wm-recent-header {
808
+ padding: 10px 14px;
809
+ font-size: 11px;
810
+ font-weight: 600;
811
+ text-transform: uppercase;
812
+ letter-spacing: 0.08em;
813
+ color: var(--text-muted);
814
+ border-bottom: 1px solid var(--border-subtle);
815
+ position: sticky;
816
+ top: 0;
817
+ background: var(--bg-secondary);
818
+ z-index: 1;
819
+ }
820
+ .wm-recent-item {
821
+ display: flex;
822
+ align-items: center;
823
+ gap: 12px;
824
+ width: 100%;
825
+ padding: 12px 14px;
826
+ border: none;
827
+ background: transparent;
828
+ color: var(--text-secondary);
829
+ font-family: inherit;
830
+ cursor: pointer;
831
+ transition: all var(--transition-fast);
832
+ text-align: left;
833
+ min-height: 52px;
834
+ -webkit-tap-highlight-color: transparent;
835
+ }
836
+ .wm-recent-item:hover { background: var(--bg-hover); color: var(--text-primary); }
837
+ .wm-recent-item:active { background: var(--bg-hover); color: var(--text-primary); }
838
+ .wm-recent-item:disabled { opacity: 0.5; cursor: not-allowed; }
839
+ .wm-recent-icon { color: var(--accent-primary); flex-shrink: 0; }
840
+ .wm-recent-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
841
+ .wm-recent-name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
842
+ .wm-recent-path { font-size: 10px; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
843
+
844
+ /* Spinner */
845
+ .wm-spinner {
846
+ display: inline-block;
847
+ width: 12px;
848
+ height: 12px;
849
+ border: 2px solid rgba(255, 255, 255, 0.15);
850
+ border-top-color: currentColor;
851
+ border-radius: 50%;
852
+ animation: wm-spin 0.6s linear infinite;
853
+ }
854
+
855
+ /* ── Artifact Panel ── */
856
+ .artifact-panel {
857
+ position: fixed;
858
+ top: 0;
859
+ right: 0;
860
+ width: 100%;
861
+ height: 100vh;
862
+ height: 100dvh;
863
+ background: var(--bg-secondary);
864
+ border-left: none;
865
+ z-index: 400;
866
+ display: flex;
867
+ flex-direction: column;
868
+ transform: translateX(100%);
869
+ transition: transform var(--transition-smooth);
870
+ overflow: hidden;
871
+ }
872
+ .artifact-panel.open {
873
+ transform: translateX(0);
874
+ box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
875
+ }
876
+ .artifact-panel-header {
877
+ display: flex;
878
+ align-items: center;
879
+ padding: 12px 12px;
880
+ padding-top: calc(12px + var(--safe-top));
881
+ border-bottom: 1px solid var(--border-subtle);
882
+ background: var(--bg-glass-strong);
883
+ min-height: 50px;
884
+ gap: 8px;
885
+ }
886
+ .artifact-panel-header h3 { font-size: 14px; font-weight: 600; white-space: nowrap; }
887
+ .artifact-list { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px; }
888
+ .artifact-conv-item {
889
+ padding: 12px;
890
+ border-bottom: 1px solid var(--border-subtle);
891
+ cursor: pointer;
892
+ transition: background var(--transition-fast);
893
+ min-height: 48px;
894
+ -webkit-tap-highlight-color: transparent;
895
+ }
896
+ .artifact-conv-item:hover { background: var(--bg-hover); }
897
+ .artifact-conv-item:active { background: var(--bg-hover); }
898
+ .artifact-conv-title { font-size: 14px; font-weight: 500; color: var(--text-primary); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
899
+ .artifact-conv-id { font-size: 10px; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); }
900
+ .artifact-file-list { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
901
+ .artifact-file-item {
902
+ display: flex;
903
+ align-items: center;
904
+ gap: 10px;
905
+ padding: 12px;
906
+ background: var(--bg-tertiary);
907
+ border: 1px solid var(--border-subtle);
908
+ border-radius: 6px;
909
+ cursor: pointer;
910
+ transition: all 0.2s ease;
911
+ min-height: 48px;
912
+ -webkit-tap-highlight-color: transparent;
913
+ }
914
+ .artifact-file-item:hover { border-color: var(--accent-primary); background: var(--bg-hover); }
915
+ .artifact-file-item:active { transform: scale(0.98); }
916
+ .artifact-file-icon { color: var(--accent-primary); flex-shrink: 0; }
917
+ .artifact-file-name { font-size: 13px; font-weight: 500; color: var(--text-primary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
918
+ .artifact-file-size { font-size: 10px; font-family: 'JetBrains Mono', monospace; color: var(--text-muted); }
919
+ .artifact-viewer { display: flex; flex-direction: column; height: 100%; }
920
+ .artifact-viewer-header {
921
+ display: flex;
922
+ align-items: center;
923
+ gap: 8px;
924
+ padding: 8px 12px;
925
+ border-bottom: 1px solid var(--border-subtle);
926
+ background: var(--bg-tertiary);
927
+ }
928
+ .artifact-back-btn {
929
+ background: none;
930
+ border: none;
931
+ color: var(--accent-primary);
932
+ cursor: pointer;
933
+ font-size: 13px;
934
+ font-weight: 500;
935
+ padding: 6px 10px;
936
+ border-radius: 4px;
937
+ transition: background 0.2s;
938
+ min-height: 36px;
939
+ -webkit-tap-highlight-color: transparent;
940
+ }
941
+ .artifact-back-btn:hover { background: rgba(99, 102, 241, 0.1); }
942
+ .artifact-viewer-title { font-size: 13px; font-weight: 600; color: var(--text-primary); font-family: 'JetBrains Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
943
+ .artifact-viewer-body {
944
+ flex: 1;
945
+ overflow-y: auto;
946
+ -webkit-overflow-scrolling: touch;
947
+ padding: 14px 12px;
948
+ padding-bottom: calc(14px + var(--safe-bottom));
949
+ font-size: 13px;
950
+ line-height: 1.6;
951
+ color: var(--text-primary);
952
+ }
953
+ .artifact-viewer-body pre { background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 11px; }
954
+ .artifact-viewer-body code { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
955
+
956
+ /* ── Conversation Selector ── */
957
+ .conv-selector-wrapper { overflow: visible; }
958
+ .conv-selector-btn {
959
+ display: flex;
960
+ align-items: center;
961
+ gap: 4px;
962
+ padding: 4px 6px;
963
+ border: 1px solid var(--border-subtle);
964
+ border-radius: var(--radius-sm);
965
+ background: var(--bg-tertiary);
966
+ color: var(--text-secondary);
967
+ font-family: inherit;
968
+ font-size: 11px;
969
+ cursor: pointer;
970
+ transition: all var(--transition-fast);
971
+ max-width: 110px;
972
+ min-height: 34px;
973
+ min-width: 0;
974
+ flex-shrink: 1;
975
+ -webkit-tap-highlight-color: transparent;
976
+ }
977
+ .conv-selector-btn:hover { border-color: var(--border-active); color: var(--text-primary); }
978
+ .conv-selector-btn > span {
979
+ overflow: hidden;
980
+ text-overflow: ellipsis;
981
+ white-space: nowrap;
982
+ max-width: 70px;
983
+ }
984
+
985
+ /* Conversation dropdown — absolute positioning (fixed breaks under backdrop-filter) */
986
+ .conv-dropdown {
987
+ position: absolute;
988
+ top: 100%;
989
+ right: 0;
990
+ left: auto;
991
+ width: calc(100vw - 20px);
992
+ max-width: 340px;
993
+ max-height: calc(100dvh - var(--header-height) - 20px);
994
+ background: var(--bg-secondary);
995
+ border: 1px solid var(--border-subtle);
996
+ border-radius: var(--radius-md);
997
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
998
+ z-index: 300;
999
+ opacity: 0;
1000
+ transform: translateY(-4px) scale(0.97);
1001
+ pointer-events: none;
1002
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1003
+ overflow: hidden;
1004
+ display: flex;
1005
+ flex-direction: column;
1006
+ margin-top: 4px;
1007
+ }
1008
+ .conv-dropdown.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
1009
+ .conv-dropdown-header {
1010
+ padding: 10px 14px 8px;
1011
+ font-size: 11px;
1012
+ font-weight: 600;
1013
+ text-transform: uppercase;
1014
+ letter-spacing: 0.08em;
1015
+ color: var(--text-muted);
1016
+ border-bottom: 1px solid var(--border-subtle);
1017
+ }
1018
+ .conv-dropdown-list { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; padding: 4px; }
1019
+ .conv-item {
1020
+ display: flex;
1021
+ flex-direction: column;
1022
+ gap: 4px;
1023
+ width: 100%;
1024
+ padding: 12px;
1025
+ border: none;
1026
+ border-radius: 6px;
1027
+ background: transparent;
1028
+ color: var(--text-secondary);
1029
+ font-family: inherit;
1030
+ font-size: 13px;
1031
+ cursor: pointer;
1032
+ transition: all var(--transition-fast);
1033
+ text-align: left;
1034
+ min-height: 48px;
1035
+ -webkit-tap-highlight-color: transparent;
1036
+ }
1037
+ .conv-item:hover { background: var(--bg-hover); color: var(--text-primary); }
1038
+ .conv-item:active { background: var(--bg-hover); color: var(--text-primary); }
1039
+ .conv-item.active {
1040
+ color: var(--text-primary);
1041
+ background: rgba(99, 102, 241, 0.1);
1042
+ border-left: 2px solid var(--accent-primary);
1043
+ }
1044
+
1045
+ /* ── Markdown Content ── */
1046
+ .agent-response h1, .agent-response h2, .agent-response h3, .agent-response h4 {
1047
+ color: var(--text-primary);
1048
+ margin-top: 0.8em;
1049
+ margin-bottom: 0.3em;
1050
+ }
1051
+ .agent-response h1 { font-size: 1.3em; }
1052
+ .agent-response h2 { font-size: 1.15em; border-bottom: 1px solid var(--border-subtle); padding-bottom: 4px; }
1053
+ .agent-response p { margin: 0.4em 0; }
1054
+ .agent-response ul, .agent-response ol { padding-left: 18px; margin: 0.4em 0; }
1055
+ .agent-response li { margin-bottom: 4px; }
1056
+ .agent-response code {
1057
+ font-family: 'JetBrains Mono', monospace;
1058
+ font-size: 0.85em;
1059
+ background: rgba(255, 255, 255, 0.06);
1060
+ padding: 2px 5px;
1061
+ border-radius: 4px;
1062
+ }
1063
+ .agent-response pre {
1064
+ background: rgba(0, 0, 0, 0.4);
1065
+ border-radius: var(--radius-sm);
1066
+ padding: 12px;
1067
+ overflow-x: auto;
1068
+ -webkit-overflow-scrolling: touch;
1069
+ margin: 8px 0;
1070
+ border: 1px solid var(--border-subtle);
1071
+ }
1072
+ .agent-response pre code { background: none; padding: 0; font-size: 12px; }
1073
+ .agent-response a { color: var(--accent-primary); text-decoration: none; }
1074
+ .agent-response a:hover { text-decoration: underline; }
1075
+ .agent-response blockquote {
1076
+ border-left: 3px solid var(--accent-primary);
1077
+ padding-left: 10px;
1078
+ color: var(--text-secondary);
1079
+ margin: 8px 0;
1080
+ }
1081
+ .agent-response table { width: 100%; border-collapse: collapse; margin: 8px 0; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
1082
+ .agent-response th, .agent-response td {
1083
+ border: 1px solid var(--border-subtle);
1084
+ padding: 6px 8px;
1085
+ text-align: left;
1086
+ font-size: 12px;
1087
+ white-space: nowrap;
1088
+ }
1089
+ .agent-response th { background: var(--bg-tertiary); font-weight: 600; }
1090
+
1091
+ /* ══════════════════════════════════════════════
1092
+ TABLET — ≥ 480px (landscape phones, small tablets)
1093
+ ══════════════════════════════════════════════ */
1094
+ @media (min-width: 480px) {
1095
+ .header { padding: 0 14px; }
1096
+ .header-title h1 { font-size: 15px; }
1097
+ .messages-area { padding: 16px 12px; }
1098
+ .message-content { max-width: 88%; padding: 13px 16px; }
1099
+ .input-area { padding: 12px 12px; padding-bottom: calc(12px + var(--safe-bottom)); }
1100
+ .input-wrapper { padding: 8px 12px; }
1101
+
1102
+ /* Show window title text */
1103
+ .window-selector-btn > span:not(.cdp-indicator):not(.chevron):nth-child(2) {
1104
+ display: inline-block;
1105
+ max-width: 100px;
1106
+ white-space: nowrap;
1107
+ overflow: hidden;
1108
+ text-overflow: ellipsis;
1109
+ vertical-align: bottom;
1110
+ }
1111
+
1112
+ .conv-selector-btn > span { max-width: 100px; }
1113
+
1114
+ /* Quick prompts can flow horizontally */
1115
+ .quick-prompts { flex-direction: row; flex-wrap: wrap; justify-content: center; width: auto; }
1116
+ .quick-prompt { white-space: nowrap; text-align: center; }
1117
+
1118
+ .hitl-actions { flex-direction: row; }
1119
+ .hitl-approve-btn, .hitl-reject-btn { padding: 10px 16px; }
1120
+
1121
+ .tool-path { flex-basis: auto; order: 0; max-width: 180px; margin-left: auto; }
1122
+ }
1123
+
1124
+ /* ══════════════════════════════════════════════
1125
+ TABLET — ≥ 768px (tablets)
1126
+ ══════════════════════════════════════════════ */
1127
+ @media (min-width: 768px) {
1128
+ :root {
1129
+ --header-height: 56px;
1130
+ --radius-lg: 16px;
1131
+ --radius-xl: 20px;
1132
+ }
1133
+
1134
+ .header { padding: 0 16px; }
1135
+ .header-left { gap: 12px; }
1136
+ .logo { width: 34px; height: 34px; }
1137
+ .header-title h1 { font-size: 16px; }
1138
+ .header-subtitle { font-size: 11px; max-width: 200px; }
1139
+ .header-right { gap: 4px; }
1140
+ .icon-btn { width: 36px; height: 36px; }
1141
+
1142
+ .messages-area { padding: 20px 16px; }
1143
+ /* Show slim scrollbar on tablet+ */
1144
+ .messages-area::-webkit-scrollbar { display: block; width: 4px; }
1145
+ .messages-area::-webkit-scrollbar-track { background: transparent; }
1146
+ .messages-area::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }
1147
+ .messages-area { scrollbar-width: thin; scrollbar-color: var(--border-subtle) transparent; }
1148
+
1149
+ .message-content { max-width: 85%; }
1150
+ .user-message { margin-bottom: 18px; }
1151
+ .agent-message { margin-bottom: 22px; }
1152
+
1153
+ .welcome-icon svg { width: 56px; height: 56px; }
1154
+ .welcome-screen h2 { font-size: 22px; }
1155
+ .welcome-screen p { font-size: 14px; }
1156
+
1157
+ .input-area { padding: 12px 16px; padding-bottom: calc(12px + var(--safe-bottom)); }
1158
+ .input-wrapper textarea { font-size: 14px; max-height: 150px; }
1159
+ .input-hint { display: flex; justify-content: space-between; padding: 6px 4px 0; font-size: 11px; color: var(--text-muted); }
1160
+
1161
+ .mode-toggle { font-size: 12px; padding: 4px 10px; gap: 4px; }
1162
+ .mode-icon { font-size: 13px; }
1163
+
1164
+ .tool-terminal { max-height: 120px; font-size: 11px; }
1165
+ .tool-command code { font-size: 11px; }
1166
+ .tool-path { font-size: 11px; max-width: 200px; }
1167
+
1168
+ .conv-selector-btn { max-width: 160px; padding: 4px 8px; }
1169
+ .conv-selector-btn > span { max-width: 110px; }
1170
+
1171
+ /* Dropdowns: widen on tablet+ */
1172
+ .window-dropdown {
1173
+ width: 340px;
1174
+ max-height: 440px;
1175
+ }
1176
+
1177
+ .conv-dropdown {
1178
+ width: 340px;
1179
+ max-height: 380px;
1180
+ }
1181
+
1182
+ .wm-open-input { font-size: 12px; }
1183
+
1184
+ /* Window close button: hover-only on tablet+ */
1185
+ .window-item-close { opacity: 0; }
1186
+ .window-item:hover .window-item-close { opacity: 1; }
1187
+ .window-item-close:hover { background: rgba(239, 68, 68, 0.15); color: var(--error); }
1188
+
1189
+ /* Artifact panel as side panel */
1190
+ .artifact-panel { width: 380px; border-left: 1px solid var(--border-subtle); }
1191
+
1192
+ .agent-response th, .agent-response td { font-size: 13px; padding: 6px 10px; }
1193
+ }
1194
+
1195
+ /* ══════════════════════════════════════════════
1196
+ DESKTOP — ≥ 1024px
1197
+ ══════════════════════════════════════════════ */
1198
+ @media (min-width: 1024px) {
1199
+ :root { --header-height: 60px; }
1200
+
1201
+ .app-container { max-width: 900px; margin: 0 auto; }
1202
+ .logo { width: 36px; height: 36px; padding: 4px; }
1203
+ .header-title h1 { font-size: 16px; }
1204
+ .header-subtitle { max-width: none; letter-spacing: 0.08em; }
1205
+ .messages-area { padding: 24px 16px; }
1206
+ .message-content { padding: 14px 18px; }
1207
+ .agent-message { margin-bottom: 24px; }
1208
+ .user-message { margin-bottom: 20px; }
1209
+ .welcome-icon svg { width: 64px; height: 64px; }
1210
+ .welcome-screen h2 { font-size: 24px; }
1211
+ .welcome-screen { height: 60vh; }
1212
+
1213
+ .icon-btn { width: 36px; height: 36px; }
1214
+ .icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
1215
+
1216
+ .quick-prompt:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
1217
+ .mode-toggle:hover { border-color: var(--border-active); color: var(--text-primary); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
1218
+ .mode-toggle.planning:hover { border-color: rgba(99, 102, 241, 0.5); background: rgba(99, 102, 241, 0.15); color: #c7d2fe; }
1219
+ .mode-toggle.fast:hover { border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.15); color: #fde68a; }
1220
+
1221
+ .hitl-approve-btn:hover { transform: translateY(-1px); }
1222
+ .hitl-reject-btn:hover { transform: translateY(-1px); }
1223
+ .window-selector-btn:hover { border-color: var(--border-active); color: var(--text-primary); }
1224
+ .wm-cdp-start-btn:hover:not(:disabled) { transform: translateY(-1px); }
1225
+ .wm-open-btn:hover:not(:disabled) { transform: translateY(-1px); }
1226
+ .wm-recent-item:hover { background: var(--bg-hover); color: var(--text-primary); }
1227
+
1228
+ .agent-response h1 { font-size: 1.4em; }
1229
+ .agent-response h2 { font-size: 1.2em; }
1230
+ }
1231
+
1232
+ /* ── Utilities ── */
1233
+ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
1234
+ .hidden { display: none !important; }