/* ═══════════════════════════════════════════
   MYSTIC TAROT — Premium Design System v3.0
   ═══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'Outfit', sans-serif;
  background: #070512;
  color: #ede9f8;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Canvas & Atmosphere ── */
#stars-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(110, 60, 220, .12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 100%, rgba(160, 100, 40, .06), transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 90%, rgba(80, 40, 180, .06), transparent 60%);
}

/* Ambient floating particles */
.ambient-particle {
  position: fixed;
  width: var(--size, 3px);
  height: var(--size, 3px);
  background: radial-gradient(circle, rgba(200,168,76, .6), transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: ambientFloat var(--duration, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: var(--opacity, .3);
}

@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: var(--opacity, .3); }
  25% { transform: translate(var(--dx1, 20px), var(--dy1, -30px)) scale(1.2); }
  50% { transform: translate(var(--dx2, -10px), var(--dy2, -60px)) scale(.8); opacity: calc(var(--opacity, .3) * 1.5); }
  75% { transform: translate(var(--dx3, 15px), var(--dy3, -40px)) scale(1.1); }
}

/* Mystic fog layer */
.fog-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .15;
}
.fog-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--fog-color, rgba(130,80,220,.15)), transparent 70%);
  width: var(--fog-size, 300px);
  height: var(--fog-size, 300px);
  animation: fogDrift var(--fog-duration, 20s) ease-in-out infinite;
  animation-delay: var(--fog-delay, 0s);
  mix-blend-mode: screen;
}

@keyframes fogDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(var(--fog-dx, 40px), var(--fog-dy, -20px)) scale(1.15); }
  66% { transform: translate(calc(var(--fog-dx, 40px) * -0.5), calc(var(--fog-dy, -20px) * 1.3)) scale(.9); }
}

/* ── App Shell ── */
#app {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 18px 80px;
  min-height: 100vh;
}

/* ── Screen Transitions ── */
.screen { display: none; animation: screenIn .45s cubic-bezier(.22,1,.36,1); }
.screen.active { display: block; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px) scale(.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: .03em;
}

/* ════════════════════════════════
   HOME SCREEN
   ════════════════════════════════ */

.home-header {
  text-align: center;
  padding: 28px 0 32px;
  position: relative;
}

.sigil {
  margin: 0 auto 16px;
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 0 24px rgba(200,160,60,.3));
  animation: sigilFloat 6s ease-in-out infinite;
}

/* Pulsing glow ring around sigil */
.sigil::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(200,160,60,.08);
  animation: sigilGlow 3s ease-in-out infinite;
}
@keyframes sigilGlow {
  0%, 100% { border-color: rgba(200,160,60,.08); box-shadow: 0 0 0 rgba(200,160,60,0); }
  50% { border-color: rgba(200,160,60,.2); box-shadow: 0 0 20px rgba(200,160,60,.08); }
}
@keyframes sigilFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}

.brand {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: .18em;
  color: #f4ecd6;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 6px;
}

.brand-sub {
  font-size: 10.5px;
  font-weight: 300;
  color: rgba(232,228,240,.28);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Moon Badge */
.moon-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(200,160,60,.09), rgba(140,80,220,.06));
  border: 1px solid rgba(200,160,60,.2);
  border-radius: 28px;
  padding: 6px 16px 6px 8px;
  cursor: default;
  backdrop-filter: blur(6px);
  transition: box-shadow .4s;
}
.moon-badge:hover {
  box-shadow: 0 0 18px rgba(200,160,60,.12);
}
.moon-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .02em;
}
.moon-phase-label {
  color: rgba(232,228,240,.6);
  font-weight: 400;
}
.moon-divider {
  color: rgba(200,160,60,.4);
  font-size: 10px;
}
.moon-influence {
  color: rgba(210,175,90,.8);
  font-weight: 500;
  font-style: italic;
}

/* Section Labels */
.section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(232,228,240,.2);
  margin-bottom: 10px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(200,160,60,.12), transparent);
}

/* Spread List */
.spread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spread-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.033), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  transition: all .22s cubic-bezier(.22,1,.36,1);
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on hover */
.spread-item::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
  transition: left .5s ease;
  pointer-events: none;
}
.spread-item:active::after { left: 150%; }

.spread-item::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(200,160,60,.06), rgba(140,80,220,.04));
  opacity: 0;
  transition: opacity .22s;
}
.spread-item:active {
  transform: scale(.974);
  border-color: rgba(200,160,60,.22);
}
.spread-item:active::before { opacity: 1; }

.spread-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200,160,60,.07);
  color: #c9a84c;
  flex-shrink: 0;
  border: 1px solid rgba(200,160,60,.1);
  position: relative;
  z-index: 1;
}
.spread-icon.accent {
  background: rgba(130,80,220,.07);
  color: #a07ad4;
  border-color: rgba(130,80,220,.12);
}
.spread-icon.pink {
  background: rgba(220,80,130,.07);
  color: #e07aa0;
  border-color: rgba(220,80,130,.12);
}
.spread-icon.premium {
  background: linear-gradient(135deg, rgba(200,160,60,.12), rgba(220,180,80,.06));
  color: #dcc97a;
  border-color: rgba(200,160,60,.2);
}

.spread-info {
  flex: 1;
  position: relative;
  z-index: 1;
}
.spread-info h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 500;
  color: #f0e8d4;
  margin-bottom: 2px;
  letter-spacing: .01em;
}
.spread-info span {
  font-size: 11px;
  color: rgba(232,228,240,.32);
  font-weight: 300;
  letter-spacing: .01em;
}

.spread-arrow {
  color: rgba(232,228,240,.18);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.spread-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .07em;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.spread-tag.pro {
  background: linear-gradient(135deg, rgba(130,80,220,.14), rgba(100,60,180,.08));
  color: #a07ad4;
  border: 1px solid rgba(130,80,220,.15);
}
.spread-tag.new-badge {
  background: linear-gradient(135deg, rgba(76,200,120,.14), rgba(60,180,100,.08));
  color: #6fd494;
  border: 1px solid rgba(76,200,120,.18);
  animation: badgePulse 2s ease-in-out infinite;
}
.spread-tag.premium-badge {
  background: linear-gradient(135deg, rgba(200,160,60,.18), rgba(180,140,40,.08));
  color: #dcc97a;
  border: 1px solid rgba(200,160,60,.25);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

/* History */
.history-list { display: flex; flex-direction: column; gap: 8px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 11px 14px;
  cursor: pointer;
  transition: .2s;
}
.history-item:active { background: rgba(200,160,60,.05); }

.history-thumb {
  width: 34px; height: 54px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(200,160,60,.25);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-info { flex: 1; }
.history-info .h-spread {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px; color: rgba(200,160,60,.7); margin-bottom: 2px;
}
.history-info .h-card { font-size: 14px; color: #ede9f8; font-weight: 400; }
.history-info .h-date { font-size: 10px; color: rgba(232,228,240,.2); margin-top: 2px; font-weight: 300; }
.history-arrow { color: rgba(232,228,240,.12); }

.home-footer {
  text-align: center;
  font-size: 10px;
  color: rgba(232,228,240,.13);
  margin-top: 36px;
  font-weight: 300;
  letter-spacing: .06em;
}

/* ════════════════════════════════
   DRAW SCREEN
   ════════════════════════════════ */

.nav-back {
  display: flex; align-items: center; gap: 7px;
  background: none; border: none;
  color: rgba(232,228,240,.3);
  font-size: 13px; font-family: 'Outfit', sans-serif;
  cursor: pointer; padding: 4px 0; margin-bottom: 20px;
  transition: color .2s;
}
.nav-back:active { color: rgba(232,228,240,.6); }

.draw-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 0 4px;
}
.draw-header h2 {
  font-size: 26px;
  color: #f4ecd6;
  font-weight: 400;
  margin-bottom: 6px;
}
.draw-header p {
  font-size: 12px;
  color: rgba(232,228,240,.32);
  font-weight: 300;
  letter-spacing: .02em;
  line-height: 1.5;
}

.question-input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(200,160,60,.15);
  border-radius: 14px;
  color: #ede9f8;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  padding: 14px 16px;
  resize: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 6px;
  line-height: 1.5;
}
.question-input:focus {
  border-color: rgba(200,160,60,.4);
  box-shadow: 0 0 0 3px rgba(200,160,60,.06);
}
.question-input::placeholder { color: rgba(232,228,240,.2); }

.question-hint {
  font-size: 11px; color: rgba(232,228,240,.2);
  font-weight: 300; margin-bottom: 16px;
  padding-left: 2px;
}
.question-error { font-size: 12px; color: #d47a7a; margin-bottom: 10px; display: none; }

/* Deck */
.deck-area {
  display: flex; justify-content: center; align-items: center;
  height: 240px; perspective: 1000px; margin-bottom: 24px;
}

.deck {
  position: relative; width: 120px; height: 190px;
  cursor: pointer; transition: transform .2s;
  transform-style: preserve-3d;
}
.deck:active { transform: scale(.96); }

.deck-card {
  position: absolute; inset: 0;
  background: linear-gradient(155deg, #1e1738, #130f26);
  border: 1px solid rgba(200,160,60,.25);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(200,160,60,.05) inset;
}
.deck-card::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid rgba(200,160,60,.09);
  border-radius: 8px;
}
.deck-card::after {
  content: '✦';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  color: rgba(200,160,60,.15);
  text-shadow: 0 0 12px rgba(200,160,60,.2);
}
.deck-card.top { z-index: 3; }

.deck-aura {
  position: absolute;
  inset: -36px; z-index: -1;
  background: radial-gradient(circle, rgba(130,80,220,.12), transparent 65%);
  animation: auraPulse 4s ease-in-out infinite;
}
@keyframes auraPulse {
  0%, 100% { opacity: .4; transform: scale(1); }
  50%       { opacity: .9; transform: scale(1.07); }
}
.deck.hidden { display: none; }

/* Drawn cards row */
.drawn-row {
  display: flex; justify-content: center; gap: 10px;
  min-height: 20px; margin-bottom: 18px; flex-wrap: wrap;
}

.drawn-mini {
  width: 88px; height: 141px;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(200,160,60,.28);
  position: relative;
  box-shadow: 0 6px 24px rgba(0,0,0,.5), 0 0 12px rgba(200,160,60,.06);
  animation: cardReveal .55s cubic-bezier(.175,.885,.32,1.275);
  transition: transform .3s, box-shadow .3s;
}
.drawn-mini:active {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 0 20px rgba(200,160,60,.12);
}
.drawn-mini.reversed img { transform: rotate(180deg); }
.drawn-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drawn-mini .card-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(7,5,18,.92) 35%);
  color: #dcc97a;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px; font-weight: 500;
  text-align: center; padding: 16px 3px 6px;
  letter-spacing: .03em;
}
@keyframes cardReveal {
  from { opacity: 0; transform: scale(.5) rotateY(55deg); }
  to   { opacity: 1; transform: scale(1) rotateY(0); }
}

/* ═══════════════════════════════════════
   3D TILT CARD EFFECT
   ═══════════════════════════════════════ */

.tilt-card {
  transition: transform .15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card .card-glare {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    var(--glare-angle, 135deg),
    rgba(255,255,255,.15) 0%,
    rgba(255,255,255,.03) 40%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 5;
}
.tilt-card:hover .card-glare,
.tilt-card.touching .card-glare { opacity: 1; }

/* Animated gradient border on result cards */
.animated-border {
  position: relative;
}
.animated-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    rgba(200,160,60,.5),
    rgba(130,80,220,.3),
    rgba(200,160,60,.1),
    rgba(130,80,220,.3),
    rgba(200,160,60,.5)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
}
@keyframes rotateBorder {
  to { --border-angle: 360deg; }
}
/* Fallback for browsers without @property */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ════════════════════════════════
   BUTTONS
   ════════════════════════════════ */

.btn-primary {
  display: block; width: 100%;
  padding: 17px 20px; margin-top: 14px;
  background: linear-gradient(110deg, #8a6520, #c9a84c, #f0d87a, #c9a84c, #8a6520);
  background-size: 250% auto;
  color: #0a0814;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700; font-size: 17px; letter-spacing: .1em;
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 4px 28px rgba(200,160,60,.22), 0 1px 0 rgba(255,255,255,.15) inset;
  transition: background-position .5s, transform .15s, box-shadow .2s;
  text-decoration: none; text-align: center;
  position: relative; overflow: hidden;
}

/* Top shine stripe */
.btn-primary::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent);
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}

/* Ripple element */
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,.25) 0%, transparent 70%);
  opacity: 0; transform: scale(0);
  transition: opacity .4s, transform .4s;
  pointer-events: none;
}
.btn-primary:active::after {
  opacity: 1; transform: scale(1);
  transition: opacity .1s, transform .1s;
}
.btn-primary:active {
  transform: scale(.975);
  background-position: right center;
  box-shadow: 0 2px 14px rgba(200,160,60,.18);
}
.btn-primary:disabled {
  opacity: .5;
  pointer-events: none;
}

.btn-secondary {
  display: block; width: 100%;
  padding: 13px 20px; margin-top: 14px;
  background: transparent;
  border: 1px solid rgba(232,228,240,.08);
  color: rgba(232,228,240,.35);
  border-radius: 14px;
  font-family: 'Outfit', sans-serif; font-size: 13px;
  cursor: pointer; text-align: center; transition: .2s;
}
.btn-secondary:active {
  background: rgba(255,255,255,.03);
  color: rgba(232,228,240,.55);
}

.btn-outline {
  display: block; width: 100%;
  padding: 13px 20px;
  background: rgba(200,160,60,.04);
  border: 1px solid rgba(200,160,60,.14);
  color: rgba(232,228,240,.5);
  border-radius: 14px;
  font-family: 'Outfit', sans-serif; font-size: 13px;
  cursor: pointer; text-align: center; transition: .2s;
}
.btn-outline:active { background: rgba(200,160,60,.08); }

/* ════════════════════════════════
   RESULT SCREENS
   ════════════════════════════════ */

.result-hero {
  display: flex; justify-content: center;
  margin: 24px 0 12px;
}
.result-hero .drawn-mini {
  width: 130px; height: 208px; border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,.6), 0 0 24px rgba(200,160,60,.1);
}

/* Interpret Card */
.interpret-card {
  background: linear-gradient(160deg, rgba(255,255,255,.033), rgba(255,255,255,.008));
  border: 1px solid rgba(200,160,60,.09);
  border-radius: 18px;
  padding: 22px 18px 24px;
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}
.interpret-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,160,60,.18), transparent);
}

.interpret-header {
  display: flex; align-items: center;
  justify-content: center; gap: 12px;
  margin-bottom: 18px;
}
.interpret-header h2 {
  font-size: 20px; color: #f4ecd6;
  font-weight: 500; white-space: nowrap;
  letter-spacing: .03em;
}
.ornament-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,160,60,.18), transparent);
}

.interpret-body {
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(232,228,240,.72);
  font-weight: 300;
  letter-spacing: .01em;
}

/* Star dividers between sections */
.star-divider {
  text-align: center;
  color: rgba(200,160,60,.25);
  font-size: 10px;
  letter-spacing: 12px;
  margin: 20px 0;
}

/* Yes/No Verdict */
.verdict {
  font-family: 'Cormorant Garamond', serif;
  font-size: 42px; font-weight: 600;
  text-align: center; margin: 10px 0 8px;
  letter-spacing: .04em;
  text-shadow: 0 0 28px currentColor;
}
.verdict.yes { color: #7ed494; }
.verdict.no  { color: #d47a8a; }

.verdict-note {
  text-align: center;
  font-size: 12px;
  color: rgba(232,228,240,.32);
  font-weight: 300; margin-bottom: 6px;
  font-style: italic;
}

/* Paywall / Pro */
.teaser {
  font-size: 13.5px; line-height: 1.75;
  color: rgba(232,228,240,.48);
  font-weight: 300; position: relative;
  max-height: 72px; overflow: hidden;
  white-space: pre-line;
}
.teaser::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 52px;
  background: linear-gradient(transparent, rgba(7,5,18,.97));
}

.paywall-section {
  text-align: center; margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(200,160,60,.07);
}
.lock-icon { color: rgba(200,160,60,.45); margin-bottom: 12px; }
.paywall-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; color: #f4ecd6; font-weight: 500; margin-bottom: 8px;
}
.paywall-section p {
  font-size: 13px; color: rgba(232,228,240,.38);
  line-height: 1.65; margin-bottom: 18px; font-weight: 300;
}
.paywall-section em { color: rgba(200,160,60,.7); font-style: normal; }
.consult-btn { font-size: 15px !important; }
.consult-hint {
  display: block; margin-top: 10px;
  font-size: 10px; color: rgba(232,228,240,.16);
  font-weight: 300; letter-spacing: .05em;
}
.pro-row { margin-top: 24px; }

/* ════════════════════════════════
   3D FLIP CARDS
   ════════════════════════════════ */

.flip-container {
  perspective: 1200px;
  width: 88px; height: 141px; margin: 0 auto;
}
.flip-container.flipping .flipper { transform: rotateY(180deg); }

.flipper {
  position: relative; width: 100%; height: 100%;
  transition: transform .75s cubic-bezier(.23,1,.32,1);
  transform-style: preserve-3d;
}

.flip-front, .flip-back {
  position: absolute; width: 100%; height: 100%;
  backface-visibility: hidden;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(200,160,60,.28);
  box-shadow: 0 6px 24px rgba(0,0,0,.55);
}
.flip-front {
  background: linear-gradient(155deg, #1e1738, #130f26);
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.flip-front::before {
  content: '✦';
  font-size: 30px;
  color: rgba(200,160,60,.2);
  text-shadow: 0 0 14px rgba(200,160,60,.15);
  position: absolute;
}
.flip-front::after {
  content: '';
  position: absolute; inset: 6px;
  border: 1px solid rgba(200,160,60,.08);
  border-radius: 6px;
}

.flip-back { transform: rotateY(180deg); }
.flip-back img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-back .card-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(7,5,18,.92) 35%);
  color: #dcc97a;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px; font-weight: 500;
  text-align: center; padding: 16px 4px 6px;
  letter-spacing: .03em;
}
.flip-container.reversed .flip-back img { transform: rotate(180deg); }

/* ════════════════════════════════
   SPLASH SCREEN
   ════════════════════════════════ */

#splash-screen {
  position: fixed; inset: 0; z-index: 999;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, #0f0a2a, #070512);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .7s ease;
}
#splash-screen.hidden { opacity: 0; pointer-events: none; }

.splash-inner { text-align: center; padding: 20px; }

.splash-sigil {
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 24px rgba(200,160,60,.35));
  animation: splashRotate 4s linear infinite;
}
@keyframes splashRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.splash-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px; font-weight: 300;
  letter-spacing: .22em; color: #f4ecd6;
  text-transform: uppercase; margin-bottom: 8px;
}
.splash-sub {
  font-size: 11px; color: rgba(232,228,240,.28);
  letter-spacing: .12em; margin-bottom: 32px;
  font-weight: 300; font-style: italic;
}
.splash-dots { display: flex; justify-content: center; gap: 9px; }
.splash-dots span {
  width: 5px; height: 5px;
  background: rgba(200,160,60,.45);
  border-radius: 50%;
  animation: dotPulse 1.3s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: .22s; }
.splash-dots span:nth-child(3) { animation-delay: .44s; }
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(.55); opacity: .25; }
  40%            { transform: scale(1.1); opacity: 1; }
}

/* ════════════════════════════════
   MOON BADGE & TYPING
   ════════════════════════════════ */

.typing-cursor::after {
  content: '|';
  animation: blink .65s step-end infinite;
  color: #c9a84c;
  font-weight: 300;
}
@keyframes blink { 50% { opacity: 0; } }

/* ════════════════════════════════
   ZODIAC MODAL
   ════════════════════════════════ */

.zodiac-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(7,5,18,.75);
  backdrop-filter: blur(8px);
  animation: fadeIn .25s ease;
}
.zodiac-modal.hidden { display: none; }

.zodiac-sheet {
  width: 100%; max-width: 430px;
  background: linear-gradient(170deg, #13102a, #0c0a1e);
  border-radius: 24px 24px 0 0;
  padding: 28px 18px 44px;
  border-top: 1px solid rgba(200,160,60,.14);
  animation: slideUp .38s cubic-bezier(.23,1,.32,1);
  position: relative;
}
.zodiac-sheet::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 36px; height: 3px; margin-top: 10px;
  background: rgba(255,255,255,.12); border-radius: 2px;
}

@keyframes slideUp  { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }

.zodiac-sheet h3 {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; color: #f4ecd6; font-weight: 400;
  margin-bottom: 5px; letter-spacing: .04em;
}
.zodiac-sheet > p {
  text-align: center;
  font-size: 12px; color: rgba(232,228,240,.3);
  margin-bottom: 22px; font-weight: 300; font-style: italic;
}

.zodiac-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }

.zodiac-btn {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 13px 6px;
  text-align: center; cursor: pointer;
  transition: all .18s; color: #ede9f8;
}
.zodiac-btn:active {
  background: rgba(200,160,60,.1);
  border-color: rgba(200,160,60,.25);
  transform: scale(.95);
}
.zodiac-btn .zodiac-sign { font-size: 24px; display: block; margin-bottom: 5px; }
.zodiac-btn .zodiac-name {
  font-size: 9px; color: rgba(232,228,240,.3);
  letter-spacing: .05em; text-transform: uppercase;
}

/* ════════════════════════════════
   ZODIAC RESULT
   ════════════════════════════════ */

.zodiac-result-block {
  background: linear-gradient(135deg, rgba(200,160,60,.05), rgba(130,80,220,.04));
  border: 1px solid rgba(200,160,60,.12);
  border-radius: 16px; padding: 20px 18px;
  margin-top: 18px; text-align: center;
}
.zodiac-result-block .zodiac-big { font-size: 52px; margin-bottom: 8px; display: block; }
.zodiac-result-block h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px; color: #f4ecd6; margin-bottom: 8px; font-weight: 500;
}
.zodiac-result-block p {
  font-size: 13px; color: rgba(232,228,240,.55); line-height: 1.68; font-weight: 300;
}

/* ════════════════════════════════
   BIRTH FORM (Карта Года)
   ════════════════════════════════ */

.birth-form { display: flex; flex-direction: column; }

.birth-label {
  font-size: 11px; font-weight: 600;
  color: rgba(232,228,240,.35); letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 10px;
}

.birth-input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(200,160,60,.18);
  border-radius: 14px; color: #ede9f8;
  font-family: 'Outfit', sans-serif;
  font-size: 18px; padding: 15px 18px;
  outline: none; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; color-scheme: dark;
  text-align: center; letter-spacing: .04em;
}
.birth-input:focus {
  border-color: rgba(200,160,60,.45);
  box-shadow: 0 0 0 3px rgba(200,160,60,.07);
}

.year-num-pill {
  display: inline-block;
  background: linear-gradient(135deg, rgba(150,80,220,.12), rgba(100,50,180,.08));
  border: 1px solid rgba(150,80,220,.2);
  color: #b890e0; border-radius: 24px;
  padding: 5px 16px; font-size: 12px; letter-spacing: .05em;
}

/* ════════════════════════════════
   NATAL SPREAD SCREEN
   ════════════════════════════════ */

.natal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.natal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.natal-form .form-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(232,228,240,.35);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.time-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.time-btn {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  color: rgba(232,228,240,.5);
}
.time-btn .time-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.time-btn .time-label { font-size: 10px; letter-spacing: .03em; }
.time-btn.active {
  background: rgba(200,160,60,.1);
  border-color: rgba(200,160,60,.3);
  color: #f0dfa0;
  box-shadow: 0 0 12px rgba(200,160,60,.08);
}
.time-btn:active { transform: scale(.95); }

/* Zodiac Wheel Animation */
.zodiac-wheel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  margin: 20px 0;
  perspective: 800px;
}

.zodiac-wheel {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(200,160,60,.2);
  position: relative;
  animation: wheelSpin 3s cubic-bezier(.22,1,.36,1) forwards;
  box-shadow: 0 0 40px rgba(130,80,220,.12), 0 0 80px rgba(200,160,60,.06);
}

.zodiac-wheel .wheel-sign {
  position: absolute;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: .4;
  transition: all .5s;
}
.zodiac-wheel .wheel-sign.active {
  opacity: 1;
  transform: scale(1.4);
  filter: drop-shadow(0 0 8px rgba(200,160,60,.6));
}

.zodiac-wheel .wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: #f0dfa0;
  text-shadow: 0 0 20px rgba(200,160,60,.5);
}

@keyframes wheelSpin {
  0% { transform: rotate(0deg) scale(.8); opacity: 0; }
  50% { transform: rotate(720deg) scale(1.05); opacity: 1; }
  100% { transform: rotate(var(--target-rotation, 1080deg)) scale(1); opacity: 1; }
}

/* Natal result positions */
.natal-positions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.natal-position {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.025), rgba(255,255,255,.008));
  border: 1px solid rgba(200,160,60,.08);
  border-radius: 16px;
  animation: positionReveal .6s ease-out backwards;
}
.natal-position:nth-child(1) { animation-delay: .1s; }
.natal-position:nth-child(2) { animation-delay: .3s; }
.natal-position:nth-child(3) { animation-delay: .5s; }

@keyframes positionReveal {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.natal-position .pos-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200,160,60,.06);
  border-radius: 12px;
  border: 1px solid rgba(200,160,60,.1);
}

.natal-position .pos-info h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: #f0dfa0;
  font-weight: 500;
  margin-bottom: 4px;
}
.natal-position .pos-info p {
  font-size: 13px;
  color: rgba(232,228,240,.45);
  line-height: 1.6;
  font-weight: 300;
}

/* ════════════════════════════════
   COMPATIBILITY SPREAD SCREEN
   ════════════════════════════════ */

.compat-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compat-names {
  display: flex;
  gap: 12px;
  align-items: center;
}

.compat-name-input {
  flex: 1;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(220,80,130,.15);
  border-radius: 14px;
  color: #ede9f8;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  text-align: center;
}
.compat-name-input:focus {
  border-color: rgba(220,80,130,.4);
  box-shadow: 0 0 0 3px rgba(220,80,130,.06);
}
.compat-name-input::placeholder { color: rgba(232,228,240,.2); }

.compat-heart-divider {
  font-size: 22px;
  color: rgba(220,80,130,.5);
  flex-shrink: 0;
  animation: heartBeat 1.5s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
}

/* Compatibility card grid - heart layout */
.compat-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 10px;
  justify-items: center;
  margin: 20px 0;
  padding: 0 10px;
}

.compat-card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: cardFlyIn .6s cubic-bezier(.175,.885,.32,1.275) backwards;
}
.compat-card-slot:nth-child(1) { animation-delay: .1s; }
.compat-card-slot:nth-child(2) { animation-delay: .2s; }
.compat-card-slot:nth-child(3) { animation-delay: .3s; }
.compat-card-slot:nth-child(4) { animation-delay: .4s; }
.compat-card-slot:nth-child(5) { animation-delay: .5s; }
.compat-card-slot:nth-child(6) { animation-delay: .6s; }

@keyframes cardFlyIn {
  from { opacity: 0; transform: translateY(40px) scale(.7) rotate(10deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.compat-card-slot .slot-label {
  font-size: 9px;
  color: rgba(232,228,240,.35);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  font-weight: 500;
}

/* Compatibility percentage circle */
.compat-percent-container {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.compat-circle {
  position: relative;
  width: 140px;
  height: 140px;
}

.compat-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.compat-circle .circle-bg {
  fill: none;
  stroke: rgba(255,255,255,.05);
  stroke-width: 6;
}

.compat-circle .circle-progress {
  fill: none;
  stroke: url(#compatGradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: var(--circumference, 408);
  stroke-dashoffset: var(--offset, 408);
  transition: stroke-dashoffset 2s cubic-bezier(.22,1,.36,1);
}

.compat-circle .circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.compat-circle .percent-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 600;
  color: #f0dfa0;
  line-height: 1;
  text-shadow: 0 0 20px rgba(200,160,60,.3);
}

.compat-circle .percent-label {
  font-size: 10px;
  color: rgba(232,228,240,.35);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Pink particles for compatibility */
.particle.pink {
  background: radial-gradient(circle, rgba(220,80,130,.8), transparent);
}

/* ════════════════════════════════
   CELTIC CROSS SCREEN
   ════════════════════════════════ */

.celtic-layout {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 20px auto;
  min-height: 380px;
}

.celtic-card {
  position: absolute;
  width: 62px;
  height: 99px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(200,160,60,.28);
  box-shadow: 0 4px 16px rgba(0,0,0,.5), 0 0 8px rgba(200,160,60,.05);
  cursor: pointer;
  transition: transform .3s, box-shadow .3s, z-index 0s;
  animation: celticReveal .5s cubic-bezier(.175,.885,.32,1.275) backwards;
}
.celtic-card:active {
  transform: scale(1.15) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.7), 0 0 20px rgba(200,160,60,.15);
  z-index: 50;
}
.celtic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.celtic-card.reversed img { transform: rotate(180deg); }

.celtic-card .celtic-num {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: rgba(7,5,18,.85);
  border: 1px solid rgba(200,160,60,.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 600;
  color: #dcc97a;
  z-index: 5;
}

@keyframes celticReveal {
  from { opacity: 0; transform: scale(.3) rotate(20deg); }
  to { opacity: 1; transform: scale(1) rotate(var(--card-rotation, 0deg)); }
}

/* Celtic Cross positioning — Cross section */
/* Center cards (1 & 2) */
.celtic-card[data-pos="1"] {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  animation-delay: .1s;
}
.celtic-card[data-pos="2"] {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  z-index: 11;
  animation-delay: .3s;
  --card-rotation: 90deg;
}
/* Top (3 - Conscious) */
.celtic-card[data-pos="3"] {
  left: 50%; top: 12%;
  transform: translateX(-50%);
  z-index: 9;
  animation-delay: .5s;
}
/* Bottom (4 - Subconscious) */
.celtic-card[data-pos="4"] {
  left: 50%; bottom: 22%;
  transform: translateX(-50%);
  z-index: 9;
  animation-delay: .7s;
}
/* Left (5 - Past) */
.celtic-card[data-pos="5"] {
  left: 14%; top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  animation-delay: .9s;
}
/* Right (6 - Future) */
.celtic-card[data-pos="6"] {
  right: 34%; top: 50%;
  transform: translateY(-50%);
  z-index: 9;
  animation-delay: 1.1s;
}

/* Staff section (right column) */
.celtic-card[data-pos="7"] {
  right: 6%; bottom: 4%;
  z-index: 9;
  animation-delay: 1.3s;
}
.celtic-card[data-pos="8"] {
  right: 6%; bottom: calc(4% + 108px);
  z-index: 9;
  animation-delay: 1.5s;
}
.celtic-card[data-pos="9"] {
  right: 6%; bottom: calc(4% + 216px);
  z-index: 9;
  animation-delay: 1.7s;
}
.celtic-card[data-pos="10"] {
  right: 6%; top: 0;
  z-index: 9;
  animation-delay: 1.9s;
}

/* Celtic position labels */
.celtic-labels {
  display: none; /* Hidden until result */
}

/* Celtic card detail modal */
.celtic-detail-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7,5,18,.85);
  backdrop-filter: blur(12px);
  animation: fadeIn .25s ease;
  padding: 20px;
}
.celtic-detail-modal.hidden { display: none; }

.celtic-detail-content {
  width: 100%;
  max-width: 380px;
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(170deg, #13102a, #0c0a1e);
  border: 1px solid rgba(200,160,60,.14);
  border-radius: 20px;
  padding: 24px 18px;
  animation: scaleIn .3s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

.celtic-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.celtic-detail-header .detail-card-img {
  width: 70px;
  height: 112px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(200,160,60,.3);
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  flex-shrink: 0;
}
.celtic-detail-header .detail-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.celtic-detail-header .detail-card-img.reversed img {
  transform: rotate(180deg);
}

.celtic-detail-header .detail-info h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: #f0dfa0;
  font-weight: 500;
  margin-bottom: 4px;
}
.celtic-detail-header .detail-info .detail-position {
  font-size: 11px;
  color: rgba(130,80,220,.8);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}
.celtic-detail-header .detail-info .detail-reversed {
  font-size: 10px;
  color: rgba(220,80,80,.7);
  margin-top: 3px;
}

.celtic-detail-body {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(232,228,240,.65);
  font-weight: 300;
}

/* ════════════════════════════════
   SHUFFLE & PARTICLES
   ════════════════════════════════ */

@keyframes shuffleLeft {
  0%  { transform: translateX(0) rotate(0); }
  50% { transform: translateX(-14px) rotate(-5deg); }
  100%{ transform: translateX(0) rotate(0); }
}
@keyframes shuffleRight {
  0%  { transform: translateX(0) rotate(0); }
  50% { transform: translateX(14px) rotate(5deg); }
  100%{ transform: translateX(0) rotate(0); }
}
.deck.shuffling .deck-card:nth-child(1) { animation: shuffleLeft .2s ease; }
.deck.shuffling .deck-card:nth-child(2) { animation: shuffleRight .2s ease .06s; }
.deck.shuffling .deck-card.top          { animation: shuffleLeft .2s ease .12s; }

.particle {
  position: fixed; pointer-events: none;
  border-radius: 50%; z-index: 200;
  animation: particleFly 1s ease-out forwards;
}
@keyframes particleFly {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx),var(--dy)) scale(0); }
}

/* Enhanced particle burst */
.particle-burst {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  width: var(--p-size, 4px);
  height: var(--p-size, 4px);
  border-radius: 50%;
  background: var(--p-color, rgba(200,168,76,.9));
  box-shadow: 0 0 var(--p-glow, 6px) var(--p-color, rgba(200,168,76,.5));
  animation: particleBurst var(--p-duration, 1.2s) cubic-bezier(.22,1,.36,1) forwards;
}

@keyframes particleBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  60% { opacity: .8; }
  100% { opacity: 0; transform: translate(var(--p-dx, 0), var(--p-dy, 0)) scale(0) rotate(var(--p-rot, 180deg)); }
}

/* ════════════════════════════════
   REFERRAL / LINK BOX
   ════════════════════════════════ */

.ref-link-box {
  background: rgba(200,160,60,.04);
  border: 1px dashed rgba(200,160,60,.22);
  border-radius: 10px; padding: 12px 14px;
  font-family: 'Outfit', monospace;
  font-size: 11.5px; color: #c9a84c;
  word-break: break-all;
  margin-bottom: 14px; line-height: 1.5;
  letter-spacing: .01em;
}

/* ════════════════════════════════
   TEXT BLUR REVEAL EFFECT
   ════════════════════════════════ */

.text-blur-reveal {
  animation: blurReveal .8s ease-out forwards;
}

@keyframes blurReveal {
  from { filter: blur(8px); opacity: 0; }
  to { filter: blur(0); opacity: 1; }
}

/* ════════════════════════════════
   LOADING SKELETON
   ════════════════════════════════ */

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg,
    rgba(255,255,255,.03) 25%,
    rgba(255,255,255,.06) 50%,
    rgba(255,255,255,.03) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  margin-bottom: 8px;
}
.skeleton-line:nth-child(2) { width: 85%; }
.skeleton-line:nth-child(3) { width: 70%; }

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════
   RESPONSIVE & UTILITIES
   ════════════════════════════════ */

@media (max-width: 360px) {
  .celtic-card {
    width: 52px;
    height: 83px;
  }
  .compat-cards-grid {
    gap: 6px;
    padding: 0 4px;
  }
  .natal-positions .natal-position {
    padding: 12px;
  }
}

/* ════════════════════════════════
   TAB BAR & VIEW TRANSITIONS
   ════════════════════════════════ */

.bottom-tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(10, 8, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(200, 160, 60, 0.15);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #a59fc4;
  opacity: 0.6;
  transition: all 0.3s ease;
  flex: 1; height: 100%;
  cursor: pointer;
}
.tab-item svg { margin-bottom: 4px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tab-item span { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; }

.tab-item.active {
  color: #f0dfa0;
  opacity: 1;
}
.tab-item.active svg {
  transform: translateY(-2px) scale(1.1);
  filter: drop-shadow(0 2px 6px rgba(240, 223, 160, 0.4));
}

.tab-view {
  display: none;
  animation: tabFadeIn 0.35s ease-out forwards;
}
.tab-view.active { display: block; }

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════
   HOME TAB COMPONENTS
   ════════════════════════════════ */
.quick-actions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px;
}
.quick-action-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 16px 8px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: transform 0.2s, background 0.2s;
  cursor: pointer;
}
.quick-action-card:active { transform: scale(0.95); background: rgba(255,255,255,0.06); }
.qa-icon { color: #d4a373; margin-bottom: 8px; filter: drop-shadow(0 0 8px rgba(212,163,115,0.4)); }
.quick-action-card span { font-size: 12px; font-weight: 500; color: #ede9f8; }

.deck-widget {
  background: linear-gradient(135deg, rgba(80, 50, 140, 0.2) 0%, rgba(30, 20, 60, 0.4) 100%);
  border: 1px solid rgba(130, 80, 220, 0.3);
  border-radius: 16px; padding: 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: inset 0 0 20px rgba(130,80,220,0.1), 0 8px 24px rgba(0,0,0,0.4);
  position: relative; overflow: hidden;
  cursor: pointer;
}
.deck-widget-content h3 { font-family: 'Cormorant Garamond', serif; color: #f0dfa0; font-size: 20px; margin-bottom: 4px; }
.deck-widget-content p { font-size: 13px; color: #a59fc4; margin-bottom: 12px; }
.btn-sm { display: inline-block; background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid rgba(255,255,255,0.15); }
.deck-3d-mini { position: relative; width: 60px; height: 90px; perspective: 600px; }
.deck-card-mini { position: absolute; inset: 0; background: url('card_back.jpg') center/cover; border-radius: 6px; border: 1px solid rgba(240,223,160,0.4); box-shadow: 0 4px 10px rgba(0,0,0,0.5); transition: transform 0.3s; }

/* ════════════════════════════════
   CATALOG COMPONENTS
   ════════════════════════════════ */
.tab-title { font-family: 'Cormorant Garamond', serif; font-size: 28px; color: #f0dfa0; text-align: center; margin: 10px 0 24px; text-shadow: 0 2px 10px rgba(240,223,160,0.2); }
.catalog-category { font-size: 16px; font-weight: 500; color: #ede9f8; margin-bottom: 12px; padding-left: 4px; letter-spacing: 0.02em; }

.catalog-scroll-row {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 16px; margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.catalog-scroll-row::-webkit-scrollbar { display: none; }
.catalog-card {
  flex: 0 0 160px; height: 200px;
  position: relative; border-radius: 16px; overflow: hidden;
  background: rgba(20, 15, 30, 0.6); border: 1px solid rgba(255,255,255,0.1);
  scroll-snap-align: start; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  transition: transform 0.2s;
  cursor: pointer;
}
.catalog-card:active { transform: scale(0.96); }
.cc-bg { position: absolute; inset: 0; opacity: 0.7; z-index: 0; transition: opacity 0.3s; filter: brightness(0.8) saturate(0.85); }
.catalog-card:hover .cc-bg { opacity: 0.85; }
.catalog-card::after { content:''; position:absolute; inset:0; z-index:0; background: linear-gradient(0deg, rgba(6,5,14,0.85) 0%, rgba(6,5,14,0.3) 50%, rgba(6,5,14,0.05) 100%); pointer-events:none; }
.cc-content { position: relative; z-index: 1; }
.cc-content h3 { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: #fff; margin-bottom: 4px; line-height: 1.1; text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7); }
.cc-content p { font-size: 12px; color: rgba(255,255,255,0.8); line-height: 1.3; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.cc-badge { position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: 20px; font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.cc-badge.pro { color: #f0dfa0; border: 1px solid rgba(240,223,160,0.3); }
.cc-badge.premium { background: linear-gradient(45deg, #c9a84c, #f0dfa0); color: #000; }
.cc-badge.new { color: #d4a373; border: 1px solid rgba(212,163,115,0.3); }

/* ════════════════════════════════
   PROFILE COMPONENTS
   ════════════════════════════════ */
.profile-header-card { display: flex; align-items: center; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 20px; margin-bottom: 24px; }
.profile-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #2a1f45, #140d25); border: 2px solid rgba(130,80,220,0.5); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-right: 16px; box-shadow: 0 0 16px rgba(130,80,220,0.3); }
.profile-info h3 { font-family: 'Cormorant Garamond', serif; font-size: 24px; color: #f0dfa0; margin-bottom: 2px; }
.profile-info p { font-size: 13px; color: #a59fc4; }

.profile-stats { display: flex; gap: 12px; margin-bottom: 24px; }
.stat-box { flex: 1; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 16px; text-align: center; }
.stat-num { font-size: 24px; font-weight: 600; color: #ede9f8; margin-bottom: 4px; font-family: 'Outfit', sans-serif; }
.stat-label { font-size: 11px; color: #a59fc4; text-transform: uppercase; letter-spacing: 0.05em; }

/* View Transitions API Support */
::view-transition-old(root) { animation: 150ms cubic-bezier(0.4, 0, 1, 1) both fade-out; }
::view-transition-new(root) { animation: 210ms cubic-bezier(0, 0, 0.2, 1) 150ms both fade-in; }
@keyframes fade-in { from { opacity: 0; transform: scale(0.98); } }
@keyframes fade-out { to { opacity: 0; transform: scale(1.02); } }

@media (max-width: 360px) {
  .catalog-card { flex: 0 0 140px; height: 180px; }
  .cc-content h3 { font-size: 18px; }
}

/* ═══════════════════════════════════════
   MATRIX OF DESTINY
   ═══════════════════════════════════════ */

/* --- Home Banner --- */
.matrix-banner {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-top: 18px;
  cursor: pointer;
  border: 1px solid rgba(201,168,76,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.matrix-banner:active { transform: scale(0.98); }
.matrix-banner:hover { box-shadow: 0 8px 32px rgba(201,168,76,0.15); }

.matrix-banner-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(30, 15, 60, 0.95) 0%,
    rgba(15, 8, 30, 0.98) 40%,
    rgba(50, 25, 20, 0.95) 100%);
}
.matrix-banner-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(201,168,76,0.08), transparent 70%);
}

.matrix-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.matrix-banner-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(201,168,76,0.4));
  animation: matrixRotate 20s linear infinite;
}
@keyframes matrixRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.matrix-banner-text { flex: 1; }
.matrix-banner-text h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #f0dfa0;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}
.matrix-banner-text p {
  font-size: 12px;
  color: #a59fc4;
  letter-spacing: 0.03em;
}

.matrix-banner-arrow {
  flex-shrink: 0;
  opacity: 0.7;
}

/* --- Matrix Screen --- */
.matrix-input-form {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 24px;
}

.matrix-field-group { margin-bottom: 18px; }
.matrix-field-group:last-of-type { margin-bottom: 20px; }

.matrix-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a59fc4;
  margin-bottom: 8px;
}

.matrix-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  color: #ede9f8;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}
.matrix-input::-webkit-inner-spin-button,
.matrix-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.matrix-input:focus {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}
.matrix-input::placeholder { color: rgba(165,159,196,0.5); }

.matrix-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.matrix-date-row .date-part { flex: 1; text-align: center; }
.matrix-date-row .year-part { flex: 1.8; }
.date-dot { color: #a59fc4; font-size: 18px; font-weight: 300; }

.matrix-calc-btn {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 12px;
}

/* --- Result Header --- */
.matrix-person-header {
  text-align: center;
  margin-bottom: 24px;
}
.matrix-person-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  color: #f0dfa0;
  margin-bottom: 4px;
}
.matrix-person-date {
  font-size: 13px;
  color: #a59fc4;
  letter-spacing: 0.05em;
}

/* --- Matrix SVG Diagram --- */
.matrix-diagram-wrap {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 24px;
  overflow: hidden;
}
.matrix-svg { display: block; width: 100%; }

/* --- Key Numbers Grid --- */
.matrix-keys-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.matrix-key-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.matrix-key-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  color: #c9a84c;
  font-weight: 600;
  line-height: 1;
  min-width: 36px;
  text-align: center;
}
.matrix-key-info {}
.matrix-key-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a59fc4;
  margin-bottom: 2px;
}
.matrix-key-desc {
  font-size: 13px;
  color: #ede9f8;
  line-height: 1.35;
}

/* --- Description blocks --- */
.matrix-description {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 20px;
}
.matrix-desc-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid #c9a84c;
  border-radius: 0 14px 14px 0;
  padding: 14px 16px;
}
.matrix-desc-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  color: #f0dfa0;
  margin-bottom: 6px;
}
.matrix-desc-text {
  font-size: 13px;
  color: #c4beda;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   MYSTIC MAXIMUM — Design Overlay v4.0
   Тёмно-фиолетовая мистика: туман, руны, свечи
   ═══════════════════════════════════════════ */

/* ── Deep violet base ── */
html, body {
  background:
    radial-gradient(ellipse 110% 70% at 50% -15%, #1a0f3c 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 110%, #170a2e 0%, transparent 55%),
    #08051a;
}

.vignette {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(120, 60, 230, .2), transparent 60%),
    radial-gradient(ellipse 60% 40% at 15% 100%, rgba(200, 130, 40, .09), transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 95%, rgba(100, 50, 210, .12), transparent 60%),
    radial-gradient(ellipse 140% 90% at 50% 50%, transparent 55%, rgba(2, 1, 8, .55) 100%);
}

.fog-layer { opacity: .35; z-index: 0; }

/* ── Floating runes ── */
.rune-float {
  position: fixed;
  top: 105%;
  z-index: 0;
  pointer-events: none;
  font-size: var(--rune-size, 16px);
  color: rgba(170, 130, 240, .0);
  text-shadow: 0 0 12px rgba(150, 90, 230, .5);
  animation: runeRise var(--rune-dur, 20s) linear infinite;
  animation-delay: var(--rune-delay, 0s);
  font-family: serif;
}
@keyframes runeRise {
  0%   { transform: translateY(0) rotate(0deg);      color: rgba(170,130,240,0); }
  12%  { color: rgba(170,130,240,.34); }
  55%  { color: rgba(200,168,76,.22); }
  88%  { color: rgba(170,130,240,.12); }
  100% { transform: translateY(-115vh) rotate(160deg); color: rgba(170,130,240,0); }
}

/* ── Candle glow in bottom corners ── */
.candle-glow {
  position: fixed;
  bottom: -60px;
  width: 220px;
  height: 220px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 80%, rgba(230, 160, 60, .16), rgba(200, 110, 30, .06) 45%, transparent 70%);
  animation: candleFlicker 4.2s ease-in-out infinite;
  mix-blend-mode: screen;
}
.candle-glow.left  { left: -70px; }
.candle-glow.right { right: -70px; animation-delay: -2.1s; animation-duration: 5.1s; }
@keyframes candleFlicker {
  0%, 100% { opacity: .65; transform: scale(1); }
  18% { opacity: .9;  transform: scale(1.06); }
  34% { opacity: .7;  transform: scale(.97); }
  52% { opacity: 1;   transform: scale(1.09); }
  71% { opacity: .75; transform: scale(1.01); }
  86% { opacity: .92; transform: scale(1.05); }
}

/* ── Brand & headers: ritual typography ── */
.brand {
  background: linear-gradient(120deg, #d8c27a 10%, #f7ecc8 35%, #b08fe8 65%, #d8c27a 90%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brandShimmer 7s linear infinite;
  filter: drop-shadow(0 0 18px rgba(150, 100, 240, .25));
}
@keyframes brandShimmer { to { background-position: 220% center; } }

.sigil { filter: drop-shadow(0 0 28px rgba(150, 90, 230, .45)) drop-shadow(0 0 10px rgba(200, 160, 60, .25)); }
.sigil::after { border-color: rgba(150, 90, 230, .14); }
@keyframes sigilGlow {
  0%, 100% { border-color: rgba(150,90,230,.12); box-shadow: 0 0 0 rgba(150,90,230,0); }
  50% { border-color: rgba(150,90,230,.3); box-shadow: 0 0 26px rgba(150,90,230,.14); }
}

.tab-title { position: relative; }
.tab-title::before, .tab-title::after {
  content: '✦';
  font-size: 11px;
  color: rgba(160, 110, 240, .55);
  vertical-align: middle;
  margin: 0 12px;
  text-shadow: 0 0 8px rgba(150, 90, 230, .6);
}

.section-label::before {
  content: '☽';
  color: rgba(170, 130, 240, .5);
  font-size: 11px;
}
.section-label { color: rgba(210, 195, 245, .35); }
.section-label::after { background: linear-gradient(90deg, rgba(150,90,230,.28), rgba(200,160,60,.1), transparent); }

/* ── Moon badge: amulet style ── */
.moon-badge {
  background: linear-gradient(135deg, rgba(140, 80, 230, .14), rgba(200, 160, 60, .07));
  border: 1px solid rgba(150, 100, 240, .3);
  box-shadow: 0 0 18px rgba(130, 70, 220, .12), inset 0 0 12px rgba(130, 70, 220, .06);
}

/* ── Quick actions: ritual stones ── */
.quick-action-card {
  background: linear-gradient(160deg, rgba(120, 70, 220, .1), rgba(30, 18, 60, .35));
  border: 1px solid rgba(150, 100, 240, .22);
  box-shadow: inset 0 0 16px rgba(120, 70, 220, .07), 0 4px 14px rgba(0, 0, 0, .35);
  position: relative;
  overflow: hidden;
}
.quick-action-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(170, 120, 250, .12), transparent 65%);
  pointer-events: none;
}
.quick-action-card:active {
  border-color: rgba(170, 120, 250, .45);
  box-shadow: inset 0 0 22px rgba(140, 80, 230, .16), 0 0 18px rgba(140, 80, 230, .14);
}
.qa-icon { color: #b890e8; filter: drop-shadow(0 0 10px rgba(150, 90, 230, .55)); }

/* ── Deck widget: portal ── */
.deck-widget {
  background: linear-gradient(135deg, rgba(95, 55, 180, .3) 0%, rgba(25, 14, 55, .6) 100%);
  border: 1px solid rgba(160, 100, 245, .4);
  box-shadow: inset 0 0 28px rgba(130, 80, 220, .16), 0 8px 28px rgba(0, 0, 0, .5), 0 0 22px rgba(130, 70, 220, .1);
}
.deck-card-mini {
  background: linear-gradient(155deg, #241a48, #150e2e);
  border: 1px solid rgba(180, 130, 250, .45);
}
.deck-card-mini::after {
  content: '☽';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  color: rgba(200, 160, 60, .4);
  text-shadow: 0 0 8px rgba(200, 160, 60, .4);
}

/* ── Card backs: arcane seal ── */
.deck-card, .flip-front {
  background:
    radial-gradient(circle at 50% 42%, rgba(140, 85, 230, .16), transparent 55%),
    linear-gradient(155deg, #221944, #120c28);
  border-color: rgba(165, 115, 245, .4);
}
.deck-card::after {
  content: '☽';
  font-size: 26px;
  color: rgba(190, 145, 250, .4);
  text-shadow: 0 0 16px rgba(150, 90, 230, .55);
}
.deck-card::before { border-color: rgba(165, 115, 245, .18); }
.flip-front::before {
  content: '☽';
  color: rgba(190, 145, 250, .42);
  text-shadow: 0 0 16px rgba(150, 90, 230, .55);
}
.flip-front::after { border-color: rgba(165, 115, 245, .16); }
.deck-aura {
  background: radial-gradient(circle, rgba(150, 90, 235, .22), transparent 65%);
}

/* ── Drawn cards: spirit glow ── */
.drawn-mini, .flip-front, .flip-back {
  border-color: rgba(175, 125, 250, .35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .55), 0 0 16px rgba(140, 85, 230, .14);
}

/* ── Interpret card: ritual scroll ── */
.interpret-card {
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(130, 80, 225, .08), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008));
  border: 1px solid rgba(155, 105, 240, .2);
  box-shadow: inset 0 0 30px rgba(110, 60, 210, .05), 0 8px 28px rgba(0, 0, 0, .35);
}
.interpret-card::before {
  background: linear-gradient(90deg, transparent, rgba(170, 120, 250, .35), rgba(200, 160, 60, .25), rgba(170, 120, 250, .35), transparent);
}
.interpret-card::after {
  content: '✦ ☽ ✦';
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 10px;
  color: rgba(170, 120, 250, .25);
  pointer-events: none;
}
.interpret-card { padding-bottom: 34px; }
.ornament-line { background: linear-gradient(90deg, transparent, rgba(170, 120, 250, .3), transparent); }

/* ── Buttons: enchanted gold ── */
.btn-primary {
  box-shadow: 0 4px 28px rgba(200, 160, 60, .26), 0 0 38px rgba(140, 80, 230, .14), 0 1px 0 rgba(255, 255, 255, .15) inset;
  animation: btnBreath 3.6s ease-in-out infinite;
}
@keyframes btnBreath {
  0%, 100% { box-shadow: 0 4px 24px rgba(200,160,60,.2), 0 0 26px rgba(140,80,230,.1), 0 1px 0 rgba(255,255,255,.15) inset; }
  50% { box-shadow: 0 4px 34px rgba(200,160,60,.34), 0 0 46px rgba(140,80,230,.2), 0 1px 0 rgba(255,255,255,.15) inset; }
}
.btn-outline {
  background: rgba(140, 85, 230, .06);
  border-color: rgba(160, 110, 245, .25);
}
.btn-outline:active { background: rgba(140, 85, 230, .12); }

/* ── Catalog: grimoire pages ── */
.catalog-card {
  border: 1px solid rgba(160, 105, 245, .28);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45), 0 0 14px rgba(130, 75, 220, .08);
}
.catalog-card::after {
  background: linear-gradient(0deg, rgba(8, 5, 22, .92) 0%, rgba(10, 6, 26, .35) 50%, rgba(10, 6, 26, .05) 100%);
}
.catalog-category {
  color: #d6c7f5;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
}
.cc-badge.pro { color: #c9b0f5; border-color: rgba(170, 120, 250, .4); }

/* ── Tab bar: obsidian glass ── */
.bottom-tab-bar {
  background: rgba(10, 6, 24, .88);
  border-top: 1px solid rgba(155, 105, 240, .22);
  box-shadow: 0 -8px 32px rgba(5, 2, 14, .6);
}
.tab-item.active { color: #cdb4f7; }
.tab-item.active svg { filter: drop-shadow(0 2px 8px rgba(160, 110, 245, .6)); }
.tab-item { position: relative; }
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(170, 120, 250, .8), rgba(200, 160, 60, .6));
  box-shadow: 0 0 10px rgba(160, 110, 245, .7);
}

/* ── Profile: seer's chamber ── */
.profile-avatar {
  border-color: rgba(170, 120, 250, .6);
  box-shadow: 0 0 22px rgba(140, 85, 230, .4), inset 0 0 14px rgba(140, 85, 230, .15);
  animation: avatarPulse 4s ease-in-out infinite;
}
@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(140,85,230,.32), inset 0 0 14px rgba(140,85,230,.12); }
  50% { box-shadow: 0 0 30px rgba(140,85,230,.5), inset 0 0 18px rgba(140,85,230,.2); }
}
.stat-box {
  background: linear-gradient(160deg, rgba(120, 70, 220, .08), rgba(255, 255, 255, .015));
  border-color: rgba(150, 100, 240, .18);
}
.stat-num { color: #d8c8f8; text-shadow: 0 0 14px rgba(150, 100, 240, .35); }

/* ── History: book of fate ── */
.history-item {
  background: linear-gradient(160deg, rgba(120, 70, 220, .06), rgba(255, 255, 255, .012));
  border-color: rgba(150, 100, 240, .15);
}
.history-thumb { border-color: rgba(170, 120, 250, .4); }

/* ── Inputs ── */
.question-input, .birth-input, .matrix-input {
  background: rgba(120, 70, 220, .06);
  border-color: rgba(160, 110, 245, .25);
}
.question-input:focus, .birth-input:focus, .matrix-input:focus {
  border-color: rgba(180, 135, 255, .55);
  box-shadow: 0 0 0 3px rgba(150, 100, 240, .1), 0 0 18px rgba(140, 85, 230, .12);
}

/* ── Splash: deep ritual ── */
#splash-screen {
  background: radial-gradient(ellipse 80% 60% at 50% 40%, #160c38, #08051a);
}
.splash-sigil { filter: drop-shadow(0 0 30px rgba(150, 90, 230, .5)); }

/* ── Zodiac sheet & modals ── */
.zodiac-sheet, .celtic-detail-content {
  background: linear-gradient(170deg, #181040, #0d0822);
  border-color: rgba(160, 110, 245, .25);
}
.zodiac-btn:active {
  background: rgba(150, 100, 240, .14);
  border-color: rgba(170, 120, 250, .4);
}

/* ── Paywall: forbidden knowledge ── */
.paywall-section {
  border-top-color: rgba(155, 105, 240, .15);
}
.lock-icon {
  color: rgba(180, 135, 255, .6) !important;
  filter: drop-shadow(0 0 12px rgba(150, 90, 230, .5));
  animation: lockPulse 2.6s ease-in-out infinite;
}
@keyframes lockPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(150,90,230,.35)); }
  50% { filter: drop-shadow(0 0 18px rgba(150,90,230,.7)); }
}

/* ── Reduce motion for low-power ── */
@media (prefers-reduced-motion: reduce) {
  .rune-float, .candle-glow, .ambient-particle, .fog-circle { display: none; }
  .btn-primary { animation: none; }
}

@media (min-width: 600px) {
  #app {
    padding: 40px 40px 100px;
  }
  .catalog-scroll-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    overflow-x: visible;
    gap: 20px;
  }
  .catalog-card {
    flex: auto;
    height: 280px;
  }
  .quick-actions-grid {
    gap: 16px;
  }
  .quick-action-card {
    padding: 24px 16px;
  }
  .qa-icon svg {
    width: 32px;
    height: 32px;
  }
  .quick-action-card span {
    font-size: 14px;
  }
}

/* ═══════════════════════════════════════════
   MONETIZATION: Blur Teaser + CTA
   ═══════════════════════════════════════════ */

/* Blur gradient over truncated text */
.truncated-wrapper {
  position: relative;
  overflow: hidden;
}
.truncated-wrapper .truncated-text {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(232,228,240,.75);
}
.truncated-wrapper .blur-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    to bottom,
    rgba(7, 5, 18, 0) 0%,
    rgba(7, 5, 18, 0.4) 30%,
    rgba(7, 5, 18, 0.85) 70%,
    rgba(7, 5, 18, 1) 100%
  );
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: none;
}

/* CTA block after readings */
.reading-cta {
  margin-top: 20px;
  padding: 20px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.15), rgba(100, 40, 20, 0.1));
  border: 1px solid rgba(200, 100, 60, 0.25);
  text-align: center;
  animation: ctaPulse 3s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { border-color: rgba(200, 100, 60, 0.25); }
  50% { border-color: rgba(240, 160, 80, 0.5); }
}
.reading-cta .cta-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #f0a050;
  font-size: 13px;
  font-weight: 500;
}
.reading-cta .cta-text {
  font-size: 14px;
  line-height: 1.6;
  color: #dcd7eb;
  margin-bottom: 16px;
}
.reading-cta .cta-btn {
  display: inline-block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8b2020, #a03030);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  border: none;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.3);
}
.reading-cta .cta-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(139, 0, 0, 0.2);
}

/* Soft CTA (after full free readings) */
.soft-cta {
  margin-top: 18px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.06);
  border: 1px dashed rgba(240, 223, 160, 0.2);
  text-align: center;
}
.soft-cta .soft-cta-text {
  font-size: 13px;
  color: #a59fc4;
  line-height: 1.5;
  margin-bottom: 10px;
}
.soft-cta .soft-cta-link {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(240, 223, 160, 0.2);
  color: #f0dfa0;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.soft-cta .soft-cta-link:active {
  background: rgba(255,255,255,0.1);
}

/* ── PAYMENT BUTTON 1 RUB & PRO BANNER ── */
.btn-pay-1r {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  margin: 14px 0 16px;
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 50%, #e67e22 100%);
  color: #0d0914 !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 245, 180, 0.7);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 22px rgba(241, 196, 15, 0.35), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
  animation: pulse-gold-glow 2.5s infinite ease-in-out;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.btn-pay-1r:active {
  transform: scale(0.97);
  box-shadow: 0 2px 10px rgba(241, 196, 15, 0.25);
}
@keyframes pulse-gold-glow {
  0%, 100% {
    box-shadow: 0 4px 22px rgba(241, 196, 15, 0.35), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  }
  50% {
    box-shadow: 0 4px 30px rgba(241, 196, 15, 0.65), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  }
}
.pay-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 14px;
  color: #a59fc4;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pay-divider::before,
.pay-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 12px;
}
.pro-access-banner {
  margin: 15px 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.16), rgba(212, 172, 13, 0.06));
  border: 1px solid rgba(241, 196, 15, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 0 0 20px rgba(243, 156, 18, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.pro-access-banner:active {
  transform: scale(0.98);
  border-color: rgba(241, 196, 15, 0.7);
}

