/* Шрифты (@fontsource, OFL) */
/* cormorant-garamond-cyrillic-500-normal */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/cormorant-garamond-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* cormorant-garamond-latin-500-normal */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* cormorant-garamond-cyrillic-600-normal */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/cormorant-garamond-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* cormorant-garamond-latin-600-normal */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* cormorant-garamond-cyrillic-500-italic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/cormorant-garamond-cyrillic-500-italic.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* cormorant-garamond-latin-500-italic */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/cormorant-garamond-latin-500-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* onest-cyrillic-400-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/onest-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* onest-latin-400-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/onest-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* onest-cyrillic-500-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/onest-cyrillic-500-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* onest-latin-500-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(fonts/onest-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* onest-cyrillic-600-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/onest-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
/* onest-latin-600-normal */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/onest-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
/* ══════════════════════════════════════════════════════════════════
   ДИЗАЙН-ТОКЕНЫ «Приложения автора». Три скина, выбор — поле skin в site.json
   (сборка ставит <html data-skin="…">). Поле brandColor подменяет только акцент:
   сборка дописывает --accent / --accent-ink / --accent-text после этого файла.
   Основные цвета дублируются в skins.js — меняйте в обоих местах.
   Линии, тени и стекло — те же цвета скина с прозрачностью, новых цветов нет.
   Шрифты — свои файлы (@fontsource), их @font-face сборка кладёт в начало app.css.
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* Воздух */
  --pad: 24px;          /* поля экрана */
  --sec: 64px;          /* между разделами */
  --gap: 16px;          /* внутри блоков */
  --card-pad: 24px;     /* внутри карточек */

  /* Скругления (16–24 px) */
  --r-card: 24px;
  --r-card-sm: 18px;
  --r-field: 16px;
  --r-pill: 999px;

  /* Плавающее меню */
  --nav-gap: 16px;
  --nav-h: 64px;

  --font-text: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display-weight: 500;
  --display-italic: italic;
  --display-track: -.015em;
  --caps-track: .22em;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 359px) {
  :root { --pad: 20px; --sec: 52px; --card-pad: 20px; --nav-gap: 12px; }
}

/* 1. «Ночь и золото» — эзотерика, таро, астрология */
:root[data-skin="esoteric"] {
  --bg: #15111F;
  --card: #211A33;
  --card-2: #2A2140;
  --ink: #F2EDE0;
  --mute: #B8AFC9;
  --accent: #D4AF5F;
  --accent-ink: #15111F;
  --accent-text: #D4AF5F;
  --accent-2: #D4AF5F;
  --line: rgba(242, 237, 224, .1);
  --line-strong: rgba(212, 175, 95, .36);
  --accent-soft: rgba(212, 175, 95, .1);
  --navbg: rgba(33, 26, 51, .76);
  --shadow: rgba(0, 0, 0, .3);
  --float: inset 0 1px 0 rgba(242, 237, 224, .04), 0 24px 48px -32px rgba(0, 0, 0, .8);
  --overlay: rgba(21, 17, 31, .94);
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --h1: clamp(46px, 14.4vw, 60px);
  --h2: clamp(40px, 12vw, 50px);
  --h3: clamp(29px, 8.8vw, 35px);
  --h4: 23px;
  --num: clamp(46px, 13.6vw, 58px);
  --toc: 34px;
  --display-lh: .94;
}

/* 2. «Тихий свет» — психологи, коучи, терапевты */
:root[data-skin="psychology"] {
  --bg: #F5F1EA;
  --card: #FFFDF9;
  --card-2: #EDE6DA;
  --ink: #22262A;
  --mute: #6B7075;
  --accent: #4E7C78;
  --accent-ink: #FFFFFF;
  --accent-text: #4E7C78;
  --accent-2: #C08A5B;
  --line: rgba(34, 38, 42, .09);
  --line-strong: rgba(78, 124, 120, .3);
  --accent-soft: rgba(78, 124, 120, .08);
  --navbg: rgba(255, 253, 249, .8);
  --shadow: rgba(34, 38, 42, .08);
  --float: 0 1px 2px rgba(34, 38, 42, .03), 0 22px 44px -30px rgba(34, 38, 42, .2);
  --overlay: rgba(245, 241, 234, .96);
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --h1: clamp(37px, 11.4vw, 47px);
  --h2: clamp(32px, 9.8vw, 40px);
  --h3: clamp(24px, 7.2vw, 28px);
  --h4: 19px;
  --num: clamp(38px, 11.4vw, 46px);
  --toc: 26px;
  --display-lh: 1.06;
}

/* 3. «Свежий день» — фитнес, нутрициология, йога */
:root[data-skin="wellness"] {
  --bg: #F1F6F2;
  --card: #FFFFFF;
  --card-2: #E3EEE6;
  --ink: #14231C;
  --mute: #5C6B63;
  --accent: #2E7D57;
  --accent-ink: #FFFFFF;
  --accent-text: #2E7D57;
  --accent-2: #F0B84A;
  --line: rgba(20, 35, 28, .08);
  --line-strong: rgba(46, 125, 87, .28);
  --accent-soft: rgba(46, 125, 87, .07);
  --navbg: rgba(255, 255, 255, .8);
  --shadow: rgba(20, 35, 28, .08);
  --float: 0 1px 2px rgba(20, 35, 28, .03), 0 22px 44px -30px rgba(20, 35, 28, .22);
  --overlay: rgba(241, 246, 242, .96);
  --font-display: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display-weight: 700;
  --display-italic: normal;
  --display-track: -.035em;
  --h1: clamp(35px, 10.8vw, 45px);
  --h2: clamp(30px, 9.2vw, 38px);
  --h3: clamp(22px, 6.8vw, 26px);
  --h4: 18px;
  --num: clamp(38px, 11.4vw, 48px);
  --toc: 24px;
  --display-lh: 1.02;
  --r-card: 22px;
}

/* Вёрстка «Приложения автора». Одна разметка на все скины: цвета, шрифты, размеры, отступы —
   только из tokens.css. Принципы: много воздуха, тонкие линии вместо теней, крупные заголовки
   и цифры, мелкие подписи капителью. Ширина 320–480 px, без горизонтальной прокрутки. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: 15px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
button, a, input { font-family: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 1.5px solid var(--accent-text); outline-offset: 3px; }

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: var(--tg-viewport-height, 100vh);
  height: var(--tg-viewport-height, 100dvh);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ── Общие элементы ── */
.cap { font-size: 10.5px; font-weight: 600; letter-spacing: var(--caps-track); text-transform: uppercase; color: var(--accent-text); line-height: 1.5; }
.hero h1, .title, .sec-title, .daily-title, .cta b, .pcard b, .f-title, .rev blockquote, .quote blockquote,
.stat b, .toc .n, .tp-top b, .monogram, .qmark, .pc-n, .daily-date, .r-date, .streak span, .mc-title {
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
}
.title { margin: 8px 0 0; font-size: var(--h2); line-height: var(--display-lh); overflow-wrap: anywhere; hyphens: auto; }
.sec { margin-top: var(--sec); }
.sec-head { margin: 0 var(--pad) 24px; }
.sec-title { margin: 8px 0 0; font-size: var(--h3); line-height: var(--display-lh); overflow-wrap: anywhere; }
.sec-hint { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--mute); max-width: 34em; }
.page-head { margin: 20px var(--pad) 28px; }
.bar { height: 2px; border-radius: 1px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 1px; background: var(--accent); transition: width .5s var(--ease); }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 4px var(--pad) 0; padding: 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent; font-size: 14px; font-weight: 500; }
.link svg { color: var(--accent-text); }

/* ── Шапка ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + var(--tg-content-safe-area-inset-top, 0px)) var(--pad) 8px; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 10.5px; font-weight: 600; letter-spacing: var(--caps-track); text-transform: uppercase; }
#brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-badge { flex: none; padding: 3px 8px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: 9px; letter-spacing: .14em; color: var(--accent-text); }
.demo-note { margin: 14px var(--pad) 0; text-align: center; font-size: 11.5px; line-height: 1.5; color: var(--mute); }
.mark { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; display: inline-block; }
.mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--accent); }
.tools { display: flex; gap: 6px; flex: none; }
.streak { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 58px; padding: 0 14px 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; color: var(--mute); }
.streak span { font-size: 19px; line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.streak.on { border-color: var(--line-strong); }
.streak.on svg { color: var(--accent-2); fill: var(--accent-2); fill-opacity: .22; }
.circ { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: flex; align-items: center; justify-content: center; padding: 0; }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: calc(var(--nav-h) + var(--nav-gap) * 2 + 40px + var(--tg-safe-area-inset-bottom, 0px)); -webkit-overflow-scrolling: touch; }

/* Плавное появление вкладки */
.scroll.enter > * { animation: rise .5s var(--ease) both; }
.scroll.enter > *:nth-child(2) { animation-delay: .04s; }
.scroll.enter > *:nth-child(3) { animation-delay: .08s; }
.scroll.enter > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Главная: герой ── */
.hero { padding: 24px var(--pad) 0; }
.hero h1 { margin: 14px 0 32px; font-size: var(--h1); line-height: var(--display-lh); overflow-wrap: anywhere; hyphens: auto; }
.hero h1 em { font-style: var(--display-italic); color: var(--accent-text); }
.hero-row { display: flex; gap: 24px; align-items: flex-end; }
.stats { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.role { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--mute); overflow-wrap: anywhere; }
.stat { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 4px; }
.stat:last-child { padding-bottom: 0; }
.stat b { font-size: var(--num); line-height: .9; font-variant-numeric: lining-nums tabular-nums; }
.stat span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); line-height: 1.3; min-width: 0; }
.lead { margin: 32px 0 0; font-size: 15px; line-height: 1.65; color: var(--mute); }

/* Арка под фото: заливка + тонкий контур со сдвигом */
.arch-wrap { --arch-w: clamp(124px, 38vw, 164px); position: relative; flex: none; width: var(--arch-w); height: calc(var(--arch-w) * 1.32); margin: 12px 12px 0 0; }
.arch-wrap.big { --arch-w: clamp(150px, 46vw, 190px); margin: 12px auto 0; }
.arch-line { position: absolute; left: 12px; top: -12px; width: 100%; height: 100%; border: 1px solid var(--line-strong); border-radius: calc(var(--arch-w) / 2) calc(var(--arch-w) / 2) 2px 2px; }
.arch { position: absolute; inset: 0; overflow: hidden; border-radius: calc(var(--arch-w) / 2) calc(var(--arch-w) / 2) 2px 2px; background: var(--card-2); }
.arch img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Нет фото — тонкие дуги и монограмма, как гравировка */
.arch.nophoto { display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, var(--card-2), var(--card)); }
.arch.nophoto::before { content: ""; position: absolute; inset: 10px 10px 0; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: calc(var(--arch-w) / 2 - 10px) calc(var(--arch-w) / 2 - 10px) 0 0; }
.arch.nophoto::after { content: ""; position: absolute; left: 50%; bottom: 18%; width: 28px; height: 1px; margin-left: -14px; background: var(--accent); }
.monogram { position: relative; font-size: calc(var(--arch-w) * .3); line-height: 1; color: var(--accent-text); font-style: var(--display-italic); margin-top: 6%; }

/* ── Блок ритуала ── */
.daily { margin: 48px var(--pad) 0; padding: var(--card-pad); border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--float); }
.daily-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.daily-date { font-size: 17px; color: var(--mute); white-space: nowrap; }
.daily-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; padding: 22px 0 24px; }
.deck { width: 80px; height: 116px; position: relative; padding: 0; border: 0; background: transparent; margin-left: 6px; }
.deck .cardback { position: absolute; inset: 0; transition: transform .5s var(--ease); }
.deck .b3 { transform: rotate(-12deg) translate(-8px, 6px); opacity: .35; }
.deck .b2 { transform: rotate(-5deg) translate(-3px, 2px); opacity: .65; }
.deck .b1 { transform: rotate(4deg); }
.deck:hover .b1, .deck:focus-visible .b1 { transform: rotate(6deg) translateY(-4px); }
.daily-txt { min-width: 0; }
.daily-title { display: block; font-size: var(--h3); line-height: var(--display-lh); overflow-wrap: anywhere; hyphens: auto; }
.daily p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--mute); overflow-wrap: anywhere; }
.daily-foot { display: flex; flex-direction: column; gap: 14px; }
.daily-foot .btn { width: 100%; }
.streak-line { text-align: center; font-size: 12px; color: var(--mute); line-height: 1.45; }
.streak-line svg { display: inline-block; vertical-align: -3px; margin-right: 5px; }
.streak-line.on { color: var(--ink); }
.streak-line.on svg { color: var(--accent-2); fill: var(--accent-2); fill-opacity: .22; }
@media (max-width: 359px) {
  .daily-body { gap: 16px; }
  .deck { width: 62px; height: 90px; }
}

/* ── Кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border: 0; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: 14.5px; font-weight: 600; letter-spacing: .01em; text-decoration: none; text-align: center; line-height: 1.2; transition: transform .2s var(--ease), opacity .2s; }
.btn:active { transform: scale(.98); opacity: .92; }
.btn svg { flex: none; }
.btn-line { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-line svg { color: var(--accent-text); }
.btn.wide { display: flex; margin: 0 var(--pad); }
@media (max-width: 359px) { .btn { padding: 0 20px; } }

/* ── «С чего начать»: оглавление журнала ── */
.meter { display: flex; align-items: center; gap: 16px; margin: 0 var(--pad) 8px; }
.meter .count { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.meter .bar { flex: 1; }
.toc { list-style: none; margin: 0 var(--pad); padding: 0; }
.step { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.step-link { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 18px; padding: 22px 0; text-decoration: none; }
.toc .n { flex: none; width: 1.5em; font-size: var(--toc); line-height: 1; font-style: var(--display-italic); color: var(--accent-text); font-variant-numeric: lining-nums tabular-nums; }
.step .txt { flex: 1; min-width: 0; }
.step .txt b { display: block; font-size: 16px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; transition: color .3s; }
.step .txt span { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); line-height: 1.4; }
.step.is-done .n { opacity: .45; }
.step.is-done .txt b { color: var(--mute); text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
@media (max-width: 359px) { .step-link { gap: 12px; } .step .txt b { font-size: 15px; } }

/* Чекбокс «Изучено» — тонкий круг */
.done { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 0; border: 0; background: transparent; font-size: 13px; color: var(--mute); }
.done.compact { width: 44px; justify-content: center; padding: 0; flex: none; }
.done .box { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; color: transparent; transition: background .25s, border-color .25s, color .25s; }
.done.on { color: var(--ink); }
.done.on .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Прогресс по темам */
.tlist { margin: 0 var(--pad); border-top: 1px solid var(--line); }
.tprog { display: flex; flex-direction: column; gap: 14px; width: 100%; padding: 20px 0; min-height: 64px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.tp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.tp-top b { font-size: var(--h4); line-height: 1.15; overflow-wrap: anywhere; min-width: 0; }
.tp-n { flex: none; font-size: 12px; letter-spacing: .08em; color: var(--mute); font-variant-numeric: tabular-nums; }

/* Цитата на главной и отзывы */
.quote { margin: 0 var(--pad); padding: 0; }
.qmark { display: block; height: .5em; font-size: 88px; line-height: 1; color: var(--accent-text); opacity: .7; }
.quote blockquote, .rev blockquote { margin: 0; font-size: var(--h3); line-height: 1.22; font-style: var(--display-italic); overflow-wrap: anywhere; white-space: pre-line; }
[data-skin="wellness"] .quote blockquote, [data-skin="wellness"] .rev blockquote { font-weight: 600; font-size: calc(var(--h3) * .86); line-height: 1.3; }
.quote figcaption, .rev figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.quote figcaption b, .rev figcaption b { font-weight: 600; }
.quote figcaption span, .rev figcaption span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.quote + .link { margin-top: 20px; }

/* Призыв к программам */
.cta { margin: var(--sec) var(--pad) 0; padding: 32px var(--card-pad); border-radius: var(--r-card); background: var(--accent-soft); border: 1px solid var(--line-strong); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta b { font-size: var(--h3); line-height: var(--display-lh); overflow-wrap: anywhere; }
.cta p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: var(--mute); }
.foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin: var(--sec) var(--pad) 0; padding: 22px 0 0; border-top: 1px solid var(--line); font-size: 10.5px; letter-spacing: var(--caps-track); text-transform: uppercase; color: var(--mute); text-decoration: none; overflow-wrap: anywhere; }
.foot .mark { width: 14px; height: 14px; }
.foot .mark::after { inset: 4px; }

/* ── Материалы ── */
.search { display: flex; align-items: center; gap: 12px; margin: 0 var(--pad) 14px; min-height: 52px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--mute); transition: border-color .2s; }
.search svg { flex: none; }
.search input { flex: 1; min-width: 0; height: 50px; border: 0; background: transparent; font-size: 15px; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--mute); }
.search:focus-within { border-color: var(--line-strong); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--pad) 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; font-size: 13px; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.seg { display: flex; margin: 0 var(--pad) 18px; padding: 4px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.seg button { flex: 1; min-width: 0; min-height: 36px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: 13px; color: var(--mute); padding: 0 6px; transition: background .2s, color .2s; }
.seg button.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.found { margin: 0 var(--pad) 14px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.mcard { margin: 0 var(--pad) 14px; padding: 22px var(--card-pad) 10px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--float); transition: border-color .3s; }
.mcard.is-done { border-color: var(--line-strong); }
.mc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mc-meta { min-width: 0; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); overflow-wrap: anywhere; line-height: 1.5; }
.badge { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.badge.paid { border-color: var(--line-strong); color: var(--ink); }
.mc-title { display: block; margin-top: 14px; font-size: var(--h4); line-height: 1.22; text-decoration: none; overflow-wrap: anywhere; }
.mc-desc { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--mute); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mc-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.mc-open { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.empty { margin: 8px var(--pad) 14px; padding: 36px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-card); text-align: center; display: flex; flex-direction: column; gap: 8px; }
.empty b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--h4); }
.empty span { font-size: 13.5px; line-height: 1.6; color: var(--mute); }

/* ── Программы ── */
.pcard { margin: 0 var(--pad) 14px; padding: 28px var(--card-pad); border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--float); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.pc-top { display: flex; align-items: baseline; gap: 14px; width: 100%; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pc-n { font-size: var(--toc); line-height: 1; font-style: var(--display-italic); color: var(--accent-text); }
.pcard b { font-size: var(--h3); line-height: var(--display-lh); overflow-wrap: anywhere; hyphens: auto; }
.pcard p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--mute); }
.pcard .btn { margin-top: 10px; }

/* ── Обо мне ── */
.about-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 28px var(--pad) 32px; }
.about-head .arch-wrap { margin-bottom: 32px; }
.about-head .title { margin-top: 10px; }
.about-head .role { margin: 12px 0 0; font-size: 14px; }
.about-text { margin: 0 var(--pad) 32px; font-size: 15.5px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.slist { margin: 0 var(--pad); border-top: 1px solid var(--line); }
.social { display: flex; align-items: center; gap: 12px; padding: 18px 0; min-height: 68px; border-bottom: 1px solid var(--line); text-decoration: none; }
.social .txt { flex: 1; min-width: 0; }
.social .txt b { display: block; font-size: 16px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.social .txt span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--mute); }
.social > svg { color: var(--accent-text); flex: none; }

/* ── Отзывы ── */
.rev { margin: 0 var(--pad) 14px; padding: 24px var(--card-pad) var(--card-pad); border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--float); }

/* ── Плавающее нижнее меню ── */
.nav { position: absolute; left: var(--nav-gap); right: var(--nav-gap); bottom: calc(var(--nav-gap) + var(--tg-safe-area-inset-bottom, 0px)); height: var(--nav-h); display: flex; padding: 6px; border-radius: calc(var(--nav-h) / 2); background: var(--navbg); border: 1px solid var(--line); box-shadow: var(--float); z-index: 6; -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 1px; border: 0; background: transparent; color: var(--mute); border-radius: calc((var(--nav-h) - 12px) / 2); transition: color .2s, background .25s; }
.tab .ic { display: flex; }
.tab .lb { max-width: 100%; font-size: 10px; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.on { color: var(--accent-text); background: var(--accent-soft); }
.tab.on .lb { font-weight: 600; }
@media (max-width: 359px) { .tab .lb { font-size: 9px; letter-spacing: 0; } .tab svg { width: 19px; height: 19px; } }

.toast { position: absolute; left: var(--pad); right: var(--pad); bottom: calc(var(--nav-h) + var(--nav-gap) * 2 + var(--tg-safe-area-inset-bottom, 0px)); padding: 14px 18px; border-radius: var(--r-field); background: var(--ink); color: var(--bg); font-size: 13px; line-height: 1.45; z-index: 30; }

/* ══ Рубашка карты: свой узор у каждого скина ══ */
.cardback { display: block; width: 100%; height: 100%; border-radius: 16px; border: 1px solid var(--line-strong); box-shadow: var(--float); position: relative; overflow: hidden; }
.cardback.small { border-radius: 10px; }
.cardback::after { content: ""; position: absolute; inset: 7%; border-radius: inherit; border: 1px solid var(--line-strong); }
[data-skin="esoteric"] .cardback {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 17%, rgba(212,175,95,.75) 17.5% 18.5%, transparent 19% 27%, rgba(212,175,95,.35) 27.5% 28%, transparent 28.5%),
    radial-gradient(circle at 50% 50%, rgba(212,175,95,.95) 0 5%, transparent 5.5%),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(212,175,95,.16) 0 3deg, transparent 3deg 15deg),
    radial-gradient(1px 1px at 20% 18%, #F2EDE0 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 26%, #F2EDE0 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 80%, #F2EDE0 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 72%, #F2EDE0 50%, transparent 51%),
    linear-gradient(160deg, #2A2140, #15111F);
}
[data-skin="psychology"] .cardback {
  background:
    radial-gradient(circle at 30% 34%, rgba(78,124,120,.32) 0 18%, transparent 18.5%),
    radial-gradient(circle at 66% 58%, rgba(192,138,91,.26) 0 22%, transparent 22.5%),
    radial-gradient(circle at 42% 72%, rgba(78,124,120,.18) 0 12%, transparent 12.5%),
    linear-gradient(170deg, #FFFDF9, #EDE6DA);
}
[data-skin="wellness"] .cardback {
  background:
    radial-gradient(circle at 50% 38%, #F0B84A 0 13%, transparent 13.5%),
    repeating-conic-gradient(from 0deg at 50% 38%, rgba(240,184,74,.5) 0 6deg, transparent 6deg 30deg),
    radial-gradient(ellipse 80% 40% at 50% 100%, #2E7D57 0 60%, transparent 61%),
    radial-gradient(ellipse 70% 30% at 20% 92%, rgba(46,125,87,.55) 0 60%, transparent 61%),
    linear-gradient(180deg, #E3EEE6, #FFFFFF);
}
[data-skin="wellness"] .cardback::after { inset: 6%; }

/* ══ Окно ритуала ══ */
.ritual { position: fixed; inset: 0; z-index: 20; background: var(--overlay); opacity: 0; transition: opacity .25s ease; display: flex; justify-content: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ritual.show { opacity: 1; }
.r-in { width: 100%; max-width: 480px; height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: calc(16px + var(--tg-content-safe-area-inset-top, 0px)) var(--pad) calc(24px + var(--tg-safe-area-inset-bottom, 0px)); }
.r-head { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.r-date { margin-top: 6px; font-size: var(--h3); line-height: 1; }
.stage { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; padding: 20px 0; perspective: 1600px; min-height: 0; }
.card3d {
  --w: min(72vw, 300px, calc((100dvh - 300px) / 1.5));
  width: max(var(--w), 190px);
  aspect-ratio: 2 / 3;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  transform-style: preserve-3d;
  transition: transform 1s var(--ease);
  animation: float 4.5s ease-in-out infinite;
}
.card3d.flipped { transform: rotateY(180deg); animation: none; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.face.back .cardback { border-radius: 22px; }
.back-name { position: absolute; left: 12%; right: 12%; bottom: 11%; text-align: center; font-size: 9.5px; letter-spacing: var(--caps-track); text-transform: uppercase; color: var(--ink); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-skin="esoteric"] .back-name { color: #F2EDE0; }
.face.front { transform: rotateY(180deg); background: var(--card); border: 1px solid var(--line-strong); box-shadow: var(--float); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16% 12%; text-align: center; }
.f-frame { position: absolute; inset: 10px; border-radius: 15px; border: 1px solid var(--line); pointer-events: none; }
.f-num { position: absolute; top: 7%; left: 0; right: 0; font-size: 9.5px; letter-spacing: var(--caps-track); color: var(--accent-text); }
.f-title { font-size: calc(var(--h3) * 1.08); line-height: var(--display-lh); color: var(--ink); overflow-wrap: anywhere; }
.f-rule { width: 36px; height: 1px; background: var(--accent); }
.f-text { font-size: 14px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.f-advice { font-size: 12.5px; line-height: 1.5; color: var(--mute); font-style: italic; overflow-wrap: anywhere; }
.f-channel { position: absolute; bottom: 6.5%; left: 0; right: 0; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.r-hint { margin: 0 0 8px; font-size: 13px; color: var(--mute); text-align: center; }
.r-acts { width: 100%; display: flex; gap: 10px; animation: rise .45s .5s var(--ease) both; }
.r-acts .btn { flex: 1; min-width: 0; padding: 0 14px; }
@media (max-width: 399px) { .r-acts { flex-direction: column; } .r-acts .btn { flex: none; } }
@media (max-width: 359px) { .f-text { font-size: 13px; } .face.front { gap: 10px; } }
@media (max-height: 640px) { .f-text { font-size: 12.5px; } .face.front { gap: 8px; } .f-advice { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .scroll.enter > *, .r-acts { animation: none; }
  .card3d { animation: none; transition: none; }
  .card3d .face { transition: opacity .3s; }
  .card3d.flipped { transform: none; }
  .card3d.flipped .face.back { opacity: 0; }
  .card3d .face.front { transform: none; opacity: 0; }
  .card3d.flipped .face.front { opacity: 1; }
}

/* Акцент клиента (проверен на контраст при сборке) */
:root:root{--accent:#D4AF5F;--accent-ink:#111111;--accent-text:#D4AF5F;}