/* ЛК ИИ-кружка. Токены взяты с сайта кружка («Вечернее небо, 19:00»), но это рабочий инструмент:
   плотнее, навигация слева, крупные кнопки, без декоративных анимаций. */

:root {
  --sky: #14266B;
  --night: #0A1440;
  --paper: #F4F7FC;
  --card: #FFFFFF;
  --mist: #DDE6F5;
  --mist-2: #CCD8EE;
  --blue: #2B4F9D;
  --accent: #8FB8FF;
  --ink: #0A1440;
  --ink-2: #3B4763;
  --on-dark-2: #D2DCF5;
  --ok: #1F6B4A;
  --ok-soft: #DDF0E6;
  --stop: #A3262A;
  --stop-soft: #F8E3E3;

  --font: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --size-small: 14px;
  --size-body: 16px;
  --size-lead: 19px;
  --size-head: 28px;
  --radius: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--size-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--blue); }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--night); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sidebar :focus-visible, .overlay :focus-visible { outline-color: var(--accent); }

h1 { font-weight: 600; font-size: var(--size-head); line-height: 1.15; letter-spacing: -.02em; }
h2 { font-weight: 600; font-size: var(--size-lead); line-height: 1.25; letter-spacing: -.01em; }
.muted { color: var(--ink-2); }
.small { font-size: var(--size-small); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* кнопки: крупные, с понятным состоянием «занято» */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 0; border-radius: var(--radius);
  font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.btn--primary { background: var(--sky); color: #fff; }
.btn--primary:hover { background: var(--night); }
.btn--accent { background: var(--accent); color: var(--night); }
.btn--accent:hover { background: #fff; }
.btn--ghost { background: var(--mist); color: var(--ink); }
.btn--ghost:hover { background: var(--mist-2); }
.btn--small { min-height: 38px; padding: 6px 14px; font-size: var(--size-small); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--danger { background: var(--stop-soft); color: var(--stop); }

.field { display: grid; gap: 6px; }
.field__label { font-weight: 600; }
.input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 2px solid transparent; border-radius: var(--radius);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--mist-2);
}
textarea.input { resize: vertical; min-height: 96px; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: none; }

/* статусы: слово и значок, а не только цвет */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: var(--size-small); font-weight: 600; background: var(--mist); color: var(--ink); }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--ok { background: var(--ok-soft); color: var(--ok); }
.status--stop { background: var(--stop-soft); color: var(--stop); }
.status--urgent { background: var(--stop); color: #fff; }

/* ---------- кабинет ученика ---------- */

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 28px;
  padding: 20px 16px;
  background: var(--night); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; font-size: var(--size-small); line-height: 1.15; }
.brand img { width: 40px; height: auto; }
.nav { display: grid; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
  border-radius: var(--radius); color: var(--on-dark-2); text-decoration: none; font-weight: 600;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a[aria-current="page"] { background: var(--sky); color: #fff; }
.nav svg { width: 20px; height: 20px; flex: none; }
.sidebar__foot { margin-top: auto; display: grid; gap: 10px; font-size: var(--size-small); color: var(--on-dark-2); }
.sidebar__hello { color: #fff; font-weight: 600; font-size: var(--size-body); }
.quota { display: grid; gap: 4px; }
.quota b { color: #fff; font-weight: 600; }

.main { min-width: 0; padding: 24px clamp(16px, 3vw, 40px) 32px; display: flex; flex-direction: column; gap: 20px; }
.main__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--mist); border-radius: 12px; }
.tabs button {
  min-height: 40px; padding: 6px 16px; border: 0; border-radius: 9px; background: transparent;
  font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); }

/* чат */
.chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; height: calc(100vh - 128px); min-height: 420px; max-width: 860px; }
.chat__log { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 4px 4px 12px; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 680px; }
.msg__avatar { width: 36px; height: 40px; flex: none; }
.msg__bubble { padding: 10px 14px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--mist-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }
.msg--user .msg__bubble { background: var(--sky); color: #fff; box-shadow: none; }
.msg--blocked .msg__bubble { background: var(--stop-soft); color: var(--ink); box-shadow: none; }
.msg__note { display: block; margin-top: 4px; font-size: var(--size-small); color: var(--stop); font-weight: 600; }
.msg--user.msg--blocked .msg__bubble { background: var(--stop-soft); color: var(--ink); }
.thinking { display: inline-flex; gap: 4px; align-items: center; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: blink 1.2s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: .2s; }
.thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.composer textarea { min-height: 52px; max-height: 200px; resize: none; }
.composer__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: var(--size-small); color: var(--ink-2); }
.notice { padding: 10px 14px; border-radius: var(--radius); background: var(--mist); font-weight: 600; }
.notice--stop { background: var(--stop-soft); color: var(--stop); }

.empty { display: grid; justify-items: center; gap: 10px; padding: 32px 16px; text-align: center; color: var(--ink-2); }
.empty img { width: 96px; height: auto; }
.empty strong { color: var(--ink); font-size: var(--size-lead); }

/* картинки */
.draw { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.draw__form { position: sticky; top: 24px; display: grid; gap: 14px; padding: 20px; background: var(--card); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--mist-2); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; }
.examples button { padding: 6px 10px; border: 0; border-radius: 8px; background: var(--mist); font-size: var(--size-small); cursor: pointer; text-align: left; }
.examples button:hover { background: var(--mist-2); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { display: grid; gap: 8px; padding: 8px; background: var(--card); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--mist-2); }
.tile__img { aspect-ratio: 1; width: 100%; border-radius: 9px; object-fit: cover; background: var(--mist); }
.tile__prompt { font-size: var(--size-small); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__wait { aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 10px; padding: 16px; border-radius: 9px; background: var(--sky); color: #fff; text-align: center; font-weight: 600; }
.tile__wait img { width: 72px; }
.progress { width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s linear; }
.tile__error { aspect-ratio: 1; display: grid; place-items: center; padding: 16px; border-radius: 9px; background: var(--stop-soft); color: var(--stop); text-align: center; font-weight: 600; font-size: var(--size-small); }

/* персонаж */
.hero-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 28px; align-items: start; max-width: 1100px; }
.hero-form { display: grid; gap: 16px; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.pick button { padding: 0; border: 3px solid transparent; border-radius: 10px; background: none; cursor: pointer; }
.pick button[aria-pressed="true"] { border-color: var(--blue); }
.pick img { aspect-ratio: 1; width: 100%; border-radius: 7px; object-fit: cover; }
.card-preview { position: sticky; top: 24px; display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--sky); color: #fff; }
.card-preview__img { aspect-ratio: 1; width: 100%; border-radius: 10px; object-fit: cover; background: rgba(255, 255, 255, .1); }
.card-preview__name { font-size: var(--size-head); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.card-preview__text { color: var(--on-dark-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* показ персонажа на весь экран */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: var(--night); color: #fff; }
.overlay__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; width: min(1200px, 100%); }
.overlay__img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.overlay__name { font-size: clamp(40px, 6vw, 84px); font-weight: 600; letter-spacing: -.035em; line-height: 1; overflow-wrap: anywhere; }
.overlay__text { margin-top: 20px; font-size: clamp(18px, 1.8vw, 26px); color: var(--on-dark-2); white-space: pre-wrap; }
.overlay__close { position: absolute; top: 16px; right: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; padding: 12px 18px; border-radius: var(--radius); background: var(--night); color: #fff; font-weight: 600; }

@media (max-width: 1100px) {
  .draw, .hero-edit { grid-template-columns: minmax(0, 1fr); }
  .draw__form, .card-preview { position: static; }
}
@media (max-width: 800px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .nav { display: flex; flex-wrap: wrap; }
  .sidebar__foot { margin: 0; width: 100%; }
  .chat { height: auto; min-height: 0; }
  .chat__log { max-height: 60vh; }
  .overlay__inner { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .thinking i { animation: none; opacity: .6; }
  .progress i { transition: none; }
}

/* ---------- простые страницы: вход, ссылка не работает ---------- */

.plain { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--sky); }
.plain__card { width: min(520px, 100%); display: grid; gap: 14px; justify-items: start; padding: 32px; border-radius: 18px; background: var(--paper); }
.plain__robot { width: 96px; height: auto; }
.plain__note { color: var(--ink-2); font-size: var(--size-small); }
.plain__card--wide { width: min(640px, 100%); }
.plain__card > .form { justify-self: stretch; }

/* регистрация и вход */
.form { display: grid; gap: 16px; }
.form__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; align-items: start; }
.form__parents { display: grid; gap: 14px; margin: 0; padding: 16px; border: 0; border-radius: 14px; background: var(--mist); min-width: 0; }
.form__parents legend { float: left; width: 100%; padding: 0; font-weight: 600; }
.form__parents .input { box-shadow: none; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: var(--size-small); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--sky); }

/* ---------- админка ---------- */

.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.admin .main { gap: 24px; }
.panel { display: grid; gap: 14px; padding: 20px; background: var(--card); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--mist-2); min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; align-items: start; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--size-small); }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--mist); }
th { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.is-urgent td { background: var(--stop-soft); }
.links-out { width: 100%; min-height: 160px; font-size: var(--size-small); }
.kpis { display: flex; flex-wrap: wrap; gap: 12px; }
.kpi { padding: 12px 16px; border-radius: 12px; background: var(--mist); min-width: 160px; }
.kpi b { display: block; font-size: var(--size-head); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumbs figure { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }
.thumbs img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 8px; background: var(--mist); }
.convo { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; padding: 10px; border-radius: 10px; background: var(--paper); }
.convo p { white-space: pre-wrap; overflow-wrap: anywhere; }
.convo .who { font-weight: 600; }
.login { width: min(420px, 100%); margin: 12vh auto; }
@media (max-width: 800px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
}
.row--between { justify-content: space-between; }

/* ---------- уроки ---------- */

#view-lessons, #view-lesson { display: grid; gap: 20px; align-content: start; max-width: 980px; }
#view-lessons[hidden], #view-lesson[hidden] { display: none; }
.next-lesson { display: grid; gap: 8px; padding: 20px 22px; border-radius: 16px; background: var(--sky); color: #fff; }
.next-lesson__label { color: var(--accent); font-weight: 600; }
.next-lesson__title { font-size: var(--size-head); letter-spacing: -.02em; line-height: 1.15; }
.next-lesson__when { color: var(--on-dark-2); }
.next-lesson .row { margin-top: 6px; }
.next-lesson .btn--ghost { background: rgba(255, 255, 255, .12); color: #fff; }
.next-lesson .btn--ghost:hover { background: rgba(255, 255, 255, .2); }
.join-hint { color: inherit; opacity: .85; }

/* путь по сезону одной полосой: от персонажа до финала */
.season { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px; }
.season__step { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border-radius: 10px; background: var(--mist); }
.season__title { font-weight: 600; font-size: var(--size-small); }
.season__result { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.season__step.is-done { background: var(--mist-2); }
.season__step.is-current { background: var(--sky); color: #fff; }
.season__step.is-current .season__result { color: var(--on-dark-2); }

.lesson-group { display: grid; gap: 8px; }
.lesson-rows { display: grid; gap: 4px; }
.lesson-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: start;
  padding: 12px 16px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--mist-2);
  color: var(--ink); text-decoration: none;
}
.lesson-row:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.lesson-row__date { font-weight: 600; color: var(--blue); }
.lesson-row__main { display: grid; gap: 2px; }
.lesson-row__title { font-weight: 600; }
.lesson-row__summary { font-size: var(--size-small); color: var(--ink-2); }
.lesson-row__meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.back { font-weight: 600; text-decoration: none; }
.lesson { display: grid; gap: 22px; }
.lesson__head { display: grid; gap: 6px; }
.lesson__part { display: grid; gap: 12px; }
.panel-soft { padding: 14px 16px; border-radius: 12px; background: var(--mist); }
.prose { display: grid; gap: 12px; max-width: 70ch; }
.prose h3 { margin-top: 6px; font-size: var(--size-body); font-weight: 600; }
.prose ul { display: grid; gap: 6px; padding-left: 1.2em; list-style: disc; }
.assignment { padding: 18px 20px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 2px var(--blue); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--night); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 800px) {
  .lesson-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .lesson-row__meta { justify-content: flex-start; }
}

/* тексты уроков из Markdown */
.md { display: grid; gap: 12px; max-width: 72ch; min-width: 0; }
.md h1, .md h2, .md h3, .md h4 { margin-top: 6px; font-size: var(--size-body); font-weight: 700; }
.md ul, .md ol { display: grid; gap: 6px; padding-left: 1.3em; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md blockquote { margin: 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--paper); border-radius: 0 10px 10px 0; }
.md blockquote p + p { margin-top: 6px; }
.md img { border-radius: 12px; }
.md hr { width: 100%; border: 0; border-top: 1px solid var(--mist-2); }
.md code { padding: 1px 5px; border-radius: 6px; background: var(--mist); font-size: .95em; }
.md .table-wrap { max-width: 100%; }
.md table { border-collapse: collapse; font-size: var(--size-small); }
.md th, .md td { padding: 8px 10px; border: 1px solid var(--mist-2); text-align: left; vertical-align: top; }
.md th { background: var(--mist); font-weight: 600; }

/* шаблон запроса: что вставить в студию, части в скобках подсвечены */
.tpl { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--mist-2); }
.tpl pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tpl code { padding: 0; background: none; font-family: var(--font); font-size: var(--size-body); font-weight: 600; }
mark.slot { padding: 0 3px; border-radius: 5px; background: var(--accent); color: var(--night); box-shadow: inset 0 -2px 0 var(--blue); }
.tpl__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tpl__other { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 600; font-size: var(--size-small); text-decoration: underline; cursor: pointer; }

.mission { display: grid; gap: 10px; padding: 18px 20px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--mist-2); }
.mission--bonus { background: var(--mist); box-shadow: none; }
.mission__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.mission__head h3 { font-size: var(--size-lead); font-weight: 600; letter-spacing: -.01em; }
.mission__meta { font-size: var(--size-small); color: var(--ink-2); }
.track { margin-top: 8px; font-size: var(--size-lead); font-weight: 600; color: var(--blue); }

.illustrations { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.illustrations img { width: 100%; height: auto; border-radius: 14px; background: var(--mist); }
.illustrations figcaption { margin-top: 6px; font-size: var(--size-small); color: var(--ink-2); }

.assignment__label { font-size: var(--size-small); font-weight: 700; color: var(--blue); letter-spacing: .02em; }
.criteria { border-collapse: collapse; font-size: var(--size-small); }
.criteria th, .criteria td { padding: 6px 10px; border-bottom: 1px solid var(--mist-2); text-align: left; }
.criteria .num { text-align: right; }
.criteria__total td { font-weight: 700; border-bottom: 0; }

/* тест */
.quiz-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-radius: 16px; background: var(--sky); color: #fff; }
.quiz-card .muted, .quiz-card .assignment__label { color: var(--on-dark-2); }
.quiz-card .assignment__label { color: var(--accent); }
.quiz-card h2 { margin: 2px 0 4px; }
.quiz { display: grid; gap: 16px; max-width: 760px; }
.quiz__card { display: grid; gap: 16px; padding: 22px 24px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--mist-2); }
.quiz__q { font-size: 22px; line-height: 1.3; }
.quiz__opts { display: grid; gap: 8px; }
.quiz__opt { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 54px; padding: 10px 14px; border: 2px solid transparent; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--mist-2); text-align: left; font-weight: 500; cursor: pointer; }
.quiz__opt b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mist); font-weight: 700; }
.quiz__opt:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--blue); }
.quiz__opt:disabled { cursor: default; color: var(--ink); }
.quiz__opt.is-right { border-color: var(--ok); background: var(--ok-soft); }
.quiz__opt.is-right b { background: var(--ok); color: #fff; }
.quiz__opt.is-right span::after { content: '  ✓ верно'; color: var(--ok); font-weight: 700; }
.quiz__opt.is-wrong { border-color: var(--stop); background: var(--stop-soft); }
.quiz__opt.is-wrong b { background: var(--stop); color: #fff; }
.quiz__opt.is-wrong span::after { content: '  ✗ твой ответ'; color: var(--stop); font-weight: 700; }
.quiz__feedback { display: grid; gap: 4px; }
.quiz__feedback.is-right strong { color: var(--ok); }
.quiz__feedback.is-wrong strong { color: var(--stop); }
.quiz__score { font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--sky); }
.quiz__wrong { display: grid; gap: 12px; padding-left: 0; }
.quiz__wrong li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--paper); }
.back--button { justify-self: start; padding: 0; border: 0; background: none; color: var(--blue); cursor: pointer; }
.progress--light { background: var(--mist); }
.progress--light i { background: var(--blue); }
.theory__progress { display: grid; gap: 6px; }
.locked { padding: 12px 16px; border-radius: 12px; background: var(--mist); color: var(--ink-2); font-weight: 600; }
.slot-ask { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }

/* админка: урок глазами преподавателя */
.report { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--paper); font-family: var(--font); font-size: var(--size-small); white-space: pre-wrap; overflow-wrap: anywhere; }
.tabs--wrap { flex-wrap: wrap; }
.le-settings { display: grid; gap: 12px; }
.le-pane { display: grid; gap: 14px; min-width: 0; }
.md--wide { max-width: none; }
.md--map { font-size: var(--size-lead); }
.md--map table { font-size: var(--size-body); }
.quiz-key { display: grid; gap: 14px; list-style: none; padding: 0; }
.quiz-key ul { list-style: none; padding: 0; gap: 2px; }
.quiz-key .is-right { color: var(--ok); font-weight: 700; }
.preview { display: grid; gap: 12px; }
.preview__stage { padding: 18px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--mist-2); }
.grid-gap { display: grid; gap: 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.45; }
.md .quiz-key { list-style: none; padding: 0; }
#ls-body td:first-child { white-space: nowrap; }

/* ---------- согласие и политика: копии страниц сайта ---------- */

.legal { padding: 40px 16px 96px; }
.legal .wrap { max-width: 760px; margin: 0 auto; }
.legal h1 { margin-bottom: 28px; }
.legal h2 { margin: 32px 0 10px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 10px; }
.legal ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 6px; margin-top: 8px; }
.legal .draft { padding: 10px 14px; border-radius: var(--radius); background: var(--mist); color: var(--night); font-weight: 600; margin-bottom: 16px; }

.input--small { min-height: 38px; padding: 4px 10px; font-size: var(--size-small); width: auto; }
.form__parents .btn { justify-self: start; }
