/* Лист урока (core/lesson.js): похож на бумажный урок — белый лист, цветные заголовки блоков, таблицы.
   Лист светлый в любой теме кабинета (это «документ», как предпросмотр PDF). Виды: phone, screen, print. */
.ls-bar { margin: 4px 0 12px; }
.ls-tabs { margin: 8px 0 12px; }
.ls-tabs .chip { text-decoration: none; }
.ls-name { font: inherit; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--field); color: var(--ink); min-width: 220px; flex: 1; }
.ls-make { margin: 0 0 12px; }
.ls-h2 { margin: 18px 0 8px; font-size: 1.1rem; }
.ls-rows { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ls-row, .ls-addrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); flex-wrap: wrap; }
.ls-row-hidden { opacity: .6; border-style: dashed; }
.ls-row-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.ls-row-t { flex: 1; min-width: 160px; }
.ls-row-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ls-row-btns .btn { padding: 6px 11px; }
.ls-add select { font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--field); color: var(--ink); }
.ls-danger { margin-top: 18px; }
.ls-scratch { margin: 10px 0; }
.lf { max-width: 760px; }
.lf-field { display: flex; flex-direction: column; gap: 4px; }
.lf-field[hidden] { display: none; }
.lf-l { font-weight: 600; font-size: .9rem; }
.lf-in { font: inherit; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--field); color: var(--ink); }
.lf-in[type=checkbox] { width: auto; }
textarea.lf-in { font-size: .95rem; line-height: 1.45; resize: vertical; }
.lf-check { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; }
.lf-errors .msg { margin-bottom: 4px; }
.ls-check ul { margin: 8px 0 0; padding-left: 20px; }
.ls-bad { color: var(--bad); font-weight: 600; }
.ls-good { color: var(--good); font-weight: 600; }
.ls-warn { color: var(--warn); }
.ls-card .row { gap: 6px; }

.ls-stage { --lsn-paper: #ffffff; --lsn-ink: #1d2733; --lsn-muted: #5d6b7a; --lsn-line: #d8dee6; --lsn-head: #1f5fa8; --lsn-head-bg: #e8f1fb;
  --lsn-ans: #0f7a55; --lsn-ans-bg: #e3f6ee; --lsn-warn: #9a6200; --lsn-warn-bg: #fff4dc; }
.ls-stage:fullscreen { background: #f3f6fa; overflow: auto; padding: 24px; }

.lsn { background: var(--lsn-paper); color: var(--lsn-ink); border-radius: 14px; box-shadow: 0 10px 30px -18px rgba(20, 40, 70, .45);
  padding: 28px 32px; max-width: 900px; margin: 0 auto; font: 16px/1.55 var(--font); outline: none; }
.lsn .muted { color: var(--lsn-muted); }
.lsn-head { border-bottom: 3px solid var(--lsn-head); padding-bottom: 12px; margin-bottom: 18px; }
.lsn-title { font: 700 1.6rem/1.2 var(--display); color: var(--lsn-head); }
.lsn-sub { color: var(--lsn-muted); margin-top: 2px; }
.lsn-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.lsn-badge { font: 600 .78rem var(--font); padding: 3px 9px; border-radius: 99px; background: var(--lsn-head-bg); color: var(--lsn-head); }
.lsn-cando { margin-top: 8px; font-size: .9rem; }
.lsn-block { margin: 0 0 22px; break-inside: avoid-page; }
.lsn-h { display: flex; align-items: center; gap: 10px; font: 700 1.12rem/1.3 var(--display); color: var(--lsn-head); background: var(--lsn-head-bg);
  padding: 8px 12px; border-radius: 8px; margin: 0 0 10px; }
.lsn-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--lsn-head); color: #fff; display: grid; place-items: center; font-size: .85rem; }
.lsn-instr { font-style: italic; margin: 0 0 10px; }
.lsn-p { margin: 0 0 8px; }
.lsn-dialog { display: flex; flex-direction: column; gap: 6px; }
.lsn-line { padding-left: 4px; }
.lsn-role { color: var(--lsn-head); }
.lsn-say { border: none; background: none; cursor: pointer; font-size: .95em; padding: 0 4px; opacity: .7; }
.lsn-say:hover, .lsn-say:focus-visible { opacity: 1; }
.lsn-tools { margin-bottom: 8px; font-size: .9rem; }
.lsn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.lsn-card { margin: 0; border: 1px solid var(--lsn-line); border-radius: 10px; overflow: hidden; background: #fbfcfe; }
.lsn-card figcaption { padding: 8px 10px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lsn-card figcaption small { width: 100%; font-weight: 400; color: var(--lsn-muted); }
.lsn-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.lsn-wide { aspect-ratio: auto; max-height: 420px; object-fit: contain; }
.lsn-noimg { display: grid; place-items: center; text-align: center; border: 2px dashed var(--lsn-line); color: var(--lsn-muted); font-size: .85rem;
  background: repeating-linear-gradient(45deg, #f6f8fb, #f6f8fb 10px, #fff 10px, #fff 20px); }
.lsn-noimg small { font-size: .72rem; word-break: break-all; }
.lsn-list { margin: 0; padding-left: 22px; }
.lsn-list li { margin: 2px 0; }
.lsn-group h4 { margin: 10px 0 4px; font: 700 .98rem var(--display); color: var(--lsn-head); }
.lsn-table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.lsn-table th, .lsn-table td { border: 1px solid var(--lsn-line); padding: 7px 10px; text-align: left; vertical-align: top; }
.lsn-table th { background: var(--lsn-head-bg); width: 30%; }
.lsn-options { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; }
.lsn-opt { display: inline-block; border: 1px solid var(--lsn-line); border-radius: 6px; padding: 2px 8px; background: #f8fafc; }
.lsn-items { margin: 0; padding-left: 26px; display: flex; flex-direction: column; gap: 8px; }
.lsn-tfs { white-space: nowrap; margin-left: 6px; }
.lsn-tf { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--lsn-line); border-radius: 6px; margin-left: 4px; font-weight: 700; }
.lsn-gap { display: inline-block; min-width: 3em; border-bottom: 1.5px solid var(--lsn-ink); padding: 0 3px; letter-spacing: .08em; }
.lsn-choice { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.lsn-ans { background: var(--lsn-ans-bg); color: var(--lsn-ans); border-color: var(--lsn-ans); font-weight: 600; letter-spacing: normal; }
.lsn-warn { display: inline-block; background: var(--lsn-warn-bg); color: var(--lsn-warn); border-radius: 6px; padding: 3px 8px; font-size: .85rem; margin: 2px 0; }
.lsn-who { margin: 0 0 12px; }
.lsn-lines span { display: block; height: 1.6em; border-bottom: 1px solid var(--lsn-line); }
.lsn-ex { display: block; margin-top: 6px; padding: 4px 8px; border-radius: 6px; font-weight: 500; }
.lsn-frames div { border-left: 3px solid var(--lsn-head); padding: 2px 10px; margin: 4px 0; font-style: italic; }
.lsn-key { border-top: 2px dashed var(--lsn-line); padding-top: 12px; font-size: .92rem; }
.lsn-key p { margin: 4px 0; }
.lsn-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--lsn-line); }
.lsn-btn { font: 600 .95rem var(--font); padding: 9px 16px; border-radius: 10px; border: 1px solid var(--lsn-line); background: #f4f7fb; color: var(--lsn-ink); cursor: pointer; }
.lsn-btn:disabled { opacity: .45; cursor: default; }
.lsn-pos { color: var(--lsn-muted); font-size: .9rem; }

/* «Пройти»: живые упражнения */
.lsn-in { font: inherit; color: var(--lsn-ink); background: #f7fafd; border: 1.5px solid var(--lsn-line); border-radius: 7px; padding: 3px 7px; margin: 1px 2px; }
.lsn-in:focus { outline: 2px solid var(--lsn-head); outline-offset: 1px; background: #fff; }
.lsn-in:disabled { opacity: 1; }
.lsn-line-in { display: block; width: 100%; margin: 6px 0; padding: 7px 10px; }
.lsn-in-ok { border-color: var(--lsn-ans); background: var(--lsn-ans-bg); }
.lsn-in-bad { border-color: #c2472a; background: #fdecea; }
.lsn-pick { cursor: pointer; font: inherit; color: var(--lsn-ink); }
.lsn-pick[aria-pressed="true"] { background: var(--lsn-head); border-color: var(--lsn-head); color: #fff; }
.lsn-pick:disabled { cursor: default; }
.lsn-do li { padding: 4px 6px; border-radius: 8px; }
.lsn-do li.lsn-ok { background: var(--lsn-ans-bg); }
.lsn-do li.lsn-bad { background: #fdecea; }
.lsn-do li.lsn-teacher { background: var(--lsn-warn-bg); }
.lsn-fb { margin-top: 4px; font-size: .9em; }
.lsn-fb-bad { color: #b03a22; }
.lsn-fb-ok { color: var(--lsn-ans); }
.lsn-fb-teacher { color: var(--lsn-warn); }
.lsn-sum { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.lsn-primary { background: var(--lsn-head); border-color: var(--lsn-head); color: #fff; }

/* телефон: узкая колонка, мельче поля */
.lsn-mode-phone { max-width: 390px; padding: 18px 16px; font-size: 15px; border: 8px solid #1d2733; border-radius: 30px; }
.lsn-mode-phone .lsn-cards { grid-template-columns: 1fr 1fr; }
.lsn-folded > :not(.lsn-h):not(.lsn-warn) { display: none; }
/* экран урока: крупно, один блок */
.lsn-mode-screen { font-size: 21px; max-width: 1100px; min-height: 60vh; display: flex; flex-direction: column; }
.lsn-mode-screen .lsn-block { flex: 1; }
.lsn-mode-screen .lsn-h { font-size: 1.3rem; }
.ls-stage:fullscreen .lsn-mode-screen { min-height: calc(100vh - 48px); font-size: 26px; }

@media (max-width: 600px) { .lsn { padding: 18px 14px; } .lsn-mode-screen { font-size: 18px; } }

@media print {
  body { background: #fff !important; }
  .side, .ls-noprint, .nav-item { display: none !important; }
  .shell, .main, .ls-page { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .lsn { box-shadow: none; border: none; padding: 0; max-width: none; font-size: 12pt; }
  .lsn-say, .lsn-tools { display: none; }
  .lsn-h, .lsn-n, .lsn-badge, .lsn-table th, .lsn-ans { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .lsn-key { break-before: page; }
}

/* живой урок (teacher/live.js) */
.lv-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.lv-plan { position: sticky; top: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.lv-plan ol { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lv-th { width: 100%; text-align: left; position: relative; cursor: pointer; color: inherit; font: inherit; }
.lv-th .ls-th-stage { transform: scale(.22); }
.lv-th.lv-cur { outline: 3px solid var(--accent); outline-offset: 1px; }
.lv-cnt { position: absolute; right: 10px; bottom: 10px; z-index: 2; font-size: .75rem; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.lv-cnt[hidden] { display: none; }
.lv-planbtn { width: 100%; text-align: left; font: inherit; font-size: .88rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.lv-planbtn small { color: var(--muted); flex: none; }
.lv-planbtn.lv-cur { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.lv-planbtn.lv-cur small { color: inherit; opacity: .85; }
.lv-bar { margin-bottom: 8px; }
.lv-nav { justify-content: space-between; margin-top: 10px; }
.lv-side textarea { width: 100%; }
.lv-members { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0; }
.lv-hist { list-style: none; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lv-absent { opacity: .55; text-decoration: line-through; }
.lv-note { white-space: pre-wrap; }
.lv-table th { width: 40%; }
.lv-fsbar { display: none; }
.lsn-small { padding: 4px 10px; font-size: .85rem; }
.lsn-itemctl { margin-left: 8px; white-space: nowrap; }
.lsn-who-tag { font-size: .85rem; font-weight: 600; color: var(--lsn-muted); margin-right: 6px; }
.lsn-ok .lsn-who-tag { color: var(--lsn-ans); }
.lsn-bad .lsn-who-tag { color: #b03a22; }
.lsn-marks { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.lsn-markrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lsn-markrow .lsn-text { min-width: 140px; font-weight: 600; }
.lv-stagewrap:fullscreen { background: #f3f6fa; overflow: auto; padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.lv-stagewrap:fullscreen .lsn-mode-live { font-size: 26px; max-width: 1200px; }
.lv-stagewrap:fullscreen .lv-fsbar { display: flex; gap: 10px; justify-content: center; align-items: center; position: fixed; left: 0; right: 0; bottom: 12px; transition: opacity .3s; }
.lv-stagewrap.lv-idle .lv-fsbar { opacity: 0; }
.lv-stagewrap.lv-idle { cursor: none; }
body.lv-showbody { background: #f3f6fa !important; }
.lv-showstage { padding: 0; position: fixed; inset: 0; overflow: hidden; }
body.lv-showbody { overflow: hidden; }
.lv-showstage .lsn-mode-live { max-width: none; }
.lv-showstage .lsn-mode-live { font-size: 24px; max-width: 1200px; }
.lv-showwait { text-align: center; padding: 30px; }
.lsn-mode-live .lsn-block { margin: 0; }
@media (max-width: 1100px) { .lv-grid { grid-template-columns: 1fr; } .lv-plan { position: static; max-height: none; } }

/* задание на телефоне ученика (teacher/live_student.js) */
.lvs-banners { position: fixed; top: 8px; left: 8px; right: 8px; z-index: 40; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 520px; margin: 0 auto; }
.lvs-banner { pointer-events: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; }
.lvs-task { position: fixed; inset: 0; z-index: 60; overflow: auto; background: var(--wall); background-attachment: fixed; padding: 10px 10px 40px; }
body.lvs-open { overflow: hidden; }
.lvs-head { display: flex; align-items: center; gap: 10px; padding: 4px 2px 10px; max-width: 560px; margin: 0 auto; }
.lvs-title { font-weight: 700; flex: 1; }
.lvs-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.lvs-pad { padding: 6px 2px; max-width: 560px; margin: 0 auto; }
.lvs-stage .lsn { max-width: 560px; padding: 16px 14px; font-size: 16px; }
.lsn-mode-push .lsn-block { margin-bottom: 18px; }
.lv-review { position: fixed; inset: 0; z-index: 70; background: rgba(243, 246, 250, .97); overflow: auto; padding: 30px; color: #1d2733; }
.lv-review-card { max-width: 900px; margin: 0 auto; font-size: 22px; }
.lv-review-card h2 { color: #1f5fa8; margin: 0 0 14px; }
.lv-review-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.lv-review-card .muted { color: #5d6b7a; font-size: .8em; }
.lv-push .skill-bar { height: 8px; }

/* страница урока у ученика (teacher/student_lessons.js) */
.lsn-mine { margin-top: 3px; font-size: .9em; font-weight: 600; }
.lsn-mine-ok { color: var(--lsn-ans); }
.lsn-mine-bad { color: #b03a22; }
.lsn-mine-none { color: var(--lsn-muted); font-weight: 400; }
.sl-sheet { margin: 12px 0; }
.sl-sheet .lsn { max-width: 720px; }
.sl-phrases { margin-top: 14px; }
@media print {
  body[data-page="student"] { background: #fff !important; }
  body[data-page="student"] .topbar, .lvs-banners, .gear-row, .sl-phrases .muted { display: none !important; }
  body[data-page="student"] .phone-page { max-width: none; padding: 0; }
}

/* «Учим слова» ученика (teacher/student_words.js) */
.sw-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 10px 0; }
.sw-tile { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.sw-tile b { font-size: 1.7rem; font-family: var(--display); }
.sw-stars { color: #e0a800; letter-spacing: 1px; font-size: .95rem; white-space: nowrap; }
.sw-match { max-width: 560px; margin: 0 auto; padding: 6px; }
.sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw-col { display: flex; flex-direction: column; gap: 8px; }
.sw-tile-btn { font: 600 1rem var(--font); padding: 12px 10px; border-radius: 12px; border: 1px solid var(--field-border); background: var(--glass-strong); color: var(--ink); cursor: pointer; text-align: center; }
.sw-tile-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.sw-tile-btn.sw-bad { background: var(--bad-bg); border-color: var(--bad); }

/* банк слов у учителя (teacher/bank_teacher.js) */
.bk-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; max-height: 340px; overflow: auto; padding: 4px 0; }
.bk-w { align-items: flex-start; }
.bk-in { opacity: .55; }
.bk-table th { text-align: left; }
.bk-stuck { background: var(--bad-bg); }

/* Значок «отправить ученикам онлайн»: справа вверху и справа внизу блока, у которого отправка возможна */
.lv-stagewrap { position: relative; }
.lv-sendicon { position: absolute; right: 10px; z-index: 5; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--field-border, rgba(0, 0, 0, .15)); background: var(--glass-strong, #fff); color: var(--accent, #2563eb); cursor: pointer; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .3); }
.lv-sendicon[hidden] { display: none; }
.lv-sendicon:hover { background: var(--accent, #2563eb); color: #fff; }
.lv-sendicon-top { top: 10px; }
.lv-sendicon-bottom { bottom: 10px; }
.lv-stagewrap:fullscreen .lv-sendicon { display: none; }

/* Материалы блока: картинки, видео, аудио, YouTube, ссылки */
.lsn-media-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.lsn-media { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.lsn-media video, .lsn-media audio { width: 100%; max-width: 680px; border-radius: 10px; }
.lsn-media-yt iframe { width: 100%; max-width: 680px; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.lsn-media figcaption { font-size: .85em; opacity: .75; }
.lsn-media-image .lsn-img { max-width: min(100%, 680px); border-radius: 10px; }
.lsn-medialink { word-break: break-all; }
.lsn-media-print { font-size: .85em; padding-left: 1.2em; }
.lsn-url { word-break: break-all; }

/* ---- Обрезка картинки (teacher/cropper.js): уголки и сетка как в iOS ---- */
.cr { position: relative; width: min(980px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--glass-strong); }
.cr-stage { position: relative; margin: 0 auto; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 6px; background: #000; }
.cr-img { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; pointer-events: none; }
.cr-box { position: absolute; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); cursor: move; touch-action: none; }
.cr-g { position: absolute; background: rgba(255, 255, 255, .5); pointer-events: none; }
.cr-gv1, .cr-gv2 { top: 0; bottom: 0; width: 1px; } .cr-gv1 { left: 33.333%; } .cr-gv2 { left: 66.666%; }
.cr-gh1, .cr-gh2 { left: 0; right: 0; height: 1px; } .cr-gh1 { top: 33.333%; } .cr-gh2 { top: 66.666%; }
.cr-h { position: absolute; width: 34px; height: 34px; touch-action: none; }
.cr-h::after { content: ""; position: absolute; background: #fff; border-radius: 1px; }
.cr-nw { left: 0; top: 0; cursor: nwse-resize; } .cr-ne { right: 0; top: 0; cursor: nesw-resize; } .cr-sw { left: 0; bottom: 0; cursor: nesw-resize; } .cr-se { right: 0; bottom: 0; cursor: nwse-resize; }
.cr-nw::after, .cr-ne::after, .cr-sw::after, .cr-se::after { width: 20px; height: 20px; border: 4px solid #fff; background: transparent; border-radius: 0; }
.cr-nw::after { left: -1px; top: -1px; border-right: 0; border-bottom: 0; } .cr-ne::after { right: -1px; top: -1px; border-left: 0; border-bottom: 0; }
.cr-sw::after { left: -1px; bottom: -1px; border-right: 0; border-top: 0; } .cr-se::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.cr-n, .cr-s { left: 50%; margin-left: -22px; width: 44px; height: 26px; cursor: ns-resize; } .cr-n { top: 0; } .cr-s { bottom: 0; }
.cr-e, .cr-w { top: 50%; margin-top: -22px; height: 44px; width: 26px; cursor: ew-resize; } .cr-e { right: 0; } .cr-w { left: 0; }
.cr-n::after, .cr-s::after { left: 6px; right: 6px; height: 4px; } .cr-n::after { top: -1px; } .cr-s::after { bottom: -1px; }
.cr-e::after, .cr-w::after { top: 6px; bottom: 6px; width: 4px; } .cr-e::after { right: -1px; } .cr-w::after { left: -1px; }
.cr-ratios { justify-content: center; }

/* ---- Мастер импорта урока (teacher/lesson_import.js) ---- */
.im-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.im-step { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--field-border); background: var(--field); color: var(--muted); font-size: .88rem; text-decoration: none; }
.im-step b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink); font-size: .78rem; }
.im-step[aria-current="step"] { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 2px rgba(10, 108, 214, .18); }
.im-step[aria-current="step"] b { background: var(--accent); color: var(--accent-ink); }
.im-drop { border: 2px dashed var(--field-border); border-radius: var(--r); padding: 34px 16px; text-align: center; background: var(--field); cursor: pointer; }
.im-drop.over { border-color: var(--accent); background: rgba(10, 108, 214, .08); }
.im-block { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--field-border); background: var(--field); }
.im-block + .im-block { margin-top: 8px; }
.im-block .im-ico { font-size: 1.3rem; text-align: center; }
.im-block .im-title { font-weight: 600; }
.im-block .im-first { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.im-block.check { border-color: var(--warn); }
.im-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.im-acts .btn { padding: 5px 9px; font-size: .82rem; }
.im-thumb { max-width: 220px; max-height: 150px; border-radius: 8px; border: 1px solid var(--field-border); background: #fff; display: block; cursor: zoom-in; }
.im-imgcard { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 640px) { .im-imgcard { grid-template-columns: 1fr; } .im-block { grid-template-columns: 28px minmax(0, 1fr); } .im-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.im-choices { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.im-done { opacity: .6; }
.im-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: imspin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes imspin { to { transform: rotate(360deg); } }
.im-full { max-width: 100%; max-height: 78vh; display: block; margin: 0 auto; border-radius: 8px; }

/* ---- «Сверить»: оригинал рядом с блоком ---- */
.we.im-wide { width: min(1280px, 100%); }
.im-cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.im-cmp-left, .im-cmp-right { max-height: 72vh; overflow: auto; border: 1px solid var(--field-border); border-radius: var(--r-sm); background: #fff; padding: 6px; }
.im-cmp-right { background: transparent; border: 0; padding: 0; }
.im-pagewrap { position: relative; display: block; }
.im-pagewrap img { display: block; width: 100%; height: auto; }
.im-frame { position: absolute; border: 2px solid var(--accent); background: rgba(10, 108, 214, .12); border-radius: 4px; pointer-events: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }
@media (max-width: 900px) { .im-cmp { grid-template-columns: 1fr; } .im-cmp-left { max-height: 46vh; } }

/* просмотрщик разметки блоков (импорт, шаг «Разметка») */
.lv { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .lv { grid-template-columns: 1fr; } }
.lv-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.lv-bar .btn { padding: 4px 10px; }
.lv-thumbs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.lv-scroll { overflow: auto; max-height: 78vh; border: 1px solid var(--line); border-radius: 12px; background: var(--field); padding: 8px; }
.lv-page { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); touch-action: pan-y; }
.lv-img, .lv-blank { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.lv-txt { position: absolute; white-space: nowrap; color: #333; line-height: 1; pointer-events: none; }
.lv-blk { position: absolute; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); border-radius: 6px; pointer-events: none; }
.lv-blk.on { background: color-mix(in srgb, var(--c) 22%, transparent); }
.lv-lab { position: absolute; left: -2px; top: -20px; background: var(--c); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px 6px 6px 0; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.lv-ign { opacity: .45; --c: #888 !important; }
.lv-u { position: absolute; border: 1px solid color-mix(in srgb, var(--c, #888) 60%, transparent); border-radius: 3px; cursor: pointer; }
.lv-u:hover, .lv-u.on { background: color-mix(in srgb, var(--c, #888) 30%, transparent); outline: 2px solid var(--c, #888); }
.lv-ut { --c: #888; border-style: dashed; }
.lv-skip { background: repeating-linear-gradient(45deg, rgba(120,120,120,.35) 0 4px, transparent 4px 8px); }
.lv-cut { position: absolute; left: 0; right: 0; height: 10px; cursor: ns-resize; z-index: 3; touch-action: none; }
.lv-cut i { position: absolute; left: 0; right: 0; top: 4px; height: 3px; background: var(--c); border-radius: 2px; }
.lv-cut span { position: absolute; right: 4px; top: -4px; background: var(--c); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 8px; }
.lv-cut.drag { opacity: .8; }
.lv-pop { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 4px; padding: 8px; width: 220px; }
.lv-poptext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-note { position: absolute; left: 8px; bottom: 4px; }
.lv-side { display: flex; flex-direction: column; gap: 10px; max-height: 78vh; overflow: auto; }
.lv-row { border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.lv-row.on { background: color-mix(in srgb, var(--c) 12%, transparent); }
.lv-rowhead { display: flex; gap: 8px; align-items: flex-start; }
.lv-num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; }
.lv-rowtools { margin-top: 8px; display: grid; gap: 6px; }
.lv-c0 { --c: #0a6cd6; } .lv-c1 { --c: #d6540a; } .lv-c2 { --c: #1a9a4a; } .lv-c3 { --c: #a03fc0; }
.lv-c4 { --c: #c0961a; } .lv-c5 { --c: #0aa0b0; } .lv-c6 { --c: #d60a6c; } .lv-c7 { --c: #6a6a6a; }

/* длинная полоса: страницы подряд без разрывов */
.lv-pg { position: absolute; left: 0; background: #fff; border-bottom: 1px dashed rgba(120,120,120,.5); }
.lv-pgno { position: absolute; right: 4px; top: 2px; font-size: 10px; color: #999; background: rgba(255,255,255,.8); padding: 0 4px; border-radius: 6px; pointer-events: none; }
.lv-lab.lv-cont { top: 2px; left: auto; right: -2px; border-radius: 6px; opacity: .85; }

/* редактор блока: загрузка картинки и предпросмотр прямо в окне */
.lf-upload { display: grid; gap: 6px; }
.lf-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.lf-thumb { height: 56px; border-radius: 8px; border: 1px solid var(--line); }
.lf-prev { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 8px; }
.lf-prev-bar { flex-wrap: wrap; gap: 8px; align-items: center; }
.lf-stage { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--field); }
/* нижний край блока в просмотрщике разметки: за него тянут, чтобы блок кончался на другой строке */
.lv-bot { position: absolute; width: 56px; height: 16px; margin-left: -28px; margin-top: -5px; cursor: ns-resize; z-index: 3; touch-action: none; }
.lv-bot i { display: block; height: 6px; margin-top: 5px; border-radius: 3px; background: var(--c); box-shadow: 0 0 0 2px #fff; }
.lv-bot.drag { opacity: .8; }

/* блоки рамками: ручки, рисование новой рамки */
.lv-blk.lv-reg { pointer-events: none; }
.lv-blk.lv-reg.sel { border-width: 3px; background: color-mix(in srgb, var(--c) 16%, transparent); z-index: 2; }
.lv-reg .lv-lab { pointer-events: auto; cursor: grab; user-select: none; z-index: 4; }
.lv-reg .lv-lab:active { cursor: grabbing; }
.lv-h { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--c); border-radius: 3px; pointer-events: auto; z-index: 5; touch-action: none; }
.lv-h-nw { left: -8px; top: -8px; cursor: nwse-resize; } .lv-h-n { left: calc(50% - 6px); top: -8px; cursor: ns-resize; } .lv-h-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.lv-h-e { right: -8px; top: calc(50% - 6px); cursor: ew-resize; } .lv-h-se { right: -8px; bottom: -8px; cursor: nwse-resize; } .lv-h-s { left: calc(50% - 6px); bottom: -8px; cursor: ns-resize; }
.lv-h-sw { left: -8px; bottom: -8px; cursor: nesw-resize; } .lv-h-w { left: -8px; top: calc(50% - 6px); cursor: ew-resize; }
.lv-rx { position: absolute; right: -2px; top: -22px; pointer-events: auto; z-index: 5; border: 0; border-radius: 9px; background: var(--c); color: #fff; font-size: 11px; line-height: 1; padding: 3px 6px; cursor: pointer; }
.lv-none { border-style: dashed; border-color: #999; background: rgba(150,150,150,.12); }
.lv-hintbar { margin: 0 0 6px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.lv-drawing { cursor: crosshair; }
.lv-drawing .lv-u, .lv-drawing .lv-lab, .lv-drawing .lv-h, .lv-drawing .lv-rx { pointer-events: none; }
.lv-rubber { position: absolute; border: 2px dashed var(--accent, #2563eb); background: color-mix(in srgb, var(--accent, #2563eb) 14%, transparent); pointer-events: none; z-index: 6; }
#lv-new[aria-pressed="true"] { background: var(--accent, #2563eb); color: #fff; }

/* флажки в тексте урока («☐ …»): отмечает учитель на уроке */
.lsn-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; cursor: pointer; }
.lsn-check input { width: 1.15em; height: 1.15em; margin-top: .2em; flex: none; cursor: pointer; }

/* редактор информационного слайда (версия 2) */
.se { max-width: 760px; }
.se-tools { flex-wrap: wrap; gap: 6px; }
.se-body { max-height: 52vh; overflow: auto; }
.se-el textarea, .se-el input[type="text"], .se-el input:not([type]) { width: 100%; box-sizing: border-box; }
.se-thumbbox { display: inline-flex; align-items: center; justify-content: center; min-width: 80px; min-height: 60px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .8rem; }
.se-thumb { max-height: 90px; border-radius: 8px; display: block; }

.lsn-area { width: 100%; box-sizing: border-box; min-height: 5.5em; margin: 4px 0; }

/* редактор упражнения версии 2 */
.ee { max-width: 820px; }
.ee-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.ee-grow { flex: 1; min-width: 200px; }
.ee-body { max-height: 54vh; overflow: auto; padding-right: 4px; }
.ee-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: start; }
.ee-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.ee-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.ee-ta { width: 100%; box-sizing: border-box; resize: vertical; }
.ee-tf { display: inline-flex; gap: 4px; }
.ee-tf .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.ee-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.ee-opt input.lf-in { width: 100%; box-sizing: border-box; }
.ee-part { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ee-part input.lf-in { width: 100%; box-sizing: border-box; }
.ee-fieldtag { padding: 6px 10px; border: 1px dashed var(--accent); border-radius: 8px; color: var(--accent); font-size: .9rem; }
.ee-more { margin-top: 4px; }

/* v3.2.0: медиа к заданиям упражнения */
.ee-media { align-items: center; gap: 8px; }
.lsn-items .lsn-media, .lsn-pairs .lsn-media { margin-top: 6px; }
.lsn-items .lsn-media img, .lsn-pairs .lsn-media img { max-width: 240px; border-radius: 10px; }

/* v3.4.0: раздел «Лексика» урока */
.lv2-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lv2-w { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 10px; background: rgba(127,127,127,.12); }
.lv2-res { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lv2-cands { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.lv2-c { display: inline-flex; align-items: center; gap: 6px; }

/* v3.5.1: «Собрать фразу» — плитки */
.lsn-order { display: flex; flex-direction: column; gap: 8px; }
.lsn-built { min-height: 44px; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-bottom: 1.5px solid var(--lsn-ink); }
.lsn-pool { display: flex; flex-wrap: wrap; gap: 6px; }
.lsn-tile { cursor: pointer; font: inherit; padding: 6px 12px; }
.lsn-tile:disabled { opacity: .35; cursor: default; }
.lsn-tile-on { background: #e8f0fe; }

/* v3.7.0: «Грамматика урока» */
.lgr { width: auto; height: auto; display: flex; }
.lg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lg-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lg-list li > span { flex: 1; min-width: 220px; }

/* v3.8.0: редактор урока — перетаскивание, миниатюры, шапка окна блока */
.ls-cols { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; align-items: start; }
.ls-ribbon { position: sticky; top: 8px; max-height: calc(100vh - 24px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 960px) { .ls-cols { grid-template-columns: minmax(0, 1fr); } .ls-ribbon { display: none; } }
.ls-grip { cursor: grab; color: var(--muted); user-select: none; }
.ls-row[draggable="true"] { cursor: default; }
.ls-row.sel, .ls-th.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.ls-dragging { opacity: .45; }
.ls-drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.ls-drop-after { box-shadow: 0 3px 0 0 var(--accent); }
.ls-th { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); cursor: pointer; }
.ls-th-hidden { opacity: .55; border-style: dashed; }
.ls-th .ls-row-n { position: absolute; left: 8px; top: 8px; z-index: 2; box-shadow: 0 0 0 2px var(--field); }
.ls-th-in { height: 90px; min-height: 48px; overflow: hidden; border-radius: 8px; background: #fff; position: relative; pointer-events: none; }
.ls-th-stage { width: 780px; transform: scale(.25); transform-origin: top left; padding: 12px 16px; }
.ls-th-stage .lsn-head, .ls-th-stage .lsn-nav { display: none; }
.ls-th-t { font-size: .8rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.we-head { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 12px; margin: -18px -20px 0; padding: 14px 20px 10px; background: var(--glass-strong); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.we-head .we-ht { flex: 1; min-width: 140px; }
.we-head h2 { margin: 0; font-size: 1.15rem; }
.we-nav { display: flex; gap: 6px; margin-left: auto; }
.we-tools { position: sticky; top: var(--we-head, 56px); z-index: 3; background: var(--glass-strong); padding: 6px 0; }
.we.ls-pv { width: min(1100px, 100%); }

/* v3.8.1: единый просмотрщик */
.ls-vframe { min-height: 120px; }
.ls-vframe.ls-phone { width: min(400px, 100%); height: min(72vh, 760px); overflow-y: auto; margin: 0 auto; border: 8px solid #1d2733; border-radius: 28px; background: #fff; overscroll-behavior: contain; }
.ls-vframe.ls-phone .ls-stage { padding: 14px; }

/* v3.8.2: «Сопоставление» — плашки слева и справа, линии между ними */
.lsn-match { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(48px, 16%, 140px); margin: 10px 0; }
.lsn-match-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.lsn-match-col { display: flex; flex-direction: column; gap: 10px; }
.lsn-mt { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; padding: 8px 12px; border: 2px solid var(--lsn-line); border-radius: 12px; background: #f8fafc; color: inherit; cursor: pointer; }
.lsn-mt:disabled { cursor: default; opacity: 1; }
.lsn-mt-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--lsn-head-bg); color: var(--lsn-head); display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.lsn-mt-x { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lsn-mt.linked { border-color: var(--mc); background: #fff; }
.lsn-mt.linked .lsn-mt-n { background: var(--mc); color: #fff; }
.lsn-mt.sel { box-shadow: 0 0 0 3px rgba(31, 95, 168, .35); border-color: var(--lsn-head); }
.lsn-mt.lsn-ok { background: #e7f6ea; }
.lsn-mt.lsn-bad { background: #fdeaea; }
.lsn-mt .lsn-media { margin-top: 6px; }
.lsn-mt .lsn-media img { max-width: 140px; border-radius: 8px; }

/* v3.8.3: тёмная тема — лист урока всегда светлый, поэтому текст в кнопках и полях тёмный */
:where(.lsn) :is(button, input, select, textarea) { color: var(--lsn-ink, #1d2733); }
:where(.lsn) :is(input, select, textarea) { background-color: #fff; }
:where(.lsn-opt, .lsn-tile, .lsn-mt) { color: var(--lsn-ink, #1d2733); }
.lsn-tile[draggable="true"] { cursor: grab; }
.lsn-built { transition: background .15s; }

/* v3.9.0: «В один слайд» — компоновка нескольких блоков */
.lsn-group { display: grid; gap: 16px; margin: 0 0 14px; }
.lsn-group > .lsn-cell { min-height: 0; }
.lsn-group-cols, .lsn-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lsn-group-rows { grid-template-columns: minmax(0, 1fr); }
.lsn-group-top2, .lsn-group-bottom2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lsn-group-top2 > .lsn-cell:nth-child(3), .lsn-group-bottom2 > .lsn-cell:nth-child(1) { grid-column: 1 / -1; }
.lsn-cell { min-width: 0; }
.lsn-cell > .lsn-block { margin: 0; height: 100%; }
.lsn-mode-phone .lsn-group { grid-template-columns: minmax(0, 1fr); }
.lsn-mode-phone .lsn-group > .lsn-cell { grid-column: auto !important; }
@media (max-width: 700px) { .lsn-group-cols, .lsn-group-grid, .lsn-group-top2, .lsn-group-bottom2 { grid-template-columns: minmax(0, 1fr); } .lsn-group > .lsn-cell { grid-column: auto !important; } }
.ls-gbadge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--field); border: 1px solid var(--line); font-size: .78rem; }
.lg-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.lg-icon { padding: 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--field); cursor: pointer; display: grid; place-items: center; }
.lg-icon[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.lg-icon svg { width: 64px; height: 46px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; }
.lg-cells { display: grid; gap: 8px; }

/* v3.10.0: компоновка слайда через ленту миниатюр */
.ls-gpanel { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.ls-gbtn { padding: 3px; border: 2px solid var(--line); border-radius: 8px; background: var(--field); color: inherit; cursor: pointer; display: grid; place-items: center; min-width: 0; }
.ls-gbtn svg { width: 100%; max-width: 30px; height: 22px; stroke: currentColor; fill: none; stroke-width: 4; stroke-linecap: round; }
.ls-gbtn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.ls-gbtn:disabled { opacity: .35; cursor: default; }
.ls-gnote { min-height: 1.2em; }
.ls-th-gm { outline: 2px dashed var(--accent); outline-offset: 2px; }
.ls-th-act { position: absolute; right: 8px; top: 8px; z-index: 3; display: flex; gap: 6px; }
.ls-th-act button { width: 30px; height: 30px; border-radius: 50%; border: 0; color: #fff; font-size: 1.05rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.ls-th-act button[hidden] { display: none; }
.ls-act-ok { background: #1f9d55; }
.ls-act-no { background: #d64545; }
.ls-th-t { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.ls-th-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-th-un { padding: 3px 8px; font-size: .75rem; flex: none; }
.ls-gcheck { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.ls-gcheck input { width: 20px; height: 20px; }
.ls-gnum { min-width: 1.2em; text-align: right; font-weight: 700; color: var(--accent); }
.ls-askbox { width: min(420px, 100%); text-align: center; align-items: stretch; }
.ls-askbox .row { justify-content: center; }
.ls-ask { z-index: 70; }

/* v3.10.1: значки вместо подписей в строках блоков */
.ls-row-btns .ls-ib { padding: 6px 9px; min-width: 34px; line-height: 1; }

/* v3.10.2: шапка редактора урока, добавление блоков, свёрнутая лексика */
.ls-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; }
.ls-actions-side { margin-left: auto; justify-content: flex-end; }
.ls-status { font-size: .78rem; min-height: 1em; }
.ls-adds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ls-adds { grid-template-columns: minmax(0, 1fr); } }
.ls-addrow2 { display: flex; gap: 8px; align-items: stretch; }
.ls-addrow2 select, .ls-addrow2 .btn { height: 40px; box-sizing: border-box; }
.ls-addrow2 select { flex: 1; min-width: 0; }
.ls-fold > summary { cursor: pointer; list-style-position: inside; margin: 18px 0 8px; font-size: 1.1rem; font-weight: 700; }
.ls-fold[open] > summary { margin-bottom: 8px; }
.ls-th-t:empty { display: none; }

/* v3.11.0: экран «Провести урок» — своё имя корня, чтобы не цеплять белую страницу просмотрщика разметки (.lv-page) */
.lv-live { position: relative; }

/* v3.12.0: редактор слайда */
.we.sl-we { width: min(1180px, 100%); }
.sl-stagebox { position: relative; }
.sl-stage { padding: 14px; border-radius: 12px; }
.sl-over { position: absolute; inset: 0; pointer-events: none; }
.sl-h { position: absolute; pointer-events: auto; z-index: 5; touch-action: none; }
.sl-h::after { content: ''; position: absolute; background: var(--accent); opacity: .55; border-radius: 3px; }
.sl-h:hover::after, .sl-h:active::after { opacity: 1; }
.sl-hv { cursor: col-resize; } .sl-hv::after { left: 4px; right: 4px; top: 0; bottom: 0; }
.sl-hh { cursor: row-resize; } .sl-hh::after { top: 4px; bottom: 4px; left: 0; right: 0; }
.sl-fs { position: absolute; transform: translateX(-100%); pointer-events: auto; z-index: 6; display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 99px; background: rgba(20, 30, 45, .86); color: #fff; font-size: .78rem; }
.sl-fs button { border: 0; background: transparent; color: #fff; cursor: pointer; font: inherit; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.sl-fs button:hover { background: rgba(255,255,255,.2); }
.ls-th-btns { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.ls-th-btns .ls-ib { padding: 3px 7px; min-width: 30px; line-height: 1; }
