@idl3/claude-control 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 (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +144 -0
  3. package/bin/cli.js +68 -0
  4. package/bin/install-service.sh +107 -0
  5. package/bin/self-update.sh +43 -0
  6. package/bin/uninstall-service.sh +22 -0
  7. package/lib/answer.js +64 -0
  8. package/lib/auth.js +81 -0
  9. package/lib/config.js +118 -0
  10. package/lib/push.js +153 -0
  11. package/lib/resources.js +137 -0
  12. package/lib/sessions.js +529 -0
  13. package/lib/terminal.js +278 -0
  14. package/lib/tmux.js +462 -0
  15. package/lib/transcript.js +451 -0
  16. package/lib/tui.js +50 -0
  17. package/lib/uploads.js +42 -0
  18. package/lib/version.js +73 -0
  19. package/package.json +49 -0
  20. package/public/app.js +756 -0
  21. package/public/index.html +120 -0
  22. package/public/styles.css +848 -0
  23. package/server.js +910 -0
  24. package/web/README.md +66 -0
  25. package/web/dist/apple-touch-icon.png +0 -0
  26. package/web/dist/assets/bash-I8pq0VWm.js +1 -0
  27. package/web/dist/assets/core-BYJcZW10.js +3 -0
  28. package/web/dist/assets/css-DazXZka4.js +1 -0
  29. package/web/dist/assets/diff-DiTmLxSS.js +1 -0
  30. package/web/dist/assets/index-Bb7gXgl-.css +1 -0
  31. package/web/dist/assets/index-wrjqfzbL.js +77 -0
  32. package/web/dist/assets/javascript-BKRaQes9.js +1 -0
  33. package/web/dist/assets/json-DIYVocXf.js +1 -0
  34. package/web/dist/assets/markdown-BrP960CR.js +1 -0
  35. package/web/dist/assets/python-sE43i1Pi.js +1 -0
  36. package/web/dist/assets/typescript-C2FFdlUC.js +1 -0
  37. package/web/dist/assets/xml-BXBhIUeX.js +1 -0
  38. package/web/dist/icon-192.png +0 -0
  39. package/web/dist/icon-512.png +0 -0
  40. package/web/dist/index.html +25 -0
  41. package/web/dist/manifest.webmanifest +25 -0
  42. package/web/dist/sw.js +57 -0
@@ -0,0 +1,848 @@
1
+ /* ── claude-cockpit styles ─────────────────────────────────────────────── */
2
+
3
+ /* Design tokens — dark terminal-cockpit palette (oklch) */
4
+ :root {
5
+ /* Background layers */
6
+ --bg-base: oklch(10% 0.01 260);
7
+ --bg-surface: oklch(14% 0.01 260);
8
+ --bg-raised: oklch(18% 0.015 260);
9
+ --bg-hover: oklch(21% 0.015 260);
10
+ --bg-active: oklch(24% 0.02 250);
11
+
12
+ /* Text */
13
+ --text-primary: oklch(88% 0.01 100);
14
+ --text-secondary:oklch(58% 0.01 100);
15
+ --text-dim: oklch(40% 0.01 100);
16
+ --text-code: oklch(82% 0.04 150);
17
+
18
+ /* Accents */
19
+ --accent: oklch(68% 0.22 155); /* green — active / send */
20
+ --accent-dim: oklch(42% 0.14 155);
21
+ --amber: oklch(72% 0.19 75); /* ASK badge */
22
+ --amber-dim: oklch(50% 0.12 75);
23
+ --red: oklch(60% 0.22 25); /* error / warning */
24
+ --red-dim: oklch(38% 0.14 25);
25
+ --blue: oklch(65% 0.20 250); /* user messages */
26
+ --blue-dim: oklch(40% 0.12 250);
27
+
28
+ /* Borders */
29
+ --border: oklch(22% 0.01 260);
30
+ --border-bright: oklch(30% 0.02 260);
31
+
32
+ /* Dimensions */
33
+ --rail-w: 220px;
34
+ --hud-w: 160px;
35
+ --composer-h: 100px;
36
+ --radius: 4px;
37
+ --radius-lg: 8px;
38
+
39
+ /* Typography */
40
+ --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', 'Menlo', 'Consolas', monospace;
41
+ --font-size-xs: 11px;
42
+ --font-size-sm: 12px;
43
+ --font-size-base:13px;
44
+ --font-size-lg: 14px;
45
+
46
+ /* Motion */
47
+ --dur-fast: 100ms;
48
+ --dur-normal: 180ms;
49
+ --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
50
+ }
51
+
52
+ /* ── Reset ──────────────────────────────────────────────────────────────── */
53
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
54
+ html, body { height: 100%; overflow: hidden; }
55
+ body {
56
+ background: var(--bg-base);
57
+ color: var(--text-primary);
58
+ font-family: var(--font-mono);
59
+ font-size: var(--font-size-base);
60
+ line-height: 1.5;
61
+ -webkit-font-smoothing: antialiased;
62
+ }
63
+ ul { list-style: none; }
64
+ button { cursor: pointer; font-family: inherit; border: none; background: none; }
65
+ textarea { font-family: inherit; }
66
+
67
+ /* ── Layout grid ─────────────────────────────────────────────────────────── */
68
+ #app {
69
+ display: grid;
70
+ grid-template-columns: var(--rail-w) 1fr var(--hud-w);
71
+ grid-template-rows: 100vh;
72
+ height: 100vh;
73
+ overflow: hidden;
74
+ }
75
+
76
+ /* ── Session rail ────────────────────────────────────────────────────────── */
77
+ #session-rail {
78
+ background: var(--bg-surface);
79
+ border-right: 1px solid var(--border);
80
+ display: flex;
81
+ flex-direction: column;
82
+ overflow: hidden;
83
+ }
84
+
85
+ .rail-header {
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: space-between;
89
+ padding: 12px 14px 10px;
90
+ border-bottom: 1px solid var(--border);
91
+ flex-shrink: 0;
92
+ }
93
+
94
+ .rail-title {
95
+ font-size: var(--font-size-xs);
96
+ font-weight: 600;
97
+ letter-spacing: 0.10em;
98
+ text-transform: uppercase;
99
+ color: var(--text-dim);
100
+ }
101
+
102
+ /* Connection indicator dot */
103
+ .conn-dot {
104
+ width: 7px;
105
+ height: 7px;
106
+ border-radius: 50%;
107
+ flex-shrink: 0;
108
+ transition: background var(--dur-normal) var(--ease-out),
109
+ box-shadow var(--dur-normal) var(--ease-out);
110
+ }
111
+ .conn-disconnected { background: var(--text-dim); }
112
+ .conn-connecting { background: var(--amber); box-shadow: 0 0 6px var(--amber-dim); }
113
+ .conn-connected { background: var(--accent); box-shadow: 0 0 8px var(--accent-dim); }
114
+
115
+ /* Session list */
116
+ #session-list {
117
+ flex: 1;
118
+ overflow-y: auto;
119
+ overflow-x: hidden;
120
+ padding: 6px 0;
121
+ scrollbar-width: thin;
122
+ scrollbar-color: var(--border-bright) transparent;
123
+ }
124
+ #session-list::-webkit-scrollbar { width: 4px; }
125
+ #session-list::-webkit-scrollbar-track { background: transparent; }
126
+ #session-list::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
127
+
128
+ /* Session item */
129
+ .session-item {
130
+ display: flex;
131
+ flex-direction: column;
132
+ gap: 2px;
133
+ padding: 8px 14px;
134
+ cursor: pointer;
135
+ border-left: 2px solid transparent;
136
+ transition: background var(--dur-fast), border-color var(--dur-fast);
137
+ position: relative;
138
+ }
139
+ .session-item:hover { background: var(--bg-hover); }
140
+ .session-item:focus-visible {
141
+ outline: 2px solid var(--accent);
142
+ outline-offset: -2px;
143
+ border-radius: var(--radius);
144
+ }
145
+ .session-item[aria-selected="true"] {
146
+ background: var(--bg-active);
147
+ border-left-color: var(--accent);
148
+ }
149
+
150
+ /* Top row: name + badges */
151
+ .session-item-top {
152
+ display: flex;
153
+ align-items: center;
154
+ gap: 6px;
155
+ }
156
+
157
+ .session-name {
158
+ font-size: var(--font-size-sm);
159
+ color: var(--text-primary);
160
+ overflow: hidden;
161
+ text-overflow: ellipsis;
162
+ white-space: nowrap;
163
+ flex: 1;
164
+ }
165
+
166
+ /* Active dot */
167
+ .active-dot {
168
+ width: 6px;
169
+ height: 6px;
170
+ border-radius: 50%;
171
+ background: var(--accent);
172
+ box-shadow: 0 0 6px var(--accent-dim);
173
+ flex-shrink: 0;
174
+ opacity: 0;
175
+ transition: opacity var(--dur-normal) var(--ease-out);
176
+ }
177
+ .session-item[data-active="true"] .active-dot { opacity: 1; }
178
+
179
+ /* ASK badge */
180
+ .ask-badge {
181
+ font-size: 9px;
182
+ font-weight: 700;
183
+ letter-spacing: 0.06em;
184
+ color: var(--bg-base);
185
+ background: var(--amber);
186
+ border-radius: 3px;
187
+ padding: 1px 4px;
188
+ flex-shrink: 0;
189
+ opacity: 0;
190
+ transform: scale(0.8);
191
+ transition: opacity var(--dur-normal) var(--ease-out),
192
+ transform var(--dur-normal) var(--ease-out);
193
+ }
194
+ .session-item[data-pending="true"] .ask-badge {
195
+ opacity: 1;
196
+ transform: scale(1);
197
+ }
198
+
199
+ /* CWD */
200
+ .session-cwd {
201
+ font-size: var(--font-size-xs);
202
+ color: var(--text-dim);
203
+ overflow: hidden;
204
+ text-overflow: ellipsis;
205
+ white-space: nowrap;
206
+ }
207
+
208
+ /* CMD */
209
+ .session-cmd {
210
+ font-size: var(--font-size-xs);
211
+ color: var(--accent-dim);
212
+ overflow: hidden;
213
+ text-overflow: ellipsis;
214
+ white-space: nowrap;
215
+ }
216
+
217
+ /* ── Main pane ───────────────────────────────────────────────────────────── */
218
+ #main-pane {
219
+ display: flex;
220
+ flex-direction: column;
221
+ overflow: hidden;
222
+ background: var(--bg-base);
223
+ }
224
+
225
+ /* Transcript header */
226
+ .transcript-header {
227
+ display: flex;
228
+ align-items: baseline;
229
+ gap: 10px;
230
+ padding: 10px 16px;
231
+ border-bottom: 1px solid var(--border);
232
+ flex-shrink: 0;
233
+ background: var(--bg-surface);
234
+ }
235
+ .header-name {
236
+ font-size: var(--font-size-sm);
237
+ font-weight: 600;
238
+ color: var(--text-primary);
239
+ }
240
+ .header-cwd {
241
+ font-size: var(--font-size-xs);
242
+ color: var(--text-dim);
243
+ overflow: hidden;
244
+ text-overflow: ellipsis;
245
+ white-space: nowrap;
246
+ }
247
+
248
+ /* Transcript scroll area */
249
+ #transcript {
250
+ flex: 1;
251
+ overflow-y: auto;
252
+ overflow-x: hidden;
253
+ padding: 12px 0;
254
+ scrollbar-width: thin;
255
+ scrollbar-color: var(--border-bright) transparent;
256
+ }
257
+ #transcript::-webkit-scrollbar { width: 4px; }
258
+ #transcript::-webkit-scrollbar-track { background: transparent; }
259
+ #transcript::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
260
+
261
+ /* Empty state */
262
+ .transcript-empty {
263
+ display: flex;
264
+ align-items: center;
265
+ justify-content: center;
266
+ height: 100%;
267
+ color: var(--text-dim);
268
+ font-size: var(--font-size-sm);
269
+ }
270
+
271
+ /* Message rows */
272
+ .msg-row {
273
+ display: flex;
274
+ flex-direction: column;
275
+ padding: 4px 16px;
276
+ gap: 4px;
277
+ }
278
+ .msg-row + .msg-row { margin-top: 2px; }
279
+
280
+ /* Role label */
281
+ .msg-role {
282
+ font-size: var(--font-size-xs);
283
+ letter-spacing: 0.08em;
284
+ text-transform: uppercase;
285
+ font-weight: 600;
286
+ margin-bottom: 2px;
287
+ }
288
+ .msg-row[data-role="user"] .msg-role { color: var(--blue); }
289
+ .msg-row[data-role="assistant"] .msg-role { color: var(--accent); }
290
+ .msg-row[data-role="system"] .msg-role { color: var(--text-dim); }
291
+
292
+ /* User messages: right-aligned accent strip */
293
+ .msg-row[data-role="user"] {
294
+ align-items: flex-end;
295
+ }
296
+ .msg-row[data-role="user"] .msg-body {
297
+ background: var(--blue-dim);
298
+ border-radius: var(--radius-lg) var(--radius-lg) 2px var(--radius-lg);
299
+ padding: 6px 10px;
300
+ max-width: 85%;
301
+ border-left: none;
302
+ border-right: 2px solid var(--blue);
303
+ }
304
+
305
+ /* Assistant messages: left-aligned */
306
+ .msg-row[data-role="assistant"] {
307
+ align-items: flex-start;
308
+ }
309
+ .msg-row[data-role="assistant"] .msg-body {
310
+ border-left: 2px solid var(--accent-dim);
311
+ padding-left: 10px;
312
+ max-width: 95%;
313
+ }
314
+
315
+ /* System */
316
+ .msg-row[data-role="system"] {
317
+ align-items: flex-start;
318
+ }
319
+ .msg-row[data-role="system"] .msg-body {
320
+ border-left: 2px solid var(--border-bright);
321
+ padding-left: 10px;
322
+ max-width: 95%;
323
+ }
324
+
325
+ /* Text block */
326
+ .block-text {
327
+ font-size: var(--font-size-sm);
328
+ color: var(--text-primary);
329
+ white-space: pre-wrap;
330
+ word-break: break-word;
331
+ line-height: 1.6;
332
+ }
333
+
334
+ /* Thinking block — collapsible */
335
+ .block-thinking {
336
+ font-size: var(--font-size-xs);
337
+ color: var(--text-dim);
338
+ font-style: italic;
339
+ }
340
+ .block-thinking summary {
341
+ cursor: pointer;
342
+ user-select: none;
343
+ color: var(--text-dim);
344
+ font-size: var(--font-size-xs);
345
+ letter-spacing: 0.05em;
346
+ padding: 2px 0;
347
+ transition: color var(--dur-fast);
348
+ }
349
+ .block-thinking summary:hover { color: var(--text-secondary); }
350
+ .block-thinking summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
351
+ .block-thinking .thinking-text {
352
+ margin-top: 4px;
353
+ padding: 6px 10px;
354
+ background: var(--bg-surface);
355
+ border-radius: var(--radius);
356
+ border-left: 2px solid var(--border-bright);
357
+ white-space: pre-wrap;
358
+ word-break: break-word;
359
+ line-height: 1.5;
360
+ }
361
+
362
+ /* Tool-use chip */
363
+ .block-tool-use {
364
+ display: inline-flex;
365
+ align-items: center;
366
+ gap: 6px;
367
+ font-size: var(--font-size-xs);
368
+ color: var(--text-secondary);
369
+ background: var(--bg-raised);
370
+ border: 1px solid var(--border);
371
+ border-radius: var(--radius);
372
+ padding: 3px 8px;
373
+ max-width: 100%;
374
+ overflow: hidden;
375
+ }
376
+ .block-tool-use .tool-arrow { color: var(--accent-dim); flex-shrink: 0; }
377
+ .block-tool-use .tool-name { color: var(--text-primary); font-weight: 600; flex-shrink: 0; }
378
+ .block-tool-use .tool-sep { color: var(--text-dim); flex-shrink: 0; }
379
+ .block-tool-use .tool-input {
380
+ color: var(--text-dim);
381
+ overflow: hidden;
382
+ text-overflow: ellipsis;
383
+ white-space: nowrap;
384
+ }
385
+
386
+ /* Tool-result block */
387
+ .block-tool-result {
388
+ font-size: var(--font-size-xs);
389
+ color: var(--text-dim);
390
+ background: var(--bg-surface);
391
+ border-left: 2px solid var(--border-bright);
392
+ border-radius: 0 var(--radius) var(--radius) 0;
393
+ padding: 4px 8px;
394
+ white-space: pre-wrap;
395
+ word-break: break-word;
396
+ line-height: 1.5;
397
+ }
398
+ .block-tool-result[data-error="true"] {
399
+ color: var(--red);
400
+ border-left-color: var(--red-dim);
401
+ background: oklch(14% 0.04 25);
402
+ }
403
+
404
+ /* ── Reply composer ──────────────────────────────────────────────────────── */
405
+ .composer {
406
+ display: flex;
407
+ align-items: flex-end;
408
+ gap: 8px;
409
+ padding: 10px 16px;
410
+ border-top: 1px solid var(--border);
411
+ background: var(--bg-surface);
412
+ flex-shrink: 0;
413
+ }
414
+
415
+ #reply-input {
416
+ flex: 1;
417
+ background: var(--bg-raised);
418
+ border: 1px solid var(--border);
419
+ border-radius: var(--radius);
420
+ color: var(--text-primary);
421
+ font-size: var(--font-size-sm);
422
+ padding: 8px 10px;
423
+ resize: none;
424
+ transition: border-color var(--dur-fast);
425
+ min-height: 60px;
426
+ max-height: 200px;
427
+ overflow-y: auto;
428
+ scrollbar-width: thin;
429
+ scrollbar-color: var(--border-bright) transparent;
430
+ line-height: 1.5;
431
+ }
432
+ #reply-input:focus { outline: none; border-color: var(--accent-dim); }
433
+ #reply-input::placeholder { color: var(--text-dim); }
434
+
435
+ .btn-attach {
436
+ background: var(--bg-raised);
437
+ border: 1px solid var(--border);
438
+ border-radius: var(--radius);
439
+ color: var(--text-secondary);
440
+ font-size: 17px;
441
+ line-height: 1;
442
+ padding: 0 10px;
443
+ height: 34px;
444
+ flex-shrink: 0;
445
+ transition: border-color var(--dur-fast), transform var(--dur-fast);
446
+ }
447
+ .btn-attach:hover { border-color: var(--border-bright); color: var(--text-primary); }
448
+ .btn-attach:active { transform: scale(0.94); }
449
+ .btn-attach:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
450
+
451
+ .btn-send {
452
+ background: var(--accent-dim);
453
+ color: var(--bg-base);
454
+ border-radius: var(--radius);
455
+ padding: 7px 16px;
456
+ font-size: var(--font-size-sm);
457
+ font-weight: 600;
458
+ letter-spacing: 0.05em;
459
+ transition: background var(--dur-fast), transform var(--dur-fast);
460
+ flex-shrink: 0;
461
+ height: 34px;
462
+ }
463
+ .btn-send:hover { background: var(--accent); }
464
+ .btn-send:active { transform: scale(0.97); }
465
+ .btn-send:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
466
+
467
+ /* ── Resource HUD ────────────────────────────────────────────────────────── */
468
+ #resource-hud {
469
+ background: var(--bg-surface);
470
+ border-left: 1px solid var(--border);
471
+ padding: 14px 12px;
472
+ display: flex;
473
+ flex-direction: column;
474
+ gap: 6px;
475
+ overflow: hidden;
476
+ transition: background var(--dur-normal) var(--ease-out);
477
+ }
478
+ #resource-hud.warning {
479
+ background: oklch(13% 0.04 25);
480
+ border-left-color: var(--red-dim);
481
+ }
482
+
483
+ .hud-section { display: flex; flex-direction: column; gap: 4px; }
484
+
485
+ .hud-label {
486
+ font-size: var(--font-size-xs);
487
+ letter-spacing: 0.10em;
488
+ text-transform: uppercase;
489
+ color: var(--text-dim);
490
+ font-weight: 600;
491
+ margin-bottom: 2px;
492
+ }
493
+
494
+ .hud-row {
495
+ display: flex;
496
+ justify-content: space-between;
497
+ align-items: baseline;
498
+ gap: 4px;
499
+ }
500
+ .hud-key {
501
+ font-size: var(--font-size-xs);
502
+ color: var(--text-dim);
503
+ }
504
+ .hud-val {
505
+ font-size: var(--font-size-xs);
506
+ color: var(--text-secondary);
507
+ text-align: right;
508
+ font-variant-numeric: tabular-nums;
509
+ }
510
+ #resource-hud.warning .hud-val { color: var(--red); }
511
+
512
+ .hud-divider {
513
+ height: 1px;
514
+ background: var(--border);
515
+ margin: 4px 0;
516
+ }
517
+
518
+ .hud-warn {
519
+ margin-top: auto;
520
+ padding: 6px 8px;
521
+ background: var(--red-dim);
522
+ border-radius: var(--radius);
523
+ font-size: var(--font-size-xs);
524
+ color: var(--red);
525
+ text-align: center;
526
+ animation: hud-warn-pulse 1.8s ease-in-out infinite;
527
+ }
528
+ @keyframes hud-warn-pulse {
529
+ 0%, 100% { opacity: 0.8; }
530
+ 50% { opacity: 1; }
531
+ }
532
+
533
+ /* ── Modal ───────────────────────────────────────────────────────────────── */
534
+ .modal-backdrop {
535
+ position: fixed;
536
+ inset: 0;
537
+ background: oklch(5% 0.01 260 / 0.75);
538
+ display: flex;
539
+ align-items: center;
540
+ justify-content: center;
541
+ z-index: 100;
542
+ backdrop-filter: blur(2px);
543
+ /* transition only opacity for compositor-friendly animation */
544
+ opacity: 0;
545
+ pointer-events: none;
546
+ transition: opacity var(--dur-normal) var(--ease-out);
547
+ }
548
+ .modal-backdrop:not([hidden]) {
549
+ opacity: 1;
550
+ pointer-events: auto;
551
+ }
552
+ /* override hidden to allow transition */
553
+ .modal-backdrop[hidden] { display: flex !important; }
554
+
555
+ .modal-box {
556
+ background: var(--bg-surface);
557
+ border: 1px solid var(--border-bright);
558
+ border-radius: var(--radius-lg);
559
+ width: min(640px, 92vw);
560
+ max-height: 85vh;
561
+ display: flex;
562
+ flex-direction: column;
563
+ box-shadow: 0 24px 60px oklch(3% 0 0 / 0.6);
564
+ transform: translateY(12px) scale(0.98);
565
+ transition: transform var(--dur-normal) var(--ease-out);
566
+ }
567
+ .modal-backdrop:not([hidden]) .modal-box {
568
+ transform: translateY(0) scale(1);
569
+ }
570
+
571
+ .modal-header {
572
+ display: flex;
573
+ align-items: center;
574
+ justify-content: space-between;
575
+ padding: 14px 16px 10px;
576
+ border-bottom: 1px solid var(--border);
577
+ flex-shrink: 0;
578
+ }
579
+ .modal-title {
580
+ font-size: var(--font-size-sm);
581
+ font-weight: 700;
582
+ letter-spacing: 0.06em;
583
+ color: var(--amber);
584
+ text-transform: lowercase;
585
+ }
586
+ .modal-close {
587
+ color: var(--text-dim);
588
+ font-size: var(--font-size-base);
589
+ padding: 2px 6px;
590
+ border-radius: var(--radius);
591
+ transition: color var(--dur-fast), background var(--dur-fast);
592
+ }
593
+ .modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
594
+ .modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
595
+
596
+ /* Questions container */
597
+ .ask-questions {
598
+ flex: 1;
599
+ overflow-y: auto;
600
+ padding: 14px 16px;
601
+ display: flex;
602
+ flex-direction: column;
603
+ gap: 18px;
604
+ scrollbar-width: thin;
605
+ scrollbar-color: var(--border-bright) transparent;
606
+ }
607
+ .ask-questions::-webkit-scrollbar { width: 4px; }
608
+ .ask-questions::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
609
+
610
+ /* Individual question block */
611
+ .question-block {
612
+ display: flex;
613
+ flex-direction: column;
614
+ gap: 8px;
615
+ }
616
+ .question-header {
617
+ font-size: var(--font-size-xs);
618
+ color: var(--amber);
619
+ font-weight: 700;
620
+ letter-spacing: 0.06em;
621
+ text-transform: uppercase;
622
+ }
623
+ .question-text {
624
+ font-size: var(--font-size-sm);
625
+ color: var(--text-primary);
626
+ line-height: 1.6;
627
+ white-space: pre-wrap;
628
+ }
629
+ .question-hint {
630
+ font-size: var(--font-size-xs);
631
+ color: var(--text-dim);
632
+ }
633
+
634
+ /* Option buttons */
635
+ .options-grid {
636
+ display: flex;
637
+ flex-direction: column;
638
+ gap: 4px;
639
+ }
640
+ .option-btn {
641
+ display: flex;
642
+ flex-direction: column;
643
+ align-items: flex-start;
644
+ gap: 2px;
645
+ padding: 8px 12px;
646
+ background: var(--bg-raised);
647
+ border: 1px solid var(--border);
648
+ border-radius: var(--radius);
649
+ text-align: left;
650
+ transition: background var(--dur-fast), border-color var(--dur-fast),
651
+ transform var(--dur-fast);
652
+ color: var(--text-secondary);
653
+ font-size: var(--font-size-sm);
654
+ }
655
+ .option-btn:hover { background: var(--bg-hover); border-color: var(--border-bright); }
656
+ .option-btn:active { transform: scale(0.99); }
657
+ .option-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
658
+ .option-btn[aria-pressed="true"],
659
+ .option-btn.selected {
660
+ background: oklch(20% 0.04 155);
661
+ border-color: var(--accent-dim);
662
+ color: var(--text-primary);
663
+ }
664
+ .option-label { font-weight: 600; }
665
+ .option-desc { font-size: var(--font-size-xs); color: var(--text-dim); }
666
+
667
+ /* Modal footer */
668
+ .modal-footer {
669
+ border-top: 1px solid var(--border);
670
+ padding: 10px 16px;
671
+ display: flex;
672
+ flex-direction: column;
673
+ gap: 10px;
674
+ flex-shrink: 0;
675
+ }
676
+
677
+ .capture-output {
678
+ max-height: 180px;
679
+ overflow-y: auto;
680
+ scrollbar-width: thin;
681
+ scrollbar-color: var(--border-bright) transparent;
682
+ }
683
+ .capture-output pre {
684
+ font-size: var(--font-size-xs);
685
+ color: var(--text-secondary);
686
+ background: var(--bg-base);
687
+ border: 1px solid var(--border);
688
+ border-radius: var(--radius);
689
+ padding: 8px 10px;
690
+ white-space: pre;
691
+ overflow-x: auto;
692
+ line-height: 1.4;
693
+ }
694
+
695
+ .modal-actions {
696
+ display: flex;
697
+ justify-content: flex-end;
698
+ gap: 8px;
699
+ }
700
+
701
+ /* Button variants */
702
+ .btn-primary {
703
+ background: var(--accent);
704
+ color: var(--bg-base);
705
+ border-radius: var(--radius);
706
+ padding: 7px 18px;
707
+ font-size: var(--font-size-sm);
708
+ font-weight: 700;
709
+ letter-spacing: 0.04em;
710
+ transition: background var(--dur-fast), transform var(--dur-fast);
711
+ }
712
+ .btn-primary:hover:not(:disabled) { background: oklch(74% 0.22 155); }
713
+ .btn-primary:active:not(:disabled) { transform: scale(0.97); }
714
+ .btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
715
+ .btn-primary:disabled {
716
+ opacity: 0.4;
717
+ cursor: not-allowed;
718
+ filter: grayscale(0.5);
719
+ }
720
+
721
+ .btn-secondary {
722
+ background: var(--bg-raised);
723
+ color: var(--text-secondary);
724
+ border: 1px solid var(--border);
725
+ border-radius: var(--radius);
726
+ padding: 5px 12px;
727
+ font-size: var(--font-size-xs);
728
+ transition: background var(--dur-fast), border-color var(--dur-fast);
729
+ align-self: flex-start;
730
+ }
731
+ .btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-bright); }
732
+ .btn-secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
733
+
734
+ .btn-ghost {
735
+ color: var(--text-dim);
736
+ border-radius: var(--radius);
737
+ padding: 7px 14px;
738
+ font-size: var(--font-size-sm);
739
+ transition: color var(--dur-fast), background var(--dur-fast);
740
+ }
741
+ .btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }
742
+ .btn-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
743
+
744
+ /* ── Scrollbar global ────────────────────────────────────────────────────── */
745
+ * {
746
+ scrollbar-width: thin;
747
+ scrollbar-color: var(--border-bright) transparent;
748
+ }
749
+
750
+ /* ── Toast (send feedback / errors) ──────────────────────────────────────── */
751
+ .toast {
752
+ position: fixed;
753
+ left: 50%;
754
+ bottom: 88px;
755
+ transform: translateX(-50%) translateY(8px);
756
+ z-index: 100;
757
+ max-width: min(90vw, 420px);
758
+ padding: 9px 16px;
759
+ border-radius: 999px;
760
+ font-size: var(--font-size-base);
761
+ font-weight: 600;
762
+ letter-spacing: 0.02em;
763
+ background: var(--bg-raised);
764
+ color: var(--text-primary);
765
+ border: 1px solid var(--border-bright);
766
+ box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
767
+ opacity: 0;
768
+ pointer-events: none;
769
+ transition: opacity var(--dur-fast), transform var(--dur-fast);
770
+ }
771
+ .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
772
+ .toast.toast-ok { border-color: var(--accent); color: var(--accent); }
773
+ .toast.toast-error { border-color: var(--red); color: var(--red); }
774
+ @media (max-width: 760px) { .toast { font-size: 15px; bottom: 96px; } }
775
+
776
+ /* The mobile back-button is desktop-hidden; the media query reveals it. */
777
+ .mobile-back {
778
+ display: none;
779
+ background: transparent;
780
+ color: var(--accent);
781
+ border: 1px solid var(--border-bright);
782
+ border-radius: var(--radius);
783
+ padding: 4px 10px;
784
+ font-size: var(--font-size-sm);
785
+ flex-shrink: 0;
786
+ }
787
+ .mobile-back:active { transform: scale(0.96); }
788
+
789
+ /* ── Responsive: phones / narrow windows ─────────────────────────────────────
790
+ Desktop is a 3-column grid (rail 220 + chat + HUD 160). Under ~760px that
791
+ leaves the chat a ~10px sliver — invisible. Switch to a master-detail layout:
792
+ a slim HUD bar on top, then EITHER the session list OR the full-width chat
793
+ (toggled by body.session-open), with a back button to return to the list. */
794
+ @media (max-width: 760px) {
795
+ #app {
796
+ grid-template-columns: 1fr;
797
+ grid-template-rows: auto 1fr;
798
+ height: 100dvh;
799
+ }
800
+
801
+ /* HUD becomes a slim full-width status bar across the top. */
802
+ #resource-hud {
803
+ grid-column: 1;
804
+ grid-row: 1;
805
+ flex-direction: row;
806
+ flex-wrap: wrap;
807
+ align-items: center;
808
+ gap: 4px 14px;
809
+ height: auto;
810
+ padding: 7px 12px;
811
+ border-right: none;
812
+ border-bottom: 1px solid var(--border);
813
+ }
814
+ #resource-hud .hud-divider { display: none; }
815
+ #resource-hud .hud-label { display: none; }
816
+ #resource-hud .hud-section { flex-direction: row; gap: 12px; align-items: center; }
817
+ #resource-hud .hud-row { flex-direction: row; gap: 5px; align-items: center; }
818
+ #resource-hud .hud-warn { flex-basis: 100%; }
819
+
820
+ /* Rail and chat share the second grid row; only one shows at a time. */
821
+ #session-rail { grid-column: 1; grid-row: 2; min-width: 0; }
822
+ #main-pane { grid-column: 1; grid-row: 2; min-width: 0; }
823
+
824
+ /* Default (master): show the session list, hide the chat. */
825
+ #main-pane { display: none; }
826
+ body.session-open #session-rail { display: none; }
827
+ body.session-open #main-pane { display: flex; }
828
+
829
+ /* Show the back affordance and give the header room for it. */
830
+ .mobile-back { display: inline-flex; align-items: center; }
831
+ .transcript-header { align-items: center; }
832
+
833
+ /* Comfortable tap targets in the list. */
834
+ .session-item { padding-top: 12px; padding-bottom: 12px; }
835
+
836
+ /* iOS Safari auto-zooms when focusing an input whose font-size is < 16px.
837
+ Force 16px on the composer so the page never zooms in on tap. */
838
+ #reply-input { font-size: 16px; }
839
+
840
+ /* Compact transcript text on phones (composer stays 16px to avoid iOS zoom). */
841
+ #transcript { line-height: 1.5; }
842
+ .block-text { font-size: 13px; }
843
+ .block-thinking,
844
+ .block-thinking .thinking-text,
845
+ .block-tool-use,
846
+ .block-tool-result { font-size: 12px; }
847
+ .msg-role { font-size: 11px; }
848
+ }