@scoriiu/fenshot 0.1.5 → 0.1.7

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,1084 @@
1
+ /* @scoriiu/fenshot/reader: the library and the book reader. The site sets the look through the --fsr-* variables
2
+ (the defaults are fenshot.com's) and places the reader with --fsr-inset (fixed, the whole window by default).
3
+ The board beside the page is the site's own (ReaderHost.BoardPanel): its styles are the site's too. */
4
+ :where(.fsr-library, .rd) {
5
+ --fsr-bg: #0c1117;
6
+ --fsr-card: #131a23;
7
+ --fsr-border: #263242;
8
+ --fsr-text: #cbd5e1;
9
+ --fsr-muted: #7a8da9;
10
+ --fsr-accent: #f59e0b;
11
+ --fsr-accent-soft: rgba(245, 158, 11, 0.12);
12
+ --fsr-rose: #fb7185;
13
+ }
14
+
15
+ .rd-drop {
16
+ position: relative;
17
+ overflow: hidden;
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ justify-content: center;
22
+ gap: 12px;
23
+ border: 2px dashed var(--fsr-border);
24
+ border-radius: 16px;
25
+ background: var(--fsr-card);
26
+ cursor: pointer;
27
+ min-height: 380px;
28
+ transition: border-color 0.15s, background 0.15s;
29
+ text-align: center;
30
+ padding: 40px;
31
+ }
32
+
33
+ .rd-drop::before {
34
+ content: "";
35
+ position: absolute;
36
+ inset: 0;
37
+ z-index: 0;
38
+ background: repeating-conic-gradient(rgba(148, 163, 184, 0.07) 0% 25%, transparent 0% 50%);
39
+ background-size: 168px 168px;
40
+ background-position: center;
41
+ -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black, transparent 78%);
42
+ mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black, transparent 78%);
43
+ opacity: 0.7;
44
+ transition: opacity 0.25s;
45
+ pointer-events: none;
46
+ }
47
+
48
+ .rd-drop::after {
49
+ content: "";
50
+ position: absolute;
51
+ inset: 0;
52
+ z-index: 0;
53
+ background: radial-gradient(ellipse 55% 45% at 50% 42%, rgba(245, 158, 11, 0.06), transparent 70%);
54
+ opacity: 0;
55
+ transition: opacity 0.25s;
56
+ pointer-events: none;
57
+ }
58
+
59
+ .rd-drop > * {
60
+ position: relative;
61
+ z-index: 1;
62
+ }
63
+
64
+ .rd-drop-title {
65
+ font-size: 24px;
66
+ font-weight: 600;
67
+ color: #f1f5f9;
68
+ }
69
+
70
+ .rd-drop-sub {
71
+ color: var(--fsr-text);
72
+ font-size: 15px;
73
+ }
74
+
75
+ .rd-drop-sub kbd {
76
+ background: #1e293b;
77
+ border: 1px solid var(--fsr-border);
78
+ border-bottom-width: 2px;
79
+ border-radius: 5px;
80
+ padding: 1px 7px;
81
+ font-size: 13px;
82
+ }
83
+
84
+ .rd-drop-hint {
85
+ color: var(--fsr-muted);
86
+ font-size: 13px;
87
+ }
88
+
89
+ .rd-error {
90
+ color: var(--fsr-rose);
91
+ font-size: 14px;
92
+ margin-top: 8px;
93
+ }
94
+
95
+ .rd-status {
96
+ display: flex;
97
+ flex-direction: column;
98
+ align-items: center;
99
+ gap: 16px;
100
+ color: var(--fsr-text);
101
+ font-size: 16px;
102
+ }
103
+
104
+ .rd-spinner {
105
+ width: 34px;
106
+ height: 34px;
107
+ border: 3px solid var(--fsr-border);
108
+ border-top-color: var(--fsr-accent);
109
+ border-radius: 50%;
110
+ animation: rd-spin2 0.8s linear infinite;
111
+ }
112
+
113
+ @keyframes rd-spin2 {
114
+ to {
115
+ transform: rotate(360deg);
116
+ }
117
+ }
118
+
119
+ .rd-btn:disabled {
120
+ opacity: 0.4;
121
+ cursor: default;
122
+ pointer-events: none;
123
+ }
124
+
125
+ .rd-btn {
126
+ display: inline-flex;
127
+ align-items: center;
128
+ justify-content: center;
129
+ height: 42px;
130
+ padding: 0 18px;
131
+ border-radius: 10px;
132
+ border: 1px solid var(--fsr-border);
133
+ background: var(--fsr-card);
134
+ color: var(--fsr-text);
135
+ font-size: 14px;
136
+ font-weight: 500;
137
+ text-decoration: none;
138
+ cursor: pointer;
139
+ }
140
+
141
+ .rd-btn:hover {
142
+ border-color: var(--fsr-muted);
143
+ }
144
+
145
+ .rd-btn-primary {
146
+ background: var(--fsr-accent);
147
+ border-color: var(--fsr-accent);
148
+ color: #0c1117;
149
+ font-weight: 600;
150
+ }
151
+
152
+ .rd-btn-primary:hover {
153
+ background: #fbbf24;
154
+ border-color: #fbbf24;
155
+ }
156
+
157
+ .rd-btn-quiet {
158
+ height: 36px;
159
+ padding: 0 14px;
160
+ font-size: 13px;
161
+ }
162
+
163
+ /* fenshot.com/read/: the library and the book reader. The scanner's own
164
+ tokens and buttons (app.css); only what the reader adds is here. */
165
+ /* ── The library ─────────────────────────────────────────────── */
166
+ .brand a {
167
+ color: inherit;
168
+ text-decoration: none;
169
+ }
170
+
171
+ .lib {
172
+ max-width: 880px;
173
+ margin: 0 auto;
174
+ width: 100%;
175
+ display: flex;
176
+ flex-direction: column;
177
+ gap: 36px;
178
+ padding-bottom: 24px;
179
+ }
180
+
181
+ .lib-drop {
182
+ min-height: 240px;
183
+ }
184
+
185
+ .lib > .demo-media {
186
+ border: 1px solid var(--fsr-border);
187
+ border-radius: 14px;
188
+ }
189
+
190
+ .lib-choose {
191
+ display: inline-flex;
192
+ align-items: center;
193
+ gap: 8px;
194
+ height: 46px;
195
+ padding: 0 22px;
196
+ font-size: 15px;
197
+ }
198
+
199
+ .lib-choose svg {
200
+ width: 18px;
201
+ height: 18px;
202
+ }
203
+
204
+ .lib-section h2 {
205
+ margin: 0;
206
+ color: #f1f5f9;
207
+ font-size: 18px;
208
+ font-weight: 600;
209
+ }
210
+
211
+ .lib-head {
212
+ display: flex;
213
+ align-items: baseline;
214
+ gap: 12px;
215
+ margin-bottom: 14px;
216
+ }
217
+
218
+ .lib-head span {
219
+ color: var(--fsr-muted);
220
+ font-size: 13px;
221
+ }
222
+
223
+ /* The books on this device: one list, a row a book. */
224
+ .lib-list {
225
+ list-style: none;
226
+ margin: 0;
227
+ padding: 0;
228
+ border: 1px solid var(--fsr-border);
229
+ border-radius: 14px;
230
+ background: var(--fsr-card);
231
+ }
232
+
233
+ .lib-row {
234
+ display: flex;
235
+ align-items: center;
236
+ gap: 14px;
237
+ padding: 12px 10px 12px 12px;
238
+ min-width: 0;
239
+ transition: background 0.12s;
240
+ }
241
+
242
+ .lib-row + .lib-row {
243
+ border-top: 1px solid var(--fsr-border);
244
+ }
245
+
246
+ .lib-row:first-child {
247
+ border-radius: 14px 14px 0 0;
248
+ }
249
+
250
+ .lib-row:last-child {
251
+ border-radius: 0 0 14px 14px;
252
+ }
253
+
254
+ .lib-row:only-child {
255
+ border-radius: 14px;
256
+ }
257
+
258
+ .lib-row:hover {
259
+ background: rgba(148, 163, 184, 0.06);
260
+ }
261
+
262
+ .lib-cover {
263
+ flex: none;
264
+ width: 42px;
265
+ height: 56px;
266
+ padding: 0;
267
+ overflow: hidden;
268
+ border-radius: 4px;
269
+ border: 1px solid #2c3a4d;
270
+ background: linear-gradient(160deg, #1b2533, #121922);
271
+ color: var(--fsr-accent);
272
+ cursor: pointer;
273
+ display: flex;
274
+ align-items: center;
275
+ justify-content: center;
276
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
277
+ }
278
+
279
+ .lib-cover img {
280
+ width: 100%;
281
+ height: 100%;
282
+ object-fit: cover;
283
+ object-position: top;
284
+ }
285
+
286
+ .lib-cover svg {
287
+ width: 22px;
288
+ height: 22px;
289
+ opacity: 0.85;
290
+ }
291
+
292
+ .lib-about {
293
+ flex: 1;
294
+ min-width: 0;
295
+ display: flex;
296
+ flex-direction: column;
297
+ gap: 4px;
298
+ }
299
+
300
+ .lib-name {
301
+ max-width: 100%;
302
+ background: none;
303
+ border: 0;
304
+ padding: 0;
305
+ color: #f1f5f9;
306
+ font-size: 15px;
307
+ font-weight: 600;
308
+ text-align: start;
309
+ cursor: pointer;
310
+ overflow: hidden;
311
+ text-overflow: ellipsis;
312
+ white-space: nowrap;
313
+ }
314
+
315
+ .lib-name:hover {
316
+ color: var(--fsr-accent);
317
+ }
318
+
319
+ .lib-rename input {
320
+ width: 100%;
321
+ height: 30px;
322
+ padding: 0 8px;
323
+ border-radius: 6px;
324
+ border: 1px solid var(--fsr-accent);
325
+ background: var(--fsr-bg);
326
+ color: #f1f5f9;
327
+ font-size: 15px;
328
+ }
329
+
330
+ .lib-meta {
331
+ margin: 0;
332
+ color: var(--fsr-muted);
333
+ font-size: 13px;
334
+ font-variant-numeric: tabular-nums;
335
+ overflow: hidden;
336
+ text-overflow: ellipsis;
337
+ white-space: nowrap;
338
+ }
339
+
340
+ .lib-meta b {
341
+ color: var(--fsr-accent);
342
+ font-weight: 600;
343
+ }
344
+
345
+ .lib-progress {
346
+ width: min(100%, 220px);
347
+ height: 3px;
348
+ margin-top: 3px;
349
+ border-radius: 2px;
350
+ background: #1e2937;
351
+ overflow: hidden;
352
+ }
353
+
354
+ .lib-progress span {
355
+ display: block;
356
+ height: 100%;
357
+ border-radius: 2px;
358
+ background: var(--fsr-accent);
359
+ }
360
+
361
+ .lib-when {
362
+ flex: none;
363
+ min-width: 64px;
364
+ color: var(--fsr-muted);
365
+ font-size: 13px;
366
+ text-align: end;
367
+ white-space: nowrap;
368
+ }
369
+
370
+ /* On a phone the date moves into the line under the name. */
371
+ .lib-when-inline {
372
+ display: none;
373
+ }
374
+
375
+ .lib-open {
376
+ flex: none;
377
+ height: 36px;
378
+ padding: 0 14px;
379
+ font-size: 13.5px;
380
+ white-space: nowrap;
381
+ }
382
+
383
+ .lib-menu {
384
+ position: relative;
385
+ flex: none;
386
+ }
387
+
388
+ .lib-menu-list {
389
+ position: absolute;
390
+ top: 40px;
391
+ inset-inline-end: 0;
392
+ z-index: 10;
393
+ min-width: 150px;
394
+ margin: 0;
395
+ padding: 5px;
396
+ list-style: none;
397
+ background: #17202c;
398
+ border: 1px solid var(--fsr-border);
399
+ border-radius: 10px;
400
+ box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
401
+ }
402
+
403
+ .lib-menu-list button {
404
+ width: 100%;
405
+ height: 36px;
406
+ padding: 0 12px;
407
+ border: 0;
408
+ border-radius: 7px;
409
+ background: none;
410
+ color: var(--fsr-text);
411
+ font-size: 14px;
412
+ text-align: start;
413
+ cursor: pointer;
414
+ }
415
+
416
+ .lib-menu-list button:hover {
417
+ background: rgba(148, 163, 184, 0.12);
418
+ }
419
+
420
+ .lib-menu-list .lib-danger {
421
+ color: var(--fsr-rose);
422
+ }
423
+
424
+ /* What the reader does, in three short points under the shelf: no numbered steps, it is not a procedure. */
425
+ .lib-points {
426
+ list-style: none;
427
+ margin: 0;
428
+ padding: 22px 0 0;
429
+ border-top: 1px solid var(--fsr-border);
430
+ display: grid;
431
+ grid-template-columns: repeat(3, 1fr);
432
+ gap: 28px;
433
+ }
434
+
435
+ .lib-points svg {
436
+ width: 22px;
437
+ height: 22px;
438
+ color: var(--fsr-accent);
439
+ }
440
+
441
+ .lib-point-title {
442
+ margin: 8px 0 4px;
443
+ color: #f1f5f9;
444
+ font-weight: 600;
445
+ font-size: 15px;
446
+ }
447
+
448
+ .lib-point-sub {
449
+ margin: 0;
450
+ color: var(--fsr-muted);
451
+ font-size: 14px;
452
+ line-height: 1.55;
453
+ }
454
+
455
+ /* ── A book open ─────────────────────────────────────────────── */
456
+ body.reading {
457
+ overflow: hidden;
458
+ }
459
+
460
+ body.reading #seo-content {
461
+ display: none;
462
+ }
463
+
464
+ .rd {
465
+ position: fixed;
466
+ inset: var(--fsr-inset, 0);
467
+ z-index: var(--fsr-z, 10);
468
+ display: flex;
469
+ flex-direction: column;
470
+ background: var(--fsr-bg);
471
+ color: var(--fsr-text);
472
+ }
473
+
474
+ .rd-bar {
475
+ flex: none;
476
+ height: 52px;
477
+ display: flex;
478
+ align-items: center;
479
+ gap: 10px;
480
+ padding: 0 10px;
481
+ border-bottom: 1px solid var(--fsr-border);
482
+ background: #0f151d;
483
+ }
484
+
485
+ .rd-back,
486
+ .rd-icon,
487
+ .rd-chip {
488
+ display: inline-flex;
489
+ align-items: center;
490
+ justify-content: center;
491
+ border: 0;
492
+ background: none;
493
+ color: var(--fsr-text);
494
+ cursor: pointer;
495
+ border-radius: 8px;
496
+ }
497
+
498
+ .rd-back {
499
+ gap: 2px;
500
+ height: 36px;
501
+ padding: 0 10px 0 4px;
502
+ font-size: 14px;
503
+ }
504
+
505
+ .rd-back svg,
506
+ .rd-icon svg {
507
+ width: 18px;
508
+ height: 18px;
509
+ }
510
+
511
+ .rd-icon {
512
+ flex: none;
513
+ width: 36px;
514
+ height: 36px;
515
+ }
516
+
517
+ .rd-back:hover,
518
+ .rd-icon:hover:not(:disabled) {
519
+ background: rgba(148, 163, 184, 0.12);
520
+ }
521
+
522
+ .rd-icon:disabled {
523
+ opacity: 0.3;
524
+ cursor: default;
525
+ }
526
+
527
+ .rd-title {
528
+ flex: 1;
529
+ min-width: 0;
530
+ color: #f1f5f9;
531
+ font-size: 14px;
532
+ font-weight: 600;
533
+ overflow: hidden;
534
+ text-overflow: ellipsis;
535
+ white-space: nowrap;
536
+ }
537
+
538
+ .rd-chip svg {
539
+ width: 16px;
540
+ height: 16px;
541
+ }
542
+
543
+ .rd-icon-framed {
544
+ border: 1px solid var(--fsr-border);
545
+ background: var(--fsr-card);
546
+ }
547
+
548
+ .rd-chip {
549
+ gap: 6px;
550
+ height: 32px;
551
+ padding: 0 12px;
552
+ border: 1px solid var(--fsr-border);
553
+ background: var(--fsr-card);
554
+ font-size: 13px;
555
+ }
556
+
557
+ .rd-chip:hover {
558
+ border-color: var(--fsr-muted);
559
+ }
560
+
561
+ .rd-contents {
562
+ position: relative;
563
+ }
564
+
565
+ .rd-contents-list {
566
+ position: absolute;
567
+ top: 40px;
568
+ inset-inline-end: 0;
569
+ z-index: 30;
570
+ width: min(340px, 86vw);
571
+ max-height: 62vh;
572
+ overflow-y: auto;
573
+ margin: 0;
574
+ padding: 6px;
575
+ list-style: none;
576
+ background: var(--fsr-card);
577
+ border: 1px solid var(--fsr-border);
578
+ border-radius: 12px;
579
+ box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
580
+ }
581
+
582
+ .rd-contents-list button {
583
+ width: 100%;
584
+ min-height: 36px;
585
+ display: flex;
586
+ align-items: center;
587
+ justify-content: space-between;
588
+ gap: 12px;
589
+ padding: 6px 12px;
590
+ border: 0;
591
+ border-radius: 8px;
592
+ background: none;
593
+ color: var(--fsr-text);
594
+ font-size: 13.5px;
595
+ text-align: start;
596
+ cursor: pointer;
597
+ }
598
+
599
+ .rd-contents-list button:hover {
600
+ background: rgba(148, 163, 184, 0.12);
601
+ }
602
+
603
+ .rd-contents-page {
604
+ color: var(--fsr-muted);
605
+ font-variant-numeric: tabular-nums;
606
+ }
607
+
608
+ /* The book's diagrams: how many, which one is open, the one before and the next. */
609
+ .rd-nav {
610
+ position: relative;
611
+ flex: none;
612
+ display: inline-flex;
613
+ align-items: center;
614
+ height: 32px;
615
+ border: 1px solid var(--fsr-border);
616
+ border-radius: 8px;
617
+ background: var(--fsr-card);
618
+ overflow: hidden;
619
+ }
620
+
621
+ .rd-nav .rd-icon {
622
+ width: 30px;
623
+ height: 30px;
624
+ border-radius: 0;
625
+ }
626
+
627
+ .rd-nav-count {
628
+ display: inline-flex;
629
+ align-items: center;
630
+ gap: 6px;
631
+ min-width: 44px;
632
+ box-sizing: content-box;
633
+ justify-content: center;
634
+ padding: 0 4px;
635
+ color: #f1f5f9;
636
+ font-size: 13px;
637
+ font-variant-numeric: tabular-nums;
638
+ }
639
+
640
+ .rd-nav-count svg {
641
+ width: 15px;
642
+ height: 15px;
643
+ color: var(--fsr-accent);
644
+ }
645
+
646
+ .rd-nav-count b {
647
+ font-weight: 600;
648
+ }
649
+
650
+ .rd-nav-count i {
651
+ color: var(--fsr-muted);
652
+ font-style: normal;
653
+ }
654
+
655
+ .rd-select {
656
+ flex: none;
657
+ }
658
+
659
+ .rd-select.on {
660
+ border-color: var(--fsr-accent);
661
+ background: var(--fsr-accent-soft);
662
+ color: var(--fsr-accent);
663
+ }
664
+
665
+ /* While the book is still being searched: how far, as a line under the count. */
666
+ .rd-nav-progress {
667
+ position: absolute;
668
+ left: 0;
669
+ right: 0;
670
+ bottom: 0;
671
+ height: 2px;
672
+ background: rgba(148, 163, 184, 0.18);
673
+ }
674
+
675
+ .rd-nav-progress span {
676
+ display: block;
677
+ height: 100%;
678
+ background: var(--fsr-accent);
679
+ transition: width 0.3s linear;
680
+ }
681
+
682
+ .rd-pagebox {
683
+ flex: none;
684
+ display: inline-flex;
685
+ align-items: center;
686
+ gap: 6px;
687
+ color: var(--fsr-muted);
688
+ font-size: 13px;
689
+ font-variant-numeric: tabular-nums;
690
+ }
691
+
692
+ .rd-pagebox input {
693
+ width: 54px;
694
+ height: 32px;
695
+ border-radius: 8px;
696
+ border: 1px solid var(--fsr-border);
697
+ background: var(--fsr-card);
698
+ color: #f1f5f9;
699
+ font-size: 14px;
700
+ text-align: center;
701
+ appearance: textfield;
702
+ -moz-appearance: textfield;
703
+ }
704
+
705
+ .rd-pagebox input::-webkit-outer-spin-button,
706
+ .rd-pagebox input::-webkit-inner-spin-button {
707
+ -webkit-appearance: none;
708
+ margin: 0;
709
+ }
710
+
711
+ .rd-zoom {
712
+ flex: none;
713
+ display: flex;
714
+ align-items: center;
715
+ height: 32px;
716
+ border: 1px solid var(--fsr-border);
717
+ border-radius: 8px;
718
+ background: var(--fsr-card);
719
+ overflow: hidden;
720
+ }
721
+
722
+ .rd-zoom .rd-icon {
723
+ width: 30px;
724
+ height: 30px;
725
+ border-radius: 0;
726
+ }
727
+
728
+ /* The size now; a press on it is back to 100%. */
729
+ .rd-zoom-now {
730
+ width: 50px;
731
+ height: 30px;
732
+ border: 0;
733
+ background: none;
734
+ color: #f1f5f9;
735
+ font-size: 13px;
736
+ font-variant-numeric: tabular-nums;
737
+ cursor: pointer;
738
+ }
739
+
740
+ .rd-zoom-now:hover:not(:disabled) {
741
+ background: rgba(148, 163, 184, 0.12);
742
+ }
743
+
744
+ .rd-zoom-now:disabled {
745
+ color: var(--fsr-muted);
746
+ cursor: default;
747
+ }
748
+
749
+ .rd-body {
750
+ flex: 1;
751
+ min-height: 0;
752
+ display: flex;
753
+ }
754
+
755
+ .rd-pages {
756
+ flex: 1;
757
+ min-width: 0;
758
+ overflow: auto;
759
+ display: flex;
760
+ flex-direction: column;
761
+ align-items: flex-start;
762
+ gap: 14px;
763
+ padding: 16px 12px 96px;
764
+ background: #080b10;
765
+ outline: none;
766
+ overscroll-behavior: contain;
767
+ touch-action: manipulation;
768
+ }
769
+
770
+ .rd-page {
771
+ position: relative;
772
+ flex: none;
773
+ margin-inline: auto;
774
+ background: #fff;
775
+ border-radius: 3px;
776
+ box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5);
777
+ overflow: hidden;
778
+ -webkit-user-select: none;
779
+ user-select: none;
780
+ }
781
+
782
+ .rd-page canvas {
783
+ display: block;
784
+ width: 100%;
785
+ height: 100%;
786
+ }
787
+
788
+ .rd-page-no {
789
+ position: absolute;
790
+ bottom: 5px;
791
+ inset-inline-end: 8px;
792
+ color: rgba(15, 23, 42, 0.4);
793
+ font-size: 11px;
794
+ pointer-events: none;
795
+ }
796
+
797
+ /* A diagram found on the page. Its box is the 64 squares; the frame is drawn around them, a little way out, so it
798
+ never lies on the board's own edge squares: a dot at rest, the frame under the pointer, held while its
799
+ board is open. */
800
+ .rd-diagram {
801
+ --out: -2%;
802
+ position: absolute;
803
+ padding: 0;
804
+ border: 0;
805
+ background: transparent;
806
+ cursor: pointer;
807
+ }
808
+
809
+ .rd-diagram::before {
810
+ content: "";
811
+ position: absolute;
812
+ inset: var(--out);
813
+ border: 2px solid transparent;
814
+ transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
815
+ }
816
+
817
+ /* Its sign that the diagram was found, there before any pointer: one small amber dot off the board's top corner,
818
+ in the page's margin. Four corners and a filled corner were both tried and were too loud on a page of six
819
+ diagrams (founder 2026-12-05). */
820
+ .rd-diagram::after {
821
+ content: "";
822
+ position: absolute;
823
+ top: var(--out);
824
+ inset-inline-end: var(--out);
825
+ width: 6px;
826
+ height: 6px;
827
+ margin: -3px;
828
+ border-radius: 50%;
829
+ background: var(--fsr-accent);
830
+ opacity: 0.75;
831
+ transition: opacity 0.12s;
832
+ pointer-events: none;
833
+ }
834
+
835
+ .rd-diagram:hover::after,
836
+ .rd-diagram.on::after {
837
+ opacity: 0;
838
+ }
839
+
840
+ .rd-diagram:focus-visible {
841
+ outline: none;
842
+ }
843
+
844
+ .rd-diagram:hover::before,
845
+ .rd-diagram:focus-visible::before {
846
+ border-color: var(--fsr-accent);
847
+ background: rgba(245, 158, 11, 0.07);
848
+ }
849
+
850
+ .rd-diagram.on {
851
+ pointer-events: none;
852
+ }
853
+
854
+ .rd-diagram.on::before {
855
+ border-color: var(--fsr-accent);
856
+ box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22);
857
+ }
858
+
859
+ /* The reader draws a box around a diagram that was not found. */
860
+ .rd-selecting .rd-page {
861
+ cursor: crosshair;
862
+ touch-action: none;
863
+ }
864
+
865
+ .rd-selecting .rd-diagram {
866
+ pointer-events: none;
867
+ }
868
+
869
+ .rd-marquee {
870
+ position: absolute;
871
+ border: 2px solid var(--fsr-accent);
872
+ border-radius: 3px;
873
+ background: rgba(245, 158, 11, 0.12);
874
+ pointer-events: none;
875
+ }
876
+
877
+ .rd-busy {
878
+ position: absolute;
879
+ width: 30px;
880
+ height: 30px;
881
+ margin: -15px 0 0 -15px;
882
+ border-radius: 50%;
883
+ border: 3px solid rgba(245, 158, 11, 0.25);
884
+ border-top-color: var(--fsr-accent);
885
+ animation: rd-spin 0.7s linear infinite;
886
+ pointer-events: none;
887
+ }
888
+
889
+ @keyframes rd-spin {
890
+ to { transform: rotate(360deg); }
891
+ }
892
+
893
+ /* ── The board beside the page ───────────────────────────────── */
894
+ /* The edge between the book and the board, to drag. */
895
+ .rd-grip {
896
+ position: relative;
897
+ z-index: 5;
898
+ flex: none;
899
+ width: 11px;
900
+ margin-inline: -5px;
901
+ cursor: col-resize;
902
+ touch-action: none;
903
+ outline: none;
904
+ }
905
+
906
+ .rd-grip::after {
907
+ content: "";
908
+ position: absolute;
909
+ top: 0;
910
+ bottom: 0;
911
+ left: 4px;
912
+ width: 3px;
913
+ background: var(--fsr-accent);
914
+ opacity: 0;
915
+ transition: opacity 0.12s;
916
+ }
917
+
918
+ .rd-grip:hover::after,
919
+ .rd-grip:focus-visible::after,
920
+ .rd-resizing .rd-grip::after {
921
+ opacity: 0.9;
922
+ }
923
+
924
+ .rd-resizing {
925
+ cursor: col-resize;
926
+ -webkit-user-select: none;
927
+ user-select: none;
928
+ }
929
+
930
+ .rd-resizing .rd-pages,
931
+ .rd-resizing .rd-side {
932
+ pointer-events: none;
933
+ }
934
+
935
+ .rd-side {
936
+ flex: none;
937
+ width: var(--rd-side, 480px);
938
+ max-width: 62vw;
939
+ border-inline-start: 1px solid var(--fsr-border);
940
+ background: var(--fsr-bg);
941
+ overflow-y: auto;
942
+ padding: 14px;
943
+ display: flex;
944
+ flex-direction: column;
945
+ gap: 12px;
946
+ }
947
+
948
+ .rd-side-empty {
949
+ align-items: center;
950
+ justify-content: center;
951
+ text-align: center;
952
+ color: var(--fsr-muted);
953
+ }
954
+
955
+ .rd-side-empty svg {
956
+ width: 44px;
957
+ height: 44px;
958
+ opacity: 0.45;
959
+ }
960
+
961
+ .rd-hint {
962
+ margin: 6px 0 0;
963
+ color: #e2e8f0;
964
+ font-size: 16px;
965
+ font-weight: 600;
966
+ }
967
+
968
+ .rd-hint-sub {
969
+ margin: 0;
970
+ font-size: 14px;
971
+ }
972
+
973
+ .rd-toast {
974
+ position: fixed;
975
+ left: 50%;
976
+ bottom: 28px;
977
+ transform: translateX(-50%);
978
+ z-index: 40;
979
+ max-width: 90vw;
980
+ padding: 8px 8px 8px 16px;
981
+ border-radius: 12px;
982
+ border: 1px solid var(--fsr-border);
983
+ background: #17202c;
984
+ color: #f1f5f9;
985
+ font-size: 14px;
986
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
987
+ display: flex;
988
+ align-items: center;
989
+ gap: 12px;
990
+ }
991
+
992
+ .rd-toast .btn {
993
+ flex: none;
994
+ }
995
+
996
+ /* ── Narrow screens: the page takes the width, the board comes up from below ── */
997
+ @media (max-width: 900px) {
998
+ .lib-points {
999
+ grid-template-columns: 1fr;
1000
+ gap: 18px;
1001
+ }
1002
+
1003
+ .lib-size {
1004
+ display: none;
1005
+ }
1006
+
1007
+ .lib-when {
1008
+ display: none;
1009
+ }
1010
+
1011
+ .lib-when-inline {
1012
+ display: inline;
1013
+ }
1014
+
1015
+ .lib-row {
1016
+ gap: 10px;
1017
+ }
1018
+
1019
+ .lib-open {
1020
+ padding: 0 12px;
1021
+ }
1022
+
1023
+ .rd-bar {
1024
+ gap: 6px;
1025
+ padding: 0 6px;
1026
+ }
1027
+
1028
+ .rd-back span,
1029
+ .rd-contents .rd-chip span,
1030
+ .rd-side-empty,
1031
+ .rd-grip,
1032
+ .rd-fen {
1033
+ display: none;
1034
+ }
1035
+
1036
+ .rd-back {
1037
+ padding: 0 4px;
1038
+ }
1039
+
1040
+ .rd-contents .rd-chip {
1041
+ width: 36px;
1042
+ padding: 0;
1043
+ }
1044
+
1045
+ .rd-pagebox input {
1046
+ width: 46px;
1047
+ }
1048
+
1049
+ .rd-pages {
1050
+ padding: 10px 6px 96px;
1051
+ gap: 10px;
1052
+ }
1053
+
1054
+ .rd-side {
1055
+ position: fixed;
1056
+ left: var(--fsr-sheet-left, 0);
1057
+ right: 0;
1058
+ bottom: 0;
1059
+ z-index: 20;
1060
+ width: auto;
1061
+ max-width: none;
1062
+ max-height: 82dvh;
1063
+ gap: 8px;
1064
+ border-inline-start: 0;
1065
+ border-top: 1px solid var(--fsr-border);
1066
+ border-radius: 16px 16px 0 0;
1067
+ box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.55);
1068
+ padding: 6px 12px calc(10px + env(safe-area-inset-bottom));
1069
+ }
1070
+ }
1071
+
1072
+ /* A phone: the bar keeps the diagrams, the box to draw (its sign alone) and the page. The size of the pages
1073
+ leaves it: the browser's own pinch does that. */
1074
+ @media (max-width: 520px) {
1075
+ .rd-zoom,
1076
+ .rd-select span {
1077
+ display: none;
1078
+ }
1079
+
1080
+ .rd-select {
1081
+ width: 36px;
1082
+ padding: 0;
1083
+ }
1084
+ }