Repository navigation
Expand file tree
/
Copy pathapp.css
More file actions
2658 lines (2648 loc) · 65.2 KB
/
Copy pathapp.css
File metadata and controls
2658 lines (2648 loc) · 65.2 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
:root {
color-scheme: light dark;
--bg: #0f1115;
--card: #1a1d24;
--text: #e6e8eb;
--muted: #8a8f98;
--accent: #5fb3ff;
--busy: #ffb454;
--idle: #4caf7d;
--stale: #ff6b6b;
--essentia: #b48cff;
/* Fills under white text (primary and destructive buttons, the stale
banner): --accent and --stale darkened to 4.5:1 against white, in
either theme. */
--accent-fill: #2272c9;
--danger-fill: #d13b3b;
/* NEI's yellow and aqua for its # and $ search prefixes, GregTech's
green for its =. */
--search-tooltip: #f2d43d;
--search-ore: #4fd8d8;
--search-formula: #5be05b;
}
/* Light follows the system unless the settings menu's Theme picks one
(theme.js; boot.js sets data-theme before first paint). */
@media (prefers-color-scheme: light) {
:root:not([data-theme="dark"]) {
--bg: #f4f5f7;
--card: #ffffff;
--text: #1a1d24;
--muted: #6b7280;
--search-tooltip: #9a7b00;
--search-ore: #0b8585;
--search-formula: #1e8a1e;
}
}
:root[data-theme="light"] {
color-scheme: light;
--bg: #f4f5f7;
--card: #ffffff;
--text: #1a1d24;
--muted: #6b7280;
--search-tooltip: #9a7b00;
--search-ore: #0b8585;
--search-formula: #1e8a1e;
}
:root[data-theme="dark"] {
color-scheme: dark;
}
* { box-sizing: border-box; }
/* Item icons only (matched by /icons src prefix, not img in general -
this shouldn't affect any other image on the page, and covers every
current AND future icon <img> without needing per-class upkeep). On
mobile, long-pressing a plain <img> triggers the browser's own
native "save/copy image" menu - which, on the network grid
specifically, interrupts and overrides the tooltip a long-press is
ALSO meant to show, since the two gestures compete for the same
touch-and-hold. -webkit-touch-callout is the iOS Safari-specific
property for this; user-select stops the selection-highlight
outline some browsers show during the same gesture. Neither of
these touches how the tooltip itself is shown - purely suppresses
the competing native behavior. Android Chrome and others need the
separate contextmenu-preventDefault() listener further down too -
this CSS alone doesn't cover them. */
img[src^="/icons?"] {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--text);
padding: 24px;
}
h1 {
font-size: 20px;
margin: 0 0 4px 0;
}
.sub {
color: var(--muted);
font-size: 13px;
margin-bottom: 20px;
}
.sub.stale-warning {
color: var(--stale);
font-weight: 600;
}
/* Network tab, until an admin picks a GTNH version (network.js); a tab
whose script hasn't reported yet (agents.js connectNoteHtml). */
.gamedata-note, .connect-note {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 12px;
padding: 10px 12px;
margin-bottom: 16px;
border: 1px solid rgba(128,128,128,0.2);
border-radius: 10px;
font-size: 13px;
}
.gamedata-note[hidden], .connect-note[hidden] {
display: none;
}
.scripts-notice {
margin-top: 12px;
}
.gamedata-note .note-dismiss {
margin-left: auto;
}
#networkTerminalNote {
margin-top: 12px;
}
.gamedata-note a, #craftPlanNote a, #recipeCheckForHow, #recipeCheckErrorHow {
color: var(--accent);
}
/* auth.js sets body.is-admin. */
body:not(.is-admin) .admin-only, body.is-admin .non-admin-only {
display: none;
}
.stale-banner {
display: none;
background: var(--danger-fill);
color: white;
padding: 8px 12px;
border-radius: 8px;
font-size: 13px;
margin-bottom: 16px;
}
.stale-banner.show { display: block; }
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 14px;
}
.card {
background: var(--card);
border-radius: 12px;
padding: 16px;
border: 1px solid rgba(128,128,128,0.15);
display: flex;
flex-direction: column;
}
.card-head {
/* Grow to fill the stretched grid cell, so when a neighbour's title
wraps the spare space sits under this title and the progress bars
and Ingredients buttons still line up across the row. */
flex: 1 0 auto;
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 10px;
margin-bottom: 8px;
}
/* Nothing under it (a Finished or idle card): no gap before the
card's own padding. */
.card-head:last-child {
margin-bottom: 0;
}
/* A crafting card's CPU and buttons sit in a strip above the item name,
so a long name gets the card's whole width. */
.card-top {
display: flex;
align-items: center;
gap: 8px;
/* Out to the card's edges (its padding is 16px), with a faint tint
and a hairline under it, so it reads as the card's header. */
margin: -16px -16px 12px;
padding: 10px 16px;
border-radius: 12px 12px 0 0;
background: color-mix(in srgb, var(--text) 3%, transparent);
border-bottom: 1px solid rgba(128,128,128,0.15);
}
.card-top .head-right {
margin-left: auto;
}
.card-cpu {
min-width: 0;
font-size: 12px;
font-weight: 600;
color: var(--muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* The (?) after the name of a CPU nobody named: beside .card-cpu, not in
it, so a long name's ellipsis can't cut it off. */
.cpu-auto {
display: inline-flex;
flex: none;
align-items: center;
justify-content: center;
width: 13px;
height: 13px;
margin-left: -4px;
border: 1px solid currentColor;
border-radius: 50%;
color: var(--muted);
font-size: 9px;
font-weight: 600;
line-height: 1;
text-decoration: none;
opacity: 0.7;
cursor: help;
}
/* Without min-width the title side can't shrink below its longest
word, and a long name pushes whatever is beside it out of the card. */
.card-head-main {
flex: 1;
min-width: 0;
}
.craft-title {
font-weight: 700;
font-size: 16px;
line-height: 1.25;
display: flex;
align-items: center;
gap: 8px;
overflow-wrap: anywhere; /* a single word too long for the card */
}
.craft-icon {
width: 24px;
height: 24px;
flex-shrink: 0;
image-rendering: pixelated;
}
.cpu-id {
font-size: 11px;
color: var(--muted);
margin-top: 2px;
}
.monitor-hint {
font-size: 12px;
color: var(--muted);
margin-top: 4px;
}
.monitor-hint a { color: var(--accent); }
.badge {
flex-shrink: 0;
font-size: 11px;
padding: 3px 8px;
border-radius: 999px;
font-weight: 600;
white-space: nowrap;
}
.badge.auto { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
.pin-btn {
flex-shrink: 0;
background: none;
border: 1px solid rgba(128,128,128,0.3);
border-radius: 8px;
width: 30px;
height: 30px;
font-size: 15px;
cursor: pointer;
color: var(--muted);
display: flex;
align-items: center;
justify-content: center;
}
/* util.js's one-colour icons (PIN_ICON, BELL_ICON, RESTOCK_ICON),
sized by the font-size around them. */
.ui-icon {
display: inline-block;
vertical-align: -0.125em;
}
.pin-btn.pinned {
background: color-mix(in srgb, var(--accent) 20%, transparent);
border-color: var(--accent);
color: var(--accent);
}
.pin-btn:disabled {
opacity: 0.3;
cursor: not-allowed;
}
.cancel-btn {
flex-shrink: 0;
background: none;
border: 1px solid rgba(255,107,107,0.35);
border-radius: 8px;
width: 30px;
height: 30px;
font-size: 16px;
line-height: 1;
cursor: pointer;
color: var(--stale);
display: flex;
align-items: center;
justify-content: center;
}
.cancel-btn:hover {
background: color-mix(in srgb, var(--stale) 15%, transparent);
}
.cancel-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* A cancel sent and waiting on the game. 1.5s, so the card's 3s
re-render restarts it in step rather than mid-pulse. */
.cancel-btn.pending {
animation: cancel-pending 1.5s ease-in-out infinite;
}
@keyframes cancel-pending {
0%, 100% { opacity: 0.3; }
50% { opacity: 0.8; }
}
@media (prefers-reduced-motion: reduce) {
.cancel-btn.pending { animation: none; }
}
.status-badge {
display: inline-block;
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
padding: 2px 6px;
border-radius: 999px;
margin-left: 8px;
vertical-align: middle;
/* Beside a long name in a flex row it would otherwise shrink and,
with the title's overflow-wrap, split mid-word. */
white-space: nowrap;
flex-shrink: 0;
}
.status-badge.auto {
background: color-mix(in srgb, var(--accent) 20%, transparent);
color: var(--accent);
}
.status-badge.incomplete {
background: color-mix(in srgb, var(--stale) 20%, transparent);
color: var(--stale);
}
.ack-btn {
flex-shrink: 0;
background: none;
border: 1px solid rgba(128,128,128,0.3);
border-radius: 8px;
width: 30px;
height: 30px;
font-size: 15px;
cursor: pointer;
color: var(--idle);
display: flex;
align-items: center;
justify-content: center;
}
.ack-btn:hover {
background: color-mix(in srgb, var(--idle) 20%, transparent);
border-color: var(--idle);
}
.completed-card {
border-color: color-mix(in srgb, var(--idle) 35%, transparent);
}
.completed-heading {
display: flex;
align-items: center;
justify-content: space-between;
}
.ack-all-btn {
font-size: 11px;
padding: 4px 10px;
border-radius: 999px;
border: 1px solid rgba(128,128,128,0.3);
background: none;
color: var(--muted);
cursor: pointer;
text-transform: none;
letter-spacing: normal;
font-weight: 600;
}
.ack-all-btn:hover {
color: var(--text);
border-color: var(--text);
}
.head-right {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.notif-btn {
font-size: 12px;
padding: 6px 12px;
border-radius: 8px;
border: 1px solid rgba(128,128,128,0.3);
background: none;
color: var(--text);
cursor: pointer;
}
.notif-btn.on {
border-color: var(--idle);
color: var(--idle);
}
.settings-wrap {
position: relative;
}
.settings-btn {
position: relative;
font-size: 16px;
line-height: 1;
padding: 5px 9px;
}
.settings-btn[aria-expanded="true"] {
border-color: var(--accent);
color: var(--accent);
}
.settings-menu {
position: absolute;
right: 0;
top: calc(100% + 6px);
min-width: 180px;
background: var(--card);
border: 1px solid rgba(128,128,128,0.3);
border-radius: 8px;
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
padding: 4px;
z-index: 50;
}
.settings-menu-user {
display: flex;
justify-content: space-between;
gap: 12px;
font-size: 11px;
color: var(--muted);
padding: 6px 10px 8px;
border-bottom: 1px solid rgba(128,128,128,0.2);
margin-bottom: 4px;
white-space: nowrap;
}
.settings-menu-user[hidden] {
display: none;
}
#settingsUser {
overflow: hidden;
text-overflow: ellipsis;
}
/* A newer release of the server is out (agents.js), for admins. */
.update-dot {
position: absolute;
top: -4px;
right: -4px;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--accent);
border: 2px solid var(--bg);
}
.update-dot[hidden] {
display: none;
}
.menu-note {
display: block;
font-size: 11px;
color: var(--accent);
margin-top: 2px;
}
.menu-note[hidden] {
display: none;
}
.theme-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
font-size: 13px;
padding: 4px 4px 4px 10px;
}
.theme-seg {
display: inline-flex;
border: 1px solid rgba(128,128,128,0.3);
border-radius: 6px;
padding: 2px;
gap: 2px;
}
.theme-seg button {
display: flex;
font-size: 14px;
padding: 4px 7px;
border: none;
border-radius: 4px;
background: none;
color: var(--muted);
cursor: pointer;
}
.theme-seg button:hover {
color: var(--text);
}
.theme-seg button[aria-checked="true"] {
background: rgba(128,128,128,0.2);
color: var(--accent);
}
.settings-menu-item {
display: block;
width: 100%;
text-align: left;
font-size: 13px;
padding: 7px 10px;
border: none;
border-radius: 6px;
background: none;
color: var(--text);
cursor: pointer;
}
.settings-menu-item:hover {
background: rgba(128,128,128,0.15);
}
.settings-menu-item.danger {
color: var(--stale);
}
.settings-toggle {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.settings-toggle:disabled {
cursor: default;
opacity: 0.6;
}
.settings-toggle:disabled:hover {
background: none;
}
.settings-toggle-label {
display: flex;
flex-direction: column;
}
.settings-toggle-note {
font-size: 11px;
color: var(--muted);
}
.settings-toggle-note:empty {
display: none;
}
.switch {
position: relative;
flex-shrink: 0;
width: 32px;
height: 18px;
border-radius: 9px;
background: rgba(128,128,128,0.4);
transition: background 0.15s;
}
.switch::after {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 14px;
height: 14px;
border-radius: 50%;
background: #fff;
transition: transform 0.15s;
}
.settings-toggle[aria-checked="true"] .switch {
background: var(--idle);
}
.settings-toggle[aria-checked="true"] .switch::after {
transform: translateX(14px);
}
.top-bar {
display: flex;
align-items: center;
gap: 8px 24px;
/* Title, tabs and settings in one row. Should it wrap (the sign-in
field, a narrow window), what wraps goes on a line ABOVE the tabs,
which keep sitting on the border below. */
flex-wrap: wrap-reverse;
border-bottom: 1px solid rgba(128,128,128,0.2);
margin-bottom: 20px;
}
.top-bar h1 {
margin: 0;
}
.top-bar-right {
margin-left: auto;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
/* The form only exists for password managers; its fields lay out as
direct children of .top-bar-right. */
.sign-in-form {
display: contents;
}
.craft-key-input {
background: var(--card);
border: 1px solid rgba(128,128,128,0.25);
border-radius: 8px;
padding: 8px 12px;
color: var(--text);
font-size: 13px;
width: 140px;
}
.craft-key-input::placeholder {
color: var(--muted);
}
.tab-bar {
/* Equal-width tabs, each wide enough for its widest state (Network
with a two-digit badge), so a badge coming, going or growing never
moves the other tabs; a tab's own content stays centered in it. */
display: grid;
grid-auto-flow: column;
grid-auto-columns: 1fr;
gap: 6px;
align-self: stretch;
align-items: end;
}
.tab-btn {
min-width: 7.5em;
background: none;
border: none;
color: var(--muted);
font-size: 14px;
font-weight: 600;
line-height: 20px;
padding: 8px 4px 10px 4px;
cursor: pointer;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
white-space: nowrap;
}
.tab-btn.active {
color: var(--text);
border-bottom-color: var(--accent);
}
/* tab-badges.js: a count pill, or a dot when there's no count. */
.tab-badge {
display: inline-block;
min-width: 18px;
margin-left: 6px;
padding: 1px 6px;
border-radius: 999px;
font-size: 11px;
line-height: 16px;
text-align: center;
vertical-align: 1px;
font-variant-numeric: tabular-nums;
background: color-mix(in srgb, var(--muted) 22%, transparent);
color: var(--text);
}
.tab-badge.done {
background: color-mix(in srgb, var(--idle) 28%, transparent);
color: var(--idle);
}
.tab-badge.alert {
background: color-mix(in srgb, var(--stale) 25%, transparent);
color: var(--stale);
}
.tab-badge.dot {
min-width: 0;
width: 7px;
height: 7px;
padding: 0;
vertical-align: 2px;
}
.tab-badge.dot.done { background: var(--idle); }
.tab-badge.dot.alert { background: var(--stale); }
/* power.js: how full the batteries are, on the tab and machine buttons. */
.tab-fill,
.machine-fill {
margin-left: 4px;
font-size: 12px;
font-weight: 500;
font-variant-numeric: tabular-nums;
opacity: 0.75;
}
.tab-fill {
line-height: 1;
}
.tab-fill:empty {
display: none;
}
.power-machines {
flex-wrap: wrap;
margin: 4px 0 12px;
}
.power-head {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 16px;
}
.power-current {
font-size: 15px;
}
.power-current .big {
font-size: 22px;
font-weight: 700;
}
.power-trend {
font-size: 13px;
font-weight: 600;
color: var(--muted);
cursor: default;
}
.power-trend-up {
color: #5fd97a;
}
.power-trend-down {
color: var(--stale);
}
.power-trend-wrap {
position: relative;
display: inline-block;
}
.power-trend-tooltip {
display: none;
position: absolute;
top: 100%;
/* right, not left - the trend indicator is the last thing on its
line (after "... EU (23.4%)"), so it's typically positioned
toward the right side of whatever line it's on. Anchoring the
tooltip's right edge to match, growing LEFTWARD, keeps it away
from the right edge of a narrow mobile screen far more reliably
than growing rightward from the left ever did - confirmed as a
real reported bug otherwise (nowrap + left:0 together meant a
wide, right-anchored-from-the-left tooltip on a screen with
little room to its right, forcing a horizontal scrollbar). */
right: 0;
margin-top: 6px;
background: var(--card);
border: 1px solid rgba(128,128,128,0.25);
border-radius: 8px;
padding: 10px 12px;
font-size: 12px;
/* Hard cap, not just narrower content - can never exceed the
viewport regardless of where the trigger ends up sitting, even
in an edge case the right-anchoring above doesn't fully solve.
Widened from 200 to 230 - 200 was too tight once each line got
its own white-space: nowrap below, causing "EU/s" itself to wrap
onto its own line on a longer number like "687.19M" - confirmed
as a real reported follow-up bug, not a hypothetical. */
max-width: min(230px, calc(100vw - 24px));
z-index: 20;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.power-trend-wrap:hover .power-trend-tooltip {
display: block;
}
.power-trend-tooltip-row {
display: flex;
flex-direction: column; /* was a single nowrap row (In/Out side by
side) - stacked onto two lines instead,
so the tooltip needs far less width to
begin with, rather than relying on
positioning alone to avoid overflow */
gap: 4px;
font-weight: 600;
}
.power-trend-in, .power-trend-out {
/* Each line stays one unbroken phrase ("In: 687.19M EU/s") - the
row above lost its own nowrap when it switched from a single
side-by-side line to two stacked ones, so without this, "EU/s"
itself could wrap onto a third line if the number was wide
enough to reach the tooltip's max-width. */
white-space: nowrap;
}
.power-trend-in {
color: #5fd97a;
}
.power-trend-out {
color: var(--stale);
}
.range-buttons {
display: flex;
gap: 6px;
}
.range-buttons[hidden] {
display: none;
}
.range-btn {
font-size: 12px;
padding: 6px 12px;
border-radius: 8px;
border: 1px solid rgba(128,128,128,0.3);
background: none;
color: var(--text);
cursor: pointer;
}
.range-btn.active {
background: color-mix(in srgb, var(--accent) 20%, transparent);
border-color: var(--accent);
color: var(--accent);
}
.range-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.chart-wrap {
background: var(--card);
border-radius: 12px;
border: 1px solid rgba(128,128,128,0.15);
padding: 16px;
height: 420px;
}
.network-head {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 12px;
margin-bottom: 16px;
}
.network-search-wrap {
position: relative;
flex: 1;
min-width: 200px;
}
.network-controls {
display: flex;
align-items: center;
gap: 12px;
}
/* Grid / list: icons only, joined into one segmented button. */
.view-toggle {
gap: 0;
}
.view-toggle .range-btn {
display: flex;
align-items: center;
font-size: 14px;
padding: 6px 9px;
}
.view-toggle .range-btn:first-child {
border-radius: 8px 0 0 8px;
}
.view-toggle .range-btn:last-child {
border-radius: 0 8px 8px 0;
margin-left: -1px;
}
.view-toggle .range-btn.active {
position: relative; /* its border over the neighbour's shared edge */
}
.network-search {
width: 100%;
background: var(--card);
border: 1px solid rgba(128,128,128,0.25);
border-radius: 8px;
padding: 10px 14px;
font-size: 14px;
font-family: inherit;
/* Real text made invisible (not removed) - this input still does
all the actual work (typing, cursor, selection, focus) natively.
caret-color keeps the blinking cursor visible despite the text
itself being transparent - only the highlight overlay below is
ever actually seen. */
color: transparent;
caret-color: var(--text);
}
.network-search::placeholder {
color: var(--muted);
}
.network-search-highlight {
position: absolute;
inset: 0;
padding: 10px 14px;
font-size: 14px;
font-family: inherit;
line-height: normal;
color: var(--text);
white-space: pre;
overflow: hidden;
pointer-events: none;
border: 1px solid transparent;
}
.search-hl-mod {
color: #ff6ec7;
/* NOT font-weight: 600 here - bold glyphs render wider than
normal-weight glyphs in essentially every font, and the real
input's (invisible) text stays at normal weight regardless. That
mismatch compounds per highlighted character, which is exactly
what caused the reported cursor-drift bug: the more @/- text
typed, the more the overlay's bolded text silently outgrows the
real input's actual layout underneath it, even though the cursor
itself was always exactly where the real input placed it. Color
alone differentiates the highlighted terms now - font-weight has
to stay identical between the two layers everywhere, not just
font-family/size/padding.
*/
}
.search-hl-exclude {
color: var(--accent);
}
/* Same weight as the input's text, as .search-hl-mod explains. */
.search-hl-tooltip {
color: var(--search-tooltip);
}
.search-hl-ore {
color: var(--search-ore);
}
.search-hl-formula {
color: var(--search-formula);
}
.search-hl-quote {
/* Only the quote MARKS themselves get this color - confirmed from a
real screenshot ("air shard" with just the " " characters in
orange, the text between them staying plain default color). NOT
font-weight here either, same reasoning as .search-hl-mod above -
must stay visually identical in weight to the invisible real
input text underneath, or the two layers drift out of alignment
as more of the query is highlighted.
*/
color: #ffa94d;
}
.network-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
gap: 6px;
}
.network-cell {
position: relative;
aspect-ratio: 1;
background: var(--card);
border: 1px solid rgba(128,128,128,0.2);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
}
.network-cell:focus {
outline: none;
}
.network-cell:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
.network-cell.craftable {
border-color: color-mix(in srgb, var(--accent) 40%, transparent);
background: color-mix(in srgb, var(--accent) 6%, var(--card));
}
.network-cell-icon {
width: 62%;
height: 62%;
image-rendering: pixelated;
/* Above neighbouring cells' halos (.icon-bleed), as in NEI's grid. */
position: relative;
z-index: 2;
}
.network-cell-qty {
position: absolute;
right: 3px;
bottom: 2px;
font-size: 10px;
font-weight: 700;
color: var(--text);
text-shadow: 0 0 3px rgba(0,0,0,0.9), 0 0 3px rgba(0,0,0,0.9);
font-variant-numeric: tabular-nums;
z-index: 3;
}
/* The Change sort's rate: in place of the quantity in the grid. */
.network-cell-change {
position: absolute;
right: 2px;
bottom: 2px;
padding: 0 2px;
border-radius: 3px;
/* A plate rather than the quantity's shadow, which muddies colour. */
background: color-mix(in srgb, var(--card) 85%, transparent);
font-size: 10px;
font-weight: 700;
line-height: 1.3;
font-variant-numeric: tabular-nums;
z-index: 3;
}
.network-cell-change.falling {
color: var(--stale);
}
.network-cell-change.rising {
color: var(--idle);
}
.network-cell.has-change .network-cell-qty {
display: none;
}
.network-cell-pattern-badge {
position: absolute;
top: 2px;
right: 2px;
width: 13px;
height: 13px;
image-rendering: pixelated;
filter: drop-shadow(0 0 2px rgba(0,0,0,0.9));
}
.network-cell-stock-badge {
position: absolute;
bottom: 1px;
left: 2px;
font-size: 11px;
line-height: 1;
color: var(--accent);
filter: drop-shadow(0 0 2px rgba(0,0,0,0.9));
}
.network-cell-stock-badge.low {
color: var(--stale);
}
.network-cell.stock-low {
border-color: color-mix(in srgb, var(--stale) 70%, transparent);
background: color-mix(in srgb, var(--stale) 10%, var(--card));