:root {
  --bg:           #07070f;
  --bg-2:         #0f0f20;
  --bg-card:      #13132a;
  --bg-card-2:    #1a1a35;
  --accent:       #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow:  rgba(124, 58, 237, 0.35);
  --gold:         #d4af37;
  --gold-light:   #f0d060;
  --text:         #e8e0f5;
  --text-muted:   #8b7aaa;
  --border:       rgba(124, 58, 237, 0.2);
  --nav-height:   64px;
  --radius:       14px;
  --radius-sm:    8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
}

body {
  height: 100%;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  background: #030308;
  display: flex;
  justify-content: center;
}

/* Декоративный фон за пределами приложения */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(124,58,237,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(212,175,55,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(124,58,237,0.12);
}

#page {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 24px;
}

/* ── Nav ── */
#bottom-nav {
  position: sticky;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  display: flex;
  backdrop-filter: blur(12px);
  z-index: 100;
  flex-shrink: 0;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  padding: 8px 0;
}
.nav-btn.active { color: var(--accent-light); }
.nav-btn.active .nav-icon {
  transform: scale(1.25);
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.9), 0 0 16px rgba(167, 139, 250, 0.5);
}
.nav-btn.active .nav-label {
  font-weight: 700;
  color: var(--accent-light);
}
.nav-icon { font-size: 20px; transition: transform 0.25s ease, filter 0.25s ease; }
.nav-label { font-size: 10px; font-weight: 500; transition: font-weight 0.2s, color 0.2s; }
@media (pointer: coarse) {
  :root { --nav-height: 72px; }
  .nav-icon { font-size: 24px; }
  .nav-label { font-size: 11px; }
}

/* ── Animations ── */
.fade-in { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.slide-up { animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ── Typography ── */
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 4px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}

/* ── Cards (UI) ── */
.card-ui {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.card-ui:active { background: var(--bg-card-2); }
.card-ui.clickable { cursor: pointer; }
.card-ui.clickable:hover { border-color: var(--accent-light); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-bottom: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:active { background: var(--bg-card-2); }
.btn-gold {
  background: linear-gradient(135deg, #b8860b, var(--gold));
  color: #000;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  width: auto;
  margin-bottom: 0;
}
.btn-row {
  display: flex;
  gap: 8px;
}
.btn-row .btn { flex: 1; }

/* ── Section header ── */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 10px;
}
.section-title:first-child { margin-top: 0; }

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Home screen ── */
.hero {
  text-align: center;
  padding: 20px 0 10px;
}
.hero-symbol {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.5));
}
.spread-grid {
  display: grid;
  gap: 8px;
}
.spread-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}
.spread-btn:active, .spread-btn:hover { border-color: var(--accent-light); background: var(--bg-card-2); }
.spread-btn .spread-icon { font-size: 24px; flex-shrink: 0; }
.spread-btn .spread-info { flex: 1; }
.spread-btn .spread-name { font-weight: 600; font-size: 15px; }
.spread-btn .spread-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.spread-btn .spread-count { font-size: 11px; color: var(--accent-light); font-weight: 600; white-space: nowrap; }
.spread-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.spread-btn-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.spread-btn-sm:active { border-color: var(--accent-light); background: var(--bg-card-2); }
.spread-btn-sm .spread-icon { font-size: 22px; }

/* ── Tarot card fan (interactive spread) ── */
#spread-screen {
  min-height: calc(100vh - var(--nav-height) - 32px);
  display: flex;
  flex-direction: column;
}
.fan-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin: 10px 0;
  overflow: visible;
}
.fan-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.tarot-card {
  position: absolute;
  width: 72px;
  height: 120px;
  cursor: pointer;
  transform-origin: center bottom;
  transition: transform 0.3s ease, filter 0.2s;
  user-select: none;
}
.tarot-card .card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.tarot-card.flipped .card-inner { transform: rotateY(180deg); }
.tarot-card .card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
}
.tarot-card .card-back {
  background: linear-gradient(135deg, #1a0a3e, #2d1260);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.tarot-card .card-front {
  transform: rotateY(180deg);
  background: var(--bg-card);
  border: 2px solid var(--gold);
}
.tarot-card .card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tarot-card .card-front.reversed img { transform: rotate(180deg); }
.tarot-card.selected {
  filter: drop-shadow(0 0 8px var(--gold));
}
.tarot-card.selected .card-inner { border-color: var(--gold) !important; }

.spread-progress {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.spread-progress span { color: var(--accent-light); font-weight: 700; }

/* ── Reading result ── */
.reading-cards-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
}
.reading-cards-row::-webkit-scrollbar { display: none; }
.reading-mini-card {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
}
.reading-mini-card img {
  width: 64px;
  height: 107px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}
.reading-mini-card img.reversed { transform: rotate(180deg); }
.reading-mini-card .mini-name {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.2;
}
.reading-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}
.reading-text strong { color: var(--accent-light); }
.reading-divider {
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
  margin: 10px 0;
  letter-spacing: 2px;
}

/* ── History list ── */

/* ── Catalog ── */
.catalog-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.catalog-search input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.catalog-search input:focus { border-color: var(--accent-light); }
.catalog-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  padding-bottom: 2px;
}
.catalog-filter::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.catalog-card {
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s;
}
.catalog-card:active { transform: scale(0.95); }
.catalog-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}
.catalog-card .catalog-name {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.2;
}
.card-detail {
  text-align: center;
}
.card-detail-img {
  width: 140px;
  margin: 0 auto 16px;
  display: block;
}
.card-detail-img img {
  width: 100%;
  border-radius: 10px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
.meaning-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  text-align: left;
}
.meaning-title { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.meaning-text { font-size: 14px; line-height: 1.6; }

/* ── Stats ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  text-align: center;
}
.stat-number { font-size: 36px; font-weight: 700; color: var(--gold); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.progress-bar-wrap { margin-top: 8px; }
.progress-bar-bg { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light)); border-radius: 3px; transition: width 0.6s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Settings ── */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.setting-row:active { border-color: var(--accent-light); }
.setting-row-left { display: flex; align-items: center; gap: 10px; }
.setting-icon { font-size: 20px; }
.setting-info .setting-name { font-weight: 600; font-size: 14px; }
.setting-info .setting-value { font-size: 12px; color: var(--accent-light); margin-top: 2px; }
.setting-arrow { color: var(--text-muted); font-size: 14px; }

/* Toggle — label wrapper only */
.toggle {
  cursor: pointer; position: relative;
  display: inline-flex; align-items: center;
  flex-shrink: 0; vertical-align: middle;
}

/* ── Modal / bottom sheet ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s;
}
.sheet {
  width: 100%;
  background: var(--bg-2);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 8px 0 32px;
  animation: slideUp 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 8px auto 16px;
}
.sheet-title {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--gold);
  padding: 0 20px;
}
.sheet-options { padding: 0 16px; }
.sheet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 15px;
}
.sheet-option:active { background: var(--bg-card); }
.sheet-option.selected { background: var(--bg-card); color: var(--accent-light); }
.sheet-option .check { margin-left: auto; color: var(--accent-light); }

/* ── Question input ── */
.question-wrap { margin-bottom: 12px; }
.question-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  resize: none;
  outline: none;
  line-height: 1.5;
  transition: border-color 0.2s;
}
.question-input:focus { border-color: var(--accent-light); }
.question-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ── Partner input ── */
.partner-hint { font-size: 12px; color: var(--text-muted); margin: 8px 0 12px; }

/* ── Loading ── */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}
.loading-symbol { font-size: 48px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.9); } }
.loading-text { color: var(--text-muted); font-size: 14px; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 15px; }

/* ── Tip card ── */
.tip-card {
  background: linear-gradient(135deg, #1a0a3e, #2d1260);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.tip-card::before {
  content: '✨';
  position: absolute;
  top: -10px; right: -10px;
  font-size: 60px;
  opacity: 0.1;
}
.tip-text { font-size: 14px; line-height: 1.7; font-style: italic; }

/* ── Back button ── */
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }


/* ── Utility ── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }

/* ── Home ── */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted);
  margin: 16px 0 10px;
}
.daily-tip-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #1a0a3e, #2d1260);
  border: 1px solid var(--accent); border-radius: var(--radius);
  color: var(--accent-light); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; margin-bottom: 16px;
}
.daily-tip-btn:active { opacity: 0.8; }
.daily-tip-btn.loading { opacity: 0.6; pointer-events: none; }

.spreads-grid { display: grid; gap: 8px; }
.spread-card {
  padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s;
}
.spread-card:active { border-color: var(--accent-light); background: var(--bg-card-2); }
.spread-card-name { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.spread-card-desc { font-size: 12px; color: var(--text-muted); }
.spread-card-count { font-size: 11px; color: var(--accent-light); font-weight: 600; margin-top: 4px; }

/* ── Loading spinner ── */
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 60px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ── */
.form-block { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.form-input, .form-textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; outline: none; transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent-light); }
.form-textarea { resize: none; line-height: 1.5; }

/* ── Buttons (app.js variants) ── */
.btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-glow); transition: all 0.2s;
  margin-top: 8px;
}
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.6; pointer-events: none; }
.btn-secondary {
  display: flex; align-items: center; justify-content: center;
  padding: 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; width: 100%; margin-top: 8px;
}
.btn-secondary:active { background: var(--bg-card-2); }
.btn-secondary.small { padding: 8px; font-size: 13px; }
.btn-tool {
  flex: 1; padding: 11px 10px;
  background: var(--bg-card-2); border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--radius-sm); color: var(--gold);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.btn-tool:active { border-color: var(--gold); background: rgba(212,175,55,0.1); }

/* ── Fan ── */
.fan-counter {
  text-align: center; font-size: 14px; color: var(--accent-light);
  font-weight: 600; margin-bottom: 10px;
}
.fan-container {
  position: relative; min-height: 240px;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: visible; margin: 10px 0 20px;
}
.fan-card {
  position: absolute; bottom: 0;
  left: 50%;
  transform-origin: center bottom;
  transform: rotate(var(--angle)) translateY(-10px);
  cursor: pointer; transition: transform 0.4s ease, filter 0.4s ease, opacity 0.4s ease;
}
.fan-card.selected {
  transform: rotate(var(--angle)) translateY(-30px);
  filter: drop-shadow(0 0 8px var(--gold));
  z-index: 10;
}
@media (hover: hover) {
  .fan-card:hover {
    transform: rotate(var(--angle)) translateY(-30px);
    filter: drop-shadow(0 0 8px var(--gold));
    z-index: 10;
  }
}
.fan-card-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a0a3e, #2d1260);
  border: 2px solid var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.fan-card.selected .fan-card-inner {
  border-color: var(--gold);
  background: linear-gradient(135deg, #2d1a00, #5a3d00);
}
.fan-card-back { display: contents; }
.fan-card-front { display: none; }

/* ── Fan header row (counter + mini random btn) ── */
.fan-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}
.fan-header-row .fan-counter {
  margin-bottom: 0;
}
.btn-random-mini {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.btn-random-mini:active { background: var(--accent); border-color: var(--accent); }
.btn-random-mini::after {
  content: 'Случайный выбор';
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.btn-random-mini:hover::after { opacity: 1; }

/* ── Fan tray (5+ cards) ── */
.fan-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: flex-end;
  min-height: 84px;
  padding: 6px 12px 4px;
}
.tray-card {
  position: relative;
  width: 46px;
  height: 74px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: trayCardIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.15s;
}
.tray-card:active { transform: scale(0.9); }
.tray-card.leaving { animation: trayCardOut 0.28s ease forwards; }
.tray-card-inner { font-size: 18px; color: var(--accent-light); margin-bottom: 4px; }
.tray-card-num { font-size: 10px; font-weight: 700; color: var(--gold); line-height: 1; }

@keyframes trayCardIn {
  from { transform: translateY(32px) scale(0.65); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes trayCardOut {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to   { transform: translateY(32px) scale(0.65); opacity: 0; }
}

/* Selected fan cards fade in place with subtle grow */
.fan-tray-mode .fan-card.selected,
.fan-tray-mode .fan-card.selected:hover {
  opacity: 0;
  transform: rotate(var(--angle)) translateY(-18px) scale(1.08);
  filter: none;
  pointer-events: none;
  z-index: 1;
}

/* ── Result cards ── */
.result-cards-row {
  display: flex; gap: 10px;
  overflow-x: auto; padding: 4px 0 12px;
  scrollbar-width: none;
}
.result-cards-row::-webkit-scrollbar { display: none; }
.result-card-item { flex-shrink: 0; text-align: center; width: 72px; }
.result-card-flip {
  width: 72px; height: 120px; cursor: pointer;
  perspective: 600px; margin-bottom: 4px;
}
.result-card-inner {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; transition: transform 0.5s;
  border-radius: 8px;
}
.result-card-flip.flipped .result-card-inner { transform: rotateY(180deg); }
.result-card-back, .result-card-front {
  position: absolute; width: 100%; height: 100%;
  backface-visibility: hidden; border-radius: 8px; overflow: hidden;
}
.result-card-back {
  background: linear-gradient(135deg, #1a0a3e, #2d1260);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.result-card-back::after { content: '✦'; color: var(--accent-light); }
.result-card-front {
  transform: rotateY(180deg);
  border: 2px solid var(--gold);
  background: var(--bg-card);
}
.result-card-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-card-front.reversed img { transform: rotate(180deg); }
.result-card-pos { font-size: 9px; color: var(--text-muted); line-height: 1.3; }
.result-card-name { font-size: 10px; color: var(--accent-light); font-weight: 600; margin-top: 2px; line-height: 1.3; }

.reading-question {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; color: var(--text-muted); margin-bottom: 14px;
}
.reading-text { font-size: 14px; line-height: 1.7; margin: 14px 0; }
.reading-text strong { color: var(--accent-light); }
.reading-sep { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.reading-actions { display: flex; gap: 8px; margin-top: 8px; }
.reading-actions .btn-secondary { margin-top: 0; }
.reading-tools { display: flex; gap: 8px; margin-top: 8px; }

/* ── Rating stars ── */
.rating-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
}
.rating-label { font-size: 13px; color: var(--text); font-weight: 500; white-space: nowrap; }
.rating-stars-input { display: flex; gap: 2px; }
.star-btn {
  background: none; border: none;
  font-size: 28px; line-height: 1;
  color: #fff; opacity: 1;
  cursor: pointer; padding: 2px 3px;
  transition: color 0.1s, transform 0.1s;
}
.star-btn.lit { color: var(--gold); text-shadow: 0 0 8px rgba(212,175,55,0.6); }
.star-btn:active { transform: scale(1.25); }

/* ── Card fullscreen ── */
.card-fullscreen {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.93);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; cursor: pointer;
  animation: fadeIn 0.2s;
}
.card-fullscreen img {
  max-width: min(72vw, 280px);
  max-height: 65vh;
  border-radius: 12px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 50px rgba(212,175,55,0.35);
  object-fit: cover;
}
.card-fullscreen-name {
  margin-top: 16px; font-size: 18px;
  font-weight: 700; color: var(--text); text-align: center;
}
.card-fullscreen-hint {
  margin-top: 8px; font-size: 12px;
  color: var(--text-muted); text-align: center;
}

/* ── Dialog ── */
.dialog-section {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.dialog-title { font-size: 14px; font-weight: 700; color: var(--gold); margin-bottom: 12px; }
.dialog-history { max-height: 260px; overflow-y: auto; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.dialog-msg {
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.6; max-width: 90%;
}
.dialog-msg-user {
  background: var(--accent); color: #fff;
  align-self: flex-end; border-radius: 12px 12px 4px 12px;
}
.dialog-msg-assistant {
  background: var(--bg-card-2); color: var(--text);
  align-self: flex-start; border: 1px solid var(--border);
  border-radius: 4px 12px 12px 12px;
}
.dialog-input-row { display: flex; gap: 8px; }
.dialog-input {
  flex: 1; padding: 10px 12px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 13px; resize: none; outline: none;
  font-family: inherit; line-height: 1.4;
}
.dialog-input:focus { border-color: var(--accent-light); }
.dialog-send-btn {
  width: 42px; flex-shrink: 0;
  background: var(--accent); border: none; border-radius: var(--radius-sm);
  color: #fff; font-size: 16px; cursor: pointer; transition: opacity 0.2s;
}
.dialog-send-btn:active { opacity: 0.8; }

/* ── History ── */
.history-tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  background: var(--bg-card); border-radius: var(--radius-sm);
  padding: 4px; border: 1px solid var(--border);
}
.htab {
  flex: 1; padding: 8px;
  border: none; border-radius: var(--radius-sm);
  background: none; color: var(--text-muted);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.htab.active { background: var(--accent); color: #fff; }
.history-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 40px 12px 14px;
  margin-bottom: 8px; cursor: pointer; transition: all 0.2s;
  position: relative;
}
.history-item:active { border-color: var(--accent-light); }
.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.history-item-left { flex-shrink: 0; max-width: 55%; min-width: 0; }
.history-spread-name { font-weight: 600; font-size: 14px; }
.history-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.history-question {
  font-size: 12px; color: var(--text);
  text-align: right; flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.history-cards-preview { display: flex; flex-wrap: wrap; gap: 4px; }
.history-card-tag {
  padding: 2px 8px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 11px; color: var(--text-muted);
}
.fav-btn {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--text-muted);
  font-size: 18px; cursor: pointer; padding: 4px;
  transition: color 0.2s, transform 0.2s;
}
.fav-btn.active { color: var(--gold); }
.fav-btn:active { transform: scale(1.3); }

/* ── Catalog ── */
.catalog-top-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 12px;
}
.catalog-top-row .catalog-search { flex: 1; margin-bottom: 0; }
.catalog-filter-btn {
  flex-shrink: 0;
  padding: 10px 12px;
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: border-color 0.2s;
}
.catalog-filter-btn:active { border-color: var(--accent-light); }
.sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border); margin: 8px auto 4px;
}
.sheet-filter-title {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  padding: 8px 20px 12px; letter-spacing: 0.5px; text-transform: uppercase;
}
.sheet-filter-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 20px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 15px; cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.sheet-filter-item:last-child { border-bottom: none; }
.sheet-filter-item:active { background: var(--bg-card); }
.sheet-filter-item.active { color: var(--gold); }
.filter-count {
  font-size: 12px; color: var(--text-muted); flex-shrink: 0;
}
.catalog-search {
  width: 100%; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; outline: none; transition: border-color 0.2s;
}
.catalog-search:focus { border-color: var(--accent-light); }
.catalog-filters {
  display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none; margin-bottom: 12px;
}
.catalog-filters::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); font-size: 12px; font-weight: 500;
  white-space: nowrap; cursor: pointer; transition: all 0.2s;
}
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.catalog-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.catalog-card { cursor: pointer; text-align: center; transition: transform 0.2s; }
.catalog-card:active { transform: scale(0.93); }
.catalog-card-img-wrap {
  aspect-ratio: 2/3; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-card-2);
}
.catalog-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted);
}
.catalog-card-name { font-size: 9px; color: var(--text-muted); margin-top: 4px; line-height: 1.2; }

/* Card detail modal */
.card-detail { text-align: center; }
.card-detail-img-wrap {
  width: 140px; margin: 0 auto 12px;
  border-radius: 10px; overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
}
.card-detail-img-wrap img { width: 100%; display: block; }
.card-detail-name { font-size: 20px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.card-detail-suit { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.cd-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.cd-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.cd-badge-num { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid rgba(212,175,55,0.4); }
.cd-badge-major { background: rgba(160,100,200,0.15); color: #c084fc; border: 1px solid rgba(160,100,200,0.4); }
.cd-badge-minor { background: rgba(100,150,200,0.15); color: #7eb8f7; border: 1px solid rgba(100,150,200,0.3); }
.cd-badge-elem { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }
.cd-keywords { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 12px; }
.cd-kw { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px 10px; font-size: 12px; color: var(--text-muted); }
.cd-desc { font-size: 13px; line-height: 1.7; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 14px; text-align: left; }
.card-detail-meanings { text-align: left; }
.meaning-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px;
}
.meaning-block.reversed { border-color: rgba(212,175,55,0.2); }
.meaning-label { font-size: 11px; font-weight: 700; color: var(--accent-light); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
.meaning-text { font-size: 13px; line-height: 1.6; }

/* ── Insights ── */
.insights-section { margin-bottom: 20px; }

/* ── Weekly card widget ── */
.weekly-card-loading { color: var(--text-muted); font-size: 13px; text-align: center; padding: 16px; }
.weekly-card-widget {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(135deg, #1a0e2e 0%, #12102a 100%);
  border: 1px solid rgba(180,120,255,0.25);
  border-radius: 16px; padding: 14px;
}
.weekly-card-img {
  width: 72px; flex-shrink: 0; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.weekly-card-img.reversed { transform: rotate(180deg); }
.weekly-card-right { flex: 1; min-width: 0; }
.weekly-card-name { font-size: 15px; font-weight: 700; color: var(--gold); margin-bottom: 2px; }
.weekly-card-week { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.weekly-card-text {
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
  max-height: 120px; overflow-y: auto;
}
.insights-section-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.moon-card { background: var(--bg-card); border: 1px solid rgba(212,175,55,0.25); border-radius: var(--radius); padding: 20px 16px; text-align: center; margin-bottom: 12px; }
.moon-phase-icon { font-size: 52px; line-height: 1; margin-bottom: 8px; }
.moon-phase-name { font-size: 18px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.moon-phase-day { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.moon-bar-wrap { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.moon-bar { height: 100%; background: linear-gradient(90deg, #b8860b, var(--gold)); border-radius: 3px; transition: width 0.8s ease; }
.moon-advice { font-size: 13px; line-height: 1.6; color: var(--text); }
.moon-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.moon-mini { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center; }
.moon-mini span { font-size: 22px; display: block; margin-bottom: 4px; }
.moon-mini div { font-size: 10px; color: var(--text); line-height: 1.2; }
.moon-mini-hint { color: var(--text-muted) !important; margin-top: 2px; }

/* Settings wide button */
.settings-wide-btn { width: 100%; text-align: center; }

/* ── Numerology redesign ── */
.num-forecast-card {
  background: linear-gradient(135deg, rgba(212,175,55,0.12), rgba(160,100,200,0.10));
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--radius); padding: 18px 16px; text-align: center; margin-bottom: 14px;
}
.num-forecast-num { font-size: 48px; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.num-forecast-title { font-size: 14px; font-weight: 700; color: var(--accent-light); letter-spacing: 0.5px; margin-bottom: 8px; }
.num-forecast-text { font-size: 13px; line-height: 1.65; color: var(--text); }
.num-life-path-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.num-life-path-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.num-life-path-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.num-life-path-num { font-size: 26px; font-weight: 800; color: var(--gold); }
.num-life-path-meaning { font-size: 12px; color: var(--accent-light); font-weight: 600; margin-bottom: 8px; }
.num-life-path-desc { font-size: 13px; line-height: 1.7; color: var(--text); }
.num-compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.num-compact-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; text-align: center;
}
.num-compact-val { font-size: 28px; font-weight: 700; color: var(--gold); line-height: 1; }
.num-compact-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin: 4px 0 2px; }
.num-compact-meaning { font-size: 11px; color: var(--text); line-height: 1.3; }
.num-empty { font-size: 13px; color: var(--text-muted); line-height: 1.6; text-align: center; padding: 16px 0; margin-bottom: 10px; }
.num-date-row { display: flex; gap: 8px; margin-top: 4px; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 8px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--gold); line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.stat-detail-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}
.stat-detail-label { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.stat-detail-value { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.stat-detail-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-bar-wrap { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.stat-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light)); border-radius: 3px; transition: width 0.6s ease; }
.stat-bar.gold { background: linear-gradient(90deg, #b8860b, var(--gold)); }
.stats-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.stat-value-sm { font-size: 15px; font-weight: 700; color: var(--gold); line-height: 1.2; }
.stat-row-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.stat-row-rank { font-size: 11px; color: var(--text-muted); width: 14px; flex-shrink: 0; }
.stat-row-name { flex: 1; font-size: 13px; font-weight: 500; }
.stat-row-cnt { font-size: 12px; color: var(--gold); font-weight: 600; }
.stat-row-item + .stat-bar-wrap { margin-bottom: 10px; }

/* ── Settings ── */
.settings-section { margin-bottom: 20px; }
.settings-section-title { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-btn {
  padding: 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.mode-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 8px; min-height: 50px;
}
.settings-row > span { line-height: 1; }
.settings-select {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 6px 10px; font-size: 13px; outline: none;
}
.toggle { cursor: pointer; position: relative; display: inline-block; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block; width: 46px; height: 26px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 13px; transition: background 0.2s;
  position: relative; flex-shrink: 0;
}
.toggle-track::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(20px); }
.settings-about {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
  font-size: 14px;
}
.privacy-link {
  display: inline-block; margin-top: 12px;
  font-size: 12px; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.2s;
}
.privacy-link:hover { color: var(--accent-light); }

/* ── Support FAQ ── */
.support-faq { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.faq-item {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; cursor: pointer; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.faq-arrow {
  font-size: 18px; color: var(--text-muted); flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-arrow { transform: rotate(90deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 14px;
}
.faq-item.open .faq-a { max-height: 200px; padding: 0 14px 12px; }

.support-contact-btn {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff; font-size: 14px; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
  transition: transform 0.15s;
}
.support-contact-btn:active { transform: scale(0.98); }

/* ── Modal overlay ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200; display: flex;
  align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-sheet {
  width: 100%; background: var(--bg-2);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  padding: 8px 16px 40px;
  max-height: 88vh; overflow-y: auto;
}
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border); border-radius: 2px;
  margin: 8px auto 16px;
}
.modal-body { }
.modal-title { font-size: 17px; font-weight: 700; color: var(--gold); margin-bottom: 6px; text-align: center; }
.modal-subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 14px; }

/* Clarify spread list */
.clarify-spreads-list { display: grid; gap: 8px; margin-bottom: 12px; }
.clarify-spread-btn {
  padding: 12px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-weight: 500;
  cursor: pointer; text-align: left; transition: all 0.2s;
  width: 100%;
}
.clarify-spread-btn:active { border-color: var(--accent-light); background: var(--bg-card-2); }

/* ── Toast ── */
#toast {
  position: fixed; bottom: calc(var(--nav-height) + 16px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2a2a4a; border: 1px solid var(--border);
  color: var(--text); padding: 10px 18px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  opacity: 0; transition: all 0.25s; z-index: 300;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Generating screen ── */
.generating-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 60vh; gap: 20px;
}
.crystal-ball { font-size: 64px; animation: pulse 1.5s ease-in-out infinite; }
.generating-text { font-size: 16px; color: var(--text-muted); text-align: center; }
.generating-dots span {
  animation: blink 1.4s infinite;
  font-size: 24px; color: var(--accent-light);
}
.generating-dots span:nth-child(2) { animation-delay: 0.2s; }
.generating-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }

.payment-spinner {
  width: 56px; height: 56px;
  border: 4px solid rgba(124,58,237,0.25);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.payment-hint {
  color: rgba(255,255,255,0.6);
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 24px;
  max-width: 320px;
}

/* ── App Modal ── */
.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.app-modal {
  background: var(--bg-card);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 20px;
  padding: 28px 24px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 0.2s ease;
}
.app-modal-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.app-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.app-modal-text {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 20px;
}
.app-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.app-modal-btns .btn-primary,
.app-modal-btns .btn-secondary {
  width: 100%;
}

/* ── Daily tip modal ── */
.tip-content { text-align: center; padding: 8px 0; }
.tip-icon { font-size: 40px; margin-bottom: 12px; }
.tip-title { font-size: 18px; font-weight: 700; color: var(--gold); margin-bottom: 14px; }
.tip-text { font-size: 14px; line-height: 1.8; color: var(--text); text-align: left; font-style: italic; }

/* ── Home header ── */
.home-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 4px;
}
.home-header .page-title { text-align: left; margin-bottom: 2px; }
.home-header .page-subtitle { text-align: left; }
.help-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50%; color: var(--accent-light);
  font-size: 16px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-top: 4px; transition: all 0.2s;
}
.help-btn:active { background: var(--bg-card-2); border-color: var(--accent-light); }

/* ── Spread categories ── */
.home-promo-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(120deg, rgba(212,175,55,0.1), rgba(167,139,250,0.07));
  border: 1px solid rgba(212,175,55,0.45);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
  cursor: pointer;
}
.home-promo-pct {
  font-size: 20px; font-weight: 800; color: var(--gold);
  flex-shrink: 0; line-height: 1;
}
.home-promo-info { flex: 1; min-width: 0; }
.home-promo-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.home-promo-timer { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.home-promo-btn {
  background: var(--gold); color: #0f0c1a; border: none;
  border-radius: 8px; padding: 7px 12px;
  font-size: 12px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}

.spread-section {
  border-radius: 16px;
  padding: 14px 14px 10px;
  margin: 12px 0;
  border: 1px solid transparent;
}
.spread-section--gold  { border-color: rgba(212,175,55,0.45);  background: rgba(212,175,55,0.04); }
.spread-section--rose  { border-color: rgba(232,121,160,0.45); background: rgba(232,121,160,0.04); }
.spread-section--blue  { border-color: rgba(96,165,250,0.45);  background: rgba(96,165,250,0.04); }
.spread-section--purple{ border-color: rgba(167,139,250,0.45); background: rgba(167,139,250,0.04); }

.spread-category-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  color: var(--text-muted);
  margin: 0 0 10px; padding-left: 2px;
}
.spread-section--gold  .spread-category-label { color: var(--gold); }
.spread-section--rose  .spread-category-label { color: #e879a0; }
.spread-section--blue  .spread-category-label { color: #60a5fa; }
.spread-section--purple .spread-category-label { color: #a78bfa; }

/* ── Help modal ── */
.help-section { margin-bottom: 14px; }
.help-section-title { font-size: 13px; font-weight: 700; color: var(--accent-light); margin-bottom: 6px; }
.help-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.help-spread-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.help-spread-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
}
.help-spread-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.help-spread-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── Onboarding ── */
.onboarding-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}
.onboarding-card {
  background: var(--bg-2); border: 1px solid var(--accent);
  border-radius: 20px; padding: 28px 24px;
  width: 100%; max-width: 340px;
  box-shadow: 0 0 40px var(--accent-glow);
}
.onboarding-icon { font-size: 48px; text-align: center; margin-bottom: 12px; }
.onboarding-title { font-size: 20px; font-weight: 700; color: var(--gold); text-align: center; margin-bottom: 20px; }
.onboarding-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.onboarding-step { display: flex; align-items: flex-start; gap: 12px; }
.onboarding-num {
  width: 26px; height: 26px; flex-shrink: 0;
  background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.onboarding-step span:last-child { font-size: 14px; line-height: 1.5; padding-top: 4px; }

/* ── Fan screen layout ── */
.fan-screen {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
}
.fan-header { flex-shrink: 0; }
.fan-area {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; min-height: 0; overflow: visible;
}
.fan-footer { flex-shrink: 0; padding-top: 24px; }

/* ── Cards row with scroll buttons ── */
.cards-row-wrapper {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 4px;
}
.cards-scroll-btn {
  flex-shrink: 0; width: 28px; height: 28px;
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: 50%; color: var(--accent-light);
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; padding: 0;
}
.cards-scroll-btn:active { background: var(--accent); color: #fff; }
.cards-row-wrapper .result-cards-row { flex: 1; }
@media (pointer: coarse) {
  .cards-scroll-btn { display: none; }
}

/* ── Итог highlight ── */
.itog { color: var(--gold) !important; text-shadow: 0 0 8px rgba(212,175,55,0.3); }

/* ── Random button ── */
.btn-random {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 10px;
  background: var(--bg-card-2); border: 1px dashed var(--accent);
  border-radius: var(--radius-sm); color: var(--accent-light);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; margin-bottom: 10px;
}
.btn-random:active { background: var(--accent); color: #fff; }

/* ── Reading text headers ── */
.reading-h1 {
  font-size: 16px; font-weight: 700; color: var(--gold);
  margin: 14px 0 6px; line-height: 1.3;
  text-shadow: 0 0 10px rgba(212,175,55,0.25);
}
.reading-h2 {
  font-size: 14px; font-weight: 700; color: var(--accent-light);
  margin: 12px 0 4px; line-height: 1.3;
}
.reading-gap { height: 8px; }
.reading-text { font-size: 14px; line-height: 1.7; color: var(--text); }
.reading-text br + br { display: none; }

/* ── Custom spread ── */
.custom-spread-card { cursor: default !important; }
.custom-count-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.count-pick-btn {
  width: 36px; height: 36px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.count-pick-btn:active { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(0.92); }

/* ── Stars canvas ── */
#stars-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Touch / click glow ── */
.touch-glow {
  position: fixed;
  width: 200px;
  height: 200px;
  margin-left: -100px;
  margin-top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.7) 0%, rgba(212,175,55,0.25) 40%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  animation: glow-burst 0.8s ease-out forwards;
}

@keyframes glow-burst {
  0%   { transform: scale(0.15); opacity: 1; }
  100% { transform: scale(1);    opacity: 0; }
}


/* ── Skeleton loading ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #1a0a3e 25%, #2d1260 50%, #1a0a3e 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

/* ── Daily card widget ── */
.daily-card-widget {
  background: var(--bg-card-2);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.daily-card-label {
  font-size: 11px; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px;
}
.daily-card-body {
  display: flex; gap: 12px; align-items: flex-start;
}
.daily-card-img-wrap {
  width: 56px; height: 90px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden;
  border: 1.5px solid var(--gold);
}
.daily-card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.daily-card-img-wrap.reversed img { transform: rotate(180deg); }
.daily-card-info { flex: 1; min-width: 0; }
.daily-card-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.daily-card-orient { font-size: 11px; color: var(--gold); margin-bottom: 6px; }
.daily-card-meaning {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.btn-daily-reading {
  margin-top: 10px; width: 100%;
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(160,100,200,0.1));
  border: 1px solid rgba(212,175,55,0.4); border-radius: var(--radius-sm);
  color: var(--gold); font-size: 12px; font-weight: 600;
  padding: 7px 10px; cursor: pointer; transition: opacity 0.2s;
}
.btn-daily-reading:active { opacity: 0.7; }
.btn-daily-reading:disabled { opacity: 0.4; cursor: default; }

/* ── Numerology ── */
.num-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.num-label { font-size: 13px; color: var(--text-muted); }
.num-val {
  font-size: 22px; font-weight: 700; color: var(--gold);
  min-width: 36px; text-align: right;
}
.num-meaning { font-size: 11px; color: var(--accent-light); padding: 3px 0 8px; }
.settings-input {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  color: var(--text); font-size: 14px; outline: none;
}
.settings-input:focus { border-color: var(--accent); }

/* ── Position label more visible ── */
.result-card-pos {
  font-size: 10px; color: var(--gold);
  font-weight: 600; letter-spacing: 0.02em;
  line-height: 1.3; margin-top: 4px;
}

/* ── Onboarding ── */
.onboarding-overlay {
  position: absolute; inset: 0; z-index: 1000;
  background: rgba(7,7,15,0.95);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.onboarding-card {
  background: var(--bg-card-2);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 36px 28px 28px;
  max-width: 360px; width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(212,175,55,0.15);
}
.ob-icon {
  font-size: 52px; margin-bottom: 18px;
  filter: drop-shadow(0 0 12px var(--gold));
}
.ob-title {
  font-size: 20px; font-weight: 700; color: var(--gold);
  margin-bottom: 12px;
}
.ob-text {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 20px;
}
.ob-modes {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 20px;
}
.ob-mode-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 8px;
  color: var(--text-muted); font-size: 13px;
  cursor: pointer; transition: all 0.2s;
}
.ob-mode-btn.active {
  border-color: var(--gold); color: var(--gold);
  background: rgba(212,175,55,0.1);
}
.ob-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 20px; margin-bottom: 20px;
}
.ob-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); transition: all 0.2s;
}
.ob-dot.active { background: var(--gold); width: 18px; border-radius: 3px; }
.ob-btn { width: 100%; }

/* ── Streak badge ── */
.streak-badge {
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.1));
  border: 1px solid var(--gold);
  border-radius: 20px; padding: 4px 12px;
  font-size: 13px; font-weight: 700; color: var(--gold);
  white-space: nowrap;
}

/* ── Note / Journal ── */
.note-block { margin: 12px 0; }
.note-display {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.note-label {
  font-size: 11px; color: var(--gold); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
}
.note-text { font-size: 13px; color: var(--text); line-height: 1.6; white-space: pre-wrap; }
.note-edit-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 12px; cursor: pointer; margin-top: 8px; padding: 0;
  text-decoration: underline;
}
.note-textarea {
  width: 100%; min-height: 120px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  color: var(--text); font-size: 14px; line-height: 1.6;
  resize: vertical; outline: none; font-family: inherit;
  margin-top: 12px;
}
.note-textarea:focus { border-color: var(--accent); }

/* ── Empty States ── */
.empty-state-full {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center; gap: 12px;
}
.empty-state-icon { font-size: 52px; line-height: 1; }
.empty-state-title { font-size: 17px; font-weight: 700; color: var(--text); }
.empty-state-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; max-width: 260px; }
.empty-state-btn { margin-top: 8px; padding: 12px 28px; font-size: 14px; }

/* ── Onboarding inputs ── */
.ob-input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 15px; outline: none; font-family: inherit;
  margin-top: 4px;
}
.ob-input:focus { border-color: var(--accent-light); }
.ob-skip-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 13px; cursor: pointer; margin-top: 4px;
  text-decoration: underline; padding: 4px;
}

/* ── Compatibility ── */
.compat-no-bd {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px; text-align: center; gap: 10px;
}
.compat-no-bd-icon { font-size: 36px; }
.compat-no-bd-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.compat-go-settings { width: 100%; margin-top: 4px; }
.compat-form { padding: 4px 0 12px; }
.compat-form-label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.compat-input-row { display: flex; gap: 8px; }
.compat-input {
  flex: 1; padding: 10px 12px;
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; outline: none; font-family: inherit;
}
.compat-input:focus { border-color: var(--accent-light); }
.compat-check-btn {
  padding: 10px 16px; background: var(--accent);
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.compat-check-btn:active { opacity: 0.85; }
.compat-error { font-size: 13px; color: #f87171; padding: 8px 0; }
.compat-result {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-top: 4px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.compat-nums { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.compat-num-badge {
  background: rgba(124,58,237,0.2); border: 1px solid var(--accent);
  border-radius: 20px; padding: 4px 12px; font-size: 13px; font-weight: 700;
}
.compat-heart { font-size: 20px; }
.compat-title { font-size: 16px; font-weight: 700; color: var(--gold-light); }
.compat-stars { font-size: 15px; letter-spacing: 2px; }
.compat-score-label { font-size: 12px; color: var(--text-muted); margin-top: -4px; }
.compat-text { font-size: 13px; color: var(--text); line-height: 1.6; }

/* ── Tarot Profile ── */
.profile-no-bd {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px; text-align: center; gap: 10px;
}
.profile-no-bd-icon { font-size: 32px; }
.profile-no-bd-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.profile-gen-btn { width: 100%; margin-bottom: 4px; }
.profile-note { font-size: 11px; color: var(--text-muted); text-align: center; }
.profile-loading { padding: 24px 0; text-align: center; }
.profile-cards-row {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 14px; flex-wrap: wrap;
}
.profile-card-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; min-width: 80px; max-width: 100px;
}
.profile-card-img {
  width: 72px; height: 116px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.profile-card-label {
  font-size: 10px; color: var(--gold); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.profile-card-name { font-size: 12px; color: var(--text); text-align: center; }
.profile-lp {
  font-size: 13px; color: var(--text-muted);
  text-align: center; margin-bottom: 12px;
}
.profile-text {
  font-size: 14px; color: var(--text); line-height: 1.7;
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
  margin-bottom: 12px;
}
.profile-reset-btn { width: 100%; font-size: 13px; }

/* ── Premium bar ── */
.premium-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-radius: 12px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600;
}
.premium-bar--free {
  background: linear-gradient(90deg, #1a1a35, #22153a);
  border: 1px solid rgba(160,100,255,0.25);
  color: var(--text-muted);
}
.premium-bar--starter {
  background: linear-gradient(90deg, #151e35, #1a2540);
  border: 1px solid rgba(80,160,255,0.25);
  color: #8ab4f8;
}
.premium-bar--pro {
  background: linear-gradient(90deg, #1e1a0a, #2a2010);
  border: 1px solid rgba(var(--gold-rgb, 212,175,55), 0.35);
  color: var(--gold);
}
.premium-bar__text { flex: 1; }
.premium-bar__btn {
  background: rgba(255,255,255,0.08); color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 12px; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 600; text-decoration: none;
  white-space: nowrap; transition: background 0.2s;
}
.premium-bar__btn:hover { background: rgba(255,255,255,0.14); }

/* ── Premium banner ── */
.premium-banner {
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(135deg, #1e1400 0%, #2e2100 50%, #1a1200 100%);
  border: 1px solid rgba(212,175,55,0.45);
  border-radius: 18px; padding: 18px; margin-top: 16px; margin-bottom: 16px;
  box-shadow: 0 4px 28px rgba(212,175,55,0.12);
}
.premium-banner__top { display: flex; align-items: center; gap: 12px; }
.premium-banner__icon { font-size: 36px; flex-shrink: 0; }
.premium-banner__body { flex: 1; min-width: 0; }
.premium-banner__title { font-size: 16px; font-weight: 800; color: var(--gold); margin-bottom: 3px; letter-spacing: 0.3px; }
.premium-banner__sub { font-size: 12px; color: rgba(212,175,55,0.7); }
.premium-banner__perks {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.premium-banner__perks span {
  font-size: 11px; color: var(--gold);
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.25);
  padding: 3px 10px; border-radius: 20px;
}
.premium-banner__btn {
  width: 100%;
  background: linear-gradient(135deg, #b8860b 0%, #ffd700 50%, #c8960c 100%);
  color: #1a1000; font-size: 14px; font-weight: 800;
  padding: 12px; border-radius: 12px; border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212,175,55,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.premium-banner__btn:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(212,175,55,0.2); }

/* ── Premium wall (limit reached) ── */
.premium-wall {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 24px; gap: 12px;
}
.premium-wall__icon { font-size: 56px; margin-bottom: 8px; }
.premium-wall__title { font-size: 22px; font-weight: 700; color: var(--gold); }
.premium-wall__sub { font-size: 14px; color: var(--text-muted); line-height: 1.5; max-width: 280px; }
.premium-wall__perks {
  display: flex; flex-direction: column; gap: 8px;
  margin: 12px 0; text-align: left;
}
.premium-wall__perks div {
  font-size: 14px; color: #a78bfa;
  background: rgba(139,92,246,0.1);
  padding: 8px 16px; border-radius: 10px;
}
.premium-wall__btn {
  width: 100%; max-width: 280px;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #fff; font-size: 16px; font-weight: 700;
  padding: 14px 24px; border-radius: 14px; border: none;
  cursor: pointer; margin-top: 8px;
  box-shadow: 0 6px 20px rgba(124,58,237,0.45);
  transition: transform 0.15s;
}
.premium-wall__btn:active { transform: scale(0.97); }

/* ── Plans screen ── */
.plans-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.plan-current {
  text-align: center; font-size: 13px; color: var(--gold);
  background: rgba(255,215,0,0.08); border-radius: 10px; padding: 8px 12px;
  margin-top: 8px;
}

.plan-card {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  transition: transform 0.18s;
}
.plan-card:active { transform: scale(0.98); }

/* Starter — синяя карточка */
.plan-card--starter {
  background: linear-gradient(135deg, #0f1f40 0%, #162a55 60%, #1a2d60 100%);
  border: 1px solid rgba(99,179,237,0.35);
}
.plan-card--starter::before {
  content: '🎴'; position: absolute; right: -10px; top: -10px;
  font-size: 80px; opacity: 0.08; pointer-events: none;
}

/* Pro 1 month — фиолетовая карточка */
.plan-card--pro_1 {
  background: linear-gradient(135deg, #1a0a35 0%, #2d1060 60%, #3b1278 100%);
  border: 1px solid rgba(167,139,250,0.4);
}
.plan-card--pro_1::before {
  content: '⭐'; position: absolute; right: -8px; top: -8px;
  font-size: 80px; opacity: 0.1; pointer-events: none;
}

/* Pro 3 months — золотая карточка */
.plan-card--pro_3 {
  background: linear-gradient(135deg, #1c1400 0%, #2e2000 60%, #3d2a00 100%);
  border: 1px solid rgba(212,175,55,0.45);
  box-shadow: 0 8px 32px rgba(212,175,55,0.15);
}
.plan-card--pro_3::before {
  content: '💎'; position: absolute; right: -8px; top: -8px;
  font-size: 80px; opacity: 0.1; pointer-events: none;
}

.plan-card__top { display: flex; align-items: flex-start; gap: 8px; }
.plan-card__label { font-size: 17px; font-weight: 800; color: #fff; flex: 1; line-height: 1.3; }
.plan-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  padding: 3px 9px; border-radius: 20px; margin-top: 2px;
}
.plan-card__desc { font-size: 13px; color: rgba(255,255,255,0.6); }

.plan-card__btn {
  align-self: stretch; margin-top: 6px;
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 11px 18px; border-radius: 12px; border: none; cursor: pointer;
  text-align: center; transition: transform 0.15s, box-shadow 0.15s;
}
.plan-card--starter .plan-card__btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 16px rgba(37,99,235,0.45);
}
.plan-card--pro_1 .plan-card__btn {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  box-shadow: 0 4px 16px rgba(124,58,237,0.45);
}
.plan-card--pro_3 .plan-card__btn {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  box-shadow: 0 4px 16px rgba(212,175,55,0.4);
}
.plan-card__btn:active { transform: scale(0.97); }

.plan-card__price {
  font-size: 14px; color: #fff; margin-top: -2px;
}
.plan-card__price s { color: rgba(255,255,255,0.4); }
.plan-card__price b { color: #4ade80; }

.promo-input-row {
  display: flex; gap: 8px; margin-top: 16px;
}
.promo-input {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; color: var(--text);
  font-size: 14px; outline: none; letter-spacing: 1px;
}
.promo-input::placeholder { color: var(--text-muted); letter-spacing: 0; }
.promo-apply-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: opacity 0.15s;
}
.promo-apply-btn:active { opacity: 0.8; }
.promo-error {
  font-size: 12px; color: #f87171; margin-top: 6px; min-height: 16px;
}
.discount-banner {
  background: linear-gradient(135deg, rgba(251,146,60,0.18), rgba(239,68,68,0.18));
  border: 1px solid rgba(251,146,60,0.45);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #fb923c;
  text-align: center;
  animation: discountPulse 2s ease-in-out infinite;
}
@keyframes discountPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,146,60,0.3); }
  50%       { box-shadow: 0 0 0 6px rgba(251,146,60,0); }
}
#discountTimer { color: #fbbf24; font-variant-numeric: tabular-nums; }

.plan-card__price { font-size: 14px; margin: 4px 0 6px; color: var(--text-muted); }
.plan-card__price s { opacity: 0.5; }
.plan-card__price b { color: #4ade80; font-size: 16px; }

.promo-applied {
  margin-top: 14px; font-size: 13px; color: #4ade80;
  background: rgba(74,222,128,0.1); border-radius: 10px; padding: 8px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.promo-clear-btn {
  background: none; border: none; color: rgba(74,222,128,0.6);
  font-size: 16px; cursor: pointer; padding: 0 2px; line-height: 1;
  flex-shrink: 0; transition: color 0.15s;
}
.promo-clear-btn:hover { color: #f87171; }

.plan-note {
  text-align: center; font-size: 12px; color: var(--text-muted);
  margin-top: 16px; padding-bottom: 8px;
}

/* ── Payment widget wrapper ── */
.payment-form-wrap { margin-top: 8px; min-height: 300px; }

/* ── Plan card Stars button ── */
.plan-card__btns { display: flex; gap: 8px; margin-top: 10px; }
.plan-card__btns .plan-card__btn { flex: 1; margin-top: 0; }
.plan-card__btn--stars {
  flex: 1;
  padding: 10px 8px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 10px;
  color: #ffd700;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.plan-card__btn--stars:hover {
  border-color: rgba(255,215,0,0.6);
  box-shadow: 0 0 12px rgba(255,215,0,0.2);
}

/* ── Purchase help button ── */
.purchase-help-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.purchase-help-btn:hover { border-color: rgba(255,255,255,0.25); color: var(--text); }

/* ── Skeleton loader ── */
.skeleton-home { padding: 24px 20px; }
.sk-block {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--bg-2) 25%, rgba(124,58,237,0.08) 50%, var(--bg-2) 75%);
  background-size: 200% 100%;
  animation: skShimmer 1.4s ease-in-out infinite;
}
@keyframes skShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sk-title    { height: 28px; width: 60%; margin: 0 auto 12px; }
.sk-subtitle { height: 16px; width: 80%; margin: 0 auto 28px; }
.sk-grid     { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sk-card     { height: 88px; border-radius: 14px; }
