/* 封神榜抽卡 —— 视觉重设计 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: 76px;
}
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: 58px; height: 116px; object-fit: cover; 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(256px, 66vw); position: relative; width: var(--pw); height: calc(var(--pw) * 1289 / 600); user-select: none; touch-action: none; cursor: grab; filter: drop-shadow(0 calc(var(--pw) * .12) calc(var(--pw) * .16) rgba(0,0,0,.55)); }
.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;
}
.packwrap.gold .pouch { background-image: url(../assets/pack-gold.png); }
.packwrap.open .pouch { /* 撕开后包身上沿变锯齿撕口 */
  clip-path: polygon(0% 14.4%, 0.0% 14.4%, 4.2% 16.9%, 8.3% 14.4%, 12.5% 16.9%, 16.7% 14.4%, 20.8% 16.9%, 25.0% 14.4%, 29.2% 16.9%, 33.3% 14.4%, 37.5% 16.9%, 41.7% 14.4%, 45.8% 16.9%, 50.0% 14.4%, 54.2% 16.9%, 58.3% 14.4%, 62.5% 16.9%, 66.7% 14.4%, 70.8% 16.9%, 75.0% 14.4%, 79.2% 16.9%, 83.3% 14.4%, 87.5% 16.9%, 91.7% 14.4%, 95.8% 16.9%, 100.0% 14.4%, 100% 100%, 0% 100%);
}
.pouch .p-kind { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.teartop { /* 封口条：与包身同一张图的全高背景，只露出顶部封口段 */
  position: absolute; left: 0; right: 0; top: 0; height: calc(var(--pw) * 54 / 148); z-index: 3;
  pointer-events: none; will-change: transform, opacity;
}
.teartop .pt-foil {
  position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--pw) * 1289 / 600);
  background: url(../assets/pack-silver.png) center / 100% 100% no-repeat;
  clip-path: polygon(0% 0%, 100% 0%, 100% 14.4%, 100.0% 14.4%, 95.8% 16.9%, 91.7% 14.4%, 87.5% 16.9%, 83.3% 14.4%, 79.2% 16.9%, 75.0% 14.4%, 70.8% 16.9%, 66.7% 14.4%, 62.5% 16.9%, 58.3% 14.4%, 54.2% 16.9%, 50.0% 14.4%, 45.8% 16.9%, 41.7% 14.4%, 37.5% 16.9%, 33.3% 14.4%, 29.2% 16.9%, 25.0% 14.4%, 20.8% 16.9%, 16.7% 14.4%, 12.5% 16.9%, 8.3% 14.4%, 4.2% 16.9%, 0.0% 14.4%);
}
.packwrap.gold .teartop .pt-foil { background-image: url(../assets/pack-gold.png); }
.packwrap.open .teartop { animation: tearfly .48s cubic-bezier(.3,.6,.6,1) forwards; }
@keyframes tearfly { to { transform: translate(calc(var(--pw) * -.595), calc(var(--pw) * -.716)) rotate(-27deg); opacity: 0; } }
.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); } }
.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: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.flipw { width: 148px; height: 214px; perspective: 1000px; flex: none; cursor: pointer; }
.flipin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s 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; } }

/* 卡背：多环描金 + 菱纹暗花 */
.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;
}
.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); }

/* ---------- 卡面：档位材质框 + 内衬斜射光 + 纹理层 ---------- */
.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); }
.gcard.t-C .inner { background: linear-gradient(168deg, #24262c, #131418); }
.gcard.t-UC { background: linear-gradient(160deg, #8fd8b4, #2e7d5f 55%, #57b08c); }
.gcard.t-UC .inner { background: linear-gradient(168deg, #1e2b24, #111713); }
.gcard.t-R { background: linear-gradient(160deg, #ffffff, #93a5bd 50%, #dfe9f4); box-shadow: 0 5px 18px rgba(160,190,230,.22); }
.gcard.t-R .inner { background: linear-gradient(168deg, #1d2739, #11141f), repeating-linear-gradient(0deg, rgba(140,190,240,.05) 0 2px, transparent 2px 5px); background-blend-mode: lighten; }
.gcard.t-SR { --artglow: rgba(232,184,75,.22); background: linear-gradient(160deg, #ffe082, #c9932b 55%, #8a5f14); box-shadow: 0 6px 22px rgba(232,184,75,.35); }
.gcard.t-SR .inner { background: linear-gradient(160deg, #2e2410, #171208 65%), linear-gradient(115deg, transparent 40%, rgba(232,184,75,.15) 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 { 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: 30px; height: 62px; flex: none; display: block; object-fit: cover;
  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; }
.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;
  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(4, 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: 96px; 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) {
  * { 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: 76px; height: 152px; }
  .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(330px, 66vw); }
  .reveal-row { gap: 14px; }
  .reveal-row .flipw { width: 178px; height: 258px; }

  /* ---------- 详情弹窗：宽屏居中对话框 ---------- */
  .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; }
}
