/* Krause.pro — сайт и мини-приложение в Telegram.

   Палитра нейтральная — по просьбе заказчицы и в тон её фотографий:
   тёплый льняной фон, песок, глина, графитовый текст. Бордовый (#6E2233,
   по её образцу) остался одним акцентом — кнопки и один тёмный блок.
   Прежние голубой, розовый и салатовый ушли вместе с полосатым фоном.

   Между полосами — фигурные переходы (волна, фестоны), а не прямой стык.

   Шрифты свои, в public/fonts: Playfair Display и Inter (SIL OFL).
   С чужого домена их не подключить — CSP разрешает только свой. */

@font-face {
  font-family: 'Playfair';
  src: url('/fonts/playfair-cyrillic.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Playfair';
  src: url('/fonts/playfair-cyrillic-italic.woff2') format('woff2');
  font-weight: 400 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'InterVar';
  src: url('/fonts/inter-cyrillic.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  --stone: #CDBFAE;          /* тёплый серо-бежевый, крупные подложки */
  --taupe: #7A6D61;          /* подписи разделов, вторичный текст на светлом */
  --sand: #ECE5DB;           /* главная песочная полоса */
  --linen: #F4F0EA;          /* светлая полоса */
  --line: #E2D9CE;           /* линии и рамки */

  --wine: #6E2233;
  --wine-soft: #97455A;
  /* Бордо блоков — по образцу заказчика (приглушённый винный с фактурой).
     #800010 от дизайнера на больших плоскостях читался красным, и заказчик
     его отверг: «здесь должен быть бордовый, который я присылал». */
  --wine-deep: #6E2233;
  --wine-pale: #F6E9EC;

  --wheat: #D8C8B2;          /* кружки под цифрами, точки у подписей */
  --bark: #8A7560;           /* текст на пшеничном */
  --oat: #EFE8DE;

  --clay: #E3D6C8;           /* глиняная полоса */
  --shell: #F8F4EF;          /* почти белая полоса */

  --cream: #FAF8F5;
  --paper: #FFFFFF;
  --ink: #241F26;
  --ink-soft: #6B6873;

  --r: 18px;
  --shadow: 0 14px 40px rgba(72, 56, 44, .14);
  --shadow-soft: 0 6px 20px rgba(72, 56, 44, .10);
  --display: 'Playfair', Georgia, serif;
  --sans: 'InterVar', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --pad: 84px;
  --edge: 44px;

  /* Волна верхнего края полосы: рисуется маской, заливка — фон самой
     полосы, так что переход работает между любыми двумя цветами. */
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath d='M0 48V22C180 0 360 0 540 18S900 44 1080 30 1320 6 1440 20V48Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.gated { overflow: hidden; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.06; margin: 0; }
h1 { font-size: clamp(36px, 5.2vw, 66px); letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 4.6vw, 54px); letter-spacing: -.015em; }
h3 { font-size: 21px; line-height: 1.25; margin-bottom: 8px; }
p { margin: 0 0 14px; }
a { color: inherit; }

.wrap { width: min(1140px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.it { font-style: italic; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: 11px;
  font-weight: 500; color: var(--taupe);
}
.dot::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--wheat); margin-right: 10px; vertical-align: 1px;
}
.hand {
  font-family: var(--display); font-style: italic; font-size: 19px;
  color: var(--wine-soft); transform: rotate(-2.5deg); display: inline-block; line-height: 1.35;
}

/* --- верхняя панель: разделы приложения ---
   Главная, разбор и кабинет — сверху, как просил заказчик: в Telegram
   снизу экрана своя панель клиента, и вторая под ней теснилась бы. */
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 245, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.logo {
  font-family: var(--display); font-size: 24px; text-decoration: none;
  color: var(--wine); margin: 0; line-height: 1;
}
.logo b { font-weight: 400; font-style: italic; color: var(--taupe); }
.tabs-top {
  margin-left: auto; display: flex; gap: 4px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.tabs-top a {
  text-decoration: none; font-size: 14px; padding: 8px 18px; border-radius: 999px;
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.tabs-top a i { font-style: normal; font-size: 13px; }
.tabs-top a[aria-current="page"] { background: var(--wine); color: #fff; }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: 0; border-radius: 999px;
  font: 500 14px/1 var(--sans); letter-spacing: .03em; cursor: pointer;
  text-decoration: none; transition: transform .14s ease, background .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-wine { background: var(--wine); color: #fff; box-shadow: 0 8px 22px rgba(110, 34, 51, .26); }
.btn-wine:hover { background: var(--wine-soft); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--wine); border: 1px solid currentColor; }
.btn-cream { background: var(--cream); color: var(--wine); }
.btn[disabled] { opacity: .45; cursor: default; box-shadow: none; }

/* --- полосы и фигурные переходы --- */
section { padding: var(--pad) 0; position: relative; }
.band-sand { background: var(--sand); }
.band-linen { background: var(--linen); }
.band-cream { background: var(--cream); }
.band-shell { background: var(--shell); }
.band-clay { background: var(--clay); }
/* Фактура как на образце: мелкая точка поверх винного. Рисуется
   градиентом — фигурный край наследует её вместе с фоном. */
/* .card.wine-card — точнее, чем .card ниже по файлу, иначе тот перебил бы фон. */
.band-wine, .card.wine-card, .foot, .profile-card {
  background: radial-gradient(rgba(0, 0, 0, .16) .8px, transparent 1.3px) 0 0 / 5px 5px, var(--wine-deep);
}
.band-wine { color: #fff; }
.wine-card { color: #fff; }
.wine-card .muted { color: rgba(255, 235, 242, .8); }
.wine-card .eyebrow, .wine-card h3 { color: #fff; }
.band-wine .muted { color: rgba(255, 235, 242, .78); }
.band-wine .eyebrow { color: var(--clay); }

/* Фигурный переход рисует НИЖНЯЯ полоса: её фон выступает вверх волной
   или фестонами поверх края предыдущей. Так порядок наложения задаёт сама
   разметка — прежний приём (верхняя полоса вырезает край, нижняя лежит
   под ней) ломался, стоило двум таким полосам встать подряд: следующая
   ложилась сверху и закрывала вырез. */
.top-wave::before, .top-scallop::before {
  content: ''; position: absolute; left: 0; right: 0; background: inherit; pointer-events: none;
}
.top-wave::before {
  top: calc(var(--edge) * -1 + 1px); height: var(--edge);
  -webkit-mask: var(--wave) center / 100% 100% no-repeat;
  mask: var(--wave) center / 100% 100% no-repeat;
}
.top-scallop::before {
  top: -21px; height: 22px;
  -webkit-mask: radial-gradient(circle at 22px 22px, #000 21.5px, transparent 22px) left top / 44px 22px repeat-x;
  mask: radial-gradient(circle at 22px 22px, #000 21.5px, transparent 22px) left top / 44px 22px repeat-x;
}

/* --- первый экран: карточка в рамке на голубом --- */
.hero { background: var(--sand); padding: 34px 0 44px; }
.hero-frame {
  position: relative; background: var(--cream); border-radius: 30px;
  padding: 52px 0 0 56px; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: end;
  box-shadow: 0 24px 60px rgba(72, 56, 44, .18);
  outline: 1.5px solid rgba(110, 34, 51, .45); outline-offset: 10px;
}
.hero-text { padding-bottom: 52px; }
.hero-text h1 { margin: 14px 0 20px; }
.hero-text h1 .it { color: var(--wine); }
.hero-text .lead { font-size: 18px; color: var(--ink-soft); max-width: 44ch; }
.hero-photo-wrap { position: relative; align-self: end; }
/* Фон снимка чуть серее карточки — края кадра уводим в прозрачность,
   низ режется краем карточки и остаётся плотным. */
.hero-photo {
  width: 100%; display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 86%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 14%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 86%, transparent 100%),
              linear-gradient(to bottom, transparent 0, #000 14%);
  mask-composite: intersect;
}
.hero-note { position: absolute; right: 18px; top: 16%; max-width: 150px; font-size: 17px; color: var(--wine); }
.hero-perks { display: flex; gap: 22px; flex-wrap: wrap; margin: 24px 0 28px; color: var(--ink-soft); font-size: 14px; }
.hero-perks span { display: inline-flex; align-items: center; gap: 10px; }
.hero-perks i {
  font-style: normal; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px;
  background: var(--oat); color: var(--bark);
}

/* --- бегущая строка ---
   Лента из двух одинаковых половин; сдвиг ровно на половину ширины, и
   отступ живёт внутри каждой половины, а не между ними — иначе на стыке
   круга лента дёргается. */
.marquee { background: var(--clay); color: var(--wine); overflow: hidden; padding: 14px 0; }
.marquee-track {
  display: flex; width: max-content; animation: slide 40s linear infinite;
  font-family: var(--display); font-style: italic; font-size: 21px; white-space: nowrap;
}
.marquee-track span { padding-right: 32px; }
.marquee-track b { color: var(--bark); font-weight: 400; margin: 0 14px; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation-duration: 160s; } }

/* --- заголовки секций --- */
.sec-head { margin: 0 auto 40px; max-width: 640px; text-align: center; }
.sec-head .eyebrow { display: block; margin-bottom: 14px; }
.sec-head p { font-size: 17px; margin: 14px auto 0; max-width: 52ch; }

/* --- карточки --- */
.card { background: var(--paper); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow-soft); }
.tilt { transform: rotate(-1.4deg); }
.tilt-r { transform: rotate(1.2deg); }

.paper-sheet {
  background: var(--cream); border-radius: 10px; padding: 34px; position: relative;
  box-shadow: 0 20px 50px rgba(72, 56, 44, .22);
}

.player {
  aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden;
  background: #2A2521; display: grid; place-items: center;
}
.player video, .player iframe { width: 100%; height: 100%; border: 0; }
.player .stub { color: #D8CFC4; font-family: var(--display); font-style: italic; font-size: 17px; padding: 0 16px; text-align: center; }
.video-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 44px; align-items: center; }

/* Превью-кадр урока: уголки и кружок воспроизведения — читается как
   видео, а не как значок. */
.video-frame {
  aspect-ratio: 16/10; border-radius: 12px; margin-bottom: 16px;
  background: linear-gradient(155deg, var(--linen), var(--shell));
  position: relative; overflow: hidden;
}
.video-frame::before, .video-frame::after {
  content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid rgba(110, 34, 51, .35);
}
.video-frame::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.video-frame::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.video-frame .play { position: absolute; inset: 0; display: grid; place-items: center; }
.video-frame .play span {
  width: 52px; height: 52px; border-radius: 50%; background: var(--wine); color: #fff;
  display: grid; place-items: center; font-size: 18px; box-shadow: 0 8px 20px rgba(110, 34, 51, .35);
}

/* --- два пути к разбору --- */
.ways { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; align-items: stretch; }
.way { display: flex; flex-direction: column; gap: 10px; }
.way.main { color: #fff; }
.way.main .muted { color: rgba(255, 235, 242, .8); }
.way.main .btn { align-self: flex-start; margin-top: auto; }
.prompt-box {
  background: var(--linen); border-left: 4px solid var(--wheat); border-radius: 12px;
  padding: 16px 18px; max-height: 170px; overflow: auto;
  font-size: 13.5px; white-space: pre-wrap; color: var(--ink-soft); font-style: italic;
}

/* --- «что вы получите» на бордо --- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.bene .n {
  font-family: var(--display); font-size: 24px; color: var(--wine-deep);
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wheat); margin-bottom: 16px;
}
.bene h3 { color: #fff; }

.ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--linen); color: var(--taupe); font-size: 20px; margin-bottom: 14px;
}

/* --- FAQ --- */
.faq details { border-bottom: 1px solid rgba(36, 31, 38, .14); padding: 20px 4px; }
.faq summary {
  cursor: pointer; list-style: none; font-family: var(--display); font-size: 21px;
  display: flex; gap: 16px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; font-size: 24px; color: var(--wine); }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 12px 0 0; color: var(--ink-soft); max-width: 68ch; }

.final { text-align: center; }
.foot { padding: 30px 0; color: rgba(255, 235, 242, .72); font-size: 13px; }
.foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 13px 24px; border-radius: 999px;
  font-size: 14px; z-index: 90; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
}

/* --- заглушка «откройте в Telegram» --- */
.tg-gate {
  position: fixed; inset: 0; z-index: 100; background: var(--sand);
  display: grid; place-items: center; padding: 20px;
}
.tg-gate-card {
  background: var(--cream); border-radius: 28px; padding: 40px 32px; max-width: 420px; text-align: center;
  outline: 1.5px solid rgba(110, 34, 51, .45); outline-offset: 8px; box-shadow: var(--shadow);
}
.tg-gate-card .logo { font-size: 30px; margin-bottom: 18px; }
.tg-gate-card h2 { font-size: 32px; margin-bottom: 12px; }

/* ===== приложение: кабинет и чат =====
   Узкая колонка: внутри Telegram ширина — экран телефона; на компьютере
   (Telegram Desktop) та же колонка стоит по центру. */
.app-page { background: var(--linen); min-height: 100vh; padding-bottom: 40px; }
.app-col { width: min(720px, 100% - 28px); margin: 0 auto; }

.profile-card {
  margin-top: 18px; color: #fff; border-radius: 24px;
  padding: 24px; display: flex; gap: 18px; align-items: center; position: relative; overflow: hidden;
}
.profile-card::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px;
  border-radius: 50%; border: 22px solid rgba(231, 193, 213, .16);
}
.avatar {
  width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--clay); color: var(--wine-deep); display: grid; place-items: center;
  font-family: var(--display); font-size: 28px; border: 3px solid rgba(255, 255, 255, .85);
}
.profile-card h1 { font-size: clamp(24px, 5vw, 32px); color: #fff; }
.profile-card .eyebrow { color: var(--clay); }
.chip {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: rgba(255, 255, 255, .14); color: #fff;
}
.chip.ok { background: var(--wheat); color: var(--wine-deep); }

/* путь: четыре шага кружками */
.path { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0 6px; position: relative; }
.path::before {
  content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 17px; height: 2px; background: var(--line);
}
.path-step { display: grid; justify-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--ink-soft); text-align: center; }
.path-step i {
  font-style: normal; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--line); font-size: 14px; color: var(--ink-soft);
}
.path-step.on i { background: var(--wine); border-color: var(--wine); color: #fff; }
.path-step.now i { border-color: var(--wine); color: var(--wine); box-shadow: 0 0 0 5px rgba(110, 34, 51, .12); }
.path-step.on, .path-step.now { color: var(--ink); }

.panel { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-soft); margin-top: 16px; }
.panel h2 { font-size: 23px; margin-bottom: 8px; }
.panel-title { font-family: var(--display); font-size: 23px; margin: 30px 0 2px; }

.next { background: var(--shell); border: 1.5px solid var(--clay); box-shadow: none; }
.next .eyebrow { color: var(--wine); }

.lesson { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; cursor: pointer; }
.lesson + .player + .lesson, .lesson + .lesson { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.lesson .video-frame { margin: 0; }
.lesson .video-frame .play span { width: 38px; height: 38px; font-size: 13px; }
.lesson h3 { font-size: 18px; margin-bottom: 4px; }
.lesson.locked { opacity: .5; cursor: default; }
.tag { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.tag.done { color: var(--bark); }

.materials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.mat { background: #fff; border-radius: 18px; padding: 18px 16px; box-shadow: var(--shadow-soft); position: relative; min-height: 128px; }
.mat .mi {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-size: 20px; margin-bottom: 12px; background: var(--shell); color: var(--wine);
}
.mat b { display: block; font-weight: 500; }
.mat small { color: var(--ink-soft); font-size: 12px; }
.mat.locked::after { content: '🔒'; position: absolute; top: 14px; right: 14px; font-size: 13px; opacity: .55; }
.mat.locked .mi { background: var(--linen); color: var(--ink-soft); }

.offer { border: 2px solid var(--wine); position: relative; overflow: hidden; }
.offer-ribbon {
  position: absolute; top: 16px; right: -34px; transform: rotate(35deg);
  background: var(--wheat); color: var(--wine-deep); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 40px;
}
.countdown { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 14px; }
.countdown b { font-family: var(--display); font-size: 46px; color: var(--wine); font-weight: 400; line-height: 1; }
.offer-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--wine); }

/* ===== окно разбора ===== */
/* Чат — всегда колонка телефона: на широком экране (Telegram Desktop) по
   бокам просто фон, как просил заказчик, а не пузыри на всю ширину. */
.chat-page { background: var(--sand); }
.chat-app {
  height: calc(100vh - 63px); height: calc(100dvh - 63px);
  width: min(480px, 100%); margin: 0 auto;
  display: flex; flex-direction: column; background: var(--shell);
  box-shadow: 0 0 60px rgba(72, 56, 44, .25);
}
.chat-app .chat-log, .chat-app .chat-form { width: 100%; }
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #fff; border-bottom: 1px solid var(--clay);
}
.chat-head .ava { position: relative; flex: none; }
.chat-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; display: block; }
.chat-head .ava::after {
  content: ''; position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--bark); border: 2px solid #fff;
}
.chat-head b { display: block; font-weight: 500; line-height: 1.3; }
.chat-head small { color: var(--ink-soft); font-size: 12px; }
.chat-progress {
  margin-left: auto; font-size: 12px; color: var(--wine); background: var(--shell);
  border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.chat-log {
  flex: 1; overflow-y: auto; width: min(760px, 100%); margin: 0 auto;
  padding: 18px 14px; display: flex; flex-direction: column; gap: 12px;
}
.day { align-self: center; font-size: 12px; color: var(--ink-soft); background: rgba(255, 255, 255, .7); padding: 4px 12px; border-radius: 999px; }
.bubble { max-width: 84%; padding: 12px 16px; border-radius: 18px; white-space: pre-wrap; font-size: 15px; line-height: 1.55; }
.bubble.bot { background: #fff; border-bottom-left-radius: 5px; box-shadow: 0 2px 8px rgba(110, 34, 51, .06); }
.bubble.me { background: var(--wine); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.bubble.sys { background: rgba(255, 255, 255, .6); color: var(--wine); font-size: 13.5px; align-self: center; text-align: center; font-style: italic; }
.bubble.quote { align-self: flex-end; background: var(--wine); color: #fff; border-left: 4px solid var(--wheat); }
.bubble.quote summary { cursor: pointer; font-weight: 500; list-style: none; }
.bubble.quote summary::-webkit-details-marker { display: none; }
.bubble.quote p { margin: 10px 0 0; font-size: 13px; opacity: .85; white-space: pre-wrap; }
.typing { display: inline-flex; gap: 5px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--wine-soft); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25 } 30% { opacity: 1 } }

.chat-card { background: #fff; border-radius: 18px; padding: 14px; max-width: 84%; box-shadow: 0 2px 8px rgba(110, 34, 51, .06); text-decoration: none; }
.chat-card h3 { font-size: 17px; margin: 10px 0 2px; }
.chat-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; }
.chat-actions .btn { width: 100%; }

.chat-form {
  width: min(760px, 100%); margin: 0 auto; display: flex; gap: 10px; align-items: flex-end;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--clay);
}
.chat-form textarea {
  flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); border-radius: 20px;
  padding: 11px 16px; font: 15px/1.45 var(--sans); background: var(--cream); color: var(--ink); max-height: 140px;
}
.chat-form textarea:focus { outline: 2px solid var(--clay); outline-offset: 0; }
.send {
  width: 46px; height: 46px; border-radius: 50%; border: 0; flex: none; cursor: pointer;
  background: var(--wine); color: #fff; font-size: 17px; display: grid; place-items: center;
}
.send[disabled] { opacity: .45; cursor: default; }

/* ===== адаптив ===== */
@media (max-width: 960px) {
  :root { --pad: 60px; --edge: 32px; }
  .hero-frame { grid-template-columns: 1fr; padding: 34px 26px 0; }
  .hero-text { padding-bottom: 0; }
  .hero-photo-wrap { max-width: 400px; margin: 0 auto; }
  .hero-note { right: -4px; font-size: 15px; max-width: 118px; }
  .video-grid, .grid2, .ways { grid-template-columns: 1fr; gap: 26px; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr; }
  .paper-sheet { padding: 22px; }
}
@media (max-width: 600px) {
  .appbar .logo { display: none; }
  .tabs-top { margin: 0 auto; width: 100%; justify-content: space-between; }
  .tabs-top a { flex: 1; justify-content: center; padding: 8px 6px; font-size: 13px; }
  .hero { padding: 22px 0 32px; }
  .hero-frame { border-radius: 22px; outline-offset: 6px; }
  .grid4 { grid-template-columns: 1fr; }
  .materials { grid-template-columns: 1fr 1fr; }
  .lesson { grid-template-columns: 92px 1fr; }
  .chat-progress { display: none; }
}

/* ===== сайт: главная по ТЗ, программа, клуб, документы ===== */

/* Первый экран: карточка в рамке, фото семьи на всю высоту правой
   колонки — оно само объясняет «мама семерых детей». */
.hero-frame.split { padding: 0; grid-template-columns: 1.05fr .95fr; align-items: stretch; }
.hero-frame.split .hero-text { padding: 52px 20px 48px 56px; }
.hero-photo-fill { min-height: 100%; position: relative; }
.hero-photo-fill img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; }
.who { font-size: 15px; color: var(--taupe); margin: 0 0 6px; }
.who b { color: var(--ink); font-weight: 500; }

.offer-box {
  display: flex; gap: 16px; align-items: center; margin: 22px 0 24px;
  padding: 14px 18px; border-radius: 16px; background: var(--linen); border: 1px solid var(--line);
}
.offer-box .date {
  flex: none; text-align: center; font-family: var(--display); line-height: 1; color: var(--wine);
  border-right: 1px solid var(--line); padding-right: 16px;
}
.offer-box .date b { display: block; font-size: 30px; font-weight: 400; }
.offer-box .date small { font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe); }
.offer-box p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.offer-box strong { display: block; color: var(--ink); font-weight: 500; font-size: 15.5px; margin-bottom: 2px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* бесплатный материал */
.gift { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.gift-items { display: grid; gap: 12px; margin: 18px 0 26px; }
.gift-item { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-soft); }
.gift-item i {
  font-style: normal; flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--oat); color: var(--wine);
}
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--wheat); color: var(--wine); font-size: 12px; display: grid; place-items: center;
}

/* интенсив по дням */
.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.day-card { background: #fff; border-radius: var(--r); padding: 26px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 8px; }
.day-card .when { display: flex; align-items: baseline; gap: 10px; }
.day-card .when b { font-family: var(--display); font-size: 42px; font-weight: 400; color: var(--wine); line-height: 1; }
.day-card .when span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe); }
.day-card.last { outline: 1.5px solid var(--wine); outline-offset: -1.5px; }
.note-line { margin-top: 22px; font-size: 14.5px; color: var(--ink-soft); text-align: center; }

/* цены */
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.price-card { background: #fff; border-radius: 22px; padding: 30px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 12px; position: relative; }
.price-card.featured { outline: 2px solid var(--wine); outline-offset: -2px; }
.price-card .tagline { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe); }
.price-card .price { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--ink); }
.price-card .btn { margin-top: auto; width: 100%; }
.price-card small { color: var(--ink-soft); }
.badge {
  position: absolute; top: -13px; left: 28px; background: var(--wine); color: #fff;
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
}
.compare {
  margin-top: 22px; background: var(--linen); border: 1px dashed var(--stone); border-radius: 16px;
  padding: 18px 22px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; justify-content: center;
  font-size: 15px;
}
.compare s { color: var(--ink-soft); }
.compare b { font-weight: 500; }
.compare .save { color: var(--wine); }

/* обо мне */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.about img { width: 100%; border-radius: 22px; display: block; box-shadow: var(--shadow); }
.about .lead { font-size: 18px; }
.draft-note { font-size: 12px; color: var(--taupe); border-left: 2px solid var(--wheat); padding-left: 10px; }

/* подвал с документами */
.foot { padding: 34px 0; }
/* .foot .wrap выше по файлу — flex; здесь сетка, поэтому селектор точнее. */
.foot .wrap.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; align-items: start; }
.foot h4 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 18px; color: #fff; }
.foot a { color: rgba(255, 240, 245, .85); text-decoration: none; display: block; padding: 3px 0; }
.foot a:hover { color: #fff; }

/* документы */
.legal-doc { max-width: 780px; }
.legal-doc h2 { font-size: 30px; margin: 40px 0 12px; }
.pending { background: var(--linen); border-radius: 12px; padding: 14px 18px; color: var(--ink-soft); }

/* выбор роли в кабинете */
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.role-pick button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 18px; padding: 20px 14px;
  font: 500 16px/1.3 var(--sans); color: var(--ink); cursor: pointer;
}
.role-pick button:hover { border-color: var(--wine); }
.role-pick button i { display: block; font-style: normal; font-size: 26px; margin-bottom: 6px; }

.lk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.lk-tile { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow-soft); text-decoration: none; display: block; }
.lk-tile b { display: block; font-weight: 500; margin-bottom: 4px; }
.lk-tile small { color: var(--ink-soft); }
.lk-tile.locked { opacity: .55; }
.lk-tile .mi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--oat); color: var(--wine); margin-bottom: 10px; }

@media (max-width: 960px) {
  .hero-frame.split { grid-template-columns: 1fr; }
  .hero-frame.split .hero-text { padding: 30px 24px 26px; }
  .hero-photo-fill { min-height: 360px; order: -1; }
  .gift, .about, .prices, .foot .wrap.foot-grid { grid-template-columns: 1fr; }
  .days { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .offer-box { align-items: flex-start; }
}

/* Кнопка оплаты до старта продаж: видна, но честно выключена. */
.btn.is-off { opacity: .55; cursor: default; box-shadow: none; pointer-events: none; }
.link-soft { color: var(--wine); font-size: 14.5px; text-decoration: none; }

/* ===== приветственное видео и открытие промпта ===== */
.intro { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
/* Ролик снят вертикально (телефон) — плеер повторяет его пропорции. */
.phone-video {
  position: relative; width: min(340px, 100%); margin: 0 auto; aspect-ratio: 9 / 16;
  border-radius: 30px; overflow: hidden; background: #2A2521;
  box-shadow: 0 26px 60px rgba(72, 56, 44, .28); outline: 1.5px solid rgba(110, 34, 51, .35); outline-offset: 8px;
}
.phone-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.phone-stub {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center;
  color: #D8CFC4; font-family: var(--display); font-style: italic; font-size: 18px;
}
.unlock { margin-top: 26px; min-height: 96px; }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.meter span { display: block; height: 100%; width: 0; background: var(--wine); border-radius: 4px; transition: width .4s linear; }
.prompt-quote {
  margin: 14px 0 16px; padding: 16px 18px; border-left: 4px solid var(--wheat); border-radius: 0 14px 14px 0;
  background: #fff; box-shadow: var(--shadow-soft); font-size: 14px; font-style: italic; color: var(--ink-soft);
  white-space: pre-wrap; max-height: 200px; overflow: auto;
}
.unlock-open { animation: unlock .6s ease both; }
@keyframes unlock { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .unlock-open { animation: none; } .meter span { transition: none; } }
@media (max-width: 960px) { .intro { grid-template-columns: 1fr; gap: 34px; } }
