/* ============================================================
   74B 逍遥馆 · 【逍遥馆】表嫂群
   视觉模板致敬 laplace.live/100bv：
   深紫暮夜舞台 × 体积光束 × 金属箔撕拉卡包 × 3D蓄力翻卡 × 霓虹光效图鉴
   ============================================================ */

:root {
  --bg-outer: #0d0c18;
  --bg-shell: #141323;
  --bg-stage: #12111e;
  --bg-card-surface: #1b192c;
  --bg-glass: rgba(24, 21, 38, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-bright: rgba(203, 196, 255, 0.28);

  --text-main: #f8f5ff;
  --text-sub: #a8a2c2;
  --text-dim: #736d8e;

  --accent-lav: #cbc4ff;
  --accent-lav-deep: #9d8df2;
  --accent-peach-a: #ffc4b8;
  --accent-peach-b: #f4a4b8;

  /* 稀有度视觉令牌（源自 Laplace 100bv） */
  --tier-N: #cad0e1;
  --bar-N: #8a90a6;
  --light-N: #afaec9;
  --charge-N: #e9ecf8;

  --tier-R: #7fbaff;
  --bar-R: #7fbaff;
  --light-R: #89bdff;
  --charge-R: #8fcaff;

  --tier-SR: #c99cff;
  --bar-SR: #c99cff;
  --light-SR: #c694ff;
  --charge-SR: #d6a8ff;

  --tier-SSR: #ffc46b;
  --bar-SSR: #ffc46b;
  --light-SSR: #f7bc76;
  --charge-SSR: #ffc861;

  --tier-UR: #ff9ee6;
  --bar-UR: linear-gradient(90deg, #ff9fe0, #99efff, #fff2a1);
  --light-UR: #ffb9da;
  --charge-UR: #ff9ee6;

  --tier-SP: #ff6b9d;
  --bar-SP: linear-gradient(90deg, #ff4d8d, #ff9852, #ffe680);
  --light-SP: #ff78a8;
  --charge-SP: #ff6699;

  --font-display: "DIN Condensed", "Barlow Condensed", "Bahnschrift", "Arial Narrow", "PingFang SC", sans-serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(114, 96, 204, 0.25), transparent 55%),
    radial-gradient(ellipse at 85% 95%, rgba(255, 169, 165, 0.14), transparent 52%),
    radial-gradient(ellipse at 50% 40%, rgba(45, 36, 82, 0.5), transparent 70%),
    var(--bg-outer);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.45;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 120;
}

/* 居中主应用容器（Laplace 19px 圆角玻璃框） */
.app-outer {
  max-width: 1020px;
  margin: 18px auto 108px;
  padding: 0 14px;
}

.app-shell {
  background: var(--bg-shell);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 19px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

/* ================= 顶部 Banner（Laplace 斜纹聚光灯横幅） ================= */
.game-banner {
  position: relative;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background:
    radial-gradient(ellipse at 78% -42%, rgba(132, 118, 197, 0.34), transparent 68%),
    linear-gradient(110deg, #181526, #262035 62%, #191728);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.game-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    116deg,
    transparent 0 8px,
    rgba(185, 171, 243, 0.09) 9px,
    transparent 10px 15px
  );
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000 72%);
  mask-image: linear-gradient(90deg, transparent 18%, #000 72%);
  pointer-events: none;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

/* Laplace 倾斜不对称圆角 App Icon */
.app-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px 4px 13px 4px;
  background: linear-gradient(135deg, #ffa9a5 0%, #ffcbba 48%, #dfcaff 100%);
  transform: rotate(-6deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 169, 165, 0.3);
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
}

.app-icon-inner {
  transform: rotate(6deg);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-icon-inner img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.banner-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.banner-title .num-grad {
  font-weight: 800;
  background: linear-gradient(105deg, #ffffff 0%, #c6bfff 38%, #b4b4ff 68%, #ffd6d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.banner-title .name-solid {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: #f8f5ff;
  letter-spacing: -0.02em;
}

.banner-pill {
  font-size: 11px;
  color: #dcd6ff;
  background: rgba(169, 138, 255, 0.16);
  border: 1px solid rgba(198, 191, 255, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
  align-self: center;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #ece8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
}

.circle-btn:hover {
  border-color: rgba(203, 196, 255, 0.65);
  background: rgba(169, 138, 255, 0.22);
}

.circle-btn.active {
  background: rgba(169, 138, 255, 0.28);
  border-color: rgba(203, 196, 255, 0.6);
  color: #fff;
}

/* ================= 等级 10段斜切进度条 + 概率 & 宝箱栏 ================= */
.level-strip {
  background: rgba(18, 17, 30, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 11px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.level-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.level-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.level-label {
  font-size: 14px;
  font-weight: 700;
  color: #f4f1ff;
}

.level-count {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}

.xp-segments {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  width: 248px;
}

.xp-seg {
  height: 7px;
  border-radius: 3px;
  transform: skewX(-18deg);
  background: rgba(255, 255, 255, 0.11);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.xp-seg.filled {
  background: linear-gradient(90deg, #b2a4ff, #ece8ff);
  box-shadow: 0 0 10px rgba(196, 184, 255, 0.65);
}

.xp-seg.flash {
  animation: segFlash 0.65s ease;
}

@keyframes segFlash {
  0% { background: #ffffff; box-shadow: 0 0 18px #fff; transform: skewX(-18deg) scaleY(1.4); }
  100% { background: linear-gradient(90deg, #b2a4ff, #ece8ff); transform: skewX(-18deg) scaleY(1); }
}

.level-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pity-mini {
  font-size: 12px;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.pity-mini .ssr-t { color: #ffc46b; font-weight: 700; }
.pity-mini .ur-t { color: #ff9ee6; font-weight: 700; }

.ghost-pill-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #dcd7f5;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.ghost-pill-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(203, 196, 255, 0.45);
  color: #fff;
}

.chest-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-sub);
  border-radius: 10px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.22s ease;
}

.chest-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.chest-btn.has-chest {
  background: linear-gradient(135deg, rgba(255, 196, 107, 0.25), rgba(255, 143, 177, 0.22));
  border-color: #ffc46b;
  color: #fff2d1;
  box-shadow: 0 0 18px rgba(255, 196, 107, 0.28);
  animation: chestPulse 1.8s infinite alternate;
}

@keyframes chestPulse {
  from { box-shadow: 0 0 12px rgba(255, 196, 107, 0.22); }
  to { box-shadow: 0 0 24px rgba(255, 158, 230, 0.5); }
}

/* ================= 视图切换 ================= */
.view-pane {
  display: none;
}

.view-pane.active {
  display: block;
}

/* ================= 舞台区（Laplace 体积光 + 同心雷达环 + 四角取景框） ================= */
.stage-canvas-wrap {
  --stage-light: #afaec9;
  position: relative;
  min-height: 515px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(84, 73, 120, 0.48), transparent 62%),
    var(--bg-stage);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 20px 28px;
  transition: background 0.45s ease;
  user-select: none;
}

/* 兼容旧版微信 X5/iOS WebView 的动态舞台聚光灯（不依赖 color-mix） */
.stage-canvas-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 520px;
  height: 520px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--stage-light) 0%, transparent 68%);
  opacity: 0.26;
  pointer-events: none;
  transition: background 0.45s ease;
}

/* 细微点阵网格 */
.stage-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* 2 道斜向体积光束 */
.stage-beams {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    linear-gradient(108deg, transparent 22%, rgba(224, 218, 255, 0.07) 30%, rgba(224, 218, 255, 0.02) 38%, transparent 45%),
    linear-gradient(108deg, transparent 54%, rgba(224, 218, 255, 0.055) 62%, rgba(224, 218, 255, 0.015) 69%, transparent 76%);
}

/* 同心雷达环 */
.stage-radar {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-radial-gradient(
    circle at 50% 54%,
    transparent 0 58px,
    rgba(255, 255, 255, 0.032) 59px 60px
  );
  -webkit-mask-image: radial-gradient(circle at 50% 54%, #000 18%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 54%, #000 18%, transparent 74%);
}

/* 左上 / 右下细 L 型取景框 */
.corner-tl, .corner-br {
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.22);
  border-style: solid;
}
.corner-tl { top: 20px; left: 22px; border-width: 1.5px 0 0 1.5px; }
.corner-br { bottom: 20px; right: 22px; border-width: 0 1.5px 1.5px 0; }

/* 舞台顶部左右角标（拆包中显示卡包名和 1 / 5） */
.stage-hud-top {
  position: absolute;
  top: 14px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.stage-hud-top.visible {
  opacity: 1;
}

.stage-pack-tag {
  font-size: 13px;
  color: #cdc7e6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-counter-pill {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 1px;
  color: #eae6ff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 2px 11px;
  border-radius: 999px;
}

/* 舞台底部椭圆阴影 */
.stage-floor-shadow {
  position: absolute;
  bottom: 58px;
  width: 390px;
  max-width: 82%;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(5, 4, 12, 0.72) 0%, rgba(5, 4, 12, 0.22) 55%, transparent 74%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 1;
}

/* ================= 金属箔撕拉卡包（Laplace 3D Foil Pack） ================= */
.pack-scene {
  position: relative;
  z-index: 6;
  perspective: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pack-scene.hidden {
  display: none;
}

.foil-pack-wrap {
  width: 234px;
  height: 316px;
  position: relative;
  transform-style: preserve-3d;
  cursor: pointer;
  animation: packFloat 4.8s ease-in-out infinite;
  transition: transform 0.16s ease-out;
  touch-action: none;
}

@keyframes packFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.foil-pack-wrap.tearing-away {
  animation: none;
  pointer-events: none;
}

/* 上半截可撕封口条 */
.foil-top-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 46px;
  z-index: 8;
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  background: var(--pack-foil, linear-gradient(125deg, #c6c7da 0%, #f4f3fb 26%, #8e8ea8 54%, #e5e2f5 78%, #797994 100%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 12px rgba(0, 0, 0, 0.35);
  transform-origin: left bottom;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.foil-pack-wrap.torn .foil-top-strip {
  transform: translate(65px, -85px) rotate(18deg) scale(0.92);
  opacity: 0;
}

/* 顶部金属锯齿压纹 */
.crimp-ridges {
  height: 15px;
  width: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.55) 0 2px,
      rgba(40, 36, 62, 0.42) 2px 4px,
      rgba(220, 216, 245, 0.35) 4px 5px
    );
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.crimp-ridges.bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.38);
}

/* 封口虚线与 >>> 滑动提示 */
.tear-strip-bar {
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(20, 18, 34, 0.52), rgba(20, 18, 34, 0.78));
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.65);
  position: relative;
}

.tear-progress-glow {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(214, 196, 255, 0.85), #ffffff);
  box-shadow: 0 0 18px #ffffff;
  pointer-events: none;
}

.tear-notch {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.78);
  z-index: 2;
}

.tear-chevrons {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: #fff;
  opacity: 0.9;
  z-index: 2;
  animation: chevSlide 1.3s ease-in-out infinite;
}

@keyframes chevSlide {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(4px); opacity: 1; }
}

/* 卡包主体 */
.foil-body {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  background: var(--pack-foil, linear-gradient(135deg, #c6c7da 0%, #f0eef9 22%, #6e6c88 52%, #dddaf0 78%, #6d6a87 100%));
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.65),
    0 0 36px rgba(190, 178, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  padding: 6px 8px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.32, 0, 0.67, 0), opacity 0.4s ease;
}

.foil-pack-wrap.torn .foil-body {
  transform: translateY(72px) scale(0.9);
  opacity: 0;
}

/* 金属箔扫光 */
.foil-gleam {
  position: absolute;
  inset: -25%;
  background: linear-gradient(
    115deg,
    transparent 34%,
    rgba(255, 255, 255, 0.45) 47%,
    rgba(198, 224, 255, 0.28) 52%,
    transparent 65%
  );
  transform: translateX(calc(var(--tilt-x, 0) * 40px - 10%));
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: overlay;
}

.foil-inner-art {
  flex: 1;
  background:
    radial-gradient(circle at 50% 52%, var(--pack-glow, rgba(164, 152, 240, 0.25)), rgba(18, 16, 30, 0.94) 70%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.foil-art-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  z-index: 2;
}

.foil-art-big {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 0.95;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.35);
}

.foil-art-sub {
  font-size: 13px;
  font-weight: 700;
  color: rgba(240, 236, 255, 0.9);
}

/* 中央霓虹狐狸雷达徽章（呼应 Laplace 赛博猫耳头 + 逍遥馆 UR 狐弦！） */
.foil-medallion {
  position: relative;
  width: 142px;
  height: 142px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.foil-medallion::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    transparent 0 11px,
    rgba(255, 255, 255, 0.16) 11.5px 12.5px
  );
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.foil-medallion svg {
  width: 96px;
  height: 96px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 14px var(--pack-accent, rgba(196, 184, 255, 0.7)));
}

.foil-corner-tri {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}
.foil-corner-tri.tl {
  top: 44px; left: 8px;
  border-width: 8px 10px 0 0;
  border-color: #ff8c7a transparent transparent transparent;
}
.foil-corner-tri.br {
  bottom: 34px; right: 8px;
  border-width: 0 0 8px 10px;
  border-color: transparent transparent #ff8c7a transparent;
}

.foil-footer-bar {
  margin-top: 6px;
  background: linear-gradient(90deg, rgba(235, 232, 252, 0.92), rgba(186, 182, 220, 0.9));
  border-radius: 3px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #1c1830;
  z-index: 2;
}

.foil-pack-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.foil-count-pill {
  background: #1a172b;
  color: #f3f0ff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

/* 提示胶囊 */
.stage-hint-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #d6d1ef;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
}

/* ================= 开卡展示舞台（1张精翻 + 3D 蓄力震动 + 翻转） ================= */
.reveal-scene {
  position: relative;
  z-index: 8;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.reveal-scene.active {
  display: flex;
}

.stage-card-shell {
  perspective: 1100px;
  width: 244px;
  height: 410px;
  position: relative;
}

.stage-card-mover {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  position: relative;
}

/* 蓄力四芒星与光晕 */
.charge-aura {
  position: absolute;
  inset: -16px;
  border-radius: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  box-shadow: 0 0 46px var(--charge-color, #e9ecf8), inset 0 0 24px var(--charge-color, #e9ecf8);
}

.stage-card-shell[data-stage="charge"] .charge-aura,
.stage-card-shell[data-stage="peak"] .charge-aura {
  opacity: 0.9;
}

.stage-card-shell[data-stage="rise"] .stage-card-mover {
  animation: vtRiseIn 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes vtRiseIn {
  from { transform: translateY(80px) scale(0.84) rotateY(180deg); opacity: 0; }
  to { transform: translateY(0) scale(1) rotateY(180deg); opacity: 1; }
}

.stage-card-shell[data-stage="charge"] .stage-card-mover {
  transform: rotateY(180deg);
  animation: vtTremble 0.085s linear infinite;
}

.stage-card-shell[data-stage="peak"] .stage-card-mover {
  transform: rotateY(180deg) scale(1.06);
  animation: vtTremblePeak 0.07s linear infinite;
}

@keyframes vtTremble {
  0% { transform: rotateY(180deg) translate(calc(var(--quake, 1px) * -1), 0); }
  25% { transform: rotateY(180deg) translate(var(--quake, 1px), calc(var(--quake, 1px) * -1)); }
  50% { transform: rotateY(180deg) translate(calc(var(--quake, 1px) * -1), var(--quake, 1px)); }
  75% { transform: rotateY(180deg) translate(var(--quake, 1px), 0); }
  100% { transform: rotateY(180deg) translate(0, calc(var(--quake, 1px) * -1)); }
}

@keyframes vtTremblePeak {
  0% { transform: rotateY(180deg) scale(1.06) translate(calc(var(--quake, 1.5px) * -1.4), 0); }
  50% { transform: rotateY(180deg) scale(1.07) translate(calc(var(--quake, 1.5px) * 1.4), var(--quake, 1.5px)); }
  100% { transform: rotateY(180deg) scale(1.06) translate(0, calc(var(--quake, 1.5px) * -1.4)); }
}

.stage-card-shell[data-stage="flip"] .stage-card-mover {
  animation: vtFlipOver 0.38s cubic-bezier(0.16, 0.84, 0.26, 1.06) forwards;
}

@keyframes vtFlipOver {
  0% { transform: rotateY(180deg) scale(1.06); }
  100% { transform: rotateY(0deg) scale(1); }
}

.stage-card-shell[data-stage="landed"] .stage-card-mover {
  transform: rotateX(calc(var(--card-y, 0) * 6deg)) rotateY(calc(var(--card-x, 0) * 9deg));
  transition: transform 0.14s ease-out;
}

.stage-card-shell[data-stage="out"] .stage-card-mover {
  animation: vtCardOut 0.18s ease-in forwards;
}

@keyframes vtCardOut {
  to { transform: translateX(-110px) rotate(-11deg) scale(0.9); opacity: 0; }
}

/* ================= Laplace 实体集换卡（卡背 + 卡面） ================= */
.lp-face {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* 卡背（原子轨道 + 100B风格标志） */
.lp-back {
  transform: rotateY(180deg);
  padding: 4px;
  background: linear-gradient(135deg, #dde0ec, #7f8499, #f4f5fb, #626679, #d3d6e4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.lp-back-inner {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background:
    repeating-linear-gradient(128deg, transparent 0 6px, rgba(255, 255, 255, 0.03) 6px 8px),
    linear-gradient(150deg, #3d3b5f 0%, #17192f 52%, #463f6a 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lp-back-inner::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  pointer-events: none;
}

.lp-back-logo {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f4f1ff;
  text-shadow: 0 0 18px rgba(203, 196, 255, 0.6);
}

/* 卡面（Laplace 深曜石金属边 + 大方图 + 八角切角稀有度标 + 光谱条） */
.lp-front {
  padding: 4px;
  background: var(--card-bezel, linear-gradient(145deg, #e5e8f2, #7a7f96, #f5f6fc, #63687d));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.65);
}

.lp-front.rarity-N { --card-tier: #cad0e1; --card-bezel: linear-gradient(145deg, #d7dce9, #777c91, #eef1f8, #63677a); --badge-metal: linear-gradient(135deg, #f3f5fa, #9ea4b8 55%, #e1e5f0); }
.lp-front.rarity-R { --card-tier: #7fbaff; --card-bezel: linear-gradient(145deg, #b8dcff, #3e74c4, #e1f1ff, #2f5b9c); --badge-metal: linear-gradient(135deg, #d7edff, #6aaeff 55%, #b8deff); }
.lp-front.rarity-SR { --card-tier: #c99cff; --card-bezel: linear-gradient(145deg, #e4ccff, #7747bd, #f2e5ff, #583194); --badge-metal: linear-gradient(135deg, #f0e0ff, #b378ff 55%, #dfc2ff); }
.lp-front.rarity-SSR { --card-tier: #ffc46b; --card-bezel: linear-gradient(145deg, #fff0ba, #c27b17, #ffe594, #9c5b0b); --badge-metal: linear-gradient(135deg, #fff3c7, #f5ae3b 55%, #ffdf87); }
.lp-front.rarity-UR {
  --card-tier: #ff9ee6;
  --card-bezel: linear-gradient(135deg, #ff9fe0 0%, #99efff 35%, #fff2a1 68%, #c79cff 100%);
  --badge-metal: linear-gradient(135deg, #ffd4f2, #99efff 50%, #fff2a1);
  box-shadow: 0 20px 58px rgba(255, 143, 212, 0.42), 0 0 26px rgba(153, 239, 255, 0.3);
}
.lp-front.rarity-SP {
  --card-tier: #ff7aa8;
  --card-bezel: linear-gradient(135deg, #ff3e82 0%, #ff9a52 34%, #fff08a 66%, #ff5cb0 100%);
  --badge-metal: linear-gradient(135deg, #ff669c, #ffb86c 52%, #fff29c);
  box-shadow: 0 20px 64px rgba(255, 77, 141, 0.58), 0 0 34px rgba(255, 200, 100, 0.45);
}
.lp-front.rarity-SP .lp-front-body {
  background:
    radial-gradient(circle at 75% 12%, rgba(255, 142, 180, 0.22), transparent 48%),
    radial-gradient(circle at 20% 88%, rgba(255, 212, 118, 0.16), transparent 50%),
    linear-gradient(168deg, #361932 0%, #1b1026 55%, #2d152a 100%);
}

.lp-front-body {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(168deg, #27243d 0%, #171628 55%, #1e1c33 100%);
  padding: 7px 8px 8px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: #f6f3ff;
}

/* 全息斜向光泽 */
.lp-holo-glare {
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    118deg,
    transparent 35%,
    rgba(165, 231, 255, 0.24) 45%,
    rgba(255, 255, 255, 0.52) 50%,
    rgba(233, 188, 255, 0.3) 55%,
    transparent 65%
  );
  transform: translateX(calc(var(--card-x, 0) * 60px)) rotate(10deg);
  pointer-events: none;
  z-index: 6;
  opacity: 0.35;
  mix-blend-mode: screen;
}

.lp-front.is-holo .lp-holo-glare,
.lp-front.rarity-UR .lp-holo-glare,
.lp-front.rarity-SP .lp-holo-glare {
  opacity: 0.82;
  animation: holoSweepLp 3.0s linear infinite;
}
.lp-front.rarity-SP .lp-holo-glare {
  opacity: 0.94;
  animation-duration: 2.2s;
  background: linear-gradient(
    118deg,
    transparent 32%,
    rgba(255, 130, 180, 0.35) 44%,
    rgba(255, 248, 210, 0.65) 50%,
    rgba(255, 168, 92, 0.38) 56%,
    transparent 68%
  );
}

@keyframes holoSweepLp {
  0% { transform: translateX(-65%) rotate(10deg); }
  100% { transform: translateX(65%) rotate(10deg); }
}

.lp-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 10.5px;
  z-index: 2;
}

.lp-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #ece9ff;
}

.lp-card-brand .dot-icon {
  color: var(--card-tier);
}

.lp-card-serial {
  font-family: var(--font-display);
  font-size: 11px;
  color: rgba(215, 210, 238, 0.75);
  letter-spacing: 0.4px;
  font-variant-numeric: tabular-nums;
}

/* 大头像框 */
.lp-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1.15;
  border-radius: 7px 7px 4px 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #141224;
  flex-shrink: 0;
  z-index: 2;
}

.lp-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lp-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(15, 14, 28, 0.72) 100%);
  pointer-events: none;
}

/* 右上角切角金属稀有度标（Laplace 标志性设计） */
.lp-tier-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  background: var(--badge-metal);
  color: #1f1b30;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 6px);
  padding: 2px 7px 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.lp-tier-badge.stamp-anim {
  animation: vtStamp 0.46s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes vtStamp {
  0% { transform: scale(1.75) rotate(-8deg); opacity: 0; }
  65% { transform: scale(0.92) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.lp-tier-letter {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.lp-tier-barcode {
  width: 4px;
  height: 15px;
  background: repeating-linear-gradient(180deg, rgba(31, 27, 48, 0.78) 0 1.5px, transparent 1.5px 3px);
}

/* 左下角磨砂直播红点徽标 */
.lp-live-pill {
  position: absolute;
  bottom: 7px;
  left: 7px;
  z-index: 4;
  background: rgba(20, 23, 43, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #f6f4ff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
}

.lp-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5d79;
  box-shadow: 0 0 8px #ff5d79;
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.lp-top-left-flags {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lp-flag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 4px;
  color: #fff;
  width: fit-content;
}
.lp-flag.new { background: #e13958; }
.lp-flag.pity { background: linear-gradient(135deg, #d97706, #db2777); }
.lp-flag.holo { background: linear-gradient(135deg, #7c3aed, #ec4899, #f59e0b); }

/* 名称 + 大号 OVR 战力行 */
.lp-identity-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-top: 7px;
  z-index: 2;
}

.lp-name {
  font-size: 16.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-ovr {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 0.9;
  color: var(--card-tier);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.28);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* 快捷双指标 */
.lp-metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #beb8da;
  margin-top: 3px;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}

/* 稀有度光谱定位盒（Laplace 核心特征） */
.lp-spectrum-box {
  margin-top: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 6px 7px;
  z-index: 2;
}

.lp-spectrum-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  height: 16px;
  align-items: center;
}

.lp-spec-seg {
  height: 14px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #161425;
  opacity: 0.35;
}

.lp-spec-seg.active {
  opacity: 1;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
}

.lp-spec-seg.N { background: #9da4ba; }
.lp-spec-seg.R { background: #7fbaff; }
.lp-spec-seg.SR { background: #c99cff; }
.lp-spec-seg.SSR { background: #ffc46b; }
.lp-spec-seg.UR { background: linear-gradient(90deg, #ff9fe0, #99efff, #fff2a1); }
.lp-spec-seg.SP { background: linear-gradient(90deg, #ff4d8d, #ff9852, #ffe680); }

.lp-spec-needle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  border-radius: 99px;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff, 0 0 14px var(--card-tier);
  left: var(--needle-pos, 10%);
  transition: left 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.lp-spectrum-sub {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #bdb7d9;
  margin-top: 5px;
}

/* 标签胶囊条 */
.lp-tags-row {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
  z-index: 2;
}

.lp-tag-chip {
  font-size: 10px;
  color: #e2ddfa;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 卡底排名 */
.lp-card-foot {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #9e98ba;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}

/* 卡片下方操作按钮（查看卡片 + 暖粉渐变 收好卡片/下一张） */
.reveal-cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.reveal-cta-row.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-lp-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f4f1ff;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lp-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(203, 196, 255, 0.55);
}

.btn-lp-peach {
  background: linear-gradient(135deg, #ffd0c4 0%, #f5a6b8 100%);
  border: none;
  color: #24192b;
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(245, 166, 184, 0.34);
  transition: all 0.2s ease;
}

.btn-lp-peach:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ================= 开包结果总览展示墙（点击关闭才返回待开卡包） ================= */
.summary-scene {
  position: relative;
  z-index: 10;
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: 920px;
  gap: 14px;
  animation: summaryFadeIn 0.28s ease;
}

.summary-scene.active {
  display: flex;
}

@keyframes summaryFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(20, 18, 35, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  padding: 10px 14px;
  backdrop-filter: blur(10px);
}

.summary-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-title {
  font-size: 16px;
  font-weight: 800;
  color: #f8f5ff;
}

.summary-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.summary-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dcd6f7;
}

.summary-pill.sp { background: linear-gradient(135deg, rgba(255, 62, 130, 0.34), rgba(255, 168, 82, 0.3)); color: #fff0b8; border: 1px solid #ff7aa8; }
.summary-pill.ur { background: rgba(255, 158, 230, 0.22); color: #ffb9ee; border: 1px solid rgba(255, 158, 230, 0.45); }
.summary-pill.ssr { background: rgba(255, 196, 107, 0.22); color: #ffd994; border: 1px solid rgba(255, 196, 107, 0.45); }
.summary-pill.sr { background: rgba(201, 156, 255, 0.2); color: #dec2ff; border: 1px solid rgba(201, 156, 255, 0.35); }

.summary-close-x {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f4f1ff;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.summary-close-x:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(203, 196, 255, 0.65);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

@media (max-width: 820px) {
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.summary-grid.single-grid {
  grid-template-columns: minmax(170px, 210px);
  justify-content: center;
}

.summary-grid.small-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
  justify-content: center;
}

.summary-card-item {
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  animation: summaryCardPop 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--stagger, 0) * 45ms);
}

@keyframes summaryCardPop {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.summary-card-item.glow-SP {
  box-shadow: 0 0 28px rgba(255, 62, 130, 0.68), 0 0 16px rgba(255, 224, 128, 0.52);
}

.summary-card-item.glow-UR {
  box-shadow: 0 0 24px rgba(255, 158, 230, 0.52), 0 0 12px rgba(153, 239, 255, 0.38);
}

.summary-card-item.glow-SSR {
  box-shadow: 0 0 20px rgba(255, 196, 107, 0.44);
}

.summary-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ================= 底部「我的卡包」陈列轨（Laplace 倾斜迷你卡包） ================= */
.pack-tray-section {
  background: rgba(16, 15, 28, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 16px 22px 24px;
}

.pack-tray-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.pack-tray-title {
  font-size: 15px;
  font-weight: 700;
  color: #f4f1ff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.pack-tray-meta {
  font-size: 12.5px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dcd6f7;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mini-toggle:hover, .mini-toggle.active {
  background: rgba(186, 174, 255, 0.22);
  border-color: var(--accent-lav);
  color: #fff;
}

.pack-rail {
  background: rgba(10, 9, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.45);
  padding: 16px 14px 12px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  align-items: flex-end;
}

.mini-pack-item {
  flex: 0 0 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  transition: transform 0.22s ease, opacity 0.2s ease;
}

.mini-pack-item.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.mini-pack-pouch {
  width: 78px;
  height: 102px;
  border-radius: 4px;
  background: var(--mini-foil);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--lean, -3deg));
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.mini-pack-item:hover:not(.locked) .mini-pack-pouch {
  transform: translateY(-4px) rotate(0deg);
}

.mini-pack-item.selected .mini-pack-pouch {
  transform: translateY(-6px) rotate(0deg) scale(1.06);
  border-color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.6), 0 0 22px rgba(203, 196, 255, 0.55);
}

.mini-pack-crimp {
  position: absolute;
  left: 0; right: 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.5) 0 2px, rgba(20,18,35,0.45) 2px 4px);
}
.mini-pack-crimp.top { top: 0; }
.mini-pack-crimp.bot { bottom: 0; }

.mini-pack-emblem {
  font-size: 24px;
  z-index: 2;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.mini-pack-lv {
  position: absolute;
  bottom: 9px;
  right: 5px;
  background: rgba(16, 14, 28, 0.86);
  color: #efeaff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  z-index: 3;
}

.mini-pack-label {
  font-size: 12px;
  font-weight: 600;
  color: #d7d1f2;
  text-align: center;
  line-height: 1.2;
}

.mini-pack-item.selected .mini-pack-label {
  color: #ffffff;
}

.mini-pack-sub {
  font-size: 10.5px;
  color: var(--text-dim);
}

/* ================= 图鉴页（Laplace Collection UI） ================= */
.section-pad {
  padding: 22px;
  min-height: 540px;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-h2 {
  font-size: 26px;
  font-weight: 800;
  color: #f8f5ff;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 2px;
}

.seg-control {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.seg-btn.active {
  background: rgba(203, 196, 255, 0.2);
  color: #ffffff;
}

.lp-select, .lp-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #f2eeff;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
}

.lp-select option {
  background: #1a182b;
  color: #f2eeff;
}

.rarity-chip-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px;
  border-radius: 11px;
  margin-bottom: 18px;
}

.rarity-chip {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  padding: 4px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.rarity-chip:hover { color: #fff; }
.rarity-chip.active {
  background: rgba(203, 196, 255, 0.22);
  border-color: rgba(203, 196, 255, 0.4);
  color: #fff;
}

/* 图鉴网格（Laplace 紧凑大方图卡） */
.codex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 14px;
}

.codex-mini-card {
  border-radius: 12px;
  padding: 3px;
  background: var(--card-bezel, linear-gradient(145deg, #d7dce9, #777c91));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.codex-mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
}

.codex-mini-card.rarity-N { --card-tier: #cad0e1; --card-bezel: linear-gradient(145deg, #c9cfde, #6b7085); --badge-metal: linear-gradient(135deg, #f3f5fa, #9ea4b8); }
.codex-mini-card.rarity-R { --card-tier: #7fbaff; --card-bezel: linear-gradient(145deg, #a6d4ff, #396db8); --badge-metal: linear-gradient(135deg, #d7edff, #6aaeff); }
.codex-mini-card.rarity-SR { --card-tier: #c99cff; --card-bezel: linear-gradient(145deg, #dfc4ff, #6f42b5); --badge-metal: linear-gradient(135deg, #f0e0ff, #b378ff); }
.codex-mini-card.rarity-SSR { --card-tier: #ffc46b; --card-bezel: linear-gradient(145deg, #ffe79e, #b87012); --badge-metal: linear-gradient(135deg, #fff3c7, #f5ae3b); }
.codex-mini-card.rarity-UR { --card-tier: #ff9ee6; --card-bezel: linear-gradient(135deg, #ff9fe0, #99efff, #fff2a1); --badge-metal: linear-gradient(135deg, #ffd4f2, #99efff, #fff2a1); }
.codex-mini-card.rarity-SP { --card-tier: #ff7aa8; --card-bezel: linear-gradient(135deg, #ff3e82, #ff9a52, #fff08a, #ff5cb0); --badge-metal: linear-gradient(135deg, #ff669c, #ffb86c, #fff29c); }

.codex-mini-inner {
  background: linear-gradient(170deg, #25223a, #161526);
  border-radius: 9px;
  padding: 6px;
  display: flex;
  flex-direction: column;
}

.codex-mini-card.unowned {
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  cursor: default;
}

.codex-mini-card.unowned:hover { transform: none; box-shadow: none; }

.codex-unowned-box {
  height: 234px;
  border-radius: 9px;
  background: rgba(16, 15, 28, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-dim);
  position: relative;
}

.fav-heart {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 5;
  font-size: 13px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}

/* ================= 抽象斗兽场（Laplace 暗夜玻璃风） ================= */
.arena-stage-grid {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

@media (max-width: 780px) {
  .arena-stage-grid { grid-template-columns: 1fr; }
}

.arena-slot {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.arena-slot.winner {
  border-color: #ffc46b;
  box-shadow: 0 0 30px rgba(255, 196, 107, 0.25);
}

.vs-orb {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, #ffd0c4, #cbc4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.battle-feed {
  background: rgba(11, 10, 21, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.battle-round-item {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--accent-lav);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
}

.battle-verdict-banner {
  background: linear-gradient(135deg, rgba(203, 196, 255, 0.2), rgba(245, 166, 184, 0.2));
  border: 1px solid rgba(255, 208, 196, 0.45);
  border-radius: 11px;
  padding: 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff6f2;
}

/* ================= 奖杯与档案页（Laplace Trophies UI） ================= */
.trophy-summary-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trophy-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trophy-master-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  margin-bottom: 22px;
}

.trophy-master-fill {
  height: 100%;
  background: linear-gradient(90deg, #b8abff, #ff9ee6, #ffc46b);
  transition: width 0.35s ease;
}

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.trophy-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.62;
  transition: all 0.2s ease;
}

.trophy-card.unlocked {
  opacity: 1;
  border-color: rgba(203, 196, 255, 0.42);
  background: linear-gradient(135deg, rgba(186, 174, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.trophy-medallion {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.trophy-card.unlocked .trophy-medallion {
  background: linear-gradient(135deg, rgba(203, 196, 255, 0.35), rgba(255, 196, 107, 0.3));
  border-color: #cbc4ff;
  box-shadow: 0 0 14px rgba(203, 196, 255, 0.35);
}

.trophy-info { flex: 1; min-width: 0; }
.trophy-name-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }
.trophy-desc { font-size: 11.5px; color: var(--text-sub); margin-top: 2px; }
.trophy-segs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 7px; }
.trophy-seg { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.trophy-seg.on { background: linear-gradient(90deg, #b8abff, #ffd0c4); }

.lore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 760px) {
  .lore-grid { grid-template-columns: 1fr; }
}

.lore-box {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  padding: 15px;
}

.lore-box h3 {
  font-size: 15px;
  color: #e2dcff;
  margin-bottom: 10px;
}

.quote-strip {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #cbc4ff;
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 12.5px;
  margin-bottom: 8px;
}

/* ================= 底部居中悬浮玻璃胶囊导航（Laplace Navigation） ================= */
.floating-nav-wrap {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(520px, calc(100vw - 20px));
}

.floating-nav {
  background: rgba(24, 21, 38, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
}

.fnav-btn {
  background: transparent;
  border: none;
  border-radius: 13px;
  padding: 8px 6px;
  color: #b4aecf;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.fnav-btn .ico { font-size: 17px; line-height: 1.1; }
.fnav-btn:hover { color: #fff; }

.fnav-btn.active {
  background: linear-gradient(140deg, #cbc4ff, #b6a9e9);
  color: #201b32;
  box-shadow: inset 0 1px 0 rgba(247, 244, 255, 0.67), 0 4px 14px rgba(182, 169, 233, 0.35);
}

/* ================= 弹窗（卡片详情 / 概率保底 / 规则存档） ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 7, 16, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.lp-modal {
  background: #171626;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8);
  position: relative;
}

.lp-modal-head {
  position: sticky;
  top: 0;
  background: rgba(23, 22, 38, 0.94);
  backdrop-filter: blur(10px);
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.lp-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #f6f3ff;
}

.lp-modal-close {
  background: rgba(255, 255, 255, 0.07);
  border: none;
  color: #d6d0f2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.lp-modal-body {
  padding: 20px;
}

.inspect-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.inspect-card-box {
  width: 256px;
  height: 426px;
  perspective: 1100px;
  cursor: pointer;
}

.inspect-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.inspect-card-box.show-back .inspect-card-inner {
  transform: rotateY(180deg);
}

.inspect-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.inspect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-glass-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
}

.stat-glass-card .k { font-size: 11.5px; color: var(--text-sub); }
.stat-glass-card .v { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: #fff; margin-top: 2px; }
.stat-glass-card .s { font-size: 11.5px; color: var(--text-dim); }

.bars-6d {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-top: 8px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.bar-track {
  flex: 1;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #9d8df2, #ff9ee6);
}

.hours-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
  margin-top: 6px;
}

.h-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #b8abff, #5d4ea8);
  min-height: 2px;
}

.h-bar.night {
  background: linear-gradient(180deg, #ff8fb1, #9c3064);
}

/* 飞行经验光球 */
.xp-orb {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 14px #cbc4ff, 0 0 26px #b8abff;
  pointer-events: none;
  z-index: 130;
  transition: transform 0.65s cubic-bezier(0.2, 0.85, 0.35, 1), opacity 0.65s ease;
}

/* Toast 通知 */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 160;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(28, 25, 46, 0.96);
  border: 1px solid rgba(203, 196, 255, 0.55);
  color: #f8f5ff;
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.rate-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13.5px;
}

/* ================= 手机端与微信内置浏览器深度响应式适配 ================= */
.pack-rail,
.rarity-chip-bar {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pack-rail::-webkit-scrollbar,
.rarity-chip-bar::-webkit-scrollbar {
  display: none;
}

.modal-overlay {
  -webkit-backdrop-filter: blur(8px);
}
.lp-modal {
  -webkit-overflow-scrolling: touch;
}
.stage-card-shell {
  touch-action: none;
}

@media (max-width: 640px) {
  .app-outer {
    margin: 0 auto calc(88px + env(safe-area-inset-bottom, 0px));
    padding: 0;
  }

  .app-shell {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none;
  }

  .game-banner {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
    gap: 8px;
  }

  .app-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px 4px 11px 4px;
  }
  .app-icon-inner img {
    width: 28px;
    height: 28px;
  }

  .banner-title {
    font-size: 21px;
    gap: 3px;
  }
  .banner-title .name-solid {
    font-size: 18px;
  }

  .circle-btn {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .level-strip {
    padding: 10px 14px;
    gap: 10px;
  }

  .level-left {
    width: 100%;
    min-width: 0;
  }

  .xp-segments {
    width: 100%;
    gap: 4px;
  }

  .level-right {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .pity-mini {
    font-size: 11px;
    padding: 4px 9px;
    gap: 5px;
  }

  .ghost-pill-btn,
  .chest-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 34px;
  }

  /* 舞台区在手机一屏内完整呈现卡包与按钮 */
  .stage-canvas-wrap {
    min-height: 416px;
    padding: 18px 12px 20px;
  }

  .corner-tl { top: 12px; left: 12px; width: 16px; height: 16px; }
  .corner-br { bottom: 12px; right: 12px; width: 16px; height: 16px; }

  .stage-hud-top {
    top: 10px;
    left: 12px;
    right: 12px;
  }

  .foil-pack-wrap {
    width: 204px;
    height: 278px;
  }

  .foil-medallion {
    width: 116px;
    height: 116px;
  }
  .foil-medallion svg {
    width: 78px;
    height: 78px;
  }
  .foil-art-big {
    font-size: 20px !important;
  }
  .foil-pack-name {
    font-size: 12px;
  }

  .stage-hint-pill {
    font-size: 12px;
    padding: 6px 14px;
  }

  .stage-card-shell {
    width: 222px;
    height: 374px;
  }

  .lp-name { font-size: 15px; }
  .lp-ovr { font-size: 26px; }
  .lp-tier-letter { font-size: 17px; }

  .reveal-cta-row {
    width: 100%;
    gap: 8px;
  }
  .btn-lp-ghost,
  .btn-lp-peach {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 42px;
    flex: 1 1 auto;
    text-align: center;
  }

  /* 开包结果总览墙在手机端 2 列清晰排布，底部关闭按钮大而好点 */
  .summary-header {
    padding: 9px 11px;
    gap: 8px;
  }
  .summary-title {
    font-size: 14px;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .summary-footer {
    width: 100%;
    gap: 8px;
  }
  .summary-footer button {
    flex: 1 1 140px;
    min-height: 44px;
  }

  /* 我的卡包底部托盘 */
  .pack-tray-section {
    padding: 12px 14px 18px;
  }
  .pack-tray-head {
    gap: 8px;
    margin-bottom: 10px;
  }
  .pack-tray-title {
    font-size: 14px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .mini-toggle {
    padding: 5px 10px;
    font-size: 11.5px;
    min-height: 30px;
  }
  .pack-rail {
    padding: 12px 10px 10px;
    gap: 10px;
  }
  .mini-pack-item {
    flex: 0 0 92px;
  }
  .mini-pack-pouch {
    width: 66px;
    height: 88px;
  }

  /* 图鉴 / 斗兽场 / 奖杯 */
  .section-pad {
    padding: 16px 12px;
    min-height: 460px;
  }
  .section-h2 {
    font-size: 21px;
  }
  .section-header-row {
    gap: 10px;
    margin-bottom: 12px;
  }
  .section-header-row > div:last-child {
    width: 100%;
  }
  .lp-input {
    flex: 1;
    min-width: 120px;
    font-size: 14px; /* 防止 iOS 微信聚焦自动放大 */
  }
  .lp-select {
    font-size: 13px;
    max-width: 100%;
  }
  .rarity-chip-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    margin-bottom: 12px;
  }
  .rarity-chip {
    flex-shrink: 0;
    padding: 5px 11px;
  }
  .codex-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .codex-unowned-box {
    height: 212px;
  }

  /* 斗兽场在手机端紧凑排列 */
  .arena-stage-grid {
    gap: 10px;
  }
  .arena-slot {
    padding: 12px 10px;
  }
  .vs-orb {
    font-size: 26px;
    line-height: 1;
  }

  .trophy-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  /* 弹窗在手机端更顺手 */
  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }
  .lp-modal {
    max-height: 88dvh;
    border-radius: 18px 18px 14px 14px;
  }
  .lp-modal-head {
    padding: 12px 16px;
  }
  .lp-modal-body {
    padding: 14px;
  }
  .inspect-card-box {
    width: 222px;
    height: 374px;
  }
  .inspect-grid,
  .bars-6d {
    grid-template-columns: 1fr;
  }

  /* 悬浮底部导航 */
  .floating-nav {
    border-radius: 16px;
    padding: 4px;
  }
  .fnav-btn {
    padding: 7px 4px;
    font-size: 11px;
    min-height: 46px;
  }
  .fnav-btn .ico {
    font-size: 16px;
  }

  .toast-stack {
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
  }
  .toast {
    text-align: center;
    font-size: 12.5px;
  }
}


/* ================= 云端账号、实时欧皇播报 & 社交中心 ================= */
.cloud-pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(203, 196, 255, 0.34);
  background: rgba(34, 29, 64, 0.78);
  color: #f3efff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}
.cloud-pill-btn:hover {
  border-color: rgba(255, 198, 224, 0.7);
  background: rgba(52, 42, 92, 0.9);
  transform: translateY(-1px);
}
.cloud-pill-btn.logged-in {
  border-color: rgba(110, 231, 183, 0.45);
  background: rgba(22, 54, 48, 0.72);
}
.cloud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
}
.cloud-pill-btn.online .cloud-dot { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.7); }
.cloud-pill-btn.logged-in .cloud-dot { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.85); }

.badge-count,
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.55);
}
.fnav-btn { position: relative; }
.nav-badge {
  position: absolute;
  top: 3px;
  right: 6px;
}

/* 实时 UR/SP 全群欧皇播报横幅 */
.broadcast-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(255, 122, 168, 0.16) 0%, rgba(168, 128, 255, 0.18) 50%, rgba(255, 212, 120, 0.15) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.2s ease;
}
.broadcast-ticker:hover {
  background: linear-gradient(90deg, rgba(255, 122, 168, 0.24) 0%, rgba(168, 128, 255, 0.26) 50%, rgba(255, 212, 120, 0.22) 100%);
}
.ticker-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff5fa;
  background: linear-gradient(135deg, #ff5e9c, #ff9966);
  box-shadow: 0 2px 8px rgba(255, 94, 156, 0.35);
}
.ticker-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #f6efff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* 社交中心布局 */
.social-pane { display: none; }
.social-pane.active { display: block; }

.social-notice-card {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(255, 132, 180, 0.14));
  border: 1px solid rgba(203, 196, 255, 0.34);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.social-notice-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}
.social-notice-desc {
  font-size: 12.5px;
  color: #d6d0f2;
  margin-top: 4px;
  line-height: 1.55;
}

.social-sp-tip {
  background: rgba(255, 102, 153, 0.11);
  border: 1px solid rgba(255, 120, 168, 0.32);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #ffd7e6;
  line-height: 1.55;
  margin-bottom: 14px;
}

.social-block {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.social-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.social-block-head h3 {
  font-size: 15px;
  font-weight: 800;
  color: #f6f2ff;
  margin: 0;
}
.social-count-pill {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(203, 196, 255, 0.16);
  color: #e6e0ff;
}
.social-empty {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 20px 10px;
}

/* 发起换卡 / 赠卡表单 */
.trade-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.trade-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trade-label {
  font-size: 12px;
  font-weight: 700;
  color: #cfc8ed;
}
.trade-preview-bar {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(16, 14, 30, 0.65);
  border: 1px dashed rgba(203, 196, 255, 0.28);
  font-size: 12.5px;
  color: #e8e3ff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.trade-preview-bar:empty { display: none; }

/* 换卡 / 赠卡卡片条目 */
.trade-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trade-item {
  background: rgba(18, 15, 34, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.trade-item.is-incoming {
  border-color: rgba(255, 170, 210, 0.36);
  background: rgba(38, 22, 54, 0.64);
}
.trade-item-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.trade-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #d7d1f2;
}
.trade-type-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.trade-type-tag.swap { background: rgba(143, 202, 255, 0.18); color: #9cd2ff; border: 1px solid rgba(143, 202, 255, 0.35); }
.trade-type-tag.gift { background: rgba(255, 178, 128, 0.18); color: #ffd0a6; border: 1px solid rgba(255, 178, 128, 0.35); }

.trade-cards-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.trade-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}
.trade-card-chip img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}
.trade-rarity-dot {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.45);
}
.trade-rarity-dot.r-UR { color: #ff9ee6; }
.trade-rarity-dot.r-SSR { color: #ffc861; }
.trade-rarity-dot.r-SR { color: #d6a8ff; }
.trade-rarity-dot.r-R { color: #8fcaff; }
.trade-rarity-dot.r-N { color: #cad0e1; }
.trade-rarity-dot.r-SP { color: #ff7aa8; }

.trade-note-line {
  font-size: 12px;
  color: #b7b0d6;
}
.trade-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.trade-status-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
}
.trade-status-badge.accepted { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.trade-status-badge.rejected { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.trade-status-badge.cancelled { background: rgba(156, 163, 175, 0.16); color: #d1d5db; }
.trade-status-badge.pending { background: rgba(251, 191, 36, 0.16); color: #fde68a; }

/* 欧皇榜 */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 17, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.rank-row.is-me {
  border-color: rgba(110, 231, 183, 0.45);
  background: rgba(24, 48, 46, 0.56);
}
.rank-row.top-1 { border-color: rgba(255, 215, 102, 0.52); background: linear-gradient(90deg, rgba(255, 200, 90, 0.14), rgba(20, 17, 38, 0.78)); }
.rank-row.top-2 { border-color: rgba(208, 220, 240, 0.42); }
.rank-row.top-3 { border-color: rgba(235, 158, 102, 0.42); }
.rank-pos {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: #d6d0f2;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.rank-row.top-1 .rank-pos { background: linear-gradient(135deg, #ffe27a, #f59e0b); color: #1b1404; }
.rank-row.top-2 .rank-pos { background: linear-gradient(135deg, #eef2ff, #94a3b8); color: #0f172a; }
.rank-row.top-3 .rank-pos { background: linear-gradient(135deg, #fdba74, #b45309); color: #1c1004; }
.rank-info { flex: 1; min-width: 0; }
.rank-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rank-meta {
  font-size: 12px;
  color: #bdb6dc;
  margin-top: 3px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 播报墙 */
.broadcast-wall {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.broadcast-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(20, 17, 38, 0.72);
  border: 1px solid rgba(255, 158, 230, 0.24);
}
.broadcast-card.is-sp {
  border-color: rgba(255, 102, 153, 0.55);
  background: linear-gradient(90deg, rgba(255, 77, 141, 0.16), rgba(32, 18, 46, 0.8));
}
.broadcast-card img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.broadcast-body { flex: 1; min-width: 0; }
.broadcast-headline {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
}
.broadcast-time {
  font-size: 11.5px;
  color: #a9a1ca;
  margin-top: 2px;
}

/* 云端登录弹窗表单 */
.cloud-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cloud-form .lp-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
}
.cloud-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #d6d0f2;
  cursor: pointer;
}
.cloud-account-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .cloud-pill-btn {
    height: 32px;
    padding: 0 9px;
    font-size: 11.5px;
    max-width: 112px;
  }
  #cloud-btn-label {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .broadcast-ticker {
    padding: 7px 12px;
    gap: 7px;
  }
  .ticker-text { font-size: 12px; }
  .trade-form-grid {
    grid-template-columns: 1fr;
  }
  .trade-item {
    flex-direction: column;
    align-items: stretch;
  }
  .trade-actions {
    justify-content: flex-end;
  }
  .fnav-btn {
    padding: 6px 2px;
    font-size: 10.5px;
  }
  .nav-badge {
    top: 2px;
    right: 3px;
    min-width: 15px;
    height: 15px;
    font-size: 9.5px;
  }
}
