/* ==========================================================================
   Tarot Reading Widget — Glassmorphism iPhone-style
   ========================================================================== */

/* ── Full-bleed breakout: force section to span full viewport width ──
   Tarot widget is a fully self-contained "chapter" — it must NOT be
   constrained by Elementor column padding / theme container max-width.
   ----------------------------------------------------------------------- */
.tarot-anchor,
.elementor-widget-tarot-reading,
.elementor-widget-tarot-reading > .elementor-widget-container,
.elementor-element.elementor-widget-tarot-reading {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
  overflow: hidden; /* contain shuffle aurora orbs */
}

/* Reset any wrapper that might add extra spacing inside the breakout */
.tarot-anchor { margin-top: 0; margin-bottom: 0; padding: 0; }

/* Screen-reader only — visually hidden but read by assistive tech */
.tarot-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tarot-section {
  --tarot-bg: #1A1F1B;
  --tarot-purple: #3D2B5F;
  --tarot-gold: #D4AF37;
  --tarot-sage: #7C8B6F;
  --tarot-rose: #D89AA0;
  --tarot-cream: #FAF6EE;
  --tarot-glass: rgba(255, 255, 255, 0.08);
  --tarot-glass-strong: rgba(255, 255, 255, 0.14);
  --tarot-stroke: rgba(255, 255, 255, 0.18);
  --tarot-text: #FAF6EE;
  --tarot-text-dim: rgba(250, 246, 238, 0.7);

  position: relative;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  min-height: 100vh;
  padding: 80px 20px;
  background-color: var(--tarot-bg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: var(--wedding-font-sans, 'Inter', sans-serif);
  color: var(--tarot-text);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.tarot-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(26, 31, 27, 0.85) 0%,
    rgba(61, 43, 95, 0.75) 50%,
    rgba(26, 31, 27, 0.9) 100%);
  z-index: 0;
}

/* Aurora orbs (floating gradient blobs) */
.tarot-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
  will-change: transform; /* keep the blurred orb on its own GPU layer */
}
.tarot-aurora-1 {
  width: 480px; height: 480px;
  top: -10%; left: -8%;
  background: radial-gradient(circle, var(--tarot-gold), transparent);
  animation: tarotFloat1 22s ease-in-out infinite;
}
.tarot-aurora-2 {
  width: 420px; height: 420px;
  bottom: -10%; right: -8%;
  background: radial-gradient(circle, var(--tarot-purple), transparent);
  animation: tarotFloat2 26s ease-in-out infinite;
}
@keyframes tarotFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}
@keyframes tarotFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, -50px); }
}

/* ── Thin wispy clouds drifting behind content ── */
.tarot-clouds {
  position: absolute;
  inset: 0;
  z-index: 1;            /* above overlay/aurora (0), below stages (2) */
  overflow: hidden;
  pointer-events: none;
}
.tarot-cloud {
  position: absolute;
  display: block;
  border-radius: 50%;
  /* Soft, feathered puff — barely-there white wisp */
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.07) 38%,
    rgba(255, 255, 255, 0) 70%
  );
  filter: blur(28px);
  opacity: 0;            /* faded in by drift animation */
  will-change: transform, opacity;
}
/* Each cloud: own size, vertical band, speed & delay for natural parallax */
.tarot-cloud-1 {
  width: 460px; height: 200px; top: 12%; left: -40%;
  animation: tarotCloudDrift 56s linear infinite;
  animation-delay: -4s;
}
.tarot-cloud-2 {
  width: 620px; height: 250px; top: 34%; left: -55%;
  animation: tarotCloudDrift 78s linear infinite;
  animation-delay: -28s;
  opacity: 0;
}
.tarot-cloud-3 {
  width: 360px; height: 150px; top: 58%; left: -35%;
  animation: tarotCloudDriftSlow 64s linear infinite;
  animation-delay: -12s;
}
.tarot-cloud-4 {
  width: 540px; height: 220px; top: 72%; left: -50%;
  animation: tarotCloudDrift 92s linear infinite;
  animation-delay: -46s;
}
.tarot-cloud-5 {
  width: 300px; height: 130px; top: 4%; left: -30%;
  animation: tarotCloudDriftSlow 70s linear infinite;
  animation-delay: -34s;
}
/* Drift left→right across the viewport, fading in/out at the edges,
   with a gentle vertical bob so it never feels mechanical. */
@keyframes tarotCloudDrift {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  12%  { opacity: 0.9; }
  50%  { transform: translate3d(90vw, -18px, 0); opacity: 0.9; }
  88%  { opacity: 0.9; }
  100% { transform: translate3d(170vw, 0, 0); opacity: 0; }
}
@keyframes tarotCloudDriftSlow {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  15%  { opacity: 0.75; }
  50%  { transform: translate3d(80vw, 16px, 0); opacity: 0.75; }
  85%  { opacity: 0.75; }
  100% { transform: translate3d(160vw, 0, 0); opacity: 0; }
}

/* ── Stage System ── */
.tarot-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  display: none;
  flex-direction: column;
  align-items: center;
  animation: tarotFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.tarot-stage.is-active { display: flex; }
@keyframes tarotFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Glass Panel ── */
.tarot-glass-panel {
  position: relative;
  width: 100%;
  padding: 36px 28px;
  background: var(--tarot-glass);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--tarot-stroke);
  border-radius: 28px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ── Stage 1: Hero ── */
.tarot-hero {
  text-align: center;
}
.tarot-hero-deco {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-bottom: 22px;
  color: var(--tarot-gold);
}
.tarot-deco-line {
  flex: 1; max-width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--tarot-gold), transparent);
}
.tarot-title {
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 44px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--tarot-cream);
  letter-spacing: -0.02em;
}
.tarot-subtitle {
  font-family: var(--wedding-font-cursive, 'Great Vibes', cursive);
  font-size: 26px;
  color: var(--tarot-gold);
  margin: 0 0 18px;
}
.tarot-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--tarot-text-dim);
  margin: 0 0 28px;
}
.tarot-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--tarot-gold), #b89028);
  color: #2a1f0c;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.2px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.32),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.tarot-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(212, 175, 55, 0.42),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.tarot-cta:active { transform: translateY(0); }

/* ── Floating cards behind hero ── */
.tarot-floating-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.tarot-floating-card {
  position: absolute;
  width: 90px; height: 144px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: blur(1.5px);
  box-shadow: 0 14px 34px -8px rgba(255, 46, 147, 0.18),
              0 8px 20px -4px rgba(139, 43, 217, 0.15);
  animation: tarotFloatCard 14s ease-in-out infinite;
  animation-delay: calc(var(--i) * -2s);
  will-change: transform;
}
.tarot-floating-card:nth-child(1) { top: 10%; left: 5%; transform: rotate(-15deg); }
.tarot-floating-card:nth-child(2) { top: 30%; right: 8%; transform: rotate(12deg); }
.tarot-floating-card:nth-child(3) { bottom: 20%; left: 12%; transform: rotate(8deg); }
.tarot-floating-card:nth-child(4) { bottom: 8%; right: 15%; transform: rotate(-22deg); }
.tarot-floating-card:nth-child(5) { top: 50%; left: 0; transform: rotate(-8deg); }
.tarot-floating-card:nth-child(6) { top: 60%; right: 0; transform: rotate(18deg); }
.tarot-floating-card:nth-child(7) { top: 5%; right: 30%; transform: rotate(-5deg); }
@keyframes tarotFloatCard {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-22px) rotate(var(--rot, 0deg)); }
}

/* ── Forms ── */
.tarot-step-indicator {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tarot-gold);
  margin-bottom: 18px;
}
.tarot-step-title {
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 22px;
  margin: 0 0 12px;
  color: var(--tarot-cream);
}
.tarot-mt-l { margin-top: 28px; }

.tarot-help {
  font-size: 12px;
  color: var(--tarot-text-dim);
  margin: 0 0 14px;
  line-height: 1.6;
}

.tarot-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--tarot-stroke);
  border-radius: 14px;
  color: var(--tarot-cream);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}
.tarot-input::placeholder { color: rgba(250, 246, 238, 0.35); }
.tarot-input:focus {
  border-color: var(--tarot-gold);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.tarot-question-input { resize: none; line-height: 1.6; min-height: 110px; }

.tarot-counter {
  text-align: right;
  font-size: 11px;
  color: var(--tarot-text-dim);
  margin-top: 6px;
}

/* ── Topic Grid ── */
.tarot-topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tarot-topic-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--tarot-stroke);
  border-radius: 14px;
  color: var(--tarot-cream);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: left;
  font-family: inherit;
}
.tarot-topic-chip:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.4);
}
.tarot-topic-chip.is-selected {
  background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.2),
    rgba(212, 175, 55, 0.05));
  border-color: var(--tarot-gold);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18);
}
.tarot-topic-emoji { font-size: 22px; }
.tarot-topic-label { font-size: 12px; font-weight: 600; }

/* ── Buttons ── */
.tarot-step-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.tarot-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.22s ease;
}
.tarot-btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--tarot-stroke);
  color: var(--tarot-text-dim);
}
.tarot-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--tarot-cream); }
.tarot-btn-primary {
  background: linear-gradient(135deg, var(--tarot-gold), #b89028);
  color: #2a1f0c;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.32);
}
.tarot-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.42);
}
.tarot-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.tarot-btn-ig {
  background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #F77737 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 24px rgba(225, 48, 108, 0.4);
}
.tarot-btn-ig:hover {
  filter: brightness(1.1) saturate(1.1);
  transform: translateY(-1px);
}

/* ── Stage 3: Shuffle ── */
.tarot-stage--shuffle { align-items: center; }
.tarot-shuffle-stage {
  position: relative;
  width: 100%;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tarot-shuffle-deck {
  position: relative;
  width: 140px; height: 220px;
  background-image: var(--tarot-card-back);
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  box-shadow:
    0 30px 80px -20px rgba(255, 46, 147, 0.45),
    0 18px 50px -10px rgba(139, 43, 217, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
/* Pseudo decks for stack effect */
.tarot-shuffle-deck::before,
.tarot-shuffle-deck::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background-image: var(--tarot-card-back);
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 36px -10px rgba(0, 0, 0, 0.45);
  filter: brightness(0.85);
}
.tarot-shuffle-deck::before { transform: translate(-6px, -3px) rotate(-3deg); z-index: -1; }
.tarot-shuffle-deck::after  { transform: translate(6px, -3px)  rotate(3deg);  z-index: -2; }

.tarot-shuffle-text {
  position: absolute;
  bottom: 0;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tarot-gold);
  animation: tarotPulseText 1.4s ease-in-out infinite;
}
@keyframes tarotPulseText {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* Flying card clones used by GSAP shuffle routines */
.tarot-flying-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px; height: 110px;
  margin-left: -35px;
  margin-top: -55px;
  border-radius: 8px;
  background-image: var(--tarot-card-back);
  background-size: cover;
  background-position: center;
  box-shadow:
    0 20px 40px -10px rgba(255, 46, 147, 0.35),
    0 10px 24px -6px rgba(139, 43, 217, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
  will-change: transform, opacity;
}

/* ── Stage 2C: Shuffle Choice ── */
.tarot-stage--shuffle-choice { max-width: 720px; }
.tarot-shuffle-choice-header {
  text-align: center;
  margin-bottom: 22px;
  width: 100%;
}
.tarot-shuffle-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  width: 100%;
  margin-bottom: 24px;
}
.tarot-shuffle-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px 14px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--tarot-stroke);
  border-radius: 18px;
  cursor: pointer;
  font-family: inherit;
  color: var(--tarot-cream);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.tarot-shuffle-choice:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 84, 176, 0.5);
  box-shadow: 0 18px 36px rgba(255, 46, 147, 0.18),
              0 0 24px rgba(139, 43, 217, 0.25);
}
.tarot-shuffle-choice.is-selected {
  background: linear-gradient(135deg,
    rgba(255, 46, 147, 0.18),
    rgba(139, 43, 217, 0.18));
  border-color: #FF54B0;
  box-shadow: 0 14px 32px rgba(255, 46, 147, 0.32),
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.tarot-shuffle-choice.is-selected::after {
  content: '✓';
  position: absolute;
  top: 10px; right: 12px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #FF2E93, #8B2BD9);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(255, 46, 147, 0.5);
}

/* Mini preview area inside each option */
.tarot-shuffle-preview {
  position: relative;
  width: 100%;
  height: 110px;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 46, 147, 0.12), rgba(10, 4, 8, 0.4) 70%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tarot-mini-card {
  position: absolute;
  top: 50%; left: 50%;
  width: 30px; height: 48px;
  margin: -24px 0 0 -15px;
  border-radius: 5px;
  background-image: var(--tarot-card-back);
  background-size: cover;
  background-position: center;
  box-shadow:
    0 8px 18px -4px rgba(255, 46, 147, 0.4),
    0 4px 10px -2px rgba(139, 43, 217, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Mini preview animations — only when hovered or selected */
.tarot-shuffle-choice:hover .tarot-mini-card,
.tarot-shuffle-choice.is-selected .tarot-mini-card {
  animation-duration: 2.4s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
}

/* 1. Riffle */
.tarot-shuffle-preview--riffle .tarot-mini-card { animation-name: miniRiffle; animation-delay: calc(var(--mc) * -0.5s); }
@keyframes miniRiffle {
  0%   { transform: translate(-22px, 0) rotate(-6deg); }
  50%  { transform: translate(22px, 0)  rotate(6deg); }
  100% { transform: translate(0, 0)     rotate(0deg); }
}

/* 2. Spiral */
.tarot-shuffle-preview--spiral .tarot-mini-card { animation-name: miniSpiral; animation-delay: calc(var(--mc) * -0.45s); }
@keyframes miniSpiral {
  0%   { transform: rotate(0deg)   translateX(0)  rotate(0deg);  }
  50%  { transform: rotate(180deg) translateX(28px) rotate(-180deg); }
  100% { transform: rotate(360deg) translateX(0)  rotate(-360deg); }
}

/* 3. Cascade */
.tarot-shuffle-preview--cascade .tarot-mini-card { animation-name: miniCascade; animation-delay: calc(var(--mc) * -0.4s); }
@keyframes miniCascade {
  0%   { transform: translateY(-60px) rotate(-12deg); opacity: 0; }
  35%  { transform: translateY(0) rotate(6deg); opacity: 1; }
  60%  { transform: translateY(-6px) rotate(-3deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 0; }
}

/* 4. Vortex */
.tarot-shuffle-preview--vortex .tarot-mini-card { animation-name: miniVortex; animation-delay: calc(var(--mc) * -0.5s); }
@keyframes miniVortex {
  0%   { transform: rotate(0deg)   translateY(-30px) rotate(0deg) scale(0.9); }
  50%  { transform: rotate(180deg) translateY(-30px) rotate(-180deg) scale(1.05); }
  100% { transform: rotate(360deg) translateY(-30px) rotate(-360deg) scale(0.9); }
}

/* 5. Phoenix */
.tarot-shuffle-preview--phoenix .tarot-mini-card { animation-name: miniPhoenix; animation-delay: calc(var(--mc) * -0.4s); }
@keyframes miniPhoenix {
  0%   { transform: scale(0.4); opacity: 0; }
  20%  { transform: scale(1.15); opacity: 1; }
  60%  { transform: translate(calc(var(--mc) * 14px - 28px), -16px) rotate(calc(var(--mc) * 30deg)) scale(1); opacity: 0.85; }
  100% { transform: scale(0.5) rotate(0); opacity: 0; }
}

.tarot-shuffle-choice-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.tarot-shuffle-choice-emoji { font-size: 22px; }
.tarot-shuffle-choice-name {
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--tarot-cream);
}
.tarot-shuffle-choice-desc {
  font-size: 11px;
  color: var(--tarot-text-dim);
  line-height: 1.5;
  letter-spacing: 0.2px;
}

/* ── Stage 4: Picking — fan deck ── */
.tarot-pick-header { text-align: center; margin-bottom: 16px; }
.tarot-pick-header h3 {
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--tarot-cream);
}
.tarot-pick-progress {
  display: inline-flex; gap: 8px; margin-top: 10px;
}
.tarot-pick-slot {
  width: 36px; height: 6px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease;
}
.tarot-pick-slot.is-filled {
  background: linear-gradient(90deg, var(--tarot-gold), #f7d97a);
}

.tarot-fan-deck {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 280px;
  margin-top: 10px;
}
.tarot-fan-card {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 90px; height: 144px;
  border-radius: 10px;
  background-image: var(--tarot-card-back);
  background-size: cover;
  background-position: center;
  box-shadow:
    0 18px 36px -8px rgba(255, 46, 147, 0.32),
    0 8px 18px -4px rgba(139, 43, 217, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-origin: bottom center;
  cursor: pointer;
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}
.tarot-fan-card:hover,
.tarot-fan-card:focus-visible {
  transform: translate(-50%, -28px) rotate(var(--rot, 0deg)) scale(1.08);
  box-shadow:
    0 30px 60px -10px rgba(255, 46, 147, 0.55),
    0 14px 28px -4px rgba(139, 43, 217, 0.45),
    0 0 24px rgba(255, 84, 176, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  z-index: 99;
  outline: none;
}
.tarot-fan-card.is-picked {
  opacity: 0.25;
  pointer-events: none;
  filter: grayscale(0.6);
}
.tarot-fan-card.is-flying {
  transition: transform 0.7s cubic-bezier(0.5, 0, 0.5, 1);
}

/* Pick action bar */
.tarot-pick-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  width: 100%;
  max-width: 360px;
}

/* ── Stage 4B: Reveal (3D flip) ── */
.tarot-stage--reveal { gap: 24px; }
.tarot-reveal-header { text-align: center; }
.tarot-reveal-header h3 {
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--tarot-cream);
}
.tarot-reveal-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  perspective: 1200px;
  width: 100%;
  flex-wrap: wrap;
}
.tarot-reveal-card {
  width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tarot-reveal-inner {
  position: relative;
  width: 110px;
  height: 176px;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.tarot-reveal-card.is-flipped .tarot-reveal-inner {
  transform: rotateY(180deg);
}
.tarot-reveal-back,
.tarot-reveal-front {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 24px 48px -12px rgba(255, 46, 147, 0.4),
    0 12px 28px -6px rgba(139, 43, 217, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.tarot-reveal-back  { background-image: var(--tarot-card-back); }
.tarot-reveal-front {
  transform: rotateY(180deg);
  background-color: #1A1F1B;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  color: var(--tarot-cream);
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 13px;
}
.tarot-reveal-front.is-reversed { transform: rotateY(180deg) rotate(180deg); }
.tarot-reveal-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tarot-gold);
  opacity: 0;
  transition: opacity 0.4s ease 0.5s;
  text-align: center;
}
.tarot-reveal-card.is-flipped .tarot-reveal-label { opacity: 1; }

/* Sparkle particle burst when card flips */
.tarot-reveal-card.is-flipped .tarot-reveal-inner::after {
  content: '';
  position: absolute;
  inset: -20px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.5) 0%, transparent 60%);
  filter: blur(8px);
  animation: tarotSparkle 1s ease-out forwards;
}
@keyframes tarotSparkle {
  0%   { opacity: 0; transform: scale(0.6); }
  40%  { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1.6); }
}

/* ── Stage 5: Processing ── */
.tarot-stage--processing { align-items: center; gap: 28px; }
.tarot-crystal-ball {
  position: relative;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(255, 255, 255, 0.5),
    var(--tarot-purple) 60%,
    rgba(0, 0, 0, 0.5));
  display: grid; place-items: center;
  color: var(--tarot-gold);
  animation: tarotCrystalSpin 8s linear infinite;
  will-change: transform;
  box-shadow: 0 0 40px rgba(61, 43, 95, 0.6),
              inset 0 -10px 30px rgba(0, 0, 0, 0.4);
}
.tarot-crystal-glow {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.4), transparent 60%);
  filter: blur(20px);
  animation: tarotPulseGlow 2.4s ease-in-out infinite;
}
@keyframes tarotCrystalSpin { to { transform: rotate(360deg); } }
@keyframes tarotPulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
.tarot-processing-text {
  font-size: 14px;
  color: var(--tarot-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  animation: tarotPulseText 1.6s ease-in-out infinite;
}

/* ── Stage 6: Result ── */
.tarot-stage--result { max-width: 560px; }
.tarot-result-wrap {
  width: 100%;
  display: flex; justify-content: center;
  margin-bottom: 22px;
}
.tarot-result-canvas {
  width: 100%;
  max-width: 360px; /* preview size — actual export 1080×1920 */
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
              0 0 0 1px var(--tarot-stroke);
}
.tarot-result-meta {
  display: none; /* narration shown only on download card; UI focus on canvas */
}
.tarot-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 14px;
}
.tarot-result-actions .tarot-btn-ig { grid-column: 1 / -1; }
.tarot-result-actions .tarot-btn:last-child { grid-column: 1 / -1; }
.tarot-disclaimer {
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--tarot-text-dim);
  font-style: italic;
  margin: 12px 0 0;
}

/* ── IG Share Modal (tier 2 fallback) ── */
.tarot-ig-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}
.tarot-ig-modal.is-open { display: flex; }
.tarot-ig-modal-content {
  background: rgba(26, 31, 27, 0.96);
  border: 1px solid var(--tarot-stroke);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  color: var(--tarot-cream);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.tarot-ig-modal-content h3 {
  font-family: var(--wedding-font-serif, 'Playfair Display', serif);
  font-size: 22px;
  margin: 0 0 12px;
}
.tarot-ig-modal-content p { font-size: 13px; line-height: 1.7; color: var(--tarot-text-dim); }
.tarot-ig-steps {
  text-align: left;
  margin: 16px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  font-size: 13px;
  color: var(--tarot-text-dim);
  line-height: 1.7;
}
.tarot-ig-steps li { margin: 6px 0 6px 20px; }
.tarot-ig-steps strong { color: #FF54B0; font-weight: 700; }

/* Mention box (auto-bake @bride @groom) */
.tarot-ig-mention-box {
  margin: 18px 0;
  padding: 16px;
  background: linear-gradient(135deg,
    rgba(255, 46, 147, 0.1),
    rgba(139, 43, 217, 0.1));
  border: 1px solid rgba(255, 84, 176, 0.4);
  border-radius: 14px;
  text-align: center;
}
.tarot-ig-mention-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tarot-text-dim);
  margin-bottom: 10px;
}
.tarot-ig-mentions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.tarot-ig-mention-pill {
  padding: 8px 16px;
  background: linear-gradient(135deg, #FF2E93, #8B2BD9);
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 16px rgba(255, 46, 147, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* IG modal action buttons */
.tarot-ig-modal .tarot-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
}

/* Modal lead paragraph (intro under title) */
.tarot-ig-modal-lead {
  margin: 0 0 14px !important;
}

/* Close (X) button at top-right of modal */
.tarot-ig-modal-content { position: relative; }
.tarot-ig-modal-close-x {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--tarot-stroke);
  border-radius: 50%;
  color: var(--tarot-text-dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  font-family: inherit;
}
.tarot-ig-modal-close-x:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--tarot-cream);
}

/* Inline preview thumbnail (long-press to save on mobile) */
.tarot-ig-preview {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.tarot-ig-preview img {
  width: 160px;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--tarot-stroke);
  box-shadow:
    0 18px 40px -8px rgba(255, 46, 147, 0.4),
    0 8px 20px -4px rgba(139, 43, 217, 0.3);
  -webkit-touch-callout: default; /* allow long-press save on iOS */
  touch-action: manipulation;
}
.tarot-ig-preview-hint {
  font-size: 11px !important;
  letter-spacing: 0.4px;
  color: var(--tarot-gold) !important;
  margin: 0 !important;
  text-align: center;
}

/* Action button row (Open IG + Copy Caption side by side on wide, stacked on mobile) */
.tarot-ig-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.tarot-ig-modal-actions .tarot-btn { margin-top: 0; }


/* ── Mobile ── */
@media (max-width: 520px) {
  .tarot-section {
    padding: 56px 12px !important;
    background-attachment: scroll;
  }
  .tarot-title { font-size: 36px; }
  .tarot-subtitle { font-size: 22px; }
  .tarot-glass-panel { padding: 26px 18px; border-radius: 22px; }
  .tarot-topic-grid { grid-template-columns: 1fr; }
  .tarot-fan-deck { height: 240px; }
  .tarot-fan-card { width: 70px; height: 112px; }
  .tarot-result-canvas { max-width: 100%; }
  .tarot-shuffle-choice-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tarot-shuffle-preview { height: 90px; }
  .tarot-shuffle-choice { padding: 14px 10px 12px; }
  .tarot-shuffle-choice-name { font-size: 13px; }
  .tarot-shuffle-choice-desc { font-size: 10px; }
  .tarot-stage { max-width: 100%; }
}

/* ── Extra small (≤ 380px) ── */
@media (max-width: 380px) {
  .tarot-section { padding: 48px 8px !important; }
  .tarot-glass-panel { padding: 22px 14px; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .tarot-floating-card,
  .tarot-aurora,
  .tarot-crystal-ball,
  .tarot-crystal-glow,
  .tarot-mini-card,
  .tarot-cloud {
    animation: none !important;
  }
  .tarot-cloud { opacity: 0.5 !important; }
  .tarot-stage { animation: none; }
}
