/* ==========================================================================
   Мастерская талантов — v8 «Путь» (journey-скролл по тропе)
   База токенов/компонентов: styles-v4.css (подключается ПЕРВОЙ).
   Здесь — система маршрута: тропа-SVG, остановки, узлы, путник, финиш.
   Спецификация: docs/concept-v8-put.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   ХОЛСТ: единый фон на всю страницу (off-white + слабая фактура артборда)
   -------------------------------------------------------------------------- */
body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(28, 26, 34, 0.04) 1px, transparent 1.6px);
  background-size: 26px 26px;
}
main section { background: transparent; }   /* секции прозрачны — единый холст */

/* --------------------------------------------------------------------------
   КОНТЕЙНЕР МАРШРУТА
   -------------------------------------------------------------------------- */
#journey { position: relative; max-width: 84rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { #journey { padding: 0 1.5rem; } }
@media (min-width: 1024px) { #journey { padding: 0 2.5rem; } }

/* --------------------------------------------------------------------------
   ТРОПА (SVG): база-трек + прорисовываемый прогресс + узлы + путник
   geometry строится в JS; здесь — оформление.
   -------------------------------------------------------------------------- */
#trail {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; overflow: visible;
}
#trail-base {
  fill: none; stroke: rgba(11, 107, 87, 0.20); stroke-width: 3;
  stroke-linecap: round; stroke-dasharray: 1 11;        /* пунктир-«тропинка» */
}
#trail-prog {
  fill: none; stroke: var(--sun-deep); stroke-width: 4; stroke-linecap: round;
  /* dasharray/offset задаёт JS для прорисовки по скроллу */
}
.trail-node {
  fill: #fff; stroke: var(--pine); stroke-width: 3;
  transition: stroke 200ms var(--ease);
}
.trail-node.is-active { stroke: var(--sun-deep); }
#traveler { fill: var(--sun); stroke: #fff; stroke-width: 3; }

/* Jhey-делайтер: активный узел мягко пульсирует (кольцо) */
.node-ring { fill: none; stroke: var(--sun); stroke-width: 2.5; opacity: 0; }
.trail-node-group.is-active .node-ring { animation: node-pulse 1.6s var(--ease) infinite; }
@keyframes node-pulse {
  0%   { opacity: 0.55; r: 11px; }
  70%  { opacity: 0;    r: 24px; }
  100% { opacity: 0;    r: 24px; }
}

/* финиш-звезда «зажигается» по достижении */
#finish-star { fill: rgb(var(--c-sun) / 0.35); stroke: var(--sun-deep); stroke-width: 2; transition: fill 400ms var(--ease); }
#finish-star.lit { fill: var(--sun); filter: drop-shadow(0 0 10px rgb(var(--c-sun) / 0.8)); }

/* --------------------------------------------------------------------------
   ОСТАНОВКИ (шаги)
   -------------------------------------------------------------------------- */
.step { position: relative; z-index: 1; }
.step__inner { position: relative; }

/* бейдж шага (реальный порядок маршрута — нумерация уместна) */
.step-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.04em; color: var(--pine);
  margin-bottom: 0.85rem;
}
.step-badge .num {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--sun); color: var(--ink); font-weight: 800;
}
.step-badge.is-finish .num { background: var(--sun); color: var(--ink); }
/* бейдж на тёмной подложке (зелёная/чёрная карточка) — белый текст */
.on-dark .step-badge { color: #fff; }

/* плавающие карточки приподняты над холстом */
.float-card { box-shadow: var(--shadow-soft); }
.float-card:where(.fill-pine, .fill-ink) { box-shadow: var(--shadow-lift); }

/* --- Десктоп: чередование сторон вокруг центральной тропы --- */
@media (min-width: 1024px) {
  .step--left  .step__inner { max-width: 45%; margin-right: auto; }
  .step--right .step__inner { max-width: 45%; margin-left: auto; }
  .step--wide  .step__inner { max-width: none; }   /* программы — во всю ширину, тропа за ними */
}

/* --- Мобайл/планшет: тропа у левого края, шаги столбиком --- */
@media (max-width: 1023px) {
  #journey { padding-left: 46px; }
  .step__inner { max-width: none !important; margin: 0 !important; }
}

/* --------------------------------------------------------------------------
   FAQ-аккордеон
   -------------------------------------------------------------------------- */
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; text-align: left; font-family: var(--font-display); font-weight: 600; cursor: pointer; }
.faq-q .chev { flex: none; color: var(--pine); transition: transform 220ms var(--ease); }
.faq.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 260ms var(--ease); }
.faq-a-in { overflow: hidden; }
.faq.open .faq-a { grid-template-rows: 1fr; }
.faq-a-in p { padding: 0 1.25rem 1.1rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   ЦВЕТ ЗАГОЛОВКОВ: глубокий «лесной» зелёный вместо плоского чёрного
   (только на светлом холсте — карточки на тёмном не трогаем)
   -------------------------------------------------------------------------- */
/* --headline теперь задаётся каналами в styles-v4.css (--c-headline) */

/* ==========================================================================
   ЦВЕТОВЫЕ ПАЛИТРЫ. По умолчанию — «Лес» (значения в :root styles-v4.css).
   Переключаются классом на <html>: меняем только RGB-каналы, всё остальное
   (Tailwind-классы, var(--…), opacity) пересчитывается само.
   ========================================================================== */
/* Бирюза — трендовый Transformative Teal + тёплый коралл */
html.theme-teal {
  --c-sun: 255 122 89;   --c-sun-deep: 242 97 63;  --c-sun-soft: 255 227 214;
  --c-pine: 14 116 144;  --c-pine-deep: 21 94 117; --c-pine-soft: 207 250 254;
  --c-headline: 10 60 74;
}
/* Ягода — фиолет + янтарь, по-детски яркая */
html.theme-berry {
  --c-sun: 255 179 0;    --c-sun-deep: 245 158 11; --c-sun-soft: 255 239 194;
  --c-pine: 109 40 217;  --c-pine-deep: 91 33 182; --c-pine-soft: 237 233 254;
  --c-headline: 67 28 142;  /* было 46 16 101 — чуть светлее, как у «Леса» */
}
/* Индиго — глубокий индиго + ярко-розовый */
html.theme-indigo {
  --c-sun: 244 114 182; --c-sun-deep: 236 72 153; --c-sun-soft: 252 231 243;
  --c-pine: 79 70 229;  --c-pine-deep: 67 56 202; --c-pine-soft: 224 231 255;
  --c-headline: 49 46 129;
}
/* Закат — малиново-розовый + персиковый */
html.theme-rose {
  --c-sun: 251 146 60;   --c-sun-deep: 249 115 22; --c-sun-soft: 255 237 213;
  --c-pine: 225 29 72;   --c-pine-deep: 190 18 60; --c-pine-soft: 255 228 230;
  --c-headline: 136 19 55;
}
/* Мандарин — тёплый оранжевый + небесно-голубой */
html.theme-tangerine {
  --c-sun: 56 189 248;   --c-sun-deep: 14 165 233; --c-sun-soft: 224 242 254;
  --c-pine: 194 65 12;   --c-pine-deep: 154 52 18; --c-pine-soft: 255 237 213;
  --c-headline: 124 45 18;
}
/* Плюш — беж + голубой + шоколад (референс @yanadlx) */
html.theme-plush {
  --c-sun: 175 217 242;  --c-sun-deep: 127 190 230; --c-sun-soft: 227 241 251;
  --c-pine: 107 74 54;   --c-pine-deep: 84 57 42;   --c-pine-soft: 239 229 212;
  --c-headline: 74 50 38;
}
/* Графит — серый + ярко-синий + белый (серый углублён до читаемого) */
html.theme-graphite {
  --c-sun: 29 121 233;   --c-sun-deep: 16 89 184;   --c-sun-soft: 220 234 253;
  --c-pine: 110 108 115; --c-pine-deep: 86 84 92;   --c-pine-soft: 236 236 239;
  --c-headline: 54 52 60;
}
/* Цитрус — зелёный + оранжевый + крем (зелёный углублён до читаемого) */
html.theme-citrus {
  --c-sun: 255 130 52;   --c-sun-deep: 242 105 26;  --c-sun-soft: 250 230 216;
  --c-pine: 113 146 63;  --c-pine-deep: 90 117 49;  --c-pine-soft: 234 241 218;
  --c-headline: 63 83 32;
}
/* Малина — чёрный + малиновый + белый, монохром с ягодным акцентом */
html.theme-malina {
  --c-sun: 226 71 107;   --c-sun-deep: 139 37 59;   --c-sun-soft: 251 225 232;
  --c-pine: 24 23 28;    --c-pine-deep: 17 17 17;   --c-pine-soft: 236 235 238;
  --c-headline: 23 21 27;
}

/* цветные точки брендов на кнопках мессенджеров */
.dot-tg, .dot-max { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-tg { background: #2AABEE; }
.dot-max { background: #4C6FFF; }

/* светлая кнопка для тёмного футера (фикс. цвета — не зависят от палитры/тёмной темы) */
.btn-paper { background: #fdfcf8; color: #221f2e; }
.btn-paper:hover { background: #fff; transform: translateY(-2px); }

/* вспышка-подсветка привала «Взрослым» при переходе по якорю из hero:
   пик на ~30% — к этому моменту плавный скролл как раз довозит до блока */
@media (prefers-reduced-motion: no-preference) {
  #adults.anchor-flash .panel {
    animation: adults-flash 1.8s var(--ease) 1 both;
  }
  @keyframes adults-flash {
    0%   { background: var(--paper); }
    30%  { background: var(--sun-soft); border-color: var(--sun-deep); box-shadow: var(--shadow-lift); }
    100% { background: var(--paper); }
  }
}

/* зелёная галочка для списков (страница аренды и т.п.) */
.dot-check { flex: 0 0 auto; margin-top: 0.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--pine-soft); position: relative; }
.dot-check::after { content: ""; position: absolute; left: 0.36rem; top: 0.2rem; width: 0.26rem; height: 0.46rem; border: solid var(--pine); border-width: 0 2px 2px 0; transform: rotate(45deg); }

h1, .step h2 { color: var(--headline); }
.on-dark h2 { color: #fff; }

/* стартовый заголовок — чуть свободнее по трекингу */
h1 { letter-spacing: -0.012em; }

/* акцентное слово обведено «карандашом» (рукотворный овал, дорисовывается в JS) */
.circled { position: relative; display: inline-block; }
.circled > span { position: relative; z-index: 1; }
.circle-doodle {
  position: absolute; left: -10%; top: 0%;
  width: 120%; height: 107%;
  overflow: visible; z-index: 0; pointer-events: none;
}

/* жёлтый CTA: текст тёмно-зелёный, в одну гамму с заголовками */
.btn-cta { color: var(--headline); }

/* плашка скидки (аккуратно, без агрессии) */
.promo {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--pine-soft); color: var(--pine-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
}
.promo .promo-pct { background: var(--pine); color: #fff; border-radius: 999px; padding: 1px 8px; }

/* ---- мобильное меню: аккуратнее и крупнее ---- */
#mobile-menu nav { padding-top: 0.5rem; padding-bottom: 1.1rem; gap: 0; }
#mobile-menu nav a:not(.btn) {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.95rem 0.5rem; font-size: 1.06rem; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
#mobile-menu nav a:not(.btn)::after { content: "›"; color: var(--ink-soft); font-size: 1.4rem; line-height: 1; }
#mobile-menu nav a:not(.btn):active { color: var(--pine); }
#mobile-menu nav a[href^="tel"] { color: var(--pine); border-bottom: none; }
#mobile-menu nav a.btn { margin-top: 0.9rem; padding: 1rem; font-size: 1rem; }
#mobile-menu nav a.btn::after { content: none; }

/* ---- попап новости ---- */
.news-modal { position: fixed; inset: 0; z-index: 70; display: none; }
.news-modal.open { display: block; }
.news-modal__overlay { position: absolute; inset: 0; background: rgba(28,26,34,0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.news-modal__dialog {
  position: relative; max-width: 720px; margin: 3vh auto; width: calc(100% - 2rem);
  background: var(--paper); border-radius: 1.5rem; overflow: hidden;
  box-shadow: var(--shadow-lift); max-height: 94vh; display: flex; flex-direction: column;
}
/* формы в модалках — компактнее, чтобы умещались без прокрутки */
.news-modal .field { padding-top: 0.58rem; padding-bottom: 0.58rem; }
.news-modal .js-lead-form label.block { margin-bottom: 0.3rem; font-size: 0.92rem; }
.news-modal .js-lead-form .grid { gap: 0.8rem; }
.news-modal .js-lead-form .btn { min-height: 44px; }
.news-modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 42px; height: 42px; border-radius: 999px;
  background: rgba(255,255,255,0.92); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.news-modal__close:hover { background: #fff; }
.news-modal__body { overflow-y: auto; }
.news-open { cursor: pointer; background: transparent; }

/* ---- модалка новости: несколько фото + листание новостей ---- */
#news-modal .news-modal__body { flex: 1 1 auto; min-height: 0; }
.nm-img-btn { display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in; }
.nm-img-btn:focus-visible { outline: 2px solid var(--pine); outline-offset: -3px; }
.nm-photocount { position: absolute; right: 12px; bottom: 12px; padding: 2px 9px; border-radius: 999px;
  background: rgba(20,18,28,0.6); color: #fff; font-size: 0.78rem; font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); pointer-events: none; }
.nm-thumbs { display: flex; gap: 8px; padding: 12px 16px 0; overflow-x: auto; }
.nm-thumb { flex: 0 0 auto; width: 64px; height: 48px; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; padding: 0; background: none; cursor: pointer; }
.nm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nm-thumb[aria-current="true"] { border-color: var(--pine); }
.nm-thumb:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
/* Модалка новости = такая же карусель, как просмотр фото:
   тёмный фон + светлые стрелки/крестик поверх него (один в один с MediaViewer). */
#news-modal .news-modal__overlay { background: rgba(20,18,28,0.94); }
#news-modal .news-modal__close { position: fixed; top: 16px; right: 16px; z-index: 4;
  width: 44px; height: 44px; background: rgba(255,255,255,0.12); border: none; color: #fff;
  box-shadow: none; transition: background-color 160ms var(--ease); }
#news-modal .news-modal__close:hover { background: rgba(255,255,255,0.24); }
#news-modal .news-modal__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* листание новостей — круглые стрелки в тёмном поле, как у фото-просмотрщика */
.nm-arrow { position: fixed; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  cursor: pointer; transition: background-color 160ms var(--ease); }
.nm-arrow:hover { background: rgba(255,255,255,0.24); }
.nm-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.nm-prev { left: 16px; }    /* у краёв экрана — один в один с галереей (.mv__prev/.mv__next) */
.nm-next { right: 16px; }
@media (max-width: 640px) {
  .nm-arrow { top: auto; bottom: max(56px, calc(env(safe-area-inset-bottom) + 40px)); transform: none; width: 44px; height: 44px; }
  .nm-prev { left: 22px; }
  .nm-next { right: 22px; }
}
@media (prefers-reduced-motion: reduce) { .nm-arrow { transition: none; } }

/* появление модалок: быстрый ease-out, без bounce */
.news-modal.open .news-modal__dialog { animation: modal-in 200ms var(--ease); }
.news-modal.open .news-modal__overlay { animation: overlay-in 160ms ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
@keyframes overlay-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .news-modal.open .news-modal__dialog, .news-modal.open .news-modal__overlay { animation: none; }
}

/* --------------------------------------------------------------------------
   КАРТОЧКА ПЕДАГОГА (.tmodal): портретное фото слева во всю высоту, резюме
   справа. Контент рассчитан так, чтобы умещаться без внутренней прокрутки.
   -------------------------------------------------------------------------- */
.tmodal { position: fixed; inset: 0; z-index: 70; display: none; }
.tmodal.open { display: block; }
.tmodal__overlay { position: absolute; inset: 0; background: rgba(28,26,34,0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.tmodal__card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 2rem); max-width: 820px; max-height: 92vh; overflow: auto;
  background: var(--paper); border-radius: 1.5rem; box-shadow: var(--shadow-lift);
  display: grid;
}
@media (min-width: 640px) { .tmodal__card { grid-template-columns: 380px 1fr; } }
.tmodal__photo { position: relative; background: var(--bg-soft); }
.tmodal__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 639px) { .tmodal__photo img { height: 320px; } }
.tmodal__tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.92); color: var(--pine-deep);
  font-family: var(--font-display); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.04em;
  padding: 4px 11px; border-radius: 999px;
}
html.mode-dark .tmodal__tag { background: rgba(22,23,28,0.85); color: #fff; }
.tmodal__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,0.92); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.tmodal__close:hover { background: #fff; }
html.mode-dark .tmodal__close { background: rgba(40,42,50,0.92); }
html.mode-dark .tmodal__close:hover { background: rgba(56,58,68,0.95); }
.tmodal__body { padding: 1.4rem 1.5rem 1.5rem; align-self: center; min-width: 0; }
.tmodal__body h2 { padding-right: 2.6rem; }   /* имя не залезает под крестик */
.tmodal__facts { margin-top: 0.9rem; }
.tmodal__fact { display: grid; grid-template-columns: 6.6rem 1fr; gap: 0.8rem; padding: 0.55rem 0; }
.tmodal__fact + .tmodal__fact { border-top: 1px solid var(--line); }
.tmodal__fact dt { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); padding-top: 0.2rem; }
.tmodal__fact dd { font-size: 0.875rem; line-height: 1.45; color: var(--ink); }
.tmodal__chips { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tmodal__cta { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tmodal.open .tmodal__card { animation: tmodal-in 220ms var(--ease); }
.tmodal.open .tmodal__overlay { animation: overlay-in 160ms ease-out; }
@keyframes tmodal-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.985); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) {
  .tmodal.open .tmodal__card, .tmodal.open .tmodal__overlay { animation: none; }
}

/* кавычка-глиф в отзывах: сразу видно, что это цитата */
.quote-mark { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 0.55; color: var(--sun-deep); }

/* --------------------------------------------------------------------------
   КАРТОЧКИ ПРОГРАММ: спокойные, но не скучные.
   Графика — крупный «водяной» номер; жизнь — на ховере (обводка, цвет номера,
   сдвиг стрелки). Цвет появляется только в ответ на действие, а не фоном.
   -------------------------------------------------------------------------- */
.programs-grid .idx { font-size: 2.6rem; line-height: 0.9; letter-spacing: -0.045em; color: rgb(var(--c-ink) / 0.10); transition: color 160ms ease; }
/* единый ховер для всех кликабельных карточек: курсор + подъём + зелёная рамка */
.tile[data-prog], [data-teacher], .news-card, a.panel.float-card {
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 160ms ease;
  will-change: transform;
}
.tile[data-prog]:hover, [data-teacher]:hover, .news-card:hover, a.panel.float-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lift);
  border-color: rgb(var(--c-pine) / 0.55);
}
html.motion-calm :is(.tile, [data-teacher], .news-card, a.panel.float-card):hover { transform: none !important; }
.tile:hover .idx { color: rgb(var(--c-pine) / 0.32); }
.open-form span[aria-hidden] { display: inline-block; transition: transform 160ms var(--ease); }
.tile:hover .open-form span[aria-hidden] { transform: translateX(3px); }

/* ---- лайтбокс галереи ---- */
.lightbox { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(20,18,28,0.92); padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 14px; }
.lightbox__close { position: absolute; top: 14px; right: 20px; width: 44px; height: 44px; border-radius: 999px; background: rgba(255,255,255,0.14); border: none; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lightbox__close:hover { background: rgba(255,255,255,0.25); }

/* ===== MediaViewer: лайтбокс/карусель фото (галерея + новости) ===== */
.mv { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  color-scheme: dark; touch-action: manipulation; }
.mv.open { display: flex; }
.mv__backdrop { position: absolute; inset: 0; background: rgba(20,18,28,0.94); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.mv__stage { position: relative; z-index: 1; margin: 0; max-width: min(1100px, 100%); display: flex; flex-direction: column; align-items: center; gap: 0.75rem; user-select: none; -webkit-user-select: none; }
.mv__img { max-width: 100%; max-height: 84vh; border-radius: 14px; will-change: transform, opacity; box-shadow: 0 24px 60px -12px rgba(0,0,0,0.5); }
.mv__caption { color: rgba(255,255,255,0.82); font-size: 0.92rem; text-align: center; max-width: 70ch; }
.mv__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 999px; border: none; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: rgba(255,255,255,0.12);
  transition: background-color 160ms var(--ease); }
.mv__nav:hover { background: rgba(255,255,255,0.24); }
.mv__prev { left: 16px; }
.mv__next { right: 16px; }
.mv__close { position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 44px; height: 44px; border-radius: 999px; border: none; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: rgba(255,255,255,0.12);
  transition: background-color 160ms var(--ease); }
.mv__close:hover { background: rgba(255,255,255,0.24); }
.mv__nav:focus-visible, .mv__close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mv__counter { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 2;
  text-align: center; color: rgba(255,255,255,0.85); font-variant-numeric: tabular-nums; font-size: 0.9rem; pointer-events: none; }
.mv.open .mv__backdrop { animation: overlay-in 160ms ease-out; }
.mv.open .mv__stage { animation: modal-in 200ms var(--ease); }
@media (max-width: 640px) {
  .mv__nav { top: auto; bottom: max(56px, calc(env(safe-area-inset-bottom) + 40px)); transform: none; width: 44px; height: 44px; }
  .mv__prev { left: 22px; }
  .mv__next { right: 22px; }
  .mv__counter { bottom: max(20px, calc(env(safe-area-inset-bottom) + 4px)); }
  .mv__img { max-height: 78vh; }
}
@media (prefers-reduced-motion: reduce) {
  .mv.open .mv__backdrop, .mv.open .mv__stage { animation: none; }
  .mv__img { transition: none !important; }
}
.gallery-photo { cursor: zoom-in; }
/* галерея: лишние фото спрятаны до нажатия «Показать ещё» */
.gallery-grid .gal-extra { display: none; }
.gallery-grid.is-expanded .gal-extra { display: block; }

/* ---- два варианта акцента (переключаются тест-панелью). По умолчанию — ПЛАШКА ---- */
.circled { isolation: isolate; }
.acc-word { position: relative; z-index: 1; display: inline-block; }
/* плашка: жёлтая подсветка за словом (видна по умолчанию) */
.acc-word::before {
  content: ""; position: absolute; z-index: -1;
  left: -0.07em; right: -0.07em; bottom: -0.03em; height: 1.0em;
  background: var(--sun); border-radius: 0.3em; transform: rotate(-1.0deg);
  opacity: 1; pointer-events: none;
}
.circle-doodle { display: none; }                 /* рисованный овал по умолчанию скрыт */
/* вариант «обводка»: показываем овал, прячем плашку */
.acc-circle .acc-word::before { opacity: 0; }
.acc-circle .circle-doodle { display: block; }

/* ==========================================================================
   ТЕСТ-ПАНЕЛЬ оформления (превью: палитра, тема, шрифт, акцент и т.д.)
   ========================================================================== */
.tp-trigger {
  position: fixed; right: 16px; bottom: 16px; z-index: 80;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  box-shadow: 0 10px 26px -12px rgba(28,26,34,.45); cursor: pointer;
}
.tp-trigger:hover { background: var(--sun-soft); }
.tp-trigger:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; }
.tp-badge { background: #C0392B; color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 6px; }

.tp-panel {
  position: fixed; right: 16px; bottom: 66px; z-index: 80;
  width: 308px; max-width: calc(100vw - 32px); max-height: min(72vh, 600px);
  overflow-y: auto; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 1.1rem;
  box-shadow: 0 26px 64px -22px rgba(28,26,34,.5); padding: 14px 16px; display: none;
}
.tp-panel.open { display: block; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-title { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.tp-sub { font-size: 0.72rem; color: var(--ink-soft); margin: 2px 0 4px; }
.tp-close { width: 30px; height: 30px; flex: none; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; }
.tp-close:hover { background: var(--bg-soft); }
.tp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.tp-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); flex: 0 0 auto; }
.tp-seg { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.tp-opt { padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 0.74rem; font-family: var(--font-sans); cursor: pointer; transition: background-color .12s, color .12s, border-color .12s; }
.tp-opt:hover { border-color: var(--ink); }
.tp-opt.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tp-swatch { width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer; box-shadow: 0 0 0 1px var(--line) inset; }
.tp-swatch.is-active { box-shadow: 0 0 0 2px var(--paper) inset, 0 0 0 2px var(--ink); }

/* ==========================================================================
   ТЁМНАЯ ТЕМА
   ========================================================================== */
html.mode-dark {
  --c-bg: 16 17 21; --c-bg-soft: 26 27 33; --c-paper: 30 31 38;
  --c-ink: 237 238 243; --c-ink-soft: 175 177 188; --c-line: 52 53 62;
  --c-headline: 236 239 244;
}
html.mode-dark body { background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1.6px); }
html.mode-dark .fill-ink { background: #0b0c10; }
/* «soft»/яркие заливки на тёмном — приглушаем в тёмные поверхности со светлым текстом */
html.mode-dark :is(.fill-sun, .fill-sun-soft) { background: #2b2723; color: var(--ink); }
html.mode-dark .fill-pine-soft { background: #1e2a2c; color: var(--ink); }
html.mode-dark .fill-neutral  { background: #24252c; color: var(--ink); }
html.mode-dark :is(.fill-sun, .fill-sun-soft, .fill-pine-soft) .age { color: var(--ink); }
html.mode-dark .text-pine-deep { color: rgb(226 229 235) !important; }
html.mode-dark .btn-ink { background: #3a3b46; color: #fff; }
html.mode-dark .btn-ink:hover { background: #4a4b58; }
html.mode-dark .btn-cta { color: rgb(20 22 26); }        /* тёмный текст на ярком акценте */
html.mode-dark .btn-ghost:hover { background: rgba(255,255,255,0.05); }
html.mode-dark .acc-word { color: #16171c; }             /* плашка по умолчанию: тёмное слово на жёлтом */
html.mode-dark.acc-circle .acc-word { color: var(--ink); } /* обводка: обычный светлый текст */
html.mode-dark #trail-base { stroke: rgba(255,255,255,0.16); }
html.mode-dark .news-modal__close { background: rgba(40,42,50,0.92); }

/* ==========================================================================
   ШРИФТОВЫЕ ПАРЫ (меняем дисплейный шрифт)
   ========================================================================== */
html.font-rubik    { --font-display: "Rubik", system-ui, sans-serif; }
html.font-playfair { --font-display: "Playfair Display", Georgia, serif; }

/* ==========================================================================
   СКРУГЛЕНИЯ: строгие углы
   ========================================================================== */
html.radius-sharp { --radius: 0.45rem; --radius-sm: 0.35rem; }
html.radius-sharp [class*="rounded"]:not([class*="rounded-full"]) { border-radius: 0.5rem !important; }

/* ==========================================================================
   ПЛОТНОСТЬ: компактные вертикальные ритмы
   ========================================================================== */
html.density-compact main section { padding-top: 2.25rem; padding-bottom: 2.25rem; }
html.density-compact .step__inner { padding-top: 2.25rem !important; padding-bottom: 2.25rem !important; }

/* ==========================================================================
   РЕЖИМ ДОСТУПНОСТИ: крупнее текст, выше контраст, подчёркнутые ссылки
   ========================================================================== */
/* контраст + читаемость (без повторного увеличения — комфортный размер уже базовый) */
html.a11y { --c-ink-soft: 45 43 56; }
html.a11y.mode-dark { --c-ink-soft: 222 224 232; }
html.a11y body { line-height: 1.7; background-image: none; }   /* просторнее строки, без фактуры */
html.a11y p, html.a11y li, html.a11y dd { letter-spacing: 0.006em; }
html.a11y a:not(.btn) { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
html.a11y .deco-shape, html.a11y .halo { display: none; }       /* убираем отвлекающий декор */
html.a11y :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline-width: 4px; outline-offset: 3px; }

/* ==========================================================================
   СПОКОЙНОЕ ДВИЖЕНИЕ
   ========================================================================== */
html.motion-calm *, html.motion-calm *::before, html.motion-calm *::after {
  animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important;
}
html.motion-calm { scroll-behavior: auto; }
html.motion-calm [data-reveal], html.motion-calm [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
html.motion-calm .tile:hover, html.motion-calm .btn:hover { transform: none !important; }

/* --------------------------------------------------------------------------
   ФОНОВЫЕ ФИГУРЫ (редкие, бледные, за контентом; с лёгким параллаксом)
   -------------------------------------------------------------------------- */
/* фигуры живут внутри шагов, на пустой стороне (не режутся, не лезут под блоки) */
.deco-shape { position: absolute; z-index: -1; pointer-events: none; will-change: transform; }
.decor-blob { border-radius: 50%; filter: blur(48px); }
.decor-ring { border-radius: 50%; border: 3px solid rgb(var(--c-pine) / 0.22); }
.decor-dot  { border-radius: 50%; background: var(--sun); }
/* только десктоп: на мобиле пустых сторон нет, фигуры скрыты */
@media (max-width: 1023px) { .deco-shape { display: none; } }
@media (prefers-reduced-motion: reduce) { .deco-shape { transform: none !important; } }

/* --------------------------------------------------------------------------
   МАРШРУТНЫЙ ЛИСТ (мини-таймлайн в стартовой карточке): линия через центры точек
   -------------------------------------------------------------------------- */
.route-list { position: relative; list-style: none; margin: 0; padding: 0; }
.route-list::before {                 /* линия от центра первой точки до центра последней */
  content: ""; position: absolute; left: 9px; top: 20px; bottom: 20px;
  width: 2px; background: var(--sun); border-radius: 2px;
}
.route-item {
  position: relative;
  display: grid; grid-template-columns: 20px 1fr; align-items: center; column-gap: 14px;
  min-height: 40px;
}
.route-dot {
  justify-self: center; position: relative; z-index: 1;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--sun); box-shadow: 0 0 0 3px var(--paper);
}
.route-dot--star {
  width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--sun-deep); color: var(--ink); font-size: 12px;
}
.route-link {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  transition: color 180ms var(--ease);
}
.route-link:hover { color: var(--pine); }
.route-link--end { font-weight: 700; }

/* --------------------------------------------------------------------------
   ПРОГРАММЫ: показываем 5, остальные — по кнопке (без JS видно всё)
   -------------------------------------------------------------------------- */
html.js .prog-extra { display: none; }
html.js .programs-grid.is-expanded .prog-extra { display: flex; }
html:not(.js) .prog-more-wrap { display: none; }
.prog-more-wrap { display: flex; justify-content: center; margin-top: 1.5rem; }

/* --------------------------------------------------------------------------
   ПУТЕВЫЕ ПОМЕТКИ на свободной стороне (заполняют пустоту, держат «путь»)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .trail-note { position: absolute; top: 50%; transform: translateY(-50%); width: 230px; z-index: 1; }
  .step--left  .trail-note { right: 0; }
  .step--right .trail-note { left: 0; text-align: right; }
}
@media (max-width: 1023px) { .trail-note { display: none; } }
.tn-kick { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--sun-deep); }
.tn-text { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
.trail-note a { color: var(--pine); font-weight: 600; }

/* --------------------------------------------------------------------------
   REDUCED MOTION — тропа отрисована сразу, путник статичен, без пульса
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #trail-prog { stroke-dashoffset: 0 !important; }
  #traveler { display: none; }
  .trail-node-group.is-active .node-ring { animation: none; }
  #finish-star.lit { filter: none; }
}

/* --- фиксы аудита --- */
/* тёмная тема: тёмный текст на жёлтых элементах, узлы тропы */
html.mode-dark .bg-sun, html.mode-dark .step-badge .num, html.mode-dark .route-dot--star { color: rgb(20 22 26); }
html.mode-dark ::selection { background: var(--sun); color: rgb(20 22 26); }
html.mode-dark .trail-node { fill: var(--paper); }

/* ховеры фото галереи и мини-превью */
.gallery-photo { transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.gallery-photo:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.gal-mini { display: block; }
.gal-mini img { transition: transform 220ms var(--ease); }
.gal-mini:hover img { transform: scale(1.05); }
html.motion-calm .gallery-photo:hover { transform: none; box-shadow: none; }
html.motion-calm .gal-mini:hover img { transform: none; }

/* ============================================================
   ПЕРВЫЙ ЭКРАН — авто-компактность на невысоких экранах.
   Срабатывает только при нехватке высоты (низкие ноутбуки,
   планшеты в альбомной). На высоких экранах вид не меняется,
   ничего не ломается — меняются только отступы и размер H1.
   ============================================================ */
@media (min-width: 1024px) and (max-height: 880px) {
  [data-step="start"] .step__inner { padding-top: 1.75rem !important; padding-bottom: 1.5rem !important; }
  [data-step="start"] h1 { font-size: 3.25rem; line-height: 1.05; }
  [data-step="start"] h1 + p { margin-top: 1rem; }
  [data-step="start"] aside .float-card { padding: 1.5rem; }
}
@media (min-width: 1024px) and (max-height: 760px) {
  [data-step="start"] .step__inner { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
  [data-step="start"] h1 { font-size: 2.8rem; line-height: 1.04; }
  [data-step="start"] h1 + p { margin-top: 0.75rem; font-size: 1.02rem; }
  [data-step="start"] h1 + p + div { margin-top: 1.25rem; }
}

/* Очень низкие окна (≤680px высоты при ширине ≥1024): прячем карточку-
   оглавление «Ваш маршрут», разворачиваем текст в одну колонку — первый
   экран помещается целиком, ничего не наезжает. На обычных экранах не влияет. */
@media (min-width: 1024px) and (max-height: 680px) {
  [data-step="start"] aside { display: none; }
  [data-step="start"] .step__inner > div { grid-template-columns: 1fr; }
  [data-step="start"] h1 { font-size: 2.5rem; }
}

/* Узкие lg-окна (1024–1199): hero в одну колонку, чтобы две кнопки
   оставались в ряд и не наезжали на карточку «Ваш маршрут». */
@media (min-width: 1024px) and (max-width: 1199px) {
  [data-step="start"] .step__inner > div { grid-template-columns: 1fr; }
  [data-step="start"] .step__inner > div > * { grid-column: 1 / -1 !important; }
  [data-step="start"] aside { margin-top: 2.25rem; }
}





/* Карточки направлений — чуть компактнее. */
.programs-grid .tile { padding: 1.5rem !important; }
@media (min-width: 1024px) {
  .programs-grid .tile { padding: 1.75rem !important; }
  .programs-grid [data-prog="01"], .programs-grid [data-prog="02"] { min-height: 200px !important; }
}

/* === Финиш: медальон-звезда в «вырезанном» полукруге на крае футера === */
#finish-star { display: none !important; }   /* звезду показывает медальон, тропа просто уходит вниз */
.foot-star {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  width: 3.6rem; height: 3.6rem; display: grid; place-items: center; z-index: 5;
  border-radius: 9999px; background: var(--sun); color: var(--ink);
  font-family: var(--font-display); font-size: 1.6rem; line-height: 1;
  box-shadow: 0 0 0 7px rgb(var(--c-bg)), 0 12px 30px rgb(var(--c-sun) / .55);
}
@media (max-width: 480px) {
  .foot-star { width: 3.1rem; height: 3.1rem; font-size: 1.35rem; box-shadow: 0 0 0 6px rgb(var(--c-bg)), 0 10px 22px rgb(var(--c-sun) / .5); }
}

/* формы не уезжают по горизонтали на мобиле */
html, body { overflow-x: clip; }
/* мобайл: тропа в левом жёлобе, не за текстом */

/* === мобильная защита от горизонтального переполнения === */
html, body { overflow-x: clip; }
@media (max-width: 1023px) {
  #journey { padding-left: 1rem; padding-right: 1rem; }
  body, main, #journey, .step, .step__inner { max-width: 100%; }
  .js-lead-form, .js-lead-form * { min-width: 0; }
  .js-lead-form .field, .js-lead-form input, .js-lead-form select, .js-lead-form textarea, .js-lead-form .btn { max-width: 100%; }
  .js-lead-form [class*="min-w-"] { min-width: 0 !important; }
  .js-lead-form .btn { white-space: normal; }
}

/* ================= POLISH-V9 ================= */
html, body { overflow-x: clip; }
@media (max-width: 1023px) {
  #journey { padding-left: 1rem; padding-right: 1rem; }
  body, main, #journey, .step, .step__inner { max-width: 100%; }
  .js-lead-form, .js-lead-form * { min-width: 0; }
  .js-lead-form .field, .js-lead-form input, .js-lead-form select, .js-lead-form textarea, .js-lead-form .btn { max-width: 100%; }
  .js-lead-form [class*="min-w-"] { min-width: 0 !important; }
  .js-lead-form .btn { white-space: normal; }
}
#scroll-prog { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--sun-deep); z-index: 70; transition: width 80ms linear; display: none; border-radius: 0 2px 2px 0; }
@media (max-width: 1023px) { #trail { display: none; } #scroll-prog { display: block; } }
/* ============ /POLISH-V9 ============ */

/* ================= ROUTE-ANIM ================= */
@keyframes routeDrawLine { 0%{transform:scaleY(0);opacity:1} 26%{transform:scaleY(1);opacity:1} 40%{transform:scaleY(1);opacity:1} 47%{transform:scaleY(1);opacity:0} 100%{transform:scaleY(0);opacity:0} }
@keyframes routeDotOn { 0%{transform:scale(1);background:var(--sun)} 4%{transform:scale(1.5);background:var(--sun-deep)} 22%{transform:scale(1);background:var(--sun-deep)} 32%{transform:scale(1);background:var(--sun)} 100%{transform:scale(1);background:var(--sun)} }
@keyframes routeStarOn { 0%{transform:scale(1)} 6%{transform:scale(1.25)} 18%{transform:scale(1)} 100%{transform:scale(1)} }
@keyframes routeLinkOn { 0%{color:var(--ink);transform:translateX(0)} 4%{color:var(--pine-deep);transform:translateX(4px)} 24%{color:var(--pine-deep);transform:translateX(4px)} 34%{color:var(--ink);transform:translateX(0)} 100%{color:var(--ink);transform:translateX(0)} }
.route-list::after { content:""; position:absolute; left:9px; top:20px; bottom:20px; width:2px; background:var(--sun-deep); border-radius:2px; transform-origin:top; transform:scaleY(0); animation:routeDrawLine 9s ease-in-out infinite; }
.route-item { --rd:0; }
.route-item:nth-child(2){--rd:1} .route-item:nth-child(3){--rd:2} .route-item:nth-child(4){--rd:3} .route-item:nth-child(5){--rd:4} .route-item:nth-child(6){--rd:5}
.route-item .route-dot:not(.route-dot--star) { animation:routeDotOn 9s ease-in-out infinite; animation-delay:calc(var(--rd) * 0.5s); }
.route-dot--star { animation:routeStarOn 9s ease-in-out infinite; animation-delay:2.4s; }
.route-link { display:inline-block; }
.route-item .route-link { animation:routeLinkOn 9s ease-in-out infinite; animation-delay:calc(var(--rd) * 0.5s); }
@media (prefers-reduced-motion: reduce) { .route-list::after, .route-item .route-dot, .route-item .route-link { animation:none } .route-list::after{opacity:1;transform:scaleY(1)} }
/* ============ /ROUTE-ANIM ============ */

/* ================= PMODAL ================= */
.pmodal__grid { display: flex; flex-direction: column; min-height: 0; }
.pmodal__grid > .news-modal__body { min-height: 0; }
.pmodal__photo { position: relative; background: var(--bg-soft); flex-shrink: 0; }
.pmodal__photo img { display: block; width: 100%; height: 160px; object-fit: cover; transition: opacity 0.18s ease; }
.pmodal__photo img.pmodal__photo-loading { opacity: 0; }
.pmodal__tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.92); color: var(--pine-deep); font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.03em; padding: 4px 11px; border-radius: 999px; }
html.mode-dark .pmodal__tag { background: rgba(22,23,28,0.85); color: #fff; }
.pmodal__grid h2 { padding-right: 2.4rem; }
@media (min-width: 640px) {
  .pmodal__dialog { max-width: 800px; }
  .pmodal__grid { display: grid; grid-template-columns: 260px 1fr; }
  .pmodal__grid > * { min-width: 0; min-height: 0; }
  .pmodal__photo img { height: 100%; }
}
/* ============ /PMODAL ============ */

/* ================= MOBILE-BTNS ================= */
@media (max-width: 639px) {
  .js-lead-form .flex.flex-wrap.gap-2\.5 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .js-lead-form .flex.flex-wrap.gap-2\.5 a[href^="tel"] { grid-column: 1 / -1; }
  .js-lead-form .flex.flex-wrap.gap-2\.5 .btn { min-height: 44px; padding: 0.65rem 0.9rem; font-size: 0.875rem; }
  #adults .flex.flex-wrap { flex-direction: column; align-items: stretch; gap: 12px; }
  #adults .btn { width: 100%; }
  #adults .open-form { justify-content: center; }
}
/* ============ /MOBILE-BTNS ============ */

/* ================= QA-FIXES ================= */
@media (max-width: 639px) {
  .btn { white-space: normal; }
}
#mobile-menu { max-width: 100%; }
@media (max-width: 374px) {
  h1[class*="2.4rem"] { font-size: 2.05rem !important; line-height: 1.22 !important; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  header[data-header] a[href^="tel"] { display: none; }
}
/* ============ /QA-FIXES ============ */

/* Подробности программы (контент из админки Directus) в модалке «Подробнее» */
[data-info-body] > :first-child { margin-top: 0; }
[data-info-body] p { margin-top: 0.55rem; }
[data-info-body] strong { font-weight: 600; }
[data-info-body] ul { list-style: disc; padding-left: 1.25rem; margin-top: 0.5rem; }
[data-info-body] ol { list-style: decimal; padding-left: 1.25rem; margin-top: 0.5rem; }
[data-info-body] li { margin-top: 0.35rem; }
[data-info-body] h2, [data-info-body] h3, [data-info-body] h4 { font-weight: 700; margin-top: 0.9rem; }
/* Модалка программы: текст скроллится, кнопка «Записаться» всегда видна (прилеплена снизу), футер компактный */
.pmodal__dialog .pmodal__grid { flex: 1 1 auto; min-height: 0; }
.pmodal__dialog .pmodal__body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.pmodal__dialog .pmodal__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.25rem 1.5rem 0.6rem; }
.pmodal__dialog .pmodal__photo img { height: 130px; }
.pmodal__dialog .pmodal__cta { flex-shrink: 0; padding: 0.65rem 1.5rem 0.85rem; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -10px 16px -14px rgba(20,18,28,0.18); }
.pmodal__dialog .pmodal__cta-note { margin-top: 0.4rem; font-size: 0.72rem; line-height: 1.3; color: var(--ink-soft); }
@media (min-width: 640px) {
  .pmodal__dialog { max-width: 760px; }
  .pmodal__dialog .pmodal__grid { display: flex; flex-direction: column; }
  .pmodal__dialog .pmodal__photo img { height: 190px; }
  .pmodal__dialog .pmodal__scroll { padding: 1.5rem 2rem 0.6rem; }
  /* кнопка слева + примечание рядом справа в одну строку */
  .pmodal__dialog .pmodal__cta { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 2rem 0.8rem; }
  .pmodal__dialog .pmodal__cta-note { margin-top: 0; flex: 1 1 auto; }
}
