/* ── EDU design tokens v2: тёплый академический, ролевые акценты ─────────── */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --ink: #232633;
  --muted: #6e7486;
  --line: #e8e6e1;
  --line-2: #d9d5cd;
  --role: #3b5bdb;           /* учитель по умолчанию */
  --role-soft: #eef1fb;
  --role-teacher: #3b5bdb;
  --role-teacher-soft: #eef1fb;
  --role-student: #0d9488;
  --role-student-soft: #e6f5f3;
  --ok: #2f9e44; --ok-soft: #e9f7ec;
  --warn: #f08c00; --warn-soft: #fdf3e2;
  --err: #e8590c; --err-soft: #fdeee4;
  --fun: #e64980;
  --radius: 14px; --radius-s: 10px;
  --shadow: 0 1px 2px rgba(35,38,51,.05), 0 8px 24px rgba(35,38,51,.07);
  --shadow-s: 0 1px 2px rgba(35,38,51,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body[data-role="student"] { --role: var(--role-student); --role-soft: var(--role-student-soft); }

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 var(--font); background: var(--bg); color: var(--ink); }
a { color: var(--role); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.main { min-height: 70vh; padding: 28px 20px 56px; }

/* ── шапка ── */
.hdr { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.hdr__in { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.hdr__brand { font-weight: 900; font-size: 22px; letter-spacing: .14em; text-decoration: none; color: var(--role); }
.hdr__nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hdr__link { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.hdr__link:hover { color: var(--ink); }
.hdr__who { color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; }
.hdr__dot { width: 26px; height: 26px; border-radius: 50%; background: var(--role-soft); color: var(--role); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; }
.inline { display: inline; }

/* ── футер ── */
.ftr { border-top: 1px solid var(--line); background: var(--surface); }
.ftr__in { display: flex; justify-content: space-between; padding: 16px 20px; color: var(--muted); font-size: .85rem; }

/* ── герой лендинга ── */
.hero { text-align: center; padding: 64px 0 36px; }
.hero__kicker { display: inline-flex; gap: 8px; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--role); border: 1px solid var(--line-2); background: var(--role-soft); border-radius: 999px; padding: 6px 16px; margin: 0 0 18px; }
.hero__kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--role); }
.hero__title { font-size: clamp(32px, 5vw, 52px); font-weight: 900; letter-spacing: .05em; margin: 0 0 16px; }
.hero__grad { color: var(--role); }
.hero__lead { max-width: 62ch; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-s); }
.feat b { letter-spacing: .1em; font-size: .85rem; color: var(--role); }
.feat p { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 40px; }
.cta__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); text-align: center; }
.cta__card h2 { font-size: 1rem; letter-spacing: .08em; margin: 0 0 8px; }
.cta__card p { color: var(--muted); font-size: .9rem; }

/* ── карточки/типографика ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card--narrow { max-width: 460px; margin: 24px auto; }
.card--msg { text-align: center; }
.card--tight { padding: 14px; }
.h1 { font-size: 1.6rem; margin: 8px 0 18px; }
.h2 { font-size: 1.02rem; letter-spacing: .07em; margin: 22px 0 12px; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }

/* ── stat-плитки ── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; box-shadow: var(--shadow-s); }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--role); line-height: 1.2; }
.stat span { font-size: .8rem; color: var(--muted); }

/* ── формы ── */
.form { display: flex; flex-direction: column; gap: 14px; }
.form--row { display: flex; gap: 8px; align-items: center; }
.form--row input { width: auto; flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; }
.field > span, .field legend { font-size: .82rem; font-weight: 700; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--role-soft); border-color: var(--role); }
textarea { resize: vertical; }
.radio { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.radio span { display: flex; flex-direction: column; }
.radio small { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.alert { border-radius: var(--radius-s); padding: 10px 14px; font-size: .92rem; }
.alert--err { background: var(--err-soft); color: #a6330a; border: 1px solid #ffd6c4; }

/* ── кнопки ── */
.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; text-align: center; border-radius: var(--radius-s); padding: 10px 18px; border: 1px solid transparent; cursor: pointer; transition: filter .15s, box-shadow .15s; }
.btn--primary { background: var(--role); color: #fff; box-shadow: var(--shadow-s); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--role); }
.btn--ghost:hover { border-color: var(--role); }
.btn--danger { background: var(--err-soft); border-color: #ffd6c4; color: var(--err); }
.btn--fun { background: var(--fun); color: #fff; }
.btn--sm { padding: 6px 12px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }

/* ── бейджи/статусы ── */
.badge { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; background: var(--surface-2); color: var(--muted); }
.badge--teacher { background: var(--role-teacher-soft); color: var(--role-teacher); }
.badge--student { background: var(--role-student-soft); color: var(--role-student); }
.badge--admin { background: #fff3bf; color: #8a6d00; }
.badge--graded { background: var(--ok-soft); color: var(--ok); }
.badge--pending_review, .badge--submitted { background: var(--warn-soft); color: #96660a; }
.badge--in_progress { background: var(--surface-2); color: var(--muted); }
.badge--active { background: var(--ok-soft); color: var(--ok); }
.badge--rejected, .badge--suspended { background: var(--err-soft); color: var(--err); }
.chip { font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: .16em; background: var(--role-soft); color: var(--role); border-radius: 8px; padding: 2px 10px; font-size: .85rem; }
.deadline { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.deadline--soon { background: var(--warn-soft); color: #96660a; }
.deadline--late { background: var(--err-soft); color: var(--err); }
.deadline--ok { background: var(--ok-soft); color: var(--ok); }

/* ── списки/таблицы ── */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 16px; box-shadow: var(--shadow-s); }
.list__link { font-weight: 700; text-decoration: none; }
.list__item--decide { flex-wrap: wrap; }
.decide { display: flex; gap: 8px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.table th { text-align: left; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }

/* ── пустые состояния/скелетоны/тосты ── */
.empty { text-align: center; color: var(--muted); padding: 28px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.empty b { display: block; font-size: 1.05rem; color: var(--ink); margin-bottom: 4px; }
.skel { border-radius: var(--radius-s); background: linear-gradient(90deg, var(--surface-2) 25%, #eceae4 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.2s infinite; height: 64px; }
@keyframes skel { to { background-position: -200% 0; } }
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 300; }
.toast { background: var(--ink); color: #fff; border-radius: var(--radius-s); padding: 12px 18px; box-shadow: var(--shadow); font-size: .92rem; max-width: 360px; animation: toastin .25s; }
.toast--ok { background: var(--ok); } .toast--err { background: var(--err); }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } }

/* ── редактор ── */
.ed { display: grid; gap: 16px; }
.ed__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; position: sticky; top: 62px; background: var(--bg); padding: 8px 0; z-index: 40; }
.ed__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed__sec { display: grid; gap: 10px; }
.ed__sec-h { display: flex; gap: 8px; align-items: center; }
.ed__sec-t { font: inherit; font-weight: 700; border: 0; background: transparent; flex: 1; }
.ed__blocks { display: grid; gap: 8px; }
.ed__blk { border: 1px solid var(--line); border-left: 4px solid var(--role); border-radius: var(--radius-s); padding: 10px; background: var(--surface); }
.ed__blk-h { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ed__types { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ed__add summary { cursor: pointer; color: var(--role); font-weight: 600; }
.ed__grip { cursor: grab; color: var(--muted); padding: 0 4px; user-select: none; }
.ed__drag { opacity: .4; border: 2px dashed var(--role); }
.ed__mini { display: flex; gap: 4px; margin-left: auto; }
.ed__savest { margin-left: 8px; }
.ed__sel { font: inherit; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 8px; width: auto; }
.ed__media { display: grid; gap: 6px; }

/* ── rte ── */
.rte { border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; }
.rte__bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.rte__btn { border: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; min-width: 28px; height: 26px; cursor: pointer; font: inherit; }
.rte__btn:hover { border-color: var(--role); }
.rte__color { width: 28px; height: 26px; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); cursor: pointer; }
.rte__ed { min-height: 120px; padding: 10px 12px; background: var(--surface); outline: none; }
.rte__ed img { max-width: 100%; }

/* ── плеер ── */
.pl { display: grid; gap: 12px; }
.pl__head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pl__steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.pl__step { font-size: .8rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); background: var(--surface); cursor: pointer; }
.pl__step--done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.pl__step--active { background: var(--role); border-color: var(--role); color: #fff; }
.pl__sec { margin-bottom: 20px; scroll-margin-top: 130px; }
.pl__bar { display: flex; gap: 12px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.pb { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; margin: 10px 0; background: var(--surface); box-shadow: var(--shadow-s); }
.pb__h { display: flex; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.pb__rt img { max-width: 100%; }
.pb__gap { width: 120px; display: inline-block; }
.pb__gap--ok { border-color: var(--ok); background: var(--ok-soft); }
.pb__gap--bad { border-color: var(--err); background: var(--err-soft); }
.pb__match { display: flex; gap: 10px; align-items: center; margin: 4px 0; }
.pb__wo { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pb__wo-line { min-height: 30px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px; margin-bottom: 6px; }
.pb__voc { list-style: none; padding: 0; display: grid; gap: 4px; }
.pb__voc li { display: flex; gap: 10px; align-items: center; }
.pb__voc li span:first-child { font-weight: 700; }
.pb__audio, .pb__video { width: 100%; }
.pb__wb { border: 1px solid var(--line); border-radius: 8px; touch-action: none; background: #fff; }
.timer { font-weight: 800; font-variant-numeric: tabular-nums; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); }
.timer--low { background: var(--err-soft); color: var(--err); }

/* ── результат ── */
.result { text-align: center; padding: 24px; }
.result__score { font-size: 3rem; font-weight: 900; color: var(--role); }
.result__row { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.result__row:last-of-type { border-bottom: 0; }
.confetti { font-size: 1.6rem; letter-spacing: .3em; }

/* ── ревью ── */
.rv__blk { margin-bottom: 12px; display: grid; gap: 8px; }
.rubric__row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.voice-rec { display: inline-flex; gap: 8px; align-items: center; }

/* ── журнал/аналитика ── */
.gb__cell { display: inline-block; min-width: 58px; text-align: center; border-radius: 8px; padding: 4px 8px; font-weight: 700; font-size: .85rem; }
.gb__cell--hi { background: var(--ok-soft); color: var(--ok); }
.gb__cell--mid { background: var(--warn-soft); color: #96660a; }
.gb__cell--low { background: var(--err-soft); color: var(--err); }
.gb__cell--none { background: var(--surface-2); color: var(--muted); }
.bar { height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--role); }
.bar--err > i { background: var(--err); }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 80px; }
.spark > i { width: 10px; background: var(--role); border-radius: 3px 3px 0 0; min-height: 2px; }

/* ── live ── */
.live { border: 1px solid #ffd6c4; background: #fff8f5; border-radius: var(--radius-s); padding: 10px; margin: 12px 0; }
.live__strip { display: flex; gap: 8px; flex-wrap: wrap; }
.live__strip video { width: 160px; border-radius: 8px; background: #000; }
.live__ctrl { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.live__wb { position: fixed; left: 50%; transform: translateX(-50%); bottom: 80px; z-index: 60; border: 2px solid var(--role); border-radius: var(--radius-s); background: rgba(255,255,255,.96); touch-action: none; }

/* ── сертификат (печать) ── */
.cert { max-width: 720px; margin: 24px auto; background: var(--surface); border: 3px double var(--line-2); border-radius: var(--radius); padding: 48px 40px; text-align: center; font-family: Georgia, "Times New Roman", serif; }
.cert__brand { letter-spacing: .3em; font-size: .85rem; color: var(--muted); }
.cert__name { font-size: 2.2rem; margin: 18px 0 8px; }
.cert__title { font-size: 1.2rem; font-style: italic; }
.cert__score { font-size: 2.6rem; font-weight: 700; color: var(--role); margin: 10px 0; }
.cert__num { margin-top: 26px; font-size: .85rem; color: var(--muted); }
@media print { .hdr, .ftr, .cert__print, #toasts { display: none !important; } .cert { border-width: 2px; margin: 0; } body { background: #fff; } }

/* ── модалка/превью ── */
.pv, .modal { position: fixed; inset: 0; background: rgba(28,32,48,.55); display: flex; align-items: center; justify-content: center; z-index: 200; }
.pv__box, .modal__box { background: var(--surface); border-radius: var(--radius); padding: 20px; max-width: 720px; width: 92%; max-height: 84vh; overflow: auto; position: relative; }
.pv__x, .modal__x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 18px; cursor: pointer; }

.crumbs { margin: 0 0 12px; font-size: .9rem; }
.grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.classhead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.code { display: flex; align-items: center; gap: 10px; }
.code__v { font-size: 1.4rem; font-weight: 800; letter-spacing: .22em; background: var(--role-soft); color: var(--role); border-radius: var(--radius-s); padding: 6px 16px; }
.code__v--sm { font-size: .8rem; padding: 2px 8px; letter-spacing: .12em; }
.mat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-s); }
.mat__h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mat__body { white-space: pre-wrap; font: inherit; margin: 10px 0 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }

@media (max-width: 860px) {
  .feats, .cta, .grid, .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .feats, .cta, .grid, .stats { grid-template-columns: 1fr; }
  .hdr__who { display: none; }
}
:root { --edu-ink: #1c2340; --edu-muted: #6b7590; --edu-line: #e3e7f2; --edu-brand: #3b5bdb; }
.ed { display: grid; gap: 16px; }
.ed__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ed__sec { display: grid; gap: 10px; }
.ed__sec-h { display: flex; gap: 8px; align-items: center; }
.ed__sec-t { font: inherit; font-weight: 700; border: 0; background: transparent; flex: 1; }
.ed__blocks { display: grid; gap: 8px; }
.ed__blk { border: 1px dashed var(--edu-line); border-radius: 10px; padding: 10px; }
.ed__blk-h { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.ed__types { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ed__add summary { cursor: pointer; color: var(--edu-brand); font-weight: 600; }
.form--row { display: flex; gap: 8px; align-items: center; }
.form--row input { width: auto; flex: 1; }
.pb { border: 1px solid var(--edu-line); border-radius: 10px; padding: 14px; margin: 10px 0; background: #fff; }
.pb__h { display: flex; justify-content: space-between; margin-bottom: 8px; }
.pb__rt img { max-width: 100%; }
.pb__gap { width: 120px; display: inline-block; }
.pb__match { display: flex; gap: 10px; align-items: center; margin: 4px 0; }
.pb__wo { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pb__wo-line { min-height: 30px; background: #fbfcff; border: 1px solid var(--edu-line); border-radius: 8px; padding: 6px; margin-bottom: 6px; }
.pb__voc { list-style: none; padding: 0; display: grid; gap: 4px; }
.pb__voc li { display: flex; gap: 10px; align-items: center; }
.pb__voc li span:first-child { font-weight: 700; }
.pb__audio, .pb__video { width: 100%; }
.pb__wb { border: 1px solid var(--edu-line); border-radius: 8px; touch-action: none; background: #fff; }
.pl__sec { margin-bottom: 20px; }
.pl__head { display: flex; gap: 10px; align-items: center; }
.pl__bar { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.live { border: 1px solid #ffd6c4; background: #fff8f5; border-radius: 10px; padding: 10px; margin: 12px 0; }
.live__strip { display: flex; gap: 8px; flex-wrap: wrap; }
.live__strip video { width: 160px; border-radius: 8px; background: #000; }
.live__ctrl { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.live__wb { position: fixed; left: 50%; transform: translateX(-50%); bottom: 80px; z-index: 50; border: 2px solid var(--edu-brand); border-radius: 10px; background: rgba(255,255,255,.95); touch-action: none; }
.rv__blk { margin-bottom: 12px; display: grid; gap: 8px; }
.card--tight { padding: 12px; margin-top: 10px; }
.code__v--sm { font-size: .8rem; padding: 2px 8px; letter-spacing: .12em; }

/* rte + editor v1 */
.rte { border: 1px solid var(--edu-line); border-radius: 10px; overflow: hidden; }
.rte__bar { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; background: #f4f6fb; border-bottom: 1px solid var(--edu-line); }
.rte__btn { border: 0; background: #fff; border: 1px solid var(--edu-line); border-radius: 6px; min-width: 28px; height: 26px; cursor: pointer; font: inherit; }
.rte__btn:hover { border-color: var(--edu-brand); }
.rte__color { width: 28px; height: 26px; padding: 0; border: 1px solid var(--edu-line); border-radius: 6px; background: #fff; cursor: pointer; }
.rte__ed { min-height: 120px; padding: 10px 12px; background: #fff; outline: none; }
.rte__ed img { max-width: 100%; }
.ed__grip { cursor: grab; color: var(--edu-muted); padding: 0 4px; user-select: none; }
.ed__drag { opacity: .4; border: 2px dashed var(--edu-brand); }
.ed__mini { display: flex; gap: 4px; margin-left: auto; }
.ed__savest { margin-left: 8px; }
.ed__sel { font: inherit; border: 1px solid var(--edu-line); border-radius: 8px; padding: 4px 8px; }
.ed__media { display: grid; gap: 6px; }
.pv { position: fixed; inset: 0; background: rgba(20,25,45,.55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.pv__box { background: #fff; border-radius: 14px; padding: 20px; max-width: 720px; width: 92%; max-height: 84vh; overflow: auto; position: relative; }
.pv__x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 18px; cursor: pointer; }

/* ── SRS ── */
.srs-card .btn .muted { font-weight: 400; }
#sc-grades .btn { padding: 10px 6px; }

/* ── мобайл студента (360px) ── */
@media (max-width: 560px) {
  .pl__steps { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .pl__step { white-space: nowrap; flex: 0 0 auto; }
  .pl__sec { scroll-margin-top: 170px; }
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select { font-size: 16px !important; }
  .pl__bar { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--line); z-index: 30; flex-direction: column; align-items: stretch; }
  .pb__gap { width: min(120px, 40vw); }
  .pb__match { flex-direction: column; align-items: stretch; gap: 4px; }
  .pb__match select { width: 100%; }
  .list__item { flex-direction: column; align-items: stretch; gap: 8px; }
  .list__item > span:last-child { justify-content: flex-start; flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr 1fr; }
  .rte__bar { overflow-x: auto; flex-wrap: nowrap; }
  .modal__box { padding: 14px; }
  #sc-grades { grid-template-columns: 1fr 1fr; }
}

/* ── live4 ── */
.live4 { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--surface); }
.live4__status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.live4__rail { display: grid; grid-template-columns: 220px 1fr; gap: 10px; }
.live4__tiles { display: flex; flex-direction: column; gap: 6px; }
.tile { position: relative; background: #101218; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; }
.tile__vid { width: 100%; height: 100%; object-fit: cover; }
.tile--off { background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.tile--off::after { content: attr(data-initial); font-size: 1.6rem; font-weight: 800; color: var(--muted); }
.tile__name { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: .68rem; padding: 1px 6px; border-radius: 4px; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__mute { position: absolute; right: 4px; top: 4px; }
.tile--cnt { background: var(--surface-2); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.live4__side { min-height: 120px; }
.live4__chat { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.live4__chat-h { padding: 6px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 700; font-size: .85rem; }
.live4__chat-log { flex: 1; overflow-y: auto; padding: 8px 10px; max-height: 220px; display: flex; flex-direction: column; gap: 4px; }
.chat-row { font-size: .88rem; }
.chat-ts { font-size: .72rem; float: right; }
.live4__chat form { display: flex; gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.live4__ctrl { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.live4__followbar { display: flex; gap: 10px; align-items: center; background: var(--err-soft); border-radius: 8px; padding: 6px 12px; margin-top: 8px; font-size: .88rem; }
.live4__wb { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 70; border: 2px solid var(--role); border-radius: var(--radius-s); background: rgba(255,255,255,.97); touch-action: none; }
.wb-tools { position: fixed; left: 50%; transform: translateX(-50%); bottom: 52px; z-index: 71; display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }
.wb-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; }
@media (max-width: 560px) {
  .live4__rail { grid-template-columns: 1fr; }
  .live4__tiles { flex-direction: row; overflow-x: auto; }
  .tile { min-width: 110px; }
  .live4__wb { bottom: 120px; width: 94vw; }
}
