/* arena.css —— 多人选包页（深色，和抽奖台同一套语言） */

:root {
  --bg: #080a10;
  --ink: #eef1f7;
  --ink-dim: rgba(226, 232, 244, 0.5);
  --line: rgba(255, 255, 255, 0.1);
  --gold: #e3b062;
  --rose: #ff5a7a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

/* display:grid / flex 会覆盖 hidden，必须显式关掉 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", -apple-system, "SF Pro Text", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background:
    radial-gradient(120% 60% at 50% -8%, rgba(120, 170, 255, 0.16), transparent 62%),
    linear-gradient(180deg, #0b0e14 0%, #080a10 58%, #05070b 100%);
  min-height: 100dvh;
}

/* ---------- 登录 ---------- */
.login {
  max-width: 420px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 64px) 24px calc(env(safe-area-inset-bottom) + 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-title {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.login-sub {
  margin: 10px 0 40px;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}

.login-label {
  align-self: flex-start;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}

.login-input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.login-input::placeholder {
  color: rgba(226, 232, 244, 0.32);
}

.login-input:focus {
  border-color: rgba(227, 176, 98, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.login-btn {
  width: 100%;
  height: 56px;
  margin-top: 16px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, #ffffff, #d9dce6);
  color: #10141d;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.8);
  transition: transform 0.12s var(--ease);
}

.login-btn:active {
  transform: scale(0.98);
}

.login-tip {
  margin: 18px 0 0;
  font-size: 12px;
  color: rgba(226, 232, 244, 0.34);
}

/* ---------- 包阵 ---------- */
.arena {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 14px calc(env(safe-area-inset-bottom) + 12px);
}

.arena-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 -14px;
  padding: calc(env(safe-area-inset-top) + 10px) 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 10, 16, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
}

.arena-count {
  color: rgba(240, 244, 252, 0.88);
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.arena-phase {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.arena-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  gap: 9px;
  align-content: start;
  padding-bottom: 8px;
}

/* ---------- 迷你卡包（和开包时同一副外形） ---------- */
.pack {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1 / 1.45;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 480px;
  perspective-origin: 50% 42%;
  transition: transform 0.16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.pack::before {
  content: "";
  position: absolute;
  left: 17%;
  right: 17%;
  bottom: 4%;
  height: 9%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35) 48%, transparent 74%);
  filter: blur(4px);
  opacity: 0.3;
  transform: translateX(calc(-1 * var(--shadow-shift, 3px))) scale(0.84);
  animation: pack-shadow var(--motion-duration, 6s) ease-in-out var(--motion-delay, 0s) infinite;
  pointer-events: none;
}

.pack--placeholder {
  pointer-events: none;
}

.pack--enter {
  animation: pack-enter 0.38s var(--ease) both;
  will-change: opacity, transform;
}

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

.pack .pkfull {
  z-index: 1;
  transform-origin: 50% 58%;
  transform-style: preserve-3d;
  animation: pack-sway var(--motion-duration, 6s) ease-in-out var(--motion-delay, 0s) infinite;
}

@keyframes pack-sway {
  0%, 100% {
    transform:
      translate3d(0, 0, var(--sway-depth-a, 6px))
      rotateX(var(--sway-x-a, -3.5deg))
      rotateY(var(--sway-y-a, -10deg))
      rotateZ(var(--sway-z-a, -1.2deg));
  }
  50% {
    transform:
      translate3d(0, calc(-1 * var(--sway-lift, 10px)), var(--sway-depth-b, 20px))
      rotateX(var(--sway-x-b, 3deg))
      rotateY(var(--sway-y-b, 10deg))
      rotateZ(var(--sway-z-b, 1.2deg));
  }
}

@keyframes pack-shadow {
  0%, 100% {
    opacity: 0.28;
    transform: translateX(calc(-1 * var(--shadow-shift, 3px))) scale(0.84);
  }
  50% {
    opacity: 0.52;
    transform: translateX(var(--shadow-shift, 3px)) scale(1);
  }
}

@supports (animation-timeline: view()) {
  .pack:not(.pack--placeholder) {
    view-timeline-name: --pack-reveal;
    view-timeline-axis: block;
    animation: pack-fade-in linear both, pack-fade-out linear none, pack-scroll-shade linear both;
    animation-duration: auto, auto, auto;
    animation-timeline: --pack-reveal, --pack-reveal, --pack-reveal;
    animation-range: entry 0% entry 50%, exit 50% exit 100%, entry 0% exit 100%;
  }
}

@keyframes pack-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pack-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes pack-scroll-shade {
  0% { filter: brightness(0.66); }
  50% { filter: brightness(1.12); }
  100% { filter: brightness(0.66); }
}

@media (prefers-reduced-motion: reduce) {
  .pack:not(.pack--placeholder),
  .pack--enter,
  .pack::before,
  .pack .pkfull,
  .pack .pouch-face.front::before,
  .pack .pouch-face.front::after {
    animation: none;
  }
  .pack .pkfull {
    translate: none;
  }
}

.pack:active:not(.taken) {
  transform: scale(0.95);
}

/* 已被别人选走：包褪成空槽，位置不动 */
.pack.taken {
  cursor: default;
}

.pack.taken .pkfull {
  filter: none;
  opacity: 0.3;
}

/* 我自己选的 */
.pack.mine .pkfull {
  opacity: 0.55;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 10px rgba(227, 176, 98, 0.4));
}

/* 我的包：整格一圈金框（在 zoom 外，线宽不会被缩放） */
.pack.mine::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 8px;
  border: 2px solid rgba(227, 176, 98, 0.95);
  box-shadow: 0 0 16px rgba(227, 176, 98, 0.45);
  pointer-events: none;
  z-index: 5;
}

/* ---------- 底部 ---------- */
.arena-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.my-pick {
  flex: 1;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}

.my-pick b {
  color: var(--gold);
  font-size: 15px;
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(340px, 100%);
  padding: 26px 22px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #12151d;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  text-align: center;
}

.modal-kicker {
  margin: 0 0 10px;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--ink-dim);
}

.modal-title {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.modal-text {
  margin: 12px 0 22px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.btn-ghost,
.btn-solid {
  flex: 1;
  height: 46px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 0;
  background: linear-gradient(180deg, #ffffff, #d9dce6);
  color: #10141d;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(226, 232, 244, 0.7);
}


.modal.is-warn .modal-kicker {
  color: var(--rose);
}

.modal.is-warn .modal-title {
  color: var(--rose);
  font-size: 24px;
}

/* ==== REAL POUCH (copied from styles.css) ==== */
/* 容器：等比缩放的整只袋子（280×406 基准，zoom 缩到格子大小） */
.pkfull {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280px;
  height: 406px;
  margin: -203px 0 0 -140px;
  --pack-h: 406px;
  --pack-w: 280px;
  --crimp-h: 27.6px;
  --pack-depth: 28px;
  zoom: var(--pk-zoom, 0.26);
  pointer-events: none;
}

/* ---------- 镀铝复合膜补充包（热压锯齿 + 激光易撕口 + 枕式金属漫反射） ---------- */
.pouch-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(calc(var(--pack-depth) / 2));
  --tooth-w: calc(var(--pack-w) / 28);
  background:
    var(--foil-shade, none) 0 0 / 100% 100%,
    /* 上下热压封口内侧立体压痕亮线 */
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0 1px, rgba(255, 255, 255, 0.34) 1px 2px, transparent 3px) 0 var(--crimp-h) / 100% 5px no-repeat,
    linear-gradient(0deg, rgba(0, 0, 0, 0.46) 0 1px, rgba(255, 255, 255, 0.26) 1px 2px, transparent 3px) 0 calc(100% - var(--crimp-h)) / 100% 5px no-repeat,
    /* 上下封口精密金属压纹槽 */
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.34) 0 1.2px,
      rgba(255, 255, 255, 0.22) 1.2px 2.4px,
      rgba(0, 0, 0, 0.08) 2.4px 4.6px
    ) 0 0 / 100% var(--crimp-h) no-repeat,
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.34) 0 1.2px,
      rgba(255, 255, 255, 0.2) 1.2px 2.4px,
      rgba(0, 0, 0, 0.08) 2.4px 4.6px
    ) 0 100% / 100% var(--crimp-h) no-repeat,
    /* 袋身左右弧面体积边缘光与暗部转折 */
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.36) 0%,
      rgba(255, 255, 255, 0.24) 3.4%,
      transparent 10%,
      transparent 88%,
      rgba(255, 255, 255, 0.12) 94.5%,
      rgba(0, 0, 0, 0.44) 100%
    ) 0 50% / 100% calc(100% - 2 * var(--crimp-h)) no-repeat,
    /* 极细拉丝镀铝膜纵纹 */
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 3px),
    /* 枕式鼓包中心金属高光与四角收紧暗角 */
    radial-gradient(
      78% 56% at calc(44% + var(--glint-x, 0) * 3%) 47%,
      color-mix(in srgb, var(--pack-highlight) 58%, #ffffff) 0%,
      color-mix(in srgb, var(--pack-color) 82%, var(--pack-highlight)) 34%,
      var(--pack-color) 68%,
      var(--pack-shadow) 100%
    );
  /* 含两侧 y=11.4% 激光 V 型易撕缺口的包装袋轮廓遮罩 */
  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;
}.pkfull .pouch-face.back{
  background: var(--pack-shadow);
  border-radius: 3% 3% 4% 4% / 2% 2% 3% 3%;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.75);
  transform: rotateY(180deg) translateZ(calc(var(--pack-depth) / 2));
}.pkfull .pouch-face::before,
.pkfull .pouch-face::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 随倾角游走的宽幅金属镜面反光带 */
.pouch-face::before {
  background: linear-gradient(
    108deg,
    transparent 16%,
    rgba(255, 255, 255, 0.08) 28%,
    rgba(255, 255, 255, 0.34) 36%,
    rgba(255, 255, 255, 0.08) 44%,
    transparent 56%
  );
  mask: linear-gradient(transparent 6%, #000 13% 87%, transparent 94%);
  translate: calc(var(--glint-x, 0) * 6%) 0;
  opacity: var(--glint-op, 0.82);
  mix-blend-mode: soft-light;
}.pkfull .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 .pouch-face.front {
  overflow: hidden;
}

.pack .pouch-face.front::before {
  opacity: 0.32;
  animation: pack-glint var(--motion-duration, 6s) ease-in-out var(--sheen-delay, 0s) infinite;
}

.pack .pouch-face.front::after {
  inset: -20%;
  background: linear-gradient(
    112deg,
    transparent 38%,
    rgba(255, 255, 255, 0.02) 44%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.04) 56%,
    transparent 62%
  );
  mask: none;
  opacity: 0;
  mix-blend-mode: screen;
  transform: translateX(-38%);
  animation: pack-sheen calc(var(--motion-duration, 6s) + 1.2s) ease-in-out var(--sheen-delay, 0s) infinite;
}

@keyframes pack-glint {
  0%, 12% { translate: -34% 0; opacity: 0; }
  28% { opacity: 0.42; }
  48% { translate: 34% 0; opacity: 0.68; }
  64%, 100% { translate: 42% 0; opacity: 0; }
}

@keyframes pack-sheen {
  0%, 18% { transform: translateX(-38%); opacity: 0; }
  34% { opacity: 0.3; }
  55% { transform: translateX(38%); opacity: 0.48; }
  72%, 100% { transform: translateX(42%); opacity: 0; }
}

/* 欧皇全闪包：黑金幻彩镀膜外袋 */
.pack.god-pack .pouch-face {
  background:
    var(--foil-shade, none) 0 0 / 100% 100%,
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0 1px, rgba(255, 232, 160, 0.5) 1px 2px, transparent 3px) 0 var(--crimp-h) / 100% 5px no-repeat,
    linear-gradient(0deg, rgba(0, 0, 0, 0.48) 0 1px, rgba(255, 232, 160, 0.4) 1px 2px, transparent 3px) 0 calc(100% - var(--crimp-h)) / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0 1.2px, rgba(255, 226, 138, 0.32) 1.2px 2.4px, transparent 2.4px 4.6px) 0 0 / 100% var(--crimp-h) no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0 1.2px, rgba(255, 226, 138, 0.32) 1.2px 2.4px, transparent 2.4px 4.6px) 0 100% / 100% var(--crimp-h) no-repeat,
    linear-gradient(128deg, rgba(255, 218, 106, 0.45) 0%, rgba(255, 108, 214, 0.25) 38%, rgba(92, 224, 255, 0.28) 68%, rgba(255, 214, 102, 0.5) 100%),
    radial-gradient(80% 58% at 45% 46%, #3d3159 0%, #1c172e 58%, #0b0914 100%);
}.pkfull .gusset-slice{
  position: absolute;
}

/* ---------- 袋口彩虹喷流 ---------- */
.jet-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  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;
}.pkfull .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: 8.5%;
  right: 8.5%;
  top: calc(var(--crimp-h) + 1.1%);
  font: 700 calc(var(--pack-w) * 0.028) / 1 system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}.pkfull .tear-guide{
  position: absolute;
  left: 5%;
  right: 5%;
  top: 11.4%;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.52) 0 4px, transparent 4px 7px);
}

/* 袋面金属内框（位于 y=20.2% 以下，避开顶部动态撕裂带） */
.pouch-foil-frame {
  position: absolute;
  left: 7.5%;
  right: 7.5%;
  top: 20.2%;
  bottom: calc(var(--crimp-h) + 2.8%);
  border-radius: calc(var(--pack-w) * 0.032);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 26%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
}.pkfull .pouch-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6.5% 7% 0;
}.pkfull .brand-mark{
  display: block;
  text-align: left;
  font: 800 calc(var(--pack-w) * 0.086) / 1.3 -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 15%, rgba(230, 238, 255, 0.82) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.32));
}.pkfull .edition-tag{
  padding: calc(var(--pack-w) * 0.014) calc(var(--pack-w) * 0.028);
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(8, 12, 28, 0.34);
  font: 700 calc(var(--pack-w) * 0.027) / 1 system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
}.pkfull.god-pack .edition-tag{
  border-color: rgba(255, 218, 118, 0.72);
  background: rgba(34, 24, 8, 0.62);
  color: #ffe699;
}

/* 吉祥物背后的精密星轨金属环，让角色融于包装主视觉 */
.pouch-halo-ring {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 74%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.12),
    0 0 0 5px rgba(255, 255, 255, 0.04);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 68%);
}.pkfull .pouch-footer{
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: calc(var(--crimp-h) + 4.6%);
  display: flex;
  flex-direction: column;
  gap: calc(var(--pack-w) * 0.016);
  pointer-events: none;
}.pkfull .pouch-foot-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: calc(var(--pack-w) * 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}.pkfull .pack-foot{
  font: 700 calc(var(--pack-w) * 0.031) / 1 system-ui, sans-serif;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
}.pkfull .pack-micro-spec{
  font: 600 calc(var(--pack-w) * 0.023) / 1 system-ui, sans-serif;
  letter-spacing: 0.15em;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
}

/* 补充包背面中封鳍片与印刷信息 */
.back-fin {
  position: absolute;
  left: 44.5%;
  width: 11%;
  top: 0;
  bottom: 0;
  z-index: 2;
  background:
    repeating-linear-gradient(rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.36), rgba(255, 255, 255, 0.22) 45%, rgba(0, 0, 0, 0.28));
}.pkfull .back-print-box{
  position: absolute;
  left: 10%;
  right: 10%;
  top: 22%;
  padding: 8% 6%;
  border-radius: calc(var(--pack-w) * 0.028);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(6, 10, 24, 0.22);
  text-align: center;
}.pkfull .back-mark{
  display: block;
  font-size: calc(var(--pack-w) * 0.088);
  margin-bottom: calc(var(--pack-w) * 0.035);
}.pkfull .back-blurb{
  margin: 0 0 calc(var(--pack-w) * 0.04);
  font: 500 calc(var(--pack-w) * 0.038) / 1.55 system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.88);
}.pkfull .back-spec{
  display: block;
  font: 600 calc(var(--pack-w) * 0.022) / 1.2 system-ui, sans-serif;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.56);
}.pkfull .back-barcode{
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: calc(var(--crimp-h) + 6%);
  height: 9.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.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

/* ---------- 角色表情绑定层 ---------- */
.mascot-slot {
  position: absolute;
  left: 11%;
  width: 78%;
  top: 29.5%;
  aspect-ratio: 1;
  transition: scale 0.35s var(--spring-css);
}.pkfull .char-body,
.pkfull .char-drop-shadow{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}.pkfull .mascot-slot .char-body{
  filter: hue-rotate(calc(var(--hue-shift, 0) * 1deg));
}.pkfull .char-drop-shadow{
  translate: 0 4%;
  filter: brightness(0) blur(calc(var(--pack-w) * 0.026));
  opacity: 0.42;
}.pkfull .rig-eye{
  position: absolute;
  aspect-ratio: 1 / 1.18;
  transition: opacity 0.09s, scale 0.14s var(--ease-out);
}.pkfull .rig-pupil{
  display: block;
  width: 100%;
  height: 100%;
  transition: scale 0.2s var(--ease-out);
}.pkfull .rig-mouth{
  position: absolute;
  transition: opacity 0.08s, scale 0.2s var(--ease-out);
}.pkfull .rig-joy{
  position: absolute;
  inset: 0;
  opacity: 0;
  scale: 0.86;
  transition: opacity 0.1s, scale 0.32s var(--spring-css);
  pointer-events: none;
}.pkfull .card.revealed.hovered .rig-joy{
  opacity: 1;
  scale: 1;
}.pkfull .card.revealed.hovered .rig-eye,
.pkfull .card.revealed.hovered .rig-mouth{
  opacity: 0;
  scale: 0.7;
}.pkfull .rig-ouch{
  position: absolute;
  inset: 0;
  opacity: 0;
  scale: 0.84;
  transition: opacity 0.08s, scale 0.24s var(--spring-css);
  pointer-events: none;
}.pkfull .rig-sweat{
  position: absolute;
  opacity: 0;
  scale: 0.7;
  translate: 0 -42%;
  transition: opacity 0.18s, scale 0.3s var(--spring-css), translate 0.48s var(--ease-out);
  pointer-events: none;
}.pkfull.tearing .mascot-slot{
  scale: 1.06 0.92;
  animation: wince-shake 90ms steps(2) infinite;
}.pkfull.tearing .rig-eye,
.pkfull.tearing .rig-mouth{
  opacity: 0;
  scale: 1 0.1;
}.pkfull.tearing .rig-ouch{
  opacity: 1;
  scale: 1;
}.pkfull.wincing .rig-sweat{
  opacity: 1;
  scale: 1;
  translate: 0 0;
}.pkfull.tugging .mascot-slot{
  scale: 0.95 1.07;
}

@keyframes wince-shake {
  50% {
    translate: 1.2px -0.8px;
  }
}

/* ---------- 12 段卷曲封条与金属撕裂断茬 ---------- */
.tear-flap {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  visibility: hidden;
}.pkfull .tear-flap.visible{
  visibility: visible;
}.pkfull .strip-segment{
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 0 0;
}.pkfull .strip-segment .front{
  transform: translateZ(0.45px);
}.pkfull .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
  );
}.pkfull .pouch-face.foil-lining::before,
.pkfull .pouch-face.foil-lining::after{
  display: none;
}.pkfull .curl-shade{
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #080a16;
  opacity: 0;
}.pkfull .lip-shadow{
  position: absolute;
  inset: 0;
  z-index: 2;
  filter: drop-shadow(0 1.5px 1.4px rgba(0, 0, 0, 0.48));
}.pkfull .foil-lip{
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: polygon(0 0);
  background: linear-gradient(
    100deg,
    #f3f6fb,
    #ffffff 14%,
    #b8c2d6 28%,
    #ffffff 43%,
    #c5cfe2 58%,
    #fcfdff 73%,
    #b2bdd1 87%,
    #eef1f7
  );
}.pkfull .grab-zone{
  position: absolute;
  inset: -24px -16px -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;
}.pkfull .grab-zone:focus-visible{
  outline: 2px solid var(--focus-ring);
  outline-offset: 8px;
}.pkfull.tearing .grab-zone,
.pkfull.tugging .grab-zone{
  cursor: grabbing;
}


/* ==== OPENER ==== */
/* 顶部工具 */
.tool-btn {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(235, 240, 250, 0.82);
  font: 600 12px / 1 "PingFang SC", system-ui, sans-serif;
  letter-spacing: 0.06em;
  -webkit-tap-highlight-color: transparent;
}
.tool-btn:active {
  transform: scale(0.96);
}
#myPackBtn {
  border-color: rgba(227, 176, 98, 0.55);
  color: #f0d9a8;
  background: rgba(227, 176, 98, 0.1);
}
#myPackBtn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
#myPackBtn:disabled:active {
  transform: none;
}

/* ==== PACK LABEL ==== */
/* 未选：包面中央的大编号 */
.pk-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 71%;
  transform: translateY(-50%);
  z-index: 4;
  text-align: center;
  font: 800 clamp(13px, 3.4vw, 19px) / 1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.85),
    0 0 10px rgba(0, 0, 0, 0.55);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* 已选：编号让位给昵称 */
.pack.taken .pk-label {
  opacity: 0;
}

/* 被选后：昵称移到包号所在位置，所有人在阵列里都能看到 */
.pk-owner-big {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 71%;
  transform: translateY(-50%);
  z-index: 6;
  padding: 3px 4px;
  border-radius: 5px;
  text-align: center;
  font: 800 clamp(10px, 2.5vw, 15px) / 1.25 "PingFang SC", -apple-system, system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: rgba(6, 8, 12, 0.55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* 已选格：包体保持可见轮廓，名字浮在上面 */
.pack.mine .pk-owner-big {
  color: #ffe9c2;
  background: rgba(60, 34, 8, 0.6);
}


/* ==== LOGIN PRIZE ==== */
.login-prize {
  margin: 26px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.prize-gold {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 134px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      70% 52% at 50% 32%,
      rgba(255, 254, 246, 1) 0%,
      rgba(255, 246, 212, 0.98) 30%,
      rgba(248, 212, 140, 0.95) 60%,
      rgba(230, 184, 108, 0.95) 86%,
      rgba(214, 162, 80, 0.98) 100%
    ),
    linear-gradient(165deg, #fff6dc 0%, #f0c684 44%, #d7a253 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 246, 210, 0.85),
    0 12px 28px -12px rgba(255, 200, 90, 0.65);
  animation: prizeBreath 4.6s ease-in-out infinite;
}
.pg-rays {
  position: absolute;
  inset: -60%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 255, 255, 0.4) 0 6deg,
    rgba(244, 210, 148, 0.4) 6deg 12deg
  );
  -webkit-mask-image: radial-gradient(
    closest-side at 50% 50%,
    #000 8%,
    rgba(0, 0, 0, 0.9) 42%,
    transparent 96%
  );
  mask-image: radial-gradient(
    closest-side at 50% 50%,
    #000 8%,
    rgba(0, 0, 0, 0.9) 42%,
    transparent 96%
  );
  filter: none;
  opacity: 0.9;
  mix-blend-mode: normal;
  transform-origin: 50% 50%;
  animation: raysTurn 60s linear infinite;
  pointer-events: none;
}
.prize-gold b {
  position: relative;
  font: 900 20px / 1 "PingFang SC", system-ui, sans-serif;
  color: #3a2405;
}
.prize-note {
  margin: 0;
  font: 500 12px / 1.5 "PingFang SC", system-ui, sans-serif;
  color: rgba(226, 232, 244, 0.55);
  letter-spacing: 0.04em;
}
.prize-note b {
  color: #f0d9a8;
}
@keyframes prizeBreath {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 246, 210, 0.8),
      0 12px 28px -12px rgba(255, 200, 90, 0.5),
      0 0 22px rgba(255, 200, 90, 0.22);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 250, 225, 0.95),
      0 14px 32px -12px rgba(255, 200, 90, 0.7),
      0 0 42px rgba(255, 200, 90, 0.45);
  }
}
@keyframes raysTurn {
  to {
    transform: rotate(360deg);
  }
}

/* ==== HEAD GRID ==== */
.tool-btn--accent {
  border-color: rgba(227, 176, 98, 0.6);
  color: #f0d9a8;
  background: rgba(227, 176, 98, 0.12);
}
.tool-btn[hidden] {
  display: none !important;
}

/* ==== PAGE LOADING ==== */
/* 点「去开包」后的过渡：40ms 内出现，覆盖住跳转时的白屏 */
.page-loading {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #0e0e10;
  animation: maskIn 0.12s ease-out both;
}
.page-loading[hidden] {
  display: none;
}
.page-loading-text {
  font: 600 13px / 1 "PingFang SC", system-ui, sans-serif;
  letter-spacing: 0.24em;
  color: rgba(228, 228, 231, 0.72);
  animation: maskPulse 1.1s ease-in-out infinite;
}
@keyframes maskIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes maskPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
