@import url("./theme.css");
@import url("./animations.css");

/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--grad-bg);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover {
  opacity: 0.85;
}

/* === CONTAINER === */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px 120px;
  position: relative;
  z-index: 2;
}

.container--wide {
  max-width: 1440px;
  padding: 24px 24px 120px;
}

@media (max-width: 540px) {
  .container--wide {
    padding: 18px 16px 100px;
  }
}

/* === HEADINGS === */
.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  text-align: center;
  color: var(--gold);
  text-shadow: 0 0 18px var(--gold-glow);
  margin: 12px 0 24px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.title--big {
  font-size: clamp(2rem, 7vw, 3rem);
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: -16px 0 24px;
}

/* === STAR FIELD (фоновая анимация звёзд) === */
.star-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.celestial {
  position: absolute;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  animation: blink 5s infinite ease-in-out;
}

/* === BUTTON === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--r-lg);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.25s ease, opacity 0.2s;
  user-select: none;
  position: relative;
}

.btn--primary {
  background: var(--grad-gold);
  color: #1a0e2c;
  box-shadow: var(--shadow-glow), 0 6px 16px rgba(0, 0, 0, 0.4);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 48px var(--gold-glow), 0 8px 22px rgba(0, 0, 0, 0.5);
}
.btn--primary:active {
  transform: translateY(1px);
}
.btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-soft);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold);
  border: 1px solid rgba(255, 209, 102, 0.4);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn--block {
  width: 100%;
}

/* === INPUT === */
.input {
  width: 100%;
  padding: 13px 16px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  transition: border-color 0.2s, background 0.2s;
}
.input::placeholder {
  color: var(--text-faint);
}
.input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.07);
}

.input--error {
  border-color: #ff6b8b;
}

/* === ZODIAC GRID === */
.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.zodiac-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s, border-color 0.25s;
  user-select: none;
}
.zodiac-item .symbol {
  font-size: 26px;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}
.zodiac-item .name {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
}
.zodiac-item:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.zodiac-item.selected {
  background: var(--grad-gold);
  border-color: var(--gold);
  box-shadow: 0 0 22px var(--gold-glow);
  transform: scale(1.04);
}
.zodiac-item.selected .name {
  color: #1a0e2c;
  font-weight: 700;
}
.zodiac-item.selected .symbol {
  filter: none;
}

/* === CARDS (Tarot) === */
.cards-stage {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.cards-stage.visible {
  display: flex;
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 18px auto;
  max-width: 100%;
}

.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100px;
}

.card-tile {
  width: 100px;
  height: 165px;
  border-radius: var(--r-md);
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-tile.flipped .card-inner {
  transform: rotateY(180deg);
}

.face-front,
.face-back {
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 2px solid rgba(255, 209, 102, 0.5);
}

.face-front {
  background-image: url("/images/back.jpg");
  background-color: #2a1448;
}

.face-back {
  transform: rotateY(180deg);
  background-color: #1a0828;
}

.card-tile.selected {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 0 32px var(--gold-glow);
}
.card-tile.focused {
  transform: scale(1.45) translateY(-18px);
  z-index: 10;
}

.card-caption-below {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text);
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.card-tile.flipped + .card-caption-below,
.card-tile.selected + .card-caption-below {
  opacity: 1;
  transform: translateY(0);
}

.selection-hint {
  margin-top: 10px;
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  text-align: center;
}

/* === LOADER === */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 16px;
}
.loader-overlay.visible {
  display: flex;
}
.loader {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(255, 209, 102, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loader-text {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 18, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.show {
  display: flex;
  animation: fadeInBg 0.3s ease forwards;
}
.modal-content {
  background: linear-gradient(145deg, #1b0f2a 0%, #2a1448 100%);
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: var(--r-xl);
  padding: 28px 22px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-glow), 0 30px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: modalAppear 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.modal-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  margin: 0 0 22px;
  text-shadow: 0 0 14px var(--gold-glow);
}

/* === HOME (index.html) — карточки сценариев === */
.home-hero {
  padding: 40px 0 24px;
  text-align: center;
}
.home-hero .moon {
  font-size: 60px;
  filter: drop-shadow(0 0 18px var(--gold-glow));
  margin-bottom: 8px;
}
.home-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 360px;
  margin: 0 auto 32px;
}

.scenario-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}
.scenario {
  display: block;
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 209, 102, 0.18);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.scenario::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-violet);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}
.scenario > * {
  position: relative;
  z-index: 1;
}
.scenario:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--gold);
}
.scenario:hover::before {
  opacity: 0.05;
}
.scenario .icon {
  font-size: 30px;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 12px var(--gold-glow));
}
.scenario h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
  margin: 0 0 6px;
}
.scenario p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}
.scenario .price {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  background: rgba(255, 209, 102, 0.12);
  color: var(--gold);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
}

/* === RESULT PAGE === */
.result-card {
  background: linear-gradient(145deg, #1b0f2a 0%, #2a1448 100%);
  border: 1px solid rgba(255, 209, 102, 0.25);
  border-radius: var(--r-xl);
  padding: 28px 22px;
  margin: 18px 0;
  box-shadow: var(--shadow-card);
  white-space: pre-wrap;
  line-height: 1.65;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.result-card h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  margin: 0 0 14px;
}
.result-card .meta {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.cta-block {
  background: var(--grad-violet);
  color: #1a0e2c;
  border-radius: var(--r-xl);
  padding: 22px;
  margin: 24px 0;
  text-align: center;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}
.cta-block h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.4rem;
}
.cta-block p {
  margin: 0 0 16px;
  font-size: 0.95rem;
}
.cta-block .btn--primary {
  background: #1a0e2c;
  color: var(--gold);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* === HISTORY (account.html) === */
.history-item {
  display: block;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.history-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 209, 102, 0.3);
}
.history-item .kind {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 209, 102, 0.14);
  color: var(--gold);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  margin-right: 8px;
}
.history-item .date {
  font-size: 0.8rem;
  color: var(--text-faint);
}
.history-item .preview {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* === ZODIAC SCROLL on small screens === */
@media (max-width: 380px) {
  .zodiac-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-wrapper {
    width: 84px;
  }
  .card-tile {
    width: 84px;
    height: 138px;
  }
}

/* === HEADER === */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  position: relative;
  z-index: 1000;
}
.app-header .brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.app-header .brand .icon {
  margin-right: 6px;
}
.app-header .nav {
  display: flex;
  gap: 16px;
  font-size: 0.92rem;
}
.app-header .nav a {
  color: var(--text-muted);
}
.app-header .nav a:hover,
.app-header .nav a.active {
  color: var(--gold);
}

/* utility */
.hidden {
  display: none !important;
}
.text-muted {
  color: var(--text-muted);
}
.text-center {
  text-align: center;
}
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-3 { margin-bottom: 16px; }

/* === SECTION HEADERS (для главной с разделением) === */
.section-h {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 32px 0 16px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.section-h-bar {
  width: 32px;
  height: 3px;
  background: linear-gradient(90deg, #a78bfa, #67e8f9);
  border-radius: 2px;
  flex-shrink: 0;
}

/* === CHAT SECTION — увеличенный блок с Алиной === */
.chat-section {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 22px;
  padding: 32px 36px;
  margin: 40px 0 24px;
  position: relative;
  overflow: hidden;
}
.chat-section::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.chat-section::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.chat-section-content {
  position: relative;
  z-index: 2;
}

.chat-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  line-height: 1.15;
}

.chat-section-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.5);
  flex-shrink: 0;
}
.chat-section-avatar svg {
  width: 22px;
  height: 22px;
}

.chat-section-desc {
  margin: 0 0 10px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.chat-section-tagline {
  margin: 0 0 22px;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  color: rgba(167, 139, 250, 0.95);
  line-height: 1.5;
}

.chat-section-features {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.chat-section-features li {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  gap: 11px;
  line-height: 1.4;
}
.chat-section-features li::before {
  content: "✓";
  color: #67e8f9;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1rem;
}

.chat-section-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.chat-section-actions .btn,
.chat-section-actions .btn--primary,
.chat-section-actions .btn--ghost {
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: filter 0.15s, transform 0.15s, background 0.15s, border-color 0.15s;
  border: 0;
}
.chat-section-actions .btn--primary {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.4);
}
.chat-section-actions .btn--primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.chat-section-actions .btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.chat-section-actions .btn--ghost:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.4);
}

.chat-preview {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 2;
}
.chat-preview-bubble {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: 92%;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}
.chat-preview-bubble.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}
.chat-preview-bubble > span:last-child {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 9px 13px;
}
.chat-preview-bubble.user > span:last-child {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(6, 182, 212, 0.22));
}
.chat-preview-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.chat-preview-avatar.user-avatar {
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 720px) {
  .chat-section {
    grid-template-columns: 1fr;
    padding: 18px 16px;
    margin: 22px 0 16px;
    border-radius: 16px;
    gap: 16px;
  }
  .chat-section::before { width: 180px; height: 180px; top: -60px; right: -60px; }
  .chat-section::after { display: none; }

  .chat-section-title {
    font-size: 1.25rem;
    gap: 10px;
    margin: 0 0 10px;
  }
  .chat-section-avatar {
    width: 34px;
    height: 34px;
  }
  .chat-section-avatar svg { width: 17px; height: 17px; }

  .chat-section-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0 0 6px;
  }
  .chat-section-tagline {
    font-size: 0.85rem;
    margin: 0 0 14px;
  }
  .chat-section-features {
    margin: 0 0 16px;
    gap: 7px;
  }
  .chat-section-features li {
    font-size: 0.82rem;
    gap: 9px;
  }
  .chat-section-actions .btn,
  .chat-section-actions .btn--primary,
  .chat-section-actions .btn--ghost {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  /* Превью чата — компактнее */
  .chat-preview {
    padding: 12px;
    gap: 8px;
    border-radius: 12px;
  }
  .chat-preview-bubble {
    font-size: 0.78rem;
    gap: 7px;
  }
  .chat-preview-bubble > span:last-child {
    padding: 7px 10px;
    border-radius: 11px;
  }
  .chat-preview-avatar {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  /* Скрываем на мобиле 4-5-е сообщение чтобы не было длинного блока */
  .chat-preview > .chat-preview-bubble:nth-child(n+4) {
    display: none;
  }
}

/* === HERO с мини-картой вместо Луны и заголовком в стиле Cinzel === */

/* Контейнер веера из 3 карт */
.hero-cards-fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 0 auto 24px;
  height: 200px;
  width: 100%;
  max-width: 460px;
  animation: hero-mini-card-float 4s ease-in-out infinite;
}
.hero-cards-fan .mini-card {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Левая карта — повёрнута и сдвинута влево, чуть ниже */
.hero-cards-fan .mini-card:nth-child(1) {
  transform: translateX(28px) translateY(10px) rotate(-12deg);
  z-index: 1;
  opacity: 0.92;
}
/* Центральная — выше, без поворота */
.hero-cards-fan .mini-card:nth-child(2) {
  z-index: 3;
  margin: 0 -8px;
  transform: translateY(-6px);
}
/* Правая — повёрнута и сдвинута вправо */
.hero-cards-fan .mini-card:nth-child(3) {
  transform: translateX(-28px) translateY(10px) rotate(12deg);
  z-index: 1;
  opacity: 0.92;
}

/* Hover — чуть приподнимаются */
.hero-cards-fan:hover .mini-card:nth-child(1) {
  transform: translateX(40px) translateY(-2px) rotate(-15deg);
}
.hero-cards-fan:hover .mini-card:nth-child(2) {
  transform: translateY(-16px) scale(1.04);
}
.hero-cards-fan:hover .mini-card:nth-child(3) {
  transform: translateX(-40px) translateY(-2px) rotate(15deg);
}

@media (max-width: 540px) {
  .hero-cards-fan {
    height: 160px;
    margin-bottom: 18px;
  }
}

/* Старая одиночная карта (если где-то ещё используется) */
.hero-mini-card {
  margin: 0 auto 16px;
  display: block;
  animation: hero-mini-card-float 4s ease-in-out infinite;
}
@keyframes hero-mini-card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.title--gradient {
  font-family: var(--font-decor, "Cormorant Garamond", Georgia, serif);
  font-weight: 400;
  font-size: 4rem;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}

/* Cinzel вариант — для главной страницы и где нужно соответствие brand-text в стиле TARO destiny */
.title--cinzel {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 700 !important;
  font-size: 3rem !important;
  letter-spacing: 0.14em !important;
  /* Fallback цвет на случай если градиент не загрузится */
  color: #fcd34d !important;
  background: linear-gradient(135deg, #fff7d6 0%, #fcd34d 40%, #e5e4e2 70%, #fcd34d 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;            /* Убираем огромный gold-glow от .title */
  text-transform: uppercase;
  margin: 0 0 12px;
}
/* Если background-clip не сработал — используем fallback цвет */
@supports not (-webkit-background-clip: text) {
  .title--cinzel {
    color: #fcd34d !important;
    background: none !important;
    -webkit-text-fill-color: #fcd34d !important;
  }
}

@media (max-width: 540px) {
  .title--gradient { font-size: 3rem; }
  .title--cinzel { font-size: 2rem !important; letter-spacing: 0.1em !important; }
}

/* === Section headers и chat-section: явно используем шрифты === */
.section-h {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
}
.chat-section-title,
.spread-title {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
}
.chat-section-desc,
.chat-section-features li,
.chat-section-actions .btn,
.spread-sub,
.spread-badge {
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
}

/* Бренд в шапке тоже Cormorant */
.app-header .brand {
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
}

/* === Буквица для текстов раскладов (Preciosa)
   Применяется только к первому символу .reading-prose — первый параграф разбора.
   Декоративный викторианский акцент в духе средневековых рукописей. === */
.reading-prose {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 14px;
}
.reading-prose::first-letter {
  font-family: var(--font-decor, "Cormorant Garamond", Georgia, serif);
  font-weight: 400;
  font-size: 4.5rem;
  line-height: 0.85;
  float: left;
  margin: 6px 12px 0 0;
  background: linear-gradient(135deg, #c4b5fd 0%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (max-width: 540px) {
  .reading-prose::first-letter {
    font-size: 3.6rem;
    margin: 4px 10px 0 0;
  }
}


/* ============================================
   HEADER (стиль ТароАуры с полной навигацией)
   ============================================ */

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0;
  display: block;
}

.app-header-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 768px) {
  .app-header-inner {
    height: 48px;
    padding: 0 12px;
  }
}

/* ============ Brand ============ */
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.app-header .brand:hover { opacity: 0.85; }

.app-header .brand-icon,
.app-header .brand-mini-card {
  width: 28px;
  height: 42px;
  flex-shrink: 0;
}
.app-header .brand-icon {
  border-radius: 8px;
  background: radial-gradient(circle at 50% 50%, #8b5cf6 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-header .brand-icon svg { width: 16px; height: 16px; }

.app-header .brand-text {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #fff7d6 0%, #fcd34d 40%, #e5e4e2 70%, #fcd34d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  text-transform: uppercase;
}

@media (max-width: 540px) {
  .app-header .brand-text { font-size: 0.88rem; letter-spacing: 0.08em; }
}

/* ============ Burger (мобильное меню) ============ */
.header-burger {
  display: none;
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.header-burger:hover { background: rgba(255, 255, 255, 0.1); }
.header-burger svg { width: 16px; height: 16px; }

@media (max-width: 1024px) {
  .header-burger { display: flex; }
}

/* ============ Main navigation (desktop) ============ */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
  margin-right: 4px;
}

@media (max-width: 1024px) {
  .header-nav { display: none; }
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 6px;
}

/* ============ Navigation items ============ */
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-family: var(--font-body, "Manrope", sans-serif);
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.25s;
  white-space: nowrap;
  overflow: hidden;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 1280px) {
  .nav-item { padding: 6px 10px; font-size: 0.8rem; }
}

.nav-item-text { position: relative; z-index: 2; }

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
  opacity: 0;
  transition: opacity 0.3s;
}
.nav-item:hover::before { opacity: 1; }
.nav-item.active::before { opacity: 1; }

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #a78bfa, #67e8f9);
  transition: width 0.3s, left 0.3s;
}
.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
  left: 0;
}

.nav-item:hover { color: #fff; }
.nav-item.active { color: #fff; }

/* ============ Premium item (золотой) ============ */
.nav-item--premium .nav-item-text {
  background: linear-gradient(90deg, #fcd34d, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.nav-item--premium:hover .nav-item-text {
  background: linear-gradient(90deg, #fde68a, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-item--premium::before {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(251, 146, 60, 0.1));
}
.nav-item--premium::after {
  background: linear-gradient(90deg, #fbbf24, #fb923c);
}
.nav-item-star {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  color: #fbbf24;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 3;
}
.nav-item-star svg { width: 100%; height: 100%; }
.nav-item--premium:hover .nav-item-star { opacity: 1; }

/* ============ Dropdown «Ещё» ============ */
.nav-more {
  position: relative;
}

.nav-more-btn {
  color: rgba(255, 255, 255, 0.6);
}
.nav-more-btn:hover { color: rgba(255, 255, 255, 0.9); }

.nav-more-chevron {
  display: inline-flex;
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}
.nav-more-chevron svg { width: 100%; height: 100%; }
.nav-more.open .nav-more-chevron {
  transform: rotate(180deg);
}

.nav-more-menu {
  position: fixed;
  min-width: 240px;
  background: rgba(10, 12, 22, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 99999;
  pointer-events: none;
}
/* Поддержка обоих способов: класс на меню или на родителе .nav-more */
.nav-more.open .nav-more-menu,
.nav-more-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body, "Manrope", sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.more-item:hover {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.12));
  color: #fff;
}
.more-item-icon {
  width: 18px;
  height: 18px;
  color: rgba(167, 139, 250, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.more-item-icon svg { width: 100%; height: 100%; }

/* ============ Login button ============ */
.app-header .login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: rgba(255, 255, 255, 0.92);
  padding: 7px 14px;
  border-radius: 12px;
  font-family: var(--font-body, "Manrope", sans-serif);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
  flex-shrink: 0;
  white-space: nowrap;
}
.app-header .login-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3));
  border-color: rgba(139, 92, 246, 0.5);
  color: #fff;
}
.app-header .login-btn-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #c4b5fd;
}
.app-header .login-btn-icon svg { width: 100%; height: 100%; }
.app-header .login-btn:hover .login-btn-icon { color: #ddd6fe; }
.app-header .login-btn.logged-in {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 540px) {
  .app-header .login-btn { padding: 6px 10px; font-size: 0.75rem; }
  .app-header .login-btn-icon { width: 14px; height: 14px; }
}

/* ============ Mobile menu (drawer) — TaroAura-style ============ */
.mobile-menu {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  padding: 0 !important;
  padding-bottom: env(safe-area-inset-bottom, 0);
  pointer-events: none;
}
.mobile-menu.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
/* Сам drawer внутри overlay */
.mobile-menu-drawer {
  width: 86% !important;
  max-width: 340px !important;
  height: 100% !important;
  background: #0e0a18 !important;
  border-right: 1px solid rgba(167, 139, 250, 0.18);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.6);
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
}
.mobile-menu.open .mobile-menu-drawer {
  transform: translateX(0) !important;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 6, 18, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
  min-height: 52px;
}

/* Бренд внутри drawer — компактный, в одну строку, с красивым шрифтом */
.mobile-menu-header .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 1;
  min-width: 0;
  padding: 0;
  margin: 0;
}
.mobile-menu-header .brand-icon,
.mobile-menu-header .brand-mini-card {
  width: 26px;
  height: 39px;
  flex-shrink: 0;
}
.mobile-menu-header .brand-icon {
  border-radius: 7px;
  background: radial-gradient(circle at 50% 50%, #8b5cf6 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 28px;
}
.mobile-menu-header .brand-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
.mobile-menu-header .brand-text {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #fff7d6 0%, #fcd34d 40%, #e5e4e2 70%, #fcd34d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  line-height: 1.1;
  text-transform: uppercase;
  color: #fcd34d;
}

.mobile-menu-close {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.mobile-menu-close:hover { background: rgba(255, 255, 255, 0.1); }
.mobile-menu-close svg { width: 18px; height: 18px; }

.mobile-menu-nav {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-menu-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0;
}

.mobile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-body, "Manrope", sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}
.mobile-item:hover,
.mobile-item.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
  border-color: rgba(167, 139, 250, 0.35);
  color: #fff;
}
.mobile-item-icon {
  width: 20px;
  height: 20px;
  color: rgba(167, 139, 250, 0.85);
  flex-shrink: 0;
}
.mobile-item-icon svg { width: 100%; height: 100%; }
.mobile-item-label {
  flex: 1;
  min-width: 0;
}

.mobile-item--premium {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(251, 146, 60, 0.05));
  border-color: rgba(252, 211, 77, 0.3);
}
.mobile-item--premium:hover {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(251, 146, 60, 0.1));
  border-color: rgba(252, 211, 77, 0.5);
}
.mobile-item--premium .mobile-item-icon {
  color: #fcd34d;
}
.mobile-item--premium .mobile-item-label {
  background: linear-gradient(135deg, #fcd34d, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.mobile-item--premium > span:first-child {
  background: linear-gradient(90deg, #fcd34d, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
.mobile-item-star {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: #fbbf24;
}
.mobile-item-star svg { width: 100%; height: 100%; }

/* ============ TOAST ============ */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(11, 15, 26, 0.95);
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-family: var(--font-body, "Manrope", sans-serif);
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.25s;
  max-width: 360px;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toast.visible {
  opacity: 1;
  transform: translateY(0);
}
.toast--success { border-color: rgba(16, 185, 129, 0.5); }
.toast--error { border-color: rgba(248, 113, 113, 0.5); }
.toast--warn { border-color: rgba(252, 211, 77, 0.5); color: #fde68a; }

/* ============================================
   CLASSIC MYSTICAL — фишки из Variation A
   Только «приправа», без смены основной палитры
   ============================================ */

:root {
  /* Бордовый акцент из Variation A — для эмфазы */
  --bordo: #a85c7a;
  --bordo-soft: rgba(168, 92, 122, 0.7);
  --bordo-glow: rgba(168, 92, 122, 0.35);
  /* Бумажный — для бежевой CTA */
  --paper: #f5f0e6;
  --paper-soft: rgba(245, 240, 230, 0.78);
}

/* === MIST — мягкая дымка на фоне всех страниц === */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 25% 20%, rgba(167, 139, 250, 0.10), transparent 70%),
    radial-gradient(ellipse 40% 35% at 80% 70%, rgba(103, 232, 249, 0.07), transparent 70%),
    radial-gradient(ellipse 35% 30% at 50% 95%, rgba(168, 92, 122, 0.08), transparent 70%);
}
.container { position: relative; z-index: 2; }

/* === MYSTICAL EYEBROW — литературный подзаголовок === */
.mystical-eyebrow {
  font-family: var(--font-body, "Manrope", sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(196, 181, 253, 0.7);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.mystical-eyebrow::before,
.mystical-eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.5), transparent);
}

/* === ITALIC В БРЕНДЕ — «Судьбы» italic с бордовым акцентом === */
.title--gradient .italic-accent {
  font-style: italic;
  font-weight: 400;
}

/* === ITALIC-эмфаза в заголовках секций === */
.section-h em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* === SPREAD CARDS — римская цифра в углу === */
.spread-card { position: relative; }
.spread-card-roman {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.4);
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  user-select: none;
}

/* Заголовок карточки italic — литературнее */
.spread-title {
  font-style: italic;
  font-weight: 500;
}

/* === BORDO ACCENT BUTTON — вторичная CTA в стиле Variation A === */
.btn--paper {
  background: var(--paper);
  color: #1a1326;
  border: 0;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: var(--font-body, "Manrope", sans-serif);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.btn--paper:hover { filter: brightness(0.95); transform: translateY(-1px); }

.btn--ghost-mystical {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(168, 92, 122, 0.5);
  padding: 12px 26px;
  border-radius: 999px;
  font-family: var(--font-body, "Manrope", sans-serif);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn--ghost-mystical:hover {
  border-color: var(--bordo);
  background: rgba(168, 92, 122, 0.08);
}

/* === МИСТИЧЕСКАЯ ЦИТАТА === */
.mystical-quote {
  text-align: center;
  padding: 36px 20px;
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  color: rgba(196, 181, 253, 0.85);
  line-height: 1.5;
  max-width: 580px;
  margin: 32px auto;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
  position: relative;
}
.mystical-quote::before {
  content: "✦";
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--bordo-soft);
  margin-bottom: 14px;
  font-style: normal;
}
.mystical-quote em {
  color: var(--bordo);
  font-style: italic;
}

@media (max-width: 540px) {
  .mystical-quote { font-size: 1.1rem; padding: 28px 16px; margin: 24px auto; }
}

/* === STARS — мерцающие точки на фоне hero === */
.mystical-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.mystical-stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: mystical-star-twinkle 4s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}
@keyframes mystical-star-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.8; transform: scale(1); }
}

/* === HOME-HERO с position relative для звёзд === */
.home-hero {
  position: relative;
}

/* === Tagline — тоньше шрифт === */
.home-tagline {
  font-weight: 300;
  letter-spacing: 0.01em;
}

/* ============================================
   BACKGROUND STARS — на самом заднем слое
   ============================================ */
.background-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* Не должно перекрывать никакой контент */
}

/* Контейнер сайта поверх звёзд */
.container,
.app-header {
  position: relative;
  z-index: 1;
}

/* Старые .celestial — для обратной совместимости (внутри плашек), скрываем */
.background-stars .celestial { display: none; }

/* === Новые огоньки-звёзды как на рубашке карты === */
.background-stars .bg-spark {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 237, 200, 0.9) 0%, rgba(252, 211, 77, 0.55) 40%, transparent 80%);
  box-shadow: 0 0 4px rgba(252, 211, 77, 0.7), 0 0 8px rgba(252, 237, 200, 0.4);
  pointer-events: none;
  animation: bg-spark-twinkle ease-in-out infinite;
  will-change: opacity, transform;
}
.background-stars .bg-spark--big {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 6px rgba(252, 237, 200, 0.85), 0 0 14px rgba(252, 211, 77, 0.5);
}
@keyframes bg-spark-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.5); }
  50% { opacity: 0.85; transform: scale(1.15); }
}

/* === Mobile login item (акцентная кнопка в мобильном drawer) === */
.mobile-item--login {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.12));
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  font-weight: 600;
}
.mobile-item--login:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(6, 182, 212, 0.2));
  border-color: rgba(139, 92, 246, 0.6);
}
.mobile-item--login .mobile-item-icon {
  color: #c4b5fd;
}

/* === Заголовок секции в мобильном drawer (как у TaroAura "ЛИЧНОЕ" / "ИНФОРМАЦИЯ") === */
.mobile-menu-section-title {
  margin: 8px 0 4px;
  padding: 0 4px;
  font-family: var(--font-body, "Manrope", sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.35);
}

/* Вторичные пункты — без рамки, более лёгкие */
.mobile-item--secondary {
  background: transparent;
  border: 0;
  padding: 11px 4px;
  border-radius: 8px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}
.mobile-item--secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.mobile-item--secondary .mobile-item-icon {
  width: 18px;
  height: 18px;
  color: rgba(167, 139, 250, 0.7);
}

/* ==================================================================== */
/* === Stage 2.7.A — Оффер "Попробовать со скидкой" + премиум баннер === */
/* ==================================================================== */

/* Модальный оверлей */
.first-try-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fto-fade-in 0.2s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.first-try-overlay.closing { animation: fto-fade-out 0.2s ease forwards; }
@keyframes fto-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fto-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.first-try-modal {
  position: relative;
  background: linear-gradient(180deg, #1a0e2e 0%, #0a0612 100%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 18px;
  padding: 32px 28px 22px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.2), 0 0 80px rgba(168, 85, 247, 0.08);
  animation: fto-up 0.3s ease;
  text-align: center;
}
@keyframes fto-up {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.first-try-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.first-try-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.first-try-icon { font-size: 2.5rem; margin-bottom: 8px; }
.first-try-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.7rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 10px;
}
.first-try-text {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.first-try-spread-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
  text-align: left;
}
.first-try-cover {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: rgba(168, 85, 247, 0.18);
}
.first-try-cover--fallback {
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  padding: 6px;
  line-height: 1.1;
}
.first-try-info {
  flex: 1;
  min-width: 0;
}
.first-try-spread-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.first-try-spread-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 2px 0 8px;
}
.first-try-price-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.first-try-price-old {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: line-through;
}
.first-try-price-new {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}
.first-try-discount {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.first-try-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.first-try-btn {
  flex: 1;
  display: block;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.first-try-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}
.first-try-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.first-try-btn-primary {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
}
.first-try-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.5);
}

.first-try-disclaimer {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* === Premium discount banner === */
.premium-discount-banner {
  display: flex;
  gap: 14px;
  align-items: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 20px;
}
.pdb-icon { font-size: 2rem; }
.pdb-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.pdb-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
}
.plan-price-old {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
  display: inline-block;
  margin-right: 6px;
}
.plan-price-new {
  font-weight: 700;
}
.plan-discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* === Стилизация цены со скидкой на странице расклада === */
.sp-price--discounted {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.sp-price-old {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
}
.sp-price-new {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.sp-price-badge {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Mobile */
@media (max-width: 540px) {
  .first-try-modal { padding: 24px 18px 16px; }
  .first-try-spread-preview { flex-direction: column; text-align: center; }
  .first-try-cover { width: 100%; height: 90px; }
  .first-try-actions { flex-direction: column-reverse; }
  .premium-discount-banner { flex-direction: column; text-align: center; }
}

/* ========================================================================== */
/* === Stage 2.7.C — Pricing CMS: глобальный баннер + скидки на карточках === */
/* ========================================================================== */

/* === Глобальный promo-баннер (на всех страницах сверху) === */
.global-promo-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #6d28d9 0%, #a855f7 50%, #ec4899 100%);
  color: #fff;
  padding: 10px 16px;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.3);
  animation: gpb-slide-down 0.4s ease;
}
@keyframes gpb-slide-down {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.gpb--gold { background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #fbbf24 100%); color: #1f1410; }
.gpb--red { background: linear-gradient(135deg, #be123c 0%, #f43f5e 50%, #ef4444 100%); }
.gpb--blue { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%); }

.gpb-content {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.gpb-text {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gpb-title {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
}
.gpb-sub {
  font-size: 0.82rem;
  opacity: 0.85;
  line-height: 1.3;
}
.gpb-timer {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.25);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.gpb-cta {
  background: rgba(255, 255, 255, 0.95);
  color: #1f1410;
  padding: 7px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gpb-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.gpb-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.gpb-close:hover { background: rgba(255, 255, 255, 0.32); }
.gpb--gold .gpb-close { color: #1f1410; }
.gpb--gold .gpb-timer { color: #1f1410; background: rgba(0, 0, 0, 0.15); }

/* === Бейджи на карточках раскладов со скидкой === */
.spread-badge--discounted {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(244, 63, 94, 0.5) !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px !important;
  align-items: center;
}
.sb-disc-old {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
  line-height: 1;
}
.sb-disc-new {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.sb-disc-pct {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  margin-top: 2px;
}
.spread-badge-timer {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.65rem;
  color: rgba(251, 191, 36, 0.95);
  margin-top: 2px;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* === Цена со скидкой на странице расклада (sp-price) === */
.sp-price--discounted {
  flex-wrap: wrap;
}
.sp-price-label {
  background: rgba(168, 85, 247, 0.18);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.sp-price-timer {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 0.85rem;
  color: rgba(251, 191, 36, 0.95);
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  letter-spacing: 1px;
  font-weight: 600;
}

/* === Цены подписок со скидкой === */
.plan-discount-label {
  display: inline-block;
  background: rgba(168, 85, 247, 0.2);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.plan-discount-timer {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  color: rgba(251, 191, 36, 0.95);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
  text-align: center;
  letter-spacing: 1px;
  font-weight: 600;
}

/* === Mobile === */
@media (max-width: 600px) {
  .gpb-content { flex-direction: column; gap: 8px; padding: 6px 0; }
  .gpb-text { text-align: center; }
  .gpb-timer { margin: 0 auto; }
  .global-promo-banner { padding: 8px 12px; }
  .spread-badge--discounted { padding: 5px 8px !important; }
  .sb-disc-new { font-size: 0.9rem; }
}
