/* ============================================================
   Лунесса · фиолетово-лунная палитра + звёздное небо.
   Стиль: тёмная магия, liquid glass, плавные анимации.
============================================================ */

:root {
  --night:        #070414;
  --night-2:      #0E0824;
  --deep-purple:  #1E1238;
  --card-purple:  #4C1D95;   /* Plum — глубокий, основной surface */
  --plum:         #4C1D95;
  --amethyst:     #6D28D9;
  --violet:       #8B5CF6;   /* основной акцент */
  --orchid:       #C084FC;   /* светлый акцент */
  --lilac:        #8B5CF6;
  --lilac-soft:   #C084FC;
  --magenta:      #E879F9;   /* для glow / highlight */
  --pink-glow:    #E879F9;
  --pink-soft:    #F9A8D4;
  --milk-pink:    #FCE7F3;
  --moon-silver:  #F0E6FF;
  --soft:         #C9BDE2;
  --gold:         #E6C58A;
  --error:        #E36F8C;
  --success:      #97E2C0;

  --glass-bg:        rgba(255,255,255,.06);
  --glass-bg-strong: rgba(255,255,255,.10);
  --glass-border:    rgba(255,255,255,.14);
  --glass-shadow:    0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.18);

  /* Берём максимум из CSS env() и Telegram safeAreaInset (для fullscreen API),
     плюс минимум 8px, чтобы content никогда не клеился к самому краю. */
  --safe-top: max(8px, env(safe-area-inset-top, 0px), var(--tg-safe-top, 0px), var(--tg-content-top, 0px));
  --safe-bot: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-bot, 0px));

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 32px;
  --r-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--night);
  color: var(--moon-silver);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
  overflow: hidden;
}
/* Когда mini-app свёрнут (в фоне webview жив) — паузим все анимации.
   Экономит GPU/battery, на дизайн не влияет (видно когда возвращаешься). */
html.app-paused *,
html.app-paused *::before,
html.app-paused *::after {
  animation-play-state: paused !important;
}
/* Root не скроллится: прокрутка живёт внутри .main, чтобы нижняя панель
   не участвовала в resize/repaint document viewport на iOS/Android WebView. */
html { overflow-x: clip; overflow-x: hidden; }
html { overscroll-behavior-y: none; }

body {
  background:
    radial-gradient(ellipse 80% 55% at 50% -12%, rgba(143,100,216,.32), transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 110%, rgba(212,106,191,.22), transparent 60%),
    linear-gradient(180deg, #07041A 0%, #050211 100%);
  min-height: 100vh;
  min-height: 100svh;
}

button {
  font: inherit; color: inherit;
  background: transparent; border: 0; cursor: pointer;
}
input, textarea, select { font: inherit; color: inherit; }

.hidden { display: none !important; }

h1, h2, h3, .serif {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600; letter-spacing: .01em;
  color: var(--moon-silver);
}
h1 { font-size: 34px; line-height: 1.12; margin: 0 0 8px; }
h2 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
h3 { font-size: 21px; line-height: 1.25; margin: 0 0 6px; }
.lead { font-size: 16px; color: var(--soft); line-height: 1.5; }
.small { font-size: 13px; color: var(--soft); }

/* ============================================================
   STARFIELD
   Тонкий слой "крыша Rolls-Royce": статичные точки +
   мягко мерцающие звёзды + далёкие туманности.
   Сделано CSS-only через radial-gradient точки.
============================================================ */

.sky {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
/* Один статичный SVG-фон: туманности + звёзды нарисованы внутри svg.
   Никаких CSS-animations / filter blur. Браузер растрирует один раз. */
.sky-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Кометы — яркая голова + тающий цветной хвост, разные углы и цвета. */
.shooting-star {
  position: absolute;
  width: 180px; height: 2px;
  border-radius: 999px;
  opacity: 0;
  transform-origin: right center;
  pointer-events: none;
}
.shooting-star::before {
  content: '';
  position: absolute;
  right: -5px; top: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,250,235,1);
  box-shadow:
    0 0 16px rgba(255,250,230,1),
    0 0 32px rgba(255,236,180,.9),
    0 0 56px rgba(255,210,140,.65);
}

/* Каждая комета — своя траектория в пикселях, угол rotate точно равен
   arctan(dy/dx) траектории, тогда хвост чётко лежит вдоль направления полёта. */

/* Звезда 1 — пологая, верхняя треть. dx=1200, dy=240 → atan(.2)=11.3° */
.shooting-star-1 {
  top: 14%; left: 0;
  background: linear-gradient(to right,
    transparent 0,
    rgba(255,220,150,.5) 40%,
    rgba(255,235,180,.9) 75%,
    rgba(255,250,230,1) 100%);
  filter: drop-shadow(0 0 6px rgba(255,220,150,.95));
  animation: shoot1 7s ease-in infinite;
  animation-delay: 0.5s;
}
@keyframes shoot1 {
  /* dx=900, dy=550 → atan(.61)=31° */
  0%   { transform: translate(-300px, -200px) rotate(31deg); opacity: 0; }
  6%   { opacity: 1; }
  20%  { opacity: 1; }
  28%  { transform: translate(600px, 350px) rotate(31deg); opacity: 0; }
  100% { transform: translate(600px, 350px) rotate(31deg); opacity: 0; }
}

/* Звезда 2 — короткая, верх-средне, круче. dx=1100, dy=440 → atan(.4)=21.8° */
.shooting-star-2 {
  top: 32%; left: 0;
  width: 130px;
  background: linear-gradient(to right,
    transparent 0,
    rgba(255,210,140,.55) 45%,
    rgba(255,235,180,.95) 85%,
    rgba(255,250,230,1) 100%);
  filter: drop-shadow(0 0 6px rgba(255,210,140,.95));
  animation: shoot2 9s ease-in infinite;
  animation-delay: 3s;
}
@keyframes shoot2 {
  /* dx=800, dy=680 → atan(.85)=40° */
  0%   { transform: translate(-300px, -250px) rotate(40deg); opacity: 0; }
  6%   { opacity: 1; }
  20%  { opacity: 1; }
  28%  { transform: translate(500px, 430px) rotate(40deg); opacity: 0; }
  100% { transform: translate(500px, 430px) rotate(40deg); opacity: 0; }
}

/* Звезда 3 — длинная, средне-низ, средний угол. */
.shooting-star-3 {
  top: 50%; left: 0;
  width: 220px;
  background: linear-gradient(to right,
    transparent 0,
    rgba(255,225,160,.45) 35%,
    rgba(255,240,190,.9) 80%,
    rgba(255,250,230,1) 100%);
  filter: drop-shadow(0 0 6px rgba(255,220,150,.9));
  animation: shoot3 8s ease-in infinite;
  animation-delay: 5s;
}
@keyframes shoot3 {
  /* dx=900, dy=620 → atan(.69)=35° */
  0%   { transform: translate(-300px, -220px) rotate(35deg); opacity: 0; }
  6%   { opacity: 1; }
  20%  { opacity: 1; }
  28%  { transform: translate(600px, 400px) rotate(35deg); opacity: 0; }
  100% { transform: translate(600px, 400px) rotate(35deg); opacity: 0; }
}

/* Звезда 4 — самая большая, нижняя треть. dx=1400, dy=350 → atan(.25)=14° */
.shooting-star-4 {
  top: 72%; left: 0;
  width: 260px;
  background: linear-gradient(to right,
    transparent 0,
    rgba(255,200,130,.4) 30%,
    rgba(255,235,180,.9) 80%,
    rgba(255,250,230,1) 100%);
  filter: drop-shadow(0 0 6px rgba(255,210,140,.95));
  animation: shoot4 10s ease-in infinite;
  animation-delay: 7.5s;
}
@keyframes shoot4 {
  /* dx=850, dy=580 → atan(.68)=34° */
  0%   { transform: translate(-300px, -180px) rotate(34deg); opacity: 0; }
  6%   { opacity: 1; }
  20%  { opacity: 1; }
  28%  { transform: translate(550px, 400px) rotate(34deg); opacity: 0; }
  100% { transform: translate(550px, 400px) rotate(34deg); opacity: 0; }
}

/* Системная настройка «уменьшить движение» — отключает декорацию */
@media (prefers-reduced-motion: reduce) {
  .shooting-star, .nav-highlight { animation: none !important; }
  .shooting-star { opacity: 0; }
}

/* ============================================================
   SPLASH
============================================================ */

.splash {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: radial-gradient(circle at 50% 45%, #1A0F2C 0%, #050211 60%, #050211 100%);
  z-index: 9999;
  animation: splashOut 1.2s ease 1.4s forwards;
}
.splash-svg, .splash-logo {
  width: 220px; height: 220px;
  object-fit: contain;
  animation: splashIn 1.2s ease both;
}
/* SVG-лого с прозрачным фоном — без квадрата, без blend hacks. */
.splash-title {
  margin-top: 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 36px; letter-spacing: .12em;
  color: var(--moon-silver);
  text-shadow: 0 0 22px rgba(192,132,252,.55);
  animation: splashIn 1.4s ease .25s both;
}
@keyframes splashIn { from { opacity: 0; transform: scale(.92);} to { opacity:1; transform:scale(1);} }
@keyframes splashOut { to { opacity: 0; visibility: hidden;} }

/* ============================================================
   APP SHELL
============================================================ */

.app {
  position: fixed;
  inset: 0;
  z-index: 1;
  height: 100vh;
  height: 100svh;
  height: var(--tg-vh, 100svh);
  min-height: 0;
  display: flex; flex-direction: column;
  /* safe-top уже в .topbar (через top: var(--safe-top)), не дублируем — иначе hero card опять отодвинется. */
  padding-bottom: 0;
}

.topbar {
  position: absolute;
  top: var(--safe-top); left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 4px 14px;
  background: transparent;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-back {
  width: auto;
  height: 26px;
  padding: 0 11px 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--moon-silver);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .2s, transform .12s;
  margin-top: 51px; /* чтобы не перекрывалась Telegram-овской "Close" сверху */
  margin-left: 2px;
  font: inherit;
  cursor: pointer;
}
.topbar-back svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}
.topbar-back-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--moon-silver);
  line-height: 1;
}
.topbar-back:active { transform: scale(.96); }
.topbar-back:hover { background: rgba(255, 255, 255, 0.18); }
.topbar-title {
  /* Optical wordmark correction: the PNG's visible weight leans left at this size. */
  --topbar-wordmark-x: 3px;
  position: absolute;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  top: 4px;
  z-index: 1;
  margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  pointer-events: none !important;
  /* текст смещён вниз на 1px внутри острова */
  padding: 6px 20px 4px;
  border-radius: 999px;
  background: transparent;
  color: var(--moon-silver);
}
.topbar-title::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(170,120,235,.30);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: none;
  z-index: 0;
  pointer-events: none;
}
.topbar-wordmark {
  position: relative;
  z-index: 1;
  height: 30px;
  width: auto;
  pointer-events: none;
  transform: translateX(var(--topbar-wordmark-x));
  object-fit: contain;
  display: block;
}
.topbar-spacer { width: 64px; margin-top: 51px; }

.main {
  flex: 1 1 auto;
  min-height: 0;
  /* padding-top достаточный, чтобы контент не залезал под верхний blur. */
  padding: calc(86px + var(--safe-top)) 18px calc(132px + var(--safe-bot));
  max-width: 760px; width: 100%;
  margin: 0 auto;
  position: relative; /* для абсолютно позиционированного snapshot во время slide */
  overflow-y: auto;
  overflow-x: clip;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.page { width: 100%; }

/* ============================================================
   STAGGERED PAGE APPEAR.
   Мгновенный swap страницы (без view-transition snapshot — он ломал
   backdrop-filter на Android). Контент новой страницы появляется с
   красивым stagger-эффектом: дочерние блоки въезжают по очереди.
============================================================ */
/* Только transform — opacity убран чтобы parent <section> не становился
   backdrop-root (это ломало backdrop-filter на дочерних .tile в Android). */
@keyframes pageItemIn {
  from { transform: translateY(10px); }
  to   { transform: translateY(0); }
}
/* Каждый прямой ребёнок .page получает stagger-анимацию.
   Длительность короткая, задержка маленькая — суммарно ≤220мс. */
.page > * {
  animation: pageItemIn 260ms cubic-bezier(.22, 1, .36, 1) both;
}
.page > *:nth-child(1) { animation-delay:   0ms; }
.page > *:nth-child(2) { animation-delay:  35ms; }
.page > *:nth-child(3) { animation-delay:  70ms; }
.page > *:nth-child(4) { animation-delay: 100ms; }
.page > *:nth-child(5) { animation-delay: 130ms; }
.page > *:nth-child(6) { animation-delay: 155ms; }
.page > *:nth-child(n+7) { animation-delay: 180ms; }

/* ============================================================
   BOTTOM NAV — Liquid Glass
   Две капсулы: главная (4 кнопки) + профиль (1 кнопка)
============================================================ */

/* ----- bottom nav ----- */
.bottombar {
  position: absolute; left: 0; right: 0;
  bottom: calc(8px + var(--safe-bot));
  display: flex; justify-content: center; align-items: center;
  gap: 10px;
  padding: 0 12px;
  z-index: 60;
  /* НЕ задаём contain/transform/will-change на bottombar — иначе создаётся
     paint context и backdrop-filter на .nav-pill ломается. */
}
/* Blur-слой СВЕРХУ — симметричный nav-bg снизу. Плавно растворяется вниз. */
.top-bg {
  position: fixed;
  left: 0; right: 0; top: 0;
  height: calc(85px + var(--safe-top));
  pointer-events: none;
  z-index: 40;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.8) 35%, rgba(0,0,0,.4) 65%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.8) 35%, rgba(0,0,0,.4) 65%, transparent 100%);
}

/* Blur-слой под навигацией — плавный переход из размытия в нормальный фон. */
.nav-bg {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(140px + var(--safe-bot));
  pointer-events: none;
  z-index: 55;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* Плавная маска: внизу полный blur, плавное растворение вверх. */
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.8) 35%, rgba(0,0,0,.4) 65%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.8) 35%, rgba(0,0,0,.4) 65%, transparent 100%);
}
.nav-pill {
  display: flex; align-items: center;
  padding: 7px;
  border-radius: var(--r-pill);
  background: rgba(70,50,110,.30);
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  isolation: isolate;
}
/* Android: backdrop-filter в Telegram WebView не работает стабильно — даём
   плотный фон-фолбэк, чтобы пилюля выглядела как тёмное стекло, а не как
   полупрозрачный овал с просвечивающим контентом. */
html.is-android .nav-pill,
html.is-android .nav-bg {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: backdrop-filter;
}

/* Откатил статичный SVG trick — был псевдо-фон, не настоящий blur. */

/* Android: НЕТ переопределений на .tile/.list-item/.btn-ghost — они используют
   ту же формулу что и .phrase (которая блюрит на Android), и blur работает. */
/* Фолбэк: если backdrop-filter полностью не поддерживается (старые WebView) —
   делаем фон достаточно плотным, чтобы не было «голой полупрозрачности». */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-pill { background: rgba(20,12,38,.86); }
}
.nav-pill-main {
  gap: 4px;
  padding: 7px 14px;
  width: min(288px, calc(100vw - 92px));
  min-width: 0;
  justify-content: space-between;
  position: relative;
}
/* Плавающая подсветка активной кнопки внутри nav-pill-main.
   Позицию/ширину выставляет JS через transform и width; CSS-transition даёт плавное перетекание. */
.nav-highlight {
  position: absolute;
  /* containing-block для absolute = padding-box pill (включая padding!).
     pill padding 7px top/bot → top:7 bottom:7 → height = btn-area height (44px).
     Highlight ровно по кнопке, не вылезает за округлые края pill. */
  top: 7px; bottom: 7px;
  left: 0;
  width: 50px;
  border-radius: var(--r-pill);
  background: radial-gradient(ellipse at 50% 50%, rgba(192,132,252,.55), rgba(139,92,246,.22) 65%, transparent 90%);
  transform: translate3d(0,0,0);
  transition: transform .42s cubic-bezier(.32, 1.02, .42, 1), width .42s cubic-bezier(.32, 1.02, .42, 1), opacity .2s;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
.nav-highlight.is-visible { opacity: 1; }
.nav-pill-main .nav-btn { position: relative; z-index: 1; }
.nav-pill-profile { padding: 7px; }
.nav-btn {
  position: relative;
  min-width: 0;
  width: 56px; height: 52px;
  flex: 0 0 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  border-radius: var(--r-pill);
  color: rgba(240,230,255,.78);
  transition: color .1s, background .12s, transform .08s;
  padding: 4px 6px 3px;
}
.nav-pill-main .nav-btn {
  flex: 1 1 0;
  width: auto;
  min-width: 50px;
}
.nav-btn svg {
  width: 28px; height: 28px;
  flex-shrink: 0;
  stroke-width: 1.7;
}
.nav-label {
  font-size: 9px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  color: inherit;
  opacity: .85;
}
.nav-btn:active { transform: scale(.94); }
.nav-btn:hover { color: var(--moon-silver); }
/* Активная кнопка: только цвет/glow, никаких изменений размера —
   иначе flex даёт ей всё свободное место и кнопки в pill съезжают. */
.nav-btn.active {
  color: var(--moon-silver);
  border-radius: var(--r-pill);
}
.nav-btn.active svg { filter: drop-shadow(0 0 8px rgba(232,121,249,.85)); }
/* Анимированная подсветка profile-кнопки. ::before — отдельный слой с
   radial-gradient, который плавно появляется + scale-pop с overshoot. */
/* Профиль — квадратная капсула, круг по border-radius pill. */
.nav-pill-profile {
  padding: 7px;
  width: 66px;
  height: 66px;
  box-sizing: border-box;
}
.nav-pill-profile .nav-btn {
  width: 52px;
  min-width: 52px;
  height: 52px;
  flex: 0 0 52px;
  position: relative;
}
.nav-pill-profile .nav-btn::before {
  content: '';
  position: absolute;
  /* -7px компенсируют padding пилюли, подсветка заполняет всю капсулу — параллельно её форме */
  inset: -7px;
  border-radius: var(--r-pill);
  background: radial-gradient(ellipse at 50% 50%, rgba(192,132,252,.65), rgba(139,92,246,.30) 60%, transparent 90%);
  opacity: 0;
  transform: scale(.78);
  transition:
    opacity .26s ease,
    transform .38s cubic-bezier(.32, 1.18, .42, 1);
  pointer-events: none;
  z-index: -1;
}
.nav-pill-profile .nav-btn.active::before {
  opacity: 1;
  transform: scale(1);
}

/* ============================================================
   HERO
============================================================ */

.hero {
  position: relative;
  border-radius: var(--r-xl);
  padding: 30px 24px 28px;
  margin-bottom: 22px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 8%, rgba(192,132,252,.22), transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(139,92,246,.15), transparent 65%),
    linear-gradient(160deg, rgba(36,17,61,.38) 0%, rgba(13,8,32,.40) 100%);
  box-shadow: 0 14px 40px rgba(139,92,246,.08);
  /* backdrop-filter убран: hero был backdrop-root, что блокировало blur у
     дочерней .btn-ghost внутри неё. */
}
.hero::before {
  /* Internal glass backdrop layer — applies blur without making .hero
     a backdrop-filter root (which would kill nested .btn-ghost blur). */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: none;
  z-index: 0;
  pointer-events: none;
}
.hero-moon {
  position: absolute;
  right: -34px; top: -28px;
  width: 200px; height: 200px;
  pointer-events: none;
  opacity: .9;
  filter: drop-shadow(0 0 30px rgba(192,132,252,.35));
}
.hero h1 { position: relative; }
.hero .lead { position: relative; max-width: 80%; }
.hero-cta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 42px; width: 100%; position: relative; }
.hero-cta .btn { width: 100%; min-width: 0; padding-left: 16px; padding-right: 16px; white-space: nowrap; }

/* ============================================================
   BUTTONS
============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 16px;
  letter-spacing: .02em;
  transition: transform .08s ease, box-shadow .15s ease, background .15s;
  position: relative;
  overflow: hidden;
}
/* старый skeumorphic блик удалён — frosted glass лук этого не любит */
.btn:active { transform: translateY(1px) scale(.985); }

.btn-primary {
  /* Космический градиент — аметист → фиолет → орхид */
  background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 50%, #C084FC 100%);
  color: #fff;
  box-shadow: none;
  text-shadow: none;
}
@media (hover: hover) { .btn-primary:hover { box-shadow: none; } }

.btn-ghost {
  background: linear-gradient(180deg, rgba(80,55,130,.50), rgba(60,40,100,.50));
  color: var(--moon-silver);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (hover: hover) { .btn-ghost:hover { background: rgba(80,55,130,.65); } }
/* Android: без override */

.btn-gold {
  background: linear-gradient(135deg, #E6C58A 0%, #D46ABF 110%);
  color: #1A0F2C;
  box-shadow: 0 14px 32px rgba(230,197,138,.35);
}
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 11px 18px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ============================================================
   SECTIONS, PHRASE
============================================================ */

.section { margin-bottom: 26px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; padding: 0 16px; }
.section-title h2 { margin: 0; }
.section-title .small { color: var(--soft); }

.phrase {
  font-family: 'Inter', system-ui, sans-serif;
  font-style: italic;
  font-size: 20px; line-height: 1.45;
  color: var(--moon-silver);
  padding: 20px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(50,30,82,.45), rgba(34,20,52,.45));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 22px;
  position: relative;
}
.phrase::before {
  content: '✦';
  position: absolute; right: 18px; top: 14px;
  color: rgba(232,121,249,.7);
  text-shadow: 0 0 10px rgba(232,121,249,.6);
  font-size: 14px;
}

/* ============================================================
   TILES (темы / расклады)
============================================================ */

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tile {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 32px;
  /* iOS-стиль: едва заметная фиолетовая плёнка на blur, минимум контраста. */
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
  transition: background .15s;
  min-height: 122px;
  display: flex; flex-direction: column; justify-content: space-between;
}
/* Android: НЕ переопределяем фон — пусть blur пытается работать. */
.tile-icon { border-radius: 14px; }
@media (hover: hover) {
  .tile:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.10);
  }
}
.tile:active { background: rgba(255,255,255,.05); }
.tile-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; margin-bottom: 8px;
  text-align: center;
}
.tile-icon {
  width: auto; height: auto;
  display: grid; place-items: center;
  background: transparent;
  color: var(--pink-soft);
  flex-shrink: 0;
  box-shadow: none;
  font-size: 28px; font-weight: 500;
  margin-bottom: 8px;
}
.tile-icon svg {
  width: 42px; height: 42px; display: block;
  stroke-width: 1.6;
}
.tile-name { font-family: 'Inter', system-ui, sans-serif; font-size: 22px; line-height: 1.1; color: var(--moon-silver); }
.tile-desc { font-size: 13px; color: var(--soft); line-height: 1.4; text-align: center; }
.tile-meta { margin-top: 10px; font-size: 12px; color: var(--soft); }
.tile-price {
  color: #9CFF3A;
  font-weight: 400;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: -.01em;
}
.tile-price.free { color: #FFD93D; font-weight: 600; }
/* "Подписка" — светлый cyan/teal sub-label на quick_sign / three_cards, пока подписки нет. */
.tile-price.sub { color: #67E8F9; font-weight: 700; }
/* Цена внутри плитки — по центру (плитка узкая, бесплатно/сумма читается на оси).
   В .list-item цена остаётся справа (flex space-between делает своё). */
.tile .tile-price { text-align: center; width: 100%; }
/* Золотой glow на платных тайлах убран. */

/* ----- Карта дня: hero-плитка span 2 колонки + locked-состояние ----- */
.tile.spread-card-of-day {
  grid-column: span 2;
  min-height: 142px;
}
.tile.spread-card-of-day .tile-name { font-size: 26px; }
/* Под locked-оверлей плитку нужно сделать relative-якорем для absolute-оверлея.
   Хотя у .tile уже position: relative — оставим для ясности. */
.tile.locked {
  position: relative;
  overflow: hidden;
  cursor: not-allowed;
}
.tile-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  z-index: 2;
  /* Клики проходят на саму плитку — обработчик ругается тостом. */
  pointer-events: none;
}
.tile-lock-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: #fff;
}
.tile-lock-icon svg {
  width: 36px; height: 36px;
  display: block;
}
.tile-lock-text {
  font-size: 13px;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: .01em;
  text-align: center;
}
.tile-lock-text .cod-countdown {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-left: 4px;
}
/* Sub-locked плитки (quick_sign / three_cards) — выглядят чуть приглушённо,
   но без оверлея: на них тычут пальцем и получают тост о подписке. */
.tile.tile-sub-locked { /* визуально такие же, но клик не открывает flow */ }

/* ============================================================
   LIST
============================================================ */

.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px;
  border-radius: 28px;
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
  transition: background .15s;
  cursor: pointer;
}
/* Android: см. выше — без override */
@media (hover: hover) {
  .list-item:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.10);
  }
}
.list-item .text { flex: 1; }
.list-item .meta { font-size: 12px; color: var(--soft); margin-top: 4px; }
.list-item .arr { color: var(--lilac-soft); font-size: 22px; line-height: 1; }

/* ============================================================
   GENDER TOGGLE
============================================================ */

.gender-toggle {
  display: inline-flex;
  border-radius: var(--r-pill);
  padding: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 16px;
  gap: 2px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.gender-toggle button {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  color: var(--soft);
  font-size: 13px;
  transition: background .25s, color .25s;
}
.gender-toggle button.active {
  background: linear-gradient(135deg, #A47FE6, #D46ABF);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(192,132,252,.4);
}

/* ============================================================
   CONFIRM
============================================================ */

.confirm-card {
  border-radius: 30px;
  padding: 24px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
              linear-gradient(180deg, rgba(36,17,61,.78), rgba(15,8,28,.82));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 50px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1);
  margin-bottom: 18px;
}
.price-row { display: flex; align-items: baseline; justify-content: center; margin-top: 14px; }
.price-row .price {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 36px;
  font-weight: 300;
  color: #9CFF3A;
  letter-spacing: -.02em;
}
.price-row.free .price { color: #FFD93D; font-weight: 500; }

.support-input,
.support-textarea {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  background: rgba(255,255,255,.07);
  border: none;
  color: var(--moon-silver);
  padding: 13px 16px;
  border-radius: var(--r-sm);
  outline: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .2s, box-shadow .2s;
}
select.support-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.45)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.support-input:focus,
.support-textarea:focus {
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(192,132,252,.15);
}

/* ============================================================
   GENERATION — карты вылетают из стопки + переворачиваются
============================================================ */

.gen-stage {
  position: relative;
  min-height: 460px;
  padding: 40px 8px 18px;
  display: flex; flex-direction: column; align-items: center;
}
.gen-canvas {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 320px;
}
.gen-card {
  /* Каждая карта переезжает к своей финальной позиции через CSS-переменные.
     Размер соответствует viewBox рубашки 100×175 (стандарт таро). */
  position: absolute;
  left: 50%; top: 50%;
  width: 96px; height: 168px;
  margin-left: -48px; margin-top: -84px;
  border-radius: 14px;
  transform-style: preserve-3d;
  perspective: 900px;
  transform: translate3d(var(--dx, 0), var(--dy, 0), 0) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  transition:
    transform 900ms cubic-bezier(.5,.05,.2,1),
    filter   400ms ease;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,.55));
  z-index: var(--z, 1);
}
.gen-card { transition: transform 550ms cubic-bezier(.5,.05,.2,1), filter 300ms ease; }
.gen-card.in-deck {
  --dx: 0px; --dy: 0px; --rot: var(--deck-rot, 0deg); --scale: 1;
}
.gen-card.flying {
  --dx: var(--tx); --dy: var(--ty); --rot: var(--tr, 0deg); --scale: 1;
}
.gen-card-inner {
  position: relative;
  width: 100%; height: 100%;
  /* Чуть медленнее и плавнее — карта «оживает» при перевороте */
  transition: transform 780ms cubic-bezier(.65, .02, .25, 1);
  transform-style: preserve-3d;
}
/* Магическая вспышка свечения во время переворота */
@keyframes gen-flip-glow {
  0%   { filter: drop-shadow(0 16px 30px rgba(0,0,0,.55)); }
  35%  { filter: drop-shadow(0 0 18px rgba(232,121,249,.55)) drop-shadow(0 0 32px rgba(192,132,252,.35)) drop-shadow(0 16px 30px rgba(0,0,0,.55)); }
  65%  { filter: drop-shadow(0 0 22px rgba(232,121,249,.7))  drop-shadow(0 0 40px rgba(192,132,252,.45)) drop-shadow(0 16px 30px rgba(0,0,0,.55)); }
  100% { filter: drop-shadow(0 16px 30px rgba(0,0,0,.55)); }
}
.gen-card.flipped { animation: gen-flip-glow 780ms ease-out; }
.gen-card.flipped .gen-card-inner { transform: rotateY(180deg); }
.gen-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
  background: #160B26;
  display: grid; place-items: center;
}
.gen-face.front { transform: rotateY(180deg); padding: 10px; text-align: center; }
.gen-face.front .name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px; color: var(--moon-silver);
  text-shadow: 0 0 12px rgba(232,121,249,.45);
}
.gen-face.front.reversed { transform: rotateY(180deg) rotate(180deg); }
.gen-face .back-svg { width: 100%; height: 100%; display: block; object-fit: cover; }

.gen-deck-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 200px; height: 200px; margin: -100px 0 0 -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,132,252,.35), transparent 60%);
  filter: blur(20px);
  animation: deckPulse 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes deckPulse { 0%,100% { opacity: .55; transform: scale(.95);} 50% { opacity: 1; transform: scale(1.05);} }

.gen-meta {
  text-align: center;
  margin-top: 24px;
}
.gen-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 22px; letter-spacing: .04em;
  color: var(--moon-silver);
  text-shadow: 0 0 16px rgba(192,132,252,.4);
  margin-bottom: 6px;
}
.gen-sub { color: var(--soft); font-size: 13px; }
.gen-dots {
  display: inline-flex; gap: 6px; margin-top: 14px;
}
.gen-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(232,121,249,.45);
  animation: dotPulse 1.4s ease-in-out infinite;
}
.gen-dots span:nth-child(2) { animation-delay: .2s; }
.gen-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse { 0%,100% { transform: scale(.7); opacity: .45;} 50% { transform: scale(1.1); opacity: 1;} }

/* ============================================================
   RESULT
============================================================ */

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}
.r-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 10px 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(36,17,61,.55), rgba(15,8,28,.65));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 8px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}
.r-card .position-title {
  font-size: 11px;
  color: var(--soft);
  text-align: center;
  min-height: 30px;
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
  padding: 0 2px;
}
.r-card .name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.2;
  color: var(--moon-silver);
  text-align: center;
  word-break: break-word;
}
.r-card.reversed .reversed-badge {
  position: absolute; top: 6px; right: 6px;
  background: rgba(232,121,249,.18);
  border: 1px solid rgba(232,121,249,.4);
  color: var(--soft);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: .04em;
}
.card-front-svg, .card-back-svg { width: 100%; height: auto; aspect-ratio: 100/175; }

/* Полноразмерные изображения карт Райдер-Уэйт-Смит (1909, public domain). */
.card-front-img, .gen-face-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 100/175;
  border-radius: 14px;
}
.card-front-img.reversed, .gen-face-img.reversed { transform: rotate(180deg); }
/* На фронтальной грани с картинкой не нужен внутренний паддинг и текстовое центрирование. */
.gen-face.front:has(.gen-face-img) { padding: 0; }

.result-block {
  padding: 20px 20px;
  border-radius: 24px;
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 14px;
}
.result-block h3 { margin-top: 0; }
.result-block .label {
  font-size: 13px; letter-spacing: .14em;
  color: #F472B6;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.result-block p { margin: 0; line-height: 1.55; color: var(--moon-silver); }
.result-cards-detail .position-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.result-cards-detail .position-row:last-child { border-bottom: 0; }
.result-cards-detail .pname { color: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.result-cards-detail .cname { font-family: 'Inter', system-ui, sans-serif; font-size: 20px; color: var(--moon-silver); margin: 4px 0; }
.result-cards-detail .pmean { font-size: 15px; line-height: 1.55; color: var(--moon-silver); }

/* ============================================================
   EMPTY / TOAST / LOADER
============================================================ */

.empty {
  text-align: center;
  padding: 44px 16px;
  color: var(--soft);
}
.empty .moon { font-size: 38px; margin-bottom: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%);
  padding: 12px 20px;
  background: rgba(76, 29, 149, 0.20);
  border: none;
  border-radius: 16px;
  color: var(--moon-silver);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* .toast — единый glass-стиль без акцентных полосок (по запросу пользователя). */

.loader {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(139,92,246,.18);
  border-top-color: var(--pink-glow);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PAYMENT WAIT
============================================================ */

.pay-wait {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 40px 18px;
  text-align: center;
}
.pay-status {
  font-size: 14px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--soft);
}
.pay-status.success { background: rgba(151,226,192,.15); color: var(--success); border-color: rgba(151,226,192,.4); }
.pay-status.error { background: rgba(227,111,140,.16); color: var(--error); border-color: rgba(227,111,140,.45); }

/* ============================================================
   MISC
============================================================ */

.divider { height: 1px; background: rgba(255,255,255,.08); margin: 22px 0; }
.row-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

@media (min-width: 480px) {
  .tiles { grid-template-columns: 1fr 1fr 1fr; }
}

/* Hide bottom nav while soft keyboard is open (focus-driven; works in Telegram WebView).
   Используем большой запас по translate (300px) и display:none на finish,
   потому что translateY(160%) на коротком .bottombar (~60px) уезжает только на ~96px
   и часть кнопок остаётся видна над клавиатурой. Также блокируем оба html/body
   для надёжности — некоторые детекторы ставят класс на html, не на body. */
html.kb-open .bottombar,
html.kb-open .nav-bg,
body.kb-open .bottombar,
body.kb-open .nav-bg {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(0, 300px, 0) !important;
  /* will-change ставим ТОЛЬКО когда нав уезжает — иначе он на старте создаёт
     backdrop-root и ломает backdrop-filter на .nav-pill / .nav-bg (см. коммент
     у .bottombar выше: "НЕ задаём transform/will-change на bottombar"). */
  will-change: transform, opacity;
  transition: opacity 140ms ease, transform 200ms ease, visibility 0s linear 200ms;
}
/* Также убираем нижний padding контента — чтобы при открытой клавиатуре
   текст не упирался в пустое место там, где раньше была навигация. */
html.kb-open .main,
body.kb-open .main {
  padding-bottom: 12px !important;
}
/* Базовое состояние: ТОЛЬКО transition, без will-change и без transform.
   Любой transform (включая translate3d(0,0,0)) или will-change: transform
   создаёт backdrop-root и убивает backdrop-filter на .nav-pill / .nav-bg.
   Анимация slide-out при kb-open всё равно работает — браузер поднимает
   слой на лету, когда применяется transform. */
.bottombar,
.nav-bg {
  transition: opacity 140ms ease, transform 200ms ease, visibility 0s linear 0s;
}

/* ============================================================
   SUBSCRIPTION PAGE (Лунесса+)
   Hero с золото/violet градиентом, две карточки тарифов.
============================================================ */

.subscription-page-hero,
.sub-hero {
  position: relative;
  padding: 30px 22px 28px;
  border-radius: var(--r-xl);
  margin-bottom: 22px;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(230,197,138,.18), transparent 60%),
    linear-gradient(160deg, rgba(76,29,149,.55) 0%, rgba(212,106,191,.30) 60%, rgba(230,197,138,.25) 100%);
  border: 1px solid rgba(230,197,138,.30);
  box-shadow:
    0 22px 60px rgba(76,29,149,.45),
    inset 0 1px 0 rgba(255,255,255,.16);
  overflow: hidden;
  text-align: center;
}
.sub-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230,197,138,.45), transparent 65%);
  filter: blur(20px);
  pointer-events: none;
}
.sub-hero h1 {
  font-size: 38px;
  margin: 0 0 8px;
  letter-spacing: .01em;
  position: relative;
  /* Background/clip/transparent are set by the .subscription-page-hero h1, .sub-hero h1
     rule lower in the file (background-image + size + position + lava-flow animation).
     Using `background:` shorthand here was resetting background-size to auto, killing
     the lava-flow drift. */
}
.sub-hero .sub-tagline {
  color: var(--moon-silver);
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 18px;
  position: relative;
}
.sub-benefits {
  position: relative;
  text-align: left;
}
.sub-benefits ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sub-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--moon-silver);
  font-size: 14px;
  line-height: 1.4;
}
.sub-benefits li::before {
  content: '✓';
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #E6C58A, #D46ABF);
  color: #1A0F2C;
  font-weight: 700;
  font-size: 13px;
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
@media (min-width: 540px) {
  .plans-grid { grid-template-columns: 1fr 1fr; }
}
.plan-card,
.sub-plan-card {
  position: relative;
  padding: 22px 20px 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
              linear-gradient(180deg, rgba(36,17,61,.78), rgba(15,8,28,.82));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 40px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.10);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.plan-card.recommended {
  border-color: rgba(230,197,138,.55);
  background: linear-gradient(180deg, rgba(230,197,138,.10), rgba(212,106,191,.06)),
              linear-gradient(180deg, rgba(36,17,61,.85), rgba(15,8,28,.88));
  box-shadow:
    0 18px 50px rgba(230,197,138,.20),
    0 0 0 1px rgba(230,197,138,.30) inset,
    inset 0 1px 0 rgba(255,255,255,.14);
}
.plan-card .plan-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 20px;
  color: var(--moon-silver);
  margin: 0;
  font-weight: 600;
  letter-spacing: .01em;
}
.plan-card .plan-price {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 36px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: -.02em;
  color: var(--moon-silver);
  margin: 4px 0 2px;
}
.plan-card.recommended .plan-price {
  background: linear-gradient(135deg, #E6C58A 0%, #F9A8D4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.plan-card .plan-period {
  font-size: 13px;
  color: var(--soft);
}
.plan-card .plan-note {
  font-size: 13px;
  color: var(--soft);
  line-height: 1.45;
  margin: 4px 0 10px;
}
.plan-card .plan-cta {
  margin-top: auto;
  width: 100%;
}
.plan-card .plan-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(135deg, #E6C58A, #D46ABF);
  color: #1A0F2C;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 6px 18px rgba(230,197,138,.35);
}
.plan-card .plan-ribbon {
  position: absolute;
  top: -10px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  color: #E6C58A;
  background: rgba(230,197,138,.10);
  border: 1px solid rgba(230,197,138,.35);
}

.sub-banner-active {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, rgba(230,197,138,.28), rgba(212,106,191,.25));
  border: 1px solid rgba(230,197,138,.4);
  color: var(--moon-silver);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(230,197,138,.20);
  margin-bottom: 14px;
}
.sub-banner-active::before {
  content: '✦';
  color: #E6C58A;
  font-size: 13px;
}
.sub-status-card {
  padding: 18px 18px;
  border-radius: var(--r-lg);
  background: rgba(76,29,149,.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(230,197,138,.20);
  margin-bottom: 18px;
}
.sub-status-card .sub-status-title {
  font-size: 13px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 6px;
}
.sub-status-card .sub-status-until {
  color: var(--moon-silver);
  font-size: 16px;
  margin-bottom: 12px;
}

/* ============================================================
   SPREADS PAGE — premium badges + sub-locked overlay
============================================================ */

.spread-badge-premium,
.spread-badge-special {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.spread-badge-premium {
  background: linear-gradient(135deg, #E6C58A, #D46ABF);
  color: #1A0F2C;
}
.spread-badge-special {
  background: linear-gradient(135deg, #67E8F9, #8B5CF6);
  color: #07041A;
}

/* Lock overlay для sub-required плиток у не-подписчика.
   Лёгкий tint, замок в правом верхнем углу — плитка остаётся читаемой. */
.spread-locked-by-sub {
  position: relative;
  /* плитка кликабельна (открывает модалку) — оставляем cursor pointer */
}
.spread-locked-overlay {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(230,197,138,.35);
  color: #E6C58A;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.spread-locked-overlay svg {
  width: 16px; height: 16px;
  display: block;
}
.tile-price.sub-or-paid {
  color: #E6C58A;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0;
}
.tile-price.sub-or-paid b { color: var(--moon-silver); font-weight: 700; }

/* ============================================================
   MODAL / SHEET — locked spread CTA
============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7,4,20,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  animation: modalFade .2s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, rgba(60,35,100,.45), rgba(20,12,38,.50));
  border: none;
  border-radius: 28px;
  padding: 24px 22px 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  margin-bottom: calc(var(--safe-bot, 0px) + 12px);
  animation: sheetUp .25s ease;
}
@keyframes sheetUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-sheet--gate {
  border: none;
  background: linear-gradient(180deg, rgba(75,45,120,.52), rgba(30,18,55,.55));
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
}
.modal-sheet h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.modal-sheet p,
.modal-sheet .modal-body {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.modal-sheet .modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   CUSTOM-QUESTION FORM (в confirm)
============================================================ */

.custom-q-form {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.custom-q-form label {
  font-size: 13px;
  color: var(--soft);
  font-weight: 500;
}
.custom-q-form textarea {
  width: 100%;
  background: rgba(9,6,17,.55);
  border: 1px solid var(--glass-border);
  color: var(--moon-silver);
  padding: 13px 16px;
  border-radius: var(--r-sm);
  outline: none;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.custom-q-form textarea:focus {
  border-color: var(--pink-glow);
  box-shadow: 0 0 0 3px rgba(192,132,252,.18);
}
.custom-q-form .q-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--soft);
}
.custom-q-form .q-counter {
  font-variant-numeric: tabular-nums;
}
.custom-q-form .q-counter.over { color: var(--error); font-weight: 600; }
.custom-q-form .q-hint {
  font-size: 12px;
  color: var(--soft);
  line-height: 1.4;
  padding: 8px 10px;
  border-left: 2px solid rgba(192,132,252,.4);
  background: rgba(192,132,252,.07);
  border-radius: 0 8px 8px 0;
}
.q-examples-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--soft);
  font-size: 12px;
  align-self: flex-start;
}
.q-examples-toggle.open {
  background: rgba(192,132,252,.14);
  color: var(--moon-silver);
}
.q-examples-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.q-examples-list.open {
  max-height: 600px;
}
.q-examples-list li {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(76,29,149,.18);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--moon-silver);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  transition: background .15s;
}
.q-examples-list li:hover { background: rgba(255,255,255,.08); }
.q-examples-list li:active { background: rgba(255,255,255,.04); }

/* ============================================================
   ONBOARDING (полноэкранные шаги)
============================================================ */

.onboarding-wrap {
  min-height: calc(var(--tg-vh, 100vh) - 60px);
  display: flex;
  flex-direction: column;
}
.onboarding-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px 28px;
  flex: 1;
}
.onboarding-step .ob-logo {
  width: 110px; height: 110px;
  margin: 18px 0 22px;
  filter: drop-shadow(0 12px 32px rgba(192,132,252,.5));
  animation: obFloat 4s ease-in-out infinite;
}
@keyframes obFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.onboarding-step h1 {
  font-size: 32px;
  margin: 0 0 12px;
  /* gradient/clip/transparent moved to .ob-text-gradient — every h1 has that class anyway.
     Background shorthand here was overriding .ob-text-gradient's background-size/position,
     killing the lava-flow animation. */
}
.onboarding-step .ob-lead {
  font-size: 16px;
  color: var(--soft);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 0 24px;
}
.onboarding-step .ob-cta {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.onboarding-step .ob-skip {
  color: var(--soft);
  text-decoration: underline;
  background: none;
  font-size: 13px;
  padding: 8px;
}
.ob-birth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  margin: 8px auto 18px;
}
.ob-birth-form .ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.ob-birth-form select,
.ob-birth-form input[type="date"] {
  background: rgba(9,6,17,.55);
  border: 1px solid var(--glass-border);
  color: var(--moon-silver);
  padding: 12px 14px;
  border-radius: var(--r-sm);
  outline: none;
  font-size: 15px;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.ob-birth-form select:focus,
.ob-birth-form input[type="date"]:focus {
  border-color: var(--pink-glow);
  box-shadow: 0 0 0 3px rgba(192,132,252,.18);
}
.ob-sign-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 18px;
}
.ob-sign-grid button {
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(76,29,149,.20);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--moon-silver);
  font-size: 13px;
  transition: background .15s, transform .08s;
}
.ob-sign-grid button.active {
  background: linear-gradient(135deg, rgba(230,197,138,.30), rgba(212,106,191,.25));
  border-color: rgba(230,197,138,.55);
  color: var(--moon-silver);
  font-weight: 600;
}

/* ============================================================
   HISTORY — banner CTA for non-subscribers
============================================================ */

.history-more-banner {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 70% 100% at 0% 0%, rgba(230,197,138,.16), transparent 60%),
    linear-gradient(160deg, rgba(76,29,149,.4) 0%, rgba(212,106,191,.20) 100%);
  border: 1px solid rgba(230,197,138,.28);
  text-align: center;
}
.history-more-banner .hmb-title {
  font-size: 16px;
  color: var(--moon-silver);
  margin-bottom: 4px;
  font-weight: 600;
}
.history-more-banner .hmb-text {
  font-size: 13px;
  color: var(--soft);
  line-height: 1.45;
  margin-bottom: 14px;
}

/* ============================================================
   PROFILE — profile rows
============================================================ */

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.profile-info-row:last-child { border-bottom: 0; }
.profile-info-row .pi-label {
  color: var(--soft);
  font-size: 13px;
}
.profile-info-row .pi-value {
  color: var(--moon-silver);
  font-size: 15px;
  font-weight: 500;
}
.profile-info-row .pi-value.muted { color: var(--soft); font-weight: 400; }
.profile-danger {
  color: var(--error) !important;
}

/* ============== Subagent 4: history/confirm/custom-q ============== */

/* --- History more banner (free tier, has_more) — glass + purple aura, NO yellow --- */
.history-more-banner {
  margin: 24px 0 12px;
  padding: 22px 24px;
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  border-radius: 24px;
  box-shadow: none;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.history-more-banner::before {
  /* subtle purple aura glow, not yellow */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(192, 132, 252, 0.18), transparent 70%);
  pointer-events: none;
}
.history-more-banner .hmb-title,
.hmb-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--moon-silver);
  margin: 0 0 6px;
  position: relative;
}
.history-more-banner .hmb-text,
.hmb-text {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.5;
  margin: 0 0 16px;
  position: relative;
}
.hmb-cta {
  display: inline-block;
  background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 50%, #C084FC 100%);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.4);
  transition: transform 120ms ease;
  position: relative;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .02em;
}
.hmb-cta:active { transform: scale(0.97); }

/* --- Active sub tier chip (views.my) — small pill, NOT a big banner --- */
.history-tier-active {
  display: inline-block;
  margin: 8px 0 16px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.18), rgba(232, 121, 249, 0.18));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #C084FC;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.history-tier-free {
  display: inline-block;
  margin: 8px 0 16px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Confirm card — proper glass blur (overrides earlier .confirm-card) --- */
.confirm-card {
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  border-radius: 28px;
  padding: 26px 22px;
  margin-bottom: 18px;
  box-shadow: none;
}
.confirm-card h2 {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--moon-silver);
}
.confirm-card .lead {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.5;
  margin: 0 0 12px;
}
.confirm-card-row {
  font-size: 14px;
  color: var(--soft);
  margin: 6px 0;
  line-height: 1.45;
}
.confirm-price-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  align-items: baseline;
}
.confirm-price-row .price {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #9CFF3A; /* green for paid */
  letter-spacing: -.01em;
}
.confirm-price-row .price.free {
  color: #FFD93D;
}
.confirm-price-row .price.sub {
  color: #67E8F9;
  font-size: 22px;
}
.confirm-cta {
  /* shared neon styling — if anyone wants to use it standalone */
  background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 50%, #C084FC 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 16px 28px;
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.45), 0 0 24px rgba(192, 132, 252, 0.3);
  transition: transform 120ms ease, box-shadow 200ms ease;
  border: 0;
  cursor: pointer;
}

/* --- Sub-prompt banner (above CTA, when non-sub on sub-required spread) --- */
.sub-prompt-banner {
  margin: -10px 0 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(103, 232, 249, 0.12), rgba(192, 132, 252, 0.12));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--moon-silver);
  line-height: 1.5;
}
.sub-prompt-banner strong { color: #67E8F9; font-weight: 600; }
.confirm-sub-cta {
  display: block;
  margin: 8px auto 0;
  font-size: 13px;
  color: #67E8F9;
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
}

/* --- Custom-question form — glass card (overrides earlier .custom-q-form) --- */
.custom-q-form {
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  border-radius: 24px;
  padding: 20px 22px;
  margin: 0 0 16px;
  display: block;
  gap: 0;
  box-shadow: none;
}
.custom-q-form .q-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F472B6;
  margin-bottom: 10px;
}
.custom-q-form textarea {
  width: 100%;
  min-height: 88px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--moon-silver);
  font-size: 15px;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
  box-shadow: none;
}
.custom-q-form textarea:focus {
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}
.custom-q-form textarea::placeholder {
  color: rgba(201, 189, 226, 0.6);
}
.q-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--soft);
}
.q-counter { color: var(--soft); font-variant-numeric: tabular-nums; }
.q-counter.over { color: var(--error); font-weight: 600; }
.q-hint {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(192, 132, 252, 0.08);
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  color: var(--soft);
  line-height: 1.5;
}
.q-hint::before {
  content: '✨ ';
  color: #C084FC;
}
.q-examples-toggle {
  margin-top: 12px;
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  color: var(--moon-silver);
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease;
  font-family: inherit;
  align-self: stretch;
}
.q-examples-toggle:active { background: rgba(255, 255, 255, 0.08); }
.q-examples-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: block;
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms ease;
}
.q-examples-list.expanded { max-height: 500px; }
/* Compatibility: old `.open` modifier still toggles list */
.q-examples-list.open { max-height: 500px; }
.q-example-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: rgba(76, 29, 149, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 0;
  border-radius: 12px;
  color: var(--moon-silver);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 160ms ease;
  font-family: inherit;
}
.q-example-item:active { background: rgba(76, 29, 149, 0.2); }

/* ============== Subagent 1: onboarding ============== */
/* Перекрывает старые правила .onboarding-* / .ob-* выше — добиваем
   компактный flow (контент в верхней трети, CTA сразу за lead),
   glass-tile зодиак и градиентный заголовок. */

.onboarding-wrap {
  min-height: calc(var(--tg-vh, 100vh) - var(--safe-bot, 0px) - 80px);
  display: flex;
  flex-direction: column;
  padding: var(--safe-top, 60px) 20px 32px;
}
.onboarding-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* контент сверху, без растяжки до низа */
  padding: 8vh 0 0; /* воздух сверху, дальше — естественный flow */
  text-align: center;
}
.onboarding-step .ob-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 12px 32px rgba(192, 132, 252, 0.5));
  animation: obFloat 4s ease-in-out infinite;
}
.onboarding-step h1,
.onboarding-step h2 {
  text-align: center;
}
.onboarding-step .ob-lead {
  max-width: 360px;
  margin: 0 auto 8px; /* плотный отступ — CTA рядом, без пустоты */
  font-size: 16px;
  color: var(--soft);
  line-height: 1.55;
  text-align: center;
}
.onboarding-step .ob-cta {
  /* CTA сразу за lead, не пришпилен к низу */
  margin-top: 24px;
  width: 100%;
  max-width: 360px;
  display: inline-flex; /* перебиваем .btn-block, если он останется */
  justify-content: center;
  align-items: center;
}
.onboarding-step .ob-skip {
  margin-top: 18px;
  font-size: 14px;
  color: var(--soft);
  text-decoration: underline;
  text-align: center;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 8px;
  display: inline-block;
}

/* Градиентный заголовок — лава-лампа: gradient плавно дрейфует.
   Анимация background-position композитится на GPU, без layout/paint. */
.ob-text-gradient {
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 22%,
    #C084FC 45%,
    #F472B6 62%,
    #8B5CF6 80%,
    #F0E6FF 100%
  );
  background-size: 240% 240%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 14px;
  animation: lava-flow 11s ease-in-out infinite;
  will-change: background-position;
}

/* Zodiac grid — glass tiles в духе главной .tile */
.zodiac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  margin: 24px auto 0;
}
.zodiac-btn {
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 14px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--moon-silver);
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease, transform 100ms ease, box-shadow 200ms ease;
  border: 0;
  font-family: inherit;
}
.zodiac-btn:active {
  transform: scale(0.96);
}
.zodiac-btn.selected {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.32), rgba(232, 121, 249, 0.28));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 24px rgba(192, 132, 252, 0.35);
  color: white;
  font-weight: 600;
}
.zodiac-grid .ob-or-date {
  grid-column: 1 / -1;
  margin: 20px 0 8px;
  text-align: center;
  font-size: 13px;
  color: var(--soft);
}
.zodiac-grid .ob-date-input {
  grid-column: 1 / -1;
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--moon-silver);
  border: 0;
  outline: none;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-appearance: none;
  appearance: none;
}
.zodiac-grid .ob-date-input:focus {
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.35);
}

/* Done step — те же плотные отступы, остаётся в общем .onboarding-step. */
.ob-step-done .ob-lead { margin-bottom: 8px; }
.ob-step-splash .ob-lead { margin-bottom: 8px; }

/* ============== Subagent 2: spreads tiles ============== */
/*
   Redesign sub-required tiles on the spreads screen.
   Goals:
   - Убрать визуальный конфликт «бейдж + замок» в правом верхнем углу —
     оставляем ТОЛЬКО компактную lock-иконку `.tile-overlay-lock`,
     а старые `.spread-badge-premium` / `.spread-badge-special` НЕ рендерим
     из tileSpread() (см. app.js). Override старого `.spread-locked-overlay`
     на новый стиль на случай, если он где-то остался.
   - Цена «или 199 ₽» → зелёная (`#9CFF3A`).
   - Текст «Лунесса+» (label на тайле, не цена) → «Подписка» в `#67E8F9`.
   - Section titles на spreads page получают читаемый счётчик.
*/

/* A — Цена на sub-required тайлах: «Подписка · или 199 ₽».
   sub-label (cyan), separator (soft), one-time-price (green).
   Перебиваем устаревший рендер `.tile-price.sub-or-paid b` (был янтарный). */
.tile-price.sub-or-paid {
  font-size: 14px;
  color: var(--soft);
  font-weight: 400;
  text-align: center;
  width: 100%;
  letter-spacing: 0;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0;
  line-height: 1.2;
}
.tile-price.sub-or-paid .sub-label {
  color: #67E8F9;
  font-weight: 600;
}
.tile-price.sub-or-paid .sub-or {
  color: var(--soft);
  margin: 0 6px;
  font-weight: 400;
}
.tile-price.sub-or-paid .one-time-price {
  color: #9CFF3A;
  font-weight: 600;
}
/* Backwards-compat: если где-то остался старый <b>…</b> внутри — затемним. */
.tile-price.sub-or-paid b {
  color: #67E8F9;
  font-weight: 600;
}

/* Подписка-only (price=0 на sub-required) — голубой подсветка. */
.tile-price.sub {
  color: #67E8F9;
  font-weight: 600;
  letter-spacing: 0;
}

/* B — Lock-индикатор на sub-required тайлах: один компактный glass-чип. */
.tile-overlay-lock {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: rgba(15, 8, 30, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tile-overlay-lock svg {
  width: 12px;
  height: 12px;
  color: rgba(240, 230, 255, 0.85);
  stroke-width: 2;
  display: block;
}
.tile-lock-icon {
  /* Локальный override для маленького варианта (на sub-tiles был использован тот же
     класс). Card-of-day overlay у нас своя — `.tile.spread-card-of-day .tile-lock-icon`
     (если понадобится — переопределим). Здесь общий fallback остаётся как был. */
}

/* Старые бейджи на sub-required плитках больше НЕ рендерятся из tileSpread.
   Но если на каких-то экранах остался HTML — подавим, чтобы не было «кричащей»
   надписи рядом с замком. */
.spread-locked-by-sub .spread-badge-premium,
.spread-locked-by-sub .spread-badge-special {
  display: none !important;
}
/* Если где-то в legacy ещё рисуется старый `.spread-locked-overlay` —
   приведём к виду нового `.tile-overlay-lock`. */
.spread-locked-by-sub .spread-locked-overlay {
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: rgba(15, 8, 30, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(240, 230, 255, 0.85);
  border-radius: 999px;
}
.spread-locked-by-sub .spread-locked-overlay svg {
  width: 12px;
  height: 12px;
}

/* C — `cards_count` число на тайле (3, 7, 10, 12). Pink, не жёлтый.
   Используется на ОБЫЧНЫХ spread-тайлах и на card-of-day hero-плитке.
   `.tile-icon.tile-cards-count` — узкий override поверх `.tile-icon`. */
.tile-icon.tile-cards-count {
  color: #F472B6;
  text-shadow: 0 0 20px rgba(244, 114, 182, 0.4);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* D — Section titles на spreads page (Бесплатно / С подпиской Лунесса+ / Полные разборы)
   + счётчик «N раскладов» (uppercase muted). */
.spread-section {
  margin-bottom: 28px;
}
.spread-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 18px;
  margin-bottom: 14px;
}
.spread-section-title h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--moon-silver);
  margin: 0;
}
.spread-section-counter {
  font-size: 12px;
  color: var(--soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============== Subagent 3: profile + subscription ============== */
/*
   Цели:
   — Profile page: «О тебе», «Подписка» и «Уведомления» — единые glass-карты
     (как .tile на главной), без скевоморфного блеска и border'ов.
   — CTA «Указать дату рождения» — неоновая (тот же градиент, что .btn-primary
     для «Начать расклад» на главной).
   — Subscription page (views.subscription): hero, status, plans, alt-pay —
     консистентные glass-карты в фиолетово-розовой палитре, без амбра/золота.
   — Все правила тут — selector-scoped к .profile-* / .sub-* / .plan-* /
     .subscription-page-hero / .plans-grid, чтобы не задеть другие экраны.
*/

/* --- PROFILE PAGE --- */

.profile-section {
  margin-bottom: 22px;
}
.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F472B6;
  margin: 0 4px 12px;
}

/* Glass-карта профиля — те же значения, что у .tile (rgba(76,29,149,.14) + blur 14). */
.profile-info-card {
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  border-radius: 24px;
  padding: 6px 18px;
  box-shadow: none;
}

/* Перебиваем старый .profile-info-row (был padding:10px 0) — теперь 14px и
   указываем gap/align в новой структуре. */
.profile-info-card .profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.profile-info-card .profile-info-row:last-child {
  border-bottom: 0;
}
.profile-info-card .pi-label {
  font-size: 14px;
  color: var(--soft);
  font-weight: 400;
}
.profile-info-card .pi-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--moon-silver);
  text-align: right;
}
.profile-info-card .pi-value.muted {
  color: var(--soft);
  font-weight: 400;
}
.pi-hint {
  font-size: 12px;
  color: var(--soft);
  margin-top: 4px;
  line-height: 1.4;
}

/* Неоновая CTA внутри карточки «О тебе» — наследует .btn-primary, добавляет
   только отступы и full-width (через .btn-block). */
.profile-cta {
  margin: 14px 0 4px;
  width: 100%;
  display: flex;
  justify-content: center;
  /* подсветка как у .btn-primary на главной + лёгкое orchid-свечение */
  box-shadow:
    0 12px 32px rgba(139, 92, 246, 0.45),
    0 0 24px rgba(192, 132, 252, 0.30);
}

/* «Подписка» — кликабельная glass-карта. Не используем .list-item чтобы не
   тащить старый плоский tile. */
.profile-sub-card {
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  border-radius: 24px;
  padding: 18px 22px;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}
.profile-sub-card:active {
  transform: scale(0.99);
  background: rgba(76, 29, 149, 0.20);
}
.profile-sub-card.active {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.18), rgba(232, 121, 249, 0.14));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.profile-sub-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.profile-sub-cta-row .pi-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--moon-silver);
}
.profile-sub-cta-row .pi-hint {
  font-size: 13px;
  color: var(--soft);
  margin-top: 2px;
}
.profile-sub-cta-row .chevron {
  font-size: 22px;
  color: var(--soft);
  font-weight: 300;
  line-height: 1;
}

/* Уведомления — отдельный row layout: text + toggle справа. */
.profile-notif-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 14px;
}
.profile-notif-toggle {
  background: rgba(192, 132, 252, 0.18);
  color: #C084FC;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: background 160ms ease;
  flex-shrink: 0;
  font-family: inherit;
  letter-spacing: 0;
}
.profile-notif-toggle:active {
  background: rgba(192, 132, 252, 0.28);
}
.profile-notif-toggle.off {
  background: rgba(255, 255, 255, 0.06);
  color: var(--soft);
}

/* Frequency row — whole row is a clickable button */
.profile-notif-freq-row {
  box-sizing: border-box;
  width: 100%;
  text-align: left;
  min-height: 38px;
  padding: 8px 0;
  margin-top: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.05);
  box-shadow: none;
  cursor: pointer;
  transition: background 140ms ease;
  font-family: inherit;
}
.profile-notif-freq-row:active {
  background: rgba(255,255,255,.04);
}
.profile-notif-freq-text {
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--soft);
}
.profile-notif-freq-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
}
.profile-notif-freq-value {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: rgba(233,221,247,.72);
  white-space: nowrap;
}
.profile-notif-freq-arrow {
  font-size: 18px;
  color: rgba(233,221,247,.58);
  line-height: 1;
}

/* Удаление данных — отдельная карта без glass, мягкий error-цвет. */
.profile-danger {
  text-align: center;
  font-size: 13px;
  color: var(--error);
  padding: 14px;
  cursor: pointer;
  opacity: 0.7;
  background: transparent;
  border: 0;
  width: 100%;
  font-family: inherit;
  transition: opacity 160ms ease;
}
.profile-danger:hover { opacity: 1; }

/* --- SUBSCRIPTION PAGE --- */

/* Перебиваем старый «золотой» hero — теперь чистый glass + pink/violet. */
.subscription-page-hero,
.sub-hero {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.16), rgba(232, 121, 249, 0.12));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 0;
  border-radius: 28px;
  padding: 28px 24px;
  margin-bottom: 22px;
  text-align: center;
  box-shadow: none;
  overflow: hidden;
  position: relative;
}
.sub-hero::before {
  /* Убираем старый янтарный bleed-эффект, оставляем мягкий orchid glow. */
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.30), transparent 65%);
  filter: blur(24px);
  pointer-events: none;
}
.subscription-page-hero h1,
.sub-hero h1 {
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 22%,
    #C084FC 45%,
    #F472B6 62%,
    #8B5CF6 80%,
    #F0E6FF 100%
  );
  background-size: 240% 240%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: 32px;
  margin: 0 0 10px;
  position: relative;
  animation: lava-flow 11s ease-in-out infinite;
  will-change: background-position;
}
.sub-tagline {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.5;
  margin: 0;
  position: relative;
}

/* Лист преимуществ — без коробок, ✦ префикс вместо чека. */
.sub-benefits {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  position: relative;
  text-align: left;
}
.sub-benefits ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}
.sub-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 15px;
  color: var(--moon-silver);
  background: transparent;
  border: 0;
  border-radius: 0;
  line-height: 1.45;
}
.sub-benefits li::before {
  content: '✦';
  color: #C084FC;
  font-size: 18px;
  line-height: 1.4;
  flex-shrink: 0;
  background: none;
  width: auto;
  height: auto;
  display: inline;
  border-radius: 0;
  font-weight: 400;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.5);
}

/* Plans grid — single col по умолч., 2 col на ≥480px. */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 18px 0;
}
@media (min-width: 480px) {
  .plans-grid { grid-template-columns: 1fr 1fr; }
}

/* Plan card — glass, без border'а, без скевоморф shadow. */
.plan-card {
  position: relative;
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  border-radius: 24px;
  padding: 24px 22px;
  text-align: center;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan-card.recommended {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.22), rgba(232, 121, 249, 0.16));
  box-shadow: 0 0 30px rgba(192, 132, 252, 0.25);
  border: 0;
}
.plan-card .plan-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--moon-silver);
  margin: 0 0 6px;
  letter-spacing: 0;
}
.plan-card .plan-price,
.plan-card.recommended .plan-price {
  background: linear-gradient(135deg, #C084FC 0%, #E879F9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}
.plan-card .plan-period {
  font-size: 14px;
  color: var(--soft);
  margin-bottom: 14px;
}
.plan-card .plan-note {
  font-size: 13px;
  color: var(--soft);
  margin: 0 0 16px;
  line-height: 1.45;
}
.plan-card .plan-cta {
  display: inline-block;
  width: 100%;
  margin-top: auto;
  background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 50%, #C084FC 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 14px 0;
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.4);
  text-align: center;
  cursor: pointer;
  border: 0;
  transition: transform 120ms ease, box-shadow 160ms ease;
  font-family: inherit;
  font-size: 15px;
}
.plan-card .plan-cta:active { transform: scale(0.97); }
.plan-card .plan-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: linear-gradient(135deg, #9CFF3A, #4ADE80);
  color: #0F2E1A;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(74, 222, 128, 0.30);
}
.plan-card .plan-ribbon {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(192, 132, 252, 0.30);
  color: #F0E6FF;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 0;
}

/* Активная подписка — status card. */
.sub-status-card {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.16), rgba(232, 121, 249, 0.12));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0;
  border-radius: 24px;
  padding: 22px 24px;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: none;
}
.sub-status-card .sub-status-title {
  font-size: 18px;
  font-weight: 600;
  color: #F0E6FF;
  margin-bottom: 6px;
  letter-spacing: 0;
  text-transform: none;
}
.sub-status-card .sub-status-until {
  font-size: 14px;
  color: var(--soft);
  margin-bottom: 14px;
}

/* ============== Subagent 1: lava lamp gradient ==============
   GPU-композитная анимация background-position — без layout/paint hit.
   Используется:
     - .ob-text-gradient  (онбординг h1: «Добро пожаловать в Лунессу»,
                          «Расскажи свой знак», «Готово, Лунесса знает тебя»,
                          «Тяну для тебя 3 карты…»);
     - .subscription-page-hero h1 / .sub-hero h1 (Лунесса+ hero);
     - .lava-text / .lava-text-warm — утилиты для будущих заголовков.

   Пауза при свёрнутом WebView обеспечивается глобальным правилом
   html.app-paused * { animation-play-state: paused !important; }
   — отдельного override-а не нужно.
================================================================ */

@keyframes lava-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.lava-text {
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 22%,
    #C084FC 45%,
    #F472B6 62%,
    #8B5CF6 80%,
    #F0E6FF 100%
  );
  background-size: 240% 240%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: lava-flow 11s ease-in-out infinite;
  will-change: background-position;
}

.lava-text-warm {
  background-image: linear-gradient(
    135deg,
    #FCE7F3 0%,
    #F472B6 25%,
    #E879F9 50%,
    #C084FC 75%,
    #FCE7F3 100%
  );
  background-size: 220% 220%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: lava-flow 13s ease-in-out infinite;
  will-change: background-position;
}

.lava-text-slow {
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 22%,
    #C084FC 45%,
    #F472B6 62%,
    #8B5CF6 80%,
    #F0E6FF 100%
  );
  background-size: 240% 240%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: lava-flow 18s ease-in-out infinite;
  will-change: background-position;
}

/* Уважение к prefers-reduced-motion: остановить дрейф, оставить статичный gradient. */
@media (prefers-reduced-motion: reduce) {
  .lava-text,
  .lava-text-warm,
  .lava-text-slow,
  .ob-text-gradient,
  .subscription-page-hero h1,
  .sub-hero h1 {
    animation: none !important;
  }
}

/* ============== Subagent 2: net overlay ============== */
/* Полноэкранный статус сети: красный blur при offline, зелёный при восстановлении. */
.net-banner {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: calc(var(--safe-top, 0px) + 28px) 30px calc(var(--safe-bottom, 0px) + 16vh);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 80, 112, 0.28), transparent 52%),
    rgba(44, 7, 22, 0.58);
  backdrop-filter: blur(16px) saturate(122%);
  -webkit-backdrop-filter: blur(16px) saturate(122%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 0s linear 240ms, background 260ms ease;
}
.net-banner.show {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 240ms ease, background 260ms ease;
}
.net-banner.online {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(94, 255, 174, 0.24), transparent 52%),
    rgba(6, 34, 26, 0.54);
}
.net-banner-icon {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #FFC2C7;
  background: rgba(255, 116, 139, 0.16);
  box-shadow: 0 20px 70px rgba(255, 73, 104, 0.22);
  transform: translateY(10px) scale(.98);
  transition: color 200ms ease, background 200ms ease, transform 240ms ease, opacity 200ms ease;
}
.net-banner.show .net-banner-icon {
  transform: translateY(0) scale(1);
}
.net-banner.online .net-banner-icon {
  color: #B7FFD9;
  background: rgba(101, 255, 181, 0.16);
  box-shadow: 0 20px 70px rgba(57, 226, 139, 0.2);
}
.net-banner-icon svg { width: 48px; height: 48px; stroke-width: 2; }
.net-banner-text {
  width: min(320px, 86vw);
  display: grid;
  gap: 9px;
  transform: translateY(10px);
  transition: transform 240ms ease, opacity 200ms ease;
}
.net-banner.show .net-banner-text {
  transform: translateY(0);
}
.net-banner-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
}
.net-banner-sub {
  font-size: 16px;
  font-weight: 400;
  color: rgba(238, 231, 255, 0.78);
  line-height: 1.42;
}

/* ============== Subagent 3: result cards layout ============== */
.r-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  /* override legacy decorative card frame */
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  /* выровнять карточку по верху ячейки grid (а не stretch'ить вниз) */
  align-self: start;
}
.r-card-position {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 600;
  text-align: center;
  /* фиксируем высоту блока позиции на 2 строки — чтобы картинки всех карт
     стартовали на одной горизонтали, даже если у одной карты подпись в 1 строку
     (например "Прошлое"), а у соседней — в 2 ("Перспективы и итог"). */
  min-height: calc(11px * 1.25 * 2);
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
  padding: 0 2px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.r-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 100 / 175;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  background: rgba(76, 29, 149, 0.14);
}
.r-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
.r-card-img.reversed {
  transform: rotate(180deg);
}
.r-card-reversed-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: rgba(15, 8, 30, 0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 114, 182, 0.28);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F472B6;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
}
.r-card-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--moon-silver);
  text-align: center;
  line-height: 1.3;
  margin: 0;
  padding: 0 4px;
  word-break: break-word;
  hyphens: auto;
}
.r-card.reversed .r-card-name {
  color: #E879F9; /* hint that it's reversed via subtle pink tint */
}

/* Stack container for multi-card results */
.r-cards {
  display: grid;
  gap: 18px;
  margin: 12px 0 24px;
  /* НЕ растягивать карты на высоту самой высокой ячейки — выравнивание сверху,
     иначе короткие подписи "плавают" по центру и картинки оказываются на разной высоте. */
  align-items: start;
}
/* 1 card hero */
.r-cards.cards-1 {
  grid-template-columns: 1fr;
  place-items: center;
}
.r-cards.cards-1 .r-card {
  width: min(60vw, 240px);
}
/* 2-3 cards row */
.r-cards.cards-2 { grid-template-columns: 1fr 1fr; }
.r-cards.cards-3 { grid-template-columns: 1fr 1fr 1fr; }
/* 4 = 2x2 */
.r-cards.cards-4 { grid-template-columns: 1fr 1fr; }
/* 5 = 3 + 2 (center the 2 below) */
.r-cards.cards-5 { grid-template-columns: repeat(3, 1fr); }
.r-cards.cards-5 .r-card:nth-child(4) { grid-column: 1 / 2; justify-self: center; }
.r-cards.cards-5 .r-card:nth-child(5) { grid-column: 3 / 4; justify-self: center; }
/* 6+ auto-fill */
.r-cards.cards-many { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

@media (max-width: 360px) {
  .r-cards.cards-3,
  .r-cards.cards-5 { grid-template-columns: 1fr 1fr; }
  .r-cards.cards-5 .r-card:nth-child(4),
  .r-cards.cards-5 .r-card:nth-child(5) { grid-column: auto; justify-self: stretch; }
}

/* ============== Subagent 4: deck + android navbar ============== */
/* На Android системная gesture/nav-полоса часто перекрывает нижнюю навигацию,
   даже с учётом safe-area-inset-bottom (Telegram WebView рапортует её
   некорректно). Поднимаем .bottombar на ~8px выше и компенсируем высоту
   .nav-bg, чтобы blur-фон тоже подтянулся. */
html.is-android .bottombar {
  bottom: calc(16px + var(--safe-bot, 0px));
}
html.is-android .nav-bg {
  height: calc(148px + var(--safe-bot, 0px));
}

/* ============== Subagent 7: home banners + lava fix ==============
   .first-week-banner   — мягкий glass-инфо в первую неделю (если нет подписки).
   .gift-pending-banner — более яркий, gradient-glow CTA на неиспользованные
                          подарочные расклады. Клик → вкладка «Раскладов».
   Lava-fix: см. .onboarding-step h1 (≈line 1656) и .sub-hero h1 (≈line 1218) —
   убран `background:` shorthand, который ресетил background-size/position и
   отключал лава-флоу в .ob-text-gradient / .subscription-page-hero h1.
================================================================ */

.first-week-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 22px;
}
.fwb-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.fwb-text { flex: 1; }
.fwb-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--moon-silver);
  margin-bottom: 2px;
}
.fwb-sub {
  font-size: 13px;
  color: var(--soft);
  line-height: 1.4;
}

.gift-pending-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.22), rgba(192, 132, 252, 0.18));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 22px;
  cursor: pointer;
  transition: transform 120ms ease;
}
.gift-pending-banner:active { transform: scale(0.98); }
.gpb-icon { font-size: 32px; flex-shrink: 0; }
.gpb-text { flex: 1; }
.gpb-title {
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #F0E6FF 0%, #E879F9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 2px;
}
.gpb-sub {
  font-size: 13px;
  color: var(--moon-silver);
  line-height: 1.4;
}
.gpb-arrow {
  font-size: 24px;
  color: var(--soft);
}

/* Locked-state polish — modal CTA для платных расклада-плиток когда юзер не
   sub и first_week истёк. Subagent 6 владеет tileSpread, но модалка
   openSubscriptionGateModal делит эти классы. */
.modal-locked-cta {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 50%, #C084FC 100%);
  color: white;
  font-weight: 600;
  border-radius: 999px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.4);
}
.modal-locked-info {
  font-size: 13px;
  color: var(--soft);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}
.modal-locked-info strong { color: #67E8F9; }

/* ============== Subagent 4: gift choice ============== */
/* Шаг gift_choice в онбординге — пользователь выбирает 2 премиум-расклада в
   подарок. Контейнер унаследован от .onboarding-step, остальные правила —
   контент-специфичные (заголовок, sparkles, grid, карточки, CTA). */
.ob-step-gift {
  position: relative;
  width: 100%;
  padding-top: 0;
}
.onboarding-wrap-gift {
  min-height: auto;
  padding: 56px 18px 28px;
}
.ob-gift-title {
  display: block;
  width: 100%;
  max-width: 360px;
  font-size: 34px;
  line-height: 1.12;
  margin: 0 auto 12px;
  text-align: center;
  text-wrap: balance;
}
.ob-step-gift .ob-gift-lead {
  max-width: 340px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.42;
  text-align: center;
  text-wrap: balance;
}
.ob-gift-emoji {
  font-size: 32px;
  display: inline-block;
  animation: gift-bounce 2s ease-in-out infinite;
}
@keyframes gift-bounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-8px) rotate(5deg); }
}
.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 430px;
  margin: 22px auto 0;
  align-items: stretch;
}
.gift-card {
  position: relative;
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 22px;
  padding: 16px 12px 14px;
  min-width: 0;
  min-height: 146px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, background 200ms ease, box-shadow 240ms ease;
  border: 0;
  color: inherit;
  font-family: inherit;
}
.gift-card:active { transform: scale(0.97); }
.gift-card.selected {
  background: rgba(76, 29, 149, 0.28);
}
.gift-card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  color: #C084FC;
  flex: 0 0 auto;
}
.gift-card-icon svg { width: 100%; height: 100%; }
.gift-card-name {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--moon-silver);
  margin-bottom: 6px;
  line-height: 1.15;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.gift-card-meta {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--soft);
  line-height: 1.22;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.gift-card-count {
  color: #DCCBFF;
  font-weight: 650;
  white-space: nowrap;
}
.gift-card-desc {
  max-width: 100%;
}
/* Check-mark в углу — управляется .selected, плавная анимация через
   cubic-bezier(0.34, 1.56, 0.64, 1) для лёгкого «pop»-эффекта. */
.gift-card-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #C084FC, #E879F9);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gift-card.selected .gift-card-check {
  opacity: 1;
  transform: scale(1);
}
.ob-gift-counter {
  margin: 14px 0 10px;
  font-size: 14px;
  color: var(--soft);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ob-gift-counter strong {
  color: #C084FC;
  font-weight: 700;
}
/* CTA скрыта (opacity + pointer-events) пока не выбрано 2 расклада. Класс
   .ready включает её и добавляет неоновое свечение поверх стандартной
   .ob-cta gradient'ы из onboarding-step. */
.ob-gift-cta {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 200ms ease, box-shadow 300ms ease, transform 120ms ease;
}
.ob-gift-cta.ready {
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.5), 0 0 32px rgba(232, 121, 249, 0.4);
}
.ob-gift-cta:active { transform: scale(0.97); }
.ob-gift-skip {
  margin-top: 12px;
}

@media (max-width: 380px) {
  .onboarding-wrap-gift {
    padding: 44px 14px 24px;
  }
  .ob-gift-title {
    max-width: 320px;
    font-size: 31px;
  }
  .ob-step-gift .ob-gift-lead {
    max-width: 310px;
    font-size: 15px;
  }
  .gift-grid {
    gap: 8px;
    margin-top: 18px;
  }
  .gift-card {
    min-height: 136px;
    padding: 14px 9px 12px;
    border-radius: 20px;
  }
  .gift-card-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
  }
  .gift-card-name {
    min-height: 34px;
    font-size: 15px;
    margin-bottom: 5px;
  }
  .gift-card-meta {
    font-size: 11.5px;
    line-height: 1.2;
  }
  .gift-card-check {
    width: 26px;
    height: 26px;
    font-size: 17px;
  }
}

@media (max-height: 760px) {
  .onboarding-wrap-gift {
    padding-top: 30px;
  }
  .gift-grid {
    margin-top: 16px;
  }
  .gift-card {
    min-height: 130px;
    padding-top: 12px;
    padding-bottom: 11px;
  }
  .gift-card-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 7px;
  }
  .ob-gift-counter {
    margin: 10px 0 8px;
  }
}

/* ============== Subagent 5: subscription page ============== */
/*
   Цели:
   — Hero (Лунесса+ + tagline) с lava-gradient заголовком.
   — 3 plan cards (Месяц / 3 месяца / Год), recommended-card с ribbon
     посередине и фиолетовым неоновым glow, best с зелёно-фиолетовым tint.
   — Comparison table в стиле ChatGPT pricing: 3-колоночная сетка
     (feature / Free / Plus), check-pill для Plus, em-dash для Free.
   — Active sub: status-card + quota-chip (полоса прогресса).
   — Все правила scoped к .sub-page-* / .plans-3tier-* / .plan-tier-* /
     .compare-* / .quota-* — чтобы не задеть старые .plan-card/.plans-grid.
*/

.sub-page-hero {
  text-align: center;
  padding: 24px 18px 18px;
}
.sub-page-hero h1 {
  margin: 0 0 8px;
  font-size: 32px;
}
.sub-page-hero .sub-tagline {
  font-size: 15px;
  color: var(--soft);
  margin: 0;
  line-height: 1.5;
}

/* 3-tier plan grid */
.plans-3tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 24px 0;
}
@media (max-width: 380px) {
  .plans-3tier-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  /* Порядок карточек: месяц → 3мес → год (DOM order, без override). */
}
.plan-tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 26px 12px 16px;
  min-height: 210px;
  text-align: center;
  cursor: pointer;
  border: 0;
  color: inherit;
  font: inherit;
  transition: transform 120ms ease, background 200ms ease;
}
.plan-tier-card:active { transform: scale(0.97); }
.plan-tier-card.loading { opacity: 0.6; pointer-events: none; }
/* Единый дизайн — без неона/box-shadow у recommended и best,
   акцент несёт только ribbon. */
/* .recommended и .best — без переопределения фона, выглядят так же как обычная
   plan-tier-card. Акцент несёт только ribbon. */
.plan-tier-ribbon {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 16%,
    #C084FC 32%,
    #F472B6 48%,
    #8B5CF6 64%,
    #E879F9 80%,
    #F0E6FF 100%
  );
  background-size: 600% 100%;
  background-position: 0% 50%;
  animation: lava-flow 44s ease-in-out infinite;
  will-change: background-position;
  color: #2A0F3E;
  white-space: nowrap;
}
/* Ribbon у .best — такая же лава как .recommended, единая цветовая гамма. */
.plan-tier-card.best .plan-tier-ribbon {
  /* такая же лава как .recommended — единая цветовая гамма */
}
.plan-tier-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.plan-tier-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin-bottom: 4px;
}
.plan-tier-amount {
  font-size: 30px;
  font-weight: 700;
  background: linear-gradient(135deg, #F0E6FF 0%, #E879F9 60%, #C084FC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.plan-tier-currency {
  font-size: 17px;
  font-weight: 500;
  color: var(--moon-silver);
}
.plan-tier-permo {
  font-size: 11px;
  color: var(--soft);
  margin-bottom: 8px;
}
/* CTA идёт ДО save в DOM — стоит сразу под permo, без margin-top:auto.
   Единый цвет (фиолетовый #C084FC) для ВСЕХ 3 карточек — без переопределений. */
.plan-tier-cta {
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #C084FC;
  letter-spacing: 0.02em;
}
/* Save снизу — фиксированная min-height для выравнивания высот карточек. */
.plan-tier-save {
  display: inline-block;
  min-height: 20px;
  padding: 2px 8px;
  background: rgba(156, 255, 58, 0.2);
  color: #9CFF3A;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
/* Пустой плейсхолдер save у месячной карты — невидим, но держит высоту. */
.plan-tier-save-empty {
  visibility: hidden;
  background: transparent;
}

/* Comparison table (ChatGPT-style) */
.compare-table-wrap {
  margin: 32px 0 20px;
}
.compare-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--moon-silver);
  text-align: center;
  margin: 0 0 18px;
}
.compare-grid {
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 22px;
  padding: 8px 0;
  overflow: hidden;
}
.compare-header,
.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: center;
  padding: 12px 16px;
  gap: 8px;
}
.compare-header {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.compare-col-head { text-align: center; }
.compare-col-head.plus {
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 22%,
    #C084FC 45%,
    #F472B6 62%,
    #8B5CF6 80%,
    #F0E6FF 100%
  );
  background-size: 240% 240%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: lava-flow 11s ease-in-out infinite;
  will-change: background-position;
}
.compare-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.compare-row:last-child { border-bottom: 0; }
.compare-feature {
  font-size: 13px;
  color: var(--moon-silver);
  line-height: 1.3;
}
.compare-cell {
  text-align: center;
  font-size: 13px;
  color: var(--soft);
}
.compare-cell.plus { font-weight: 500; }
.cell-check {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 22%,
    #C084FC 45%,
    #F472B6 62%,
    #8B5CF6 80%,
    #F0E6FF 100%
  );
  background-size: 240% 240%;
  background-position: 0% 50%;
  animation: lava-flow 11s ease-in-out infinite;
  will-change: background-position;
  color: #2A0F3E;
  font-weight: 700;
  font-size: 13px;
}
.cell-cross { color: var(--soft); opacity: 0.5; }
.cell-text { display: inline-block; }
.plus-text {
  background-image: linear-gradient(
    120deg,
    #F0E6FF 0%,
    #E879F9 22%,
    #C084FC 45%,
    #F472B6 62%,
    #8B5CF6 80%,
    #F0E6FF 100%
  );
  background-size: 240% 240%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: lava-flow 11s ease-in-out infinite;
  will-change: background-position;
  font-weight: 600;
}

/* Quota chip (active sub) */
.quota-chip {
  margin: 16px 0 18px;
  padding: 12px 16px;
  background: rgba(76, 29, 149, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  font-size: 13px;
  color: var(--moon-silver);
  text-align: center;
}
.quota-bar {
  margin-top: 8px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.quota-fill {
  height: 100%;
  background: linear-gradient(90deg, #C084FC, #E879F9);
  border-radius: 999px;
  transition: width 320ms ease;
}

/* ============== Subagent 6: spreads page redesign ============== */
/*
   Цели:
   — Каждая плитка расклада — Tabler-SVG иконка (не цифра cards_count) ~36px,
     `.tile-icon-svg` (отдельный класс, не пересекается с `.tile-icon`).
   — Внутренний рельеф плитки: align-items центрируется, `.tile-name`/`.tile-desc`
     с min-height (чтобы плитки одной строки выровнялись по высоте) и
     `.tile-meta` прижата к низу через margin-top:auto.
   — Подарок: ярко-розовый кружок 🎁 в правом верхнем углу (`.spread-gift-badge`)
     с пульсацией. Замок не рендерится одновременно — это либо/либо.
   — Lock-pill: новый класс `.tile-locked-overlay-new` — alias к
     `.tile-overlay-lock`, добавлен на случай дальнейшего тюнинга стиля.
   — Mini-quota-chip `.tile-quota-chip` — для подписчика на премиум-плитке
     («Слотов: N»), маленький glass-pill в левом верхнем углу.
   — Секции: `.spread-section-free` / `.spread-section-gifts` /
     `.spread-section-sub` / `.spread-section-premium` — лёгкие
     тонкие акценты (без border'ов), gifts получает золотисто-розовый glow.
   — Чип квоты в шапке премиум-секции: `.quota-info-chip`.
*/

/* --- Иконка-SVG плитки (заменяет cards_count-цифру в новых плитках) --- */
.tile-icon-svg {
  width: 36px;
  height: 36px;
  color: #C084FC;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.tile-icon-svg svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
  display: block;
}
/* Карта дня — иконка чуть крупнее (плитка span 2). */
.tile.spread-card-of-day .tile-icon-svg {
  width: 44px;
  height: 44px;
  color: #E879F9;
}

/* --- Внутреннее выравнивание плитки: фиксируем высоты, прижимаем meta вниз --- */
.tile {
  /* Перебиваем `justify-content: space-between` базового `.tile`, чтобы
     `.tile-meta` уезжала в низ через margin-top:auto, а .tile-name/desc
     центрировались по своему min-height. */
  justify-content: flex-start;
}
.tile-head {
  /* Уже flex-column из базы; убеждаемся, что центр и нужный gap. */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  text-align: center;
}
.tile-name {
  min-height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Уменьшаем визуальный размер для лучшего вписывания в плитку. */
  font-size: 17px;
  line-height: 1.2;
}
.tile-desc {
  min-height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.35;
}
.tile-meta {
  margin-top: auto;
  padding-top: 6px;
}

/* card_of_day - hero плитка: разрешаем имени быть крупнее, не ужимаем min-height. */
.tile.spread-card-of-day .tile-name {
  font-size: 24px;
  min-height: 1.4em;
}
.tile.spread-card-of-day .tile-desc {
  min-height: 2em;
  font-size: 13.5px;
}

/* --- Цена-подсказка: новые варианты --- */
.tile-price.sub-unlim {
  color: #67E8F9;
  font-weight: 600;
  letter-spacing: 0;
}
/* «Подарок» — pink-magenta градиент текста, чтобы выделялся среди cyan/green. */
.tile-price.gift {
  background: linear-gradient(90deg, #F472B6, #E879F9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
  letter-spacing: 0;
}

/* --- Gift-badge удалён по запросу пользователя.
   Индикатор подарка теперь — только подпись "Подарок" в .tile-price.gift
   плюс лёгкая подсветка имени через .tile.tile-has-gift .tile-name ниже. --- */
/* На плитке с подарком имя расклада чуть подсвечивается (фон оставляем как у базового .tile). */
.tile.tile-has-gift .tile-name {
  color: #F9E6FF;
}

/* --- Lock-pill (новый класс, alias to .tile-overlay-lock) --- */
.tile-locked-overlay-new {
  /* Совпадает с `.tile-overlay-lock` (см. subagent 2 — там 22px glass pill).
     Дополнительный класс — точка расширения для возможного редизайна. */
}

/* --- Mini quota chip на премиум-плитке для подписчика --- */
.tile-quota-chip {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 4px 9px;
  background: rgba(15, 8, 30, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(240, 230, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 2;
}

/* --- Section-styling: лёгкие акценты для каждой секции --- */
.spread-section-free {
  /* Без украшений — базовая секция. */
}
.spread-section-gifts {
  /* Тонкая обводка с золотисто-розовым glow вокруг секции подарков. */
  position: relative;
}
.spread-section-title.gifts h2 {
  background: linear-gradient(90deg, #F472B6, #E879F9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 0;
  padding-left: 0;
  margin-left: 0;
  letter-spacing: inherit;
  text-indent: 0;
}
/* SVG-иконка перед заголовком секции "Твои подарки" — заменяет 🎁-эмодзи.
   Выровнена с базовой линией текста; цвет задан напрямую (не из gradient-text). */
.spread-section-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-left: 8px;
  color: #F472B6;
  -webkit-text-fill-color: #F472B6; /* перебить gradient-text родителя */
}
.spread-section-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.spread-section-title.gifts .spread-section-counter {
  color: #F472B6;
}
.spread-section-sub {
  /* Базовая. */
}
.spread-section-premium {
  /* Базовая, но чип квоты внутри — см. ниже. */
}

/* --- Quota-info-chip (в шапке премиум-секции) --- */
.quota-info-chip {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(76, 29, 149, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  font-size: 13px;
  color: var(--moon-silver);
}
.quota-info-chip.empty {
  background: rgba(120, 30, 30, 0.18);
}
.quota-info-text strong {
  color: #F9E6FF;
  font-weight: 700;
}
.quota-info-bar {
  margin-top: 8px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.quota-info-fill {
  height: 100%;
  background: linear-gradient(90deg, #C084FC, #E879F9);
  border-radius: 999px;
  transition: width 320ms ease;
}

/* --- Min-heights для плитки на новой раскладке (фикс кривого выравнивания) --- */
.tile {
  min-height: 168px;
}
.tile.spread-card-of-day {
  min-height: 168px;
}

/* --- First-week-locked плитка: чуть пригашена, но не оверлей --- */
.tile.tile-first-week-locked {
  opacity: 0.65;
}
.tile.tile-first-week-locked:active {
  opacity: 0.75;
}

/* --- Section-title.gifts с эмодзи: компактный padding/margin --- */
.spread-section-title.gifts {
  margin-bottom: 12px;
}

/* --- Premium-плитка для подписчика: фон оставляем как у базового .tile, чтобы все тайлы выглядели одинаково. */

/* ============================================================
   v21-webapp-features: result tools, notes, lunar, filters,
   history bookmarks, support tickets
============================================================ */

/* --- Result tools row (bookmark / note / support / share) --- */
.result-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.result-tool-btn {
  flex: 1 1 0;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 8px;
  border-radius: 18px;
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  color: var(--soft);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, color .15s, transform .08s;
  letter-spacing: .01em;
}
.result-tool-btn svg {
  width: 22px; height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.result-tool-btn:active { transform: scale(.95); }
.result-tool-btn.active { color: #C084FC; background: rgba(192,132,252,.18); }
.result-tool-btn.bookmarked { color: #E879F9; background: rgba(232,121,249,.15); }

/* --- Result note section --- */
.result-note-section {
  margin-bottom: 14px;
}
.result-note-section .note-textarea {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  color: var(--moon-silver);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  padding: 12px 14px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color .2s, background .2s;
  margin: 10px 0 8px;
}
.result-note-section .note-textarea:focus {
  border-color: rgba(192,132,252,.45);
  background: rgba(255,255,255,.07);
}
.result-note-section .note-text {
  font-size: 15px;
  color: var(--moon-silver);
  line-height: 1.55;
  padding: 4px 2px;
  white-space: pre-wrap;
  word-break: break-word;
}
.result-note-section .note-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.result-note-section .note-actions .btn {
  font-size: 13px;
  padding: 9px 16px;
}

/* --- Lunar card (home screen) --- */
.lunar-card {
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 24px;
  padding: 18px 20px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lunar-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lunar-card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #F472B6;
}
.lunar-phase-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--moon-silver);
}
.lunar-illum {
  font-size: 13px;
  color: var(--soft);
}
.lunar-dates {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.lunar-date-chip {
  font-size: 12px;
  color: var(--soft);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.lunar-date-chip b {
  color: var(--moon-silver);
  font-weight: 600;
}
.lunar-card .btn-sm {
  align-self: flex-start;
  margin-top: 2px;
}
.lunar-card #lunar-cta {
  align-self: stretch;
  width: 100%;
  margin-top: 6px;
  background: linear-gradient(180deg, rgba(80,55,130,.50), rgba(60,40,100,.50));
  color: var(--moon-silver);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* --- Spread filter bar (search + segmented filters) --- */
.spread-filter-bar {
  margin-bottom: 18px;
}
.spread-search-wrap {
  position: relative;
  margin-bottom: 10px;
}
.spread-search-wrap svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--soft);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.spread-search-input {
  width: 100%;
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
  border-radius: 999px;
  color: var(--moon-silver);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px 11px 36px;
  outline: none;
  transition: background .2s, box-shadow .2s;
}
.spread-search-input::placeholder { color: var(--soft); }
.spread-search-input:focus {
  background: rgba(76,29,149,.22);
  box-shadow: 0 0 0 2px rgba(192,132,252,.28);
}
.spread-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.spread-filter-chips::-webkit-scrollbar { display: none; }
.spread-filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--soft);
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .01em;
  transition: background .15s, color .15s;
}
.spread-filter-chip.active {
  background: rgba(192,132,252,.22);
  color: var(--moon-silver);
}
.spread-filter-chip:active { transform: scale(.96); }

/* Hide all non-matching spread sections when filter active */
.spread-sections-hidden .spread-section { display: none; }
.spread-sections-hidden .spread-section.filter-match { display: block; }

/* --- History filter tabs --- */
.history-filter-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}
.history-filter-tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  background: rgba(76,29,149,.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.history-filter-tab.active {
  background: rgba(192,132,252,.22);
  color: var(--moon-silver);
}

/* --- Bookmark marker on history list items --- */
.list-item .bookmark-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #E879F9;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(232,121,249,.55);
}
/* --- Notification frequency selector (inline in profile) --- */
.notif-freq-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(76,29,149,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.notif-freq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  cursor: pointer;
  transition: background .15s;
  font-size: 14px;
  color: var(--moon-silver);
  font-family: inherit;
  background: transparent;
  border-left: 0; border-right: 0; border-top: 0;
}
.notif-freq-item:last-child { border-bottom: 0; }
.notif-freq-item:active { background: rgba(255,255,255,.05); }
.notif-freq-item.selected { color: #C084FC; }
.notif-freq-item .freq-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.notif-freq-item.selected .freq-check {
  background: #C084FC;
  border-color: #C084FC;
}
.notif-freq-item.selected .freq-check::after {
  content: '';
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: 0; border-left: 0;
  transform: rotate(45deg) translate(-1px,-1px);
  display: block;
}

/* --- Delete data confirmation flow --- */
.modal-sheet--delete .modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.delete-confirm-hero {
  padding: 18px 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(244,114,182,.28), transparent 62%),
    linear-gradient(180deg, rgba(86,58,138,.42), rgba(52,31,91,.42));
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
}
.delete-confirm-copy,
.delete-confirm-final-text {
  color: var(--moon-silver);
  font-size: 14px;
  line-height: 1.5;
}
.delete-math-card,
.delete-confirm-final {
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(86,58,138,.38), rgba(52,31,91,.38));
}
.delete-math-example {
  color: #fff;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
}
.delete-math-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  outline: none;
  box-shadow: none;
  text-align: center;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
}
.delete-math-input::placeholder {
  color: rgba(233,221,247,.48);
}
.delete-math-input:focus {
  background: rgba(192,132,252,.18);
}
.delete-confirm-final-title {
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 6px;
}

/* --- Support ticket list --- */
.support-ticket-list {
  margin-top: 22px;
}
.support-ticket-list-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #F472B6;
  margin: 0 0 12px 4px;
}
.support-ticket-item {
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(76,29,149,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 8px;
  font-size: 13px;
}
.support-ticket-item .stk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.support-ticket-item .stk-cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #C084FC;
}
.support-ticket-item .stk-date {
  font-size: 11px;
  color: var(--soft);
}
.support-ticket-item .stk-msg {
  color: var(--soft);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.support-ticket-item .stk-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--soft);
  margin-top: 6px;
  display: inline-block;
}
.support-ticket-item .stk-status.open { color: #67E8F9; background: rgba(103,232,249,.12); }
.support-ticket-item .stk-status.resolved { color: var(--success); background: rgba(151,226,192,.12); }

/* ============================================================
   LATE OVERRIDES
============================================================ */

/* D — custom-q textarea: glass button look, no border/glow */
.custom-q-form textarea {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  resize: none !important;
  background: linear-gradient(180deg, rgba(80,55,130,.48), rgba(60,40,100,.48)) !important;
  border-radius: 24px !important;
}
.custom-q-form textarea:focus {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: linear-gradient(180deg, rgba(95,65,150,.55), rgba(72,50,115,.55)) !important;
}

/* ============================================================
   SUPPORT REASON CARDS
============================================================ */
.support-reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0 18px;
}
.support-reason-card {
  padding: 18px 14px;
  border-radius: 32px;
  background: rgba(76,29,149,.14);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  color: var(--moon-silver);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  border: 0;
  transition: background .18s, transform .12s;
  touch-action: manipulation;
}
.support-reason-card:active {
  transform: scale(.97);
}
.support-reason-card.selected {
  background: rgba(192,132,252,.22);
  color: var(--moon-silver);
}
.support-detail-label {
  display: block;
  font-size: 13px;
  color: var(--soft);
  margin-bottom: 6px;
}
.support-detail-hint {
  color: rgba(233,221,247,.58);
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 10px;
}

/* ============================================================
   SUBSCRIPTION CONFIRM MODAL
============================================================ */
.modal-sheet--pay-confirm {
  background: linear-gradient(180deg, rgba(75,45,120,.52), rgba(30,18,55,.55));
}
.sub-confirm-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 6px;
}
.sub-confirm-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--moon-silver);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.06);
}
.sub-confirm-key {
  color: var(--soft);
  flex-shrink: 0;
}
.sub-confirm-val {
  font-weight: 600;
  text-align: right;
  color: var(--moon-silver);
}
.sub-confirm-note {
  color: var(--soft);
  font-size: 13px;
  justify-content: flex-start;
  background: transparent;
  padding: 2px 14px;
}

/* F — remove glow from hero CTA and profile CTA buttons */
.hero-cta .btn-primary,
.hero-cta .btn-primary:hover,
.hero-cta .btn-primary:focus {
  box-shadow: none;
  text-shadow: none;
}
.profile-cta,
.profile-cta:hover,
.profile-cta:focus {
  box-shadow: none;
  text-shadow: none;
}

/* G — profile birth date modal */
.profile-birth-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.profile-birth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(80,55,130,.48), rgba(60,40,100,.48));
  border: 0;
  border-radius: 20px;
  color: var(--moon-silver);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}
.profile-birth-input:focus {
  background: linear-gradient(180deg, rgba(95,65,150,.55), rgba(72,50,115,.55));
  border: 0;
  outline: none;
  box-shadow: none;
}
.profile-birth-hint {
  font-size: 12px;
  color: var(--soft);
  line-height: 1.4;
  padding: 8px 12px;
  background: rgba(192,132,252,.08);
  border-radius: 12px;
}

/* lunar-illum pill layout */
.lunar-illum {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.lunar-illum span {
  font-size: 13px;
  font-weight: 600;
  color: var(--moon-silver);
}
.lunar-illum small {
  font-size: 11px;
  color: var(--soft);
}

/* H — confirm screen subscribe CTA spacing */
.confirm-subscribe-main { margin-top: 6px; }

/* I — profile button text colors + size unification */
.profile-notif-toggle {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  min-height: 36px;
  min-width: 108px;
  line-height: 1.2;
  border-radius: 999px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-notif-toggle:not(.off) {
  background: rgba(192,132,252,.18);
  color: #fff;
}
.profile-notif-toggle.off {
  background: rgba(255,255,255,.06);
  color: var(--soft);
}
.profile-notif-toggle:not(.off):active {
  background: rgba(192,132,252,.28);
}

#app.legal-gated .bottombar,
#app.legal-gated .nav-bg {
  display: none;
}

.legal-gate {
  min-height: calc(var(--tg-vh, 100vh) - 96px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0 28px;
}
.legal-gate-logo {
  display: block;
  width: min(42vw, 176px);
  max-width: 176px;
  height: auto;
  max-height: 176px;
  object-fit: contain;
  margin: 6px auto 4px;
  transform: none;
  filter: drop-shadow(0 14px 34px rgba(192,132,252,.32));
  animation: none;
}
.legal-consent-note,
.privacy-warning {
  background: rgba(121, 230, 255, .09);
  border: 1px solid rgba(121, 230, 255, .22);
  color: #DDF7FF;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
}
.legal-consent-note {
  border: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(121,230,255,.10), transparent 70%),
    rgba(76,29,149,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.privacy-warning {
  margin: 8px 0 12px;
  display: grid;
  gap: 4px;
}
.privacy-warning strong {
  color: #fff;
}
.legal-consent-list {
  display: grid;
  gap: 10px;
}
.legal-consent-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 15px 16px 15px 18px;
  background: rgba(76,29,149,.14);
  border: 0;
  border-radius: 28px;
  color: var(--moon-silver);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .15s, transform .08s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .legal-consent-row:hover {
    background: rgba(255,255,255,.10);
  }
}
.legal-consent-row:active {
  transform: translateY(1px) scale(.99);
}
.legal-consent-row.checked {
  background: rgba(118,74,184,.24);
  color: #fff;
}
.legal-consent-row.optional {
  color: var(--soft);
}
.legal-consent-row-final {
  background: rgba(76,29,149,.18);
}
.legal-consent-row-final.checked {
  background: rgba(118,74,184,.27);
}
.legal-consent-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.legal-consent-text {
  min-width: 0;
}
.legal-consent-check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  color: transparent;
  background: rgba(255,255,255,.07);
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transition: background .16s, color .16s;
}
.legal-consent-row.checked .legal-consent-check {
  color: #fff;
  background: rgba(166, 103, 255, .72);
  box-shadow: none;
  transform: none;
}
.link-btn {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: #79E6FF;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-doc-screen {
  display: grid;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 28px;
}

.legal-doc-hero {
  display: grid;
  gap: 7px;
  padding: 8px 2px 2px;
}

.legal-doc-kicker,
.legal-doc-card-title {
  color: var(--pink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-doc-hero h1 {
  margin: 0;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.legal-doc-hero p {
  margin: 0;
  max-width: 94%;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.38;
}

.legal-doc-card {
  background: #180C2A;
  border: 0;
  border-radius: 22px;
  padding: 15px 16px;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.legal-doc-loading,
.legal-doc-block {
  color: var(--moon-silver);
  font-size: 15px;
  line-height: 1.5;
}

.legal-doc-meta-card,
.legal-doc-toc-card {
  display: grid;
  gap: 12px;
}

.legal-doc-meta-grid {
  display: grid;
  gap: 9px;
}

.legal-doc-meta-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.legal-doc-meta-label {
  color: rgba(249, 168, 212, .88);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.legal-doc-meta-value {
  min-width: 0;
  color: var(--moon-silver);
  font-size: 15px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.legal-inline-link {
  display: inline;
  padding: 0;
  color: #79E6FF;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-doc-note {
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(121, 230, 255, .12);
  color: rgba(240, 230, 255, .86);
  font-size: 13px;
  line-height: 1.42;
}

.legal-doc-toc-grid {
  display: grid;
  gap: 8px;
}

.legal-toc-link {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .055);
  color: var(--moon-silver);
  text-align: left;
  transition: background .15s, transform .08s;
}

.legal-toc-link:active {
  transform: translateY(1px) scale(.99);
}

@media (hover: hover) {
  .legal-toc-link:hover {
    background: rgba(121, 230, 255, .10);
  }
}

.legal-toc-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  background: rgba(121, 230, 255, .12);
  color: #79E6FF;
  font-size: 13px;
  font-weight: 850;
}

.legal-toc-text {
  min-width: 0;
  color: #EDE4FF;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.24;
  text-decoration: underline;
  text-decoration-color: rgba(121, 230, 255, .42);
  text-underline-offset: 4px;
}

.legal-sections-list {
  display: grid;
  gap: 12px;
}

.legal-section {
  scroll-margin-top: calc(104px + var(--safe-top));
}

.legal-section-title {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.legal-section-title span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(232, 121, 249, .14);
  color: var(--pink-soft);
  font-size: 13px;
}

.legal-section-body {
  display: grid;
  gap: 10px;
  color: var(--moon-silver);
  font-size: 15px;
  line-height: 1.58;
}

.legal-section-body p {
  margin: 0;
}

.legal-section-body ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

.legal-section-body li {
  padding-left: 2px;
}

.legal-section-intro {
  color: var(--soft);
}

@media (max-height: 740px) {
  .legal-gate {
    gap: 12px;
    padding-top: 0;
  }
  .legal-gate-logo {
    width: min(36vw, 136px);
    max-width: 136px;
  }
}
