:root {
  --pack-color: #18243d;
  --pack-highlight: #63b8ff;
  --pack-shadow: #060912;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-css: linear(
    0, 0.055, 0.193, 0.378, 0.577, 0.767, 0.93, 1.056, 1.142, 1.19, 1.205,
    1.195, 1.167, 1.13, 1.089, 1.05, 1.016, 0.99, 0.972, 0.961, 0.958,
    0.96, 0.965, 0.973, 0.981, 0.989, 0.996, 1.002, 1.006, 1.008, 1
  );

  --pack-h: min(432px, 53vh, 53svh, 114vw);
  --pack-w: calc(var(--pack-h) * 0.555);
  --pack-card-w: calc(var(--pack-w) * 0.91);
  --card-w: min(368px, 78vw, calc((100vh - 210px) / 1.3967), calc((100svh - 210px) / 1.3967));
  --card-h: calc(var(--card-w) * 1.3967);
  --crimp-h: calc(var(--pack-h) * 0.064);
  --pack-depth: 15px;

  --poke-gold: #f5c84c;
  --poke-gold-deep: #c98f14;
  --poke-red: #e53935;
  --poke-blue: #3b82f6;
  --focus-ring: #f5c84c;
  --font-ui: "Inter Variable", Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, monospace;

  --stage-bg: #080b12;
  --stage-vignette-bg:
    radial-gradient(64% 54% at 50% 48%, transparent 34%, rgba(5, 8, 15, 0.62) 100%),
    linear-gradient(180deg, rgba(5, 8, 15, 0.56) 0%, transparent 22%, transparent 74%, rgba(5, 8, 15, 0.74) 100%);
  --spotlight-bg:
    conic-gradient(
      from 162deg at 50% -16%,
      transparent 0deg,
      rgba(96, 165, 250, 0.06) 13deg,
      rgba(255, 248, 225, 0.12) 19deg,
      rgba(245, 200, 76, 0.06) 25deg,
      transparent 38deg
    ),
    radial-gradient(46% 36% at 50% 42%, rgba(215, 232, 255, 0.08), transparent 76%);
  --ground-shadow-bg:
    radial-gradient(closest-side, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.38) 56%, transparent);
  --grain-opacity: 0.024;

  --chrome-surface: rgba(13, 17, 28, 0.84);
  --chrome-border: rgba(255, 255, 255, 0.12);
  --chrome-specular: rgba(255, 255, 255, 0.16);
  --chrome-sep: rgba(255, 255, 255, 0.1);
  --chrome-ink: #f5f7fa;
  --chrome-muted: rgba(214, 224, 240, 0.64);
  --chrome-hover: rgba(255, 255, 255, 0.075);
  --chrome-shadow:
    0 20px 44px -12px rgba(0, 0, 0, 0.72),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 var(--chrome-specular);

  --cta-primary-bg: linear-gradient(180deg, #f5c84c 0%, #d99b1e 100%);
  --cta-primary-ink: #171206;
  --cta-primary-border: rgba(255, 243, 176, 0.65);
  --cta-secondary-bg: rgba(255, 255, 255, 0.085);
  --cta-secondary-ink: #f5f7fa;
  --cta-secondary-border: rgba(255, 255, 255, 0.16);

  --holo-silk: linear-gradient(
    114deg,
    rgba(255, 130, 182, 0.85) 0%,
    rgba(255, 214, 112, 0.85) 22%,
    rgba(136, 245, 178, 0.85) 45%,
    rgba(110, 216, 255, 0.85) 68%,
    rgba(182, 152, 255, 0.85) 90%,
    rgba(255, 130, 182, 0.85) 100%
  );
  --holo-glitter: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.88' seed='11' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 16 0 0 0 -10.2'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
  --stage-noise: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='2' stitchTiles='stitch'/></filter><rect width='180' height='180' filter='url(%23g)'/></svg>");
}

/* 白昼冠军竞技场主题 */
html[data-studio-light="day"] {
  --focus-ring: #c98f14;
  --stage-bg: #eef1f6;
  --stage-vignette-bg:
    radial-gradient(70% 58% at 50% 46%, rgba(255, 255, 255, 0.2) 0%, rgba(226, 232, 242, 0.45) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 22%, transparent 76%, rgba(214, 222, 235, 0.6) 100%);
  --spotlight-bg:
    radial-gradient(56% 40% at 50% 24%, rgba(255, 255, 255, 0.74), transparent 76%);
  --ground-shadow-bg:
    radial-gradient(closest-side, rgba(18, 24, 38, 0.32), rgba(18, 24, 38, 0.1) 58%, transparent);
  --grain-opacity: 0.015;

  --chrome-surface: rgba(255, 255, 255, 0.9);
  --chrome-border: rgba(15, 23, 42, 0.12);
  --chrome-specular: rgba(255, 255, 255, 0.95);
  --chrome-sep: rgba(15, 23, 42, 0.1);
  --chrome-ink: #0f172a;
  --chrome-muted: #64748b;
  --chrome-hover: rgba(15, 23, 42, 0.055);
  --chrome-shadow:
    0 16px 36px -12px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 var(--chrome-specular);

  --cta-primary-bg: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  --cta-primary-ink: #ffffff;
  --cta-primary-border: rgba(147, 197, 253, 0.45);
  --cta-secondary-bg: #f1f5f9;
  --cta-secondary-ink: #0f172a;
  --cta-secondary-border: rgba(15, 23, 42, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

html {
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow: hidden;
  background: var(--stage-bg);
  color: var(--chrome-ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s var(--ease-out), color 0.25s var(--ease-out);
}

i {
  font-style: normal;
}

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 顶部 jackane宇 专属精灵球徽章字标 + 右上角工具簇 ---------- */
.top-bar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  min-height: 42px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.brand-stage-crest {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--chrome-border);
  background: var(--chrome-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--chrome-shadow);
  color: var(--chrome-ink);
  pointer-events: auto;
  cursor: pointer;
  transition: scale 0.16s var(--ease-out), border-color 0.2s;
}

.brand-stage-crest:hover {
  border-color: rgba(245, 200, 76, 0.5);
}

.brand-stage-crest:active {
  translate: -50% calc(-50% + 1px);
}

.util-btn:active,
.flip-pack-btn:active,
.series-pill:active,
.variant-pill:active,
button.console-item:active,
.fresh-box-btn:active,
.dock-btn:active {
  translate: 0 1px;
}

.brand-stage-crest:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.crest-ball {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.crest-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  gap: 2px;
}

.crest-owner {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #fff6cc 0%, #f5c84c 55%, #ff9d42 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-studio-light="day"] .crest-owner {
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 60%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.crest-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--chrome-muted);
}

.utility-cluster {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: var(--chrome-surface);
  border: 1px solid var(--chrome-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--chrome-shadow);
}

.util-btn {
  -webkit-tap-highlight-color: transparent;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--chrome-ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s var(--ease-out), scale 0.16s var(--ease-out), color 0.18s;
}

html[data-foil-mode="raw"] .util-btn.foil-btn {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
}

html[data-studio-light="day"][data-foil-mode="raw"] .util-btn.foil-btn {
  color: #0284c7;
}

.util-btn.mute-btn {
  width: 32px;
  padding: 0;
}

.util-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

html[data-studio-light="dark"] .icon-daylight,
html[data-studio-light="day"] .icon-darkroom {
  display: none;
}

.mute-btn .icon-sound-off,
.mute-btn[aria-pressed="true"] .icon-sound-on {
  display: none;
}

.mute-btn[aria-pressed="true"] .icon-sound-off {
  display: block;
}

/* ---------- 三大简中补充包切换栏 + 瘦包/肥包规格栏 + 翻面按钮 ---------- */
.series-switcher {
  position: fixed;
  left: 50%;
  top: max(62px, calc(env(safe-area-inset-top) + 50px));
  z-index: 40;
  translate: -50% 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: calc(100vw - 16px);
  transition: opacity 0.26s var(--ease-out), translate 0.26s var(--ease-out);
}

.series-switcher.concealed,
body.showcase-active .series-switcher {
  opacity: 0;
  translate: -50% -10px;
  pointer-events: none;
}

.switcher-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--chrome-surface);
  border: 1px solid var(--chrome-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--chrome-shadow);
}

.variant-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  border-radius: 999px;
  background: var(--chrome-surface);
  border: 1px solid var(--chrome-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.45);
}

.variant-pill {
  -webkit-tap-highlight-color: transparent;
  height: 25px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--chrome-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
}

.variant-pill.active[data-variant-id="thin"] {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: #bae6fd;
}

.variant-pill.active[data-variant-id="fat"] {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.28), rgba(245, 158, 11, 0.24));
  border-color: rgba(248, 113, 113, 0.65);
  color: #fde68a;
}

.variant-pill.locked-spec {
  cursor: default;
  background: rgba(245, 200, 76, 0.12);
  border-color: rgba(245, 200, 76, 0.38);
  color: #fde68a;
}

html[data-studio-light="day"] .variant-pill.active[data-variant-id="thin"] {
  background: rgba(2, 132, 199, 0.15);
  color: #0369a1;
}

html[data-studio-light="day"] .variant-pill.active[data-variant-id="fat"],
html[data-studio-light="day"] .variant-pill.locked-spec {
  background: rgba(180, 83, 9, 0.14);
  border-color: rgba(180, 83, 9, 0.42);
  color: #92400e;
}

.series-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.series-pill {
  -webkit-tap-highlight-color: transparent;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--chrome-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
}

.series-pill.active {
  background: rgba(245, 200, 76, 0.16);
  border-color: rgba(245, 200, 76, 0.52);
  color: #ffe89e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html[data-studio-light="day"] .series-pill.active {
  background: #1e293b;
  border-color: #0f172a;
  color: #ffffff;
}

.series-divider {
  width: 1px;
  height: 18px;
  background: var(--chrome-sep);
  flex-shrink: 0;
}

.flip-pack-btn {
  -webkit-tap-highlight-color: transparent;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--chrome-ink);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s, scale 0.15s;
}

.flip-pack-btn.flipped {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.48);
  color: #93c5fd;
}

html[data-studio-light="day"] .flip-pack-btn.flipped {
  color: #1d4ed8;
}

/* ---------- 高罕出货横幅 ---------- */
.pull-banner {
  position: fixed;
  left: 50%;
  top: 66px;
  z-index: 55;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: calc(100vw - 28px);
  padding: 9px 22px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 20, 34, 0.95), rgba(8, 11, 20, 0.97));
  border: 1px solid rgba(245, 200, 76, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff7dc;
  white-space: nowrap;
  box-shadow:
    0 18px 40px -10px rgba(0, 0, 0, 0.72),
    0 0 30px -6px rgba(245, 200, 76, 0.4),
    inset 0 1px 0 rgba(255, 240, 196, 0.35);
  pointer-events: none;
  animation: banner-pop 0.42s var(--spring-css);
}

.pull-banner[hidden] {
  display: none;
}

.banner-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #f5ca69;
}

.banner-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

@keyframes banner-pop {
  from {
    opacity: 0;
    scale: 0.84;
    translate: -50% -10px;
  }
  to {
    opacity: 1;
    scale: 1;
    translate: -50% 0;
  }
}

/* ---------- 宝可梦大师展厅三维舞台 ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  perspective: 1400px;
  perspective-origin: 50% 42%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.showcase-scrim {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(5, 8, 18, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  cursor: pointer;
  transition: background-color 0.35s var(--ease-out);
}

html[data-studio-light="day"] .showcase-scrim {
  background: rgba(15, 23, 42, 0.28);
}

.showcase-scrim[hidden] {
  display: none !important;
}

.showcase-layer {
  position: absolute;
  inset: 0;
  z-index: 24;
  pointer-events: none;
  perspective: 1400px;
  perspective-origin: 50% 46%;
  --card-w: min(380px, 78vw, calc((100vh - 208px) / 1.3967), calc((100svh - 208px) / 1.3967));
  --card-h: calc(var(--card-w) * 1.3967);
}

.showcase-layer[hidden] {
  display: none !important;
}

.stage.showcase-mode .pack,
.stage.showcase-mode .jet-anchor,
.stage.showcase-mode .pack-aura,
.stage.showcase-mode .ground-shadow,
.stage.showcase-mode .scene .card {
  opacity: 0.14;
  pointer-events: none !important;
}

.stage.showcase-mode .grab-zone {
  pointer-events: none !important;
}

.stage-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.stage-backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
  transition: opacity 0.42s var(--ease-out);
}

html[data-studio-light="dark"] .stage-backdrop-light,
html[data-studio-light="day"] .stage-backdrop-dark {
  opacity: 0;
}

html[data-studio-light="dark"] .stage-backdrop-dark {
  opacity: 0.94;
}

html[data-studio-light="day"] .stage-backdrop-light {
  opacity: 0.96;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  background: var(--stage-vignette-bg);
}

.stage-spotlight {
  position: absolute;
  inset: 0;
  background: var(--spotlight-bg);
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}

.stage-grain {
  position: absolute;
  inset: 0;
  background: var(--stage-noise) 0 0 / 180px 180px repeat;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 28;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

.stage.impact-sar {
  animation: stage-impact-sm 260ms var(--ease-out);
}

.stage.impact-sar::after {
  background: radial-gradient(48% 42% at 50% 48%, rgba(255, 212, 84, 0.24), rgba(59, 130, 246, 0.08) 52%, transparent 78%);
  animation: stage-flare 420ms var(--ease-out);
}

.stage.impact-crown {
  animation: stage-impact-lg 360ms var(--ease-out);
}

.stage.impact-crown::after {
  background: radial-gradient(56% 48% at 50% 48%, rgba(255, 226, 132, 0.3), rgba(148, 197, 255, 0.16) 46%, transparent 82%);
  animation: stage-flare 560ms var(--ease-out);
}

@keyframes stage-flare {
  0% { opacity: 0.92; }
  100% { opacity: 0; }
}

@keyframes stage-impact-sm {
  0%, 100% { translate: 0 0; }
  25% { translate: -4px 3px; }
  55% { translate: 4px -2px; }
  80% { translate: -2px 1px; }
}

@keyframes stage-impact-lg {
  0%, 100% { translate: 0 0; }
  18% { translate: -7px 5px; }
  38% { translate: 7px -4px; }
  60% { translate: -5px -2px; }
  82% { translate: 3px 2px; }
}

.pack-aura {
  position: absolute;
  left: 50%;
  top: 49%;
  width: calc(var(--pack-w) * 1.75);
  height: calc(var(--pack-h) * 1.25);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--peek-aura, rgba(255, 196, 56, 0.58)), transparent 74%);
  filter: blur(22px);
  opacity: 0;
  scale: 0.86;
  pointer-events: none;
  transition: opacity 0.38s var(--ease-out), scale 0.45s var(--ease-out);
}

.pack-aura.active {
  opacity: 0.94;
  scale: 1.06;
}

.pack-aura.god-mode {
  --peek-aura: rgba(255, 198, 64, 0.68);
  opacity: 0.78;
  scale: 1;
  animation: aura-breathe 2.2s ease-in-out infinite;
}

@keyframes aura-breathe {
  50% {
    opacity: 0.98;
    scale: 1.1;
  }
}

.scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-style: preserve-3d;
  pointer-events: none;
}

.scene.flat {
  transform-style: flat;
  perspective: 1400px;
  perspective-origin: 50% 42%;
}

.grab-zone,
.card {
  pointer-events: auto;
}

.pack,
.card {
  position: absolute;
  left: 50%;
  top: 51%;
  transform-style: preserve-3d;
  will-change: transform;
}

.pack {
  width: var(--pack-w);
  height: var(--pack-h);
  margin: calc(var(--pack-h) / -2) 0 0 calc(var(--pack-w) / -2);
}

.pack.pack-fat {
  --pack-depth: 28px;
}

.pack.pack-fat .gusset-slice {
  scale: 1.55 1;
}

.ground-shadow {
  position: absolute;
  left: 50%;
  top: 51%;
  width: calc(var(--pack-w) * 1.08);
  height: calc(var(--pack-w) * 0.22);
  margin: calc(var(--pack-w) * -0.11) 0 0 calc(var(--pack-w) * -0.54);
  border-radius: 50%;
  background: var(--ground-shadow-bg);
  filter: blur(8px);
  pointer-events: none;
  transition: width 0.25s, height 0.25s;
}

.ground-shadow.fat-shadow {
  width: calc(var(--pack-w) * 1.24);
  height: calc(var(--pack-w) * 0.29);
  margin: calc(var(--pack-w) * -0.145) 0 0 calc(var(--pack-w) * -0.62);
  filter: blur(10px);
}

/* ---------- 真实宝可梦镀铝复合膜补充包 ---------- */
.pouch-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(calc(var(--pack-depth) / 2));
  --tooth-w: calc(var(--pack-w) / 24);
  background:
    var(--foil-shade, none) 0 0 / 100% 100%,
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.36) 0%,
      rgba(255, 255, 255, 0.22) 3.8%,
      transparent 11%,
      transparent 89%,
      rgba(255, 255, 255, 0.14) 95%,
      rgba(0, 0, 0, 0.44) 100%
    ),
    radial-gradient(
      78% 56% at calc(44% + var(--glint-x, 0) * 3%) 47%,
      color-mix(in srgb, var(--pack-highlight) 52%, #ffffff) 0%,
      var(--pack-color) 68%,
      var(--pack-shadow) 100%
    );
  mask:
    conic-gradient(from 135deg at 50% 0, transparent, #000 1deg 89deg, transparent 90deg) 0 0 / var(--tooth-w) calc(var(--tooth-w) / 2) repeat-x,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M0 0H100V5.6C100 8 97.6 7.6 97.6 10V10.6L95.3 11.4L97.6 12.2V90C97.6 92.4 100 92 100 94.4V100H0V94.4C0 92 2.4 92.4 2.4 90V12.2L4.7 11.4L2.4 10.6V10C2.4 7.6 0 8 0 5.6Z'/></svg>") 0 50% / 100% calc(100% - var(--tooth-w)) no-repeat,
    conic-gradient(from -45deg at 50% 100%, transparent, #000 1deg 89deg, transparent 90deg) 0 100% / var(--tooth-w) calc(var(--tooth-w) / 2) repeat-x;
}

.pouch-art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: contrast(1.03) saturate(1.04);
}

.pouch-crimp-top,
.pouch-crimp-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--crimp-h);
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.28) 0 1.2px,
      rgba(255, 255, 255, 0.26) 1.2px 2.4px,
      rgba(0, 0, 0, 0.06) 2.4px 4.5px
    );
  mix-blend-mode: overlay;
}

.pouch-crimp-top {
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.pouch-crimp-bottom {
  bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.bent-corner-crease {
  position: absolute;
  top: 0;
  right: 0;
  width: 24%;
  height: 10.5%;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(
      222deg,
      rgba(255, 245, 190, 0.78) 0%,
      rgba(255, 212, 84, 0.45) 36%,
      rgba(0, 0, 0, 0.45) 41%,
      transparent 46%
    );
}

.pack.bent-corner .bent-corner-crease {
  opacity: 1;
}

.pouch-face.back {
  transform: rotateY(180deg) translateZ(calc(var(--pack-depth) / 2));
}

.pouch-face::before,
.pouch-face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pouch-face::before {
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.34) 0%,
      rgba(255, 255, 255, 0.26) 4%,
      transparent 11%,
      transparent 89%,
      rgba(255, 255, 255, 0.18) 95.5%,
      rgba(0, 0, 0, 0.4) 100%
    ),
    linear-gradient(
      108deg,
      transparent 16%,
      rgba(255, 255, 255, 0.12) 28%,
      rgba(255, 255, 255, 0.44) 36%,
      rgba(255, 255, 255, 0.12) 44%,
      transparent 56%
    );
  translate: calc(var(--glint-x, 0) * 5%) 0;
  opacity: var(--glint-op, 0.85);
  mix-blend-mode: soft-light;
}

.pouch-face::after {
  background: var(--foil-shine, none) 0 0 / 100% 100%;
  opacity: var(--shine-op, 0.88);
  mask: linear-gradient(90deg, rgba(0, 0, 0, 0.45), #000 40% 60%, rgba(0, 0, 0, 0.45)) calc(var(--shine-pos, 50) * 1%) 0 / 250% 100%;
}

.pack.god-pack .pouch-face::after {
  background:
    linear-gradient(
      125deg,
      rgba(255, 218, 102, 0.42) 0%,
      rgba(255, 102, 218, 0.3) 36%,
      rgba(92, 230, 255, 0.32) 68%,
      rgba(255, 218, 102, 0.48) 100%
    ),
    var(--foil-shine, none) 0 0 / 100% 100%;
  mix-blend-mode: screen;
}

.gusset-slice {
  position: absolute;
}

.jet-anchor {
  position: absolute;
  left: 50%;
  top: 51%;
  width: var(--pack-w);
  height: var(--pack-h);
  margin: calc(var(--pack-h) / -2) 0 0 calc(var(--pack-w) / -2);
  transform-style: preserve-3d;
  pointer-events: none;
}

.light-jet {
  position: absolute;
  left: 0;
  width: 100%;
  top: calc(10.5% - var(--pack-w) * 0.6);
  height: calc(var(--pack-w) * 0.76);
  overflow: visible;
  opacity: 0;
  transform: translateZ(-6px);
}

.tear-label {
  position: absolute;
  left: 6%;
  right: 6%;
  top: calc(var(--crimp-h) + 0.9%);
  z-index: 3;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(8, 12, 24, 0.62);
  backdrop-filter: blur(4px);
  font: 700 calc(var(--pack-w) * 0.036) / 1.2 var(--font-ui);
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.tear-guide {
  position: absolute;
  left: 4.5%;
  right: 4.5%;
  top: 11.4%;
  height: 1.2px;
  z-index: 3;
  background: repeating-linear-gradient(90deg, rgba(255, 244, 184, 0.85) 0 4px, rgba(0, 0, 0, 0.45) 4px 7px);
  pointer-events: none;
}

.brand-mark {
  font: 800 calc(var(--pack-w) * 0.1) / 1 var(--font-ui);
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #fff6cc 15%, #f5c84c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.edition-tag {
  display: inline-block;
  margin-bottom: calc(var(--pack-w) * 0.04);
  padding: calc(var(--pack-w) * 0.016) calc(var(--pack-w) * 0.036);
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 12, 28, 0.45);
  font: 700 calc(var(--pack-w) * 0.032) / 1 var(--font-ui);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
}

.back-fin {
  position: absolute;
  left: 44%;
  width: 12%;
  top: 0;
  bottom: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(255, 255, 255, 0.26) 45%, rgba(0, 0, 0, 0.32));
}

.back-print-box {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 22%;
  z-index: 2;
  padding: 9% 6%;
  border-radius: calc(var(--pack-w) * 0.036);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(8, 12, 26, 0.56);
  backdrop-filter: blur(4px);
  text-align: center;
}

.back-mark {
  display: block;
  margin-bottom: calc(var(--pack-w) * 0.03);
}

.back-blurb {
  margin: 0 0 calc(var(--pack-w) * 0.04);
  font: 600 calc(var(--pack-w) * 0.042) / 1.55 var(--font-ui);
  color: rgba(255, 255, 255, 0.92);
}

.back-spec {
  display: block;
  font: 600 calc(var(--pack-w) * 0.025) / 1.2 var(--font-mono);
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.62);
}

.back-barcode {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: calc(var(--crimp-h) + 6%);
  height: 8.8%;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(
      90deg,
      #101218 0 2px, transparent 2px 3px,
      #101218 3px 4px, transparent 4px 7px,
      #101218 7px 10px, transparent 10px 12px
    ) content-box,
    rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.tear-flap {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  visibility: hidden;
}

.tear-flap.visible {
  visibility: visible;
}

.strip-segment {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 0 0;
}

.strip-segment .front {
  transform: translateZ(0.45px);
}

.pouch-face.foil-lining {
  transform: rotateY(180deg) translateZ(0.45px);
  background: linear-gradient(
    97deg,
    #dde4f0,
    #ffffff 13%,
    #c3cde0 27%,
    #ffffff 45%,
    #d5deed 59%,
    #ffffff 77%,
    #c9d4e6
  );
}

.pouch-face.foil-lining::before,
.pouch-face.foil-lining::after {
  display: none;
}

.curl-shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #080a16;
  opacity: 0;
}

.lip-shadow {
  position: absolute;
  inset: 0;
  z-index: 4;
  filter: drop-shadow(0 1.5px 1.4px rgba(0, 0, 0, 0.52));
  pointer-events: none;
}

.foil-lip {
  position: absolute;
  inset: 0;
  z-index: 4;
  clip-path: polygon(0 0);
  background: linear-gradient(
    100deg,
    #f3f6fb,
    #ffffff 14%,
    #b8c2d6 28%,
    #ffffff 43%,
    #c5cfe2 58%,
    #fcfdff 73%,
    #b2bdd1 87%,
    #eef1f7
  );
}

.grab-zone {
  position: absolute;
  inset: -24px -18px -8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: none;
  appearance: none;
  cursor: grab;
  touch-action: none;
  transform: translateZ(calc(var(--pack-depth) / 2 + 1px));
  -webkit-tap-highlight-color: transparent;
}

.grab-zone:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 8px;
}

.pack.tearing .grab-zone,
.pack.tugging .grab-zone {
  cursor: grabbing;
}

/* ---------- 光学级克制微闪 3D 宝可梦卡牌（正面平视 100% 零遮挡原图！） ---------- */
.card {
  width: var(--card-w);
  height: var(--card-h);
  margin: calc(var(--card-h) / -2) 0 0 calc(var(--card-w) / -2);
  touch-action: none;
  cursor: pointer;
  --px: 50;
  --py: 50;
  --tilt: 0;
  --band-pos: 50%;
  --aura-color: transparent;
}

.card:focus {
  outline: none;
}

.card:focus-visible .card-face,
.card:focus-visible .card-back {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.card-face,
.card-back,
.card-edge {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--card-w) * 0.048);
}

.card-edge {
  background: var(--card-edge-color, #cbd5e1);
  pointer-events: none;
}

.card-edge:nth-child(1) {
  transform: translateZ(-1.3px);
}
.card-edge:nth-child(2) {
  transform: translateZ(-2.6px);
}
.card-edge:nth-child(3) {
  transform: translateZ(-4px);
  box-shadow: 0 26px 44px -14px rgba(0, 0, 0, 0.72);
}

.card-back {
  transform: rotateY(180deg) translateZ(4.6px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background: #0d2b5e;
  box-shadow: 0 24px 42px -14px rgba(0, 0, 0, 0.68);
}

.card-back-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.card-face {
  transform: translateZ(0.6px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  isolation: isolate;
  background: #141926;
}

/* 叠牌阶段后排高罕卡微光边线悬念 */
.card.stack-hidden-hit:not(.rarity-common) .card-face {
  box-shadow:
    0 0 0 1.2px var(--aura-color),
    0 0 18px 3px var(--aura-color);
}

/* 高罕卡外框柔和呼吸金边（贴合原图色系，绝不喧宾夺主） */
.card.finish-bwr-black.settled .card-face,
.card.finish-bwr-black.stack-top .card-face {
  box-shadow:
    0 0 0 1px rgba(186, 214, 255, 0.55),
    0 0 22px 2px rgba(96, 165, 250, 0.28);
}

.card.finish-bwr-white.settled .card-face,
.card.finish-bwr-white.stack-top .card-face {
  box-shadow:
    0 0 0 1px rgba(245, 222, 168, 0.65),
    0 0 22px 2px rgba(245, 208, 125, 0.28);
}

.card.finish-fur.settled .card-face,
.card.finish-fur.stack-top .card-face {
  box-shadow:
    0 0 0 1px rgba(165, 243, 252, 0.6),
    0 0 24px 2px rgba(192, 132, 252, 0.3);
}

.card.rarity-sr.settled .card-face,
.card.rarity-sr.stack-top .card-face {
  box-shadow:
    0 0 0 1px rgba(216, 180, 254, 0.55),
    0 0 18px 1px rgba(192, 132, 252, 0.24);
}

.card.rarity-sar.settled .card-face,
.card.rarity-sar.stack-top .card-face {
  box-shadow:
    0 0 0 1px rgba(255, 212, 84, 0.55),
    0 0 18px 1px rgba(255, 190, 46, 0.24);
}

.card-full-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

/* 100% 纯净原图开关开启时，仅隐藏卡面内部光效叠加层（绝不影响卡牌本体！） */
html[data-foil-mode="raw"] .card-face > .foil-holo,
html[data-foil-mode="raw"] .card-face > .foil-glare {
  display: none !important;
}

/* 窄幅局部线性扫光遮罩：严格限定于 .card-face 直接子层，杜绝任何类名碰撞 */
.card-face > .foil-holo,
.card-face > .foil-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
}

.card-face > .foil-holo {
  opacity: 0;
  background: var(--holo-silk);
  mix-blend-mode: soft-light;
  -webkit-mask-image: linear-gradient(
    114deg,
    transparent 0%,
    transparent calc(var(--band-pos) - 20%),
    rgba(0, 0, 0, 0.45) calc(var(--band-pos) - 9%),
    #000 var(--band-pos),
    rgba(0, 0, 0, 0.45) calc(var(--band-pos) + 9%),
    transparent calc(var(--band-pos) + 20%),
    transparent 100%
  );
  mask-image: linear-gradient(
    114deg,
    transparent 0%,
    transparent calc(var(--band-pos) - 20%),
    rgba(0, 0, 0, 0.45) calc(var(--band-pos) - 9%),
    #000 var(--band-pos),
    rgba(0, 0, 0, 0.45) calc(var(--band-pos) + 9%),
    transparent calc(var(--band-pos) + 20%),
    transparent 100%
  );
}

.card-face > .foil-glare {
  opacity: calc(var(--tilt) * 0.14);
  background: linear-gradient(
    114deg,
    transparent calc(var(--band-pos) - 16%),
    rgba(255, 255, 255, 0.45) var(--band-pos),
    transparent calc(var(--band-pos) + 16%)
  );
  mix-blend-mode: soft-light;
}

/* 平卡 C/U：无全息层，仅在倾斜时呈现真实纸卡微弱边缘清漆反光 */
.card.finish-none .card-face > .foil-holo {
  display: none;
}

/* R / 30th平闪 / 镜面闪卡槽：克制柔和丝光扫带 */
.card.finish-holo .card-face > .foil-holo {
  opacity: calc(var(--tilt) * 0.24);
}

/* RR 宝可梦 ex：利落银蓝斜向金属扫光 */
.card.finish-rr .card-face > .foil-holo {
  opacity: calc(var(--tilt) * 0.26);
  background: linear-gradient(
    114deg,
    rgba(125, 211, 252, 0.7),
    rgba(255, 255, 255, 0.9),
    rgba(196, 181, 253, 0.75)
  );
  mix-blend-mode: overlay;
}

/* AR / SR / SAR / 30周年经典复刻：仅在窄幅扫光带内泛起细腻虹彩与微晶星尘 */
.card.finish-ar .card-face > .foil-holo,
.card.finish-sr .card-face > .foil-holo,
.card.finish-sar .card-face > .foil-holo,
.card.finish-classic30 .card-face > .foil-holo {
  opacity: calc(var(--tilt) * 0.32);
  mix-blend-mode: overlay;
}

.card.finish-sr .card-face > .foil-holo {
  background: linear-gradient(
    114deg,
    rgba(216, 180, 254, 0.72),
    rgba(248, 250, 252, 0.92),
    rgba(147, 197, 253, 0.75)
  );
}

.card.finish-sar .card-face > .foil-holo::after,
.card.finish-classic30 .card-face > .foil-holo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 248, 220, 0.65);
  -webkit-mask: var(--holo-glitter) 0 0 / 128px 128px;
  mask: var(--holo-glitter) 0 0 / 128px 128px;
}

/* 30周年全新稀有度 FUR：清透柔和幻彩棱镜扫光 */
.card.finish-fur .card-face > .foil-holo {
  opacity: calc(var(--tilt) * 0.3);
  mix-blend-mode: soft-light;
}

/* 捷克罗姆 ex BWR 专属：纯铂金冷银窄光带（0% 彩虹杂色，完美保留深邃暗黑金属浮雕！） */
.card.finish-bwr-black .card-face > .foil-holo {
  opacity: calc(var(--tilt) * 0.34);
  background: linear-gradient(
    114deg,
    rgba(148, 182, 235, 0.55) 0%,
    rgba(241, 245, 249, 0.92) 50%,
    rgba(148, 182, 235, 0.55) 100%
  );
  mix-blend-mode: screen;
}

/* 莱希拉姆 ex BWR 专属：温润珠光香槟微影（禁用高光溢出，反而加深纯白银纹立体线条！） */
.card.finish-bwr-white .card-face > .foil-holo {
  opacity: calc(var(--tilt) * 0.28);
  background: linear-gradient(
    114deg,
    rgba(168, 150, 118, 0.45) 0%,
    rgba(120, 148, 188, 0.38) 50%,
    rgba(182, 160, 122, 0.45) 100%
  );
  mix-blend-mode: multiply;
}

.card.finish-bwr-white .card-face > .foil-glare {
  opacity: calc(var(--tilt) * 0.06);
}

.card-face > .foil-clearcoat {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 1px 1px rgba(255, 255, 255, 0.48),
    inset 0 -1.5px 3px rgba(0, 0, 0, 0.18);
}

/* ---------- 粒子画布、零遮挡卡牌检视信息胶囊与底部控制台 ---------- */
.confetti-canvas {
  position: absolute;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body.showcase-active .gesture-hint,
body.showcase-active .console-dock {
  display: none !important;
}

.bottom-chrome {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  z-index: 45;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 20px);
  pointer-events: none;
}

.showcase-bar {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--chrome-surface);
  border: 1px solid rgba(245, 200, 76, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--chrome-shadow);
}

.showcase-bar[hidden] {
  display: none !important;
}

.card-inspect-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(680px, calc(100vw - 24px));
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--chrome-surface);
  border: 1px solid var(--chrome-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--chrome-shadow);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.card-inspect-pill[hidden],
.inspect-new[hidden],
.inspect-dup[hidden] {
  display: none;
}

.inspect-new {
  padding: 2px 8px;
  border-radius: 99px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #ffffff;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.inspect-dup {
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #38bdf8;
  font-weight: 700;
  font-size: 10.5px;
  flex-shrink: 0;
}

.inspect-rarity {
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(245, 200, 76, 0.18);
  border: 1px solid rgba(245, 200, 76, 0.45);
  color: #f5c84c;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
}

html[data-studio-light="day"] .inspect-rarity {
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
}

.inspect-name {
  font-weight: 700;
  color: var(--chrome-ink);
  flex-shrink: 0;
}

.inspect-trait {
  color: var(--chrome-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.gesture-hint {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--chrome-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.38);
  transition: opacity 0.25s var(--ease-out), translate 0.25s var(--ease-out);
}

html[data-studio-light="day"] .gesture-hint {
  text-shadow: none;
}

.gesture-hint::before,
.gesture-hint::after {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: 0.36;
}

.gesture-hint.hidden {
  opacity: 0;
  translate: 0 6px;
}

.console-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--chrome-surface);
  border: 1px solid var(--chrome-border);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: var(--chrome-shadow);
}

.console-sep {
  width: 1px;
  height: 24px;
  background: var(--chrome-sep);
  flex-shrink: 0;
}

.console-item {
  -webkit-tap-highlight-color: transparent;
  position: relative;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--chrome-ink);
  text-align: left;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.18s var(--ease-out), border-color 0.18s var(--ease-out), scale 0.16s var(--ease-out);
}

button.console-item {
  cursor: pointer;
}

button.console-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.console-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.console-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--chrome-muted);
}

.console-val {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.binder-icon {
  color: var(--poke-gold);
  flex-shrink: 0;
}

html[data-studio-light="day"] .binder-icon {
  color: #2563eb;
}

.points-gem {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  font-size: 11px;
  flex-shrink: 0;
}

html[data-studio-light="day"] .points-gem {
  color: #0284c7;
}

.binder-bar {
  width: 28px;
  height: 4px;
  border-radius: 99px;
  background: var(--chrome-sep);
  overflow: hidden;
  flex-shrink: 0;
}

.binder-bar > i {
  display: block;
  height: 100%;
  width: var(--binder-pct, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #f5c84c);
  transition: width 0.35s var(--ease-out);
}

.console-sep[hidden],
.console-item[hidden] {
  display: none !important;
}

.box-meter-group {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 11px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.box-hit-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.65);
  flex-shrink: 0;
  transition: background-color 0.25s, box-shadow 0.25s;
}

.box-meter-group.hit-pulled .box-hit-led {
  background: #f5c84c;
  box-shadow: 0 0 10px rgba(245, 200, 76, 0.9);
}

.box-meter-group.hit-pulled .console-kicker {
  color: #fbbf24;
}

html[data-studio-light="day"] .box-meter-group.hit-pulled .console-kicker {
  color: #b45309;
}

.fresh-box-btn {
  -webkit-tap-highlight-color: transparent;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--chrome-ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, scale 0.15s;
}

.box-meter-group.hit-pulled .fresh-box-btn {
  border-color: rgba(245, 200, 76, 0.58);
  background: rgba(245, 200, 76, 0.18);
  color: #fde68a;
}

html[data-studio-light="day"] .fresh-box-btn {
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.06);
}

html[data-studio-light="day"] .box-meter-group.hit-pulled .fresh-box-btn {
  border-color: rgba(180, 83, 9, 0.45);
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.fresh-box-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dock-btn.gold-fast {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 55%, #fbbf24 100%);
  color: #111827;
  border: 1px solid rgba(254, 243, 199, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 6px 16px -6px rgba(245, 158, 11, 0.6);
}

.console-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
}

.dock-btn {
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: scale 0.16s var(--ease-out), filter 0.18s, background-color 0.18s;
}

.dock-btn[hidden] {
  display: none;
}

.dock-btn.primary {
  background: var(--cta-primary-bg);
  color: var(--cta-primary-ink);
  border: 1px solid var(--cta-primary-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 16px -6px rgba(0, 0, 0, 0.45);
}

.dock-btn.accent {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff;
  border: 1px solid rgba(165, 180, 252, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 16px -6px rgba(79, 70, 229, 0.55);
}

.dock-btn.secondary {
  background: var(--cta-secondary-bg);
  color: var(--cta-secondary-ink);
  border: 1px solid var(--cta-secondary-border);
}

.dock-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.luck-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chrome-sep);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: background-color 0.22s, box-shadow 0.22s;
  flex-shrink: 0;
}

.luck-switch[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(64, 46, 14, 0.8), rgba(44, 24, 64, 0.82));
  border-color: rgba(245, 200, 76, 0.6);
  color: #ffe8a3;
}

.luck-switch[aria-pressed="true"] .console-kicker {
  color: rgba(255, 224, 148, 0.78);
}

.luck-switch[aria-pressed="true"] .luck-led {
  background: #ffd454;
  box-shadow: 0 0 10px 2px rgba(255, 212, 84, 0.9);
}

/* ---------- 516 张完整典藏图鉴弹窗 & 十连拆包战报弹窗 ---------- */
.binder-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.binder-modal[hidden] {
  display: none;
}

.binder-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 16, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.binder-sheet {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(59, 130, 246, 0.16), transparent 70%),
    linear-gradient(180deg, #101522 0%, #090c15 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f4f6fa;
  box-shadow:
    0 34px 72px -16px rgba(0, 0, 0, 0.86),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
  animation: sheet-in 0.25s var(--ease-out);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    scale: 0.96;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    scale: 1;
    translate: 0 0;
  }
}

.binder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.binder-sub {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(220, 228, 242, 0.68);
  font-variant-numeric: tabular-nums;
}

.binder-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff8e6;
}

.binder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.binder-reset,
.binder-close {
  height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s;
}

.binder-reset {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(226, 232, 244, 0.72);
}

.binder-close {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.binder-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 22px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.binder-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.binder-tab {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 244, 0.72);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s;
}

.binder-tab.active {
  background: rgba(245, 200, 76, 0.18);
  border-color: rgba(245, 200, 76, 0.58);
  color: #ffe89e;
}

.binder-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.binder-search {
  flex: 1 1 220px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 22, 0.65);
  color: #f4f6fa;
  font-size: 12px;
  outline: none;
}

.binder-search:focus {
  border-color: rgba(245, 200, 76, 0.6);
}

.binder-rarity-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
}

.rarity-filter-pill {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(220, 228, 242, 0.72);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.rarity-filter-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.56);
  color: #bae6fd;
}

.binder-own-select {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #141b2d;
  color: #f4f6fa;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.binder-grid {
  padding: 16px 22px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: 12px;
}

.binder-empty {
  grid-column: 1 / -1;
  padding: 40px 16px;
  text-align: center;
  color: rgba(214, 224, 240, 0.56);
  font-size: 13px;
}

.binder-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 13px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #141a2b;
  text-align: left;
  transition: translate 0.2s var(--ease-out), box-shadow 0.2s, border-color 0.2s;
}

.binder-slot.unlocked {
  border-color: rgba(245, 200, 76, 0.3);
  background: linear-gradient(165deg, #1b243b, #111726);
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.68);
}

.binder-slot.unlocked:hover {
  translate: 0 -4px;
  border-color: rgba(245, 200, 76, 0.72);
  box-shadow: 0 18px 32px -10px rgba(0, 0, 0, 0.82);
}

.binder-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 500 / 698;
  border-radius: 8px;
  overflow: hidden;
  background: #0d1322;
}

.binder-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.binder-slot.locked .binder-card-thumb img {
  opacity: 0.26;
  filter: saturate(0.35) contrast(0.95);
}

.binder-count-pill {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(8, 12, 22, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

.binder-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
}

.binder-exchange-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.9);
  color: rgba(226, 232, 244, 0.65);
  font-size: 11px;
  font-weight: 700;
  cursor: not-allowed;
  transition: all 0.18s;
}

.binder-exchange-btn.can-afford {
  border-color: rgba(56, 189, 248, 0.72);
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.48);
}

.binder-exchange-btn.can-afford:hover {
  filter: brightness(1.1);
  scale: 1.04;
}

.binder-meta {
  padding: 6px 3px 2px;
}

.binder-meta-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.binder-meta-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(214, 224, 240, 0.64);
  font-variant-numeric: tabular-nums;
}

/* 十连拆包战报弹窗 */
.ten-pull-body {
  padding: 16px 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ten-sec-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fde68a;
}

.ten-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 12px;
}

.ten-all-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
  gap: 10px;
}

.ten-card-item {
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141b2d;
  cursor: pointer;
  transition: translate 0.18s var(--ease-out), border-color 0.18s;
}

.ten-card-item:hover {
  translate: 0 -3px;
  border-color: rgba(245, 200, 76, 0.72);
}

.ten-card-item.high-hit {
  border-color: rgba(245, 200, 76, 0.55);
  background: linear-gradient(165deg, #242b47, #13192b);
  box-shadow: 0 10px 24px -10px rgba(245, 200, 76, 0.35);
}

.ten-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 2px 1px;
  font-size: 10.5px;
}

.ten-card-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ten-tag-new {
  color: #fbbf24;
  font-weight: 800;
  font-size: 9.5px;
  flex-shrink: 0;
}

.ten-tag-dup {
  color: #38bdf8;
  font-weight: 700;
  font-size: 9.5px;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .util-btn:hover,
  button.console-item:hover,
  .flip-pack-btn:hover,
  .series-pill:not(.active):hover {
    background: var(--chrome-hover);
  }
  .dock-btn:hover {
    filter: brightness(1.06);
  }
  .binder-reset:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
  }
  .binder-close:hover {
    background: rgba(255, 255, 255, 0.18);
  }
}

@media (max-width: 820px) {
  .top-bar {
    left: 12px;
    right: 12px;
  }
  .util-btn #themeModeLabel,
  .util-btn #foilModeLabel {
    display: none;
  }
  .util-btn.mode-btn,
  .util-btn.foil-btn {
    width: 32px;
    padding: 0;
  }
  .series-pill {
    padding: 0 9px;
    font-size: 11px;
  }
  .console-dock {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 22px;
    padding: 6px 10px;
    gap: 4px 6px;
  }
  .console-sep,
  .binder-bar,
  .inspect-trait {
    display: none;
  }
  .console-item {
    height: 35px;
    padding: 0 9px;
    gap: 6px;
  }
  .dock-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }
  .gesture-hint {
    font-size: 11px;
  }
  .binder-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px 14px 20px;
    gap: 10px;
  }
  .ten-all-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (pointer: coarse) {
  .card-edge:nth-child(-n + 2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pack-aura.god-mode,
  .stage.impact-sar,
  .stage.impact-crown {
    animation: none;
  }
}
