/* SEIVA Platform - фирстиль: тёмный фон #111, золото #C9A87C, Montserrat */
:root {
  --bg: #111111;
  --bg-2: #171717;
  --card: #1c1c1c;
  --card-2: #202020;
  --line: #2b2b2b;
  --gold: #c9a87c;
  --gold-soft: #d9bd97;
  --text: #f2efe9;
  --muted: #9a948b;
  --muted-2: #837c72;
  --lock: #7d7669;
  --radius: 16px;
  --maxw: min(95vw, 1560px); /* широкая колонка - контент растянут, поля по краям небольшие */
  --gold-line: linear-gradient(90deg, var(--gold), transparent);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #1a1815 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* --- Бренд --- */
.brand-mark {
  font-weight: 700;
  letter-spacing: 0.32em;
  color: var(--gold);
  font-size: 22px;
}
.brand-mark.sm { font-size: 16px; letter-spacing: 0.28em; }
.brand-mark.link:hover { color: var(--gold-soft); }

/* --- Верхняя панель --- */
.top-bar { border-bottom: 1px solid var(--line); background: rgba(17,17,17,0.7); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.top-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; }
.top-right { display: flex; align-items: center; gap: 16px; }
.who { color: var(--muted); font-size: 14px; letter-spacing: 0.02em; }

.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 7px 16px; border-radius: 9px; font-family: inherit; font-size: 13px; cursor: pointer;
  transition: 0.18s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.logout-form { margin: 0; }

/* --- Кнопка золото --- */
.btn-gold {
  display: inline-block; background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #1a140c; font-weight: 600; font-family: inherit; font-size: 15px;
  padding: 13px 26px; border: none; border-radius: 11px; cursor: pointer; letter-spacing: 0.01em;
  transition: 0.18s; box-shadow: 0 8px 24px -12px rgba(201,168,124,0.6);
}
.btn-gold:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* --- Страница --- */
.page { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 40px 22px 60px; flex: 1; }
.muted { color: var(--muted); }

.hero { margin-bottom: 38px; }
.hero-eyebrow { color: var(--gold); font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; margin-bottom: 12px; }
.hero-title { font-size: 34px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; line-height: 1.15; }
.hero-sub { color: var(--muted); font-size: 15px; margin: 0; }

/* --- Модули (сетка карточек) --- */
.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.mod-card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 16px;
  transition: 0.2s; scroll-margin-top: 84px; display: flex; flex-direction: column;
}
.mod-card:target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,124,0.18); }
.mod-card.is-open { border-color: #34302a; }
.mod-card.is-open:hover { border-color: rgba(201,168,124,0.4); }
.mod-card.is-locked { opacity: 0.72; }

.mod-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.mod-title { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.mod-subtitle { color: var(--muted); font-size: 13.5px; }

.badge { font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 20px; white-space: nowrap; letter-spacing: 0.02em; }
.badge-open { color: var(--gold); background: rgba(201,168,124,0.1); border: 1px solid rgba(201,168,124,0.3); }
.badge-lock { color: var(--lock); background: rgba(125,118,105,0.08); border: 1px solid var(--line); }

/* Аккордеон модуля: клик по шапке раскрывает содержание */
.mod-acc { width: 100%; }
.mod-summary { list-style: none; cursor: pointer; outline: none; }
.mod-summary::-webkit-details-marker { display: none; }
.mod-summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.mod-sumfoot { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.mod-progress { flex: 1; height: 7px; background: var(--bg); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.mod-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 20px; transition: width 0.4s; }
.mod-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.mod-card.is-locked .mod-progress-fill { background: var(--muted-2); }
.mod-chevron { color: var(--gold); font-size: 13px; transition: transform 0.2s; flex-shrink: 0; }
.mod-acc[open] .mod-chevron { transform: rotate(180deg); }
.mod-summary:hover .mod-title { color: var(--gold-soft); }

.lessons { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.lesson-row { border-bottom: 1px solid var(--line); }
.lesson-link { display: flex; align-items: center; gap: 14px; padding: 14px 4px; transition: 0.15s; }
.lesson-link:not(.locked):hover { padding-left: 10px; }
.lesson-link:not(.locked):hover .lesson-name { color: var(--gold-soft); }
.lesson-num { color: var(--gold); font-size: 13px; font-weight: 600; min-width: 34px; letter-spacing: 0.03em; }
.lesson-name { flex: 1; font-size: 15px; }
.lesson-go { color: var(--muted); font-size: 13px; }
.lesson-go.muted { color: var(--muted-2); }
.lesson-link.locked { cursor: default; color: var(--muted-2); }
.lesson-link.locked .lesson-num { color: var(--muted-2); }
.lesson-link.locked .lesson-name { color: var(--muted); }

/* --- Вход --- */
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 420px; text-align: center;
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: 22px; padding: 44px 34px;
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.9);
}
.auth-card .brand-mark { font-size: 26px; margin-bottom: 22px; display: block; }
.auth-title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.auth-action { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 54px; margin-bottom: 8px; }
.auth-note { color: var(--muted-2); font-size: 12.5px; margin: 22px 0 0; line-height: 1.5; }
.hint { color: var(--muted-2); font-size: 12px; margin: 4px 0 0; }

.tg-placeholder {
  display: inline-flex; align-items: center; gap: 10px; background: #2aabee; color: #fff;
  padding: 13px 26px; border-radius: 11px; font-weight: 600; font-size: 15px;
}
/* Неактивный вид: не притворяется рабочей кнопкой (серый, курсор по умолчанию) */
.tg-placeholder.is-inactive {
  background: transparent; border: 1px dashed var(--line); color: var(--muted-2);
  font-weight: 500; font-size: 13.5px; cursor: default;
}
.tg-placeholder.is-inactive .tg-ico { opacity: 0.5; }
.tg-ico { font-size: 18px; }

/* --- Форма входа логин+пароль --- */
.login-form { display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 8px; }
.field-label { color: var(--muted-2); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 6px; }
.field-hint { text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 400; opacity: 0.8; }
.auth-input {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 13px 15px; border-radius: 10px; font-family: inherit; font-size: 15px; width: 100%;
}
.auth-input::placeholder { color: var(--muted-2); }
.auth-input:focus { outline: none; border-color: var(--gold); }
.login-form .btn-gold { margin-top: 14px; width: 100%; justify-content: center; }
.auth-note a { color: var(--gold); text-decoration: none; }
.auth-note a:hover { text-decoration: underline; }

/* Пройденные уроки в списке модуля */
.lesson-link.is-done .lesson-go { color: #7fc97f; }
.lesson-link.is-done .lesson-name { opacity: 0.75; }

/* Ссылки в контенте - ГОРЯТ: золотые, подчёркнутые, со свечением на hover.
   Сразу видно, что кликается (описания уроков, конспекты, FAQ, подписи). */
.lesson-desc a, .konspekt a, .faq-a a, .auth-note a, .hero-sub a {
  color: #e6cfa6;
  text-decoration: underline;
  text-decoration-color: rgba(201,168,124,.55);
  text-underline-offset: 3px;
  font-weight: 600;
  border-radius: 4px;
  padding: 0 2px;
  transition: color .15s, background .15s, text-shadow .15s;
}
.lesson-desc a:hover, .konspekt a:hover, .faq-a a:hover, .auth-note a:hover, .hero-sub a:hover {
  color: #ffe9c4;
  background: rgba(201,168,124,.12);
  text-shadow: 0 0 14px rgba(230,207,166,.55);
  text-decoration-color: #e6cfa6;
}
.lesson-desc a::after, .konspekt a::after { content: ' ↗'; font-size: .82em; opacity: .75; }

/* Кнопка фулскрин на контейнере видео (свой - чтобы кроп сохранялся на весь экран) */
.video-frame { position: relative; }
.vf-fs { position: absolute; right: 12px; top: 12px; z-index: 3; background: rgba(17,17,17,.65); color: #fff;
         border: 1px solid rgba(255,255,255,.25); border-radius: 9px; font-size: 18px; padding: 6px 11px; cursor: pointer; }
.vf-fs:hover { background: rgba(17,17,17,.9); border-color: var(--gold); }
.video-frame:fullscreen { display: flex; align-items: center; justify-content: center; background: #000; }
.video-frame:fullscreen video { width: 100%; height: 100%; object-fit: contain; }

/* Редактор видео (куратор) */
.ve-wrap { max-width: 980px; }
.ve-select { width: 100%; text-align: left; margin-bottom: 14px; }
.ve-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.ve-frame video { width: 100%; display: block; }
.ve-controls { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.ve-label { color: var(--muted); font-size: 13.5px; }
.ve-val { color: var(--gold2, #e6cfa6); font-weight: 600; min-width: 48px; }

/* Редактор Клодов (куратор) */
.ce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.ce-card { background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.ce-title { font-weight: 700; margin-bottom: 10px; }
.ce-role { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.ce-canvas { width: 100%; aspect-ratio: 1; background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; cursor: grab; touch-action: none; }
.ce-canvas:active { cursor: grabbing; }
.ce-controls { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.ce-zoom { flex: 1; accent-color: var(--gold); }
.ce-strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px; }
.ce-stick { width: 52px; height: 52px; object-fit: contain; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; flex: 0 0 auto; }
.ce-stick:hover, .ce-stick.sel { border-color: var(--gold); }
.ce-status { font-size: 12.5px; min-height: 18px; margin-top: 4px; }

/* Карточка модуля = ссылка на страницу модуля */
a.mod-link { display: block; text-decoration: none; color: inherit; }
a.mod-link:hover .mod-title { color: var(--gold2, #e6cfa6); }
a.mod-link .mod-chevron { transition: transform .15s; }
a.mod-link:hover .mod-chevron { transform: translateX(4px); }
.lesson-eyebrow.link { text-decoration: none; }
.lesson-eyebrow.link:hover { color: var(--gold2, #e6cfa6); }

/* Страница модуля */
.module-page .module-hero { margin-bottom: 26px; }
.module-hero-progress { display: flex; align-items: center; gap: 14px; margin-top: 18px; max-width: 560px; }
.module-lessons { margin-bottom: 26px; }

/* FAQ по модулю: свёрнутый блок вопрос-ответ внутри карточки модуля */
.faq-block { margin: 6px 18px 18px; border-top: 1px dashed var(--line); padding-top: 12px; }
.faq-block.in-lesson { margin: 22px 0 8px; }
.faq-head { cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; color: var(--gold2, #e6cfa6); padding: 6px 0; }
.faq-head::-webkit-details-marker { display: none; }
.faq-count { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 20px; font-size: 11.5px; padding: 1px 9px; margin-left: 6px; color: var(--muted); }
.faq-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.faq-q { font-size: 14px; font-weight: 600; color: var(--gold2, #e6cfa6); margin-bottom: 6px; }
.faq-a { color: var(--text, #ececec); font-size: 13.5px; line-height: 1.6; margin: 0; opacity: 0.92; }

/* PDF-конспект: закрыт по умолчанию, вся плашка = кнопка открыть/закрыть */
.pdf-bar { display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; flex-wrap: wrap; }
.pdf-bar.as-summary { cursor: pointer; list-style: none; transition: border-color .15s; }
.pdf-bar.as-summary:hover { border-color: var(--gold); }
.pdf-bar.as-summary::-webkit-details-marker { display: none; }
.pdf-ico { font-size: 22px; }
.pdf-name { font-weight: 600; margin-right: auto; }
.pdf-toggle { color: var(--gold); font-size: 13.5px; }
details[open] > .pdf-bar .pdf-toggle::after { content: ''; }
details[open] > .pdf-bar.as-summary .pdf-toggle { visibility: hidden; position: relative; }
details[open] > .pdf-bar.as-summary .pdf-toggle::before { content: 'закрыть ▴'; visibility: visible; position: absolute; right: 0; }
.pdf-actions { display: flex; gap: 10px; justify-content: flex-end; margin: 12px 0; flex-wrap: wrap; }
.pdf-acc { margin-top: 4px; }
.pdf-acc .konspekt { margin-top: 14px; }
.pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* Навигация урока (пройти дальше без обязательного вопроса куратору) */
.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 28px 0 8px; flex-wrap: wrap; }
.lesson-nav .next-lesson { margin-left: auto; }
.feedback-summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 12px 0; list-style: none; }
.feedback-summary::-webkit-details-marker { display: none; }
.feedback-summary::before { content: '▸ '; color: var(--gold); }
details[open] > .feedback-summary::before { content: '▾ '; }
.fb-optional { color: var(--muted-2); font-weight: 400; font-size: 13px; }

.dev-login { margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.dev-label { color: var(--muted-2); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.dev-input {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: 10px; font-family: inherit; font-size: 14px; text-align: center;
}
.dev-input:focus { outline: none; border-color: var(--gold); }

.alert {
  background: rgba(180,80,70,0.12); border: 1px solid rgba(180,80,70,0.35); color: #e5b3ad;
  padding: 12px 16px; border-radius: 10px; font-size: 13.5px; margin-bottom: 22px; line-height: 1.45;
}

/* --- Урок --- */
.lesson-page { max-width: 1060px; }
.back-link { color: var(--muted); font-size: 14px; display: inline-block; margin-bottom: 22px; transition: 0.15s; }
.back-link:hover { color: var(--gold); }
.lesson-head { margin-bottom: 24px; }
.lesson-eyebrow { color: var(--gold); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 10px; }
.lesson-title { font-size: 28px; font-weight: 700; margin: 0 0 10px; line-height: 1.2; }
.lt-num { color: var(--gold); font-weight: 600; }
.lesson-desc { color: var(--muted); font-size: 15.5px; margin: 0; white-space: pre-line; line-height: 1.6; }

.video-frame { margin: 8px 0 32px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.video-frame video { width: 100%; display: block; background: #000; }
.video-placeholder {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: repeating-linear-gradient(135deg, #161514, #161514 12px, #191817 12px, #191817 24px);
}
.vp-play { width: 66px; height: 66px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; }
.vp-text { color: var(--text); font-size: 15px; font-weight: 500; }
.vp-sub { color: var(--muted-2); font-size: 12px; }

.lesson-body { border-top: 1px solid var(--line); padding-top: 26px; }
.block-h { color: var(--gold); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 14px; }
.konspekt { font-size: 15.5px; color: #d9d5cd; line-height: 1.65; }
.konspekt p { margin: 0 0 13px; }
.konspekt h3 { font-size: 18px; font-weight: 600; color: var(--text); margin: 24px 0 10px; }
.konspekt h4 { font-size: 15.5px; font-weight: 600; color: var(--text); margin: 18px 0 8px; }
.konspekt ul, .konspekt ol { margin: 0 0 14px; padding-left: 22px; }
.konspekt li { margin: 0 0 7px; }
.konspekt strong { color: var(--text); font-weight: 600; }
.konspekt code { background: #262421; color: var(--gold-soft); padding: 2px 6px; border-radius: 5px; font-size: 13.5px; }

/* --- Обратная связь --- */
.feedback { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 34px; }
.feedback-empty { margin: 0 0 18px; }
.thread { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.qa { border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px 14px; background: var(--bg-2); }
.qa-q, .qa-a { padding-top: 14px; }
.qa-a { border-top: 1px dashed var(--line); margin-top: 4px; }
.qa-who { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 5px; }
.qa-a .qa-who { color: var(--gold); }
.qa-text { font-size: 15px; color: #d9d5cd; white-space: pre-wrap; }
.qa-pending { padding: 12px 0 2px; color: var(--muted); font-size: 13.5px; }

.feedback-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.fb-input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 13px 15px; border-radius: 12px; font-family: inherit; font-size: 14.5px; resize: vertical; line-height: 1.5;
}
.fb-input:focus { outline: none; border-color: var(--gold); }

/* --- Шкала прогресса + Клоды (кабинет ученицы) --- */
.progress-card {
  background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 30px;
}
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.pc-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.pc-percent { font-size: 40px; font-weight: 700; color: var(--gold); line-height: 1; }
.pc-pct { font-size: 22px; }
.pc-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pc-bar { height: 10px; background: var(--bg); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.pc-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 20px; transition: width 0.4s; }

/* --- Коллекция плюшевых Клодов --- */
.claude-collection { margin-bottom: 30px; }
.claude-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cl-card {
  background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 8px 10px; text-align: center; transition: 0.2s;
  display: block; text-decoration: none; color: inherit; cursor: pointer;
}
.cl-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.cl-card.earned { border-color: rgba(201,168,124,0.45); }
.cl-plush { position: relative; width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.cl-plush { overflow: hidden; padding: 12%; box-sizing: border-box; } /* воздух вокруг Клода, ничего не упирается в края */
.cl-plush img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; display: block; }
.cl-card.earned .cl-plush img {
  animation: clFloat 3.8s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(201,168,124,0.28));
}
.cl-card.locked .cl-plush img { filter: grayscale(1) brightness(0.42) contrast(0.9); opacity: 0.5; }
.cl-lock { position: absolute; font-size: 22px; opacity: 0.9; }
.cl-role {
  min-height: 3em; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center;
}
.cl-mod { font-size: 11.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.cl-theme { font-size: 11px; color: var(--muted); line-height: 1.15; text-wrap: balance; }
.cl-card.locked .cl-role { color: var(--muted); }
.cl-meta { font-size: 11px; color: var(--gold); margin-top: 2px; }
.cl-card.locked .cl-meta { color: var(--muted-2); }

@keyframes clFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .cl-card .cl-plush img { animation: none !important; } }
@media (max-width: 640px) {
  .claude-row { grid-template-columns: repeat(4, 1fr); }
}

/* --- Отметка «пройдено» в уроке --- */
.done-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 34px; padding-top: 24px;
}
.done-state { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text); }
.done-state.muted { color: var(--muted); }
.done-claude {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); color: var(--muted-2); font-size: 15px; flex-shrink: 0;
}
.done-claude.got { border: 1px solid var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #1a140c; }

/* --- Мониторинг учениц (панель куратора) --- */
.mon-list { display: flex; flex-direction: column; gap: 10px; }
.mon-row {
  display: grid; grid-template-columns: 1.4fr 1.6fr auto 1.4fr; gap: 16px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: var(--bg-2);
}
.mon-name { font-size: 14.5px; color: var(--gold); font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.mon-real { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.mon-bar-wrap { display: flex; align-items: center; gap: 10px; }
.mon-bar { flex: 1; height: 8px; background: var(--bg); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.mon-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 20px; }
.mon-pct { font-size: 12.5px; color: var(--muted); min-width: 34px; }
.mon-claudes { font-size: 13px; color: var(--gold); white-space: nowrap; }
.mon-seen { font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .mon-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .pc-right { text-align: left; }
  .claude-grid { justify-content: flex-start; }
}

/* --- Кабинет куратора --- */
.cur-stats { display: flex; gap: 10px; margin-bottom: 30px; }
.cur-pill { font-size: 13px; padding: 7px 15px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.cur-pill.cur-open { color: var(--gold); border-color: rgba(201,168,124,0.35); background: rgba(201,168,124,0.08); }
.cur-list { display: flex; flex-direction: column; gap: 16px; }
.cur-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: linear-gradient(180deg, var(--card), var(--bg-2)); }
.cur-card.is-open { border-color: rgba(201,168,124,0.3); }
.cur-meta { font-size: 12.5px; color: var(--muted-2); margin-bottom: 8px; }
.cur-user { color: var(--gold); font-weight: 600; }
.cur-q { font-size: 15.5px; color: var(--text); margin-bottom: 14px; white-space: pre-wrap; }
.cur-a { font-size: 14.5px; color: var(--muted); padding-top: 12px; border-top: 1px dashed var(--line); white-space: pre-wrap; }
.cur-a-label { color: var(--gold); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.cur-reply { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* --- Центр-страница (locked / error) --- */
.center-page { display: flex; align-items: center; justify-content: center; }
.locked-card {
  text-align: center; max-width: 460px; background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: 22px; padding: 46px 36px;
}
.locked-ico { font-size: 42px; margin-bottom: 16px; }
.locked-title { font-size: 24px; font-weight: 700; margin: 0 0 12px; }
.locked-sub { color: var(--text); font-size: 15.5px; margin: 0 0 8px; }
.locked-card .btn-gold { margin-top: 24px; }

/* --- Эфиры --- */
.efir-live { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.efir-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.efir-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.efir-card {
  background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px 30px; text-align: center;
}
.efir-badge {
  display: inline-block; color: var(--gold); font-size: 13px; letter-spacing: 0.08em;
  border: 1px solid rgba(201,168,124,0.35); background: rgba(201,168,124,0.08);
  padding: 7px 16px; border-radius: 20px; margin-bottom: 16px;
}
.efir-when { font-size: 20px; font-weight: 600; margin-bottom: 10px; }

/* Чат */
.chat {
  display: flex; flex-direction: column; height: min(60vh, 520px);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); overflow: hidden;
}
.chat-head {
  padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0504a; box-shadow: 0 0 0 0 rgba(224,80,74,0.6); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(224,80,74,0.6); } 70% { box-shadow: 0 0 0 7px rgba(224,80,74,0); } 100% { box-shadow: 0 0 0 0 rgba(224,80,74,0); } }
.chat-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; gap: 2px; }
.msg-who { font-size: 11.5px; color: var(--muted-2); }
.msg.is-curator .msg-who { color: var(--gold); }
.msg-text { font-size: 14px; color: #d9d5cd; word-break: break-word; }
.msg.is-curator .msg-text { color: var(--text); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input {
  flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  padding: 11px 14px; border-radius: 10px; font-family: inherit; font-size: 14px;
}
.chat-input:focus { outline: none; border-color: var(--gold); }
.chat-form .btn-gold { padding: 11px 18px; }

/* Управление эфиром */
.efir-admin { display: flex; flex-direction: column; gap: 18px; }
.fld { display: flex; flex-direction: column; gap: 7px; text-align: left; }
.fld-label { font-size: 13px; color: var(--muted); }
.fld-hint { font-size: 12px; color: var(--muted-2); }
.efir-admin .dev-input, .efir-admin .fb-input { text-align: left; }
.efir-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.efir-clear { margin-top: 22px; }
.efir-status { text-transform: none; }
.efir-status.efir-live { color: #e0504a; }
.efir-status.efir-scheduled { color: var(--gold); }

@media (max-width: 760px) {
  .efir-live { grid-template-columns: 1fr; }
  .chat { height: 420px; }
}

/* --- Подвал --- */
.site-foot {
  border-top: 1px solid var(--line); color: var(--muted-2); font-size: 12.5px;
  padding: 22px; text-align: center; display: flex; gap: 10px; justify-content: center; letter-spacing: 0.02em;
}
.foot-dot { color: var(--gold); }

@media (max-width: 620px) {
  .hero-title { font-size: 27px; }
  .lesson-title { font-size: 23px; }
  .mod-head { flex-direction: column; }
  .modules { grid-template-columns: 1fr; }
  .page { padding: 28px 16px 44px; }
  .top-inner { flex-wrap: wrap; gap: 10px 12px; }
  .who { display: none; } /* прячем юзернейм на узком экране, чтобы кнопки не вылезали */
}

/* ============================================================
   АНИМАЦИИ - оживление интерфейса (в фирстиле, без внешних библиотек).
   Всё уважает prefers-reduced-motion (блок в самом низу). CSS-first: без JS
   ничего не «пропадает» - анимации только украшают появление уже сверстанного.
   ============================================================ */

/* Появление снизу с проявлением - базовый приём для блоков и карточек */
@keyframes revealUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.hero { animation: revealUp .5s ease-out both; }
.progress-card { animation: revealUp .55s ease-out both; animation-delay: .05s; }

/* Каскад карточек модулей - по очереди, эффект «раскладывания» */
.modules .mod-card { animation: revealUp .5s ease-out both; }
.modules .mod-card:nth-child(1) { animation-delay: .06s; }
.modules .mod-card:nth-child(2) { animation-delay: .12s; }
.modules .mod-card:nth-child(3) { animation-delay: .18s; }
.modules .mod-card:nth-child(4) { animation-delay: .24s; }
.modules .mod-card:nth-child(5) { animation-delay: .30s; }
.modules .mod-card:nth-child(6) { animation-delay: .36s; }
.modules .mod-card:nth-child(7) { animation-delay: .42s; }
.modules .mod-card:nth-child(n+8) { animation-delay: .48s; }

/* Каскад плюшевых Клодов */
.claude-row .cl-card { animation: revealUp .45s ease-out both; }
.claude-row .cl-card:nth-child(1) { animation-delay: .05s; }
.claude-row .cl-card:nth-child(2) { animation-delay: .10s; }
.claude-row .cl-card:nth-child(3) { animation-delay: .15s; }
.claude-row .cl-card:nth-child(4) { animation-delay: .20s; }
.claude-row .cl-card:nth-child(5) { animation-delay: .25s; }
.claude-row .cl-card:nth-child(6) { animation-delay: .30s; }
.claude-row .cl-card:nth-child(n+7) { animation-delay: .35s; }

/* Уроки на странице модуля - лёгкий каскад */
.module-lessons .lesson-row { animation: revealUp .4s ease-out both; }
.module-lessons .lesson-row:nth-child(1) { animation-delay: .04s; }
.module-lessons .lesson-row:nth-child(2) { animation-delay: .08s; }
.module-lessons .lesson-row:nth-child(3) { animation-delay: .12s; }
.module-lessons .lesson-row:nth-child(4) { animation-delay: .16s; }
.module-lessons .lesson-row:nth-child(n+5) { animation-delay: .20s; }

/* Шкалы прогресса «наливаются» слева при загрузке */
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pc-fill, .mod-progress-fill { transform-origin: left center; animation: barGrow .9s cubic-bezier(.25,.8,.3,1) both; animation-delay: .25s; }

/* Карточка модуля: подъём + тёплая тень на hover (углубляет существующий border-hover) */
.mod-card.is-open:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -24px rgba(201,168,124,.5); }

/* Клод чуть увеличивается при наведении (float на самом img сохраняется) */
.cl-card .cl-plush { transition: transform .2s ease; }
.cl-card:hover .cl-plush { transform: scale(1.07); }

/* Пройденный урок в списке модуля - мягко «загорается» */
.lesson-link.is-done .lesson-go { text-shadow: 0 0 10px rgba(127,201,127,.45); }

/* Золотая кнопка: тёплое свечение на hover (к существующему подъёму) */
.btn-gold:hover { box-shadow: 0 12px 32px -10px rgba(201,168,124,.7); }

/* Галочка «пройдено» выскакивает пружиной при заходе на пройденный урок */
@keyframes badgePop { 0% { transform: scale(0) rotate(-35deg); } 55% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
.done-claude.got { animation: badgePop .55s cubic-bezier(.2,1.5,.4,1) both; }

/* Конфетти-салют при отметке урока пройденным (частицы создаёт anim.js) */
@keyframes confFall {
  0% { transform: translateY(-14px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(104vh) rotate(720deg); opacity: .15; }
}
.confetti-piece {
  position: fixed; top: -14px; width: 9px; height: 14px; border-radius: 2px;
  z-index: 9999; pointer-events: none; will-change: transform;
  animation-name: confFall; animation-timing-function: cubic-bezier(.3,.55,.5,1); animation-fill-mode: forwards;
}

/* Постоянный бегущий блик по большой шкале прогресса - живое движение, видно всегда */
.pc-bar { position: relative; overflow: hidden; }
.pc-fill { position: relative; overflow: hidden; }
.pc-fill::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  transform: translateX(-160%);
  animation: shimmer 2.6s cubic-bezier(.4,0,.2,1) infinite; animation-delay: 1s;
}
@keyframes shimmer { 0% { transform: translateX(-160%); } 55%, 100% { transform: translateX(420%); } }

/* Собранный Клод дышит мягким золотым ореолом - заметно, что он «твой» */
.cl-card.earned .cl-plush::before {
  content: ''; position: absolute; inset: 8%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(201,168,124,.38), transparent 68%);
  animation: haloPulse 2.8s ease-in-out infinite;
}
.cl-card.earned .cl-plush img { position: relative; z-index: 1; }
@keyframes haloPulse { 0%,100% { opacity: .35; transform: scale(.85); } 50% { opacity: .9; transform: scale(1.12); } }

/* Уважаем «уменьшить движение» - гасим все автозапускаемые анимации */
@media (prefers-reduced-motion: reduce) {
  .hero, .progress-card,
  .modules .mod-card, .claude-row .cl-card, .module-lessons .lesson-row,
  .pc-fill, .mod-progress-fill, .done-claude.got { animation: none !important; opacity: 1 !important; transform: none !important; }
  .pc-fill::after, .cl-card.earned .cl-plush::before { animation: none !important; display: none !important; }
  .confetti-piece { display: none !important; }
}

/* --- Эфир-практикум: отдельный заметный блок под уроками модуля --- */
.efir-practicum {
  display: flex; align-items: center; gap: 16px;
  margin: 6px 0 28px; padding: 18px 22px;
  border-radius: 16px; border: 1px solid rgba(201,168,124,.4);
  background: linear-gradient(135deg, rgba(201,168,124,.16), rgba(28,28,28,.55));
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.efir-practicum:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 16px 40px -22px rgba(201,168,124,.6); }
.efir-badge-ico { font-size: 30px; flex-shrink: 0; line-height: 1; }
.efir-texts { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.efir-kicker { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.efir-title { font-size: 17px; font-weight: 600; color: var(--text); }
.efir-cta { color: var(--gold); font-size: 14px; font-weight: 600; white-space: nowrap; }
.efir-practicum.is-done { border-color: rgba(127,201,127,.4); }
.efir-practicum.is-done .efir-cta { color: #7fc97f; }
@media (max-width: 620px) {
  .efir-practicum { flex-wrap: wrap; gap: 10px; }
  .efir-cta { width: 100%; }
}

/* ============================================================
   ЛЮКС-ЖУРНАЛ - премиум-слой поверх фирстиля SEIVA.
   Палитра/шрифт НЕ меняются (тёмный + золото + Montserrat) -
   добавляем глубину, тёплый свет, тонкие золотые акценты, воздух.
   ============================================================ */

/* Богаче тёплый свет от верха страницы */
body {
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(201,168,124,.10), transparent 60%),
    radial-gradient(1200px 600px at 50% -10%, #1a1815 0%, var(--bg) 55%) fixed;
}

/* Заголовок-герой с характером: крупнее, тёплое свечение, золотая линия-акцент */
.hero { padding-top: 8px; }
.hero-eyebrow { position: relative; padding-left: 40px; }
.hero-eyebrow::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 30px; height: 1px;
  background: var(--gold-line);
}
.hero-title {
  font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.02em; font-weight: 700;
  text-shadow: 0 2px 40px rgba(201,168,124,.14);
}
.hero-title::after {
  content: ''; display: block; width: 64px; height: 2px; margin-top: 18px; border-radius: 2px;
  background: var(--gold-line);
}
.hero-sub { font-size: 16px; max-width: 60ch; margin-top: 16px; }

/* Заголовки секций - золотая линия-акцент слева, редакторский ритм */
.block-h { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.block-h::before {
  content: ''; width: 22px; height: 1px; background: var(--gold-line); flex-shrink: 0;
}

/* Глубина карточек: верхний внутренний блик + мягкая тень снизу. Фактура «дорогой бумаги» */
.progress-card, .mod-card, .cl-card, .efir-practicum, .locked-card, .auth-card, .efir-card, .cur-card {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 18px 44px -30px rgba(0,0,0,.85);
}
.progress-card, .mod-card.is-open {
  background: linear-gradient(180deg, #1f1e1b, var(--bg-2));
  border-color: #34302a;
}

/* Большая шкала прогресса - тоньше, изящнее, с золотым ободком */
.pc-bar { height: 8px; border-color: rgba(201,168,124,.2); }
.pc-percent { text-shadow: 0 2px 30px rgba(201,168,124,.28); }

/* Бейдж «Открыт» - лёгкое золотое сияние (статус, не просто пилюля) */
.badge-open { box-shadow: 0 0 18px -6px rgba(201,168,124,.5); }

/* Заблокированные Клоды - не серые «мертвецы», а спящий золотой силуэт */
.cl-card.locked .cl-plush img {
  filter: sepia(.55) saturate(1.15) brightness(.5) contrast(.95) opacity(.62);
}
.cl-card.locked { border-color: rgba(201,168,124,.14); }
.cl-card.locked .cl-lock { opacity: .8; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }

/* Тонкие золотистые разделители вместо серых волосков у ключевых секций */
.lessons, .lesson-body, .feedback { border-top-color: rgba(201,168,124,.16); }

/* Верхняя панель - чуть глубже стекло */
.top-bar { background: rgba(17,17,17,.72); box-shadow: 0 1px 0 rgba(201,168,124,.06); }

/* ============================================================
   ПЕРЕХОДЫ МЕЖДУ СТРАНИЦАМИ (View Transitions, cross-document).
   Старая страница мягко гаснет, новая проявляется. Браузеры без
   поддержки просто игнорируют - обычная навигация, ничего не ломается.
   ============================================================ */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtFadeOut .18s ease both; }
::view-transition-new(root) { animation: vtFadeIn .26s ease both; }
@keyframes vtFadeOut { to { opacity: 0; } }
@keyframes vtFadeIn { from { opacity: 0; } }
/* Шапка и подвал не перерисовываются заново - остаются на месте между страницами */
.top-bar { view-transition-name: topbar; }
.site-foot { view-transition-name: sitefoot; }

/* --- Золотая полоса чтения урока: ползёт по мере прокрутки конспекта --- */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  pointer-events: none; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  box-shadow: 0 0 12px -2px rgba(201,168,124,.7);
  view-transition-name: readbar;
}
/* Где браузер умеет scroll-driven animations - без JS вообще */
@supports (animation-timeline: scroll()) {
  .read-progress { animation: readGrow linear both; animation-timeline: scroll(root); }
}
@keyframes readGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --- Экран-поздравление «Модуль собран»: полноэкранный оверлей с Клодом --- */
.module-celebrate {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(10, 9, 7, .84); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  animation: mcFade .3s ease both;
}
.module-celebrate[hidden] { display: none; }
@keyframes mcFade { from { opacity: 0; } }
.mc-card {
  position: relative; text-align: center; max-width: min(92vw, 470px);
  padding: 44px 46px 38px; border-radius: 24px;
  border: 1px solid rgba(201,168,124,.45);
  background: linear-gradient(165deg, #201c15, #131211 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 40px 90px -24px rgba(0,0,0,.9), 0 0 70px -24px rgba(201,168,124,.5);
  animation: mcPop .6s cubic-bezier(.2,1.4,.4,1) both; animation-delay: .08s;
}
@keyframes mcPop { 0% { transform: scale(.6) translateY(30px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }
.mc-plush { position: relative; width: 150px; height: 150px; margin: 0 auto 6px; }
.mc-plush::before {
  content: ''; position: absolute; inset: -6%; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,124,.42), transparent 68%);
  animation: haloPulse 2.8s ease-in-out infinite;
}
.mc-plush img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain;
  animation: clFloat 3.8s ease-in-out infinite;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.55));
}
.mc-kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-top: 14px; }
.mc-title { font-size: 25px; font-weight: 700; margin: 10px 0 0; letter-spacing: -0.01em; text-shadow: 0 2px 34px rgba(201,168,124,.2); }
.mc-title::after {
  content: ''; display: block; width: 52px; height: 2px; margin: 14px auto 0; border-radius: 2px;
  background: var(--gold-line);
}
.mc-sub { color: var(--muted); font-size: 15px; margin: 14px 0 0; }
.mc-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .module-celebrate, .mc-card { animation: none !important; opacity: 1 !important; transform: none !important; }
  .mc-plush::before { animation: none !important; display: none !important; }
  .mc-plush img { animation: none !important; }
}
