/* =========================================================
   Инна Аминова · Telegram Mini App
   Спринт 1: переменные, база, layout, нижнее меню, навигация
   ========================================================= */

/* ---------- CSS-переменные (дизайн-токены) ---------- */
:root {
  /* Цвета (реальная палитра сайта aminovafit.com) */
  --bg: #0B0F12;          /* основной фон страницы */
  --card: #151B1F;        /* фон карточек */
  --card-2: #1C2429;      /* приподнятые элементы */
  --accent: #C9FF2E;      /* лаймово-зелёный — основной акцент/CTA */
  --accent-2: #ADFF14;    /* ярче — hover */
  --accent-soft: rgba(201, 255, 46, 0.10); /* подложка акцента */
  --text: #F6F7F5;        /* основной текст */
  --text-muted: #AEB7BC;  /* второстепенный текст */
  --line: rgba(255, 255, 255, 0.08); /* разделители / бордеры */
  --tab-inactive: #5C666E;/* неактивная вкладка */
  --danger: #E06A6A;
  --success: #8FE04C;

  /* Шрифты (сайт использует Mont → ближайший бесплатный Montserrat) */
  --font-head: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Геометрия (минимализм — почти без скруглений) */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-btn: 4px;
  --app-width: 390px;
  --tabbar-h: 68px;

  /* Тени */
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.5);

  /* Отступ под safe-area (айфоны с «домашней полоской») */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* ---------- Сброс ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Цвет выделения текста — под акцент */
::selection {
  background: rgba(201, 255, 46, 0.3);
  color: #fff;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  /* Центрируем «телефон» на широких экранах (для десктоп-теста) */
  display: flex;
  justify-content: center;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  /* App-like: запрещаем случайное выделение текста в интерфейсе */
  -webkit-user-select: none;
  user-select: none;
}

/* Разрешаем выделение и ввод там, где это осмысленно */
input, textarea,
.nt-recipe__text, .faq__a p, .wk-card__hint {
  -webkit-user-select: text;
  user-select: text;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

small { font-size: 0.8em; }

/* ---------- Корневой контейнер приложения ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: var(--app-width);
  min-height: 100dvh;
  background: var(--bg);
  /* Снизу оставляем место под таб-бар, чтобы контент не перекрывался */
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  overflow-x: hidden;
}

/* ---------- Фирменный header (логотип) ---------- */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: calc(var(--safe-top) + 16px) 18px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.brand__name {
  font-family: var(--font-head);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  line-height: 1;
}
.brand__tag {
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
}

/* ---------- Экраны ---------- */
.screen {
  display: none;
  padding: 20px 18px 24px;
  animation: screen-in 0.28s ease;
}

/* Активный экран показывается */
.screen--active {
  display: block;
}

/* Плавное появление экрана при переключении */
@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Временная заглушка (уберём по мере наполнения экранов) */
.screen__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 60dvh;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
.screen__placeholder small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ---------- Нижнее меню (tab bar) ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-width);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 100;
}

.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--tab-inactive);
  transition: color 0.2s ease, transform 0.15s ease;
}

.tabbar__item:active {
  transform: scale(0.92);
}

.tabbar__icon {
  font-size: 20px;
  line-height: 1;
  /* Приглушаем эмодзи у неактивных вкладок */
  filter: grayscale(0.5) opacity(0.65);
  transition: filter 0.2s ease;
}

.tabbar__label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* Активная вкладка — акцентный цвет + индикатор сверху */
.tabbar__item {
  position: relative;
}
.tabbar__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 26px;
  height: 2.5px;
  border-radius: 100px;
  background: var(--accent);
  transition: transform 0.25s ease;
}
.tabbar__item.is-active::before {
  transform: translateX(-50%) scaleX(1);
}
.tabbar__item.is-active {
  color: var(--accent);
}
.tabbar__item.is-active .tabbar__icon {
  filter: none;
  transform: translateY(-1px);
}
.tabbar__item.is-active .tabbar__label {
  font-weight: 600;
}

/* ---------- Утилиты (пригодятся дальше) ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.section-title {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ---------- Кнопки (стиль сайта) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-btn);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: scale(0.98); }

/* Основная (CTA): золото + чёрный текст */
.btn--primary {
  background: var(--accent);
  color: #000;
}
.btn--primary:hover { background: var(--accent-2); color: #000; }

/* Вторичная: контур акцентом, прозрачный фон */
.btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn--secondary:hover { background: var(--accent); color: #000; }

/* ---------- Прогресс-бар (общий) ---------- */
.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #7BAE12, #C9FF2E);
  border-radius: 100px;
  transition: width 0.6s ease;
}

/* =========================================================
   ГЛАВНЫЙ ЭКРАН (home)
   ========================================================= */

/* ----- Шапка с приветствием ----- */
.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.home-hello {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.home-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}
.home-avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, #C9FF2E, #A6D62A);
}

/* ----- Карточка абонемента ----- */
.sub-card {
  background: linear-gradient(160deg, #1A2416 0%, #151B1F 55%);
  border: 1px solid rgba(201, 255, 46, 0.28);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.sub-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sub-card__badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 100px;
}
.sub-card__days {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.sub-card__title {
  font-family: var(--font-head);
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 16px;
}
.sub-card__foot {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ----- Стрик + баллы ----- */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat__icon { font-size: 22px; }
.stat__value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}
.stat__label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ----- Быстрые кнопки ----- */
.quick { margin-bottom: 22px; }
.quick__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick__btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.quick__btn:active {
  transform: scale(0.95);
  border-color: var(--accent);
  background: var(--card-2);
}
.quick__emoji { font-size: 24px; }
.quick__text {
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

/* ----- Поддержка ----- */
.support { margin-bottom: 8px; }
.support__curator {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid rgba(201, 255, 46, 0.22);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: transform 0.15s ease, background 0.2s ease;
}
.support__curator:active {
  transform: scale(0.98);
  background: var(--card-2);
}
.support__curator-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--accent-soft);
}
.support__curator-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.support__curator-text strong { font-size: 15px; font-weight: 600; }
.support__curator-text small { font-size: 12.5px; color: var(--text-muted); }
.support__arrow {
  font-size: 24px;
  color: var(--text-muted);
  line-height: 1;
}

/* ----- FAQ-аккордеон ----- */
.faq__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 4px 0 10px 2px;
}
.faq__item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}
.faq__chevron {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.faq__item.is-open .faq__chevron {
  transform: rotate(45deg); /* «+» превращается в «×» */
}
/* Плавное раскрытие ответа */
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
}
.faq__a > p {
  overflow: hidden;
  padding: 0 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.faq__item.is-open .faq__a > p {
  padding: 0 16px 14px;
}

/* =========================================================
   ЭКРАН ТРЕНИРОВОК (workouts)
   ========================================================= */
.wk-head { margin-bottom: 18px; }
.wk-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.wk-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}
.wk-progress-text {
  font-size: 14px;
  color: var(--text-muted);
}
.wk-progress-text b { color: var(--text); }

/* ----- Список упражнений ----- */
.wk-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.wk-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.wk-card.is-done {
  border-color: rgba(201, 255, 46, 0.35);
}
.wk-card__emoji {
  font-size: 26px;
  line-height: 1;
  margin-top: 2px;
}
.wk-card__body { flex: 1; min-width: 0; }
.wk-card__name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.wk-card.is-done .wk-card__name {
  text-decoration: line-through;
  color: var(--text-muted);
}
.wk-card__sets {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.wk-card__hint {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}
.wk-video {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 6px 12px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.wk-video:active { border-color: var(--accent); color: var(--accent); }

/* Чекбокс «Выполнено» */
.wk-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2px solid var(--tab-inactive);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.wk-check:active { transform: scale(0.9); }
.wk-check__box {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.wk-card.is-done .wk-check {
  background: var(--accent);
  border-color: var(--accent);
}
.wk-card.is-done .wk-check__box {
  opacity: 1;
  transform: scale(1);
}

/* ----- Кнопка завершения ----- */
.wk-finish { margin-top: 4px; }
.wk-finish[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
.wk-finish[data-state="today"] {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.wk-finish-note {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

/* =========================================================
   ТОСТ (всплывающее уведомление)
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%) translateY(20px);
  max-width: calc(var(--app-width) - 40px);
  background: #E9F6D0;
  color: #14210A;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   ЭКРАН ПИТАНИЯ (nutrition)
   ========================================================= */
.nt-head { margin-bottom: 16px; }

/* Переключатель приёмов пищи */
.nt-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.nt-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.nt-tab__emoji { font-size: 20px; line-height: 1; filter: grayscale(0.4) opacity(0.8); }
.nt-tab__label { font-size: 11.5px; font-weight: 600; }
.nt-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}
.nt-tab.is-active .nt-tab__emoji { filter: none; }

/* Карточка приёма пищи */
.nt-meal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 22px;
}
.nt-meal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.nt-meal__emoji {
  font-size: 32px;
  line-height: 1;
}
.nt-meal__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 2px;
}
.nt-meal__dish {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
}

/* КБЖУ-чипы */
.nt-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.nt-macro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.nt-macro__val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.nt-macro__key {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* Рецепт */
.nt-recipe {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.nt-recipe__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.nt-recipe__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

/* Итого за день */
.nt-total { margin-bottom: 8px; }
.nt-bar { margin-bottom: 14px; }
.nt-bar:last-child { margin-bottom: 0; }
.nt-bar__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.nt-bar__label {
  font-size: 14px;
  font-weight: 600;
}
.nt-bar__value {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* =========================================================
   ЭКРАН ПРОГРЕССА (progress)
   ========================================================= */

/* ----- График веса ----- */
.pr-chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px 8px;
  margin-bottom: 16px;
}
.pr-chart-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 6px;
}
.pr-chart-card__label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.pr-chart-card__now {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.pr-chart-card__now span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.pr-delta {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
}
.pr-delta.is-down { color: var(--accent); background: var(--accent-soft); }
.pr-delta.is-up   { color: var(--danger); background: rgba(224, 106, 106, 0.12); }
.pr-chart { display: block; }

/* ----- Карточки достижений ----- */
.pr-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.pr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 6px;
}
.pr-stat__emoji { font-size: 22px; line-height: 1; }
.pr-stat__value {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}
.pr-stat__label {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ----- Шкала уровней ----- */
.pr-levels {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.pr-levels__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pr-levels__points {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.pr-levels__track {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pr-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}
.pr-level.is-reached { opacity: 1; }
.pr-level__emoji {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
}
.pr-level.is-current .pr-level__emoji {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.pr-level__name {
  font-size: 11px;
  font-weight: 600;
}
.pr-level__sep {
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 6px;
  margin-bottom: 18px;
}
.pr-levels__hint {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ----- Кнопка отчёта ----- */
.pr-report-btn { margin-bottom: 24px; }

/* ----- Галерея результатов ----- */
.pr-gallery__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pr-gallery__scroll::-webkit-scrollbar { height: 0; }
.pr-tile {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  background: linear-gradient(150deg, #18211b 0%, #151b1f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--accent);
}
.pr-tile svg {
  width: 34px;
  height: 34px;
}
.pr-tile span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pr-gallery__note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* =========================================================
   МОДАЛКА (нижний лист)
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal.is-open { opacity: 1; }
.modal__sheet {
  width: 100%;
  max-width: var(--app-width);
  background: var(--card);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 1px solid var(--line);
  padding: 10px 18px calc(20px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90dvh;
  overflow-y: auto;
}
.modal.is-open .modal__sheet { transform: translateY(0); }
.modal__handle {
  width: 40px;
  height: 4px;
  border-radius: 100px;
  background: var(--tab-inactive);
  margin: 0 auto 14px;
}
.modal__title {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 18px;
}
.modal__field {
  display: block;
  margin-bottom: 16px;
}
.modal__field > span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.modal__field input,
.modal__field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}
.modal__field input:focus,
.modal__field textarea:focus { border-color: var(--accent); }
.modal__field textarea { resize: none; }

/* Выбор самочувствия */
.rp-mood {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.rp-mood__btn {
  font-size: 24px;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  filter: grayscale(0.6) opacity(0.7);
  transition: all 0.2s ease;
}
.rp-mood__btn.is-active {
  filter: none;
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.05);
}
.modal__close {
  width: 100%;
  text-align: center;
  padding: 12px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

/* =========================================================
   ЭКРАН ПРОГРАММ (programs)
   ========================================================= */
.prog-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prog-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s ease;
}
.prog-card.is-best {
  border-color: var(--accent);
}
.prog-card.is-open {
  border-color: var(--accent);
}
.prog-badge {
  position: absolute;
  top: -9px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 100px;
}
.prog-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.prog-card__emoji {
  font-size: 30px;
  line-height: 1;
  margin-top: 2px;
}
.prog-card__info { flex: 1; min-width: 0; }
.prog-card__name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 4px;
}
.prog-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.prog-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.prog-card__price {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.prog-card__from {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.prog-select { width: auto; padding: 11px 22px; }

/* Раскрывающийся выбор срока */
.prog-options {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.prog-card.is-open .prog-options {
  grid-template-rows: 1fr;
}
.prog-options__inner {
  overflow: hidden;
}
.prog-options__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding-top: 16px;
  margin-bottom: 10px;
}
.prog-dur {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.prog-dur__months {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.prog-dur__note {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 100px;
}
.prog-dur__price {
  margin-left: auto;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.prog-dur.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.prog-pay { margin-top: 8px; }

/* =========================================================
   ПОЛИРОВКА / ДОСТУПНОСТЬ
   ========================================================= */

/* Плавное появление приложения при загрузке */
.app { animation: app-in 0.4s ease; }
@keyframes app-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Уважаем настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
