@deep-podder/dsh-remote-mobile 0.0.0-stage → 0.0.6

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.
@@ -0,0 +1,4698 @@
1
+ /* ==========================================================================
2
+ DSH Remote — mobile client styles
3
+
4
+ Calm, premium chat surface: warm off-white in light, near-black in dark,
5
+ system serif prose for assistant replies, sans UI, pill composer.
6
+ No frameworks, no webfonts, no build step, no external resources.
7
+
8
+ Theme model
9
+ -----------
10
+ app.js resolves the persisted preference ("auto" | "light" | "dark") on init
11
+ and writes the *effective* theme to <html data-theme="light|dark"> (the Host
12
+ CSP forbids an inline head bootstrap). This stylesheet only has to map those
13
+ two states to tokens, which keeps the palette in one place.
14
+ ========================================================================== */
15
+
16
+ /* ---------- Tokens: light (default) ------------------------------------- */
17
+ :root {
18
+ color-scheme: light;
19
+
20
+ --bg: #f7f5f2;
21
+ --surface: #ffffff;
22
+ --surface-2: #f1eee9;
23
+ --surface-3: #eae6df;
24
+
25
+ --text: #1a1815;
26
+ --text-2: #6e675f;
27
+ --text-3: #8b8278;
28
+ --text-4: #a79e93;
29
+
30
+ --border: #e6e1d8;
31
+ --border-strong: #d6cfc3;
32
+
33
+ --bubble: #ede8e1;
34
+ --bubble-border: #e3dcd1;
35
+
36
+ --pill: #141210;
37
+ --pill-ink: #ffffff;
38
+ --pill-soft: rgba(20, 18, 16, 0.06);
39
+
40
+ --code-bg: #f1ede7;
41
+ --code-border: #e2dcd1;
42
+ --inline-code-bg: #f1eee9;
43
+
44
+ --link: #1a1815;
45
+ --link-underline: #b9aea0;
46
+
47
+ --ok: #2f6b4f;
48
+ --ok-soft: rgba(47, 107, 79, 0.09);
49
+ --warn: #8a5a1f;
50
+ --warn-soft: rgba(138, 90, 31, 0.09);
51
+ --warn-line: rgba(138, 90, 31, 0.28);
52
+ --danger: #a63a33;
53
+ --danger-ink: #8f2f29;
54
+ --danger-soft: rgba(166, 58, 51, 0.08);
55
+ --danger-line: rgba(166, 58, 51, 0.26);
56
+
57
+ --scrim: rgba(26, 24, 21, 0.32);
58
+ --shadow-soft: 0 1px 2px rgba(26, 24, 21, 0.05),
59
+ 0 8px 24px rgba(26, 24, 21, 0.07);
60
+ --shadow-lift: 0 2px 6px rgba(26, 24, 21, 0.06),
61
+ 0 16px 40px rgba(26, 24, 21, 0.12);
62
+ --shadow-sheet: 0 -20px 60px rgba(26, 24, 21, 0.18);
63
+
64
+ --focus: #141210;
65
+ --selection: rgba(20, 18, 16, 0.14);
66
+
67
+ --radius-s: 12px;
68
+ --radius-m: 16px;
69
+ --radius-xl: 24px;
70
+ --radius-pill: 999px;
71
+
72
+ --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
73
+ "Helvetica Neue", Arial, "Noto Sans", sans-serif;
74
+ --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino,
75
+ "Book Antiqua", Georgia, "Times New Roman", serif;
76
+ --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
77
+ "Liberation Mono", monospace;
78
+
79
+ --prose-size: 17.5px;
80
+ --prose-line: 1.55;
81
+
82
+ --ease: cubic-bezier(0.22, 1, 0.36, 1);
83
+ --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
84
+ --dur-1: 130ms;
85
+ --dur-2: 220ms;
86
+ --dur-3: 320ms;
87
+
88
+ --safe-t: env(safe-area-inset-top, 0px);
89
+ --safe-r: env(safe-area-inset-right, 0px);
90
+ --safe-b: env(safe-area-inset-bottom, 0px);
91
+ --safe-l: env(safe-area-inset-left, 0px);
92
+
93
+ --app-h: 100dvh;
94
+
95
+ /* Syntax tokens (light) */
96
+ --tok-com: #9a9084;
97
+ --tok-kw: #8a4b2f;
98
+ --tok-str: #3f6b4f;
99
+ --tok-num: #8a5a1f;
100
+ --tok-fn: #3b5c7a;
101
+ --tok-var: #6b4a7a;
102
+ --tok-tag: #a63a33;
103
+ --tok-attr: #5a6b3f;
104
+ --tok-prop: #6e4a2f;
105
+ }
106
+
107
+ /* ---------- Tokens: dark ------------------------------------------------ */
108
+ :root[data-theme="dark"] {
109
+ color-scheme: dark;
110
+
111
+ --bg: #161616;
112
+ --surface: #1f1f1f;
113
+ --surface-2: #262626;
114
+ --surface-3: #2c2c2c;
115
+
116
+ --text: #f4f1ec;
117
+ --text-2: #a39c93;
118
+ --text-3: #8b847a;
119
+ --text-4: #6c665e;
120
+
121
+ --border: #2e2c29;
122
+ --border-strong: #3b3833;
123
+
124
+ --bubble: #2a2a2a;
125
+ --bubble-border: #343330;
126
+
127
+ --pill: #f4f1ec;
128
+ --pill-ink: #161616;
129
+ --pill-soft: rgba(244, 241, 236, 0.08);
130
+
131
+ --code-bg: #1b1b1b;
132
+ --code-border: #2c2a27;
133
+ --inline-code-bg: #262626;
134
+
135
+ --link: #f4f1ec;
136
+ --link-underline: #6e675f;
137
+
138
+ --ok: #8fc7a8;
139
+ --ok-soft: rgba(143, 199, 168, 0.1);
140
+ --warn: #e0b57c;
141
+ --warn-soft: rgba(224, 181, 124, 0.1);
142
+ --warn-line: rgba(224, 181, 124, 0.28);
143
+ --danger: #e6928a;
144
+ --danger-ink: #e6928a;
145
+ --danger-soft: rgba(230, 146, 138, 0.1);
146
+ --danger-line: rgba(230, 146, 138, 0.26);
147
+
148
+ --scrim: rgba(0, 0, 0, 0.56);
149
+ --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3),
150
+ 0 10px 30px rgba(0, 0, 0, 0.35);
151
+ --shadow-lift: 0 2px 8px rgba(0, 0, 0, 0.35),
152
+ 0 22px 50px rgba(0, 0, 0, 0.45);
153
+ --shadow-sheet: 0 -20px 60px rgba(0, 0, 0, 0.55);
154
+
155
+ --focus: #f4f1ec;
156
+ --selection: rgba(244, 241, 236, 0.18);
157
+
158
+ --tok-com: #7b756c;
159
+ --tok-kw: #e2b592;
160
+ --tok-str: #a8c7a8;
161
+ --tok-num: #d9b283;
162
+ --tok-fn: #a8c0d8;
163
+ --tok-var: #c9b3d8;
164
+ --tok-tag: #e29a93;
165
+ --tok-attr: #bcc9a0;
166
+ --tok-prop: #d9bfa3;
167
+ }
168
+
169
+ /* ---------- Reset / base ------------------------------------------------- */
170
+ *,
171
+ *::before,
172
+ *::after {
173
+ box-sizing: border-box;
174
+ }
175
+
176
+ html {
177
+ height: 100%;
178
+ background: var(--bg);
179
+ -webkit-text-size-adjust: 100%;
180
+ text-size-adjust: 100%;
181
+ }
182
+
183
+ body {
184
+ margin: 0;
185
+ min-height: 100%;
186
+ background: var(--bg);
187
+ color: var(--text);
188
+ font-family: var(--font-ui);
189
+ font-size: 15px;
190
+ line-height: 1.5;
191
+ letter-spacing: -0.005em;
192
+ overflow: hidden;
193
+ overscroll-behavior: none;
194
+ -webkit-font-smoothing: antialiased;
195
+ -moz-osx-font-smoothing: grayscale;
196
+ -webkit-tap-highlight-color: transparent;
197
+ }
198
+
199
+ button,
200
+ input,
201
+ textarea {
202
+ font: inherit;
203
+ color: inherit;
204
+ letter-spacing: inherit;
205
+ }
206
+
207
+ button {
208
+ margin: 0;
209
+ padding: 0;
210
+ border: 0;
211
+ background: none;
212
+ cursor: pointer;
213
+ touch-action: manipulation;
214
+ }
215
+
216
+ [hidden] {
217
+ display: none !important;
218
+ }
219
+
220
+ .mono {
221
+ font-family: var(--font-mono);
222
+ font-size: 0.92em;
223
+ letter-spacing: -0.01em;
224
+ }
225
+
226
+ :focus-visible {
227
+ outline: 2px solid var(--focus);
228
+ outline-offset: 2px;
229
+ }
230
+
231
+ ::selection {
232
+ background: var(--selection);
233
+ }
234
+
235
+ .sprite {
236
+ position: absolute;
237
+ width: 0;
238
+ height: 0;
239
+ overflow: hidden;
240
+ }
241
+
242
+ .icon {
243
+ display: block;
244
+ width: 22px;
245
+ height: 22px;
246
+ fill: none;
247
+ stroke: currentColor;
248
+ stroke-width: 1.7;
249
+ stroke-linecap: round;
250
+ stroke-linejoin: round;
251
+ flex: none;
252
+ }
253
+
254
+ .logo-mark {
255
+ display: grid;
256
+ place-items: center;
257
+ width: 52px;
258
+ height: 52px;
259
+ border-radius: 17px;
260
+ background: var(--pill);
261
+ color: var(--pill-ink);
262
+ box-shadow: var(--shadow-soft);
263
+ }
264
+
265
+ .logo-mark-lg {
266
+ width: 66px;
267
+ height: 66px;
268
+ border-radius: 21px;
269
+ }
270
+
271
+ .logo-glyph {
272
+ width: 28px;
273
+ height: 28px;
274
+ fill: none;
275
+ stroke: currentColor;
276
+ stroke-width: 1.9;
277
+ stroke-linecap: round;
278
+ stroke-linejoin: round;
279
+ }
280
+
281
+ .logo-mark-lg .logo-glyph {
282
+ width: 34px;
283
+ height: 34px;
284
+ }
285
+
286
+ .noscript {
287
+ position: fixed;
288
+ inset: auto 0 0;
289
+ z-index: 100;
290
+ margin: 0;
291
+ padding: 16px;
292
+ background: var(--danger);
293
+ color: #fff;
294
+ text-align: center;
295
+ font-weight: 600;
296
+ }
297
+
298
+ /* ---------- Buttons / shared --------------------------------------------- */
299
+ .btn {
300
+ display: inline-flex;
301
+ align-items: center;
302
+ justify-content: center;
303
+ gap: 8px;
304
+ min-height: 46px;
305
+ padding: 0 20px;
306
+ border-radius: var(--radius-pill);
307
+ font-size: 14.5px;
308
+ font-weight: 600;
309
+ letter-spacing: -0.005em;
310
+ transition: transform var(--dur-1) var(--ease-out),
311
+ background var(--dur-1) var(--ease-out), opacity var(--dur-1),
312
+ color var(--dur-1);
313
+ }
314
+
315
+ .btn:active {
316
+ transform: scale(0.98);
317
+ }
318
+
319
+ .btn[disabled],
320
+ .btn[aria-disabled="true"] {
321
+ opacity: 0.4;
322
+ pointer-events: none;
323
+ }
324
+
325
+ .btn-primary {
326
+ background: var(--pill);
327
+ color: var(--pill-ink);
328
+ box-shadow: var(--shadow-soft);
329
+ }
330
+
331
+ .btn-primary[disabled],
332
+ .btn-primary[aria-disabled="true"] {
333
+ background: var(--surface-2);
334
+ color: var(--text-4);
335
+ box-shadow: none;
336
+ opacity: 1;
337
+ }
338
+
339
+ .btn-ghost {
340
+ border: 1px solid var(--border-strong);
341
+ background: var(--surface);
342
+ color: var(--text);
343
+ }
344
+
345
+ .btn-block {
346
+ width: 100%;
347
+ min-height: 52px;
348
+ font-size: 15.5px;
349
+ }
350
+
351
+ .iconbtn {
352
+ position: relative;
353
+ display: grid;
354
+ place-items: center;
355
+ width: 44px;
356
+ height: 44px;
357
+ border-radius: var(--radius-pill);
358
+ color: var(--text-2);
359
+ flex: none;
360
+ transition: background var(--dur-1) var(--ease-out), color var(--dur-1);
361
+ }
362
+
363
+ .iconbtn:active {
364
+ background: var(--surface-2);
365
+ color: var(--text);
366
+ }
367
+
368
+ .iconbtn[aria-expanded="true"] {
369
+ color: var(--text);
370
+ }
371
+
372
+ /* ---------- Boot --------------------------------------------------------- */
373
+ .boot {
374
+ position: fixed;
375
+ inset: 0;
376
+ z-index: 30;
377
+ display: flex;
378
+ flex-direction: column;
379
+ align-items: center;
380
+ justify-content: center;
381
+ padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b));
382
+ background: var(--bg);
383
+ text-align: center;
384
+ }
385
+
386
+ .boot-title {
387
+ margin: 20px 0 0;
388
+ font-family: var(--font-serif);
389
+ font-size: 22px;
390
+ font-weight: 600;
391
+ letter-spacing: -0.01em;
392
+ }
393
+
394
+ .boot-sub {
395
+ margin: 7px 0 0;
396
+ font-size: 13px;
397
+ color: var(--text-3);
398
+ }
399
+
400
+ .boot-bar {
401
+ width: 132px;
402
+ height: 2px;
403
+ margin-top: 26px;
404
+ border-radius: 2px;
405
+ background: var(--surface-3);
406
+ overflow: hidden;
407
+ }
408
+
409
+ .boot-bar span {
410
+ display: block;
411
+ width: 42%;
412
+ height: 100%;
413
+ border-radius: 2px;
414
+ background: var(--pill);
415
+ animation: boot-slide 1.35s var(--ease-out) infinite;
416
+ }
417
+
418
+ @keyframes boot-slide {
419
+ 0% {
420
+ transform: translateX(-120%);
421
+ }
422
+ 100% {
423
+ transform: translateX(340%);
424
+ }
425
+ }
426
+
427
+ /* ---------- Pairing ------------------------------------------------------ */
428
+ .pairing {
429
+ position: relative;
430
+ z-index: 1;
431
+ display: flex;
432
+ flex-direction: column;
433
+ align-items: center;
434
+ justify-content: space-between;
435
+ min-height: var(--app-h);
436
+ padding: calc(40px + var(--safe-t)) calc(26px + var(--safe-r))
437
+ calc(20px + var(--safe-b)) calc(26px + var(--safe-l));
438
+ overflow-y: auto;
439
+ -webkit-overflow-scrolling: touch;
440
+ }
441
+
442
+ .pairing-card {
443
+ width: 100%;
444
+ max-width: 404px;
445
+ margin: auto 0;
446
+ }
447
+
448
+ .brand {
449
+ text-align: left;
450
+ }
451
+
452
+ .brand .logo-mark {
453
+ margin-bottom: 24px;
454
+ }
455
+
456
+ .brand-eyebrow {
457
+ margin: 0 0 10px;
458
+ font-family: var(--font-mono);
459
+ font-size: 10px;
460
+ font-weight: 500;
461
+ letter-spacing: 0.16em;
462
+ text-transform: uppercase;
463
+ color: var(--text-3);
464
+ }
465
+
466
+ .pair-title {
467
+ margin: 0;
468
+ font-family: var(--font-serif);
469
+ font-size: 34px;
470
+ line-height: 1.08;
471
+ font-weight: 600;
472
+ letter-spacing: -0.012em;
473
+ }
474
+
475
+ .pair-lede {
476
+ max-width: 350px;
477
+ margin: 13px 0 0;
478
+ font-size: 14.5px;
479
+ line-height: 1.6;
480
+ color: var(--text-2);
481
+ }
482
+
483
+ .pair-status {
484
+ display: flex;
485
+ align-items: center;
486
+ gap: 10px;
487
+ margin-top: 26px;
488
+ padding: 13px 15px;
489
+ border: 1px solid var(--border);
490
+ border-radius: var(--radius-m);
491
+ background: var(--surface);
492
+ font-size: 13px;
493
+ line-height: 1.45;
494
+ color: var(--text-2);
495
+ }
496
+
497
+ .pair-status.is-error {
498
+ border-color: var(--danger-line);
499
+ background: var(--danger-soft);
500
+ color: var(--danger-ink);
501
+ }
502
+
503
+ .pair-status-spin {
504
+ flex: none;
505
+ }
506
+
507
+ .pair-status-text {
508
+ flex: 1;
509
+ min-width: 0;
510
+ }
511
+
512
+ .pair-status-action {
513
+ flex: none;
514
+ min-height: 44px;
515
+ padding: 0 12px;
516
+ margin: -8px -6px -8px 0;
517
+ border-radius: var(--radius-pill);
518
+ color: var(--text);
519
+ font-size: 13px;
520
+ font-weight: 600;
521
+ }
522
+
523
+ .pair-form {
524
+ margin-top: 32px;
525
+ }
526
+
527
+ .field-label {
528
+ display: block;
529
+ margin: 0 0 11px;
530
+ font-size: 12.5px;
531
+ font-weight: 500;
532
+ color: var(--text-3);
533
+ }
534
+
535
+ .pin-slots {
536
+ position: relative;
537
+ display: grid;
538
+ grid-template-columns: repeat(4, 1fr);
539
+ gap: 10px;
540
+ }
541
+
542
+ .pin-slots:focus-within .pin-slot {
543
+ border-color: var(--border-strong);
544
+ background: var(--surface);
545
+ box-shadow: 0 0 0 3px var(--pill-soft);
546
+ }
547
+
548
+ .pin-slot {
549
+ display: grid;
550
+ place-items: center;
551
+ height: 66px;
552
+ border: 1px solid var(--border);
553
+ border-radius: 18px;
554
+ background: var(--surface);
555
+ font-family: var(--font-mono);
556
+ font-size: 26px;
557
+ font-weight: 500;
558
+ color: var(--text);
559
+ transition: border-color var(--dur-2) var(--ease-out),
560
+ background var(--dur-2) var(--ease-out),
561
+ box-shadow var(--dur-2) var(--ease-out);
562
+ }
563
+
564
+ .pin-slot.is-filled {
565
+ border-color: var(--border-strong);
566
+ background: var(--surface-2);
567
+ }
568
+
569
+ /* Transparent text field laid over the digit slots: drives native numeric
570
+ keyboard, paste and one-time-code autofill while looking custom. */
571
+ .pin-input {
572
+ position: absolute;
573
+ inset: 0;
574
+ width: 100%;
575
+ height: 100%;
576
+ padding: 0;
577
+ border: 0;
578
+ background: transparent;
579
+ color: transparent;
580
+ caret-color: transparent;
581
+ font-size: 16px; /* ≥16px prevents iOS focus zoom */
582
+ letter-spacing: 1em;
583
+ text-indent: 0.35em;
584
+ outline: none;
585
+ opacity: 0.02;
586
+ appearance: none;
587
+ -webkit-appearance: none;
588
+ }
589
+
590
+ .pin-input:disabled {
591
+ cursor: default;
592
+ }
593
+
594
+ .pin-slots.is-error {
595
+ animation: shake 0.36s var(--ease-out);
596
+ }
597
+
598
+ @keyframes shake {
599
+ 0%,
600
+ 100% {
601
+ transform: translateX(0);
602
+ }
603
+ 20% {
604
+ transform: translateX(-6px);
605
+ }
606
+ 40% {
607
+ transform: translateX(5px);
608
+ }
609
+ 60% {
610
+ transform: translateX(-3px);
611
+ }
612
+ 80% {
613
+ transform: translateX(2px);
614
+ }
615
+ }
616
+
617
+ .pair-error {
618
+ margin: 12px 0 0;
619
+ font-size: 12.5px;
620
+ line-height: 1.5;
621
+ color: var(--danger-ink);
622
+ }
623
+
624
+ .pair-form .btn-block {
625
+ margin-top: 20px;
626
+ }
627
+
628
+ .pair-hint {
629
+ margin: 24px 0 0;
630
+ font-size: 12px;
631
+ line-height: 1.65;
632
+ color: var(--text-4);
633
+ }
634
+
635
+ .pair-hint strong {
636
+ color: var(--text-3);
637
+ font-weight: 500;
638
+ }
639
+
640
+ .pairing-foot {
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: center;
644
+ gap: 8px;
645
+ width: 100%;
646
+ max-width: 404px;
647
+ margin-top: 44px;
648
+ padding-top: 6px;
649
+ font-size: 10px;
650
+ letter-spacing: 0.1em;
651
+ text-transform: uppercase;
652
+ color: var(--text-4);
653
+ }
654
+
655
+ .foot-dot {
656
+ width: 3px;
657
+ height: 3px;
658
+ border-radius: 50%;
659
+ background: var(--text-4);
660
+ }
661
+
662
+ /* ---------- App shell ---------------------------------------------------- */
663
+ .app {
664
+ position: relative;
665
+ z-index: 1;
666
+ display: grid;
667
+ grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
668
+ height: var(--app-h);
669
+ max-width: 820px;
670
+ margin: 0 auto;
671
+ width: 100%;
672
+ overflow: hidden;
673
+ }
674
+
675
+ .topbar {
676
+ --topbar-btn: 44px;
677
+ grid-row: 1;
678
+ display: flex;
679
+ align-items: center;
680
+ gap: 2px;
681
+ padding: calc(6px + var(--safe-t)) calc(10px + var(--safe-r)) 2px
682
+ calc(10px + var(--safe-l));
683
+ min-height: 52px;
684
+ }
685
+
686
+ /* The header is a symmetric three-part row: [left cluster] [title] [right
687
+ cluster]. The left cluster carries a non-interactive spacer exactly one icon
688
+ button wide, so both side clusters measure the same and the title block — and
689
+ the status line under it — sits on the viewport centre line without absolute
690
+ positioning over the buttons. */
691
+ .topbar-side {
692
+ display: flex;
693
+ align-items: center;
694
+ gap: 0;
695
+ flex: none;
696
+ }
697
+
698
+ .topbar .iconbtn {
699
+ width: var(--topbar-btn);
700
+ }
701
+
702
+ .topbar-spacer {
703
+ display: block;
704
+ width: var(--topbar-btn);
705
+ height: 1px;
706
+ flex: none;
707
+ }
708
+
709
+ .titleblock {
710
+ flex: 1 1 0;
711
+ min-width: 0;
712
+ padding: 0 4px;
713
+ text-align: center;
714
+ }
715
+
716
+ .session-title {
717
+ margin: 0;
718
+ font-size: 16px;
719
+ font-weight: 600;
720
+ letter-spacing: -0.02em;
721
+ line-height: 1.25;
722
+ white-space: nowrap;
723
+ overflow: hidden;
724
+ text-overflow: ellipsis;
725
+ color: var(--text);
726
+ }
727
+
728
+ .session-sub {
729
+ display: flex;
730
+ align-items: center;
731
+ justify-content: center;
732
+ gap: 6px;
733
+ margin: 2px 0 0;
734
+ min-height: 15px;
735
+ font-size: 11px;
736
+ line-height: 1.3;
737
+ color: var(--text-4);
738
+ }
739
+
740
+ .statusdot {
741
+ width: 6px;
742
+ height: 6px;
743
+ border-radius: 50%;
744
+ background: var(--text-4);
745
+ flex: none;
746
+ transition: background var(--dur-2);
747
+ }
748
+
749
+ .statusdot.is-running {
750
+ background: var(--ok);
751
+ box-shadow: 0 0 0 3px var(--ok-soft);
752
+ animation: status-pulse 2.4s var(--ease-out) infinite;
753
+ }
754
+
755
+ .statusdot.is-offline {
756
+ background: var(--danger);
757
+ }
758
+
759
+ @keyframes status-pulse {
760
+ 0%,
761
+ 100% {
762
+ box-shadow: 0 0 0 3px var(--ok-soft);
763
+ }
764
+ 50% {
765
+ box-shadow: 0 0 0 6px transparent;
766
+ }
767
+ }
768
+
769
+ .topbar-actions {
770
+ display: flex;
771
+ align-items: center;
772
+ gap: 0;
773
+ flex: none;
774
+ }
775
+ .tabs {
776
+ grid-row: 2;
777
+ display: flex;
778
+ align-items: center;
779
+ justify-content: center;
780
+ gap: 4px;
781
+ padding: 2px calc(12px + var(--safe-r)) 10px calc(12px + var(--safe-l));
782
+ }
783
+
784
+ .tab {
785
+ position: relative;
786
+ display: inline-flex;
787
+ align-items: center;
788
+ justify-content: center;
789
+ gap: 6px;
790
+ min-width: 106px;
791
+ height: 38px;
792
+ padding: 0 16px;
793
+ border-radius: var(--radius-pill);
794
+ font-size: 13px;
795
+ font-weight: 550;
796
+ color: var(--text-3);
797
+ letter-spacing: -0.005em;
798
+ transition: color var(--dur-1) var(--ease-out),
799
+ background var(--dur-2) var(--ease-out),
800
+ box-shadow var(--dur-2) var(--ease-out);
801
+ }
802
+
803
+ .tab::after {
804
+ /* invisible vertical hit-area extension */
805
+ content: "";
806
+ position: absolute;
807
+ inset: -4px 0;
808
+ }
809
+
810
+ .tab.is-active {
811
+ color: var(--text);
812
+ background: var(--surface);
813
+ box-shadow: inset 0 0 0 1px var(--border), 0 1px 2px rgba(0, 0, 0, 0.03);
814
+ }
815
+
816
+ .tab:active {
817
+ color: var(--text-2);
818
+ }
819
+
820
+ .tab-badge {
821
+ position: absolute;
822
+ top: 9px;
823
+ right: 12px;
824
+ width: 5px;
825
+ height: 5px;
826
+ border-radius: 50%;
827
+ background: var(--ok);
828
+ box-shadow: 0 0 0 2px var(--surface);
829
+ }
830
+
831
+ /* Connection banner */
832
+ .banner {
833
+ grid-row: 4;
834
+ display: flex;
835
+ align-items: center;
836
+ gap: 9px;
837
+ margin: 0 calc(14px + var(--safe-r)) 8px calc(14px + var(--safe-l));
838
+ padding: 8px 8px 8px 13px;
839
+ border: 1px solid var(--warn-line);
840
+ border-radius: var(--radius-m);
841
+ background: var(--warn-soft);
842
+ color: var(--warn);
843
+ font-size: 12.5px;
844
+ line-height: 1.4;
845
+ }
846
+
847
+ .banner.is-offline {
848
+ border-color: var(--danger-line);
849
+ background: var(--danger-soft);
850
+ color: var(--danger-ink);
851
+ }
852
+
853
+ .banner-icon {
854
+ width: 17px;
855
+ height: 17px;
856
+ flex: none;
857
+ opacity: 0.9;
858
+ }
859
+
860
+ .banner-text {
861
+ flex: 1;
862
+ min-width: 0;
863
+ }
864
+
865
+ .banner-action {
866
+ position: relative;
867
+ flex: none;
868
+ min-height: 44px;
869
+ margin: -10px 0 -10px 4px;
870
+ padding: 0 12px;
871
+ border-radius: var(--radius-pill);
872
+ color: inherit;
873
+ font-size: 12.5px;
874
+ font-weight: 600;
875
+ }
876
+
877
+ .banner-action:active {
878
+ background: var(--pill-soft);
879
+ }
880
+
881
+ /* Main views */
882
+ .main {
883
+ grid-row: 5;
884
+ min-height: 0;
885
+ position: relative;
886
+ }
887
+
888
+ .view {
889
+ position: absolute;
890
+ inset: 0;
891
+ display: flex;
892
+ flex-direction: column;
893
+ min-height: 0;
894
+ }
895
+
896
+ .chat-scroll,
897
+ .activity-scroll {
898
+ flex: 1;
899
+ min-height: 0;
900
+ overflow-y: auto;
901
+ overflow-x: hidden;
902
+ -webkit-overflow-scrolling: touch;
903
+ overscroll-behavior: contain;
904
+ scrollbar-width: none;
905
+ }
906
+
907
+ .chat-scroll::-webkit-scrollbar,
908
+ .activity-scroll::-webkit-scrollbar,
909
+ .sheet-body::-webkit-scrollbar {
910
+ display: none;
911
+ }
912
+
913
+ .messages {
914
+ display: flex;
915
+ flex-direction: column;
916
+ gap: 22px;
917
+ width: 100%;
918
+ min-height: 100%;
919
+ max-width: 700px;
920
+ margin: 0 auto;
921
+ padding: 10px calc(20px + var(--safe-r)) 22px calc(20px + var(--safe-l));
922
+ }
923
+
924
+ /* ---------- Messages ----------------------------------------------------- */
925
+ .msg {
926
+ animation: msg-in var(--dur-2) var(--ease-out) both;
927
+ }
928
+
929
+ @keyframes msg-in {
930
+ from {
931
+ opacity: 0;
932
+ transform: translateY(4px);
933
+ }
934
+ to {
935
+ opacity: 1;
936
+ transform: translateY(0);
937
+ }
938
+ }
939
+
940
+ .msg-user {
941
+ display: flex;
942
+ flex-direction: column;
943
+ align-items: flex-end;
944
+ gap: 4px;
945
+ }
946
+
947
+ .bubble {
948
+ max-width: 84%;
949
+ padding: 10px 15px;
950
+ border: 1px solid var(--bubble-border);
951
+ border-radius: 20px;
952
+ background: var(--bubble);
953
+ color: var(--text);
954
+ font-size: 15.5px;
955
+ line-height: 1.5;
956
+ letter-spacing: -0.004em;
957
+ white-space: pre-wrap;
958
+ overflow-wrap: anywhere;
959
+ cursor: pointer;
960
+ transition: background var(--dur-1) var(--ease-out);
961
+ }
962
+
963
+ .bubble:active {
964
+ background: var(--surface-3);
965
+ }
966
+
967
+ .bubble-text {
968
+ white-space: pre-wrap;
969
+ }
970
+
971
+ .bubble-files {
972
+ display: flex;
973
+ flex-direction: column;
974
+ gap: 5px;
975
+ margin-top: 8px;
976
+ white-space: normal;
977
+ }
978
+
979
+ .bubble.has-thumbs,
980
+ .bubble.is-attachment-only {
981
+ min-width: 220px;
982
+ }
983
+
984
+ .bubble.is-attachment-only {
985
+ padding: 6px;
986
+ }
987
+
988
+ .bubble-thumbs {
989
+ display: grid;
990
+ grid-template-columns: repeat(2, minmax(0, 1fr));
991
+ gap: 5px;
992
+ width: 100%;
993
+ margin: 0 0 8px;
994
+ white-space: normal;
995
+ }
996
+
997
+ .bubble-thumbs.is-single {
998
+ grid-template-columns: 1fr;
999
+ }
1000
+
1001
+ .bubble.is-attachment-only .bubble-thumbs {
1002
+ margin-bottom: 0;
1003
+ }
1004
+
1005
+ .bubble-thumb {
1006
+ position: relative;
1007
+ display: block;
1008
+ width: 100%;
1009
+ min-height: 44px;
1010
+ max-height: 220px;
1011
+ padding: 0;
1012
+ border: 1px solid var(--border);
1013
+ border-radius: 12px;
1014
+ background: var(--surface-2);
1015
+ aspect-ratio: 4 / 3;
1016
+ overflow: hidden;
1017
+ cursor: pointer;
1018
+ }
1019
+
1020
+ .bubble-thumb:active {
1021
+ opacity: 0.9;
1022
+ }
1023
+
1024
+ .bubble-thumb-img {
1025
+ display: block;
1026
+ width: 100%;
1027
+ height: 100%;
1028
+ object-fit: cover;
1029
+ }
1030
+
1031
+ .bubble-thumbs .bubble-file {
1032
+ grid-column: 1 / -1;
1033
+ }
1034
+
1035
+ .bubble-file {
1036
+ display: flex;
1037
+ align-items: center;
1038
+ gap: 6px;
1039
+ padding: 6px 9px;
1040
+ border-radius: 10px;
1041
+ background: var(--pill-soft);
1042
+ font-size: 12.5px;
1043
+ line-height: 1.35;
1044
+ color: var(--text);
1045
+ }
1046
+
1047
+ .bubble-file.is-missing {
1048
+ align-items: flex-start;
1049
+ }
1050
+
1051
+ .bubble-file .icon {
1052
+ width: 13px;
1053
+ height: 13px;
1054
+ color: var(--text-2);
1055
+ }
1056
+
1057
+ .bubble-file-name {
1058
+ min-width: 0;
1059
+ overflow: hidden;
1060
+ white-space: nowrap;
1061
+ text-overflow: ellipsis;
1062
+ }
1063
+
1064
+ .bubble-file-note {
1065
+ margin-left: auto;
1066
+ padding-left: 6px;
1067
+ font-size: 10px;
1068
+ line-height: 1.3;
1069
+ color: var(--text-4);
1070
+ white-space: nowrap;
1071
+ }
1072
+
1073
+ .msg-assistant {
1074
+ color: var(--text);
1075
+ padding: 1px 0;
1076
+ }
1077
+
1078
+ .msg-time {
1079
+ display: none;
1080
+ font-family: var(--font-mono);
1081
+ font-size: 10px;
1082
+ letter-spacing: 0.02em;
1083
+ color: var(--text-4);
1084
+ user-select: none;
1085
+ }
1086
+
1087
+ .msg.is-time-shown .msg-time {
1088
+ display: inline-block;
1089
+ }
1090
+
1091
+ .msg-error {
1092
+ display: flex;
1093
+ gap: 10px;
1094
+ padding: 12px 14px;
1095
+ border: 1px solid var(--danger-line);
1096
+ border-radius: var(--radius-m);
1097
+ background: var(--danger-soft);
1098
+ color: var(--danger-ink);
1099
+ font-size: 13.5px;
1100
+ line-height: 1.5;
1101
+ overflow-wrap: anywhere;
1102
+ }
1103
+
1104
+ .msg-error .icon {
1105
+ width: 18px;
1106
+ height: 18px;
1107
+ margin-top: 1px;
1108
+ color: var(--danger);
1109
+ }
1110
+
1111
+ .msg-system {
1112
+ align-self: center;
1113
+ max-width: 90%;
1114
+ padding: 2px 10px;
1115
+ font-size: 12px;
1116
+ line-height: 1.5;
1117
+ text-align: center;
1118
+ color: var(--text-4);
1119
+ }
1120
+
1121
+ /* Typing indicator */
1122
+ .typing {
1123
+ display: inline-flex;
1124
+ align-items: center;
1125
+ gap: 5px;
1126
+ align-self: flex-start;
1127
+ padding: 4px 2px 0;
1128
+ }
1129
+
1130
+ .typing-dot {
1131
+ width: 5px;
1132
+ height: 5px;
1133
+ border-radius: 50%;
1134
+ background: var(--text-3);
1135
+ animation: typing-bounce 1.15s var(--ease-out) infinite;
1136
+ }
1137
+
1138
+ .typing-dot:nth-child(2) {
1139
+ animation-delay: 0.14s;
1140
+ }
1141
+
1142
+ .typing-dot:nth-child(3) {
1143
+ animation-delay: 0.28s;
1144
+ }
1145
+
1146
+ @keyframes typing-bounce {
1147
+ 0%,
1148
+ 60%,
1149
+ 100% {
1150
+ opacity: 0.35;
1151
+ transform: translateY(0);
1152
+ }
1153
+ 30% {
1154
+ opacity: 0.95;
1155
+ transform: translateY(-2.5px);
1156
+ }
1157
+ }
1158
+
1159
+ /* Streaming cursor */
1160
+ .cursor {
1161
+ display: inline-block;
1162
+ width: 2px;
1163
+ height: 1.02em;
1164
+ margin-left: 2px;
1165
+ vertical-align: -0.14em;
1166
+ border-radius: 1px;
1167
+ background: currentColor;
1168
+ opacity: 0.6;
1169
+ animation: blink 1.05s steps(1, end) infinite;
1170
+ }
1171
+
1172
+ @keyframes blink {
1173
+ 0%,
1174
+ 55% {
1175
+ opacity: 0.6;
1176
+ }
1177
+ 56%,
1178
+ 100% {
1179
+ opacity: 0;
1180
+ }
1181
+ }
1182
+
1183
+ /* Reasoning (collapsible) */
1184
+ .reasoning {
1185
+ margin: 0 0 12px;
1186
+ border-left: 2px solid var(--border-strong);
1187
+ padding-left: 13px;
1188
+ }
1189
+
1190
+ .reasoning summary {
1191
+ display: flex;
1192
+ align-items: center;
1193
+ gap: 6px;
1194
+ min-height: 34px;
1195
+ font-family: var(--font-ui);
1196
+ font-size: 10.5px;
1197
+ font-weight: 500;
1198
+ letter-spacing: 0.09em;
1199
+ text-transform: uppercase;
1200
+ color: var(--text-4);
1201
+ list-style: none;
1202
+ cursor: pointer;
1203
+ }
1204
+
1205
+ .reasoning summary::-webkit-details-marker {
1206
+ display: none;
1207
+ }
1208
+
1209
+ .reasoning summary::after {
1210
+ content: "";
1211
+ width: 12px;
1212
+ height: 12px;
1213
+ margin-left: 1px;
1214
+ background: currentColor;
1215
+ opacity: 0.7;
1216
+ -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
1217
+ center / contain no-repeat;
1218
+ mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
1219
+ center / contain no-repeat;
1220
+ transition: transform var(--dur-2) var(--ease);
1221
+ }
1222
+
1223
+ .reasoning[open] summary::after {
1224
+ transform: rotate(180deg);
1225
+ }
1226
+
1227
+ .reasoning-body {
1228
+ padding: 2px 0 4px;
1229
+ font-size: 13.5px;
1230
+ line-height: 1.6;
1231
+ color: var(--text-3);
1232
+ }
1233
+
1234
+ .reasoning-body .md-p {
1235
+ margin: 0 0 0.5em;
1236
+ }
1237
+
1238
+ /* ---------- Assistant prose --------------------------------------------- */
1239
+ .md {
1240
+ font-family: var(--font-serif);
1241
+ font-size: var(--prose-size);
1242
+ line-height: var(--prose-line);
1243
+ letter-spacing: 0;
1244
+ color: var(--text);
1245
+ overflow-wrap: break-word;
1246
+ word-break: break-word;
1247
+ }
1248
+
1249
+ .md > :first-child {
1250
+ margin-top: 0;
1251
+ }
1252
+
1253
+ .md > :last-child {
1254
+ margin-bottom: 0;
1255
+ }
1256
+
1257
+ .md-p {
1258
+ margin: 0 0 0.74em;
1259
+ }
1260
+
1261
+ .md-h {
1262
+ margin: 1.08em 0 0.5em;
1263
+ font-family: var(--font-serif);
1264
+ font-weight: 600;
1265
+ letter-spacing: -0.015em;
1266
+ color: var(--text);
1267
+ line-height: 1.22;
1268
+ }
1269
+
1270
+ .md-h1 {
1271
+ font-size: 1.34em;
1272
+ }
1273
+
1274
+ .md-h2 {
1275
+ font-size: 1.2em;
1276
+ }
1277
+
1278
+ .md-h3 {
1279
+ font-size: 1.07em;
1280
+ }
1281
+
1282
+ .md-h4,
1283
+ .md-h5,
1284
+ .md-h6 {
1285
+ font-size: 1em;
1286
+ color: var(--text-2);
1287
+ }
1288
+
1289
+ .md-list {
1290
+ margin: 0.4em 0 0.85em;
1291
+ padding-left: 1.25em;
1292
+ }
1293
+
1294
+ .md-li {
1295
+ margin: 0.28em 0;
1296
+ padding-left: 0.15em;
1297
+ }
1298
+
1299
+ .md-li::marker {
1300
+ color: var(--text-4);
1301
+ }
1302
+
1303
+ .md-list .md-list {
1304
+ margin: 0.2em 0 0.25em;
1305
+ }
1306
+
1307
+ /* Pipe tables (safe: cells go through parseInline -> textContent) */
1308
+ .md-table-wrap {
1309
+ margin: 0.9em 0 1em;
1310
+ border: 1px solid var(--border);
1311
+ border-radius: var(--radius-s);
1312
+ overflow-x: auto;
1313
+ -webkit-overflow-scrolling: touch;
1314
+ }
1315
+
1316
+ .md-table {
1317
+ width: 100%;
1318
+ border-collapse: collapse;
1319
+ font-family: var(--font-ui);
1320
+ font-size: 13.5px;
1321
+ line-height: 1.45;
1322
+ letter-spacing: -0.005em;
1323
+ }
1324
+
1325
+ .md-table th,
1326
+ .md-table td {
1327
+ padding: 9px 12px;
1328
+ text-align: left;
1329
+ vertical-align: top;
1330
+ border-bottom: 1px solid var(--border);
1331
+ overflow-wrap: anywhere;
1332
+ }
1333
+
1334
+ .md-table th {
1335
+ background: var(--surface-2);
1336
+ font-size: 11.5px;
1337
+ font-weight: 600;
1338
+ letter-spacing: 0.01em;
1339
+ color: var(--text);
1340
+ white-space: nowrap;
1341
+ }
1342
+
1343
+ .md-table td {
1344
+ color: var(--text-2);
1345
+ }
1346
+
1347
+ .md-table tbody tr:last-child td {
1348
+ border-bottom: 0;
1349
+ }
1350
+
1351
+ .md-code {
1352
+ padding: 0.12em 0.4em;
1353
+ border: 1px solid var(--code-border);
1354
+ border-radius: 6px;
1355
+ background: var(--inline-code-bg);
1356
+ font-family: var(--font-mono);
1357
+ font-size: 0.83em;
1358
+ color: var(--text);
1359
+ overflow-wrap: anywhere;
1360
+ }
1361
+
1362
+ .md-quote {
1363
+ margin: 0.7em 0;
1364
+ padding: 0.1em 0 0.1em 1em;
1365
+ border-left: 2px solid var(--border-strong);
1366
+ color: var(--text-2);
1367
+ }
1368
+
1369
+ .md-quote .md-p:last-child {
1370
+ margin-bottom: 0;
1371
+ }
1372
+
1373
+ .md-hr {
1374
+ height: 1px;
1375
+ margin: 1.2em 0;
1376
+ border: 0;
1377
+ background: var(--border);
1378
+ }
1379
+
1380
+ .md-link {
1381
+ color: var(--link);
1382
+ text-decoration: underline;
1383
+ text-underline-offset: 2px;
1384
+ text-decoration-color: var(--link-underline);
1385
+ overflow-wrap: anywhere;
1386
+ }
1387
+
1388
+ .md-link:active {
1389
+ opacity: 0.7;
1390
+ }
1391
+
1392
+ .md-link-plain {
1393
+ color: var(--text-3);
1394
+ }
1395
+
1396
+ /* Assistant message footer: copy + tap-to-reveal timestamp */
1397
+ .msg-foot {
1398
+ display: flex;
1399
+ align-items: center;
1400
+ gap: 14px;
1401
+ margin: 7px 0 0 -9px;
1402
+ min-height: 36px;
1403
+ transition: opacity var(--dur-2) var(--ease-out);
1404
+ }
1405
+
1406
+ .msg-assistant.is-streaming .msg-foot {
1407
+ opacity: 0;
1408
+ pointer-events: none;
1409
+ }
1410
+
1411
+ .msg-action {
1412
+ position: relative;
1413
+ display: inline-flex;
1414
+ align-items: center;
1415
+ gap: 5px;
1416
+ min-height: 36px;
1417
+ padding: 0 9px;
1418
+ border-radius: var(--radius-pill);
1419
+ font-family: var(--font-ui);
1420
+ font-size: 11.5px;
1421
+ font-weight: 500;
1422
+ color: var(--text-4);
1423
+ transition: background var(--dur-1) var(--ease-out), color var(--dur-1);
1424
+ }
1425
+
1426
+ .msg-action::after {
1427
+ content: "";
1428
+ position: absolute;
1429
+ inset: -4px -4px;
1430
+ }
1431
+
1432
+ .msg-action .icon {
1433
+ width: 14px;
1434
+ height: 14px;
1435
+ }
1436
+
1437
+ .msg-action:active {
1438
+ background: var(--pill-soft);
1439
+ color: var(--text);
1440
+ }
1441
+
1442
+ .msg-action.is-copied {
1443
+ color: var(--ok);
1444
+ }
1445
+
1446
+ /* Code blocks */
1447
+ .md-pre {
1448
+ position: relative;
1449
+ margin: 0.85em 0 0.95em;
1450
+ border: 1px solid var(--code-border);
1451
+ border-radius: 14px;
1452
+ background: var(--code-bg);
1453
+ overflow: hidden;
1454
+ }
1455
+
1456
+ .md-pre-head {
1457
+ display: flex;
1458
+ align-items: center;
1459
+ justify-content: space-between;
1460
+ gap: 10px;
1461
+ height: 38px;
1462
+ padding: 0 5px 0 14px;
1463
+ border-bottom: 1px solid var(--code-border);
1464
+ }
1465
+
1466
+ .md-pre-lang {
1467
+ font-family: var(--font-mono);
1468
+ font-size: 10px;
1469
+ font-weight: 500;
1470
+ letter-spacing: 0.1em;
1471
+ text-transform: uppercase;
1472
+ color: var(--text-4);
1473
+ }
1474
+
1475
+ .md-copy {
1476
+ position: relative;
1477
+ display: inline-flex;
1478
+ align-items: center;
1479
+ gap: 5px;
1480
+ height: 30px;
1481
+ padding: 0 9px;
1482
+ border-radius: var(--radius-pill);
1483
+ font-family: var(--font-ui);
1484
+ font-size: 11px;
1485
+ font-weight: 500;
1486
+ color: var(--text-3);
1487
+ transition: background var(--dur-1), color var(--dur-1);
1488
+ }
1489
+
1490
+ .md-copy::after {
1491
+ content: "";
1492
+ position: absolute;
1493
+ inset: -7px -6px;
1494
+ }
1495
+
1496
+ .md-copy .icon {
1497
+ width: 13px;
1498
+ height: 13px;
1499
+ }
1500
+
1501
+ .md-copy:active {
1502
+ background: var(--pill-soft);
1503
+ color: var(--text);
1504
+ }
1505
+
1506
+ .md-copy.is-copied {
1507
+ color: var(--ok);
1508
+ }
1509
+
1510
+ .md-codeblock {
1511
+ margin: 0;
1512
+ padding: 13px 15px;
1513
+ overflow: auto;
1514
+ -webkit-overflow-scrolling: touch;
1515
+ font-family: var(--font-mono);
1516
+ font-size: 12.5px;
1517
+ line-height: 1.65;
1518
+ color: var(--text-2);
1519
+ tab-size: 2;
1520
+ scrollbar-width: thin;
1521
+ }
1522
+
1523
+ /* Syntax tokens */
1524
+ .tok-com {
1525
+ color: var(--tok-com);
1526
+ font-style: italic;
1527
+ }
1528
+
1529
+ .tok-kw {
1530
+ color: var(--tok-kw);
1531
+ }
1532
+
1533
+ .tok-str {
1534
+ color: var(--tok-str);
1535
+ }
1536
+
1537
+ .tok-num {
1538
+ color: var(--tok-num);
1539
+ }
1540
+
1541
+ .tok-fn {
1542
+ color: var(--tok-fn);
1543
+ }
1544
+
1545
+ .tok-var {
1546
+ color: var(--tok-var);
1547
+ }
1548
+
1549
+ .tok-tag {
1550
+ color: var(--tok-tag);
1551
+ }
1552
+
1553
+ .tok-attr {
1554
+ color: var(--tok-attr);
1555
+ }
1556
+
1557
+ .tok-prop {
1558
+ color: var(--tok-prop);
1559
+ }
1560
+
1561
+ /* ---------- Tool cards --------------------------------------------------- */
1562
+ .tool {
1563
+ border: 1px solid var(--border);
1564
+ border-radius: var(--radius-m);
1565
+ background: var(--surface);
1566
+ overflow: hidden;
1567
+ transition: border-color var(--dur-2) var(--ease-out);
1568
+ }
1569
+
1570
+ .tool.is-error {
1571
+ border-color: var(--danger-line);
1572
+ }
1573
+
1574
+ .tool-head {
1575
+ display: flex;
1576
+ align-items: center;
1577
+ gap: 11px;
1578
+ width: 100%;
1579
+ min-height: 56px;
1580
+ padding: 9px 11px 9px 11px;
1581
+ text-align: left;
1582
+ }
1583
+
1584
+ .tool-head:active {
1585
+ background: var(--surface-2);
1586
+ }
1587
+
1588
+ .tool-glyph {
1589
+ display: grid;
1590
+ place-items: center;
1591
+ width: 34px;
1592
+ height: 34px;
1593
+ border-radius: 11px;
1594
+ background: var(--surface-2);
1595
+ color: var(--text-2);
1596
+ flex: none;
1597
+ }
1598
+
1599
+ .tool-glyph .icon {
1600
+ width: 16px;
1601
+ height: 16px;
1602
+ }
1603
+
1604
+ .tool.is-error .tool-glyph {
1605
+ background: var(--danger-soft);
1606
+ color: var(--danger);
1607
+ }
1608
+
1609
+ .tool-main {
1610
+ flex: 1;
1611
+ min-width: 0;
1612
+ }
1613
+
1614
+ .tool-name {
1615
+ display: block;
1616
+ font-family: var(--font-ui);
1617
+ font-size: 13.5px;
1618
+ font-weight: 600;
1619
+ line-height: 1.3;
1620
+ letter-spacing: -0.01em;
1621
+ color: var(--text);
1622
+ white-space: nowrap;
1623
+ overflow: hidden;
1624
+ text-overflow: ellipsis;
1625
+ }
1626
+
1627
+ .tool-title {
1628
+ display: block;
1629
+ margin-top: 2px;
1630
+ font-size: 12px;
1631
+ line-height: 1.35;
1632
+ color: var(--text-3);
1633
+ white-space: nowrap;
1634
+ overflow: hidden;
1635
+ text-overflow: ellipsis;
1636
+ }
1637
+
1638
+ .tool-side {
1639
+ display: flex;
1640
+ align-items: center;
1641
+ gap: 8px;
1642
+ flex: none;
1643
+ color: var(--text-4);
1644
+ }
1645
+
1646
+ .tool-dur {
1647
+ font-family: var(--font-mono);
1648
+ font-size: 10.5px;
1649
+ letter-spacing: 0.02em;
1650
+ }
1651
+
1652
+ .tool-status {
1653
+ font-family: var(--font-ui);
1654
+ font-size: 11px;
1655
+ font-weight: 500;
1656
+ color: var(--text-4);
1657
+ }
1658
+
1659
+ .tool-status.is-ok {
1660
+ color: var(--ok);
1661
+ }
1662
+
1663
+ .tool-status.is-error {
1664
+ color: var(--danger);
1665
+ }
1666
+
1667
+ .tool-status.is-running {
1668
+ color: var(--text-3);
1669
+ }
1670
+
1671
+ .tool-chevron {
1672
+ display: grid;
1673
+ place-items: center;
1674
+ width: 20px;
1675
+ height: 28px;
1676
+ color: var(--text-4);
1677
+ }
1678
+
1679
+ .tool-chevron .icon {
1680
+ width: 16px;
1681
+ height: 16px;
1682
+ transition: transform var(--dur-2) var(--ease);
1683
+ }
1684
+
1685
+ .tool.is-open .tool-chevron .icon {
1686
+ transform: rotate(180deg);
1687
+ }
1688
+
1689
+ /* Collapsible body: grid-row animation gives a real height transition
1690
+ without measuring content or hard-coding a max-height. */
1691
+ .tool-body {
1692
+ display: grid;
1693
+ grid-template-rows: 0fr;
1694
+ opacity: 0;
1695
+ transition: grid-template-rows var(--dur-3) var(--ease),
1696
+ opacity var(--dur-2) var(--ease-out);
1697
+ }
1698
+
1699
+ .tool-body-inner {
1700
+ overflow: hidden;
1701
+ min-height: 0;
1702
+ }
1703
+
1704
+ .tool-body-pad {
1705
+ padding: 2px 13px 14px;
1706
+ border-top: 1px solid var(--border);
1707
+ }
1708
+
1709
+ .tool.is-open .tool-body {
1710
+ grid-template-rows: 1fr;
1711
+ opacity: 1;
1712
+ }
1713
+
1714
+ .tool-section-label {
1715
+ margin: 11px 0 5px;
1716
+ font-family: var(--font-mono);
1717
+ font-size: 9.5px;
1718
+ font-weight: 500;
1719
+ letter-spacing: 0.12em;
1720
+ text-transform: uppercase;
1721
+ color: var(--text-4);
1722
+ }
1723
+
1724
+ .tool-args,
1725
+ .tool-output {
1726
+ margin: 0;
1727
+ max-height: 260px;
1728
+ padding: 11px 12px;
1729
+ border: 1px solid var(--code-border);
1730
+ border-radius: var(--radius-s);
1731
+ background: var(--code-bg);
1732
+ overflow: auto;
1733
+ -webkit-overflow-scrolling: touch;
1734
+ font-family: var(--font-mono);
1735
+ font-size: 11.5px;
1736
+ line-height: 1.6;
1737
+ color: var(--text-2);
1738
+ white-space: pre-wrap;
1739
+ overflow-wrap: anywhere;
1740
+ scrollbar-width: thin;
1741
+ }
1742
+
1743
+ .tool.is-error .tool-output {
1744
+ border-color: var(--danger-line);
1745
+ color: var(--danger-ink);
1746
+ }
1747
+
1748
+ .tool-empty {
1749
+ margin: 0;
1750
+ font-size: 12px;
1751
+ color: var(--text-4);
1752
+ }
1753
+
1754
+ .spin {
1755
+ display: inline-block;
1756
+ width: 13px;
1757
+ height: 13px;
1758
+ border: 1.5px solid var(--border-strong);
1759
+ border-top-color: var(--text-2);
1760
+ border-radius: 50%;
1761
+ animation: spin 0.8s linear infinite;
1762
+ flex: none;
1763
+ }
1764
+
1765
+ @keyframes spin {
1766
+ to {
1767
+ transform: rotate(360deg);
1768
+ }
1769
+ }
1770
+
1771
+ /* ---------- Approval cards ----------------------------------------------- */
1772
+ .approval {
1773
+ border: 1px solid var(--warn-line);
1774
+ border-radius: 18px;
1775
+ background: var(--surface);
1776
+ padding: 16px;
1777
+ box-shadow: var(--shadow-soft);
1778
+ }
1779
+
1780
+ .approval-head {
1781
+ display: flex;
1782
+ gap: 12px;
1783
+ align-items: flex-start;
1784
+ }
1785
+
1786
+ .approval-glyph {
1787
+ display: grid;
1788
+ place-items: center;
1789
+ width: 34px;
1790
+ height: 34px;
1791
+ border-radius: 11px;
1792
+ background: var(--warn-soft);
1793
+ color: var(--warn);
1794
+ flex: none;
1795
+ }
1796
+
1797
+ .approval-glyph .icon {
1798
+ width: 17px;
1799
+ height: 17px;
1800
+ }
1801
+
1802
+ .approval-titles {
1803
+ flex: 1;
1804
+ min-width: 0;
1805
+ padding-top: 1px;
1806
+ }
1807
+
1808
+ .approval-eyebrow {
1809
+ margin: 0;
1810
+ font-family: var(--font-mono);
1811
+ font-size: 9.5px;
1812
+ font-weight: 500;
1813
+ letter-spacing: 0.12em;
1814
+ text-transform: uppercase;
1815
+ color: var(--warn);
1816
+ }
1817
+
1818
+ .approval-tool {
1819
+ margin: 5px 0 0;
1820
+ font-family: var(--font-mono);
1821
+ font-size: 13px;
1822
+ font-weight: 600;
1823
+ line-height: 1.35;
1824
+ color: var(--text);
1825
+ overflow-wrap: anywhere;
1826
+ }
1827
+
1828
+ .approval-reason {
1829
+ margin: 13px 0 0;
1830
+ font-size: 13.5px;
1831
+ line-height: 1.55;
1832
+ color: var(--text-2);
1833
+ overflow-wrap: anywhere;
1834
+ }
1835
+
1836
+ .approval-meta {
1837
+ margin: 10px 0 0;
1838
+ font-family: var(--font-mono);
1839
+ font-size: 10.5px;
1840
+ line-height: 1.4;
1841
+ color: var(--text-4);
1842
+ overflow-wrap: anywhere;
1843
+ }
1844
+
1845
+ /* Approval context (args preview from the bridge, read-only device guard) */
1846
+ .approval-args {
1847
+ margin-top: 11px;
1848
+ padding: 9px 10px;
1849
+ border: 1px solid var(--border);
1850
+ border-radius: var(--radius-s);
1851
+ background: var(--surface-2);
1852
+ }
1853
+
1854
+ .approval-args-head {
1855
+ display: flex;
1856
+ align-items: center;
1857
+ gap: 8px;
1858
+ min-width: 0;
1859
+ }
1860
+
1861
+ .approval-tag {
1862
+ flex: none;
1863
+ padding: 2px 6px;
1864
+ border-radius: 5px;
1865
+ background: var(--surface);
1866
+ font-family: var(--font-mono);
1867
+ font-size: 9px;
1868
+ letter-spacing: 0.08em;
1869
+ text-transform: uppercase;
1870
+ color: var(--text-3);
1871
+ }
1872
+
1873
+ .approval-path {
1874
+ min-width: 0;
1875
+ overflow: hidden;
1876
+ text-overflow: ellipsis;
1877
+ white-space: nowrap;
1878
+ font-family: var(--font-mono);
1879
+ font-size: 10.5px;
1880
+ color: var(--text-4);
1881
+ }
1882
+
1883
+ .approval-args-pre {
1884
+ margin: 7px 0 0;
1885
+ max-height: 168px;
1886
+ overflow: auto;
1887
+ scrollbar-width: thin;
1888
+ font-family: var(--font-mono);
1889
+ font-size: 11px;
1890
+ line-height: 1.5;
1891
+ color: var(--text-2);
1892
+ white-space: pre-wrap;
1893
+ overflow-wrap: anywhere;
1894
+ }
1895
+
1896
+ .approval-args-pre.is-collapsible {
1897
+ cursor: pointer;
1898
+ }
1899
+
1900
+ .approval-args-toggle {
1901
+ position: relative;
1902
+ min-height: 32px;
1903
+ margin-top: 5px;
1904
+ padding: 0 2px;
1905
+ font-size: 11px;
1906
+ font-weight: 500;
1907
+ color: var(--text-3);
1908
+ }
1909
+
1910
+ .approval-args-toggle::after {
1911
+ content: "";
1912
+ position: absolute;
1913
+ inset: -6px -8px;
1914
+ }
1915
+
1916
+ .approval-args-toggle:active {
1917
+ color: var(--text);
1918
+ }
1919
+
1920
+ .approval-readonly {
1921
+ margin: 12px 0 0;
1922
+ padding: 9px 10px;
1923
+ border: 1px solid var(--border);
1924
+ border-radius: var(--radius-s);
1925
+ background: var(--surface-2);
1926
+ font-size: 12px;
1927
+ line-height: 1.5;
1928
+ color: var(--text-3);
1929
+ }
1930
+
1931
+ .act-note {
1932
+ display: inline-block;
1933
+ margin-top: 4px;
1934
+ font-size: 10.5px;
1935
+ line-height: 1.4;
1936
+ color: var(--warn);
1937
+ }
1938
+
1939
+ .approval-actions {
1940
+ display: flex;
1941
+ gap: 9px;
1942
+ margin-top: 15px;
1943
+ }
1944
+
1945
+ .approval-actions .btn {
1946
+ flex: 1 1 0;
1947
+ min-width: 0;
1948
+ min-height: 46px;
1949
+ border: 1px solid transparent;
1950
+ }
1951
+
1952
+ .approval-actions .btn-ghost {
1953
+ border-color: var(--border-strong);
1954
+ }
1955
+
1956
+ .approval-outcome {
1957
+ display: flex;
1958
+ align-items: center;
1959
+ gap: 8px;
1960
+ min-height: 44px;
1961
+ margin-top: 12px;
1962
+ font-size: 13px;
1963
+ font-weight: 500;
1964
+ color: var(--text-2);
1965
+ }
1966
+
1967
+ .approval-outcome .icon {
1968
+ width: 17px;
1969
+ height: 17px;
1970
+ }
1971
+
1972
+ .approval-outcome.is-allowed {
1973
+ color: var(--ok);
1974
+ }
1975
+
1976
+ .approval-outcome.is-rejected {
1977
+ color: var(--danger-ink);
1978
+ }
1979
+
1980
+ .approval.is-resolved {
1981
+ border-color: var(--border);
1982
+ background: var(--surface-2);
1983
+ box-shadow: none;
1984
+ opacity: 0.9;
1985
+ }
1986
+
1987
+ /* ---------- Question cards (ask_user_question) --------------------------- */
1988
+ .question {
1989
+ margin: 2px 0;
1990
+ padding: 16px;
1991
+ border: 1px solid var(--border-strong);
1992
+ border-radius: 18px;
1993
+ background: var(--surface);
1994
+ box-shadow: var(--shadow-soft);
1995
+ }
1996
+
1997
+ .question.is-waiting {
1998
+ border-color: var(--border);
1999
+ box-shadow: none;
2000
+ }
2001
+
2002
+ .question.is-resolved {
2003
+ border-color: var(--border);
2004
+ background: var(--surface-2);
2005
+ box-shadow: none;
2006
+ }
2007
+
2008
+ .question-head {
2009
+ display: flex;
2010
+ align-items: flex-start;
2011
+ justify-content: space-between;
2012
+ gap: 12px;
2013
+ margin-bottom: 12px;
2014
+ }
2015
+
2016
+ .question-titles {
2017
+ min-width: 0;
2018
+ }
2019
+
2020
+ .question-eyebrow {
2021
+ margin: 0;
2022
+ font-family: var(--font-mono);
2023
+ font-size: 9.5px;
2024
+ font-weight: 500;
2025
+ letter-spacing: 0.12em;
2026
+ text-transform: uppercase;
2027
+ color: var(--text-3);
2028
+ overflow-wrap: anywhere;
2029
+ }
2030
+
2031
+ .question-progress {
2032
+ margin: 3px 0 0;
2033
+ font-size: 11.5px;
2034
+ line-height: 1.4;
2035
+ color: var(--text-4);
2036
+ }
2037
+
2038
+ .question-status {
2039
+ flex: none;
2040
+ padding: 3px 9px;
2041
+ border-radius: var(--radius-pill);
2042
+ background: var(--surface-2);
2043
+ font-family: var(--font-mono);
2044
+ font-size: 9px;
2045
+ font-weight: 500;
2046
+ letter-spacing: 0.06em;
2047
+ text-transform: uppercase;
2048
+ color: var(--text-3);
2049
+ white-space: nowrap;
2050
+ }
2051
+
2052
+ .question-status.is-answered {
2053
+ background: var(--ok-soft);
2054
+ color: var(--ok);
2055
+ }
2056
+
2057
+ .question-status.is-declined {
2058
+ background: var(--surface);
2059
+ color: var(--text-3);
2060
+ }
2061
+
2062
+ .question-status.is-unavailable {
2063
+ background: var(--danger-soft);
2064
+ color: var(--danger);
2065
+ }
2066
+
2067
+ .q-block {
2068
+ padding: 4px 0 12px;
2069
+ }
2070
+
2071
+ .q-block + .q-block {
2072
+ padding-top: 14px;
2073
+ border-top: 1px solid var(--border);
2074
+ }
2075
+
2076
+ .q-meta {
2077
+ display: flex;
2078
+ align-items: center;
2079
+ gap: 8px;
2080
+ margin-bottom: 6px;
2081
+ }
2082
+
2083
+ .q-index {
2084
+ font-family: var(--font-mono);
2085
+ font-size: 9.5px;
2086
+ letter-spacing: 0.08em;
2087
+ text-transform: uppercase;
2088
+ color: var(--text-4);
2089
+ }
2090
+
2091
+ .q-label {
2092
+ margin: 0;
2093
+ font-family: var(--font-serif);
2094
+ font-size: 17px;
2095
+ line-height: 1.45;
2096
+ font-weight: 500;
2097
+ letter-spacing: -0.005em;
2098
+ color: var(--text);
2099
+ overflow-wrap: anywhere;
2100
+ }
2101
+
2102
+ .q-detail {
2103
+ margin: 7px 0 0;
2104
+ font-size: 12.5px;
2105
+ line-height: 1.55;
2106
+ color: var(--text-2);
2107
+ overflow-wrap: anywhere;
2108
+ }
2109
+
2110
+ .q-options {
2111
+ display: flex;
2112
+ flex-direction: column;
2113
+ gap: 7px;
2114
+ margin-top: 12px;
2115
+ }
2116
+
2117
+ .q-option {
2118
+ position: relative;
2119
+ display: flex;
2120
+ align-items: flex-start;
2121
+ gap: 10px;
2122
+ min-height: 46px;
2123
+ padding: 10px 12px;
2124
+ border: 1px solid var(--border);
2125
+ border-radius: var(--radius-s);
2126
+ background: var(--surface);
2127
+ cursor: pointer;
2128
+ transition: border-color var(--dur-1) var(--ease-out),
2129
+ background var(--dur-1) var(--ease-out);
2130
+ }
2131
+
2132
+ .q-option:active {
2133
+ background: var(--surface-2);
2134
+ }
2135
+
2136
+ .q-option:focus-within {
2137
+ outline: 2px solid var(--focus);
2138
+ outline-offset: 2px;
2139
+ }
2140
+
2141
+ .q-option.is-selected {
2142
+ border-color: var(--text-4);
2143
+ background: var(--surface-2);
2144
+ }
2145
+
2146
+ /* The native control stays focusable for keyboard/AT but is visually
2147
+ replaced by .q-control. */
2148
+ .q-input {
2149
+ position: absolute;
2150
+ width: 1px;
2151
+ height: 1px;
2152
+ margin: 0;
2153
+ padding: 0;
2154
+ opacity: 0;
2155
+ pointer-events: none;
2156
+ }
2157
+
2158
+ .q-control {
2159
+ display: grid;
2160
+ place-items: center;
2161
+ flex: none;
2162
+ width: 20px;
2163
+ height: 20px;
2164
+ margin-top: 1px;
2165
+ border: 1.5px solid var(--border-strong);
2166
+ border-radius: 50%;
2167
+ background: transparent;
2168
+ transition: background var(--dur-1) var(--ease-out),
2169
+ border-color var(--dur-1) var(--ease-out);
2170
+ }
2171
+
2172
+ .q-input[type="checkbox"] + .q-control {
2173
+ border-radius: 6px;
2174
+ }
2175
+
2176
+ .q-option.is-selected .q-control {
2177
+ border-color: var(--pill);
2178
+ background: var(--pill);
2179
+ }
2180
+
2181
+ .q-input[type="radio"]:checked + .q-control::after {
2182
+ content: "";
2183
+ width: 6px;
2184
+ height: 6px;
2185
+ border-radius: 50%;
2186
+ background: var(--pill-ink);
2187
+ }
2188
+
2189
+ .q-input[type="checkbox"]:checked + .q-control::after {
2190
+ content: "";
2191
+ width: 5px;
2192
+ height: 9px;
2193
+ margin-top: -2px;
2194
+ border: solid var(--pill-ink);
2195
+ border-width: 0 1.6px 1.6px 0;
2196
+ transform: rotate(45deg);
2197
+ }
2198
+
2199
+ .q-option-text {
2200
+ flex: 1;
2201
+ min-width: 0;
2202
+ }
2203
+
2204
+ .q-option-label {
2205
+ display: block;
2206
+ font-size: 14px;
2207
+ font-weight: 500;
2208
+ line-height: 1.4;
2209
+ letter-spacing: -0.005em;
2210
+ color: var(--text);
2211
+ overflow-wrap: anywhere;
2212
+ }
2213
+
2214
+ .q-option-desc {
2215
+ display: block;
2216
+ margin-top: 2px;
2217
+ font-size: 12px;
2218
+ line-height: 1.45;
2219
+ color: var(--text-3);
2220
+ overflow-wrap: anywhere;
2221
+ }
2222
+
2223
+ .q-custom {
2224
+ display: flex;
2225
+ flex-direction: column;
2226
+ gap: 6px;
2227
+ margin-top: 12px;
2228
+ }
2229
+
2230
+ .q-custom-label {
2231
+ font-family: var(--font-mono);
2232
+ font-size: 9.5px;
2233
+ font-weight: 500;
2234
+ letter-spacing: 0.1em;
2235
+ text-transform: uppercase;
2236
+ color: var(--text-4);
2237
+ }
2238
+
2239
+ .q-custom-input {
2240
+ width: 100%;
2241
+ min-height: 44px;
2242
+ padding: 0 13px;
2243
+ border: 1px solid var(--border);
2244
+ border-radius: var(--radius-s);
2245
+ background: var(--surface);
2246
+ color: var(--text);
2247
+ font-family: var(--font-ui);
2248
+ font-size: 15px; /* ≥16px avoids iOS zoom on focus; 15 keeps rhythm */
2249
+ line-height: 1.4;
2250
+ outline: none;
2251
+ transition: border-color var(--dur-1) var(--ease-out),
2252
+ box-shadow var(--dur-1) var(--ease-out);
2253
+ }
2254
+
2255
+ .q-custom-input:focus {
2256
+ border-color: var(--border-strong);
2257
+ box-shadow: 0 0 0 3px var(--pill-soft);
2258
+ }
2259
+
2260
+ .q-custom-input::placeholder {
2261
+ color: var(--text-4);
2262
+ }
2263
+
2264
+ .q-answer {
2265
+ display: flex;
2266
+ flex-direction: column;
2267
+ gap: 4px;
2268
+ margin-top: 12px;
2269
+ padding: 10px 12px;
2270
+ border: 1px solid var(--border);
2271
+ border-radius: var(--radius-s);
2272
+ background: var(--surface);
2273
+ }
2274
+
2275
+ .q-answer-label {
2276
+ font-family: var(--font-mono);
2277
+ font-size: 9.5px;
2278
+ font-weight: 500;
2279
+ letter-spacing: 0.1em;
2280
+ text-transform: uppercase;
2281
+ color: var(--text-4);
2282
+ }
2283
+
2284
+ .q-answer-value {
2285
+ font-size: 14px;
2286
+ line-height: 1.45;
2287
+ color: var(--text);
2288
+ overflow-wrap: anywhere;
2289
+ }
2290
+
2291
+ .q-answer.is-generic .q-answer-value {
2292
+ color: var(--text-2);
2293
+ }
2294
+
2295
+ .question-actions {
2296
+ display: flex;
2297
+ gap: 9px;
2298
+ margin-top: 16px;
2299
+ }
2300
+
2301
+ .question-actions .btn {
2302
+ flex: 1 1 0;
2303
+ min-width: 0;
2304
+ min-height: 46px;
2305
+ border: 1px solid transparent;
2306
+ }
2307
+
2308
+ .question-actions .btn-ghost {
2309
+ border-color: var(--border-strong);
2310
+ }
2311
+
2312
+ .question-hint {
2313
+ margin: 10px 0 0;
2314
+ font-size: 11px;
2315
+ line-height: 1.5;
2316
+ color: var(--text-4);
2317
+ }
2318
+
2319
+ .question-waiting {
2320
+ display: flex;
2321
+ align-items: center;
2322
+ gap: 9px;
2323
+ min-height: 44px;
2324
+ margin-top: 14px;
2325
+ font-size: 13px;
2326
+ color: var(--text-2);
2327
+ }
2328
+
2329
+ .question-outcome {
2330
+ display: flex;
2331
+ align-items: center;
2332
+ gap: 8px;
2333
+ min-height: 40px;
2334
+ margin-top: 12px;
2335
+ padding-top: 12px;
2336
+ border-top: 1px solid var(--border);
2337
+ font-size: 13px;
2338
+ font-weight: 500;
2339
+ color: var(--text-3);
2340
+ }
2341
+
2342
+ .question-outcome .icon {
2343
+ width: 17px;
2344
+ height: 17px;
2345
+ }
2346
+
2347
+ .question-outcome.is-answered {
2348
+ color: var(--ok);
2349
+ }
2350
+
2351
+ .question-outcome.is-unavailable {
2352
+ color: var(--danger-ink);
2353
+ }
2354
+
2355
+ .question-empty {
2356
+ margin: 0;
2357
+ font-size: 13px;
2358
+ line-height: 1.5;
2359
+ color: var(--text-3);
2360
+ }
2361
+
2362
+ /* ---------- Empty states ------------------------------------------------- */
2363
+ .empty {
2364
+ display: flex;
2365
+ flex-direction: column;
2366
+ align-items: center;
2367
+ justify-content: center;
2368
+ min-height: 100%;
2369
+ padding: 28px 22px 40px;
2370
+ text-align: center;
2371
+ }
2372
+
2373
+ .empty-inner {
2374
+ width: 100%;
2375
+ max-width: 336px;
2376
+ }
2377
+
2378
+ .empty-mark {
2379
+ margin: 0 auto 22px;
2380
+ width: 48px;
2381
+ height: 48px;
2382
+ border-radius: 15px;
2383
+ }
2384
+
2385
+ .empty-mark .logo-glyph {
2386
+ width: 25px;
2387
+ height: 25px;
2388
+ }
2389
+
2390
+ .empty-title {
2391
+ margin: 0;
2392
+ font-family: var(--font-serif);
2393
+ font-size: 23px;
2394
+ font-weight: 600;
2395
+ letter-spacing: -0.012em;
2396
+ line-height: 1.2;
2397
+ }
2398
+
2399
+ .empty-sub {
2400
+ margin: 10px 0 0;
2401
+ font-size: 13.5px;
2402
+ line-height: 1.6;
2403
+ color: var(--text-3);
2404
+ }
2405
+
2406
+ .empty-actions {
2407
+ display: flex;
2408
+ flex-direction: column;
2409
+ gap: 9px;
2410
+ margin-top: 24px;
2411
+ }
2412
+
2413
+ .empty-actions .btn {
2414
+ width: 100%;
2415
+ }
2416
+
2417
+ .chips {
2418
+ display: flex;
2419
+ flex-direction: column;
2420
+ gap: 8px;
2421
+ margin-top: 26px;
2422
+ }
2423
+
2424
+ .chip {
2425
+ min-height: 46px;
2426
+ padding: 11px 15px;
2427
+ border: 1px solid var(--border);
2428
+ border-radius: var(--radius-m);
2429
+ background: var(--surface);
2430
+ color: var(--text-2);
2431
+ font-size: 13px;
2432
+ line-height: 1.45;
2433
+ text-align: left;
2434
+ transition: background var(--dur-1), border-color var(--dur-1);
2435
+ }
2436
+
2437
+ .chip:active {
2438
+ background: var(--surface-2);
2439
+ border-color: var(--border-strong);
2440
+ }
2441
+
2442
+ /* ---------- Jump pill ---------------------------------------------------- */
2443
+ .jump {
2444
+ position: absolute;
2445
+ left: 50%;
2446
+ bottom: 12px;
2447
+ z-index: 6;
2448
+ display: inline-flex;
2449
+ align-items: center;
2450
+ gap: 5px;
2451
+ min-height: 44px;
2452
+ padding: 0 16px 0 13px;
2453
+ transform: translateX(-50%);
2454
+ border: 1px solid var(--border);
2455
+ border-radius: var(--radius-pill);
2456
+ background: var(--surface);
2457
+ color: var(--text-2);
2458
+ font-size: 12px;
2459
+ font-weight: 500;
2460
+ box-shadow: var(--shadow-lift);
2461
+ animation: msg-in var(--dur-2) var(--ease-out) both;
2462
+ }
2463
+
2464
+ .jump .icon {
2465
+ width: 15px;
2466
+ height: 15px;
2467
+ }
2468
+
2469
+ .jump:active {
2470
+ background: var(--surface-2);
2471
+ }
2472
+
2473
+ /* ---------- Activity / trajectory ---------------------------------------- */
2474
+ .activity-bar {
2475
+ display: flex;
2476
+ align-items: center;
2477
+ justify-content: space-between;
2478
+ gap: 12px;
2479
+ padding: 2px calc(18px + var(--safe-r)) 10px calc(18px + var(--safe-l));
2480
+ }
2481
+
2482
+ .segmented {
2483
+ display: inline-flex;
2484
+ gap: 2px;
2485
+ padding: 3px;
2486
+ border: 1px solid var(--border);
2487
+ border-radius: var(--radius-pill);
2488
+ background: var(--surface-2);
2489
+ }
2490
+
2491
+ .seg-btn {
2492
+ position: relative;
2493
+ height: 32px;
2494
+ padding: 0 14px;
2495
+ border-radius: var(--radius-pill);
2496
+ font-family: var(--font-ui);
2497
+ font-size: 12px;
2498
+ font-weight: 500;
2499
+ color: var(--text-3);
2500
+ transition: color var(--dur-1), background var(--dur-2) var(--ease-out);
2501
+ }
2502
+
2503
+ .seg-btn::after {
2504
+ content: "";
2505
+ position: absolute;
2506
+ inset: -6px 0;
2507
+ }
2508
+
2509
+ .seg-btn.is-active {
2510
+ color: var(--text);
2511
+ background: var(--surface);
2512
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
2513
+ }
2514
+
2515
+ .activity-live {
2516
+ display: inline-flex;
2517
+ align-items: center;
2518
+ gap: 6px;
2519
+ font-family: var(--font-mono);
2520
+ font-size: 9.5px;
2521
+ font-weight: 500;
2522
+ letter-spacing: 0.12em;
2523
+ text-transform: uppercase;
2524
+ color: var(--text-4);
2525
+ }
2526
+
2527
+ .live-dot {
2528
+ width: 5px;
2529
+ height: 5px;
2530
+ border-radius: 50%;
2531
+ background: var(--ok);
2532
+ box-shadow: 0 0 0 3px var(--ok-soft);
2533
+ animation: status-pulse 2.4s var(--ease-out) infinite;
2534
+ }
2535
+
2536
+ .activity-live.is-offline .live-dot {
2537
+ background: var(--text-4);
2538
+ box-shadow: none;
2539
+ animation: none;
2540
+ }
2541
+
2542
+ /* Changed-files review (Batch C3) */
2543
+ .changes-panel {
2544
+ width: 100%;
2545
+ max-width: 700px;
2546
+ margin: 0 auto;
2547
+ padding: 0 calc(18px + var(--safe-r)) 4px calc(18px + var(--safe-l));
2548
+ }
2549
+
2550
+ .changes-head {
2551
+ display: flex;
2552
+ align-items: center;
2553
+ gap: 8px;
2554
+ padding: 9px 0 7px;
2555
+ }
2556
+
2557
+ .changes-title {
2558
+ font-family: var(--font-mono);
2559
+ font-size: 9.5px;
2560
+ letter-spacing: 0.1em;
2561
+ text-transform: uppercase;
2562
+ color: var(--text-4);
2563
+ }
2564
+
2565
+ .changes-count {
2566
+ margin-left: auto;
2567
+ font-size: 10.5px;
2568
+ color: var(--text-4);
2569
+ }
2570
+
2571
+ .changes-list {
2572
+ display: flex;
2573
+ flex-direction: column;
2574
+ gap: 8px;
2575
+ }
2576
+
2577
+ .change-card {
2578
+ overflow: hidden;
2579
+ border: 1px solid var(--border);
2580
+ border-radius: var(--radius-m);
2581
+ background: var(--surface);
2582
+ }
2583
+
2584
+ .change-card.is-unavailable {
2585
+ opacity: 0.8;
2586
+ }
2587
+
2588
+ .change-card-head {
2589
+ display: flex;
2590
+ align-items: center;
2591
+ gap: 8px;
2592
+ padding: 9px 11px;
2593
+ border-bottom: 1px solid var(--border);
2594
+ }
2595
+
2596
+ .change-turn {
2597
+ font-size: 11px;
2598
+ font-weight: 500;
2599
+ color: var(--text-2);
2600
+ }
2601
+
2602
+ .change-counts {
2603
+ font-size: 11px;
2604
+ color: var(--text-3);
2605
+ }
2606
+
2607
+ .change-added {
2608
+ margin-left: auto;
2609
+ font-family: var(--font-mono);
2610
+ font-size: 10.5px;
2611
+ color: var(--ok);
2612
+ }
2613
+
2614
+ .change-deleted {
2615
+ font-family: var(--font-mono);
2616
+ font-size: 10.5px;
2617
+ color: var(--danger);
2618
+ }
2619
+
2620
+ .change-note {
2621
+ margin: 0;
2622
+ padding: 8px 11px;
2623
+ font-size: 11px;
2624
+ line-height: 1.45;
2625
+ color: var(--text-4);
2626
+ }
2627
+
2628
+ .change-file {
2629
+ display: flex;
2630
+ align-items: center;
2631
+ gap: 9px;
2632
+ width: 100%;
2633
+ min-height: 44px;
2634
+ padding: 8px 11px;
2635
+ text-align: left;
2636
+ border-bottom: 1px solid var(--border);
2637
+ }
2638
+
2639
+ .change-file:last-child {
2640
+ border-bottom: 0;
2641
+ }
2642
+
2643
+ .change-file:active {
2644
+ background: var(--surface-2);
2645
+ }
2646
+
2647
+ .change-file-icon {
2648
+ width: 14px;
2649
+ height: 14px;
2650
+ color: var(--text-4);
2651
+ flex: none;
2652
+ }
2653
+
2654
+ .change-file-main {
2655
+ display: flex;
2656
+ flex-direction: column;
2657
+ gap: 1px;
2658
+ flex: 1;
2659
+ min-width: 0;
2660
+ }
2661
+
2662
+ .change-file-path {
2663
+ overflow: hidden;
2664
+ text-overflow: ellipsis;
2665
+ white-space: nowrap;
2666
+ font-family: var(--font-mono);
2667
+ font-size: 11.5px;
2668
+ color: var(--text-2);
2669
+ }
2670
+
2671
+ .change-file-meta {
2672
+ font-family: var(--font-mono);
2673
+ font-size: 10px;
2674
+ color: var(--text-4);
2675
+ }
2676
+
2677
+ .diff-note {
2678
+ margin: 8px 0;
2679
+ padding: 8px 11px;
2680
+ border-radius: var(--radius-s);
2681
+ background: var(--surface-2);
2682
+ font-size: 11.5px;
2683
+ line-height: 1.45;
2684
+ color: var(--text-3);
2685
+ }
2686
+
2687
+ .diff-notice {
2688
+ margin: 12px 0;
2689
+ padding: 16px 14px;
2690
+ border: 1px dashed var(--border-strong);
2691
+ border-radius: var(--radius-m);
2692
+ text-align: center;
2693
+ font-size: 12.5px;
2694
+ line-height: 1.5;
2695
+ color: var(--text-3);
2696
+ }
2697
+
2698
+ .diff-view {
2699
+ max-height: min(60vh, 520px);
2700
+ margin-top: 6px;
2701
+ overflow: auto;
2702
+ border: 1px solid var(--border);
2703
+ border-radius: var(--radius-s);
2704
+ background: var(--code-bg);
2705
+ font-family: var(--font-mono);
2706
+ font-size: 11px;
2707
+ line-height: 1.55;
2708
+ scrollbar-width: thin;
2709
+ }
2710
+
2711
+ .diff-line {
2712
+ display: flex;
2713
+ gap: 8px;
2714
+ padding: 0 10px;
2715
+ white-space: pre-wrap;
2716
+ overflow-wrap: anywhere;
2717
+ }
2718
+
2719
+ .diff-line.is-add {
2720
+ background: var(--ok-soft);
2721
+ color: var(--ok);
2722
+ }
2723
+
2724
+ .diff-line.is-del {
2725
+ background: var(--danger-soft);
2726
+ color: var(--danger);
2727
+ }
2728
+
2729
+ .diff-line.is-ctx {
2730
+ color: var(--text-3);
2731
+ }
2732
+
2733
+ .diff-prefix {
2734
+ flex: none;
2735
+ width: 10px;
2736
+ opacity: 0.8;
2737
+ }
2738
+
2739
+ .diff-text {
2740
+ flex: 1;
2741
+ min-width: 0;
2742
+ white-space: pre-wrap;
2743
+ overflow-wrap: anywhere;
2744
+ }
2745
+
2746
+ .activity-list {
2747
+ width: 100%;
2748
+ max-width: 700px;
2749
+ margin: 0 auto;
2750
+ padding: 2px calc(18px + var(--safe-r)) 30px calc(18px + var(--safe-l));
2751
+ }
2752
+
2753
+ .act {
2754
+ position: relative;
2755
+ display: grid;
2756
+ grid-template-columns: 18px minmax(0, 1fr);
2757
+ gap: 10px;
2758
+ padding: 9px 0;
2759
+ }
2760
+
2761
+ .act-rail {
2762
+ display: flex;
2763
+ justify-content: center;
2764
+ padding-top: 7px;
2765
+ }
2766
+
2767
+ .act-dot {
2768
+ width: 7px;
2769
+ height: 7px;
2770
+ border-radius: 50%;
2771
+ background: var(--text-4);
2772
+ flex: none;
2773
+ }
2774
+
2775
+ .act.is-tool .act-dot {
2776
+ background: var(--text-2);
2777
+ box-shadow: 0 0 0 3px var(--pill-soft);
2778
+ }
2779
+
2780
+ .act.is-approval .act-dot {
2781
+ background: var(--warn);
2782
+ box-shadow: 0 0 0 3px var(--warn-soft);
2783
+ }
2784
+
2785
+ .act.is-question .act-dot {
2786
+ background: var(--text-2);
2787
+ box-shadow: 0 0 0 3px var(--pill-soft);
2788
+ }
2789
+
2790
+ .act.is-error .act-dot,
2791
+ .act.is-tool.is-error .act-dot {
2792
+ background: var(--danger);
2793
+ box-shadow: 0 0 0 3px var(--danger-soft);
2794
+ }
2795
+
2796
+ .act.is-step .act-dot,
2797
+ .act.is-status .act-dot {
2798
+ width: 5px;
2799
+ height: 5px;
2800
+ background: var(--border-strong);
2801
+ box-shadow: none;
2802
+ }
2803
+
2804
+ .act-content {
2805
+ min-width: 0;
2806
+ }
2807
+
2808
+ .act-head {
2809
+ display: block;
2810
+ width: 100%;
2811
+ padding: 0;
2812
+ text-align: left;
2813
+ }
2814
+
2815
+ .act-expandable .act-head {
2816
+ min-height: 40px;
2817
+ padding: 4px 6px 4px 0;
2818
+ margin: -4px 0;
2819
+ }
2820
+
2821
+ .act-headline {
2822
+ display: flex;
2823
+ align-items: baseline;
2824
+ gap: 9px;
2825
+ }
2826
+
2827
+ .act-title {
2828
+ flex: 1;
2829
+ min-width: 0;
2830
+ font-size: 13px;
2831
+ font-weight: 500;
2832
+ line-height: 1.4;
2833
+ letter-spacing: -0.005em;
2834
+ color: var(--text);
2835
+ overflow-wrap: anywhere;
2836
+ }
2837
+
2838
+ .act.is-step .act-title,
2839
+ .act.is-status .act-title {
2840
+ font-weight: 400;
2841
+ color: var(--text-3);
2842
+ }
2843
+
2844
+ .act.is-error .act-title {
2845
+ color: var(--danger-ink);
2846
+ }
2847
+
2848
+ .act-status {
2849
+ flex: none;
2850
+ font-family: var(--font-mono);
2851
+ font-size: 9.5px;
2852
+ letter-spacing: 0.04em;
2853
+ color: var(--text-4);
2854
+ }
2855
+
2856
+ .act-status.is-ok {
2857
+ color: var(--ok);
2858
+ }
2859
+
2860
+ .act-status.is-error {
2861
+ color: var(--danger);
2862
+ }
2863
+
2864
+ .act-time {
2865
+ flex: none;
2866
+ font-family: var(--font-mono);
2867
+ font-size: 9.5px;
2868
+ letter-spacing: 0.02em;
2869
+ color: var(--text-4);
2870
+ }
2871
+
2872
+ .act-sub {
2873
+ display: block;
2874
+ margin-top: 2px;
2875
+ font-size: 11.5px;
2876
+ line-height: 1.5;
2877
+ color: var(--text-3);
2878
+ overflow-wrap: anywhere;
2879
+ }
2880
+
2881
+ .act-chevron {
2882
+ flex: none;
2883
+ width: 13px;
2884
+ height: 13px;
2885
+ fill: none;
2886
+ stroke: var(--text-4);
2887
+ stroke-width: 2;
2888
+ transition: transform var(--dur-2) var(--ease);
2889
+ }
2890
+
2891
+ .act.is-open .act-chevron {
2892
+ transform: rotate(180deg);
2893
+ }
2894
+
2895
+ .act-body {
2896
+ display: grid;
2897
+ grid-template-rows: 0fr;
2898
+ opacity: 0;
2899
+ transition: grid-template-rows var(--dur-3) var(--ease),
2900
+ opacity var(--dur-2) var(--ease-out);
2901
+ }
2902
+
2903
+ .act-body-inner {
2904
+ overflow: hidden;
2905
+ min-height: 0;
2906
+ }
2907
+
2908
+ .act-body-pad {
2909
+ padding-top: 8px;
2910
+ }
2911
+
2912
+ .act.is-open .act-body {
2913
+ grid-template-rows: 1fr;
2914
+ opacity: 1;
2915
+ }
2916
+
2917
+ .act-label {
2918
+ margin: 8px 0 4px;
2919
+ font-family: var(--font-mono);
2920
+ font-size: 9px;
2921
+ font-weight: 500;
2922
+ letter-spacing: 0.12em;
2923
+ text-transform: uppercase;
2924
+ color: var(--text-4);
2925
+ }
2926
+
2927
+ .act-pre {
2928
+ margin: 0;
2929
+ max-height: 240px;
2930
+ padding: 10px 11px;
2931
+ border: 1px solid var(--code-border);
2932
+ border-radius: var(--radius-s);
2933
+ background: var(--code-bg);
2934
+ overflow: auto;
2935
+ -webkit-overflow-scrolling: touch;
2936
+ font-family: var(--font-mono);
2937
+ font-size: 11px;
2938
+ line-height: 1.58;
2939
+ color: var(--text-2);
2940
+ white-space: pre-wrap;
2941
+ overflow-wrap: anywhere;
2942
+ scrollbar-width: thin;
2943
+ }
2944
+
2945
+ .act-empty {
2946
+ padding: 60px 24px;
2947
+ text-align: center;
2948
+ font-size: 13px;
2949
+ line-height: 1.6;
2950
+ color: var(--text-4);
2951
+ }
2952
+
2953
+ /* ---------- Composer ----------------------------------------------------- */
2954
+ .composer {
2955
+ grid-row: 6;
2956
+ position: relative;
2957
+ z-index: 4;
2958
+ padding: 8px calc(14px + var(--safe-r)) calc(10px + var(--safe-b))
2959
+ calc(14px + var(--safe-l));
2960
+ background: linear-gradient(
2961
+ 180deg,
2962
+ rgba(0, 0, 0, 0) 0%,
2963
+ var(--bg) 34%
2964
+ );
2965
+ }
2966
+
2967
+ .composer-shell {
2968
+ width: 100%;
2969
+ max-width: 700px;
2970
+ margin: 0 auto;
2971
+ }
2972
+
2973
+ .composer-box {
2974
+ display: flex;
2975
+ align-items: flex-end;
2976
+ gap: 4px;
2977
+ padding: 5px 6px 5px 5px;
2978
+ border: 1px solid var(--border-strong);
2979
+ border-radius: 28px;
2980
+ background: var(--surface);
2981
+ box-shadow: var(--shadow-soft);
2982
+ overflow: visible;
2983
+ transition: border-color var(--dur-2) var(--ease-out),
2984
+ box-shadow var(--dur-2) var(--ease-out);
2985
+ }
2986
+
2987
+ .composer-box:focus-within {
2988
+ border-color: var(--text-4);
2989
+ box-shadow: var(--shadow-soft), 0 0 0 3px var(--pill-soft);
2990
+ }
2991
+
2992
+ .composer-input {
2993
+ flex: 1;
2994
+ min-height: 30px;
2995
+ max-height: 148px;
2996
+ padding: 8px 0 8px 3px;
2997
+ border: 0;
2998
+ background: transparent;
2999
+ color: var(--text);
3000
+ font-family: var(--font-ui);
3001
+ font-size: 16px; /* ≥16px prevents iOS focus zoom */
3002
+ line-height: 1.45;
3003
+ letter-spacing: -0.005em;
3004
+ resize: none;
3005
+ outline: none;
3006
+ overflow-y: auto;
3007
+ caret-color: var(--text);
3008
+ scrollbar-width: none;
3009
+ }
3010
+
3011
+ .composer-input::-webkit-scrollbar {
3012
+ display: none;
3013
+ }
3014
+
3015
+ .composer-input::placeholder {
3016
+ color: var(--text-4);
3017
+ }
3018
+
3019
+ .composer-input:focus-visible {
3020
+ outline: none;
3021
+ }
3022
+
3023
+ .composer-actions {
3024
+ display: flex;
3025
+ align-items: center;
3026
+ gap: 4px;
3027
+ flex: none;
3028
+ }
3029
+
3030
+ .send-btn {
3031
+ position: relative;
3032
+ display: grid;
3033
+ place-items: center;
3034
+ width: 44px;
3035
+ height: 44px;
3036
+ border-radius: 50%;
3037
+ background: var(--pill);
3038
+ color: var(--pill-ink);
3039
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
3040
+ transition: opacity var(--dur-2), transform var(--dur-1) var(--ease-out),
3041
+ background var(--dur-2), color var(--dur-2);
3042
+ }
3043
+
3044
+ .send-btn .icon {
3045
+ width: 20px;
3046
+ height: 20px;
3047
+ stroke-width: 2;
3048
+ }
3049
+
3050
+ .send-btn[disabled] {
3051
+ background: var(--surface-2);
3052
+ color: var(--text-4);
3053
+ box-shadow: none;
3054
+ pointer-events: none;
3055
+ }
3056
+
3057
+ .send-btn:active {
3058
+ transform: scale(0.94);
3059
+ }
3060
+
3061
+ .stop-btn {
3062
+ position: relative;
3063
+ display: grid;
3064
+ place-items: center;
3065
+ width: 44px;
3066
+ height: 44px;
3067
+ border: 1px solid var(--border-strong);
3068
+ border-radius: 50%;
3069
+ background: var(--surface);
3070
+ color: var(--text);
3071
+ transition: background var(--dur-1), opacity var(--dur-1);
3072
+ }
3073
+
3074
+ .stop-btn .icon {
3075
+ width: 14px;
3076
+ height: 14px;
3077
+ }
3078
+
3079
+ .stop-btn:active {
3080
+ background: var(--surface-2);
3081
+ }
3082
+
3083
+ .stop-btn.is-stopping {
3084
+ opacity: 0.5;
3085
+ pointer-events: none;
3086
+ }
3087
+
3088
+ /* Three-track grid: [note][context meter][right cluster]. The two 1fr side
3089
+ tracks are resolved to the same width after the auto centre track, so the
3090
+ meter is exactly on the viewport centre line while the note truncates on the
3091
+ left and Queue/Steer + the model chip stay anchored right. Every track can
3092
+ shrink (`minmax(0,1fr)`, `min-width:0` children), so neither a long note nor
3093
+ a wide chip can push the centre off. */
3094
+ .composer-meta {
3095
+ display: grid;
3096
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
3097
+ align-items: center;
3098
+ gap: 4px 10px;
3099
+ min-height: 16px;
3100
+ padding: 6px 10px 0;
3101
+ }
3102
+
3103
+ .composer-note {
3104
+ grid-column: 1;
3105
+ justify-self: start;
3106
+ min-width: 0;
3107
+ max-width: 100%;
3108
+ font-size: 10.5px;
3109
+ line-height: 1.4;
3110
+ letter-spacing: 0.01em;
3111
+ color: var(--text-3);
3112
+ white-space: nowrap;
3113
+ overflow: hidden;
3114
+ text-overflow: ellipsis;
3115
+ }
3116
+
3117
+ .composer-note.is-running {
3118
+ color: var(--text-2);
3119
+ }
3120
+
3121
+ .composer-right {
3122
+ grid-column: 3;
3123
+ display: flex;
3124
+ align-items: center;
3125
+ justify-content: flex-end;
3126
+ gap: 8px;
3127
+ min-width: 0;
3128
+ max-width: 100%;
3129
+ }
3130
+
3131
+ .composer-model {
3132
+ flex: 0 1 auto;
3133
+ min-width: 0;
3134
+ max-width: 100%;
3135
+ font-size: 10px;
3136
+ color: var(--text-4);
3137
+ white-space: nowrap;
3138
+ overflow: hidden;
3139
+ text-overflow: ellipsis;
3140
+ }
3141
+
3142
+ /* Context-window meter — compact, on the composer meta row under the input,
3143
+ centred on the viewport. The track is decorative; the group's aria-label
3144
+ carries the full sentence. Hidden when unknown. */
3145
+ .context-meter {
3146
+ grid-column: 2;
3147
+ justify-self: center;
3148
+ display: inline-flex;
3149
+ align-items: center;
3150
+ gap: 6px;
3151
+ min-width: 0;
3152
+ flex: none;
3153
+ color: var(--text-4);
3154
+ }
3155
+
3156
+ .context-label {
3157
+ flex: none;
3158
+ font-family: var(--font-mono);
3159
+ font-size: 10px;
3160
+ font-variant-numeric: tabular-nums;
3161
+ letter-spacing: -0.01em;
3162
+ line-height: 1.4;
3163
+ white-space: nowrap;
3164
+ }
3165
+
3166
+ .context-track {
3167
+ flex: none;
3168
+ width: 56px;
3169
+ height: 3px;
3170
+ border-radius: 2px;
3171
+ background: var(--surface-3);
3172
+ overflow: hidden;
3173
+ }
3174
+
3175
+ .context-fill {
3176
+ display: block;
3177
+ width: 0;
3178
+ height: 100%;
3179
+ border-radius: 2px;
3180
+ background: var(--text-3);
3181
+ transition: width var(--dur-3) var(--ease);
3182
+ }
3183
+
3184
+ .context-est {
3185
+ flex: none;
3186
+ padding: 0 4px;
3187
+ border: 1px solid var(--border);
3188
+ border-radius: 999px;
3189
+ font-family: var(--font-mono);
3190
+ font-size: 8.5px;
3191
+ line-height: 1.5;
3192
+ letter-spacing: 0.04em;
3193
+ color: var(--text-4);
3194
+ }
3195
+
3196
+ .context-meter.is-high {
3197
+ color: var(--warn);
3198
+ }
3199
+
3200
+ .context-meter.is-high .context-fill {
3201
+ background: var(--warn);
3202
+ }
3203
+
3204
+ .context-meter.is-high .context-est {
3205
+ border-color: var(--warn-line);
3206
+ color: var(--warn);
3207
+ }
3208
+
3209
+ /* ---------- Prompt queue / archived banner / prompt mode ---------------- */
3210
+ .queue-strip {
3211
+ margin-bottom: 7px;
3212
+ overflow: hidden;
3213
+ border: 1px solid var(--border);
3214
+ border-radius: var(--radius-m);
3215
+ background: var(--surface);
3216
+ box-shadow: var(--shadow-soft);
3217
+ }
3218
+
3219
+ .queue-head {
3220
+ display: flex;
3221
+ align-items: center;
3222
+ gap: 8px;
3223
+ width: 100%;
3224
+ min-height: 44px;
3225
+ padding: 8px 12px;
3226
+ text-align: left;
3227
+ color: var(--text-2);
3228
+ }
3229
+
3230
+ .queue-dot {
3231
+ width: 6px;
3232
+ height: 6px;
3233
+ border-radius: 50%;
3234
+ background: var(--ok);
3235
+ box-shadow: 0 0 0 3px var(--ok-soft);
3236
+ flex: none;
3237
+ }
3238
+
3239
+ .queue-count {
3240
+ font-size: 12px;
3241
+ font-weight: 500;
3242
+ color: var(--text);
3243
+ white-space: nowrap;
3244
+ }
3245
+
3246
+ .queue-head-meta {
3247
+ margin-left: auto;
3248
+ display: flex;
3249
+ align-items: center;
3250
+ gap: 7px;
3251
+ flex: none;
3252
+ }
3253
+
3254
+ .queue-hint {
3255
+ font-family: var(--font-mono);
3256
+ font-size: 9px;
3257
+ letter-spacing: 0.08em;
3258
+ text-transform: uppercase;
3259
+ color: var(--text-4);
3260
+ white-space: nowrap;
3261
+ }
3262
+
3263
+ .queue-chevron {
3264
+ width: 14px;
3265
+ height: 14px;
3266
+ transition: transform var(--dur-2) var(--ease);
3267
+ }
3268
+
3269
+ .queue-head[aria-expanded="true"] .queue-chevron {
3270
+ transform: rotate(180deg);
3271
+ }
3272
+
3273
+ .queue-list {
3274
+ max-height: 176px;
3275
+ overflow-y: auto;
3276
+ overscroll-behavior: contain;
3277
+ border-top: 1px solid var(--border);
3278
+ scrollbar-width: none;
3279
+ }
3280
+
3281
+ .queue-list::-webkit-scrollbar {
3282
+ display: none;
3283
+ }
3284
+
3285
+ .queue-item {
3286
+ display: flex;
3287
+ flex-direction: column;
3288
+ gap: 5px;
3289
+ width: 100%;
3290
+ min-height: 44px;
3291
+ padding: 10px 12px;
3292
+ text-align: left;
3293
+ border-bottom: 1px solid var(--border);
3294
+ }
3295
+
3296
+ .queue-item:last-child {
3297
+ border-bottom: 0;
3298
+ }
3299
+
3300
+ .queue-item:active {
3301
+ background: var(--surface-2);
3302
+ }
3303
+
3304
+ .queue-item-text {
3305
+ display: -webkit-box;
3306
+ -webkit-line-clamp: 2;
3307
+ -webkit-box-orient: vertical;
3308
+ overflow: hidden;
3309
+ overflow-wrap: anywhere;
3310
+ font-size: 12.5px;
3311
+ line-height: 1.45;
3312
+ color: var(--text-2);
3313
+ }
3314
+
3315
+ .queue-item-meta {
3316
+ display: flex;
3317
+ align-items: center;
3318
+ gap: 8px;
3319
+ }
3320
+
3321
+ .queue-tag {
3322
+ padding: 2px 6px;
3323
+ border-radius: 5px;
3324
+ background: var(--surface-2);
3325
+ font-family: var(--font-mono);
3326
+ font-size: 9px;
3327
+ letter-spacing: 0.07em;
3328
+ text-transform: uppercase;
3329
+ color: var(--text-3);
3330
+ }
3331
+
3332
+ .queue-tag.is-steering {
3333
+ background: var(--pill-soft);
3334
+ color: var(--text-2);
3335
+ }
3336
+
3337
+ .queue-tag.is-context {
3338
+ background: var(--ok-soft);
3339
+ color: var(--ok);
3340
+ }
3341
+
3342
+ .queue-open {
3343
+ margin-left: auto;
3344
+ font-size: 10.5px;
3345
+ color: var(--text-4);
3346
+ }
3347
+
3348
+ .queue-preview {
3349
+ margin: 8px 0 14px;
3350
+ padding: 12px 13px;
3351
+ border: 1px solid var(--border);
3352
+ border-radius: var(--radius-m);
3353
+ background: var(--surface-2);
3354
+ font-size: 14px;
3355
+ line-height: 1.5;
3356
+ color: var(--text-2);
3357
+ white-space: pre-wrap;
3358
+ overflow-wrap: anywhere;
3359
+ }
3360
+
3361
+ .archived-banner {
3362
+ display: flex;
3363
+ align-items: center;
3364
+ gap: 10px;
3365
+ margin-bottom: 7px;
3366
+ padding: 5px 7px 5px 13px;
3367
+ border: 1px solid var(--warn-line);
3368
+ border-radius: var(--radius-m);
3369
+ background: var(--warn-soft);
3370
+ color: var(--warn);
3371
+ }
3372
+
3373
+ .archived-banner-text {
3374
+ flex: 1;
3375
+ min-width: 0;
3376
+ font-size: 12px;
3377
+ line-height: 1.4;
3378
+ }
3379
+
3380
+ .archived-banner-action {
3381
+ position: relative;
3382
+ flex: none;
3383
+ min-height: 44px;
3384
+ margin: -5px 0;
3385
+ padding: 0 12px;
3386
+ border-radius: 9px;
3387
+ font-size: 12px;
3388
+ font-weight: 500;
3389
+ color: inherit;
3390
+ }
3391
+
3392
+ .archived-banner-action::after {
3393
+ content: "";
3394
+ position: absolute;
3395
+ inset: -2px -4px;
3396
+ }
3397
+
3398
+ .archived-banner-action:active {
3399
+ background: var(--surface-2);
3400
+ }
3401
+
3402
+ .session-title.is-archived {
3403
+ color: var(--text-2);
3404
+ }
3405
+
3406
+ .prompt-mode {
3407
+ display: inline-flex;
3408
+ gap: 2px;
3409
+ padding: 2px;
3410
+ border: 1px solid var(--border);
3411
+ border-radius: 999px;
3412
+ background: var(--surface-2);
3413
+ flex: none;
3414
+ }
3415
+
3416
+ .prompt-mode-btn {
3417
+ position: relative;
3418
+ min-height: 26px;
3419
+ padding: 0 9px;
3420
+ border-radius: 999px;
3421
+ font-size: 10.5px;
3422
+ font-weight: 500;
3423
+ color: var(--text-4);
3424
+ transition: background var(--dur-1), color var(--dur-1);
3425
+ }
3426
+
3427
+ .prompt-mode-btn::after {
3428
+ content: "";
3429
+ position: absolute;
3430
+ inset: -8px -4px;
3431
+ }
3432
+
3433
+ .prompt-mode-btn.is-active {
3434
+ background: var(--pill);
3435
+ color: var(--pill-ink);
3436
+ }
3437
+
3438
+ .prompt-mode-btn:not(.is-active):active {
3439
+ background: var(--surface-3);
3440
+ color: var(--text-3);
3441
+ }
3442
+
3443
+ .sheet-text-input,
3444
+ .sheet-textarea {
3445
+ width: 100%;
3446
+ margin: 10px 0 12px;
3447
+ padding: 11px 12px;
3448
+ border: 1px solid var(--border-strong);
3449
+ border-radius: var(--radius-s);
3450
+ background: var(--surface-2);
3451
+ color: var(--text);
3452
+ font-family: var(--font-ui);
3453
+ font-size: 16px;
3454
+ line-height: 1.45;
3455
+ outline: none;
3456
+ }
3457
+
3458
+ .sheet-textarea {
3459
+ min-height: 104px;
3460
+ resize: vertical;
3461
+ font-size: 15px;
3462
+ }
3463
+
3464
+ .sheet-text-input:focus,
3465
+ .sheet-textarea:focus {
3466
+ border-color: var(--text-4);
3467
+ }
3468
+
3469
+ .row-pin {
3470
+ display: grid;
3471
+ place-items: center;
3472
+ color: var(--text-3);
3473
+ }
3474
+
3475
+ .row-pin .icon {
3476
+ width: 13px;
3477
+ height: 13px;
3478
+ stroke-width: 2;
3479
+ }
3480
+
3481
+ .row.is-archived {
3482
+ opacity: 0.78;
3483
+ }
3484
+
3485
+ .row.is-archived .row-title {
3486
+ color: var(--text-2);
3487
+ }
3488
+
3489
+ .row-snippet {
3490
+ display: -webkit-box;
3491
+ -webkit-line-clamp: 2;
3492
+ -webkit-box-orient: vertical;
3493
+ overflow: hidden;
3494
+ white-space: normal;
3495
+ }
3496
+
3497
+ .sheet-found:empty {
3498
+ display: none;
3499
+ }
3500
+
3501
+ .sheet-limit-hint {
3502
+ margin: 0;
3503
+ padding: 8px 13px 2px;
3504
+ color: var(--text-3);
3505
+ }
3506
+
3507
+ /* ---------- Project-grouped sessions (v20) ------------------------------- */
3508
+ .project-header {
3509
+ display: flex;
3510
+ align-items: center;
3511
+ gap: 9px;
3512
+ width: 100%;
3513
+ min-height: 48px;
3514
+ margin-top: 6px;
3515
+ padding: 8px 10px;
3516
+ border-radius: var(--radius-m);
3517
+ text-align: left;
3518
+ color: var(--text);
3519
+ }
3520
+
3521
+ .project-header:active {
3522
+ background: var(--surface-2);
3523
+ }
3524
+
3525
+ .project-chevron {
3526
+ flex: none;
3527
+ width: 14px;
3528
+ height: 14px;
3529
+ color: var(--text-4);
3530
+ transition: transform var(--dur-2) var(--ease);
3531
+ }
3532
+
3533
+ .project-header.is-collapsed .project-chevron {
3534
+ transform: rotate(-90deg);
3535
+ }
3536
+
3537
+ .project-folder {
3538
+ display: grid;
3539
+ place-items: center;
3540
+ flex: none;
3541
+ width: 28px;
3542
+ height: 28px;
3543
+ border-radius: 8px;
3544
+ background: var(--surface-2);
3545
+ color: var(--text-3);
3546
+ }
3547
+
3548
+ .project-folder .icon {
3549
+ width: 15px;
3550
+ height: 15px;
3551
+ }
3552
+
3553
+ .project-info {
3554
+ display: flex;
3555
+ flex-direction: column;
3556
+ gap: 1px;
3557
+ flex: 1;
3558
+ min-width: 0;
3559
+ }
3560
+
3561
+ .project-title {
3562
+ overflow: hidden;
3563
+ text-overflow: ellipsis;
3564
+ white-space: nowrap;
3565
+ font-size: 13.5px;
3566
+ font-weight: 500;
3567
+ color: var(--text);
3568
+ }
3569
+
3570
+ .project-path {
3571
+ overflow: hidden;
3572
+ text-overflow: ellipsis;
3573
+ white-space: nowrap;
3574
+ font-family: var(--font-mono);
3575
+ font-size: 10px;
3576
+ color: var(--text-4);
3577
+ }
3578
+
3579
+ .project-count {
3580
+ flex: none;
3581
+ min-width: 20px;
3582
+ padding: 1px 6px;
3583
+ border-radius: 999px;
3584
+ background: var(--surface-2);
3585
+ font-family: var(--font-mono);
3586
+ font-size: 10px;
3587
+ color: var(--text-3);
3588
+ text-align: center;
3589
+ }
3590
+
3591
+ .project-body {
3592
+ padding-left: 8px;
3593
+ }
3594
+
3595
+ .project-body[hidden] {
3596
+ display: none;
3597
+ }
3598
+
3599
+ .sheet-filter {
3600
+ display: block;
3601
+ width: auto;
3602
+ min-height: 44px;
3603
+ margin: 10px auto 4px;
3604
+ padding: 8px 14px;
3605
+ border-radius: var(--radius-pill);
3606
+ background: transparent;
3607
+ color: var(--text-3);
3608
+ font-size: 12px;
3609
+ text-align: center;
3610
+ }
3611
+
3612
+ .sheet-filter:active {
3613
+ background: var(--surface-2);
3614
+ color: var(--text);
3615
+ }
3616
+
3617
+ @media (max-width: 360px) {
3618
+ .prompt-mode-btn {
3619
+ padding: 0 7px;
3620
+ font-size: 10px;
3621
+ }
3622
+
3623
+ .queue-hint {
3624
+ display: none;
3625
+ }
3626
+ }
3627
+
3628
+ /* ---------- Voice input --------------------------------------------------- */
3629
+ .mic-btn {
3630
+ position: relative;
3631
+ display: grid;
3632
+ place-items: center;
3633
+ width: 44px;
3634
+ height: 44px;
3635
+ min-width: 44px;
3636
+ min-height: 44px;
3637
+ padding: 0;
3638
+ border: 0;
3639
+ border-radius: 50%;
3640
+ background: transparent;
3641
+ color: var(--text-3);
3642
+ flex: 0 0 44px;
3643
+ align-self: flex-end;
3644
+ overflow: visible;
3645
+ transition: background var(--dur-1) var(--ease-out),
3646
+ color var(--dur-1) var(--ease-out), opacity var(--dur-1);
3647
+ }
3648
+
3649
+ .mic-btn .icon {
3650
+ width: 19px;
3651
+ height: 19px;
3652
+ }
3653
+
3654
+ .mic-btn:active {
3655
+ background: var(--surface-2);
3656
+ color: var(--text);
3657
+ }
3658
+
3659
+ .mic-btn.is-listening {
3660
+ background: var(--pill);
3661
+ color: var(--pill-ink);
3662
+ animation: mic-pulse 1.7s var(--ease-out) infinite;
3663
+ }
3664
+
3665
+ .mic-btn[disabled] {
3666
+ opacity: 0.35;
3667
+ pointer-events: none;
3668
+ }
3669
+
3670
+ @keyframes mic-pulse {
3671
+ 0%,
3672
+ 100% {
3673
+ box-shadow: 0 0 0 0 var(--pill-soft);
3674
+ }
3675
+ 55% {
3676
+ box-shadow: 0 0 0 7px rgba(0, 0, 0, 0);
3677
+ }
3678
+ }
3679
+
3680
+ /* ---------- Toggle switch (menu rows) ------------------------------------ */
3681
+ .switch {
3682
+ position: relative;
3683
+ display: inline-flex;
3684
+ align-items: center;
3685
+ width: 46px;
3686
+ height: 28px;
3687
+ padding: 3px;
3688
+ border: 1px solid var(--border);
3689
+ border-radius: 999px;
3690
+ background: var(--surface-2);
3691
+ flex: none;
3692
+ transition: background var(--dur-2) var(--ease-out),
3693
+ border-color var(--dur-2) var(--ease-out);
3694
+ }
3695
+
3696
+ .switch-thumb {
3697
+ width: 20px;
3698
+ height: 20px;
3699
+ border-radius: 50%;
3700
+ background: var(--surface);
3701
+ box-shadow: var(--shadow-soft);
3702
+ transform: translateX(0);
3703
+ transition: transform var(--dur-2) var(--ease);
3704
+ }
3705
+
3706
+ .switch.is-on {
3707
+ background: var(--pill);
3708
+ border-color: var(--pill);
3709
+ }
3710
+
3711
+ .switch.is-on .switch-thumb {
3712
+ background: var(--pill-ink);
3713
+ transform: translateX(18px);
3714
+ }
3715
+
3716
+ /* ---------- Attachments -------------------------------------------------- */
3717
+ .attach-btn {
3718
+ position: relative;
3719
+ display: grid;
3720
+ place-items: center;
3721
+ width: 44px;
3722
+ height: 44px;
3723
+ min-width: 44px;
3724
+ min-height: 44px;
3725
+ margin: 0;
3726
+ border-radius: 50%;
3727
+ color: var(--text-3);
3728
+ flex: 0 0 44px;
3729
+ align-self: flex-end;
3730
+ overflow: visible;
3731
+ transition: background var(--dur-1) var(--ease-out),
3732
+ color var(--dur-1) var(--ease-out), opacity var(--dur-1);
3733
+ }
3734
+
3735
+ .attach-btn .icon {
3736
+ width: 20px;
3737
+ height: 20px;
3738
+ overflow: visible;
3739
+ }
3740
+
3741
+ .attach-btn:active {
3742
+ background: var(--surface-2);
3743
+ color: var(--text);
3744
+ }
3745
+
3746
+ .attach-btn[disabled] {
3747
+ opacity: 0.35;
3748
+ pointer-events: none;
3749
+ }
3750
+
3751
+ /* Kept in the DOM (programmatic .click() is most reliable that way on iOS),
3752
+ but out of sight and out of the layout. */
3753
+ .attach-input {
3754
+ position: fixed;
3755
+ left: -9999px;
3756
+ top: 0;
3757
+ width: 1px;
3758
+ height: 1px;
3759
+ opacity: 0;
3760
+ pointer-events: none;
3761
+ }
3762
+
3763
+ .attachments {
3764
+ display: flex;
3765
+ flex-direction: column;
3766
+ gap: 6px;
3767
+ max-height: 152px;
3768
+ padding: 0 2px 8px;
3769
+ overflow-y: auto;
3770
+ overscroll-behavior: contain;
3771
+ scrollbar-width: none;
3772
+ }
3773
+
3774
+ .attachments::-webkit-scrollbar {
3775
+ display: none;
3776
+ }
3777
+
3778
+ .attachment-chip {
3779
+ display: flex;
3780
+ align-items: center;
3781
+ gap: 9px;
3782
+ min-height: 52px;
3783
+ padding: 7px 7px 7px 10px;
3784
+ border: 1px solid var(--border);
3785
+ border-radius: var(--radius-m);
3786
+ background: var(--surface);
3787
+ box-shadow: var(--shadow-soft);
3788
+ }
3789
+
3790
+ .attachment-chip.is-error {
3791
+ border-color: var(--danger-line);
3792
+ background: var(--danger-soft);
3793
+ }
3794
+
3795
+ .attachment-glyph {
3796
+ display: grid;
3797
+ place-items: center;
3798
+ width: 30px;
3799
+ height: 30px;
3800
+ border-radius: 9px;
3801
+ background: var(--surface-2);
3802
+ color: var(--text-2);
3803
+ flex: none;
3804
+ }
3805
+
3806
+ .attachment-glyph .icon {
3807
+ width: 15px;
3808
+ height: 15px;
3809
+ }
3810
+
3811
+ .attachment-chip-img {
3812
+ display: block;
3813
+ width: 30px;
3814
+ height: 30px;
3815
+ border-radius: 9px;
3816
+ object-fit: cover;
3817
+ background: var(--surface-3);
3818
+ }
3819
+
3820
+ .attachment-chip.is-error .attachment-glyph {
3821
+ background: var(--danger-soft);
3822
+ color: var(--danger);
3823
+ }
3824
+
3825
+ .attachment-info {
3826
+ display: flex;
3827
+ flex-direction: column;
3828
+ gap: 1px;
3829
+ flex: 1;
3830
+ min-width: 0;
3831
+ }
3832
+
3833
+ .attachment-name {
3834
+ font-size: 13px;
3835
+ font-weight: 500;
3836
+ line-height: 1.3;
3837
+ color: var(--text);
3838
+ white-space: nowrap;
3839
+ overflow: hidden;
3840
+ text-overflow: ellipsis;
3841
+ }
3842
+
3843
+ .attachment-meta {
3844
+ font-size: 10.5px;
3845
+ line-height: 1.3;
3846
+ color: var(--text-4);
3847
+ white-space: nowrap;
3848
+ overflow: hidden;
3849
+ text-overflow: ellipsis;
3850
+ }
3851
+
3852
+ .attachment-chip.is-error .attachment-meta {
3853
+ color: var(--danger-ink);
3854
+ white-space: normal;
3855
+ overflow-wrap: anywhere;
3856
+ }
3857
+
3858
+ .attachment-bar {
3859
+ display: block;
3860
+ height: 2px;
3861
+ margin-top: 4px;
3862
+ border-radius: 2px;
3863
+ background: var(--surface-3);
3864
+ overflow: hidden;
3865
+ }
3866
+
3867
+ .attachment-bar span {
3868
+ display: block;
3869
+ width: 4%;
3870
+ height: 100%;
3871
+ border-radius: 2px;
3872
+ background: var(--text-2);
3873
+ transition: width var(--dur-1) linear;
3874
+ }
3875
+
3876
+ .attachment-remove {
3877
+ position: relative;
3878
+ display: grid;
3879
+ place-items: center;
3880
+ width: 32px;
3881
+ height: 32px;
3882
+ border-radius: 50%;
3883
+ color: var(--text-4);
3884
+ flex: none;
3885
+ transition: background var(--dur-1), color var(--dur-1);
3886
+ }
3887
+
3888
+ .attachment-remove::after {
3889
+ content: "";
3890
+ position: absolute;
3891
+ inset: -6px;
3892
+ }
3893
+
3894
+ .attachment-remove .icon {
3895
+ width: 15px;
3896
+ height: 15px;
3897
+ }
3898
+
3899
+ .attachment-remove:active {
3900
+ background: var(--pill-soft);
3901
+ color: var(--text);
3902
+ }
3903
+
3904
+ /* ---------- Attachment lightbox ----------------------------------------- */
3905
+ .lightbox {
3906
+ position: fixed;
3907
+ inset: 0;
3908
+ z-index: 80;
3909
+ display: flex;
3910
+ align-items: center;
3911
+ justify-content: center;
3912
+ padding: calc(20px + var(--safe-t)) calc(20px + var(--safe-r))
3913
+ calc(20px + var(--safe-b)) calc(20px + var(--safe-l));
3914
+ background: rgba(8, 8, 8, 0.92);
3915
+ opacity: 0;
3916
+ transition: opacity var(--dur-2) var(--ease-out);
3917
+ }
3918
+
3919
+ .lightbox.is-open {
3920
+ opacity: 1;
3921
+ }
3922
+
3923
+ .lightbox-img {
3924
+ display: block;
3925
+ width: 100%;
3926
+ max-width: 100%;
3927
+ height: auto;
3928
+ max-height: calc(100dvh - 130px);
3929
+ margin: auto;
3930
+ border-radius: 12px;
3931
+ object-fit: contain;
3932
+ background: #000;
3933
+ box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
3934
+ }
3935
+
3936
+ .lightbox.is-error .lightbox-img {
3937
+ visibility: hidden;
3938
+ }
3939
+
3940
+ .lightbox-close {
3941
+ position: absolute;
3942
+ top: calc(8px + var(--safe-t));
3943
+ right: calc(8px + var(--safe-r));
3944
+ display: grid;
3945
+ place-items: center;
3946
+ width: 44px;
3947
+ height: 44px;
3948
+ border: 1px solid rgba(255, 255, 255, 0.18);
3949
+ border-radius: 50%;
3950
+ background: rgba(20, 20, 20, 0.55);
3951
+ color: #f4f1ec;
3952
+ }
3953
+
3954
+ .lightbox-close .icon {
3955
+ width: 20px;
3956
+ height: 20px;
3957
+ }
3958
+
3959
+ .lightbox-close:active {
3960
+ background: rgba(255, 255, 255, 0.16);
3961
+ }
3962
+
3963
+ .lightbox-caption {
3964
+ position: absolute;
3965
+ left: 50%;
3966
+ bottom: calc(14px + var(--safe-b));
3967
+ max-width: min(86vw, 420px);
3968
+ margin: 0;
3969
+ padding: 6px 12px;
3970
+ transform: translateX(-50%);
3971
+ border-radius: var(--radius-pill);
3972
+ background: rgba(20, 20, 20, 0.6);
3973
+ color: #f4f1ec;
3974
+ font-size: 12px;
3975
+ line-height: 1.4;
3976
+ text-align: center;
3977
+ white-space: nowrap;
3978
+ overflow: hidden;
3979
+ text-overflow: ellipsis;
3980
+ }
3981
+
3982
+ /* ---------- Scrim + sheet ------------------------------------------------ */
3983
+ .scrim {
3984
+ position: fixed;
3985
+ inset: 0;
3986
+ z-index: 40;
3987
+ background: var(--scrim);
3988
+ opacity: 0;
3989
+ transition: opacity var(--dur-2) var(--ease-out);
3990
+ }
3991
+
3992
+ .scrim.is-open {
3993
+ opacity: 1;
3994
+ }
3995
+
3996
+ .sheet {
3997
+ position: fixed;
3998
+ left: 0;
3999
+ right: 0;
4000
+ bottom: 0;
4001
+ z-index: 50;
4002
+ display: flex;
4003
+ flex-direction: column;
4004
+ max-height: min(86dvh, 760px);
4005
+ padding-bottom: var(--safe-b);
4006
+ border-top: 1px solid var(--border);
4007
+ border-radius: var(--radius-xl) var(--radius-xl) 0 0;
4008
+ background: var(--surface);
4009
+ box-shadow: var(--shadow-sheet);
4010
+ transform: translateY(103%);
4011
+ transition: transform var(--dur-3) var(--ease);
4012
+ will-change: transform;
4013
+ }
4014
+
4015
+ .sheet.is-open {
4016
+ transform: translateY(0);
4017
+ }
4018
+
4019
+ .sheet-grab {
4020
+ display: flex;
4021
+ justify-content: center;
4022
+ padding: 9px 0 2px;
4023
+ flex: none;
4024
+ cursor: grab;
4025
+ touch-action: none;
4026
+ }
4027
+
4028
+ .sheet-grab span {
4029
+ width: 36px;
4030
+ height: 4px;
4031
+ border-radius: 2px;
4032
+ background: var(--border-strong);
4033
+ }
4034
+
4035
+ .sheet-head {
4036
+ display: flex;
4037
+ align-items: flex-start;
4038
+ justify-content: space-between;
4039
+ gap: 12px;
4040
+ flex: none;
4041
+ padding: 4px calc(10px + var(--safe-r)) 8px calc(20px + var(--safe-l));
4042
+ }
4043
+
4044
+ .sheet-heading {
4045
+ min-width: 0;
4046
+ padding-top: 9px;
4047
+ }
4048
+
4049
+ .sheet-title {
4050
+ margin: 0;
4051
+ font-size: 18px;
4052
+ font-weight: 600;
4053
+ letter-spacing: -0.022em;
4054
+ line-height: 1.25;
4055
+ }
4056
+
4057
+ .sheet-sub {
4058
+ margin: 4px 0 0;
4059
+ font-size: 12px;
4060
+ line-height: 1.45;
4061
+ color: var(--text-3);
4062
+ }
4063
+
4064
+ .sheet-body {
4065
+ flex: 1;
4066
+ min-height: 0;
4067
+ overflow-y: auto;
4068
+ -webkit-overflow-scrolling: touch;
4069
+ overscroll-behavior: contain;
4070
+ padding: 2px calc(10px + var(--safe-r)) 14px calc(10px + var(--safe-l));
4071
+ }
4072
+
4073
+ .sheet-foot {
4074
+ flex: none;
4075
+ padding: 13px calc(20px + var(--safe-r)) 12px calc(20px + var(--safe-l));
4076
+ border-top: 1px solid var(--border);
4077
+ font-size: 11.5px;
4078
+ line-height: 1.55;
4079
+ color: var(--text-4);
4080
+ }
4081
+
4082
+ .sheet-section {
4083
+ margin: 18px 12px 6px;
4084
+ font-family: var(--font-mono);
4085
+ font-size: 9.5px;
4086
+ font-weight: 500;
4087
+ letter-spacing: 0.12em;
4088
+ text-transform: uppercase;
4089
+ color: var(--text-4);
4090
+ }
4091
+
4092
+ /* Search / directory inputs inside a bottom sheet. 16px avoids the mobile
4093
+ browser zoom-on-focus behaviour and keeps the touch target comfortable. */
4094
+ .sheet-search {
4095
+ display: block;
4096
+ width: calc(100% - 24px);
4097
+ min-height: 44px;
4098
+ margin: 4px 12px 8px;
4099
+ padding: 10px 13px;
4100
+ border: 1px solid var(--border);
4101
+ border-radius: var(--radius-m);
4102
+ background: var(--surface);
4103
+ color: var(--text-1);
4104
+ font-family: inherit;
4105
+ font-size: 16px;
4106
+ line-height: 1.3;
4107
+ }
4108
+
4109
+ .sheet-search:focus {
4110
+ outline: none;
4111
+ border-color: var(--border-strong);
4112
+ background: var(--surface-2);
4113
+ }
4114
+
4115
+ .chip-row {
4116
+ display: flex;
4117
+ flex-wrap: wrap;
4118
+ gap: 6px;
4119
+ margin: 6px 12px 2px;
4120
+ }
4121
+
4122
+ .chip-row .chip {
4123
+ min-height: 36px;
4124
+ padding: 7px 11px;
4125
+ font-family: var(--font-mono);
4126
+ font-size: 11.5px;
4127
+ line-height: 1.3;
4128
+ max-width: 100%;
4129
+ overflow: hidden;
4130
+ text-overflow: ellipsis;
4131
+ white-space: nowrap;
4132
+ }
4133
+
4134
+ .sheet-divider {
4135
+ height: 1px;
4136
+ margin: 10px 12px;
4137
+ background: var(--border);
4138
+ }
4139
+
4140
+ .sheet-note {
4141
+ padding: 8px 13px 2px;
4142
+ font-size: 11.5px;
4143
+ line-height: 1.55;
4144
+ color: var(--text-4);
4145
+ }
4146
+
4147
+ .sheet-loading {
4148
+ display: flex;
4149
+ align-items: center;
4150
+ gap: 10px;
4151
+ padding: 24px 14px;
4152
+ font-size: 13px;
4153
+ color: var(--text-3);
4154
+ }
4155
+
4156
+ .row {
4157
+ display: flex;
4158
+ align-items: center;
4159
+ gap: 12px;
4160
+ width: 100%;
4161
+ min-height: 56px;
4162
+ padding: 10px 12px;
4163
+ border-radius: var(--radius-m);
4164
+ text-align: left;
4165
+ color: var(--text);
4166
+ transition: background var(--dur-1) var(--ease-out);
4167
+ }
4168
+
4169
+ .row:active {
4170
+ background: var(--surface-2);
4171
+ }
4172
+
4173
+ .row.is-active {
4174
+ background: var(--surface-2);
4175
+ box-shadow: inset 0 0 0 1px var(--border);
4176
+ }
4177
+
4178
+ .row-icon {
4179
+ display: grid;
4180
+ place-items: center;
4181
+ width: 36px;
4182
+ height: 36px;
4183
+ border-radius: 11px;
4184
+ background: var(--surface-2);
4185
+ color: var(--text-2);
4186
+ flex: none;
4187
+ }
4188
+
4189
+ .row-icon .icon {
4190
+ width: 17px;
4191
+ height: 17px;
4192
+ }
4193
+
4194
+ .row.is-accent .row-icon {
4195
+ background: var(--pill);
4196
+ color: var(--pill-ink);
4197
+ }
4198
+
4199
+ .row.is-danger .row-icon {
4200
+ background: var(--danger-soft);
4201
+ color: var(--danger);
4202
+ }
4203
+
4204
+ .row.is-danger .row-title {
4205
+ color: var(--danger-ink);
4206
+ }
4207
+
4208
+ .row-main {
4209
+ flex: 1;
4210
+ min-width: 0;
4211
+ }
4212
+
4213
+ .row-title {
4214
+ display: block;
4215
+ font-size: 14.5px;
4216
+ font-weight: 500;
4217
+ line-height: 1.35;
4218
+ letter-spacing: -0.012em;
4219
+ color: var(--text);
4220
+ white-space: nowrap;
4221
+ overflow: hidden;
4222
+ text-overflow: ellipsis;
4223
+ }
4224
+
4225
+ .row-sub {
4226
+ display: block;
4227
+ margin-top: 2px;
4228
+ font-size: 11.5px;
4229
+ line-height: 1.4;
4230
+ color: var(--text-3);
4231
+ white-space: nowrap;
4232
+ overflow: hidden;
4233
+ text-overflow: ellipsis;
4234
+ }
4235
+
4236
+ /* Commands sheet: a description may wrap to two lines and the argument hint
4237
+ gets its own line, so `/goal`/`/plan` hints are readable on a 320-412 px
4238
+ phone instead of being clipped by the shared nowrap subtitle. */
4239
+ .command-row .row-sub {
4240
+ display: -webkit-box;
4241
+ -webkit-line-clamp: 2;
4242
+ -webkit-box-orient: vertical;
4243
+ white-space: normal;
4244
+ overflow: hidden;
4245
+ text-overflow: clip;
4246
+ }
4247
+
4248
+ .command-row .row-hint {
4249
+ display: block;
4250
+ margin-top: 3px;
4251
+ font-size: 11px;
4252
+ line-height: 1.4;
4253
+ color: var(--text-4);
4254
+ overflow-wrap: anywhere;
4255
+ }
4256
+
4257
+ .row-meta {
4258
+ display: flex;
4259
+ align-items: center;
4260
+ justify-content: flex-end;
4261
+ gap: 8px;
4262
+ min-width: 0;
4263
+ flex: 0 1 auto;
4264
+ font-size: 11.5px;
4265
+ color: var(--text-4);
4266
+ }
4267
+
4268
+ .row-meta > span {
4269
+ min-width: 0;
4270
+ overflow: hidden;
4271
+ text-overflow: ellipsis;
4272
+ white-space: nowrap;
4273
+ }
4274
+
4275
+ /* Subtle trailing tag for the current reasoning effort on a model row; the
4276
+ row itself opens the effort sheet, so a chevron marks it as drill-in. */
4277
+ .row-effort {
4278
+ padding: 2px 7px;
4279
+ border: 1px solid var(--border);
4280
+ border-radius: 999px;
4281
+ font-family: var(--font-mono);
4282
+ font-size: 9.5px;
4283
+ letter-spacing: 0.02em;
4284
+ color: var(--text-3);
4285
+ white-space: nowrap;
4286
+ }
4287
+
4288
+ .row-chevron {
4289
+ display: grid;
4290
+ place-items: center;
4291
+ color: var(--text-4);
4292
+ }
4293
+
4294
+ .row-chevron .icon {
4295
+ width: 14px;
4296
+ height: 14px;
4297
+ }
4298
+
4299
+ .row-check {
4300
+ color: var(--text-2);
4301
+ }
4302
+
4303
+ .row-check .icon {
4304
+ width: 18px;
4305
+ height: 18px;
4306
+ stroke-width: 2;
4307
+ }
4308
+
4309
+ .row-tag {
4310
+ padding: 2px 8px;
4311
+ border-radius: var(--radius-pill);
4312
+ background: var(--surface-2);
4313
+ font-family: var(--font-mono);
4314
+ font-size: 9.5px;
4315
+ letter-spacing: 0.04em;
4316
+ color: var(--text-3);
4317
+ }
4318
+
4319
+ .row-running {
4320
+ width: 7px;
4321
+ height: 7px;
4322
+ border-radius: 50%;
4323
+ background: var(--ok);
4324
+ box-shadow: 0 0 0 3px var(--ok-soft);
4325
+ animation: status-pulse 2.4s var(--ease-out) infinite;
4326
+ }
4327
+
4328
+ .row-idle {
4329
+ width: 6px;
4330
+ height: 6px;
4331
+ border-radius: 50%;
4332
+ background: var(--border-strong);
4333
+ }
4334
+
4335
+ /* Theme control (inside the overflow sheet) */
4336
+ .theme-row {
4337
+ padding: 2px 12px 4px;
4338
+ }
4339
+
4340
+ .theme-seg {
4341
+ display: grid;
4342
+ grid-template-columns: repeat(3, 1fr);
4343
+ width: 100%;
4344
+ }
4345
+
4346
+ .theme-seg .seg-btn {
4347
+ height: 36px;
4348
+ }
4349
+
4350
+ /* ---------- App lock (Batch E2) ----------------------------------------- */
4351
+ .app-lock {
4352
+ position: fixed;
4353
+ inset: 0;
4354
+ z-index: 70;
4355
+ display: flex;
4356
+ align-items: center;
4357
+ justify-content: center;
4358
+ padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b));
4359
+ background: var(--bg);
4360
+ opacity: 0;
4361
+ transition: opacity var(--dur-2) var(--ease-out);
4362
+ }
4363
+
4364
+ .app-lock.is-open {
4365
+ opacity: 1;
4366
+ }
4367
+
4368
+ .app-lock-card {
4369
+ width: 100%;
4370
+ max-width: 320px;
4371
+ text-align: center;
4372
+ }
4373
+
4374
+ .app-lock-mark {
4375
+ width: 56px;
4376
+ height: 56px;
4377
+ margin: 0 auto 20px;
4378
+ border-radius: 18px;
4379
+ }
4380
+
4381
+ .app-lock-title {
4382
+ margin: 0 0 8px;
4383
+ font-family: var(--font-serif);
4384
+ font-size: 23px;
4385
+ letter-spacing: -0.02em;
4386
+ color: var(--text);
4387
+ }
4388
+
4389
+ .app-lock-text {
4390
+ margin: 0 0 20px;
4391
+ font-size: 13.5px;
4392
+ line-height: 1.55;
4393
+ color: var(--text-2);
4394
+ }
4395
+
4396
+ .app-lock-error {
4397
+ margin: 12px 0 0;
4398
+ font-size: 12.5px;
4399
+ line-height: 1.45;
4400
+ color: var(--danger);
4401
+ }
4402
+
4403
+ .app-lock-recovery {
4404
+ margin: 18px 0 0;
4405
+ font-size: 11px;
4406
+ line-height: 1.5;
4407
+ color: var(--text-4);
4408
+ }
4409
+
4410
+ .app-lock .btn {
4411
+ min-height: 48px;
4412
+ }
4413
+
4414
+ /* The app must not be readable behind the opaque lock overlay. */
4415
+ .app.is-locked {
4416
+ visibility: hidden;
4417
+ }
4418
+
4419
+ .row.is-disabled {
4420
+ opacity: 0.55;
4421
+ pointer-events: none;
4422
+ }
4423
+
4424
+ /* ---------- Toast -------------------------------------------------------- */
4425
+ .toast {
4426
+ position: fixed;
4427
+ left: 50%;
4428
+ bottom: calc(104px + var(--safe-b));
4429
+ z-index: 60;
4430
+ max-width: min(88vw, 420px);
4431
+ padding: 11px 15px;
4432
+ border: 1px solid var(--border);
4433
+ border-radius: var(--radius-pill);
4434
+ background: var(--surface);
4435
+ color: var(--text);
4436
+ font-size: 13px;
4437
+ line-height: 1.42;
4438
+ text-align: center;
4439
+ box-shadow: var(--shadow-lift);
4440
+ opacity: 0;
4441
+ transform: translate(-50%, 8px);
4442
+ pointer-events: none;
4443
+ transition: opacity var(--dur-2) var(--ease-out),
4444
+ transform var(--dur-2) var(--ease-out);
4445
+ }
4446
+
4447
+ .toast.is-visible {
4448
+ opacity: 1;
4449
+ transform: translate(-50%, 0);
4450
+ }
4451
+
4452
+ /* ---------- Hover polish (fine pointers only) ---------------------------- */
4453
+ @media (hover: hover) and (pointer: fine) {
4454
+ .iconbtn:hover {
4455
+ background: var(--surface-2);
4456
+ color: var(--text);
4457
+ }
4458
+
4459
+ .tab:hover {
4460
+ color: var(--text-2);
4461
+ }
4462
+
4463
+ .tab.is-active:hover {
4464
+ color: var(--text);
4465
+ }
4466
+
4467
+ .prompt-mode-btn:not(.is-active):hover {
4468
+ background: var(--surface-3);
4469
+ color: var(--text-3);
4470
+ }
4471
+
4472
+ .row:hover {
4473
+ background: var(--surface-2);
4474
+ }
4475
+
4476
+ .chip:hover {
4477
+ background: var(--surface-2);
4478
+ border-color: var(--border-strong);
4479
+ }
4480
+
4481
+ .tool-head:hover {
4482
+ background: var(--surface-2);
4483
+ }
4484
+
4485
+ .q-option:hover {
4486
+ border-color: var(--border-strong);
4487
+ background: var(--surface-2);
4488
+ }
4489
+
4490
+ .msg-action:hover,
4491
+ .md-copy:hover {
4492
+ color: var(--text);
4493
+ background: var(--pill-soft);
4494
+ }
4495
+
4496
+ .send-btn:not([disabled]):hover {
4497
+ opacity: 0.9;
4498
+ }
4499
+
4500
+ .attach-btn:not([disabled]):hover,
4501
+ .attachment-remove:hover {
4502
+ background: var(--surface-2);
4503
+ color: var(--text);
4504
+ }
4505
+ }
4506
+
4507
+ /* ---------- Responsive details ------------------------------------------ */
4508
+ @media (max-width: 380px) {
4509
+ :root {
4510
+ --prose-size: 17px;
4511
+ }
4512
+
4513
+ .messages {
4514
+ padding-left: calc(16px + var(--safe-l));
4515
+ padding-right: calc(16px + var(--safe-r));
4516
+ }
4517
+
4518
+ .activity-list {
4519
+ padding-left: calc(14px + var(--safe-l));
4520
+ padding-right: calc(14px + var(--safe-r));
4521
+ }
4522
+
4523
+ .activity-bar {
4524
+ padding-left: calc(14px + var(--safe-l));
4525
+ padding-right: calc(14px + var(--safe-r));
4526
+ }
4527
+
4528
+ .pair-title {
4529
+ font-size: 31px;
4530
+ }
4531
+
4532
+ .pin-slot {
4533
+ height: 60px;
4534
+ font-size: 23px;
4535
+ }
4536
+
4537
+ .pin-slots {
4538
+ gap: 8px;
4539
+ }
4540
+
4541
+ .tab {
4542
+ min-width: 96px;
4543
+ }
4544
+
4545
+ /* Keep the meta row on one line on the narrowest phones: a shorter track
4546
+ leaves room for the note and the model chip while the meter stays centred. */
4547
+ .composer-meta {
4548
+ gap: 4px 8px;
4549
+ padding-left: 8px;
4550
+ padding-right: 8px;
4551
+ }
4552
+
4553
+ .context-track {
4554
+ width: 40px;
4555
+ }
4556
+
4557
+ /* While a run is live the right cluster shows Queue/Steer next to the same
4558
+ centred meter; drop the decorative track (the numbers stay) so the cluster
4559
+ still fits inside its side track and the meter stays on centre. */
4560
+ .composer-meta.has-mode .context-track {
4561
+ display: none;
4562
+ }
4563
+
4564
+ .prompt-mode-btn {
4565
+ padding: 0 7px;
4566
+ font-size: 10px;
4567
+ }
4568
+ }
4569
+
4570
+ @media (min-height: 900px) {
4571
+ .messages {
4572
+ gap: 24px;
4573
+ }
4574
+ }
4575
+
4576
+ @media (max-height: 560px) {
4577
+ .pairing {
4578
+ justify-content: flex-start;
4579
+ padding-top: calc(20px + var(--safe-t));
4580
+ }
4581
+
4582
+ .pairing-card {
4583
+ margin: 0 auto;
4584
+ }
4585
+
4586
+ .pairing-foot {
4587
+ margin-top: 24px;
4588
+ }
4589
+
4590
+ .brand .logo-mark {
4591
+ margin-bottom: 14px;
4592
+ }
4593
+
4594
+ .pair-form {
4595
+ margin-top: 20px;
4596
+ }
4597
+
4598
+ .pin-slot {
4599
+ height: 54px;
4600
+ }
4601
+ }
4602
+
4603
+ /* ---------- Reduced motion ----------------------------------------------- */
4604
+ @media (prefers-reduced-motion: reduce) {
4605
+ *,
4606
+ *::before,
4607
+ *::after {
4608
+ animation-duration: 0.01ms !important;
4609
+ animation-iteration-count: 1 !important;
4610
+ transition-duration: 0.01ms !important;
4611
+ scroll-behavior: auto !important;
4612
+ }
4613
+
4614
+ .cursor {
4615
+ opacity: 0.6;
4616
+ }
4617
+
4618
+ .msg {
4619
+ animation: none;
4620
+ }
4621
+
4622
+ .tool-body,
4623
+ .act-body {
4624
+ transition: none;
4625
+ }
4626
+ }
4627
+
4628
+ .question-session {
4629
+ display: flex;
4630
+ align-items: center;
4631
+ gap: 10px;
4632
+ margin: 0 0 10px;
4633
+ font-size: 12px;
4634
+ color: var(--text);
4635
+ opacity: 0.6;
4636
+ }
4637
+
4638
+ .question-session .btn {
4639
+ padding: 5px 10px;
4640
+ font-size: 12px;
4641
+ }
4642
+
4643
+ .session-notice {
4644
+ grid-row: 3;
4645
+ display: flex;
4646
+ align-items: center;
4647
+ gap: 10px;
4648
+ margin: 0 calc(14px + var(--safe-r)) 6px calc(14px + var(--safe-l));
4649
+ padding: 7px 8px 7px 12px;
4650
+ border-radius: var(--radius-m);
4651
+ border: 1px solid var(--warn-line, rgba(138, 90, 31, 0.28));
4652
+ background: var(--warn-soft, rgba(138, 90, 31, 0.08));
4653
+ color: var(--text);
4654
+ font-size: 12.5px;
4655
+ line-height: 1.4;
4656
+ }
4657
+
4658
+ .session-notice-text {
4659
+ flex: 1 1 auto;
4660
+ min-width: 0;
4661
+ overflow-wrap: anywhere;
4662
+ word-break: break-word;
4663
+ }
4664
+ .session-notice .btn { flex: 0 0 auto; padding: 5px 10px; font-size: 12px; }
4665
+
4666
+ /* ---------- Horizontal overflow hardening -------------------------------- */
4667
+ /* The single app column must never be sized by a child's min-content (a
4668
+ textarea's intrinsic width, a nowrap tool title, a wide change card), or a
4669
+ narrow phone clips the right edge of the chat and the composer. */
4670
+ .app {
4671
+ grid-template-columns: minmax(0, 1fr);
4672
+ }
4673
+
4674
+ .app > * {
4675
+ min-width: 0;
4676
+ }
4677
+
4678
+ .composer,
4679
+ .composer-shell,
4680
+ .composer-box,
4681
+ .composer-meta,
4682
+ .composer-input,
4683
+ .messages,
4684
+ .msg,
4685
+ .msg-assistant,
4686
+ .md,
4687
+ .tool,
4688
+ .changes-panel,
4689
+ .activity-list,
4690
+ .queue-strip,
4691
+ .archived-banner {
4692
+ min-width: 0;
4693
+ max-width: 100%;
4694
+ }
4695
+
4696
+ .composer-input {
4697
+ flex: 1 1 0;
4698
+ }