pi-durable-bot 0.7.2 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +10 -2
  3. package/dist/agent/agent.js +2 -1
  4. package/dist/agent/agent.js.map +1 -1
  5. package/dist/agent/scopes.js +267 -0
  6. package/dist/agent/scopes.js.map +1 -0
  7. package/dist/agent/screen.js +37 -2
  8. package/dist/agent/screen.js.map +1 -1
  9. package/dist/bot/bot.js +58 -11
  10. package/dist/bot/bot.js.map +1 -1
  11. package/dist/bot/definition.js +7 -0
  12. package/dist/bot/definition.js.map +1 -1
  13. package/dist/bot/prompt.js +26 -9
  14. package/dist/bot/prompt.js.map +1 -1
  15. package/dist/cli/bots.js +69 -5
  16. package/dist/cli/bots.js.map +1 -1
  17. package/dist/cli/chat.js +59 -4
  18. package/dist/cli/chat.js.map +1 -1
  19. package/dist/cli/commands.js +23 -2
  20. package/dist/cli/commands.js.map +1 -1
  21. package/dist/cli/init.js +4 -19
  22. package/dist/cli/init.js.map +1 -1
  23. package/dist/cli/pages.js +25 -6
  24. package/dist/cli/pages.js.map +1 -1
  25. package/dist/cli/service.js +30 -1
  26. package/dist/cli/service.js.map +1 -1
  27. package/dist/main.js +8 -0
  28. package/dist/main.js.map +1 -1
  29. package/dist/pages/desktop-page.js +293 -0
  30. package/dist/pages/desktop-page.js.map +1 -0
  31. package/dist/pages/desktop.js +672 -0
  32. package/dist/pages/desktop.js.map +1 -0
  33. package/dist/pages/host.js +55 -2
  34. package/dist/pages/host.js.map +1 -1
  35. package/dist/pages/rfb.js +389 -0
  36. package/dist/pages/rfb.js.map +1 -0
  37. package/dist/pages/server.js +172 -1
  38. package/dist/pages/server.js.map +1 -1
  39. package/dist/pages/store.js +26 -4
  40. package/dist/pages/store.js.map +1 -1
  41. package/docs/for-agents.md +17 -2
  42. package/kit/desktop/desktop.css +1010 -0
  43. package/kit/desktop/desktop.js +1421 -0
  44. package/kit/desktop/novnc/AUTHORS +13 -0
  45. package/kit/desktop/novnc/LICENSE.BSD-2-Clause +22 -0
  46. package/kit/desktop/novnc/LICENSE.BSD-3-Clause +24 -0
  47. package/kit/desktop/novnc/LICENSE.MPL-2.0 +373 -0
  48. package/kit/desktop/novnc/LICENSE.OFL-1.1 +91 -0
  49. package/kit/desktop/novnc/LICENSE.pako +21 -0
  50. package/kit/desktop/novnc/LICENSE.txt +62 -0
  51. package/kit/desktop/novnc.js +14404 -0
  52. package/package.json +5 -5
  53. package/skills/desktop-page/SKILL.md +153 -0
  54. package/skills/discord-channel/SKILL.md +6 -6
  55. package/skills/pages/SKILL.md +9 -4
  56. package/skills/slack-channel/SKILL.md +8 -7
  57. package/skills/telegram-channel/SKILL.md +4 -4
@@ -0,0 +1,1010 @@
1
+ /*
2
+ * The desktop page of Pots: a person sees and controls the bot's screen. The picture fills the screen; a few controls
3
+ * float on it. Phone first, also for computers. Pots' own page; bots do not use this file.
4
+ */
5
+
6
+ :root {
7
+ color-scheme: light dark;
8
+ --bg: #f6f6f3;
9
+ --card: #ffffff;
10
+ --text: #1d1d1f;
11
+ --muted: #5f6368;
12
+ --line: #dcdcd7;
13
+ --go: #1f9d6b;
14
+ --bad: #c0392b;
15
+ --sheet: #f4f4f2;
16
+ --tile: #ffffff;
17
+ --soft: #e6e6e3;
18
+ --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Segoe UI", system-ui, sans-serif;
19
+ }
20
+
21
+ @media (prefers-color-scheme: dark) {
22
+ :root {
23
+ --bg: #141516;
24
+ --card: #1f2022;
25
+ --text: #ececea;
26
+ --muted: #a2a6ab;
27
+ --line: #34373a;
28
+ --bad: #ff8a7e;
29
+ --sheet: #1f2022;
30
+ --tile: #2c2d30;
31
+ --soft: #2c2d30;
32
+ }
33
+ }
34
+
35
+ * {
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ html,
40
+ body {
41
+ margin: 0;
42
+ height: 100%;
43
+ font: 15px/1.4 var(--font);
44
+ color: var(--text);
45
+ background: var(--bg);
46
+ -webkit-text-size-adjust: 100%;
47
+ text-size-adjust: 100%;
48
+ }
49
+
50
+ [hidden] {
51
+ display: none !important;
52
+ }
53
+
54
+ button {
55
+ font: inherit;
56
+ color: inherit;
57
+ border: 0;
58
+ background: none;
59
+ padding: 0;
60
+ cursor: pointer;
61
+ touch-action: manipulation;
62
+ -webkit-tap-highlight-color: transparent;
63
+ }
64
+
65
+ /* ---- Start and end pages ---- */
66
+
67
+ .page {
68
+ max-width: 520px;
69
+ min-height: 100%;
70
+ margin: 0 auto;
71
+ padding: calc(40px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom));
72
+ display: flex;
73
+ flex-direction: column;
74
+ }
75
+
76
+ .who {
77
+ display: flex;
78
+ align-items: center;
79
+ gap: 10px;
80
+ font-size: 14px;
81
+ color: var(--muted);
82
+ }
83
+
84
+ .ava {
85
+ width: 34px;
86
+ height: 34px;
87
+ border-radius: 50%;
88
+ flex: none;
89
+ background: linear-gradient(135deg, #4fb3a5, #1f7a70);
90
+ color: #fff;
91
+ display: grid;
92
+ place-items: center;
93
+ font-weight: 700;
94
+ }
95
+
96
+ .ask {
97
+ margin: 18px 0 14px;
98
+ background: var(--card);
99
+ border-radius: 18px;
100
+ padding: 16px;
101
+ font-size: 19px;
102
+ line-height: 1.45;
103
+ font-weight: 600;
104
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
105
+ }
106
+
107
+ /* Long text, or text of several lines, in the regular weight: easier to read than a big bold block. */
108
+ .ask.long {
109
+ font-size: 16.5px;
110
+ line-height: 1.6;
111
+ font-weight: 450;
112
+ padding: 16px 18px;
113
+ }
114
+
115
+ /* The bot's words: a paragraph per line, and a numbered or bulleted line hangs under its mark. */
116
+ .words p {
117
+ margin: 0;
118
+ white-space: pre-wrap;
119
+ overflow-wrap: anywhere;
120
+ }
121
+
122
+ .words p + p {
123
+ margin-top: 0.4em;
124
+ }
125
+
126
+ .words .gap {
127
+ height: 0.2em;
128
+ }
129
+
130
+ .words .step {
131
+ display: grid;
132
+ grid-template-columns: auto minmax(0, 1fr);
133
+ column-gap: 0.45em;
134
+ }
135
+
136
+ .words .n {
137
+ min-width: 1.1em;
138
+ font-weight: 650;
139
+ font-variant-numeric: tabular-nums;
140
+ }
141
+
142
+ .ask .n {
143
+ color: var(--go);
144
+ }
145
+
146
+ .meta {
147
+ font-size: 13px;
148
+ color: var(--muted);
149
+ line-height: 1.6;
150
+ }
151
+
152
+ .fold {
153
+ font-size: 13px;
154
+ margin-top: 12px;
155
+ color: var(--muted);
156
+ }
157
+
158
+ .fold summary {
159
+ cursor: pointer;
160
+ }
161
+
162
+ .fold p {
163
+ margin: 6px 0 0;
164
+ line-height: 1.5;
165
+ }
166
+
167
+ .msg {
168
+ color: var(--bad);
169
+ font-size: 14px;
170
+ min-height: 1.4em;
171
+ margin: 14px 0 0;
172
+ }
173
+
174
+ #start.page {
175
+ padding-bottom: 0;
176
+ }
177
+
178
+ /* Start stays in sight at the bottom while long text scrolls under it. */
179
+ .go {
180
+ margin-top: auto;
181
+ position: sticky;
182
+ bottom: 0;
183
+ padding: 18px 0 calc(16px + env(safe-area-inset-bottom));
184
+ background: linear-gradient(to bottom, color-mix(in srgb, var(--bg), transparent 100%), var(--bg) 18px);
185
+ }
186
+
187
+ .go .msg {
188
+ margin: 0 0 10px;
189
+ min-height: 0;
190
+ }
191
+
192
+ .go .msg:empty {
193
+ display: none;
194
+ }
195
+
196
+ .big {
197
+ width: 100%;
198
+ text-align: center;
199
+ background: var(--go);
200
+ color: #fff;
201
+ font-weight: 700;
202
+ font-size: 18px;
203
+ border-radius: 16px;
204
+ padding: 16px;
205
+ }
206
+
207
+ .big:disabled {
208
+ opacity: 0.55;
209
+ cursor: default;
210
+ }
211
+
212
+ .fine {
213
+ font-size: 12px;
214
+ color: var(--muted);
215
+ text-align: center;
216
+ margin: 10px 0 0;
217
+ line-height: 1.5;
218
+ }
219
+
220
+ .ended {
221
+ text-align: center;
222
+ }
223
+
224
+ .ended h1 {
225
+ font-size: 21px;
226
+ margin: 0 0 8px;
227
+ }
228
+
229
+ .check {
230
+ width: 64px;
231
+ height: 64px;
232
+ border-radius: 50%;
233
+ margin: 100px auto 18px;
234
+ display: grid;
235
+ place-items: center;
236
+ }
237
+
238
+ .check.good {
239
+ background: var(--go);
240
+ }
241
+
242
+ .check.gone {
243
+ background: var(--muted);
244
+ }
245
+
246
+ .check::after {
247
+ content: "";
248
+ width: 22px;
249
+ height: 12px;
250
+ border: solid #fff;
251
+ border-width: 0 0 3px 3px;
252
+ transform: translateY(-3px) rotate(-45deg);
253
+ }
254
+
255
+ .check.gone::after {
256
+ width: 26px;
257
+ height: 0;
258
+ border-width: 0 0 3px 0;
259
+ transform: none;
260
+ }
261
+
262
+ /* ---- The session: the picture fills the screen ---- */
263
+
264
+ #session {
265
+ position: fixed;
266
+ inset: 0;
267
+ background: #000;
268
+ overflow: hidden;
269
+ color: #fff;
270
+ user-select: none;
271
+ -webkit-user-select: none;
272
+ -webkit-touch-callout: none;
273
+ }
274
+
275
+ #screen {
276
+ position: absolute;
277
+ inset: 0;
278
+ touch-action: none;
279
+ transition: transform 0.25s ease;
280
+ }
281
+
282
+ #screen canvas {
283
+ touch-action: none;
284
+ }
285
+
286
+ .glass {
287
+ background: rgba(22, 22, 24, 0.66);
288
+ -webkit-backdrop-filter: blur(14px) saturate(1.4);
289
+ backdrop-filter: blur(14px) saturate(1.4);
290
+ color: #fff;
291
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
292
+ border: 1px solid rgba(255, 255, 255, 0.12);
293
+ }
294
+
295
+ #dim {
296
+ position: absolute;
297
+ inset: 0;
298
+ background: rgba(0, 0, 0, 0.55);
299
+ display: grid;
300
+ place-items: center;
301
+ z-index: 3;
302
+ font-size: 16px;
303
+ text-align: center;
304
+ padding: 24px;
305
+ }
306
+
307
+ /* Where the floating controls keep clear of: the phone's notch and rounded corners. Read by the page's script. */
308
+ #safe {
309
+ position: absolute;
310
+ visibility: hidden;
311
+ pointer-events: none;
312
+ padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
313
+ }
314
+
315
+ /*
316
+ * The dock: one group of floating controls, on an edge of the screen. First the task button (a dot for the
317
+ * connection, the time left), then keyboard, more and Done. It can be dragged to any edge; on the left or right edge it
318
+ * stands upright. The page's script places it.
319
+ */
320
+ #dock {
321
+ position: absolute;
322
+ left: 0;
323
+ top: 0;
324
+ width: max-content;
325
+ display: flex;
326
+ align-items: center;
327
+ gap: 4px;
328
+ padding: 5px;
329
+ border-radius: 30px;
330
+ z-index: 5;
331
+ touch-action: none;
332
+ cursor: grab;
333
+ transition: left 0.22s ease, top 0.22s ease;
334
+ }
335
+
336
+ #dock.dragging {
337
+ transition: none;
338
+ cursor: grabbing;
339
+ box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
340
+ }
341
+
342
+ #dock.side {
343
+ flex-direction: column;
344
+ }
345
+
346
+ .chip {
347
+ height: 46px;
348
+ border-radius: 23px;
349
+ padding: 0 11px 0 13px;
350
+ display: flex;
351
+ align-items: center;
352
+ gap: 8px;
353
+ background: rgba(255, 255, 255, 0.1);
354
+ color: #fff;
355
+ font-size: 14px;
356
+ }
357
+
358
+ .chip:hover,
359
+ .chip.on {
360
+ background: rgba(255, 255, 255, 0.2);
361
+ }
362
+
363
+ .chip svg {
364
+ width: 17px;
365
+ height: 17px;
366
+ fill: none;
367
+ stroke: currentColor;
368
+ stroke-width: 1.8;
369
+ stroke-linecap: round;
370
+ opacity: 0.85;
371
+ }
372
+
373
+ #dock.side .chip {
374
+ width: 46px;
375
+ height: auto;
376
+ padding: 9px 0 8px;
377
+ flex-direction: column;
378
+ gap: 6px;
379
+ font-size: 12px;
380
+ }
381
+
382
+ #dock.side .chip svg {
383
+ display: none;
384
+ }
385
+
386
+ /* After the text folds away, the task button glows once, so the eye follows it there. */
387
+ .chip.pulse {
388
+ animation: pulse 1.1s ease-out 2;
389
+ }
390
+
391
+ @keyframes pulse {
392
+ from {
393
+ box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
394
+ }
395
+ to {
396
+ box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
397
+ }
398
+ }
399
+
400
+ .dot {
401
+ width: 8px;
402
+ height: 8px;
403
+ border-radius: 50%;
404
+ background: #f5b041;
405
+ flex: none;
406
+ box-shadow: 0 0 0 3px rgba(245, 176, 65, 0.25);
407
+ }
408
+
409
+ .dot.on {
410
+ background: #3ddc84;
411
+ box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25);
412
+ }
413
+
414
+ .dot.off {
415
+ background: #ff6b5e;
416
+ box-shadow: 0 0 0 3px rgba(255, 107, 94, 0.25);
417
+ }
418
+
419
+ .time {
420
+ font-variant-numeric: tabular-nums;
421
+ font-weight: 650;
422
+ flex: none;
423
+ }
424
+
425
+ .time.low {
426
+ color: #ffb347;
427
+ }
428
+
429
+ .ib {
430
+ width: 46px;
431
+ height: 46px;
432
+ border-radius: 50%;
433
+ display: grid;
434
+ place-items: center;
435
+ color: #fff;
436
+ }
437
+
438
+ .ib:hover {
439
+ background: rgba(255, 255, 255, 0.12);
440
+ }
441
+
442
+ .ib svg,
443
+ .done svg,
444
+ .zoomed svg,
445
+ .x svg {
446
+ width: 23px;
447
+ height: 23px;
448
+ fill: none;
449
+ stroke: currentColor;
450
+ stroke-width: 1.8;
451
+ stroke-linecap: round;
452
+ stroke-linejoin: round;
453
+ }
454
+
455
+ .done {
456
+ height: 46px;
457
+ padding: 0 18px 0 14px;
458
+ border-radius: 23px;
459
+ background: var(--go);
460
+ color: #fff;
461
+ font-weight: 650;
462
+ white-space: nowrap;
463
+ display: flex;
464
+ align-items: center;
465
+ gap: 6px;
466
+ font-size: 15.5px;
467
+ }
468
+
469
+ .done svg {
470
+ width: 18px;
471
+ height: 18px;
472
+ stroke-width: 2.6;
473
+ }
474
+
475
+ #dock.side .done {
476
+ width: 46px;
477
+ padding: 0;
478
+ justify-content: center;
479
+ }
480
+
481
+ #dock.side .done span {
482
+ display: none;
483
+ }
484
+
485
+ #dock.tight .chip svg,
486
+ #dock.tight .zoomed svg {
487
+ display: none;
488
+ }
489
+
490
+ #dock.tight .chip {
491
+ padding: 0 12px;
492
+ }
493
+
494
+ #dock.tight .zoomed {
495
+ padding: 0 8px;
496
+ }
497
+
498
+ #dock.tighter .done {
499
+ width: 46px;
500
+ padding: 0;
501
+ justify-content: center;
502
+ }
503
+
504
+ #dock.tighter .done span {
505
+ display: none;
506
+ }
507
+
508
+ /* Zoomed in: how far, and a tap shows the whole screen again. */
509
+ .zoomed {
510
+ height: 46px;
511
+ border-radius: 23px;
512
+ padding: 0 10px;
513
+ display: flex;
514
+ align-items: center;
515
+ gap: 4px;
516
+ font-size: 13px;
517
+ font-weight: 650;
518
+ font-variant-numeric: tabular-nums;
519
+ color: #fff;
520
+ }
521
+
522
+ .zoomed svg {
523
+ width: 16px;
524
+ height: 16px;
525
+ }
526
+
527
+ #dock.side .zoomed {
528
+ width: 46px;
529
+ padding: 0;
530
+ justify-content: center;
531
+ }
532
+
533
+ #dock.side .zoomed svg {
534
+ display: none;
535
+ }
536
+
537
+ /*
538
+ * The task panel: the bot's words in full, with tips, next to the dock. Open for a few seconds at the start, then it
539
+ * folds into the task button; a tap on that button opens it again, and a tap anywhere else folds it.
540
+ */
541
+ #hint {
542
+ position: absolute;
543
+ left: 0;
544
+ top: 0;
545
+ z-index: 6;
546
+ width: min(400px, calc(100% - 24px));
547
+ display: flex;
548
+ flex-direction: column;
549
+ border-radius: 18px;
550
+ padding: 12px 14px;
551
+ background: rgba(22, 22, 24, 0.84);
552
+ user-select: text;
553
+ -webkit-user-select: text;
554
+ transform-origin: var(--from-x, 50%) var(--from-y, 100%);
555
+ transition: opacity 0.18s ease, transform 0.22s ease;
556
+ }
557
+
558
+ #hint.away {
559
+ opacity: 0;
560
+ transform: scale(0.25);
561
+ }
562
+
563
+ .hint-top {
564
+ flex: none;
565
+ display: flex;
566
+ align-items: center;
567
+ justify-content: space-between;
568
+ gap: 8px;
569
+ margin-bottom: 6px;
570
+ font-size: 12.5px;
571
+ color: rgba(255, 255, 255, 0.72);
572
+ }
573
+
574
+ .x {
575
+ width: 32px;
576
+ height: 32px;
577
+ margin: -7px -9px -7px 0;
578
+ border-radius: 50%;
579
+ display: grid;
580
+ place-items: center;
581
+ flex: none;
582
+ color: rgba(255, 255, 255, 0.85);
583
+ }
584
+
585
+ .x:hover {
586
+ background: rgba(255, 255, 255, 0.12);
587
+ }
588
+
589
+ .x svg {
590
+ width: 18px;
591
+ height: 18px;
592
+ }
593
+
594
+ .hint-text {
595
+ min-height: 0;
596
+ flex: 0 1 auto;
597
+ overflow: auto;
598
+ overscroll-behavior: contain;
599
+ touch-action: pan-y;
600
+ font-size: 15px;
601
+ line-height: 1.55;
602
+ }
603
+
604
+ .hint-text.more-below {
605
+ -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
606
+ mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent);
607
+ }
608
+
609
+ .hint-text.more-above {
610
+ -webkit-mask-image: linear-gradient(to top, #000 calc(100% - 28px), transparent);
611
+ mask-image: linear-gradient(to top, #000 calc(100% - 28px), transparent);
612
+ }
613
+
614
+ .hint-text.more-above.more-below {
615
+ -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 28px), transparent);
616
+ mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 28px), transparent);
617
+ }
618
+
619
+ .hint-text .n {
620
+ color: #7fdcb5;
621
+ }
622
+
623
+ .hint-tips {
624
+ flex: none;
625
+ margin-top: 10px;
626
+ padding-top: 8px;
627
+ border-top: 1px solid rgba(255, 255, 255, 0.14);
628
+ font-size: 12.5px;
629
+ line-height: 1.45;
630
+ color: rgba(255, 255, 255, 0.78);
631
+ }
632
+
633
+ .hint-tips p {
634
+ margin: 0;
635
+ }
636
+
637
+ .hint-tips p + p {
638
+ margin-top: 3px;
639
+ }
640
+
641
+ .hint-meta {
642
+ flex: none;
643
+ margin-top: 6px;
644
+ font-size: 12px;
645
+ color: rgba(255, 255, 255, 0.55);
646
+ }
647
+
648
+ #toast {
649
+ position: absolute;
650
+ left: 0;
651
+ top: 0;
652
+ width: max-content;
653
+ max-width: calc(100vw - 32px);
654
+ padding: 8px 14px;
655
+ border-radius: 14px;
656
+ font-size: 13px;
657
+ z-index: 6;
658
+ text-align: center;
659
+ transition: opacity 0.6s;
660
+ pointer-events: none;
661
+ }
662
+
663
+ /* The typing strip, above the phone's keyboard. */
664
+ #strip {
665
+ position: fixed;
666
+ left: 0;
667
+ right: 0;
668
+ bottom: 0;
669
+ height: 52px;
670
+ display: flex;
671
+ align-items: center;
672
+ gap: 6px;
673
+ padding: 0 8px env(safe-area-inset-bottom);
674
+ background: rgba(32, 33, 36, 0.97);
675
+ border-top: 1px solid rgba(255, 255, 255, 0.08);
676
+ z-index: 7;
677
+ }
678
+
679
+ #strip .k {
680
+ min-width: 40px;
681
+ height: 38px;
682
+ padding: 0 8px;
683
+ border-radius: 9px;
684
+ background: rgba(255, 255, 255, 0.12);
685
+ display: grid;
686
+ place-items: center;
687
+ font-size: 14px;
688
+ color: #fff;
689
+ flex: none;
690
+ }
691
+
692
+ #strip .k.on {
693
+ background: #4fb3a5;
694
+ color: #0c1a18;
695
+ }
696
+
697
+ #strip label {
698
+ flex: 1;
699
+ min-width: 0;
700
+ height: 38px;
701
+ border-radius: 9px;
702
+ background: rgba(255, 255, 255, 0.07);
703
+ border: 1px solid rgba(255, 255, 255, 0.18);
704
+ display: flex;
705
+ align-items: center;
706
+ padding: 0 10px;
707
+ gap: 6px;
708
+ font-size: 12.5px;
709
+ color: rgba(255, 255, 255, 0.75);
710
+ overflow: hidden;
711
+ white-space: nowrap;
712
+ }
713
+
714
+ #typed {
715
+ flex: 1;
716
+ min-width: 0;
717
+ height: 100%;
718
+ border: 0;
719
+ outline: 0;
720
+ background: transparent;
721
+ color: #fff;
722
+ /* 16px keeps iOS from zooming the page when the field gets the focus. */
723
+ font: 16px var(--font);
724
+ letter-spacing: 0.5px;
725
+ }
726
+
727
+ /* Sheets from the bottom: more, and handing back. */
728
+ #scrim {
729
+ position: absolute;
730
+ inset: 0;
731
+ background: rgba(0, 0, 0, 0.42);
732
+ z-index: 8;
733
+ }
734
+
735
+ .sheet {
736
+ position: absolute;
737
+ left: 0;
738
+ right: 0;
739
+ bottom: 0;
740
+ z-index: 9;
741
+ background: var(--sheet);
742
+ color: var(--text);
743
+ border-radius: 22px 22px 0 0;
744
+ padding: 8px 16px calc(22px + env(safe-area-inset-bottom));
745
+ box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
746
+ max-height: 85%;
747
+ overflow: auto;
748
+ user-select: text;
749
+ -webkit-user-select: text;
750
+ }
751
+
752
+ .grab {
753
+ width: 38px;
754
+ height: 5px;
755
+ border-radius: 3px;
756
+ background: rgba(128, 128, 128, 0.45);
757
+ margin: 0 auto 12px;
758
+ }
759
+
760
+ .sheet h2 {
761
+ margin: 0 0 4px;
762
+ font-size: 18px;
763
+ }
764
+
765
+ .sheet p {
766
+ margin: 0 0 12px;
767
+ font-size: 13.5px;
768
+ color: var(--muted);
769
+ line-height: 1.45;
770
+ }
771
+
772
+ .tiles {
773
+ display: grid;
774
+ grid-template-columns: repeat(4, 1fr);
775
+ gap: 8px;
776
+ margin-bottom: 12px;
777
+ }
778
+
779
+ .tile {
780
+ background: var(--tile);
781
+ border-radius: 12px;
782
+ padding: 9px 4px 7px;
783
+ text-align: center;
784
+ font-size: 12px;
785
+ line-height: 1.25;
786
+ color: var(--text);
787
+ }
788
+
789
+ .tile i {
790
+ display: block;
791
+ font-style: normal;
792
+ font-size: 18px;
793
+ margin-bottom: 3px;
794
+ }
795
+
796
+ .list {
797
+ border-radius: 12px;
798
+ overflow: hidden;
799
+ }
800
+
801
+ .li {
802
+ display: flex;
803
+ justify-content: space-between;
804
+ align-items: center;
805
+ gap: 12px;
806
+ width: 100%;
807
+ padding: 11px 14px;
808
+ background: var(--tile);
809
+ font-size: 14.5px;
810
+ border-bottom: 1px solid rgba(128, 128, 128, 0.12);
811
+ color: var(--text);
812
+ text-align: left;
813
+ }
814
+
815
+ .li:last-child {
816
+ border-bottom: 0;
817
+ }
818
+
819
+ .li small {
820
+ display: block;
821
+ color: var(--muted);
822
+ font-size: 12.5px;
823
+ }
824
+
825
+ .li.red {
826
+ color: var(--bad);
827
+ }
828
+
829
+ .tog {
830
+ width: 40px;
831
+ height: 24px;
832
+ border-radius: 12px;
833
+ background: #c9c9c9;
834
+ position: relative;
835
+ flex: none;
836
+ }
837
+
838
+ .tog::after {
839
+ content: "";
840
+ position: absolute;
841
+ top: 2px;
842
+ left: 2px;
843
+ width: 20px;
844
+ height: 20px;
845
+ border-radius: 50%;
846
+ background: #fff;
847
+ transition: left 0.2s;
848
+ }
849
+
850
+ .tog.on {
851
+ background: var(--go);
852
+ }
853
+
854
+ .tog.on::after {
855
+ left: 18px;
856
+ }
857
+
858
+ .seg {
859
+ display: inline-flex;
860
+ border-radius: 8px;
861
+ overflow: hidden;
862
+ border: 1px solid rgba(128, 128, 128, 0.35);
863
+ flex: none;
864
+ }
865
+
866
+ .seg button {
867
+ padding: 4px 9px;
868
+ font-size: 12.5px;
869
+ }
870
+
871
+ .seg button.on {
872
+ background: var(--go);
873
+ color: #fff;
874
+ }
875
+
876
+ .seg button:disabled {
877
+ opacity: 0.4;
878
+ }
879
+
880
+ .pri {
881
+ display: block;
882
+ width: 100%;
883
+ text-align: center;
884
+ background: var(--go);
885
+ color: #fff;
886
+ font-weight: 650;
887
+ border-radius: 14px;
888
+ padding: 13px;
889
+ font-size: 16px;
890
+ margin-top: 10px;
891
+ }
892
+
893
+ .sec {
894
+ display: block;
895
+ width: 100%;
896
+ text-align: center;
897
+ background: var(--soft);
898
+ color: var(--text);
899
+ border-radius: 14px;
900
+ padding: 11px;
901
+ font-size: 15px;
902
+ margin-top: 8px;
903
+ }
904
+
905
+ .sheet textarea {
906
+ display: block;
907
+ width: 100%;
908
+ min-height: 64px;
909
+ resize: vertical;
910
+ background: var(--tile);
911
+ color: var(--text);
912
+ border-radius: 12px;
913
+ padding: 10px 12px;
914
+ font: 16px/1.4 var(--font);
915
+ border: 1px solid rgba(128, 128, 128, 0.25);
916
+ }
917
+
918
+ .sheet .msg {
919
+ margin: 8px 0 0;
920
+ }
921
+
922
+ /* ---- On a computer: the same dock without the keyboard button, a menu instead of the More sheet; the keyboard types straight in. ---- */
923
+
924
+ #session.desktop #strip {
925
+ display: none !important;
926
+ }
927
+
928
+ #session.desktop .ib,
929
+ #session.desktop .chip,
930
+ #session.desktop .done,
931
+ #session.desktop .zoomed {
932
+ height: 40px;
933
+ }
934
+
935
+ #session.desktop .ib {
936
+ width: 40px;
937
+ }
938
+
939
+ #session.desktop .ib svg {
940
+ width: 21px;
941
+ height: 21px;
942
+ }
943
+
944
+ #session.desktop .done {
945
+ font-size: 14.5px;
946
+ padding: 0 16px 0 12px;
947
+ }
948
+
949
+ #session.desktop #dock.side .chip {
950
+ width: 40px;
951
+ height: auto;
952
+ }
953
+
954
+ #session.desktop #dock.side .done {
955
+ width: 40px;
956
+ }
957
+
958
+ #menu {
959
+ position: absolute;
960
+ left: 0;
961
+ top: 0;
962
+ width: 290px;
963
+ border-radius: 12px;
964
+ overflow: auto;
965
+ z-index: 9;
966
+ background: var(--tile);
967
+ color: var(--text);
968
+ box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
969
+ }
970
+
971
+ #menu .li {
972
+ padding: 9px 14px;
973
+ font-size: 13.5px;
974
+ }
975
+
976
+ #menu .li kbd {
977
+ font: 12px var(--font);
978
+ color: var(--muted);
979
+ }
980
+
981
+ #menu .keys {
982
+ display: flex;
983
+ flex-wrap: wrap;
984
+ gap: 6px;
985
+ padding: 8px 14px 10px;
986
+ background: var(--tile);
987
+ border-bottom: 1px solid rgba(128, 128, 128, 0.12);
988
+ }
989
+
990
+ #menu .keys button {
991
+ background: var(--soft);
992
+ border-radius: 8px;
993
+ padding: 4px 8px;
994
+ font-size: 12.5px;
995
+ }
996
+
997
+ #session.desktop .sheet {
998
+ left: 50%;
999
+ right: auto;
1000
+ bottom: auto;
1001
+ top: 50%;
1002
+ transform: translate(-50%, -50%);
1003
+ width: min(420px, calc(100% - 32px));
1004
+ border-radius: 18px;
1005
+ padding: 18px;
1006
+ }
1007
+
1008
+ #session.desktop .sheet .grab {
1009
+ display: none;
1010
+ }