/* ===== Salem Claude — общий стиль платформы «Кинотеатр» =====
   Каждый модуль — «сезон-постер» своего цвета, каждый урок — «эпизод» с обложкой.
   Без внешних шрифтов, картинок и скриптов: подходит под строгую CSP «только свой домен».
   Иконки — Phosphor (MIT), вставлены в app.js как SVG. */

/* ===== Шрифты: свои файлы (OFL) ===== */
@font-face { font-family: "Unbounded"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/unbounded-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/unbounded-latin-700-normal.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-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/inter-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-weight: 100 900; font-style: normal; font-display: swap; src: url("fonts/inter-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: #07070e; --bg2: #0e0e1a; --bg3: #141422; --bg4: #1a1a2e; --bg5: #212138;
  --ink: #eeecff; --ink-2: #a9a7c6; --ink-3: #8886a8;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12); --line-3: rgba(255, 255, 255, .2);
  --violet: #7c6fff; --violet-soft: #a99aff; --btn: #6e5ff0;
  --emerald: #2dd4a0; --amber: #f0b429; --coral: #ff6b5b; --coral-soft: #ff9a8d;
  --head: "Unbounded", "Inter", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --pad: clamp(16px, 4.4vw, 64px);
  --gut: max(var(--pad), calc((100vw - 1312px) / 2));  /* боковое поле: на широких экранах содержимое по центру */
  --topbar: 72px;
}
/* Цвет модуля: c1 — светлый край заливки, c2 — тёмный, rgb — для свечения. Белый текст на c1 — не ниже 4,5:1 */
.c-1 { --c1: #5e52d6; --c2: #2b2570; --rgb: 110, 95, 240; }   /* фиолетовый */
.c-2 { --c1: #0e7a5b; --c2: #093d33; --rgb: 20, 160, 120; }   /* изумрудный */
.c-3 { --c1: #2d62c2; --c2: #162d6b; --rgb: 55, 110, 220; }   /* синий */
.c-4 { --c1: #b4483c; --c2: #64211e; --rgb: 210, 80, 66; }    /* коралловый */
.c-5 { --c1: #9c6a0c; --c2: #5a3a07; --rgb: 200, 140, 20; }   /* янтарный */
.c-6 { --c1: #0c7c84; --c2: #07434a; --rgb: 18, 160, 170; }   /* бирюзовый */
.c-7 { --c1: #a5325c; --c2: #561533; --rgb: 200, 60, 110; }   /* розово-малиновый */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { display: block; flex: none; }
.icon { width: 20px; height: 20px; fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.col { min-width: 0; }
.wrap { padding-inline: var(--gut); }

/* ===== Типографика ===== */
.h1 { font: 700 clamp(26px, 3.4vw, 44px)/1.1 var(--head); letter-spacing: -.025em; }
.h1 b { font-weight: 700; color: var(--violet-soft); }
.h2 { font: 700 clamp(20px, 2.2vw, 28px)/1.15 var(--head); letter-spacing: -.02em; }
.h3 { font: 700 15px/1.3 var(--font); }
.lead { color: var(--ink-2); font-size: 17px; line-height: 1.6; max-width: 62ch; }
.muted { color: var(--ink-3); }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 700 12px/1.2 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--violet-soft); }
.eyebrow i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--violet-soft); box-shadow: 0 0 0 5px rgba(169, 154, 255, .2); }
.eyebrow em { font-style: normal; color: var(--ink-2); letter-spacing: .14em; }
.pro-badge { display: inline-block; padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(240, 180, 41, .6); color: var(--amber); font: 700 11px/1 var(--font); letter-spacing: .12em; }
.dotsep { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); flex: none; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px 0 18px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg3); color: var(--ink);
  font: 600 14px/1 var(--font); white-space: nowrap; transition: background .25s, border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.btn:hover { background: var(--bg4); border-color: var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn); border-color: transparent; color: #fff; }
.btn--primary:hover { background: var(--btn); border-color: transparent; box-shadow: 0 10px 30px -8px rgba(124, 111, 255, .65); transform: translateY(-1px); }
.btn--ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--lg { min-height: 56px; padding: 0 28px 0 22px; font-size: 16px; }
.btn--lg .icon { width: 22px; height: 22px; }
.btn--lg small { font: 500 13px/1 var(--font); opacity: .85; }
.btn--sm { min-height: 38px; padding: 0 16px 0 13px; font-size: 13px; gap: 8px; }
.btn--sm .icon { width: 16px; height: 16px; }
.btn--danger { color: var(--coral-soft); background: rgba(255, 107, 91, .1); border-color: rgba(255, 107, 91, .4); }
.btn--danger:hover { background: rgba(255, 107, 91, .22); border-color: rgba(255, 107, 91, .6); }
.btn--block { width: 100%; }
.btn--done[aria-pressed="true"] { background: rgba(45, 212, 160, .14); color: var(--emerald); border-color: rgba(45, 212, 160, .45); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ===== Карточки, поля, метки ===== */
.card { position: relative; background: var(--bg2); border: 1px solid var(--line-2); border-radius: 18px; }
.card--pad { padding: 26px; }
.grid { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > label, .label { font: 600 12px/1.2 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg3); color: var(--ink); transition: border-color .25s, box-shadow .25s, background .25s; }
textarea.input { padding: 13px 16px; min-height: 92px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: #7d7b9c; }
.input:focus { outline: none; border-color: var(--violet); background: var(--bg4); box-shadow: 0 0 0 3px rgba(124, 111, 255, .18); }
.input[readonly] { color: var(--ink-2); }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 16px; top: 50%; margin-top: -10px; color: var(--ink-3); pointer-events: none; }
.input-icon .input { padding-left: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; margin-top: -19px; width: 38px; height: 38px; color: var(--ink-3); border-radius: 10px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font: 600 12px/1.4 var(--font); white-space: nowrap; border: 1px solid var(--line-2); color: var(--ink-2); }
.tag--done { color: var(--emerald); border-color: rgba(45, 212, 160, .4); background: rgba(45, 212, 160, .1); }
.tag--progress { color: var(--amber); border-color: rgba(240, 180, 41, .45); background: rgba(240, 180, 41, .1); }
.tag--closed { color: var(--coral-soft); border-color: rgba(255, 107, 91, .5); background: rgba(255, 107, 91, .16); }
.tag--violet { color: #c8bfff; border-color: rgba(124, 111, 255, .6); background: rgba(124, 111, 255, .16); }
.bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--violet-soft); transition: width 1.2s var(--ease); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); border-radius: 99px; padding: 8px 15px; font: 500 13px/1.2 var(--font); color: var(--ink-2); transition: background .25s, color .25s, border-color .25s; }
.chip:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
.chip[aria-pressed="true"] { background: rgba(124, 111, 255, .18); color: #fff; border-color: var(--violet-soft); }
.empty { padding: 30px 20px; text-align: center; color: var(--ink-3); font-size: 14.5px; }
.err { color: var(--coral-soft); font-size: 14px; min-height: 20px; }

/* ===== Верхняя панель: на компьютере вкладки, на телефоне бургер ===== */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar); display: flex; align-items: center; gap: 40px; padding-inline: var(--gut);
  background: rgba(7, 7, 14, .84); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo__mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--btn); color: #fff; flex: none; }
.logo__mark .icon { width: 20px; height: 20px; }
.logo__name { font: 700 16px/1 var(--head); letter-spacing: -.01em; white-space: nowrap; }
.logo__name small { display: block; margin-top: 6px; font: 600 9.5px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); }
.topnav { display: flex; gap: 4px; }
.topnav__link { padding: 9px 16px; border-radius: 99px; font: 600 14px/1.2 var(--font); color: var(--ink-2); transition: background .25s, color .25s; }
.topnav__link:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.topnav__link[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .1); }
.topbar__r { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); font: 700 14px/1 var(--font); }
.pill .icon { color: var(--amber); width: 18px; height: 18px; }
.ibtn-round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); color: var(--ink-2); transition: color .25s, background .25s; }
.ibtn-round:hover { color: var(--ink); background: rgba(255, 255, 255, .12); }
.topbar__me { display: flex; align-items: center; gap: 10px; font: 600 14px/1 var(--font); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 15px/1 var(--head); color: #fff; background: linear-gradient(140deg, #7c6fff, #4a3fb8); border: 2px solid rgba(255, 255, 255, .2); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); place-items: center; color: var(--ink); }
.burger:hover { background: rgba(255, 255, 255, .09); }
.scrim, .side { display: none; }

/* меню-«шторка» для телефона */
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(4, 4, 9, .72); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; }
.scrim.is-open { opacity: 1; visibility: visible; }
.side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(320px, 86vw); flex-direction: column; gap: 6px; padding: 20px 16px 20px;
  background: var(--bg2); border-right: 1px solid var(--line-2); box-shadow: 24px 0 60px -24px #000;
  transform: translateX(-104%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s; }
.side.is-open { transform: none; visibility: visible; }
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 16px; }
.x-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--ink-2); display: grid; place-items: center; }
.x-btn:hover { background: rgba(255, 255, 255, .1); color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav__link { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 500; transition: background .25s, color .25s; }
.nav__link:hover { background: var(--bg3); color: var(--ink); }
.nav__link[aria-current="page"] { color: #fff; background: rgba(124, 111, 255, .16); box-shadow: inset 0 0 0 1px rgba(124, 111, 255, .4); }
.nav__link[aria-current="page"] .icon { color: var(--violet-soft); }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--line); }
.me .avatar { width: 38px; height: 38px; font-size: 14px; }
.me__t { min-width: 0; line-height: 1.3; }
.me__t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me__t span { font-size: 12px; color: var(--ink-3); }
.owner-link { font-size: 13.5px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; text-align: center; border: 1px dashed var(--line-3); }
.owner-link:hover { color: var(--ink); border-color: var(--violet-soft); }

.main { min-width: 0; padding-bottom: 150px; }

/* ===== Герой кабинета ===== */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 70px 0 150px; min-height: 640px; }
.hero__art { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(60% 90% at 78% 40%, rgba(var(--rgb), .5), rgba(var(--rgb), 0) 70%), radial-gradient(40% 50% at 95% 100%, rgba(var(--rgb), .22), rgba(var(--rgb), 0) 70%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 7, 14, .96) 0%, rgba(7, 7, 14, .78) 34%, rgba(7, 7, 14, 0) 62%), linear-gradient(0deg, var(--bg) 0%, rgba(7, 7, 14, 0) 34%); }
.hero .disc { position: absolute; right: calc(var(--gut) + 90px); top: 90px; width: 470px; height: 470px; border-radius: 50%;
  background: linear-gradient(145deg, var(--c1), var(--c2) 78%); box-shadow: 0 60px 120px -20px rgba(var(--rgb), .45); }
.hero .ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .14); }
.hero .r1 { right: calc(var(--gut) - 4px); top: 0; width: 660px; height: 660px; }
.hero .r2 { right: calc(var(--gut) - 124px); top: -120px; width: 880px; height: 880px; border-color: rgba(255, 255, 255, .07); }
.bignum { position: absolute; font: 700 560px/1 var(--head); letter-spacing: -.06em; color: rgba(238, 236, 255, .09); white-space: nowrap; user-select: none; }
.hero .bignum { right: calc(var(--gut) - 40px); top: 6px; }
.hero__ic { position: absolute; right: calc(var(--gut) + 235px); top: 215px; width: 200px; height: 200px; color: var(--ink); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); }
.hero__ic .icon { width: 100%; height: 100%; }
.hero__tag { position: absolute; right: var(--gut); bottom: 150px; font: 600 11px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; color: rgba(238, 236, 255, .5); writing-mode: vertical-rl; }
.hero__in { position: relative; display: grid; justify-items: start; }
.hero__in > * { max-width: 700px; }
.hello { font: 500 15px/1.2 var(--font); color: var(--ink-2); margin-bottom: 22px; }
.hero__title { font: 700 46px/1.08 var(--head); letter-spacing: -.025em; margin: 22px 0 18px; }
.hero__lead { font-size: 18px; line-height: 1.55; color: #cfcce8; max-width: 560px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 22px 0 28px; color: var(--ink-2); font: 600 14px/1.2 var(--font); }
.meta b { color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.resume__prog { display: flex; align-items: center; gap: 14px; margin-top: 26px; width: 460px; max-width: 100%; color: var(--ink-2); font: 600 13px/1.3 var(--font); }
.resume__prog .bar { flex: 1; }
.resume__prog span { white-space: nowrap; }

/* ===== Полоса статистики ===== */
.strip { position: relative; z-index: 2; margin-top: -96px; display: grid; grid-template-columns: 1.05fr 1.2fr 1.35fr; gap: 16px; }
.st { display: flex; align-items: flex-start; gap: 22px; min-height: 132px; padding: 22px 26px; border-radius: 22px; background: rgba(14, 14, 26, .9); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.st__t { min-width: 0; }
.lbl { font: 700 11px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.val { margin-top: 10px; font: 700 28px/1.1 var(--head); letter-spacing: -.02em; }
.val small { font: 600 14px/1.2 var(--font); color: var(--ink-2); letter-spacing: 0; margin-left: 4px; }
.sub { margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.ring-p { --size: 92px; position: relative; width: var(--size); height: var(--size); display: grid; place-items: center; flex: none; align-self: center; }
.ring-p svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-p circle { fill: none; stroke-width: 9; }
.ring-p .ring__bg { stroke: rgba(255, 255, 255, .1); }
.ring-p .ring__fg { stroke: url(#ringGrad); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0)); transition: stroke-dashoffset 1.4s var(--ease); }
.ring-p b { position: relative; font: 700 20px/1 var(--head); }
.week { display: flex; gap: 8px; margin-top: 14px; }
.week div { width: 34px; text-align: center; font: 600 11px/1 var(--font); color: var(--ink-3); text-transform: uppercase; }
.week i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; margin-bottom: 6px; background: rgba(255, 255, 255, .06); color: #1a1200; }
.week .on { color: var(--ink); }
.week .on i { background: linear-gradient(160deg, #f6c445, #c98a0a); }
.week .now i { border: 1.5px dashed rgba(255, 255, 255, .3); background: none; }
.week .icon { width: 17px; height: 17px; }
.medals { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.medal { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
.medal .icon { width: 19px; height: 19px; }
.medal--off { background: rgba(255, 255, 255, .05); color: var(--ink-3); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .1); }

/* ===== Ряды эпизодов ===== */
.sec { padding-top: 64px; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.sec-h p { color: var(--ink-2); font: 600 14px/1.3 var(--font); }
.row { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 22px; margin-bottom: 30px; }
.poster { position: relative; overflow: hidden; border-radius: 16px; padding: 18px 18px 20px; background: linear-gradient(160deg, var(--c1), var(--c2)); display: flex; flex-direction: column; justify-content: space-between; }
.poster__mn { position: relative; font: 700 11px/1 var(--font); letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .88); }
.poster__bn { position: absolute; right: -8px; top: 14px; font: 700 120px/1 var(--head); letter-spacing: -.06em; color: rgba(255, 255, 255, .17); }
.poster__t { position: relative; margin-top: 70px; }
.poster__t h3 { font: 700 18px/1.2 var(--head); letter-spacing: -.01em; }
.poster__cnt { margin-top: 8px; font: 600 13px/1.3 var(--font); color: rgba(255, 255, 255, .9); }
.poster__pro { position: relative; align-self: flex-start; margin-top: 10px; padding: 5px 9px; border-radius: 6px; background: rgba(0, 0, 0, .35); font: 700 10.5px/1 var(--font); letter-spacing: .12em; color: #fff; }
.poster .bar { position: relative; margin-top: 12px; height: 4px; background: rgba(0, 0, 0, .3); }
.poster .bar > i { background: #fff; }
.lane-wrap { position: relative; min-width: 0; }
.lane { display: flex; gap: 18px; align-items: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
.lane::-webkit-scrollbar { display: none; }
.lane-wrap.has-more:not(.at-end)::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 130px; pointer-events: none; background: linear-gradient(90deg, rgba(7, 7, 14, 0), var(--bg) 90%); }
.nx { display: none; position: absolute; right: 6px; top: 62px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #16143a; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transition: transform .25s var(--ease); }
.nx:hover { transform: scale(1.08); }
.lane-wrap.has-more:not(.at-end) .nx { display: grid; }
.ep { flex: 0 0 calc((100% - 54px) / 4); min-width: 0; display: block; scroll-snap-align: start; }
.cover { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 14px; background: linear-gradient(135deg, var(--c1), var(--c2)); transition: transform .25s var(--ease); isolation: isolate; }
.ep:hover .cover { transform: translateY(-4px); }
.cover .g { position: absolute; inset: 0; }
.cover .g::before, .cover .g::after { content: ""; position: absolute; }
.v0 .g::before { right: -34px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .17); }
.v0 .g::after { right: 46px; bottom: 26px; width: 64px; height: 64px; border-radius: 50%; border: 9px solid rgba(255, 255, 255, .2); }
.v1 .g::before { inset: 0 0 0 38%; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .15) 0 9px, transparent 9px 22px); }
.v1 .g::after { right: 34px; top: 44px; width: 54px; height: 54px; border-radius: 50%; background: rgba(0, 0, 0, .28); }
.v2 .g::before { right: -60px; bottom: -80px; width: 200px; height: 200px; border-radius: 50%; background: rgba(0, 0, 0, .24); }
.v2 .g::after { right: 18px; top: 46px; width: 96px; height: 62px; background: radial-gradient(rgba(255, 255, 255, .5) 2px, transparent 2.6px) 0 0 / 13px 13px; }
.v3 .g::before { inset: 0; background: repeating-radial-gradient(circle at 84% 28%, rgba(255, 255, 255, .22) 0 2px, transparent 2px 15px); -webkit-mask: radial-gradient(circle at 84% 28%, #000 0 90px, transparent 91px); mask: radial-gradient(circle at 84% 28%, #000 0 90px, transparent 91px); }
.v3 .g::after { right: -20px; bottom: 30px; width: 140px; height: 26px; background: rgba(0, 0, 0, .24); transform: rotate(-28deg); }
.v4 .g::before { inset: 0 0 0 46%; background: rgba(255, 255, 255, .15); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.v4 .g::after { right: 56px; top: 34px; width: 42px; height: 42px; border: 7px solid rgba(255, 255, 255, .28); transform: rotate(45deg); }
.cover .num { position: absolute; left: 14px; bottom: -12px; font: 700 96px/1 var(--head); letter-spacing: -.07em; color: #fff; text-shadow: 0 6px 26px rgba(0, 0, 0, .25); }
.cover .chip-k { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border-radius: 7px; background: rgba(0, 0, 0, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 700 10px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.cover .dur { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 5px; font: 700 12px/1 var(--font); color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.cover .dur .icon { width: 12px; height: 12px; }
.cover .ok, .cover .pl { position: absolute; right: 12px; bottom: 18px; border-radius: 50%; background: var(--ink); color: #16143a; display: grid; place-items: center; }
.cover .ok { width: 30px; height: 30px; }
.cover .ok .icon { width: 16px; height: 16px; }
.cover .pl { width: 46px; height: 46px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.cover .pl .icon { width: 20px; height: 20px; margin-left: 2px; }
.cover .pb { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .35); }
.cover .pb i { display: block; height: 100%; width: var(--p, 0%); background: #fff; }
.st-new .cover { filter: saturate(.5) brightness(.62); transition: filter .25s, transform .25s var(--ease); }
.st-new:hover .cover { filter: saturate(.9) brightness(.9); }
.st-cur .cover { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--violet-soft); }
.cap { padding: 12px 2px 0; }
.cap small { display: flex; gap: 8px; align-items: center; font: 700 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.cap small em { font-style: normal; color: var(--violet-soft); }
.cap b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 7px; font: 600 15px/1.3 var(--font); color: var(--ink); }
.st-new .cap b { color: #c9c6e2; }

/* ===== Награды ===== */
.rw { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; }
.rw__i { background: var(--bg2); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 14px 20px; text-align: center; }
.rw .medal { width: 64px; height: 64px; margin: 0 auto 16px; }
.rw .medal .icon { width: 28px; height: 28px; }
.rw b { display: block; font: 700 14px/1.25 var(--font); }
.rw__i span:not(.medal) { display: block; font-size: 12px; color: var(--ink-2); margin-top: 5px; }
.rw__i--off b { color: var(--ink-2); }

/* ===== Шапка внутренних страниц ===== */
.phead { position: relative; isolation: isolate; overflow: hidden; padding: 64px 0 44px; margin-bottom: 36px; }
.phead::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(50% 120% at 85% 20%, rgba(var(--rgb, 110, 95, 240), .42), rgba(var(--rgb, 110, 95, 240), 0) 70%); }
.phead::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; z-index: -1; background: linear-gradient(0deg, var(--bg), rgba(7, 7, 14, 0)); }
.phead__ic { position: absolute; right: calc(var(--gut) + 20px); top: 20px; width: 260px; height: 260px; z-index: -1; color: rgba(238, 236, 255, .08); }
.phead__ic .icon { width: 100%; height: 100%; }
.page-head { display: grid; gap: 14px; max-width: 760px; }
.avatar--lg { width: 72px; height: 72px; font-size: 28px; justify-self: start; }
.phead--plain { padding: 40px 0 8px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.phead--plain::before, .phead--plain::after { display: none; }
.section-title { display: flex; justify-content: space-between; align-items: flex-end; margin: 48px 0 20px; gap: 16px; flex-wrap: wrap; }
.section-title.no-gap { margin: 0 0 18px; align-items: flex-start; }

/* ===== Урок ===== */
.stage { position: relative; isolation: isolate; overflow: hidden; padding: 18px 0 52px; }
.stage__art { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(55% 80% at 50% 40%, rgba(var(--rgb), .5), rgba(var(--rgb), 0) 70%), radial-gradient(40% 60% at 100% 100%, rgba(var(--rgb), .25), transparent 70%), #07070e; }
.stage__art .bignum { left: 50%; top: -60px; transform: translateX(-50%); font-size: 760px; color: rgba(238, 236, 255, .05); }
.stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: -1; background: linear-gradient(0deg, var(--bg), rgba(7, 7, 14, 0)); pointer-events: none; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; font: 600 13px/1.3 var(--font); color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs .back { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); color: var(--ink); }
.crumbs .back .icon { width: 14px; height: 14px; }
.crumbs .sep { color: var(--ink-3); }
.crumbs b { color: var(--ink); }

.player { position: relative; overflow: hidden; width: min(100%, max(640px, calc((100vh - 270px) * 16 / 9))); margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 18px; background: #0b0b16;
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .8), 0 0 0 1px var(--line-2); user-select: none; -webkit-user-select: none; }
.player:fullscreen { width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.scene { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #17172e, #0b0b16 70%); }
.scene::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 70% at 20% 20%, rgba(var(--rgb), .25), transparent 70%); }
.win { position: relative; width: 66%; height: 62%; border-radius: 14px; background: #131323; box-shadow: 0 40px 80px -20px #000, 0 0 0 1px rgba(255, 255, 255, .1); display: grid; grid-template-columns: 26% 1fr; overflow: hidden; margin-top: -3%; }
.win__side { background: #0e0e1c; border-right: 1px solid rgba(255, 255, 255, .07); padding: 14px 12px; display: grid; align-content: start; gap: 8px; }
.win__side i { height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .12); }
.win__side i:nth-child(2) { width: 70%; } .win__side i:nth-child(4) { width: 55%; background: rgba(169, 154, 255, .55); } .win__side i:nth-child(5) { width: 80%; }
.win__main { padding: 5% 6%; display: grid; align-content: start; gap: 10px; }
.win__title { font: 700 clamp(11px, 1.5vw, 19px)/1.25 var(--font); margin-bottom: 4px; }
.win__row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .05); font-size: clamp(9px, 1.15vw, 14px); }
.win__row b { font-weight: 600; flex: 1; }
.win__row em { font-style: normal; font-size: clamp(8px, .95vw, 11.5px); padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.win__row.on { outline: 2px solid var(--violet-soft); outline-offset: 2px; }
.win__row.on em { background: rgba(45, 212, 160, .2); color: var(--emerald); font-weight: 700; }
.win__dot { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.win__dot--g { background: linear-gradient(135deg, #e0685a, #a53a30); } .win__dot--d { background: linear-gradient(135deg, #3fd6a6, #11805f); } .win__dot--c { background: linear-gradient(135deg, #5f8df0, #2b4fb8); }
.win__cursor { position: absolute; width: 20px; height: 20px; right: 14%; top: 36%; fill: #fff; stroke: #111; stroke-width: 1.2; animation: cursor 9s ease-in-out infinite; }
@keyframes cursor { 0%, 100% { transform: translate(40px, 60px); } 40% { transform: translate(0, 0); } 60% { transform: translate(-6px, 4px) scale(.9); } }
.player__lessontag { position: absolute; z-index: 3; left: 18px; top: 16px; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 36px); font: 700 12px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.player__lessontag i { font-style: normal; padding: 7px 10px; border-radius: 7px; background: rgba(0, 0, 0, .5); color: var(--violet-soft); white-space: nowrap; }
.player__lessontag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.subs { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: max-content; max-width: 80%; text-align: center; font: 600 clamp(12px, 1.4vw, 18px)/1.4 var(--font); padding: 8px 16px; border-radius: 8px; background: rgba(0, 0, 0, .68); transition: opacity .3s; pointer-events: none; z-index: 3; }
.subs:empty, .player:not(.is-playing) .subs { opacity: 0; }
/* водяной знак: два независимых дрейфа дают медленную непредсказуемую траекторию */
.wm { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.wm__x { position: absolute; left: 0; top: 0; width: 100%; height: 100%; animation: wmx 47s ease-in-out -19s infinite alternate; }
.wm__y { position: absolute; left: 0; top: 0; animation: wmy 31s ease-in-out -11s infinite alternate; }
.wm__t { display: inline-block; padding: 5px 14px; border-radius: 99px; white-space: nowrap; font-size: 13px; letter-spacing: .06em; color: rgba(255, 255, 255, .5); background: rgba(7, 7, 14, .18); text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
@keyframes wmx { from { transform: translateX(3%); } to { transform: translateX(calc(100% - 210px - 3%)); } }
@keyframes wmy { from { top: 8%; } to { top: calc(78% - 12px); } }
.player__big { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; width: 100%; background: rgba(7, 7, 14, .3); transition: opacity .4s var(--ease); }
.player__big span { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #16143a; box-shadow: 0 0 0 12px rgba(238, 236, 255, .16), 0 30px 80px rgba(0, 0, 0, .6); transition: transform .35s var(--ease); }
.player__big:hover span { transform: scale(1.06); }
.player__big .icon { width: 38px; height: 38px; margin-left: 5px; }
.player.is-playing .player__big { opacity: 0; pointer-events: none; }
.controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 48px 24px 14px; background: linear-gradient(0deg, rgba(7, 7, 14, .94), rgba(7, 7, 14, 0)); }
.seek { position: relative; height: 26px; display: flex; gap: 4px; align-items: center; cursor: pointer; touch-action: none; }
.seek__seg { position: relative; flex: 1 1 0; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; transition: height .2s; }
.seek:hover .seek__seg { height: 9px; }
.seek__seg i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: var(--violet-soft); }
.seek__head { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 5px rgba(169, 154, 255, .35); pointer-events: none; }
.seek__tip { position: absolute; bottom: 30px; transform: translateX(-50%); padding: 6px 10px; border-radius: 7px; background: var(--ink); color: #16143a; font: 700 12px/1 var(--font); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; }
.seek:hover .seek__tip { opacity: 1; }
.controls__row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cbtn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: background .25s; }
.cbtn:hover { background: rgba(255, 255, 255, .14); }
.cbtn .icon { width: 24px; height: 24px; }
.cbtn .pp-pause { display: none; }
.player.is-playing .cbtn .pp-play { display: none; }
.player.is-playing .cbtn .pp-pause { display: block; }
.time { font: 600 14px/1 var(--font); font-variant-numeric: tabular-nums; padding: 0 12px; color: #d7d4ee; white-space: nowrap; }
.spacer { flex: 1; }
.speed { position: relative; margin-left: auto; }
.speed__btn { display: inline-flex; align-items: center; justify-content: center; width: auto; padding: 0 16px; gap: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); font: 700 13px/1 var(--font); }
.speed__btn .icon { width: 18px; height: 18px; }
.speed__menu { position: absolute; right: 0; bottom: 52px; display: none; min-width: 120px; padding: 6px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px #000; }
.speed.is-open .speed__menu { display: grid; }
.speed__menu button { text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--ink-2); }
.speed__menu button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.speed__menu button[aria-checked="true"] { color: var(--emerald); font-weight: 700; }
.subs-m { display: none; margin-top: 10px; min-height: 2.8em; padding: 8px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--ink-2); text-align: center; }
.subs-m:empty { visibility: hidden; }

.lw { display: grid; grid-template-columns: minmax(0, 1fr) 404px; gap: 56px; padding: 12px var(--gut) 0; align-items: start; }
.lesson-head { display: grid; gap: 16px; margin-bottom: 16px; }
.lesson-head .h1 { font-size: clamp(24px, 2.6vw, 34px); max-width: 780px; }
.metas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: var(--ink-2); font: 600 14px/1.2 var(--font); }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.pro-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 14px 18px; font-size: 14.5px; color: var(--ink-2); }
.pro-note .icon { color: var(--amber); margin-top: 2px; }
.tabs { display: flex; gap: 30px; margin: 30px 0 6px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 0 0 14px; font: 700 15px/1.2 var(--font); color: var(--ink-2); white-space: nowrap; transition: color .25s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: #fff; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--violet-soft); }
.tabpanel { position: relative; max-height: 560px; overflow-y: auto; padding: 8px 0 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.tx { display: grid; grid-template-columns: 62px 1fr; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 12px; color: var(--ink-2); font-size: 16px; line-height: 1.55; transition: background .25s, color .25s; }
.tx:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }
.tx time { font: 700 13px/1.9 var(--font); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.tx.is-now { background: linear-gradient(90deg, rgba(124, 111, 255, .2), rgba(124, 111, 255, 0)); box-shadow: inset 3px 0 0 var(--violet-soft); color: #fff; }
.tx.is-now time { color: var(--violet-soft); }
.note-form { display: grid; gap: 10px; padding: 8px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; justify-items: start; }
.note { display: grid; grid-template-columns: 56px 1fr 32px; gap: 12px; padding: 12px; border-radius: 12px; align-items: start; }
.note:hover { background: rgba(255, 255, 255, .04); }
.note .jump { background: rgba(124, 111, 255, .2); color: var(--violet-soft); border-radius: 9px; padding: 4px 0; font: 600 13px/1.3 var(--font); font-variant-numeric: tabular-nums; }
.note p { font-size: 15px; line-height: 1.5; }
.note .del { color: var(--ink-3); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.note .del .icon { width: 17px; height: 17px; }
.note .del:hover { color: var(--coral-soft); background: rgba(255, 107, 91, .18); }
.files { display: grid; gap: 10px; align-content: start; }
.file { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg2); }
.file__ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--coral-soft); background: rgba(255, 107, 91, .14); border: 1px solid rgba(255, 107, 91, .3); }
.file__ic .icon { width: 24px; height: 24px; }
.file__ic--csv { color: var(--emerald); background: rgba(45, 212, 160, .12); border-color: rgba(45, 212, 160, .35); }
.file__t b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.file__t span { font-size: 13px; color: var(--ink-3); }

.lw__side { display: grid; gap: 22px; align-content: start; }
.nextc { display: block; overflow: hidden; border-radius: 20px; background: var(--bg2); border: 1px solid var(--line-2); }
.nextc .cover { border-radius: 0; aspect-ratio: 16 / 8.5; }
.nextc:hover .cover { transform: none; }
.nextc .num { font-size: 130px; bottom: -18px; }
.nextc .pl { top: 50%; bottom: auto; right: 20px; width: 56px; height: 56px; margin-top: -28px; }
.nextc__b { padding: 16px 20px 20px; }
.nextc__b small { font: 700 11px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--violet-soft); }
.nextc__b b { display: block; font: 700 18px/1.3 var(--font); margin: 8px 0 6px; }
.nextc__b p { color: var(--ink-2); font-size: 13.5px; }
.box { background: var(--bg2); border: 1px solid var(--line-2); border-radius: 20px; padding: 20px 22px; }
.box__h { font: 700 11px/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.chl li + li { border-top: 1px solid var(--line); }
.chl__b { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; text-align: left; font: 600 14px/1.3 var(--font); color: var(--ink-2); transition: color .25s; }
.chl__b:hover { color: var(--ink); }
.chl__b time { width: 40px; flex: none; font: 700 12px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--ink-3); }
.chl__b .icon { margin-left: auto; width: 14px; height: 14px; color: var(--violet-soft); opacity: 0; }
.chl__b.is-now { color: #fff; }
.chl__b.is-now time { color: var(--violet-soft); }
.chl__b.is-now .icon { opacity: 1; }

/* ===== Материалы ===== */
.search { position: relative; max-width: 720px; }
.search .input { min-height: 56px; font-size: 16px; border-radius: 14px; }
.search-chips { margin-top: 14px; }
.search-chips .chip { background: var(--bg3); }
#search-h { margin-bottom: 16px; }
.results { display: grid; gap: 10px; margin-top: 18px; max-width: 920px; }
.hit { display: grid; grid-template-columns: 52px 1fr 20px; gap: 16px; align-items: center; padding: 16px 20px; transition: transform .25s var(--ease), border-color .25s; }
.hit:hover { transform: translateX(4px); border-color: var(--line-3); }
.hit__n { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(150deg, var(--c1), var(--c2)); color: #fff; font: 700 18px/1 var(--head); }
.hit b { display: block; font-weight: 600; }
.hit p { color: var(--ink-2); font-size: 14.5px; line-height: 1.45; margin-top: 2px; }
.hit mark { background: rgba(240, 180, 41, .25); color: #ffd77a; border-radius: 4px; padding: 0 2px; }
.hit .tmin { color: var(--emerald); font-weight: 600; font-variant-numeric: tabular-nums; }
.hit > .icon { color: var(--ink-3); width: 16px; height: 16px; }
.empty3d { display: grid; justify-items: center; gap: 12px; }
.empty3d .icon { width: 44px; height: 44px; color: var(--ink-3); }
.bonus-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.bonus { display: block; }
.bonus .cover { aspect-ratio: 16 / 9; }
.bonus .cover__ic { position: absolute; left: 18px; bottom: 16px; color: #fff; }
.bonus .cover__ic .icon { width: 56px; height: 56px; }
.bonus__b { padding: 16px 2px 0; display: grid; gap: 14px; }
.bonus__b h3 { font: 700 17px/1.3 var(--font); }
.bonus__b p { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; }
.bonus__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ===== Профиль ===== */
.profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
.profile-grid .full { grid-column: 1 / -1; }
.form { display: grid; gap: 18px; }
.form > .btn { justify-self: start; }
.card--pad > .muted { margin: 6px 0 20px; font-size: 14px; }
.pad-b0 { padding: 26px 26px 8px; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.meter i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .13); transition: background .4s; }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--coral); }
.meter[data-s="2"] i:nth-child(-n+2) { background: var(--amber); }
.meter[data-s="3"] i:nth-child(-n+3) { background: #7fd1b6; }
.meter[data-s="4"] i { background: var(--emerald); }
.devs { display: grid; gap: 10px; }
.dev { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg3); }
.dev__ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(124, 111, 255, .18); color: var(--violet-soft); border: 1px solid rgba(124, 111, 255, .4); }
.dev__ic .icon { width: 24px; height: 24px; }
.dev b { font-weight: 600; display: block; line-height: 1.3; }
.dev span { font-size: 13.5px; color: var(--ink-3); }
.slots { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.slots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.slots i.on { background: var(--emerald); border-color: var(--emerald); }
.logout-row { margin-top: 28px; }
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font: 600 12px/1.2 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .25s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .03); }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .acts-cell { min-width: 250px; }

/* ===== Админка (строже: без цветных заливок) ===== */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 22px; display: grid; gap: 6px; align-content: start; }
.kpi .eyebrow { letter-spacing: .14em; color: var(--ink-3); }
.kpi__v { font: 700 36px/1.1 var(--head); letter-spacing: -.02em; margin-top: 6px; }
.kpi__v small { font: 600 15px/1 var(--font); color: var(--ink-2); margin-left: 6px; letter-spacing: 0; }
.kpi p { font-size: 13.5px; color: var(--ink-2); }
.funnel { padding: 24px; display: grid; gap: 18px; }
.funnel__bars { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 6px; align-items: end; height: 240px; }
.fb { height: 100%; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; gap: 6px; }
.fb__col { width: 100%; display: flex; align-items: flex-end; }
.fb__bar { width: 100%; height: var(--p, 0%); min-height: 4px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--violet), #4a3fb8); transition: height 1.2s var(--ease); }
.fb__v { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fb__n { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.fb--drop .fb__bar { background: linear-gradient(180deg, var(--coral), #b4483c); }
.fb--drop .fb__n, .fb--drop .fb__v { color: var(--coral-soft); }
.funnel__legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--ink-2); }
.funnel__legend span { display: inline-flex; align-items: center; gap: 8px; }
.funnel__legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--violet); }
.funnel__legend i.d { background: var(--coral); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1 1 260px; max-width: 420px; }
.toolbar .input { min-height: 44px; }
.who { display: flex; align-items: center; gap: 12px; }
.who .avatar { width: 36px; height: 36px; font-size: 14px; border-width: 0; }
.who b { display: block; font-weight: 600; line-height: 1.25; }
.who span { font-size: 12.5px; color: var(--ink-3); }
.mini { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.mini .bar { flex: 1; height: 6px; }
.mini span { font-size: 13px; width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ibtn { border: 1px solid var(--line-2); background: var(--bg3); border-radius: 10px; min-height: 36px; padding: 0 11px; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; transition: background .25s, color .25s; white-space: nowrap; }
.ibtn:hover { background: var(--bg4); color: #fff; }
.ibtn .icon { width: 15px; height: 15px; }
.ibtn--danger { color: var(--coral-soft); border-color: rgba(255, 107, 91, .4); }
.ibtn--danger:hover { background: rgba(255, 107, 91, .22); }

/* ===== Сертификат: тёмный, торжественный ===== */
.cert-wrap { display: grid; justify-items: center; gap: 28px; }
.cert { position: relative; width: min(100%, 980px); aspect-ratio: 297 / 210; padding: 5%; color: var(--ink); border-radius: 14px; overflow: hidden; display: grid; place-items: center; text-align: center;
  background: radial-gradient(70% 90% at 50% 0%, rgba(124, 111, 255, .3), transparent 70%), radial-gradient(50% 60% at 100% 100%, rgba(240, 180, 41, .12), transparent 70%), radial-gradient(40% 50% at 0% 100%, rgba(45, 212, 160, .08), transparent 70%), #0a0a16;
  box-shadow: 0 50px 110px -40px #000, 0 0 0 1px var(--line-2); }
.cert::before { content: ""; position: absolute; inset: 2.4%; border: 1.5px solid rgba(240, 180, 41, .7); border-radius: 8px; }
.cert::after { content: ""; position: absolute; inset: 3.5%; border: 1px solid rgba(240, 180, 41, .28); border-radius: 5px; }
.cert__in { position: relative; z-index: 1; display: grid; gap: clamp(8px, 1.6vw, 18px); justify-items: center; }
.cert__seal { width: clamp(46px, 7vw, 76px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: #1a1200; background: linear-gradient(145deg, #f6c445, #b07d0c); box-shadow: 0 0 0 6px rgba(240, 180, 41, .18); }
.cert__seal .icon { width: 50%; height: 50%; }
.cert__k { font: 600 clamp(9px, 1.15vw, 13px)/1.3 var(--font); letter-spacing: .32em; text-transform: uppercase; color: var(--amber); }
.cert__t { font: 700 clamp(18px, 3.6vw, 42px)/1.15 var(--head); letter-spacing: -.02em; }
.cert__name { font: 700 clamp(22px, 4.6vw, 54px)/1.2 var(--head); letter-spacing: -.02em; color: #fff; padding: 0 .3em .15em; border-bottom: 1px solid rgba(240, 180, 41, .5); }
.cert__p { max-width: 62ch; font-size: clamp(10.5px, 1.4vw, 16.5px); line-height: 1.6; color: #c4c1e0; }
.cert__foot { display: flex; gap: clamp(18px, 6vw, 80px); font-size: clamp(9px, 1.1vw, 13px); color: var(--ink-2); margin-top: clamp(4px, 1vw, 12px); }
.cert__foot b { display: block; font: 600 clamp(11px, 1.4vw, 16px)/1.3 var(--font); color: var(--ink); margin-top: 2px; }
.locked { max-width: 640px; margin: 0 auto; padding: 40px 32px; display: grid; justify-items: center; gap: 18px; text-align: center; }
.locked__ic { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px dashed var(--line-3); color: var(--ink-2); }
.locked__ic .icon { width: 36px; height: 36px; }
.locked .bar { width: 100%; height: 10px; }
.locked__meta { display: flex; justify-content: space-between; width: 100%; font-size: 14px; color: var(--ink-2); }
.demo-switch { font-size: 13.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* ===== Вход: строгий, по центру ===== */
body[data-page="login"] { background: radial-gradient(70% 50% at 50% 0%, rgba(124, 111, 255, .2), transparent 70%), var(--bg); }
body[data-page="login"]::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 48px 48px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.auth__box { width: min(460px, 100%); padding: 40px 36px 34px; display: grid; gap: 28px; }
.auth__logo { display: flex; align-items: center; gap: 14px; }
.auth__logo .logo__mark { width: 44px; height: 44px; border-radius: 12px; }
.auth__logo .logo__mark .icon { width: 24px; height: 24px; }
.auth__logo .logo__name { font-size: 18px; }
.auth__head { display: grid; gap: 10px; }
.auth__head .h1 { font-size: 30px; }
.auth__head .lead { font-size: 15px; }
.auth__foot { text-align: center; font-size: 13.5px; color: var(--ink-2); }
.tg { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(45, 212, 160, .08); border: 1px solid rgba(45, 212, 160, .3); font-size: 14.5px; color: var(--ink-2); }
.tg .icon { color: var(--emerald); width: 26px; height: 26px; }
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.code input { width: 100%; min-width: 0; padding: 0; aspect-ratio: 1 / 1.18; text-align: center; font: 700 26px/1 var(--head); border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg3); transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.code input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 111, 255, .18); transform: translateY(-2px); }
.code input.filled { border-color: var(--violet-soft); }
.step { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.link-btn { color: var(--violet-soft); text-decoration: underline; text-underline-offset: 3px; padding: 4px; font-size: 14px; }
.link-btn:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }

/* ===== Наставник: плашка внизу справа и окно чата ===== */
.mentor { position: fixed; right: 28px; bottom: 28px; z-index: 60; }
.orb { display: flex; align-items: center; gap: 14px; padding: 10px 24px 10px 10px; border-radius: 99px; background: var(--ink); color: #16143a; text-align: left; box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .4); transition: transform .3s var(--ease); }
.orb:hover { transform: translateY(-2px); }
.orb__av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(140deg, #2a2370, #4a3fb8); color: #d9d3ff; }
.orb__av .icon { width: 24px; height: 24px; }
.orb__t b { display: block; font: 700 15px/1.1 var(--font); }
.orb__t small { display: block; margin-top: 3px; font: 600 12px/1.2 var(--font); color: #55527c; }
.mentor.is-open .orb { display: none; }
.chat { display: none; width: min(392px, calc(100vw - 32px)); height: min(580px, calc(100vh - 48px)); grid-template-rows: auto 1fr auto auto; overflow: hidden; transform-origin: 100% 100%; border-radius: 24px; background: var(--bg2); border: 1px solid var(--line-3); box-shadow: 0 40px 90px -20px #000; }
.mentor.is-open .chat { display: grid; animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(16px); } }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, rgba(124, 111, 255, .24), rgba(124, 111, 255, .04)); }
.mini-orb { width: 38px; height: 38px; border-radius: 50%; flex: none; background: linear-gradient(140deg, #2a2370, #4a3fb8); }
.chat__head b { display: block; line-height: 1.2; }
.chat__head span { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.chat__head span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); }
.chat__head .x { margin-left: auto; background: rgba(255, 255, 255, .08); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.chat__head .x:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.chat__log { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.msg { max-width: 88%; padding: 12px 15px; border-radius: 18px; font-size: 15px; line-height: 1.5; animation: rise .4s var(--ease) both; }
.msg--bot { align-self: flex-start; background: var(--bg4); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; background: var(--btn); border-bottom-right-radius: 6px; color: #fff; }
.msg a.go { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(124, 111, 255, .2); border: 1px solid rgba(124, 111, 255, .5); font-size: 14px; font-weight: 500; line-height: 1.3; transition: background .25s; }
.msg a.go:hover { background: rgba(124, 111, 255, .38); }
.msg a.go .icon { width: 16px; height: 16px; color: var(--violet-soft); }
.msg a.go time { margin-left: auto; color: var(--emerald); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 6px; }
.typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-soft); animation: dot 1.4s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }
.chat__chips { display: flex; gap: 8px; padding: 4px 16px 10px; overflow-x: auto; scrollbar-width: none; }
.chat__chips .chip { white-space: nowrap; flex: none; background: var(--bg3); }
.chat__form { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.chat__form .input { min-height: 46px; border-radius: 99px; }
.send { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--btn); }

/* ===== Окно подтверждения и уведомление ===== */
dialog { border: 1px solid var(--line-3); border-radius: 22px; background: var(--bg2); color: var(--ink); padding: 28px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 50px 100px -20px #000; }
dialog::backdrop { background: rgba(4, 4, 9, .7); backdrop-filter: blur(5px); }
dialog h2 { font: 700 18px/1.25 var(--head); margin-bottom: 10px; }
dialog p { color: var(--ink-2); margin-bottom: 22px; }
dialog .btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; z-index: 90; padding: 14px 22px; border-radius: 16px; background: var(--bg4); border: 1px solid rgba(45, 212, 160, .5); box-shadow: 0 20px 50px -10px #000; font-size: 15px; display: flex; gap: 10px; align-items: center; transition: transform .45s var(--ease), opacity .45s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast .icon { color: var(--emerald); width: 18px; height: 18px; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ===== Планшет ===== */
@media (max-width: 1180px) {
  .topbar { gap: 24px; }
  .topnav__link { padding: 9px 12px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip .st:last-child { grid-column: 1 / -1; }
  .ep { flex-basis: calc((100% - 36px) / 3); }
  .rw { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lw { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lw__side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .disc { width: 400px; height: 400px; }
  .hero__ic { right: calc(var(--gut) + 200px); top: 190px; width: 170px; height: 170px; }
}

/* ===== Телефон и узкий планшет: бургер-меню вместо вкладок ===== */
@media (max-width: 900px) {
  :root { --topbar: 60px; }
  .topbar { gap: 12px; }
  .topnav, .topbar__name, .topbar__owner, .topbar .pill { display: none; }
  .burger { display: grid; }
  .topbar__r { gap: 10px; }
  .avatar { width: 36px; height: 36px; font-size: 14px; }
  .logo__mark { width: 32px; height: 32px; }
  .logo__name { font-size: 15px; }
  .scrim { display: block; }
  .side { display: flex; }
  .main { padding-bottom: 110px; }
  .mentor { right: 16px; bottom: 16px; }
  .orb { padding: 6px; gap: 0; }
  .orb__t { display: none; }
  .mentor.is-open { right: 8px; bottom: 8px; left: 8px; }
  .mentor.is-open .chat { width: 100%; height: min(640px, calc(100vh - 24px)); }
  .nx { display: none !important; }
}
@media (max-width: 700px) {
  body { font-size: 15px; }
  .btn--lg { min-height: 52px; font-size: 15px; padding: 0 22px 0 18px; }
  /* герой */
  .hero { min-height: 0; padding: 36px 0 44px; }
  .hero::before { background: linear-gradient(180deg, rgba(7, 7, 14, .35) 0%, rgba(7, 7, 14, .85) 55%, var(--bg) 100%); }
  .hero .disc { width: 260px; height: 260px; right: -60px; top: 30px; }
  .hero .r1 { width: 380px; height: 380px; right: -120px; top: -30px; }
  .hero .r2 { display: none; }
  .hero .bignum { font-size: 280px; right: -10px; top: 6px; }
  .hero__ic { width: 96px; height: 96px; right: 40px; top: 108px; }
  .hero__tag { display: none; }
  .hello { margin-bottom: 120px; }
  .hero__title { font-size: 25px; margin: 18px 0 14px; }
  .hero__lead { font-size: 15.5px; }
  .meta { margin: 18px 0 22px; }
  .btns { width: 100%; }
  .btns .btn { flex: 1 1 100%; }
  .resume__prog { width: 100%; flex-wrap: wrap; }
  /* статистика */
  .strip { margin-top: 0; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .strip .st:last-child { grid-column: auto; }
  .st { padding: 18px; min-height: 0; gap: 16px; }
  .val { font-size: 24px; }
  .ring-p { --size: 80px; }
  /* ряды эпизодов листаются пальцем вбок */
  .sec { padding-top: 44px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 24px; }
  .poster { padding: 16px; min-height: 108px; }
  .poster__t { margin-top: 26px; }
  .poster__bn { font-size: 92px; top: 8px; }
  .lane { margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad); gap: 14px; }
  .ep { flex-basis: min(72%, 280px); }
  .lane-wrap.has-more:not(.at-end)::after { display: none; }
  .rw { display: flex; overflow-x: auto; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scrollbar-width: none; scroll-snap-type: x proximity; gap: 12px; }
  .rw::-webkit-scrollbar { display: none; }
  .rw__i { flex: 0 0 150px; scroll-snap-align: start; }
  /* внутренние страницы */
  .phead { padding: 36px 0 28px; margin-bottom: 24px; }
  .phead__ic { width: 150px; height: 150px; right: 6px; top: 14px; }
  .lead { font-size: 15.5px; }
  .card--pad { padding: 20px; }
  .pad-b0 { padding: 20px 20px 8px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 12px; }
  .kpi { padding: 16px; } .kpi__v { font-size: 28px; }
  .funnel { padding: 16px; } .funnel__bars { gap: 3px; height: 190px; } .fb__v { display: none; } .fb__n { font-size: 10px; }
  .fb:nth-child(even) .fb__n { visibility: hidden; }
  .section-title { margin-top: 34px; }
  .bonus-grid { grid-template-columns: minmax(0, 1fr); }
  .auth__box { padding: 30px 22px 26px; }
  .code { gap: 7px; } .code input { font-size: 22px; }
  .hit { grid-template-columns: 44px 1fr; padding: 14px; gap: 12px; } .hit > .icon { display: none; } .hit__n { width: 44px; height: 44px; font-size: 16px; }
  .file { grid-template-columns: 44px 1fr; } .file .btn { grid-column: 1 / -1; }
  .dev { grid-template-columns: 44px 1fr; } .dev .btn, .dev .tag { grid-column: 1 / -1; justify-self: start; } .dev .btn { justify-self: stretch; }
  .cert { padding: 9% 7%; aspect-ratio: auto; }
  .cert__foot { flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
  /* урок */
  .stage { padding: 14px 0 34px; }
  .stage__art .bignum { font-size: 340px; top: -20px; }
  .crumbs { margin-bottom: 14px; }
  .crumbs .sep, .crumbs .crumb-s, .crumbs b { display: none; }
  .player { border-radius: 14px; }
  .win { width: 84%; grid-template-columns: 1fr; } .win__side { display: none; }
  .player__lessontag { left: 10px; top: 10px; font-size: 10px; gap: 8px; }
  .player__lessontag i { padding: 5px 7px; }
  .player__lessontag span { display: none; }
  .subs { display: none; }
  .player:fullscreen .subs { display: block; bottom: 70px; font-size: 14px; }
  .subs-m { display: block; }
  .player__big span { width: 64px; height: 64px; box-shadow: 0 0 0 8px rgba(238, 236, 255, .16), 0 20px 50px rgba(0, 0, 0, .6); }
  .player__big .icon { width: 26px; height: 26px; }
  .controls { padding: 26px 10px 6px; }
  .controls__row { gap: 2px; margin-top: 0; }
  .cbtn { width: 38px; height: 38px; }
  .cbtn .icon { width: 21px; height: 21px; }
  .time { padding: 0 6px; font-size: 13px; }
  .speed__btn { padding: 0 12px; }
  .lw { padding-top: 6px; gap: 28px; }
  .lw__side { grid-template-columns: minmax(0, 1fr); }
  .lesson-actions .btn { flex: 1 1 auto; }
  .lesson-actions .btn--done { flex-basis: 100%; }
  .lesson-actions .spacer { display: none; }
  .tabs { gap: 22px; margin-top: 24px; }
  .tabpanel { max-height: 440px; }
  .tx { grid-template-columns: 50px 1fr; gap: 10px; padding: 12px; font-size: 15.5px; }
  /* таблицы превращаются в карточки */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { padding: 4px 0; border: 0; }
  .tbl td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-3); font-size: 13px; }
  .tbl td.acts-cell { padding-top: 10px; min-width: 0; }
  .toolbar { padding: 14px; }
  .toast { bottom: 84px; }
}
@media (max-width: 420px) {
  .lesson-actions .btn { padding: 0 14px; font-size: 13px; }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { background: #0a0a16; }
  .side, .scrim, .topbar, .mentor, .no-print, .toast, .phead { display: none !important; }
  .main { padding: 0; } .wrap { padding: 0; }
  .cert-wrap { gap: 0; }
  .cert { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== Подключение к серверу ===== */
.player video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__off { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; text-align: center; background: linear-gradient(135deg, #17172e, #0b0b16 70%); color: var(--ink-2); font: 600 16px/1.5 var(--font); }
.player__off[hidden] { display: none; }
.player.is-off .player__big, .player.is-off .controls { display: none; }
/* страница не мигает пустой оболочкой, пока идёт проверка входа */
body[data-shell]:not(.ready) .app { visibility: hidden; }
.secret { margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); font: 600 16px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; word-break: break-all; user-select: all; -webkit-user-select: all; }
.congrats { display: grid; justify-items: center; gap: 10px; text-align: center; }
.congrats .medal { width: 84px; height: 84px; }
dialog .field { display: grid; gap: 6px; margin-top: 14px; }
dialog .field label { font: 600 13px/1.3 var(--font); color: var(--ink-2); }
dialog .err { min-height: 1.3em; margin-top: 10px; }
