BlueGit

projects-timfalken-com microchess

Files

microchess / web / assets / app.css

app.css

app.css 28.6 KiB Download Raw
1:root {
2 --bg: #f5f3ed;
3 --paper: #fffefb;
4 --ink: #24352d;
5 --muted: #7a8178;
6 --green: #365d45;
7 --line: #dedfd5;
8 --lime: #d6e6a4;
9 --dark-square: #8caa8c;
10 --light-square: #e9edde
11}
12
13* {
14 box-sizing: border-box
15}
16
17body {
18 margin: 0;
19 background: var(--bg);
20 color: var(--ink);
21 font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
22}
23
24button,
25a,
26input {
27 -webkit-tap-highlight-color: transparent
28}
29
30button,
31.button {
32 font: inherit;
33 cursor: pointer;
34 border: 0;
35 border-radius: 8px;
36 padding: 11px 16px;
37 font-weight: 600;
38 transition: background .15s, transform .15s
39}
40
41button:hover,
42.button:hover {
43 filter: brightness(.95)
44}
45
46button:disabled {
47 cursor: default;
48 opacity: .55
49}
50
51button:focus-visible,
52a:focus-visible,
53input:focus-visible {
54 outline: 3px solid #c19042;
55 outline-offset: 3px
56}
57
58a {
59 color: inherit
60}
61
62h1,
63h2,
64h3,
65p {
66 margin: 0
67}
68
69h1 {
70 font-size: 44px;
71 letter-spacing: -2px;
72 font-weight: 650;
73 line-height: 1.2
74}
75
76h2 {
77 font-size: 18px;
78 letter-spacing: -.4px
79}
80
81h3 {
82 font-size: 18px
83}
84
85.brand-dot {
86 color: #789254
87}
88
89.topbar {
90 height: 88px;
91 border-bottom: 1px solid var(--line);
92 display: flex;
93 align-items: center;
94 padding: 0 44px;
95 gap: 38px;
96 background: var(--paper)
97}
98
99.brand {
100 display: flex;
101 align-items: center;
102 text-decoration: none;
103 font-size: 25px;
104 font-weight: 750;
105 letter-spacing: -1.2px
106}
107
108.brandmark {
109 background: var(--green);
110 color: #fff;
111 border-radius: 10px;
112 width: 38px;
113 height: 38px;
114 line-height: 34px;
115 text-align: center;
116 margin-right: 12px;
117 font-family: Georgia, serif;
118 font-size: 30px;
119 font-weight: 700;
120 position: relative
121}
122
123.brandmark span {
124 font: 14px system-ui;
125 position: absolute;
126 right: 2px;
127 top: 0;
128 color: var(--lime)
129}
130
131.tagline {
132 font-size: 13px;
133 color: var(--muted)
134}
135
136.account-nav {
137 margin-left: auto;
138 display: flex;
139 align-items: center;
140 gap: 8px
141}
142
143.quiet {
144 background: transparent;
145 color: var(--muted)
146}
147
148.layout {
149 display: grid;
150 grid-template-columns: minmax(0, 1fr) 300px;
151 min-height: calc(100vh - 88px)
152}
153
154main {
155 padding: 44px;
156 min-width: 0
157}
158
159.page-heading {
160 display: flex;
161 justify-content: space-between;
162 align-items: center;
163 gap: 20px;
164 margin-bottom: 43px
165}
166
167.eyebrow {
168 font-size: 10px;
169 font-weight: 750;
170 letter-spacing: 2px;
171 color: var(--green);
172 display: block;
173 margin-bottom: 12px
174}
175
176.page-heading p {
177 color: var(--muted);
178 margin-top: 11px;
179 font-size: 14px
180}
181
182.primary,
183.button.primary {
184 background: var(--green);
185 color: white;
186 box-shadow: 0 2px 3px #24352d12;
187 text-decoration: none;
188 white-space: nowrap
189}
190
191.section-heading {
192 display: flex;
193 justify-content: space-between;
194 align-items: center;
195 margin: 0 0 19px;
196 gap: 12px
197}
198
199.section-heading h2 {
200 display: flex;
201 align-items: center;
202 gap: 10px
203}
204
205.section-heading>span {
206 font-size: 11px;
207 color: var(--muted)
208}
209
210.status-dot {
211 width: 7px;
212 height: 7px;
213 border-radius: 50%;
214 background: #688447;
215 box-shadow: 0 0 0 4px #6884470c
216}
217
218.muted-dot {
219 background: #a7ada1
220}
221
222.count {
223 font-size: 11px;
224 border: 1px solid var(--line);
225 border-radius: 6px;
226 padding: 1px 7px;
227 color: var(--muted);
228 font-weight: 500
229}
230
231.game-grid {
232 display: grid;
233 grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
234 gap: 22px
235}
236
237.game-card {
238 background: var(--paper);
239 border: 1px solid #dbdfd3;
240 border-radius: 13px;
241 overflow: hidden;
242 box-shadow: 0 3px 5px #24352d04;
243 min-width: 0
244}
245
246.card-header {
247 display: flex;
248 align-items: center;
249 gap: 9px;
250 padding: 14px 16px;
251 border-bottom: 1px solid #e4e6dc
252}
253
254.avatar {
255 width: 31px;
256 height: 31px;
257 display: grid;
258 place-items: center;
259 border-radius: 50%;
260 background: #e8ecdf;
261 color: #56634b;
262 font-size: 11px;
263 font-weight: 750;
264 flex-shrink: 0
265}
266
267.card-header strong {
268 font-size: 13px;
269 overflow: hidden;
270 text-overflow: ellipsis;
271 white-space: nowrap
272}
273
274.rating {
275 font-size: 11px;
276 font-weight: 500;
277 color: #56634b;
278}
279
280.color-tag {
281 margin-left: auto;
282 font-size: 10px;
283 display: flex;
284 align-items: center;
285 gap: 5px;
286 color: var(--muted)
287}
288
289.color-disc {
290 width: 9px;
291 height: 9px;
292 border-radius: 50%;
293 background: white;
294 border: 1px solid #8d978b
295}
296
297.color-disc.black {
298 background: #28382e;
299 border-color: #28382e
300}
301
302.color-disc.white {
303 background: #fff;
304 border-color: #8d978b
305}
306
307.color-disc.red {
308 background: #c62828;
309 border-color: #8e1b1b
310}
311
312.color-disc.blue {
313 background: #1565c0;
314 border-color: #0d47a1
315}
316
317.color-disc.green {
318 background: #2e7d32;
319 border-color: #1b5e20
320}
321
322.color-disc.yellow {
323 background: #f9a825;
324 border-color: #f57f17
325}
326
327.board-wrap {
328 padding: 15px;
329 position: relative
330}
331
332.board {
333 display: grid;
334 grid-template-columns: repeat(4, 1fr);
335 border-radius: 5px;
336 overflow: hidden;
337 aspect-ratio: 4/5;
338 touch-action: pan-y
339}
340
341.square {
342 position: relative;
343 aspect-ratio: 1;
344 background: var(--light-square);
345 display: grid;
346 place-items: center;
347 border: 0;
348 border-radius: 0;
349 padding: 0;
350 min-width: 0;
351 touch-action: none
352}
353
354.square.dark {
355 background: var(--dark-square)
356}
357
358.square:disabled {
359 opacity: 1;
360 cursor: default
361}
362
363.square:hover {
364 filter: none
365}
366
367.square img {
368 width: 82%;
369 height: 82%;
370 pointer-events: none;
371 user-select: none;
372 filter: drop-shadow(0 2px 1px #00000016)
373}
374
375.square.selected {
376 background: #d6d98b
377}
378
379.square.last:after {
380 content: "";
381 position: absolute;
382 inset: 0;
383 background: #e6df5350;
384 pointer-events: none
385}
386
387.square.selected:after {
388 background: transparent
389}
390
391.square.legal:before {
392 content: "";
393 width: 23%;
394 height: 23%;
395 background: #294d4560;
396 border-radius: 50%;
397 position: absolute;
398 z-index: 2;
399 pointer-events: none
400}
401
402.square.legal.occupied:before {
403 width: 90%;
404 height: 90%;
405 border: 5px solid #294d4560;
406 background: transparent
407}
408
409.square.checked {
410 background: #ce8e77
411}
412
413.coordinate {
414 position: absolute;
415 bottom: 2px;
416 right: 4px;
417 font-size: 9px;
418 font-weight: 600;
419 color: #38543c;
420 z-index: 1;
421 line-height: 1
422}
423
424.rank {
425 top: 4px;
426 left: 4px;
427 bottom: auto;
428 right: auto
429}
430
431.card-footer {
432 padding: 0 16px 14px;
433 display: flex;
434 justify-content: space-between;
435 align-items: center;
436 gap: 5px;
437 color: var(--muted);
438 font-size: 11px
439}
440
441.card-footer .turn-label {
442 color: var(--green);
443 font-weight: 600
444}
445
446.text-button {
447 background: transparent;
448 color: var(--green);
449 padding: 3px 0;
450 font-size: 12px
451}
452
453.waiting-heading {
454 border-top: 1px solid var(--line);
455 padding-top: 30px;
456 margin-top: 34px
457}
458
459.waiting .board {
460 filter: saturate(.62)
461}
462
463.empty {
464 grid-column: 1/-1;
465 min-height: 200px;
466 border: 1px dashed #ced4c5;
467 border-radius: 12px;
468 display: flex;
469 flex-direction: column;
470 align-items: center;
471 justify-content: center;
472 text-align: center;
473 padding: 28px;
474 color: var(--muted);
475 gap: 10px
476}
477
478.empty .empty-icon {
479 font: 40px Georgia;
480 color: #859673
481}
482
483.empty h3 {
484 color: var(--ink);
485 font-size: 16px
486}
487
488.empty p {
489 font-size: 13px;
490 max-width: 340px
491}
492
493.pending-content,
494.end-content {
495 display: flex;
496 flex-direction: column;
497 align-items: center;
498 justify-content: center;
499 text-align: center;
500 gap: 15px;
501 min-height: 300px;
502 padding: 24px
503}
504
505.pending-content .big-icon,
506.end-content .big-icon {
507 font-size: 48px;
508 font-family: Georgia;
509 color: #759160
510}
511
512.pending-content p,
513.end-content p {
514 font-size: 13px;
515 color: var(--muted)
516}
517
518.actions {
519 display: flex;
520 gap: 10px;
521 flex-wrap: wrap;
522 justify-content: center
523}
524
525.secondary {
526 background: #eaece3;
527 color: var(--ink)
528}
529
530.danger {
531 color: #9c4c3a;
532 background: #f4e9e2
533}
534
535.end-content {
536 min-height: 0;
537 aspect-ratio: 4/5
538}
539
540.rematch-note {
541 background: #edf2df;
542 padding: 8px;
543 border-radius: 7px
544}
545
546.promotion {
547 position: absolute;
548 inset: 0;
549 background: #fffefbf5;
550 z-index: 4;
551 display: flex;
552 align-items: center;
553 justify-content: center;
554 flex-direction: column;
555 text-align: center;
556 padding: 18px;
557 gap: 15px
558}
559
560.promotion-options {
561 display: grid;
562 grid-template-columns: repeat(2, 1fr);
563 gap: 10px;
564 width: 100%
565}
566
567.promotion-options button {
568 background: #edf0e5;
569 display: flex;
570 align-items: center;
571 flex-direction: column;
572 font-size: 11px
573}
574
575.promotion-options img {
576 height: 54px;
577 width: 54px
578}
579
580.promotion p {
581 font-size: 12px;
582 color: var(--muted)
583}
584
585aside {
586 border-left: 1px solid var(--line);
587 padding: 39px 25px;
588 display: flex;
589 flex-direction: column;
590 background: #f0f0e8
591}
592
593.sidebar-heading {
594 display: flex;
595 align-items: center;
596 justify-content: space-between
597}
598
599.sidebar-heading h2 {
600 font-size: 22px;
601 letter-spacing: -.8px
602}
603
604.sidebar-intro {
605 font-size: 12px;
606 color: var(--muted);
607 margin: 8px 0 23px
608}
609
610.invite-friend {
611 background: transparent;
612 border: 1px solid #cbd1bf;
613 color: var(--green);
614 text-align: left;
615 font-size: 12px;
616 width: 100%
617}
618
619.invite-friend span {
620 float: right
621}
622
623.friends-label {
624 font-size: 10px;
625 font-weight: 700;
626 letter-spacing: 1.5px;
627 margin: 30px 0 15px;
628 color: #858c7f;
629 display: flex;
630 justify-content: space-between
631}
632
633.friend {
634 display: flex;
635 gap: 10px;
636 align-items: center;
637 width: 100%;
638 background: transparent;
639 padding: 11px 0;
640 text-align: left;
641 border-radius: 6px
642}
643
644.friend .avatar {
645 width: 35px;
646 height: 35px
647}
648
649.friend strong {
650 font-size: 12px;
651 display: block;
652 max-width: 165px;
653 overflow: hidden;
654 text-overflow: ellipsis
655}
656
657.friend small {
658 display: block;
659 font-size: 10px;
660 color: var(--muted);
661 font-weight: 400;
662 margin-top: 2px
663}
664
665.friend>span:last-child {
666 margin-left: auto;
667 color: #9aa38d
668}
669
670.sidebar-note {
671 margin: auto 0 0;
672 padding: 65px 0 35px;
673 text-align: center
674}
675
676.sidebar-note>span {
677 font-size: 46px;
678 color: #879777
679}
680
681.sidebar-note h3 {
682 font-size: 14px;
683 margin: 9px 0
684}
685
686.sidebar-note p {
687 font-size: 12px;
688 color: var(--muted);
689 line-height: 1.8
690}
691
692#account-summary {
693 border-top: 1px solid var(--line);
694 padding-top: 18px;
695 display: flex;
696 align-items: center;
697 gap: 10px;
698 font-size: 12px
699}
700
701#account-summary small {
702 display: block;
703 font-size: 10px;
704 color: var(--muted)
705}
706
707footer {
708 display: flex;
709 align-items: center;
710 gap: 10px;
711 color: #969b8f;
712 font-size: 10px;
713 margin-top: 40px
714}
715
716footer button {
717 margin-left: auto
718}
719
720.mobile-friends,
721#friends-close {
722 display: none
723}
724
725dialog {
726 border: 1px solid var(--line);
727 border-radius: 16px;
728 background: var(--paper);
729 color: var(--ink);
730 padding: 36px;
731 width: min(460px, calc(100% - 32px));
732 box-shadow: 0 25px 80px #15231830
733}
734
735dialog::backdrop {
736 background: #25352c66;
737 backdrop-filter: blur(3px)
738}
739
740dialog h2 {
741 font-size: 25px;
742 margin-bottom: 13px;
743 letter-spacing: -1px
744}
745
746dialog p {
747 font-size: 14px;
748 color: var(--muted);
749 margin-bottom: 20px
750}
751
752dialog .actions {
753 justify-content: flex-start;
754 margin-top: 20px
755}
756
757.modal-close {
758 position: absolute;
759 right: 8px;
760 top: 6px
761}
762
763dialog input {
764 width: 100%;
765 border: 1px solid var(--line);
766 border-radius: 6px;
767 padding: 12px;
768 background: #f5f5ee;
769 color: var(--ink)
770}
771
772.stats {
773 display: grid;
774 grid-template-columns: repeat(3, 1fr);
775 background: #eff1e7;
776 border-radius: 10px;
777 padding: 20px;
778 margin: 22px 0;
779 text-align: center
780}
781
782.stats strong {
783 display: block;
784 font-size: 27px
785}
786
787.stats span {
788 font-size: 11px;
789 color: var(--muted)
790}
791
792.settings-actions {
793 display: flex;
794 flex-direction: column;
795 gap: 10px
796}
797
798.settings-actions a {
799 text-align: center;
800 text-decoration: none
801}
802
803#toast {
804 position: fixed;
805 bottom: 22px;
806 left: 50%;
807 transform: translateX(-50%);
808 background: var(--ink);
809 color: white;
810 padding: 13px 20px;
811 border-radius: 9px;
812 z-index: 20;
813 max-width: calc(100% - 30px);
814 font-size: 13px;
815 box-shadow: 0 5px 25px #0002;
816 display: none
817}
818
819#toast.visible {
820 display: block
821}
822
823.login {
824 max-width: 900px;
825 margin: 10vh auto
826}
827
828.login h1 {
829 font-size: 70px;
830 line-height: 1.05;
831 margin: 20px 0
832}
833
834.login p {
835 font-size: 18px;
836 color: var(--muted);
837 max-width: 500px;
838 margin-bottom: 32px
839}
840
841.login .button {
842 display: inline-flex;
843 gap: 25px
844}
845
846.login small {
847 display: block;
848 margin-top: 16px;
849 color: var(--muted)
850}
851
852.drag-ghost {
853 position: fixed;
854 width: 65px;
855 height: 65px;
856 pointer-events: none;
857 z-index: 50;
858 transform: translate(-50%, -50%)
859}
860
861.rules-list {
862 padding-left: 20px;
863 font-size: 14px;
864 color: var(--muted)
865}
866
867.rules-list li {
868 margin-bottom: 8px
869}
870
871.inline-note {
872 font-size: 11px;
873 color: var(--muted)
874}
875
876@media(min-width:1450px) {
877 .layout {
878 grid-template-columns: minmax(0, 1fr) 330px
879 }
880
881 main {
882 padding: 48px 60px
883 }
884
885 .game-grid {
886 grid-template-columns: repeat(auto-fill, minmax(260px, 1fr))
887 }
888}
889
890@media(max-width:1050px) {
891 main {
892 padding: 30px 25px
893 }
894
895 .topbar {
896 padding: 0 25px
897 }
898
899 .layout {
900 grid-template-columns: minmax(0, 1fr) 260px
901 }
902
903 aside {
904 padding: 30px 20px
905 }
906
907 .game-grid {
908 gap: 16px;
909 grid-template-columns: repeat(auto-fill, minmax(210px, 1fr))
910 }
911
912 .section-heading>span {
913 display: none
914 }
915}
916
917@media(max-width:760px) {
918 .topbar {
919 height: 70px;
920 padding: 0 20px;
921 position: sticky;
922 top: 0;
923 z-index: 7
924 }
925
926 .brand {
927 font-size: 22px
928 }
929
930 .brandmark {
931 width: 32px;
932 height: 32px;
933 font-size: 26px;
934 line-height: 29px;
935 margin-right: 9px
936 }
937
938 .tagline {
939 display: none
940 }
941
942 .account-nav>.quiet {
943 font-size: 11px;
944 padding: 8px
945 }
946
947 .mobile-friends {
948 display: block;
949 background: #e7ecde;
950 color: var(--green);
951 font-size: 12px;
952 padding: 9px 10px
953 }
954
955 .mobile-friends span {
956 margin-left: 5px
957 }
958
959 .layout {
960 display: block
961 }
962
963 main {
964 padding: 30px 20px
965 }
966
967 h1 {
968 font-size: 36px
969 }
970
971 .page-heading {
972 align-items: flex-start;
973 margin-bottom: 30px;
974 gap: 10px
975 }
976
977 .page-heading>.primary {
978 font-size: 12px;
979 padding: 10px 12px;
980 margin-top: 27px
981 }
982
983 .page-heading p {
984 font-size: 12px;
985 max-width: 200px
986 }
987
988 .eyebrow {
989 font-size: 9px;
990 letter-spacing: 1.6px
991 }
992
993 .game-grid {
994 grid-template-columns: minmax(0, 1fr);
995 gap: 20px
996 }
997
998 .game-card {
999 max-width: 460px;
1000 width: 100%;
1001 justify-self: center
1002 }
1003
1004 .board-wrap {
1005 padding: 18px
1006 }
1007
1008 .card-header {
1009 padding: 15px 18px
1010 }
1011
1012 .card-header strong {
1013 font-size: 14px
1014 }
1015
1016 .card-footer {
1017 padding: 0 18px 16px
1018 }
1019
1020 .layout aside {
1021 position: fixed;
1022 right: 0;
1023 top: 0;
1024 bottom: 0;
1025 width: min(320px, 90vw);
1026 z-index: 12;
1027 transform: translateX(100%);
1028 transition: transform .2s;
1029 overflow-y: auto
1030 }
1031
1032 .layout aside.open {
1033 transform: translateX(0)
1034 }
1035
1036 #friends-close {
1037 display: block
1038 }
1039
1040 #sidebar-backdrop:not([hidden]) {
1041 display: block;
1042 position: fixed;
1043 inset: 0;
1044 background: #25352c66;
1045 z-index: 11
1046 }
1047
1048 footer {
1049 flex-wrap: wrap;
1050 font-size: 9px
1051 }
1052
1053 .login {
1054 padding: 45px 25px;
1055 margin: 4vh auto
1056 }
1057
1058 .login h1 {
1059 font-size: 52px
1060 }
1061
1062 .login p {
1063 font-size: 16px
1064 }
1065
1066 .sidebar-note {
1067 padding-top: 40px
1068 }
1069
1070 .section-heading h2 {
1071 font-size: 16px
1072 }
1073
1074 .square img {
1075 max-width: 90px
1076 }
1077
1078 .end-content {
1079 aspect-ratio: auto;
1080 min-height: 340px
1081 }
1082}
1083
1084@media(prefers-reduced-motion:reduce) {
1085 * {
1086 transition: none !important
1087 }
1088}
1089
1090@media(max-width:760px) {
1091 body.sidebar-open {
1092 overflow: hidden
1093 }
1094}
1095
1096.avatar img {
1097 width: 90%;
1098 height: 90%;
1099 object-fit: contain
1100}
1101
1102
1103#account-summary .account-name-button {
1104 border: 0;
1105 background: transparent;
1106 padding: 0;
1107 text-align: left;
1108 font: inherit;
1109 color: inherit;
1110 cursor: pointer;
1111 min-width: 0
1112}
1113
1114#account-summary .account-name-button:hover span {
1115 text-decoration: underline
1116}
1117
1118#account-summary .account-name-button span {
1119 display: block;
1120 overflow: hidden;
1121 text-overflow: ellipsis;
1122 white-space: nowrap
1123}
1124
1125.settings-check {
1126 display: flex;
1127 align-items: center;
1128 gap: 10px;
1129 margin: 12px 0 4px;
1130 padding: 10px 12px;
1131 border: 1px solid var(--line);
1132 border-radius: 12px;
1133 background: var(--paper);
1134 font-size: 13px;
1135 cursor: pointer
1136}
1137
1138.settings-check:hover {
1139 border-color: #c9d2b8
1140}
1141
1142/* Match Microchess green controls instead of native OS widgets. */
1143input[type="checkbox"],
1144input[type="radio"] {
1145 appearance: none;
1146 -webkit-appearance: none;
1147 width: 1.1rem;
1148 height: 1.1rem;
1149 margin: 0;
1150 flex-shrink: 0;
1151 border: 2px solid var(--green);
1152 background: var(--paper);
1153 display: inline-grid;
1154 place-content: center;
1155 cursor: pointer;
1156 transition: background .15s, border-color .15s, box-shadow .15s
1157}
1158
1159input[type="checkbox"] {
1160 border-radius: 4px
1161}
1162
1163input[type="radio"] {
1164 border-radius: 50%
1165}
1166
1167input[type="checkbox"]::before,
1168input[type="radio"]::before {
1169 content: "";
1170 width: .55rem;
1171 height: .55rem;
1172 transform: scale(0);
1173 transition: transform .12s ease-in-out;
1174 box-shadow: inset 1em 1em var(--paper)
1175}
1176
1177input[type="checkbox"]::before {
1178 clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%)
1179}
1180
1181input[type="radio"]::before {
1182 border-radius: 50%;
1183 box-shadow: inset 1em 1em var(--green)
1184}
1185
1186input[type="checkbox"]:checked {
1187 background: var(--green);
1188 border-color: var(--green)
1189}
1190
1191input[type="checkbox"]:checked::before,
1192input[type="radio"]:checked::before {
1193 transform: scale(1)
1194}
1195
1196input[type="radio"]:checked {
1197 background: var(--paper);
1198 border-color: var(--green)
1199}
1200
1201input[type="checkbox"]:focus-visible,
1202input[type="radio"]:focus-visible {
1203 outline: 2px solid var(--green);
1204 outline-offset: 2px
1205}
1206
1207.color-mode-options {
1208 display: grid;
1209 gap: 10px;
1210 margin: 16px 0
1211}
1212
1213.color-mode-option {
1214 display: flex;
1215 gap: 10px;
1216 align-items: flex-start;
1217 padding: 12px;
1218 border: 1px solid var(--line);
1219 border-radius: 12px;
1220 background: var(--paper);
1221 cursor: pointer;
1222 transition: border-color .15s, background .15s, box-shadow .15s
1223}
1224
1225.color-mode-option:hover {
1226 border-color: #c9d2b8
1227}
1228
1229.color-mode-option:has(input:checked) {
1230 border-color: var(--green);
1231 background: #eef5e4;
1232 box-shadow: 0 0 0 1px rgba(54, 93, 69, 0.2)
1233}
1234
1235.color-mode-option strong {
1236 display: block
1237}
1238
1239.color-mode-option small {
1240 display: block;
1241 color: var(--muted);
1242 margin-top: 2px
1243}
1244
1245.custom-color-pickers {
1246 display: grid;
1247 grid-template-columns: 1fr 1fr;
1248 gap: 12px;
1249 margin-bottom: 16px
1250}
1251
1252.custom-color-pickers[hidden] {
1253 display: none
1254}
1255
1256.color-king-choice {
1257 display: grid;
1258 justify-items: center;
1259 gap: 4px;
1260 padding: 12px 8px;
1261 border: 1px solid var(--line);
1262 border-radius: 12px;
1263 background: #f7f8f2;
1264 cursor: pointer;
1265 font: inherit;
1266 color: inherit
1267}
1268
1269.color-king-choice img {
1270 width: 64px;
1271 height: 64px;
1272 object-fit: contain
1273}
1274
1275.color-king-choice span {
1276 font-size: 11px;
1277 color: var(--muted)
1278}
1279
1280.color-king-choice:hover {
1281 border-color: #8d978b
1282}
1283
1284.replay-players span[title] {
1285 cursor: help
1286}
1287
1288#avatar-button {
1289 padding: 0;
1290 color: inherit;
1291 outline-offset: 4px;
1292 flex-shrink: 0
1293}
1294
1295#avatar-button:hover {
1296 background: #dce6cb;
1297 box-shadow: 0 0 0 3px #dce6cb
1298}
1299
1300dialog.avatar-picker {
1301 width: min(700px, calc(100% - 28px));
1302 max-height: calc(100dvh - 32px);
1303 overflow-y: auto
1304}
1305
1306.avatar-filters {
1307 display: flex;
1308 align-items: center;
1309 justify-content: space-between;
1310 gap: 12px;
1311 flex-wrap: wrap;
1312 margin: 20px 0
1313}
1314
1315.avatar-tabs {
1316 display: flex;
1317 gap: 5px
1318}
1319
1320.avatar-tabs button {
1321 font-size: 12px;
1322 padding: 8px 12px
1323}
1324
1325.avatar-tabs button[aria-pressed=true] {
1326 background: var(--green);
1327 color: white
1328}
1329
1330#avatar-color {
1331 font: inherit;
1332 font-size: 12px;
1333 color: var(--ink);
1334 background: var(--paper);
1335 border: 1px solid var(--line);
1336 border-radius: 7px;
1337 padding: 8px;
1338 max-width: 100%
1339}
1340
1341.avatar-choices {
1342 display: grid;
1343 grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
1344 gap: 10px;
1345 max-height: 390px;
1346 overflow-y: auto;
1347 padding: 4px
1348}
1349
1350.avatar-choice {
1351 display: flex;
1352 align-items: center;
1353 flex-direction: column;
1354 justify-content: center;
1355 gap: 7px;
1356 min-height: 108px;
1357 padding: 9px 5px;
1358 background: #eff1e7;
1359 border: 2px solid transparent;
1360 font-size: 10px;
1361 line-height: 1.3;
1362 font-weight: 500
1363}
1364
1365.avatar-choice img {
1366 width: 54px;
1367 height: 54px;
1368 object-fit: contain
1369}
1370
1371.avatar-choice[aria-pressed=true] {
1372 border-color: var(--green);
1373 background: #dde8cc
1374}
1375
1376.avatar-picker-footer {
1377 display: flex;
1378 justify-content: space-between;
1379 align-items: center;
1380 gap: 15px;
1381 margin-top: 18px
1382}
1383
1384dialog .avatar-credits {
1385 font-size: 10px;
1386 margin: 16px 0 0;
1387 line-height: 1.6
1388}
1389
1390.avatar-no-results {
1391 grid-column: 1/-1;
1392 padding: 25px 10px;
1393 text-align: center
1394}
1395
1396#avatar-color:focus-visible {
1397 outline: 3px solid #c19042;
1398 outline-offset: 3px
1399}
1400
1401@media(max-width:760px) {
1402 dialog.avatar-picker {
1403 padding: 30px 20px 22px
1404 }
1405
1406 .avatar-choices {
1407 grid-template-columns: repeat(3, minmax(0, 1fr));
1408 max-height: 42dvh
1409 }
1410
1411 .avatar-tabs button {
1412 padding: 8px 10px;
1413 font-size: 11px
1414 }
1415}
1416
1417.ended-board {
1418 position: relative
1419}
1420
1421.ended-board .end-content {
1422 position: absolute;
1423 left: 15px;
1424 right: 15px;
1425 top: 50%;
1426 transform: translateY(-50%);
1427 min-height: 0;
1428 aspect-ratio: auto;
1429 padding: 12px 8px;
1430 display: flex;
1431 flex-direction: row;
1432 justify-content: space-between;
1433 gap: 8px;
1434 text-align: left;
1435 background: rgb(255 254 251 / 82%);
1436 opacity: .72;
1437 transition: opacity .72s, background .18s
1438}
1439
1440.end-content:hover,
1441.end-content:focus-within {
1442 background: rgb(255 254 251 / 94%);
1443 opacity: 1
1444}
1445
1446.end-status {
1447 min-width: 0
1448}
1449
1450.end-status h3 {
1451 font-size: 13px;
1452 line-height: 1.3
1453}
1454
1455.end-status small {
1456 display: block;
1457 font-size: 10px
1458}
1459
1460.end-content .actions {
1461 flex-wrap: nowrap;
1462 gap: 4px
1463}
1464
1465.end-content button {
1466 font-size: 10px;
1467 padding: 8px 6px
1468}
1469
1470.stop-inactive {
1471 margin-left: auto;
1472 background: #b73535;
1473 color: white;
1474 font-size: 22px;
1475 line-height: 1;
1476 padding: 3px 7px;
1477 flex-shrink: 0
1478}
1479
1480.card-header:has(.stop-inactive) .color-tag {
1481 margin-left: auto
1482}
1483
1484.card-header:has(.stop-inactive) {
1485 gap: 6px
1486}
1487
1488@media(hover:none) {
1489 .ended-board .end-content {
1490 opacity: 1;
1491 background: rgb(255 254 251 / 82%)
1492 }
1493}
1494
1495@media(min-width:761px) {
1496 #sidebar {
1497 position: sticky;
1498 top: 0;
1499 align-self: start;
1500 height: 100dvh;
1501 overflow-y: auto;
1502 padding-top: 24px;
1503 padding-bottom: 105px
1504 }
1505
1506 #sidebar>* {
1507 flex-shrink: 0
1508 }
1509
1510 #friend-list {
1511 flex: 1 1 auto;
1512 min-height: 60px;
1513 overflow-y: auto
1514 }
1515
1516 .sidebar-note {
1517 padding: 18px 0
1518 }
1519
1520 .sidebar-note>span {
1521 font-size: 30px
1522 }
1523}
1524
1525/* One-time tactical move feedback. */
1526.game-card {
1527 position: relative
1528}
1529
1530.move-feedback {
1531 position: absolute;
1532 inset: 0;
1533 z-index: 5;
1534 pointer-events: none;
1535 border-radius: 12px;
1536 border: 3px solid var(--feedback);
1537 box-shadow: inset 0 0 38px var(--feedback-glow);
1538 background: var(--feedback-tint);
1539 opacity: 0
1540}
1541
1542.move-feedback.good {
1543 --feedback: #3188ea;
1544 --feedback-glow: #3188ea77;
1545 --feedback-tint: #3188ea16
1546}
1547
1548.move-feedback.poor {
1549 --feedback: #d94a48;
1550 --feedback-glow: #d94a4890;
1551 --feedback-tint: #d94a4818
1552}
1553
1554.move-quality {
1555 position: absolute;
1556 bottom: 38px;
1557 right: 10px;
1558 padding: 6px 10px;
1559 border-radius: 7px;
1560 background: var(--paper);
1561 border-left: 4px solid var(--feedback);
1562 color: var(--ink);
1563 font-size: 12px;
1564 font-weight: 700;
1565 box-shadow: 0 2px 12px #0002
1566}
1567
1568.move-quality small {
1569 display: block;
1570 font-size: 9px;
1571 font-weight: 400;
1572 color: var(--muted)
1573}
1574
1575/* Remaining material, with White always on the left. */
1576.opponent-info {
1577 flex: 1;
1578 min-width: 0
1579}
1580
1581.opponent-info strong {
1582 display: block
1583}
1584
1585.material-bar {
1586 height: 7px;
1587 max-width: 160px;
1588 margin-top: 5px;
1589 border: 1px solid #879187;
1590 border-radius: 5px;
1591 background: #202823;
1592 overflow: hidden;
1593 direction: ltr
1594}
1595
1596.material-white {
1597 display: block;
1598 width: 100%;
1599 height: 100%;
1600 background: #fffefb;
1601 transform: scaleX(.5);
1602 transform-origin: left center
1603}
1604
1605.material-bar:focus-visible {
1606 outline: 2px solid #c19042;
1607 outline-offset: 3px
1608}
1609
1610.opponent-name {
1611 padding: 0;
1612 border: 0;
1613 background: transparent;
1614 color: inherit;
1615 font: inherit;
1616 cursor: pointer;
1617}
1618.opponent-name:hover { text-decoration: underline; }
1619.friend-request {
1620 display: flex;
1621 align-items: center;
1622 gap: 10px;
1623 margin: 12px 0;
1624}
1625.friend-request > div { min-width: 0; }
1626.friend-request strong { overflow-wrap: anywhere; font-size: 13px; }
1627.friend-request .actions { margin-top: 8px; flex-wrap: wrap; }
1628.friend-request button { padding: 7px 10px; font-size: 12px; }
1629
1630#history-button { margin-left: auto; flex-shrink: 0; font-size: 22px; }
1631.history-list { display: grid; gap: 8px; max-height: 65vh; overflow-y: auto; }
1632.history-entry { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; text-align: left; }
1633.history-entry strong { overflow-wrap: anywhere; }
1634dialog.replay-modal { width: min(400px, calc(100vw - 24px)); }
1635.replay-controls { display: flex; justify-content: space-between; gap: 6px; margin-top: 18px; }
1636#replay-progress { font-size: 12px; text-align: center; }
1637.saved-hourglass { position: fixed; z-index: 100; pointer-events: none; font-size: 24px; }
1638
1639.replay-players { justify-content: center; gap: 8px; font-size: 12px; }
1640.replay-players span { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
1641.replay-players img { width: 24px; height: 24px; flex-shrink: 0; }
1642.replay-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
1643#replay-share { margin-left: auto; font-size: 22px; }
1644.replay-controls button { font-size: 18px; min-width: 0; flex: 1; padding-inline: 8px; }
1645
1646body.replay-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px 12px; }
1647#replay-page { width: min(360px, 100%); }
1648
1649/* Notification links identify a tile without opening a game or dialog. */
1650.game-card { position: relative; }
1651.notification-highlight { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 5; animation: notification-pulse 1s ease-in-out 3; }
1652@keyframes notification-pulse { 0%, 100% { background: rgb(130 130 130 / 8%); box-shadow: inset 0 0 0 3px rgb(130 130 130 / 20%); } 50% { background: rgb(255 255 255 / 65%); box-shadow: inset 0 0 0 3px rgb(145 145 145 / 75%); } }
1653.notification-highlight-static { animation: none; box-shadow: inset 0 0 0 3px #999; background: rgb(255 255 255 / 20%); }
1654#notification-settings { margin: 1rem 0; }
1655#notification-settings .inline-note { margin-top: .5rem; }
1656#install-help { font-size: .9rem; }
1657.login [data-install-app] { display: block; margin: 1rem auto; }
1658
1659#notification-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
1660#notification-dialog details { margin-top: 16px; font-size: 13px; overflow-wrap: anywhere; }
1661#notification-dialog summary { cursor: pointer; color: var(--muted); }
1662#notification-dialog details p { margin: 8px 0 0; }
1663#notification-dialog #push-settings-page { font-size: 14px; }