/* ===== CSS Variables — Warm Mystic Palette (V11 CONFIRMED) ===== */
:root {
  --bg-cream: #FFF5F0;
  --bg-lavender: #F0E6FA;
  --bg-peach: #FFE4E8;
  --bg-warm-mid: #FBF0F5;
  --purple-mist: #9B7BB8;
  --purple-glow: #B490CA;
  --rose-gold: #E8B4B8;
  --warm-gold: #D4A574;
  --card-bg: rgba(255,255,255,0.7);
  --text-main: #2D1B4E;
  --text-dim: #6B5278;
  --accent-pink: #E8A0B0;
  --accent-lavender: #9B7BB8;
  --star-color: rgba(212,165,116,0.7);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Georgia', 'Times New Roman', 'Segoe UI Symbol', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', serif;
  background: linear-gradient(135deg, #FFF5F0 0%, #FBF0F5 25%, #F0E6FA 50%, #FFE4E8 75%, #FFF5F0 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Aurora / Light Band Effect ===== */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    linear-gradient(60deg, transparent 30%, rgba(155,123,184,0.06) 45%, rgba(212,165,116,0.06) 55%, transparent 70%),
    linear-gradient(-60deg, transparent 40%, rgba(232,180,184,0.05) 55%, rgba(155,123,184,0.04) 65%, transparent 80%);
  background-size: 200% 200%;
  animation: auroraShift 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes auroraShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Canvas Layers ===== */
#starCanvas, #constellationCanvas, #particleCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
}
#starCanvas { z-index: 0; }
#constellationCanvas { z-index: 1; }
#particleCanvas { z-index: 2; }

/* ===== Floating Magic Symbols ===== */
.magic-symbol-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  overflow: hidden;
}
.magic-sym {
  position: absolute;
  font-size: 1.1rem;
  opacity: 0.08;
  color: var(--warm-gold);
  animation: floatSym 18s ease-in-out infinite;
}
@keyframes floatSym {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.06; }
  50% { transform: translateY(-30px) rotate(15deg); opacity: 0.12; }
}

/* ===== Splash Screen ===== */
#splash {
  position: fixed; top: 0; left: 0; z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100vw; height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #FFF5F0 0%, #FBF0F5 25%, #F0E6FA 50%, #FFE4E8 75%, #FFF5F0 100%);
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#splash::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(60, 30, 40, 0.10);
  pointer-events: none;
  z-index: 0;
}
#splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Crystal Ball */
.crystal-container {
  position: relative; width: 220px; height: 220px;
  animation: floatCrystal 4s ease-in-out infinite;
}
@keyframes floatCrystal {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
.crystal-ball {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.4) 0%, rgba(255,235,205,0.3) 18%, rgba(224,185,130,0.4) 42%, rgba(160,120,75,0.6) 68%, rgba(80,50,30,0.9) 100%);
  box-shadow:
    0 0 60px rgba(212, 165, 116, 0.45),
    0 0 120px rgba(212, 165, 116, 0.25),
    0 0 200px rgba(232, 180, 184, 0.12),
    inset 0 0 40px rgba(255, 220, 170, 0.1);
  position: relative;
  overflow: hidden;
}
.crystal-ball::before {
  content: ''; position: absolute;
  top: 15%; left: 20%; width: 30%; height: 25%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5) 0%, transparent 70%);
  transform: rotate(-25deg);
}
.crystal-ball::after {
  content: ''; position: absolute;
  bottom: 20%; right: 22%; width: 18%; height: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,220,200,0.35) 0%, transparent 70%);
}

/* Runes around crystal */
.rune-ring {
  position: absolute; inset: -40px;
  border-radius: 50%;
  animation: spinRune 20s linear infinite;
}
@keyframes spinRune { to { transform: rotate(360deg); } }
.rune {
  position: absolute;
  color: rgba(190, 145, 100, 0.85);
  font-size: 22px;
  text-shadow: 0 0 12px rgba(212, 165, 116, 0.55);
  animation: pulseRune 3s ease-in-out infinite;
}
.rune:nth-child(1) { top: 5%; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.rune:nth-child(2) { top: 18%; right: 5%; animation-delay: 0.4s; }
.rune:nth-child(3) { top: 50%; right: 1%; transform: translateY(-50%); animation-delay: 0.8s; }
.rune:nth-child(4) { bottom: 18%; right: 5%; animation-delay: 1.2s; }
.rune:nth-child(5) { bottom: 5%; left: 50%; transform: translateX(-50%); animation-delay: 1.6s; }
.rune:nth-child(6) { bottom: 18%; left: 5%; animation-delay: 2.0s; }
.rune:nth-child(7) { top: 50%; left: 1%; transform: translateY(-50%); animation-delay: 2.4s; }
.rune:nth-child(8) { top: 18%; left: 5%; animation-delay: 2.8s; }
@keyframes pulseRune {
  0%, 100% { opacity: 0.4; text-shadow: 0 0 8px rgba(212,165,116,0.3); }
  50% { opacity: 1; text-shadow: 0 0 20px rgba(212,165,116,0.9), 0 0 40px rgba(212,165,116,0.4); }
}

/* Magic circle ring */
.magic-ring {
  position: absolute; inset: -20px;
  border: 2px solid rgba(190, 145, 100, 0.35);
  border-radius: 50%;
  animation: spinRune 15s linear infinite reverse;
}
.magic-ring::before {
  content: ''; position: absolute;
  inset: -8px;
  border: 1px dashed rgba(155, 123, 184, 0.25);
  border-radius: 50%;
  animation: spinRune 25s linear infinite;
}

/* Splash CTA */
.splash-cta {
  margin-top: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: fadeInUp 1s ease 0.5s both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.splash-title {
  font-size: 2.4rem;
  background: linear-gradient(135deg, #D4A574, #E8B4B8, #9B7BB8, #D4A574);
  background-size: 300% 300%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
  letter-spacing: 0.15em;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.splash-sub {
  color: rgba(80, 55, 90, 0.55);
  font-size: 1rem;
  letter-spacing: 0.2em;
  animation: pulseSub 3s ease-in-out infinite;
}
@keyframes pulseSub { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* Click ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(212, 165, 116, 0.6);
  animation: rippleOut 1.2s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleOut {
  to { width: 500px; height: 500px; margin-left: -250px; margin-top: -250px; opacity: 0; }
}

/* ===== Main Content ===== */
#main-content {
  position: relative; z-index: 3;
  max-width: 900px; margin: 0 auto;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 20px;
  opacity: 0; transform: translateY(30px);
  transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
}
#main-content.visible { opacity: 1; transform: translateY(0); }

/* ===== Header / Logo ===== */
.header {
  text-align: center; padding: 24px 20px 10px;
  position: relative;
}
.logo-icon {
  font-size: 2.4rem;
  display: inline-block;
  animation: floatCrystal 5s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(155, 123, 184, 0.4));
}
.site-title {
  font-size: 2.4rem;
  margin-top: 4px;
  background: linear-gradient(135deg, #D4A574 0%, #E8B4B8 30%, #9B7BB8 60%, #D4A574 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s ease-in-out infinite;
  letter-spacing: 0.1em;
}
.site-subtitle {
  color: var(--text-dim);
  font-size: 1rem;
  margin-top: 4px;
  letter-spacing: 0.12em;
}
.constellation-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; margin: 8px 0 4px;
}
.constellation-divider .line {
  width: 70px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155,123,184,0.4), transparent);
}
.constellation-divider .symbol {
  font-size: 1.1rem; color: rgba(212,165,116,0.5);
  animation: pulseRune 4s ease-in-out infinite;
}

/* ===== Tool Cards Section ===== */
.tools-grid {
  display: flex; flex-direction: column; gap: 14px;
  padding: 0 10px;
}
.tool-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(155,123,184,0.2);
  border-radius: 20px;
  padding: 22px 24px;
  cursor: pointer;
  display: flex; align-items: center; gap: 18px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0% 50%, rgba(155,123,184,0.08) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.35s;
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover {
  transform: translateX(8px);
  border-color: rgba(155,123,184,0.5);
  box-shadow: 0 8px 40px rgba(155,123,184,0.12), 0 0 0 1px rgba(212,165,116,0.2), 0 0 20px rgba(212,165,116,0.08);
}
.tool-card:hover .tool-emoji {
  transform: scale(1.15);
  filter: drop-shadow(0 0 12px rgba(212,165,116,0.5));
}
.tool-emoji {
  font-size: 2.4rem; width: 56px; text-align: center; flex-shrink: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-info { flex: 1; }
.tool-name {
  font-size: 1.2rem; color: var(--text-main);
  letter-spacing: 0.05em; margin-bottom: 4px; font-weight: 600;
}
.tool-desc {
  font-size: 0.86rem; color: var(--text-dim);
  line-height: 1.5;
}
.tool-arrow {
  color: rgba(212,165,116,0.5);
  font-size: 1.2rem; flex-shrink: 0;
  transition: all 0.35s;
}
.tool-card:hover .tool-arrow {
  color: rgba(212,165,116,0.9);
  transform: translateX(4px);
}

/* ===== Flow Pages (hidden by default) ===== */
.flow-page {
  display: none;
  position: fixed; inset: 0; z-index: 50;
  background: linear-gradient(135deg, #FFF5F0 0%, #FBF0F5 25%, #F0E6FA 50%, #FFE4E8 75%, #FFF5F0 100%);
  flex-direction: column; align-items: center;
  justify-content: safe center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.flow-page.active { display: flex; }

/* Back button */
.back-btn {
  position: absolute; top: 20px; left: 20px;
  background: rgba(255,255,255,0.6); border: 1px solid rgba(155,123,184,0.25);
  color: var(--text-dim); padding: 10px 20px; border-radius: 30px;
  cursor: pointer; font-family: inherit; font-size: 0.9rem;
  transition: all 0.3s; z-index: 10;
  backdrop-filter: blur(10px);
}
.back-btn:hover {
  border-color: rgba(155,123,184,0.5);
  color: var(--text-main); box-shadow: 0 0 20px rgba(155,123,184,0.12);
}

/* Flow title */
.flow-title {
  font-size: 2rem; margin: 16px 0 10px;
  background: linear-gradient(135deg, #D4A574, #E8B4B8, #9B7BB8);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s ease-in-out infinite;
}
.flow-subtitle { color: var(--warm-gold); font-size: 0.95rem; margin-bottom: 20px; letter-spacing: 0.12em; font-style: italic; opacity: 0.85; }

/* Zodiac Grid */
.zodiac-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 640px; width: 100%; padding: 0 16px;
}
@media (max-width: 550px) { .zodiac-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 500px; } }
.zodiac-card {
  background: var(--card-bg); backdrop-filter: blur(15px);
  border: 1px solid rgba(155,123,184,0.2);
  border-radius: 16px; padding: 18px 8px;
  text-align: center; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.zodiac-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(155,123,184,0.1) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.zodiac-card:hover { border-color: rgba(155,123,184,0.5); transform: translateY(-3px); box-shadow: 0 0 16px rgba(155,123,184,0.1); }
.zodiac-card:hover::after { opacity: 1; }
.zodiac-card.selected {
  border-color: rgba(212,165,116,0.7);
  box-shadow: 0 0 24px rgba(212,165,116,0.2), 0 0 48px rgba(155,123,184,0.1);
  background: rgba(255,255,255,0.85);
  transform: translateY(-3px) scale(1.03);
}
.zodiac-card.selected::after { opacity: 1; background: radial-gradient(ellipse at center, rgba(212,165,116,0.15) 0%, transparent 70%); }
.zodiac-emoji { font-size: 2.4rem; display: block; margin-bottom: 6px; }
.zodiac-name { font-size: 0.88rem; color: var(--text-dim); }
.zodiac-card.selected .zodiac-name { color: var(--warm-gold); }
.zodiac-date { font-size: 0.68rem; color: rgba(107,82,120,0.5); margin-top: 3px; }

/* Mood Grid */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  max-width: 940px;
  width: 100%;
  padding: 0 16px;
}
@media (max-width: 800px) {
  .mood-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 560px;
  }
}
@media (max-width: 500px) {
  .mood-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 380px;
  }
}
.mood-card {
  background: var(--card-bg); backdrop-filter: blur(15px);
  border: 1px solid rgba(155,123,184,0.2);
  border-radius: 18px; padding: 18px 8px;
  text-align: center; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.mood-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(212,165,116,0.08) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.mood-card:hover {
  border-color: rgba(212,165,116,0.5);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(212,165,116,0.12), 0 0 32px rgba(155,123,184,0.08);
}
.mood-card:hover::after { opacity: 1; }
.mood-card.selected {
  border-color: rgba(212,165,116,0.7);
  box-shadow: 0 0 32px rgba(212,165,116,0.15), 0 0 48px rgba(155,123,184,0.1), inset 0 0 20px rgba(212,165,116,0.05);
  background: rgba(255,255,255,0.85);
  transform: translateY(-3px) scale(1.03);
}
.mood-card.selected::after {
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(212,165,116,0.12) 0%, transparent 70%);
}
.mood-emoji { font-size: 2.2rem; display: block; margin-bottom: 5px; transition: transform 0.3s; }
.mood-card:hover .mood-emoji { transform: scale(1.12); }
.mood-name { font-size: 0.88rem; color: var(--text-main); margin-bottom: 3px; font-weight: 600; }
.mood-desc { font-size: 0.68rem; color: var(--text-dim); line-height: 1.4; }
.mood-card.selected .mood-name { color: var(--warm-gold); }
.mood-card.selected .mood-desc { color: var(--warm-gold); opacity: 0.75; }

/* Proceed Btn */
.proceed-btn {
  margin-top: 32px;
  background: linear-gradient(135deg, rgba(155,123,184,0.5), rgba(212,165,116,0.5));
  border: 1px solid rgba(155,123,184,0.35);
  color: var(--text-main); padding: 14px 48px; border-radius: 40px;
  cursor: pointer; font-family: inherit; font-size: 1.05rem;
  letter-spacing: 0.1em;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}
.proceed-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(155,123,184,0.65), rgba(212,165,116,0.65));
  border-color: rgba(212,165,116,0.6);
  box-shadow: 0 0 32px rgba(155,123,184,0.25);
  transform: translateY(-2px);
}
.proceed-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ===== Loading State ===== */
.loading-overlay {
  display: none; position: fixed; inset: 0; z-index: 60;
  background: linear-gradient(135deg, #2D1B4E 0%, #1a0a30 40%, #0a0012 100%);
  flex-direction: column; align-items: center; justify-content: center;
}
.loading-overlay.active { display: flex; }
.loading-crystal {
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.3) 0%, rgba(255,235,205,0.25) 18%, rgba(224,185,130,0.4) 45%, rgba(160,120,75,0.6) 70%, rgba(80,50,30,0.9) 100%);
  box-shadow: 0 0 40px rgba(212,165,116,0.5), 0 0 80px rgba(212,165,116,0.3);
  animation: crystalPulse 1.6s ease-in-out infinite;
  position: relative;
}
.loading-crystal::before {
  content: ''; position: absolute;
  top: 18%; left: 22%; width: 25%; height: 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5) 0%, transparent 70%);
}
@keyframes crystalPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(212,165,116,0.5), 0 0 80px rgba(212,165,116,0.3); }
  33% { transform: scale(1.12); box-shadow: 0 0 60px rgba(212,165,116,0.7), 0 0 120px rgba(212,165,116,0.5); }
  66% { transform: scale(0.95); box-shadow: 0 0 30px rgba(212,165,116,0.4), 0 0 60px rgba(212,165,116,0.2); }
}
.loading-text {
  margin-top: 24px; color: rgba(180,150,120,0.8);
  font-size: 1rem; letter-spacing: 0.1em;
  animation: pulseSub 2s ease-in-out infinite;
}
.loading-orbs {
  display: flex; gap: 10px; margin-top: 16px;
}
.loading-orb {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--warm-gold);
  animation: orbBounce 1.4s ease-in-out infinite;
}
.loading-orb:nth-child(2) { animation-delay: 0.2s; }
.loading-orb:nth-child(3) { animation-delay: 0.4s; }
@keyframes orbBounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.3; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* ===== Result Page ===== */
.result-page {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: linear-gradient(135deg, #FFF5F0 0%, #FBF0F5 25%, #F0E6FA 50%, #FFE4E8 75%, #FFF5F0 100%);
  flex-direction: column; align-items: center;
  justify-content: safe center;
  justify-content: center;
  padding: 20px; overflow-y: auto; overflow-x: hidden;
}
.result-page.active { display: flex; }
.result-header {
  text-align: center; padding: 40px 20px 20px;
}
.result-zodiac { font-size: 4rem; display: block; animation: floatCrystal 4s ease-in-out infinite; }
.result-title {
  font-size: 1.8rem; margin-top: 8px;
  background: linear-gradient(135deg, #D4A574, #E8B4B8, #9B7BB8);
  background-size: 200% 200%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s ease-in-out infinite;
}

/* Keyword Tags */
.tag-cloud {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 10px 0 20px;
}
.tag {
  background: rgba(155,123,184,0.12); border: 1px solid rgba(155,123,184,0.25);
  border-radius: 30px; padding: 8px 20px;
  font-size: 0.9rem; color: var(--text-main);
  animation: fadeInUp 0.6s ease both;
}
.tag:nth-child(1) { animation-delay: 0.1s; }
.tag:nth-child(2) { animation-delay: 0.25s; }
.tag:nth-child(3) { animation-delay: 0.4s; }
.tag:nth-child(4) { animation-delay: 0.55s; }

/* Fortune Card */
.fortune-card {
  max-width: 600px; width: 100%;
  background: var(--card-bg); backdrop-filter: blur(20px);
  border: 1px solid rgba(155,123,184,0.2);
  border-radius: 24px; padding: 32px 28px;
  position: relative; overflow: visible;
  box-sizing: border-box;
}
.fortune-card::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 0%, rgba(155,123,184,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.fortune-section { margin-bottom: 28px; }
.fortune-section:last-child { margin-bottom: 0; }
.fortune-label {
  font-size: 0.75rem; color: var(--warm-gold); letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 8px;
}
.fortune-text {
  font-size: 1.05rem; color: var(--text-main);
  line-height: 1.7; font-style: italic;
}

/* Detail Grid */
.detail-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin-top: 20px;
}
@media (max-width: 450px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-item {
  background: rgba(255,255,255,0.5); border: 1px solid rgba(155,123,184,0.15);
  border-radius: 16px; padding: 18px;
  text-align: center; transition: all 0.3s;
}
.detail-item:hover {
  border-color: rgba(155,123,184,0.35);
  box-shadow: 0 4px 20px rgba(155,123,184,0.1);
}
.detail-icon { font-size: 1.8rem; margin-bottom: 6px; }
.detail-label { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.15em; text-transform: uppercase; }
.detail-value { font-size: 1.1rem; color: var(--text-main); margin-top: 4px; }

/* Result Actions */
.result-actions {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  margin-top: 28px;
}
.action-btn {
  background: rgba(255,255,255,0.6); border: 1px solid rgba(155,123,184,0.25);
  color: var(--text-main); padding: 12px 28px; border-radius: 30px;
  cursor: pointer; font-family: inherit; font-size: 0.9rem;
  transition: all 0.3s; letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
}
.action-btn:hover {
  border-color: rgba(212,165,116,0.5);
  box-shadow: 0 0 20px rgba(155,123,184,0.15);
  transform: translateY(-2px);
}
.action-btn.primary {
  background: linear-gradient(135deg, rgba(155,123,184,0.4), rgba(212,165,116,0.4));
  border-color: rgba(155,123,184,0.35);
}
.action-btn.primary:hover {
  background: linear-gradient(135deg, rgba(155,123,184,0.55), rgba(212,165,116,0.55));
  border-color: rgba(212,165,116,0.5);
}

/* ===== Prompt Card (Portrait Gift) ===== */
.prompt-card {
  max-width: 600px; width: 100%;
  background: rgba(255,255,255,0.8); backdrop-filter: blur(20px);
  border: 1px solid rgba(155,123,184,0.2);
  border-radius: 24px; padding: 28px 24px;
  margin-bottom: 20px;
}
.prompt-box {
  background: rgba(45,27,78,0.06);
  border: 1px solid rgba(155,123,184,0.2);
  border-radius: 14px; padding: 18px; margin: 14px 0;
  font-style: italic; line-height: 1.6;
  color: var(--text-main); font-size: 0.95rem;
  position: relative;
}
.prompt-box .copy-btn-top {
  position: absolute; top: 10px; right: 10px;
  background: var(--card-bg); border: 1px solid rgba(155,123,184,0.25);
  border-radius: 20px; padding: 6px 14px; cursor: pointer;
  font-family: inherit; font-size: 0.78rem; color: var(--text-dim);
  transition: all 0.3s;
}
.prompt-box .copy-btn-top:hover {
  border-color: rgba(212,165,116,0.5); color: var(--warm-gold);
}

/* ===== Platform Recommendation Cards ===== */
.platform-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  max-width: 600px; width: 100%;
}
.platform-card {
  background: var(--card-bg); backdrop-filter: blur(15px);
  border: 1px solid rgba(155,123,184,0.15);
  border-radius: 16px; padding: 18px; text-align: center;
  cursor: pointer; transition: all 0.3s;
  text-decoration: none; color: inherit; display: block;
}
.platform-card:hover {
  border-color: rgba(212,165,116,0.4);
  box-shadow: 0 4px 20px rgba(155,123,184,0.1);
  transform: translateY(-2px);
}
.platform-card.free { border-left: 3px solid #8BC34A; }
.platform-card.paid { border-left: 3px solid var(--warm-gold); }
.platform-badge {
  display: inline-block; padding: 3px 12px; border-radius: 12px;
  font-size: 0.65rem; letter-spacing: 0.15em; margin-bottom: 8px;
}
.platform-badge.free { background: rgba(139,195,74,0.15); color: #6B9B37; }
.platform-badge.paid { background: rgba(212,165,116,0.15); color: var(--warm-gold); }
.platform-name { font-size: 1rem; font-weight: 600; margin-bottom: 3px; color: var(--text-main); }
.platform-model { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 2px; }
.platform-limit { font-size: 0.7rem; color: var(--warm-gold); opacity: 0.8; }
.platform-price { font-size: 0.72rem; color: var(--text-dim); opacity: 0.7; }

/* ===== Share Section ===== */
.share-section {
  max-width: 600px; width: 100%; margin-top: 20px;
  text-align: center;
}
.share-buttons {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px;
}
.share-btn {
  background: rgba(255,255,255,0.6); border: 1px solid rgba(155,123,184,0.2);
  border-radius: 30px; padding: 10px 22px; cursor: pointer;
  font-family: inherit; font-size: 0.85rem; color: var(--text-main);
  transition: all 0.3s; display: flex; align-items: center; gap: 6px;
}
.share-btn:hover {
  border-color: rgba(212,165,116,0.4);
  box-shadow: 0 0 14px rgba(155,123,184,0.1);
}

/* ===== Footer ===== */
.site-footer {
  text-align: center; padding: 30px 20px 20px;
  color: var(--text-dim); font-size: 0.82rem;
}
.site-footer .symbols { margin-bottom: 8px; font-size: 1rem; letter-spacing: 0.3em; color: rgba(212,165,116,0.4); }

/* ===== Spark animation ===== */
.spark-particle {
  position: fixed; pointer-events: none; z-index: 200;
  animation: sparkFly 1.5s ease-out forwards;
}
@keyframes sparkFly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0); }
}

/* ===== Tarot Cards — v4 Simplified ===== */
.tarot-spread {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
  max-width: 600px; width: 100%; margin: 20px 0;
}
.tarot-card-wrap {
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,165,116,0.15);
}
.tarot-card-back-v4 {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: linear-gradient(145deg, #2D1B4E 0%, #1e0e3d 30%, #150a2e 60%, #2D1B4E 100%);
  border: 2px solid rgba(212,165,116,0.4);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 40px rgba(155,123,184,0.1), inset 0 0 40px rgba(155,123,184,0.08);
  overflow: hidden;
}
.tarot-card-back-v4::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px solid rgba(212,165,116,0.25);
  border-radius: 10px;
  pointer-events: none;
}
.tarot-card-back-v4::after {
  content: ''; position: absolute; inset: 16px;
  border: 1px dashed rgba(212,165,116,0.15);
  border-radius: 6px;
  pointer-events: none;
}
.tarot-card-front-v4 {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #1a0e38 0%, #231345 30%, #1D0F3A 70%, #150a2e 100%);
  border: 2px solid rgba(212,165,116,0.5);
  border-radius: 14px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  backface-visibility: hidden;
  box-shadow: inset 0 0 30px rgba(155,123,184,0.08);
  overflow: hidden;
}
.tarot-card-front-v4::before {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid rgba(212,165,116,0.2);
  border-radius: 10px;
  pointer-events: none;
}
@keyframes tarotGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(212,165,116,0.3), 0 0 20px rgba(212,165,116,0.1); }
  50% { box-shadow: 0 0 20px rgba(212,165,116,0.6), 0 0 45px rgba(155,123,184,0.4), 0 0 60px rgba(212,165,116,0.2); }
}

/* ===== Element Image Selection — V3 SVG Art ===== */
.element-img-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  max-width: 480px; width: 100%; padding: 0 12px;
}
@media (max-width: 480px) { .element-img-grid { gap: 8px; max-width: 380px; } }

.element-img-card {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 6px 6px;
  background: linear-gradient(145deg, rgba(255,255,255,0.7) 0%, rgba(250,245,255,0.55) 100%);
  backdrop-filter: blur(16px);
  border: 2px solid rgba(155,123,184,0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  box-shadow: 0 2px 14px rgba(155,123,184,0.07);
  aspect-ratio: 4/3;
}
.element-img-card .img-svg-wrap {
  width: 90%; flex: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  padding: 2px 0;
  transition: transform 0.3s ease;
}
.element-img-card .img-svg-wrap svg {
  width: 100%; height: 100%;
  border-radius: 6px;
  display: block;
}
.element-img-card:hover .img-svg-wrap { transform: scale(1.03) translateY(-1px); }
.element-img-card .img-label {
  font-size: 0.55rem; color: var(--text-dim);
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 700; z-index: 1; margin-top: 2px;
  flex-shrink: 0;
}
.element-img-card:hover {
  border-color: rgba(212,165,116,0.45);
  box-shadow: 0 8px 28px rgba(155,123,184,0.14);
  transform: translateY(-3px);
}
.element-img-card.selected {
  border-color: var(--warm-gold);
  background: linear-gradient(145deg, rgba(255,250,240,0.88) 0%, rgba(255,245,230,0.78) 100%);
  box-shadow: 0 0 24px rgba(212,165,116,0.28), 0 4px 20px rgba(212,165,116,0.12);
  transform: translateY(-3px) scale(1.04);
}
.element-img-card.selected .img-label { color: var(--warm-gold); }
/* Selection order badge */
.element-img-card .sel-badge {
  position: absolute; top: 4px; right: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--warm-gold); color: #fff;
  font-size: 0.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(212,165,116,0.4);
  z-index: 2;
}

/* ===== Pollinations Preview ===== */
.pollinations-preview {
  max-width: 600px; width: 100%; margin-top: 16px;
  text-align: center;
}
.pollinations-preview img {
  max-width: 100%; border-radius: 16px;
  box-shadow: 0 4px 24px rgba(155,123,184,0.12);
}
.pollinations-note {
  font-size: 0.72rem; color: var(--text-dim); margin-top: 6px;
  font-style: italic; opacity: 0.7;
}

/* ===== Custom Select Dropdown — Mystic Theme ===== */
.custom-select {
  position: relative;
  width: 100%;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1rem;
  color: var(--text-main);
}
.custom-select-trigger {
  width: 100%;
  padding: 14px 44px 14px 18px;
  border-radius: 30px;
  border: 1px solid rgba(155,123,184,0.3);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(155,123,184,0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239B7BB8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
  user-select: none;
}
.custom-select-trigger:hover {
  border-color: rgba(155,123,184,0.55);
  box-shadow: 0 4px 20px rgba(155,123,184,0.10);
}
.custom-select-trigger.active {
  border-color: rgba(212,165,116,0.6);
  box-shadow: 0 0 20px rgba(155,123,184,0.18), 0 0 40px rgba(212,165,116,0.10);
}
.custom-select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(155,123,184,0.2);
  box-shadow: 0 8px 32px rgba(155,123,184,0.15);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}
.custom-select.open .custom-select-options {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.custom-select-option {
  padding: 12px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(155,123,184,0.08);
}
.custom-select-option:last-child { border-bottom: none; }
.custom-select-option:hover {
  background: rgba(155,123,184,0.1);
  color: var(--text-main);
}
.custom-select-option.selected {
  background: rgba(212,165,116,0.15);
  color: var(--text-main);
  font-weight: 600;
}

/* ===== Date Picker — Year/Month/Day Drum Rollers ===== */
.calendar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,10,40,0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding-bottom: 0;
}
.calendar-overlay.active { display: flex; }
.calendar-popup {
  background: linear-gradient(160deg, rgba(255,255,255,0.97) 0%, rgba(250,245,255,0.96) 100%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(155,123,184,0.2);
  border-radius: 28px;
  padding: 20px 20px 14px;
  width: min(340px, 95vw);
  box-shadow: 0 -4px 60px rgba(155,123,184,0.18), 0 20px 80px rgba(0,0,0,0.15);
  animation: pickerSlideUp 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes pickerSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Picker title */
.picker-title {
  text-align: center; font-family: 'Georgia', serif;
  font-size: 1rem; color: var(--text-main);
  letter-spacing: 0.06em; margin-bottom: 16px;
  font-weight: 600;
}
/* Three drums container */
.picker-drums {
  display: flex; gap: 8px; align-items: stretch;
  position: relative;
}
/* Selected highlight bar */
.picker-drums::before {
  content: '';
  position: absolute; left: 8px; right: 8px;
  top: 50%; transform: translateY(-50%);
  height: 44px;
  background: linear-gradient(90deg, rgba(155,123,184,0.12), rgba(212,165,116,0.10), rgba(155,123,184,0.12));
  border-top: 1.5px solid rgba(212,165,116,0.35);
  border-bottom: 1.5px solid rgba(212,165,116,0.35);
  border-radius: 10px;
  pointer-events: none; z-index: 1;
}
/* Each drum column */
.picker-drum {
  flex: 1; display: flex; flex-direction: column; align-items: center;
}
.picker-drum-label {
  font-size: 0.62rem; color: var(--text-dim);
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 6px;
}
.picker-drum-scroll {
  height: 220px; overflow-y: scroll; width: 100%;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  position: relative;
}
.picker-drum-scroll::-webkit-scrollbar { display: none; }
/* Top/bottom padding so first and last items center */
.picker-drum-scroll::before,
.picker-drum-scroll::after {
  content: ''; display: block; height: 88px; flex-shrink: 0;
}
.picker-item {
  height: 44px; display: flex; align-items: center; justify-content: center;
  font-family: 'Georgia', serif; font-size: 1.05rem;
  color: var(--text-dim); cursor: pointer;
  scroll-snap-align: center;
  transition: color 0.2s, font-size 0.2s;
  user-select: none;
  border-radius: 8px;
}
.picker-item:hover { color: var(--text-main); }
.picker-item.active {
  color: var(--text-main); font-size: 1.2rem; font-weight: 700;
}
/* Fade top/bottom */
.picker-drum-wrap {
  position: relative; flex: 1;
}
.picker-drum-wrap::before,
.picker-drum-wrap::after {
  content: ''; position: absolute; left: 0; right: 0; height: 72px;
  pointer-events: none; z-index: 2;
}
.picker-drum-wrap::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(255,253,255,0.95) 0%, transparent 100%);
}
.picker-drum-wrap::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(255,253,255,0.95) 0%, transparent 100%);
}
/* Footer buttons */
.picker-footer {
  display: flex; gap: 10px; margin-top: 14px;
}
.picker-cancel-btn {
  flex: 1; padding: 12px;
  background: rgba(155,123,184,0.1); border: 1px solid rgba(155,123,184,0.2);
  border-radius: 20px; font-family: 'Georgia', serif;
  font-size: 0.9rem; color: var(--text-dim); cursor: pointer;
  transition: all 0.2s;
}
.picker-cancel-btn:hover { background: rgba(155,123,184,0.18); }
.picker-confirm-btn {
  flex: 1.5; padding: 12px;
  background: linear-gradient(135deg, rgba(155,123,184,0.8), rgba(212,165,116,0.8));
  border: none; border-radius: 20px;
  font-family: 'Georgia', serif; font-size: 0.9rem;
  color: #fff; cursor: pointer; font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(155,123,184,0.3);
}
.picker-confirm-btn:hover {
  background: linear-gradient(135deg, rgba(155,123,184,0.95), rgba(212,165,116,0.95));
  box-shadow: 0 6px 20px rgba(155,123,184,0.4);
}

/* ===== Custom Date Input — Mystic Theme ===== */
/* Base: applies to both text-mode (placeholder) and date-mode */
input.date-input,
input[type="date"].date-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 14px 18px;
  border-radius: 30px;
  border: 1px solid rgba(155,123,184,0.35);
  background: rgba(255,255,255,0.65) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(155,123,184,0.06);
}

/* Hover state */
input.date-input:hover,
input[type="date"].date-input:hover {
  border-color: rgba(155,123,184,0.55);
  box-shadow: 0 4px 20px rgba(155,123,184,0.10);
}

/* Focus state — golden purple glow */
input.date-input:focus,
input[type="date"].date-input:focus {
  border-color: rgba(212,165,116,0.6) !important;
  box-shadow: 0 0 20px rgba(155,123,184,0.18), 0 0 40px rgba(212,165,116,0.10) !important;
  background: rgba(255,255,255,0.82) !important;
}

/* Placeholder text color for text-mode (MM/DD/YYYY) */
input.date-input::placeholder {
  color: rgba(107,82,120,0.5);
  font-style: italic;
  font-size: 0.95rem;
}

/* ===== WebKit date input inner styling ===== */
input[type="date"].date-input {
  color-scheme: light;
  position: relative;
}

/* Hide the default calendar picker indicator completely */
input[type="date"].date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 0;
  height: 0;
  padding: 0;
  margin: 0;
  pointer-events: none;
  position: absolute;
}

/* Custom calendar icon via background-image (SVG — moon + stars mystic icon) */
input[type="date"].date-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239B7BB8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2z'/%3E%3Cpath d='M12 2a10 10 0 0 1 10 10'/%3E%3Ccircle cx='12' cy='8' r='1.5' fill='%23D4A574' stroke='none'/%3E%3Ccircle cx='8' cy='13' r='1' fill='%23D4A574' stroke='none'/%3E%3Ccircle cx='16' cy='11' r='0.8' fill='%23D4A574' stroke='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px 20px;
  padding-right: 44px;
  cursor: pointer;
}

/* Show a subtle inner glow when date input has a value */
input[type="date"].date-input:valid {
  background-color: rgba(240,230,250,0.55) !important;
  border-color: rgba(212,165,116,0.45);
}

/* Style the inner edit fields (day/month/year text) */
input[type="date"].date-input::-webkit-datetime-edit-fields-wrapper {
  color: var(--text-main);
  font-family: 'Georgia', 'Times New Roman', serif;
  padding: 0;
}

input[type="date"].date-input::-webkit-datetime-edit-text {
  color: rgba(155,123,184,0.7);
  padding: 0 2px;
}

input[type="date"].date-input::-webkit-datetime-edit-month-field,
input[type="date"].date-input::-webkit-datetime-edit-day-field,
input[type="date"].date-input::-webkit-datetime-edit-year-field {
  color: var(--text-main);
  font-family: 'Georgia', 'Times New Roman', serif;
}

/* Placeholder-shown state (no value yet in date mode) */
input[type="date"].date-input:not(:valid)::-webkit-datetime-edit {
  color: rgba(107,82,120,0.5);
  font-style: italic;
}

/* Firefox */
input.date-input::-moz-placeholder {
  color: rgba(107,82,120,0.5);
  font-style: italic;
  font-size: 0.95rem;
}

/* ===== Zodiac Separator (Issue 2) ===== */
.zodiac-separator {
  display: flex; align-items: center; gap: 16px;
  max-width: 600px; width: 100%; margin: 16px 0 8px;
}
.separator-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155,123,184,0.3), transparent);
}
.separator-text {
  font-size: 0.85rem; color: var(--warm-gold);
  font-style: italic; letter-spacing: 0.1em;
}

/* ===== Tag Cloud Spacing (Issue 4) ===== */
.tag-cloud {
  gap: 14px;
}
.tag {
  padding: 10px 22px;
}
.tag-divider {
  color: rgba(212,165,116,0.4);
  font-size: 1.5rem; line-height: 1;
  align-self: center;
}

/* ===== Surprise Card (Portrait Gift) — NEW LAYOUT ===== */
.surprise-card {
  background: linear-gradient(135deg, rgba(30,10,60,0.8), rgba(15,5,40,0.9));
  border: 2px solid rgba(212,165,116,0.4);
  border-radius: 20px;
  padding: 28px 24px;
  cursor: pointer;
  display: flex; align-items: center; gap: 18px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 600px; width: 100%;
  margin: 24px auto 0;
  animation: surpriseGlow 2.5s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.surprise-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(155,123,184,0.15) 0%, transparent 70%);
  pointer-events: none;
}
@keyframes surpriseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(212,165,116,0.15), 0 0 30px rgba(155,123,184,0.1); }
  50% { box-shadow: 0 0 35px rgba(212,165,116,0.35), 0 0 70px rgba(155,123,184,0.25), 0 0 100px rgba(212,165,116,0.1); }
}
.surprise-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(212,165,116,0.7);
  box-shadow: 0 8px 50px rgba(212,165,116,0.35), 0 0 80px rgba(155,123,184,0.3);
}
.surprise-icon { 
  font-size: 2.4rem; 
  animation: pulseIcon 2s ease-in-out infinite;
}
@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.surprise-text { flex: 1; }
.surprise-title { 
  font-size: 1.2rem; 
  background: linear-gradient(135deg, #D4A574, #E8B4B8, #9B7BB8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600; margin-bottom: 6px;
}
.surprise-desc { 
  font-size: 0.8rem; color: rgba(212,165,116,0.6);
  font-style: italic; letter-spacing: 0.05em;
}
.surprise-arrow { 
  font-size: 1.8rem; color: var(--warm-gold);
  opacity: 0.6;
  transition: all 0.3s;
}
.surprise-card:hover .surprise-arrow { 
  transform: translateX(8px);
  opacity: 1;
}

/* ===== Tarot Flow Page — Dark Theme (Issue: flow page background override) ===== */
#flow-tarot {
  background: linear-gradient(160deg, #0a0012 0%, #1a0a35 30%, #0d0520 60%, #050010 100%) !important;
  padding-top: 20px !important;
}
#flow-tarot .flow-title {
  background: linear-gradient(135deg, #D4A574, #E8B4B8, #D4A574) !important;
  -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
#flow-tarot .flow-subtitle {
  color: rgba(212,165,116,0.8) !important;
}
#flow-tarot .back-btn {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(212,165,116,0.2) !important;
  color: rgba(212,165,116,0.7) !important;
}
#flow-tarot .back-btn:hover {
  border-color: rgba(212,165,116,0.5) !important;
  color: rgba(212,165,116,1) !important;
}
#flow-tarot .proceed-btn {
  margin-top: 40px !important;
  background: linear-gradient(135deg, rgba(212,165,116,0.2), rgba(155,123,184,0.2)) !important;
  border-color: rgba(212,165,116,0.3) !important;
  color: rgba(212,165,116,0.9) !important;
  animation: tarot-btn-glow 2s ease-in-out infinite;
}
#flow-tarot .proceed-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(212,165,116,0.3), rgba(155,123,184,0.3)) !important;
  border-color: rgba(212,165,116,0.6) !important;
  box-shadow: 0 0 30px rgba(212,165,116,0.3) !important;
}
@keyframes tarot-btn-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(212,165,116,0.2); }
  50% { box-shadow: 0 0 20px rgba(212,165,116,0.5), 0 0 40px rgba(155,123,184,0.3); }
}
/* Tarot spread on dark background */
#flow-tarot .tarot-slot {
  background: rgba(255,255,255,0.06);
  border-color: rgba(212,165,116,0.25);
  color: rgba(212,165,116,0.5);
}
#flow-tarot .tarot-slot:hover {
  border-color: rgba(212,165,116,0.6);
  box-shadow: 0 0 30px rgba(212,165,116,0.2);
}
#flow-tarot .tarot-slot.revealed {
  border-color: rgba(212,165,116,0.7);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 35px rgba(212,165,116,0.25);
}

/* ===== Horoscope Spacing (Issue: step1 to step2 gap too small) ===== */
#horoscope-step2 {
  margin-top: 24px;
}

/* ===== Portrait Flow Page — Compact ===== */
#flow-portrait {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#flow-portrait .flow-title { margin-top: 16px; }
#flow-portrait .flow-subtitle { margin-bottom: 16px; }
#flow-portrait .prompt-card {
  max-height: none;
  overflow: visible;
}
#flow-portrait > * {
  flex-shrink: 0;
}

/* ===== Portrait Zodiac Picker — Compact ===== */
#portrait-zodiac-picker {
  max-width: 440px !important;
  margin-bottom: 14px !important;
}

/* ===== Portrait Result Page Scroll Fix ===== */
#flow-portrait {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ===== Platform Card Simplify ===== */
.platform-card.simple {
  transition: all 0.3s ease;
}
.platform-card.simple:hover {
  transform: translateY(-3px);
}
.platform-card.simple.free:hover {
  border-color: rgba(212,165,116,0.5) !important;
  background: rgba(212,165,116,0.1) !important;
  box-shadow: 0 4px 20px rgba(212,165,116,0.15);
}
.platform-card.simple.paid:hover {
  border-color: rgba(155,123,184,0.5) !important;
  background: rgba(155,123,184,0.12) !important;
  box-shadow: 0 4px 20px rgba(155,123,184,0.15);
}

/* ===== Portrait prompt box better scroll ===== */
.fortune-section {
  flex-shrink: 0;
}
.fortune-section .platform-row {
  flex-shrink: 0;
}

/* ===== Surprise card active state ===== */
.surprise-card:active {
  transform: scale(0.97);
}

/* ===== Persona Chain Card — purple variant ===== */
.surprise-card.persona-card {
  background: linear-gradient(135deg, rgba(55,25,80,0.85), rgba(35,15,60,0.92));
  border-color: rgba(180,140,220,0.45);
}
.surprise-card.persona-card::before {
  background: radial-gradient(ellipse at 30% 50%, rgba(155,123,184,0.2) 0%, transparent 70%);
}
@keyframes personaCardGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(155,123,184,0.15), 0 0 30px rgba(180,140,220,0.1); }
  50% { box-shadow: 0 0 35px rgba(155,123,184,0.35), 0 0 70px rgba(180,140,220,0.25), 0 0 100px rgba(155,123,184,0.1); }
}
.surprise-card.persona-card {
  animation: personaCardGlow 3s ease-in-out infinite;
}
.surprise-card.persona-card:hover {
  border-color: rgba(180,140,220,0.7);
  box-shadow: 0 8px 50px rgba(155,123,184,0.35), 0 0 80px rgba(180,140,220,0.3);
}
.surprise-card.persona-card .surprise-title {
  background: linear-gradient(135deg, #C9A9E0, #E8B4B8, #B490CA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.surprise-card.persona-card .surprise-desc {
  color: rgba(180,160,200,0.6);
}
.surprise-card.persona-card .surprise-arrow {
  color: #B490CA;
}

/* ===== Emoji & Symbol Rendering ===== */
.tool-emoji, .zodiac-emoji, .mood-emoji, .result-zodiac, .detail-icon,
.surprise-icon, .logo-icon, .magic-sym, .rune,
.constellation-divider .symbol, .site-footer .symbols, .tag-divider,
.splash-title, .splash-sub, .result-title, .flow-title, .site-title,
.fortune-label, .splash-cta, .picker-title {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji',
               'Segoe UI Symbol', 'Georgia', 'Times New Roman', serif;
}

/* Fix: gradient-text titles (-webkit-text-fill-color:transparent) break colored emoji.
   Wrap emoji in <span class="inline-emoji"> to restore rendering. */
.result-title .inline-emoji,
.flow-title .inline-emoji,
.splash-title .inline-emoji,
.fortune-label .inline-emoji {
  -webkit-text-fill-color: initial;
  -webkit-background-clip: initial;
  color: initial;
}

/* ===== Result page ensure scrolling ===== */
#resultPage {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
