Repository navigation
Expand file tree
/
Copy pathstyles.css
More file actions
1440 lines (1328 loc) · 39 KB
/
Copy pathstyles.css
File metadata and controls
1440 lines (1328 loc) · 39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Randomness plugin styles.
*
* Kept minimal — uses Obsidian's CSS variables so the UI inherits the
* user's theme. Override in your snippets folder if you want a
* different look.
*/
/* Inline rdm: rendering */
.randomness-clickable {
/* Generic "this element is clickable" pointer cue. Used by
* the browser pane's result body to signal click-to-copy. */
cursor: pointer;
}
.randomness-inline {
display: inline-flex;
align-items: center;
gap: 0.35em;
padding: 0 0.25em;
border-radius: 3px;
background: var(--background-modifier-hover);
font-family: inherit;
}
.randomness-inline-locked {
background: var(--background-modifier-success);
color: var(--text-on-accent);
}
.randomness-inline-preview {
background: var(--background-modifier-hover);
font-style: italic;
}
.randomness-inline-result {
/* The actual result text */
}
.randomness-inline-controls {
display: inline-flex;
gap: 0.15em;
/* Always visible. The earlier opacity-fade-on-hover hid them in
* Live Preview where mouse-tracking interacts oddly with
* CodeMirror, and made the lock/reroll buttons hard to find on
* first inspection. Explicit pointer-events guards against theme
* snippets that disable pointer-events on inline-children of
* code-styled spans. */
pointer-events: auto;
}
.randomness-inline-button {
background: none;
border: none;
padding: 0 0.15em;
margin: 0;
cursor: pointer;
font-size: 0.85em;
line-height: 1;
color: inherit;
/* Match the controls' pointer-events guard. */
pointer-events: auto;
}
.randomness-inline-button:hover {
opacity: 0.7;
}
.randomness-inline-error {
/* Red text on a neutral panel background — readable in every
* theme. (Red-on-red was unreadable in dark themes where
* `--background-modifier-error` is a vivid solid red.) */
color: var(--text-error);
background: var(--background-secondary);
border: 1px solid var(--text-error);
border-radius: 4px;
padding: 0 0.3em;
font-family: var(--font-monospace);
font-size: 0.85em;
}
/* Codeblock output */
.randomness-loading {
color: var(--text-muted);
font-style: italic;
}
.randomness-output {
/* Inherit from the surrounding markdown styling */
}
.randomness-error {
/* Both `--background-modifier-error` AND its `-hover` variant are
* vivid solid reds in many themes, and `--text-error` is also red
* — so any of them as the background gave red-on-red, leaving the
* message unreadable. Use the neutral panel background with the
* normal text colour so the message is always legible; the strong
* red is reserved for the left border so the row still reads as an
* error at a glance. */
color: var(--text-normal);
background: var(--background-secondary);
padding: 0.5em 0.75em;
border-radius: 4px;
border-left: 3px solid var(--text-error);
}
.randomness-error > strong {
color: var(--text-error);
display: block;
margin-bottom: 0.25em;
}
.randomness-error-message {
color: var(--text-normal);
font-family: var(--font-monospace);
font-size: 0.85em;
margin-top: 0.25em;
white-space: pre-wrap;
}
/* Prompt controls */
.randomness-prompts {
display: flex;
flex-direction: column;
gap: 0.4em;
padding: 0.5em 0.75em;
margin-bottom: 0.75em;
background: var(--background-secondary);
border-radius: 4px;
}
.randomness-prompt-row {
display: flex;
align-items: center;
gap: 0.5em;
}
.randomness-prompt-label {
font-weight: 500;
min-width: 8em;
}
.randomness-prompt-input,
.randomness-prompt-select {
flex: 1;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
color: var(--text-normal);
padding: 0.2em 0.4em;
border-radius: 3px;
font-family: inherit;
font-size: inherit;
}
/* Reroll control (codeblock rollers) */
.randomness-codeblock-controls {
display: flex;
justify-content: flex-start;
margin-bottom: 0.75em;
}
.randomness-reroll-btn {
display: inline-flex;
align-items: center;
gap: 0.35em;
padding: 0.25em 0.7em;
background: var(--interactive-normal);
color: var(--text-normal);
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
cursor: pointer;
font-family: inherit;
font-size: inherit;
line-height: 1.2;
box-shadow: var(--input-shadow, none);
}
.randomness-reroll-btn:hover {
background: var(--interactive-hover);
}
.randomness-reroll-btn:active {
background: var(--interactive-accent);
color: var(--text-on-accent);
}
.randomness-reroll-btn:focus-visible {
outline: 2px solid var(--interactive-accent);
outline-offset: 1px;
}
/* ── Generator browser (right-sidebar pane) ── */
.randomness-browser {
display: flex;
flex-direction: column;
height: 100%;
padding: 0.5em;
gap: 0.5em;
overflow: hidden;
}
.randomness-browser-loading {
color: var(--text-muted);
font-style: italic;
padding: 1em;
text-align: center;
}
.randomness-browser-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5em;
}
.randomness-browser-header h3 {
margin: 0;
font-size: 1em;
}
.randomness-browser-header-actions {
display: flex;
gap: 0.3em;
flex-shrink: 0;
}
.randomness-browser-collapse-all,
.randomness-browser-reload {
background: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
color: var(--text-normal);
padding: 0.2em 0.6em;
border-radius: 3px;
cursor: pointer;
font-size: 0.8em;
}
.randomness-browser-collapse-all:hover,
.randomness-browser-reload:hover {
background: var(--background-modifier-hover);
}
.randomness-browser-filter {
width: 100%;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
color: var(--text-normal);
padding: 0.3em 0.5em;
border-radius: 3px;
font-family: inherit;
font-size: inherit;
}
.randomness-browser-list {
flex: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 0.6em;
}
.randomness-browser-empty {
color: var(--text-muted);
font-style: italic;
text-align: center;
padding: 1em 0;
}
/* Tree nodes — folders and files. Indentation comes from nesting the
* children container; each level adds extra left-padding. */
.randomness-browser-folder,
.randomness-browser-file {
display: flex;
flex-direction: column;
}
.randomness-browser-folder-header,
.randomness-browser-file-header {
display: flex;
align-items: center;
gap: 0.3em;
padding: 0.2em 0.3em;
border-radius: 3px;
cursor: pointer;
user-select: none;
/* Keep names from overflowing the sidebar horizontally; long names
* truncate with an ellipsis instead. */
min-width: 0;
}
.randomness-browser-folder-header:hover,
.randomness-browser-file-header:hover {
background: var(--background-modifier-hover);
}
.randomness-browser-chevron {
color: var(--text-muted);
font-size: 0.8em;
width: 1em;
flex-shrink: 0;
text-align: center;
}
.randomness-browser-folder-name {
font-weight: 600;
color: var(--text-normal);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
min-width: 0;
}
.randomness-browser-file-title {
color: var(--text-normal);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
min-width: 0;
}
.randomness-browser-folder-count,
.randomness-browser-file-count {
color: var(--text-muted);
font-size: 0.75em;
background: var(--background-modifier-border);
padding: 0 0.4em;
border-radius: 8px;
flex-shrink: 0;
}
/* Indent children one level. Nested folders inherit the indent
* cumulatively, so the depth is visible without per-level styles. */
.randomness-browser-folder-children {
padding-left: 0.9em;
border-left: 1px dotted var(--background-modifier-border);
margin-left: 0.4em;
}
.randomness-browser-entry-error {
color: var(--text-error);
font-size: 0.85em;
padding: 0.2em 0.5em;
}
.randomness-browser-entry-note {
color: var(--text-muted);
font-style: italic;
font-size: 0.85em;
padding: 0.2em 0.5em;
}
.randomness-browser-tables {
display: flex;
flex-direction: column;
gap: 0.2em;
/* Tables sit just inside an expanded file; indent them a touch
* so they group visually under the file's title row. */
padding-left: 1.4em;
padding-top: 0.2em;
padding-bottom: 0.2em;
}
.randomness-browser-table-row {
display: flex;
align-items: center;
gap: 0.5em;
}
.randomness-browser-roll-btn {
background: var(--interactive-accent);
color: var(--text-on-accent);
border: none;
padding: 0.15em 0.6em;
border-radius: 3px;
cursor: pointer;
font-size: 0.8em;
flex-shrink: 0;
}
.randomness-browser-roll-btn:hover {
background: var(--interactive-accent-hover);
}
/* Copy-inline button: emoji label so we don't fight for horizontal
* space with the Roll button + table name. Less visually heavy than
* the accent-coloured Roll button — it's the secondary action. */
.randomness-browser-copy-inline-btn {
background: var(--background-secondary);
color: var(--text-normal);
border: 1px solid var(--background-modifier-border);
padding: 0.05em 0.4em;
border-radius: 3px;
cursor: pointer;
font-size: 0.85em;
flex-shrink: 0;
line-height: 1.2;
}
.randomness-browser-copy-inline-btn:hover {
background: var(--background-modifier-hover);
}
/* Pin toggle: visually consistent with Copy-inline (also a
* secondary button next to the Roll primary), but its filled
* state gets accent colour so the user can tell at a glance
* which tables they've pinned. */
.randomness-browser-pin-btn {
background: var(--background-secondary);
color: var(--text-normal);
border: 1px solid var(--background-modifier-border);
padding: 0.05em 0.4em;
border-radius: 3px;
cursor: pointer;
font-size: 0.85em;
flex-shrink: 0;
line-height: 1.2;
/* Slightly muted when unpinned so the affordance is "ready
* to act on", not "hey look at me". */
opacity: 0.7;
}
.randomness-browser-pin-btn:hover {
background: var(--background-modifier-hover);
opacity: 1;
}
.randomness-browser-pin-btn-active {
/* Pinned state — full opacity and a subtle accent tint on the
* border so the pin button reads as "engaged". */
opacity: 1;
border-color: var(--interactive-accent);
}
/* Favourites sort toggle on the section header (issue #15). Sits
* after the count badge; accent border when a non-default sort is
* active so the user can see why rows aren't in pin order. */
.randomness-browser-fav-sort-btn {
background: var(--background-secondary);
color: var(--text-muted);
border: 1px solid var(--background-modifier-border);
padding: 0 0.35em;
border-radius: 3px;
cursor: pointer;
font-size: 0.8em;
line-height: 1.3;
flex-shrink: 0;
margin-left: auto;
}
.randomness-browser-fav-sort-btn:hover {
background: var(--background-modifier-hover);
color: var(--text-normal);
}
.randomness-browser-fav-sort-btn-active {
color: var(--text-normal);
border-color: var(--interactive-accent);
}
/* ▲▼ manual reorder buttons on favourite rows. Stacked vertically
* and compact so they don't push the Roll button out of line. */
.randomness-browser-move {
display: inline-flex;
flex-direction: column;
flex-shrink: 0;
gap: 1px;
}
.randomness-browser-move-btn {
background: transparent;
color: var(--text-muted);
border: none;
padding: 0;
margin: 0;
box-shadow: none;
cursor: pointer;
font-size: 0.55em;
line-height: 1;
height: 0.9em;
}
.randomness-browser-move-btn:hover:not(:disabled) {
color: var(--text-normal);
background: transparent;
}
.randomness-browser-move-btn:disabled {
opacity: 0.25;
cursor: default;
}
/* Table name + optional source-file subtitle. The pinned-section
* variant stacks them vertically (display: flex column on the
* containing label wrap). Regular tree shows just the name. */
.randomness-browser-table-label {
display: flex;
flex-direction: column;
min-width: 0;
flex: 1;
}
.randomness-browser-table-name {
color: var(--text-normal);
font-size: 0.85em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.randomness-browser-table-source {
color: var(--text-muted);
font-size: 0.75em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/* Pull the subtitle visually closer to the name above it,
* since they're a unit. */
margin-top: -0.1em;
}
/* The Favourites section's outer wrap inherits folder styles;
* this extra class gives it a thin accent-coloured left border so
* it reads as a distinguished group at the top of the tree. */
.randomness-browser-favourites {
border-left: 2px solid var(--interactive-accent);
margin-bottom: 0.4em;
padding-left: 2px;
}
.randomness-browser-result {
/* The grip above draws the divider line. Cap height so a very
* long result doesn't push the list out of view; the body
* itself scrolls if needed. */
max-height: 40%;
display: flex;
flex-direction: column;
gap: 0.4em;
flex-shrink: 0;
}
/* Dragged to a size: the grip sets an explicit height and the
* 40% cap no longer applies. */
.randomness-browser-result.is-sized {
max-height: none;
min-height: 0;
}
/* Drag grip between the tree and the result panel. Sits on the
* panel's top border; drag to resize, double-click to reset. */
.randomness-browser-result-grip {
flex-shrink: 0;
height: 9px;
margin: -4px 0;
cursor: ns-resize;
position: relative;
touch-action: none;
}
.randomness-browser-result-grip::before {
content: "";
position: absolute;
left: 0; right: 0; top: 4px;
border-top: 1px solid var(--background-modifier-border);
}
.randomness-browser-result-grip::after {
content: "";
position: absolute;
left: 50%; top: 3px;
width: 28px; height: 3px;
margin-left: -14px;
border-radius: 2px;
background: var(--background-modifier-border);
}
.randomness-browser-result-grip:hover::after,
.randomness-browser-result-grip.is-dragging::after {
background: var(--interactive-accent);
}
.randomness-browser-result-hint {
color: var(--text-muted);
font-style: italic;
text-align: center;
font-size: 0.85em;
}
.randomness-browser-result-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5em;
}
.randomness-browser-result-label {
font-weight: 600;
font-size: 0.85em;
color: var(--text-muted);
/* Truncate the "Title / Table" label if too long. */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.randomness-browser-copy-btn {
background: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
color: var(--text-normal);
padding: 0.15em 0.6em;
border-radius: 3px;
cursor: pointer;
font-size: 0.8em;
flex-shrink: 0;
}
.randomness-browser-copy-btn:hover {
background: var(--background-modifier-hover);
}
.randomness-browser-result-body {
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 3px;
padding: 0.5em;
overflow-y: auto;
/* Fill whatever height the panel has (sized or capped) and
* scroll inside it rather than pushing the panel taller. */
flex: 1 1 auto;
min-height: 0;
/* Keep whitespace from multi-result rolls (newline-joined). */
white-space: pre-wrap;
font-family: inherit;
}
.randomness-browser-result-body:hover {
background: var(--background-modifier-hover);
}
/* Embedded images from `![[image.png]]` wiki-syntax. Cap the
* max width so a huge image doesn't blow out the layout of the
* codeblock/inline/result containers — but respect intrinsic
* smaller sizes and any explicit width="N" from the pipe-syntax. */
.randomness-embed-image {
max-width: 100%;
height: auto;
display: inline-block;
vertical-align: middle;
border-radius: 3px;
}
/* Unresolved wiki link. Matches Obsidian's own convention — a
* muted, dashed-underline appearance so the user can see the
* link is broken but the text still reads.
*
* A dashed `border-bottom` is used for the underline rather than an
* underline decoration: the Obsidian community-plugin linter flags
* the underline-decoration family as only partially supported on the
* older minAppVersion, whereas a dashed bottom border is universally
* supported and renders identically. padding-bottom keeps the border
* clear of the text baseline. */
.randomness-unresolved-link {
color: var(--text-error, var(--text-muted));
border-bottom: 1px dashed currentColor;
padding-bottom: 1px;
cursor: help;
}
/* Reference view — read-only help pane opened from settings or
* the "Open reference" command. Cap inner width on wide displays
* so the long-form prose stays readable; add comfortable padding
* and let Obsidian's theme handle typography. */
.randomness-reference-view {
padding: 1em 1.5em;
overflow-y: auto;
}
.randomness-reference-content {
max-width: 50em;
margin: 0 auto;
/* Inherit theme font / sizes — don't override; the goal is
* "looks native". The padding gives some breathing room from
* the pane edges on narrow displays. */
}
/* The rendered markdown contains code blocks. Obsidian renders
* them with its own styling already, but we boost padding a hair
* so syntax examples don't crowd the prose around them. */
.randomness-reference-content pre {
margin: 0.8em 0;
}
/* Inline rdm:[@ autocomplete suggestion items. Two-line layout:
* the table name on top, the source file as a muted subtitle
* below. Obsidian's suggestion-container provides padding and
* hover highlight; we only style the inner content. */
.randomness-suggest-item {
display: flex;
flex-direction: column;
/* tight vertical spacing — the popup is already padded */
gap: 0;
}
.randomness-suggest-name {
font-size: 0.95em;
color: var(--text-normal);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.randomness-suggest-source {
font-size: 0.75em;
color: var(--text-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-top: -0.1em;
}
/* Out-of-scope suggestion items — tables that exist somewhere in
* the vault but aren't imported by the current note. Picking one
* surfaces a Notice telling the user how to import it. Visually
* muted so the in-scope items are obviously the primary
* suggestions. */
.randomness-suggest-out-of-scope .randomness-suggest-name {
color: var(--text-muted);
font-style: italic;
}
.randomness-suggest-out-of-scope .randomness-suggest-source {
color: var(--text-faint);
}
/* ─── Portraits (```portrait codeblocks) ─── */
.randomness-portrait-bar { margin-bottom: 6px; }
.randomness-portrait-grid {
display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
}
.randomness-portrait-tile {
display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.randomness-portrait-art svg { display: block; width: 100%; height: auto; }
.randomness-portrait-art {
border: 1px solid var(--background-modifier-border);
border-radius: 6px; overflow: hidden;
}
.randomness-portrait-caption {
font-size: var(--font-ui-smaller); color: var(--text-muted);
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.randomness-portrait-actions { display: flex; gap: 6px; }
.randomness-portrait-hint { color: var(--text-muted); font-style: italic; }
/* lock/unlock overlay (top-right of the art) */
.randomness-portrait-art { position: relative; }
.randomness-portrait-lockbtn {
position: absolute; top: 4px; right: 4px;
display: flex; align-items: center; justify-content: center;
width: 26px; height: 26px; padding: 0;
border-radius: 6px; border: 1px solid var(--background-modifier-border);
background: var(--background-primary); color: var(--text-muted);
opacity: 0; transition: opacity 120ms ease;
cursor: pointer;
}
.randomness-portrait-art:hover .randomness-portrait-lockbtn { opacity: 0.9; }
.randomness-portrait-lockbtn:hover { color: var(--text-normal); opacity: 1; }
/* roller pane */
.randomness-portrait-pane-controls {
display: flex; gap: 8px; margin-bottom: 8px; align-items: center;
}
.randomness-portrait-pane-controls input[type="number"] { width: 64px; }
.randomness-portrait-pane .randomness-portrait-grid { gap: 8px; }
/* panel tabs (generator browser: Generators / Portraits / Builder) */
.randomness-panel-tabs {
display: flex; gap: 4px; margin-bottom: 8px;
border-bottom: 1px solid var(--background-modifier-border);
padding-bottom: 6px;
}
.randomness-panel-tab {
background: transparent; border: none; cursor: pointer;
padding: 4px 10px; border-radius: 6px; color: var(--text-muted);
}
.randomness-panel-tab.is-active {
background: var(--background-modifier-hover); color: var(--text-normal);
font-weight: 600;
}
/* settings: the per-tab "Show … tab" toggles sit under one heading row */
.randomness-setting-indent { padding-left: 1.5em; }
/* overlay icon buttons (PNG top-left, lock/copy top-right) */
.randomness-portrait-iconbtn {
position: absolute; top: 4px;
display: flex; align-items: center; justify-content: center;
width: 26px; height: 26px; padding: 0;
border-radius: 6px; border: 1px solid var(--background-modifier-border);
background: var(--background-primary); color: var(--text-muted);
opacity: 0; transition: opacity 120ms ease; cursor: pointer;
}
.randomness-portrait-iconbtn-top-left { left: 4px; }
.randomness-portrait-iconbtn-top-right { right: 4px; }
.randomness-portrait-art:hover .randomness-portrait-iconbtn { opacity: 0.9; }
.randomness-portrait-iconbtn:hover { color: var(--text-normal); opacity: 1; }
/* inline portraits */
.randomness-portrait-inline {
display: inline-block; vertical-align: middle; line-height: 0;
}
.randomness-portrait-inline svg { width: 100%; height: auto; display: block; }
/* builder tab */
.randomness-portrait-builder { display: flex; gap: 12px; flex-wrap: wrap; }
.randomness-portrait-builder-form {
display: flex; flex-direction: column; gap: 6px; min-width: 220px; flex: 1;
}
.randomness-portrait-builder-row {
display: flex; gap: 6px; align-items: center;
}
.randomness-portrait-builder-row label {
width: 110px; font-size: var(--font-ui-smaller); color: var(--text-muted);
}
.randomness-portrait-builder-row select { flex: 1; min-width: 0; }
/* small overlay icons (inline spans + bottom corners) */
.randomness-portrait-iconbtn-bottom-left { bottom: 4px; left: 4px; top: auto; }
.randomness-portrait-iconbtn-bottom-right { bottom: 4px; right: 4px; top: auto; }
.randomness-portrait-iconbtn-small { width: 20px; height: 20px; }
.randomness-portrait-iconbtn-small svg { width: 13px; height: 13px; }
.randomness-portrait-inline { position: relative; }
.randomness-portrait-inline .randomness-portrait-iconbtn { opacity: 0; }
.randomness-portrait-inline:hover .randomness-portrait-iconbtn { opacity: 0.9; }
/* ── Dice tray (Dice Roller merge, Phase 5) ─────────────────────── */
.randomness-tray {
padding: 8px;
display: flex;
flex-direction: column;
gap: 8px;
}
.randomness-tray-result {
font-size: 1.6em;
font-weight: 600;
text-align: center;
padding: 12px 8px;
border-radius: 8px;
background: var(--background-secondary);
cursor: pointer;
min-height: 1.4em;
word-break: break-word;
user-select: text;
}
.randomness-tray-dice {
display: flex;
flex-wrap: wrap;
gap: 4px;
justify-content: center;
}
.randomness-tray-die {
min-width: 44px;
font-variant-numeric: tabular-nums;
}
.randomness-tray-opts {
display: flex;
gap: 6px;
align-items: center;
justify-content: center;
}
.randomness-tray-mod-value {
min-width: 2.5em;
text-align: center;
font-variant-numeric: tabular-nums;
}
.randomness-tray-pool {
text-align: center;
font-family: var(--font-monospace);
font-size: 0.9em;
padding: 4px;
border-radius: 6px;
background: var(--background-secondary);
word-break: break-word;
}
.randomness-tray-pool.is-empty {
color: var(--text-muted);
font-family: inherit;
}
.randomness-tray-actions {
display: flex;
gap: 6px;
justify-content: center;
}
.randomness-tray-formula {
display: flex;
gap: 4px;
}
.randomness-tray-input {
flex: 1;
min-width: 0;
}
.randomness-tray-heading {
font-size: 0.8em;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
margin-top: 4px;
}
.randomness-tray-saved-row,
.randomness-tray-history-row {
display: flex;
gap: 6px;
align-items: center;
padding: 2px 0;
}
.randomness-tray-saved-roll {
flex: 1;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
}
.randomness-tray-history-row {
cursor: pointer;
border-radius: 4px;
padding: 2px 4px;
}
.randomness-tray-history-row:hover {
background: var(--background-secondary);
}
.randomness-tray-history-formula {
flex: 1;
color: var(--text-muted);
font-family: var(--font-monospace);
font-size: 0.85em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.randomness-tray-history-result {
font-weight: 600;
max-width: 55%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Per-die breakdown under a history row ("2d10 → 7, 3"). Full-width
line below formula+result, muted and small so it reads as detail. */
.randomness-tray-history-detail {
flex-basis: 100%;
color: var(--text-faint);
font-family: var(--font-monospace);
font-size: 0.75em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.randomness-tray-history-row {
flex-wrap: wrap;
}
/* ── Graphical dice overlay (Dice Roller merge, Phase 6) ────────── */
.randomness-dice3d-layer {
position: fixed;
inset: 0;
z-index: var(--layer-notice, 1000);
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
cursor: pointer;
background: transparent;
}
/* The backdrop lives only behind the dice: a rounded, softly blurred
card sized to its contents — theme-aware rather than a full-screen
scrim. */
.randomness-dice3d-table {
display: flex;
flex-wrap: wrap;
gap: 26px;
align-items: center;
justify-content: center;
max-width: 72vw;
padding: 30px 38px 40px;
border-radius: 18px;
background: color-mix(
in srgb,
var(--background-primary) 82%,
transparent
);
backdrop-filter: blur(3px);
border: 1px solid var(--background-modifier-border);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
animation: rdm-backdrop-in 0.18s ease-out;
}
@keyframes rdm-backdrop-in {