/* 封神榜抽卡 —— 视觉重设计 v2：国潮重彩 + 水墨底 + 档位材质，移动端优先
   设计语言对标 WikiGacha v9 定稿：档位框发光、内衬斜射光、纹理层、实物箔包 */
:root {
  --ink: #0a0b0d; --ink2: #121317; --ink3: #1a1b20;
  --paper: #ece3cb; --txt: #eae5d6; --mut: #a79f8d; --dim: #716c5e;
  --gold: #e3b34c; --gold2: #ffd76a; --red: #c8433c; --jade: #43b48f;
  --line: rgba(227,179,76,.18);
  --r-C: #9aa1ab; --r-UC: #57b08c; --r-R: #c9d4e3; --r-SR: #e8b84b;
  --r-SSR: #ffb63e; --r-UR: #e06ac8; --r-LR: #b78cff; --r-TR: #c98a4b;
  --f-chan: #57a8d8; --f-jie: #b06ac8; --f-shang: #d8574f; --f-zhou: #d8a857;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: #060708; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--txt); background:
    radial-gradient(115% 55% at 50% -8%, rgba(227,179,76,.13) 0%, transparent 55%),
    radial-gradient(75% 42% at 94% 106%, rgba(200,67,60,.10) 0%, transparent 60%),
    radial-gradient(65% 38% at 2% 68%, rgba(67,180,143,.07) 0%, transparent 60%),
    linear-gradient(180deg, #101116 0%, var(--ink) 42%, #070809 100%);
  min-height: 100vh; max-width: 480px; margin: 0 auto; position: relative;
  padding-bottom: 122px;
}
body::before { /* 水墨晕染 */
  content: ""; position: fixed; inset: 0; max-width: 480px; margin: 0 auto; pointer-events: none; opacity: .55; z-index: 0;
  background:
    radial-gradient(42% 24% at 10% 28%, rgba(87,168,216,.05), transparent 70%),
    radial-gradient(48% 28% at 90% 60%, rgba(200,67,60,.06), transparent 70%),
    radial-gradient(62% 32% at 50% 94%, rgba(227,179,76,.06), transparent 70%);
}
body::after { /* 纸纹颗粒 */
  content: ""; position: fixed; inset: 0; max-width: 480px; margin: 0 auto; pointer-events: none; opacity: .05; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
h1, h2, h3, .serif { font-family: "Songti SC", "STSong", "SimSun", serif; }
button { font-family: inherit; cursor: pointer; border: none; }
img { display: block; }
figure { margin: 0; }

/* ---------- 顶栏 ---------- */
header.top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(8,8,10,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(227,179,76,.28);
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo .seal {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, #d8554c, #a52f28 70%); color: #ffe9b0;
  font-family: "Songti SC", serif; font-size: 19px; font-weight: 700;
  box-shadow: inset 0 0 0 1.5px rgba(255,215,106,.6), inset 0 -4px 8px rgba(0,0,0,.3), 0 2px 10px rgba(200,67,60,.35);
}
.logo b { font-size: 17px; letter-spacing: 2px; }
.logo small { display: block; color: var(--mut); font-size: 10px; letter-spacing: 1px; }
.phase-badge {
  margin-left: auto; font-size: 10.5px; color: var(--gold2); border: 1px solid rgba(227,179,76,.5);
  padding: 3px 8px; border-radius: 99px; background: rgba(227,179,76,.08); white-space: nowrap;
}
#walletBtn {
  background: linear-gradient(145deg, #26241f, #171613); color: var(--txt);
  border: 1px solid rgba(227,179,76,.3); border-radius: 99px; padding: 7px 12px; font-size: 12.5px;
}
#walletBtn.on { color: var(--gold2); border-color: rgba(227,179,76,.65); }

/* ---------- 通用 ---------- */
main { position: relative; z-index: 1; }
.view { display: none; padding: 14px 14px 8px; animation: fadein .25s ease; }
.view.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
.card-panel {
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, rgba(26,27,33,.94), rgba(17,18,21,.94));
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; margin-bottom: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.045);
}
.card-panel h2 { font-size: 16.5px; letter-spacing: 1px; margin-bottom: 4px; }
.card-panel h2::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 2px;
  background: linear-gradient(145deg, #d8554c, #a52f28); box-shadow: inset 0 0 0 1px rgba(255,215,106,.65);
  transform: rotate(45deg) translateY(-1px);
}
.card-panel .sub { color: var(--mut); font-size: 12px; line-height: 1.65; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 12px; padding: 11px 18px; font-size: 14.5px; font-weight: 600; letter-spacing: 1px;
  background: linear-gradient(160deg, #f0cd6e, #d8a83e 45%, #a87c22); color: #241a05;
  box-shadow: 0 5px 16px rgba(216,168,62,.35), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 5px rgba(90,60,5,.35);
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: rgba(255,255,255,.05); color: var(--txt); border: 1px solid var(--line); box-shadow: none; }
.btn.silver { background: linear-gradient(160deg, #f2f5f9, #c3cedd 45%, #8d9db4); color: #131a28; box-shadow: 0 5px 16px rgba(160,180,210,.28), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 5px rgba(50,60,80,.3); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.tag { font-size: 10.5px; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--mut); }
.note { font-size: 11.5px; color: var(--dim); line-height: 1.7; }
table.rules { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
table.rules th, table.rules td { padding: 7px 6px; border-bottom: 1px solid rgba(227,179,76,.09); text-align: center; }
table.rules tbody tr:nth-child(even) td, table.rules tr:nth-child(even) td { background: rgba(255,255,255,.018); }
table.rules th { color: var(--mut); font-weight: 500; font-size: 11.5px; border-bottom: 1px solid rgba(227,179,76,.25); }
table.rules td:first-child, table.rules th:first-child { text-align: left; }
.rname { font-weight: 700; }
.demo-flag { text-align: center; color: var(--dim); font-size: 11px; padding: 10px 0 2px; line-height: 1.7; }

/* ---------- 英雄区 + 样卡扇 ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center; padding: 18px 14px 16px; border-radius: 18px; margin-bottom: 14px;
  background:
    radial-gradient(95% 120% at 50% -30%, rgba(227,179,76,.20), transparent 60%),
    radial-gradient(70% 60% at 50% 115%, rgba(200,67,60,.12), transparent 65%),
    linear-gradient(180deg, #1b1a17, #100f0e);
  border: 1px solid rgba(227,179,76,.42);
  box-shadow: 0 14px 34px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,215,106,.15);
}
.hero::before { /* 祥云暗纹 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%23e3b34c' stroke-opacity='.55'%3E%3Cpath d='M6 54a12 12 0 0 1 12-12h30a12 12 0 1 1 12 12'/%3E%3Cpath d='M6 68a12 12 0 0 1 12-12h30a12 12 0 1 1 12 12'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-fan { position: relative; height: 176px; margin: 0 0 4px; perspective: 720px; z-index: 1; }
.fan-card {
  position: absolute; left: 50%; bottom: 0; width: 102px; aspect-ratio: 3/4.3; border-radius: 10px; overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.6);
  animation: fanfloat 5.2s ease-in-out infinite;
}
.fan-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.fan-card .fan-holo {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.30) 48%, transparent 62%);
  background-size: 250% 250%; animation: sheen 4.4s ease-in-out infinite;
}
.fan-card.fc-c { transform: translateX(-50%); width: 112px; z-index: 3; box-shadow: 0 18px 38px rgba(0,0,0,.65), 0 0 30px rgba(255,110,60,.30); }
.fan-card.fc-l { transform: translateX(-132%) rotate(-11deg); z-index: 2; box-shadow: 0 14px 28px rgba(0,0,0,.6), 0 0 24px rgba(224,106,200,.22); animation-delay: .7s; }
.fan-card.fc-r { transform: translateX(32%) rotate(11deg); z-index: 2; box-shadow: 0 14px 28px rgba(0,0,0,.6), 0 0 24px rgba(255,182,62,.22); animation-delay: 1.3s; }
@keyframes fanfloat { 0%,100% { margin-bottom: 0; } 50% { margin-bottom: 5px; } }
@keyframes sheen { 0%,100% { background-position: 125% 50%; } 50% { background-position: -25% 50%; } }
.hero .big { position: relative; z-index: 1; font-size: 25px; letter-spacing: 4px; color: var(--gold2); text-shadow: 0 2px 16px rgba(227,179,76,.45), 0 1px 0 rgba(0,0,0,.6); }
.hero .desc { position: relative; z-index: 1; color: var(--mut); font-size: 12px; margin-top: 6px; line-height: 1.7; }
.countdown { position: relative; z-index: 1; display: flex; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.countdown .cell {
  background: linear-gradient(180deg, #211e19, #100f0d); border: 1px solid rgba(227,179,76,.38); border-radius: 10px;
  min-width: 58px; padding: 7px 0 5px; box-shadow: inset 0 1px 0 rgba(255,215,106,.14), 0 4px 10px rgba(0,0,0,.4);
}
.countdown .cell b { font-size: 21px; font-variant-numeric: tabular-nums; color: var(--gold2); }
.countdown .cell span { display: block; font-size: 10px; color: var(--mut); margin-top: 1px; }
.progress-wrap { position: relative; z-index: 1; margin-top: 13px; text-align: left; }
.progress-wrap .lbl { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.progress-wrap .lbl b { color: var(--gold2); font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 99px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #b9822a, var(--gold2)); transition: width .8s ease; box-shadow: 0 0 12px rgba(255,215,106,.5); }
.bar.blue i { background: linear-gradient(90deg, #2c7d63, #6fe3bd); box-shadow: 0 0 12px rgba(111,227,189,.45); }
.bar.mini { height: 7px; }

/* ---------- 领包/买包 + 包面图 ---------- */
.pack-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack-box { border: 1px solid var(--line); border-radius: 14px; padding: 13px 12px; background: rgba(0,0,0,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.pack-box h3 { font-size: 14.5px; margin-bottom: 3px; text-align: center; }
.pack-box .sub { font-size: 11.5px; }
.pack-box .btn { width: 100%; margin-top: 10px; padding: 10px 0; font-size: 13.5px; }
.pack-fig { /* 包图成品（assets/pack-*.png），版式同 Web2 包 */
  display: block; width: 72px; height: 108px; object-fit: contain; margin: 2px auto 9px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.5));
}
.dots { display: flex; gap: 5px; margin-top: 9px; }
.dots i { width: 16px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); }
.dots i.done { background: var(--gold); box-shadow: 0 0 6px rgba(227,179,76,.6); }
.buyrow { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qty button { width: 32px; height: 38px; background: rgba(255,255,255,.06); color: var(--txt); font-size: 17px; }
.qty b { min-width: 36px; text-align: center; font-size: 15px; }
.winner-wall { display: grid; gap: 8px; margin-top: 8px; }
.winner-empty { border: 1px dashed var(--line); border-radius: 12px; padding: 16px; text-align: center; color: var(--dim); font-size: 12.5px; line-height: 1.8; }

/* ---------- 精选卡面横滑 ---------- */
.showcase { display: flex; gap: 11px; overflow-x: auto; padding: 8px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.showcase::-webkit-scrollbar { display: none; }
.show-item { flex: none; width: 118px; scroll-snap-align: start; }
.show-item img {
  width: 118px; aspect-ratio: 3/4.3; object-fit: cover; object-position: 50% 14%; border-radius: 10px;
  border: 1px solid rgba(227,179,76,.4); box-shadow: 0 10px 22px rgba(0,0,0,.5);
}
.show-item figcaption { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--paper); }
.tierchip { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 99px; color: #171106; background: var(--r-C); white-space: nowrap; }
.tierchip.ur { background: linear-gradient(90deg, #ff9de2, #a678ff, #6ac8ff); color: #fff; }
.tierchip.ssr { background: linear-gradient(90deg, #ffe9a3, #e09a26); }
.tierchip.sr { background: var(--r-SR); }
.tierchip.r { background: var(--r-R); }
.tierchip.c { background: var(--r-C); color: #101114; }

/* ---------- 玩法三步 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.step { border: 1px solid var(--line); background: rgba(0,0,0,.28); border-radius: 12px; padding: 11px 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.step .n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; margin-bottom: 7px;
  background: radial-gradient(circle at 35% 28%, #d8554c, #a52f28 72%); color: #ffe9b0;
  font-family: "Songti SC", serif; font-size: 14px; box-shadow: inset 0 0 0 1.5px rgba(255,215,106,.55), 0 3px 8px rgba(200,67,60,.3);
}
.step b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.step p { font-size: 11px; color: var(--mut); line-height: 1.65; }

/* ---------- 规则折叠区 ---------- */
.acc-item { position: relative; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; background: rgba(0,0,0,.26); overflow: hidden; }
.acc-tgl { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.acc-head {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 13px; cursor: pointer;
  font-family: "Songti SC", "STSong", serif; font-size: 15px; letter-spacing: 1px; color: var(--paper); user-select: none;
}
.acc-head:active { background: rgba(227,179,76,.05); }
.acc-arrow { width: 9px; height: 9px; flex: none; margin-left: 10px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg) translate(-1px,-1px); transition: transform .3s ease; }
.acc-tgl:checked + .acc-head { color: var(--gold2); }
.acc-tgl:checked + .acc-head .acc-arrow { transform: rotate(225deg) translate(-1px,-1px); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .5s ease; }
.acc-tgl:checked ~ .acc-body { max-height: 1600px; }
.acc-pad { padding: 1px 13px 13px; border-top: 1px dashed rgba(227,179,76,.16); }

/* ---------- 卡包（撕包舞台） ---------- */
.packstage { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1 0 auto; width: 100%; padding: 8px 0 2px; }
.packwrap { --pw: min(420px, 88vw, 33vh); position: relative; width: var(--pw); height: calc(var(--pw) * 1289 / 860); user-select: none; cursor: pointer; filter: drop-shadow(0 calc(var(--pw) * .12) calc(var(--pw) * .16) rgba(0,0,0,.55)); transition: transform .95s cubic-bezier(.6,.05,.3,1); }
.packwrap.disabled { opacity: .5; pointer-events: none; }
.pouch { /* 包身：实拍成品包图（RGBA），锯齿轮廓由图本身 alpha 提供，不再叠 CSS 裁切 */
  position: absolute; inset: 0;
  background: url(../assets/pack-silver.png) center / 100% 100% no-repeat;
  transition: filter .95s ease;
}
.packwrap.gold .pouch { background-image: url(../assets/pack-gold.png); }
.pouch .p-kind { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.packwrap .burst {
  position: absolute; left: 50%; top: 40%; width: calc(var(--pw) * 2.297); height: calc(var(--pw) * 2.297); transform: translate(-50%, -50%) scale(.2);
  border-radius: 50%; pointer-events: none; opacity: 0; z-index: 2;
}
.packwrap.open .burst { animation: burst .8s ease-out forwards; }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.15); } }

/* ---------- 开包演出 v2（暗场蓄势 → 白光爆开 → 报幕 → 揭晓；口径同 opening-demo-v2） ---------- */
.stage.fx-on .packstage { position: relative; z-index: 3; }
.stage.fx-on #revealRow { position: relative; z-index: 3; }
.stage.fx-on .close-x { z-index: 9; }
/* 蓄势：包缩到中央压暗成黑金调 + 金晕呼吸 + 包体抖动递增 */
.packwrap.charging { transform: scale(.92); animation: chargeShakeWrap 2.9s linear both; will-change: transform; }
.packwrap.charging::before {
  content: ""; position: absolute; inset: -8% -12%; border-radius: 50%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,196,64,.5), rgba(227,179,76,.16) 55%, transparent 72%);
  filter: blur(12px); animation: fxBreathe 1.5s ease-in-out infinite alternate; will-change: opacity;
}
@keyframes fxBreathe { from { opacity: .32; } to { opacity: .78; } }
.packwrap.charging .pouch { filter: brightness(.4) contrast(1.18) saturate(.72) sepia(.38) drop-shadow(0 0 26px rgba(255,190,60,.45)); }
.packwrap.charging:not(.gold) .pouch { filter: brightness(.34) contrast(1.24) saturate(.3) drop-shadow(0 0 30px rgba(255,196,64,.55)); }
@keyframes chargeShakeWrap {
  0% { transform: scale(.92) translate(0.00px,0.00px) rotate(0.00deg); }
  4% { transform: scale(.92) translate(0.26px,-0.33px) rotate(0.06deg); }
  8% { transform: scale(.92) translate(-0.50px,0.31px) rotate(-0.24deg); }
  12% { transform: scale(.92) translate(0.66px,-0.27px) rotate(0.10deg); }
  16% { transform: scale(.92) translate(-0.71px,0.20px) rotate(0.20deg); }
  20% { transform: scale(.92) translate(0.63px,-0.12px) rotate(-0.26deg); }
  24% { transform: scale(.92) translate(-0.40px,0.01px) rotate(-0.05deg); }
  28% { transform: scale(.92) translate(0.05px,0.12px) rotate(0.34deg); }
  32% { transform: scale(.92) translate(0.38px,-0.26px) rotate(-0.18deg); }
  36% { transform: scale(.92) translate(-0.79px,0.40px) rotate(-0.28deg); }
  40% { transform: scale(.92) translate(1.10px,-0.54px) rotate(0.40deg); }
  44% { transform: scale(.92) translate(-1.23px,0.65px) rotate(0.04deg); }
  48% { transform: scale(.92) translate(1.12px,-0.74px) rotate(-0.50deg); }
  52% { transform: scale(.92) translate(-0.74px,0.77px) rotate(0.29deg); }
  56% { transform: scale(.92) translate(0.16px,-0.76px) rotate(0.37deg); }
  60% { transform: scale(.92) translate(0.55px,0.68px) rotate(-0.59deg); }
  64% { transform: scale(.92) translate(-1.25px,-0.53px) rotate(-0.01deg); }
  68% { transform: scale(.92) translate(1.78px,0.33px) rotate(0.69deg); }
  72% { transform: scale(.92) translate(-2.01px,-0.07px) rotate(-0.46deg); }
  76% { transform: scale(.92) translate(1.85px,-0.23px) rotate(-0.46deg); }
  80% { transform: scale(.92) translate(-1.27px,0.55px) rotate(0.83deg); }
  84% { transform: scale(.92) translate(0.36px,-0.87px) rotate(-0.05deg); }
  88% { transform: scale(.92) translate(0.73px,1.16px) rotate(-0.90deg); }
  92% { transform: scale(.92) translate(-1.80px,-1.40px) rotate(0.67deg); }
  96% { transform: scale(.92) translate(2.63px,1.56px) rotate(0.54deg); }
  100% { transform: scale(.92) translate(-3.00px,-1.62px) rotate(-1.12deg); }
}
/* 桌面端（≥1024px）蓄势抖动放大：大屏上 ±3px 看不见，位移 ×2.2（峰值 6.6px）、旋转 ×1.6（峰值 1.79°），递增节奏同移动端 */
@media (min-width: 1024px) {
@keyframes chargeShakeWrap {
  0% { transform: scale(.92) translate(0.00px,0.00px) rotate(0.00deg); }
  4% { transform: scale(.92) translate(0.57px,-0.73px) rotate(0.10deg); }
  8% { transform: scale(.92) translate(-1.10px,0.68px) rotate(-0.38deg); }
  12% { transform: scale(.92) translate(1.45px,-0.59px) rotate(0.16deg); }
  16% { transform: scale(.92) translate(-1.56px,0.44px) rotate(0.32deg); }
  20% { transform: scale(.92) translate(1.39px,-0.26px) rotate(-0.42deg); }
  24% { transform: scale(.92) translate(-0.88px,0.02px) rotate(-0.08deg); }
  28% { transform: scale(.92) translate(0.11px,0.26px) rotate(0.54deg); }
  32% { transform: scale(.92) translate(0.84px,-0.57px) rotate(-0.29deg); }
  36% { transform: scale(.92) translate(-1.74px,0.88px) rotate(-0.45deg); }
  40% { transform: scale(.92) translate(2.42px,-1.19px) rotate(0.64deg); }
  44% { transform: scale(.92) translate(-2.71px,1.43px) rotate(0.06deg); }
  48% { transform: scale(.92) translate(2.46px,-1.63px) rotate(-0.80deg); }
  52% { transform: scale(.92) translate(-1.63px,1.69px) rotate(0.46deg); }
  56% { transform: scale(.92) translate(0.35px,-1.67px) rotate(0.59deg); }
  60% { transform: scale(.92) translate(1.21px,1.50px) rotate(-0.94deg); }
  64% { transform: scale(.92) translate(-2.75px,-1.17px) rotate(-0.02deg); }
  68% { transform: scale(.92) translate(3.92px,0.73px) rotate(1.10deg); }
  72% { transform: scale(.92) translate(-4.42px,-0.15px) rotate(-0.74deg); }
  76% { transform: scale(.92) translate(4.07px,-0.51px) rotate(-0.74deg); }
  80% { transform: scale(.92) translate(-2.79px,1.21px) rotate(1.33deg); }
  84% { transform: scale(.92) translate(0.79px,-1.91px) rotate(-0.08deg); }
  88% { transform: scale(.92) translate(1.61px,2.55px) rotate(-1.44deg); }
  92% { transform: scale(.92) translate(-3.96px,-3.08px) rotate(1.07deg); }
  96% { transform: scale(.92) translate(5.79px,3.43px) rotate(0.86deg); }
  100% { transform: scale(.92) translate(-6.60px,-3.56px) rotate(-1.79deg); }
}
}

/* 爆开：包体爆闪消散（白光爆闪在 #ofxFlash 层） */
.packwrap.bursting .pouch { animation: packBurstFx .5s ease-in forwards; }
@keyframes packBurstFx {
  0% { transform: scale(1); opacity: 1; }
  35% { transform: scale(1.06); filter: brightness(1.9) drop-shadow(0 0 44px rgba(255,220,120,.95)); opacity: 1; }
  100% { transform: scale(1.34) rotate(2.5deg); filter: brightness(2.6); opacity: 0; }
}
/* 暗场 */
#ofxVeil { position: fixed; inset: 0; z-index: 1; opacity: 0; pointer-events: none; transition: opacity .95s ease;
  background: radial-gradient(115% 88% at 50% 42%, #131711 0%, #060706 58%, #000 100%); }
#ofxVeil.on { opacity: 1; }
#ofxVeil .smoke { position: absolute; border-radius: 50%; filter: blur(38px); opacity: .5; }
#ofxVeil .smoke.s1 { width: 520px; height: 300px; left: -120px; top: 16%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(96,128,92,.34), transparent 70%); animation: fxDrift1 7s ease-in-out infinite alternate; }
#ofxVeil .smoke.s2 { width: 560px; height: 330px; right: -140px; top: 48%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(80,110,84,.28), transparent 70%); animation: fxDrift2 9s ease-in-out infinite alternate; }
#ofxVeil .smoke.s3 { width: 420px; height: 240px; left: 22%; bottom: -70px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(140,120,60,.16), transparent 70%); animation: fxDrift1 11s ease-in-out infinite alternate-reverse; }
@keyframes fxDrift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(56px,-26px) scale(1.14); } }
@keyframes fxDrift2 { from { transform: translate(0,0) scale(1.08); } to { transform: translate(-48px,20px) scale(.96); } }
/* 爆光：放射光 + 碎片 + 发光卡背轮廓 + 满屏白光爆闪 */
#ofxRays { position: fixed; z-index: 2; left: 50%; top: 42%; width: 150vmax; height: 150vmax; border-radius: 50%;
  transform: translate(-50%,-50%) scale(.08); opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255,206,92,.125) 0deg 5deg, transparent 5deg 13deg);
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 0%, transparent 62%);
          mask-image: radial-gradient(50% 50% at 50% 50%, #000 0%, transparent 62%); }
#ofxRays.go { transition: transform .8s cubic-bezier(.2,.7,.3,1), opacity .5s ease; transform: translate(-50%,-50%) scale(1) rotate(9deg); opacity: 1; }
#ofxRays.out { transition: opacity 1.1s ease, transform 1.1s ease; opacity: 0; transform: translate(-50%,-50%) scale(1.12) rotate(14deg); }
#ofxShards { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.ofx-shard { position: absolute; left: 50%; top: 42%; border-radius: 1.5px;
  background: linear-gradient(135deg, #fff3c4, #ffc94d 55%, #b9821e); box-shadow: 0 0 7px rgba(255,200,80,.85); }
#ofxSil { position: fixed; z-index: 2; left: 50%; top: 42%; width: 148px; height: 214px; margin-left: -74px; margin-top: -107px;
  opacity: 0; transform: translateY(52px) scale(.92); pointer-events: none; }
#ofxSil.rise { transition: transform .85s cubic-bezier(.2,.8,.3,1.05), opacity .5s ease; opacity: 1; transform: translateY(0) scale(1); }
#ofxSil.fade { transition: opacity .45s ease, transform .45s ease; opacity: 0; transform: translateY(-8px) scale(1.05); }
#ofxSil .cardback { box-shadow: inset 0 0 0 2px rgba(255,215,106,.9), inset 0 0 0 6px #0c0b09, inset 0 0 0 7.5px rgba(227,179,76,.5),
  0 0 44px rgba(255,196,64,.75), 0 0 110px rgba(255,180,50,.4); }
#ofxFlash { position: fixed; inset: -25%; z-index: 7; pointer-events: none; opacity: 0; transform-origin: 50% 42%;
  background: radial-gradient(42% 42% at 50% 42%, #fff 0%, #fff 52%, rgba(255,255,255,.92) 78%, rgba(255,246,220,.55) 92%, transparent 100%); }
#ofxFlash.go { animation: whiteBlast .3s ease-out forwards; }
@keyframes whiteBlast { 0% { opacity: 0; transform: scale(.18); } 22% { opacity: 1; } 55% { opacity: 1; transform: scale(1.02); } 100% { opacity: 0; transform: scale(1.3); } }
/* 报幕 */
#ofxHeadline { position: fixed; z-index: 6; left: 0; right: 0; top: 36%; text-align: center; pointer-events: none;
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  opacity: 0; transform: scale(.84); filter: blur(5px); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.3,1.2), filter .45s ease; }
#ofxHeadline.show { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 0 26px rgba(255,190,60,.35)); }
#ofxHeadline .hl-small { font-size: 17px; letter-spacing: 8px; text-indent: 8px; color: #d8c491; margin-bottom: 10px; }
#ofxHeadline .hl-big { font-size: min(52px, 11.5vw); letter-spacing: 4px; text-indent: 4px; font-weight: 700; white-space: nowrap;
  background: linear-gradient(180deg, #fff0bc 5%, #ffd76a 42%, #c8922a 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
/* 跳过 */
#ofxSkip { position: fixed; z-index: 8; right: 22px; bottom: 40px; display: none;
  font-size: 14px; color: rgba(243,233,210,.8); background: rgba(255,255,255,.06);
  border: 1px solid rgba(243,233,210,.3); border-radius: 999px; padding: 8px 20px; cursor: pointer; }
.packhint { color: var(--mut); font-size: 12px; margin-top: 12px; text-align: center; line-height: 1.7; }
.packhint b { color: var(--gold2); }

/* ---------- 翻卡 ---------- */
.reveal-row { display: flex; flex-wrap: nowrap; gap: 8px; justify-content: center; margin-top: 16px; }
#stage .reveal-row { width: min(680px, calc(100vw - 24px)); align-self: center; }
#stage .reveal-row .flipw { width: calc((100% - 32px) / 5); height: auto; aspect-ratio: 148 / 214; }
.stage.revealed .packstage { display: none; }
.stage.revealed .inner { justify-content: center; }
.flipw { width: 148px; height: 214px; perspective: 1000px; flex: none; cursor: pointer; }
.flipin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.7,.3,1.2); }
.flipw.showback .flipin { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 13px; overflow: hidden; }
.face.back { transform: rotateY(180deg); }
.flipw.dealt { animation: deal .45s ease both; }
@keyframes deal { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; } }
/* 本包最佳卡（SR 以上）压轴翻开时的金色光环收尾 */
@keyframes bestglow { 0% { box-shadow: 0 0 0 0 rgba(255,206,92,0); } 35% { box-shadow: 0 0 36px 8px rgba(255,206,92,.9); } 100% { box-shadow: 0 0 16px 3px rgba(255,206,92,.5); } }
.flipw.bestglow { z-index: 3; }
.flipw.bestglow .flipin { border-radius: 13px; animation: bestglow 1.15s ease-out .3s both; }

/* 卡背：多环描金 + 菱纹暗花 */
.cardback {
  background:
    radial-gradient(85% 62% at 50% 38%, rgba(227,179,76,.15), transparent 65%),
    repeating-conic-gradient(from 0deg at 50% 42%, rgba(227,179,76,.06) 0 10deg, transparent 10deg 24deg),
    linear-gradient(165deg, #1e1c17, #0d0c0a 72%);
  box-shadow: inset 0 0 0 2px rgba(227,179,76,.75), inset 0 0 0 6px #0c0b09, inset 0 0 0 7.5px rgba(227,179,76,.38), inset 0 0 46px rgba(0,0,0,.6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  container-type: inline-size;
}
.cardback::before {
  content: ""; position: absolute; inset: 0; opacity: .15; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23e3b34c' stroke-opacity='.5'%3E%3Cpath d='M28 4 L52 28 L28 52 L4 28 Z'/%3E%3Ccircle cx='28' cy='28' r='7'/%3E%3C/g%3E%3C/svg%3E");
}
.cardback .cb-seal {
  width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255,215,106,.8); display: grid; place-items: center;
  font-family: "Songti SC", serif; font-size: 25px; color: var(--gold2);
  background: radial-gradient(circle at 35% 30%, rgba(255,240,190,.32), rgba(227,179,76,.06) 62%);
  box-shadow: 0 0 20px rgba(227,179,76,.35), inset 0 0 12px rgba(0,0,0,.45);
}
.cardback .cb-name { font-family: "Songti SC", serif; letter-spacing: 6px; text-indent: 6px; font-size: 14px; color: var(--paper); }
.cardback .cb-sub { font-size: 8.5px; letter-spacing: 3px; color: var(--dim); }
/* 卡背文字随卡宽缩放（cqw 以 .cardback 自身宽度为基准）：小卡上整行英文也不溢出 */
.cardback .cb-seal { width: min(58px, 40cqw); height: min(58px, 40cqw); font-size: min(25px, 17cqw); }
.cardback .cb-name { letter-spacing: min(6px, 4cqw); text-indent: min(6px, 4cqw); font-size: min(14px, 9.5cqw); }
.cardback .cb-sub { font-size: min(7.5px, 5cqw); letter-spacing: min(1.8px, 1cqw); text-indent: min(1.8px, 1cqw); white-space: nowrap; max-width: calc(100% - 10px); }

/* ---------- 卡面：档位材质框 + 内衬斜射光 + 纹理层 ---------- */
.gcard { --artglow: rgba(255,255,255,.10); position: relative; border-radius: 13px; padding: 3px; }
.gcard .inner { position: relative; border-radius: 10px; overflow: hidden; height: 100%; background: linear-gradient(168deg, #1e1f24, #101114); display: flex; flex-direction: column; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.gcard .inner::before { /* 菱纹暗花纹理层 */
  content: ""; position: absolute; inset: 0; opacity: .06; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23e3b34c' stroke-opacity='.5'%3E%3Cpath d='M28 4 L52 28 L28 52 L4 28 Z'/%3E%3Ccircle cx='28' cy='28' r='7'/%3E%3C/g%3E%3C/svg%3E");
}
.gcard.t-C { background: linear-gradient(160deg, #c3c9d2, #62676f 55%, #9aa1ab); box-shadow: 0 5px 16px rgba(150,158,170,.22); }
.gcard.t-C .inner { background: linear-gradient(168deg, #24262c, #131418); }
.gcard.t-UC { background: linear-gradient(160deg, #d6dade, #767c84 55%, #a9aeb4); box-shadow: 0 5px 16px rgba(150,158,170,.22); }
.gcard.t-UC .inner { background: linear-gradient(168deg, #26282c, #141518); }
.gcard.t-R { background: linear-gradient(160deg, #f6cd9e, #b0703a 52%, #7c4a20 78%, #e0a266); box-shadow: 0 6px 20px rgba(200,130,70,.35); }
.gcard.t-R .inner { background: linear-gradient(168deg, #2b2118, #16110c), repeating-linear-gradient(0deg, rgba(240,190,130,.05) 0 2px, transparent 2px 5px); background-blend-mode: lighten; }
.gcard.t-SR { --artglow: rgba(178,132,255,.24); background: linear-gradient(160deg, #e3c8ff, #9a63f0 50%, #5f37a8 78%, #c9a2ff); box-shadow: 0 6px 22px rgba(160,110,255,.40); }
.gcard.t-SR .inner { background: linear-gradient(160deg, #2a1e3e, #150f22 65%), linear-gradient(115deg, transparent 40%, rgba(170,120,255,.16) 50%, transparent 62%); background-blend-mode: lighten; }
.gcard.t-SSR { --artglow: rgba(255,182,62,.26); background: linear-gradient(160deg, #fff0b3, #e09a26 42%, #8a5a12 72%, #f2cd7e); box-shadow: 0 8px 28px rgba(255,182,62,.45); }
.gcard.t-SSR .inner { background: linear-gradient(160deg, #33270e, #171106 65%), linear-gradient(115deg, transparent 35%, rgba(255,182,62,.18) 50%, transparent 65%); background-blend-mode: lighten; }
.gcard.t-UR { --artglow: rgba(255,120,200,.24); background: linear-gradient(120deg, #ff9de2, #a678ff 38%, #6ac8ff 74%, #ffd76a); box-shadow: 0 8px 28px rgba(224,106,200,.45); }
.gcard.t-UR .inner { background: radial-gradient(120% 90% at 50% 108%, rgba(255,96,180,.26), transparent 55%), linear-gradient(168deg, #2b1424, #130a12 65%); }
.gcard.t-LR { --artglow: rgba(255,224,130,.22); background: linear-gradient(120deg, #f6d365, #fda085, #a18cd1, #84fab0, #8fd3f4, #f6d365); background-size: 300% 300%; animation: lrflow 6s ease infinite; box-shadow: 0 9px 32px rgba(255,205,90,.5); }
.gcard.t-LR .inner { background: linear-gradient(160deg, rgba(34,28,54,.94), rgba(13,11,25,.97) 65%), linear-gradient(115deg, transparent 30%, rgba(255,255,255,.14) 50%, transparent 70%); }
.gcard.t-TR { --artglow: rgba(201,138,75,.24); background: linear-gradient(160deg, #eec088, #8a5a28 55%, #c98a4b); box-shadow: 0 6px 20px rgba(201,138,75,.35); }
.gcard.t-TR .inner { background: linear-gradient(160deg, #2c2012, #161006 65%), linear-gradient(115deg, transparent 38%, rgba(201,138,75,.15) 50%, transparent 62%); background-blend-mode: lighten; }
@keyframes lrflow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.gcard .art {
  position: relative; height: 100px; flex: none; overflow: hidden; z-index: 1;
  background:
    radial-gradient(82% 92% at 50% 0%, var(--artglow), transparent 62%),
    radial-gradient(58% 52% at 16% 80%, rgba(0,0,0,.5), transparent 70%),
    radial-gradient(52% 48% at 86% 72%, rgba(0,0,0,.42), transparent 70%),
    linear-gradient(170deg, #322e26, #14120f);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.gcard .art::before { /* 水墨飞白 */
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none;
  background:
    radial-gradient(30% 18% at 24% 30%, rgba(255,255,255,.06), transparent 70%),
    radial-gradient(36% 22% at 76% 58%, rgba(255,255,255,.045), transparent 70%),
    radial-gradient(20% 12% at 55% 82%, rgba(255,255,255,.05), transparent 70%);
}
.gcard .art img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.gcard .inner.fullart { padding: 0; position: absolute; inset: 0; height: auto; min-height: 0; }
.gcard .fullface { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; z-index: 1; }
.gcard .inner.fullart .bigchar { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; font-family: "Songti SC", serif; font-size: 52px; color: rgba(236,227,203,.92); }
.gcard .fincard { box-shadow: inset 0 0 0 1px rgba(255,215,130,.45), inset 0 0 22px rgba(0,0,0,.35); }
.reveal-row .gcard:not(.fin) { padding: 0; background: none; border-radius: 13px; box-shadow: 0 12px 28px rgba(0,0,0,.6); }
.gcard .inner.barecard { border-radius: 13px; box-shadow: none; }
.reveal-row .gcard .fincard { border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255,222,140,.85), inset 0 0 0 3px rgba(12,10,6,.72), inset 0 0 0 4.5px rgba(255,215,130,.4), inset 0 0 30px rgba(0,0,0,.42); }
.gcard .fin-frame { position: absolute; inset: 4.5px; z-index: 5; pointer-events: none; }
.gcard .fin-frame .fc { position: absolute; width: 17px; height: 17px; border: 0 solid rgba(255,222,140,.95); filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.gcard .fin-frame .fc::after { content: ""; position: absolute; width: 5px; height: 5px; background: rgba(255,222,140,.95); transform: rotate(45deg); }
.gcard .fin-frame .tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 7px; }
.gcard .fin-frame .tl::after { top: 2.5px; left: 2.5px; }
.gcard .fin-frame .tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 7px; }
.gcard .fin-frame .tr::after { top: 2.5px; right: 2.5px; }
.gcard .fin-frame .bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 7px; }
.gcard .fin-frame .bl::after { bottom: 2.5px; left: 2.5px; }
.gcard .fin-frame .br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 7px; }
.gcard .fin-frame .br::after { bottom: 2.5px; right: 2.5px; }
.gcard .fin-name::before, .gcard .fin-name::after { content: ""; position: absolute; top: 50%; width: 5px; height: 5px; background: rgba(232,184,75,.9); transform: translateY(-50%) rotate(45deg); }
.gcard .fin-name::before { left: -3px; } .gcard .fin-name::after { right: -3px; }
.gcard .fin-name { position: absolute; top: 7px; left: 46%; transform: translateX(-50%); z-index: 6; max-width: 70%; background: linear-gradient(180deg, rgba(38,30,16,.92), rgba(16,13,8,.94)); border: 1px solid rgba(232,184,75,.75); border-radius: 4px; padding: 2.5px 10px 3.5px; box-shadow: 0 2px 8px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.6); }
.gcard .fin-name span { font-family: "Songti SC", "Noto Serif CJK SC", serif; font-size: 14.5px; font-weight: 700; letter-spacing: 2.5px; color: #f3e2b3; white-space: nowrap; }
.gcard .fincard .gem { top: 6px; right: 6px; }
.gcard .fin-stats { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 15px 8px 6px; background: linear-gradient(180deg, transparent, rgba(8,8,10,.88) 42%); border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; }
.gcard .fin-stats::before { content: ""; position: absolute; left: 8px; right: 8px; top: 12px; height: 1px; background: linear-gradient(90deg, transparent, rgba(232,184,75,.65), transparent); }
.gcard .fin-atk, .gcard .fin-def { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.gcard .fin-atk { color: #ffb37a; } .gcard .fin-def { color: #7adbe8; }
.gcard .fin-atk i, .gcard .fin-def i { font-style: normal; font-size: 9px; font-weight: 600; letter-spacing: 1px; margin-right: 3px; opacity: .85; }
.gcard .fin-mid { font-size: 9px; letter-spacing: 1px; color: rgba(233,226,208,.75); white-space: nowrap; }
.gcard .art .bigchar {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  font-family: "Songti SC", serif; font-size: 52px; color: rgba(236,227,203,.92);
  text-shadow: 0 4px 22px rgba(0,0,0,.65), 0 0 36px var(--artglow);
}
.gcard .art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 3; background: linear-gradient(180deg, transparent, rgba(10,10,12,.92)); }
.gcard .gem {
  position: absolute; top: 6px; right: 6px; z-index: 5; font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 2.5px 7px; border-radius: 99px; color: #14100a; background: var(--r-C);
  box-shadow: 0 2px 7px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.45);
}
.t-UC .gem { background: var(--r-UC); } .t-R .gem { background: var(--r-R); } .t-SR .gem { background: var(--r-SR); }
.t-SSR .gem { background: var(--r-SSR); } .t-UR .gem { background: linear-gradient(90deg, #ff9de2, #a678ff, #6ac8ff); color: #fff; }
.t-LR .gem { background: linear-gradient(90deg, #f6d365, #a18cd1, #8fd3f4); color: #171106; }
.t-TR .gem { background: var(--r-TR); color: #fff; }
.gcard .ttl { position: relative; z-index: 2; font-family: "Songti SC", serif; font-size: 15.5px; font-weight: 700; text-align: center; padding: 6px 6px 0; line-height: 1.25; min-height: 26px; }
.gcard .chips { position: relative; z-index: 2; display: flex; justify-content: center; gap: 4px; margin-top: 3px; flex-wrap: wrap; padding: 0 4px; }
.chip { font-size: 9.5px; padding: 1.5px 6px; border-radius: 99px; border: 1px solid var(--line); color: var(--mut); }
.chip.fac-chan { color: var(--f-chan); border-color: rgba(87,168,216,.5); }
.chip.fac-jie { color: var(--f-jie); border-color: rgba(176,106,200,.5); }
.chip.fac-shang { color: var(--f-shang); border-color: rgba(216,87,79,.5); }
.chip.fac-zhou { color: var(--f-zhou); border-color: rgba(216,168,87,.5); }
.gcard .stats { position: relative; z-index: 2; margin-top: auto; display: flex; gap: 5px; padding: 5px 6px 6px; }
.gcard .stat { flex: 1; text-align: center; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); border-radius: 7px; padding: 3px 0 4px; }
.gcard .stat span { display: block; font-size: 8.5px; line-height: 1.2; color: var(--dim); letter-spacing: 1px; }
.gcard .stat b { font-size: 13.5px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gcard .stat:first-child b { color: #ffb37a; }
.gcard .stat:last-child b { color: #7adbe8; }
.gcard .count {
  position: absolute; left: 6px; top: 6px; z-index: 5; background: rgba(0,0,0,.68); color: var(--gold2);
  font-size: 10.5px; padding: 2px 7px; border-radius: 99px; border: 1px solid rgba(227,179,76,.45);
}
.holo { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(255,120,220,.35) 45%, rgba(120,200,255,.35) 55%, transparent 70%);
  background-size: 250% 250%; animation: holo 3.2s ease-in-out infinite alternate; }
@keyframes holo { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.t-SR .holo, .t-SSR .holo, .t-UR .holo, .t-LR .holo { opacity: 1; }
.gcard.locked-sil .inner { filter: grayscale(1) brightness(.48); }
.gcard .sil-tag { position: absolute; inset: auto 0 34% 0; text-align: center; z-index: 6; color: rgba(233,226,208,.75); font-size: 11px; letter-spacing: 3px; }
.swap-badge {
  position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); top: 40px;
  background: linear-gradient(90deg, #8a5a28, #c98a4b); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; box-shadow: 0 4px 14px rgba(0,0,0,.5); white-space: nowrap;
}
.pity-badge { position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); top: 62px;
  background: linear-gradient(90deg, #a52f28, #c8433c); color: #ffe9b0; font-size: 10.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; white-space: nowrap; }

/* ---------- 图鉴 ---------- */
.filters { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button { padding: 6px 13px; border-radius: 99px; background: rgba(255,255,255,.05); color: var(--mut); border: 1px solid var(--line); font-size: 12.5px; }
.filters button.on { color: #241a05; background: linear-gradient(160deg, #f0cd6e, #b9822a); border-color: transparent; font-weight: 700; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.album-grid .flipw { width: 100%; height: auto; aspect-ratio: 148/214; cursor: pointer; }
.album-grid .gcard .art { height: 44%; }
.album-grid .gcard .ttl { font-size: 12.5px; min-height: 21px; padding-top: 4px; }
.album-grid .gcard .stat b { font-size: 11.5px; }
.album-grid .gcard .art .bigchar { font-size: 36px; }
.completion { display: flex; align-items: center; gap: 12px; }
.completion .num { font-size: 25px; color: var(--gold2); font-weight: 800; white-space: nowrap; }
.completion .bar { flex: 1; }

/* ---------- 背包 ---------- */
.pack-list { display: grid; gap: 9px; margin-top: 10px; }
.pack-item { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(0,0,0,.28); }
.pack-item .mini-pack { /* 背包迷你包：成品包图缩略 */
  width: 36px; height: 54px; flex: none; display: block; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.45));
}
.pack-item .grow { flex: 1; }
.pack-item .grow b { font-size: 13.5px; }
.pack-item .grow .sub { font-size: 11px; }
.pack-item .btn { padding: 8px 14px; font-size: 13px; }
/* 未开包分列归属：左列免费·银箔包、右列付费·金箔包，与领包面板上半 1fr/1fr 两半对齐；某列为空就留空，不许另一类补位 */
.pack-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.pack-col { display: grid; gap: 9px; align-content: start; }
#unopenedHome .pack-cols { margin-top: 10px; }
#bagPacks > .pack-cols { grid-column: 1 / -1; }
@media (max-width: 1023px) {
  /* 移动端上下顺排：免费列在上、付费列在下，不横向挤压 */
  .pack-cols { grid-template-columns: 1fr; }
}
.kv { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed rgba(227,179,76,.14); }
.kv:last-child { border-bottom: none; }
.kv b { font-variant-numeric: tabular-nums; }
.ticket-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ticket-chips span { background: rgba(227,179,76,.12); border: 1px solid rgba(227,179,76,.45); color: var(--gold2); font-size: 12px; padding: 3px 9px; border-radius: 8px; font-variant-numeric: tabular-nums; }

/* ---------- 对战 ---------- */
.subtabs { display: flex; gap: 7px; margin-bottom: 13px; }
.subtabs button { flex: 1; padding: 9px 0; border-radius: 11px; background: rgba(255,255,255,.05); color: var(--mut); border: 1px solid var(--line); font-size: 13.5px; }
.subtabs button.on { color: var(--gold2); border-color: rgba(227,179,76,.6); background: rgba(227,179,76,.09); font-weight: 700; }
.subview { display: none; } .subview.active { display: block; }
.team-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.team-slot { border: 1.5px dashed rgba(227,179,76,.3); border-radius: 12px; min-height: 118px; display: grid; place-items: center; color: var(--dim); font-size: 12px; text-align: center; padding: 6px; cursor: pointer; background: rgba(0,0,0,.22); }
.team-slot.filled { border-style: solid; border-color: transparent; padding: 0; overflow: hidden; background: none; }
.team-slot .flipw { width: 100%; height: auto; aspect-ratio: 148/214; }
.team-power { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.team-power b { font-size: 26px; color: var(--gold2); font-variant-numeric: tabular-nums; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.pick-grid .flipw { width: 100%; height: auto; aspect-ratio: 148/214; }
.pick-grid .picked { outline: 2.5px solid var(--gold); outline-offset: -2px; border-radius: 13px; }
.counter-note { font-size: 12px; color: var(--mut); line-height: 1.8; margin-top: 8px; }
.counter-note .win { color: var(--jade); }
.history-list { display: grid; gap: 8px; margin-top: 8px; }
.history-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: rgba(0,0,0,.24); }
.history-item .res { font-weight: 800; font-size: 12px; padding: 2.5px 9px; border-radius: 99px; }
.res.w { background: rgba(67,180,143,.16); color: #6fe3bd; border: 1px solid rgba(67,180,143,.5); }
.res.l { background: rgba(200,67,60,.14); color: #ff9a92; border: 1px solid rgba(200,67,60,.5); }
.history-item .grow { flex: 1; }
.history-item time { color: var(--dim); font-size: 11px; }

/* ---------- Boss ---------- */
.boss-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px; margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(26,27,33,.92), rgba(14,14,17,.92));
  box-shadow: 0 10px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
}
#bossList .boss-card:nth-child(3) {
  border-color: rgba(255,182,62,.5);
  background: radial-gradient(90% 120% at 50% -20%, rgba(200,67,60,.20), transparent 60%), linear-gradient(180deg, rgba(43,26,22,.92), rgba(16,12,12,.94));
  box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 0 24px rgba(200,67,60,.16), inset 0 1px 0 rgba(255,215,106,.12);
}
.boss-head { display: flex; gap: 12px; align-items: center; }
.boss-ava {
  width: 62px; height: 62px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-family: "Songti SC", serif; font-size: 26px; color: var(--gold2);
  background:
    radial-gradient(85% 95% at 50% 12%, rgba(255,255,255,.10), transparent 55%),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(227,179,76,.07) 0 12deg, transparent 12deg 26deg),
    radial-gradient(90% 100% at 50% 0%, #3d3358, #191527);
  border: 1px solid rgba(183,140,255,.45);
  box-shadow: inset 0 0 16px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.14), 0 5px 13px rgba(0,0,0,.45);
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}
#bossList .boss-card:nth-child(1) .boss-ava { background: radial-gradient(85% 95% at 50% 12%, rgba(255,255,255,.10), transparent 55%), repeating-conic-gradient(from 0deg at 50% 50%, rgba(111,227,189,.08) 0 12deg, transparent 12deg 26deg), radial-gradient(90% 100% at 50% 0%, #1f4038, #0f1f1b); border-color: rgba(67,180,143,.5); }
#bossList .boss-card:nth-child(3) .boss-ava { background: radial-gradient(85% 95% at 50% 12%, rgba(255,220,150,.16), transparent 55%), repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,182,62,.10) 0 12deg, transparent 12deg 26deg), radial-gradient(90% 100% at 50% 0%, #5c231c, #241010); border-color: rgba(255,182,62,.65); box-shadow: inset 0 0 16px rgba(0,0,0,.55), 0 0 18px rgba(255,150,60,.3); }
.boss-ava:has(img) { padding: 0; overflow: hidden; }
.boss-ava img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 18%; border-radius: 14px; }
.boss-head h3 { font-size: 15.5px; }
.boss-lineup { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.vs-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; margin-top: 10px; }
.vs-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: rgba(0,0,0,.26); }
.vs-box h4 { font-size: 12.5px; color: var(--mut); margin-bottom: 7px; font-weight: 500; }
.vs-mid { display: grid; place-items: center; font-family: "Songti SC", serif; font-size: 19px; color: #e0554c; font-weight: 700; text-shadow: 0 0 14px rgba(200,67,60,.4); }
.breakdown { font-size: 12px; line-height: 1.85; }
.breakdown .row { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(227,179,76,.14); padding: 3px 0; }
.breakdown .row.total { border-bottom: none; font-weight: 700; color: var(--gold2); }
.result-banner { text-align: center; padding: 16px 10px 6px; }
.result-banner .win { font-family: "Songti SC", serif; font-size: 32px; letter-spacing: 6px; color: var(--gold2); text-shadow: 0 2px 20px rgba(227,179,76,.55); }
.result-banner .lose { font-family: "Songti SC", serif; font-size: 32px; letter-spacing: 6px; color: #8d97a8; }
table.board { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
table.board th, table.board td { padding: 7px 5px; border-bottom: 1px solid rgba(227,179,76,.09); text-align: left; }
table.board th { color: var(--mut); font-weight: 500; font-size: 11.5px; }
table.board td:last-child, table.board th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.board tr.me td { color: var(--gold2); font-weight: 700; background: rgba(227,179,76,.07); }

/* ---------- 卡详情 / 法宝装配 ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; }
.modal.open { display: block; }
.modal .mask { position: absolute; inset: 0; background: rgba(4,4,6,.74); backdrop-filter: blur(3px); }
.modal .sheet {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto; background: linear-gradient(180deg, #1e1d21, #101012);
  border-radius: 20px 20px 0 0; border: 1px solid rgba(227,179,76,.3); border-bottom: none; padding: 18px 16px 26px;
  box-shadow: 0 -14px 44px rgba(0,0,0,.6);
  animation: sheetup .3s ease;
}
.modal .sheet::before {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 42px; height: 4px; border-radius: 99px; background: rgba(227,179,76,.4);
}
@keyframes sheetup { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.modal .sheet .flipw { width: 168px; height: 243px; margin: 0 auto; }
.slot-row { display: grid; gap: 9px; margin-top: 10px; }
.slot-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(0,0,0,.28); }
.slot-box .hd { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.fit-fit { color: #6fe3bd; } .fit-clash { color: #ff9a92; } .fit-neutral { color: var(--mut); }
.treasure-pick { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.treasure-pick button { padding: 6px 11px; border-radius: 99px; font-size: 12px; background: rgba(255,255,255,.06); color: var(--txt); border: 1px solid var(--line); }
.treasure-pick button.on { border-color: var(--gold); color: var(--gold2); background: rgba(227,179,76,.12); }
.sig-mark { color: var(--gold2); font-size: 11px; border: 1px solid rgba(227,179,76,.55); padding: 1.5px 7px; border-radius: 99px; }

/* ---------- 开包舞台（全屏层） ---------- */
.stage { position: fixed; inset: 0; z-index: 70; display: none; overflow-y: auto; overflow-x: hidden;
  background:
    radial-gradient(100% 55% at 50% -5%, rgba(227,179,76,.17) 0%, transparent 60%),
    radial-gradient(85% 50% at 50% 112%, rgba(200,67,60,.11) 0%, transparent 60%),
    linear-gradient(180deg, #12100d, #060708); }
.stage.open { display: block; }
.stage .inner { max-width: 480px; margin: 0 auto; padding: 22px 14px 40px; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.stage h2 { text-align: center; letter-spacing: 3px; font-size: 19px; color: var(--paper); }
.stage .close-x { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,.07); color: var(--txt); width: 34px; height: 34px; border-radius: 50%; font-size: 16px; z-index: 5; border: 1px solid rgba(227,179,76,.25); }

/* ---------- 底部导航 ---------- */
nav.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 50;
  display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(8,8,10,.95); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(227,179,76,.25); padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
}
nav.tabs button { background: none; color: var(--dim); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 0; }
nav.tabs button .ic { font-size: 19px; line-height: 1; font-family: "Songti SC", serif; }
nav.tabs button.on { color: var(--gold2); }
nav.tabs button.on .ic { text-shadow: 0 0 12px rgba(255,215,106,.55); }
.toast {
  position: fixed; left: 50%; bottom: 142px; transform: translateX(-50%) translateY(16px); z-index: 90;
  background: rgba(16,15,13,.97); border: 1px solid rgba(227,179,76,.55); color: var(--txt);
  padding: 10px 16px; border-radius: 12px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .3s ease; max-width: 86vw; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 文档入口（主页底部） ---------- */
.doc-entries { display: grid; gap: 9px; margin-top: 11px; }
.doc-entry {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; text-align: left;
  background: rgba(0,0,0,.26); color: var(--txt); box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.doc-entry:active { background: rgba(227,179,76,.06); }
.doc-entry-t b { display: block; font-family: "Songti SC", "STSong", serif; font-size: 15.5px; letter-spacing: 1px; color: var(--paper); }
.doc-entry-t small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--mut); }
.doc-arrow { transform: rotate(-45deg) translate(-1px,-1px); }

/* ---------- 文档页（白皮书 / 路线图 / FAQ） ---------- */
.doc-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
  padding: 8px 14px; border-radius: 99px; font-size: 13px; color: var(--gold2);
  background: rgba(227,179,76,.07); border: 1px solid rgba(227,179,76,.4);
}
.doc {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, rgba(26,27,33,.94), rgba(17,18,21,.94));
  border: 1px solid var(--line); border-radius: 16px; padding: 20px 16px 22px;
  box-shadow: 0 10px 26px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.045);
  font-size: 13.5px; line-height: 1.85; color: var(--txt);
}
.doc-title {
  font-size: 21px; letter-spacing: 1px; line-height: 1.5; color: var(--gold2);
  text-align: center; margin-bottom: 12px; text-shadow: 0 2px 14px rgba(227,179,76,.35);
}
.doc-intro { color: var(--mut); font-size: 12.5px; }
.doc p { margin: 9px 0; }
.doc b { color: var(--paper); }
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px;
  background: rgba(227,179,76,.1); border: 1px solid rgba(227,179,76,.25); border-radius: 5px; padding: 0 5px;
  color: var(--gold2); word-break: break-all;
}
.doc-h2 {
  font-size: 16.5px; letter-spacing: 1px; color: var(--paper); margin: 22px 0 6px;
  padding-top: 16px; border-top: 1px dashed rgba(227,179,76,.18);
}
.doc-h2::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 2px;
  background: linear-gradient(145deg, #d8554c, #a52f28); box-shadow: inset 0 0 0 1px rgba(255,215,106,.65);
  transform: rotate(45deg) translateY(-1px);
}
.doc > .doc-h2:first-of-type { border-top: none; padding-top: 2px; }
.doc-h3 { font-size: 14.5px; letter-spacing: .5px; color: var(--gold2); margin: 16px 0 4px; }
.doc-hr { border: none; border-top: 1px dashed rgba(227,179,76,.25); margin: 16px 0; }
.doc-list { margin: 8px 0 8px 4px; padding-left: 18px; }
.doc-list li { margin: 5px 0; }
.doc-list li::marker { color: var(--gold); }
.doc-table { font-size: 12px; margin: 10px 0 14px; }
.doc-table td { line-height: 1.65; }
.doc-formula {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.8;
  background: rgba(0,0,0,.4); border: 1px solid rgba(227,179,76,.35); border-radius: 10px;
  padding: 12px 14px; margin: 10px 0; white-space: pre-wrap; word-break: break-word; color: var(--gold2);
}
.doc .acc-item { margin-top: 9px; }
.doc .acc-head { font-size: 13.5px; line-height: 1.6; letter-spacing: 0; }
.doc .acc-pad p { margin: 4px 0 8px; font-size: 13px; }
.doc-endnote {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0,0,0,.26); padding: 4px 14px 12px;
}
.doc-endnote .doc-h2 { border-top: none; padding-top: 10px; }

/* ---------- 路线图时间线 ---------- */
.timeline { position: relative; margin-top: 18px; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--gold) 0%, rgba(227,179,76,.35) 55%, rgba(227,179,76,.12) 100%);
}
.phase { position: relative; margin-bottom: 16px; }
.phase::before {
  content: ""; position: absolute; left: -22px; top: 20px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink2); border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(227,179,76,.12);
}
.phase-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 10px;
  background: rgba(0,0,0,.26); box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.phase-title { font-size: 16px; letter-spacing: .5px; color: var(--paper); margin-bottom: 6px; }
.rm-label { font-size: 12px; letter-spacing: 2px; color: var(--gold); margin: 10px 0 2px; }
.phase-card .trigger {
  display: inline-block; font-size: 12px; line-height: 1.65; color: #6fe3bd;
  border: 1px solid rgba(67,180,143,.45); border-radius: 99px; padding: 3px 12px; margin: 6px 0 4px;
  background: rgba(67,180,143,.07);
}
.phase-card .say {
  font-family: "Songti SC", "STSong", serif; font-size: 13.5px; line-height: 1.8; color: var(--gold2);
  border-left: 3px solid var(--gold); padding: 2px 0 2px 12px; margin: 10px 0 8px;
}
.phase-card .doc-list { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  /* 开包演出是本站核心交互：舞台（#stage 本体及其子元素，含 fx 层）动画豁免，不被一刀切关掉；
     舞台以外的装饰动画/过渡仍按 reduced-motion 关闭。 */
  *:not(#stage):not(#stage *) { animation: none !important; transition: none !important; }
}

/* ================= 电脑端适配（≥1024px） =================
   移动端样式以上全部不动；本块只做宽屏覆盖。
   导航决策：底部标签栏 → 顶部导航（与既有 sticky 顶栏叠成双层顶区）。
   理由：页面为纵向长滚动结构，顶区本就是站内视觉锚点；侧边栏会压缩
   1200px 内容区，并与全屏 stage / modal 的居中定位冲突。 */
@media (min-width: 1024px) {
  body { max-width: 1200px; padding-bottom: 36px; }
  body::before, body::after { max-width: 1200px; }
  .view { padding: 20px 22px 10px; }

  /* ---------- 顶部导航（原底部标签栏上移，与顶栏叠合） ---------- */
  body { display: flex; flex-direction: column; }
  header.top { order: 0; }
  main { order: 1; }
  nav.tabs {
    order: -1; position: sticky; top: 0; left: auto; transform: none; z-index: 45;
    width: 100%; max-width: none;
    display: flex; justify-content: center; gap: 6px;
    border-top: none; border-bottom: 1px solid rgba(227,179,76,.25);
    padding: 6px 10px;
  }
  header.top { top: 45px; }
  nav.tabs button {
    flex-direction: row; gap: 7px; font-size: 13.5px; padding: 7px 26px;
    border-radius: 99px;
  }
  nav.tabs button .ic { font-size: 16px; }
  nav.tabs button.on { background: rgba(227,179,76,.10); }
  .toast { bottom: 36px; }

  /* ---------- 主页：英雄区 × 领包/买包 左右分栏 ---------- */
  #view-home.active {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 14px; align-items: start;
  }
  #view-home > .hero { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  #view-home > .card-panel:nth-child(2) { grid-column: 2; grid-row: 1; margin-bottom: 0; }
  #view-home > :nth-child(n+3) { grid-column: 1 / -1; }
  .hero { padding: 24px 20px 20px; }
  .hero-fan { height: 248px; }
  .fan-card { width: 142px; }
  .fan-card.fc-c { width: 158px; }
  .fan-card.fc-l { transform: translateX(-128%) rotate(-11deg); }
  .fan-card.fc-r { transform: translateX(28%) rotate(11deg); }
  .hero .big { font-size: 31px; }
  .hero .desc { font-size: 12.5px; }
  .pack-fig { width: 88px; height: 132px; }
  .showcase { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; overflow: visible; padding: 10px 2px 4px; }
  .show-item { width: auto; }
  .show-item img { width: 100%; }

  /* ---------- 图鉴 / 背包：卡片网格多列 ---------- */
  .album-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  #view-bag .pick-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .pack-list { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* ---------- 对战：大厅双栏 / Boss 三列 / 锦标赛双栏 ---------- */
  #sub-hall.active { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: start; }
  #sub-hall > .card-panel { margin-bottom: 0; }
  #sub-hall > .card-panel:nth-child(3) { grid-column: 1 / -1; }
  #sub-hall .pick-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  #bossList { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
  #bossList .boss-card { margin-bottom: 0; }
  #sub-tourney.active { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; align-items: start; }
  #sub-tourney > .card-panel { margin-bottom: 0; }

  /* ---------- 开包舞台：宽屏放大居中 ---------- */
  .stage .inner { max-width: 1080px; padding: 28px 22px 48px; justify-content: center; }
  .packstage { flex: 0 1 auto; }
  .stage .close-x { right: max(16px, calc(50% - 540px)); }
  .packwrap { --pw: min(430px, 34vh); }
  .reveal-row { gap: 10px; }

  /* ---------- 详情弹窗：宽屏居中对话框 ---------- */
  .modal .sheet {
    top: 50%; bottom: auto; width: min(560px, 92vw); max-width: 560px; max-height: 86vh;
    transform: translate(-50%, -50%); border-bottom: 1px solid rgba(227,179,76,.3);
    border-radius: 20px; animation: sheetupD .3s ease;
  }
  .modal .sheet::before { display: none; }
  @keyframes sheetupD { from { transform: translate(-50%, calc(-50% + 26px)); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }

  /* ---------- 文档长文页：正文限宽居中 ---------- */
  #view-whitepaper .doc, #view-roadmap .doc, #view-faq .doc { max-width: 780px; margin-left: auto; margin-right: auto; }
  #view-whitepaper .doc-back, #view-roadmap .doc-back, #view-faq .doc-back { margin-left: max(0px, calc(50% - 390px)); }
  .doc { padding: 26px 30px 28px; font-size: 14px; }
}

/* ================= v7 改版（2026-11-20 用户点名） =================
   1) 领包/Boss 卡等高 + 按钮同基线；2) 图鉴成品卡；3) 沙场与战斗动画 */

/* ---------- 按钮对齐：等高卡 + 按钮沉底 ---------- */
.pack-box { display: flex; flex-direction: column; }
.pack-box > .btn { margin-top: auto; order: 2; }
.pack-box > p.note { order: 1; }
.pack-box .dots, .pack-box .buyrow { margin-bottom: 10px; }
.boss-card { display: flex; flex-direction: column; height: 100%; }
.boss-card .boss-foot { margin-top: auto; padding-top: 11px; }
.boss-card .boss-foot .btn { margin-top: 0 !important; }
.boss-info { display: flex; flex-direction: column; }

/* ---------- 图鉴成品卡（全幅卡面 + 名牌 + 底部属性条） ---------- */
.album-grid .gcard.fin .inner { border-radius: 10px; }
.gcard .inner.finart { position: relative; inset: auto; height: 100%; min-height: 0; padding: 0; }
.gcard .finart img.fullface { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; z-index: 1; }
.gcard .finart .bigchar { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; font-family: "Songti SC", serif; font-size: 46px; color: rgba(236,227,203,.92); }
.gcard .finart::after { /* 底部压暗，保证属性条可读 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 3;
  background: linear-gradient(180deg, transparent, rgba(6,6,8,.88));
}
.gcard .fin-topfade { position: absolute; left: 0; right: 0; top: 0; height: 22%; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,6,8,.55), transparent); }
.gcard .fin-name2 {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: 78%;
  background: linear-gradient(180deg, rgba(38,30,16,.92), rgba(16,13,8,.94));
  border: 1px solid rgba(232,184,75,.75); border-radius: 4px; padding: 2px 9px 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.5); white-space: nowrap;
}
.gcard .fin-name2 span { font-family: "Songti SC", "Noto Serif CJK SC", serif; font-size: 13px; font-weight: 700; letter-spacing: 2px; color: #f3e2b3; }
.gcard .finart .gem { top: 5px; right: 5px; font-size: 9px; padding: 2px 6px; }
.gcard .finart .count { top: 5px; left: 5px; font-size: 9.5px; }
.gcard .fin-stats2 {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 5px 8px 6px;
}
.gcard .fin-stats2 .fa, .gcard .fin-stats2 .fd { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0,0,0,.85); }
.gcard .fin-stats2 .fa { color: #ffb37a; } .gcard .fin-stats2 .fd { color: #7adbe8; }
.gcard .fin-stats2 i { font-style: normal; font-size: 8.5px; font-weight: 600; letter-spacing: 1px; margin-right: 3px; opacity: .85; }
.gcard .fin-stats2 .fm { font-size: 8.5px; letter-spacing: .5px; color: rgba(233,226,208,.8); white-space: nowrap; }
.album-grid .gcard.locked-sil .sil-tag { inset: auto 0 30% 0; }

/* ---------- 沙场头（点将台 / 讨伐） ---------- */
.arena-head {
  position: relative; overflow: hidden; border-radius: 16px; padding: 18px 16px 15px; margin-bottom: 14px;
  border: 1px solid rgba(255,182,62,.45); text-align: center;
  background:
    radial-gradient(90% 130% at 50% -30%, rgba(200,67,60,.28), transparent 60%),
    radial-gradient(70% 60% at 50% 120%, rgba(227,179,76,.14), transparent 65%),
    linear-gradient(180deg, #221612, #100d0b);
  box-shadow: 0 12px 28px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,215,106,.14);
}
.arena-head::before {
  content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none' stroke='%23e3b34c' stroke-opacity='.55'%3E%3Cpath d='M6 54a12 12 0 0 1 12-12h30a12 12 0 1 1 12 12'/%3E%3Cpath d='M6 68a12 12 0 0 1 12-12h30a12 12 0 1 1 12 12'/%3E%3C/g%3E%3C/svg%3E");
}
.arena-head-t { position: relative; font-size: 23px; letter-spacing: 6px; color: var(--gold2); text-shadow: 0 2px 16px rgba(227,179,76,.45); }
.arena-head p { position: relative; color: var(--mut); font-size: 12px; line-height: 1.75; margin-top: 6px; }

/* ---------- 战斗舞台 ---------- */
.bstage { position: fixed; inset: 0; z-index: 75; display: none; overflow-y: auto;
  background:
    radial-gradient(100% 55% at 50% -5%, rgba(200,67,60,.20) 0%, transparent 60%),
    radial-gradient(85% 50% at 50% 112%, rgba(227,179,76,.12) 0%, transparent 60%),
    linear-gradient(180deg, #17100c, #060708); }
.bstage.open { display: block; }
.bstage-inner { max-width: 480px; margin: 0 auto; padding: 20px 14px 34px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.bstage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bstage-top h2 { letter-spacing: 3px; font-size: 19px; color: var(--paper); }
.bstage-top .btn { padding: 8px 14px; font-size: 12.5px; }
.bfield {
  position: relative; margin-top: 14px; border-radius: 18px; padding: 16px 12px 14px; overflow: hidden;
  border: 1px solid rgba(255,182,62,.4);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255,150,60,.13), transparent 60%),
    radial-gradient(70% 45% at 50% 108%, rgba(87,168,216,.10), transparent 65%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #1d130d, #0b0a09 70%);
  box-shadow: 0 14px 34px rgba(0,0,0,.55), inset 0 0 60px rgba(0,0,0,.5);
}
.bside { display: flex; gap: 10px; justify-content: center; align-items: stretch; position: relative; z-index: 2; }
.bvs { text-align: center; font-size: 21px; letter-spacing: 8px; text-indent: 8px; color: #e0554c; margin: 10px 0; text-shadow: 0 0 16px rgba(200,67,60,.55); position: relative; z-index: 2; }
.bfighter { width: 104px; flex: none; transition: transform .18s ease, opacity .3s ease; position: relative; }
.bfighter .bf-card { border-radius: 11px; overflow: hidden; position: relative; box-shadow: 0 8px 20px rgba(0,0,0,.55); border: 1px solid rgba(227,179,76,.35); }
.bfighter .bf-card img { width: 100%; height: 118px; object-fit: cover; object-position: 50% 18%; display: block; }
.bfighter .bf-card .bf-big { height: 118px; display: grid; place-items: center; font-family: "Songti SC", serif; font-size: 40px; color: var(--paper); background: linear-gradient(160deg, #2c2012, #14100a); }
.bfighter .bf-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 4px 4px; text-align: center; font-family: "Songti SC", serif; font-size: 12.5px; font-weight: 700; letter-spacing: 1px; color: #f3e2b3; background: linear-gradient(180deg, transparent, rgba(5,5,7,.9)); }
.bfighter .bf-bars { margin-top: 6px; display: grid; gap: 4px; }
.bbar { height: 8px; border-radius: 99px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.14); overflow: hidden; }
.bbar i { display: block; height: 100%; width: 100%; border-radius: 99px; transition: width .45s ease; }
.bbar.hp i { background: linear-gradient(90deg, #b03a32, #ff7a5c); }
.bbar.hp.foehp i { background: linear-gradient(90deg, #7a2ea0, #c86ae0); }
.bbar.en i { background: linear-gradient(90deg, #b9822a, #ffd76a); transition: width .3s ease; }
.bfighter .bf-hptxt { font-size: 10px; color: var(--mut); text-align: center; font-variant-numeric: tabular-nums; }
.bfighter.dead { opacity: .35; filter: grayscale(1); transform: translateY(6px); }
.bfighter.lunge-m { animation: lungeM .38s ease; }
.bfighter.lunge-f { animation: lungeF .38s ease; }
@keyframes lungeM { 0% { transform: translateY(0); } 35% { transform: translateY(-16px) scale(1.07); } 100% { transform: translateY(0); } }
@keyframes lungeF { 0% { transform: translateY(0); } 35% { transform: translateY(16px) scale(1.07); } 100% { transform: translateY(0); } }
.bfighter.hit { animation: hitshake .34s ease; }
@keyframes hitshake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 55% { transform: translateX(5px); } 80% { transform: translateX(-3px); } }
.bfighter.boss-fighter { width: min(240px, 68vw); }
.bfighter.boss-fighter .bf-card img { height: 190px; object-position: 50% 22%; }
.bfighter.boss-fighter .bf-name { font-size: 15px; }
.bslash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255,240,200,.95) 50%, transparent 58%); }
.bslash.go { animation: slashgo .3s ease; }
@keyframes slashgo { 0% { opacity: 0; transform: translateX(-24%); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateX(24%); } }
.bdmg { position: absolute; z-index: 6; left: 50%; top: 26%; transform: translateX(-50%); pointer-events: none;
  font-size: 21px; font-weight: 900; color: #ffd76a; text-shadow: 0 2px 8px rgba(0,0,0,.85), 0 0 14px rgba(255,150,60,.5);
  animation: dmgfloat 0.95s ease-out forwards; white-space: nowrap; }
.bdmg.ult { font-size: 27px; color: #ff9d5c; }
.bdmg.taken { color: #ff8d84; }
@keyframes dmgfloat { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 18% { opacity: 1; transform: translate(-50%, 0) scale(1.12); } 100% { opacity: 0; transform: translate(-50%, -44px) scale(1); } }
.bbanner { position: absolute; left: 0; right: 0; top: 44%; z-index: 7; text-align: center; pointer-events: none; opacity: 0; }
.bbanner.show { animation: bannershow 1s ease forwards; }
.bbanner .bm-name { display: block; font-size: 12px; letter-spacing: 3px; color: rgba(236,227,203,.85); text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.bbanner .bm-move { display: block; font-family: "Songti SC", serif; font-size: 25px; font-weight: 700; letter-spacing: 3px; color: var(--gold2); text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 0 22px rgba(255,180,60,.55); margin-top: 2px; }
.bbanner.ult .bm-move { font-size: 31px; color: #ffab5e; }
@keyframes bannershow { 0% { opacity: 0; transform: scale(.85); } 15% { opacity: 1; transform: scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: scale(1.03); } }
.bult-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, rgba(255,190,80,.5), transparent 65%); }
.bult-flash.go { animation: ultflash .55s ease; }
@keyframes ultflash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.blog { margin-top: 12px; display: grid; gap: 5px; font-size: 12px; color: var(--mut); line-height: 1.6; min-height: 66px; }
.blog .bl-ult { color: var(--gold2); }
.blog .bl-die { color: #ff9a92; }
.bstage-foot { margin-top: 14px; text-align: center; }
.bresult { font-size: 34px; letter-spacing: 10px; text-indent: 10px; margin-bottom: 12px; }
.bresult.win { color: var(--gold2); text-shadow: 0 2px 22px rgba(227,179,76,.6); }
.bresult.lose { color: #8d97a8; }

@media (min-width: 1024px) {
  #bossList { align-items: stretch; }
  .bstage-inner { max-width: 880px; }
  .bfighter { width: 128px; }
  .bfighter .bf-card img { height: 148px; }
  .bfighter.boss-fighter { width: 300px; }
  .bfighter.boss-fighter .bf-card img { height: 240px; }
}

/* v7 补：大厅网格——沙场头通栏、战报通栏（arena-head 插入后子序变化） */
@media (min-width: 1024px) {
  #sub-hall > .arena-head { grid-column: 1 / -1; margin-bottom: 0; }
  #sub-hall > .card-panel:nth-child(3) { grid-column: auto; }
  #sub-hall > .card-panel:nth-child(4) { grid-column: 1 / -1; }
}

/* v7 补：窄屏成品卡——底部属性条只留攻/防（中段信息进详情看），名牌收窄避让宝石 */
@media (max-width: 560px) {
  .gcard .fin-stats2 .fm { display: none; }
  .gcard .fin-stats2 .fa, .gcard .fin-stats2 .fd { font-size: 11.5px; }
  .gcard .fin-name2 { max-width: 68%; padding: 2px 6px 3px; }
  .gcard .fin-name2 span { font-size: 11.5px; letter-spacing: 1px; }
}

/* ================= v8 改版（2026-11-20 用户复审点名） =================
   1) 卡框全档统一（法宝按自身档位上框色） 2) 锦标榜重做
   3) 战斗出招动画强化 4) 结算拆解单框 5) 详情成品卡单框 6) 重置演示 */

/* ---------- 1) 法宝框色按自身稀有度（trf-* 覆盖 t-TR 的铜框） ---------- */
.gcard.trf-SR { background: linear-gradient(160deg, #e3c8ff, #9a63f0 50%, #5f37a8 78%, #c9a2ff); box-shadow: 0 6px 22px rgba(160,110,255,.40); }
.gcard.trf-SSR { background: linear-gradient(160deg, #fff0b3, #e09a26 42%, #8a5a12 72%, #f2cd7e); box-shadow: 0 8px 28px rgba(255,182,62,.45); }
.gcard.trf-UR { background: linear-gradient(120deg, #ff9de2, #a678ff 38%, #6ac8ff 74%, #ffd76a); box-shadow: 0 8px 28px rgba(224,106,200,.45); }

/* ---------- 2) 锦标榜 ---------- */
.tourney-pool { text-align: center; padding: 8px 0 2px; }
.tourney-pool .tp-num { display: block; font-size: 30px; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; text-shadow: 0 2px 16px rgba(227,179,76,.4); }
.tourney-pool .tp-sub { display: block; font-size: 11px; color: var(--mut); margin-top: 3px; }
.split-bars { display: grid; gap: 7px; margin: 12px 0 6px; }
.split-bar { display: grid; grid-template-columns: 92px 1fr 42px; align-items: center; gap: 9px; font-size: 12px; }
.split-bar .sb-lab { display: flex; align-items: center; gap: 6px; color: var(--paper); white-space: nowrap; }
.split-bar .sb-medal { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #241a05; flex: none; }
.sb-m1 { background: linear-gradient(145deg, #ffe9a3, #d8a83e); }
.sb-m2 { background: linear-gradient(145deg, #f2f5f9, #9fb0c3); }
.sb-m3 { background: linear-gradient(145deg, #f0c297, #b0703a); color: #2a1608; }
.sb-m4 { background: #565b63; color: #d8d5cc; }
.split-bar .sb-track { height: 12px; border-radius: 99px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.07); overflow: hidden; }
.split-bar .sb-fill { display: block; height: 100%; border-radius: 99px; }
.sb-f1 { background: linear-gradient(90deg, #b9822a, #ffd76a); }
.sb-f2 { background: linear-gradient(90deg, #8d9db4, #e8eef5); }
.sb-f3 { background: linear-gradient(90deg, #96602c, #e0a266); }
.sb-f4 { background: linear-gradient(90deg, #4a4f57, #7d838d); }
.split-bar .sb-pct { text-align: right; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
.myrank-card {
  display: flex; align-items: center; gap: 14px; border: 1px solid rgba(227,179,76,.55); border-radius: 14px;
  padding: 13px 15px; margin-bottom: 14px;
  background: radial-gradient(90% 130% at 0% 0%, rgba(227,179,76,.16), transparent 60%), linear-gradient(180deg, rgba(30,28,22,.95), rgba(17,16,13,.95));
  box-shadow: 0 10px 24px rgba(0,0,0,.45), 0 0 18px rgba(227,179,76,.12);
}
.myrank-card .mr-lab { display: block; font-size: 11px; color: var(--mut); letter-spacing: 2px; }
.myrank-card .mr-rank { font-size: 25px; color: var(--gold2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.myrank-card .mr-r { flex: 1; font-size: 12.5px; color: var(--mut); line-height: 1.7; text-align: right; }
.myrank-card .mr-r b { color: var(--paper); }
.podium { display: grid; grid-template-columns: 1fr 1.16fr 1fr; gap: 9px; align-items: end; margin: 12px 0 4px; }
.podium .pod { text-align: center; border: 1px solid var(--line); border-bottom: none; border-radius: 12px 12px 0 0; padding: 10px 6px 9px; background: rgba(0,0,0,.3); }
.podium .pod .pd-medal { width: 30px; height: 30px; margin: 0 auto 5px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px; color: #241a05; }
.podium .pod .pd-addr { font-size: 11.5px; color: var(--paper); }
.podium .pod .pd-power { font-size: 15px; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.podium .pod .pd-lab { font-size: 9.5px; color: var(--dim); letter-spacing: 1px; margin-top: 1px; }
.podium .pod.p1 { border-color: rgba(255,215,106,.65); background: radial-gradient(100% 90% at 50% 0%, rgba(227,179,76,.20), transparent 65%), rgba(0,0,0,.3); padding-top: 18px; box-shadow: 0 0 20px rgba(227,179,76,.18); }
.podium .pod.p1 .pd-medal { background: linear-gradient(145deg, #ffe9a3, #d8a83e); width: 37px; height: 37px; font-size: 16px; }
.podium .pod.p2 .pd-medal { background: linear-gradient(145deg, #f2f5f9, #9fb0c3); }
.podium .pod.p3 .pd-medal { background: linear-gradient(145deg, #f0c297, #b0703a); }
@media (min-width: 1024px) {
  #sub-tourney.active { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  #sub-tourney > .arena-head { grid-column: 1 / -1; margin-bottom: 0; }
  #sub-tourney > .myrank-card { grid-column: 2; margin-bottom: 0; }
  #sub-tourney > .card-panel:last-child { grid-column: 2; }
}

/* ---------- 3) 战斗动画强化：大前冲 / 横幅久留 / 重斩击 / 命中闪光 / 震屏 ---------- */
.bfighter.lunge-m { animation: lungeM8 .5s ease; }
.bfighter.lunge-f { animation: lungeF8 .5s ease; }
@keyframes lungeM8 { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-54px) scale(1.15); } 55% { transform: translateY(-47px) scale(1.10); } 100% { transform: translateY(0) scale(1); } }
@keyframes lungeF8 { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(54px) scale(1.15); } 55% { transform: translateY(47px) scale(1.10); } 100% { transform: translateY(0) scale(1); } }
.bfighter.boss-fighter.lunge-f { animation: lungeBoss8 .55s ease; }
@keyframes lungeBoss8 { 0% { transform: translateY(0) scale(1); filter: brightness(1); } 30% { transform: translateY(46px) scale(1.07); filter: brightness(1.5) drop-shadow(0 0 24px rgba(255,90,60,.7)); } 60% { transform: translateY(40px) scale(1.04); filter: brightness(1.3); } 100% { transform: translateY(0) scale(1); filter: brightness(1); } }
.bfighter.hit { animation: hitshake8 .48s ease; }
@keyframes hitshake8 { 0%, 100% { transform: translateX(0); filter: brightness(1); } 14% { filter: brightness(2.2) saturate(1.5); } 26% { transform: translateX(-11px) rotate(-1.3deg); } 52% { transform: translateX(9px) rotate(1deg); filter: brightness(1.55); } 78% { transform: translateX(-5px); filter: brightness(1.15); } }
.bslash { background: linear-gradient(115deg, transparent 33%, rgba(255,255,255,.98) 47%, rgba(255,214,120,.95) 53%, transparent 67%); filter: drop-shadow(0 0 10px rgba(255,200,90,.85)); }
.bslash.go { animation: slashgo8 .4s ease; }
@keyframes slashgo8 { 0% { opacity: 0; transform: translateX(-30%) scaleY(.7); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateX(30%) scaleY(1.18); } }
.bdmg { font-size: 27px; }
.bdmg.ult { font-size: 35px; }
.bbanner.show { animation: bannershow8 1.3s ease forwards; }
@keyframes bannershow8 { 0% { opacity: 0; transform: scale(.8); } 12% { opacity: 1; transform: scale(1.05); } 20% { transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: scale(1.02); } }
.bbanner .bm-name { font-size: 13.5px; }
.bbanner .bm-move { font-size: 31px; }
.bbanner.ult .bm-move { font-size: 39px; }
.bbanner.foe .bm-move { color: #ff9a8a; text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 0 24px rgba(255,90,70,.65); }
.bfield.shake { animation: fieldshake8 .5s ease; }
@keyframes fieldshake8 { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-7px, 3px); } 40% { transform: translate(6px, -3px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(3px, 2px); } }

/* ---------- 4) 结算拆解单框 ---------- */
.report-panel { border: 1px solid rgba(227,179,76,.38); border-radius: 14px; background: rgba(0,0,0,.26); padding: 13px 13px 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.report-head { text-align: center; padding-bottom: 9px; border-bottom: 1px dashed rgba(227,179,76,.22); }
.report-head .rw { font-family: "Songti SC", "STSong", serif; font-size: 28px; letter-spacing: 7px; text-indent: 7px; line-height: 1.25; }
.report-head .rw.win { color: var(--gold2); text-shadow: 0 2px 18px rgba(227,179,76,.55); }
.report-head .rw.lose { color: #8d97a8; }
.report-head .rs { font-size: 12px; color: var(--mut); margin-top: 3px; }
.report-sec-t { font-size: 11.5px; color: var(--gold); letter-spacing: 3px; margin: 10px 0 2px; }
.report-panel .breakdown { font-size: 11.5px; line-height: 1.6; }
.report-panel .breakdown .row { padding: 2px 0; }
.report-panel .breakdown .row.total { font-size: 12px; }
.report-rewards { margin-top: 10px; border-top: 1px dashed rgba(227,179,76,.22); padding-top: 5px; }
.report-rewards .kv { padding: 4px 0; font-size: 12px; }
.report-rewards .note { margin-top: 5px; }

/* ---------- 5/6) 卡详情：成品卡 + 单框紧凑布局 ---------- */
.detail-wrap { display: flex; flex-direction: column; gap: 11px; }
.detail-card { flex: none; margin: 0 auto; }
.modal .sheet .detail-card .flipw { width: 134px; height: 194px; margin: 0; }
.detail-info { flex: 1; min-width: 0; }
.detail-info .note { font-size: 11px; line-height: 1.6; }
.detail-info .kv { padding: 4px 0; font-size: 12.5px; }
.detail-info .slot-row { gap: 7px; margin-top: 8px; }
.detail-info .slot-box { padding: 8px 10px; }
.detail-btns { display: flex; gap: 8px; margin-top: 12px; }
.detail-btns .btn { flex: 1; }
@media (max-width: 1023px) {
  .modal .sheet .detail-card .flipw { width: 112px; height: 162px; }
  .detail-wrap { gap: 8px; }
  .detail-info .kv { padding: 2.5px 0; font-size: 11.5px; }
  .detail-info .note { line-height: 1.5; }
  .detail-info .slot-box { padding: 7px 8px; }
  .detail-info .slot-box .sb-hd { margin-bottom: 5px; }
  .detail-info .treasure-pick { gap: 4px; margin-top: 6px; }
  .detail-info .treasure-pick button { padding: 3px 6px; font-size: 10.5px; }
  .detail-btns { margin-top: 9px; }
}
@media (min-width: 1024px) {
  .detail-wrap { flex-direction: row; align-items: flex-start; }
  .modal .sheet .detail-card .flipw { width: 172px; height: 249px; }
}

/* ---------- 7) 重置演示入口 ---------- */
.reset-demo { background: none; border: none; color: var(--dim); font-size: 11.5px; letter-spacing: 1px; padding: 6px 10px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.reset-demo:active { color: var(--mut); }
