/* ==========================================================================
   OHO — 開卡包頁（pack.html）
   ========================================================================== */

.pack-page { position: relative; }

/* ---------- 頁首 ---------- */
.pack-hero {
  position: relative; overflow: hidden;
  padding: clamp(20px, 2.6vw, 36px) 0 clamp(12px, 1.4vw, 16px);   /* 頁首收斂：卡包要在第一屏 */
  text-align: center;
  background: radial-gradient(60% 50% at 50% 0%, rgba(80, 50, 30, 0.35), transparent 70%), var(--bg);
}
.pack-hero__inner { position: relative; z-index: 1; display: grid; gap: 10px; justify-items: center; }

/* ---------- 舞台 ---------- */
.pack-stage {
  position: relative;
  contain: layout paint;
  min-height: clamp(440px, 56vh, 600px);
  display: grid; place-items: center;
  padding: 8px 0 clamp(36px, 4vw, 48px);
}
.pack-stage__glow {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(760px, 92vw); aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 106, 26, 0.16), transparent 62%);
  opacity: 0; transition: opacity 0.6s;
}
.pack-stage.is-open .pack-stage__glow { opacity: 1; }

/* ==========================================================================
   卡包本體
   ========================================================================== */
@property --tear { syntax: "<number>"; inherits: true; initial-value: 0; }

.pack-slot {
  position: absolute; inset: 0; display: grid; place-items: center;
  z-index: 3; transition: opacity 0.45s;
}
.pack-slot.is-hidden { opacity: 0; pointer-events: none; }

.pack {
  position: relative;
  /* 不在這裡設 perspective：透視原點會落在卡包中心，掀起的直條會朝左右扇開、像一疊卡片。
     改由每條直條自己的 transform 帶 perspective()，以自己的鉸鏈為消失點，掀起來才是一整片。 */
  width: clamp(230px, 25vw, 290px);
  aspect-ratio: 2 / 3;
  cursor: grab;
  touch-action: none;                 /* 拖曳不會被瀏覽器捲動吃掉 */
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;        /* iOS 長按不要跳出存圖選單 */
  transition: transform 0.4s var(--ease);
}
.pack:active { cursor: grabbing; }
.pack:hover { transform: translateY(-8px) scale(1.02); }
.pack:focus-visible { outline: 2px solid var(--brass-2); outline-offset: 12px; border-radius: 14px; }
/* 圖片不吃指標事件、不能被原生拖曳：從圖上開始拖曾觸發原生圖片拖曳 → pointercancel → 被誤判成點擊 */
.pack img { pointer-events: none; -webkit-user-drag: none; }

/* ---------- 底片 ----------
   波浪撕痕只在這裡（clip-path）定義。z-index 蓋在直條之上：靜止時直條在撕痕以下的部分全被底片遮住，
   直條掀起時，鉸鏈以下往內轉的那截也被遮住，所以直條本身只要是矩形就好。 */
.pack__piece { position: absolute; inset: 0; clip-path: var(--clip, none); will-change: transform; }
.pack__piece--base { z-index: 40; }

/* 撕開後從縫隙看到的「裡面」：包裝內側（深色）＋裡面那疊卡的卡背（用名冊同一張卡背圖），上緣一道金邊 */
.pack__inside {
  position: absolute; inset: 0; z-index: 1; border-radius: 12px; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #2a241d, #17130f 40%);   /* 包裝內側，比外面亮一點才看得出是「裡面」 */
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(217, 168, 90, 0.25);
}
/* 裡面那疊卡：最上面一張用名冊同一張卡背圖，後面兩張用 box-shadow 疊出上緣（每張一道金邊） */
.pack__inside::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 9%; bottom: 0; border-radius: 7px 7px 0 0;
  background: url("../assets/img/card-back.jpg") center 18% / 100% auto no-repeat, #2b2823;
  box-shadow:
    inset 0 2px 0 rgba(240, 207, 134, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.7),
    0 -5px 0 -1px #24201a, 0 -6px 0 0 rgba(240, 207, 134, 0.45),
    0 -10px 0 -2px #1c1814, 0 -11px 0 -1px rgba(240, 207, 134, 0.3);
  filter: brightness(1.25) contrast(1.05);
}
.pack__inside::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.5) 45%);   /* 越往裡面越暗 */
}

/* ---------- 上蓋：切成直條（由 js/pack.js buildStrips 產生） ----------
   每條是 overflow:hidden 的矩形，裡面放一份放大到整包尺寸、往左位移的 .pack__inner 複本，
   只露出自己那一欄。不用 clip-path：每條 clip-path 會各自產生 mask layer + 離屏合成。
   left / width / height / z-index / transform-origin 由 JS inline 指定；掀起角度也由 JS 每幀寫 inline transform。 */
.pack__strip {
  position: absolute; top: 0; overflow: hidden; pointer-events: none;
  will-change: transform; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.pack__shade {
  position: absolute; inset: 0; z-index: 4; border-radius: 12px; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.18) 22%, rgba(0, 0, 0, 0) 30%);   /* 折到背面的紙變暗，但還看得到印刷 */
  opacity: 0; will-change: opacity;
}

.pack__inner {
  position: absolute; inset: 0; overflow: hidden; border-radius: 12px;
  display: grid; align-content: center; justify-items: center; gap: 10px;
  background:
    radial-gradient(70% 45% at 50% 38%, rgba(255, 155, 61, 0.16), transparent 72%),
    linear-gradient(118deg, rgba(255,255,255,.12) 0%, transparent 24%, transparent 76%, rgba(255,255,255,.07) 100%),
    linear-gradient(180deg, #4a443c 0%, #2b2823 30%, #1a1714 60%, #37322c 100%);
  border: 1px solid rgba(217, 168, 90, 0.55);
  box-shadow: var(--shadow-inset), var(--shadow-card);
}
.pack__inner::before {
  content: ""; position: absolute; inset: 9px; z-index: 1; pointer-events: none;
  border: 1px solid rgba(217, 168, 90, 0.35); border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.55), inset 0 0 36px rgba(0, 0, 0, 0.7);
}
.pack__art {
  position: relative; z-index: 2;
  width: 82%; height: auto; max-height: 40%; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 22px rgba(255, 155, 61, 0.35));
}
.pack__label {
  position: relative; z-index: 2;
  display: grid; justify-items: center; gap: 5px;
  font-family: var(--font-zh-head); font-weight: 900;
  font-size: 0.92rem; letter-spacing: 0.28em; text-indent: 0.28em; color: var(--brass-3);
  text-shadow: 0 2px 4px #000;
}
.pack__label::before { content: "\25C6"; display: block; font-size: 0.42rem; color: var(--brass-2); text-indent: 0; margin-bottom: 2px; }
.pack__label small {
  font-family: var(--font-head); font-size: 0.52rem; letter-spacing: 0.34em; text-indent: 0.34em;
  color: var(--brass-1);
}
.pack__foil {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
}
/* 第一彈的掃光蓋在整個卡包上（底片被 clip 後掃光留在 inner 會在撕線處斷層），撕開時淡出 */
.pack__foil--top { z-index: 41; border-radius: 12px; }
/* 掃光用 transform 位移，交給合成器；不要動 background-position（每幀重繪整個卡包） */
.pack__foil::before {
  content: ""; position: absolute; top: -60%; bottom: -60%; left: -80%; width: 60%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.14) 35%, rgba(240,207,134,.32) 50%, rgba(255,255,255,.14) 65%, transparent 100%);
  transform: rotate(12deg) translateX(0);
  animation: pack-foil 4.5s var(--ease) infinite;
  will-change: transform;
}
.pack__foil--top::before { opacity: calc(1 - var(--tear, 0) * 3); }
@keyframes pack-foil {
  0%, 100% { transform: rotate(12deg) translateX(0); }
  55%      { transform: rotate(12deg) translateX(420%); }
}

/* ---------- 撕口的光 ----------
   發光線從左邊長到前緣（transform-origin 在左）、前緣一顆亮點；兩者的 transform/opacity 都由 JS 每幀寫 */
.pack__rip {
  position: absolute; left: 0; right: 0; top: calc(var(--rip-y, 24%) - 5px);
  height: 10px; z-index: 42; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--fx, #f0cf86) 45%, #fff);
  filter: blur(4px);
  transform-origin: 0 50%; transform: scaleX(0); opacity: 0;
  will-change: transform, opacity;
}
.pack__spark {
  position: absolute; left: -6px; top: calc(var(--rip-y, 24%) - 6px);
  width: 12px; height: 12px; border-radius: 50%; z-index: 43; pointer-events: none;
  background: #fff;
  box-shadow: 0 0 10px 3px var(--fx, #f0cf86), 0 0 26px 9px rgba(240, 207, 134, 0.4);
  opacity: 0; will-change: transform, opacity;
}
/* 紙屑：撕的時候從前緣噴出，位置由 JS 每幀寫 */
.pack__bit {
  position: absolute; left: -3px; top: -4px; width: 7px; height: 9px; border-radius: 1px;
  z-index: 47; pointer-events: none;
  background: linear-gradient(180deg, #5a5148, #2b2823);
  box-shadow: 0 0 0 1px rgba(217, 168, 90, 0.35);
  opacity: 0; will-change: transform, opacity;
}

/* ---------- 提示：從這裡撕 ----------
   左上角撕痕處一個小缺口、撕線上一個由左往右滑的小箭頭、下方文字；開始撕就一起淡出 */
.pack__notch {
  position: absolute; left: -1px; top: calc(var(--rip-y, 24%) - 7px); width: 0; height: 0; z-index: 44; pointer-events: none;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 9px solid var(--bg);
  transition: opacity 0.25s;
}
.pack__cue {
  position: absolute; left: 6%; top: calc(var(--rip-y, 24%) - 8px); width: 0; height: 0; z-index: 45; pointer-events: none;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 12px solid var(--brass-3);
  filter: drop-shadow(0 0 6px rgba(240, 207, 134, 0.8));
  opacity: 0; will-change: transform, opacity;
  animation: cue-slide 1.8s ease-in-out infinite;
}
@keyframes cue-slide {
  0%   { opacity: 0; transform: translateX(0); }
  15%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(clamp(230px, 25vw, 290px) * 0.62)); }
}
.pack__hint {
  position: absolute; left: 0; right: 0; bottom: -38px; z-index: 46;
  display: grid; justify-items: center; gap: 3px; pointer-events: none;
  font-family: var(--font-zh-head); font-weight: 900;
  font-size: 0.78rem; letter-spacing: 0.26em; text-indent: 0.26em; color: var(--bone-mute);
  transition: opacity 0.25s;
}
.pack__hint small {
  font-family: var(--font-head); font-size: 0.5rem; letter-spacing: 0.3em; text-indent: 0.3em; color: var(--brass-1);
}
.pack.is-torn .pack__hint,
.pack.is-torn .pack__notch { opacity: 0; }
.pack.is-torn .pack__cue { animation: none; opacity: 0; }

/* 蓄力：撕到一半開始抖（R6 那種張力） */
.pack.is-charging { animation: pack-shake 0.3s linear infinite; }
@keyframes pack-shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-3px, 2px) rotate(-0.7deg); }
  40% { transform: translate(3px, -2px) rotate(0.7deg); }
  60% { transform: translate(-2px, -3px) rotate(-0.5deg); }
  80% { transform: translate(2px, 3px) rotate(0.5deg); }
}
/* 沒撕開放手：紙條彈回去時整包晃一下（放在 is-charging 之後，彈回途中蓋過抖動） */
.pack.is-snap { animation: pack-snap 0.4s cubic-bezier(.2, .7, .2, 1); }
@keyframes pack-snap {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-3px, 1px) rotate(-1deg); }
  55% { transform: translate(2px, -1px) rotate(0.6deg); }
  80% { transform: translate(-1px, 0) rotate(-0.3deg); }
}

/* 爆開：直條一條條往上飛（左邊先），底片往左下炸 */
.pack.is-blown { animation: none; }
.pack.is-blown .pack__strip {
  animation: strip-fly 0.7s cubic-bezier(.2, .7, .3, 1) forwards;
  animation-delay: calc(var(--sx, 0) * 120ms);
}
.pack.is-blown .pack__piece--base { animation: piece-base 0.75s cubic-bezier(.2, .7, .3, 1) forwards; }
.pack.is-blown .pack__hint,
.pack.is-blown .pack__cue,
.pack.is-blown .pack__notch,
.pack.is-blown .pack__foil--top { opacity: 0; }
@keyframes strip-fly {
  0%   { transform: perspective(700px) translateY(-4%) rotateX(70deg); opacity: 1; }    /* 與撕到底時的 inline 值一致，延遲期間不會跳 */
  100% { transform: perspective(700px) translate(var(--dx, 40px), var(--dy, -260px)) rotateX(110deg) rotateZ(var(--rz, 20deg)) scale(0.8); opacity: 0; }
}
@keyframes piece-base {
  0%   { opacity: 1; }
  100% { transform: translate(-95px, 320px) rotate(-34deg) scale(0.78); opacity: 0; }
}

/* ==========================================================================
   R6 風格爆發特效
   ========================================================================== */
.pack-fx {
  position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; z-index: 1; pointer-events: none;
  --fx: var(--rarity-epic);
}
/* 閒置時不進入算繪樹：conic-gradient + mask 就算 opacity:0 仍會被點陣化 */
.pack-fx > * { position: absolute; left: 0; top: 0; opacity: 0; display: none; }
.pack-stage.is-bursting .pack-fx > * { display: block; will-change: transform, opacity; }

/* 放射光束 */
.pack-fx__rays {
  width: min(1100px, 150vw); aspect-ratio: 1; border-radius: 50%;
  margin: calc(min(1100px, 150vw) / -2) 0 0 calc(min(1100px, 150vw) / -2);
  background: repeating-conic-gradient(from 0deg,
    var(--fx) 0deg 1.4deg, transparent 1.4deg 7deg);
  -webkit-mask-image: radial-gradient(circle, transparent 8%, #000 26%, #000 44%, transparent 70%);
  mask-image: radial-gradient(circle, transparent 8%, #000 26%, #000 44%, transparent 70%);
}
.pack-stage.is-bursting .pack-fx__rays { animation: fx-rays 1.5s cubic-bezier(.15,.75,.25,1) forwards; }
@keyframes fx-rays {
  0%   { opacity: 0;    transform: scale(0.18) rotate(-26deg); }
  12%  { opacity: 0.62; }
  55%  { opacity: 0.34; }
  100% { opacity: 0;   transform: scale(1.25) rotate(16deg); }
}

/* 衝擊環 */
.pack-fx__ring {
  width: 1100px; aspect-ratio: 1; border-radius: 50%;
  margin: -550px 0 0 -550px;
  border: 3px solid var(--fx);
  box-shadow: 0 0 40px var(--fx), inset 0 0 30px var(--fx);
}
.pack-stage.is-bursting .pack-fx__ring { animation: fx-ring 0.95s cubic-bezier(.1,.8,.2,1) forwards; }
@keyframes fx-ring {
  0%   { opacity: 0; transform: scale(0.04); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1); }
}

/* 核心強光 */
.pack-fx__core {
  width: 720px; aspect-ratio: 1; border-radius: 50%;
  margin: -360px 0 0 -360px;
  background: radial-gradient(circle, #fff 0%, #fff 22%, var(--fx) 48%, transparent 72%);
}
.pack-stage.is-bursting .pack-fx__core { animation: fx-core 0.9s cubic-bezier(.1,.8,.2,1) forwards; }
@keyframes fx-core {
  0%   { opacity: 0; transform: scale(0.04); }
  8%   { opacity: 1; }
  100% { opacity: 0; transform: scale(1); }
}

/* 全螢幕閃光 */
.pack-fx__flash {
  position: fixed; left: 0; top: 0; margin: 0;
  width: 100vw; height: 100vh;
  background: radial-gradient(circle at 50% 46%, rgba(255,255,255,.8), transparent 46%);
}
.pack-stage.is-bursting .pack-fx__flash { animation: fx-flash 0.6s ease-out forwards; }
@keyframes fx-flash {
  0% { opacity: 0; } 9% { opacity: 1; } 100% { opacity: 0; }
}

/* 飛散火花 */
.pack-fx__spark {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fx); box-shadow: 0 0 12px var(--fx), 0 0 3px #fff;
}
.pack-stage.is-bursting .pack-fx__spark {
  animation: fx-spark 1.05s cubic-bezier(.12,.75,.25,1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes fx-spark {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.15); }
}

/* 爆開瞬間畫面震動 */
.pack-stage.is-shaking { animation: stage-shake 0.5s cubic-bezier(.3,.1,.3,1); }
@keyframes stage-shake {
  0%, 100% { transform: translate(0, 0); }
  12% { transform: translate(-9px, 5px); }
  26% { transform: translate(8px, -6px); }
  42% { transform: translate(-6px, -4px); }
  58% { transform: translate(5px, 4px); }
  74% { transform: translate(-3px, 2px); }
  88% { transform: translate(2px, -1px); }
}

/* ---------- 抽出的卡 ---------- */
.pack-hand {
  display: none;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 20px);
  align-items: start;
}
.pack-stage.is-open .pack-hand { display: grid; }
.pack-hand { position: relative; z-index: 2; }   /* 卡片要在光束之上 */
/* 未翻開的卡輕微呼吸，提示可點 */
.pack-hand .card:not(.is-flipped):not(.is-dealing) .card__inner { animation: pack-idle 2.6s ease-in-out infinite; }
@keyframes pack-idle {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.pack-hand .card.is-flipped .card__inner { animation: none; }

/* 抽到的卡翻開前不透露稀有度 */
.pack-hand .card__rarity-back { display: none; }

/* 一排 5 張時卡片偏小，卡面內容改用緊湊版，把空間留給人像 */
.pack-hand .card__face { border-radius: 10px; }
.pack-hand .card__inner, .pack-hand .card__flip { border-radius: 10px; }
.pack-hand .card__face--front::before { inset: 5px; border-radius: 6px; }
.pack-hand .card__face--back::before { inset: 6px; border-radius: 6px; }
.pack-hand .card__number, .pack-hand .card__rarity-back { top: 12px; font-size: 0.52rem; letter-spacing: 0.2em; }
.pack-hand .card__number { left: 14px; }
.pack-hand .card__rarity-back { right: 14px; }
.pack-hand .card__ribbon { bottom: 16px; padding: 6px 8px; font-size: 0.74rem; letter-spacing: 0.2em; }
.pack-hand .card__ribbon small { font-size: 0.48rem; letter-spacing: 0.24em; }
.pack-hand .card__badge, .pack-hand .card__faction { top: 10px; padding: 3px 6px 2px; font-size: 0.5rem; letter-spacing: 0.16em; }
.pack-hand .card__badge { left: 10px; }
.pack-hand .card__faction { right: 10px; font-size: 0.54rem; letter-spacing: 0.08em; }
.pack-hand .card__body { padding: 9px 11px 11px; }
.pack-hand .card__body::before { left: 11px; right: 11px; }
.pack-hand .card__name { font-size: 1rem; letter-spacing: 0.04em; }
.pack-hand .card__title { font-size: 0.48rem; letter-spacing: 0.16em; }
.pack-hand .card__meta { gap: 4px; margin-top: 5px; }
.pack-hand .chip { font-size: 0.55rem; padding: 2px 6px; letter-spacing: 0.04em; }
.pack-hand .card__actions { margin-top: 7px; }
.pack-hand .card__role { font-size: 0.58rem; letter-spacing: 0.04em; }
.pack-hand .card__more-slot { width: 58px; height: 24px; }
.pack-hand .card__more { right: 11px; bottom: 11px; padding: 4px 8px; font-size: 0.58rem; letter-spacing: 0.08em; }

@media (max-width: 900px) {
  .pack-hand { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 560px) {
  .pack-hand { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pack-stage { min-height: 430px; }
}

/* ---------- 操作列 ---------- */
.pack-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: clamp(20px, 3vw, 30px); }
.pack-actions--sub { margin-top: 12px; }
@media (max-width: 560px) {
  .pack-actions > .btn { flex: 1 1 100%; }
  .pack-actions--sub { flex-wrap: nowrap; gap: 10px; }
  .pack-actions--sub > .btn { flex: 1 1 0; min-width: 0; padding: 0 8px; min-height: 44px; }
  .pack-actions--sub > .btn small { display: none; }
}
/* 音效開關：關掉時淡一點 */
#pack-sound[aria-pressed="false"] { opacity: 0.55; }
.pack-status {
  text-align: center; margin-top: 14px;
  font-family: var(--font-zh-head); font-weight: 900;
  letter-spacing: 0.22em; text-indent: 0.22em; color: var(--bone-dim);
}
.pack-status strong { color: var(--brass-3); font-family: var(--font-head); font-size: 1.3em; margin: 0 3px; }
.pack-status small {
  display: block; margin-top: 6px;
  font-family: var(--font-head); font-size: 0.6rem; letter-spacing: 0.32em; text-indent: 0.32em;
  color: var(--brass-1);
}

/* 本包最佳稀有度 */
.pack-best {
  display: none; justify-content: center; align-items: center; gap: 10px; margin-top: 16px;
  font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--bone-mute);
}
.pack-best.is-shown { display: flex; }
.pack-best b {
  padding: 4px 12px 3px; border-radius: 3px; color: #0e0b06; font-weight: 700;
  background: var(--best, var(--rarity-epic));
  box-shadow: 0 0 18px color-mix(in srgb, var(--best, var(--rarity-epic)) 60%, transparent);
}

/* ---------- 全部收集完成 ---------- */
.pack-done { display: none; text-align: center; gap: 16px; justify-items: center; }
.pack-done.is-shown { display: grid; }
.pack-done__title {
  font-family: var(--font-zh-head); font-weight: 900;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: 0.14em; color: var(--bone);
}

@media (prefers-reduced-motion: reduce) {
  .pack__foil::before,
  .pack.is-charging,
  .pack.is-snap,
  .pack-stage.is-shaking,
  .pack-hand .card:not(.is-flipped) .card__inner { animation: none !important; }
  .pack__cue, .pack__bit { display: none; }
  .pack-fx > * { display: none; }
}

/* 第一彈：現階段玩家的職業分類 */
.pack-set {
  display: grid; gap: 14px; justify-items: center;
  margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pack-set__title {
  font-family: var(--font-zh-head); font-weight: 900; font-size: 1rem; letter-spacing: 0.2em; text-indent: 0.2em;
  color: var(--bone-dim); text-align: center;
}
.pack-set__title strong { color: var(--brass-3); font-family: var(--font-head); font-size: 1.3em; margin: 0 2px; }
.pack-set__title small { display: block; margin-top: 4px; font-family: var(--font-head); font-size: 0.55rem; letter-spacing: 0.35em; color: var(--brass-1); }

/* 第二彈：即將揭曉 */
.pack-soon { display: grid; justify-items: center; gap: 14px; padding: 24px 0 48px; text-align: center; }
.pack-soon .pack { cursor: default; pointer-events: none; filter: grayscale(0.4) brightness(0.72); margin-bottom: 18px; }
.pack-soon .pack:hover { transform: none; }
.pack__seal {
  position: absolute; inset: 0; z-index: 50;   /* 要在底片（z 40）之上 */ display: grid; place-items: center; border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-head); font-size: 5.5rem; font-weight: 700; color: var(--brass-3);
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 18px rgba(240, 207, 134, 0.35);
}
.pack-soon__title {
  font-family: var(--font-zh-head); font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.2em; text-indent: 0.2em; color: var(--bone);
}
.pack-soon__title small { display: block; margin-top: 8px; font-family: var(--font-head); font-size: 0.7rem; letter-spacing: 0.4em; color: var(--brass-2); }
@media (max-width: 640px) {
  .pack-set__title { font-size: 0.85rem; }
}

/* ==========================================================================
   第二彈：場景卡（橫式卡包、橫式卡）
   ========================================================================== */
.pack--landscape { width: clamp(300px, 40vw, 460px); aspect-ratio: 3 / 2; }
.pack--landscape .pack__inner { grid-template-columns: 1fr 1fr; align-content: center; align-items: center; justify-items: center; gap: 0 clamp(10px, 2vw, 22px); padding: 0 8%; }
.pack--landscape .pack__art { width: 100%; max-width: 220px; max-height: 70%; justify-self: end; }
.pack--landscape .pack__label { justify-self: start; justify-items: start; text-indent: 0; font-size: 1.05rem; }

/* 手牌：橫式卡一排 3 張（5 張 = 3 + 2，第二排置中） */
.pack-hand.pack-hand--scene { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1080px; margin-inline: auto; }
.pack-hand--scene > .card { grid-column: span 2; }
.pack-hand--scene > .card:nth-child(4) { grid-column: 2 / span 2; }
@media (max-width: 900px) {
  .pack-hand.pack-hand--scene { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-hand--scene > .card, .pack-hand--scene > .card:nth-child(4) { grid-column: auto; }
  .pack-hand--scene > .card:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }
}
@media (max-width: 560px) {
  .pack-hand.pack-hand--scene { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .pack-hand--scene > .card:last-child:nth-child(odd) { width: auto; justify-self: stretch; }
  .pack--landscape { width: min(88vw, 360px); }
}

