/* ===== 色彩系统 CSS 变量 ===== */
/*
  金色三级体系：
    --gold-highlight : #f5d76e  高光金（暖亮黄金，主标题/hover焦点/光晕核心）
    --gold-base      : #c9993a  基础金（饱满纯正金，按钮边框/主要文字/法阵描边）
    --gold-dark      : #6e430e  暗金  （深琥珀，次要边框/阴影底色/渐变收尾）
  辅助色（占比≤10%）：
    --aux-purple     : #4a2d6e  星象紫
    --aux-blue       : #162b48  星云蓝
    --aux-brown      : #5c2214  复古红棕
*/
:root {
  --gold-highlight: #f5d76e;
  --gold-base:      #c9993a;
  --gold-dark:      #6e430e;
  --gold-grad: linear-gradient(135deg, #f5d76e 0%, #c9993a 55%, #8a5a12 100%);
  --gold-grad-h: linear-gradient(135deg, #fce88a 0%, #e0b84a 50%, #c9993a 100%);
  --gold-glow-hi:   rgba(245, 215, 110, 0.88);
  --gold-glow-md:   rgba(201, 153,  58, 0.60);
  --gold-glow-lo:   rgba(110,  67,  14, 0.35);
  --gold-alpha-90:  rgba(201, 153, 58, 0.90);
  --gold-alpha-80:  rgba(201, 153, 58, 0.80);
  --gold-alpha-60:  rgba(201, 153, 58, 0.60);
  --gold-alpha-40:  rgba(201, 153, 58, 0.40);
  --gold-alpha-25:  rgba(201, 153, 58, 0.25);
  --gold-alpha-12:  rgba(201, 153, 58, 0.12);
  --gold-alpha-06:  rgba(201, 153, 58, 0.06);
  --gold-alpha-03:  rgba(201, 153, 58, 0.03);
  --aux-purple:     #4a2d6e;
  --aux-purple-a:   rgba(74, 45, 110, 0.20);
  --aux-blue:       #162b48;
  --aux-blue-a:     rgba(22, 43, 72, 0.16);
  --aux-brown:      #5c2214;
  --aux-brown-a:    rgba(92, 34, 20, 0.18);
}

/* ===== 全局重置与基础样式 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #040209;
  font-family: 'Georgia', 'Times New Roman', serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

/* ===== 场景容器 ===== */
#app { width: 100vw; height: 100vh; position: relative; overflow: hidden; }
.scene {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: none;
}
.scene.active { opacity: 1; pointer-events: all; }
.scene:not(.active),
.scene:not(.active) * {
  pointer-events: none !important;
}

/* ===== 星空背景SVG画布 ===== */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ===== Scene 01 ===== */
#scene-01 {
  z-index: 10;
  background: radial-gradient(ellipse at 50% 45%, #110d2c 0%, #07051a 55%, #020108 100%);
}
.tarot-circle {
  width: min(280px, 70vw);
  height: min(280px, 70vw);
  animation: breathe 3s ease-in-out infinite, rotateGlow 8s linear infinite;
  filter: drop-shadow(0 0 22px rgba(201, 153, 58, 0.55)) drop-shadow(0 0 8px rgba(245, 215, 110, 0.3));
}
.start-btn {
  width: 90px; height: 90px;
  cursor: pointer;
  margin-top: 40px;
  animation: float 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(201, 153, 58, 0.45));
  transition: transform 0.2s ease;
  position: relative;
  z-index: 20;
}
.start-btn:hover, .start-btn:active {
  transform: scale(1.1) translateY(-4px);
  filter: drop-shadow(0 0 28px rgba(245, 215, 110, 0.95)) drop-shadow(0 0 10px rgba(201, 153, 58, 0.7));
}
.star-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 1px solid rgba(201, 153, 58, 0.0);
  pointer-events: none;
  transition: all 0.3s ease;
}
.btn-wrapper:hover .star-ring {
  border-color: rgba(245, 215, 110, 0.65);
  box-shadow: 0 0 22px rgba(201, 153, 58, 0.38), inset 0 0 18px rgba(201, 153, 58, 0.12);
}
.btn-wrapper {
  --start-card-rotation: 0deg;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.start-card {
  width: clamp(72px, 18vw, 92px);
  height: clamp(115px, 28.8vw, 147px);
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
  transform: rotate(var(--start-card-rotation));
  transform-origin: center center;
  animation: startCardFloat 3.5s ease-in-out infinite, btnIdleGlow 2.8s ease-in-out infinite;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(245, 215, 110, 0.28),
    0 0 24px rgba(201, 153, 58, 0.24);
  filter:
    drop-shadow(0 5px 12px rgba(0,0,0,0.80))
    drop-shadow(0 0 16px rgba(201,153,58,0.42));
  touch-action: none;
}
.start-card-float {
  width: 100%;
  height: 100%;
  animation: startCardFloat 3.5s ease-in-out infinite;
}
.start-card .card-back-svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.start-card:hover,
.start-card:active {
  transform: scale(1.05) rotate(var(--start-card-rotation));
}
#start-btn.start-card:active {
  transform: scale(0.98) rotate(var(--start-card-rotation)) !important;
}
#start-btn-wrapper.dragging #start-btn.start-card {
  animation: none !important;
  transform: scale(1.08) rotate(var(--start-card-rotation)) !important;
}
.start-card .card-back-ring,
.start-card .card-back-ticks {
  animation-play-state: running;
}
.start-card .start-btn-core {
  display: none;
}
.start-card-ring,
.start-card-ticks {
  animation-play-state: running;
}
@keyframes startCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== 粒子效果 ===== */
.particle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #c9993a;
  pointer-events: none;
  z-index: 100;
}

/* ===== Scene 02 ===== */
#scene-02 {
  z-index: 9;
  background:
    linear-gradient(180deg, rgba(16,18,34,0.92) 0%, rgba(5,6,12,0.98) 62%, #020305 100%);
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(16px, 3.6vh, 32px) 0 calc(12px + env(safe-area-inset-bottom));
  overflow: hidden;
  perspective: 1200px;
}
.draw-architecture,
.draw-stage-frame,
.draw-stage::before {
  display: none !important;
}
.draw-shadow-deck {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.draw-shadow-deck::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(2,3,5,0.24) 58%, rgba(2,3,5,0.58));
}
.draw-shadow-row {
  position: absolute;
  left: -18vw;
  display: flex;
  gap: clamp(18px, 4vw, 44px);
  width: max-content;
  will-change: transform;
  transition: transform 0.22s linear;
}
.draw-shadow-row--far {
  bottom: clamp(154px, 22vh, 190px);
  opacity: 0.10;
  filter: blur(1.5px) saturate(0.70);
}
.draw-shadow-row--back {
  bottom: clamp(104px, 16vh, 142px);
  opacity: 0.16;
  filter: blur(1.1px) saturate(0.74);
}
.draw-shadow-row--middle {
  bottom: clamp(42px, 8vh, 78px);
  opacity: 0.20;
  filter: blur(0.75px) saturate(0.80);
}
.draw-shadow-row--front {
  bottom: clamp(-26px, -3vh, -10px);
  opacity: 0.26;
  filter: blur(0.55px) saturate(0.82);
}
.draw-shadow-card {
  width: clamp(118px, 19vw, 184px);
  aspect-ratio: 2 / 3.2;
  flex: 0 0 auto;
  transform: rotate(var(--shadow-tilt));
  transform-origin: center bottom;
}
.draw-shadow-card .card-back-ring,
.draw-shadow-card .card-back-ticks {
  animation-play-state: paused;
}
.draw-header {
  position: relative;
  z-index: 3;
  width: min(92vw, 720px);
  text-align: center;
  padding: 0 18px;
  flex-shrink: 0;
}

/* 卡背SVG旋转 */
@keyframes cardInnerSpin    { from { transform: rotate(0deg); }   to { transform: rotate(360deg); }  }
@keyframes cardInnerSpinRev { from { transform: rotate(0deg); }   to { transform: rotate(-360deg); } }
.card-back-ring  { animation: cardInnerSpin    8s linear infinite; }
.card-back-ticks { animation: cardInnerSpinRev 14s linear infinite; }
#scene-02:not(.active) .card-back-ring,
#scene-02:not(.active) .card-back-ticks,
.tarot-card.offscreen .card-back-ring,
.tarot-card.offscreen .card-back-ticks { animation-play-state: paused; }

.cards-title {
  color: #f5d76e;
  font-size: clamp(22px, 6vw, 42px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 1px 0 rgba(110,67,14,0.9);
  opacity: 0;
  font-style: italic;
  flex-shrink: 0;
}
.cards-subtitle {
  color: rgba(201, 153, 58, 0.65);
  font-size: clamp(12px, 2.4vw, 15px);
  letter-spacing: 0.24em;
  margin-bottom: clamp(14px, 3vh, 24px);
  opacity: 0;
  flex-shrink: 0;
}
.positions-bar {
  display: flex;
  gap: clamp(10px, 3vw, 26px);
  margin-bottom: clamp(10px, 2.5vh, 20px);
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 50;
  width: min(92vw, 620px);
  padding: 10px clamp(10px, 3vw, 18px);
  flex-shrink: 0;
  border: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(245,215,110,0.04), transparent 72%);
}
.pos-slot { display: flex; flex-direction: column; align-items: center; gap: 7px; opacity: 0; transform: translateY(-20px); flex: 1; min-width: 0; }
.pos-label { font-size: clamp(10px, 2.2vw, 13px); color: #c9993a; letter-spacing: 0.2em; text-shadow: 0 0 10px rgba(201, 153, 58, 0.55); }
.pos-slot.active .pos-label {
  color: #f5d76e;
  text-shadow: 0 0 16px rgba(245,215,110,0.75), 0 0 34px rgba(201,153,58,0.42);
}
.pos-holder {
  width: clamp(48px, 11vw, 72px);
  height: clamp(72px, 16.5vw, 108px);
  border: 1.5px solid rgba(201, 153, 58, 0.40);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background: rgba(201, 153, 58, 0.03);
  animation: holderPulse 2s ease-in-out infinite;
}
.pos-slot.active .pos-holder {
  border-color: rgba(245,215,110,0.90);
  box-shadow: 0 0 24px rgba(245,215,110,0.34), 0 0 8px rgba(201,153,58,0.70), inset 0 0 20px rgba(201,153,58,0.14);
  animation: holderPulse 1.35s ease-in-out infinite;
}
.pos-slot.complete .pos-label {
  color: rgba(201,153,58,0.70);
}
.pos-holder::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 6px;
  background: linear-gradient(45deg, transparent 30%, rgba(245, 215, 110, 0.28) 50%, transparent 70%);
  animation: shimmer 2.5s linear infinite;
}
.pos-holder.filled {
  animation: none;
  border-color: rgba(201, 153, 58, 0.85);
  box-shadow: 0 0 16px rgba(201, 153, 58, 0.32), inset 0 0 10px rgba(201, 153, 58, 0.06);
}
.pos-holder .placed-card { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.draw-stage {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-top: auto;
  margin-bottom: auto;
  padding: clamp(18px, 4vh, 34px) 0 clamp(20px, 4vh, 34px);
  transform-style: preserve-3d;
}
.draw-stage::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(700px, 112vw);
  height: clamp(118px, 22vw, 178px);
  transform: translate(-50%, -50%) rotateX(72deg);
  transform-origin: center;
  border-radius: 50%;
  border: 1px solid rgba(201,153,58,0.13);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(201,153,58,0.10), transparent 64%);
  pointer-events: none;
}
.draw-stage-frame {
  position: absolute;
  left: 50%;
  top: 12px;
  width: min(520px, 84vw);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.draw-stage-frame span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,153,58,0.44));
}
.draw-stage-frame span:last-child {
  background: linear-gradient(270deg, transparent, rgba(201,153,58,0.44));
}
.draw-stage-frame i {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: 1px solid rgba(245,215,110,0.60);
}
.cards-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  flex-shrink: 0;
  padding: clamp(28px, 5vh, 48px) 0 clamp(30px, 5vh, 46px);
  -ms-overflow-style: none;
  scrollbar-width: none;
  perspective: 1050px;
  transform-style: preserve-3d;
  mask-image: linear-gradient(90deg, transparent 0%, black 7%, black 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 7%, black 93%, transparent 100%);
}
.cards-scroll-wrapper::-webkit-scrollbar { display: none; }
.cards-track {
  display: flex;
  gap: clamp(12px, 3.2vw, 24px);
  padding: 0 max(14vw, 72px) 8px;
  width: max-content;
  user-select: none;
  align-items: flex-end;
  transform-style: preserve-3d;
}
.tarot-card {
  --draw-lift: 0px;
  --draw-scale: 0.92;
  --draw-rotate-y: 0deg;
  --draw-rotate-z: 0deg;
  --draw-opacity: 1;
  width: clamp(74px, 16vw, 112px);
  height: clamp(111px, 24vw, 168px);
  flex-shrink: 0;
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  opacity: var(--draw-opacity);
  transition: opacity 0.18s ease;
  animation: none;
  transform-origin: center bottom;
  transform:
    translateY(calc(var(--draw-lift) * -1))
    rotateY(var(--draw-rotate-y))
    rotateZ(var(--draw-rotate-z))
    scale(var(--draw-scale));
  box-shadow:
    0 20px 34px rgba(0,0,0,0.48),
    0 0 0 1px rgba(245,215,110,0.08);
  filter: drop-shadow(0 18px 26px rgba(0,0,0,0.62)) drop-shadow(0 0 16px rgba(201,153,58,0.30));
}
.tarot-card:hover {
  filter: brightness(1.10) contrast(1.04) drop-shadow(0 18px 24px rgba(0,0,0,0.58)) !important;
  z-index: 10;
}
.tarot-card.selected { opacity: 0 !important; pointer-events: none !important; animation: none !important; }
.card-back-svg { width: 100%; height: 100%; display: block; border-radius: 9px; }
.draw-stage-caption {
  position: relative;
  z-index: 3;
  width: min(92vw, 520px);
  margin: -10px auto 0;
  color: rgba(201,153,58,0.58);
  font-size: clamp(10px, 2.1vw, 12px);
  letter-spacing: 0.42em;
  text-align: center;
}

/* ===== Scene 06 ===== */
#scene-06 { z-index: 11; background: radial-gradient(ellipse at 50% 45%, #0d1020 0%, #050710 70%, #020205 100%); }
.array-display { display: flex; gap: clamp(20px, 5vw, 50px); align-items: center; justify-content: center; margin-bottom: 50px; }
.array-card-slot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.array-label { font-size: clamp(12px, 2.5vw, 16px); color: #f5d76e; letter-spacing: 0.25em; text-shadow: 0 0 14px rgba(245, 215, 110, 0.80); }
.array-card {
  width: clamp(70px, 16vw, 100px);
  height: clamp(112px, 25.6vw, 160px);
  border-radius: 8px;
  border: 1.5px solid rgba(201, 153, 58, 0.62);
  box-shadow: 0 0 22px rgba(201, 153, 58, 0.30), 0 0 6px rgba(110, 67, 14, 0.4);
  animation: cardShake 1.5s ease-in-out infinite;
  overflow: hidden;
}
.confirm-btn {
  width: 90px; height: 90px;
  cursor: pointer;
  animation: float 2.5s ease-in-out infinite, glowPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(201, 153, 58, 0.55));
  transition: transform 0.2s ease;
}
.confirm-btn:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 28px rgba(245, 215, 110, 0.95)) drop-shadow(0 0 10px rgba(201, 153, 58, 0.7));
}

/* ===== Scene 07 ===== */
#scene-07 { z-index: 12; background: radial-gradient(ellipse at 50% 50%, #1c1000 0%, #0e0800 55%, #040200 100%); overflow: hidden; }
.light-belt { position: absolute; inset: 0; pointer-events: none; }
.activation-array {
  display: flex;
  gap: clamp(24px, 6vw, 56px);
  position: relative;
  z-index: 5;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  width: 100%;
}
#activation-text {
  font-size: clamp(22px, 6vw, 42px) !important;
  letter-spacing: 0.5em !important;
  font-style: italic;
  text-shadow: 0 0 30px rgba(245,215,110,0.95), 0 0 60px rgba(201,153,58,0.55), 0 2px 0 rgba(80,40,0,0.90), 0 -1px 0 rgba(255,235,140,0.35) !important;
  margin-bottom: 36px !important;
  position: relative;
}
#activation-text::after {
  content: '';
  display: block;
  width: 80%;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, rgba(245,215,110,0.60), transparent);
}
.destiny-wheel-svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 130vw);
  height: min(500px, 130vw);
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
  animation: wheelSpinSlow 20s linear infinite;
}
@keyframes wheelSpinSlow {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
.activation-card-wrap { width: clamp(80px, 18vw, 120px); height: clamp(128px, 28.8vw, 192px); position: relative; cursor: default; }
.activation-card-inner {
  width: 100%; height: 100%;
  position: relative;
  border-radius: 8px;
  animation: cardSpinFlat 4s ease-in-out infinite;
  border: 1.5px solid rgba(201,153,58,0.55);
  box-shadow: 0 0 20px rgba(201,153,58,0.25), 0 8px 28px rgba(0,0,0,0.75), inset 0 1px 0 rgba(245,215,110,0.15);
  overflow: hidden;
}
.activation-card-col:nth-child(1) .activation-card-inner { animation-delay: 0s; }
.activation-card-col:nth-child(2) .activation-card-inner { animation-delay: -1.4s; }
.activation-card-col:nth-child(3) .activation-card-inner { animation-delay: -2.8s; }
@keyframes cardSpinFlat {
  0%   { transform: rotateZ(0deg)   scale(1); }
  20%  { transform: rotateZ(6deg)   scale(1.04); }
  50%  { transform: rotateZ(0deg)   scale(1); }
  70%  { transform: rotateZ(-6deg)  scale(1.04); }
  90%  { transform: rotateZ(0deg)   scale(1.05) translateY(-5px); }
  100% { transform: rotateZ(0deg)   scale(1); }
}
.activation-card-inner::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 0 24px rgba(245,215,110,0.40), 0 0 8px rgba(201,153,58,0.30);
  animation: cardAuraFlicker 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardAuraFlicker {
  0%,100% { opacity: 0.6; box-shadow: 0 0 20px rgba(245,215,110,0.35), 0 0 8px rgba(201,153,58,0.25); }
  50%      { opacity: 1;   box-shadow: 0 0 40px rgba(245,215,110,0.70), 0 0 16px rgba(201,153,58,0.55); }
}
.activation-card-label {
  font-size: clamp(14px, 3.2vw, 20px) !important;
  color: #f5d76e !important;
  letter-spacing: 0.35em;
  text-shadow: 0 0 14px rgba(245,215,110,0.80), 0 1px 0 rgba(80,40,0,0.85);
  margin-bottom: 10px;
}
@keyframes cardFlyIn {
  0%   { opacity: 0; transform: translateY(-80px) rotateY(90deg) scale(0.6); filter: brightness(0.3); }
  50%  { opacity: 1; transform: translateY(8px)   rotateY(0deg)  scale(1.08); filter: brightness(1.2); }
  100% { opacity: 1; transform: translateY(0)     rotateY(0deg)  scale(1);    filter: brightness(1.0); }
}
.activation-card-col.fly-in { animation: cardFlyIn 0.7s cubic-bezier(0.22,1,0.36,1) forwards; }
.activation-card-col:nth-child(1).fly-in { animation-delay: 0.0s; }
.activation-card-col:nth-child(2).fly-in { animation-delay: 0.15s; }
.activation-card-col:nth-child(3).fly-in { animation-delay: 0.3s; }
.activation-card-col { display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; }
.activation-card-col.visible { opacity: 1; }
.wheel-orbit-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(201,153,58,0.20);
  pointer-events: none;
  z-index: 2;
  animation: orbitRingExpand 3s ease-out infinite;
}
@keyframes orbitRingExpand {
  0%   { opacity: 0.8; transform: translate(-50%,-50%) scale(0.5); }
  100% { opacity: 0;   transform: translate(-50%,-50%) scale(2.5); }
}
.wheel-progress-text {
  position: absolute;
  bottom: clamp(20px, 5vh, 40px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(201,153,58,0.60);
  font-size: clamp(11px, 2.2vw, 15px);
  letter-spacing: 0.45em;
  text-align: center;
  white-space: nowrap;
  z-index: 10;
  animation: progressBlink 1.8s ease-in-out infinite;
}
@keyframes progressBlink { 0%,100% { opacity: 0.45; } 50% { opacity: 0.90; } }

/* ===== 解牌页 ===== */
#scene-reading {
  z-index: 15;
  background: radial-gradient(ellipse at 50% 40%, #1c1200 0%, #0e0900 55%, #040200 100%);
  justify-content: flex-start;
  overflow-y: auto;
  padding: 20px 0 40px;
}
.reading-pos-indicator { font-size: clamp(11px, 2vw, 14px); color: rgba(201, 153, 58, 0.65); letter-spacing: 0.3em; text-transform: uppercase; margin-top: 20px; opacity: 0; }
.reading-card-name { font-size: clamp(28px, 8vw, 56px); color: #f5d76e; letter-spacing: 0.12em; text-align: center; text-shadow: 0 0 28px rgba(245, 215, 110, 0.82), 0 0 55px rgba(201, 153, 58, 0.32); line-height: 1.2; padding: 0 20px; opacity: 0; font-style: italic; }
.reading-card-name-cn { font-size: clamp(20px, 5vw, 36px); color: rgba(201, 153, 58, 0.82); letter-spacing: 0.2em; margin-top: 6px; opacity: 0; }
.reading-card-image {
  width: min(180px, 46vw);
  height: auto;
  min-height: min(270px, 69vw);
  border-radius: 10px;
  margin: 16px auto;
  display: block;
  opacity: 0;
  position: relative;
  box-shadow: 0 0 32px rgba(201, 153, 58, 0.42), 0 0 10px rgba(110, 67, 14, 0.55);
  border: 1.5px solid rgba(201, 153, 58, 0.52);
  perspective: 800px;
}
.reading-card-image svg { width: 100%; height: 100%; border-radius: 8px; display: block; }
.reading-card-image.revealed { animation: cardGlow 2.5s ease-in-out infinite; }
.reading-text-box {
  width: min(90vw, 480px);
  background: rgba(10, 6, 0, 0.80);
  border: 1px solid rgba(201, 153, 58, 0.22);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 0 auto 20px;
}
.reading-text-para { color: rgba(255, 255, 255, 0.88); font-size: clamp(13px, 2.5vw, 15px); line-height: 1.9; letter-spacing: 0.06em; opacity: 1; text-align: justify; }
.char-span { display: inline; opacity: 0; animation: charFadeIn 0.12s ease forwards; }
@keyframes charFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.reading-nav-hint { color: rgba(201, 153, 58, 0.55); font-size: clamp(11px, 2vw, 13px); letter-spacing: 0.2em; margin-top: 10px; opacity: 0; animation: blink 2s ease-in-out infinite; }
.restart-btn {
  width: 90px; height: 90px;
  cursor: pointer;
  animation: float 2.5s ease-in-out infinite, glowPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(201, 153, 58, 0.55));
  transition: transform 0.2s ease;
  opacity: 0;
  margin: 10px auto 20px;
  display: block;
}
.restart-btn:hover { transform: scale(1.1); filter: drop-shadow(0 0 28px rgba(245, 215, 110, 0.95)) drop-shadow(0 0 10px rgba(201, 153, 58, 0.7)); }

/* ===== 进度指示器 ===== */
.progress-dots { display: flex; gap: 8px; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; opacity: 0; transition: opacity 0.3s; }
.progress-dots.visible { opacity: 1; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(201, 153, 58, 0.28); transition: all 0.4s ease; }
.dot.past, .dot.now, .dot.future { background: rgba(201, 153, 58, 0.90); box-shadow: 0 0 7px rgba(245, 215, 110, 0.65); }
.dot.unlocked { cursor: pointer; }
.dot.active {
  width: 18px;
  border-radius: 999px;
  background: #f5d76e !important;
  box-shadow: 0 0 16px rgba(245,215,110,0.90), 0 0 7px rgba(201,153,58,0.75) !important;
}

/* ===== 关键帧动画 ===== */
@keyframes breathe { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes rotateGlow { from { opacity: 0.80; } to { opacity: 1.00; } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }
@keyframes cardFloat { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-5px); } }
@keyframes holderPulse { 0%, 100% { border-color: rgba(201, 153, 58, 0.28); } 50% { border-color: rgba(201, 153, 58, 0.72); } }
@keyframes shimmer { 0% { transform: translateX(-100%) rotate(45deg); } 100% { transform: translateX(200%) rotate(45deg); } }
@keyframes cardShake { 0%, 100% { transform: translateX(0) rotate(0deg); } 25% { transform: translateX(-2px) rotate(-0.5deg); } 75% { transform: translateX(2px) rotate(0.5deg); } }
@keyframes glowPulse { 0%, 100% { opacity: 0.80; } 50% { opacity: 1.00; } }
@keyframes cardGlow { 0%, 100% { opacity: 0.90; } 50% { opacity: 1.00; } }
@keyframes blink { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes starTwinkle { 0%, 100% { opacity: 0.3; r: 1; } 50% { opacity: 1; r: 1.8; } }
@keyframes orbitStar { from { transform: rotate(0deg) translateX(120px) rotate(0deg); } to { transform: rotate(360deg) translateX(120px) rotate(-360deg); } }
@keyframes goldSweep { 0% { transform: translateX(-110%); opacity: 0; } 10% { opacity: 0.5; } 90% { opacity: 0.5; } 100% { transform: translateX(110%); opacity: 0; } }

/* ===== 全局遮罩 ===== */
.overlay-msg { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 200; background: rgba(0,0,0,0.85); pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.overlay-msg.visible { opacity: 1; pointer-events: all; }
.overlay-text { color: #f5d76e; font-size: clamp(16px, 4vw, 24px); letter-spacing: 0.3em; text-align: center; text-shadow: 0 0 18px rgba(245, 215, 110, 0.82), 0 0 40px rgba(201, 153, 58, 0.40); animation: breathe 1.5s ease-in-out infinite; padding: 0 30px; }

.poster-preview {
  position: fixed;
  inset: 0;
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.poster-preview.visible {
  opacity: 1;
  pointer-events: all;
}
.poster-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,1,0,0.88);
  backdrop-filter: blur(8px);
}
.poster-preview-panel {
  position: relative;
  z-index: 1;
  width: min(88vw, 360px);
  max-height: 88vh;
  margin: 6vh auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(201,153,58,0.34);
  background: linear-gradient(160deg, rgba(18,10,0,0.92), rgba(6,3,0,0.88));
  box-shadow: 0 18px 60px rgba(0,0,0,0.82), inset 0 1px 0 rgba(245,215,110,0.12);
}
.poster-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(201,153,58,0.12);
  color: #f5d76e;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.poster-preview-title {
  color: #f5d76e;
  font-size: 15px;
  letter-spacing: 0.22em;
  margin-right: 20px;
}
#poster-preview-img {
  width: min(70vw, 260px);
  max-height: 62vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(201,153,58,0.28);
  box-shadow: 0 8px 28px rgba(0,0,0,0.70);
}
.poster-download-link {
  text-decoration: none;
  text-align: center;
}

/* ===== 神秘音乐开关 ===== */
.music-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 54px;
  height: 54px;
  z-index: 7500;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(201,153,58,0.36);
  border-top-color: rgba(245,215,110,0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,246,210,0.12), transparent 28%),
    radial-gradient(circle at 50% 72%, rgba(80,140,220,0.14), transparent 48%),
    linear-gradient(150deg, rgba(12,8,30,0.82), rgba(7,3,16,0.70));
  box-shadow: 0 8px 24px rgba(0,0,0,0.56), 0 0 16px rgba(201,153,58,0.18), inset 0 1px 0 rgba(255,244,205,0.12);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}
.music-toggle:hover,
.music-toggle:active {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(245,215,110,0.76);
  box-shadow: 0 10px 28px rgba(0,0,0,0.66), 0 0 24px rgba(245,215,110,0.28), inset 0 1px 0 rgba(255,244,205,0.18);
}
.music-toggle.is-on {
  border-color: rgba(245,215,110,0.86);
  filter: brightness(1.12) saturate(1.16);
  box-shadow: 0 10px 30px rgba(0,0,0,0.70), 0 0 30px rgba(245,215,110,0.34), 0 0 12px rgba(80,140,220,0.22), inset 0 0 18px rgba(245,215,110,0.10);
}
.music-toggle.is-deep {
  box-shadow: 0 10px 30px rgba(0,0,0,0.72), 0 0 34px rgba(245,215,110,0.40), 0 0 22px rgba(112,178,255,0.28), inset 0 0 20px rgba(245,215,110,0.13);
}
.music-toggle-glow {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,215,110,0.18), rgba(80,140,220,0.06) 42%, transparent 68%);
  opacity: 0.58;
  animation: musicGlowBreathe 3.2s ease-in-out infinite;
}
.music-toggle.is-on .music-toggle-glow {
  opacity: 0.95;
  animation-duration: 2.2s;
}
.music-toggle.is-deep .music-toggle-glow {
  background: radial-gradient(circle, rgba(255,238,168,0.26), rgba(112,178,255,0.13) 44%, transparent 70%);
  animation-duration: 1.7s;
}
.music-wave {
  position: relative;
  width: 36px;
  height: 24px;
  display: block;
  overflow: hidden;
  filter: drop-shadow(0 0 7px rgba(245,215,110,0.46));
}
.music-sine {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.music-sine path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.music-sine-shadow {
  stroke: rgba(80,140,220,0.22);
  stroke-width: 5;
  stroke-dasharray: 28 92;
  stroke-dashoffset: 0;
  opacity: 0.62;
  animation: musicSineFlow 2.65s linear infinite;
}
.music-sine-line {
  stroke: rgba(245,215,110,0.86);
  stroke-width: 2.3;
  stroke-dasharray: 28 92;
  stroke-dashoffset: 0;
  opacity: 0.94;
  animation: musicSineFlow 2.65s linear infinite;
}
.music-toggle.is-on .music-sine-shadow {
  stroke: rgba(112,178,255,0.38);
  stroke-dasharray: 36 82;
  animation-duration: 1.55s;
}
.music-toggle.is-on .music-sine-line {
  stroke: rgba(255,238,168,0.98);
  stroke-dasharray: 36 82;
  animation-duration: 1.55s;
}
.music-toggle.is-deep .music-sine-shadow,
.music-toggle.is-deep .music-sine-line {
  stroke-dasharray: 44 74;
  animation-duration: 1.25s;
}
@keyframes musicSineFlow {
  from { stroke-dashoffset: 70; }
  to { stroke-dashoffset: -50; }
}
@keyframes musicGlowBreathe {
  0%, 100% { transform: scale(0.88); opacity: 0.50; }
  50% { transform: scale(1.08); opacity: 0.92; }
}

/* ===== 加载画面 ===== */
#loading-screen { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 42%, #0e0b26 0%, #04030e 60%, #010007 100%); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; overflow: hidden; }
.loading-mandala { width: min(220px, 55vw); height: min(220px, 55vw); margin-bottom: 18px; filter: drop-shadow(0 0 22px rgba(201,153,58,0.45)); }
@keyframes lgSpinCW  { from { transform-origin: 110px 110px; transform: rotate(0deg);    } to { transform-origin: 110px 110px; transform: rotate(360deg);  } }
@keyframes lgSpinCCW { from { transform-origin: 110px 110px; transform: rotate(0deg);    } to { transform-origin: 110px 110px; transform: rotate(-360deg); } }
@keyframes lgPulse   { 0%,100%{opacity:0.55} 50%{opacity:1.0} }
.lg-spin-cw  { animation: lgSpinCW  6s linear infinite; }
.lg-spin-ccw { animation: lgSpinCCW 9s linear infinite; }
.lg-pulse    { animation: lgPulse   2.4s ease-in-out infinite; }
.loading-runes { display: flex; gap: 12px; margin-bottom: 16px; }
@keyframes runeAppear { 0% { opacity: 0; transform: translateY(6px) scale(0.7); } 30% { opacity: 1; transform: translateY(0) scale(1.1); } 70% { opacity: 1; transform: translateY(0) scale(1.0); } 100% { opacity: 0.45; transform: translateY(-3px) scale(0.9); } }
.rune { color: #c9993a; font-size: 18px; opacity: 0; animation: runeAppear 1.6s ease-in-out infinite; text-shadow: 0 0 12px rgba(245,215,110,0.65); }
.loading-text { color: rgba(201,153,58,0.88); font-size: 14px; letter-spacing: 0.38em; text-shadow: 0 0 18px rgba(245,215,110,0.45); margin-bottom: 6px; }
.loading-sub { display: flex; gap: 4px; }
@keyframes ldotBlink { 0%,80%,100% { opacity: 0.2; transform: translateY(0); } 40% { opacity: 1.0; transform: translateY(-4px); } }
.ldot { color: #c9993a; font-size: 22px; line-height: 1; animation: ldotBlink 1.2s ease-in-out infinite; text-shadow: 0 0 8px rgba(201,153,58,0.70); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 0; }
#scene-reading { scrollbar-width: none; }

/* ===== 响应式 ===== */
@media (orientation: landscape) and (max-height: 500px) {
  .tarot-circle { width: min(180px, 40vh); height: min(180px, 40vh); }
  .reading-card-image { width: min(120px, 30vh); height: auto; min-height: min(180px, 45vh); }
}

/* ============================================================
   ✦ 质感升级层
   ============================================================ */
#bg-canvas::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; background-image: radial-gradient(ellipse at 20% 25%, rgba(74,45,110,0.06) 0%, transparent 55%), radial-gradient(ellipse at 80% 70%, rgba(22,43,72,0.05) 0%, transparent 55%); }
#app { position: relative; }
.tarot-card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,153,58,0.15), inset 0 1px 0 rgba(245,215,110,0.10);
  background-image: repeating-linear-gradient(118deg, transparent 0px, transparent 4px, rgba(201,153,58,0.025) 4px, rgba(201,153,58,0.025) 5px);
}
.tarot-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.85), 0 0 0 1px rgba(245,215,110,0.35), 0 0 20px rgba(201,153,58,0.30), inset 0 1px 0 rgba(245,215,110,0.18) !important; }
.pos-holder {
  outline: 1px solid rgba(110,67,14,0.35);
  outline-offset: 2px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.65), inset 0 0 12px rgba(201,153,58,0.06), inset 0 1px 0 rgba(245,215,110,0.08);
  background-image: repeating-linear-gradient(45deg, transparent 0px, transparent 6px, rgba(201,153,58,0.018) 6px, rgba(201,153,58,0.018) 7px);
}
.pos-holder.filled { outline-color: rgba(201,153,58,0.45); box-shadow: 0 3px 14px rgba(0,0,0,0.70), 0 0 18px rgba(201,153,58,0.28), inset 0 0 16px rgba(201,153,58,0.08), inset 0 1px 0 rgba(245,215,110,0.14); }
.start-btn, .confirm-btn, .restart-btn { filter: drop-shadow(0 4px 12px rgba(0,0,0,0.80)) drop-shadow(0 0 14px rgba(201,153,58,0.45)) drop-shadow(0 1px 0 rgba(245,215,110,0.25)); }
.start-btn:hover, .start-btn:active { filter: drop-shadow(0 6px 20px rgba(0,0,0,0.90)) drop-shadow(0 0 30px rgba(245,215,110,0.95)) drop-shadow(0 0 12px rgba(201,153,58,0.70)) drop-shadow(0 -1px 0 rgba(245,215,110,0.40)) !important; }
.confirm-btn:hover, .restart-btn:hover { filter: drop-shadow(0 6px 20px rgba(0,0,0,0.90)) drop-shadow(0 0 30px rgba(245,215,110,0.95)) drop-shadow(0 0 12px rgba(201,153,58,0.70)) drop-shadow(0 -1px 0 rgba(245,215,110,0.40)); }
.start-btn:active, .confirm-btn:active, .restart-btn:active { transform: scale(0.96) translateY(2px) !important; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.90)) drop-shadow(0 0 10px rgba(201,153,58,0.55)) !important; }
.btn-wrapper:hover .star-ring { box-shadow: 0 0 28px rgba(201,153,58,0.42), 0 0 8px rgba(245,215,110,0.30), inset 0 0 24px rgba(201,153,58,0.14), inset 0 0 6px rgba(245,215,110,0.08) !important; }
.tarot-circle { filter: drop-shadow(0 0 28px rgba(201,153,58,0.55)) drop-shadow(0 0 10px rgba(245,215,110,0.30)) drop-shadow(0 4px 16px rgba(0,0,0,0.60)); }
.cards-title { text-shadow: 0 0 18px rgba(245,215,110,0.75), 0 0 40px rgba(201,153,58,0.35), 0 1px 0 rgba(110,67,14,0.80), 0 -1px 0 rgba(245,215,110,0.30), 0 0 2px rgba(245,215,110,0.60); }
.reading-card-name { text-shadow: 0 0 28px rgba(245,215,110,0.82), 0 0 55px rgba(201,153,58,0.32), 0 2px 0 rgba(80,40,0,0.90), 0 -1px 0 rgba(255,235,140,0.35), 1px 0 0 rgba(110,67,14,0.40), -1px 0 0 rgba(110,67,14,0.40); }
.array-label { text-shadow: 0 0 14px rgba(245,215,110,0.80), 0 1px 0 rgba(80,40,0,0.85), 0 -1px 0 rgba(255,235,140,0.28); }
.array-card { box-shadow: 0 0 22px rgba(201,153,58,0.30), 0 0 6px rgba(110,67,14,0.40), 0 4px 16px rgba(0,0,0,0.75), inset 0 0 0 1px rgba(245,215,110,0.12), inset 0 1px 0 rgba(245,215,110,0.18); background-image: repeating-linear-gradient(118deg, transparent 0px, transparent 3px, rgba(201,153,58,0.025) 3px, rgba(201,153,58,0.025) 4px); }
.reading-card-image { box-shadow: 0 0 32px rgba(201,153,58,0.42), 0 0 10px rgba(110,67,14,0.55), 0 8px 32px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(245,215,110,0.14), inset 0 1px 0 rgba(245,215,110,0.20); background-image: repeating-linear-gradient(105deg, transparent 0px, transparent 4px, rgba(201,153,58,0.022) 4px, rgba(201,153,58,0.022) 5px); }
.reading-card-image.revealed { box-shadow: 0 0 40px rgba(201,153,58,0.55), 0 0 16px rgba(245,215,110,0.28), 0 8px 36px rgba(0,0,0,0.88), inset 0 0 0 1px rgba(245,215,110,0.20), inset 0 1px 0 rgba(245,215,110,0.25); }
.reading-text-box { background: linear-gradient(180deg, rgba(16,9,0,0.72) 0%, rgba(8,4,0,0.65) 100%); border: 1px solid rgba(201,153,58,0.22); border-top: 1px solid rgba(245,215,110,0.28); box-shadow: 0 4px 20px rgba(0,0,0,0.70), inset 0 1px 0 rgba(245,215,110,0.10), inset 0 0 24px rgba(201,153,58,0.04); background-image: linear-gradient(180deg, rgba(16,9,0,0.72) 0%, rgba(8,4,0,0.65) 100%), repeating-linear-gradient(0deg, transparent 0px, transparent 18px, rgba(201,153,58,0.018) 18px, rgba(201,153,58,0.018) 19px); }
.particle { box-shadow: 0 0 6px 2px rgba(245,215,110,0.55); }
.particle.p-purple { background: rgba(140,90,200,0.90) !important; box-shadow: 0 0 6px 2px rgba(140,90,200,0.45); }
.particle.p-blue   { background: rgba(80,140,220,0.85) !important;  box-shadow: 0 0 6px 2px rgba(80,140,220,0.40); }
.particle.p-white  { background: rgba(255,245,200,0.95) !important; box-shadow: 0 0 8px 3px rgba(255,245,200,0.60); }
.dot { box-shadow: 0 1px 3px rgba(0,0,0,0.60), inset 0 1px 0 rgba(245,215,110,0.15); }
.dot.past, .dot.now, .dot.future { box-shadow: 0 0 8px rgba(245,215,110,0.65), 0 0 3px rgba(201,153,58,0.80), inset 0 1px 0 rgba(255,235,150,0.30); }
.loading-circle { border: 2px solid rgba(110,67,14,0.30); border-top-color: #f5d76e; box-shadow: 0 0 16px rgba(201,153,58,0.30), inset 0 0 8px rgba(201,153,58,0.10); }
.overlay-msg { background: rgba(4,2,0,0.88); }
.pos-label { text-shadow: 0 0 10px rgba(201,153,58,0.55), 0 1px 0 rgba(60,30,0,0.80), 0 -1px 0 rgba(245,215,110,0.20); letter-spacing: 0.25em; }
.cards-subtitle { text-shadow: 0 0 12px rgba(201,153,58,0.38), 0 1px 0 rgba(40,20,0,0.60); }
.reading-card-name-cn { text-shadow: 0 1px 0 rgba(60,30,0,0.85), 0 -1px 0 rgba(245,215,110,0.20), 0 0 16px rgba(201,153,58,0.40); }

#scene-intent {
  z-index: 12;
  padding: 24px 18px;
}
.intent-shell {
  width: min(92vw, 520px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 4;
}
.intent-rune-line {
  color: rgba(201,153,58,0.68);
  font-size: 16px;
  letter-spacing: 0.5em;
  margin-bottom: 12px;
  text-shadow: 0 0 14px rgba(245,215,110,0.55);
}
.intent-kicker {
  color: rgba(201,153,58,0.62);
  font-size: clamp(10px, 2.1vw, 13px);
  letter-spacing: 0.42em;
  margin-bottom: 8px;
}
.intent-title {
  color: #f5d76e;
  font-size: clamp(28px, 8vw, 52px);
  line-height: 1.18;
  font-weight: normal;
  font-style: italic;
  margin: 0;
  letter-spacing: 0.18em;
  text-shadow: 0 0 30px rgba(245,215,110,0.82), 0 0 58px rgba(201,153,58,0.34);
}
.intent-copy {
  color: rgba(255,255,255,0.72);
  font-size: clamp(13px, 2.7vw, 15px);
  line-height: 1.8;
  letter-spacing: 0.05em;
  margin: 16px auto 18px;
  max-width: 430px;
}
.intent-field {
  width: 100%;
  position: relative;
  border: 1px solid rgba(201,153,58,0.34);
  border-top-color: rgba(245,215,110,0.45);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(18,10,0,0.82), rgba(8,4,0,0.64));
  box-shadow: 0 8px 34px rgba(0,0,0,0.68), inset 0 1px 0 rgba(245,215,110,0.12);
  padding: 16px 16px 30px;
}
.intent-field textarea {
  width: 100%;
  min-height: 92px;
  border: 0;
  resize: none;
  outline: none;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0.04em;
  font-family: inherit;
}
.intent-field textarea::placeholder {
  color: rgba(201,153,58,0.48);
}
.intent-count {
  position: absolute;
  right: 14px;
  bottom: 8px;
  color: rgba(201,153,58,0.56);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.signature-panel {
  width: 100%;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid rgba(201,153,58,0.20);
  border-radius: 12px;
  background:
    radial-gradient(circle at 14% 18%, rgba(80,140,220,0.16), transparent 34%),
    radial-gradient(circle at 90% 20%, rgba(245,215,110,0.12), transparent 28%),
    linear-gradient(160deg, rgba(12,8,28,0.54), rgba(8,4,0,0.46));
  box-shadow: inset 0 1px 0 rgba(245,215,110,0.08), 0 10px 28px rgba(0,0,0,0.34);
}
.signature-kicker {
  color: rgba(201,153,58,0.66);
  font-size: 10px;
  letter-spacing: 0.34em;
  margin-bottom: 10px;
}
.signature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.signature-card {
  min-width: 0;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(201,153,58,0.26);
  border-radius: 8px;
  color: rgba(255,244,204,0.78);
  background: rgba(4,2,12,0.44);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.signature-card.active,
.signature-card:hover {
  border-color: rgba(245,215,110,0.72);
  background: rgba(18,10,28,0.68);
  box-shadow: 0 0 18px rgba(201,153,58,0.18), inset 0 0 18px rgba(245,215,110,0.06);
  transform: translateY(-2px);
}
.signature-orb {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 50%;
  border: 1px solid rgba(255,244,204,0.42);
  box-shadow: 0 0 14px rgba(245,215,110,0.22);
}
.signature-orb--moon {
  background: radial-gradient(circle at 35% 28%, #fff8d4 0%, #9bc4ff 38%, #32245c 78%);
}
.signature-orb--spark {
  background: radial-gradient(circle at 35% 28%, #fff1a0 0%, #e58b34 42%, #5a1626 82%);
}
.signature-orb--tide {
  background: radial-gradient(circle at 36% 30%, #d9fff7 0%, #3a98c9 44%, #102544 82%);
}
.signature-orb--dawn {
  background: radial-gradient(circle at 38% 28%, #fff4b6 0%, #e7b55f 36%, #7d3e72 82%);
}
.signature-name {
  color: #f5d76e;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-shadow: 0 0 12px rgba(245,215,110,0.35);
}
.signature-copy {
  color: rgba(255,255,255,0.58);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.04em;
}
.signature-note {
  min-height: 20px;
  color: rgba(255,255,255,0.70);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  margin-top: 10px;
}
.intent-start-btn {
  min-width: 172px;
}

/* ============================================================
   ✦ 解牌三层结构 + 整组总结
   ============================================================ */
.reading-text-core { color: #f5d76e; font-size: clamp(14px, 3vw, 17px); line-height: 1.75; letter-spacing: 0.08em; font-style: italic; text-align: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(201,153,58,0.20); text-shadow: 0 0 16px rgba(245,215,110,0.45); opacity: 1; }
.reading-advice-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(201,153,58,0.18); }
.reading-advice-label { color: rgba(201,153,58,0.80); font-size: clamp(10px, 2vw, 12px); letter-spacing: 0.45em; margin-bottom: 8px; text-shadow: 0 0 10px rgba(201,153,58,0.40); }
.reading-advice-text { color: rgba(255,255,255,0.72); font-size: clamp(12px, 2.4vw, 14px); line-height: 1.85; letter-spacing: 0.06em; text-indent: 2em; opacity: 1; }
.reading-summary-box { width: min(92vw, 500px); margin: 16px auto 20px; background: linear-gradient(160deg, rgba(20,11,0,0.82) 0%, rgba(10,5,0,0.70) 100%); border: 1px solid rgba(201,153,58,0.28); border-top: 1px solid rgba(245,215,110,0.35); border-radius: 12px; padding: 20px 24px 22px; position: relative; box-shadow: 0 4px 24px rgba(0,0,0,0.70), inset 0 1px 0 rgba(245,215,110,0.10); }
.reading-summary-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.reading-summary-title span { color: #f5d76e; font-size: clamp(11px, 2.2vw, 13px); letter-spacing: 0.50em; white-space: nowrap; text-shadow: 0 0 14px rgba(245,215,110,0.70); }
.reading-summary-title .div-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,153,58,0.50)); }
.reading-summary-title .div-line:last-child { background: linear-gradient(270deg, transparent, rgba(201,153,58,0.50)); }
.reading-summary-text { color: rgba(255,255,255,0.82); font-size: clamp(13px, 2.5vw, 15px); line-height: 2.0; letter-spacing: 0.06em; text-indent: 2em; opacity: 1; }

/* ============================================================
   ✦ 视觉层次优化层
   ============================================================ */
#bg-canvas { z-index: 0; }
#scene-01 { z-index: 10; }
#scene-02 { z-index: 9; }
#scene-06 { z-index: 11; }
#scene-07 { z-index: 12; }
#scene-reading { z-index: 15; }
.tarot-circle { z-index: 4; position: relative; }
.tarot-card { z-index: 3; }
.tarot-card:hover { z-index: 20; }
.reading-card-image { z-index: 4; }
.particle { z-index: 500 !important; position: fixed !important; }
.progress-dots { z-index: 300; }
.overlay-msg { z-index: 400; }
#loading-screen { z-index: 9999; }
.tarot-circle, .start-btn, .confirm-btn, .restart-btn { will-change: transform, opacity; }
.tarot-card { will-change: transform, opacity; }
.reading-card-image { will-change: opacity; }

.low-perf-mode #bg-canvas .star,
.low-perf-mode #bg-canvas circle[style*="starTwinkle"] {
  animation: none !important;
}

.low-perf-mode .loading-mandala,
.low-perf-mode .tarot-circle,
.low-perf-mode .destiny-wheel-svg,
.low-perf-mode .music-toggle,
.low-perf-mode .reading-card-image.revealed,
.low-perf-mode .wheel-orbit-ring {
  animation: none !important;
}

.low-perf-mode .tarot-circle,
.low-perf-mode .start-btn,
.low-perf-mode .confirm-btn,
.low-perf-mode .restart-btn,
.low-perf-mode .music-toggle,
.low-perf-mode .music-toggle-glow,
.low-perf-mode .music-sine-shadow,
.low-perf-mode .music-sine-line,
.low-perf-mode .reading-card-image,
.low-perf-mode .destiny-card-frame,
.low-perf-mode .destiny-text-area,
.low-perf-mode .reading-text-box,
.low-perf-mode .reading-summary-box,
.low-perf-mode .array-card,
.low-perf-mode .pos-holder.filled,
.low-perf-mode .particle,
.low-perf-mode .card-pulse-ring {
  box-shadow: none !important;
  filter: none !important;
}

.low-perf-mode .card-aura-bg,
.low-perf-mode .destiny-wheel-svg {
  opacity: 0.05 !important;
}

.low-perf-mode .star,
.low-perf-mode circle[style*="starTwinkle"] {
  animation: none !important;
}

.low-perf-mode .wheel-orbit-ring {
  opacity: 0.12 !important;
}

.reduced-motion * {
  scroll-behavior: auto !important;
}

.tarot-circle { width: min(300px, 72vw); height: min(300px, 72vw); margin-bottom: 0; }
.btn-wrapper { margin-top: 44px !important; }
.star-ring { width: 140px; height: 140px; }
.start-card { width: clamp(72px, 18vw, 92px) !important; height: clamp(115px, 28.8vw, 147px) !important; }
#scene-02 { padding-top: 16px; gap: 0; }
.cards-title { font-size: clamp(17px, 4.5vw, 26px); margin-bottom: 8px; }
.cards-subtitle { font-size: clamp(13px, 2.8vw, 17px); margin-bottom: 16px; }
.positions-bar { margin-bottom: 16px; gap: clamp(18px, 5vw, 48px); padding: 0 20px; }
.pos-slot { gap: 9px; }
.pos-label { font-size: clamp(13px, 3.2vw, 17px); }
.pos-holder { width: clamp(70px, 16vw, 90px); height: clamp(105px, 24vw, 135px); border-radius: 8px; }
.cards-scroll-wrapper { padding: 28px 0 18px; }
.cards-track { gap: clamp(12px, 3vw, 20px); padding: 0 clamp(16px, 5vw, 30px) 10px; }
.tarot-card { width: clamp(82px, 18vw, 108px); height: clamp(123px, 27vw, 162px); border-radius: 8px; }
.card-back-svg { border-radius: 8px; }
#confirm-area {
  --crystal-fill: 0%;
  --crystal-opacity: 0.36;
  --crystal-glow: 8px;
  --crystal-glow-alpha: 0.16;
  --crystal-saturate: 0.72;
  --crystal-brightness: 0.72;
  --crystal-aura-opacity: 0.18;
  --crystal-aura-glow: 12px;
  --crystal-aura-alpha: 0.10;
  --crystal-inset-glow: 10px;
  --crystal-inset-alpha: 0.10;
  --crystal-ground-alpha: 0.08;
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 90;
  width: 100%;
  margin-top: auto !important;
  padding: 8px 0 2px;
  gap: 0 !important;
  opacity: 1 !important;
  pointer-events: none;
}
#confirm-area > div { display: none !important; }
.confirm-btn { width: 108px !important; height: 108px !important; }
#confirm-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: default;
  opacity: var(--crystal-opacity);
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: visible;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
  transform-origin: center;
  filter:
    drop-shadow(0 5px 12px rgba(0,0,0,0.78))
    drop-shadow(0 0 var(--crystal-glow) rgba(245,215,110,var(--crystal-glow-alpha)))
    saturate(var(--crystal-saturate))
    brightness(var(--crystal-brightness));
  transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.crystal-ball-core {
  position: relative;
  z-index: 3;
  width: 82px;
  height: 82px;
  display: block;
  border-radius: 50%;
  border: 1px solid rgba(222,242,255,0.58);
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.62) 8%, transparent 18%),
    radial-gradient(circle at 38% 31%, rgba(206,238,255,0.58) 0%, rgba(206,238,255,0.14) 28%, transparent 46%),
    linear-gradient(to top, rgba(247,219,124,0.34) 0%, rgba(247,219,124,0.22) var(--crystal-fill), transparent var(--crystal-fill), transparent 100%),
    radial-gradient(circle at 58% 72%, rgba(245,215,110,0.32) 0%, rgba(201,153,58,0.13) 22%, transparent 46%),
    radial-gradient(circle at 50% 50%, rgba(120,206,255,0.24) 0%, rgba(80,74,160,0.20) 45%, rgba(8,5,28,0.40) 100%),
    linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04) 38%, rgba(8,5,28,0.38) 100%);
  box-shadow:
    inset -14px -18px 28px rgba(5,3,20,0.46),
    inset 11px 12px 26px rgba(255,255,255,0.17),
    inset 0 0 var(--crystal-inset-glow) rgba(190,226,255,var(--crystal-inset-alpha)),
    0 12px 24px rgba(0,0,0,0.50),
    0 0 var(--crystal-aura-glow) rgba(245,215,110,var(--crystal-aura-alpha));
  transition: box-shadow 0.45s ease, background 0.45s ease;
  animation: crystalInnerDrift 7s ease-in-out infinite;
}
.crystal-ball-core::before {
  content: '';
  position: absolute;
  inset: 8px 13px auto auto;
  width: 30px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 45%, rgba(255,255,255,0.82), rgba(255,255,255,0.20) 54%, transparent 72%);
  transform: rotate(-24deg);
  filter: blur(0.2px);
}
.crystal-ball-core::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 50px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255,239,178,0.46), rgba(245,215,110,0.20) 44%, transparent 70%),
    radial-gradient(ellipse at 50% 100%, rgba(117,205,255,0.20), transparent 70%);
  opacity: var(--crystal-aura-opacity);
  filter: blur(1px);
}
.crystal-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  border-radius: 50%;
  pointer-events: none;
  opacity: var(--crystal-aura-opacity);
  transform: translate(-50%, -50%) rotate(-18deg);
}
.crystal-orbit--outer {
  z-index: 1;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(178,219,255,0.20);
  border-left-color: rgba(245,215,110,0.38);
  border-bottom-color: rgba(245,215,110,0.20);
  box-shadow: 0 0 22px rgba(105,183,255,0.12);
  animation: crystalOrbit 12s linear infinite;
}
.crystal-orbit--inner {
  z-index: 4;
  width: 94px;
  height: 32px;
  border-top: 1px solid rgba(255,242,198,0.42);
  border-bottom: 1px solid rgba(120,205,255,0.16);
  box-shadow: 0 -2px 12px rgba(245,215,110,0.10);
  animation: crystalTilt 5.6s ease-in-out infinite;
}
.crystal-mist {
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 2;
  width: 96px;
  height: 24px;
  display: block;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(245,215,110,var(--crystal-ground-alpha)), transparent 72%),
    radial-gradient(ellipse at 50% 50%, rgba(88,170,255,0.18), transparent 58%);
  filter: blur(0.6px);
  opacity: var(--crystal-aura-opacity);
}
#confirm-area::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 116px;
  height: 116px;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(245,215,110,0.16), transparent 64%),
    radial-gradient(circle at 50% 50%, rgba(93,174,255,0.12), transparent 78%);
  opacity: var(--crystal-aura-opacity);
  filter: blur(8px);
  box-shadow:
    0 0 var(--crystal-aura-glow) rgba(245,215,110,var(--crystal-aura-alpha)),
    inset 0 0 var(--crystal-inset-glow) rgba(255,240,190,var(--crystal-inset-alpha));
  transition: opacity 0.45s ease, box-shadow 0.45s ease, background 0.45s ease;
}
#confirm-area::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 116px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(245,215,110,var(--crystal-ground-alpha)), transparent 72%),
    radial-gradient(ellipse at 50% 50%, rgba(98,174,255,0.18), transparent 58%);
  opacity: var(--crystal-aura-opacity);
  transition: opacity 0.45s ease, background 0.45s ease;
}
#confirm-area.crystal-step-1 {
  --crystal-fill: 33%;
  --crystal-opacity: 0.58;
  --crystal-glow: 14px;
  --crystal-glow-alpha: 0.34;
  --crystal-saturate: 0.88;
  --crystal-brightness: 0.92;
  --crystal-aura-opacity: 0.42;
  --crystal-aura-glow: 22px;
  --crystal-aura-alpha: 0.22;
  --crystal-inset-glow: 18px;
  --crystal-inset-alpha: 0.18;
  --crystal-ground-alpha: 0.18;
}
#confirm-area.crystal-step-2 {
  --crystal-fill: 66%;
  --crystal-opacity: 0.78;
  --crystal-glow: 22px;
  --crystal-glow-alpha: 0.52;
  --crystal-saturate: 1.02;
  --crystal-brightness: 1.08;
  --crystal-aura-opacity: 0.66;
  --crystal-aura-glow: 32px;
  --crystal-aura-alpha: 0.34;
  --crystal-inset-glow: 28px;
  --crystal-inset-alpha: 0.28;
  --crystal-ground-alpha: 0.28;
}
#confirm-area.crystal-complete {
  --crystal-fill: 100%;
  --crystal-opacity: 1;
  --crystal-glow: 30px;
  --crystal-glow-alpha: 0.78;
  --crystal-saturate: 1.18;
  --crystal-brightness: 1.26;
  --crystal-aura-opacity: 0.92;
  --crystal-aura-glow: 42px;
  --crystal-aura-alpha: 0.48;
  --crystal-inset-glow: 38px;
  --crystal-inset-alpha: 0.38;
  --crystal-ground-alpha: 0.42;
  pointer-events: auto !important;
}
#confirm-area.crystal-complete #confirm-btn {
  cursor: pointer;
  animation: float 3.2s ease-in-out infinite, crystalReadyPulse 2.4s ease-in-out infinite;
}
#confirm-area.crystal-complete .crystal-orbit--outer {
  border-color: rgba(185,225,255,0.30);
  border-left-color: rgba(255,240,190,0.78);
  border-bottom-color: rgba(245,215,110,0.42);
}
#confirm-area.crystal-complete .crystal-orbit--inner {
  border-top-color: rgba(255,248,220,0.74);
}
#confirm-area.crystal-complete #confirm-btn:hover,
#confirm-area.crystal-complete #confirm-btn:active {
  transform: scale(1.08);
  filter:
    drop-shadow(0 7px 18px rgba(0,0,0,0.86))
    drop-shadow(0 0 34px rgba(255,238,170,0.94))
    drop-shadow(0 0 12px rgba(201,153,58,0.72))
    brightness(1.2);
}
.array-display { gap: clamp(22px, 5.5vw, 54px); margin-bottom: 44px; }
.array-card-slot { gap: 12px; }
.array-card { width: clamp(72px, 16.5vw, 104px); height: clamp(108px, 24.75vw, 156px); border-radius: 9px; }
#scene-reading { padding: 24px 0 48px; }
.reading-pos-indicator { margin-top: 24px; font-size: clamp(11px, 2.1vw, 14px); letter-spacing: 0.35em; }
.reading-card-name { font-size: clamp(26px, 7.5vw, 52px); padding: 0 24px; margin-top: 6px; }
.reading-card-name-cn { font-size: clamp(18px, 4.5vw, 32px); margin-top: 8px; }
.reading-card-image { width: min(186px, 47vw); height: auto; min-height: min(279px, 70.5vw); border-radius: 11px; margin: 20px auto; }
.reading-card-image svg { border-radius: 9px; }
.reading-text-box { width: min(92vw, 500px); padding: 22px 26px; margin: 0 auto 24px; border-radius: 12px; }
.reading-text-para { font-size: clamp(13px, 2.6vw, 15px); line-height: 2.0; }
.reading-nav-hint { margin-top: 14px; }

/* 动效节奏 */
.tarot-circle { animation: breathe 5.5s ease-in-out infinite, rotateGlow 12s linear infinite; }
@keyframes rotateGlow { from { opacity: 0.80; } to { opacity: 1.00; } }
.start-btn, .confirm-btn, .restart-btn { animation-duration: 3.5s; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-6px); } }
.tarot-card { animation: cardFloat 4.5s ease-in-out infinite; }
@keyframes cardFloat { 0%, 100% { transform: translateY(0px); } 40% { transform: translateY(-4px); } 60% { transform: translateY(-4px); } }
.pos-holder { animation: holderPulse 3s ease-in-out infinite; }
@keyframes holderPulse { 0%, 100% { border-color: rgba(201,153,58,0.26); } 50% { border-color: rgba(201,153,58,0.68); } }
.pos-holder::before { animation: shimmer 3.5s ease-in-out infinite; }
@keyframes cardShake { 0%, 100% { transform: translateX(0) rotate(0deg); } 30% { transform: translateX(-1.5px) rotate(-0.4deg); } 70% { transform: translateX(1.5px) rotate(0.4deg); } }
.reading-card-image.revealed { animation: cardGlow 3.5s ease-in-out infinite; }
@keyframes cardGlow { 0%, 100% { opacity: 0.92; } 50% { opacity: 1.00; } }
.reading-nav-hint { animation: blink 3s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.90; } }
.confirm-btn, .restart-btn { animation: float 3.5s ease-in-out infinite, glowPulse 3s ease-in-out infinite; }
@keyframes glowPulse { 0%, 100% { opacity: 0.82; } 50% { opacity: 1.00; } }
@keyframes crystalReadyPulse {
  0%, 100% { opacity: 0.92; filter: drop-shadow(0 5px 12px rgba(0,0,0,0.78)) drop-shadow(0 0 24px rgba(245,215,110,0.70)); }
  50% { opacity: 1; filter: drop-shadow(0 7px 18px rgba(0,0,0,0.86)) drop-shadow(0 0 38px rgba(255,238,170,0.96)); }
}
@keyframes crystalOrbit {
  from { transform: translate(-50%, -50%) rotate(-18deg); }
  to { transform: translate(-50%, -50%) rotate(342deg); }
}
@keyframes crystalTilt {
  0%, 100% { transform: translate(-50%, -50%) rotate(-18deg) scaleX(1); }
  50% { transform: translate(-50%, -50%) rotate(-24deg) scaleX(1.08); }
}
@keyframes crystalInnerDrift {
  0%, 100% { background-position: center, center, 0 0, center, center, center; }
  50% { background-position: center, center, 0 6px, center, 48% 54%, center; }
}
.start-btn, .confirm-btn, .restart-btn { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease; }
.tarot-card { transition: transform 0.30s cubic-bezier(0.34, 1.4, 0.64, 1), filter 0.30s ease, opacity 0.40s ease; }
.star-ring { transition: all 0.45s cubic-bezier(0.34, 1.2, 0.64, 1); }
.tarot-card:hover { transform: translateY(-12px) scale(1.06) !important; }
.tarot-card:not(.selected) { animation: cardFloat 4.5s ease-in-out infinite; }
.tarot-card.offscreen { animation-play-state: paused !important; }
.tarot-card:nth-child(22n+2)  { animation-delay: 0.3s;  }
.tarot-card:nth-child(22n+3)  { animation-delay: 0.6s;  }
.tarot-card:nth-child(22n+4)  { animation-delay: 0.9s;  }
.tarot-card:nth-child(22n+5)  { animation-delay: 1.2s;  }
.tarot-card:nth-child(22n+6)  { animation-delay: 0.4s;  }
.tarot-card:nth-child(22n+7)  { animation-delay: 0.8s;  }
.tarot-card:nth-child(22n+8)  { animation-delay: 1.5s;  }
.tarot-card:nth-child(22n+9)  { animation-delay: 0.2s;  }
.tarot-card:nth-child(22n+10) { animation-delay: 1.1s;  }
.tarot-card:nth-child(22n+11) { animation-delay: 0.7s;  }
.tarot-card:nth-child(22n+12) { animation-delay: 1.8s;  }
.tarot-card:nth-child(22n+13) { animation-delay: 0.35s; }
.tarot-card:nth-child(22n+14) { animation-delay: 1.0s;  }
.tarot-card:nth-child(22n+15) { animation-delay: 0.55s; }
.tarot-card:nth-child(22n+16) { animation-delay: 1.3s;  }
.tarot-card:nth-child(22n+17) { animation-delay: 0.15s; }
.tarot-card:nth-child(22n+18) { animation-delay: 0.95s; }
.tarot-card:nth-child(22n+19) { animation-delay: 1.65s; }
.tarot-card:nth-child(22n+20) { animation-delay: 0.45s; }
.tarot-card:nth-child(22n+21) { animation-delay: 1.25s; }
.tarot-card:nth-child(22n+22) { animation-delay: 0.75s; }
@keyframes btnIdleGlow { 0%, 100% { opacity: 0.88; } 50% { opacity: 1.00; } }
.start-btn { animation: float 3.5s ease-in-out infinite, btnIdleGlow 2.8s ease-in-out infinite; }
.start-btn:hover, .start-btn:active { animation: none; opacity: 1; }
.tarot-circle { filter: drop-shadow(0 0 18px rgba(201,153,58,0.40)) drop-shadow(0 0 6px rgba(245,215,110,0.20)) drop-shadow(0 4px 14px rgba(0,0,0,0.55)); }
@keyframes dotPulse { 0%, 100% { transform: scale(1); opacity: 0.90; } 50% { transform: scale(1.35); opacity: 1.00; } }
.dot.past, .dot.now, .dot.future { animation: dotPulse 2.5s ease-in-out infinite; }
.dot.now    { animation-delay: 0.4s; }
.dot.future { animation-delay: 0.8s; }

@media (orientation: landscape) and (max-height: 500px) {
  .tarot-circle { width: min(160px, 36vh); height: min(160px, 36vh); }
  .reading-card-image { width: min(110px, 28vh); height: auto; min-height: min(165px, 42vh); }
  .start-btn, .confirm-btn, .restart-btn { width: 78px !important; height: 78px !important; }
  .start-card { width: 56px !important; height: 90px !important; }
  #scene-intent { justify-content: flex-start; overflow-y: auto; }
  .intent-shell { padding-bottom: 18px; }
  .signature-card { min-height: 74px; }
  .positions-bar { margin-bottom: 6px; }
  .tarot-card { width: clamp(52px, 11vw, 68px); height: clamp(78px, 16.5vw, 102px); }
  .pos-holder { width: clamp(42px, 9vw, 56px); height: clamp(63px, 13.5vw, 84px); }
  .pos-label { font-size: clamp(10px, 2vw, 12px); }
  .cards-scroll-wrapper { padding: 14px 0 10px; }
  #scene-02 { padding-top: 8px; }
}

@media (max-width: 430px) {
  #scene-intent {
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 18px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .intent-title { font-size: clamp(24px, 7vw, 34px); }
  .intent-copy { margin: 10px auto 12px; line-height: 1.65; }
  .intent-field { padding: 12px 12px 26px; border-radius: 10px; }
  .intent-field textarea { min-height: 72px; font-size: 14px; }
  .signature-panel { padding: 12px; margin-bottom: 14px; border-radius: 10px; }
  .signature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signature-card { min-height: 76px; gap: 5px; }
  .signature-orb { width: 22px; height: 22px; }
  .signature-name { font-size: 13px; }
  .signature-copy { font-size: 10px; }
}

/* ============================================================
   ✦ 增强动效层
   ============================================================ */
.reading-card-image { perspective: 900px; position: relative; overflow: visible !important; }
#reading-flip-back, #reading-flip-face { border-radius: inherit; overflow: hidden; }
.card-sweep { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(105deg, transparent 20%, rgba(245,215,110,0.00) 35%, rgba(245,215,110,0.65) 50%, rgba(255,248,200,0.45) 55%, rgba(245,215,110,0.00) 70%, transparent 85%); transform: translateX(-120%) skewX(-12deg); pointer-events: none; z-index: 10; border-radius: inherit; }
@keyframes goldSweepCard { 0% { transform: translateX(-130%) skewX(-12deg); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 0.9; } 100% { transform: translateX(130%) skewX(-12deg); opacity: 0; } }
.card-sweep.active { animation: goldSweepCard 0.65s ease-out forwards; }
.card-pulse-ring { position: fixed; border-radius: 12px; border: 1.5px solid rgba(245, 215, 110, 0.75); pointer-events: none; z-index: 500; box-shadow: 0 0 8px rgba(245, 215, 110, 0.35), inset 0 0 6px rgba(201, 153, 58, 0.15); animation: cardPulseRingExpand 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes cardPulseRingExpand { 0% { opacity: 0.90; transform: scale(1.00); } 100% { opacity: 0; transform: scale(1.55); } }
#scene-curtain { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 50%, #1a0e00 0%, #0a0600 40%, #000 100%); z-index: 8000; pointer-events: none; opacity: 0; display: flex; align-items: center; justify-content: center; }
#scene-curtain .curtain-emblem { opacity: 0; transform: scale(0.6); color: #c9993a; font-size: 48px; text-shadow: 0 0 30px rgba(201,153,58,0.80), 0 0 60px rgba(201,153,58,0.40); transition: none; }
@keyframes curtainOpen { 0% { opacity: 1; } 40% { opacity: 1; } 100% { opacity: 0; } }
@keyframes curtainEmblem { 0% { opacity: 0; transform: scale(0.6) rotate(-10deg); } 30% { opacity: 1; transform: scale(1.08) rotate(0deg); } 70% { opacity: 1; transform: scale(1.00) rotate(0deg); } 100% { opacity: 0; transform: scale(1.15) rotate(5deg); } }
.reading-pos-indicator { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; }
.reading-pos-indicator::before, .reading-pos-indicator::after { content: ''; display: block; width: 32px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,153,58,0.60)); }
.reading-pos-indicator::after { background: linear-gradient(270deg, transparent, rgba(201,153,58,0.60)); }
.reading-card-name { position: relative; }
.reading-text-box { position: relative; }
.reading-text-box::before { content: ''; position: absolute; left: 8px; top: 18px; bottom: 18px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, transparent 0%, rgba(201,153,58,0.70) 20%, rgba(245,215,110,0.90) 50%, rgba(201,153,58,0.70) 80%, transparent 100%); }
.reading-text-para { text-indent: 2em; }
.reading-text-box::after { content: '✦  ·  ✦'; display: block; text-align: center; color: #c9993a; font-size: 10px; letter-spacing: 0.5em; opacity: 0.60; margin-top: 16px; text-shadow: 0 0 8px rgba(201,153,58,0.50); }
.reading-name-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px auto 0; width: min(70vw, 260px); }
.reading-name-divider .div-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,153,58,0.55)); }
.reading-name-divider .div-line:last-child { background: linear-gradient(270deg, transparent, rgba(201,153,58,0.55)); }
.reading-name-divider .div-diamond { width: 6px; height: 6px; background: #c9993a; transform: rotate(45deg); box-shadow: 0 0 6px rgba(201,153,58,0.70); flex-shrink: 0; }
.progress-dots { position: relative; }
.progress-dots::before { content: ''; display: block; width: 60px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,153,58,0.40), transparent); margin: 0 auto 10px; }
.reading-nav-hint { position: relative; }
.reading-nav-hint::before { content: '✦'; margin-right: 8px; color: #c9993a; font-size: 10px; vertical-align: middle; opacity: 0.75; }
.reading-nav-hint::after { content: '✦'; margin-left: 8px; color: #c9993a; font-size: 10px; vertical-align: middle; opacity: 0.75; }

/* ============================================================
   ✦ Scene Destiny — 命运脉络
   ============================================================ */
#scene-destiny { z-index: 18; background: radial-gradient(ellipse at 50% 20%, #1e0f00 0%, #0d0600 40%, #030100 100%); justify-content: flex-start; overflow-y: auto; overflow-x: hidden; padding: 0 0 48px; scrollbar-width: none; }
#scene-destiny::-webkit-scrollbar { display: none; }
.destiny-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0; transition: opacity 1.2s ease; }
.destiny-canvas.visible { opacity: 1; }
.destiny-header { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; padding-top: clamp(24px, 6vh, 48px); padding-bottom: 0; opacity: 0; transform: translateY(-18px); }
.destiny-rune-line { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.destiny-rune { color: rgba(201,153,58,0.70); font-size: 11px; text-shadow: 0 0 12px rgba(245,215,110,0.55); letter-spacing: 0.1em; }
.destiny-rune-sep { display: inline-block; width: 20px; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,153,58,0.40), transparent); }
.destiny-title-en { font-size: clamp(10px, 2.2vw, 13px); color: rgba(201,153,58,0.55); letter-spacing: 0.55em; font-weight: normal; font-style: italic; margin-bottom: 4px; text-shadow: 0 0 20px rgba(201,153,58,0.35); }
.destiny-title-cn { font-size: clamp(28px, 8vw, 52px); color: #f5d76e; letter-spacing: 0.35em; font-weight: normal; font-style: italic; margin: 0 0 10px; text-shadow: 0 0 32px rgba(245,215,110,0.90), 0 0 70px rgba(201,153,58,0.45), 0 2px 0 rgba(80,40,0,0.90), 0 -1px 0 rgba(255,235,140,0.35); }
.destiny-title-line { display: flex; align-items: center; gap: 10px; width: min(220px, 60vw); }
.destiny-line-seg { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,153,58,0.65)); }
.destiny-line-seg:last-child { background: linear-gradient(270deg, transparent, rgba(201,153,58,0.65)); }
.destiny-diamond { color: #c9993a; font-size: 8px; text-shadow: 0 0 10px rgba(201,153,58,0.80); }
.destiny-cards-row { position: relative; z-index: 2; display: flex; align-items: flex-start; justify-content: center; gap: 0; margin-top: clamp(16px, 4vh, 28px); padding: 0 clamp(8px, 3vw, 20px); width: 100%; }
.destiny-card-col { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; max-width: clamp(90px, 26vw, 140px); opacity: 0; transform: translateY(30px); }
.destiny-card-col--center { max-width: clamp(104px, 30vw, 160px); }
.destiny-card-label { font-size: clamp(10px, 2.2vw, 13px); color: rgba(201,153,58,0.70); letter-spacing: 0.35em; text-shadow: 0 0 10px rgba(201,153,58,0.45); }
.destiny-card-frame { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 8px; border: 1.5px solid rgba(201,153,58,0.50); box-shadow: 0 0 22px rgba(201,153,58,0.20), 0 8px 32px rgba(0,0,0,0.80), inset 0 0 0 1px rgba(245,215,110,0.10), inset 0 1px 0 rgba(245,215,110,0.18); overflow: hidden; }
.destiny-card-frame--center { border-color: rgba(245,215,110,0.65); box-shadow: 0 0 36px rgba(245,215,110,0.35), 0 0 14px rgba(201,153,58,0.45), 0 10px 40px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(245,215,110,0.22), inset 0 1px 0 rgba(245,215,110,0.28); }
@keyframes destinyCardPulse {
  0%,100% { box-shadow: 0 0 36px rgba(245,215,110,0.30), 0 0 14px rgba(201,153,58,0.40), 0 10px 40px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(245,215,110,0.22), inset 0 1px 0 rgba(245,215,110,0.28); }
  50%      { box-shadow: 0 0 52px rgba(245,215,110,0.55), 0 0 24px rgba(201,153,58,0.65), 0 10px 40px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(245,215,110,0.30), inset 0 1px 0 rgba(245,215,110,0.35); }
}
.destiny-card-frame--center.animated { animation: destinyCardPulse 3s ease-in-out infinite; }
.destiny-card-img-wrap { width: 100%; height: 100%; position: relative; }
.destiny-card-img-wrap picture { width: 100%; height: 100%; display: block; }
.destiny-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; }
.destiny-card-img-wrap .overlay-border { position: absolute; inset: 0; pointer-events: none; border-radius: 6px; }
.destiny-card-glow { position: absolute; inset: -20px; border-radius: 50%; pointer-events: none; opacity: 0; filter: blur(24px); transition: opacity 1.2s ease; z-index: -1; }
.destiny-card-glow.lit { opacity: 0.35; }
.destiny-card-name { font-size: clamp(11px, 2.4vw, 14px); color: #f5d76e; letter-spacing: 0.20em; text-align: center; text-shadow: 0 0 14px rgba(245,215,110,0.65); font-style: italic; }
.destiny-card-core { font-size: clamp(10px, 1.9vw, 12px); color: rgba(201,153,58,0.65); letter-spacing: 0.06em; line-height: 1.55; text-align: center; padding: 0 4px; }
.destiny-connector { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: clamp(30px, 7vw, 60px); margin-top: clamp(40px, 10vw, 66px); opacity: 0; gap: 3px; }
.destiny-connector svg { width: 100%; height: 14px; }
.destiny-conn-dot { font-size: 7px; color: rgba(245,215,110,0.60); text-shadow: 0 0 8px rgba(245,215,110,0.70); animation: destinyDotPulse 2s ease-in-out infinite; }
@keyframes destinyDotPulse { 0%,100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1.00; transform: scale(1.4); } }
.destiny-divider { position: relative; z-index: 2; width: min(340px, 88vw); margin: clamp(14px, 4vh, 24px) auto 0; opacity: 0; }
.destiny-text-area { position: relative; z-index: 2; width: min(92vw, 480px); margin: clamp(12px, 3vh, 20px) auto 0; background: linear-gradient(160deg, rgba(22,12,0,0.85) 0%, rgba(10,5,0,0.72) 100%); border: 1px solid rgba(201,153,58,0.25); border-top: 1px solid rgba(245,215,110,0.38); border-radius: 12px; padding: 22px 24px 24px; box-shadow: 0 6px 30px rgba(0,0,0,0.75), inset 0 1px 0 rgba(245,215,110,0.12), inset 0 0 30px rgba(201,153,58,0.04); opacity: 0; }
.destiny-text-area::before { content: ''; position: absolute; left: 8px; top: 18px; bottom: 18px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, transparent 0%, rgba(201,153,58,0.70) 20%, rgba(245,215,110,0.90) 50%, rgba(201,153,58,0.70) 80%, transparent 100%); }
.destiny-text-area::after { content: '✦  ·  ✦'; display: block; text-align: center; color: #c9993a; font-size: 10px; letter-spacing: 0.5em; opacity: 0.60; margin-top: 18px; text-shadow: 0 0 8px rgba(201,153,58,0.50); }
.destiny-identity-card {
  position: relative;
  margin: 0 0 18px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(245,215,110,0.30);
  border-radius: 10px;
  background:
    radial-gradient(circle at 16% 20%, rgba(80,140,220,0.14), transparent 38%),
    radial-gradient(circle at 84% 18%, rgba(245,215,110,0.13), transparent 34%),
    linear-gradient(150deg, rgba(20,12,38,0.76), rgba(12,6,0,0.72));
  box-shadow: inset 0 1px 0 rgba(245,215,110,0.12), 0 8px 24px rgba(0,0,0,0.44);
  text-align: center;
}
.destiny-identity-kicker {
  color: rgba(201,153,58,0.68);
  font-size: 10px;
  letter-spacing: 0.38em;
  margin-bottom: 8px;
}
.destiny-identity-title {
  color: #f5d76e;
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(245,215,110,0.50);
}
.destiny-identity-keywords {
  color: rgba(255,244,205,0.78);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  margin-top: 8px;
}
.destiny-identity-copy {
  color: rgba(255,255,255,0.74);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.05em;
  margin-top: 10px;
}
.destiny-query-card {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(201,153,58,0.18);
}
.destiny-query-label,
.destiny-action-label {
  color: rgba(201,153,58,0.76);
  font-size: clamp(10px, 2vw, 12px);
  letter-spacing: 0.34em;
  margin-bottom: 8px;
}
.destiny-query-text {
  color: rgba(255,255,255,0.88);
  font-size: clamp(13px, 2.6vw, 15px);
  line-height: 1.8;
  letter-spacing: 0.05em;
}
.destiny-query-topic {
  color: rgba(245,215,110,0.70);
  font-size: 12px;
  letter-spacing: 0.16em;
  margin-top: 8px;
}
.destiny-combo-title {
  color: #f5d76e;
  font-size: clamp(16px, 4vw, 22px);
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.12em;
  margin: 4px 0 16px;
  text-shadow: 0 0 18px rgba(245,215,110,0.55);
}
.destiny-text-body { color: rgba(255,255,255,0.88); font-size: clamp(13px, 2.6vw, 15px); line-height: 2.0; letter-spacing: 0.07em; text-indent: 2em; }
.destiny-action-card {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(201,153,58,0.18);
}
.destiny-action-text {
  color: rgba(255,255,255,0.82);
  font-size: clamp(13px, 2.5vw, 15px);
  line-height: 1.9;
  letter-spacing: 0.06em;
}
.destiny-footer { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: clamp(16px, 4vh, 28px); opacity: 0; pointer-events: none; }
.destiny-footer.visible { pointer-events: auto; }
.destiny-share-action {
  border-color: rgba(158,203,255,0.34);
  box-shadow: 0 0 22px rgba(80,140,220,0.14), inset 0 0 16px rgba(80,140,220,0.06);
}
.destiny-restart-wrapper {
  margin-top: 2px;
  cursor: pointer;
}
.destiny-restart-btn {
  margin-top: 0;
  opacity: 1 !important;
}
.destiny-choice-screen {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}
.destiny-choice-screen.visible {
  opacity: 1;
  pointer-events: auto;
}
.destiny-choice-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(245,215,110,0.08) 0%, rgba(10,4,0,0.30) 24%, rgba(0,0,0,0.82) 64%, rgba(0,0,0,0.94) 100%);
  backdrop-filter: blur(4px) brightness(0.58);
}
.destiny-choice-spotlight {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(70vw, 360px);
  height: min(70vw, 360px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,243,196,0.22) 0%, rgba(245,215,110,0.12) 24%, rgba(245,215,110,0.03) 46%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}
.destiny-choice-panel {
  position: relative;
  width: min(94vw, 720px);
  padding: 34px 18px 24px;
  text-align: center;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.destiny-choice-sigil {
  position: absolute;
  left: 50%;
  top: -34px;
  width: 84px;
  height: 84px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(245,215,110,0.22);
  box-shadow:
    0 0 28px rgba(245,215,110,0.12),
    inset 0 0 16px rgba(245,215,110,0.08);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,243,196,0.12) 0%, rgba(245,215,110,0.04) 34%, transparent 65%);
}
.destiny-choice-sigil::before,
.destiny-choice-sigil::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(245,215,110,0.20);
}
.destiny-choice-sigil::before {
  animation: rewriteOrbit 14s linear infinite;
}
.destiny-choice-sigil::after {
  inset: 22px;
  border-style: solid;
  border-color: rgba(255,243,196,0.16);
  animation: rewriteOrbitReverse 10s linear infinite;
}
.destiny-choice-kicker {
  color: rgba(245,215,110,0.58);
  font-size: clamp(10px, 2.2vw, 12px);
  letter-spacing: 0.38em;
  margin-top: 12px;
  margin-bottom: 16px;
  text-shadow: 0 0 14px rgba(245,215,110,0.28);
  white-space: nowrap;
}
.destiny-choice-title {
  color: #fff2c0;
  font-size: clamp(28px, 7.8vw, 56px);
  letter-spacing: 0.08em;
  line-height: 1.14;
  white-space: nowrap;
  text-shadow:
    0 0 30px rgba(255,238,176,0.78),
    0 0 70px rgba(201,153,58,0.32),
    0 2px 0 rgba(80,40,0,0.9);
}
.destiny-choice-title .char-span {
  display: inline-block;
  min-width: 0.95em;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
}
.destiny-choice-title .char-span.reveal {
  animation: destinyQuestionRise 0.55s cubic-bezier(0.22,1,0.36,1) forwards;
}
.destiny-choice-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(72vw, 280px);
  margin: 16px auto 0;
}
.destiny-choice-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,215,110,0.48));
}
.destiny-choice-divider span:last-child {
  background: linear-gradient(270deg, transparent, rgba(245,215,110,0.48));
}
.destiny-choice-divider i {
  width: 8px;
  height: 8px;
  display: block;
  transform: rotate(45deg);
  background: rgba(255,243,196,0.78);
  box-shadow: 0 0 10px rgba(245,215,110,0.28);
}
.destiny-choice-copy {
  margin-top: 18px;
  width: min(92vw, 620px);
  margin-left: auto;
  margin-right: auto;
  color: rgba(255,244,214,0.78);
  font-size: clamp(13px, 3vw, 15px);
  line-height: 1.85;
  letter-spacing: 0.04em;
  text-wrap: pretty;
  text-shadow: 0 0 18px rgba(245,215,110,0.10);
}
.destiny-choice-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.destiny-choice-actions .tarot-pill-btn {
  min-width: 164px;
}
.destiny-choice-screen.visible + .destiny-footer {
  pointer-events: none;
}
#scene-destiny.choice-awaken .destiny-header,
#scene-destiny.choice-awaken .destiny-cards-row,
#scene-destiny.choice-awaken .destiny-divider,
#scene-destiny.choice-awaken .destiny-text-area {
  filter: blur(3px) brightness(0.5) saturate(0.76);
  transform: scale(0.99);
}
#scene-destiny .destiny-header,
#scene-destiny .destiny-cards-row,
#scene-destiny .destiny-divider,
#scene-destiny .destiny-text-area {
  transition: filter 0.55s ease, transform 0.55s ease, opacity 0.55s ease;
}
@keyframes destinyQuestionRise {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.88);
    filter: blur(8px);
  }
  65% {
    opacity: 1;
    transform: translateY(-3px) scale(1.03);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
@keyframes destinyCardReveal { 0% { opacity: 0; transform: translateY(40px) scale(0.88) rotateX(12deg); filter: brightness(0.4); } 60% { opacity: 1; transform: translateY(-4px) scale(1.03) rotateX(0deg); filter: brightness(1.1); } 100% { opacity: 1; transform: translateY(0) scale(1.00) rotateX(0deg); filter: brightness(1.0); } }
.destiny-card-col.revealed { animation: destinyCardReveal 0.85s cubic-bezier(0.22,1,0.36,1) forwards; }
.destiny-ambient { position: fixed; top: 0; left: 0; right: 0; height: 55vh; pointer-events: none; z-index: 1; background: radial-gradient(ellipse 70% 55% at 50% 10%, rgba(201,153,58,0.07) 0%, transparent 100%); opacity: 0; transition: opacity 1.5s ease; }
.destiny-ambient.visible { opacity: 1; }

/* ============================================================
   ✦ 解牌卡面背景光晕层
   ============================================================ */
.card-aura-bg { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: min(420px, 110vw); height: 70vh; background-size: cover; background-position: center top; background-repeat: no-repeat; filter: blur(2px) saturate(0.75) brightness(0.75); opacity: 0; pointer-events: none; z-index: 16; transition: opacity 0.9s ease; -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, black 0%, transparent 100%); mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, black 0%, transparent 100%); }
.card-aura-bg.visible { opacity: 0.20; }
#reading-content { position: relative; z-index: 17; }

/* ============================================================
   ✦ 拖拽交互层
   ============================================================ */
@keyframes rotateGlowFast { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.tarot-circle.circle-active { animation: breathe 5.5s ease-in-out infinite, rotateGlowFast 0.9s linear infinite !important; filter: drop-shadow(0 0 36px rgba(245,215,110,0.90)) drop-shadow(0 0 18px rgba(201,153,58,0.75)) drop-shadow(0 4px 16px rgba(0,0,0,0.60)) !important; }
#start-btn-wrapper.dragging { cursor: grabbing; touch-action: none; }
#start-btn-wrapper.dragging .start-btn { animation: none !important; filter: drop-shadow(0 0 36px rgba(245,215,110,0.95)) drop-shadow(0 0 14px rgba(201,153,58,0.85)) !important; transform: scale(1.08) rotate(var(--start-card-rotation)) !important; }
.drag-guide { margin-top: 20px; display: flex; align-items: center; gap: 9px; color: rgba(201,153,58,0.65); font-size: clamp(11px, 2.4vw, 13px); letter-spacing: 0.30em; text-shadow: 0 0 12px rgba(201,153,58,0.38); font-family: 'Georgia', serif; animation: dragGuideFloat 3.2s ease-in-out infinite; user-select: none; pointer-events: none; transition: opacity 0.3s ease; }
.drag-guide.hidden { opacity: 0; }
.drag-guide-icon { font-size: 12px; color: #c9993a; opacity: 0.72; }
@keyframes dragGuideFloat { 0%,100% { opacity: 0.65; transform: translateY(0); } 50% { opacity: 1.00; transform: translateY(-3px); } }
#scene-02 { justify-content: flex-start !important; padding-top: clamp(14px, 4vh, 32px) !important; padding-bottom: clamp(10px, 3vh, 24px) !important; overflow-y: auto !important; }
#scene-02 .cards-title { margin-top: 0 !important; }

/* Scene 02 refined draw stage */
#scene-02 {
  justify-content: flex-start !important;
  overflow: hidden !important;
  padding-top: clamp(16px, 3.6vh, 32px) !important;
}
#scene-02 .cards-title {
  font-size: clamp(22px, 6vw, 42px) !important;
  margin: 0 0 6px !important;
  letter-spacing: 0.28em !important;
  text-shadow:
    0 0 18px rgba(245,215,110,0.58),
    0 0 42px rgba(201,153,58,0.22),
    0 1px 0 rgba(110,67,14,0.9) !important;
}
#scene-02 .cards-subtitle {
  font-size: clamp(12px, 2.4vw, 15px) !important;
  margin-bottom: clamp(14px, 3vh, 24px) !important;
}
#scene-02 .positions-bar {
  width: min(94vw, 700px) !important;
  margin-bottom: clamp(8px, 2vh, 16px) !important;
  gap: clamp(12px, 3.4vw, 34px) !important;
  border: 0 !important;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,215,110,0.04), transparent 72%) !important;
}
#scene-02 .pos-holder {
  width: clamp(62px, 14vw, 92px) !important;
  height: clamp(93px, 21vw, 138px) !important;
}
#scene-02 .cards-scroll-wrapper {
  padding: clamp(28px, 5vh, 48px) 0 clamp(30px, 5vh, 46px) !important;
}
#scene-02 .cards-track {
  gap: clamp(12px, 3.2vw, 24px) !important;
  padding: 0 max(14vw, 72px) 8px !important;
}
#scene-02 .tarot-card {
  width: clamp(74px, 16vw, 112px) !important;
  height: clamp(111px, 24vw, 168px) !important;
  animation: none !important;
  transition: none !important;
}
#scene-02 .tarot-card:hover {
  filter:
    brightness(1.13)
    contrast(1.05)
    drop-shadow(0 18px 28px rgba(0,0,0,0.66))
    drop-shadow(0 0 24px rgba(245,215,110,0.54)) !important;
}

body.reduced-draw-motion .draw-shadow-row--far,
body.reduced-draw-motion .draw-shadow-row--back {
  display: none;
}
body.reduced-draw-motion .draw-shadow-row--middle {
  opacity: 0.12;
}
body.reduced-draw-motion .draw-shadow-row--front {
  opacity: 0.16;
}
body.reduced-draw-motion #scene-02 .tarot-card {
  filter: drop-shadow(0 14px 20px rgba(0,0,0,0.56)) !important;
}

@media (orientation: landscape) and (max-height: 500px) {
  #scene-02 .tarot-card {
    width: clamp(56px, 12vw, 78px) !important;
    height: clamp(84px, 18vw, 117px) !important;
  }
  #scene-02 .cards-scroll-wrapper {
    padding: 18px 0 22px !important;
  }
  #scene-02 .pos-holder {
    width: clamp(50px, 10vw, 66px) !important;
    height: clamp(75px, 15vw, 99px) !important;
  }
  .draw-stage-caption { display: none; }
}

/* ============================================================
   Rewrite Theme + Round Two
   ============================================================ */
body[data-theme-mode="fate"] {
  --rewrite-accent: #f5d76e;
  --rewrite-soft: rgba(201,153,58,0.72);
  --rewrite-glow: rgba(245,215,110,0.34);
  --rewrite-panel: rgba(16, 9, 0, 0.76);
}

body[data-theme-mode="rewrite"] {
  --rewrite-accent: #fff0b4;
  --rewrite-soft: rgba(231,190,92,0.86);
  --rewrite-glow: rgba(255,235,170,0.42);
  --rewrite-panel: rgba(26, 15, 2, 0.74);
}

body[data-theme-mode="rewrite"] #bg-canvas {
  filter: brightness(1.08) saturate(1.12);
}

body[data-theme-mode="rewrite"] #bg-canvas::after {
  background-image:
    radial-gradient(ellipse at 20% 22%, rgba(245,215,110,0.11) 0%, transparent 56%),
    radial-gradient(ellipse at 80% 72%, rgba(255,245,210,0.08) 0%, transparent 55%);
}

.tarot-pill-btn {
  appearance: none;
  -webkit-appearance: none;
  min-width: 148px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(245,215,110,0.44);
  background:
    linear-gradient(135deg, rgba(245,215,110,0.16) 0%, rgba(201,153,58,0.12) 46%, rgba(40,20,0,0.36) 100%),
    rgba(7, 4, 0, 0.74);
  color: #f5d76e;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: clamp(12px, 2.8vw, 14px);
  letter-spacing: 0.28em;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.48),
    0 0 18px rgba(201,153,58,0.18),
    inset 0 1px 0 rgba(255,242,191,0.24);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.32s ease, border-color 0.32s ease;
}

.tarot-pill-btn:hover,
.tarot-pill-btn:active {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(255,240,180,0.68);
  box-shadow:
    0 14px 30px rgba(0,0,0,0.58),
    0 0 32px rgba(245,215,110,0.26),
    inset 0 1px 0 rgba(255,242,191,0.34);
}

.tarot-pill-btn--ghost {
  background:
    linear-gradient(135deg, rgba(245,215,110,0.08) 0%, rgba(201,153,58,0.07) 46%, rgba(40,20,0,0.18) 100%),
    rgba(7, 4, 0, 0.45);
}

.destiny-footer,
.authored-footer {
  width: min(92vw, 430px);
  margin-left: auto;
  margin-right: auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(245,215,110,0.18);
  border-top-color: rgba(255,240,180,0.32);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,237,168,0.08) 0%, rgba(201,153,58,0.03) 42%, rgba(0,0,0,0.24) 100%),
    rgba(8, 4, 0, 0.48);
  box-shadow:
    0 18px 42px rgba(0,0,0,0.44),
    0 0 34px rgba(201,153,58,0.12),
    inset 0 1px 0 rgba(255,242,191,0.14);
  backdrop-filter: blur(10px);
}

.destiny-pill-btn,
.authored-primary-action {
  width: 100%;
}

.destiny-footer .tarot-pill-btn,
.authored-footer .tarot-pill-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 13px 18px;
  line-height: 1;
}

.destiny-footer .tarot-pill-btn::before,
.authored-footer .tarot-pill-btn::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,246,206,0.16), transparent 48%);
  opacity: 0.72;
  pointer-events: none;
}

.destiny-footer .tarot-pill-btn::after,
.authored-footer .tarot-pill-btn::after {
  content: '';
  position: absolute;
  left: -35%;
  top: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,245,200,0.22), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  transition: left 0.55s ease, opacity 0.35s ease;
  pointer-events: none;
}

.destiny-footer .tarot-pill-btn:hover::after,
.destiny-footer .tarot-pill-btn:active::after,
.authored-footer .tarot-pill-btn:hover::after,
.authored-footer .tarot-pill-btn:active::after {
  left: 105%;
  opacity: 1;
}

.destiny-primary-action,
.authored-primary-action {
  min-height: 54px;
  border-color: rgba(255,235,160,0.66);
  background:
    linear-gradient(135deg, rgba(255,231,145,0.32) 0%, rgba(201,153,58,0.22) 46%, rgba(70,32,0,0.56) 100%),
    rgba(16, 8, 0, 0.82);
  color: #fff0b4;
  font-size: clamp(13px, 3.2vw, 15px);
  letter-spacing: 0.20em;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.56),
    0 0 30px rgba(245,215,110,0.22),
    inset 0 1px 0 rgba(255,248,214,0.32),
    inset 0 -10px 22px rgba(70,32,0,0.26);
}

.destiny-secondary-actions,
.authored-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.destiny-mini-btn,
.authored-mini-btn {
  width: 100%;
  min-width: 0;
  color: rgba(255,236,180,0.88);
  font-size: clamp(11px, 2.8vw, 13px);
  letter-spacing: 0.14em;
}

.destiny-btn-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  color: #fff0b4;
  background: radial-gradient(circle, rgba(245,215,110,0.20), rgba(201,153,58,0.06) 64%, transparent 70%);
  text-shadow: 0 0 10px rgba(245,215,110,0.65);
}

.destiny-footer .tarot-pill-btn span:last-child,
.authored-footer .tarot-pill-btn span:last-child {
  position: relative;
  z-index: 1;
}

.destiny-footer .tarot-pill-btn:focus-visible,
.authored-footer .tarot-pill-btn:focus-visible {
  outline: 2px solid rgba(255,235,160,0.78);
  outline-offset: 3px;
}

#scene-rewrite-select,
#scene-self-select,
#scene-authored-destiny {
  z-index: 19;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(20px, 4vh, 34px) 0 42px;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(255,230,150,0.10) 0%, transparent 42%),
    radial-gradient(ellipse at 50% 35%, #1f1402 0%, #0b0601 54%, #020100 100%);
}

#scene-authored-destiny {
  padding-bottom: 56px;
}

.rewrite-scene-aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 52% 26% at 50% 10%, rgba(255,235,175,0.18) 0%, transparent 100%),
    radial-gradient(ellipse 44% 34% at 50% 58%, rgba(201,153,58,0.07) 0%, transparent 100%);
}

.rewrite-scene-aura--self {
  background:
    radial-gradient(circle at 50% 32%, rgba(255,239,192,0.22) 0%, transparent 36%),
    radial-gradient(circle at 50% 58%, rgba(201,153,58,0.08) 0%, transparent 54%);
}

.rewrite-scene-orbit,
.self-select-ring {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(245,215,110,0.14);
  pointer-events: none;
  z-index: 0;
}

.rewrite-scene-orbit--one {
  width: min(86vw, 480px);
  height: min(86vw, 480px);
  animation: rewriteOrbit 18s linear infinite;
}

.rewrite-scene-orbit--two {
  width: min(102vw, 580px);
  height: min(102vw, 580px);
  border-style: dashed;
  border-color: rgba(245,215,110,0.10);
  animation: rewriteOrbitReverse 26s linear infinite;
}

.self-select-ring--outer {
  width: min(86vw, 430px);
  height: min(86vw, 430px);
  animation: rewritePulse 4.4s ease-in-out infinite;
}

.self-select-ring--inner {
  width: min(62vw, 290px);
  height: min(62vw, 290px);
  border-color: rgba(255,240,190,0.24);
  animation: rewritePulse 3.2s ease-in-out infinite reverse;
}

.rewrite-header,
.authored-header {
  position: relative;
  z-index: 2;
  width: min(92vw, 540px);
  margin: 0 auto;
  text-align: center;
  padding: 0 18px;
}

.rewrite-header--compact {
  margin-bottom: 6px;
}

.rewrite-kicker {
  color: rgba(245,215,110,0.62);
  font-size: clamp(10px, 2.2vw, 13px);
  letter-spacing: 0.52em;
  text-shadow: 0 0 18px rgba(245,215,110,0.28);
  margin-bottom: 12px;
}

.rewrite-title,
.authored-title-cn {
  color: var(--rewrite-accent);
  font-size: clamp(28px, 8vw, 52px);
  letter-spacing: 0.28em;
  font-style: italic;
  text-shadow: 0 0 28px rgba(255,236,170,0.72), 0 0 60px rgba(201,153,58,0.22);
}

.rewrite-subtitle {
  margin-top: 12px;
  color: rgba(255,245,218,0.74);
  font-size: clamp(12px, 3vw, 15px);
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.rewrite-positions-bar {
  position: relative;
  z-index: 2;
  width: min(94vw, 520px);
  margin: 22px auto 16px;
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 34px);
  padding: 0 10px;
}

.rewrite-pos-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rewrite-pos-label {
  color: rgba(255,236,180,0.78);
  font-size: clamp(12px, 2.8vw, 14px);
  letter-spacing: 0.25em;
  text-shadow: 0 0 10px rgba(245,215,110,0.24);
}

.rewrite-pos-holder {
  width: clamp(72px, 17vw, 92px);
  height: clamp(110px, 25vw, 140px);
  border-radius: 10px;
  border: 1px solid rgba(255,236,180,0.34);
  background:
    linear-gradient(180deg, rgba(255,236,180,0.07) 0%, rgba(201,153,58,0.03) 100%),
    rgba(0,0,0,0.24);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.48),
    inset 0 1px 0 rgba(255,243,198,0.18);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.rewrite-pos-holder.filled {
  border-color: rgba(255,240,194,0.68);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.56),
    0 0 28px rgba(245,215,110,0.18),
    inset 0 1px 0 rgba(255,243,198,0.24);
}

.rewrite-grid-shell,
.self-select-stage,
.authored-cards-showcase,
.authored-reading-panel,
.authored-footer {
  position: relative;
  z-index: 2;
}

.rewrite-grid-shell {
  width: min(94vw, 620px);
  margin: 10px auto 0;
  padding: 24px 14px 18px;
}

.rewrite-grid-core,
.self-select-core {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  border: 1px solid rgba(255,236,180,0.10);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,240,192,0.07) 0%, transparent 28%),
    linear-gradient(180deg, rgba(255,236,180,0.03) 0%, rgba(0,0,0,0) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,243,198,0.10),
    0 12px 34px rgba(0,0,0,0.26);
}

.rewrite-cards-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rewrite-card,
.self-choice-card,
.authored-card-mini,
.authored-self-card .authored-card-mini {
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,236,180,0.30);
  background: rgba(0,0,0,0.24);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.54),
    inset 0 1px 0 rgba(255,243,198,0.18);
}

.rewrite-card {
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease, filter 0.28s ease;
  animation: rewriteCardFloat 6s ease-in-out infinite;
}

.rewrite-card:hover,
.rewrite-card:active,
.self-choice-card:hover,
.self-choice-card:active {
  transform: translateY(-6px) scale(1.025);
  border-color: rgba(255,242,201,0.64);
  box-shadow:
    0 16px 30px rgba(0,0,0,0.58),
    0 0 34px rgba(245,215,110,0.18),
    inset 0 1px 0 rgba(255,243,198,0.26);
}

.rewrite-card img,
.self-choice-card img,
.authored-card-mini img {
  width: 100%;
  display: block;
}

.rewrite-card::after,
.self-choice-card::after,
.authored-card-mini::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 26%, rgba(0,0,0,0.08) 100%);
  pointer-events: none;
}

.rewrite-card.selected {
  transform: translateY(-8px) scale(1.035);
  filter: brightness(0.82) saturate(0.88);
  opacity: 0.62;
}

.rewrite-card.chosen-path,
.self-choice-card.selected {
  border-color: rgba(255,244,210,0.86);
  box-shadow:
    0 18px 34px rgba(0,0,0,0.62),
    0 0 42px rgba(255,232,155,0.24),
    inset 0 1px 0 rgba(255,243,198,0.30);
}

.rewrite-card-badge,
.self-choice-badge,
.authored-card-label {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8,4,0,0.68);
  color: rgba(255,240,194,0.82);
  font-size: 10px;
  letter-spacing: 0.22em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.32);
}

.rewrite-action-area,
.authored-footer {
  width: min(92vw, 430px);
  margin: 18px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
}

.rewrite-action-area.visible,
.authored-footer.visible {
  opacity: 1;
  pointer-events: auto;
}

#rewrite-confirm-area,
#self-confirm-area {
  display: none !important;
}

.rewrite-action-copy,
.authored-status {
  color: rgba(255,236,185,0.72);
  font-size: clamp(11px, 2.6vw, 13px);
  letter-spacing: 0.26em;
  text-align: center;
}

.self-select-stage {
  width: min(94vw, 560px);
  margin: 18px auto 0;
  padding: 28px 16px;
}

.self-choice-grid {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 24px);
}

.self-choice-card {
  width: min(25vw, 122px);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.self-choice-caption {
  position: relative;
  z-index: 2;
  width: min(88vw, 480px);
  margin: 18px auto 0;
  text-align: center;
  color: rgba(255,242,204,0.74);
  font-size: clamp(12px, 3vw, 15px);
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.authored-shell {
  width: min(94vw, 640px);
  margin: 0 auto;
}

.authored-title-line {
  width: min(240px, 66vw);
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.authored-title-line span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,236,180,0.72));
}

.authored-title-line span:last-child {
  background: linear-gradient(270deg, transparent, rgba(255,236,180,0.72));
}

.authored-title-line i {
  width: 8px;
  height: 8px;
  display: block;
  transform: rotate(45deg);
  background: rgba(255,236,180,0.78);
  box-shadow: 0 0 12px rgba(255,236,180,0.28);
}

.authored-status {
  margin: 18px auto 0;
  animation: blink 2.8s ease-in-out infinite;
}

.authored-cards-showcase {
  margin-top: 22px;
  padding: 22px 16px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255,236,180,0.06) 0%, rgba(10,4,0,0.58) 100%);
  border: 1px solid rgba(255,236,180,0.14);
  box-shadow:
    0 16px 40px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,243,198,0.10);
}

.authored-cards-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.authored-card-mini {
  width: min(22vw, 104px);
}

.authored-self-panel {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.authored-self-label,
.authored-section-label {
  color: rgba(255,236,185,0.82);
  font-size: clamp(11px, 2.5vw, 13px);
  letter-spacing: 0.32em;
}

.authored-self-card {
  width: min(30vw, 138px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto;
}

.authored-self-card .authored-card-mini {
  width: 100%;
  max-width: 138px;
}

.authored-reading-panel {
  margin-top: 18px;
  border-radius: 24px;
  padding: 22px 22px 26px;
  background: linear-gradient(160deg, rgba(28,16,2,0.82) 0%, rgba(12,6,0,0.72) 100%);
  border: 1px solid rgba(255,236,180,0.18);
  box-shadow:
    0 16px 42px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,243,198,0.10),
    inset 0 0 28px rgba(245,215,110,0.04);
}

.authored-reading-title {
  color: var(--rewrite-accent);
  font-size: clamp(20px, 6vw, 32px);
  letter-spacing: 0.18em;
  text-align: center;
  margin-bottom: 18px;
  text-shadow: 0 0 24px rgba(255,236,170,0.52);
}

.authored-reading-paragraph,
.authored-reading-invocation,
.authored-card-reading-text {
  color: rgba(255,248,232,0.86);
  font-size: clamp(13px, 2.9vw, 15px);
  line-height: 2;
  letter-spacing: 0.06em;
}

.authored-reading-paragraph + .authored-reading-paragraph,
.authored-reading-invocation + .authored-card-readings,
.authored-self-reading,
#authored-closing {
  margin-top: 16px;
}

.authored-reading-invocation {
  color: rgba(255,238,188,0.88);
  text-align: center;
  font-style: italic;
}

.authored-card-readings {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.authored-card-reading-item {
  position: relative;
  padding: 16px 16px 16px 18px;
  border-radius: 18px;
  background: rgba(255,236,180,0.04);
  border: 1px solid rgba(255,236,180,0.10);
}

.authored-card-reading-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, rgba(255,236,180,0.72), transparent);
}

.authored-card-reading-head {
  color: rgba(255,238,188,0.92);
  font-size: clamp(12px, 2.6vw, 14px);
  letter-spacing: 0.22em;
  margin-bottom: 8px;
}

.authored-self-reading {
  padding-top: 14px;
  border-top: 1px solid rgba(255,236,180,0.12);
}

.authored-mantra {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,236,180,0.12);
  color: var(--rewrite-accent);
  font-size: clamp(16px, 4.2vw, 22px);
  line-height: 1.8;
  letter-spacing: 0.22em;
  text-align: center;
  text-shadow: 0 0 22px rgba(255,236,180,0.34);
}

.authored-footer {
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 18px;
  flex-wrap: nowrap;
  gap: 12px;
}

.authored-ambient {
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
}

.authored-ambient--top {
  top: 0;
  height: 44vh;
  background: radial-gradient(ellipse 58% 46% at 50% 10%, rgba(255,236,180,0.18) 0%, transparent 100%);
}

.authored-ambient--bottom {
  bottom: 0;
  height: 38vh;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(201,153,58,0.08) 0%, transparent 100%);
}

@keyframes rewriteOrbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rewriteOrbitReverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes rewritePulse {
  0%, 100% { opacity: 0.34; box-shadow: 0 0 0 rgba(255,236,180,0); }
  50% { opacity: 0.72; box-shadow: 0 0 36px rgba(255,236,180,0.08); }
}

@keyframes rewriteCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (max-width: 560px) {
  #scene-rewrite-select,
  #scene-self-select,
  #scene-authored-destiny {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  .rewrite-header,
  .authored-header {
    width: min(92vw, 420px);
    padding: 0 8px;
  }

  .rewrite-title,
  .authored-title-cn {
    font-size: clamp(25px, 7.4vw, 36px);
    letter-spacing: 0.16em;
    line-height: 1.22;
  }

  .rewrite-subtitle {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.75;
    letter-spacing: 0.05em;
  }

  .destiny-choice-panel {
    width: min(94vw, 420px);
    padding: 30px 16px 22px;
  }

  .destiny-choice-title {
    font-size: clamp(26px, 8.4vw, 38px);
    letter-spacing: 0.04em;
  }

  .destiny-choice-kicker {
    letter-spacing: 0.26em;
  }

  .destiny-choice-actions {
    flex-direction: column;
  }

  .destiny-choice-actions .tarot-pill-btn {
    width: min(80vw, 280px);
  }

  .destiny-footer,
  .authored-footer {
    width: min(92vw, 420px);
    padding: 12px;
    gap: 10px;
    border-radius: 16px;
  }

  .destiny-secondary-actions,
  .authored-secondary-actions {
    gap: 8px;
  }

  .destiny-footer .tarot-pill-btn,
  .authored-footer .tarot-pill-btn {
    min-height: 44px;
    padding: 12px 14px;
  }

  .destiny-primary-action,
  .authored-primary-action {
    min-height: 50px;
    letter-spacing: 0.16em;
  }

  .rewrite-positions-bar {
    width: 100%;
    margin: 16px auto 10px;
    gap: 10px;
    padding: 0 12px;
  }

  .rewrite-pos-slot {
    flex: 1;
    min-width: 0;
  }

  .rewrite-pos-label,
  .authored-card-label,
  .self-choice-badge,
  .rewrite-card-badge {
    letter-spacing: 0.14em;
  }

  .rewrite-pos-holder {
    width: clamp(64px, 22vw, 82px);
    height: clamp(96px, 33vw, 123px);
  }

  .rewrite-grid-shell {
    width: 100%;
    margin-top: 6px;
    padding: 16px 10px 14px;
  }

  .rewrite-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .rewrite-card,
  .self-choice-card,
  .authored-card-mini {
    border-radius: 9px;
  }

  .self-select-stage {
    width: 100%;
    margin-top: 14px;
    padding: 20px 12px;
  }

  .self-choice-grid {
    gap: 10px;
    align-items: flex-start;
  }

  .self-choice-card {
    width: clamp(84px, 28vw, 108px);
  }

  .self-choice-caption {
    width: min(88vw, 360px);
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.7;
  }

  .authored-shell {
    width: 100%;
    padding: 0 12px;
  }

  .authored-status {
    margin-top: 14px;
    letter-spacing: 0.14em;
  }

  .authored-cards-showcase {
    margin-top: 16px;
    padding: 16px 10px 18px;
    border-radius: 18px;
  }

  .authored-cards-row {
    flex-wrap: nowrap;
    gap: 9px;
  }

  .authored-card-mini {
    width: min(27vw, 92px);
    flex: 0 0 auto;
  }

  .authored-self-panel {
    margin-top: 16px;
    gap: 8px;
  }

  .authored-self-label,
  .authored-section-label {
    letter-spacing: 0.20em;
  }

  .authored-self-card {
    width: clamp(102px, 35vw, 124px);
  }

  .authored-self-card .authored-card-mini {
    width: 100%;
    max-width: 124px;
  }

  .authored-reading-panel {
    margin-top: 14px;
    padding: 18px 14px 22px;
    border-radius: 18px;
  }

  .authored-reading-title {
    margin-bottom: 14px;
    letter-spacing: 0.12em;
  }

  .authored-card-reading-item {
    padding: 14px 12px 14px 16px;
    border-radius: 14px;
  }

  .authored-footer {
    flex-direction: column;
  }

  .authored-footer .tarot-pill-btn {
    width: 100%;
  }
}

/* ============================================================
   ✦ Friend Draw — 好友补牌
   ============================================================ */
#scene-friend-draw {
  z-index: 19;
  justify-content: center;
  padding: 24px 18px;
  background: radial-gradient(ellipse at 50% 28%, #151035 0%, #070614 62%, #020106 100%);
  overflow-y: auto;
}
.friend-draw-aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 35%, rgba(245,215,110,0.10), transparent 28%),
    radial-gradient(circle at 22% 72%, rgba(80,140,220,0.10), transparent 34%);
}
.friend-draw-panel {
  position: relative;
  z-index: 2;
  width: min(92vw, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.friend-draw-kicker {
  color: rgba(201,153,58,0.64);
  font-size: 11px;
  letter-spacing: 0.36em;
  margin-bottom: 8px;
}
.friend-draw-title {
  color: #f5d76e;
  font-size: clamp(28px, 8vw, 46px);
  line-height: 1.25;
  font-weight: normal;
  font-style: italic;
  letter-spacing: 0.18em;
  margin: 0;
  text-shadow: 0 0 28px rgba(245,215,110,0.72);
}
.friend-draw-copy {
  color: rgba(255,255,255,0.74);
  font-size: 14px;
  line-height: 1.85;
  letter-spacing: 0.05em;
  margin: 14px auto 20px;
  max-width: 380px;
}
.friend-draw-card {
  width: clamp(118px, 34vw, 168px);
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  cursor: pointer;
  perspective: 900px;
  filter: drop-shadow(0 12px 34px rgba(0,0,0,0.72)) drop-shadow(0 0 20px rgba(201,153,58,0.24));
}
.friend-draw-card-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  transform-style: preserve-3d;
}
.friend-draw-card-inner .card-face-wrapper,
.friend-draw-card-inner .card-back-svg {
  width: 100% !important;
  height: 100% !important;
}
.friend-draw-card-inner img {
  height: 100% !important;
  object-fit: cover;
}
.friend-draw-result {
  display: none;
  width: 100%;
  margin-top: 20px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(201,153,58,0.26);
  border-top-color: rgba(245,215,110,0.38);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(18,10,0,0.78), rgba(8,4,0,0.64));
  box-shadow: 0 8px 26px rgba(0,0,0,0.52), inset 0 1px 0 rgba(245,215,110,0.10);
}
.friend-draw-result.visible {
  display: block;
}
.friend-draw-result-label {
  color: rgba(201,153,58,0.74);
  font-size: 11px;
  letter-spacing: 0.32em;
  margin-bottom: 8px;
}
.friend-draw-result-name {
  color: #f5d76e;
  font-size: clamp(22px, 6vw, 34px);
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  text-shadow: 0 0 18px rgba(245,215,110,0.52);
}
.friend-draw-result-text {
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}
.friend-draw-actions {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.friend-draw-actions.visible {
  display: flex;
}
