File size: 70,665 Bytes
9f0c00b
 
 
 
 
 
 
 
 
1510d77
9f0c00b
 
 
 
 
 
 
 
 
 
f4c424d
 
 
9f0c00b
f4c424d
 
9f0c00b
76e92fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b578db4
 
 
9f0c00b
 
 
 
 
 
 
d0c1dbb
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
de02d48
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f4c424d
 
 
 
 
 
 
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
0c167c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f608a7c
0c167c4
f608a7c
0c167c4
 
 
 
 
 
 
 
 
 
 
 
 
 
f608a7c
 
 
0c167c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f608a7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2545230
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f608a7c
 
2545230
 
 
 
f608a7c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f5af762
 
 
 
 
 
 
 
 
 
 
 
 
f808979
f5af762
f608a7c
 
 
 
 
 
 
 
 
f5af762
 
 
 
f608a7c
 
 
 
 
0c167c4
f808979
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39d07cc
 
 
 
 
 
 
 
 
 
76e92fa
 
 
39d07cc
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
f4c424d
9f0c00b
0c167c4
9f0c00b
 
0c167c4
 
9f0c00b
 
 
0c167c4
 
 
 
 
657d8c2
f5c8daf
 
2545230
 
 
0c167c4
b3a8c73
eb62f2f
 
 
 
 
 
 
 
 
b3a8c73
 
 
 
 
 
e412e40
bebc80d
0c167c4
d49065a
2545230
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f4c424d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f808979
d49065a
 
 
 
 
 
 
 
 
 
 
f3a8f5c
 
 
 
afe51fd
 
d49065a
 
4337686
1302ebc
 
4337686
1302ebc
4337686
 
 
 
 
1302ebc
afe51fd
1302ebc
afe51fd
f4c424d
afe51fd
 
 
f4c424d
 
afe51fd
 
 
 
 
 
f4c424d
 
 
 
 
 
 
 
afe51fd
 
 
f4c424d
657d8c2
 
f4c424d
afe51fd
316482f
 
 
 
 
 
bd0ddc0
 
 
 
 
 
0c167c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f0c00b
9ba323c
 
 
 
 
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
f608a7c
 
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
0c167c4
f608a7c
f4c424d
 
f608a7c
 
 
 
 
 
 
 
 
 
0c167c4
 
 
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5dd82ac
9f0c00b
5dd82ac
2545230
5dd82ac
2545230
9f0c00b
 
2545230
5dd82ac
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76e92fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f0c00b
1510d77
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
e8d26c1
9f0c00b
 
e8d26c1
9f0c00b
1510d77
9f0c00b
0c167c4
 
 
 
 
 
 
 
 
 
2545230
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76e92fa
2545230
 
181f975
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0c167c4
 
181f975
e8d26c1
9f0c00b
489bf57
 
 
 
 
 
 
 
 
 
 
 
f4c424d
 
 
489bf57
 
 
 
 
 
 
f4c424d
 
9f0c00b
 
 
 
f608a7c
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5dd82ac
 
9f0c00b
 
 
 
 
 
ab413b5
 
 
 
 
 
9f0c00b
 
 
 
 
 
 
 
 
76e92fa
9f0c00b
 
 
 
 
 
524ef36
 
 
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
2545230
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
de02d48
 
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
0c167c4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9f0c00b
 
 
 
 
 
 
 
 
f4c424d
 
 
 
 
 
 
 
 
 
 
 
 
 
9f0c00b
 
 
2545230
9f0c00b
 
 
 
e8d26c1
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f4c424d
9f0c00b
f84ef6e
9f0c00b
 
 
f84ef6e
9f0c00b
f84ef6e
9f0c00b
f4c424d
 
 
 
 
 
 
 
 
 
 
 
 
 
e8d26c1
2545230
9f0c00b
6328732
 
 
 
 
 
 
 
 
 
1302ebc
6328732
1302ebc
 
6328732
 
 
 
1302ebc
9f0c00b
 
 
 
 
 
 
 
 
 
 
 
1510d77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2545230
 
f5c8daf
1510d77
 
 
0c167c4
1510d77
0c167c4
1510d77
 
 
 
 
 
 
 
 
 
 
 
f5c8daf
316482f
 
 
 
76e92fa
1510d77
 
1302ebc
 
 
1510d77
 
 
0c167c4
1510d77
0c167c4
1510d77
316482f
 
 
 
 
 
 
 
76e92fa
316482f
 
1302ebc
2545230
 
 
 
 
 
 
 
 
1302ebc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2545230
 
 
 
 
1302ebc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3443892
 
 
 
 
1302ebc
 
 
3443892
 
 
 
 
 
 
 
 
 
cb5454a
 
82c0837
 
 
 
 
 
 
 
f4c424d
 
 
cb5454a
 
 
 
 
 
 
 
 
 
66196ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14ea612
1fd1bd2
14ea612
1fd1bd2
 
 
 
 
 
 
 
 
 
 
 
 
14ea612
1fd1bd2
 
14ea612
1fd1bd2
 
14ea612
1fd1bd2
 
14ea612
 
1fd1bd2
14ea612
 
1fd1bd2
14ea612
1fd1bd2
65903d4
 
 
d0c1dbb
 
 
 
65903d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b578db4
 
f4c424d
b578db4
3542667
 
f4c424d
 
 
 
 
 
 
b578db4
 
93ae949
 
 
 
 
f4c424d
fe2854a
f4c424d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
:root {
  --bg: #0e0f1a;
  --panel: #1a1c2e;
  --gold: #d9b25a;
  --text: #e8e6e0;
  --muted: #9a97b0;
  --hp: #3fb950;
  --atk: #f0563a;
  --def: #4aa3ff;
  --card-w: 198px; /* 卡片基準寬;平板/手機由 media query 縮放,內部圖與比例自動跟著縮 */
}

* { box-sizing: border-box; }

html, body, #root {
  margin: 0;
  height: 100%;
  background: radial-gradient(1200px 800px at 50% -10%, #1d2036, var(--bg));
  color: var(--text);
  font-family: "Segoe UI", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-user-select: none; /* 全遊戲文字一律不可反白/選取(避免誤拖選;長按手牌預覽也不被文字選取干擾) */
  user-select: none;
  -webkit-touch-callout: none; /* 行動裝置長按不跳出文字/圖片選單 */
}
/* 例外:輸入框(房號、英雄名、dev 登入等)仍可選取編輯 */
input, textarea { -webkit-user-select: text; user-select: text; }

/* ===== 捲軸(全站;取代 Windows 預設的灰色粗捲軸,配合深色+金色主題) ===== */
/* Firefox:細捲軸、淡紫灰滑塊、透明軌道 */
* { scrollbar-width: thin; scrollbar-color: #3a3d63 transparent; }
/* WebKit / Chromium / Edge */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#3f4268, #2a2c45);
  border-radius: 999px;
  border: 3px solid transparent; /* 透明內邊 + clip → 滑塊看起來更細、不貼邊 */
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--gold), #b8923f); background-clip: padding-box; }
::-webkit-scrollbar-thumb:active { background: linear-gradient(#e7c878, var(--gold)); background-clip: padding-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; } /* 去掉上下箭頭按鈕 */
::-webkit-scrollbar-corner { background: transparent; }

/* 畫面轉場容器:撐滿高度,讓 .centered/.battle 的 height:100% 仍成立(純 opacity 淡入淡出,不動 transform)。 */
.screen-fade { height: 100%; }

.centered {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative; /* 墊在首頁粒子背景(.particle-bg z-index:0)之上 */
  z-index: 1;
}

.title { font-size: 44px; color: var(--gold); margin: 0; letter-spacing: 2px; }
.subtitle { color: var(--muted); margin: 0 0 16px; }

/* 主標題:Cinzel Decorative 哥德裝飾字體 + 金色漸層 + 光暈 */
.game-title {
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(40px, 8vw, 84px);
  margin: 0;
  text-align: center;
  letter-spacing: 4px;
  line-height: 1.1;
  background: linear-gradient(180deg, #f5e3a8 0%, var(--gold) 45%, #8a5a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(217, 178, 90, .35);
}

/* 主選單按鈕:寬大 */
.menu-btn {
  min-width: 300px;
  padding: 16px 28px;
  font-size: 19px;
  font-weight: 600;
  border-radius: 12px;
}

.btn {
  background: var(--panel);
  color: var(--text);
  border: 1px solid #33365a;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 16px;
  cursor: pointer;
  transition: transform .08s, border-color .15s;
}
.btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.btn.primary { background: #6b2230; } /* 酒紅底強調;邊框比照一般按鈕,滑過才轉金(不再一直亮金框) */
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: #33365a; transform: none; }

.char {
  background: var(--panel);
  border: 1px solid #33365a;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.char:hover { border-color: #4aa3ff; }
.char img { width: 120px; }

/* 職業選擇 */
.class-row { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.class-card {
  width: 168px;
  background: var(--panel);
  border: 1px solid #33365a;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  transition: transform .1s, border-color .15s, box-shadow .15s;
}
.class-card:not(.soon):hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(217, 178, 90, .25);
}
.class-card img { width: 120px; height: 160px; object-fit: cover; border-radius: 8px; }
.class-card .class-name { font-size: 20px; font-weight: 700; }
.class-card .class-desc { font-size: 13px; color: var(--muted); }
.class-card.soon { opacity: .5; cursor: not-allowed; }
/* 合作禁同職:隊友已選的職業灰顯不可點(防呆,不退房) */
.class-card.taken { opacity: .45; cursor: not-allowed; }
.class-card.taken img { filter: grayscale(1) brightness(.7); }
.class-card.taken .class-desc { color: #ff9a5a; }
/* 合作:我目前暫定選的職業(金框高亮、可重選;比 hover 更明顯且持續) */
.class-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 10px 28px rgba(217, 178, 90, .35); }
/* 合作選職業底部:隊友狀態+「確定/返回」 */
.class-confirm { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.class-card .class-q {
  width: 120px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: #44476a;
  border: 1px dashed #44476a;
  border-radius: 8px;
}

/* ===== 單人關卡地圖 ===== */
.level-map {
  height: 100%;
  overflow: hidden; /* 地圖一律塞進視窗,不出現捲軸 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
}
.map-head { text-align: center; }
.map-title {
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: 3px;
  margin: 0;
  background: linear-gradient(180deg, #f5e3a8 0%, var(--gold) 50%, #8a5a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(217, 178, 90, .3);
}
.map-sub { color: var(--muted); margin: 8px 0 0; font-size: 15px; letter-spacing: 1px; }

.map-stage { width: min(920px, 96vw); }
/* 限高 58vh:確保「標題+地圖+頁尾」整體不超過視窗高度(meet 會等比縮放、置中) */
.map-svg { width: 100%; height: auto; max-height: 58vh; display: block; overflow: visible; }

/* 旅途路徑:金色細線,載入時由左向右描繪一次 */
.trail {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
  filter: drop-shadow(0 0 6px rgba(217, 178, 90, .5));
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: trail-draw 1.15s ease forwards;
}
@keyframes trail-draw { to { stroke-dashoffset: 0; } }

/* 節點:載入時依序淡入(只動 opacity,不動 transform,避免蓋掉定位用的 translate) */
.map-node { opacity: 0; animation: node-pop .5s ease forwards; animation-delay: var(--delay); }
@keyframes node-pop { to { opacity: 1; } }
/* hover 放大需以「徽章自身中心」為支點:SVG 的 CSS transform 預設以 viewBox 原點為支點,
   故明確指定 fill-box + center,否則放大會偏移飛走。 */
.node-inner { transition: transform .15s ease; transform-box: fill-box; transform-origin: center; }

.map-node .halo { fill: rgba(217, 178, 90, .06); }
.map-node .ring { fill: #0c0d18; stroke: var(--gold); stroke-width: 3; }
.map-node .roman {
  fill: var(--gold);
  font-family: "Cinzel", "Cinzel Decorative", serif;
  font-size: 30px;
  font-weight: 700;
  opacity: .92;
}
.map-node .node-name { fill: var(--text); font-size: 21px; font-weight: 700; }
.map-node .soon-tag { fill: var(--muted); font-size: 14px; letter-spacing: 3px; }

/* 可挑戰:脈動光暈當行動召喚;hover / 鍵盤聚焦放大、金邊變亮 */
.map-node.playable { cursor: pointer; }
.map-node.playable .ring { animation: ring-pulse 2.4s ease-in-out infinite; }
@keyframes ring-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(217, 178, 90, .4)); }
  50%      { filter: drop-shadow(0 0 16px rgba(217, 178, 90, .9)); }
}
.map-node.playable:hover .node-inner,
.map-node.playable:focus-visible .node-inner { transform: scale(1.06); }
.map-node.playable:focus { outline: none; }
.map-node.playable:focus-visible .ring { stroke: #f5e3a8; stroke-width: 5; }

/* 即將登場:暗化、虛線環、去飽和肖像 */
.map-node.soon { cursor: not-allowed; }
.map-node.soon .ring { stroke: #5b5e86; stroke-dasharray: 6 7; }
.map-node.soon .portrait { opacity: .38; filter: grayscale(.7); }
.map-node.soon .roman { fill: #5b5e86; opacity: .8; }
.map-node.soon .node-name { fill: var(--muted); }

.map-foot { display: flex; align-items: center; gap: 18px; }
.map-class { color: var(--muted); font-size: 14px; letter-spacing: 1px; }

@media (prefers-reduced-motion: reduce) {
  .trail { animation: none; stroke-dashoffset: 0; }
  .map-node { animation: none; opacity: 1; }
  .map-node.playable .ring { animation: none; }
  .node-inner { transition: none; }
}

/* 地圖敵人詳情面板:名字 / 關卡數 / 被動+技能介紹 / 開始 */
.foe-detail .foe-box {
  width: min(760px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  align-items: stretch;
  text-align: left;
  gap: 14px;
  transition: width .35s ease; /* 切困難時整體加寬:技能表順滑滑向左、右欄滑出,避免改上下堆疊而出捲軸 */
}
.foe-detail .foe-box.wide { width: min(1080px, 96vw); }
.foe-head { display: flex; gap: 16px; align-items: center; }
.foe-portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 0 16px rgba(217, 178, 90, .4);
  flex: 0 0 auto;
}
.foe-headtext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.foe-name { margin: 0; font-family: "Cinzel Decorative", "Cinzel", serif; font-size: 28px; color: var(--gold); }
.foe-levels { color: var(--muted); font-size: 14px; letter-spacing: 1px; }
.foe-blurb { margin: 4px 0 0; color: var(--text); font-size: 14px; line-height: 1.5; opacity: .92; }
/* 困難模式:foe 名字的「·hard」後綴,以紅色標示危險;間隔號左右加間距,看起來更寬鬆。 */
.name-hard { color: #ff6072; }
.name-hard .name-dot { margin: 0 .22em; } /* 想更寬就加大這個值(如 .3em) */

/* 技能分兩欄,整體變矮、不出捲軸;被動橫跨兩欄當標題 */
.skill-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.skill-row.passive { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .skill-list { grid-template-columns: 1fr; }
  .skill-row.passive { grid-column: auto; }
}
.skill-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, .03);
  border: 1px solid #33365a;
  border-radius: 10px;
  padding: 10px 12px;
}
.skill-row.passive { border-color: var(--gold); background: rgba(217, 178, 90, .08); }
.skill-icon { font-size: 22px; line-height: 1.3; flex: 0 0 auto; width: 28px; text-align: center; }
.skill-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.skill-text b { font-size: 15px; color: var(--text); }
.skill-meta { font-weight: 500; font-size: 12px; color: var(--gold); }
.skill-text > span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.foe-noskill { color: var(--muted); text-align: center; padding: 12px; }

/* 詳情主體:技能表(左) + 困難說明(右)。右欄平時收合成 0 寬,切困難才滑出。
   技能表寬度幾乎不變、只隨整體加寬向左平移,右欄由 0 展開 → 視覺上「技能表滑到左、右邊冒出 hardmode 表」。 */
.foe-body { display: flex; align-items: flex-start; }
.foe-body > .skill-list { flex: 1 1 auto; min-width: 0; }
.hard-side {
  flex: 0 0 0;
  width: 0;
  overflow: hidden;
  opacity: 0;
  transition: flex-basis .35s ease, width .35s ease, margin-left .35s ease, opacity .28s ease;
}
.foe-body.has-hard > .hard-side { flex: 0 0 300px; width: 300px; margin-left: 14px; opacity: 1; }
/* 內層固定 300 寬:收合時靠外層裁切滑出,文字不會被擠成細長條重排 */
.hard-side > .hard-banner { width: 300px; box-sizing: border-box; margin: 0; }

/* 窄螢幕容不下並排 → 回到上下堆疊(手機允許捲動),並取消加寬 */
@media (max-width: 820px) {
  .foe-detail .foe-box.wide { width: min(760px, 94vw); }
  .foe-body { flex-direction: column; }
  .foe-body > .skill-list { width: 100%; }
  .hard-side { flex-basis: auto; width: 100%; overflow: visible; opacity: 1; transition: opacity .28s ease; }
  .foe-body:not(.has-hard) > .hard-side { display: none; }
  .foe-body.has-hard > .hard-side { margin-left: 0; }
  .hard-side > .hard-banner { width: 100%; }
}
/* 敵人詳情:開始=視窗右下角圓形浮鈕(在 overlay z-index:100 內疊到最上) */
.start-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 108px;
  height: 108px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 23px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  z-index: 110;
  /* 普通 ⇆ 困難 換色平滑過場(蓋過 .btn 的 transition;transform 留給翻轉動畫與 hover) */
  transition: background .3s ease, border-color .25s ease, box-shadow .3s ease, transform .12s ease;
}
@media (max-width: 520px) {
  .start-fab { right: 18px; bottom: 18px; width: 84px; height: 84px; font-size: 19px; }
}
/* 切換難度瞬間:開始鈕翻轉一下(普通 ⇆ 困難 的轉場) */
.start-fab.switching { animation: fab-switch .5s ease; }
@keyframes fab-switch {
  0%   { transform: perspective(320px) rotateY(0deg)  scale(1); }
  50%  { transform: perspective(320px) rotateY(90deg) scale(1.1); }
  100% { transform: perspective(320px) rotateY(0deg)  scale(1); }
}
/* 返回鈕:圓形小鈕,置中疊在開始鈕正上方 */
.back-fab {
  position: fixed;
  right: 44px;   /* 圓心對齊 start-fab(right 28 + 半徑 54 − 自身半徑 38) */
  bottom: 148px; /* = start-fab 的 bottom 28 + 高 108 + 間距 12 */
  width: 76px;
  height: 76px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  z-index: 110;
  animation: fab-pop-in .26s cubic-bezier(.34, 1.56, .64, 1); /* 進困難模式才出現 → 彈入轉場 */
}
@keyframes fab-pop-in {
  0%   { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1);  opacity: 1; }
}
@media (max-width: 520px) {
  /* start-fab 變 84 寬高、bottom:18 → 對齊:right 28、bottom 18+84+12=114 */
  .back-fab { right: 28px; bottom: 114px; width: 64px; height: 64px; }
}
/* 困難模式蓄力:開始鈕震動 + 變鮮紅,背景 5 秒漸入暗紅(隱含進度) */
.start-fab.charging {
  background: #c01030;
  border-color: #ff6072;
  box-shadow: 0 0 26px rgba(220, 30, 50, .85);
  animation: fab-shake .22s linear infinite;
}
@keyframes fab-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 1px); }
  50% { transform: translate(3px, -1px); }
  75% { transform: translate(-2px, -2px); }
}
.overlay.foe-detail { transition: background 3s linear; } /* 蓄力時背景緩緩變暗紅(配合長按 3 秒) */
.overlay.foe-detail.charging { background: rgba(58, 6, 10, .92); }
.overlay.foe-detail.hard { background: rgba(58, 6, 10, .92); } /* 進困難後背景維持暗紅、不淡回 */
/* 難度切換瞬間:整個覆蓋層(=整個畫面)震一下;fixed 元素位移不會產生捲軸 */
.overlay.foe-detail.shake { animation: screen-shake .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes screen-shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}
.hard-banner { width: 100%; background: rgba(150, 24, 32, .22); border: 1px solid #c0303a; border-radius: 10px; padding: 10px 14px; }
.hard-banner b { display: block; margin-bottom: 6px; color: #ff8a7a; }
.hard-banner ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: #ffd9d0; }
.hard-hint { margin: 4px 0 0; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .5px; }
/* 困難模式已切換(armed):開始鈕持續為紅色危險樣式,與「蓄力中」的震動區隔 */
.start-fab.hard { background: #a11026; border-color: #ff6072; box-shadow: 0 0 22px rgba(220, 30, 50, .6); }
.start-fab.hard.charging { background: #c01030; } /* 再次長按(切回普通)時仍以蓄力紅為主 */
.hard-banner.armed { background: rgba(150, 24, 32, .32); }
@media (prefers-reduced-motion: reduce) { .start-fab.charging, .start-fab.switching, .back-fab { animation: none; } .overlay.foe-detail { transition: none; } .overlay.foe-detail.shake { animation: none; } }

/* ===== 極難(extreme):紫色系,疊在困難之上 ===== */
.name-extreme { color: #c79bff; }
.overlay.foe-detail.extreme { background: rgba(26, 10, 46, .93); } /* 極難背景:暗紫 */
.start-fab.extreme { background: #5b2da8; border-color: #c79bff; box-shadow: 0 0 24px rgba(150, 90, 240, .7); }
.start-fab.extreme.charging { background: #c01030; } /* 由極難再長按(切回普通)仍以蓄力紅為主 */
.extreme-banner { width: 100%; background: rgba(96, 48, 160, .22); border: 1px solid #8a5cff; border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.extreme-banner b { display: block; margin-bottom: 6px; color: #c79bff; }
.extreme-banner ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: #e6d8ff; }
.extreme-banner.armed { background: rgba(96, 48, 160, .32); }
.hard-side > .extreme-banner { width: 300px; box-sizing: border-box; }
@media (max-width: 820px) { .hard-side > .extreme-banner { width: 100%; } }

/* 單人計時器(右上、淡色,比照連線風格) */
.battle-timer { color: var(--muted); font-size: 14px; margin-left: 10px; font-variant-numeric: tabular-nums; flex: 0 0 auto; letter-spacing: .5px; }

/* 終末聖裁:全螢幕白屏(6 秒;淡入 → 全白 ~2 秒 → 淡出) */
.ultimate-vfx { position: fixed; inset: 0; background: #fff; z-index: 9999; pointer-events: none; animation: ult-flash 6s ease-in-out forwards; }
@keyframes ult-flash {
  0% { opacity: 0; }
  12% { opacity: 1; }   /* ~0.7s 淡入到全白 */
  45% { opacity: 1; }   /* 維持全白 ~2 秒 */
  100% { opacity: 0; }  /* 其餘時間緩緩淡出 */
}
@media (prefers-reduced-motion: reduce) { .ultimate-vfx { animation: ult-flash-soft 6s ease-in-out forwards; } }
@keyframes ult-flash-soft { 0%, 100% { opacity: 0; } 20%, 60% { opacity: .85; } }

/* 迴避/汲取飄字 */
.dmg-float.evade { color: #9fb0ff; font-weight: 700; }
.dmg-float.drain { color: #c79bff; }

/* ===== 極難牌組構築 ===== */
.overlay.deckbuild { z-index: 120; }
.db-box { width: min(1100px, 96vw); max-height: 92vh; display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 10px; }
.db-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.db-title { margin: 0; font-family: "Cinzel Decorative", "Cinzel", serif; font-size: 22px; color: var(--gold); flex: 1 1 auto; min-width: 0; }
.db-counts { display: flex; gap: 14px; font-size: 14px; color: var(--muted); }
.db-counts .ok { color: var(--hp); font-weight: 700; }
.db-counts .over { color: #ff6072; font-weight: 700; }
.db-actions { display: flex; gap: 10px; }
.db-hint { margin: 0; font-size: 12px; color: var(--muted); }
.db-pools { overflow-y: auto; overflow-x: hidden; padding-right: 6px; display: flex; flex-direction: column; gap: 14px; } /* 只縱向捲動,不出現底部橫向滑桿 */
.db-section-title { margin: 4px 0; font-size: 15px; color: var(--gold); border-bottom: 1px solid #33365a; padding-bottom: 4px; }
.db-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; } /* 固定每列 5 張 */
.db-grid .db-pick { width: 100%; }
.db-grid .card { width: 100%; } /* 卡片填滿欄寬:容器 ≤1100px、5 欄 → 欄寬 ≤~206px < 卡片基準寬,故為縮小不放大;避免橫向溢出產生底部滑桿 */
@media (max-width: 640px) { .db-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } } /* 窄螢幕改 3 張 */
.db-pick { position: relative; }
.db-pick.maxed { opacity: .4; }
.db-pick.picked { outline: 3px solid #4a9eff; outline-offset: 2px; border-radius: 8px; } /* 已選:藍色邊框 */
.db-grid .card:hover { transform: none; box-shadow: none; border-color: #c7b487; } /* 選牌頁不放大(hover 不縮放;卡片說明仍以 tooltip 顯示) */
.db-grid .card.textcard:hover { border-color: #c7b487; }
.db-count { position: absolute; top: -8px; right: -8px; z-index: 2; background: #5b2da8; color: #fff; border: 1px solid #c79bff; border-radius: 999px; min-width: 26px; height: 24px; padding: 0 6px; font-size: 13px; font-weight: 700; cursor: pointer; line-height: 1; }

/* 過關獎勵:回血/抽卡選擇 + 稀有度顯示 */
.reward-options { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.reward-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rarity-tag { font-size: 13px; font-weight: 800; padding: 2px 12px; border-radius: 999px; letter-spacing: 1px; }
.rarity-normal .rarity-tag { color: var(--muted); background: rgba(255, 255, 255, .08); }
.rarity-epic .rarity-tag { color: #c08cff; background: rgba(160, 90, 255, .16); }
.rarity-legend .rarity-tag { color: var(--gold); background: rgba(217, 178, 90, .18); }
/* 獎勵卡外框依稀有度上色 */
.reward-pick.rarity-epic .card { border-color: #a05aff; box-shadow: 0 0 14px rgba(160, 90, 255, .35); }
.reward-pick.rarity-legend .card { border-color: var(--gold); box-shadow: 0 0 16px rgba(217, 178, 90, .45); }
/* 獎勵三選一「跳過」:低調的次要按鈕(比選卡不顯眼),置中於卡片下方。 */
.skip-reward { margin-top: 6px; align-self: center; background: transparent; border: 1px solid #3a3d63; color: var(--muted); font-size: 14px; padding: 7px 26px; }
.skip-reward:hover { border-color: var(--muted); color: var(--text); }

/* ===== 戰鬥畫面 ===== */
.battle {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.topbar { display: flex; justify-content: space-between; align-items: center; }
.level { color: var(--gold); font-weight: 600; }
.msg { color: var(--muted); font-size: 14px; min-height: 18px; }
.topbar .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; text-align: right; margin-left: auto; } /* 多事件長訊息不撐爆 topbar;margin-left:auto 把計時/狀態推到最右,讓「回合資訊+遊戲提示」靠左相鄰 */

/* 左=資訊(名字/HP/數值/意圖);右=立繪 + 立繪下方能量條 */
.enemy {
  display: flex;
  align-items: flex-end; /* 立繪貼著面板底部(貼地)*/
  gap: 20px;
  background: var(--panel);
  border: 1px solid #33365a;
  border-radius: 12px;
  padding: 14px 18px 0; /* 底部不留白,讓立繪貼地 */
}
.enemy-info { flex: 1; align-self: stretch; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-bottom: 14px; }
.enemy-info .name { font-weight: 700; font-size: 18px; }
/* 能量格子在上、立繪在下(貼地);整欄往左移一些 */
.enemy-portrait { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-right: 60px; }
/* 兩隻怪物長寬比差很多(slime 直式 658×712、sanctus 橫式 677×369)→ 用 max 框各自照原比例縮,避免直式 slime 被拉高顯得過大 */
.enemy-img { max-width: 320px; max-height: 240px; width: auto; height: auto; object-fit: contain; display: block; }
.enemy-stats { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
/* ATK/DEF/盾/審判線 同排、放大 1.4×(.stat 基準 15px×1.4=21;對 slime 與 Sanctus 一致) */
.enemy-stats .stat, .enemy-stats .eb { font-size: 21px; }
.enemy-stats .shield { color: var(--gold); }
.taunt-up { color: #ff9a5a; font-weight: 800; } /* 挑釁:下次反擊 +1 的即時提示 */
/* 我方待結算的效果徽章(標在對應數值旁,如蓄勢 ×1.25、處決、汲取) */
.atk-mod { color: var(--gold); font-weight: 800; font-size: 13px; margin-left: 4px; }
.atk-mod.heal { color: var(--hp); }
.player-stats .stat.warn { color: #ff9a5a; } /* 應急:手牌上限被降低 */
.atk-mod.truedmg { color: #ff5a7a; } /* 真實傷害(無視防禦)*/
/* 野蠻人本回合/本場戰鬥狀態徽章 */
.barb-flag { color: #c98aff; font-weight: 700; font-size: 13px; }
.barb-flag.persist { color: #ff7a4a; } /* 本場持續(地獄之門/狂神開眼)*/
.barb-flag.heal { color: var(--hp); } /* 復活待命(有利)*/
/* 敵人狀態列:審判線 + 威脅/減益,全部讓玩家看到 */
.enemy-buffs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.eb { color: var(--muted); }
.eb.line { color: var(--gold); font-weight: 700; } /* 審判線:最關鍵的門檻 */
.eb.warn { color: #ff9a5a; font-weight: 700; } /* 威脅:反傷/荊棘/蓄力 */
.eb.good { color: var(--hp); font-weight: 700; } /* 對你有利:敵攻減半 */
/* PvP 斷線重連橫幅 */
.reconnect-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 50; text-align: center; padding: 8px; background: #b4502a; color: #fff; font-weight: 700; font-size: 14px; }

/* 切換 Stage 的轉場:STAGE N 滑入→停留→滑出,背景短暫變暗。pointer-events:none → 不擋操作 */
/* 進戰鬥過場:金色哥德大字「yo battle」,淡入放大 → 停 → 淡出(約 1.3s) */
.battle-intro {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(8, 9, 16, .55);
  animation: introBg 1.3s ease forwards;
}
.battle-intro span {
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(44px, 9vw, 104px);
  letter-spacing: 4px;
  text-align: center;
  background: linear-gradient(180deg, #f5e3a8 0%, var(--gold) 50%, #8a5a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 24px rgba(217, 178, 90, .4);
  animation: introText 1.3s ease forwards;
}
@keyframes introBg { 0% { opacity: 0; } 15% { opacity: 1; } 72% { opacity: 1; } 100% { opacity: 0; } }
@keyframes introText {
  0% { opacity: 0; transform: scale(.8); }
  20% { opacity: 1; transform: scale(1); }
  72% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}

/* 合作開戰揭示:雙方頭像 + 你是先手/後手(接著才 game start)。覆蓋層、擋住點擊到揭示結束。 */
.coop-start-reveal { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: rgba(8, 9, 16, .82); animation: revealBg .4s ease both; }
@keyframes revealBg { from { opacity: 0; } to { opacity: 1; } }
.coop-start-reveal .reveal-avatars { display: flex; align-items: center; gap: 30px; animation: introText 2s ease both; }
.coop-start-reveal .reveal-side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.coop-start-reveal .reveal-side img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(217, 178, 90, .55); box-shadow: 0 0 18px rgba(0, 0, 0, .6); background: #0d0f1c; }
.coop-start-reveal .reveal-side.you img { border-color: var(--gold); box-shadow: 0 0 22px rgba(217, 178, 90, .5); }
.coop-start-reveal .reveal-side span { font-size: 15px; color: var(--text); font-weight: 600; }
.coop-start-reveal .reveal-amp { font-size: 30px; font-weight: 900; color: var(--gold); }
.coop-start-reveal .reveal-role {
  font-family: "Cinzel Decorative", "Cinzel", serif; font-weight: 900; font-size: clamp(34px, 7vw, 76px); letter-spacing: 3px;
  background: linear-gradient(180deg, #f5e3a8 0%, var(--gold) 50%, #8a5a1e 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 4px 22px rgba(217, 178, 90, .4); animation: revealRole .5s cubic-bezier(.2,.85,.2,1) both;
}
@keyframes revealRole { 0% { opacity: 0; transform: translateY(14px) scale(.9); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

.stage-transition { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; pointer-events: none; animation: stageDim 1.6s ease forwards; } /* STAGE N 疊在所有物件最前面(高於獎勵/彈窗/白屏) */
.stage-transition .stage-label { font-size: clamp(44px, 12vw, 120px); font-weight: 900; letter-spacing: .08em; color: var(--gold); text-shadow: 0 6px 30px rgba(217, 178, 90, .55), 0 0 2px rgba(0,0,0,.6); animation: stageLabel 1.6s cubic-bezier(.2,.85,.2,1) forwards; }
@keyframes stageDim { 0% { background: rgba(8,9,16,.72); } 65% { background: rgba(8,9,16,.5); } 100% { background: rgba(8,9,16,0); } }
@keyframes stageLabel {
  0% { opacity: 0; transform: translateX(-60px) scale(.92); }
  18% { opacity: 1; transform: translateX(0) scale(1); }
  72% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(60px) scale(1.06); }
}
@keyframes stageFadeOnly { 0%, 60% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .stage-transition .stage-label { animation: stageFadeOnly .9s ease forwards; }
  /* 前庭敏感:停掉放大/位移/脈動類動效(保留必要的淡入淡出) */
  .card, .node-inner, .bar-fill, .reveal-bar .bar-fill.hp, .pile-card, .pile-arrow, .btn, .pile-ind { transition: none !important; }
  .card:hover, .pile-card:hover, .btn:hover { transform: none !important; }
  .ring-pulse, .ring { animation: none !important; }
  .shake { animation: none !important; }
  .dmg-float { animation: floatFade .9s ease forwards !important; left: 50%; top: 38%; transform: translateX(-50%); } /* 改純淡出、不位移 */
}

/* 首次遊玩教學覆蓋層 */
/* 教學框:靠左、不置中(複合選擇器壓過後面 .overlay-box 的 center),標題仍置中 */
.overlay-box.tut-box { max-width: 460px; text-align: left; align-items: stretch; }
.tut-box h2 { text-align: center; }
.tut-box .btn { align-self: flex-start; }
.tut-list { margin: 12px 0; padding-left: 20px; line-height: 1.7; color: var(--text); font-size: 15px; }
.tut-list li { margin-bottom: 8px; }
.tut-list b { color: var(--gold); }
.tut-note { background: rgba(217, 178, 90, .12); border-left: 3px solid var(--gold); padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--text); margin: 10px 0 14px; }

/* 傷害飄字 + 受擊抖動。飄字錨在血條外層 .bar-wrap(血條本身 overflow:hidden 會裁掉,故包一層) */
.enemy, .player-stats { position: relative; }
.bar-wrap { position: relative; display: inline-block; }
.float-layer { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5; }
.dmg-float { position: absolute; left: 50%; top: 38%; font-size: 30px; font-weight: 900; text-shadow: 0 2px 6px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.9); white-space: nowrap; animation: floatUp var(--float-dur, 1s) ease-out forwards; }
.dmg-float.dmg { color: #ff5a5a; }
.dmg-float.reflect { color: #c98aff; }
.dmg-float.heal { color: var(--hp); }
.dmg-float.spell { color: #b58aff; font-size: 20px; top: -1.5em; } /* 法術釋放:紫,移到血條「上方」與血條內的傷害數字明確錯開、不重疊 */
.dmg-float.spell-fail { color: #ff9a5a; font-size: 18px; top: -1.5em; } /* 魔力不足:橘,同上移 */
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.15); }
  35% { transform: translate(-50%, -6px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(1); }
}
/* 合作模式專用:依序冒出的飄字升得更快 → 前一個在 0.5s 內就升離一行高度,後一個冒出時不再與它重疊(單人/PvP 仍用 floatUp)。 */
.float-seq .dmg-float { animation-name: floatUpSeq; }
@keyframes floatUpSeq {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(.7); }
  12% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); }
  28% { transform: translate(-50%, -26px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -64px) scale(1); }
}
.shake { animation: hitShake .36s ease; }
@keyframes hitShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes floatFade { 0%,55% { opacity: 1; } 100% { opacity: 0; } }
/* 回合制節奏:結束回合後「敵人行動中」提示(單人;停 1s 再結算怪物反擊)。脈動提示「正在等敵方」。 */
/* 「敵人/Boss 行動中」:絕對定位在敵人立繪左下角,不再獨佔頂端一列 */
.enemy-turn-banner { position: absolute; left: 6px; bottom: 6px; z-index: 3; margin: 0; padding: 4px 11px; max-width: calc(100% - 12px); background: rgba(150, 24, 32, .82); border: 1px solid rgba(255, 90, 90, .7); border-radius: 999px; color: #ffdada; font-weight: 700; font-size: 13px; letter-spacing: .5px; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.45); animation: enemyTurnPulse 1s ease-in-out infinite; }
@keyframes enemyTurnPulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }

/* 機制說明 toast(點徽章顯示;手機無 hover 的替代) */
.tip-toast { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; background: #15172a; border: 1px solid var(--gold); border-radius: 10px; padding: 11px 14px; display: flex; gap: 10px; align-items: center; box-shadow: 0 8px 28px rgba(0,0,0,.55); font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; animation: tipIn .18s ease; }
.tip-x { margin-left: auto; flex: 0 0 auto; background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
@keyframes tipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.enemy-info [title], .player-stats [title] { cursor: pointer; } /* 帶說明的徽章提示可點 */

/* 手機長按手牌 → 放大預覽 */
.card-preview { cursor: zoom-out; }
.card-preview .card { width: min(80vw, 340px); height: auto; cursor: zoom-out; }
.card-preview .card.textcard { width: min(84vw, 360px); min-height: 220px; }
.card-preview .card.textcard .tc-desc { font-size: 15px; line-height: 1.5; }

/* 能量:格子狀格槽(亮起數=目前能量) */
.enemy-energy { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ee-label { font-size: 13px; color: var(--muted); letter-spacing: .5px; }
.energy-pips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 220px; }
.energy-pips .pip {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: #0c0d18;
  border: 1px solid #33365a;
}
.energy-pips .pip.on {
  background: linear-gradient(180deg, #6fd0ff, #2a6f97);
  border-color: #4aa3ff;
  box-shadow: 0 0 5px rgba(74, 163, 255, .6);
}
/* 金格:第 11~20 能量,疊在藍格上(更亮、金色暈光) */
.energy-pips .pip.gold {
  background: linear-gradient(180deg, #ffe79a, #c9971f);
  border-color: #ffd24a;
  box-shadow: 0 0 7px rgba(255, 200, 60, .75);
}

.player-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid #33365a;
  border-radius: 12px;
  padding: 10px 16px;
}
.stat { font-size: 15px; }
.stat.atk { color: var(--atk); }
.stat.def { color: var(--def); }
/* 玩家狀態第二排:ATK/DEF + 副狀態(詠唱/硬幣連擊/扣血計數)+ 旗標同一排,整排換到 bar 下方 */
.stat-line { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.stat-line .cast-queue { flex-basis: auto; margin-top: 0; } /* 詠唱不再獨佔整行,緊接在 ATK/DEF 旁 */

.bar {
  position: relative;
  background: #000;
  border-radius: 6px;
  height: 22px;
  width: 280px;
  overflow: hidden;
  display: inline-block;
}
.bar-fill { position: absolute; inset: 0; transition: width .25s; }
.bar-fill.hp { background: linear-gradient(90deg, #2c8f3c, var(--hp)); }
.bar-fill.energy { background: linear-gradient(90deg, #2a6f97, #4aa3ff); }
.bar-fill.mana { background: linear-gradient(90deg, #5a4fcf, #9a8cff); } /* 魔法師魔力條:紫藍 */
/* 血條刻度(合作 Boss【暫停!】血量地板 700/400):細白虛線,玩家可預判將觸發。 */
.bar-mark { position: absolute; top: 0; bottom: 0; width: 0; margin-left: -1px; border-left: 2px dashed rgba(255, 255, 255, .65); box-shadow: 0 0 3px rgba(0, 0, 0, .8); z-index: 1; pointer-events: none; }
/* 詠唱序列:玩家狀態列下方一排晶片,顯示序列中法術 + 剩餘詠唱回合 */
.cast-queue { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.cq-label { color: #b6a8ff; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.cq-empty { color: var(--muted); font-size: 13px; }
.cq-slot { background: rgba(110, 90, 220, .2); border: 1px solid #6e5adc; border-radius: 7px; padding: 2px 8px; font-size: 13px; color: #ddd6ff; }
.cq-rem { margin-left: 5px; color: #fff; background: #6e5adc; border-radius: 9px; padding: 0 7px; font-size: 12px; font-weight: 700; }
/* 魔法師白底文字卡:類型徽章(法術紫 / 法杖金 / 藥水綠) */
.card.textcard.mage .tc-type { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #6a5acd; align-self: flex-start; }
.card.textcard.mage-staff .tc-type { color: #b8860b; }
.card.textcard.mage-potion .tc-type { color: #2e8b57; }
/* 敵人能量條:放在 HP 條底下,略矮、藍色 */
.bar.bar-energy { height: 16px; margin-top: 5px; }
.bar.bar-energy .bar-label { line-height: 16px; font-size: 12px; }
.enemy-info .intent { font-size: 13px; color: var(--gold); margin-top: 5px; letter-spacing: .5px; }
.bar-label {
  position: relative;
  display: block;
  text-align: center;
  line-height: 22px;
  font-size: 13px;
  text-shadow: 0 1px 2px #000;
}

/* ===== 中下方:三堆指示器 + 手牌 ===== */
.bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* 三堆指示器:固定於視窗底部中央,不隨手牌有無上下飄 */
.pilebar {
  position: fixed;
  right: 18px;
  bottom: 14px;
  transform: none;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  z-index: 6;
  margin: 0;
}
.pile-ind {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid #33365a;
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: border-color .15s, transform .08s;
}
.pile-ind:hover { border-color: var(--gold); transform: translateY(-1px); }
.pile-ind-count {
  min-width: 22px;
  text-align: center;
  background: #0c0d18;
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--gold);
  font-weight: 700;
}

.hand {
  display: flex;
  gap: 0; /* 間距改由每張卡的 margin-left 控制(卡多時自動重疊) */
  justify-content: center;
  flex-wrap: nowrap; /* 永遠單排 */
  margin-bottom: 66px; /* 讓出固定排堆列的位置 */
}
/* 每張手牌外層(framer-motion):flex item 包住卡片。transform-origin 底部置中 → hover 放大時往上長、不被視窗頂裁。 */
.hand-slot { display: flex; flex: 0 0 auto; position: relative; transform-origin: center bottom; }
/* 手牌的放大/位移改由外層 .hand-slot(framer)負責 → 關掉卡片自身的 hover 放大,避免雙重縮放打架(獎勵/探牌卡不在 .hand-slot 內,不受影響)。 */
.hand-slot .card:hover { transform: none; box-shadow: 0 12px 32px rgba(217, 178, 90, .4); }
/* 獎勵三選一 / 探牌候選的卡片列:置中、可換行、卡片保持自然高度(align-items:flex-start 防止被容器拉伸)。
   與戰鬥手牌(單排重疊)需求不同,獨立成 class,不共用 .hand。 */
.card-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: flex-start;
}
.card {
  width: var(--card-w); /* 1.5×(基準 198px;平板/手機縮放) */
  background: #131525;
  border: 1px solid #3a3d63;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  color: var(--text);
  display: block;
  position: relative;
  z-index: 1;
  transform-origin: center bottom; /* 由底部往上放大,不會被視窗頂端裁掉 */
  transition: transform .12s ease, box-shadow .15s, border-color .15s;
}
.card:hover {
  transform: scale(1.5); /* 觸碰放大 1.5×(transform-origin: center bottom → 往上長、不被視窗頂裁) */
  z-index: 10;
  border-color: var(--gold);
  box-shadow: 0 12px 32px rgba(217, 178, 90, .4);
}
.card.big { width: calc(var(--card-w) * 1.364); }
.card img { width: 100%; border-radius: 6px; display: block; }
/* 焚燒標記:任何職業有 exhaust 的卡,右上角火焰(用完進消耗堆) */
.card-burn {
  position: absolute;
  top: 4px; right: 5px;
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8));
  pointer-events: none;
  z-index: 2;
}

/* hover 卡牌 → 在卡牌正上方的簡短解釋浮層(fixed + Portal 到 body,不被卡牌 overflow 裁切) */
.card-tip {
  position: fixed;
  left: 18px;
  bottom: 16px;
  max-width: min(440px, 44vw);
  width: max-content;
  background: #14161f;
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  text-align: left;
  pointer-events: none;
  z-index: 95; /* 高於手牌(焦點卡峰值 90),但低於覆蓋層 .overlay(100) → 不會穿透獎勵/勝負彈窗 */
  box-shadow: 0 8px 22px rgba(0, 0, 0, .55);
}
/* 野蠻人白底文字卡(無卡圖):名稱 + 傷害 + 效果文字。aspect 仿一般卡比例,放大沿用 .card:hover scale。 */
.card.textcard {
  aspect-ratio: 198 / 278;
  background: #f3ecdb;
  border-color: #c7b487;
  color: #2a2418;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 9px;
  gap: 7px;
  overflow: hidden;
  text-align: center;
}
.card.textcard .tc-name { font-weight: 800; font-size: 15px; line-height: 1.2; color: #3a2d18; }
.card.textcard .tc-dmg { font-size: 12px; font-weight: 700; color: #9a2f2f; }
/* 出牌真實自傷代價:醒目紅底徽章,讓玩家一眼看出「打這張會扣多少血」,避免看 N 估錯而暴斃 */
.card.textcard .tc-cost { font-size: 11px; font-weight: 800; color: #fff; background: #b3261e; border-radius: 999px; padding: 1px 8px; line-height: 1.4; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.card.textcard .tc-desc { font-size: 11px; line-height: 1.32; opacity: .9; }
/* 標籤被鎖(捨身鎖B / 龜縮鎖A):變灰,但仍可 hover 放大檢視 */
.card.locked { opacity: .4; filter: grayscale(.8); }
/* 互動選牌:被選取的手牌 */
.card.selected { outline: 3px solid var(--gold); outline-offset: 2px; }
/* 互動選牌提示列(固定頂部置中,不蓋手牌) */
.choice-bar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* 長訊息(如選序衝突提示)換行,不撐爆 */
  max-width: min(760px, 92vw);
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--text);
  font-size: 14px;
}
/* 選序衝突提示:正常字級(非 .lose 大標題)+橘色警示 */
.choice-bar .order-conflict { color: #ff9a5a; font-weight: 700; }

/* 結束回合:固定於視窗中右、圓形大鈕 */
.end-turn {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  font-size: 19px;
  font-weight: 600;
  z-index: 20;
}
.end-turn .lock-label { line-height: 1.25; }
.end-turn .lock-label small { font-size: 11px; font-weight: 500; opacity: .75; }
/* hover:維持置中(不位移),僅以金邊與光暈回饋 */
.end-turn:hover {
  transform: translateY(-50%);
  border-color: var(--gold);
  box-shadow: 0 0 26px rgba(217, 178, 90, .45);
}
/* 鎖定(disabled)/active 也維持垂直置中,蓋過 .btn:disabled:hover 的 transform:none,按鈕不位移 */
.end-turn:active,
.end-turn:disabled,
.end-turn:disabled:hover {
  transform: translateY(-50%);
}

/* ===== 覆蓋層 ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100; /* 蓋過手牌(手牌焦點卡峰值 90、card-tip 95,皆 < 100)與底部 UI;點擊也被覆蓋層攔截 */
}
/* 獎勵框:置頂、與底部手牌分開,不重疊 */
.overlay.reward {
  align-items: flex-start;
  padding-top: 28px;
}
/* 選牌類面板:選擇時不放大(只留金邊/陰影回饋);與單人獎勵一致。涵蓋單人獎勵、PvP draft、探牌候選。 */
.overlay.reward .card:hover,
.draft-pick .card:hover,
.choice-scry .card:hover { transform: none; }
.overlay-box {
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 28px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 90vw;
}
/* 勝利 / 失敗標題:大字哥德 + 漸層 + 淡入放大入場(呼應進戰鬥的 yo battle 過場) */
.win, .lose {
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(38px, 7vw, 72px);
  letter-spacing: 3px;
  margin: 0 0 6px;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: winLoseIn .6s cubic-bezier(.2, .85, .2, 1) both;
}
.win { background-image: linear-gradient(180deg, #f5e3a8 0%, var(--gold) 50%, #8a5a1e 100%); text-shadow: 0 4px 24px rgba(217, 178, 90, .4); }
.lose { background-image: linear-gradient(180deg, #f0a090 0%, var(--atk) 55%, #6b1d12 100%); text-shadow: 0 4px 22px rgba(240, 86, 58, .35); }
@keyframes winLoseIn { 0% { opacity: 0; transform: scale(.8) translateY(8px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.term-en { letter-spacing: 6px; } /* 英文標題(Defeat)多給點字距 */
/* 終局按鈕列:重新開始 / 回首頁 並排(窄螢幕自動換行) */
.term-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ===== PvP ===== */
.room-code {
  font-size: 44px;
  letter-spacing: 8px;
  color: var(--gold);
  font-weight: 800;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 28px;
}
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; } /* 快速配對 / 建立房間 並排等寬 */
.join-row { display: flex; gap: 8px; }
.code-input {
  background: #0c0d18;
  border: 1px solid #33365a;
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  width: 160px;
}
.code-input:focus { outline: none; border-color: var(--gold); }

/* 首頁:勇者名字輸入框(本地記憶) */
.name-input {
  background: #0c0d18;
  border: 1px solid #33365a;
  border-radius: 8px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 18px;
  width: 260px;
  max-width: 80vw;
  text-align: center;
  letter-spacing: 1px;
}
.name-input:focus { outline: none; border-color: var(--gold); }
.name-input::placeholder { color: var(--muted); }
.resolve-banner {
  text-align: center;
  color: var(--gold);
  background: rgba(217, 178, 90, .1);
  border: 1px solid #33365a;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
}
/* 遊戲提示放到 topbar「回合資訊」右側的小膠囊:單行省略、可壓縮,不再獨立成列、不影響下方排版。 */
.resolve-banner.inline {
  margin: 0 0 0 12px;
  padding: 2px 10px;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48%;
  min-width: 0; /* flex 內允許壓縮以觸發 ellipsis */
  flex: 0 1 auto;
}
.surrender-btn {
  position: fixed;
  right: 48px;
  bottom: 72px; /* 上移避開靠右下角的三堆指示器 */
  font-size: 13px;
  opacity: .7;
}
.card:disabled { opacity: .5; cursor: not-allowed; }
/* 停用卡 hover 仍放大檢視(沿用 .card:hover),只是不可點擊 */

/* 同時結算揭示 */
.reveal-overlay { background: rgba(0, 0, 0, .78); }
.reveal-box {
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 420px;
}
.reveal-box h3 { margin: 0; text-align: center; color: var(--gold); }
.reveal-row { display: flex; align-items: center; gap: 12px; }
.reveal-who { width: 44px; text-align: right; color: var(--muted); }
.reveal-bar { width: 300px; height: 26px; }
.reveal-bar .bar-fill.hp { transition: width 1s ease; } /* 雙方同時下降 */
.dmg-num { width: 56px; color: var(--atk); font-weight: 800; font-size: 18px; }
.reveal-chip { text-align: center; color: var(--gold); }

/* ===== 三堆檢視面板 ===== */
.pile-panel { width: min(1100px, 94vw); max-width: 94vw; max-height: 86vh; overflow: hidden; }
.pile-panel .empty { color: var(--muted); font-size: 18px; padding: 24px; }
/* 一排 5 張、靠左對齊:第二排的 x 與第一排相同 */
.pile-grid {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px;
  justify-content: flex-start;
}
/* 牌堆檢視:全部卡片一次列出,整格垂直捲動(滑桿)瀏覽。padding 留白給卡片右下 -6px 的 ×N 徽章不被裁。 */
.pile-panel .pile-grid {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  padding: 4px 8px;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(217, 178, 90, .5) rgba(255, 255, 255, .05);
}
.pile-panel .pile-grid::-webkit-scrollbar { width: 10px; }
.pile-panel .pile-grid::-webkit-scrollbar-thumb { background: rgba(217, 178, 90, .5); border-radius: 999px; }
.pile-panel .pile-grid::-webkit-scrollbar-thumb:hover { background: rgba(217, 178, 90, .75); }
.pile-panel .pile-grid::-webkit-scrollbar-track { background: rgba(255, 255, 255, .05); border-radius: 999px; }
.pile-card { position: relative; width: calc((100% - 80px) / 5); flex: 0 0 auto; transform-origin: center; transition: transform .12s ease; }
/* 牌堆檢視卡片:碰到/hover 不放大(PvP 與單人一致;想看清楚有 title 提示) */
.pile-card img { width: 100%; border-radius: 8px; display: block; border: 1px solid #3a3d63; }
/* 野蠻人文字卡在牌堆檢視:白底、置中名稱+傷害(無卡圖),例「專注 ×10」可讀 */
.pile-textcard {
  aspect-ratio: 198 / 278;
  background: #f3ecdb;
  border: 1px solid #c7b487;
  border-radius: 8px;
  color: #2a2418;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* 由上往下:名稱→傷害→說明,長說明不會把名稱擠出視野 */
  text-align: center;
  gap: 5px;
  padding: 10px 8px;
  overflow: hidden;
}
.pile-textcard .tc-name { font-weight: 800; font-size: 15px; line-height: 1.2; color: #3a2d18; }
.pile-textcard .tc-dmg { font-size: 12px; font-weight: 700; color: #9a2f2f; }
.pile-textcard .tc-desc { font-size: 10px; line-height: 1.32; color: #4a3f2c; opacity: .92; }
.pile-card .badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  background: var(--gold);
  color: #1a1300;
  font-weight: 800;
  font-size: 14px;
  border-radius: 999px;
  padding: 2px 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

/* ===== 響應式:觸控 / 平板 / 手機 ===== */

/* 觸控裝置:停用「滑過放大」——觸控的 hover 是黏著的(點一下就卡住放大、擋住後續點擊)。 */
@media (hover: none) {
  .card:hover, .pile-card:hover,
  .btn:hover, .pile-ind:hover, .pile-arrow:hover:not(:disabled) { transform: none; }
}

/* 平板(直向)/ 中小螢幕:縮小卡片與固定元件,讓手牌不過度換行、結束鈕不壓到牌。 */
@media (max-width: 1024px) {
  :root { --card-w: 168px; }
  .battle { padding: 10px 12px 20px; gap: 10px; }
  .bar { width: 220px; }
  .title { font-size: 36px; }
  .menu-btn { min-width: 260px; }
  /* 窄螢幕:3 顆 grid 會太寬 → 改直向堆疊置中 */
  .menu-row.has-resume { display: flex; flex-direction: column; align-items: center; width: auto; }
  .enemy-img { max-width: 260px; max-height: 200px; width: auto; height: auto; }
  .end-turn { width: 108px; height: 108px; right: 20px; font-size: 16px; }
  .card.textcard .tc-name { font-size: 13px; }
  .card.textcard .tc-dmg { font-size: 10px; }
  .card.textcard .tc-cost { font-size: 10px; padding: 1px 6px; }
  .card.textcard .tc-desc { font-size: 9.5px; }
  .card-burn { font-size: 13px; }
}

/* 手機 / 窄平板 */
@media (max-width: 600px) {
  :root { --card-w: 132px; }
  .battle { padding: 8px 8px 16px; gap: 8px; }
  .bar { width: 150px; height: 20px; }
  .bar-label { line-height: 20px; font-size: 12px; }
  .title { font-size: 26px; }
  .subtitle { font-size: 13px; }
  .menu-btn { min-width: 200px; }
  .stat { font-size: 13px; }
  .enemy-img { max-width: 200px; max-height: 165px; width: auto; height: auto; }
  /* 手機:結束回合改全寬底部條,不再浮在中右壓住手牌 */
  .end-turn { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 50px; border-radius: 0; transform: none; font-size: 16px; }
  .end-turn:hover, .end-turn:active, .end-turn:disabled, .end-turn:disabled:hover { transform: none; }
  .end-turn .lock-label small { font-size: 10px; }
  .hand { gap: 0; margin-bottom: 58px; } /* 讓出底部結束回合條(間距由卡片 margin 控制) */
  .pile-ind { padding: 5px 12px; font-size: 13px; }
  .pile-card { width: calc((100% - 24px) / 3); } /* 牌堆檢視一排 3 張 */
  .pile-textcard .tc-name { font-size: 11px; }
  .pile-textcard .tc-dmg { font-size: 9px; }
  .pile-textcard .tc-desc { font-size: 8px; line-height: 1.25; }
  .choice-bar { font-size: 12px; padding: 6px 10px; max-width: 94vw; justify-content: center; flex-wrap: wrap; }
  .card.textcard .tc-name { font-size: 10px; }
  .card.textcard .tc-dmg { font-size: 9px; }
  .card.textcard .tc-cost { font-size: 9px; padding: 0 5px; }
  .card.textcard .tc-desc { font-size: 8px; line-height: 1.25; }
  .card-burn { font-size: 12px; top: 3px; right: 4px; }
}

/* 橫屏(手機橫放、矮螢幕):壓縮立繪與間距,避免內容超出視高 */
@media (orientation: landscape) and (max-height: 520px) {
  .battle { gap: 4px; padding: 6px 12px 14px; }
  .enemy { gap: 10px; }
  .enemy-img { max-height: 116px; max-width: 220px; }
  .bar { height: 18px; }
  .bar-label { line-height: 18px; }
  .hand { gap: 0; margin-bottom: 50px; }
  .end-turn { height: 44px; font-size: 14px; }
}

/* 首頁主功能列:繼續/單人闖關/PvP 橫排成一列(窄螢幕 flex-wrap 自動換行) */
.menu-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 780px; }
.menu-row .menu-btn { min-width: 220px; }
/* 有「繼續上局」時共 3 顆:改用 grid 讓中間的「單人闖關」真正置中(不被較寬的繼續上局推偏)。
   兩側 1fr 等寬、中間 auto 落在頁面正中;繼續上局靠右、PvP 靠左,貼近中央。 */
.menu-row.has-resume { display: grid; grid-template-columns: 1fr auto 1fr; max-width: none; width: 100%; align-items: center; }
.menu-row.has-resume > :nth-child(1) { justify-self: end; }
.menu-row.has-resume > :nth-child(3) { justify-self: start; }

/* ===== 帳號登入列 + 個人統計 ===== */
.auth-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #2a2c47;
  max-width: 520px;
}
.auth-bar .btn { padding: 8px 16px; font-size: 14px; min-width: 0; }
.auth-who { color: var(--gold); font-weight: 600; margin-right: 4px; }

/* 品牌圖標登入按鈕:正方圖標鈕(覆蓋 .auth-bar .btn 的內距,同 specificity、後定義勝) */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 0; border-radius: 12px; }
.auth-bar .icon-btn { width: 52px; height: 52px; padding: 0; }
.provider-icon { width: 26px; height: 26px; display: block; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
  margin: 8px 0 22px;
  width: min(560px, 88vw);
}
.stat-card {
  background: var(--panel);
  border: 1px solid #33365a;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
}
.stat-label { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.stat-value { color: var(--text); font-size: 22px; font-weight: 700; }
/* 可點的統計卡(點開遊玩紀錄):滑過浮起金邊 + 角落小提示 */
.stat-card.clickable { cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; }
.stat-card.clickable:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(217, 178, 90, .18); }
.stat-card.clickable:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.stat-more { margin-top: 6px; font-size: 11px; color: var(--gold); opacity: .85; }
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
}
/* 遊玩紀錄彈窗 */
.hist-box { width: min(880px, 94vw); max-height: 86vh; align-items: stretch; text-align: left; gap: 10px; }
.hist-title { margin: 0; color: var(--gold); font-family: "Cinzel Decorative", "Cinzel", serif; font-size: 24px; }
.hist-sub { margin: 0; color: var(--muted); font-size: 13px; }
.hist-empty { color: var(--muted); text-align: center; padding: 24px; }
.hist-scroll { overflow: auto; max-height: 62vh; width: 100%; border: 1px solid #23253a; border-radius: 10px; }
.hist-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hist-table th, .hist-table td { padding: 7px 10px; border-bottom: 1px solid #23253a; white-space: nowrap; text-align: left; }
.hist-table th { color: var(--muted); position: sticky; top: 0; background: var(--panel); font-weight: 600; }
.hist-table td.num, .hist-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.hist-table th { cursor: pointer; user-select: none; }
.hist-table th:hover { color: var(--gold); }
/* 排序箭頭固定寬度槽:恆佔位,切換排序時標題不位移 */
.hist-table th .ar { display: inline-block; width: 1.1em; text-align: center; color: var(--gold); font-size: 11px; }
/* 篩選:單顆鈕(顯示目前條件)→ 點開跳出面板 */
.filter-btn { font-weight: 600; }
.filter-box { width: min(360px, 92vw); align-items: stretch; text-align: left; gap: 14px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group .flbl { color: var(--muted); font-size: 13px; margin: 0; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
/* 卡牌百科篩選:每類併成一排(標籤+chips 同列、標籤定寬讓兩排 chips 對齊),兩類=兩排 */
.encyclopedia-box .filter-group { flex-direction: row; align-items: center; gap: 12px; }
.encyclopedia-box .filter-group .flbl { flex: 0 0 auto; min-width: 3.4em; }
/* 統計頁:頂部精簡數字列 + 篩選 chip + 寬版紀錄表 */
.psum { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; max-width: min(900px, 94vw); margin: 4px 0; }
.psum span { background: var(--panel); border: 1px solid #33365a; border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--text); }
.psum b { color: var(--muted); font-weight: 600; margin-right: 5px; }
.hist-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; max-width: min(900px, 94vw); }
.hist-filters .flbl { color: var(--muted); font-size: 13px; margin-left: 8px; }
.chip { background: var(--panel); color: var(--text); border: 1px solid #33365a; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--gold); }
.chip.on { background: #6b2230; border-color: #b5485c; color: #fff; }
.hist-scroll.wide { width: min(900px, 94vw); max-height: 56vh; }
/* 統計頁:靠上排版(不垂直置中)+ 較小標題,內容多時整頁可捲 */
.profile-screen {
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 16px 16px 28px;
}
.profile-title {
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-weight: 900;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 2px;
  margin: 2px 0;
  background: linear-gradient(180deg, #f5e3a8 0%, var(--gold) 50%, #8a5a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 3px 16px rgba(217, 178, 90, .28);
}

/* ===== Discord Activity:把整個 body 當成「固定尺寸的桌面視窗」,等比例縮放置中塞進 iframe =====
   Discord 的 iframe 長寬比與桌面瀏覽器不同 → 既有「填滿視窗」版面會溢出產生捲軸。
   解法:給 body 一個固定的虛擬桌面尺寸(--stage-w × --stage-h),版面就照桌面 RWD 排好、本就不溢出,
   再用 transform: scale 等比例縮放、JS 算出 left/top 置中(letterbox)塞進 iframe。
   只在 platform=discord 時由 App.tsx 加上 html/body 的 .discord-activity 啟用;網頁版完全不受影響。

   為什麼把 transform 放在 body(而非 #root 的子節點):CSS 規範中「帶有 transform 的元素會成為其
   position:fixed 後代的『包含塊』」。本遊戲有多個固定定位元素——固定中右的「結束回合」圓鈕(.end-turn)、
   Portal 到 body 的卡片提示(.card-tip)、覆蓋層(.overlay)等。只有把 transform 放在這些元素共同的祖先 body 上,
   它們才會跟著舞台一起縮放/定位,完全等同桌面瀏覽器;否則(放在 #root>* 上時)Portal 到 body 的提示會脫離
   舞台、浮在真實 iframe 邊緣,圓鈕也會因舞台太窄而壓到卡片。

   尺寸 1480×860:戰鬥 .battle 寬上限 1100,左右各留 (1480-1100)/2=190px,> 圓鈕的 right:48+width:132=180px,
   圓鈕不壓卡;高 860 容得下立繪/手牌/底部按鈕,不裁切。比例 ≈1.72,接近 Discord 活動面板,兩側 letterbox 極小。
   想兩側更滿但圓鈕仍不壓卡:須一併把 .end-turn 在 discord 下改放底部條(會與網頁外觀不同,預設不做)。 */
:root {
  --stage-w: 1480px;
  --stage-h: 860px;
}
html.discord-activity { overflow: hidden; }
body.discord-activity {
  position: fixed;
  left: var(--stage-left, 0);
  top: var(--stage-top, 0);
  width: var(--stage-w);
  height: var(--stage-h);
  margin: 0;
  overflow: hidden;
  transform: scale(var(--stage-scale, 1));
  transform-origin: top left; /* 自 body 左上角縮放,配合 JS 算出的 left/top 達成置中 */
}
body.discord-activity #root { width: 100%; height: 100%; }

/* ===================== 卡牌百科全書 ===================== */
/* 首頁右下角「Wiki Card」鈕:長方形、放大且精緻(深色金邊漸層、字距、層次陰影);W/C 金色、其餘預設色。 */
/* 首頁粒子星座背景:固定鋪滿、墊在內容之後、不擋點擊。
   用 z-index:0(非 -1)——因為 #root 自身有背景漸層,-1 會被畫在 #root 背景底下而看不到;
   配合 .centered 提到 z-index:1 讓內容在 canvas 之上。 */
.particle-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.book-fab {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 90; /* 高於首頁內容、低於覆蓋層(.overlay 100) → 開百科彈窗時不穿幫 */
  padding: 15px 32px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.2;
  color: var(--text);
  background: linear-gradient(180deg, #21232f, #14161f);
  border: 1px solid rgba(217, 178, 90, .55);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .35) inset, 0 1px 0 rgba(255, 255, 255, .05) inset;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, border-color .2s;
}
.book-fab:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .55), 0 0 24px -6px rgba(217, 178, 90, .6);
}
.book-fab .wc { color: var(--gold); font-weight: 800; }
@media (max-width: 520px) {
  .book-fab { right: 16px; bottom: 16px; padding: 12px 24px; font-size: 17px; }
}

/* 百科彈窗:寬、左對齊、內容區自己捲動(仿 .hist-box,而非 pile-panel 的 overflow:visible 分頁)。 */
.encyclopedia-box {
  width: min(1100px, 94vw);
  max-width: 94vw;
  max-height: 88vh;
  align-items: stretch;
  text-align: left;
  gap: 12px;
}
.encyclopedia-box h2 { margin: 0; }
.encyclopedia-scroll {
  overflow-y: auto;
  max-height: 64vh;
  width: 100%;
  border: 1px solid #23253a;
  border-radius: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, .18);
}
/* 百科卡格:重用 .pile-card/.pile-textcard 網格;依稀有度上色外框、右上角放稀有度徽章(取代牌堆的 ×N)。 */
.enc-card { border: 1px solid var(--line, #2a2c45); border-radius: 8px; overflow: hidden; }
.enc-card.rarity-epic { border-color: #a05aff; box-shadow: 0 0 12px -4px rgba(160, 90, 255, .45); }
.enc-card.rarity-legend { border-color: var(--gold); box-shadow: 0 0 12px -4px rgba(217, 178, 90, .55); }
.enc-rar {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 1px 8px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
}
.enc-rar.rar-normal { color: var(--muted); background: rgba(20, 22, 31, .82); }
.enc-rar.rar-epic { color: #c08cff; background: rgba(30, 16, 45, .82); }
.enc-rar.rar-legend { color: var(--gold); background: rgba(40, 30, 10, .85); }
.encyclopedia-box > .btn { align-self: center; min-width: 140px; } /* 關閉鈕在 stretch 容器中不撐滿 */

/* ===== 多人合作 PvE ===== */
.coop-battle .ally-bar { margin: 8px 0; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; font-size: 14px; color: #cbd5e1; transition: border-color .2s, box-shadow .2s; }
.coop-battle .ally-bar .bar { margin-top: 4px; }
/* 鬼助/絕境反擊狀態橫幅(自己):暗金邊框小字說明 */
.coop-battle .coop-self-status { margin: 6px 0; padding: 6px 12px; border: 1px solid rgba(220, 180, 90, .45); border-radius: 8px; background: rgba(220, 180, 90, .08); font-size: 13px; line-height: 1.5; color: #e6cf9a; }
/* 隊友正在行動:邊框泛光脈動,提示「現在輪到隊友、等他出完」 */
.coop-battle .ally-bar.acting { border-color: rgba(120, 200, 255, .7); animation: allyActing 1.2s ease-in-out infinite; }
@keyframes allyActing {
  0%, 100% { box-shadow: 0 0 0 rgba(120, 200, 255, 0); }
  50% { box-shadow: 0 0 12px rgba(120, 200, 255, .55); }
}
/* Boss 面板格式與單人敵人一致(.enemy/.enemy-info/.enemy-stats/.intent)→ 不另設 .coop-boss .name,名稱沿用單人白底粗體 */
/* 關卡(Boss)資訊清單:限高 + 內部捲動,避免被動/意圖過多時溢出視窗(標題/按鈕保持可見)。 */
.coop-foe-list { max-width: 560px; width: min(560px, 92vw); margin: 10px auto; text-align: left; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.coop-end-board { width: min(520px, 92vw); margin: 6px auto 12px; display: flex; flex-direction: column; gap: 8px; }
/* 結算盤面:名稱定寬欄+血條填滿剩餘 → 三條血條起點/寬度對齊 */
.coop-end-board .ally-bar { display: flex; align-items: center; gap: 10px; }
.coop-end-board .end-label { flex: 0 0 9.5em; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coop-end-board .ally-bar .bar { flex: 1 1 auto; margin: 0; }

/* ===== 合作 PvE:選 Boss 地圖(沿用單人 RouteMap 的 .level-map / .map-* / .trail 樣式;此處只補「無立繪節點字符」與「共識高亮」) ===== */
/* 無立繪節點(Boss 立繪未就緒):金環中央顯示表徵字符(🔥)取代肖像 */
.map-node .node-glyph { fill: var(--gold); font-size: 56px; }
.map-node.soon .node-glyph { fill: #5b5e86; opacity: .85; } /* 即將登場:灰藍問號 */
/* 共識高亮:你=亮金粗環、隊友=青環、雙方一致=綠環 */
.map-node.mine .ring { stroke: #f5e3a8; stroke-width: 5; }
.map-node.theirs .ring { stroke: #5ad1ff; }
.map-node.mine.theirs .ring { stroke: #8ef0b0; stroke-width: 5; }
/* 節點下方共識角標(SVG text):你(金)/ 隊友(青) */
.node-pick { font-size: 22px; font-weight: 800; }
.node-pick .pk-me { fill: #f5e3a8; }
.node-pick .pk-ally { fill: #5ad1ff; }
.node-pick .pk-sep { fill: var(--muted); }
/* 選 Boss 地圖頁尾的共識狀態字:雙方一致時轉綠 */
.map-class.ok { color: #8ef0b0; font-weight: 700; }
.msg.ok { color: var(--hp); font-weight: 700; }
/* Boss 介紹頁:比照單人敵人介紹(.foe-box 盒樣式綁在 .foe-detail 下,這裡補上盒寬/左對齊)。 */
.boss-intro-box { width: min(760px, 94vw); max-height: 88vh; overflow-y: auto; align-items: stretch; text-align: left; gap: 14px; }
.boss-intro-box .foe-portrait { width: 112px; height: 112px; }
.boss-intro-box .foe-note { margin: 0; color: var(--muted); font-size: 13px; }
.boss-intro-box .btn-row { justify-content: center; margin-top: 2px; }