/* KQ02（Owner 2026-10-28）：前三名卡面放整隊每個人的照片與名字；第 4–10 名放每位成員的小照片；
   主持人可切換的「前十名名冊」「全部桌隊」兩種頁面。沿用 C 典藏卡的金框、卡背與金字，不另起新視覺。 */

/* ---------- 一人一格 ---------- */
.mt { position: relative; display: block; min-width: 0; min-height: 0; overflow: hidden; border-radius: 6px; background: #06130d;
  box-shadow: 0 0 0 2px rgba(217,177,92,.8), 0 6px 14px rgba(0,0,0,.6); }
/* R98（預設：每人用自己拿到的整張英雄成品照，含 2–3 人合照；不裁、不挑臉）：照片整張放進金框，留邊不裁 */
.mt img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 0; background: #030a06; }
.mt em { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 3px 6px; font-style: normal; font-size: 20px; font-weight: 600; letter-spacing: .04em;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff1cc; background: linear-gradient(transparent, rgba(0,0,0,.92) 62%); }
.mt.none { background: url(assets/gen/c-card-back.png) center / cover; }
.mt.none b { position: absolute; inset: 0; background: rgba(2,10,6,.66); }
.mt.none s { position: absolute; left: 4px; right: 4px; top: 40%; transform: translateY(-50%); text-decoration: none; font-size: 15px; line-height: 1.3; text-align: center; color: rgba(245,234,208,.82); }

/* ---------- 前三名卡面：整隊 ---------- */
/* 一排放不滿時（例如 10 人 4 欄），最後一排置中，不靠左留空 */
.pk .team { display: flex; flex-wrap: wrap; justify-content: center; align-content: stretch; gap: 6px; width: 100%; min-height: 0; align-self: stretch; margin: 8px 0 12px; }
.pk .team .mt { flex: 0 0 calc((100% - (var(--c, 1) - 1) * 6px) / var(--c, 1)); height: calc((100% - (var(--r, 1) - 1) * 6px) / var(--r, 1)); }
.pk .team.c1 .mt { flex-basis: 62%; }
.pk .team.c2 .mt { flex-basis: 46%; }
.pk .team.c4 .mt em { font-size: 17px; letter-spacing: 0; padding-top: 14px; }
/* R97 實測：12 人卡的名字被「…」截斷；改成可換兩行，名字一定看得全 */
.pk .team .mt em { white-space: normal; text-overflow: clip; line-height: 1.12; letter-spacing: 0; }
.pk .team.c3 .mt em, .pk .team.c4 .mt em { font-size: 15px; padding: 12px 2px 5px; }
.pk .team.c5 .mt em, .pk .team.c6 .mt em { font-size: 14px; letter-spacing: 0; padding: 10px 1px 4px; }
.pk .team.c5 .mt.none s, .pk .team.c6 .mt.none s { font-size: 12px; }
.pk .nm small { margin-left: 12px; font-size: 22px; font-weight: 600; letter-spacing: .06em; color: #d9b15c; }
.v-rank.big .pk .nm { font-size: 38px; }
.v-rank.big .pk .sc { font-size: 62px; } .v-rank.big .pk.r1 .sc { font-size: 72px; }
.v-rank.big .pk .rk { font-size: 28px; } .v-rank.big .pk .rk .num { font-size: 40px; }

/* ---------- 第 4–10 名 ---------- */
.v-rank:not(.norest) .rest2 { top: 748px; left: 50px; right: 50px; gap: 14px; }
.r4 { position: relative; width: 228px; min-height: 238px; display: grid; justify-items: center; align-content: start; padding: 2px 4px 6px; opacity: 0;
  border: 16px solid transparent; border-image: url(assets/gen/c-card-front.png) 84 fill / 16px stretch; }
.r4.in { animation: pkin .6s cubic-bezier(.2,1.2,.4,1) both; }
.r4 > b { font-size: 21px; letter-spacing: .12em; color: #d9b15c; white-space: nowrap; }
.r4 > span { font-size: 28px; font-weight: 900; line-height: 1.15; color: #fff3d6; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.r4 > i { font-style: normal; font-size: 34px; line-height: 1.1; color: #ffe2a0; }
.r4 > em { position: absolute; right: 2px; top: 0; font-style: normal; font-size: 17px; color: rgba(245,234,208,.55); } .r4 > em.up { color: #b8f09a; } .r4 > em.dn { color: #ff9a7a; }
.r4 .dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 7px 0 0; }
.r4 .dots i { width: 26px; height: 38px; border-radius: 3px; overflow: hidden; background: #06130d; box-shadow: 0 0 0 1.5px rgba(217,177,92,.8); }
.r4 .dots i img { display: block; width: 100%; height: 100%; object-fit: contain; background: #030a06; }
.r4 .dots i.none { background: url(assets/gen/c-card-back.png) center / cover; opacity: .55; }
.r4 .dots.s i { width: 25px; height: 25px; }
.r4 .dots u { align-self: center; text-decoration: none; font-size: 16px; color: #ffe2a0; }
.r4 .dots small { font-size: 14px; color: rgba(245,234,208,.6); }
.rnote .fb { display: block; margin-top: 8px; font-size: .82em; opacity: .85; }
/* 下面有第 4–10 名時，說明列縮成一行放在最底 */
.v-rank:not(.norest) .rnote { top: 1008px; padding: 9px 34px; font-size: 22px; }
.v-rank:not(.norest) .rnote .fb { display: inline; margin: 0 0 0 .8em; font-size: 1em; opacity: .8; }

/* ---------- 前十名名冊（主持人切換；每頁 5 桌） ---------- */
.vh { position: absolute; left: 0; right: 0; top: 50px; text-align: center; font-size: 50px; letter-spacing: .16em; color: #ffe7b0; text-shadow: 0 4px 24px #000; }
.vh .num { font-size: 56px; letter-spacing: 0; margin: 0 .1em; color: #ffe2a0; }
.vh small { display: block; margin-top: 4px; font-size: 25px; letter-spacing: .08em; color: #d9b15c; }
.vh small .num { font-size: inherit; color: #ffe2a0; }
.v.on .vh { animation: rise .7s .05s cubic-bezier(.2,.9,.3,1) both; }
.roster { position: absolute; left: 80px; right: 80px; top: 182px; display: grid; gap: 12px; }
.rr { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: center; gap: 14px; height: 164px; padding: 0 6px; opacity: 0;
  border: 14px solid transparent; border-image: url(assets/gen/c-card-front.png) 84 fill / 14px stretch; }
.v-roster.on .rr { animation: pkin .6s cubic-bezier(.2,1.2,.4,1) both; }
.rr.top { filter: drop-shadow(0 0 18px rgba(255,214,120,.38)); }
.rl { display: grid; gap: 2px; padding-left: 10px; min-width: 0; }
.rl b { font-size: 24px; letter-spacing: .2em; color: #d9b15c; white-space: nowrap; }
.rl b .num { font-size: 46px; letter-spacing: 0; color: #ffe2a0; vertical-align: -5px; }
.rl b i, .at b i { display: inline-block; margin-left: 8px; padding: 1px 10px 2px; border-radius: 16px; font-style: normal; font-size: 16px; letter-spacing: .1em; vertical-align: 5px; color: #1c1406; background: linear-gradient(#ffe7a8, #c9963e); }
.rl .tn { font-size: 40px; font-weight: 900; line-height: 1.12; color: #fff3d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl .ts { font-size: 22px; color: #e8dcc0; } .rl .ts i { font-style: normal; font-size: 32px; color: #ffe2a0; }
.rm { display: flex; gap: 8px; height: 136px; min-width: 0; }
.rm .mt { flex: 1 1 0; max-width: 118px; height: 136px; }
.rm.s { gap: 5px; } .rm.s .mt em { font-size: 15px; letter-spacing: 0; padding: 10px 1px 4px; }
.rm .mt em { font-size: 17px; letter-spacing: 0; white-space: normal; line-height: 1.15; text-overflow: clip; }
.roster .more { margin: 2px 0 0; padding: 12px 20px; text-align: center; font-size: 26px; color: #f5ead0; border-radius: 8px; background: rgba(2,8,5,.86); box-shadow: 0 0 0 1px rgba(217,177,92,.45); }
.roster .more .num { font-size: 34px; color: #ffe2a0; margin: 0 4px; }

/* ---------- 全部桌隊（主持人切換；每頁 40 桌，由上往下、由左往右） ---------- */
.allgrid { position: absolute; left: 64px; right: 64px; top: 176px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(10, 78px); grid-auto-flow: column; gap: 8px 18px; }
.at { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; column-gap: 10px; padding: 0 16px; opacity: 0;
  border-radius: 6px; background: linear-gradient(90deg, rgba(4,16,10,.97), rgba(3,12,8,.93)); box-shadow: inset 0 0 0 1px rgba(217,177,92,.35), 0 6px 14px rgba(0,0,0,.5); }
.v-all.on .at { animation: atin .45s cubic-bezier(.2,1,.4,1) both; } @keyframes atin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.at b { grid-row: 1 / span 2; align-self: center; font-size: 22px; letter-spacing: .06em; color: #d9b15c; white-space: nowrap; }
.at b i { margin-left: 4px; padding: 0 7px 1px; font-size: 13px; vertical-align: 3px; }
.at span { font-size: 29px; font-weight: 900; line-height: 1.15; color: #fff3d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at em { grid-column: 2; font-style: normal; font-size: 17px; color: rgba(245,234,208,.68); }
.at > i { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 34px; color: #ffe2a0; }
.at.t10 { box-shadow: inset 0 0 0 1.5px rgba(255,214,120,.85), 0 0 14px rgba(255,214,120,.18); }

/* ---------- 很多桌時，出牌數改成進度條（一顆一顆的牌放不下 100 桌） ---------- */
.played.many .gems { display: block; }
.played.many .gems u { display: block; height: 12px; margin: 6px 10px 0; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(217,177,92,.5); }
.played.many .gems u b { display: block; height: 100%; background: linear-gradient(90deg, #c8963e, #fff0c4); transition: width .4s; }

/* ---------- 英雄成品照讀取中：先顯示卡背底，不閃空白 ---------- */
.mt.wait { background: url(assets/gen/c-card-back.png) center / cover; }
.mt.wait img, .r4 .dots i.wait img { opacity: 0; }
.mt img, .r4 .dots i img { transition: opacity .35s; }
.r4 .dots i.wait { background: url(assets/gen/c-card-back.png) center / cover; opacity: .7; }

/* ---------- 同分卡：同名次的桌太多、放不下一桌一張時 ---------- */
.pk.grp .front { grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 6px; }
.pk.grp .gn { font-size: 30px; color: #fff3d6; } .pk.grp .gn .num { font-size: 66px; color: #ffe2a0; margin-right: 6px; }
.pk.grp .gl { align-self: start; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; padding: 4px 6px; max-width: 100%; overflow: hidden; }
.pk.grp .gl i { font-style: normal; font-size: 21px; color: #f5ead0; padding: 2px 9px; border-radius: 4px; background: rgba(4,14,9,.75); box-shadow: inset 0 0 0 1px rgba(217,177,92,.35); }
.pk.grp .gl u { text-decoration: none; font-size: 20px; color: #ffe2a0; padding: 2px 6px; }
.pk.grp .gh { font-size: 17px; line-height: 1.35; text-align: center; color: rgba(245,234,208,.75); padding: 0 8px; }
.r4.grp > span { font-size: 26px; } .r4.grp > span .num { font-size: 34px; color: #ffe2a0; margin-right: 4px; }
.r4.grp .gl { margin: 6px 0 0; font-size: 15px; line-height: 1.4; text-align: center; color: rgba(245,234,208,.8); }

/* ---------- 主持台裡的預覽：同一頁，不顯示身份條 ---------- */
body.preview .kstrip { display: none !important; }
