/* Платформа «НеНормальная» — кабинет участницы. Оформление по утверждённому макету:
   тёплая бумага, рукописные имена, плакатные заголовки капсом, терракотовые акценты.
   Шрифты лежат рядом с приложением: так они грузятся мгновенно и работают без интернета. */
/* Шрифты проекта по фирменному стилю: Cormorant Garamond — антиква и названия,
   Montserrat — интерфейс и подписи, Italianno — латинский рукописный акцент,
   Marck Script — рукописная кириллица (в Italianno её нет). Все файлы свои, без внешних сервисов. */
/* Прежние шрифты проекта: Inter для текста и Rubik для плакатных заголовков.
   Клиенту привычнее они, антиква осталась только в названиях тренингов и приветствии. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/inter-400-normal-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/inter-400-normal-latinext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/inter-400-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: block;
  src: url('../fonts/inter-500-normal-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: block;
  src: url('../fonts/inter-500-normal-latinext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: block;
  src: url('../fonts/inter-500-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: block;
  src: url('../fonts/inter-600-normal-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: block;
  src: url('../fonts/inter-600-normal-latinext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: block;
  src: url('../fonts/inter-600-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: block;
  src: url('../fonts/inter-700-normal-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: block;
  src: url('../fonts/inter-700-normal-latinext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: block;
  src: url('../fonts/inter-700-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: italic; font-weight: 900; font-display: block;
  src: url('../fonts/rubik-900i-900-italic-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Rubik'; font-style: italic; font-weight: 900; font-display: block;
  src: url('../fonts/rubik-900i-900-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: italic; font-weight: 900; font-display: block;
  src: url('../fonts/rubik-900i-900-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/cormorant-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 600; font-display: block;
  src: url('../fonts/cormorant-600i-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/montserrat-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: block;
  src: url('../fonts/montserrat-500-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: block;
  src: url('../fonts/montserrat-600-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Marck'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/marck-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/cormorant-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 600; font-display: block;
  src: url('../fonts/cormorant-600i-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/montserrat-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: block;
  src: url('../fonts/montserrat-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: block;
  src: url('../fonts/montserrat-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Marck'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/marck-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Cormorant'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/cormorant-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 600; font-display: block;
  src: url('../fonts/cormorant-600i-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/montserrat-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: block;
  src: url('../fonts/montserrat-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: block;
  src: url('../fonts/montserrat-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Marck'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/marck-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Italianno'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/italianno-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Italianno'; font-style: normal; font-weight: 400; font-display: block;
  src: url('../fonts/italianno-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Цвета сняты пипеткой с утверждённых макетов, чтобы не расходиться с ними на глаз. */
  --bg: #f3ecdc;           /* тёплая бумага */
  --card: #f9f2ec;         /* карточки — тёплые, почти белые, как на макете */
  --line: #e5dcc9;
  --line-soft: #ece3d3;
  --txt: #3a3733;          /* тёмно-серый: мягче чёрного, но читается так же */
  --dim: #6a625a;
  --mute: #948b7f;

  --acc: #b05b42;          /* терракота с макета: кнопки, активная вкладка, свои сообщения */
  --acc-deep: #a04b33;
  --acc-soft: #f2e2d9;     /* пудровая заливка */
  --locked: #e6ded4;       /* закрытые уроки */
  --locked-txt: #8b8377;
  --rose: #c8977f;
  --sage: #7f9a78;         /* выполнено */
  --sage-soft: #e7efe4;
  --ochre: #c1913f;        /* сдано после срока */
  --lock: #e9e3da;
  --dot: #5b3f31;

  --radius: 22px;
  --shadow: 0 14px 34px rgba(120, 95, 70, 0.09);
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;  /* интерфейс и подписи */
  --poster: "Rubik", "Inter", Arial, sans-serif;          /* плакатные заголовки разделов */
  /* имя пишется двумя почерками: латиница — Italianno, кириллица — Marck (в Italianno её нет) */
  --hand: "Italianno", "Marck", cursive;
  --script: "Marck", cursive;                            /* рукописная кириллица: подписи на русском */
  --serif: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;  /* заголовки: тот же шрифт, что текст */
}

/* Заголовки на макете двух видов: рукописные и плакатные с наклоном.
   Рукописью пишем только имя и приветствие — длинные названия ею читаются тяжело. */
h1 {
  font-family: var(--font); font-weight: 600; font-style: normal;
  letter-spacing: -0.2px; line-height: 1.15; margin: 0 0 6px; color: var(--txt);
}
h1.hand, .me-head h1 {
  font-family: var(--hand); font-weight: 400; font-style: normal;
  letter-spacing: 0.3px; line-height: 1.1;
}
h2, h3, .card h3, .chat-head b {
  font-family: var(--serif); font-weight: 700; font-style: normal;
  text-transform: uppercase; letter-spacing: 0.4px; color: var(--txt);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { background: var(--bg); }  /* этим цветом iOS красит полосу статус-бара в установленном приложении */
body {
  margin: 0; color: var(--txt); font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  /* заливки у body быть не должно: она рисуется поверх слоя с фоновой картинкой
     и оставляет вверху экрана однотонную полосу. Цвет бумаги держит html. */
  background: transparent;
}
/* фон — отдельным слоем на весь экран: всегда заполняет его целиком, на любом устройстве */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--bg);
}
/* Чистый лист выглядел пусто, поэтому по фону разложены круги и кляксы —
   ровное рядом с неровным, как в логотипе. Они бледные и не мешают читать. */
/* Фон взят из макета: тёплая бумага, ветви сухоцвета снизу и лёгкие разводы сверху.
   Два файла — вертикальный для телефона и широкий для компьютера, чтобы ветви
   не растягивались и не обрезались по-дурацки. */
/* Фон проекта: акварельная бумага с сухоцветом. Два файла — вертикальный для телефона
   и широкий для компьютера, чтобы ветви не растягивались и не обрезались по краям.
   Под ними лежит ровный тёплый цвет: пока картинка грузится, экран не белеет. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--bg) url("../img/bg-mobile.webp") top center / cover no-repeat;
}
@media (min-width: 760px) {
  body::after { background-image: url("../img/bg-desktop.webp"); }
}



/* шапка профиля с макета: крупный кружок и рукописное имя рядом */
.me-head { display: flex; align-items: center; gap: 18px; margin: 18px 0 26px; }
.me-head .ava, .me-head img.ava { width: 86px; height: 86px; font-size: 30px; flex: none; }
.me-head h1 { margin: 0; line-height: 1; }
.me-head .sub { color: var(--dim); font-size: 15px; margin-top: 4px; }

/* строки-переходы: «Мои работы», «Документы», «Поддержка», «Выйти» */
.rows { margin-top: 6px; }
.row-link {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 4px;
  background: none; border: none; border-bottom: 1px solid var(--line);
  font: inherit; font-size: 16px; color: var(--txt); text-align: left; cursor: pointer;
}
.row-link:last-child { border-bottom: none; }
.row-link .go { margin-left: auto; color: var(--mute); display: flex; }
.row-link:active { opacity: 0.6; }

/* карточка выпускного эфира */
.efir-card { text-align: center; padding: 26px 20px; }
.efir-card h3 { font-size: 22px; margin: 0 0 10px; }
.efir-card .when { font-size: 17px; margin: 0 0 18px; }
.btn.outline {
  background: none; border: 1.6px solid var(--acc); color: var(--acc); border-radius: 30px;
  padding: 12px 26px; font-weight: 500;
}
.btn.outline:active { background: var(--acc-soft); }
a { color: var(--acc); text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
img { max-width: 100%; }

/* ------------------------------------------------------------ типографика */
h1 { font-size: clamp(26px, 7.4vw, 32px); margin: 22px 0 6px; }
h1.hand, .me-head h1 { font-size: clamp(38px, 11vw, 46px); }
h2 { font-size: 21px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 14px; }
h2.module {
  font-family: var(--serif); font-size: 21px; font-weight: 700; font-style: normal;
  text-transform: none; letter-spacing: -0.01em; color: #3a322c; line-height: 1.25;
  margin: 0 0 14px;
}
.lead { color: var(--dim); margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; }
.muted { color: var(--mute); font-size: 13px; }
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
.spacer { margin-left: auto; }

/* ---------------------------------------------------------------- каркас */
.wrap { max-width: 560px; margin: 0 auto; padding: 8px 12px calc(112px + env(safe-area-inset-bottom)); }
.top { display: none; } /* заголовок страницы живёт в контенте, как в макетах */

.tabbar {
  /* --kb — высота клавиатуры: меню поднимается над ней, а не прячется под неё */
  position: fixed; bottom: var(--kb, 0px); left: 0; right: 0; z-index: 50;
  background: rgba(255, 253, 251, 0.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-soft); border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 28px rgba(120, 95, 70, 0.1);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-in { max-width: 560px; margin: 0 auto; display: flex; padding: 9px 0 7px; }
.tabbar a {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 3px 0 5px; color: #4d4946; font-family: var(--font); font-size: 12.5px; font-weight: 400;
  line-height: 1.2;
}
.tabbar .ico { display: grid; place-items: center; width: 44px; height: 30px; transition: 0.18s; }
.tabbar a.active { color: #9e5745; font-weight: 500; }
.tabbar a.active .ico { color: #9e5745; }
.tabbar a:active .ico { transform: scale(0.94); }

/* -------------------------------------------------------------- элементы */
.card {
  background: var(--card); border: 1px solid rgba(238, 229, 218, 0.7); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 22px;
  border-radius: 14px; background: var(--acc); color: #fff; border: none; cursor: pointer;
  font-weight: 500; font-size: 15px; transition: 0.16s;
}
.btn:hover { background: var(--acc-deep); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn.ghost { background: #fff; color: var(--acc); border: 1px solid var(--acc-soft); }
.btn.ghost:hover { background: var(--acc-soft); }
.btn.sm { padding: 9px 15px; font-size: 13.5px; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn.plain { background: none; color: var(--acc); padding: 8px 0; }
.btn.plain:hover { background: none; text-decoration: underline; }

.inp, textarea.inp, select.inp {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 13px 15px; outline: none; transition: 0.15s;
}
.inp:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--acc-soft); }
textarea.inp { resize: vertical; min-height: 96px; line-height: 1.6; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 7px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; background: #e8d4ca; color: #9c6654;
  font-family: var(--font); font-size: 10.5px; font-weight: 500; line-height: 1;
  letter-spacing: 0.09em; text-transform: uppercase;
}
.pill.ok { background: var(--sage); color: #fff; }
.pill.lock { background: var(--lock); color: #8c8579; }
.pill.late { background: var(--ochre); color: #fff; }

/* Аватарка лежит прямо на фоновой картинке, поэтому ей нужен собственный край:
   светлое кольцо отделяет её от разводов, тень добавляет глубины. */
.ava {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #fdfaf6;
  display: grid; place-items: center; color: var(--acc); font-weight: 600; flex: none;
  border: 2px solid rgba(176, 140, 110, 0.38); box-shadow: 0 3px 10px rgba(120, 95, 70, 0.22);
}
.ava.sm { width: 36px; height: 36px; font-size: 14px; }

.empty { text-align: center; color: var(--mute); padding: 38px 16px; }
.empty svg { width: 34px; height: 34px; opacity: 0.4; margin-bottom: 10px; }
.loader {
  width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--acc);
  border-radius: 50%; animation: spin 0.7s linear infinite; margin: 36px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice { background: var(--acc-soft); border-radius: 14px; padding: 13px 15px; font-size: 13.5px; color: #8a5340; line-height: 1.55; }
.num-dot {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--acc); color: var(--acc);
  display: grid; place-items: center; font-size: 13px; font-weight: 500; flex: none;
}

/* ------------------------------------------------------------- программа */
.day-badge {
  display: inline-flex; align-items: center; gap: 9px; background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--acc); color: var(--acc); border-radius: 30px; padding: 9px 18px; font-size: 14px;
}
.day-badge b { font-weight: 600; }

/* Карточка урока с макета: белая плашка, крупный текст, справа знак состояния. */
.practice {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: none; border-radius: 20px;
  padding: 20px 22px; margin-bottom: 14px; box-shadow: 0 8px 22px rgba(120, 95, 70, 0.08);
  transition: 0.16s; font-family: inherit;
}
.practice:hover { transform: translateY(-1px); }
.practice.locked { background: var(--locked); box-shadow: none; color: var(--locked-txt); cursor: not-allowed; }
.practice.locked:hover { transform: none; }
.practice .body { flex: 1; min-width: 0; }
.practice .body b { display: block; font-weight: 500; font-size: 17px; line-height: 1.35; }
.practice .body > span:not(.marks) { font-size: 14px; color: var(--mute); display: block; margin-top: 2px; }
.practice.locked .body > span:not(.marks) { color: var(--locked-txt); }
.practice .marks .pill { font-size: 12.5px; }
.practice .marks { margin-top: 9px; display: flex; gap: 7px; flex-wrap: wrap; }
/* знак справа: галочка у пройденного, замок у закрытого */
.practice .state { flex: none; display: flex; color: var(--acc); }
.practice.locked .state { color: var(--locked-txt); }

/* полоса дней над списком */
.day-line { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; }
.day-line b { font-size: 17px; font-weight: 500; white-space: nowrap; }
.day-line .bar { flex: 1; height: 9px; border-radius: 6px; background: #e7d3c9; overflow: hidden; }
.day-line .bar i { display: block; height: 100%; background: var(--acc); border-radius: 6px; }

/* шапка экрана с логотипом, как на макетах */
.screen-head { display: flex; align-items: center; gap: 14px; margin: 10px 0 18px; }
.screen-head img { width: 76px; height: 76px; object-fit: contain; flex: none; }
.screen-head h1 { margin: 0; font-size: 26px; }

/* --------------------------------------------------------- закрытый доступ
   Экран оплаты по макету: логотип, терракотовая карточка, серые уроки под ней. */
.pay-logo { text-align: center; margin: 10px 0 18px; }
.pay-logo img { width: 150px; height: 150px; object-fit: contain; }
.pay-card {
  background: var(--acc); color: #fff; border-radius: 20px; padding: 26px 24px 24px;
  text-align: center; box-shadow: 0 14px 32px rgba(120, 95, 70, 0.16);
}
.pc-title { font-size: 19px; opacity: 0.95; }
.pc-price { font-size: 40px; font-weight: 700; letter-spacing: -0.5px; margin: 4px 0 18px; }
/* выбор тарифа: у каждого своя цена и свой срок */
.pc-plans { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 6px; }
.pc-plan {
  display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%;
  background: rgba(255, 255, 255, 0.14); border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px; padding: 11px 14px; color: #fff; font: inherit; cursor: pointer;
}
.pc-plan.on { background: #fff; border-color: #fff; color: var(--txt); }
.pc-plan b { font-weight: 600; font-size: 15.5px; }
.pc-plan span { font-size: 13px; opacity: 0.85; }
.pc-term { font-size: 14px; opacity: 0.9; margin: -10px 0 16px; }
.pc-list { list-style: none; margin: 0 auto 22px; padding: 0; display: inline-block; text-align: left; }
.pc-list li { display: flex; align-items: center; gap: 11px; font-size: 16px; margin-bottom: 11px; }
.pc-list li svg { flex: none; background: #fff; color: var(--acc); border-radius: 50%; padding: 3px; }
.btn.pc-btn {
  width: 100%; background: #fff; color: var(--txt); border-radius: 30px;
  padding: 16px 22px; font-size: 17px; font-weight: 600;
}
.btn.pc-btn:active { background: #f4efe6; }
.pc-note { margin: 0; font-size: 14px; opacity: 0.9; }
.pay-note { text-align: center; color: var(--dim); font-size: 14.5px; margin: 22px 0 14px; }
.pay-docs { text-align: center; color: var(--mute); font-size: 13px; margin: 18px 0 4px; }
.pay-docs a { color: var(--mute); }

/* -------------------------------------------------------------- практика */
/* шапка урока с макета: номер дня терракотом по центру, название рукописью */
.day-tag { flex: 1; text-align: center; color: var(--acc); font-size: 15px; font-weight: 500; }
h1.lesson-title { text-align: center; margin: 6px 0 4px; }
.lesson-sub {
  text-align: center; font-family: var(--hand); font-size: 23px; color: var(--dim);
  margin: 0 0 20px; line-height: 1.25; font-weight: 400;
}
/* кнопка действия внизу урока — во всю ширину, пилюлей */
.btn.wide { border-radius: 30px; padding: 16px 22px; font-size: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 9px; color: var(--acc); font-size: 14.5px; margin-top: 18px; }
.content { line-height: 1.7; color: var(--dim); }
.content p { margin: 0 0 14px; }
.content p:last-child { margin-bottom: 0; }
.content .prayer { font-style: italic; color: var(--txt); line-height: 1.8; }
.content figure.mat { margin: 0 0 16px; }
.content figure.mat img { width: 100%; border-radius: 14px; display: block; }
.content figure.mat figcaption { font-size: 12.5px; color: var(--mute); margin-top: 7px; text-align: center; }
.mat-audio {
  background: var(--acc-soft); border-radius: 14px; padding: 14px 16px; margin: 16px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.mat-audio b { font-size: 14px; color: var(--acc); font-weight: 600; }
.mat-audio audio { width: 100%; }
.materials { display: flex; flex-direction: column; gap: 9px; }
.materials a {
  display: flex; align-items: center; gap: 11px; padding: 13px 16px; background: var(--acc-soft);
  border-radius: 13px; color: var(--acc); font-size: 14px;
}
.materials svg { width: 17px; height: 17px; flex: none; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cards-grid img { border-radius: 13px; border: 1px solid var(--line); cursor: zoom-in; width: 100%; }
@media (max-width: 520px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }

.qa { margin-bottom: 18px; }
.qa label { display: block; font-size: 14.5px; margin-bottom: 9px; color: var(--txt); font-weight: 500; line-height: 1.45; }
.qa .num { color: var(--acc); margin-right: 6px; }
/* необязательный вопрос помечаем прямо в подписи, чтобы не гадать, что можно пропустить */
.qa .optional {
  margin-left: 8px; font-size: 11.5px; font-weight: 400; color: var(--mute);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 8px; vertical-align: middle;
}
.qa.missing .inp { border-color: var(--bad, #c0392b); }

/* заголовок модуля в списке уроков */
h2.module {
  font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 26px 0 12px;
  letter-spacing: 0.2px;
}
h2.module:first-of-type { margin-top: 6px; }

/* карточка тренинга и модуля: тот же ритм, что у карточек уроков, плюс стрелка вправо */
/* Карточка тренинга с макета: картинка слева, название плакатным курсивом,
   подзаголовок прописными, пилюля с числом уроков и круглая стрелка справа. */
.course-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: #f9f2ec; border: 1px solid rgba(233, 222, 207, 0.75); border-radius: 20px;
  padding: 5px; margin-bottom: 14px; font: inherit; color: inherit; cursor: pointer;
  box-shadow: 0 10px 24px rgba(140, 110, 82, 0.07); transition: 0.15s;
}
.course-card:hover { border-color: var(--acc); }
.course-card .body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 8px 0;
}
.course-card .body b {
  font-family: var(--serif); font-size: clamp(17px, 4.2vw, 19px); font-weight: 700; font-style: normal;
  line-height: 1.2; letter-spacing: -0.01em; color: #40352e;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-card .body .sub {
  margin-top: 4px; font-family: var(--font); font-size: 12.5px; font-weight: 400;
  letter-spacing: 0; text-transform: none; line-height: 1.4; color: #6a625a;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-card .marks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.course-card .go {
  flex: none; align-self: center; display: grid; place-items: center;
  width: 38px; height: 38px; margin-right: 10px; border-radius: 50%;
  background: #f3e7de; color: #7a5a44;
}
/* закрытый тренинг: плотная серо-бежевая карточка, картинка обесцвечена.
   Прозрачность тут не годится — сквозь неё просвечивает фон и всё пестрит. */
.course-card.locked { opacity: 1; background: #ece6e0; border-color: rgba(206, 196, 186, 0.8); }
.course-card.locked .body b { color: #6b625b; }
.course-card.locked .body .sub { color: #857b72; }
.course-card.locked .cover img { filter: grayscale(0.85) brightness(0.97); }
.course-card.locked .go { background: #e2dbd4; color: #8b8178; }

/* Шапка программы: слева приветствие, справа логотип и девиз — как на макете */
.prog-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.prog-head .ph-left { flex: 1; min-width: 0; }
.prog-head .ph-left h1.hand { margin: 0; }
.prog-head .ph-left h1.hand .hi {
  display: block; font-family: var(--serif); font-weight: 700; font-style: normal;
  font-size: clamp(30px, 7.5vw, 38px); line-height: 1.05; letter-spacing: -0.02em; color: #39302b;
}
.prog-head .ph-left h1.hand .who {
  display: block; font-family: var(--hand); font-weight: 400;
  font-size: clamp(52px, 11.8vw, 68px); line-height: 0.85; color: #a45f45;
}
.prog-head .ph-left .lead {
  margin: 10px 0 0; font-family: var(--font); font-size: 13.5px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: #6a625a; line-height: 1.5;
}
.prog-head .ph-right { flex: none; width: 42%; max-width: 152px; text-align: center; }
.prog-head .ph-logo { width: 100%; height: auto; display: block; }
.prog-head .ph-motto {
  margin-top: 10px; font-family: var(--font); font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.16em; line-height: 1.7; text-transform: uppercase; color: #4e4641;
}
.prog-head .ph-motto .l { display: block; white-space: nowrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: 14px; margin-bottom: 10px; }

/* цифра непрочитанных ответов рядом с названием */
.dot-new {
  display: inline-grid; place-items: center; width: auto; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 8px; border-radius: 9px; background: var(--acc); color: #fff;
  font-size: 11px; font-weight: 600; vertical-align: middle;
}

/* цифра непрочитанного возле вкладки */
/* бейджу нужна точка отсчёта, но раскладку иконки не трогаем:
   inline-flex здесь ломал центрирование и значок уезжал к левому краю подсветки */
.tabbar-in .ico { position: relative; }
.tabbar-in .badge {
  position: absolute; top: -5px; left: 100%; transform: translateX(-40%);
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--acc); color: #fff; font-size: 10.5px; font-weight: 600;
  display: grid; place-items: center; line-height: 1;
}

/* доп. материалы, открывшиеся после сдачи ДЗ: мигают фоном, чтобы их заметили */
.card.bonus h3 { color: var(--acc); }
.card.just-open { animation: just-open 1.3s ease-in-out 4; }
@keyframes just-open {
  0%, 100% { background: var(--card); box-shadow: 0 8px 22px rgba(120, 95, 70, 0.08); }
  50% { background: var(--acc-soft); box-shadow: 0 0 0 3px var(--acc); }
}

/* ответ, ради которого пришли из уведомления */
.flash { animation: flash 2.4s ease-out; }
@keyframes flash {
  0%, 55% { box-shadow: 0 0 0 3px var(--acc-soft, rgba(176, 74, 51, 0.18)); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.attach-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.attach-row > .btn.ghost.sm, .attach-row > label.btn { flex: 1; min-width: 120px; justify-content: center; padding: 12px 10px; font-size: 13px; white-space: nowrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--acc-soft); color: var(--acc);
  border-radius: 20px; padding: 7px 13px; font-size: 12.5px;
}
.chip button { background: none; border: none; color: inherit; cursor: pointer; padding: 0; line-height: 1; opacity: 0.7; }
.rec.on { color: var(--acc-deep); }

/* ----------------------------------------------------------------- лента */
.post {
  display: flex; gap: 13px; background: rgba(252, 249, 245, 0.85); border-radius: 16px;
  padding: 15px; margin-bottom: 11px;
}
.post:last-child { margin-bottom: 0; }
.post.expert { background: var(--acc-soft); }
/* ответ эксперта на работу — со сдвигом вправо, чтобы было видно, что это ответ именно на неё */
.answer-thread { margin: -4px 0 11px 22px; border-left: 2px solid var(--acc-soft); padding-left: 12px; }
.answer-thread .post { margin-bottom: 8px; }
.post .who { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
.post .who b { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.post .who .when { font-size: 12.5px; color: var(--mute); }
.post .who .who-src { font-size: 12.5px; color: var(--mute); }
.post .txt { white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
.post .answers { margin-top: 8px; }
.post .answers div { margin-bottom: 10px; }
.post .answers i { display: block; font-style: normal; color: var(--mute); font-size: 12.5px; margin-bottom: 2px; }
.post .reply-to {
  font-size: 13.5px; color: var(--dim); background: rgba(255, 255, 255, 0.75);
  border-left: 3px solid var(--rose); padding: 9px 13px; border-radius: 0 10px 10px 0; margin-bottom: 8px;
}
.post audio { width: 100%; max-width: 330px; margin-top: 9px; }
.post .shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.post .shots img { width: 118px; height: 118px; object-fit: cover; border-radius: 13px; cursor: zoom-in; }
.post-actions { margin-top: 9px; display: flex; gap: 16px; font-size: 13px; }
.post-actions button {
  background: none; border: none; color: var(--acc); cursor: pointer; padding: 0;
  border-bottom: 1px solid var(--acc-soft);
}
.post-actions button:hover { border-bottom-color: var(--acc); }
.pill.expert-tag { background: rgba(255, 255, 255, 0.8); color: var(--acc); padding: 4px 11px; font-size: 12px; }

.chat-scroll { max-height: 62vh; overflow-y: auto; margin: -4px -4px 0; padding: 4px; }
.composer { position: sticky; bottom: 0; background: var(--card); padding-top: 12px; }

/* ------------------------------------------------------ переключатели */
.switch-row { display: flex; align-items: center; gap: 14px; padding: 4px 0; }
.switch-text { flex: 1; min-width: 0; }
.switch-text b { display: block; font-weight: 500; font-size: 15px; }
.switch-text span { display: block; font-size: 13px; color: var(--mute); }
.field label.switch, label.switch { display: inline-flex !important; align-items: center; gap: 10px; cursor: pointer; user-select: none; margin: 0; }
.switch input { display: none; }
.switch i {
  width: 52px; height: 30px; border-radius: 16px; background: #e2dacf; position: relative;
  transition: 0.2s; flex: none;
}
.switch i::after {
  content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: 0.2s; box-shadow: 0 1px 4px rgba(60, 40, 20, 0.25);
}
.switch input:checked + i { background: var(--acc); }
.switch input:checked + i::after { left: 25px; }
.switch em { font-style: normal; font-size: 13.5px; color: var(--mute); min-width: 34px; }
.switch input:checked ~ em { color: var(--sage); font-weight: 600; }

.time-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; color: var(--dim); }
.time-row input { width: 128px; text-align: center; }
.hint-line { font-size: 12.5px; color: var(--mute); margin-top: 8px; line-height: 1.5; }

/* --------------------------------------------------------- экран входа */

.auth {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  max-width: 440px; margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
.auth-hero { text-align: center; }
.auth-hero .mark { width: min(240px, 62vw); height: auto; display: block; margin: 0 auto; }
.auth-title { font-family: var(--serif); font-size: clamp(32px, 9.5vw, 42px); font-weight: 600; color: #3b322b; margin: 2px 0 0; }
.auth-tagline { font-family: var(--serif); font-size: clamp(17px, 4.8vw, 20px); color: var(--rose); margin: 4px 0 0; }
.orn { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 20px; }
.orn i { display: block; width: 64px; height: 1px; background: linear-gradient(90deg, transparent, #dfd0bf); }
.orn i:last-child { background: linear-gradient(270deg, transparent, #dfd0bf); }

.auth-card {
  background: rgba(255, 253, 251, 0.95); backdrop-filter: blur(6px);
  border-radius: 26px; padding: 24px 22px; box-shadow: 0 20px 60px rgba(122, 96, 70, 0.14);
}
.ac-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ac-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0; color: #3b322b; }
.ac-ico { width: 46px; height: 46px; border-radius: 50%; background: #f1eae1; color: #8b8177; display: grid; place-items: center; flex: none; }
.ac-text { color: var(--mute); font-size: 14.5px; line-height: 1.65; margin: 0 0 18px; }
.ac-div { height: 1px; background: var(--line-soft); margin: 18px 0; }
.ac-err { color: #c15f5f; font-size: 13.5px; margin: 14px 0 0; }

.ac-btn {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 13px 16px; margin-bottom: 12px;
  border: none; border-radius: 16px; cursor: pointer; text-align: left; font-size: 15.5px; color: #3b322b;
  transition: 0.16s; font-family: inherit;
}
.ac-btn .cap { flex: 1; }
.ac-btn .badge { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); display: grid; place-items: center; flex: none; }
.ac-btn .chev { color: #a2988d; flex: none; }
.ac-btn.tg { background: #ccd5c6; }
.ac-btn.tg .badge { color: #64735a; }
.ac-btn.max { background: #e4e0f2; }
.ac-btn.max .badge { color: #6b5fa8; }

/* обложка тренинга: картинка слева, как на макете */
.course-card .cover {
  width: 29%; max-width: 112px; aspect-ratio: 1 / 1; height: auto; border-radius: 13px;
  overflow: hidden; flex: none; background: var(--line-soft); display: block; align-self: center;
}
.course-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card.locked .cover img { filter: grayscale(0.25) opacity(0.8); }

/* подпись под списком тренингов — рукописная, по центру */
.hand-note {
  font-family: var(--script); font-size: 31px; font-weight: 400; line-height: 0.95;
  letter-spacing: 0.01em; color: #8a604d; text-align: center; margin: 32px 0 20px;
}
.ac-btn.vk { background: #d9e4f0; }
.ac-btn.vk .badge { color: #3f6ea8; }
/* код для входа через MAX — крупно, чтобы легко перебить в чат */
.code-big {
  font-family: var(--serif); font-weight: 800; font-style: italic; font-size: 34px;
  letter-spacing: 6px; text-align: center; color: var(--acc);
  background: var(--acc-soft); border-radius: 16px; padding: 14px 10px; margin: 4px 0 14px;
}
.ac-btn.mail { background: var(--acc-soft); }
.ac-btn.mail .badge { color: var(--acc); }
.ac-btn.tg:hover, .ac-btn.mail:hover, .ac-btn.max:hover, .ac-btn.vk:hover { transform: translateY(-1px); }
.ac-btn.soon { background: transparent; border: 1px solid var(--line); color: var(--mute); cursor: default; margin-bottom: 0; }
.ac-btn.soon .badge { background: #f7f2ec; color: #b6aa9c; }
.soon-tag { font-size: 12px; color: #b6aa9c; background: #f7f2ec; border-radius: 20px; padding: 3px 10px; }

.ac-back { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; color: var(--acc); font-size: 14.5px; padding: 0 0 16px; font-family: inherit; }
.ac-wait { text-align: center; color: var(--mute); font-size: 14px; line-height: 1.6; padding: 6px 0 4px; }
.ac-wait .loader { margin: 6px auto 14px; }
.code-input { letter-spacing: 10px; font-size: 22px; text-align: center; font-weight: 600; }
.auth-foot { text-align: center; margin-top: 26px; color: var(--mute); font-size: 13.5px; line-height: 1.7; }
.auth-foot p { margin: 8px 0 0; }
.auth-foot .heart { color: var(--rose); display: inline-flex; }

.seg { display: flex; gap: 6px; background: #f3ece4; border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.seg-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 10px;
  border: none; background: transparent; border-radius: 9px; color: var(--dim); font-size: 13.5px; cursor: pointer;
}
.seg-btn.active { background: var(--card); color: var(--txt); font-weight: 600; box-shadow: 0 2px 8px rgba(120, 95, 70, 0.08); }

@media (max-height: 880px) {
  .auth { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .auth-hero .mark { width: min(190px, 50vw); }
  .auth-title { font-size: clamp(29px, 8.4vw, 36px); }
  .auth-tagline { font-size: 16px; }
  .orn { margin: 8px 0 14px; }
  .auth-card { padding: 18px 17px; border-radius: 22px; }
  .ac-head { margin-bottom: 10px; }
  .ac-head h2 { font-size: 20px; }
  .ac-ico { width: 40px; height: 40px; }
  .ac-text { margin-bottom: 12px; font-size: 13.5px; }
  .ac-div { margin: 12px 0; }
  .ac-btn { padding: 11px 14px; margin-bottom: 9px; font-size: 15px; }
  .ac-btn .badge { width: 38px; height: 38px; }
  .auth-foot { margin-top: 14px; font-size: 12.5px; }
}

/* ------------------------------------------------ установка приложения */
.install-bar {
  position: fixed; left: 12px; right: 12px; z-index: 40; display: flex; align-items: center; gap: 12px;
  bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px; box-shadow: 0 12px 34px rgba(120, 95, 70, 0.18);
  animation: rise 0.25s ease;
}
.install-bar img { width: 42px; height: 42px; border-radius: 11px; flex: none; }
.install-bar b { display: block; font-size: 14px; }
.install-bar span { display: block; font-size: 12px; color: var(--dim); }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
@media (min-width: 760px) { .install-bar { left: auto; right: 20px; max-width: 420px; } }

/* --------------------------------------------------------- служебное */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 108px; z-index: 90; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px; }
.toast { background: #3b3129; color: #fff; border-radius: 13px; padding: 13px 16px; font-size: 14px; box-shadow: var(--shadow); }
.toast.bad { background: #b8574f; }
.toast.ok { background: var(--sage); }

.overlay { position: fixed; inset: 0; background: rgba(48, 38, 30, 0.72); display: grid; place-items: center; z-index: 80; padding: 20px; }
.overlay img { max-height: 88vh; border-radius: 14px; }
.overlay .card { max-width: 430px; }
.ask-ico {
  width: 62px; height: 62px; border-radius: 50%; background: var(--acc-soft); color: var(--acc);
  display: grid; place-items: center; margin: 0 auto;
}

@media (display-mode: standalone) {
  .wrap { padding-top: calc(8px + env(safe-area-inset-top)); }
}

/* ------------------------------------------------------------ свой плеер */
.aplayer {
  display: flex; align-items: center; gap: 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; margin: 12px 0;
  box-shadow: 0 4px 14px rgba(120, 95, 70, 0.05);
}
.mat-audio .aplayer { margin: 0; background: #fff; border-color: #f0dfd6; }
.aplayer.playing { border-color: var(--acc-soft); box-shadow: 0 6px 18px rgba(196, 113, 90, 0.13); }
.ap-play {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--acc); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease, background 0.15s ease;
}
.ap-play:hover { background: var(--acc-deep); }
.ap-play:active { transform: scale(0.94); }
.ap-play svg { width: 20px; height: 20px; }
.ap-main { flex: 1; min-width: 0; }
.ap-bar { position: relative; height: 6px; border-radius: 4px; background: var(--line); }
.ap-buf { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: var(--line-soft); }
.ap-done {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--rose), var(--acc));
}
.ap-knob {
  position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  border-radius: 50%; background: #fff; border: 2px solid var(--acc); pointer-events: none;
  box-shadow: 0 1px 4px rgba(120, 95, 70, 0.28);
}
.ap-seek {
  position: absolute; inset: -10px 0; width: 100%; height: 26px; margin: 0;
  opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; background: none;
}
.ap-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; }
.ap-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 7px; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums;
}
.ap-state { color: var(--acc); font-size: 11.5px; }
.ap-side { flex: none; display: flex; align-items: center; gap: 2px; }
.ap-mini, .ap-rate {
  border: 0; background: none; cursor: pointer; color: var(--dim);
  display: flex; align-items: center; justify-content: center; border-radius: 10px;
}
.ap-mini { position: relative; width: 34px; height: 34px; }
.ap-mini svg { width: 17px; height: 17px; }
.ap-mini i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-style: normal; padding-top: 2px; letter-spacing: -0.3px;
}
.ap-rate { min-width: 36px; height: 34px; font-size: 12.5px; font-weight: 600; color: var(--acc); }
.ap-mini:hover, .ap-rate:hover { background: var(--acc-soft); color: var(--acc); }
.aplayer.mini { padding: 9px 11px; gap: 10px; margin: 9px 0 0; max-width: 340px; }
.aplayer.mini .ap-play { width: 36px; height: 36px; }
.aplayer.mini .ap-play svg { width: 16px; height: 16px; }

/* --------------------------------------------- переход к соседним практикам */
.pnav { display: flex; gap: 10px; margin-top: 14px; }
.pnav a, .pnav span {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 14px; color: var(--txt); box-shadow: var(--shadow);
}
.pnav .to-next { flex-direction: row-reverse; text-align: right; }
.pnav span { opacity: 0.45; box-shadow: none; }
.pnav svg { flex: none; width: 18px; height: 18px; color: var(--acc); }
.pnav b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.pnav u { display: block; font-size: 11.5px; color: var(--mute); text-decoration: none; margin-bottom: 2px; }
.pnav .txt { min-width: 0; flex: 1; }
.pnav .txt b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 420px) { .pnav { flex-direction: column; } .pnav .to-next { flex-direction: row; text-align: left; } }

/* стрелки перехода в шапке практики */
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pjump { display: flex; align-items: center; gap: 4px; margin-top: 18px; }
.pjump a, .pjump .off {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line); color: var(--acc);
  box-shadow: 0 3px 10px rgba(120, 95, 70, 0.06);
}
.pjump a:hover { background: var(--acc-soft); }
.pjump a:active { transform: scale(0.93); }
.pjump .off { color: var(--mute); opacity: 0.4; box-shadow: none; }
.pcount { font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }

/* ====================================================== чат как мессенджер */
/* Экран занимает ровно высоту окна: список сообщений прокручивается сам,
   строка ввода всегда внизу, а при открытой клавиатуре поднимается над ней. */
body.chat-mode { overflow: hidden; }
/* Экран чата держится за видимую часть окна, а не за страницу: когда iOS поднимает
   страницу под клавиатуру, мы возвращаем экран на место сами (--vvtop) и подрезаем
   высоту (--vvh). Иначе нижняя панель уезжала на середину экрана. */
.wrap.chat-page {
  position: fixed; top: 0; left: 0; right: 0; margin: 0 auto;
  display: flex; flex-direction: column;
  height: var(--vvh, 100dvh);
  transform: translateY(var(--vvtop, 0px));
  padding: 0 12px; overflow: hidden;
}
.chat-head { padding: 14px 6px 10px; flex: none; display: flex; align-items: center; gap: 12px; }
.chat-head img { width: 54px; height: 54px; object-fit: contain; flex: none; }
.chat-head b {
  display: block; font-family: var(--font); font-size: 22px; font-weight: 600;
  text-transform: none; font-style: normal; letter-spacing: 0;
}
.chat-head span { font-size: 12.5px; color: var(--mute); }

.chat-list {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 6px 2px 12px; display: flex; flex-direction: column;
}
.chat-empty { margin: auto; }

.msg { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.msg.grouped { margin-top: 3px; }
.msg.mine { flex-direction: row-reverse; }
.ava-gap { width: 36px; flex: none; }
.msg .ava { flex: none; }
/* Пузыри с макета: чужие — белые, свои — терракотовые со светлым текстом. */
.bub {
  max-width: 80%; background: #fff; border: none;
  border-radius: 18px 18px 18px 7px; padding: 11px 15px 8px;
  box-shadow: 0 4px 14px rgba(120, 95, 70, 0.08);
}
.msg.mine .bub { background: var(--acc); color: #fff; border-radius: 18px 18px 7px 18px; }
.msg.mine .bub .txt, .msg.mine .bub .nm { color: #fff; }
.msg.mine .bub .tm { color: rgba(255, 255, 255, 0.75); }
.msg.expert .bub { background: #fff; }
.bub .nm { display: block; font-size: 15px; font-weight: 600; color: var(--txt); margin-bottom: 2px; }
.msg.expert .bub .nm { color: var(--txt); }
.bub .txt { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.45; }
.bub .tm { display: block; text-align: right; font-size: 10.5px; color: var(--mute); margin-top: 3px; }
.bub .shots img { width: 150px; height: 150px; }
.bub .aplayer { max-width: 260px; margin: 8px 0 2px; }
.msg-reply {
  flex: none; border: 0; background: none; padding: 4px; color: var(--mute);
  cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.msg:hover .msg-reply { opacity: 1; }
@media (hover: none) { .msg-reply { opacity: 0.4; } }

.daysep { text-align: center; margin: 16px 0 4px; }
.daysep span {
  font-size: 11.5px; color: var(--dim); background: rgba(255, 255, 255, 0.75);
  padding: 4px 13px; border-radius: 20px;
}

/* ---- строка ввода */
.composer-wrap {
  flex: none; padding: 6px 0 10px;
  /* высоту таббара меряем вживую (--tabh): на iPhone к ней добавляется полоска «домой» */
  margin-bottom: var(--tabh, calc(74px + env(safe-area-inset-bottom)));
}
.composer-wrap .reply-to {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim);
  background: rgba(255, 255, 255, 0.8); border-left: 3px solid var(--rose);
  padding: 8px 12px; border-radius: 0 10px 10px 0; margin-bottom: 8px;
}
.composer-wrap .reply-to svg { width: 14px; height: 14px; color: var(--acc); }
.cprev { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cprev:empty { display: none; }
.composer {
  display: flex; align-items: flex-end; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
  padding: 5px 6px; box-shadow: 0 6px 22px rgba(120, 95, 70, 0.1);
}
.composer textarea {
  flex: 1; min-width: 0; border: 0; background: none; resize: none; outline: none;
  padding: 11px 4px 10px; max-height: 130px; font-size: 15px; line-height: 1.35;
}
.cbtn {
  flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
  background: none; color: var(--acc); display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.cbtn:active { transform: scale(0.92); }
.cbtn.send { background: var(--acc); color: #fff; }
.cbtn.mic.on { background: #c9564a; color: #fff; }
.cbtn.busy { opacity: 0.45; pointer-events: none; }
.stop-sq { width: 13px; height: 13px; border-radius: 3px; background: currentColor; }

.recbar {
  display: flex; align-items: center; gap: 9px; margin-bottom: 8px;
  background: var(--card); border-radius: 18px; padding: 10px 14px; font-size: 13px;
  box-shadow: 0 4px 14px rgba(120, 95, 70, 0.08);
}
.recbar .dot { width: 9px; height: 9px; border-radius: 50%; background: #c9564a; animation: recpulse 1s infinite; }
.recbar b { font-variant-numeric: tabular-nums; min-width: 34px; }
.recbar .hint { flex: 1; color: var(--mute); font-size: 12px; }
.recbar button { border: 0; background: none; color: var(--acc); cursor: pointer; font-size: 13px; }
@keyframes recpulse { 50% { opacity: 0.2; } }

/* Клавиатура открыта — нижняя панель уезжает вниз, строка ввода прижимается к клавиатуре.
   Убираем именно через bottom: на панели стоит backdrop-filter, а с ним transform не срабатывает. */
.tabbar { transition: bottom 0.22s ease; }
/* Меню не убираем даже во время набора: клиент должен видеть, где он находится.
   Строка ввода стоит над меню, меню — над клавиатурой. */
body.kb-open .composer-wrap { padding-bottom: 6px; }
body.chat-mode.recording .chat-list { opacity: 0.55; transition: opacity 0.2s; }

/* ------------------------------------------------------------- полосы прокрутки
   Системная полоса Windows выбивается из оформления: серый прямоугольник со стрелками
   поверх тёплой бумаги. Рисуем свою — тонкую, в цвете страницы, без стрелок. */
* { scrollbar-width: thin; scrollbar-color: rgba(176, 91, 66, 0.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(176, 91, 66, 0.3); border-radius: 20px;
  border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(176, 91, 66, 0.5); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }
/* на телефоне полосы и так всплывающие — место под них не занимаем */
@media (hover: none) { ::-webkit-scrollbar { width: 0; height: 0; } }

/* ---------------------------- масштаб экрана двумя пальцами всегда выключен */
html, body { touch-action: pan-x pan-y; }

/* «потянуть вниз, чтобы обновить» */
.ptr {
  position: fixed; top: 6px; left: 50%; z-index: 60;
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--acc); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(120, 95, 70, 0.14);
  transform: translate(-50%, 0); opacity: 0; pointer-events: none;
}
.ptr.ready { color: #fff; background: var(--acc); border-color: var(--acc); }
.ptr.spin svg { animation: ptrspin 0.9s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* практика: вертикальная прокрутка — браузеру, горизонтальный жест — наш */
.wrap.practice-page { touch-action: pan-y; will-change: transform; }

/* ------------------------------------------------------- видео в практике */
.vid {
  position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 16px;
  border-radius: 14px; overflow: hidden; background: #efe3d8;
}
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ----------------------------------------- юридические документы под входом */
.auth-docs {
  margin: 14px auto 0; max-width: 420px; text-align: center;
  font-size: 11.5px; line-height: 1.9; color: var(--mute);
}
.auth-docs a { color: var(--mute); text-decoration: underline; text-underline-offset: 2px; }
.auth-docs a:hover { color: var(--acc); }
.auth-docs .sep { margin: 0 7px; opacity: 0.6; }

/* ------------------------------------------- «в ответ на» — цитата над текстом */
.quote {
  display: flex; align-items: flex-start; gap: 7px; width: 100%; text-align: left;
  border: 0; border-left: 3px solid var(--rose); background: rgba(255, 255, 255, 0.72);
  border-radius: 0 10px 10px 0; padding: 7px 11px; margin: 0 0 8px; cursor: pointer;
  font: inherit; color: var(--dim);
}
.quote:hover { background: #fff; }
.quote.expert { border-left-color: var(--sage); }
.quote svg { flex: none; width: 13px; height: 13px; margin-top: 3px; color: var(--acc); }
.quote .qt { min-width: 0; font-size: 12.5px; line-height: 1.4; }
.quote .qt i {
  display: block; font-style: normal; font-weight: 600; color: var(--acc); margin-bottom: 1px;
}
.quote.expert .qt i { color: var(--sage); }
.quote .qt { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.msg.mine .quote { background: rgba(255, 255, 255, 0.55); }

/* подсветка сообщения, к которому перешли по цитате */
@keyframes flashmsg {
  0% { box-shadow: 0 0 0 3px var(--acc); }
  100% { box-shadow: 0 0 0 3px rgba(196, 113, 90, 0); }
}
.post.flash, .msg.flash .bub { border-radius: 16px; animation: flashmsg 1.8s ease-out; }

/* ------------------------------------------- команда проекта: админ и модератор */
:root { --admin: #b8342a; --moder: #b07d1c; }
.role-tag {
  display: inline-block; margin-left: 7px; padding: 1px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px; color: #fff; vertical-align: middle;
}
.role-tag.admin { background: var(--admin); }
.role-tag.moderator { background: var(--moder); }

/* имя автора красим по роли — и в чате, и в ленте практики */
.msg.admin .bub .nm, .post.admin .who b { color: var(--admin); }
.msg.moderator .bub .nm, .post.moderator .who b { color: var(--moder); }
.msg.admin .bub { border-color: rgba(184, 52, 42, 0.35); }
.msg.moderator .bub { border-color: rgba(176, 125, 28, 0.35); }
.post.admin { background: rgba(184, 52, 42, 0.06); }
.post.moderator { background: rgba(176, 125, 28, 0.07); }
.quote.admin { border-left-color: var(--admin); }
.quote.admin .qt i { color: var(--admin); }
.quote.moderator { border-left-color: var(--moder); }
.quote.moderator .qt i { color: var(--moder); }

/* --------------------------------- голосование за дату выпускного эфира */
.poll-card { margin-bottom: 16px; }
.poll-card.done .poll-final { font-family: var(--font); font-style: normal; text-transform: none;
  font-family: var(--serif); font-size: 22px; margin: 0 0 6px; color: var(--acc);
}
.poll-card.done .poll-final span { font-family: var(--font); font-size: 12.5px; color: var(--mute); }
.poll-opt {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; cursor: pointer; overflow: hidden;
}
.poll-opt.on { border-color: var(--acc); background: var(--acc-soft); }
.poll-opt input { position: absolute; opacity: 0; pointer-events: none; }
.poll-opt .tick {
  flex: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line);
  display: grid; place-items: center; color: transparent; background: #fff;
}
.poll-opt.on .tick { background: var(--acc); border-color: var(--acc); color: #fff; }
.poll-opt .txt { flex: 1; min-width: 0; }
.poll-opt .txt b { display: block; font-size: 14.5px; font-weight: 500; }
.poll-opt .txt i { display: block; font-style: normal; font-size: 12.5px; color: var(--mute); }
.poll-opt .cnt {
  flex: none; min-width: 26px; text-align: center; font-size: 13px; font-weight: 600; color: var(--acc);
  font-variant-numeric: tabular-nums;
}
.poll-opt .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line-soft); }
.poll-opt .bar i { display: block; height: 100%; background: var(--rose); }

/* карточка оплаты в чате и на других экранах — отступ снизу */
.pay-card { margin: 0 0 18px; }

/* крестик удаления — виден только команде проекта */
.del-post {
  border: 0; background: none; padding: 3px; margin-left: auto; cursor: pointer;
  color: var(--mute); line-height: 0; border-radius: 8px;
}
.del-post:hover { color: var(--bad, #c0392b); background: rgba(192, 57, 43, 0.08); }
.post .who .del-post { margin-left: auto; }
.msg-tools { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
@media (hover: none) { .del-post { opacity: 0.5; } }
