/* =============================================================
   球迷人格測驗 — 精緻完整版 CSS
   ============================================================= */

/* ===== 首頁 banner 入口 ===== */
.pq-entry-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 24px;
  background:
    linear-gradient(135deg, #1a2456 0%, #131a3e 45%, #2a1a4a 100%);
  border: 1px solid rgba(212,168,90,0.40);
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  color: #fff;
  font-family: inherit;
  box-shadow:
    0 8px 30px rgba(20,30,90,0.40),
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 0 0 1px rgba(212,168,90,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pq-entry-banner:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 40px rgba(20,30,90,0.55),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 0 0 1px rgba(212,168,90,0.30);
}
.pq-entry-banner:active { transform: translateY(-1px) scale(0.99); }

.pq-entry-bg-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 25%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 26% 70%, rgba(255,213,79,0.6), transparent),
    radial-gradient(2px 2px at 50% 18%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 72% 78%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 90% 45%, rgba(255,213,79,0.6), transparent);
  pointer-events: none;
  animation: pqStarsTwinkle 3.5s ease-in-out infinite;
}
@keyframes pqStarsTwinkle {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

.pq-entry-left { display: flex; align-items: center; gap: 18px; position: relative; z-index: 2; }
.pq-entry-icon {
  font-size: 48px; line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.45));
  animation: pqIconBounce 2.5s ease-in-out infinite;
}
@keyframes pqIconBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-5px) rotate(3deg); }
}
.pq-entry-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pq-entry-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  color: #d4a85a; text-transform: uppercase;
}
.pq-entry-title {
  font-size: 20px; font-weight: 900; letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.pq-entry-sub { font-size: 12.5px; color: rgba(255,255,255,0.85); margin-top: 2px; line-height: 1.4; }

.pq-entry-right {
  display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 2;
  padding: 10px 18px 10px 20px;
  background: linear-gradient(135deg, #d4a85a, #b8894b);
  color: #1a1a1a;
  border: 1px solid rgba(255,229,160,0.45);
  border-radius: 999px;
  font-weight: 900; font-size: 13.5px; letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(212,168,90,0.30);
}
.pq-entry-arrow { font-size: 17px; font-weight: 900; transition: transform 0.2s; }
.pq-entry-banner:hover .pq-entry-arrow { transform: translateX(5px); }

@media (max-width: 600px) {
  .pq-entry-banner { padding: 16px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .pq-entry-right { align-self: flex-end; }
  .pq-entry-title { font-size: 18px; }
  .pq-entry-icon { font-size: 42px; }
}

/* ===================================================
   Modal Overlay 主結構
   =================================================== */
body.pq-open { overflow: hidden; }

.pq-overlay {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.pq-overlay.open { opacity: 1; }

.pq-bg {
  position: fixed; inset: 0;
  background:
    /* 雙側球場聚光燈 — 加亮 */
    radial-gradient(ellipse 45% 90% at 8% 25%, rgba(255,229,150,0.22) 0%, transparent 45%),
    radial-gradient(ellipse 45% 90% at 92% 25%, rgba(255,229,150,0.22) 0%, transparent 45%),
    /* 上方深空 */
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(50,55,110,0.55) 0%, transparent 60%),
    /* 底部草地光暈 — 更綠更明顯 */
    radial-gradient(ellipse 90% 40% at 50% 100%, rgba(40,90,55,0.70) 0%, transparent 65%),
    /* 整體深空藍 */
    linear-gradient(180deg, #0c1230 0%, #0a1228 60%, #0c1820 100%);
  z-index: 0;
}
/* 聚光燈光柱：光錐本體用 ::before（blur 處理）、飄塵在 ::after（不 blur 才看得到）*/
.pq-bg-spotlight-l, .pq-bg-spotlight-r {
  position: fixed;
  top: 0;
  width: 280px; height: 85vh;
  z-index: 0;
  pointer-events: none;
}
.pq-bg-spotlight-l { left: -60px; transform: skewX(10deg); transform-origin: top left; }
.pq-bg-spotlight-r { right: -60px; transform: skewX(-10deg); transform-origin: top right; }
/* 光柱本體（在 ::before、blur 處理柔化）*/
.pq-bg-spotlight-l::before,
.pq-bg-spotlight-r::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(255,235,180,0.55) 0%,
      rgba(255,229,150,0.32) 25%,
      rgba(255,229,150,0.14) 50%,
      transparent 80%);
  filter: blur(12px);
  opacity: 0.55;
}
/* 飄塵粒子在 ::after、獨立不被 blur 影響、清晰可見 */
.pq-bg-spotlight-l::after,
.pq-bg-spotlight-r::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(2.5px 2.5px at 25% 18%, rgba(255,235,180,0.95), transparent 60%),
    radial-gradient(2px 2px at 65% 32%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(2.5px 2.5px at 40% 48%, rgba(255,235,180,0.85), transparent 60%),
    radial-gradient(2px 2px at 78% 58%, rgba(255,255,255,0.75), transparent 60%),
    radial-gradient(2.5px 2.5px at 30% 72%, rgba(255,235,180,0.85), transparent 60%),
    radial-gradient(2px 2px at 60% 85%, rgba(255,255,255,0.75), transparent 60%),
    radial-gradient(2.5px 2.5px at 18% 35%, rgba(255,235,180,0.80), transparent 60%),
    radial-gradient(2px 2px at 80% 25%, rgba(255,255,255,0.75), transparent 60%);
  animation: pqDustDrift 14s ease-in-out infinite;
}
@keyframes pqDustDrift {
  0%   { transform: translateY(0)    translateX(0); opacity: 0.85; }
  25%  { transform: translateY(-25px) translateX(8px); opacity: 1; }
  50%  { transform: translateY(-50px) translateX(-5px); opacity: 0.75; }
  75%  { transform: translateY(-30px) translateX(10px); opacity: 1; }
  100% { transform: translateY(0)    translateX(0); opacity: 0.85; }
}

/* 全場飄塵層（不在光柱內、整個畫面慢飄）*/
.pq-bg-dust {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(255,229,150,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 65%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(2px 2px at 65% 38%, rgba(255,229,150,0.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 82% 72%, rgba(255,255,255,0.50), transparent 60%),
    radial-gradient(2px 2px at 50% 88%, rgba(255,229,150,0.50), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 80%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(2px 2px at 73% 18%, rgba(255,229,150,0.50), transparent 60%),
    radial-gradient(1.5px 1.5px at 5% 50%, rgba(255,255,255,0.40), transparent 60%);
  animation: pqDustFloat 16s ease-in-out infinite;
}
@keyframes pqDustFloat {
  0%, 100% { transform: translateY(0)    translateX(0); opacity: 0.85; }
  33%      { transform: translateY(-20px) translateX(15px); opacity: 1; }
  66%      { transform: translateY(-40px) translateX(-10px); opacity: 0.7; }
}
/* 底部草地紋路 — 透視感的足球場線 */
.pq-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    /* 微弱星空 */
    radial-gradient(1.5px 1.5px at 18% 12%, rgba(212,168,90,0.45), transparent),
    radial-gradient(1px 1px at 28% 38%, rgba(255,255,255,0.30), transparent),
    radial-gradient(1.5px 1.5px at 58% 18%, rgba(212,168,90,0.35), transparent),
    radial-gradient(1px 1px at 79% 25%, rgba(255,255,255,0.30), transparent),
    radial-gradient(1.5px 1.5px at 91% 18%, rgba(212,168,90,0.40), transparent);
  animation: pqStarsTwinkle 5s ease-in-out infinite;
  pointer-events: none;
}
/* 底部「球場遠景」：球門 silhouette + 草地紋路 */
.pq-bg::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 38%;
  background:
    /* 中圈 + 點 */
    radial-gradient(ellipse 25% 8% at 50% 95%,
      transparent 60%, rgba(170,220,180,0.30) 65%, transparent 70%),
    /* 中圈內小點 */
    radial-gradient(circle 3px at 50% 95%, rgba(170,220,180,0.55), transparent);
  background-repeat: no-repeat;
  pointer-events: none;
}
/* 球門 silhouette — 真正的遠景：小 + 微糊 + 在草地藍綠交界 */
.pq-bg-goal {
  position: fixed;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 78px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.50;
  filter:
    blur(1px)
    drop-shadow(0 3px 8px rgba(0,0,0,0.35));
}
.pq-bg-goal::before,
.pq-bg-goal::after,
.pq-bg-goal-bar {
  content: ''; position: absolute;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.45), transparent);
}
.pq-bg-goal::before {
  /* 左門柱 */
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0.20));
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.3));
}
.pq-bg-goal::after {
  /* 右門柱 */
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.55), rgba(255,255,255,0.20));
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.3));
}
/* 門柱加粗 + 漂白 */
.pq-bg-goal::before,
.pq-bg-goal::after {
  width: 5px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
}
.pq-bg-goal-bar {
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(to right,
    rgba(255,255,255,0.50),
    rgba(255,255,255,0.85) 18%,
    rgba(255,255,255,0.85) 82%,
    rgba(255,255,255,0.50));
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.45));
}
/* 球門網 — 菱形網明顯（加粗加亮）*/
.pq-bg-goal-net {
  position: absolute;
  inset: 5px 5px 0 5px;
  background-image:
    repeating-linear-gradient(45deg,
      transparent 0px, transparent 13px,
      rgba(255,255,255,0.32) 13px, rgba(255,255,255,0.32) 14.5px),
    repeating-linear-gradient(-45deg,
      transparent 0px, transparent 13px,
      rgba(255,255,255,0.32) 13px, rgba(255,255,255,0.32) 14.5px);
  /* 由近到遠淡出 */
  mask-image: linear-gradient(to bottom,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.70) 50%,
    rgba(0,0,0,0.40) 100%);
  -webkit-mask-image: linear-gradient(to bottom,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.70) 50%,
    rgba(0,0,0,0.40) 100%);
}
/* 球門兩側網（透視時兩邊也要有網）*/
.pq-bg-goal::before {
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}
.pq-bg-goal::after {
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}
.pq-bg::before {
  /* 微妙星圖點陣 — 像星座、不像彩色斑點 */
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 12%, rgba(212,168,90,0.55), transparent 60%),
    radial-gradient(1px 1px at 19% 38%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 34% 22%, rgba(212,168,90,0.40), transparent 60%),
    radial-gradient(1px 1px at 52% 60%, rgba(255,255,255,0.30), transparent 60%),
    radial-gradient(1.5px 1.5px at 68% 40%, rgba(212,168,90,0.50), transparent 60%),
    radial-gradient(1px 1px at 79% 75%, rgba(255,255,255,0.40), transparent 60%),
    radial-gradient(1.5px 1.5px at 91% 28%, rgba(212,168,90,0.45), transparent 60%),
    radial-gradient(1px 1px at 28% 82%, rgba(255,255,255,0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 60% 88%, rgba(212,168,90,0.40), transparent 60%);
  pointer-events: none;
  animation: pqStarsTwinkle 5s ease-in-out infinite;
}
.pq-bg::after {
  /* 上方光暈 — 深空月光感 */
  content: ''; position: absolute;
  top: -15%; left: 50%;
  transform: translateX(-50%);
  width: 80%; height: 60%;
  background: radial-gradient(ellipse,
    rgba(212,168,90,0.10) 0%,
    rgba(212,168,90,0.04) 30%,
    transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  animation: pqAuraBreathe 8s ease-in-out infinite;
}
@keyframes pqAuraBreathe {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
.pq-stars {
  position: fixed; inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 23% 40%, rgba(255,213,79,0.85), transparent),
    radial-gradient(2px 2px at 55% 20%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 78% 65%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 45% 85%, rgba(239,68,68,0.7), transparent),
    radial-gradient(1px 1px at 92% 30%, rgba(120,150,255,0.7), transparent),
    radial-gradient(2px 2px at 33% 70%, rgba(255,213,79,0.4), transparent),
    radial-gradient(1px 1px at 68% 50%, rgba(255,255,255,0.5), transparent);
  z-index: 0;
  animation: pqStarsTwinkle 4s ease-in-out infinite;
}

.pq-close {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 100;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.15s;
}
.pq-close:hover { background: rgba(255,255,255,0.18); transform: rotate(90deg); }

.pq-container {
  position: relative; z-index: 1;
  max-width: 540px; width: 100%;
  color: #fff;
  padding-bottom: 24px;
}

.pq-phase { padding: 16px 0 32px; }

/* ===================================================
   階段 1：Intro 介紹
   =================================================== */
.pq-phase-intro { text-align: center; padding-top: 30px; }
.pq-intro-icons {
  display: flex; justify-content: center; gap: 14px;
  margin-bottom: 24px;
}
.pq-intro-icon {
  width: 64px; height: 64px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.4));
  animation: pqIntroFloat 3s ease-in-out infinite;
}
.pq-intro-icon:nth-child(1) { animation-delay: 0s; }
.pq-intro-icon:nth-child(2) { animation-delay: 0.3s; }
.pq-intro-icon:nth-child(3) { animation-delay: 0.6s; }
.pq-intro-icon:nth-child(4) { animation-delay: 0.9s; }
@keyframes pqIntroFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-5px) rotate(2deg); }
}

.pq-title {
  font-size: 44px; font-weight: 900; line-height: 1.15;
  letter-spacing: 2px; margin: 8px 0 12px;
  background: linear-gradient(135deg, #f4d59a 0%, #d4a85a 50%, #b8894b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 14px rgba(212,168,90,0.40));
}
.pq-subtitle {
  font-size: 15px; color: rgba(255,255,255,0.78);
  margin: 0 0 28px; letter-spacing: 1px;
}
.pq-intro-meta {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 32px;
  font-size: 12.5px; color: rgba(255,255,255,0.78);
  flex-wrap: wrap;
}
.pq-intro-meta > span {
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
}
.pq-start-btn {
  display: block; margin: 0 auto;
  padding: 16px 44px;
  background: linear-gradient(135deg, #d4a85a 0%, #b8894b 100%);
  color: #1a1a1a;
  border: 2px solid rgba(255,229,160,0.45);
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px; font-weight: 900; letter-spacing: 2px;
  cursor: pointer;
  box-shadow:
    0 10px 30px rgba(212,168,90,0.45),
    inset 0 1px 0 rgba(255,255,255,0.40);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.pq-start-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.pq-start-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(212,168,90,0.60), inset 0 1px 0 rgba(255,255,255,0.55);
}
.pq-start-btn:hover::before { transform: translateX(100%); }
.pq-intro-hint { margin-top: 22px; font-size: 11.5px; color: rgba(255,255,255,0.45); letter-spacing: 0.5px; }

/* ===================================================
   階段 2：Quiz 答題
   =================================================== */

/* 章節 Banner（題目卡上方）*/
.pq-chapter-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 6px 16px;
  background:
    linear-gradient(180deg, rgba(212,168,90,0.16), rgba(212,168,90,0.06));
  border: 1px solid rgba(212,168,90,0.40);
  border-radius: 999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 14px rgba(212,168,90,0.18);
  animation: pqChapterIn 0.5s ease-out;
}
@keyframes pqChapterIn {
  0%   { opacity: 0; transform: translateY(-8px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.pq-chapter-icon {
  font-size: 16px;
  animation: pqChapterIconPulse 2.2s ease-in-out infinite;
}
@keyframes pqChapterIconPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15) rotate(5deg); }
}
.pq-chapter-name {
  font-size: 13px; font-weight: 900;
  color: #d4a85a; letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(212,168,90,0.4);
}
.pq-chapter-sub {
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.65); letter-spacing: 0.5px;
}

/* 4 篇章色溫：每章換不同氛圍（class 在 .pq-overlay 上）*/
.pq-overlay { transition: filter 0.8s ease; }
.pq-overlay.pq-chapter-emo .pq-bg {
  /* 情感篇：偏紫 */
  filter: hue-rotate(-15deg) saturate(1.18);
}
.pq-overlay.pq-chapter-logic .pq-bg {
  /* 理性篇：偏藍冷 */
  filter: hue-rotate(10deg) saturate(0.92);
}
.pq-overlay.pq-chapter-soc .pq-bg {
  /* 社交篇：偏暖橘 */
  filter: hue-rotate(-35deg) saturate(1.20);
}
.pq-overlay.pq-chapter-self .pq-bg {
  /* 身份篇：偏金 */
  filter: hue-rotate(-18deg) saturate(1.30) brightness(1.06);
}

/* 卡片過場動畫 — 每次切題 q-card 重新進場 */
.pq-q-card {
  animation: pqCardSlideIn 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes pqCardSlideIn {
  0%   { opacity: 0; transform: translateX(30px) scale(0.97); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
.pq-progress { margin-bottom: 20px; }

/* 背景隨機浮動靶 — 加金光呼吸、暗示「射我」 */
.pq-bg-target {
  position: absolute;
  z-index: 1;
  cursor: crosshair;
  pointer-events: auto;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(212,168,90,0.55));
  animation:
    pqBgTargetIn 0.6s ease-out forwards,
    pqBgTargetFloat 4s ease-in-out 0.6s infinite,
    pqBgTargetGlow 2.2s ease-in-out 0.6s infinite;
}
@keyframes pqBgTargetGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(212,168,90,0.45)); }
  50%      { filter: drop-shadow(0 0 22px rgba(212,168,90,0.95)) brightness(1.25); }
}
.pq-bg-target svg { width: 100%; height: 100%; display: block; }
@keyframes pqBgTargetIn {
  0%   { opacity: 0; transform: scale(0.5) rotate(-20deg); }
  100% { opacity: 0.85; transform: scale(1) rotate(0deg); }
}
@keyframes pqBgTargetFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(8deg); }
}
.pq-bg-target.pq-bg-target-fade {
  animation: pqBgTargetOut 0.55s ease-in forwards;
}
@keyframes pqBgTargetOut {
  0%   { opacity: 0.85; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6); }
}
.pq-bg-target.pq-bg-target-hit {
  animation: pqBgTargetExplode 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes pqBgTargetExplode {
  0%   { transform: scale(1) rotate(0deg); opacity: 1;
         filter: drop-shadow(0 0 8px rgba(212,168,90,0.35)) brightness(1); }
  30%  { transform: scale(1.5) rotate(20deg);
         filter: drop-shadow(0 0 28px rgba(255,213,79,0.95)) brightness(1.6); }
  100% { transform: scale(0.3) rotate(-15deg); opacity: 0;
         filter: drop-shadow(0 0 4px rgba(212,168,90,0.4)) brightness(1); }
}

/* 撞擊點爆閃 */
.pq-hit-flash {
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,213,79,0.95) 0%, rgba(212,168,90,0.5) 35%, transparent 70%);
  mix-blend-mode: screen;
}
@keyframes pqHitFlash {
  0%   { transform: scale(0.5); opacity: 0; }
  20%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(2.0); opacity: 0; }
}

/* 足球飛行 — 拋物線軌跡 */
.pq-ball {
  pointer-events: none;
  will-change: transform;
  transform-origin: center;
}
@keyframes pqBallFly {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(calc(var(--pq-dx) * 0.5), calc(var(--pq-dy) * 0.5 - 100px)) rotate(360deg) scale(0.85); }
  100% { transform: translate(var(--pq-dx), var(--pq-dy)) rotate(720deg) scale(0.6); opacity: 0.6; }
}

/* 小金星粒子 — 從靶心爆出飛向進度條 */
.pq-particle {
  position: fixed;
  pointer-events: none;
  font-family: serif;
  font-weight: 900;
  z-index: 13000;
  will-change: transform, opacity;
  transform-origin: center;
}
@keyframes pqParticleFly {
  0%   { transform: translate(0,0) scale(0.6) rotate(0deg);   opacity: 0; }
  10%  { transform: translate(calc(var(--pq-ex,0px) * 0.05), calc(var(--pq-ey,0px) * 0.05 - 8px)) scale(1.2) rotate(40deg); opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(var(--pq-ex,0px), var(--pq-ey,0px)) scale(0.3) rotate(360deg); opacity: 0; }
}

/* 進度條吸收能量微閃 */
.pq-progress-bar { transition: box-shadow 0.15s; }
.pq-progress-bar.pq-bar-flash {
  box-shadow:
    0 0 0 2px rgba(212,168,90,0.55),
    0 0 18px rgba(212,168,90,0.7);
}
.pq-progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.pq-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4a85a, #f4d59a, #d4a85a);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(212,168,90,0.6);
}
.pq-progress-text {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.65); letter-spacing: 1px;
  font-weight: 700;
}

.pq-bonus-tag {
  display: inline-block;
  padding: 3px 9px;
  background: linear-gradient(135deg, #FFD54F, #f59e0b);
  color: #1a1a1a;
  border-radius: 999px;
  font-size: 10px; font-weight: 900; letter-spacing: 0.5px;
  margin-left: 6px;
  animation: pqPulse 1.5s ease-in-out infinite;
}
@keyframes pqPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

.pq-q-card {
  position: relative;
  padding: 26px 22px 22px;
  background:
    linear-gradient(150deg,
      rgba(50,55,110,0.45) 0%,
      rgba(30,35,70,0.35) 50%,
      rgba(20,25,50,0.40) 100%);
  border: 1px solid rgba(212,168,90,0.35);
  border-radius: 18px;
  margin-bottom: 18px;
  box-shadow:
    0 12px 30px rgba(0,0,0,0.40),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
/* FIFA 卡感四角邊 — 用 4 個 span 元素 (left/right + top/bottom 都完整)  */
.pq-q-corner {
  position: absolute;
  width: 30px; height: 30px;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(212,168,90,0.55));
}
.pq-q-corner-tl { top: 10px;    left: 10px;    border-top: 2.5px solid #d4a85a; border-left: 2.5px solid #d4a85a; border-radius: 5px 0 0 0; }
.pq-q-corner-tr { top: 10px;    right: 10px;   border-top: 2.5px solid #d4a85a; border-right: 2.5px solid #d4a85a; border-radius: 0 5px 0 0; }
.pq-q-corner-bl { bottom: 10px; left: 10px;    border-bottom: 2.5px solid #d4a85a; border-left: 2.5px solid #d4a85a; border-radius: 0 0 0 5px; }
.pq-q-corner-br { bottom: 10px; right: 10px;   border-bottom: 2.5px solid #d4a85a; border-right: 2.5px solid #d4a85a; border-radius: 0 0 5px 0; }
/* 拿掉舊的 ::before / ::after */
.pq-q-card::before, .pq-q-card::after { content: none; }
.pq-q-num {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px; font-weight: 900;
  color: #d4a85a; letter-spacing: 2px;
  background: rgba(0,0,0,0.40);
  border: 1px solid rgba(212,168,90,0.40);
  border-radius: 4px;
  margin-bottom: 12px;
}
.pq-q-text {
  font-size: 19.5px; font-weight: 800;
  line-height: 1.55; margin-bottom: 22px;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.45),
    0 0 18px rgba(212,168,90,0.20);
  letter-spacing: 0.5px;
}

.pq-opts { display: flex; flex-direction: column; gap: 11px; }
.pq-opt {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: #fff;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.pq-opt:hover {
  background: rgba(255,213,79,0.10);
  border-color: rgba(255,213,79,0.45);
  transform: translateX(3px);
}
.pq-opt:active { transform: scale(0.99); }
.pq-opt-label {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, rgba(255,213,79,0.20), rgba(245,158,11,0.20));
  border: 1px solid rgba(255,213,79,0.35);
  color: #FFD54F;
  border-radius: 50%;
  font-weight: 900; font-size: 14px;
}
.pq-opt-text { font-size: 14.5px; line-height: 1.55; flex: 1; }

.pq-nav { display: flex; justify-content: flex-start; margin-top: 16px; }
.pq-back-btn {
  padding: 9px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  color: rgba(255,255,255,0.80);
  font-family: inherit;
  font-size: 12.5px; cursor: pointer;
}
.pq-back-btn:hover { background: rgba(255,255,255,0.14); }

/* ===================================================
   階段 3：Result 結果（翻面卡片）
   =================================================== */
.pq-phase-result { text-align: center; padding: 8px 4px 30px; }
.pq-result-header { margin-bottom: 12px; }
.pq-result-label {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255,213,79,0.18), rgba(245,158,11,0.10));
  border: 1px solid rgba(255,213,79,0.45);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 800;
  color: #FFD54F; letter-spacing: 2px;
}

/* 翻面卡片容器 — 塔羅牌比例 1:1.7 */
.pq-flip {
  position: relative;
  width: 340px; height: 580px;
  margin: 18px auto;
  perspective: 1500px;
  cursor: pointer;
}
.pq-flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 1.1s cubic-bezier(0.35, 0.05, 0.32, 1.05);
  transform-style: preserve-3d;
}
.pq-flip.flipped .pq-flip-inner {
  transform: rotateY(180deg);
}
.pq-flip-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 22px;
  overflow: hidden;
}
.pq-flip-face-back { /* mystery 是初始顯示在「正面位置」、揭曉時翻到背面 */ }
.pq-flip-face-front {
  transform: rotateY(180deg);
}

/* 星塵粒子 */
.pq-flip-sparkles {
  position: absolute; inset: -10px;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255,213,79,0.8), transparent),
    radial-gradient(1px 1px at 25% 70%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 70% 30%, rgba(255,213,79,0.6), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.5), transparent);
  animation: pqStarsTwinkle 2.5s ease-in-out infinite;
  filter: blur(0.3px);
  z-index: 5;
}
.pq-flip-hint {
  margin-top: 16px;
  font-size: 12.5px;
  color: rgba(255,213,79,0.85);
  letter-spacing: 0.8px;
  font-weight: 700;
  transition: opacity 0.4s;
}
.pq-flip-hint i { margin-right: 4px; }

/* 神秘面（背面 — 未揭曉）— 高級塔羅牌反面風 */
.pq-mystery {
  position: relative;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 50% 50%, #1a2456 0%, #0d1432 55%, #060a1e 100%);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* 雙層金邊（跟揭曉面一致）*/
.pq-mystery::before {
  content: ''; position: absolute; inset: 0;
  border: 2.5px solid #d4a85a;
  border-radius: 14px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(212,168,90,0.25);
}
.pq-mystery::after {
  content: ''; position: absolute; inset: 7px;
  border: 1px solid rgba(212,168,90,0.45);
  border-radius: 9px;
  pointer-events: none;
}

/* 內框圖案：菱形格紋 + 中央徽章背景 */
.pq-mystery-pattern {
  position: absolute; inset: 18px;
  pointer-events: none;
  background-image:
    /* 對角斜線格 — 細而稀 */
    repeating-linear-gradient(45deg,
      transparent 0px, transparent 24px,
      rgba(212,168,90,0.05) 24px, rgba(212,168,90,0.05) 25px),
    repeating-linear-gradient(-45deg,
      transparent 0px, transparent 24px,
      rgba(212,168,90,0.05) 24px, rgba(212,168,90,0.05) 25px),
    /* 中央光暈 */
    radial-gradient(circle at 50% 50%,
      rgba(212,168,90,0.18) 0%,
      transparent 50%);
}

.pq-mystery-inner {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
  padding: 20px;
}

/* 中央徽章：羅盤星 SVG */
.pq-mystery-q {
  position: relative;
  width: 200px; height: 200px;
  font-size: 0;
  display: flex; align-items: center; justify-content: center;
  animation: pqMedallionPulse 4s ease-in-out infinite;
}
@keyframes pqMedallionPulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(212,168,90,0.40)); }
  50%      { filter: drop-shadow(0 0 36px rgba(212,168,90,0.75)); }
}
.pq-mystery-emblem {
  width: 100%; height: 100%;
}
.pq-mystery-rays {
  transform-origin: center;
  animation: pqStarSpin 30s linear infinite;
}
@keyframes pqStarSpin {
  to { transform: rotate(360deg); }
}

.pq-mystery-hint {
  position: relative;
  font-size: 12.5px;
  color: #d4a85a;
  letter-spacing: 4px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0 18px;
  text-shadow: 0 0 12px rgba(212,168,90,0.6);
}
.pq-mystery-hint::before,
.pq-mystery-hint::after {
  content: '✦';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 9px;
  color: rgba(212,168,90,0.65);
}
.pq-mystery-hint::before { left: 0; }
.pq-mystery-hint::after  { right: 0; }

/* 四角星塵裝飾 */
.pq-mystery-inner::before,
.pq-mystery-inner::after {
  content: '✦';
  position: absolute;
  font-size: 14px;
  color: rgba(212,168,90,0.55);
  animation: pqStarsTwinkle 3s ease-in-out infinite;
}
.pq-mystery-inner::before { top: 24px; left: 30px; }
.pq-mystery-inner::after  { bottom: 60px; right: 30px; animation-delay: 1s; }

/* 揭曉面 — 塔羅牌式人格卡（深空藍金色系）*/
.pq-pcard {
  position: relative;
  width: 100%; height: 100%;
  padding: 22px 18px 18px;
  background:
    radial-gradient(ellipse at 50% 8%,
      color-mix(in srgb, var(--persona-color, #d4a85a) 30%, transparent) 0%,
      transparent 50%),
    linear-gradient(168deg,
      #1a2456 0%,
      #131a3e 40%,
      #0a1028 75%,
      #050818 100%);
  border: 2.5px solid #d4a85a;
  border-radius: 14px;
  box-shadow:
    0 28px 70px rgba(0,0,0,0.75),
    0 0 0 1px rgba(212,168,90,0.25),
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 0 80px color-mix(in srgb, var(--persona-color, #d4a85a) 12%, transparent);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  overflow: hidden;
}
/* 內框：細緻雙層金邊 */
.pq-pcard::after {
  content: ''; position: absolute; inset: 7px;
  border: 1px solid rgba(212,168,90,0.40);
  border-radius: 9px;
  pointer-events: none;
  z-index: 1;
}
.pq-pcard--visual::before {
  /* 神秘紋路 — 改成微妙星圖 + 漸層光、移除同心圓 */
  content: ''; position: absolute; inset: 0;
  background:
    /* 上方光暈 */
    radial-gradient(ellipse 80% 40% at 50% 0%,
      color-mix(in srgb, var(--persona-color) 28%, transparent),
      transparent 60%),
    /* 底部腳光 */
    radial-gradient(ellipse 60% 30% at 50% 100%,
      rgba(212,168,90,0.12),
      transparent 50%),
    /* 微弱星塵 */
    radial-gradient(1px 1px at 18% 32%, rgba(212,168,90,0.30), transparent),
    radial-gradient(1px 1px at 80% 25%, rgba(255,255,255,0.20), transparent),
    radial-gradient(1.5px 1.5px at 25% 78%, rgba(212,168,90,0.25), transparent),
    radial-gradient(1px 1px at 72% 82%, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}
.pq-pcard > * { position: relative; z-index: 2; }

/* 塔羅式邊框裝飾角 — 4 個角各有「✦ + L」精緻紋飾 */
.pq-pcard-frame { position: absolute; inset: 14px; pointer-events: none; z-index: 3; }
.pq-pcard-corner {
  position: absolute;
  width: 38px; height: 38px;
}
/* 主 L 邊（雙層、外粗內細） */
.pq-pcard-corner::before {
  content: ''; position: absolute;
  width: 30px; height: 30px;
  border: 2px solid #d4a85a;
  filter: drop-shadow(0 0 4px rgba(212,168,90,0.6));
}
/* 副邊（內層細線、留隙） */
.pq-pcard-corner::after {
  content: ''; position: absolute;
  width: 16px; height: 16px;
  border: 1px solid rgba(212,168,90,0.65);
}
/* 對角四星 — 用 SVG 替每個角加點睛✦ */
.pq-pcard-corner > i,
.pq-pcard-corner > span {
  display: none;
}
.pq-pcard-corner {
  background:
    radial-gradient(circle at center,
      rgba(212,168,90,0.8) 0%,
      rgba(212,168,90,0.4) 30%,
      transparent 60%);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
/* 左上 */
.pq-pcard-corner.tl { top: 0; left: 0; background-position: 18px 18px; }
.pq-pcard-corner.tl::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.pq-pcard-corner.tl::after  { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
/* 右上 */
.pq-pcard-corner.tr { top: 0; right: 0; background-position: calc(100% - 18px) 18px; }
.pq-pcard-corner.tr::before { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 4px 0 0; }
.pq-pcard-corner.tr::after  { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
/* 左下 */
.pq-pcard-corner.bl { bottom: 0; left: 0; background-position: 18px calc(100% - 18px); }
.pq-pcard-corner.bl::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 4px; }
.pq-pcard-corner.bl::after  { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
/* 右下 */
.pq-pcard-corner.br { bottom: 0; right: 0; background-position: calc(100% - 18px) calc(100% - 18px); }
.pq-pcard-corner.br::before { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }
.pq-pcard-corner.br::after  { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.pq-pcard-idtag {
  position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: rgba(0,0,0,0.65);
  border: 1.5px solid var(--persona-color, #FFD54F);
  border-radius: 0;
  font-size: 11px; font-weight: 900;
  letter-spacing: 3px;
  color: var(--persona-color, #FFD54F);
  z-index: 4;
  box-shadow: 0 0 12px color-mix(in srgb, var(--persona-color, #FFD54F) 40%, transparent);
  /* 像古代牌位 */
  clip-path: polygon(8% 0%, 92% 0%, 100% 50%, 92% 100%, 8% 100%, 0% 50%);
}

/* Icon 區塊 + 光暈 */
.pq-pcard-icon-wrap {
  position: relative;
  width: 110px; height: 110px;
  margin: 36px auto 10px;
  display: flex; align-items: center; justify-content: center;
}
.pq-pcard-icon-glow {
  position: absolute; inset: -20px;
  background: radial-gradient(circle, var(--persona-color, #FFD54F) 0%, transparent 65%);
  opacity: 0.45;
  filter: blur(20px);
  animation: pqGlowPulse 3s ease-in-out infinite;
}
@keyframes pqGlowPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50%      { opacity: 0.75; transform: scale(1.08); }
}
.pq-pcard-icon {
  position: relative; z-index: 2;
  width: 88px; height: 88px;
  filter:
    brightness(0) invert(1)
    drop-shadow(0 0 8px var(--persona-color, #FFD54F))
    drop-shadow(0 0 16px color-mix(in srgb, var(--persona-color, #FFD54F) 60%, transparent));
}

/* 名字逐字浮現 */
.pq-pcard-name {
  font-size: 30px; font-weight: 900;
  letter-spacing: 3px;
  margin: 4px 0 6px;
  color: #fff;
  text-shadow: 0 0 16px color-mix(in srgb, var(--persona-color, #FFD54F) 70%, transparent);
}
.pq-pcard-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(15px);
  animation: pqLetterIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: calc(var(--li, 0) * 0.08s + 0.3s);
}
@keyframes pqLetterIn {
  0%   { opacity: 0; transform: translateY(15px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.pq-pcard-tagline {
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
  font-style: italic;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
  line-height: 1.4;
  padding: 0 14px;
}

/* 卡片內：代表球星 + 經典場景 */
.pq-pcard-info {
  width: calc(100% - 24px);
  margin: 6px 0 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,213,79,0.20);
  border-radius: 8px;
}
.pq-pcard-info-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; line-height: 1.4;
  padding: 4px 0;
}
.pq-pcard-info-row + .pq-pcard-info-row {
  border-top: 1px dashed rgba(255,213,79,0.18);
  margin-top: 4px; padding-top: 8px;
}
.pq-pcard-info-label {
  font-weight: 800;
  color: rgba(255,213,79,0.80);
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-right: 10px;
}
.pq-pcard-info-val {
  font-weight: 700;
  color: #fff;
  text-align: right;
  font-size: 11.5px;
  letter-spacing: 0.3px;
}

/* 卡片內：天作之合 / 八字不合（含 icon） */
.pq-pcard-pairs {
  width: calc(100% - 24px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0 10px;
}
.pq-pcard-pair {
  padding: 8px 6px 9px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--pair-color, #888) 25%, transparent),
      color-mix(in srgb, var(--pair-color, #888) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--pair-color, #888) 55%, transparent);
  border-radius: 8px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px;
}
.pq-pcard-pair-tag {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--pair-color, #fff);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.pq-pcard-pair-icon {
  width: 28px; height: 28px;
  padding: 4px;
  background: rgba(0,0,0,0.35);
  border: 1px solid color-mix(in srgb, var(--pair-color, #888) 50%, transparent);
  border-radius: 50%;
  filter:
    brightness(0) invert(1)
    drop-shadow(0 0 4px var(--pair-color, #888));
  margin: 2px 0;
}
.pq-pcard-pair-name {
  display: block;
  font-size: 11.5px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.pq-pcard-pair-reason {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
  margin-top: 5px;
  padding: 0 4px;
  letter-spacing: 0.2px;
}

/* 稀有度進度條 */
.pq-pcard-rarity-row {
  width: calc(100% - 24px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
  margin: 4px 0 8px;
}
.pq-pcard-rarity-label {
  font-size: 10px; font-weight: 900;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.65);
}
.pq-pcard-rarity-bar {
  height: 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.pq-pcard-rarity-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--persona-color, #FFD54F),
    color-mix(in srgb, var(--persona-color, #FFD54F) 40%, #fff));
  border-radius: 999px;
  box-shadow: 0 0 8px var(--persona-color, #FFD54F);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}
.pq-pcard-rarity-val {
  font-size: 14px; font-weight: 900;
  color: var(--persona-color, #FFD54F);
  min-width: 36px; text-align: right;
}

.pq-pcard-brand {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: 10.5px; font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1.5px;
  width: 100%;
}
.pq-pcard-brand i { margin-right: 4px; color: var(--persona-color, #FFD54F); }

/* 光譜卡（背面）— 適配 580px 卡片 */
.pq-pcard--spectrum {
  padding: 30px 22px 22px;
  justify-content: space-between;
}
.pq-spec-head { text-align: center; margin-bottom: 18px; }
.pq-spec-head-title {
  font-size: 18px; font-weight: 900;
  letter-spacing: 4px;
  color: #d4a85a;
  text-shadow: 0 0 14px rgba(212,168,90,0.50);
}
.pq-spec-head-sub {
  font-size: 11.5px;
  color: rgba(255,255,255,0.60);
  letter-spacing: 1.5px;
  margin-top: 5px;
}

.pq-spec-bars {
  display: flex; flex-direction: column; gap: 9px;
  width: 100%;
  flex: 1;
  margin: 8px 0;
  justify-content: center;
}
.pq-spec-row {
  display: grid;
  grid-template-columns: 88px 1fr 36px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  opacity: 0.82;
  position: relative;
}
.pq-spec-row.is-winner {
  opacity: 1;
  font-weight: 900;
}
.pq-spec-row.is-winner .pq-spec-name { color: #d4a85a; text-shadow: 0 0 8px rgba(212,168,90,0.5); }
.pq-spec-row.is-winner::before {
  content: '★';
  position: absolute; left: -12px;
  color: #d4a85a;
  font-size: 11px;
  filter: drop-shadow(0 0 4px rgba(212,168,90,0.7));
}
.pq-spec-label-col {
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.pq-spec-id {
  font-weight: 900; font-size: 10.5px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1.5px;
  font-family: 'Courier New', monospace;
}
.pq-spec-name {
  font-size: 12px;
  color: rgba(255,255,255,0.90);
}
.pq-spec-bar {
  height: 10px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.pq-spec-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--bar-color, #888),
    color-mix(in srgb, var(--bar-color, #888) 50%, #fff));
  border-radius: 999px;
  box-shadow: 0 0 8px var(--bar-color, #888);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.pq-spec-val {
  font-size: 12px; font-weight: 800;
  color: rgba(255,255,255,0.92);
  text-align: right;
  font-family: 'Courier New', monospace;
}

/* 證書 */
.pq-spec-cert {
  margin-top: 14px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.30));
  border: 1.5px solid rgba(212,168,90,0.40);
  border-radius: 8px;
  position: relative;
}
.pq-spec-cert::before,
.pq-spec-cert::after {
  content: ''; position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid rgba(212,168,90,0.60);
}
.pq-spec-cert::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.pq-spec-cert::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

.pq-spec-cert-row {
  display: flex; justify-content: space-between;
  margin-bottom: 10px;
}
.pq-cert-label {
  font-size: 9.5px;
  color: rgba(212,168,90,0.85);
  letter-spacing: 2px;
  font-weight: 800;
}
.pq-cert-val {
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: #fff;
  font-weight: 700;
  margin-top: 3px;
  letter-spacing: 1px;
}
.pq-spec-cert-sig {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 9px;
  border-top: 1px dashed rgba(212,168,90,0.30);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #d4a85a;
}
.pq-cert-stamp {
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(212,168,90,0.6));
}

/* ===================================================
   結果區下方：只留人格描述 + 按鈕
   （代表球星 / 經典場景 / 配對都已搬到卡片正面）
   =================================================== */
.pq-result-body { margin-top: 22px; }
.pq-result-desc {
  text-align: left;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(255,213,79,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,213,79,0.20);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255,255,255,0.92);
  margin-bottom: 18px;
}

/* 卡片下方重複資訊 — 隱藏（已搬到卡片上）*/
.pq-result-meta,
.pq-pair-row { display: none !important; }

/* 動作按鈕 */
.pq-result-actions {
  display: flex; flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.pq-btn {
  padding: 13px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.08);
  color: #fff;
  letter-spacing: 0.5px;
  transition: transform 0.15s, box-shadow 0.2s;
}
.pq-btn i { margin-right: 6px; }
.pq-btn:hover { transform: translateY(-2px); }
.pq-btn-primary {
  background: linear-gradient(135deg, #d4a85a, #b8894b);
  color: #1a1a1a;
  border: 2px solid rgba(255,229,160,0.40);
  box-shadow: 0 6px 20px rgba(212,168,90,0.45);
}
.pq-btn-primary:hover { box-shadow: 0 10px 28px rgba(212,168,90,0.65); }
.pq-btn-secondary { background: rgba(255,255,255,0.10); }
.pq-btn-secondary:hover { background: rgba(255,255,255,0.18); }

/* ===================================================
   響應式
   =================================================== */
@media (max-width: 600px) {
  .pq-overlay { padding: 16px 12px; }
  .pq-title { font-size: 34px; }
  .pq-flip { width: 320px; height: 540px; }
  .pq-pcard { padding: 18px 12px 14px; }
  .pq-pcard-icon-wrap { width: 96px; height: 96px; margin-top: 34px; }
  .pq-pcard-icon { width: 76px; height: 76px; }
  .pq-pcard-name { font-size: 26px; }
  .pq-pcard-tagline { font-size: 11.5px; padding: 0 6px; }
  .pq-pcard-info { padding: 8px 10px; }
  .pq-pcard-info-row { font-size: 10.5px; }
  .pq-pcard-info-val { font-size: 10.5px; }
  .pq-mystery-q { font-size: 110px; }
}
