:root {
  --bg: #202630;          /* 抽取自实机截图：页面/弹层底色 */
  --panel: #2d343f;       /* 卡包信息块 / 卡片信息条 / 输入框 */
  --panel-2: #262c36;
  --line: rgba(255, 255, 255, .07);
  --text: #eaecef;
  --dim: #8b93a1;
  --yellow: #fcd535;
  --olive: #625b32;
  --green: #2ebd85;
  --s-gold: #f0b90b;
  --s-purple: #8b6cef;
  --s-blue: #4a9cff;
  --s-grey: #c3c9d4;
  --radius: 8px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

html {
  margin: 0;
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--text);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* ===== 原生 H5 视口容器（无手机壳/无假状态栏） ===== */
.phone {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 521px) {
  body { background: #141921; }
  .phone {
    border-left: 1px solid rgba(255, 255, 255, .06);
    border-right: 1px solid rgba(255, 255, 255, .06);
  }
}
.app {
  position: absolute;
  inset: 0;
  padding-top: env(safe-area-inset-top, 0px);
}

svg.i { width: 22px; height: 22px; display: block; flex: none; }
.gem { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; flex: none; }
.gem.dark { filter: saturate(.9); }
.chev { width: 20px; height: 20px; color: var(--dim); }
.chev use, .icon-btn use { pointer-events: none; }

/* ===== 页面容器 ===== */
.page {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.page.is-active { display: flex; }

/* ===== 顶栏 ===== */
.topbar {
  height: 58px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  flex: none;
  position: relative;
  z-index: 8;
}
html.in-dimina .topbar {
  height: calc(58px + max(env(safe-area-inset-top, 0px), 32px));
  padding-top: max(env(safe-area-inset-top, 0px), 32px);
}
.topbar h1 { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: .2px; }
.topbar-spacer { width: 34px; height: 34px; }
.icon-btn {
  width: 34px; height: 34px;
  background: none; border: 0; color: var(--text);
  cursor: pointer;
  display: grid; place-items: center;
  border-radius: 8px;
  padding: 0;
}
.icon-btn:active { background: rgba(255, 255, 255, .06); }
.icon-btn .i { width: 23px; height: 23px; }
.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.small .i { width: 21px; height: 21px; color: #cfd4dc; }

/* ===== 抽卡页滚动区（首屏 100% 聚焦卡包 + 开包滑块，抽卡记录在滑块下方下滑可见） ===== */
.gacha-scroll {
  position: absolute;
  top: 58px; bottom: 56px; left: 0; right: 0;
  overflow-y: auto;
  padding: 0 16px 32px;
  z-index: 1;
  scrollbar-width: none;
}
html.in-dimina .gacha-scroll {
  top: calc(58px + max(env(safe-area-inset-top, 0px), 32px));
}
.gacha-scroll::-webkit-scrollbar { display: none; }
.first-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ===== 卡包横向选择 ===== */
.packs-row {
  position: relative;
  margin: 2px 0 4px;
}
.packs-row::before {
  content: "";
  position: absolute; left: -16px; top: 0; bottom: 0;
  width: 56px;
  background: linear-gradient(90deg, var(--bg) 52%, rgba(32, 38, 48, 0));
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.packs-row.has-left-fade::before { opacity: 1; }
.packs-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-right: 42px;
  scroll-behavior: smooth;
}
.packs-strip::-webkit-scrollbar { display: none; }
.pack-item {
  flex: none;
  height: 62px;
  min-width: 90px;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 9px 6px 5px;
  background: none; border: 0; border-radius: 8px;
  color: var(--text); font-family: inherit;
  cursor: pointer;
  transition: background .18s ease;
}
.pack-item img {
  width: 30px; height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .55));
  transition: transform .22s ease;
}
.pack-item .pi-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pack-item .pi-name { font-size: 15.5px; font-weight: 600; line-height: 1; }
.pack-item .pi-price { font-size: 12.5px; color: var(--dim); line-height: 1; }
.pack-item.selected { background: var(--panel); }
.pack-item.selected img { transform: scale(1.07); }
.packlist-btn {
  position: absolute; right: -2px; top: 0;
  width: 44px; height: 62px;
  border: 0; background: linear-gradient(90deg, rgba(32, 38, 48, 0), var(--bg) 38%);
  color: #cfd4dc; cursor: pointer;
  display: grid; place-items: center;
  padding-left: 12px;
}
.packlist-btn .i { width: 22px; height: 22px; }

/* ===== 大卡包 & 多连抽扇形叠加 ===== */
.hero {
  flex: 1 1 auto;
  min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 -16px;
  padding-top: 12px;
  position: relative;
  overflow: hidden;
  --glow-a: rgba(205, 218, 238, .20);
  --glow-b: rgba(205, 218, 238, .05);
  --glow-boost: 1;
}
.hero[data-pack="silver"] {
  --glow-a: rgba(210, 222, 240, .24);
  --glow-b: rgba(210, 222, 240, .06);
  --sheen-core: rgba(255, 255, 255, .56);
  --sheen-halo: rgba(220, 236, 255, .19);
  --sheen-sub: rgba(236, 246, 255, .30);
  --sheen-aura: rgba(222, 236, 255, .20);
}
.hero[data-pack="gold"] {
  --glow-a: rgba(242, 192, 62, .34);
  --glow-b: rgba(242, 192, 62, .09);
  --sheen-core: rgba(255, 250, 224, .58);
  --sheen-halo: rgba(255, 224, 130, .22);
  --sheen-sub: rgba(255, 245, 202, .33);
  --sheen-aura: rgba(255, 228, 135, .24);
}
.hero[data-pack="bronze"] {
  --glow-a: rgba(216, 146, 94, .30);
  --glow-b: rgba(216, 146, 94, .08);
  --sheen-core: rgba(255, 240, 224, .52);
  --sheen-halo: rgba(244, 180, 128, .20);
  --sheen-sub: rgba(255, 226, 198, .29);
  --sheen-aura: rgba(242, 180, 128, .21);
}
.hero[data-pack="lucky"] {
  --glow-a: rgba(252, 213, 53, .30);
  --glow-b: rgba(252, 213, 53, .08);
  --sheen-core: rgba(255, 252, 232, .60);
  --sheen-halo: rgba(255, 228, 108, .22);
  --sheen-sub: rgba(255, 248, 192, .34);
  --sheen-aura: rgba(255, 232, 128, .25);
}
.hero-glow {
  position: absolute; top: 45%; left: 50%;
  width: 460px; height: 460px;
  margin-left: -230px; margin-top: -230px;
  background: radial-gradient(circle, var(--glow-a) 0%, var(--glow-b) 48%, transparent 74%);
  filter: blur(18px);
  animation: breathe 4s ease-in-out infinite;
  transition: background .35s ease, filter .25s ease;
  pointer-events: none;
}
.hero-glow.is-switching {
  animation: glowSwitchPop .48s ease-out, breathe 4s ease-in-out .48s infinite;
}
@keyframes glowSwitchPop {
  0%   { transform: scale(calc(.82 * var(--glow-boost))); opacity: .35; }
  36%  { transform: scale(calc(1.18 * var(--glow-boost))); opacity: 1; }
  100% { transform: scale(calc(1 * var(--glow-boost))); opacity: .74; }
}
@keyframes breathe {
  0%, 100% { transform: scale(calc(1 * var(--glow-boost))); opacity: .72; }
  50% { transform: scale(calc(1.1 * var(--glow-boost))); opacity: 1; }
}
.hero-stack {
  position: relative;
  width: 100%;
  display: flex; flex-direction: column; align-items: center;
  --pack-w: 268px;
}
.hero-pack-drop {
  position: relative;
  width: var(--pack-w);
  z-index: 2;
  will-change: transform, opacity;
}
.hero-pack-drop.is-entering {
  animation: packJumpIn .44s cubic-bezier(.18, .92, .26, 1) both;
}
.hero-pack-stage {
  position: relative;
  width: 100%;
  z-index: 2;
  animation: packIdleFloat 4s ease-in-out infinite;
  transition: filter .2s ease;
  will-change: transform;
}
.hero-pack-stage.pop-add .hero-pack-front {
  animation: packPopAdd .22s cubic-bezier(.22, 1, .36, 1);
}
.hero-pack-stage.pop-sub .hero-pack-front {
  animation: packPopSub .18s cubic-bezier(.22, 1, .36, 1);
}
@keyframes packPopAdd {
  0%   { transform: scale(1); }
  42%  { transform: scale(1.028) translateX(2px); }
  100% { transform: scale(1); }
}
@keyframes packPopSub {
  0%   { transform: scale(1); }
  45%  { transform: scale(0.986) translateX(-1.5px); }
  100% { transform: scale(1); }
}
.hero-fan {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-fan-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  transform: translateX(0%) rotate(0deg) scale(0.96);
  opacity: 0;
  filter: brightness(var(--fb, 1)) drop-shadow(-4px 8px 12px rgba(0, 0, 0, .58));
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
  will-change: transform, opacity;
  pointer-events: none;
  user-select: none;
}
.hero-fan-card.is-shown {
  transform: translateX(var(--fx)) rotate(var(--fr)) scale(var(--fs));
  opacity: var(--fo);
}
.hero-stack.no-anim .hero-fan-card,
.hero-stack.no-anim .hero-reflect-card {
  transition: none !important;
}
.hero-pack-front {
  position: relative;
  width: 100%;
  z-index: 10;
}
.hero-pack {
  width: 100%; height: auto;
  display: block;
  position: relative; z-index: 10;
  filter: drop-shadow(-6px 14px 20px rgba(0, 0, 0, .62)) drop-shadow(0 0 18px rgba(252, 213, 53, .08));
  transition: filter .2s ease;
  user-select: none;
}
/* 1:1 复刻币安卡包金属光晕滑闪（按卡包透明度轮廓精确裁切） */
.hero-pack-sheen {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: var(--pack-mask);
  mask-image: var(--pack-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  mix-blend-mode: screen;
}
.hero-pack-sheen::before {
  content: "";
  position: absolute;
  top: -36%;
  bottom: -36%;
  left: -135%;
  width: 128%;
  background: linear-gradient(
    118deg,
    transparent 0%,
    transparent 24%,
    var(--sheen-halo, rgba(255, 250, 235, .18)) 35%,
    var(--sheen-core, rgba(255, 253, 244, .54)) 44%,
    var(--sheen-halo, rgba(255, 250, 235, .18)) 51%,
    rgba(255, 255, 255, .04) 55%,
    var(--sheen-sub, rgba(255, 252, 240, .30)) 60%,
    transparent 70%,
    transparent 100%
  );
  filter: blur(2px);
  animation: packSheenSweep 2.9s cubic-bezier(.36, .08, .28, .96) infinite;
  will-change: transform, opacity;
}
.hero-pack-sheen::after {
  content: "";
  position: absolute;
  inset: -16%;
  background: radial-gradient(
    ellipse 76% 44% at 50% 34%,
    var(--sheen-aura, rgba(255, 246, 214, .22)) 0%,
    transparent 72%
  );
  animation: packAuraGlide 4s ease-in-out infinite;
  will-change: transform, opacity;
}
.hero-pack-sheen.sheen-reset::before {
  animation: none !important;
}
@keyframes packSheenSweep {
  0%   { transform: translate3d(0%, 0, 0); opacity: 0; }
  8%   { opacity: 1; }
  50%  { opacity: 1; }
  62%  { transform: translate3d(218%, 0, 0); opacity: 0; }
  100% { transform: translate3d(218%, 0, 0); opacity: 0; }
}
@keyframes packAuraGlide {
  0%, 100% { transform: translate3d(-6%, 12%, 0) rotate(-6deg); opacity: .45; }
  50%      { transform: translate3d(8%, -10%, 0) rotate(6deg); opacity: .96; }
}
/* 1:1 复刻币安 60fps 实机切换卡包高空斜切跳入 + 弹性落位 */
@keyframes packJumpIn {
  0%   { transform: translate3d(0, -142px, 0) rotate(-5.6deg) scale(.94); opacity: .12; }
  16%  { transform: translate3d(0, -56px, 0) rotate(-3.9deg) scale(.99); opacity: 1; }
  36%  { transform: translate3d(0, -6px, 0) rotate(-1.4deg) scale(1.012); opacity: 1; }
  56%  { transform: translate3d(0, 7px, 0) rotate(.55deg) scale(.994); opacity: 1; }
  78%  { transform: translate3d(0, -2.5px, 0) rotate(-.2deg) scale(1.003); opacity: 1; }
  100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); opacity: 1; }
}
.hero.dragging-pack .hero-pack-stage {
  animation: packDragTremble .11s linear infinite;
  scale: calc(1 + var(--p, 0) * .085);
}
.hero.dragging-pack .hero-pack {
  filter:
    drop-shadow(-6px 16px 26px rgba(0, 0, 0, .62))
    drop-shadow(0 0 calc(16px + var(--p, 0) * 34px) rgba(252, 213, 53, calc(.14 + var(--p, 0) * .52)));
}
.hero.dragging-pack .hero-glow {
  transform: scale(calc((1 + var(--p, 0) * .32) * var(--glow-boost)));
  opacity: calc(.72 + var(--p, 0) * .28);
  animation: none;
}
.hero.opening .hero-pack-stage {
  animation: packOpenJitter .075s linear infinite, packOpenSwell .85s ease-in-out infinite;
}
.hero.opening .hero-pack {
  filter:
    drop-shadow(-6px 18px 28px rgba(0, 0, 0, .62))
    drop-shadow(0 0 38px rgba(252, 213, 53, .58));
}
.hero.opening .hero-glow {
  animation: breathe .55s ease-in-out infinite;
}
@keyframes packDragTremble {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25%      { translate: calc(var(--p, 0) * -2.6px) calc(var(--p, 0) * 1.1px); rotate: calc(var(--p, 0) * -1.4deg); }
  50%      { translate: calc(var(--p, 0) * 2.4px) calc(var(--p, 0) * -1.2px); rotate: calc(var(--p, 0) * 1.2deg); }
  75%      { translate: calc(var(--p, 0) * -1.8px) calc(var(--p, 0) * -.8px); rotate: calc(var(--p, 0) * -.9deg); }
}
@keyframes packOpenJitter {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25%      { translate: -2.4px 1.1px; rotate: -1.1deg; }
  50%      { translate: 2.2px -1.1px; rotate: 1deg; }
  75%      { translate: -1.6px -.7px; rotate: -.7deg; }
}
@keyframes packOpenSwell {
  0%, 100% { scale: 1.03; }
  50%      { scale: 1.09; }
}
/* 1:1 复刻币安卡包待机上下浮动（实测 12.7px 峰峰值 + 4s 平滑呼吸） */
@keyframes packIdleFloat {
  0%, 100% { transform: translate3d(0, 5px, 0) scale(1.007); }
  50%      { transform: translate3d(0, -8px, 0) scale(.993); }
}
.hero-reflect-wrap {
  width: 100%;
  height: 108px;
  margin-top: -18px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.95) 0%, rgba(0,0,0,.48) 52%, transparent 92%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.95) 0%, rgba(0,0,0,.48) 52%, transparent 92%);
  pointer-events: none;
}
.hero-reflect-drop {
  width: var(--pack-w);
  flex: none;
  will-change: transform, opacity;
}
.hero-reflect-drop.is-entering {
  animation: reflectJumpIn .44s cubic-bezier(.18, .92, .26, 1) both;
}
@keyframes reflectJumpIn {
  0%   { transform: translate3d(0, 56px, 0) rotate(4.2deg) scale(.92); opacity: 0; }
  36%  { transform: translate3d(0, 4px, 0) rotate(1deg) scale(1.01); opacity: .92; }
  58%  { transform: translate3d(0, -4px, 0) rotate(-.35deg) scale(.995); opacity: 1; }
  100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); opacity: 1; }
}
.hero-reflect-stage {
  position: relative;
  width: 100%;
  transform: scaleY(-1);
  transform-origin: 50% 50%;
  opacity: .24;
  filter: blur(.8px) brightness(1.38);
  animation: reflectIdleFloat 4s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes reflectIdleFloat {
  0%, 100% { transform: translate3d(0, -3px, 0) scaleY(-1) scale(1.006); opacity: .27; }
  50%      { transform: translate3d(0, 5px, 0) scaleY(-1) scale(.992); opacity: .18; }
}
.hero-reflect-fan {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-reflect-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  transform: translateX(0%) rotate(0deg) scale(0.96);
  opacity: 0;
  filter: brightness(var(--fb, 1));
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), opacity .2s ease;
  will-change: transform, opacity;
}
.hero-reflect-card.is-shown {
  transform: translateX(var(--fx)) rotate(var(--fr)) scale(var(--fs));
  opacity: var(--fo);
}
.hero-reflect {
  width: 100%; height: auto;
  display: block;
  position: relative;
  z-index: 10;
}
.hero-stack::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -26px;
  width: 190px; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, .5), transparent 70%);
  filter: blur(4px);
  z-index: 0;
  animation: shadowIdleFloat 4s ease-in-out infinite;
}
@keyframes shadowIdleFloat {
  0%, 100% { transform: translateX(-50%) scaleX(1.05); opacity: .88; }
  50%      { transform: translateX(-50%) scaleX(.88); opacity: .55; }
}

/* ===== 三个数据 ===== */
.stats {
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 0 24px;
  flex: none;
}
.stats > div { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.stats b { font-size: 17px; font-weight: 600; letter-spacing: .1px; }
.stats span { font-size: 12px; color: var(--dim); }
.stats .dotted { border-bottom: 1px dotted var(--dim); padding-bottom: 1px; }
.stats i { width: 1px; height: 26px; background: rgba(255, 255, 255, .08); }
.stats .clickable { cursor: pointer; }

/* ===== 抽卡记录预览（位于开包滑块下方，下滑可见） ===== */
.records-preview {
  padding: 18px 0 0;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}
.rp-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  padding: 2px 0 8px;
}
.rp-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17.5px; font-weight: 600;
}
.mini-info { background: none; border: 0; padding: 0; color: var(--dim); cursor: pointer; display: grid; place-items: center; }
.mini-info .i { width: 16px; height: 16px; }
.rp-list { display: flex; flex-direction: column; }
.rp-row {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0;
}
.rp-thumb {
  width: 42px; height: 58px;
  border-radius: 4px;
  overflow: hidden;
  background: #2b313c;
  flex: none;
}
.rp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-name { font-size: 16.5px; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-price { display: flex; align-items: center; gap: 5px; font-size: 16.5px; font-weight: 500; }
.rp-price .gem { width: 15px; height: 15px; }

/* ===== 卡包信息 ===== */
.pack-info { padding-top: 26px; }
.pack-info h2 { font-size: 18px; font-weight: 600; margin: 0 0 15px; }
.pack-info p {
  font-size: 15px; line-height: 1.68;
  color: #b7bdca;
  margin: 0 0 17px;
  word-break: break-word;
}
.provider { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #b7bdca; }
.renaiss { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.renaiss i {
  width: 17px; height: 17px; border-radius: 3px;
  background: conic-gradient(from 45deg, #e94b4b, #f0b90b, #2ebd85, #4a9cff, #e94b4b);
  box-shadow: inset 0 0 0 4px var(--bg);
}
.renaiss em { font-style: italic; font-weight: 700; letter-spacing: .2px; }

/* ===== 内含卡片 ===== */
.contents { padding-top: 30px; }
.contents-sticky {
  position: sticky; top: 0;
  z-index: 6;
  background: var(--bg);
}
.contents-head {
  padding: 8px 0 13px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.contents-head h2 { font-size: 18px; font-weight: 600; margin: 0; }
.contents-head h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 6px;
  width: 46px; height: 3px;
  border-radius: 2px;
  background: var(--yellow);
}
.grade-strip {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 13px 0 14px;
  scroll-behavior: smooth;
}
.grade-strip::-webkit-scrollbar { display: none; }
.grade-chip {
  flex: none;
  min-width: 138px;
  display: flex; flex-direction: column; gap: 7px;
  padding: 10px 10px 11px;
  border-radius: 8px;
  background: none;
  border: 0;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.grade-chip .gc-top { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; }
.grade-chip .gc-top .i { width: 15px; height: 15px; }
.grade-chip .gc-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); white-space: nowrap; }
.grade-chip.selected { background: var(--panel); }
.grade-chip[data-grade="S"] .gc-top .i { color: var(--s-gold); }
.grade-chip[data-grade="A"] .gc-top .i { color: var(--s-purple); }
.grade-chip[data-grade="B"] .gc-top .i { color: var(--s-blue); }
.grade-chip[data-grade="C"] .gc-top .i { color: var(--s-grey); }

.card-grid { padding-top: 4px; }
.card-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: stretch; }
.card-tile {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.card-photo {
  overflow: hidden;
  background: #171c24;
  flex: none;
  height: var(--ph, 220px);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-meta { background: var(--panel); padding: 10px 12px 13px; flex: 1; }
.card-name {
  font-size: 15.5px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-price {
  display: flex; align-items: center; gap: 5px;
  margin-top: 9px;
  font-size: 16px; font-weight: 600;
}
.card-price .gem { width: 15px; height: 15px; }
.card-pct { color: var(--green); font-size: 12.5px; font-weight: 600; margin-left: 1px; }
.grid-tail { text-align: center; color: #5f6877; font-size: 12px; padding: 18px 0 6px; }

/* ===== 底部抽卡栏（首屏焦点操作区） ===== */
.dock {
  flex: none;
  padding: 4px 0 20px;
  background: none;
  z-index: 7;
}
.drawbar { display: flex; gap: 10px; }
.balance, .qty {
  display: flex; align-items: center;
  background: var(--panel);
  border-radius: 8px;
  height: 38px;
  padding: 0 12px;
}
.balance { flex: 1; gap: 9px; }
.balance .gem { width: 17px; height: 17px; }
.balance b { font-weight: 600; font-size: 16px; flex: 1; }
.balance-sub {
  font-size: 11px;
  font-weight: 500;
  color: #7e8899;
  white-space: nowrap;
  letter-spacing: .2px;
}
html.in-dimina .web3-only { display: none !important; }
html:not(.in-dimina) .dimina-only { display: none !important; }
.plus {
  background: none; border: 0; color: var(--yellow);
  width: 26px; height: 26px; display: grid; place-items: center;
  cursor: pointer; padding: 0;
}
.plus .i { width: 19px; height: 19px; }
.qty { width: 176px; justify-content: space-between; padding: 0 14px; }
.qty button {
  background: none; border: 0; color: #7e8899;
  width: 30px; height: 32px; display: grid; place-items: center;
  cursor: pointer; padding: 0;
  transition: color .15s ease, opacity .15s ease;
}
.qty button .i { width: 18px; height: 18px; }
.qty button:active:not(:disabled) { color: #fff; }
.qty button:disabled { color: #4f5867; opacity: .55; cursor: default; }
.qty b { font-weight: 600; font-size: 15px; }

/* ===== 滑动开包 ===== */
.slide {
  position: relative;
  margin: 10px 0 0;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--olive);
  touch-action: none;
  user-select: none;
  cursor: grab;
  transition: box-shadow .18s ease;
}
.slide:active { cursor: grabbing; }
.slide.dragging {
  animation: slideShake .1s linear infinite;
  box-shadow: 0 0 calc(6px + var(--p, 0) * 20px) rgba(252, 213, 53, calc(.18 + var(--p, 0) * .42));
}
@keyframes slideShake {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(-1px, .6px); }
  50%      { transform: translate(.8px, -.5px); }
  75%      { transform: translate(-.6px, -.4px); }
}
.slide-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 42px;
  background: var(--yellow);
  border-radius: 8px 0 0 8px;
  pointer-events: none;
  overflow: hidden;
}
.slide.dragging .slide-fill::after,
.slide.loading .slide-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 22%, rgba(255, 255, 255, .52) 48%, transparent 74%);
  animation: slideShimmer 1.05s linear infinite;
}
@keyframes slideShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}
.slide-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 16px; font-weight: 600;
  color: #f2f4f7;
  pointer-events: none;
  transition: opacity .12s linear;
}
.slide-label .gem { width: 15px; height: 15px; }
.slide-drag-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14.5px; font-weight: 700;
  letter-spacing: .6px;
  color: #202630;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  transition: opacity .12s ease;
}
.slide.dragging.show-hint .slide-drag-hint { opacity: .92; }
.slide.dragging.ready-release .slide-drag-hint {
  opacity: 1;
  animation: hintPulse .5s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.slide-loading-ui {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15.5px; font-weight: 700;
  color: #202630;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  transition: opacity .16s ease;
}
.slide-bars {
  display: inline-flex; align-items: flex-end; gap: 3px;
  height: 13px;
}
.slide-bars i {
  display: block;
  width: 3px; height: 4px;
  border-radius: 1.5px;
  background: #202630;
  animation: slideWave .78s ease-in-out infinite;
}
.slide-bars i:nth-child(2) { animation-delay: .12s; }
.slide-bars i:nth-child(3) { animation-delay: .24s; }
.slide-bars i:nth-child(4) { animation-delay: .36s; }
@keyframes slideWave {
  0%, 100% { height: 4px; opacity: .5; }
  45%      { height: 13px; opacity: 1; }
}
.slide-knob {
  position: absolute;
  left: 0; top: 0;
  width: 42px; height: 42px;
  border-radius: 8px;
  background: var(--yellow);
  color: #202630;
  display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
  will-change: transform;
  z-index: 2;
  transition: opacity .16s ease, box-shadow .16s ease;
}
.slide.dragging .slide-knob {
  box-shadow: 0 0 18px rgba(255, 240, 160, .85), 0 2px 10px rgba(0, 0, 0, .24);
}
.slide-knob .i { width: 21px; height: 21px; }
.slide.loading {
  cursor: default;
  box-shadow: 0 0 22px rgba(252, 213, 53, .36);
}
.slide.loading .slide-fill {
  width: 100% !important;
  border-radius: 8px;
}
.slide.loading .slide-knob { opacity: 0; pointer-events: none; }
.slide.loading .slide-label,
.slide.loading .slide-drag-hint { opacity: 0 !important; }
.slide.loading .slide-loading-ui { opacity: 1; }
.slide.loading.ready-go .slide-bars { display: none; }
.slide.disabled { background: var(--panel); cursor: not-allowed; }
.slide.disabled .slide-fill, .slide.disabled .slide-knob, .slide.disabled .slide-drag-hint, .slide.disabled .slide-loading-ui { display: none; }
.slide.disabled .slide-label { color: #6f7887; font-weight: 400; }
.slide.disabled .slide-label .gem { opacity: .55; }

/* ===== 底部导航 ===== */
.tabbar {
  display: flex; justify-content: space-around; align-items: flex-start;
  height: 56px; flex: none;
  padding-top: 4px;
  background: var(--bg);
}
.page-gacha .tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; }
.tabbar button {
  background: none; border: 0; color: #707a8a;
  font-size: 11px; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 4px 22px;
}
.tabbar button.active { color: var(--yellow); }
.tabbar .ti { width: 26px; height: 26px; }

/* ===== 市场 ===== */
.market-body {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 90px;
  overflow: hidden;
}
.market-pack-wrap {
  width: 100%;
  height: 400px;
  display: grid; place-items: center;
  position: relative;
}
.market-pack-wrap::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(252, 213, 53, .12), transparent 70%);
  filter: blur(10px);
}
.market-pack {
  width: 250px; height: auto;
  transform: rotate(-12deg) translateY(-6px);
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, .6));
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
}
.market-body h2 { font-size: 29px; font-weight: 700; margin: 0 0 12px; letter-spacing: .5px; }
.market-body p { font-size: 14px; color: var(--dim); margin: 0; }

/* ===== 我的 ===== */
.mine-tabs {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 16px;
  flex: none;
}
.mine-tabs-l { display: flex; gap: 22px; }
.mine-tab {
  position: relative;
  background: none; border: 0;
  color: var(--dim);
  font-size: 17px; font-family: inherit;
  padding: 2px 2px 13px;
  cursor: pointer;
}
.mine-tab.active { color: var(--text); }
.mine-tab.active::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 4px;
  height: 3px; border-radius: 2px;
  background: var(--yellow);
}
.mine-tabs-r { display: flex; align-items: center; gap: 14px; padding-bottom: 6px; }
.mine-body { flex: 1; position: relative; overflow: hidden; }
#mineCollect { padding: 16px; }
.ghost-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.ghost {
  height: 218px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .022);
  position: relative;
}
.ghost i {
  position: absolute; inset: 10px;
  border: 1px dashed rgba(255, 255, 255, .055);
  border-radius: 6px;
}
.empty-fade {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 415px;
  background: linear-gradient(to bottom,
    rgba(32, 38, 48, 0) 0%,
    rgba(32, 38, 48, .55) 24%,
    var(--bg) 52%);
}
.empty-fade h2 { font-size: 25px; font-weight: 700; margin: 0 0 10px; }
.empty-fade p { font-size: 13.5px; color: var(--dim); margin: 0 0 22px; }
.gold-btn {
  background: var(--yellow);
  color: #202630;
  border: 0; border-radius: 8px;
  height: 46px;
  min-width: 84px;
  padding: 0 22px;
  font-size: 16px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.gold-btn.wide { width: 100%; }
.gold-btn:active { filter: brightness(.93); }

/* ===== 我的-记录 ===== */
.txn-list { padding: 6px 16px 20px; overflow-y: auto; height: 100%; scrollbar-width: none; }
.txn-list::-webkit-scrollbar { display: none; }
.txn {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}
.txn-main { flex: 1; min-width: 0; }
.txn-tag {
  display: inline-block;
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--panel);
  color: #cfd4dc;
}
.txn-tag.buyback { background: rgba(46, 189, 133, .12); color: var(--green); }
.txn-title {
  font-size: 15.5px; font-weight: 600;
  margin: 11px 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.txn-sub {
  font-size: 12.5px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.txn-line {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 17px;
  font-size: 13.5px;
  color: var(--dim);
}
.txn-line b { color: var(--text); font-size: 16px; font-weight: 600; }
.txn-thumb {
  width: 58px; height: 76px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .07);
  flex: none;
}
.txn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== 全部卡包 ===== */
.allpacks-body { flex: 1; overflow-y: auto; padding: 8px 16px 30px; scrollbar-width: none; }
.allpacks-body::-webkit-scrollbar { display: none; }
.allpacks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ap-card {
  background: var(--panel);
  border-radius: 10px;
  padding: 12px 12px 10px;
  display: flex; flex-direction: column;
  cursor: pointer;
  border: 0; color: var(--text); font-family: inherit; text-align: left;
  transition: transform .15s ease;
}
.ap-card:active { transform: scale(.985); }
.ap-img {
  height: 160px;
  display: grid; place-items: center;
  position: relative;
}
.ap-img::before {
  content: "";
  position: absolute;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(252, 213, 53, .13), transparent 68%);
  filter: blur(6px);
}
.ap-img img {
  height: 168px; width: auto;
  position: relative;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55));
}
.ap-name { font-size: 16px; font-weight: 600; margin-top: 6px; }
.ap-max { font-size: 13px; color: var(--green); margin-top: 5px; }
.ap-foot {
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: flex; align-items: center; justify-content: space-between;
}
.ap-price { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; }
.ap-price .gem { width: 16px; height: 16px; }
.ap-back { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--dim); }
.ap-back .i { width: 15px; height: 15px; }

/* ===== 弹层 ===== */
.overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 50;
  display: flex; align-items: flex-end;
}
.sheet {
  width: 100%;
  max-height: 92%;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  animation: sheetUp .28s cubic-bezier(.2,.8,.25,1);
  overflow: hidden;
}
.sheet.full { height: calc(100% - 76px); max-height: none; }
.sheet.tall { height: 60%; }
.sheet.small { max-height: 60%; }
@keyframes sheetUp { from { transform: translateY(18%); opacity: .6; } to { transform: none; opacity: 1; } }
.grabber {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: #3a414d;
  margin: 9px auto 0;
  flex: none;
}
.sheet-scroll { overflow-y: auto; padding: 16px 24px 24px; scrollbar-width: none; flex: 1; min-height: 0; }
.sheet.full .sheet-scroll, .sheet.full .sheet-pad { padding-top: 46px; }
.sheet-scroll::-webkit-scrollbar { display: none; }
.sheet-pad { padding: 10px 24px 30px; }
.sheet-pad-b { padding: 10px 24px 14px; }
.sheet-title { font-size: 22px; font-weight: 700; margin: 6px 0 18px; letter-spacing: .2px; }
.sheet-desc { font-size: 15px; line-height: 1.62; color: #cfd4dc; margin: 0 0 8px; }
.sheet-note { font-size: 12.5px; line-height: 1.75; color: var(--dim); margin: 22px 0 0; }
.sheet-foot { flex: none; padding: 10px 24px 30px; }
.close-sheet { margin-top: 26px; }

/* 抽卡记录 */
.rec-list { display: flex; flex-direction: column; }
.rec-row {
  display: flex; align-items: center; gap: 15px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.rec-thumb {
  width: 54px; height: 74px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--panel);
  flex: none;
}
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-name { flex: 1; min-width: 0; font-size: 16.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-price { display: flex; align-items: center; gap: 5px; font-size: 16.5px; font-weight: 500; }
.rec-price .gem { width: 16px; height: 16px; }

/* 社区回购 */
.bb-table { margin-top: 24px; }
.bb-table > div {
  display: flex; align-items: center; justify-content: space-between;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}
.bb-table b { font-size: 22px; font-weight: 700; }
.bb-table span { font-size: 14px; color: #cfd4dc; }
.bb-table > div:last-child b { font-size: 17px; }

/* 充值 */
.topup-list { display: flex; flex-direction: column; gap: 13px; margin-top: 4px; }
.topup-item {
  display: flex; align-items: center; gap: 15px;
  background: #272e39;
  border: 0; border-radius: 10px;
  padding: 24px 16px;
  color: var(--text); font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.topup-item:active { filter: brightness(1.08); }
.tu-ico { width: 34px; height: 34px; display: grid; place-items: center; color: #e6e9ee; flex: none; }
.tu-ico .i { width: 24px; height: 24px; }
.tu-txt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tu-txt b { font-size: 16.5px; font-weight: 600; }
.tu-txt em { font-style: normal; font-size: 12.5px; color: var(--dim); }

/* 玩法介绍 */
.sheet-pad h3.step-title { font-size: 19px; font-weight: 700; margin: 6px 0 10px; }
.step-desc { font-size: 14.5px; line-height: 1.72; color: #b7bdca; margin: 0 0 22px; }
.howto-visual {
  background: #050505;
  border-radius: 10px;
  overflow: hidden;
  margin: 6px 0 26px;
}
.howto-visual.packs {
  height: 250px;
  position: relative;
}
.stack-pack { position: absolute; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .8)); }
.stack-pack img { width: 100%; display: block; }
.stack-pack.lucky  { width: 60%; left: -13%; top: 43%; transform: rotate(-19deg); z-index: 1; }
.stack-pack.gold   { width: 60%; left: 12%;  top: 31%; transform: rotate(-6deg);  z-index: 2; }
.stack-pack.silver { width: 60%; right: 19%; top: 12%; transform: rotate(9deg);   z-index: 3; }
.stack-pack.bronze { width: 60%; right: -12%; top: -2%; transform: rotate(20deg); z-index: 4; }
.howto-visual.open {
  height: 300px;
  display: grid; place-items: center;
  position: relative;
}
.howto-visual.open::before {
  content: "";
  position: absolute;
  left: 6%; top: 8%; bottom: 8%;
  width: 40%;
  border: 1px solid rgba(255, 255, 255, .3);
  border-right: 0;
  border-radius: 90px 0 0 90px;
}
.open-track {
  position: relative;
  width: 82%;
  height: 96px;
  margin-left: 8%;
  border-radius: 48px;
  background: linear-gradient(90deg, rgba(252, 213, 53, .05) 0%, #fcd535 55%);
  display: flex; align-items: center;
  box-shadow: 0 0 60px rgba(252, 213, 53, .22);
}
.open-knob {
  position: absolute; left: 6px;
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--yellow);
  display: grid; place-items: center;
  font-size: 34px; color: #202630; font-weight: 600;
  box-shadow: 0 0 0 12px rgba(252, 213, 53, .1), 0 0 46px rgba(252, 213, 53, .45);
}
.open-word {
  margin-left: auto; margin-right: 8%;
  font-size: 40px; font-weight: 700; color: #202630;
  letter-spacing: .5px;
}
.howto-visual.gold {
  height: 280px;
  display: grid; place-items: center;
}
.howto-visual.gold img { width: 64%; border-radius: 6px; display: block; }

/* 帮助 */
.sheet.full.help-sheet { position: relative; height: calc(100% - 26px); }
.help-sheet .help-scroll { padding-top: 16px; }
.help-sheet .sheet-title { margin-bottom: 6px; }
.help-scroll { padding-bottom: 100px; }
.help-item { border-bottom: 1px solid var(--line); }
.help-q {
  width: 100%;
  background: none; border: 0;
  color: var(--text); font-family: inherit;
  font-size: 16px; font-weight: 400;
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 0;
  text-align: left;
  cursor: pointer;
}
.help-q .i { width: 18px; height: 18px; color: var(--dim); transition: transform .2s ease; transform: rotate(90deg); }
.help-item.open .help-q .i { transform: rotate(-90deg); }
.help-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
  font-size: 14.5px;
  line-height: 1.72;
  color: #c3c9d4;
  padding-right: 16px;
}
.help-a p { margin: 0 0 14px; }
.help-item.open .help-a { max-height: 320px; padding-bottom: 20px; }
.help-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 12px;
  padding: 12px 24px 30px;
  background: linear-gradient(to top, var(--bg) 70%, rgba(32, 38, 48, .9));
}
.help-foot button {
  flex: 1; height: 46px;
  border: 0; border-radius: 8px;
  font-size: 16px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.ghost-btn { background: #2f3742; color: var(--text); }

/* 筛选 */
.filter-label { font-size: 14px; color: var(--dim); margin: 2px 0 12px; }
.filter-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill {
  height: 50px;
  background: #262d38;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cfd4dc;
  font-size: 15px; font-family: inherit;
  cursor: pointer;
}
.pill.active { border-color: #fff; background: #2d343f; color: #fff; }
.filter-foot {
  display: flex; gap: 12px;
  padding: 14px 24px 30px;
}
.filter-foot button {
  flex: 1; height: 46px;
  border: 0; border-radius: 8px;
  font-size: 16px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* Toast */
.toast {
  position: absolute;
  left: 50%; bottom: 130px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 90;
  white-space: nowrap;
}

/* 顶部悬浮回收提醒横幅 */
.buyback-notice {
  position: absolute;
  left: 16px; right: 16px;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(29, 35, 45, .95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .48), 0 2px 8px rgba(0, 0, 0, .28);
  color: #f5f7fa;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-16px) scale(.98);
  transition: transform .26s cubic-bezier(.22, 1, .36, 1), opacity .22s ease;
}
html.in-dimina .buyback-notice {
  top: calc(max(env(safe-area-inset-top, 0px), 34px) + 12px);
}
.buyback-notice.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.buyback-notice .bn-ico {
  width: 22px; height: 22px;
  flex: none;
  display: grid; place-items: center;
  color: var(--green);
}
.buyback-notice[data-variant="warn"] .bn-ico { color: var(--s-gold); }
.buyback-notice[data-variant="error"] .bn-ico { color: #f6465d; }
.buyback-notice .bn-ico svg { width: 22px; height: 22px; display: block; }
.buyback-notice .bn-text {
  flex: 1; min-width: 0;
  font-size: 14.5px; font-weight: 500; line-height: 1.4;
  color: #f5f7fa;
  word-break: break-word;
}
.buyback-notice .bn-amt { font-weight: 700; color: #ffffff; }
.buyback-notice .bn-chev {
  width: 16px; height: 16px;
  flex: none;
  color: rgba(255, 255, 255, .48);
}

/* ===== 开包特效 ===== */
.fx {
  position: absolute; inset: 0;
  background: #000;
  display: grid; place-items: center;
  z-index: 20;
  overflow: hidden;
}
.fx-bg {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 48%, #221a06 0%, #0a0906 45%, #000 100%);
  opacity: 0;
  animation: fxBgIn .9s ease forwards;
}
@keyframes fxBgIn { to { opacity: 1; } }
.fx-rays {
  position: absolute;
  width: 900px; height: 900px;
  background: conic-gradient(from 0deg,
    transparent 0deg, rgba(255,214,84,.62) 4deg, transparent 9deg,
    transparent 30deg, rgba(255,244,196,.50) 34deg, transparent 38deg,
    transparent 70deg, rgba(255,214,84,.56) 75deg, transparent 80deg,
    transparent 120deg, rgba(255,244,196,.44) 124deg, transparent 129deg,
    transparent 170deg, rgba(255,214,84,.58) 175deg, transparent 180deg,
    transparent 220deg, rgba(255,244,196,.46) 225deg, transparent 230deg,
    transparent 270deg, rgba(255,214,84,.54) 275deg, transparent 280deg,
    transparent 320deg, rgba(255,244,196,.44) 324deg, transparent 329deg,
    transparent 360deg);
  filter: blur(1.5px) saturate(1.15);
  opacity: 0;
  animation: raysIn .7s ease-out forwards, raysSpin 14s linear infinite;
  mix-blend-mode: screen;
}
@keyframes raysIn { to { opacity: 1; } }
@keyframes raysSpin { to { transform: rotate(360deg); } }
.fx-orb {
  position: absolute;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe0 0%, #fcd535 24%, rgba(252,180,40,.42) 50%, transparent 72%);
  filter: blur(6px);
  opacity: 0;
  animation: orbIn .5s ease-out forwards, orbPulse 1.15s ease-in-out infinite .5s;
}
@keyframes orbIn { to { opacity: 1; } }
@keyframes orbPulse {
  0%, 100% { transform: scale(.86); opacity: .8; }
  50% { transform: scale(1.2); opacity: 1; }
}
.fx-pack-wrap {
  position: relative;
  z-index: 2;
  animation: packShakeMild .14s linear infinite;
}
.fx.urgent .fx-pack-wrap { animation: packShakeHard .085s linear infinite; }
@keyframes packShakeMild {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-1.5px, .8px) rotate(-.25deg); }
  50%      { transform: translate(1.2px, -1px) rotate(.2deg); }
  75%      { transform: translate(-.8px, -.6px) rotate(-.15deg); }
}
@keyframes packShakeHard {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-3px, 1.6px) rotate(-.7deg); }
  50%      { transform: translate(2.6px, -2.1px) rotate(.6deg); }
  75%      { transform: translate(-1.8px, -1.2px) rotate(-.45deg); }
}
.fx-leak {
  position: absolute;
  left: 50%; top: calc(50% + 108px);
  width: 210px; height: 74px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255, 232, 150, .95), rgba(255, 190, 60, .55) 45%, transparent 72%);
  filter: blur(16px);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}
.fx.leaking .fx-leak { animation: leakUp 1.1s ease-in forwards; }
@keyframes leakUp { from { opacity: 0; } to { opacity: .95; } }
.fx-pack {
  display: block;
  width: 168px;
  filter: drop-shadow(0 0 46px rgba(255,205,60,.7));
  transform: scale(.32);
  animation: packGrow 1.5s cubic-bezier(.22,.9,.24,1) forwards;
}
@keyframes packGrow {
  0%   { transform: scale(.30) translateY(0); opacity: 0; }
  12%  { opacity: 1; }
  60%  { transform: scale(.78); }
  100% { transform: scale(1.02); }
}
.fx-video {
  position: absolute;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .12s linear;
  z-index: 3;
}
.fx-video.on { opacity: 1; }
.fx-flash {
  position: absolute; inset: 0;
  background: #fff;
  opacity: 0;
  z-index: 4;
  pointer-events: none;
}
.fx-flash.on { animation: flashUp .36s ease-in forwards; }
@keyframes flashUp {
  0% { opacity: 0; }
  65% { opacity: 1; }
  100% { opacity: 1; }
}
.fx-skip {
  position: absolute;
  right: 16px; bottom: 28px;
  background: rgba(255,255,255,.08);
  border: 0; color: #cfd3da;
  font-size: 12px; font-family: inherit;
  padding: 7px 14px; border-radius: 20px;
  cursor: pointer; z-index: 5;
  backdrop-filter: blur(6px);
}

/* ===== 卡点闪光（由 BGM 时钟实时触发） ===== */
.beat-flash {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 38%, rgba(255,255,255,.28) 0%, transparent 62%);
  opacity: 0;
}
.beat-flash.pulse { animation: beatHit .34s ease-out forwards; }
.beat-flash.pulse-big {
  background: radial-gradient(ellipse at 50% 42%, rgba(255,255,255,.65) 0%, rgba(255,236,170,.22) 48%, transparent 76%);
  animation: beatBig .55s ease-out forwards;
}
@keyframes beatHit { 0% { opacity: .88; } 100% { opacity: 0; } }
@keyframes beatBig { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ===== 揭示页 ===== */
.reveal {
  position: absolute; inset: 0;
  z-index: 30;
  overflow: hidden;
  perspective: 1000px;
  background: #070e12;
}
.reveal-bg-base {
  position: absolute; inset: -4%;
  background-image: url(assets/bg/b7.webp);
  background-size: 100% auto;
  background-position: center 92%;
  background-repeat: no-repeat;
  opacity: .72;
  pointer-events: none;
}
.reveal-bg {
  position: absolute; inset: -4%;
  background-size: 100% auto;
  background-position: center 100%;
  background-repeat: no-repeat;
  transform: scale(1.02);
  opacity: 0;
  transition: opacity .85s ease, background-position 2.4s cubic-bezier(.16,.84,.3,1);
  pointer-events: none;
}
.reveal.lit-bg .reveal-bg,
.reveal.revealed .reveal-bg {
  opacity: 1;
  background-position: center 74%;
  animation: bgDrift 9s ease-out forwards;
}
@keyframes bgDrift { to { transform: scale(1.08); } }
.reveal-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 32%, rgba(0,0,0,.46) 80%),
    linear-gradient(to bottom, rgba(0,0,0,.32), transparent 26%, transparent 62%, rgba(0,0,0,.56));
  pointer-events: none;
  z-index: 1;
}
.reveal-fx {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
}
.close {
  position: absolute;
  top: max(18px, calc(env(safe-area-inset-top, 0px) + 10px));
  right: 16px;
  width: 34px; height: 34px;
  background: none; border: 0; color: rgba(255,255,255,.88);
  font-size: 20px; cursor: pointer; z-index: 8;
}
.reveal-skip {
  position: absolute;
  left: 50%; bottom: 10.5%;
  transform: translateX(-50%);
  z-index: 8;
  background: rgba(255,255,255,.10);
  border: 0;
  color: rgba(255,255,255,.95);
  font-size: 16px; font-weight: 500; font-family: inherit;
  padding: 10px 26px; border-radius: 10px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
  transition: opacity .28s ease;
}
.reveal.revealed .reveal-skip {
  opacity: 0;
  pointer-events: none;
}
.showcase {
  position: absolute;
  top: 18.5%; left: 0; right: 0;
  z-index: 6;
  text-align: center;
  pointer-events: none;
  transition: opacity .5s ease;
}
.show-item {
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  transform: translateY(18px) scale(.9);
  transition: opacity .38s ease, transform .38s ease;
}
.show-item.active { opacity: 1; transform: none; }
.show-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .5px;
  color: rgba(255,255,255,.78);
  margin-bottom: 22px;
}
.show-value {
  font-size: 50px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0,0,0,.25);
  letter-spacing: .4px;
  line-height: 1.12;
}
.tags {
  position: absolute;
  top: 11.2%;
  left: 50%;
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.11);
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px; font-weight: 500; letter-spacing: .2px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .45s ease, transform .45s ease;
  z-index: 6;
}
.tags.visible { opacity: 1; transform: translate(-50%, 0); }
.tags .tag { white-space: nowrap; }
.tags .sep { margin: 0 10px; width: 1px; height: 12px; background: rgba(255,255,255,.32); display: inline-block; }
.slab {
  position: absolute;
  left: 50%;
  top: var(--rev-top, 18.3%);
  z-index: 3;
  perspective: 1200px;
  transform-origin: 50% 0%;
  transform: translateX(-50%) translateY(var(--pre-y, 30.8dvh)) scale(var(--pre-scale, 1.24));
  transition: transform .72s cubic-bezier(.22,.85,.25,1), filter .24s ease;
  will-change: transform;
}
.slab.revealed {
  transform: translateX(-50%) translateY(0) scale(1);
  animation: slabIdleFloat 4.2s ease-in-out .74s infinite;
}
@keyframes slabIdleFloat {
  0%, 100% { transform: translateX(-50%) translateY(0px) scale(1); }
  50%      { transform: translateX(-50%) translateY(-9px) scale(1); }
}
.slab.hit {
  filter: brightness(1.38) drop-shadow(0 -14px 32px rgba(175, 224, 255, .92));
}
.slab.struck { animation: slabStruck .82s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes slabStruck {
  0%   { translate: 0 0; rotate: 0deg; }
  12%  { translate: 0 11px; rotate: -1.4deg; }
  26%  { translate: -6px 4px; rotate: 1.3deg; }
  42%  { translate: 5px -2px; rotate: -1deg; }
  60%  { translate: -3px 1px; rotate: .6deg; }
  80%  { translate: 2px 0; rotate: -.3deg; }
  100% { translate: 0 0; rotate: 0deg; }
}
.card3d {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
}
.slab.revealed .card3d { animation: flipIn .68s cubic-bezier(.32,.78,.28,1) forwards; }
@keyframes flipIn {
  0%   { transform: rotateY(180deg); }
  100% { transform: rotateY(0deg); }
}
.face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.front { position: relative; filter: drop-shadow(0 22px 36px rgba(0, 0, 0, .55)); }
.face.back { position: absolute; inset: 0; transform: rotateY(180deg); filter: drop-shadow(0 22px 36px rgba(0, 0, 0, .55)); }
.face.back img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
  clip-path: inset(4.0% 2.15% 3.0% 3.25% round 4.8% / 2.7%);
}
.slab::before {
  content: "";
  position: absolute;
  inset: -110px -90px -70px;
  background: radial-gradient(ellipse at 50% 46%, rgba(255,255,255,.26), rgba(255,255,255,.08) 42%, transparent 68%);
  filter: blur(26px);
  z-index: -1;
  pointer-events: none;
  opacity: .12;
  transition: opacity .7s ease;
}
.reveal.lit-bg .slab::before,
.slab.revealed::before { opacity: 1; }
.slab::after {
  content: "";
  position: absolute;
  inset: -80px -120px;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 18% 22%, rgba(255,255,255,.9), transparent),
    radial-gradient(1.5px 1.5px at 82% 16%, rgba(255,255,255,.75), transparent),
    radial-gradient(2px 2px at 74% 78%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.5px 1.5px at 26% 66%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 58% 8%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 12% 88%, rgba(255,255,255,.55), transparent);
  animation: sparkle 3.2s ease-in-out infinite;
  opacity: .48;
  transition: opacity .7s ease;
}
.slab.revealed::after { opacity: .88; }
@keyframes sparkle {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
.slab-sheen {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}
.slab-sheen::after {
  content: "";
  position: absolute;
  top: -30%; bottom: -30%;
  left: -95%; width: 72%;
  background: linear-gradient(112deg, transparent 15%, rgba(255,255,255,.58) 48%, rgba(255,248,210,.26) 62%, transparent 82%);
  transform: skewX(-18deg);
  opacity: 0;
}
.slab.revealed .slab-sheen::after {
  animation:
    revealSheen 1.1s cubic-bezier(.2, .8, .25, 1) .36s 1,
    revealSheenIdle 3.2s cubic-bezier(.36, .08, .28, .96) 1.85s infinite;
}
@keyframes revealSheen {
  0%   { left: -95%; opacity: 0; }
  18%  { opacity: .95; }
  100% { left: 145%; opacity: 0; }
}
@keyframes revealSheenIdle {
  0%   { left: -95%; opacity: 0; }
  10%  { opacity: .78; }
  48%  { opacity: .78; }
  60%  { left: 145%; opacity: 0; }
  100% { left: 145%; opacity: 0; }
}
.slab-case {
  position: relative;
  width: 288px;
  aspect-ratio: .615;
  border-radius: 12px;
  padding: 10px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.06) 16%, rgba(0,0,0,.28) 52%, rgba(255,255,255,.16) 88%),
    linear-gradient(#2f3237, #191b1f);
  box-shadow:
    0 26px 60px rgba(0,0,0,.62),
    inset 0 0 0 1px rgba(255,255,255,.16),
    inset 0 -14px 26px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
  gap: 6px;
}
.slab-case::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 12px;
  background: linear-gradient(115deg, transparent 34%, rgba(255,255,255,.16) 44%, transparent 54%);
  pointer-events: none;
}
.slab-inner { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
.slab-case.photo { padding: 0; background: none; box-shadow: none; }
.slab-case.real { background: transparent; box-shadow: none; width: min(268px, 27.5dvh); aspect-ratio: 800 / 1420; }
.slab-case.real .slab-photo {
  object-fit: contain;
  border-radius: 0;
  clip-path: inset(4.0% 2.15% 3.0% 3.25% round 4.8% / 2.7%);
}
.slab-case.real .slab-sheen {
  border-radius: 0;
  clip-path: inset(4.0% 2.15% 3.0% 3.25% round 4.8% / 2.7%);
}
.slab-case.photo::after { display: none; }
.slab-case.photo .slab-inner { display: none; }
.slab-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.slab-label {
  position: relative;
  background: #f5f5f2;
  border-radius: 3px;
  padding: 6px 8px 13px;
  color: #111;
  height: 22%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
  overflow: hidden;
}
.lab-l { width: 56%; }
.lab-l p { margin: 0; font-size: 6px; font-weight: 600; letter-spacing: .1px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-l p:nth-child(2) { font-size: 8.5px; font-weight: 800; margin-top: 2px; }
.lab-r { position: absolute; top: 5px; right: 7px; width: 30%; text-align: right; }
.lab-r p { margin: 0; font-size: 7px; font-weight: 700; line-height: 1.35; }
.lab-r p#labTen { font-size: 12px; line-height: 1.1; }
.lab-r p#labCert { font-size: 5.5px; font-weight: 500; color: #444; }
.lab-logo { position: absolute; left: 62%; top: 34%; transform: translateX(-50%); font-size: 11px; font-weight: 900; color: #c8102e; letter-spacing: .3px; font-style: italic; }
.lab-bar {
  position: absolute; left: 8px; right: 8px; bottom: 3px; height: 7px;
  background: repeating-linear-gradient(90deg,
    #111 0 1px, transparent 1px 3px,
    #111 3px 4px, transparent 4px 5px,
    #111 5px 8px, transparent 8px 11px);
  opacity: .85;
}
.slab-card { flex: 1; border-radius: 3px; overflow: hidden; background: #0d0f12; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
.card-art {
  position: relative;
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.26), transparent 46%),
    conic-gradient(from 210deg at 50% 60%, #3b2a4d, #1c2740, #2c3f36, #4a3418, #3b2a4d);
  font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,.5);
  font-weight: 600;
}
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-sheen {
  position: absolute; inset: -40%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.22) 48%, transparent 56%);
  animation: sheen 3.6s ease-in-out 1s infinite;
}
@keyframes sheen {
  0%, 100% { transform: translateX(-32%); }
  50% { transform: translateX(32%); }
}
.price {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(102px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease .15s, transform .45s ease .15s;
}
.price.visible { opacity: 1; transform: none; }
.price b { font-size: 36px; font-weight: 700; letter-spacing: -.5px; }
.price span { font-size: 13px; color: rgba(255,255,255,.62); }
.actions {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  display: flex; gap: 12px;
  width: 100%; padding: 14px 18px calc(26px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  transition: opacity .45s ease .35s;
}
.actions.visible { opacity: 1; }
.actions button {
  flex: 1; height: 46px; border: 0; border-radius: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.ghost { background: rgba(255,255,255,.1); color: #f2f4f7; backdrop-filter: blur(8px); }
.sell { background: var(--yellow); color: #0b0e11; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ===== 移动端（360px–430px 实机逻辑宽度）1:1 视觉比例校准（对齐原版 360dp 基准） ===== */
@media (max-width: 520px) {
  svg.i { width: 19px; height: 19px; }
  .gem { width: 14px; height: 14px; vertical-align: -2px; }
  .chev { width: 17px; height: 17px; }

  /* 顶栏 */
  .topbar { height: 46px; padding: 0 12px; }
  html.in-dimina .topbar {
    height: calc(46px + max(env(safe-area-inset-top, 0px), 28px));
    padding-top: max(env(safe-area-inset-top, 0px), 28px);
  }
  .topbar h1 { font-size: 16.5px; }
  .topbar-spacer, .icon-btn { width: 30px; height: 30px; }
  .icon-btn .i { width: 20px; height: 20px; }
  .icon-btn.small { width: 26px; height: 26px; }
  .icon-btn.small .i { width: 18px; height: 18px; }

  /* 抽卡主滚动区 */
  .gacha-scroll { top: 46px; bottom: 50px; padding: 0 14px 24px; }
  html.in-dimina .gacha-scroll {
    top: calc(46px + max(env(safe-area-inset-top, 0px), 28px));
  }

  /* 卡包横向选择条 */
  .packs-row { margin: 2px 0 2px; }
  .packs-row::before { left: -14px; width: 42px; }
  .packs-strip { gap: 8px; padding-right: 36px; }
  .pack-item { height: 48px; min-width: 76px; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 7px; }
  .pack-item img { width: 24px; height: 40px; }
  .pack-item .pi-txt { gap: 2px; }
  .pack-item .pi-name { font-size: 13.5px; }
  .pack-item .pi-price { font-size: 11px; }
  .packlist-btn { width: 38px; height: 48px; padding-left: 10px; }
  .packlist-btn .i { width: 19px; height: 19px; }

  /* 首屏大卡包与倒影（对齐实机 39.6% 屏宽，且矮屏不裁切） */
  .hero { min-height: 220px; margin: 0 -14px; padding-top: 4px; }
  .hero-glow { width: 350px; height: 350px; margin-left: -175px; margin-top: -175px; }
  .hero-stack { --pack-w: min(clamp(198px, 60vw, 232px), 26.5dvh); }
  .hero-pack { width: 100%; max-height: 39.5dvh; object-fit: contain; }
  .hero-reflect-wrap { width: 100%; height: 62px; margin-top: -14px; }
  .hero-reflect { width: 100%; }
  .hero-stack::after { bottom: -10px; width: 150px; height: 20px; }

  /* 三项数据 */
  .stats { padding: 0 0 14px; }
  .stats > div { gap: 4px; }
  .stats b { font-size: 14.5px; }
  .stats span { font-size: 11px; }
  .stats i { height: 22px; }

  /* 底部余额 / 数量 / 滑动开包栏（50/50 均分，不再被 176px 写死撑爆） */
  .dock { padding: 2px 0 12px; }
  .drawbar { gap: 8px; }
  .balance, .qty { height: 34px; border-radius: 7px; padding: 0 10px; }
  .balance { flex: 1 1 0; min-width: 0; gap: 7px; }
  .balance .gem { width: 15px; height: 15px; }
  .balance b { font-size: 14px; }
  .plus { width: 22px; height: 22px; }
  .plus .i { width: 16px; height: 16px; }
  .qty { flex: 1 1 0; width: auto; min-width: 0; padding: 0 10px; }
  .qty button { width: 26px; height: 28px; }
  .qty button .i { width: 15px; height: 15px; }
  .qty b { font-size: 14px; }

  .slide { margin-top: 8px; height: 38px; border-radius: 7px; }
  .slide-fill { width: 38px; border-radius: 7px 0 0 7px; }
  .slide-knob { width: 38px; height: 38px; border-radius: 7px; }
  .slide-knob .i { width: 18px; height: 18px; }
  .slide-label { font-size: 14px; gap: 6px; }
  .slide-label .gem { width: 14px; height: 14px; }
  .slide-drag-hint { font-size: 13.5px; }
  .slide-loading-ui { font-size: 14px; gap: 7px; }

  /* 底部 Tab 栏 */
  .tabbar { height: 50px; padding-top: 3px; }
  .tabbar button { font-size: 10.5px; gap: 2px; padding: 3px 18px; }
  .tabbar .ti { width: 22px; height: 22px; }

  /* 抽卡记录 / 卡包信息 / 内含卡片 */
  .records-preview { padding-top: 14px; }
  .rp-title { font-size: 15px; gap: 6px; }
  .rp-row { gap: 10px; padding: 6px 0; }
  .rp-thumb { width: 36px; height: 50px; }
  .rp-name, .rp-price { font-size: 14px; }
  .pack-info { padding-top: 20px; }
  .pack-info h2, .contents-head h2 { font-size: 15.5px; }
  .pack-info p, .provider { font-size: 13.5px; line-height: 1.6; }
  .contents { padding-top: 22px; }
  .grade-strip { padding: 10px 0 11px; gap: 6px; }
  .grade-chip { min-width: 118px; gap: 5px; padding: 8px 9px; }
  .grade-chip .gc-top { font-size: 13px; gap: 5px; }
  .grade-chip .gc-top .i { width: 13px; height: 13px; }
  .grade-chip .gc-meta { font-size: 11px; gap: 6px; }
  .card-row { gap: 8px; margin-bottom: 8px; }
  .card-meta { padding: 8px 10px 10px; }
  .card-name { font-size: 13.5px; }
  .card-price { margin-top: 6px; font-size: 14px; }
  .card-pct { font-size: 11.5px; }

  /* 市场 / 我的 / 全部卡包 */
  .market-pack-wrap { height: 290px; }
  .market-pack { width: 196px; }
  .market-body h2 { font-size: 22px; }
  .market-body p { font-size: 13px; }
  .mine-tabs { padding: 0 14px; }
  .mine-tabs-l { gap: 18px; }
  .mine-tab { font-size: 15px; padding: 2px 2px 10px; }
  #mineCollect { padding: 12px 14px; }
  .empty-fade { padding-top: 310px; }
  .empty-fade h2 { font-size: 20px; }
  .empty-fade p { font-size: 12.5px; }
  .gold-btn { height: 40px; font-size: 14.5px; padding: 0 18px; }
  .txn { padding: 14px 0 16px; gap: 10px; }
  .txn-title { font-size: 14px; margin: 8px 0 4px; }
  .txn-sub { font-size: 11.5px; }
  .txn-line { margin-top: 12px; font-size: 12.5px; }
  .txn-line b { font-size: 14px; }
  .txn-thumb { width: 48px; height: 64px; }
  .allpacks-body { padding: 6px 14px 24px; }
  .allpacks-grid { gap: 10px; }
  .ap-card { padding: 10px 10px 8px; }
  .ap-img { height: 130px; }
  .ap-img img { height: 136px; }
  .ap-name { font-size: 14px; }
  .ap-max { font-size: 11.5px; }
  .ap-price { font-size: 14.5px; }
  .ap-back { font-size: 11.5px; }

  /* 弹层 / 详情 / 揭示页 */
  .sheet-scroll { padding: 14px 18px 20px; }
  .sheet.full .sheet-scroll, .sheet.full .sheet-pad { padding-top: 34px; }
  .sheet-pad { padding: 8px 18px 24px; }
  .sheet-foot { padding: 8px 18px 24px; }
  .sheet-title { font-size: 18px; margin: 4px 0 14px; }
  .sheet-desc { font-size: 13.5px; }
  .rec-thumb { width: 44px; height: 60px; }
  .rec-name, .rec-price { font-size: 14px; }
  .bb-table b { font-size: 18px; }
  .topup-item { padding: 18px 14px; gap: 12px; }
  .tu-txt b { font-size: 14.5px; }
  .tu-txt em { font-size: 11.5px; }
  .detail-title { font-size: 17px; }
  .detail-buyback b { font-size: 19px; }
  .detail-sec-head { font-size: 15px; padding: 15px 0; }
  .card-view-img { height: 290px; }
  .slab { top: var(--rev-top, 18.3%); transform: translateX(-50%) translateY(var(--pre-y, 30.8dvh)) scale(var(--pre-scale, 1.24)); }
  .slab.revealed { transform: translateX(-50%) translateY(0) scale(1); }
  .slab-case { width: min(56.5vw, 27.5dvh); }
  .slab-case.real { width: min(56.5vw, 27.5dvh); }
  .showcase { top: 18.5%; }
  .show-label { font-size: 14px; letter-spacing: .5px; margin-bottom: 18px; }
  .show-value { font-size: 44px; letter-spacing: .3px; }
  .reveal-skip { bottom: 10.5%; font-size: 15.5px; padding: 9px 24px; border-radius: 10px; }
  .tags { top: 11.2%; padding: 8px 14px; font-size: 12px; }
  .price { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); gap: 4px; }
  .price b { font-size: 31px; }
  .actions { padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
  .actions button { height: 42px; font-size: 14px; }
}

@media (max-height: 740px) and (max-width: 520px) {
  .showcase { top: 16.5%; }
  .show-label { margin-bottom: 14px; }
  .show-value { font-size: 42px; }
}

@media (max-height: 700px) and (max-width: 520px) {
  .hero { min-height: 190px; }
  .hero-stack { --pack-w: min(clamp(166px, 50vw, 196px), 21.5dvh); }
  .hero-pack { width: 100%; max-height: 32dvh; }
  .hero-reflect-wrap { width: 100%; height: 44px; margin-top: -18px; }
  .stats { padding-bottom: 10px; }
  .dock { padding-bottom: 10px; }
}

/* ===== 卡牌详情 ===== */
.card-tile { cursor: pointer; }
.card-tile:active { transform: scale(.995); }
.card-scroll { padding-bottom: 34px; }
.sheet.full.card-sheet .sheet-scroll { padding-top: 18px; }
.card-sheet .sheet-title { margin-bottom: 8px; }
.card-view { display: flex; flex-direction: column; align-items: center; }
.card-view-img {
  position: relative;
  width: 100%;
  height: 360px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-view-img img { max-height: 100%; max-width: 88%; width: auto; height: auto; object-fit: contain; display: block; }
.card-expand {
  position: absolute;
  right: 6%; bottom: 4px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: none; border: 0; color: rgba(255,255,255,.85);
  cursor: pointer;
}
.card-expand .i { width: 19px; height: 19px; }
.card-dots { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 6px; }
.card-dots i { width: 6px; height: 6px; border-radius: 50%; background: #59616e; display: block; }
.card-dots i.active { background: #fff; }
.detail-grade {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  padding: 4px 9px;
  border-radius: 4px;
  background: #2d343f;
  font-size: 12px;
}
.detail-grade .i { width: 13px; height: 13px; }
.detail-grade[data-grade="S"] .i { color: var(--s-gold); }
.detail-grade[data-grade="A"] .i { color: var(--s-purple); }
.detail-grade[data-grade="B"] .i { color: var(--s-blue); }
.detail-grade[data-grade="C"] .i { color: var(--s-grey); }
.detail-title { font-size: 20px; line-height: 1.38; font-weight: 700; margin: 14px 0 12px; letter-spacing: .1px; overflow-wrap: anywhere; }
.detail-links { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--dim); flex-wrap: wrap; }
.detail-links b { color: #f0b90b; font-weight: 600; }
.detail-links i { width: 1px; height: 12px; background: rgba(255,255,255,.18); }
.detail-buyback { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.detail-buyback span { font-size: 13px; color: var(--dim); align-self: flex-start; }
.detail-buyback span.dotted { border-bottom: 1px dotted var(--dim); padding-bottom: 2px; }
.detail-buyback b { font-size: 22px; font-weight: 600; }
.detail-sec { margin-top: 26px; border-top: 1px solid var(--line); }
.detail-sec-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  background: none; border: 0; color: var(--text);
  font-family: inherit; font-size: 17px; font-weight: 600;
  cursor: pointer;
}
.detail-sec-head .chev { transform: rotate(90deg); color: var(--dim); transition: transform .2s ease; }
.detail-sec.open .detail-sec-head .chev { transform: rotate(-90deg); }
.detail-rows { display: none; padding-bottom: 10px; }
.detail-sec.open .detail-rows { display: block; }
.detail-row { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; font-size: 13.5px; }
.detail-row span { color: var(--dim); flex: none; }
.detail-row b { font-weight: 400; color: var(--text); text-align: right; word-break: break-word; }

/* 全屏卡图 */
.viewer {
  position: absolute; inset: 0;
  background: #000;
  z-index: 80;
  display: flex; flex-direction: column;
}
.viewer-close {
  position: absolute; top: 20px; right: 18px;
  width: 36px; height: 36px;
  background: none; border: 0; color: #fff;
  font-size: 20px; cursor: pointer; z-index: 2;
}
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 54px 22px 10px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.viewer-thumbs {
  flex: none;
  align-self: center;
  margin: 0 auto 28px;
  display: flex; gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #1b212b;
}
.viewer-thumbs button {
  width: 52px; height: 74px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  opacity: .5;
  cursor: pointer;
}
.viewer-thumbs button.active { opacity: 1; border-color: rgba(255,255,255,.9); }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== 我的-收藏卡片网格与操作栏（接入后端闭环） ===== */
.collect-grid {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
  padding-bottom: 24px;
}
.collect-grid::-webkit-scrollbar { display: none; }
.collect-card {
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.06);
}
.collect-card:active { transform: scale(.985); }
.collect-thumb {
  position: relative;
  aspect-ratio: 275 / 420;
  background: #171c24;
  overflow: hidden;
}
.collect-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 6px; }
.collect-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 99px;
  background: rgba(15,19,25,.82); color: var(--yellow);
  border: 1px solid rgba(252,213,53,.35);
}
.collect-badge.redeeming { color: #4a9cff; border-color: rgba(74,156,255,.4); }
.collect-badge.selling { color: #2ebd85; border-color: rgba(46, 189, 133, .45); }
.collect-meta { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.collect-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collect-sub { font-size: 11.5px; color: var(--dim); display: flex; justify-content: space-between; align-items: center; }
.collect-sub b { color: var(--green); font-weight: 600; }

.detail-actions {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 12px 20px 26px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.detail-actions button {
  flex: 1; height: 44px; border: 0; border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.detail-actions #btnDetailSell { flex: 1.5; }
.detail-actions button:disabled { opacity: .45; cursor: not-allowed; }

.admin-fab {
  position: fixed; right: 20px; bottom: 20px;
  padding: 9px 15px; border-radius: 99px;
  background: rgba(24, 30, 39, .92);
  color: var(--yellow);
  border: 1px solid rgba(252, 213, 53, .4);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
  z-index: 99;
}
.admin-fab:hover { filter: brightness(1.12); }
body.mobile .admin-fab { display: none !important; }

/* === Web3 钱包登录条与真实 BSC-USDT 充值面板 === */
.web3-auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 16px 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(240, 185, 11, .22);
}
.web3-auth-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.web3-auth-info b {
  font-size: 13px;
  font-weight: 700;
  color: #f5f7fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.web3-auth-info em {
  font-style: normal;
  font-size: 11px;
  color: rgba(255, 255, 255, .58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.web3-auth-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #fcd535, #f0b90b);
  color: #161a23;
  cursor: pointer;
}
.topup-amt-box {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.topup-amt-label {
  font-size: 12px;
  color: rgba(255, 255, 255, .66);
  margin-bottom: 8px;
}
.topup-amt-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.amt-chip {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
  color: #e6ebf5;
  border-radius: 8px;
  padding: 7px 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.amt-chip.active {
  background: rgba(240, 185, 11, .18);
  border-color: #f0b90b;
  color: #fcd535;
}
.topup-amt-input {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}
.topup-recv-tip {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, .52);
  word-break: break-all;
}
.topup-tx-box {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px;
}
.topup-tx-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
