BlueGit

projects-timfalken-com microchess

Files

microchess / web / assets / app.css

app.css

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