/* ===========================
   자존감 타로 — PREMIUM LEVEL UP QUEST
   Deep Cosmos Luxury Edition
=========================== */

/* ─── Feature Tile Accent ─────────────────────── */
.feature-card--tarot-self-esteem { border-bottom: 3px solid #a855f7; }
.feature-card--tarot-self-esteem .feature-card__cta,
.feature-card--tarot-self-esteem .feature-card__launch {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #c084fc 100%);
  color: #fff;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.55);
}

/* ─── Overlay ────────────────────────────────── */
.tarot-self-esteem-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 999999 !important;
  display: none;
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(139, 92, 246, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 82% 18%, rgba(251, 191, 36, 0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 90%, rgba(79, 70, 229, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 25% 65%, rgba(168, 85, 247, 0.18) 0%, transparent 40%),
    linear-gradient(160deg, #05050f 0%, #0b0820 40%, #130f28 70%, #08071a 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  isolation: isolate;
}
.tarot-self-esteem-overlay.is-open {
  display: block !important;
  animation: selfEsteemOverlayIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes selfEsteemOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── Ambient Particles ─────────────────────── */
.tarot-self-esteem-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 100000;
}
.tarot-self-esteem-particles .particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  animation: selfEsteemFloat 5s ease-in-out infinite;
}
.tarot-self-esteem-particles .p1  { left: 10%; top: 15%; background: rgba(251,191,36,0.9); box-shadow: 0 0 8px rgba(251,191,36,0.8); animation-delay: 0s; animation-duration: 4.8s; }
.tarot-self-esteem-particles .p2  { left: 25%; top: 8%;  background: rgba(168,85,247,0.9); box-shadow: 0 0 8px rgba(168,85,247,0.8); animation-delay: 0.7s; animation-duration: 5.2s; }
.tarot-self-esteem-particles .p3  { left: 45%; top: 12%; background: rgba(251,191,36,0.9); box-shadow: 0 0 8px rgba(251,191,36,0.8); animation-delay: 1.3s; animation-duration: 4.5s; }
.tarot-self-esteem-particles .p4  { left: 64%; top: 10%; background: rgba(192,132,252,0.9); box-shadow: 0 0 8px rgba(192,132,252,0.8); animation-delay: 0.4s; animation-duration: 5.5s; }
.tarot-self-esteem-particles .p5  { left: 83%; top: 18%; background: rgba(251,191,36,0.9); box-shadow: 0 0 8px rgba(251,191,36,0.8); animation-delay: 2.0s; animation-duration: 4.2s; }
.tarot-self-esteem-particles .p6  { left: 8%;  top: 72%; background: rgba(168,85,247,0.7); box-shadow: 0 0 6px rgba(168,85,247,0.6); animation-delay: 1.8s; animation-duration: 6.0s; }
.tarot-self-esteem-particles .p7  { left: 38%; top: 80%; background: rgba(251,191,36,0.7); box-shadow: 0 0 6px rgba(251,191,36,0.6); animation-delay: 1.0s; animation-duration: 5.8s; }
.tarot-self-esteem-particles .p8  { left: 60%; top: 76%; background: rgba(129,140,248,0.8); box-shadow: 0 0 6px rgba(129,140,248,0.7); animation-delay: 2.4s; animation-duration: 5.0s; }
.tarot-self-esteem-particles .p9  { left: 86%; top: 70%; background: rgba(251,191,36,0.8); box-shadow: 0 0 6px rgba(251,191,36,0.7); animation-delay: 3.0s; animation-duration: 4.8s; }
.tarot-self-esteem-particles .p10 { left: 92%; top: 45%; background: rgba(168,85,247,0.6); box-shadow: 0 0 5px rgba(168,85,247,0.5); animation-delay: 1.5s; animation-duration: 6.2s; }
@keyframes selfEsteemFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
  33% { transform: translateY(-14px) scale(1.3); opacity: 1; }
  66% { transform: translateY(-7px) scale(0.9); opacity: 0.7; }
}

/* ─── Shell & Panel ─────────────────────────── */
.tarot-self-esteem-shell {
  position: relative;
  max-width: 980px;
  margin: 28px auto;
  padding: 0 16px 56px;
  z-index: 100001;
}
.tarot-self-esteem-panel {
  position: relative;
  border-radius: 28px;
  background: rgba(10, 8, 24, 0.94);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.3),
    0 0 0 2px rgba(251, 191, 36, 0.08),
    0 0 70px rgba(139, 92, 246, 0.25),
    0 0 130px rgba(251, 191, 36, 0.08),
    0 32px 90px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(139, 92, 246, 0.15);
  padding: 36px 32px;
  overflow: hidden;
}
.tarot-self-esteem-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(251, 191, 36, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.tarot-self-esteem-panel > * { position: relative; z-index: 1; }
.tarot-self-esteem-panel.ritual-burst { animation: selfEsteemBurst 1.1s ease; }
@keyframes selfEsteemBurst {
  0%   { box-shadow: 0 0 0 1px rgba(139,92,246,.3), 0 0 70px rgba(139,92,246,.25), 0 32px 90px rgba(0,0,0,.75); }
  35%  { box-shadow: 0 0 0 2px rgba(251,191,36,.65), 0 0 100px rgba(251,191,36,.55), 0 32px 90px rgba(0,0,0,.75); }
  100% { box-shadow: 0 0 0 1px rgba(139,92,246,.3), 0 0 70px rgba(139,92,246,.25), 0 32px 90px rgba(0,0,0,.75); }
}

/* ─── Close Button ─────────────────────────── */
.tarot-self-esteem-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tarot-self-esteem-close:hover {
  background: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.5);
  transform: scale(1.08) rotate(90deg);
}

/* ─── Stage Transitions ─────────────────────── */
.tarot-self-esteem-stage {
  display: none;
  animation: selfEsteemStageIn 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.tarot-self-esteem-stage.is-active { display: block; }
@keyframes selfEsteemStageIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Intro Stage ───────────────────────────── */
.tarot-self-esteem-hero {
  text-align: center;
  padding: 28px 16px 36px;
}
.tarot-self-esteem-hero-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 0 20px rgba(251,191,36,0.7));
  animation: selfEsteemHeroPulse 3s ease-in-out infinite;
}
@keyframes selfEsteemHeroPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(251,191,36,0.7)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 34px rgba(251,191,36,1)); }
}
.tarot-self-esteem-badge-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tse-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tse-badge--free {
  background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(16,185,129,0.12));
  border: 1px solid rgba(34,197,94,0.5);
  color: #4ade80;
}
.tse-badge--five {
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(168,85,247,0.12));
  border: 1px solid rgba(139,92,246,0.5);
  color: #c084fc;
}
.tarot-self-esteem-title {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 900;
  color: #fef3c7;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  text-shadow:
    0 0 30px rgba(251, 191, 36, 0.5),
    0 0 60px rgba(139, 92, 246, 0.3);
  line-height: 1.2;
}
.tarot-self-esteem-subtitle {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #94a3b8;
  max-width: 540px;
  margin: 0 auto 32px;
}
.tarot-self-esteem-invoke-wrap { margin-top: 8px; }

/* ─── Buttons ───────────────────────────────── */
.tarot-self-esteem-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s;
  letter-spacing: 0.01em;
}
.tarot-self-esteem-btn--invoke {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(139,92,246,0.5), 0 0 40px rgba(139,92,246,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.tarot-self-esteem-btn--invoke:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 36px rgba(139,92,246,0.65), 0 0 60px rgba(139,92,246,0.3);
}

/* ─── EXP Bar ───────────────────────────────── */
.tarot-self-esteem-exp-wrap { margin: 0 0 24px; }
.tarot-self-esteem-exp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tarot-self-esteem-exp-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(10, 6, 28, 0.9);
  border: 1px solid rgba(139,92,246,0.2);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}
.tarot-self-esteem-exp-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #fbbf24);
  box-shadow: 0 0 10px rgba(168,85,247,0.8), 0 0 20px rgba(251,191,36,0.4);
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Draw Stage ────────────────────────────── */
.tarot-self-esteem-draw-header {
  font-size: 1rem;
  color: #e2e8f0;
  text-align: center;
  margin: 0 0 8px;
  line-height: 1.5;
}
.tarot-self-esteem-spread-guide {
  text-align: center;
  font-size: 0.88rem;
  color: #c084fc;
  margin-bottom: 24px;
  min-height: 1.4em;
  font-style: italic;
  text-shadow: 0 0 12px rgba(192,132,252,0.5);
}

/* ─── 5-Card Grid ─────────────────────────── */
.tarot-self-esteem-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px 14px;
  justify-items: center;
  align-items: start;
  max-width: 560px;
  margin: 0 auto 28px;
}
.tarot-self-esteem-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  isolation: isolate;
  z-index: 1;
}
.tarot-self-esteem-slot[data-slot-index="0"] { grid-column: 1; grid-row: 1; }
.tarot-self-esteem-slot[data-slot-index="1"] { grid-column: 3; grid-row: 1; }
.tarot-self-esteem-slot[data-slot-index="2"] { grid-column: 5; grid-row: 1; }
.tarot-self-esteem-slot[data-slot-index="3"] { grid-column: 2; grid-row: 2; }
.tarot-self-esteem-slot[data-slot-index="4"] { grid-column: 4; grid-row: 2; }
@media (max-width: 640px) {
  .tarot-self-esteem-card-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 16px;
    max-width: 340px;
  }
  .tarot-self-esteem-slot[data-slot-index="0"] { grid-column: 1; grid-row: 1; justify-self: end; }
  .tarot-self-esteem-slot[data-slot-index="1"] { grid-column: 2; grid-row: 1; justify-self: start; }
  .tarot-self-esteem-slot[data-slot-index="2"] { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .tarot-self-esteem-slot[data-slot-index="3"] { grid-column: 1; grid-row: 3; justify-self: end; }
  .tarot-self-esteem-slot[data-slot-index="4"] { grid-column: 2; grid-row: 3; justify-self: start; }
}
.tarot-self-esteem-slot:has(.tarot-self-esteem-card.flipped),
.tarot-self-esteem-slot.has-flipped { z-index: 10; }
.tarot-self-esteem-slot-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 10px;
  text-align: center;
  max-width: 120px;
  line-height: 1.4;
  transition: color 0.3s;
}
.tarot-self-esteem-slot.has-flipped .tarot-self-esteem-slot-label { color: #c084fc; }
.tarot-self-esteem-slot.guide-next::before {
  content: "✦";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  color: #fbbf24;
  font-size: 1.1rem;
  animation: selfEsteemPulse 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(251,191,36,0.8));
}
@keyframes selfEsteemPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.25); }
}

/* ─── Card 3D Flip ────────────────────────── */
.tarot-self-esteem-card {
  position: relative;
  width: 115px;
  height: 172px;
  cursor: pointer;
  perspective: 1100px;
  transform-style: preserve-3d;
  transition: filter 0.3s;
}
.tarot-self-esteem-slot.guide-next .tarot-self-esteem-card {
  filter: drop-shadow(0 0 14px rgba(251,191,36,0.8));
}
@media (min-width: 641px) {
  .tarot-self-esteem-card { width: 130px; height: 195px; }
}
.tarot-self-esteem-card-back,
.tarot-self-esteem-card-front {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}
.tarot-self-esteem-card-back {
  z-index: 1;
  background: linear-gradient(145deg, #2e1065, #4c1d95, #3b0764);
  border: 1px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 0 30px rgba(139,92,246,0.15), 0 0 0 1px rgba(251,191,36,0.12);
  transform: rotateY(0deg);
}
.tarot-self-esteem-card-back::before {
  content: "✦";
  font-size: 2.8rem;
  color: rgba(251,191,36,0.9);
  text-shadow: 0 0 20px rgba(251,191,36,0.8);
  animation: selfEsteemStarGlow 2.5s ease-in-out infinite;
}
.tarot-self-esteem-card-back::after {
  content: attr(data-back-num);
  position: absolute;
  bottom: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(192,132,252,0.7);
  letter-spacing: 0.06em;
}
@keyframes selfEsteemStarGlow {
  0%, 100% { text-shadow: 0 0 15px rgba(251,191,36,0.6); transform: scale(1) rotate(0deg); }
  50% { text-shadow: 0 0 30px rgba(251,191,36,1), 0 0 60px rgba(251,191,36,0.4); transform: scale(1.08) rotate(15deg); }
}
.tarot-self-esteem-card-front {
  z-index: 2;
  background: linear-gradient(145deg, #0f0d20, #1a1535, #12102a);
  border: 2px solid rgba(251,191,36,0.5);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 25px rgba(251,191,36,0.2), inset 0 0 20px rgba(139,92,246,0.1);
  transform: rotateY(180deg);
  padding: 6px;
}
.tarot-self-esteem-card.flipped .tarot-self-esteem-card-back { transform: rotateY(-180deg); }
.tarot-self-esteem-card.flipped .tarot-self-esteem-card-front {
  transform: rotateY(0deg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 40px rgba(251,191,36,0.35), inset 0 0 20px rgba(139,92,246,0.15);
}
.tarot-self-esteem-face-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(5, 5, 20, 0.5);
  border-radius: 10px;
  flex: 1;
  min-height: 0;
}
.tarot-self-esteem-card-front[data-reversed="1"] .tarot-self-esteem-face-img { transform: rotate(180deg); }
.tarot-self-esteem-card-name {
  font-size: 0.68rem;
  color: #fbbf24;
  margin-top: 5px;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(251,191,36,0.6);
  padding: 0 2px;
}
.self-esteem-ripple-wave {
  position: absolute;
  inset: -5px;
  border-radius: 18px;
  border: 2px solid rgba(168,85,247,0.7);
  animation: selfEsteemRipple 0.9s ease-out forwards;
  pointer-events: none;
}
@keyframes selfEsteemRipple {
  0% { transform: scale(0.8); opacity: 1; box-shadow: 0 0 20px rgba(168,85,247,0.5); }
  100% { transform: scale(1.2); opacity: 0; box-shadow: 0 0 40px rgba(168,85,247,0); }
}

/* ─── Level Up Banner ───────────────────────── */
.tarot-self-esteem-levelup-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 100010;
  transition: opacity 0.4s, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}
.tarot-self-esteem-levelup-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.tarot-self-esteem-levelup-text {
  font-size: clamp(2.8rem, 9vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #c084fc, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: selfEsteemGradientShift 2s linear infinite;
  filter: drop-shadow(0 0 30px rgba(251,191,36,0.6));
  white-space: nowrap;
}
@keyframes selfEsteemGradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.tarot-self-esteem-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 100009;
}
.self-esteem-confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: selfEsteemConfettiFall 3s ease-out forwards;
}
@keyframes selfEsteemConfettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ─── Final Button ──────────────────────────── */
.tarot-self-esteem-final-wrap { text-align: center; margin-top: 24px; }
.tarot-self-esteem-final-btn {
  padding: 16px 40px;
  border-radius: 999px;
  border: none;
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #fbbf24 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 24px rgba(139,92,246,0.45);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.tarot-self-esteem-final-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 36px rgba(139,92,246,0.6);
}
.tarot-self-esteem-final-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Result Stage ────────────────────────── */
.tarot-self-esteem-reading-header { text-align: center; margin-bottom: 28px; }
.tarot-self-esteem-reading-title {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 900;
  color: #fef3c7;
  margin: 0 0 8px;
  text-shadow: 0 0 24px rgba(251,191,36,0.4);
}
.tarot-self-esteem-reading-subtitle { font-size: 0.85rem; color: #64748b; }
.tarot-self-esteem-reading-content {
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}
.tarot-self-esteem-reading-content::-webkit-scrollbar { width: 4px; }
.tarot-self-esteem-reading-content::-webkit-scrollbar-track {
  background: rgba(139,92,246,0.08);
  border-radius: 2px;
}
.tarot-self-esteem-reading-content::-webkit-scrollbar-thumb {
  background: linear-gradient(#7c3aed, #fbbf24);
  border-radius: 2px;
}

/* ─── Opening Message ───────────────────────── */
.tse-opening {
  text-align: center;
  padding: 22px 24px 28px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(139,92,246,0.12) 0%, rgba(251,191,36,0.08) 100%);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.tse-opening::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #fbbf24, #7c3aed);
  background-size: 200% 100%;
  animation: selfEsteemShimmer 3s linear infinite;
}
@keyframes selfEsteemShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.tse-opening-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(251,191,36,0.7));
}
.tse-opening-text { font-size: 0.95rem; line-height: 1.75; color: #cbd5e1; margin: 0; font-style: italic; }

/* ─── Position Insight Cards ───────────────── */
.tse-insight-card {
  margin-bottom: 20px;
  border-radius: 16px;
  border: 1px solid rgba(139,92,246,0.2);
  background: rgba(12, 10, 28, 0.7);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: tseCardFadeIn 0.5s ease both;
}
.tse-insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(139,92,246,0.15);
}
@keyframes tseCardFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.tse-insight-card[data-pos="past_debuff"]     { border-left: 3px solid #ef4444; }
.tse-insight-card[data-pos="inner_monster"]   { border-left: 3px solid #f97316; }
.tse-insight-card[data-pos="current_damage"]  { border-left: 3px solid #eab308; }
.tse-insight-card[data-pos="mind_shield"]     { border-left: 3px solid #22c55e; }
.tse-insight-card[data-pos="levelup_mastery"] { border-left: 3px solid #a855f7; }
.tse-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(139,92,246,0.12);
}
.tse-card-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(139,92,246,0.5);
}
.tse-card-icon { font-size: 1.5rem; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(251,191,36,0.4)); }
.tse-card-meta { flex: 1; min-width: 0; }
.tse-card-position {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #a855f7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tse-card-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.3);
  color: #fbbf24;
}
.tse-card-body {
  padding: 16px 20px 12px;
  font-size: 0.93rem;
  line-height: 1.85;
  color: #cbd5e1;
  margin: 0;
}
.tse-card-keywords { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 16px; }
.tse-keyword {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: #c084fc;
}

/* ─── Level Up Guidance ─────────────────────── */
.tse-levelup-card {
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.16) 0%, rgba(251,191,36,0.1) 100%);
  border: 1px solid rgba(251,191,36,0.3);
  position: relative;
  overflow: hidden;
  animation: tseCardFadeIn 0.5s ease 0.48s both;
}
.tse-levelup-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a855f7, #fbbf24, #a855f7);
  background-size: 200% 100%;
  animation: selfEsteemShimmer 2s linear infinite;
}
.tse-levelup-title { font-size: 1rem; font-weight: 800; color: #fbbf24; margin: 0 0 12px; text-shadow: 0 0 12px rgba(251,191,36,0.4); }
.tse-levelup-body { font-size: 0.93rem; line-height: 1.85; color: #fef3c7; margin: 0; }

/* ─── Action Quest Card ─────────────────────── */
.tse-action-card {
  margin-bottom: 20px;
  padding: 22px 24px;
  border-radius: 16px;
  background: rgba(12, 10, 28, 0.65);
  border: 1px solid rgba(139,92,246,0.2);
  animation: tseCardFadeIn 0.5s ease 0.56s both;
}
.tse-action-title { font-size: 1rem; font-weight: 800; color: #c084fc; margin: 0 0 16px; }
.tse-quest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tse-quest-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e2e8f0;
  transition: background 0.25s;
}
.tse-quest-item:hover { background: rgba(139,92,246,0.18); }
.tse-quest-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #c084fc);
  color: #fff;
  font-size: 0.7rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  margin-top: 1px;
}

/* ─── Legacy compat classes ─────────────────── */
.tarot-self-esteem-section { margin-bottom: 20px; }
.tarot-self-esteem-section-title { font-size: 1rem; font-weight: 700; color: #c084fc; margin: 0 0 10px; }
.tarot-self-esteem-section-text { font-size: 0.93rem; line-height: 1.85; color: #cbd5e1; margin: 0; }
.tarot-self-esteem-section--highlight .tarot-self-esteem-section-text { color: #fef3c7; font-weight: 500; }
.tarot-self-esteem-advice-list { margin: 0; padding-left: 1.2rem; color: #e2e8f0; line-height: 1.9; }
.tarot-self-esteem-advice-list li { margin-bottom: 10px; }

/* ─── Result Action Buttons ─────────────────── */
.tarot-self-esteem-result-actions {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px;
}
.tarot-self-esteem-result-actions .tarot-self-esteem-btn {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  box-shadow: 0 4px 18px rgba(139,92,246,0.4);
}
.tarot-self-esteem-result-actions .tarot-self-esteem-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(139,92,246,0.55);
}
.tarot-self-esteem-result-actions .tarot-self-esteem-btn--subtle {
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: #c084fc;
  box-shadow: none;
}
.tarot-self-esteem-result-actions .tarot-self-esteem-btn--home { flex: 1 1 100%; }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .tarot-self-esteem-shell { margin: 10px auto; padding: 0 10px 24px; }
  .tarot-self-esteem-panel { padding: 20px 14px; border-radius: 18px; }
  .tarot-self-esteem-hero { padding: 16px 8px 22px; }
  .tarot-self-esteem-subtitle { font-size: 0.88rem; margin-bottom: 20px; }
  .tarot-self-esteem-draw-header { font-size: 0.92rem; line-height: 1.5; }
  .tarot-self-esteem-card-grid { gap: 10px; margin-bottom: 16px; }
  .tarot-self-esteem-card { width: 100px; height: 150px; }
  .tarot-self-esteem-slot-label { color: #94a3b8; font-size: 0.68rem; max-width: 110px; }
  .tarot-self-esteem-btn--invoke, .tarot-self-esteem-final-btn, .tarot-self-esteem-btn { width: 100%; }
  .tarot-self-esteem-reading-content { max-height: 56dvh; padding-right: 2px; }
  .tse-card-header { padding: 12px 14px 10px; }
  .tse-card-body { padding: 12px 14px 10px; font-size: 0.9rem; }
  .tse-card-keywords { padding: 0 14px 12px; }
  .tse-levelup-card, .tse-action-card { padding: 16px 14px; }
  .tarot-self-esteem-result-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
}

