/* ============================================================
   Мистик AI — светлая тема сайта (подключается после style.css на всех страницах)
   Палитра и переменные заданы в :root в style.css; здесь — «бумага», шапка, подвал, кнопки.
   ============================================================ */
body { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
body *, body *::before, body *::after { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

body::before {
  background:
    radial-gradient(900px 520px at 85% -8%, rgba(63,131,212,.09), transparent 62%),
    radial-gradient(800px 600px at -5% 18%, rgba(176,138,74,.11), transparent 60%),
    var(--bg);
}
body::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .2  0 0 0 .55 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  background-size: 160px;
  opacity: .2;
  mix-blend-mode: multiply;
}

/* шапка */
.site-header { background: rgba(247,241,232,.82); border-bottom: 1px solid var(--border); }
.site-header .wrap { height: 72px; }
.brand { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: .01em; color: var(--text); }
.brand b { font-style: italic; color: var(--violet); font-weight: 500; }
.brand .mark { font-size: 0 !important; width: 34px; height: 34px; border-radius: 50%; display: inline-block !important; vertical-align: middle;
  background: url(/favicon.svg) center/contain no-repeat !important; box-shadow: 0 6px 18px -8px rgba(176,138,74,.7) !important; }
.brand .mark::before { content: none !important; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--violet); }
.burger { color: var(--text); }
.btn-primary { background: #13223f; color: #fff; box-shadow: 0 10px 26px -12px rgba(19,34,63,.8); border: 0; }
.btn-primary:hover { background: var(--violet); box-shadow: 0 16px 34px -12px rgba(63,131,212,.8); }
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; }
.btn-ghost { color: var(--text); border-color: var(--border-2); background: transparent; }
.btn-ghost:hover { border-color: var(--violet); background: rgba(63,131,212,.06); }

/* подвал */
.site-footer { background: #13223f; color: #c4d2e6; border: 0; margin-top: 40px; padding: 56px 0 48px; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, #b08a4a, transparent); }
.site-footer .brand { color: #f7f1e8; }
.site-footer .brand b { color: #b8daff; }
.footer-col h4 { color: #b08a4a; }
.footer-col a, .footer-legal, .footer-legal a, .footer-more a { color: #c4d2e6; }
.footer-col a:hover, .footer-more a:hover { color: #fff; }
.footer-about p, .footer-bottom, .footer-disc, .footer-more { color: #90a3bb; }
.footer-bottom { border-top-color: rgba(255,255,255,.12); }

/* кнопки разных редизайнов приводим к одной: баклажан + фиолет при наведении */
html body .btn-primary, html body .cookie-ok, html body #cookie-ok,
html body .palm-redesign .btn-primary, html body .ritual-redesign .btn-primary {
  background: #13223f; color: #fff; border: 0; box-shadow: 0 10px 26px -12px rgba(19,34,63,.8); text-shadow: none;
}
html body .btn-primary:hover { background: var(--violet); }

/* «тёмные акценты»: блоки продажи остаются баклажановыми — внутри возвращаем тёмные переменные */
.so, .dark-accent {
  --text: #fff; --muted: #cbdbef; --muted-2: #a7bcd6; --w: 255,255,255;
  --border: rgba(255,255,255,.18); --border-2: rgba(255,255,255,.28);
  --card: rgba(255,255,255,.07); --card-2: rgba(255,255,255,.1);
  --gold: #e8d3a0; --gold-soft: #f0e2bd; --violet: #b8daff;
  background: linear-gradient(135deg, #13223f, #1c3566) !important;
  color: #dae4f5; border: 0 !important; border-radius: 26px; position: relative; overflow: hidden;
  box-shadow: 0 34px 60px -34px rgba(28,53,102,.75) !important;
}
.so h2, .so h3, .so b { color: #fff !important; }
.so p, .so span, .so-sub { color: #cbdbef; }
.so .so-kick { color: #e8d3a0 !important; }
.so .btn-gold { background: #f7f1e8; color: #13223f; border: 0; box-shadow: none; }
.so .btn-gold:hover { background: #fff; }
.so .so-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); }
.so .so-link { color: #cdddf6; }
.tf-plan-top {
  --text: #fff; --muted: #cbdbef; --muted-2: #a7bcd6; --w: 255,255,255;
  --border: rgba(255,255,255,.18); --border-2: rgba(255,255,255,.28);
  --card: rgba(255,255,255,.07); --gold: #e8d3a0; --gold-soft: #f0e2bd; --violet: #b8daff;
  background: linear-gradient(160deg, #13223f, #1c3566) !important; color: #dae4f5;
  border: 1px solid #b08a4a !important; box-shadow: 0 40px 70px -36px rgba(28,53,102,.8) !important;
}
.tf-plan-top h3, .tf-plan-top b, .tf-plan-top .tf-plan-price { color: #fff; }
.tf-plan-top .btn-primary, .tf-plan-top .btn-gold { background: #f7f1e8; color: #13223f; }
.tf-plan-top .btn-primary:hover { background: #fff; }

html body[class] .btn-primary, html body[class] .cookie-ok,
html body[class] .site-header .btn-primary, html body[class] .cookie-bar .btn {
  background: #13223f; background-image: none; color: #fff; border: 0; box-shadow: 0 10px 26px -12px rgba(19,34,63,.8); text-shadow: none;
}
html body[class] .btn-primary:hover, html body[class] .cookie-bar .btn:hover { background: var(--violet); }
html body[class] .so .btn-gold { background: #f7f1e8; background-image: none; color: #13223f; }
.ritual-redesign [data-sub-offer], .palm-redesign [data-sub-offer] { grid-column: 1 / -1; width: 100%; }

/* ===== телефон: плотнее, инструмент ближе к началу страницы ===== */
@media (max-width: 700px) {
  .site-header .wrap { height: 60px; }
  .tool-head .tool-illus { height: 132px; width: 100%; object-fit: cover; object-position: 50% 42%; border-radius: 20px; margin-bottom: 14px; }
  .tool-head .eyebrow { display: none; }
  .tool-head h1 { font-size: 2.3rem !important; line-height: 1 !important; margin-bottom: 8px !important; }
  .tool-head p { font-size: .96rem !important; line-height: 1.55 !important; margin-bottom: 0 !important; }
  .so { margin: 12px auto; border-radius: 22px; }
  .site-footer { padding: 40px 0 36px; }
}
@media (max-width: 700px) {
  .tf-plan:not(.tf-plan-top) li.n { display: none; }
  .tf-plan { padding: 22px 18px 18px; }
  .tf-plan ul { gap: 7px; margin-bottom: 14px; }
  .tf-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .tf-tile { padding: 14px 13px; }
  .tf-tile span, .tf-tile p { font-size: .84rem; line-height: 1.45; }
}

/* платёжная карточка — главный момент продажи: баклажановый акцент */
.paywall-card {
  --text: #fff; --muted: #cbdbef; --muted-2: #a7bcd6; --w: 255,255,255;
  --border: rgba(255,255,255,.16); --border-2: rgba(255,255,255,.26);
  --card: rgba(255,255,255,.07); --gold: #e8d3a0; --gold-soft: #f0e2bd; --violet: #b8daff;
  background: linear-gradient(165deg, #13223f, #1c3566) !important; color: #dae4f5;
  border: 1px solid #b08a4a !important; box-shadow: 0 40px 70px -36px rgba(28,53,102,.8) !important;
}
.paywall-card h3, .paywall-card b { color: #fff; }
.paywall-card .btn-gold, .paywall-card .btn-primary { background: #f7f1e8; background-image: none; color: #13223f; box-shadow: none; }
.paywall-card .btn-gold:hover, .paywall-card .btn-primary:hover { background: #fff; color: #13223f; }
.paywall-card input { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.paywall-card input::placeholder { color: #a7bcd6; }
html body[class] .paywall-card .btn-primary { background: #f7f1e8; color: #13223f; }
@media (max-width: 700px) {
  .paywall-list, .paywall-card .paywall-list + p { display: none; }   /* тот же состав уже перечислен в карточке тарифа ниже */
}

/* ===== единая сетка страниц-инструментов: шапка, баннер и текст на одной оси ===== */
@media (min-width: 981px) {
  .palm-redesign main.tool > .wrap:first-child,
  .ritual-redesign main.tool > .wrap:first-child { align-items: start; padding: 40px 0 36px; gap: 48px; }
  .palm-redesign main.tool > .wrap:not(:first-child),
  .ritual-redesign main.tool > .wrap:not(:first-child) { width: calc(100% - 64px); max-width: 1200px; padding-inline: 0; }
  .palm-redesign .so-strip, .ritual-redesign .so-strip { max-width: none; margin: 8px 0 18px; }
  .palm-redesign .content, .ritual-redesign .content { max-width: 800px; margin-inline: auto; }
}
@media (min-width: 981px) {
  .palm-redesign .tool-illus, .ritual-redesign .tool-illus { aspect-ratio: 16 / 8.2; margin-bottom: 20px; }
  .palm-redesign .tool-head h1, .ritual-redesign .tool-head h1 { font-size: clamp(2.8rem, 4.4vw, 4.2rem); }
}

/* ===== без «прыжков»: места под то, что дорисовывает скрипт, резервируем заранее ===== */
#site-top:empty { min-height: 72px; }
#site-bottom:empty { min-height: 600px; }
[data-sub-offer][data-variant="strip"]:empty { min-height: 150px; }
@media (max-width: 700px) {
  #site-top:empty { min-height: 60px; }
  #site-bottom:empty { min-height: 900px; }
  [data-sub-offer][data-variant="strip"]:empty { min-height: 330px; }
}
/* на странице «Карта личности» текст лежит в той же сетке, что и форма — растягиваем на всю ширину */
.ritual-redesign main.tool > .wrap:first-child > .content,
.palm-redesign main.tool > .wrap:first-child > .content { grid-column: 1 / -1; width: 100%; max-width: 800px; margin-inline: auto; }

/* Таро: три карты расклада на телефоне — в один ряд, а не две и одна ниже */
@media (max-width: 560px) {
  .spread:has(.tcard:nth-child(3)) { gap: 10px; flex-wrap: nowrap; }
  .spread:has(.tcard:nth-child(3)) .tcard { width: calc((100% - 20px) / 3); max-width: 150px; flex: 0 0 auto; }
  .spread:has(.tcard:nth-child(3)) .tcard-label { font-size: .95rem; min-height: 0; }
}

/* планшет: три карточки «Читайте также» в ряд, а не две и одна ниже */
@media (min-width: 621px) and (max-width: 1000px) {
  .article-grid.related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Тарифы 24.10.2026: подписка «Мистик» (главная), разовые гадания по 399 ₽, разбор по руке ===== */
.tfs {
  --text: #fff; --muted: #cbdbef; --muted-2: #a7bcd6; --w: 255,255,255;
  --border-2: rgba(255,255,255,.28); --card: rgba(255,255,255,.07); --gold: #e8d3a0; --gold-soft: #f0e2bd;
  background: linear-gradient(160deg, #13223f, #1c3566); color: #dae4f5; border: 1px solid #b08a4a;
  border-radius: 26px; padding: 30px 26px 24px; text-align: center; box-shadow: 0 40px 70px -36px rgba(28,53,102,.8);
}
.tfs-kick { display: inline-block; padding: 4px 14px; border: 1px solid rgba(232,211,160,.6); border-radius: 999px; color: #e8d3a0; font-size: .85rem; letter-spacing: .03em; }
.tfs h2 { font-family: var(--serif); font-size: 2.2rem; line-height: 1.15; margin: 14px 0 10px; color: #fff; }
.tfs-lead { max-width: 600px; margin: 0 auto 22px; color: #dae4f5; font-size: 1.04rem; line-height: 1.6; }
.tfs-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 560px; margin: 0 auto 20px; }
.tfs-plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 16px 16px; border: 1px solid rgba(255,255,255,.28); border-radius: 18px; background: rgba(255,255,255,.07); }
.tfs-plan-3 { border-color: #e8d3a0; background: rgba(232,211,160,.12); }
.tfs-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: #e8d3a0; color: #13223f; font: 700 .7rem var(--sans); padding: 3px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tfs-name { color: #fff; font-weight: 600; font-size: 1.05rem; }
.tfs-price { font: 700 2.3rem/1.1 var(--serif); color: #fff; }
.tfs-note { color: #a7bcd6; font-size: .84rem; margin-bottom: 10px; }
.tfs-plan .btn { width: 100%; padding-left: 10px; padding-right: 10px; white-space: normal; line-height: 1.25; justify-content: center; text-align: center; background: #f7f1e8; background-image: none; color: #13223f; border: 0; box-shadow: none; }
.tfs-plan .btn:hover { background: #fff; }
.tfs-list { list-style: none; max-width: 600px; margin: 0 auto; padding: 0; display: grid; gap: 8px; text-align: left; }
.tfs-list li { position: relative; padding-left: 26px; color: #dae4f5; font-size: .95rem; line-height: 1.45; }
.tfs-list li b { color: #fff; }
.tfs-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #9be3b7; font-weight: 700; }
.tfs-list li.no { color: #a7bcd6; }
.tfs-list li.no::before { content: "–"; color: #a7bcd6; }
.tfs-fine { max-width: 600px; margin: 16px auto 0; color: #a7bcd6; font-size: .82rem; line-height: 1.5; }
.tfo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; margin-top: 16px; }
.tfo { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px 14px; border: 1px solid var(--border-2); border-radius: 16px; background: var(--card); text-align: center; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.tfo:hover { border-color: var(--gold); transform: translateY(-2px); }
.tfo-ic { font-size: 1.7rem; line-height: 1; }
.tfo b { font-size: 1rem; color: var(--text); }
.tfo-price { font: 700 1.5rem/1.1 var(--serif); color: var(--gold-soft); }
.tfo-btn { display: block; width: 100%; margin-top: 6px; padding: 9px 10px; border-radius: 999px; background: #13223f; color: #fff; font-weight: 600; font-size: .9rem; }
.tfo small { color: var(--muted-2); font-size: .74rem; line-height: 1.35; margin-top: 4px; }
.tfp { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center; padding: 24px 22px; border: 1px solid var(--gold); border-radius: 20px; background: linear-gradient(180deg, rgba(176,138,74,.10), transparent 70%), var(--card); }
.tfp-kick { color: var(--gold); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.tfp h2 { font-family: var(--serif); font-size: 1.6rem; margin: 6px 0 8px; color: var(--text); text-align: left; }
.tfp p { margin: 0 0 8px; color: var(--muted); line-height: 1.55; font-size: .94rem; }
.tfp .tfp-fine { color: var(--muted-2); font-size: .82rem; margin: 0; }
.tfp-buy { display: grid; gap: 10px; }
.tfp-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--bg, #fff); }
.tfp-price b { font: 700 1.45rem/1 var(--serif); color: var(--gold-soft); white-space: nowrap; }
.tfp-price span { color: var(--muted); font-size: .86rem; text-align: right; }
.tfp-buy .btn { width: 100%; justify-content: center; text-align: center; }
@media (max-width: 700px) {
  .tfs { padding: 24px 16px 20px; border-radius: 22px; }
  .tfs h2 { font-size: 1.75rem; }
  .tfs-lead { font-size: .96rem; }
  .tfs-plans { gap: 10px; }
  .tfs-plan { padding: 18px 10px 12px; }
  .tfs-price { font-size: 1.9rem; }
  .tfo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tfo:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tfo-btn { font-size: .8rem; padding: 8px 4px; white-space: nowrap; }
  .tfp { grid-template-columns: 1fr; padding: 20px 16px; }
}
@media (max-width: 360px) { .tfs-plans { grid-template-columns: 1fr; } }

/* пейволл гадания: «Погадать за 399 ₽» + мелко подписка */
.tariff-single .tariff-name { font-size: 1.05rem; }
.tariff-sub-alt { margin: 10px 0 0; text-align: center; }
.paywall-sub-link { background: none; border: 0; padding: 4px 6px; color: #cdddf6; font: inherit; font-size: .84rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.paywall-sub-link:hover { color: #fff; }
.paywall-sub-link:disabled { opacity: .7; cursor: default; }

/* после результата разового гадания — приглашение в подписку */
.sub-upsell { margin: 18px 0 6px; padding: 20px 18px; border-radius: 20px; text-align: center; background: linear-gradient(160deg, #13223f, #1c3566); color: #dae4f5; border: 1px solid #b08a4a; }
.sub-upsell b { display: block; color: #fff; font-size: 1.08rem; margin-bottom: 6px; }
.sub-upsell p { margin: 0 0 14px; color: #cbdbef; font-size: .92rem; line-height: 1.5; }
.sub-upsell .btn { background: #f7f1e8; background-image: none; color: #13223f; border: 0; box-shadow: none; }
.sub-upsell small { display: block; margin-top: 8px; color: #a7bcd6; font-size: .8rem; }

/* кабинет, вкладка «Доступ»: акцент подписки и две кнопки — месяц и 3 месяца (24.10.2026) */
.ac-accent { margin: 4px 0 12px; color: var(--muted); font-size: .92rem; line-height: 1.55; }
#subBuy3Btn { max-width: 340px; }
.ac-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-btns .btn { flex: 1 1 200px; justify-content: center; }
