/* ============================================================
   Книжный путь - UI прототип
   Палитра морской волны (утверждено Ольгой 2026-05-14, 2026-05-19)
   ============================================================ */

:root {
  /* Серебристо-серый + светлое золото - утверждено Ольгой 2026-05-19 */
  --bg: #E8E8EC;
  --bg-alt: #DEDEE3;
  --surface: #F1F1F4;
  --accent: #D9BE6E;          /* светлое золото (мягче чем было) */
  --accent-soft: #E8D49A;     /* очень светлое золото */
  --accent-strong: #C9A85C;   /* чуть насыщеннее для CTA */
  --accent-hover: #B89240;
  --text: #1F2530;            /* холодный тёмно-серый */
  --text-secondary: #4D5566;
  --text-muted: #8A92A3;
  --border: #C9CDD7;
  --border-soft: #DCDFE6;
  --shadow-card: 0 1px 3px rgba(31, 37, 48, 0.06), 0 4px 12px rgba(31, 37, 48, 0.05);
  --shadow-hover: 0 2px 6px rgba(31, 37, 48, 0.1), 0 8px 24px rgba(31, 37, 48, 0.07);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --t-fast: 180ms ease-out;
  --t-base: 320ms ease-out;
  --t-slow: 420ms ease-out;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea { font: inherit; color: inherit; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overscroll-behavior: none;
  position: relative;
  overflow-x: hidden;
}

/* Анимация движения нитей */
@keyframes threadsA {
  from { background-position: 0 0; }
  to { background-position: -320px 0; }
}
@keyframes threadsB {
  from { background-position: 0 0; }
  to { background-position: 400px 0; }
}

/* ====== App shell (mobile-first, центрируем на десктопе) ====== */
.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.app > * { position: relative; z-index: 1; }

/* Летающие золотые нити - ТОЛЬКО на body, ЗА пределами .app */
body::before {
  content: "";
  position: fixed;
  inset: -30%;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'><defs><linearGradient id='gA' x1='0%25' y1='0%25' x2='100%25' y2='0%25'><stop offset='0%25' stop-color='%23B89240' stop-opacity='0'/><stop offset='25%25' stop-color='%23C9A85C' stop-opacity='0.9'/><stop offset='50%25' stop-color='%23F5E08A' stop-opacity='1'/><stop offset='75%25' stop-color='%23C9A85C' stop-opacity='0.9'/><stop offset='100%25' stop-color='%23B89240' stop-opacity='0'/></linearGradient></defs><g fill='none' stroke='url(%23gA)' stroke-width='1.3' stroke-linecap='round'><path opacity='1' d='M-30 50 Q 40 25 90 55 T 200 45 T 340 60'/><path opacity='0.7' d='M-30 55 Q 40 30 90 60 T 200 50 T 340 65'/><path opacity='1' d='M-30 140 Q 50 110 110 145 T 230 135 T 340 150'/><path opacity='0.7' d='M-30 145 Q 50 115 110 150 T 230 140 T 340 155'/><path opacity='1' d='M-30 230 Q 50 200 115 235 T 235 225 T 340 240'/><path opacity='0.7' d='M-30 235 Q 50 205 115 240 T 235 230 T 340 245'/></g></svg>");
  background-repeat: repeat;
  background-size: 320px 320px;
  animation: threadsA 22s linear infinite;
}

@media (min-width: 700px) {
  body {
    background: linear-gradient(180deg, #DDDDE2 0%, #C9CDD7 100%);
    padding: 24px 0;
  }
  .app {
    min-height: calc(100vh - 48px);
    box-shadow: 0 10px 40px rgba(31, 37, 48, 0.14), 0 4px 16px rgba(31, 37, 48, 0.07);
    border-radius: 24px;
    overflow: hidden;
  }
}

/* ====== Header ====== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6) var(--space-4);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast);
}
.header.has-shadow { border-bottom-color: var(--border-soft); }
.header__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.header__back, .header__action {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  transition: background var(--t-fast);
}
.header__back:hover, .header__action:hover { background: var(--bg-alt); }
.header__back svg, .header__action svg { width: 20px; height: 20px; }

/* ====== Main scroll area ====== */
.main {
  flex: 1;
  padding: 0 var(--space-6) var(--space-12);
  overflow-y: auto;
}
.main--with-tabbar { padding-bottom: 96px; }

/* ====== Typography helpers ====== */
.h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); margin: 0 0 var(--space-3); }
.h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; color: var(--text); margin: 0 0 var(--space-2); }
.h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; color: var(--text); margin: 0 0 var(--space-2); }
.h4 { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 var(--space-2); }
.lead { font-size: 17px; line-height: 1.55; color: var(--text-secondary); }
.text-muted { color: var(--text-muted); font-size: 14px; }
.text-secondary { color: var(--text-secondary); }
.text-small { font-size: 14px; }
.text-large { font-size: 18px; line-height: 1.55; }

/* ====== Chips (тематические быстрые входы) ====== */
.chips {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin: 0 calc(var(--space-6) * -1);
  padding: 0 var(--space-6);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); background: var(--bg-alt); }
.chip--active { background: var(--accent); border-color: var(--accent); color: var(--text); font-weight: 600; }

/* Категории на главном (9 чипов с иконками) */
.chips--wrap {
  flex-wrap: wrap;
  overflow-x: visible;
  margin: 0;
  padding: 0;
}
.chip--category {
  padding: 12px 18px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip__icon {
  font-size: 16px;
  line-height: 1;
}
.chip--category:hover { border-color: var(--accent); background: var(--bg-alt); }

/* Карточки подразделов на экране категории */
.subcat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.subcat-card:hover {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}
.subcat-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}
.subcat-card__label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.subcat-card__count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.subcat-card__covers {
  display: flex;
  gap: 6px;
}
.subcat__mini-cover {
  width: 36px;
  height: 50px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
  box-shadow: 0 1px 3px rgba(42, 56, 56, 0.1);
}
.subcat__mini-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.subcat-card__cta {
  font-size: 13px;
  color: var(--accent-strong);
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: -0.005em;
}
.subcat-card:hover .subcat-card__cta { color: var(--accent-hover); }

/* ====== Social footer (подвал с соцсетями Ольги) ====== */
.social-footer {
  margin: var(--space-8) calc(var(--space-6) * -1) 0;
  padding: var(--space-6);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--border-soft);
}
.social-footer__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.social-footer__hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
}
.social-footer__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}
.social-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  pointer-events: none;
  opacity: 0.55;
  box-shadow: inset 0 0 0 1px transparent;
  transition: opacity var(--t-base), box-shadow var(--t-base);
}
/* Подсветка кнопки в цвет её соцсети */
.social-link:has(.social-link__icon--tg)::after { box-shadow: 0 0 24px -8px #229ED9, inset 0 0 0 1px rgba(34, 158, 217, 0.25); }
.social-link:has(.social-link__icon--max)::after { box-shadow: 0 0 24px -8px #4E5BD4, inset 0 0 0 1px rgba(78, 91, 212, 0.25); }
.social-link:has(.social-link__icon--card)::after { box-shadow: 0 0 24px -8px #7B5BCB, inset 0 0 0 1px rgba(123, 91, 203, 0.25); }
.social-link:hover { transform: translateY(-2px); }
.social-link:hover::after { opacity: 1; }
.social-link:hover.social-link:has(.social-link__icon--tg)::after { box-shadow: 0 0 32px -4px #229ED9, inset 0 0 0 1.5px rgba(34, 158, 217, 0.55); }
.social-link:hover.social-link:has(.social-link__icon--max)::after { box-shadow: 0 0 32px -4px #4E5BD4, inset 0 0 0 1.5px rgba(78, 91, 212, 0.55); }
.social-link:hover.social-link:has(.social-link__icon--card)::after { box-shadow: 0 0 32px -4px #7B5BCB, inset 0 0 0 1.5px rgba(123, 91, 203, 0.55); }

/* Мягкая пульсация подсветки в покое - чтобы было движение */
.social-link {
  animation: socialGlow 4.5s ease-in-out infinite;
}
.social-link:nth-child(1) { animation-delay: 0s; }
.social-link:nth-child(2) { animation-delay: 0.6s; }
.social-link:nth-child(3) { animation-delay: 1.2s; }
.social-link:nth-child(4) { animation-delay: 1.8s; }
@keyframes socialGlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}
.social-link__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.social-link__icon svg { width: 20px; height: 20px; }
.social-link__icon--tg { background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%); color: #FFFFFF; }
.social-link__icon--max { background: linear-gradient(135deg, #6B7FE8 0%, #4E5BD4 100%); color: #FFFFFF; }
.social-link__icon--card { background: linear-gradient(135deg, #9B7BD9 0%, #7B5BCB 100%); color: #FFFFFF; }
.social-link__main { flex: 1; min-width: 0; }
.social-link__label { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.social-link__sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.social-link__arrow { color: var(--text-muted); font-size: 16px; flex-shrink: 0; }
.social-footer__signature {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: var(--space-4) 0 0;
  font-style: italic;
}

/* Плашка активного фильтра в каталоге */
.catalog-filter-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #F7EBC9 0%, #F2E4BD 100%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-bottom: var(--space-4);
  font-size: 14px;
}
.catalog-filter-banner__icon {
  color: var(--accent-strong);
  font-size: 16px;
}
.catalog-filter-banner__text {
  flex: 1;
  color: var(--text);
  font-weight: 500;
}
.catalog-filter-banner__clear {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(42, 56, 56, 0.08);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.catalog-filter-banner__clear:hover { background: rgba(42, 56, 56, 0.16); }

/* ====== Progress line (уровни) ====== */
.progress-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: var(--space-3) 0;
}
.progress-line__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  transition: all var(--t-base);
}
.progress-line__dot--filled { background: var(--accent-strong); border-color: var(--accent-strong); }
.progress-line__dot--current { background: var(--accent); border-color: var(--accent); width: 12px; height: 12px; box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25); }
.progress-line__bar {
  flex: 1;
  height: 1.5px;
  background: var(--border);
  border-radius: 1px;
}
.progress-line__bar--filled { background: var(--accent-strong); }

/* ====== Card (универсальная) ====== */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.card--interactive { cursor: pointer; }
.card--interactive:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.card--soft { background: var(--bg-alt); border: 1px solid transparent; box-shadow: none; }
.card--accent {
  background: linear-gradient(135deg, #F7EBC9 0%, #F2E4BD 100%);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.1);
}

/* ====== CTA: Нейропсихолог (вход с главного экрана) ====== */
.cta-neuro {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--accent-soft);
  background: linear-gradient(135deg, #F7EBC9 0%, #F2E4BD 100%);
  box-shadow: 0 2px 10px rgba(201, 162, 39, 0.18);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: box-shadow var(--t-base), transform var(--t-base);
  position: relative;
  overflow: hidden;
}
.cta-neuro::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  animation: cta-shimmer 5s ease-in-out infinite;
}
@keyframes cta-shimmer {
  0%, 80% { left: -100%; }
  100% { left: 160%; }
}
.cta-neuro:hover { box-shadow: 0 4px 16px rgba(201, 162, 39, 0.28); transform: translateY(-1px); }
.cta-neuro:active { transform: scale(0.99); }
.cta-neuro__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.cta-neuro__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cta-neuro__title { font-size: 16px; font-weight: 600; color: var(--text); letter-spacing: 0.2px; }
.cta-neuro__sub { font-size: 13px; color: var(--text-secondary); line-height: 1.35; }
.cta-neuro__arrow {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--accent);
  font-weight: 700;
}

/* ====== Отсылки к Нейропсихологу в чате ====== */
.neuro-hint {
  align-self: stretch;
  padding: 8px 14px;
  margin: 6px 0 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px dashed var(--border-soft);
  border-bottom: 1px dashed var(--border-soft);
}
.neuro-hint__text { color: var(--text-secondary); }
.neuro-hint__link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.neuro-hint__link:hover { color: var(--accent-strong, var(--accent)); text-decoration: underline; }

.neuro-trigger {
  align-self: stretch;
  display: flex;
  gap: 12px;
  padding: 14px;
  margin: 10px 0;
  border-radius: var(--r-md);
  border: 1px solid var(--accent-soft);
  background: linear-gradient(135deg, #F7EBC9 0%, #F2E4BD 100%);
  box-shadow: 0 2px 10px rgba(201, 162, 39, 0.16);
}
.neuro-trigger__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.neuro-trigger__body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.neuro-trigger__title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.3; }
.neuro-trigger__sub { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.neuro-trigger__btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--t-base), transform var(--t-base);
}
.neuro-trigger__btn:hover { background: var(--accent-strong, var(--accent)); }
.neuro-trigger__btn:active { transform: scale(0.98); }

.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-3); }
.card__body { color: var(--text-secondary); font-size: 15px; line-height: 1.55; }

/* ====== Current book card ====== */
.current-book {
  display: flex;
  gap: var(--space-4);
  align-items: stretch;
}
.current-book__cover {
  width: 64px;
  height: 88px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 12px rgba(42, 56, 56, 0.12);
}
.current-book__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #FFFFFF;
}
.current-book__info { flex: 1; display: flex; flex-direction: column; }
.current-book__author { font-size: 13px; color: var(--text-secondary); margin: 0 0 2px; }
.current-book__title { font-size: 17px; font-weight: 600; color: var(--text); margin: 0 0 var(--space-2); line-height: 1.3; }
.current-book__progress { display: flex; align-items: center; gap: var(--space-2); margin-top: auto; font-size: 13px; color: var(--text-secondary); }
.current-book__bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.current-book__bar-fill { height: 100%; background: var(--accent-strong); border-radius: 2px; transition: width var(--t-slow); }

/* ====== Book grid (каталог) ====== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (min-width: 380px) {
  .book-grid { gap: var(--space-4); }
}
.book-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.book-card:hover { border-color: var(--accent-soft); box-shadow: var(--shadow-card); }
.book-card__cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 8px;
  letter-spacing: 0.3px;
  overflow: hidden;
  position: relative;
}
.book-card__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #FFFFFF;
}
/* Градиенты обложек по уровням лестницы - в палитре жемчуг/золото/бронза */
.book-card__cover--lvl-1 { background: linear-gradient(135deg, #F0E5C8 0%, #E0CFA0 100%); color: #4A3818; }
.book-card__cover--lvl-2 { background: linear-gradient(135deg, #E0CFA0 0%, #C9A77A 100%); color: #3D2A0F; }
.book-card__cover--lvl-3 { background: linear-gradient(135deg, #D4B774 0%, #C9A227 100%); color: #2A1F0A; }
.book-card__cover--lvl-4 { background: linear-gradient(135deg, #C9A227 0%, #A88018 100%); color: #FFFFFF; }
.book-card__cover--lvl-5 { background: linear-gradient(135deg, #A88018 0%, #7A5A10 100%); color: #FFFFFF; }
.book-card__cover--lvl-6 { background: linear-gradient(135deg, #6E5212 0%, #4A3608 100%); color: #F5E5B8; }
.book-card__cover--bonus { background: linear-gradient(135deg, #6E2A3D 0%, #4A1A28 100%); color: #F5E5B8; }
.book-card__author { font-size: 12px; color: var(--text-secondary); margin: 0; line-height: 1.35; }
.book-card__title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0; line-height: 1.3; }
.book-card__level { font-size: 11px; color: var(--text-muted); margin-top: auto; text-transform: uppercase; letter-spacing: 0.5px; }

/* ====== Book detail (карточка-анонс) ====== */
.book-detail__hero {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-5) 0 var(--space-6);
  align-items: flex-start;
}
.book-detail__cover {
  width: 110px;
  height: 156px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  font-size: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 20px rgba(42, 56, 56, 0.15);
}
.book-detail__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #FFFFFF;
}
.book-detail__meta { display: flex; flex-direction: column; gap: 4px; }
.book-detail__author { font-size: 14px; color: var(--text-secondary); margin: 0; }
.book-detail__title { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--text); margin: 4px 0; letter-spacing: -0.01em; }
.book-detail__sub { font-size: 13px; color: var(--text-muted); }
.book-detail__sub span + span::before { content: " · "; }

.book-detail__section { margin: var(--space-6) 0; }
.book-detail__section h3 { font-size: 17px; font-weight: 600; margin-bottom: var(--space-2); color: var(--text); }
.book-detail__section p { margin: 0 0 var(--space-3); color: var(--text-secondary); font-size: 15px; line-height: 1.6; }
.book-detail__list { padding-left: 22px; margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.book-detail__list li { margin-bottom: 4px; }
.book-detail__list--clickable .related-item { cursor: pointer; padding: 6px 8px; border-radius: 8px; transition: background .15s ease; list-style: none; margin-left: -22px; }
.book-detail__list--clickable .related-item:hover { background: rgba(217, 190, 110, 0.12); }
.book-detail__list--clickable .related-item:active { background: rgba(217, 190, 110, 0.22); }
.book-detail__list--clickable .related-item strong { color: var(--text); }

.book-detail__disclaimer { background: rgba(217, 190, 110, 0.10); border-left: 3px solid var(--accent, #D9BE6E); padding: 10px 14px; margin: var(--space-3) 0; border-radius: 6px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.book-detail__disclaimer strong { color: var(--text); }

.book-detail__cta {
  position: sticky;
  bottom: 12px;
  background: linear-gradient(0deg, var(--bg) 0%, var(--bg) 60%, rgba(248,251,251,0) 100%);
  padding: var(--space-4) 0 var(--space-2);
  margin: var(--space-6) calc(var(--space-6) * -1) 0;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  transition: all var(--t-fast);
  width: 100%;
  letter-spacing: -0.01em;
}
.btn--primary {
  background: linear-gradient(135deg, #E8D49A 0%, #D9BE6E 50%, #C9A85C 100%);
  color: #3D2F18;
  box-shadow: 0 4px 14px rgba(217, 190, 110, 0.32);
  position: relative;
  overflow: hidden;
}
/* Блик-шиммер на primary кнопке - проходит каждые 5 секунд */
.btn--primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  animation: shimmer 5s ease-in-out infinite;
  animation-delay: 1s;
}
@keyframes shimmer {
  0% { left: -75%; }
  35% { left: 125%; }
  100% { left: 125%; }
}
.btn--primary:hover {
  background: linear-gradient(135deg, #D9BE6E 0%, #C9A85C 50%, #B89240 100%);
  box-shadow: 0 6px 18px rgba(217, 190, 110, 0.45);
  transform: translateY(-1px);
}
.btn--primary:active { transform: scale(0.98); }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-alt); color: var(--text); }
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent-strong);
  font-weight: 600;
}
.btn--outline:hover { background: rgba(201, 162, 39, 0.08); border-color: var(--accent-strong); }
.btn--small { padding: 10px 16px; font-size: 14px; font-weight: 500; width: auto; }

/* ====== Chat / диалог с AI ====== */
.chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: var(--space-6);
}
.chapter-banner {
  background: var(--bg-alt);
  border-radius: var(--r-md);
  padding: var(--space-4);
  margin: var(--space-2) 0 var(--space-4);
}
.chapter-banner__label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.chapter-banner__title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 var(--space-3); }
.chapter-banner__summary {
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-soft);
}
.chapter-banner__summary summary {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chapter-banner__summary summary::-webkit-details-marker { display: none; }
.chapter-banner__summary summary::before {
  content: "›";
  display: inline-block;
  transition: transform var(--t-fast);
  font-size: 18px;
  color: var(--text-muted);
}
.chapter-banner__summary[open] summary::before { transform: rotate(90deg); }
.chapter-banner__summary-body { margin-top: var(--space-3); color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

.msg {
  max-width: 88%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-lg);
  font-size: 15px;
  line-height: 1.55;
  animation: msgIn 320ms ease-out;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg--ai {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.msg--user {
  background: var(--accent);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  color: var(--text);
  font-weight: 500;
}
.msg--typing {
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
}

.reply-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.reply-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 14px;
  color: var(--text);
  transition: all var(--t-fast);
  line-height: 1.4;
}
.reply-btn:hover { border-color: var(--accent); background: var(--bg-alt); }
.reply-btn:active { transform: scale(0.99); }

/* Главная кнопка финал-воронки (Нейропсихолог) — «переводить, а не отпускать» */
.reply-btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  color: var(--text);
  font-weight: 600;
}
.reply-btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent) 100%);
  border-color: var(--accent-hover);
}

/* Оценка тренажёра — 5 звёзд в финал-воронке */
.rating-stars {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  margin: 8px 0;
  border-radius: var(--r-md);
  border: 1px solid var(--accent-soft);
  background: linear-gradient(135deg, #F7EBC9 0%, #F2E4BD 100%);
}
.rating-stars__hint { font-size: 13px; color: var(--text-muted); }
.rating-stars__row { display: flex; gap: 6px; }
.rating-stars__star {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: #D7CBA6;
  transition: color var(--t-fast), transform var(--t-fast);
}
.rating-stars__star:hover { transform: scale(1.12); }
.rating-stars__star.is-on { color: var(--accent-strong); }
.rating-stars__star:disabled { cursor: default; }
.rating-stars__star:disabled:hover { transform: none; }

.chat-input {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  position: sticky;
  bottom: 64px;
  margin: 0 calc(var(--space-6) * -1);
}
.chat-input__field {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--t-fast);
}
.chat-input__field:focus { outline: none; border-color: var(--accent); }
.chat-input__send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.chat-input__send:hover { background: var(--accent-strong); }

/* ====== Tabbar (нижняя навигация) ====== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  display: flex;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-soft);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 50;
}
@media (min-width: 700px) {
  .tabbar { border-radius: 0 0 24px 24px; }
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.tab svg { width: 22px; height: 22px; }
.tab--active { color: var(--text); }
.tab--active svg path { fill: var(--accent-strong); stroke: var(--accent-strong); }

/* ====== Welcome / onboarding ====== */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-10) var(--space-6) var(--space-8);
  min-height: 100vh;
  justify-content: space-between;
  overflow-y: auto;
}
.welcome__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  flex: 1;
  justify-content: center;
}
.welcome__visual {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-soft) 0%, var(--accent) 70%, var(--accent-strong) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  box-shadow: 0 20px 60px rgba(127, 207, 208, 0.3);
  animation: floatGently 6s ease-in-out infinite;
}
@keyframes floatGently {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.welcome__visual::after {
  content: "";
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px 24px 20px 24px / 24px 20px 24px 20px;
  box-shadow: inset 0 2px 8px rgba(42, 56, 56, 0.06);
}

/* Реальная картинка на welcome (фото Ольги или атмосферное) */
.welcome__image {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-5);
  box-shadow: 0 20px 60px rgba(201, 162, 39, 0.32), 0 0 0 4px rgba(201, 162, 39, 0.18);
  position: relative;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-strong) 100%);
  animation: floatGently 7s ease-in-out infinite;
}
.welcome__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.welcome__image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.5);
  pointer-events: none;
}

/* Экран выбора языка (RU / EN / DE) — первый при входе */
.lang-pick {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 340px;
  margin-top: var(--space-5);
}
.lang-pick__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1.5px solid rgba(42, 56, 56, 0.12);
  background: var(--bg-alt);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.lang-pick__btn:hover { border-color: var(--accent); }
.lang-pick__btn:active { transform: scale(0.98); }
.lang-pick__btn--active {
  border-color: var(--accent-strong);
  background: rgba(201, 162, 39, 0.10);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.20);
}
.lang-pick__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.lang-pick__lang {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.welcome__paragraph {
  display: block;
  margin-bottom: 12px;
}
.welcome__paragraph:last-child { margin-bottom: 0; }
.welcome__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  max-width: 320px;
  line-height: 1.2;
}
.welcome__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 360px;
  line-height: 1.55;
}
.welcome__dots {
  display: flex;
  gap: 8px;
  margin: var(--space-6) 0;
}
.welcome__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--t-base);
}
.welcome__dot--active { background: var(--accent-strong); width: 24px; border-radius: 4px; }

/* ====== Progress page (Мой путь) ====== */
.energy-bar {
  margin: var(--space-3) 0 var(--space-5);
}
.energy-bar__scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.energy-bar__track {
  position: relative;
  height: 12px;
  background: linear-gradient(90deg, #F0B5A0 0%, #F0E5C0 50%, #C0E5D8 100%);
  border-radius: 6px;
  overflow: visible;
}
.energy-bar__indicator {
  position: absolute;
  top: -4px;
  width: 20px;
  height: 20px;
  background: var(--surface);
  border: 3px solid var(--accent-strong);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(42, 56, 56, 0.15);
  transition: left var(--t-slow);
  cursor: grab;
}
.energy-bar__value {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-top: var(--space-3);
  color: var(--text);
}
.energy-bar__value-trend {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-strong);
  margin-left: 8px;
}

.victory-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.victory-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-alt);
  border-radius: var(--r-md);
}
.victory-item__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}
.victory-item__text { font-size: 15px; color: var(--text); line-height: 1.4; }
.victory-item__date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
}
.stat-row:last-child { border-bottom: none; }
.stat-row__label { font-size: 14px; color: var(--text-secondary); }
.stat-row__value { font-size: 18px; font-weight: 600; color: var(--text); }
.stat-row__value-trend { font-size: 12px; color: var(--accent-strong); margin-left: 6px; font-weight: 500; }

/* ====== Feedback (обратная связь) ====== */
.feedback-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.feedback-field__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.feedback-field__hint {
  font-size: 13px;
  color: var(--text-muted);
}
.feedback-field__textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 15px;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  color: var(--text);
}
.feedback-field__textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.rating {
  display: flex;
  gap: 6px;
  margin: var(--space-2) 0 var(--space-5);
}
.rating__btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--t-fast);
}
.rating__btn:hover { background: var(--accent-soft); }
.rating__btn--active { background: var(--accent); border-color: var(--accent); color: var(--text); }

/* ====== Profile ====== */
.profile-head {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5) 0 var(--space-6);
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-strong) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: var(--text);
}
.profile-name { font-size: 20px; font-weight: 600; margin: 0 0 2px; color: var(--text); }
.profile-username { font-size: 14px; color: var(--text-muted); }

.trial-banner {
  background: linear-gradient(135deg, #F7EBC9 0%, #F2E4BD 100%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}
.trial-banner__title { font-size: 15px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.trial-banner__body { font-size: 14px; color: var(--text-secondary); margin: 0 0 var(--space-3); line-height: 1.5; }

.list-row {
  display: flex;
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background var(--t-fast);
  margin: 0 calc(var(--space-6) * -1);
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}
.list-row:hover { background: var(--bg-alt); }
.list-row__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--space-3);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.list-row__icon svg { width: 18px; height: 18px; }
.list-row__main { flex: 1; }
.list-row__title { font-size: 15px; color: var(--text); }
.list-row__sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.list-row__arrow { color: var(--text-muted); font-size: 18px; }

/* ====== Filter pills (для каталога) ====== */
.filter-row {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  margin: 0 calc(var(--space-6) * -1) var(--space-4);
  padding: var(--space-2) var(--space-6);
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }

/* ====== Toast / notification ====== */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--surface);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all var(--t-base);
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ====== Screen transitions ====== */
.screen { display: none; flex-direction: column; flex: 1; }
.screen--active { display: flex; animation: screenIn 360ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Появление вложенных блоков на активном экране - каскад */
.screen--active .chip,
.screen--active .card,
.screen--active .subcat-card,
.screen--active .book-card,
.screen--active .social-link {
  animation: fadeInUp 540ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.screen--active .chip:nth-child(1) { animation-delay: 60ms; }
.screen--active .chip:nth-child(2) { animation-delay: 100ms; }
.screen--active .chip:nth-child(3) { animation-delay: 140ms; }
.screen--active .chip:nth-child(4) { animation-delay: 180ms; }
.screen--active .chip:nth-child(5) { animation-delay: 220ms; }
.screen--active .chip:nth-child(6) { animation-delay: 260ms; }
.screen--active .chip:nth-child(7) { animation-delay: 300ms; }
.screen--active .chip:nth-child(8) { animation-delay: 340ms; }
.screen--active .chip:nth-child(9) { animation-delay: 380ms; }
.screen--active .subcat-card:nth-child(1) { animation-delay: 80ms; }
.screen--active .subcat-card:nth-child(2) { animation-delay: 160ms; }
.screen--active .subcat-card:nth-child(3) { animation-delay: 240ms; }
.screen--active .subcat-card:nth-child(4) { animation-delay: 320ms; }
.screen--active .subcat-card:nth-child(5) { animation-delay: 400ms; }
.screen--active .subcat-card:nth-child(6) { animation-delay: 480ms; }
.screen--active .subcat-card:nth-child(7) { animation-delay: 560ms; }
.screen--active .subcat-card:nth-child(8) { animation-delay: 640ms; }
.screen--active .social-link:nth-child(1) { animation-delay: 60ms; }
.screen--active .social-link:nth-child(2) { animation-delay: 140ms; }
.screen--active .social-link:nth-child(3) { animation-delay: 220ms; }
.screen--active .social-link:nth-child(4) { animation-delay: 300ms; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Карточка текущей книги (accent) - мягкое золотое свечение */
.card--accent {
  animation: goldGlow 4s ease-in-out infinite;
}
@keyframes goldGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(217, 190, 110, 0.15); }
  50% { box-shadow: 0 4px 18px rgba(217, 190, 110, 0.3); }
}

/* Иконки соцсетей - лёгкое покачивание */
.social-link__icon {
  transition: transform var(--t-base);
}
.social-link:hover .social-link__icon {
  transform: scale(1.08) rotate(-3deg);
}

/* ====== Utilities ====== */
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--border-soft); margin: var(--space-5) 0; }


/* Промо «Чёрный ретрит» + оферта в подвале */
.footer-promo{display:flex;align-items:center;gap:14px;background:rgba(217,190,110,.07);border:1px solid rgba(217,190,110,.32);border-radius:14px;padding:14px 16px;margin:18px 0 0;text-decoration:none}
.footer-promo__qr{width:74px;height:74px;border-radius:8px;background:#fff;padding:5px;flex-shrink:0;display:block}
.footer-promo__title{color:#d9be6e;font-weight:600;font-size:15px;margin-bottom:3px}
.footer-promo__sub{color:rgba(255,255,255,.72);font-size:12px;line-height:1.4}
.footer-legal{text-align:center;margin-top:14px;font-size:12px}
.footer-legal a{color:rgba(255,255,255,.55);text-decoration:underline}

/* ====== Тест по архетипам (экран входа) ====== */
.archetype { display: flex; flex-direction: column; gap: 16px; }
.arche-q { display: flex; flex-direction: column; gap: 8px; }
.arche-q__title { font-weight: 600; color: var(--text); line-height: 1.4; }
.arche-opts { display: flex; flex-direction: column; gap: 8px; }
.arche-opt {
  text-align: left; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 15px; line-height: 1.35; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.arche-opt:hover { border-color: var(--accent-strong); }
.arche-opt--sel {
  border-color: var(--accent-strong); background: var(--accent-soft);
  color: var(--text); font-weight: 600;
}
.arche-result { display: flex; flex-direction: column; gap: 12px; }
.arche-result__badge {
  align-self: flex-start; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-hover);
  font-size: 13px; font-weight: 600;
}
.arche-card {
  padding: 12px 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border-soft); color: var(--text-secondary);
  line-height: 1.45; font-size: 15px;
}
.arche-card b { color: var(--text); }
