/* =============================================================
   球迷人格測驗 — 精緻完整版 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;
  overflow-x: hidden; /* 神光輪比卡寬、不能撐出橫向捲軸 */
  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;
}

/* 翻面卡片容器 — 塔羅牌比例 */
.pq-flip {
  position: relative;
  width: 420px; height: 630px; /* 2:3、對齊 AI 牌面圖 768×1152 */
  margin: 18px auto;
  perspective: 1500px;
  cursor: pointer;
}
.pq-flip-inner {
  position: relative;
  z-index: 1; /* 高於神光輪 / 金塵 */
  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;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px; /* 縮小圓角、別把 AI 牌面的華麗邊框四角裁掉 */
  overflow: hidden;
}
/* iOS Safari 背面剔除（backface-visibility）對合成層子元素會失效、
   背面內容鏡像壓在正面上。修法：不依賴背面剔除——翻轉動畫 1.1s、
   在 0.55s（卡片轉到 90 度側面、視覺上是一條線）時直接切換兩面的
   visibility，任何引擎都不可能穿透 */
.pq-flip-face-back { /* mystery 是初始顯示在「正面位置」、揭曉時翻到背面 */
  transform: rotateY(0deg) translateZ(1px);
  transition: visibility 0s linear 0.55s;
}
.pq-flip.flipped .pq-flip-face-back { visibility: hidden; }
.pq-flip-face-front {
  transform: rotateY(180deg) translateZ(1px);
  visibility: hidden;
  transition: visibility 0s linear 0.55s;
}
.pq-flip.flipped .pq-flip-face-front { visibility: visible; }

/* 結果階段：藏掉球門裝飾 — preserve-3d 翻牌會讓它蓋到卡片上 */
.pq-overlay.pq-phase-result-active .pq-bg-goal { display: none; }

/* ===================================================
   SSR 揭曉分鏡：充能 → 爆閃 → 神光輪 + 掃光 + 金塵
   =================================================== */

/* --- 1. 充能（點下神秘卡後 1.15s）--- */
.pq-flip.charging { cursor: wait; }
.pq-flip.charging .pq-mystery-q {
  animation: pqChargeUp 1.15s cubic-bezier(0.55, 0, 0.85, 0.4) forwards;
}
@keyframes pqChargeUp {
  0%   { transform: scale(1);
         filter: brightness(1) drop-shadow(0 0 18px rgba(212,168,90,0.40)); }
  45%  { transform: scale(1.03);
         filter: brightness(1.25) drop-shadow(0 0 34px rgba(255,213,79,0.65)); }
  75%  { transform: scale(1.07);
         filter: brightness(1.7) drop-shadow(0 0 60px rgba(255,213,79,0.9))
                 drop-shadow(0 0 100px rgba(255,152,0,0.5)); }
  100% { transform: scale(1.15);
         filter: brightness(2.2) drop-shadow(0 0 95px rgba(255,213,79,1))
                 drop-shadow(0 0 160px rgba(255,152,0,0.85))
                 drop-shadow(0 0 220px rgba(255,255,255,0.5)); }
}
.pq-flip.charging .pq-flip-inner {
  animation: pqChargeShake 1.15s ease-in forwards;
}
@keyframes pqChargeShake {
  0%, 12% { transform: translate(0,0); }
  24% { transform: translate(-1px, 1px); }
  36% { transform: translate(1.5px, -1px); }
  48% { transform: translate(-2px, -1.5px); }
  60% { transform: translate(2px, 1.5px); }
  72% { transform: translate(-2.5px, 2px) scale(1.005); }
  84% { transform: translate(2.5px, -2px) scale(1.01); }
  96%, 100% { transform: translate(-1.5px, 1.5px) scale(1.015); }
}
.pq-flip.charging .pq-mystery-hint { opacity: 0; transition: opacity 0.3s; }

/* --- 2. 全螢幕爆閃 + 衝擊波環 --- */
.pq-reveal-flash {
  position: fixed; inset: 0;
  z-index: 13060;
  pointer-events: none;
  background: radial-gradient(circle at 50% var(--fy, 42%),
    rgba(255,255,255,0.98) 0%,
    rgba(255,229,150,0.65) 22%,
    rgba(255,152,0,0.22) 48%,
    transparent 72%);
  mix-blend-mode: screen;
  animation: pqRevealFlash 0.65s ease-out forwards;
}
@keyframes pqRevealFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  100% { opacity: 0; }
}
.pq-reveal-ring {
  position: fixed;
  width: 130px; height: 130px;
  margin: -65px 0 0 -65px;
  border: 3px solid rgba(244,213,154,0.95);
  border-radius: 50%;
  box-shadow:
    0 0 24px rgba(255,213,79,0.9),
    inset 0 0 18px rgba(255,213,79,0.6);
  z-index: 13055;
  pointer-events: none;
  animation: pqRevealRing 0.75s cubic-bezier(0.2, 0.6, 0.3, 1) forwards;
}
@keyframes pqRevealRing {
  0%   { transform: scale(0.35); opacity: 1; }
  100% { transform: scale(6);    opacity: 0; }
}

/* --- 3. 神光輪：雙層反向旋轉光芒盤（卡片背後、揭曉後常駐緩轉）--- */
.pq-godrays {
  position: absolute;
  left: 50%; top: 47%;
  width: 1240px; height: 1240px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s ease 0.1s;
}
.pq-godrays.show { opacity: 1; }
.pq-godrays::before,
.pq-godrays::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle,
    rgba(0,0,0,0.85) 12%, rgba(0,0,0,0.45) 40%, transparent 68%);
          mask: radial-gradient(circle,
    rgba(0,0,0,0.85) 12%, rgba(0,0,0,0.45) 40%, transparent 68%);
}
.pq-godrays::before {
  background: repeating-conic-gradient(from 0deg,
    transparent 0deg 6deg,
    color-mix(in srgb, var(--persona-color, #d4a85a) 36%, transparent) 10.5deg,
    transparent 15deg 24deg);
  filter: blur(14px);
  animation: pqGodraysSpin 46s linear infinite;
}
.pq-godrays::after {
  background: repeating-conic-gradient(from 8deg,
    transparent 0deg 10deg,
    rgba(244,213,154,0.22) 15.5deg,
    transparent 21deg 32deg);
  filter: blur(18px);
  animation: pqGodraysSpinRev 68s linear infinite;
}
@keyframes pqGodraysSpin    { to { transform: rotate(360deg); } }
@keyframes pqGodraysSpinRev { to { transform: rotate(-360deg); } }
/* 光輪中心呼吸暈 */
.pq-godrays i {
  position: absolute; inset: 22%;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--persona-color, #d4a85a) 32%, transparent) 0%,
    transparent 65%);
  filter: blur(26px);
  animation: pqAuraBreathe 5s ease-in-out infinite;
}

/* --- 4. 卡片翻出瞬間 pop + 卡面掃光 --- */
.pq-flip.bursting {
  animation: pqCardPop 0.9s cubic-bezier(0.34, 1.4, 0.5, 1) both;
}
@keyframes pqCardPop {
  0%   { transform: scale(0.90); }
  55%  { transform: scale(1.055); }
  100% { transform: scale(1); }
}
.pq-pcard-shine {
  position: absolute; inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 38%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0.24) 50%,
    rgba(255,255,255,0.06) 55%,
    transparent 62%);
  transform: translateX(-130%);
  border-radius: 14px;
}
.pq-pcard--visual.animate .pq-pcard-shine {
  animation: pqShineSweep 1.15s cubic-bezier(0.3, 0, 0.3, 1) 0.5s forwards;
}
@keyframes pqShineSweep {
  0%   { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

/* --- 5. 金塵上飄（揭曉後常駐氛圍）--- */
.pq-flip-dust {
  position: absolute; inset: -70px -90px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1s ease 0.4s;
}
.pq-flip-dust.show { opacity: 1; }
.pq-flip-dust span {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255,235,180,0.95) 0%, rgba(244,213,154,0.45) 55%, transparent 75%);
  animation: pqDustUp linear infinite;
}
@keyframes pqDustUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.9; }
  60%  { opacity: 0.55; transform: translateY(calc(var(--up, -600px) * 0.55)) translateX(var(--dx, 8px)); }
  100% { transform: translateY(var(--up, -600px)) translateX(calc(var(--dx, 8px) * -0.6)); opacity: 0; }
}

/* 星塵粒子 */
.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: 14px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 900;
  font-family: inherit;
  letter-spacing: 0.8px;
  color: #ffe08a;
  background: rgba(240,192,64,0.12);
  border: 1.5px solid rgba(240,192,64,0.55);
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.4s, background 0.2s;
  animation: pqHintBreath 2.2s ease-in-out infinite;
}
.pq-flip-hint:hover { background: rgba(240,192,64,0.22); }
@keyframes pqHintBreath {
  0%, 100% { box-shadow: 0 0 0 rgba(240,192,64,0.0); border-color: rgba(240,192,64,0.45); }
  50%      { box-shadow: 0 0 20px rgba(240,192,64,0.55); border-color: rgba(240,192,64,0.9); }
}
/* 揭曉後還沒翻過面 → 卡片輕搖提醒可以互動（純 2D、不動 3D 引擎）*/
.pq-flip.pq-nudge { animation: pqCardNudge 0.9s ease-in-out; }
@keyframes pqCardNudge {
  0%, 100% { transform: rotateZ(0deg); }
  20%  { transform: rotateZ(-1.6deg); }
  40%  { transform: rotateZ(1.4deg); }
  60%  { transform: rotateZ(-1.0deg); }
  80%  { transform: rotateZ(0.6deg); }
}

/* 神秘面（背面 — 未揭曉）— 高級塔羅牌反面風 */
.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%),
    /* 徽章區同心弧線 */
    repeating-radial-gradient(circle at 50% 24%,
      transparent 0px, transparent 44px,
      rgba(212,168,90,0.055) 44px, rgba(212,168,90,0.055) 45.5px),
    /* 微弱星塵 */
    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);
  -webkit-mask: linear-gradient(180deg, #000 0%, #000 46%, rgba(0,0,0,0.25) 60%, #000 74%);
          mask: linear-gradient(180deg, #000 0%, #000 46%, rgba(0,0,0,0.25) 60%, #000 74%);
  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-frame::before,
.pq-pcard-frame::after {
  content: '';
  position: absolute; top: 50%;
  width: 7px; height: 7px;
  transform: translateY(-50%) rotate(45deg);
  background: #0c1230;
  border: 1.2px solid rgba(212,168,90,0.85);
  box-shadow: 0 0 8px rgba(212,168,90,0.55);
}
.pq-pcard-frame::before { left: 0.5px; }
.pq-pcard-frame::after  { right: 0.5px; }
.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 18px;
  background: rgba(0,0,0,0.65);
  border: 1.5px solid var(--persona-color, #FFD54F);
  border-radius: 0;
  font-size: 10.5px; font-weight: 900;
  letter-spacing: 2.5px;
  color: var(--persona-color, #FFD54F);
  z-index: 4;
  box-shadow: 0 0 12px color-mix(in srgb, var(--persona-color, #FFD54F) 40%, transparent);
  white-space: nowrap;
  /* 像古代牌位 */
  clip-path: polygon(8% 0%, 92% 0%, 100% 50%, 92% 100%, 8% 100%, 0% 50%);
}

/* SSR 主視覺區：大剪影 + 神光 + 光暈 */
.pq-pcard-icon-wrap {
  position: relative;
  width: 208px; height: 208px;
  margin: 24px auto 0;
  display: flex; align-items: center; justify-content: center;
}
.pq-pcard-icon-glow {
  position: absolute; inset: -14px;
  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); }
}
/* icon 光芒：小型神光輪（conic + 遮罩、非 SVG 三角形） */
.pq-pcard-rays {
  position: absolute; inset: -34px;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg,
    transparent 0deg 8deg,
    color-mix(in srgb, var(--persona-color, #d4a85a) 42%, transparent) 13deg,
    transparent 18deg 30deg);
  -webkit-mask: radial-gradient(circle,
    transparent 26%, rgba(0,0,0,0.75) 42%, rgba(0,0,0,0.35) 56%, transparent 70%);
          mask: radial-gradient(circle,
    transparent 26%, rgba(0,0,0,0.75) 42%, rgba(0,0,0,0.35) 56%, transparent 70%);
  filter: blur(3px);
  animation: pqRaysSpin 26s linear infinite;
}
@keyframes pqRaysSpin { to { transform: rotate(360deg); } }
.pq-pcard-ring {
  position: absolute; inset: 4px;
  border: 1px solid rgba(212,168,90,0.42);
  border-radius: 50%;
  pointer-events: none;
}
.pq-pcard-ring-dash {
  inset: 13px;
  border-style: dashed;
  border-color: rgba(212,168,90,0.30);
}
.pq-pcard-icon {
  position: relative; z-index: 2;
  width: 176px; height: 176px;
  filter:
    brightness(0) invert(1)
    drop-shadow(0 0 10px var(--persona-color, #FFD54F))
    drop-shadow(0 0 26px color-mix(in srgb, var(--persona-color, #FFD54F) 65%, transparent))
    drop-shadow(0 6px 10px rgba(0,0,0,0.45));
}

/* 名字列：側邊紋飾 + 金屬漸層字 */
.pq-pcard-name-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  width: calc(100% - 36px);
  margin: 2px 0 5px;
}
.pq-pcard-name-orn {
  flex: 1; max-width: 52px;
  height: 1.5px;
  position: relative;
  background: linear-gradient(90deg, transparent, rgba(212,168,90,0.75));
}
.pq-pcard-name-orn::after {
  content: '';
  position: absolute; right: -2px; top: 50%;
  width: 6px; height: 6px;
  transform: translateY(-50%) rotate(45deg);
  background: #d4a85a;
  box-shadow: 0 0 7px rgba(212,168,90,0.85);
}
.pq-pcard-name-orn-r { transform: scaleX(-1); }
.pq-pcard-name {
  font-size: 29px; font-weight: 900;
  letter-spacing: 3px;
  color: #ffeecb; /* 沒吃到 clip 的 fallback */
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--persona-color, #FFD54F) 70%, transparent))
          drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}
/* 金屬漸層要下在每個字上 — 逐字動畫的 span 有自己的合成層、
   父層 background-clip:text 罩不到、會整個變透明 */
.pq-pcard-name .pq-pcard-letter {
  background: linear-gradient(180deg,
    #ffffff 22%, #ffeecb 58%, #e2b96e 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: 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: 12px;
  color: rgba(255,240,214,0.82);
  font-style: italic;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  line-height: 1.4;
  padding: 0 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 金色分隔線 + 中央星 */
.pq-pcard-divider {
  position: relative;
  width: 66%;
  height: 2px;
  margin: 2px auto 8px;
  background: linear-gradient(90deg,
    transparent, rgba(212,168,90,0.8), transparent);
}
.pq-pcard-divider span {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  color: #f4d59a;
  background: transparent;
  text-shadow: 0 0 8px rgba(212,168,90,0.9);
  line-height: 1;
}

/* 稀有度 hero — 大數字當視覺主角 */
.pq-pcard-rarity {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  margin: 0 0 8px;
  width: calc(100% - 24px);
}
.pq-pcard-rarity-eyebrow {
  display: flex; align-items: center; gap: 9px;
  font-size: 9.5px; font-weight: 900;
  letter-spacing: 2.5px;
  color: #d4a85a;
}
.pq-pcard-rarity-eyebrow::before,
.pq-pcard-rarity-eyebrow::after {
  content: '';
  width: 30px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,90,0.6));
}
.pq-pcard-rarity-eyebrow::after {
  background: linear-gradient(90deg, rgba(212,168,90,0.6), transparent);
}
.pq-pcard-rarity-num {
  font-size: 42px; font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(115deg,
    var(--persona-color, #FFD54F) 20%,
    #ffffff 50%,
    var(--persona-color, #FFD54F) 80%);
  background-size: 230% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--persona-color, #FFD54F) 75%, transparent));
  animation: pqNumShimmer 3.4s ease-in-out infinite;
}
@keyframes pqNumShimmer {
  0%, 100% { background-position: 0% 0; }
  50%      { background-position: 100% 0; }
}
.pq-pcard-rarity-sub {
  font-size: 10.5px;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.3px;
}

/* 卡片內：代表球星 + 經典場景（目錄點線排版、去箱化） */
.pq-pcard-info {
  width: calc(100% - 44px);
  margin: 5px 0 9px;
  display: flex; flex-direction: column;
  gap: 8px;
}
.pq-pcard-info-row {
  display: flex; align-items: baseline;
  gap: 8px;
  font-size: 11px; line-height: 1.4;
  text-align: left;
}
.pq-pcard-info-dots {
  flex: 1;
  min-width: 16px;
  border-bottom: 1.5px dotted rgba(212,168,90,0.40);
  transform: translateY(-3px);
}
.pq-pcard-info-label {
  font-weight: 800;
  color: rgba(255,213,79,0.85);
  letter-spacing: 1.5px;
  flex-shrink: 0;
}
.pq-pcard-info-val {
  font-weight: 700;
  color: #fff;
  text-align: right;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  max-width: 64%;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 卡片內：天作之合 / 八字不合（含 icon） */
.pq-pcard-pairs {
  width: calc(100% - 24px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 8px;
}
.pq-pcard-pair {
  position: relative;
  padding: 13px 6px 9px;
  background:
    radial-gradient(ellipse 95% 60% at 50% 0%,
      color-mix(in srgb, var(--pair-color, #888) 20%, transparent),
      transparent 72%),
    linear-gradient(180deg, rgba(0,0,0,0.40), rgba(0,0,0,0.26));
  border: 1px solid color-mix(in srgb, var(--pair-color, #888) 50%, transparent);
  border-radius: 10px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.pq-pcard-pair-tag {
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%);
  padding: 2px 11px;
  background: linear-gradient(180deg, #141b3e, #0c1230);
  border: 1px solid color-mix(in srgb, var(--pair-color, #888) 65%, transparent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  color: var(--pair-color, #fff);
  letter-spacing: 1px;
  white-space: nowrap;
  box-shadow: 0 0 10px color-mix(in srgb, var(--pair-color, #888) 35%, transparent);
}
.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;
}

/* 稀有度條（hero 區塊內） */
.pq-pcard-rarity-bar {
  width: 78%;
  height: 7px;
  margin-top: 5px;
  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;
}

/* 卡底證書列（zh Chrome 有 12px 最低字級、直接照 12px 排、上下兩行置中） */
.pq-pcard-cert {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed rgba(212,168,90,0.35);
  width: calc(100% - 88px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 1px;
  white-space: nowrap;
}
.pq-pcard-cert-no {
  font-size: 12px; font-weight: 700;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
}
.pq-pcard-cert-mid {
  font-size: 12px; font-weight: 900;
  letter-spacing: 2px;
  color: #d4a85a;
}

/* 光譜卡（背面）— 適配 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: 340px; height: 510px; }
  .pq-pcard { padding: 18px 12px 14px; }
  .pq-pcard-icon-wrap { width: 190px; height: 190px; margin-top: 22px; }
  .pq-pcard-icon { width: 160px; height: 160px; }
  .pq-pcard-name { font-size: 26px; }
  .pq-pcard-tagline { font-size: 11.5px; padding: 0 6px; }
  .pq-pcard-rarity-num { font-size: 36px; }
  .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; }
}

/* ===================================================
   華麗牌面正面（AI 全幅插畫）+ 背面塔羅資料卡
   =================================================== */
.pq-art-face {
  position: absolute; inset: 0;
  background: #1a1230;
  border-radius: 8px; /* 跟 flip-face 一致、不裁牌面邊框 */
  overflow: hidden;
  box-shadow:
    0 28px 70px rgba(0,0,0,0.75),
    0 0 0 1px rgba(212,168,90,0.25);
}
.pq-art-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
/* 揭曉掃光：翻到正面後從左掃到右一次 */
.pq-art-shine {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255,245,215,0.30) 47%,
    rgba(255,255,255,0.50) 50%,
    rgba(255,245,215,0.30) 53%,
    transparent 70%);
  transform: translateX(-130%);
}
.pq-art-face.animate .pq-art-shine {
  animation: pqArtShine 1.5s ease-out 0.2s forwards;
}
@keyframes pqArtShine {
  to { transform: translateX(130%); }
}

/* 背面塔羅資料卡：原正面視覺的緊湊版（拿掉大剪影跟光譜、塞進 510px）*/
.pq-pcard--databack { padding: 40px 14px 12px; justify-content: flex-start; }
.pq-pcard--databack .pq-pcard-name-row { margin: 0 0 2px; }
.pq-pcard--databack .pq-pcard-name { font-size: 24px; letter-spacing: 2.5px; }
.pq-pcard--databack .pq-pcard-tagline { font-size: 11px; margin-bottom: 6px; padding: 0 10px; }
.pq-pcard--databack .pq-pcard-divider { margin: 0 auto 6px; }
.pq-pcard--databack .pq-pcard-rarity { margin-bottom: 6px; gap: 1px; }
.pq-pcard--databack .pq-pcard-rarity-num { font-size: 30px; }
.pq-pcard--databack .pq-pcard-rarity-sub { font-size: 10px; }
.pq-pcard--databack .pq-pcard-info { margin: 3px 0 5px; gap: 6px; }
.pq-pcard--databack .pq-pcard-pairs { margin: 10px 0 6px; gap: 9px; }
.pq-pcard--databack .pq-pcard-pair { padding: 11px 5px 7px; }
.pq-pcard--databack .pq-pcard-pair-reason { font-size: 10px; line-height: 1.45; margin-top: 3px; }
.pq-pcard--databack .pq-pcard-cert { padding-top: 6px; }
.pq-pcard--databack .pq-pcard-cert-no { font-size: 10.5px; }
.pq-pcard--databack .pq-pcard-cert-mid { font-size: 11px; }

/* 背面卡頂部圖騰：跟原正面同位置（頂圈中心）、彈性佔用剩餘空間、擠不下就縮小 */
.pq-pcard-icon-wrap--mini {
  flex: 1 1 0;
  width: auto;
  height: auto;
  min-height: 36px;
  max-height: 132px;
  margin: 0 auto;
  align-self: center;
}
.pq-pcard-icon-wrap--mini {
  position: relative;
  width: 132px; /* 給絕對定位的圖一個固定寬、高度由 flex 伸縮 */
}
.pq-pcard-icon-wrap--mini .pq-pcard-icon {
  /* 圖騰是 SVG 沒有固有尺寸、WebKit 對彈性高度的百分比算不出來 → 圖消失。
     改絕對定位鋪滿容器 + object-fit 縮放、所有引擎行為一致 */
  position: absolute;
  inset: 4%;
  width: 92%;
  height: 92%;
  max-height: none;
  min-height: 0;
  object-fit: contain;
}
.pq-pcard-icon-wrap--mini .pq-pcard-rays { inset: -26px; }
.pq-pcard-icon-wrap--mini .pq-pcard-icon-glow { inset: -10px; opacity: 0.35; }
/* 名字以下全部不可被擠壓、空間不夠時寧可縮圖騰 */
.pq-pcard--databack .pq-pcard-name-row,
.pq-pcard--databack .pq-pcard-tagline,
.pq-pcard--databack .pq-pcard-divider,
.pq-pcard--databack .pq-pcard-rarity,
.pq-pcard--databack .pq-pcard-info,
.pq-pcard--databack .pq-pcard-pairs,
.pq-pcard--databack .pq-pcard-cert { flex-shrink: 0; }

/* 桌機（卡片 420×630）：背面文字放大放鬆、圖騰上限拉高 */
@media (min-width: 601px) {
  .pq-pcard--databack { padding: 46px 20px 14px; }
  .pq-pcard--databack .pq-pcard-name { font-size: 27px; }
  .pq-pcard--databack .pq-pcard-tagline { font-size: 12px; margin-bottom: 8px; }
  .pq-pcard--databack .pq-pcard-rarity-num { font-size: 34px; }
  .pq-pcard--databack .pq-pcard-rarity-sub { font-size: 10.5px; }
  .pq-pcard--databack .pq-pcard-info { gap: 8px; margin: 5px 0 8px; }
  .pq-pcard--databack .pq-pcard-info-row { font-size: 12px; }
  .pq-pcard--databack .pq-pcard-info-val { font-size: 12px; }
  .pq-pcard--databack .pq-pcard-pairs { margin: 12px 0 8px; gap: 11px; }
  .pq-pcard--databack .pq-pcard-pair-name { font-size: 12px; }
  .pq-pcard--databack .pq-pcard-pair-reason { font-size: 11px; }
  .pq-pcard--databack .pq-pcard-cert-no { font-size: 11.5px; }
  .pq-pcard-icon-wrap--mini { min-height: 48px; max-height: 180px; }
  .pq-pcard-icon-wrap--mini .pq-pcard-icon { max-height: 152px; }
}

/* 行動裝置防閃爍（根治版）：閃爍/穿透的根源是 3D 合成器逐幀重排深度。
   翻牌動畫只需要 1.2 秒的 3D——動畫結束後由 JS 加上 pq-settled、
   整組 3D 引擎關閉、「連翻轉角度也歸零」回到純 2D 排版：
   - 該顯示哪一面本來就由 visibility 換面機制控制、不需要角度
   - 角度不歸零的話、正面自帶 rotateY(180)+backface hidden 在平面模式
     會被部分引擎（Android Chrome）判定背對而整張隱藏
   z-index 恢復作主、不可能再有深度交錯的閃爍或打穿覆蓋層 */
.pq-flip.pq-settled { perspective: none; }
.pq-flip.pq-settled .pq-flip-inner {
  transform: none !important;
  transform-style: flat;
  transition: none;
}
.pq-flip.pq-settled .pq-flip-face { transform: none; }
/* 恢復 3D 姿勢的瞬間不能被動畫看見（_unsettle 兩段式切換用）*/
.pq-flip.pq-no-anim .pq-flip-inner { transition: none !important; }

/* ===================================================
   翻牌前登入鎖 + 人格專屬功能 CTA
   =================================================== */
.pq-login-gate {
  position: fixed; inset: 0;
  z-index: 13100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(5, 8, 24, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.pq-login-gate.show { opacity: 1; }
.pq-login-gate-card {
  width: min(340px, 92vw);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,168,90,0.16), transparent 55%),
    linear-gradient(168deg, #1a2456, #0d1330 70%, #080c20);
  border: 2px solid rgba(212,168,90,0.55);
  border-radius: 16px;
  padding: 26px 22px 20px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 40px rgba(212,168,90,0.18);
}
.pq-login-gate-icon { font-size: 44px; margin-bottom: 10px; filter: drop-shadow(0 0 14px rgba(212,168,90,0.7)); }
.pq-login-gate-title {
  font-size: 19px; font-weight: 900;
  color: #f4d59a;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.pq-login-gate-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
  margin-bottom: 18px;
}
.pq-login-gate-go {
  width: 100%;
  padding: 13px;
  border-radius: 999px;
  border: 2px solid rgba(255,229,160,0.45);
  background: linear-gradient(135deg, #f0c040, #d4a85a);
  color: #241503;
  font-family: inherit;
  font-size: 15px; font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(212,168,90,0.45);
  transition: transform 0.15s, box-shadow 0.2s;
}
.pq-login-gate-go:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(212,168,90,0.6); }
.pq-login-gate-later {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.pq-login-gate-later:hover { color: rgba(255,255,255,0.75); }

/* 人格專屬功能 CTA：比分享鈕更搶眼的金色主按鈕 */
.pq-btn-feature {
  background: linear-gradient(135deg, #f0c040, #d4a85a);
  color: #241503;
  border: 2px solid rgba(255,229,160,0.5);
  font-size: 15px;
  padding: 15px 18px;
  box-shadow: 0 8px 24px rgba(240,192,64,0.5);
  animation: pqFeatureGlow 2.6s ease-in-out infinite;
}
.pq-btn-feature:hover { box-shadow: 0 12px 32px rgba(240,192,64,0.7); }
@keyframes pqFeatureGlow {
  0%, 100% { box-shadow: 0 8px 24px rgba(240,192,64,0.45); }
  50%      { box-shadow: 0 8px 30px rgba(240,192,64,0.75); }
}

/* 分享鈕下的社交鉤子小字 */
.pq-share-hint {
  font-size: 12px;
  color: rgba(255,213,79,0.75);
  text-align: center;
  letter-spacing: 0.4px;
  margin: -2px 0 4px;
  line-height: 1.5;
}

/* 經典場景敘述：長文字整寬靠左排（原本擠在右欄窄窄一條、四行右對齊很難讀）*/
.pq-pcard-info-scene {
  width: 100%;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  text-align: left;
  line-height: 1.65;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  margin-top: -3px;
}
@media (min-width: 601px) {
  .pq-pcard-info-scene { font-size: 12.5px; }
}

/* ===================================================
   首頁 banner（#home-persona-banner）
   =================================================== */
.pq-home-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 16px 18px;
  min-height: 118px;
  background:
    radial-gradient(ellipse at 85% 40%, rgba(212,168,90,0.20), transparent 55%),
    linear-gradient(120deg, #1a2456, #131a3e 55%, #0d1330);
  border: 1.5px solid rgba(212,168,90,0.45);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.pq-home-banner:hover {
  border-color: rgba(240,192,64,0.8);
  box-shadow: 0 8px 28px rgba(212,168,90,0.30);
  transform: translateY(-2px);
}
.pq-home-banner-text { position: relative; z-index: 2; min-width: 0; }
.pq-home-banner-eyebrow {
  font-size: 11px; font-weight: 800;
  color: rgba(255,213,79,0.85);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.pq-home-banner-title {
  font-size: 20px; font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 3px;
  text-shadow: 0 0 14px rgba(212,168,90,0.4);
}
.pq-home-banner-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 9px;
}
.pq-home-banner-cta {
  display: inline-block;
  padding: 7px 18px;
  background: linear-gradient(135deg, #f0c040, #d4a85a);
  color: #241503;
  font-size: 13px; font-weight: 900;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(240,192,64,0.4);
}
/* 右側三張牌面小圖扇形 */
.pq-home-banner-cards {
  position: relative;
  flex-shrink: 0;
  width: 150px; height: 120px;
  pointer-events: none;
}
.pq-home-banner-cards img {
  position: absolute;
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid rgba(212,168,90,0.7);
  box-shadow: 0 6px 16px rgba(0,0,0,0.55);
  top: 8px;
}
.pq-home-banner-cards img:nth-child(1) { left: 0;  transform: rotate(-9deg); top: 14px; }
.pq-home-banner-cards img:nth-child(3) { right: 0; transform: rotate(9deg);  top: 14px; }
.pq-home-banner-cards img:nth-child(2) { left: 50%; transform: translateX(-50%); z-index: 2; top: 2px; }
@media (max-width: 480px) {
  .pq-home-banner { padding: 14px 14px; }
  .pq-home-banner-title { font-size: 18px; }
  .pq-home-banner-cards { width: 118px; height: 104px; }
  .pq-home-banner-cards img { width: 60px; }
}
