:root {
  --bg: #140f24;
  --bg-2: #1d1633;
  --card: #231b3d;
  --card-2: #2c2350;
  --line: #3b3163;
  --text: #ece8f7;
  --muted: #a89fc6;
  --gold: #e8c46a;
  --gold-2: #f3d68f;
  --accent: #9b7bff;
  --ok: #6fd6a2;
  --err: #ff8a8a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #2b1f55 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); margin-top: 1.4em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

/* Шапка */
.topbar { border-bottom: 1px solid var(--line); background: rgba(20, 15, 36, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: .02em; }
.logo:hover { text-decoration: none; color: var(--gold); }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav .nav__cta { color: #1b1433; background: var(--gold); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
.nav .nav__cta:hover { background: var(--gold-2); color: #1b1433; text-decoration: none; }

/* Подвал */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.footer__langs, .footer__links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; }
.lang { color: var(--muted); }
.lang--active { color: var(--text); font-weight: 600; }
.footer__note { margin: 0 0 6px; font-size: .82rem; }

/* Блоки */
.hero { padding: 16px 0 8px; }
.hero p { color: var(--muted); max-width: 680px; font-size: 1.08rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 14px; }
.grid--signs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.sign { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; text-align: center; color: var(--text); transition: transform .15s, border-color .15s; }
.sign:hover { transform: translateY(-2px); border-color: var(--gold); text-decoration: none; color: var(--text); }
.sign__symbol { font-size: 2rem; display: block; color: var(--gold); line-height: 1.2; }
.sign__name { font-weight: 600; display: block; }
.sign__dates { font-size: .8rem; color: var(--muted); }
.sign--active { border-color: var(--gold); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 20px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--bg-2); }
.tab:hover { color: var(--text); text-decoration: none; border-color: var(--accent); }
.tab--active { background: var(--accent); border-color: var(--accent); color: #fff; }

.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.article h2 { font-size: 1.2rem; color: var(--gold); margin-top: 1.2em; }
.article h2:first-of-type { margin-top: 0; }
.article .lead { font-size: 1.15rem; font-style: italic; color: var(--text); }
.facts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.fact { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: .92rem; }
.fact b { color: var(--gold); }

.cta { background: linear-gradient(135deg, #3a2a7a, #22193f); border: 1px solid var(--accent); border-radius: var(--radius); padding: 22px; margin: 28px 0; }
.cta h2 { margin-top: 0; }

.btn { display: inline-block; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 600; cursor: pointer; background: var(--gold); color: #1b1433; text-align: center; }
.btn:hover { background: var(--gold-2); color: #1b1433; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--gold); background: transparent; color: var(--text); }
.btn--small { padding: 8px 16px; font-size: .92rem; }
.btn--block { display: block; width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }

.links-inline { display: flex; gap: 8px 14px; flex-wrap: wrap; font-size: .92rem; }

/* Формы */
form .field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=file], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { min-height: 120px; resize: vertical; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-row label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.checkbox input { margin-top: 5px; }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; }

.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.alert--err { background: rgba(255, 138, 138, .12); border: 1px solid var(--err); color: #ffd1d1; }
.alert--ok { background: rgba(111, 214, 162, .12); border: 1px solid var(--ok); color: #d4ffe8; }
.alert--info { background: rgba(155, 123, 255, .12); border: 1px solid var(--accent); }

/* Таро */
.tarot-cards { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 12px 0 20px; }
.tarot-card { width: 150px; text-align: center; }
.tarot-card img { border-radius: 10px; box-shadow: var(--shadow); background: var(--bg-2); }
.tarot-card--reversed img { transform: rotate(180deg); }
.tarot-card__name { font-weight: 600; margin-top: 6px; font-size: .92rem; }
.tarot-card__pos { font-size: .8rem; color: var(--muted); }
.tarot-big { width: 220px; }
.card-back { width: 220px; height: 370px; margin: 0 auto 20px; border-radius: 14px; border: 2px solid var(--gold); background: repeating-linear-gradient(45deg, #2b1f55 0 10px, #231b3d 10px 20px); display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--gold); box-shadow: var(--shadow); }

/* Кабинет */
.status-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.pill { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: .85rem; border: 1px solid var(--line); background: var(--bg-2); }
.pill--ok { border-color: var(--ok); color: var(--ok); }
.pill--off { border-color: var(--err); color: var(--err); }
.section-tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); }
.section-tile:hover { border-color: var(--gold); text-decoration: none; color: var(--text); }
.section-tile__icon { font-size: 1.8rem; }
.section-tile__title { font-weight: 700; display: block; margin: 4px 0; }
.section-tile__desc { color: var(--muted); font-size: .9rem; }
.kind { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kind h3 { margin-bottom: 4px; }
.kind p { color: var(--muted); font-size: .92rem; }
details.kind summary { cursor: pointer; font-weight: 700; list-style: none; }
details.kind summary::-webkit-details-marker { display: none; }
details.kind summary::after { content: "▾"; float: right; color: var(--muted); }
details.kind[open] summary::after { content: "▴"; }
details.kind form { margin-top: 14px; }
.history-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.plan--best { border-color: var(--gold); }
.plan__price { font-size: 2rem; font-weight: 800; color: var(--gold); margin: 8px 0; }

.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold); animation: spin 1s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.dream-image { border-radius: var(--radius); margin: 0 auto 20px; display: block; max-width: 520px; width: 100%; }

.legal h2 { font-size: 1.15rem; }
.legal { max-width: 820px; }
.breadcrumbs { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .article, .card { padding: 16px; }
  .nav { gap: 10px; font-size: .9rem; }
  .tarot-card { width: 42%; }
}
