cortico-world-canvas 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1326 @@
1
+ :root {
2
+ --ink: #3d3945;
3
+ --muted: #746b7b;
4
+ --paper: #fffdfa;
5
+ --line: #dcd4e1;
6
+ --accent: #8c5970;
7
+ --soft: #f3e8ef;
8
+ font-family: "Segoe UI","Microsoft YaHei",sans-serif;
9
+ font-size: 18px;
10
+ font-weight: 500;
11
+ color: var(--ink);
12
+ background: #f2eef5;
13
+ font-synthesis: none;
14
+ }
15
+
16
+ * {
17
+ box-sizing: border-box;
18
+ }
19
+
20
+ body {
21
+ margin: 0;
22
+ }
23
+
24
+ button,input,select {
25
+ font: inherit;
26
+ }
27
+
28
+ button,a,input,select {
29
+ touch-action: manipulation;
30
+ }
31
+
32
+ button {
33
+ border: 1px solid var(--accent);
34
+ border-radius: 8px;
35
+ background: var(--accent);
36
+ color: #fff;
37
+ padding: 10px 17px;
38
+ cursor: pointer;
39
+ font-weight: 600;
40
+ transition: background .15s,transform .15s;
41
+ }
42
+
43
+ button:hover {
44
+ background: #76465d;
45
+ transform: translateY(-1px);
46
+ }
47
+
48
+ button:disabled {
49
+ opacity: .4;
50
+ cursor: default;
51
+ }
52
+
53
+ button.secondary {
54
+ background: var(--soft);
55
+ border-color: var(--line);
56
+ color: var(--ink);
57
+ }
58
+
59
+ button.secondary:hover {
60
+ background: #ead9e5;
61
+ }
62
+
63
+ a {
64
+ color: var(--accent);
65
+ text-decoration: none;
66
+ font-size: 17px;
67
+ }
68
+
69
+ header {
70
+ min-height: 84px;
71
+ padding: 0 30px;
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: space-between;
75
+ background: var(--paper);
76
+ border-bottom: 1px solid var(--line);
77
+ }
78
+
79
+ .brand,.header-actions {
80
+ display: flex;
81
+ gap: 13px;
82
+ align-items: center;
83
+ }
84
+
85
+ .brand b {
86
+ font-size: 24px;
87
+ font-weight: 650;
88
+ letter-spacing: .5px;
89
+ }
90
+
91
+ .brand-mark {
92
+ display: grid;
93
+ place-items: center;
94
+ width: 48px;
95
+ height: 48px;
96
+ flex: none;
97
+ background: #f2d6e1;
98
+ color: var(--accent);
99
+ border: 1px solid var(--line);
100
+ border-radius: 13px;
101
+ font-family: Georgia,serif;
102
+ font-size: 29px;
103
+ }
104
+
105
+ .header-actions {
106
+ gap: 22px;
107
+ }
108
+
109
+ .pill {
110
+ background: var(--soft);
111
+ color: var(--muted);
112
+ padding: 7px 11px;
113
+ border-radius: 20px;
114
+ font-size: 16px;
115
+ border: 1px solid var(--line);
116
+ white-space: nowrap;
117
+ }
118
+
119
+ .pill.online {
120
+ background: #e6f0e9;
121
+ color: #4f7160;
122
+ }
123
+
124
+ .pill.online::before {
125
+ content: '';
126
+ display: inline-block;
127
+ width: 9px;
128
+ height: 9px;
129
+ border-radius: 50%;
130
+ background: #718c79;
131
+ margin-right: 6px;
132
+ }
133
+
134
+ main {
135
+ display: grid;
136
+ grid-template-columns: 240px minmax(300px,1fr) 240px;
137
+ gap: 20px;
138
+ padding: 24px;
139
+ max-width: 1920px;
140
+ margin: auto;
141
+ height: calc(100vh - 84px);
142
+ min-height: 650px;
143
+ }
144
+
145
+ .panel {
146
+ background: var(--paper);
147
+ border: 1px solid var(--line);
148
+ border-radius: 14px;
149
+ padding: 20px 16px;
150
+ overflow: auto;
151
+ }
152
+
153
+ .section-title {
154
+ display: flex;
155
+ justify-content: space-between;
156
+ align-items: center;
157
+ gap: 8px;
158
+ }
159
+
160
+ h2 {
161
+ font-size: 22px;
162
+ font-weight: 650;
163
+ margin: 0;
164
+ }
165
+
166
+ .section-title>span {
167
+ font-size: 16px;
168
+ color: var(--muted);
169
+ }
170
+
171
+ .upload {
172
+ position: relative;
173
+ border: 1px dashed #bfa7ba;
174
+ border-radius: 13px;
175
+ display: flex;
176
+ align-items: center;
177
+ flex-direction: column;
178
+ text-align: center;
179
+ gap: 6px;
180
+ padding: 20px 8px;
181
+ margin-top: 20px;
182
+ background: var(--soft);
183
+ cursor: pointer;
184
+ }
185
+
186
+ .upload-plus {
187
+ font-size: 27px;
188
+ }
189
+
190
+ .upload strong {
191
+ font-size: 18px;
192
+ }
193
+
194
+ .upload small {
195
+ font-size: 14px;
196
+ color: var(--muted);
197
+ line-height: 1.8;
198
+ }
199
+
200
+ .upload input {
201
+ position: absolute;
202
+ inset: 0;
203
+ opacity: 0;
204
+ width: 100%;
205
+ cursor: pointer;
206
+ }
207
+
208
+ .upload.drag {
209
+ border-color: var(--accent);
210
+ background: #efdeea;
211
+ }
212
+
213
+ .muted {
214
+ color: var(--muted);
215
+ font-size: 16px;
216
+ line-height: 1.8;
217
+ }
218
+
219
+ .empty-small {
220
+ text-align: center;
221
+ margin: 36px 0;
222
+ }
223
+
224
+ .pending {
225
+ margin-top: 10px;
226
+ display: grid;
227
+ gap: 8px;
228
+ }
229
+
230
+ .pending-row {
231
+ display: grid;
232
+ grid-template-columns: 34px 1fr;
233
+ gap: 8px;
234
+ }
235
+
236
+ .pending-row img {
237
+ width: 34px;
238
+ height: 34px;
239
+ object-fit: cover;
240
+ border-radius: 6px;
241
+ }
242
+
243
+ .pending-row input {
244
+ min-width: 0;
245
+ width: 100%;
246
+ font-size: 16px;
247
+ }
248
+
249
+ .pending button {
250
+ font-size: 16px;
251
+ }
252
+
253
+ .reference-list {
254
+ display: grid;
255
+ gap: 12px;
256
+ margin-top: 18px;
257
+ }
258
+
259
+ .reference-card {
260
+ border: 1px solid var(--line);
261
+ border-radius: 11px;
262
+ overflow: hidden;
263
+ background: var(--paper);
264
+ }
265
+
266
+ .reference-card .thumb {
267
+ border: 0;
268
+ width: 100%;
269
+ height: 130px;
270
+ object-fit: contain;
271
+ display: block;
272
+ background: var(--soft);
273
+ cursor: zoom-in;
274
+ }
275
+
276
+ .reference-info {
277
+ padding: 9px;
278
+ }
279
+
280
+ .reference-info input {
281
+ width: 100%;
282
+ font-size: 16px;
283
+ padding: 5px;
284
+ background: white;
285
+ }
286
+
287
+ .reference-info .ref-name {
288
+ font-size: 18px;
289
+ font-weight: 600;
290
+ word-break: break-word;
291
+ }
292
+
293
+ .reference-info small {
294
+ font-size: 14px;
295
+ color: var(--muted);
296
+ display: block;
297
+ margin: 4px 0;
298
+ }
299
+
300
+ .ref-actions {
301
+ display: flex;
302
+ gap: 8px;
303
+ }
304
+
305
+ .ref-actions button {
306
+ padding: 4px 7px;
307
+ font-size: 14px;
308
+ }
309
+
310
+ .workspace {
311
+ min-width: 0;
312
+ display: flex;
313
+ flex-direction: column;
314
+ }
315
+
316
+ .board-heading {
317
+ display: flex;
318
+ align-items: center;
319
+ justify-content: space-between;
320
+ gap: 12px;
321
+ margin-bottom: 17px;
322
+ }
323
+
324
+ h1 {
325
+ font-size: 30px;
326
+ margin: 8px 0 5px;
327
+ font-weight: 650;
328
+ overflow-wrap: anywhere;
329
+ }
330
+
331
+ .buttons {
332
+ display: flex;
333
+ gap: 9px;
334
+ flex-shrink: 0;
335
+ }
336
+
337
+ .toolbar {
338
+ display: flex;
339
+ align-items: center;
340
+ gap: 16px;
341
+ background: var(--paper);
342
+ border: 1px solid var(--line);
343
+ border-radius: 13px;
344
+ padding: 10px 14px;
345
+ flex-wrap: wrap;
346
+ margin-bottom: 14px;
347
+ }
348
+
349
+ .toolbar label {
350
+ display: flex;
351
+ align-items: center;
352
+ gap: 6px;
353
+ font-size: 16px;
354
+ }
355
+
356
+ .toolbar select {
357
+ font-size: 16px;
358
+ width: 104px;
359
+ padding: 5px;
360
+ }
361
+
362
+ .toolbar input[type=color] {
363
+ width: 27px;
364
+ height: 27px;
365
+ border: 0;
366
+ padding: 0;
367
+ background: none;
368
+ }
369
+
370
+ .toolbar input[type=range] {
371
+ width: 65px;
372
+ accent-color: var(--accent);
373
+ }
374
+
375
+ .toolbar output {
376
+ width: 20px;
377
+ }
378
+
379
+ input,select {
380
+ border: 1px solid var(--line);
381
+ border-radius: 7px;
382
+ padding: 9px;
383
+ background: #fff;
384
+ color: var(--ink);
385
+ }
386
+
387
+ .stage {
388
+ flex: 1;
389
+ min-height: 260px;
390
+ position: relative;
391
+ display: flex;
392
+ justify-content: center;
393
+ align-items: center;
394
+ background: #e7e1ef;
395
+ border: 1px solid var(--line);
396
+ border-radius: 16px;
397
+ overflow: hidden;
398
+ padding: 26px;
399
+ }
400
+
401
+ #empty-board {
402
+ text-align: center;
403
+ }
404
+
405
+ #empty-board p {
406
+ font-size: 20px;
407
+ }
408
+
409
+ #board-wrap {
410
+ position: relative;
411
+ flex: none;
412
+ outline: 1px solid #303a3720;
413
+ box-shadow: 0 4px 18px #303a3710;
414
+ line-height: 0;
415
+ }
416
+
417
+ #canvas {
418
+ display: block;
419
+ width: 100%;
420
+ height: 100%;
421
+ touch-action: none;
422
+ cursor: crosshair;
423
+ }
424
+
425
+ #board-wrap[hidden] {
426
+ display: none;
427
+ }
428
+
429
+ .board-footer {
430
+ display: flex;
431
+ justify-content: space-between;
432
+ gap: 12px;
433
+ padding: 13px 5px;
434
+ font-size: 16px;
435
+ color: var(--muted);
436
+ }
437
+
438
+ #progress.active {
439
+ color: var(--accent);
440
+ }
441
+
442
+ #message {
443
+ min-height: 21px;
444
+ font-size: 16px;
445
+ overflow-wrap: anywhere;
446
+ }
447
+
448
+ #message.error {
449
+ color: #975548;
450
+ }
451
+
452
+ #steps {
453
+ list-style: none;
454
+ margin: 0;
455
+ padding: 0;
456
+ display: flex;
457
+ flex-direction: column;
458
+ gap: 13px;
459
+ }
460
+
461
+ .step {
462
+ border-left: 2px solid var(--line);
463
+ padding-left: 12px;
464
+ }
465
+
466
+ .step .step-top {
467
+ display: flex;
468
+ gap: 8px;
469
+ justify-content: space-between;
470
+ }
471
+
472
+ .step strong {
473
+ font-size: 17px;
474
+ font-weight: 600;
475
+ word-break: break-word;
476
+ }
477
+
478
+ .step small {
479
+ font-size: 14px;
480
+ color: var(--muted);
481
+ display: block;
482
+ margin-top: 6px;
483
+ }
484
+
485
+ .step code {
486
+ display: block;
487
+ font-size: 13px;
488
+ overflow-wrap: anywhere;
489
+ line-height: 1.5;
490
+ margin-top: 5px;
491
+ color: var(--muted);
492
+ }
493
+
494
+ .step button {
495
+ font-size: 14px;
496
+ padding: 3px 6px;
497
+ min-height: 30px;
498
+ flex: none;
499
+ }
500
+
501
+ .cursor {
502
+ position: absolute;
503
+ top: 0;
504
+ left: 0;
505
+ pointer-events: none;
506
+ line-height: 1;
507
+ z-index: 2;
508
+ filter: drop-shadow(0 1px 2px #7778);
509
+ transition: transform 50ms linear;
510
+ }
511
+
512
+ .cursor img {
513
+ position: absolute;
514
+ left: 17px;
515
+ top: 16px;
516
+ width: 48px;
517
+ height: 48px;
518
+ image-rendering: pixelated;
519
+ animation: idle 960ms infinite steps(1);
520
+ }
521
+
522
+ .cursor-tip {
523
+ display: block;
524
+ width: 10px;
525
+ height: 10px;
526
+ border: 2px solid var(--accent);
527
+ border-radius: 50%;
528
+ background: #fff9;
529
+ transform: translate(-50%,-50%);
530
+ }
531
+
532
+ .cursor-name {
533
+ position: absolute;
534
+ left: 25px;
535
+ top: 65px;
536
+ background: var(--paper);
537
+ padding: 3px 5px;
538
+ border-radius: 4px;
539
+ font-size: 14px;
540
+ border: 1px solid var(--line);
541
+ white-space: nowrap;
542
+ }
543
+
544
+ .cursor[data-mode=moving] img {
545
+ animation: moving 240ms infinite steps(1);
546
+ }
547
+
548
+ .cursor[data-mode=pressed] img {
549
+ animation: pressed 240ms steps(1) forwards;
550
+ }
551
+
552
+ .cursor[data-mode=pressed] .cursor-tip {
553
+ background: #aabfae;
554
+ box-shadow: 0 0 0 4px #aabfae30;
555
+ }
556
+
557
+ .cursor[data-mode=released] img {
558
+ animation: released 130ms steps(1) forwards;
559
+ }
560
+
561
+ @keyframes idle {
562
+ 0%,81% {
563
+ translate: 0 0;
564
+ }
565
+ 29% {
566
+ translate: 0 -2px;
567
+ }
568
+ 48% {
569
+ translate: 2px -2px;
570
+ }
571
+ }
572
+
573
+ @keyframes moving {
574
+ 0% {
575
+ translate: 0 0;
576
+ }
577
+ 25% {
578
+ translate: 2px -2px;
579
+ }
580
+ 50% {
581
+ translate: 0 -2px;
582
+ }
583
+ 75% {
584
+ translate: -2px 0;
585
+ }
586
+ }
587
+
588
+ @keyframes pressed {
589
+ 0% {
590
+ translate: 0 0;
591
+ }
592
+ 19%,100% {
593
+ translate: 0 2px;
594
+ }
595
+ }
596
+
597
+ @keyframes released {
598
+ 0% {
599
+ translate: 0 0;
600
+ }
601
+ 43%,100% {
602
+ translate: 0 -2px;
603
+ }
604
+ }
605
+
606
+ dialog {
607
+ border: 1px solid var(--line);
608
+ border-radius: 18px;
609
+ padding: 25px;
610
+ max-width: min(90vw,700px);
611
+ background: var(--paper);
612
+ box-shadow: 0 24px 80px #303a372b;
613
+ }
614
+
615
+ dialog::backdrop {
616
+ background: #303a3755;
617
+ backdrop-filter: blur(3px);
618
+ }
619
+
620
+ dialog form {
621
+ display: grid;
622
+ gap: 17px;
623
+ min-width: 330px;
624
+ }
625
+
626
+ dialog form>label {
627
+ display: grid;
628
+ gap: 7px;
629
+ font-size: 17px;
630
+ }
631
+
632
+ .dimension-fields {
633
+ display: flex;
634
+ gap: 12px;
635
+ }
636
+
637
+ .dimension-fields label {
638
+ display: grid;
639
+ gap: 7px;
640
+ font-size: 17px;
641
+ }
642
+
643
+ .dimension-fields input {
644
+ width: 100px;
645
+ }
646
+
647
+ .dimension-fields input[type=color] {
648
+ height: 37px;
649
+ width: 55px;
650
+ }
651
+
652
+ dialog .buttons {
653
+ justify-content: flex-end;
654
+ }
655
+
656
+ #reference-dialog {
657
+ width: auto;
658
+ }
659
+
660
+ #reference-dialog h2 {
661
+ padding-right: 80px;
662
+ margin-bottom: 15px;
663
+ }
664
+
665
+ #reference-image {
666
+ max-width: 80vw;
667
+ max-height: 75vh;
668
+ object-fit: contain;
669
+ }
670
+
671
+ .close {
672
+ float: right;
673
+ padding: 6px 10px;
674
+ }
675
+
676
+ .overlay .operator,.overlay #view-link {
677
+ display: none;
678
+ }
679
+
680
+ .overlay main {
681
+ grid-template-columns: 220px minmax(300px,1fr) 220px;
682
+ }
683
+
684
+ .overlay .stage {
685
+ padding: 22px;
686
+ }
687
+
688
+ .overlay .board-heading {
689
+ min-height: 74px;
690
+ }
691
+
692
+ @media(min-width:1600px) {
693
+ main {
694
+ grid-template-columns: 270px minmax(300px,1fr) 270px;
695
+ gap: 25px;
696
+ padding: 26px 35px;
697
+ }
698
+ }
699
+
700
+ @media(max-width:1100px) {
701
+ main,.overlay main {
702
+ grid-template-columns: 190px minmax(300px,1fr);
703
+ }
704
+ .history {
705
+ display: none;
706
+ }
707
+ .toolbar {
708
+ gap: 9px;
709
+ }
710
+ .board-heading .buttons {
711
+ flex-direction: column;
712
+ }
713
+ header {
714
+ padding: 0 20px;
715
+ }
716
+ }
717
+
718
+ @media(max-width:700px) {
719
+ header {
720
+ min-height: 96px;
721
+ padding: 0 14px;
722
+ gap: 10px;
723
+ flex-wrap: wrap;
724
+ }
725
+ .header-actions a {
726
+ display: none;
727
+ }
728
+ .brand b {
729
+ font-size: 19px;
730
+ }
731
+ .brand {
732
+ flex-wrap: wrap;
733
+ gap: 8px;
734
+ padding: 12px 0;
735
+ }
736
+ main,.overlay main {
737
+ height: auto;
738
+ min-height: calc(100vh - 72px);
739
+ grid-template-columns: 1fr;
740
+ padding: 14px;
741
+ gap: 14px;
742
+ }
743
+ .workspace {
744
+ grid-row: 1;
745
+ min-height: 650px;
746
+ }
747
+ .references {
748
+ grid-row: 2;
749
+ }
750
+ .reference-list {
751
+ grid-template-columns: repeat(2,1fr);
752
+ }
753
+ .stage {
754
+ min-height: 350px;
755
+ padding: 16px;
756
+ }
757
+ .board-heading h1 {
758
+ font-size: 28px;
759
+ }
760
+ .toolbar {
761
+ gap: 10px;
762
+ }
763
+ .history {
764
+ display: block;
765
+ }
766
+ dialog form {
767
+ min-width: 0;
768
+ }
769
+ .dimension-fields input {
770
+ width: 80px;
771
+ }
772
+ }
773
+
774
+ .overlay .step code, .overlay .step small {
775
+ display: none;
776
+ }
777
+
778
+ .overlay .step {
779
+ padding-top: 5px;
780
+ padding-bottom: 5px;
781
+ }
782
+
783
+ .cursor.edge-right img {
784
+ left: -64px;
785
+ }
786
+
787
+ .cursor.edge-right .cursor-name {
788
+ left: -56px;
789
+ }
790
+
791
+ .cursor.edge-bottom img {
792
+ top: -64px;
793
+ }
794
+
795
+ .cursor.edge-bottom .cursor-name {
796
+ top: -14px;
797
+ }
798
+
799
+ /* 你画我猜 */
800
+ .game-only {
801
+ display: none;
802
+ }
803
+
804
+ body.game .free-only {
805
+ display: none;
806
+ }
807
+
808
+ body.game .game-only {
809
+ display: block;
810
+ }
811
+
812
+ body.game main,body.game.overlay main {
813
+ grid-template-columns: minmax(300px,1fr) 340px;
814
+ min-height: 0;
815
+ }
816
+
817
+ .game-badge {
818
+ display: inline-flex;
819
+ align-items: center;
820
+ gap: 4px;
821
+ margin-left: 6px;
822
+ padding: 8px 16px;
823
+ border-radius: 999px;
824
+ background: #f6e7bd;
825
+ border: 1px solid #e4d3a6;
826
+ color: #806332;
827
+ font-size: 20px;
828
+ font-weight: 600;
829
+ white-space: nowrap;
830
+ animation: badge-in .5s cubic-bezier(.2,.9,.3,1.3);
831
+ }
832
+
833
+ .game-badge[hidden] {
834
+ display: none;
835
+ }
836
+
837
+ .scoreboard {
838
+ background: var(--paper);
839
+ }
840
+
841
+ .scoreboard h2 {
842
+ font-size: 24px;
843
+ }
844
+
845
+ .scoreboard .section-title {
846
+ flex-wrap: wrap;
847
+ min-height: 50px;
848
+ margin-bottom: 10px;
849
+ border-bottom: 1px solid var(--line);
850
+ }
851
+
852
+ #rank-empty {
853
+ font-size: 21px;
854
+ }
855
+
856
+ #ranks {
857
+ list-style: none;
858
+ margin: 16px 0 0;
859
+ padding: 0;
860
+ display: flex;
861
+ flex-direction: column;
862
+ gap: 12px;
863
+ }
864
+
865
+ .rank-row {
866
+ position: relative;
867
+ display: grid;
868
+ grid-template-columns: 36px minmax(0,1fr) auto;
869
+ align-items: center;
870
+ gap: 10px;
871
+ padding: 12px;
872
+ border-radius: 8px;
873
+ background: #f0edf6;
874
+ border: 1px solid transparent;
875
+ font-size: 21px;
876
+ }
877
+
878
+ .rank-row.rank-1 {
879
+ background: #f8eccb;
880
+ border-color: #e7d7a7;
881
+ }
882
+
883
+ .rank-row.rank-2 {
884
+ background: #e1ecf6;
885
+ border-color: #c9dce9;
886
+ }
887
+
888
+ .rank-row.rank-3 {
889
+ background: #f5e2d7;
890
+ border-color: #e8ccba;
891
+ }
892
+
893
+ .rank-badge {
894
+ display: grid;
895
+ place-items: center;
896
+ width: 34px;
897
+ height: 34px;
898
+ border-radius: 50%;
899
+ background: #ffffff99;
900
+ color: var(--ink);
901
+ font-weight: 700;
902
+ font-size: 20px;
903
+ }
904
+
905
+ .rank-name {
906
+ overflow: hidden;
907
+ text-overflow: ellipsis;
908
+ white-space: nowrap;
909
+ font-weight: 600;
910
+ }
911
+
912
+ .rank-score {
913
+ font-weight: 700;
914
+ font-size: 30px;
915
+ font-variant-numeric: tabular-nums;
916
+ color: var(--accent);
917
+ }
918
+
919
+ .rank-row.enter {
920
+ animation: rank-in .55s cubic-bezier(.2,.9,.3,1.25);
921
+ }
922
+
923
+ .delta {
924
+ position: absolute;
925
+ right: 10px;
926
+ top: -6px;
927
+ font-style: normal;
928
+ font-weight: 800;
929
+ font-size: 22px;
930
+ color: var(--accent);
931
+ animation: delta-up 1.2s ease-out forwards;
932
+ pointer-events: none;
933
+ }
934
+
935
+ .timer {
936
+ position: relative;
937
+ z-index: 3;
938
+ display: flex;
939
+ align-items: center;
940
+ gap: 18px;
941
+ flex: none;
942
+ padding: 12px 22px 12px 12px;
943
+ margin: 0 0 18px;
944
+ border-radius: 14px;
945
+ background: #f9e8ed;
946
+ border: 1px solid #e5cbd6;
947
+ }
948
+
949
+ .timer[hidden] {
950
+ display: none;
951
+ }
952
+
953
+ .timer.pop {
954
+ animation: pop-in .6s cubic-bezier(.2,.9,.3,1.15);
955
+ }
956
+
957
+ .timer.urgent {
958
+ animation: shake .5s infinite;
959
+ background: #f8ddd5;
960
+ border-color: #d7aa9e;
961
+ }
962
+
963
+ .timer-ring {
964
+ position: relative;
965
+ width: 90px;
966
+ height: 90px;
967
+ flex: none;
968
+ }
969
+
970
+ .timer-ring svg {
971
+ width: 100%;
972
+ height: 100%;
973
+ transform: rotate(-90deg);
974
+ }
975
+
976
+ .timer-ring .track {
977
+ fill: none;
978
+ stroke: #ead1dc;
979
+ stroke-width: 8;
980
+ }
981
+
982
+ .timer-ring .arc {
983
+ fill: none;
984
+ stroke: #ad6b88;
985
+ stroke-width: 8;
986
+ stroke-linecap: round;
987
+ stroke-dasharray: 326.73;
988
+ stroke-dashoffset: 0;
989
+ transition: stroke-dashoffset .25s linear,stroke .3s;
990
+ }
991
+
992
+ .timer.urgent .arc {
993
+ stroke: #bb705f;
994
+ }
995
+
996
+ .timer.over .arc {
997
+ stroke: #c2b8ca;
998
+ }
999
+
1000
+ .timer-clock {
1001
+ position: absolute;
1002
+ inset: 0;
1003
+ display: grid;
1004
+ place-items: center;
1005
+ font-weight: 650;
1006
+ font-size: 28px;
1007
+ font-variant-numeric: tabular-nums;
1008
+ }
1009
+
1010
+ .timer.urgent .timer-clock {
1011
+ animation: pulse .6s infinite alternate;
1012
+ }
1013
+
1014
+ .timer.over .timer-clock {
1015
+ color: var(--muted);
1016
+ }
1017
+
1018
+ .timer-side {
1019
+ display: grid;
1020
+ grid-template-columns: minmax(0,1fr) auto;
1021
+ gap: 8px 20px;
1022
+ min-width: 0;
1023
+ flex: 1;
1024
+ }
1025
+
1026
+ .timer-label {
1027
+ font-size: 22px;
1028
+ font-weight: 600;
1029
+ }
1030
+
1031
+ .blanks {
1032
+ display: flex;
1033
+ gap: 5px;
1034
+ flex-wrap: wrap;
1035
+ max-width: 100%;
1036
+ }
1037
+
1038
+ .blank {
1039
+ display: grid;
1040
+ place-items: center;
1041
+ width: 34px;
1042
+ height: 38px;
1043
+ border-radius: 8px;
1044
+ background: #fff8fb;
1045
+ border: 1px solid #ddbdcc;
1046
+ color: var(--accent);
1047
+ font-weight: 600;
1048
+ font-size: 25px;
1049
+ }
1050
+
1051
+ .hint-chip {
1052
+ grid-column: 2;
1053
+ grid-row: 1 / span 2;
1054
+ align-self: center;
1055
+ padding: 3px 10px;
1056
+ border-radius: 999px;
1057
+ background: #e3edf7;
1058
+ color: #516e88;
1059
+ border: 1px solid #c6d8e9;
1060
+ font-size: 19px;
1061
+ font-weight: 600;
1062
+ overflow-wrap: anywhere;
1063
+ }
1064
+
1065
+ .hint-chip[hidden] {
1066
+ display: none;
1067
+ }
1068
+
1069
+ .reveal {
1070
+ position: absolute;
1071
+ inset: 0;
1072
+ z-index: 4;
1073
+ display: grid;
1074
+ grid-template-columns: minmax(0,1fr);
1075
+ grid-template-rows: minmax(0,1fr);
1076
+ place-items: center;
1077
+ background: #49405459;
1078
+ backdrop-filter: blur(4px);
1079
+ overflow: hidden;
1080
+ }
1081
+
1082
+ .reveal[hidden] {
1083
+ display: none;
1084
+ }
1085
+
1086
+ .reveal-card {
1087
+ container: answer-card / inline-size;
1088
+ position: relative;
1089
+ text-align: center;
1090
+ padding: 32px;
1091
+ border-radius: 18px;
1092
+ background: #fffaf4;
1093
+ border: 1px solid #e4cdbf;
1094
+ box-shadow: 0 18px 60px #483b552e;
1095
+ width: min(880px,90%);
1096
+ max-height: calc(100% - 36px);
1097
+ overflow: auto;
1098
+ }
1099
+
1100
+ .reveal.pop .reveal-card {
1101
+ animation: pop-in .6s cubic-bezier(.2,.9,.3,1.15);
1102
+ }
1103
+
1104
+ .reveal-kicker {
1105
+ display: inline-block;
1106
+ padding: 5px 14px;
1107
+ border-radius: 999px;
1108
+ background: #f7e8bd;
1109
+ color: #806332;
1110
+ font-size: 20px;
1111
+ font-weight: 600;
1112
+ letter-spacing: .12em;
1113
+ }
1114
+
1115
+ .reveal-answer {
1116
+ --columns: var(--wide-columns);
1117
+ --answer-gap: 6px;
1118
+ display: grid;
1119
+ grid-template-columns: repeat(var(--columns),1.25em);
1120
+ justify-content: center;
1121
+ gap: var(--answer-gap);
1122
+ margin: 26px 0;
1123
+ font-size: min(72px,calc((100cqi - (var(--columns) - 1) * var(--answer-gap)) / (var(--columns) * 1.25)));
1124
+ font-weight: 650;
1125
+ line-height: 1.4;
1126
+ color: #75465e;
1127
+ }
1128
+
1129
+ .reveal-answer span {
1130
+ display: grid;
1131
+ place-items: center;
1132
+ min-width: 0;
1133
+ min-height: 1.4em;
1134
+ border-radius: 8px;
1135
+ background: #f3dce5;
1136
+ border: 1px solid #e7bfcd;
1137
+ animation: flip-in .6s cubic-bezier(.2,.9,.3,1.3) both;
1138
+ animation-delay: calc(.35s + var(--i) * .12s);
1139
+ }
1140
+
1141
+ .reveal-winners {
1142
+ list-style: none;
1143
+ margin: 12px 0 0;
1144
+ padding: 0;
1145
+ display: flex;
1146
+ flex-wrap: wrap;
1147
+ justify-content: center;
1148
+ gap: 8px 16px;
1149
+ font-size: 18px;
1150
+ font-weight: 500;
1151
+ color: var(--muted);
1152
+ }
1153
+
1154
+ .reveal-winners li {
1155
+ overflow-wrap: anywhere;
1156
+ max-width: 100%;
1157
+ color: #546c85;
1158
+ animation: rank-in .5s both;
1159
+ animation-delay: calc(.8s + var(--i) * .15s);
1160
+ }
1161
+
1162
+ .reveal-winners li:first-child {
1163
+ color: #926337;
1164
+ }
1165
+
1166
+ .confetti {
1167
+ position: absolute;
1168
+ inset: 0;
1169
+ pointer-events: none;
1170
+ }
1171
+
1172
+ .confetti i {
1173
+ position: absolute;
1174
+ top: -16px;
1175
+ left: calc(var(--x) * 1%);
1176
+ width: 10px;
1177
+ height: 16px;
1178
+ border-radius: 3px;
1179
+ background: var(--c);
1180
+ rotate: var(--r);
1181
+ animation: fall var(--d) linear var(--w) both;
1182
+ }
1183
+
1184
+ @container answer-card (width < 520px) {
1185
+ .reveal-answer {
1186
+ --columns: var(--narrow-columns);
1187
+ --answer-gap: 4px;
1188
+ }
1189
+ }
1190
+
1191
+ @keyframes rank-in {
1192
+ from {
1193
+ opacity: 0;
1194
+ transform: translateX(40px) scale(.9);
1195
+ }
1196
+ to {
1197
+ opacity: 1;
1198
+ transform: none;
1199
+ }
1200
+ }
1201
+
1202
+ @keyframes delta-up {
1203
+ from {
1204
+ opacity: 1;
1205
+ transform: translateY(0);
1206
+ }
1207
+ to {
1208
+ opacity: 0;
1209
+ transform: translateY(-26px);
1210
+ }
1211
+ }
1212
+
1213
+ @keyframes badge-in {
1214
+ from {
1215
+ transform: scale(.6);
1216
+ opacity: 0;
1217
+ }
1218
+ to {
1219
+ transform: none;
1220
+ opacity: 1;
1221
+ }
1222
+ }
1223
+
1224
+ @keyframes pulse {
1225
+ from {
1226
+ transform: scale(1);
1227
+ }
1228
+ to {
1229
+ transform: scale(1.15);
1230
+ }
1231
+ }
1232
+
1233
+ @keyframes pop-in {
1234
+ 0% {
1235
+ transform: scale(.65);
1236
+ opacity: 0;
1237
+ }
1238
+ 65% {
1239
+ transform: scale(1.035);
1240
+ opacity: 1;
1241
+ }
1242
+ 100% {
1243
+ transform: scale(1);
1244
+ }
1245
+ }
1246
+
1247
+ @keyframes shake {
1248
+ 0%,100% {
1249
+ transform: rotate(0);
1250
+ }
1251
+ 25% {
1252
+ transform: rotate(.5deg);
1253
+ }
1254
+ 75% {
1255
+ transform: rotate(-.5deg);
1256
+ }
1257
+ }
1258
+
1259
+ @keyframes flip-in {
1260
+ from {
1261
+ transform: rotateX(90deg) scale(.6);
1262
+ opacity: 0;
1263
+ }
1264
+ to {
1265
+ transform: none;
1266
+ opacity: 1;
1267
+ }
1268
+ }
1269
+
1270
+ @keyframes fall {
1271
+ to {
1272
+ translate: 0 900px;
1273
+ rotate: calc(var(--r) + 540deg);
1274
+ opacity: .6;
1275
+ }
1276
+ }
1277
+
1278
+ @media(max-width:700px) {
1279
+ body.game main,body.game.overlay main {
1280
+ grid-template-columns: 1fr;
1281
+ }
1282
+ .blanks {
1283
+ max-width: 180px;
1284
+ }
1285
+ .game-badge {
1286
+ font-size: 17px;
1287
+ margin-left: 0;
1288
+ padding: 6px 10px;
1289
+ }
1290
+ .timer {
1291
+ gap: 12px;
1292
+ padding: 12px;
1293
+ }
1294
+ .timer-ring {
1295
+ width: 82px;
1296
+ height: 82px;
1297
+ }
1298
+ .timer-clock {
1299
+ font-size: 24px;
1300
+ }
1301
+ .timer-side {
1302
+ display: flex;
1303
+ flex-direction: column;
1304
+ gap: 6px;
1305
+ }
1306
+ .timer-label {
1307
+ font-size: 18px;
1308
+ }
1309
+ .hint-chip {
1310
+ font-size: 16px;
1311
+ align-self: flex-start;
1312
+ }
1313
+ .reveal-card {
1314
+ padding: 24px 18px;
1315
+ }
1316
+ .reveal-winners {
1317
+ font-size: 16px;
1318
+ }
1319
+ }
1320
+
1321
+ @media(prefers-reduced-motion:reduce) {
1322
+ *,*::before,*::after {
1323
+ animation: none !important;
1324
+ transition: none !important;
1325
+ }
1326
+ }