/* Layout: как в классе ProgressMe (reference/progressme-skrin-11, 12a, 13): белая шапка 64px с вкладками,
   по центру слева узкая панель инструментов, белая карточка урока 720px, справа карточка 288px
   «Позвонить» + «Разделы». Цвета и размеры взяты из CSS образца (reference/progressme-*.html).
   Палитра светлая, как у оригинала: тёмной темы у ProgressMe нет. */
:root {
  --brand: #32cafc;          /* --exercise-brand */
  --brand-ui: #33ccff;       /* --prme-brand */
  --brand-tr: #ebfbff;       /* --exercise-brand-transparent */
  --green: #15d676;          /* --exercise-green */
  --green-ui: #16d977;
  --green-tr: #e6fcf1;
  --red: #fc657e;            /* --exercise-danger */
  --red-tr: #fff0f1;
  --red-blink: #ff4060;
  --wait: #fab700;           /* --exercise-waiting */
  --wait-tr: #fff7de;
  --base: #525266;           /* --tir-base, основной текст */
  --black: #39394d;          /* --exercise-black, текст упражнений */
  --s100: #8d8da6;           /* --tir-second-100 */
  --s75: #b8b8cc;
  --s50: #e9e9f2;
  --s25: #f5f5fa;
  --s0: #f7f9fc;
  --g100: #828299;           /* --exercise-gray-* */
  --g75: #acacbf;
  --g50: #e1e1ed;
  --g25: #f0f0f7;
  --g0: #f5f7fa;
  --white: #ffffff;
  --page: #f5f5fa;
  --shadow-pop: 0 0 16px 0 rgba(143, 143, 191, .2);
  --demo: #24243a;
  --f: "Ubuntu", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { background: var(--page); color: var(--base); font-family: var(--f); font-size: 16px; line-height: 1.5; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:focus-visible, [tabindex]:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
svg.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }

/* ---- полоса демо (только в демо-версии) ---- */
.demo { background: var(--demo); color: #e4e4f7; font-size: 13px; }
.demo-in { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-block: 7px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.demo b { font-weight: 500; letter-spacing: .03em; text-transform: uppercase; font-size: 12px; color: #9fe6ff; }
.seg { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 8px; padding: 2px; }
.seg button { padding: 3px 10px; border-radius: 6px; color: #e4e4f7; }
.seg button[aria-pressed="true"] { background: var(--brand-ui); color: #fff; }
.demo label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.demo .reset { border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 2px 10px; }
.demo .hint { opacity: .65; flex: 1 1 280px; min-width: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split > .app + .app { border-left: 4px solid var(--s50); }
.pane-label { background: var(--brand-tr); color: var(--brand); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 4px 16px; }
@media (max-width: 1280px) { .split { grid-template-columns: 1fr; } .split > .app + .app { border-left: 0; border-top: 4px solid var(--s50); } }

/* ---- шапка ---- */
.hdr { height: 64px; background: var(--white); box-shadow: 0 1px 0 var(--s50); position: relative; z-index: 20; }
.hdr-in { height: 100%; display: flex; align-items: center; gap: 16px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 18px; color: var(--base); margin-right: 56px; white-space: nowrap; }
.logo-mark { width: 26px; height: 26px; border-radius: 8px 8px 8px 2px; background: linear-gradient(135deg, var(--brand-ui), #3d7dff); }
.pill-btn { background: var(--s25); color: var(--base); font-weight: 500; font-size: 16px; padding: 4px 14px; border-radius: 8px; height: 32px; white-space: nowrap; }
.pill-btn:hover { background: var(--s50); }
.les-num { min-width: 32px; height: 32px; border-radius: 8px; background: var(--brand-tr); color: var(--brand); display: grid; place-items: center; font-size: 14px; font-weight: 500; padding: 0 6px; }
.tabs { display: flex; gap: 24px; height: 100%; margin-left: 16px; }
.tabs button { height: 100%; font-size: 18px; color: var(--s75); border-bottom: 2px solid transparent; padding-top: 2px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--base); border-bottom-color: var(--brand-ui); }
.tabs button:hover { color: var(--base); }
.hdr-r { margin-left: auto; display: flex; align-items: center; gap: 18px; color: var(--s75); }
.hdr-r .icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--s75); }
.hdr-r .icon-btn:hover { color: var(--s100); }
.hdr-r .exit { background: var(--s25); }
.who-btn { display: flex; align-items: center; gap: 6px; position: relative; color: var(--s75); }
.ava { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 500; flex: none; }
.ava.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
.ava.key { background: var(--green-tr); color: var(--green); }
.ava.all { background: var(--brand-tr); color: var(--brand); }
.who-menu { position: absolute; top: 44px; right: 0; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 8px 0; min-width: 240px; z-index: 40; color: var(--base); }
.who-menu .t { font-size: 12px; color: var(--s100); padding: 4px 16px 6px; }
.who-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 16px; text-align: left; font-size: 15px; }
.who-menu button:hover { background: var(--g0); }
.who-menu button[aria-current="true"] { color: var(--brand); }
.who-menu .sc { margin-left: auto; font-size: 13px; color: var(--s100); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .logo span:not(.logo-mark) { display: none; } .logo { margin-right: 4px; } .tabs { gap: 14px; margin-left: 4px; } .tabs button { font-size: 16px; }
  .hdr-in { gap: 10px; padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .pill-btn, .hdr-r .opt { display: none; } .hdr-r { gap: 8px; }
}

/* ---- три колонки ---- */
.page { display: grid; grid-template-columns: 48px minmax(0, 720px) 288px; gap: 16px; justify-content: center; align-items: start;
  padding-block: 16px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.split .page { grid-template-columns: minmax(0, 720px) 260px; }
.split .tools { display: none; }
@media (max-width: 1120px) { .page { grid-template-columns: minmax(0, 720px) 260px; } .tools { display: none; } }
@media (max-width: 860px) { .page, .split .page { grid-template-columns: minmax(0, 1fr); } .side { order: -1; } }
.tools { background: var(--white); border-radius: 16px; padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--s75); position: sticky; top: 16px; }
.tools span { display: grid; place-items: center; width: 32px; height: 28px; }
.card { background: var(--white); border-radius: 16px; min-width: 0; }
.main { padding: 24px 32px 32px; }
@media (max-width: 600px) { .main { padding: 16px 16px 24px; } }
.sec-title { font-size: 32px; font-weight: 500; line-height: 1.2; margin: 0; padding: 4px 0 22px; border-bottom: 1px solid var(--s25); text-wrap: balance; }
@media (max-width: 600px) { .sec-title { font-size: 26px; } }
.sec-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--s25); }
.btn { border-radius: 8px; padding: 6px 14px; font-weight: 500; font-size: 15px; background: var(--s25); color: var(--base); }
.btn:hover { background: var(--s50); }
.btn.brand { background: var(--brand-ui); color: #fff; }
.btn.brand:hover { background: #2eb8e6; }
.btn.green { background: var(--green-ui); color: #fff; }
.banner { margin-top: 16px; border-radius: 8px; background: var(--brand-tr); color: var(--brand); padding: 10px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 15px; }

/* правая карточка */
.side { padding: 16px; position: sticky; top: 16px; }
@media (max-width: 860px) { .side { position: static; } }
.call { border: 1px solid var(--s50); border-radius: 8px; padding: 20px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--s100); font-size: 14px; line-height: 20px; }
.call svg { color: var(--s100); }
.call a { background: var(--green-ui); color: #fff; font-weight: 500; text-decoration: none; padding: 3px 14px; border-radius: 6px; font-size: 15px; }
.side h3 { font-size: 18px; font-weight: 500; margin: 26px 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--s25); color: var(--base); }
.side-toggle { display: none; }
@media (max-width: 860px) {
  .side-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; font-weight: 500; font-size: 17px; padding: 4px 0; }
  .side .call { display: none; } .side h3 { display: none; } .side:not(.open) .side-body { display: none; } .side.open .side-body { margin-top: 10px; }
}
.secs { list-style: none; margin: 0 -16px; padding: 0; }
.secs button { width: 100%; display: flex; align-items: center; min-height: 32px; padding: 8px 12px 8px 48px; position: relative; color: var(--s75); text-align: left; line-height: 16px; font-size: 16px; }
.secs button:hover { color: var(--s100); }
.secs button[aria-current="true"] { color: var(--base); }
.secs button[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brand-ui); }
.secs .st { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; color: var(--s75); }
.secs button[aria-current="true"] .st { color: var(--brand-ui); }
.secs .pt { width: 4px; height: 4px; border-radius: 50%; background: var(--s50); }
.secs button[aria-current="true"] .pt { background: var(--brand-ui); transform: scale(2); }
.secs .faces { display: flex; gap: 2px; margin-left: auto; padding-left: 6px; }
.secs .add { color: var(--s75); }
.follow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--s100); margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--s25); }
.switch { width: 32px; height: 18px; border-radius: 9px; background: var(--s50); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.switch[aria-checked="true"] { background: var(--brand-ui); }
.switch[aria-checked="true"]::after { left: 16px; }
.hwlist { display: flex; align-items: center; gap: 12px; margin: 0 -16px; padding: 8px 16px; position: relative; }
.hwlist::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brand-ui); }
.hwlist .n { width: 40px; height: 40px; border-radius: 6px; background: var(--brand-tr); color: var(--brand); display: grid; place-items: center; font-weight: 500; flex: none; }
.hwlist small { display: block; color: var(--brand); font-size: 12px; line-height: 16px; }
.hwlist b { font-weight: 500; font-size: 15px; color: var(--base); }
.mini { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 4px; }
.mini td { padding: 6px 0; border-bottom: 1px solid var(--s25); font-variant-numeric: tabular-nums; }
.mini td:last-child { text-align: right; color: var(--s100); }
.mini .nm { display: flex; align-items: center; gap: 8px; }

/* ---- упражнение ---- */
.ex { position: relative; padding: 16px 0 16px 0; }
.ex + .ex::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--s25); }
.ex.cont::before { display: none; }
.ex.cont { padding-top: 0; }
.ex-h { display: flex; align-items: flex-start; margin-bottom: 16px; padding-right: 32px; }
.ex-num { min-height: 32px; display: flex; align-items: center; border-radius: 4px; background: var(--brand-tr); color: var(--brand); font-size: 16px; font-weight: 700; padding: 0 6px; margin-right: 8px; flex: none; line-height: 16px; font-variant-numeric: tabular-nums; }
.ex-t { font-size: 20px; font-weight: 500; line-height: 32px; word-break: break-word; color: var(--base); text-wrap: pretty; }
.ex-t:empty { display: none; }
.ex-more { position: absolute; top: 18px; right: -32px; width: 27px; height: 26px; border: 1px solid var(--g25); border-right: 0; border-radius: 10px 0 0 10px; background: var(--white); color: var(--s75); display: grid; place-items: center; padding-left: 3px; }
.ex-more:hover { color: var(--s100); }
@media (max-width: 600px) { .ex-more { right: -16px; } }
.ex-menu { position: absolute; top: 48px; right: -24px; z-index: 30; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 8px 0; min-width: 250px; }
.ex-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 16px; font-size: 15px; }
.ex-menu button svg { flex: none; color: var(--s100); }
.ex-menu button.off, .ex-menu button.off svg { color: var(--s75); cursor: default; }
.ex-menu button.off:hover { background: none; }
.ex-menu-sep { height: 1px; background: var(--s50); margin: 6px 0; }
.ex-menu button:hover { background: var(--g0); }
.ex-menu .soon { color: var(--s75); font-size: 13px; padding: 6px 16px 2px; line-height: 1.35; }
.txt { font-size: 18px; line-height: 1.3; color: var(--black); word-break: break-word; }
.txt p { margin: 0; min-height: 1.3em; }
.txt b { font-weight: 500; }

/* заметки (exercise-note-wrapper) */
.note { display: flex; gap: 8px; padding: 16px; border-radius: 8px; font-size: 18px; line-height: 1.3; }
.note.gray { color: var(--g100); background: var(--g0); }
.note.blue { color: var(--brand); background: var(--brand-tr); }
.note.green { color: var(--green); background: var(--green-tr); }
.note.yellow { color: var(--wait); background: var(--wait-tr); }
.note.red { color: var(--red); background: var(--red-tr); }
.note .ni { flex: none; margin-top: -1px; }
.note-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.note-name { font-weight: 500; line-height: 24px; }
.note-name:empty { display: none; }
.note-text p { margin: 0; min-height: 1.3em; }
.note-text b { font-weight: 500; }
.note-eye { flex: none; color: inherit; opacity: .9; }

/* статья (exercise-topic) */
.topic-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-right: 32px; }
.topic-h .ex-t { flex: 1; min-width: 0; }
.topic-notes { display: flex; align-items: center; gap: 8px; color: var(--s75); font-size: 18px; flex: none; }
.topic-text { font-size: 18px; line-height: 1.3; color: var(--black); }
.topic-text p { margin: 0; min-height: 1.3em; }
.topic-text b { font-weight: 500; }
.topic-text ul { margin: 0; padding-left: 0; list-style: none; }
.topic-text .sp-n { font-size: 13px; font-weight: 400; color: var(--s100); white-space: nowrap; }
/* разговорные задания: кто пришёл (видит учитель) */
.sp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 14px; padding: 8px 12px; border-radius: 12px; background: var(--s25); font-size: 14px; color: var(--s100); }
.sp-who { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.sp-chip { padding: 3px 12px; border-radius: 16px; border: 1px solid var(--s50); background: var(--white); color: var(--s100); font-size: 14px; line-height: 20px; }
.sp-chip.on { border-color: var(--brand-ui); background: var(--brand-tr); color: var(--base); }
.sp-hint { font-size: 13px; }
.sp-demo { display: inline-flex; align-items: center; gap: 4px; }
.sp-k { min-width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--s50); background: var(--white); color: var(--base); font-size: 14px; }
.sp-k.on { background: var(--brand-ui); border-color: var(--brand-ui); color: #fff; }
.sp-k:disabled { opacity: .4; cursor: default; }
.sp-book { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; white-space: nowrap; }
.mynotes { margin-top: 12px; }
.mynotes textarea { width: 100%; min-height: 70px; border: 2px solid var(--s50); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--black); resize: vertical; }

/* картинки */
.pic { width: 100%; border-radius: 8px; display: block; cursor: zoom-in; max-height: 520px; object-fit: contain; background: var(--white); }
.car-vp { overflow: hidden; border-radius: 8px; touch-action: pan-y; background: var(--g0); }
.car-track { display: flex; transition: transform .28s ease; }
.car-track img { flex: 0 0 100%; width: 100%; height: 420px; object-fit: contain; cursor: zoom-in; display: block; user-select: none; -webkit-user-drag: none; }
@media (max-width: 600px) { .car-track img { height: 260px; } }
.car-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; font-size: 15px; color: var(--s100); font-variant-numeric: tabular-nums; }
.car-nav button { width: 32px; height: 32px; border-radius: 50%; background: var(--s25); color: var(--base); display: grid; place-items: center; }
.car-nav button:hover { background: var(--s50); }
.car-nav button:disabled { opacity: .35; cursor: default; }
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(41, 41, 64, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lb img { max-width: 100%; max-height: calc(100% - 70px); object-fit: contain; border-radius: 8px; }
.lb .car-nav { color: #dcdcec; }
.lb .car-nav button { background: rgba(255,255,255,.15); color: #fff; }
.lb-x { position: absolute; top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }

/* аудиоплеер */
.player { border: 2px solid var(--s25); border-radius: 8px; padding: 12px 16px 16px; position: relative; }
.pl-top { display: flex; justify-content: flex-end; align-items: center; gap: 8px; color: var(--s100); font-size: 15px; font-variant-numeric: tabular-nums; }
.pl-top .tr { margin-right: auto; color: var(--s100); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pl-top button { color: var(--s75); display: grid; place-items: center; }
.pl-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.pl-row .play { color: var(--brand-ui); display: grid; place-items: center; }
.pl-row .vol { color: var(--s75); display: grid; place-items: center; }
.bar { flex: 1; height: 8px; border-radius: 4px; background: var(--s50); position: relative; cursor: pointer; touch-action: none; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--brand-ui); }
.pl-menu { position: absolute; top: 40px; right: 10px; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 8px 0; z-index: 25; min-width: 180px; }
.pl-menu button { display: flex; justify-content: space-between; width: 100%; padding: 7px 16px; font-size: 15px; }
.pl-menu button:hover { background: var(--g0); }
.pl-menu button[aria-pressed="true"] { color: var(--brand); }
.script { margin-top: 12px; font-size: 16px; line-height: 1.4; color: var(--black); background: var(--g0); border-radius: 8px; padding: 12px 16px; max-height: 300px; overflow: auto; }
.script p { margin: 0; }

/* точки попыток (exercise-indicators) */
.tries { display: inline-flex; flex-direction: column; gap: 2px; margin-left: 3px; vertical-align: middle; }
.tries i { width: 5px; height: 5px; border-radius: 50%; background: var(--g50); display: block; }
.tries i.r { background: var(--red); } .tries i.g { background: var(--green); } .tries i.w { background: var(--wait); }
.gapw { display: inline-flex; align-items: center; vertical-align: middle; margin: 2px 3px; position: relative; }

/* выпадающий список в строке (select-correct-form-word) */
.sel-lines { font-size: 18px; line-height: 40px; color: var(--black); }
.sel-lines .ln { min-height: 1em; }
.dd { min-width: 58px; min-height: 32px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--g50); border-radius: 6px; background: var(--white);
  color: var(--black); line-height: 28px; font-size: 18px; position: relative; }
.dd .chev { color: var(--g50); width: 16px; height: 16px; }
.dd:hover:not(:disabled) { border-color: var(--g75); }
.dd.open .chev { transform: rotate(180deg); }
.dd.ok { border-color: var(--green); cursor: default; }
.dd.rev { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; cursor: default; }
.dd.key { border-color: var(--green); background: var(--green-tr); }
.blink { animation: blink .8s; }
@keyframes blink { 0%, 20% { border-color: var(--red-blink); } 40%, 60% { border-color: var(--g50); } 80% { border-color: var(--red-blink); } 100% { border-color: var(--g50); } }
.dd-pop { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 35; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 8px 0;
  font-size: 16px; line-height: 1.44; min-width: 110px; max-width: min(320px, 80vw); text-align: left; }
.dd-pop::before { content: ""; position: absolute; top: -7px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--white); }
.dd-pop button { display: block; width: 100%; text-align: left; padding: 0 12px; line-height: 38px; min-height: 40px; white-space: normal; }
.dd-pop button:hover { background: var(--g0); }
.tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--green-tr); color: var(--black); font-size: 14px; line-height: 1.3; padding: 4px 8px; border-radius: 8px; white-space: nowrap; box-shadow: var(--shadow-pop); z-index: 5; pointer-events: none; }

/* слова: банк и пропуски (word-block) */
.bank { background: var(--s25); border-radius: 8px; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wb { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 6px; border: 2px solid var(--s50); min-height: 32px; font-size: 18px; line-height: 1.25; background: var(--white); color: var(--black); text-align: left; word-break: break-word; }
.wb.src { cursor: grab; touch-action: none; user-select: none; }
.wb.src:hover { border-color: var(--g75); }
.wb.src .h { font-size: 12px; opacity: .5; margin-right: 6px; letter-spacing: -1px; }
.wb.src.used { border-color: var(--white); color: var(--g50); cursor: default; background: var(--white); }
.wb.src.sel, .wb.dragging { border-color: var(--brand-ui); box-shadow: 0 0 8px 0 rgba(51, 204, 255, .5); }
.wb.gap { min-width: 96px; justify-content: center; position: relative; }
.wb.gap.empty::after { content: ""; position: absolute; inset: 2px; background: var(--s25); border-radius: 3px; }
.wb.gap.ok { border-color: var(--green); }
.wb.gap.rev { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; cursor: default; }
.wb.gap.over { border-color: var(--brand); }
.wb.gap.key { border-color: var(--green); background: var(--green-tr); }
.drag-lines { font-size: 18px; line-height: 40px; color: var(--black); }
.drag-ghost { position: fixed; z-index: 300; pointer-events: none; opacity: .95; }

/* сопоставление картинка - слово (MappingImageByDrag) */
.mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mcard img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; display: block; cursor: zoom-in; }
.mslot { display: flex; align-items: center; margin-top: 16px; }
.mslot .wb { flex: 1; min-width: 0; justify-content: center; font-size: 16px; }

/* тест (exercise-test) */
.test { border: 2px solid var(--s25); border-radius: 8px; padding: 21px 32px 24px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 600px) { .test { padding: 16px; } }
.test .q { font-size: 18px; color: var(--black); margin-bottom: 10px; }
.test .opts { display: flex; flex-direction: column; gap: 12px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; line-height: 24px; color: var(--base); text-align: left; }
.chk .box { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--s50); display: grid; place-items: center; flex: none; color: var(--brand-ui); background: var(--white); }
.chk .box svg { width: 16px; height: 16px; opacity: 0; }
.chk:hover:not(:disabled) .box { border-color: var(--s75); }
.chk.on .box svg { opacity: 1; }
.chk.ok .box { border-color: var(--green); background: var(--green-tr); color: var(--green); }
.chk.rev .box { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; }  /* ответ показан после трёх ошибок */
.chk.key .box { background: var(--green-tr); border-color: var(--green-tr); }
.chk:disabled { cursor: default; }
.qdiv { height: 1px; background: var(--s25); }

/* правда или ложь */
.tf { display: flex; flex-direction: column; gap: 14px; font-size: 18px; color: var(--black); line-height: 1.3; }
.tf-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tf-row > span { flex: 1 1 260px; min-width: 0; }
.tf-row .bt { display: flex; gap: 8px; align-items: center; }
.tf-row .wb { justify-content: center; min-width: 74px; font-size: 16px; cursor: pointer; }
.tf-row .wb:hover:not(:disabled) { border-color: var(--g75); }
.tf-row .wb.ok { border-color: var(--green); cursor: default; }
.tf-row .wb.rev { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; cursor: default; }
.tf-row .wb.key { border-color: var(--green); background: var(--green-tr); }

/* разделитель */
.divline { height: 1px; background: var(--s50); margin: 4px 0; }

/* ответы группы под упражнением (вид учителя) */
.stat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; font-size: 13px; color: var(--s100); }
.stat button { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 8px; color: var(--base); }
.stat button:hover { background: var(--s25); }
.stat button[aria-pressed="true"] { background: var(--brand-tr); }
.stat .sc { font-variant-numeric: tabular-nums; color: var(--s100); }
.stat .sc.ok { color: var(--green); } .stat .sc.bad { color: var(--red); }
.stat .live { animation: pulse 1s ease; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(51,204,255,.6); } 100% { box-shadow: 0 0 0 8px rgba(51,204,255,0); } }
.viewing { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--brand); background: var(--brand-tr); border-radius: 6px; padding: 2px 8px 2px 2px; margin-bottom: 10px; }

/* домашняя работа */
.hw-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 32px 0 8px; }
@media (max-width: 600px) { .hw-btns { grid-template-columns: 1fr; } }
.hw-btns button { border: 1px solid var(--s50); border-radius: 8px; padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--s100); font-weight: 500; font-size: 16px; }
.hw-btns button:hover { background: var(--s0); }
.picker { border: 1px solid var(--s50); border-radius: 8px; padding: 8px 0; margin-top: 8px; }
.picker .ph { font-size: 13px; color: var(--s100); padding: 4px 16px 8px; }
.picker button { width: 100%; padding: 6px 16px; }
.picker button:hover { background: var(--g0); }
.essay textarea { width: 100%; min-height: 120px; border: 2px solid var(--s50); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 18px; line-height: 1.3; color: var(--black); resize: vertical; }
.essay textarea:focus { outline: none; border-color: var(--brand-ui); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; border-radius: 6px; padding: 2px 10px; }
.status.w { color: var(--wait); background: var(--wait-tr); }
.status.ok { color: var(--green); background: var(--green-tr); }
.status.redo { color: var(--red); background: var(--red-tr); }
.ydot { width: 8px; height: 8px; border-radius: 50%; background: var(--wait); display: inline-block; flex: none; }
.sub { border: 2px solid var(--s25); border-radius: 8px; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.sub + .sub { margin-top: 10px; }
.sub .who { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sub .ans { font-size: 18px; line-height: 1.3; color: var(--black); }
.sub textarea { min-height: 54px; font-size: 15px; }
.cm { margin-top: 12px; }
.muted { color: var(--s100); }
.toast { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 250; background: var(--base); color: #fff; padding: 12px 16px; border-radius: 8px; font-size: 15px; max-width: calc(100% - 32px); box-shadow: var(--shadow-pop); }
.mslot .gapw { flex: 1; display: flex; margin: 0; min-width: 0; }
.mslot .gapw .wb { flex: 1; }
.dd svg { color: var(--g75); }
@media (max-width: 1120px) { .page > .tools { display: none; } }

/* ======== этап 1: кабинет, формы, новые типы ======== */
.demo .seg { flex-wrap: wrap; }
a { color: inherit; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--s75); }
.icon-btn:hover { color: var(--s100); background: var(--s25); }
.logo { text-decoration: none; }
.who-open { display: flex; align-items: center; gap: 6px; color: var(--s75); }
.who-name { color: var(--base); font-size: 15px; }
.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.btn.ghost { background: transparent; }
.btn.yellow { background: var(--wait); color: #fff; }
.btn.danger { background: var(--red-tr); color: var(--red); }
.nm { display: inline-flex; align-items: center; gap: 8px; }

/* кабинет: меню-рельс слева и белая карточка */
.cab { display: grid; grid-template-columns: 64px minmax(0, 1040px); gap: 16px; justify-content: center; align-items: start;
  padding-block: 16px 48px; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.rail { background: var(--white); align-self: stretch; min-height: calc(100vh - 64px); display: flex; flex-direction: column; gap: 4px; padding: 12px 0; position: sticky; top: 0; border-radius: 0 16px 16px 0; }
.rail a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; color: var(--s75); text-decoration: none; font-size: 10px; position: relative; }
.rail a span { line-height: 1.1; text-align: center; }
.rail a.on { color: var(--brand); }
.rail a.on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: var(--brand-ui); border-radius: 0 3px 3px 0; }
.rail a:hover { color: var(--s100); }
.cab-main { padding: 28px 32px 40px; min-width: 0; }
.cab-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cab-h h1 { font-size: 32px; font-weight: 500; margin: 0; text-wrap: balance; }
@media (max-width: 760px) {
  .cab { grid-template-columns: minmax(0, 1fr); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-bottom: 88px; }
  .rail { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto; min-height: 0; flex-direction: row; justify-content: space-around; border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 12px rgba(82, 82, 102, .1); padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .rail { overflow-x: auto; }
  .rail a { flex: 1 0 58px; padding: 6px 0; }
  .rail a.on::before { left: 20%; right: 20%; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .cab-main { padding: 20px 16px 28px; }
  .cab-h h1 { font-size: 26px; }
}
.alert-y { display: flex; align-items: center; gap: 10px; background: var(--wait-tr); color: var(--wait); border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; font-weight: 500; flex-wrap: wrap; }
.alert-y span { flex: 1; min-width: 200px; }
.search { width: 100%; border: 1px solid var(--s50); border-radius: 8px; padding: 9px 12px; font: inherit; color: var(--base); }
.search:focus { outline: none; border-color: var(--brand-ui); }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.fchip { border: 1px solid var(--s25); border-radius: 999px; padding: 3px 12px; color: var(--s75); font-weight: 500; font-size: 15px; }
.fchip.on { background: var(--s75); color: #fff; border-color: var(--s75); }
.count { color: var(--s75); font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.count::after { content: ""; flex: 1; border-top: 1px dashed var(--s50); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 20px; }
.tile-new { aspect-ratio: 1; border: 1px solid var(--s50); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--brand); font-weight: 500; font-size: 18px; }
.tile-new:hover { background: var(--s0); }
.tile-sq { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: 44px; font-weight: 500; text-decoration: none; position: relative; }
.tile-lang { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 500; background: rgba(255,255,255,.75); border-radius: 6px; padding: 1px 6px; color: var(--s100); }
.tile-b { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-top: 10px; }
.tile-t { font-weight: 500; font-size: 16px; line-height: 1.25; text-decoration: none; color: var(--base); min-width: 0; overflow-wrap: anywhere; }
.tile-m { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 6px; font-size: 13px; }
.tile-faces { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--s50); border-radius: 6px; padding: 0 6px; font-size: 12px; color: var(--s100); white-space: nowrap; }
.badge.warn { border-color: var(--wait-tr); background: var(--wait-tr); color: var(--wait); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row-card { display: flex; align-items: center; gap: 12px; border: 2px solid var(--s25); border-radius: 8px; padding: 10px 14px; text-decoration: none; flex-wrap: wrap; }
.row-card:hover { border-color: var(--s50); }
.rc-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.book { display: flex; gap: 14px; align-items: center; border: 2px solid var(--s25); border-radius: 12px; padding: 12px; text-decoration: none; }
.book:hover { border-color: var(--s50); }
.book-cover { width: 64px; height: 84px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.book-b { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.module { margin-top: 26px; }
.module h2 { font-size: 18px; font-weight: 500; margin: 0 0 10px; color: var(--s100); }
.module.archived { opacity: .7; }
.lessons { display: flex; flex-direction: column; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--s25); text-decoration: none; color: var(--base); }
.lesson-row:hover { background: var(--s0); }
.lesson-row .n, .lesson-pick .n { width: 32px; height: 32px; border-radius: 6px; background: var(--brand-tr); color: var(--brand); display: grid; place-items: center; font-size: 14px; font-weight: 500; flex: none; }
.lesson-row .lt { flex: 1; min-width: 0; }
.lesson-pick { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; }
.lesson-pick h3 { font-size: 14px; color: var(--s100); font-weight: 500; margin: 12px 0 4px; }
.lesson-pick .lp { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; text-align: left; width: 100%; }
.lesson-pick .lp:hover { background: var(--s25); }
.lesson-pick .lp.cur { background: var(--brand-tr); }
.preview .row { margin-bottom: 12px; }
.sec-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 18px; }
.sec-tabs button { border: 1px solid var(--s50); border-radius: 8px; padding: 4px 12px; color: var(--s100); font-size: 15px; }
.sec-tabs button.on { background: var(--brand-tr); border-color: var(--brand-tr); color: var(--brand); }
.preview .ex { padding-right: 0; }
.ex.focus { outline: 2px solid var(--wait); outline-offset: 6px; border-radius: 6px; }
.blk-id { font-size: 12px; color: var(--s75); margin-top: 10px; }
.review-flag { display: flex; align-items: center; gap: 6px; margin-top: 10px; background: var(--wait-tr); color: #a87a00; border-radius: 6px; padding: 6px 10px; font-size: 14px; }
.help h2 { font-size: 20px; font-weight: 500; margin: 26px 0 10px; }
.help ol { padding-left: 22px; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.memo { white-space: pre-wrap; font-family: var(--f); background: var(--s0); border-radius: 8px; padding: 16px; font-size: 15px; line-height: 1.5; margin: 0 0 12px; }
.copybox { width: min(560px, 80vw); min-height: 120px; font: inherit; }
.err { max-width: 560px; margin: 40px auto; padding: 32px; }
.login-wrap { min-height: 80vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(380px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.login h1 { font-size: 24px; font-weight: 500; margin: 8px 0; }
.login input { border: 2px solid var(--s50); border-radius: 8px; padding: 10px 12px; font: inherit; }
.login .btn { justify-content: center; padding: 10px; font-size: 16px; }

/* модальное окно и формы */
.modal-wrap { position: fixed; inset: 0; z-index: 180; background: rgba(41, 41, 64, .45); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--white); border-radius: 16px; width: min(600px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(41,41,64,.25); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.modal-h h2 { margin: 0; font-size: 22px; font-weight: 500; }
.modal-b { padding: 8px 20px 12px; overflow: auto; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 18px; border-top: 1px solid var(--s25); flex-wrap: wrap; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--s100); }
.field input, .field select, .row input[type="text"] { border: 2px solid var(--s50); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 16px; color: var(--base); background: var(--white); min-width: 0; }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand-ui); }
.field small { color: var(--s75); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.st-pick { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; padding: 4px 0; }
.st-pick .chk { gap: 10px; }
.row input[type="text"] { flex: 1; }

/* ввод с клавиатуры */
.inp { font: inherit; font-size: 18px; color: var(--black); border: 2px solid var(--g50); border-radius: 6px; padding: 0 6px; min-height: 32px; background: var(--white); max-width: 100%; vertical-align: middle; }
.inp:focus { outline: none; border-color: var(--brand-ui); }
.inp::placeholder { color: var(--g75); }
.inp.ok { border-color: var(--green); }
.inp.rev { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; cursor: default; }
.inp.key { border-color: var(--green); background: var(--green-tr); }
.inp.free { border-style: dashed; }
.inp.wide { width: 100%; }
.mslot .gapw .inp { flex: 1; }

/* сопоставление в два столбца */
.mtext { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr); gap: 6px; align-items: stretch; }
.mbox { border: 2px solid var(--g50); border-radius: 6px; padding: 8px; font-size: 18px; line-height: 1.4; color: var(--black); background: var(--white); text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; word-break: break-word; }
.mbox img { max-width: 100%; max-height: 120px; border-radius: 4px; }
button.mbox:hover:not(:disabled) { border-color: var(--g75); }
.mbox.active { border-color: var(--brand); }
.mbox.ok { border-color: var(--green); }
.mbox.rev { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; cursor: default; }
.mbox.key { border-color: var(--green); background: var(--green-tr); }
.mrow .tries { align-self: center; justify-self: center; }

/* колонки */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.col { border: 2px solid var(--s50); border-radius: 8px; padding: 12px; min-height: 120px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.col.over { border-color: var(--brand); }
.col-t { width: 100%; text-align: center; font-size: 18px; font-weight: 500; color: var(--base); margin-bottom: 4px; }
.col-empty { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--s75); font-size: 15px; padding: 8px 0; }
.hint-row { font-size: 13px; color: var(--s100); margin-top: 10px; }
.wb.ok { border-color: var(--green); }
.wb.rev { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; cursor: default; }
.wb.key { border-color: var(--green); background: var(--green-tr); }

/* сборка из частей */
.asm-list { display: flex; flex-direction: column; gap: 18px; }
.asm-row { display: flex; gap: 10px; align-items: flex-start; }
.asm-n { font-size: 18px; color: var(--black); min-width: 24px; padding-top: 4px; }
.asm-item { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: flex-start; }
.asm { flex: 1; min-width: 0; }
.asm .bank { margin-bottom: 8px; padding: 10px; }
.asm-line { min-height: 44px; border: 2px dashed var(--g50); border-radius: 8px; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 18px; color: var(--black); }
.asm.vertical .asm-line { flex-direction: column; align-items: stretch; }
.asm-line.done { border-style: solid; padding: 8px 10px; display: block; }
.asm-line.ok { border-color: var(--green); }
.asm-line.rev { border-color: var(--wait); background: var(--wait-tr); color: #8a6500; cursor: default; }
.asm-line.key { border-color: var(--green); background: var(--green-tr); }
.asm-line .wb { cursor: pointer; }
.asm-item > .tries { margin-top: 12px; }
.odd { display: flex; flex-direction: column; gap: 12px; }
.odd-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.odd-row .wb { cursor: pointer; }

/* набор слов */
.words { display: flex; flex-direction: column; }
.word-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--s25); font-size: 18px; color: var(--black); flex-wrap: wrap; }
.word-row .say { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-tr); color: var(--brand); display: grid; place-items: center; flex: none; }
.word-row .w { font-weight: 500; }
.word-row .ipa { color: var(--s100); font-size: 16px; }
.word-row .tr { color: var(--s100); margin-left: auto; }

/* ссылки, видео, подписи, доска */
.links { display: flex; flex-direction: column; gap: 8px; }
.linkcard { display: flex; align-items: center; gap: 12px; border: 2px solid var(--s25); border-radius: 8px; padding: 12px 14px; text-decoration: none; color: var(--base); }
.linkcard:hover { border-color: var(--brand-ui); }
.lc-i { width: 40px; height: 40px; border-radius: 8px; background: var(--brand-tr); color: var(--brand); display: grid; place-items: center; flex: none; }
.lc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.lc-t b { font-weight: 500; }
.lc-t small { color: var(--s100); }
.fig { margin: 0; }
.fig figcaption, .car-cap { text-align: center; color: var(--s100); font-size: 15px; margin-top: 6px; }
.car-cap:empty { display: none; }
.board-wrap { display: flex; flex-direction: column; gap: 8px; }
.board { width: 100%; aspect-ratio: 16 / 9; border: 2px solid var(--s25); border-radius: 8px; touch-action: none; background: var(--white); cursor: crosshair; }
.rec { gap: 8px; }
.essay audio { width: 100%; margin-top: 6px; }
.hwlist { width: 100%; text-align: left; }
.hwlist:not(.cur)::before { display: none; }
.hw-t { flex: 1; min-width: 0; }
.dd.chosen { border-color: var(--brand-ui); }
.topic-title { display: flex; align-items: flex-start; min-width: 0; flex: 1; }
@media (max-width: 600px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .tile-sq { font-size: 34px; }
  .tile-new { font-size: 15px; }
  .topic-h { flex-wrap: wrap; }
  .topic-notes { font-size: 15px; }
}
@media (max-width: 440px) {
  .les-num { display: none; }
  .tabs { gap: 12px; min-width: 0; margin-left: 0; }
  .tabs button { font-size: 15px; }
  .hdr-r { gap: 6px; }
}

/* ---------- указка (как pointer-target в ProgressMe) ---------- */
.tools .tool-btn { display: grid; place-items: center; width: 32px; height: 28px; color: var(--s75); border-radius: 6px; }
.tools .tool-btn:hover { color: var(--s100); }
.tools .tool-btn.on { color: var(--brand); }
.point-bar { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; padding: 6px 8px 6px 12px; background: var(--white); color: var(--base); font-size: 14px; line-height: 20px; border: 1px solid var(--s50); border-radius: 12px; box-shadow: 0 0 16px 0 rgba(153, 153, 191, .102); }
.point-bar > span { flex: 1; }
@media (max-width: 600px) { .point-bar .wide-only { display: none; } }
.point-bar svg { color: #ff40ff; flex: none; }
.main.pointing .ex { cursor: pointer; }
.main.pointing .ex > * { pointer-events: none; }
.main.pointing .ex::after { content: ""; position: absolute; inset: 4px -8px; border: 1px dashed rgba(255, 64, 255, .502); border-radius: 8px; pointer-events: none; z-index: 6; transition: background-color .2s ease, border .2s ease; }
@media (hover: hover) { .main.pointing .ex:hover::after { border: 2px solid rgba(255, 64, 255, .502); background-color: rgba(255, 64, 255, .1); } }
.main .ex { scroll-margin-top: 24px; }
.pt-blink { position: absolute; inset: 4px -8px; border: 2px solid rgba(255, 64, 255, .502); background-color: rgba(255, 64, 255, .1); border-radius: 8px; pointer-events: none; z-index: 7; animation: pt-flicker .8s ease-in-out 3 forwards; }
@keyframes pt-flicker { 0% { opacity: 0; } 50% { opacity: 1; } to { opacity: 0; } }
.narrow-only { display: none; }
.phone-only { display: none; }
.lesson-btn { width: 100%; margin-top: 12px; justify-content: center; }
@media (max-width: 1120px) { .narrow-only { display: flex; } }
@media (max-width: 900px) { .phone-only { display: flex; } }
@media (max-width: 600px) { .main.pointing .ex::after, .pt-blink { inset: 4px -4px; } }

/* ---------- подсказка правильного ответа учителю ---------- */
.has-tip { position: relative; }
.has-tip > .tip { display: none; white-space: normal; width: max-content; max-width: 240px; text-align: center; font-weight: 400; }
@media (hover: hover) { .has-tip:hover > .tip { display: block; } }
.has-tip.tip-on > .tip { display: block; }

/* ---------- статус ученика: точка на аватаре ---------- */
.ava-wrap { position: relative; display: inline-flex; flex: none; }
.st-dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--white); background: var(--s50); }
.st-dot.in { background: var(--green); }
.st-dot.away { background: var(--wait); }
.hdr-faces { display: flex; gap: 4px; align-items: center; margin-right: 4px; }
.face-btn { border-radius: 50%; padding: 2px; }
.face-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); }
@media (max-width: 760px) { .hdr-faces { display: none; } }

/* ---------- «За мной» ---------- */
.follow-slot:empty { display: none; }
.follow-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--brand-tr); color: var(--base); border-radius: 8px; padding: 8px 8px 8px 12px; margin-bottom: 16px; font-size: 15px; }
.follow-bar .fb-faces { display: flex; gap: 2px; }
.follow-bar .fb-t { flex: 1; min-width: 140px; }
.follow-bar .btn { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- уведомления ---------- */
.bell-wrap { position: relative; }
.icon-btn.bell { position: relative; color: var(--s100); }
.bell-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; font-weight: 700; text-align: center; }
.bell-pop { position: absolute; right: 0; top: 46px; width: 340px; max-width: calc(100vw - 32px); background: var(--white); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 12px; z-index: 60; }
.bell-pop .bell-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bell-pop ul { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
.bell-pop li a { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 8px; color: var(--black); text-decoration: none; font-size: 15px; line-height: 1.3; }
.bell-pop li a:hover { background: var(--g0); }
.bell-pop li.new a { background: var(--brand-tr); }
.bell-pop p { margin: 8px 0; }
@media (max-width: 600px) { .bell-pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; max-width: none; } }
.link-btn { color: var(--brand); font: inherit; font-size: 14px; padding: 0; background: none; text-align: left; cursor: pointer; }
.hw-pending { flex-direction: column; align-items: flex-start; }
.hw-pending .hp-h { display: flex; align-items: center; gap: 8px; }
.hw-pending ul { margin: 0; padding-left: 28px; color: var(--black); font-weight: 400; }
.hw-pending a { color: var(--black); font-weight: 500; }

/* ---------- завершённые разделы и урок ---------- */
.sec-foot { display: block; }
.sec-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-done { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.btn.done { border-color: var(--green); color: var(--green); background: var(--green-tr); display: inline-flex; align-items: center; gap: 6px; }
.btn.redo { border-color: var(--red); color: var(--red); background: var(--red-tr); }
.les-num.done { background: var(--green-tr); color: var(--green); }
.lp .lp-done { margin-left: auto; color: var(--green); display: inline-flex; }

/* ---------- скрытые упражнения и «Дополнительно» ---------- */
.ex.is-hidden > :not(.hid-badge):not(.ex-more):not(.ex-menu):not(.stat):not(.pt-blink) { opacity: .45; }
.hid-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--s100); background: var(--g0); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; }
.extra-li .st { color: var(--brand); }
.extra-hint { margin: 8px 0 0; }

/* ---------- история ответов и «неверно» от учителя ---------- */
.tries.hist { cursor: pointer; border-radius: 6px; padding: 4px 3px; }
.tries.hist:hover { background: var(--g0); }
.tries.hist.ov { box-shadow: inset 0 0 0 1px var(--s50); }
.dd.bad, .inp.bad, .wb.bad, .wb.gap.bad, .mbox.bad, .asm-line.bad, .tf-row .wb.bad { border-color: var(--red); background: var(--red-tr); color: var(--black); cursor: default; }
.chk.bad .box { border-color: var(--red); background: var(--red-tr); color: var(--red); }
.hist { display: flex; flex-direction: column; gap: 16px; }
.hist-item { border-bottom: 1px solid var(--s25); padding-bottom: 14px; }
.hist-t { font-weight: 500; color: var(--black); margin-bottom: 6px; }
.hist-list { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: h; }
.hist-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; counter-increment: h; }
.hist-list li::before { content: counter(h) "."; color: var(--s100); width: 18px; }
.hist-list .hd { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hist-list li.g .hd { background: var(--green); } .hist-list li.r .hd { background: var(--red); }
.hist-v { font-size: 14px; color: var(--s100); margin-bottom: 8px; }
.hist-v.ok { color: var(--green); } .hist-v.bad { color: var(--red); }
.hist-btns, .hist-fix { gap: 8px; flex-wrap: wrap; }
.hist-fix { margin-top: 8px; }
.hist-fix .inp { flex: 1; min-width: 160px; }
.hist-cm textarea { width: 100%; min-height: 80px; box-sizing: border-box; border: 2px solid var(--s50); border-radius: 8px; padding: 8px; font: inherit; margin-bottom: 8px; }

/* ---------- статусы домашней работы ---------- */
.hw-st { display: inline-block; font-size: 13px; line-height: 20px; padding: 1px 8px; border-radius: 6px; background: var(--g0); color: var(--s100); white-space: nowrap; }
.hw-st.sent { background: var(--wait-tr); color: #a87a00; }
.hw-st.done { background: var(--green-tr); color: var(--green); }
.hw-st.redo { background: var(--red-tr); color: var(--red); }
.hw-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.hw-status p { flex-basis: 100%; margin: 0; }
.hw-mark { display: inline-block; margin-top: 10px; font-size: 14px; padding: 2px 10px; border-radius: 6px; }
.hw-mark.done { background: var(--green-tr); color: var(--green); }
.hw-mark.redo { background: var(--red-tr); color: var(--red); }
.hw-mark-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hw-banner { flex-wrap: wrap; gap: 8px; }
.hw-banner .nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hw-banner .hw-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-table tr.cur td { background: var(--brand-tr); }
.hw-table td { vertical-align: middle; }
.hw-table .chk { gap: 0; }
.hw-table .nm { display: inline-flex; align-items: center; gap: 6px; color: var(--black); }
.hw-mass { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; font-size: 14px; }

/* ---------- аудио: скорости и режим ---------- */
.pl-menu { min-width: 250px; }
.pl-menu .pl-h { font-size: 13px; color: var(--s100); padding: 6px 16px 2px; }
.pl-menu .speeds { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 12px 8px; }
.pl-menu .speeds button { width: auto; padding: 4px 8px; border: 1px solid var(--s50); border-radius: 6px; font-size: 14px; }
.pl-menu .speeds button[aria-pressed="true"] { background: var(--brand-tr); border-color: var(--brand); }
.pl-menu .speeds.mode button { flex: 1; justify-content: center; }
.pl-sync { font-size: 14px; color: var(--brand); margin-top: 6px; }
.pl-sync.ask { color: #a87a00; }

/* сопоставление без ключа: слова к картинкам и пары в две колонки */
.bank.static { margin-bottom: 12px; }
.bank.static .wb { cursor: default; }
.txt table.pairs { border-collapse: collapse; width: 100%; }
.txt table.pairs td { padding: 6px 8px; border-bottom: 1px solid var(--s25); vertical-align: top; width: 50%; }

/* длинные названия разделов и уведомления не шире экрана телефона */
.sec-nav .btn { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.toast { max-width: calc(100vw - 32px); box-sizing: border-box; white-space: normal; }

/* текст упражнения: таблица и картинка внутри строк (меню «/» редактора) */
.ln-tw { overflow-x: auto; margin: 6px 0; }
.ln-table { border-collapse: collapse; }
.ln-table td { border: 1px solid var(--s50); padding: 6px 10px; vertical-align: middle; }
.ln-img img { max-width: min(100%, 420px); border-radius: 8px; cursor: zoom-in; display: block; margin: 6px 0; }

/* ---------- редактор материалов ---------- */
.grow { flex: 1 1 auto; }
.ed-top { flex-wrap: wrap; gap: 8px; }
.ed-banner { background: var(--brand-ui); color: #fff; text-align: center; font-weight: 500; font-size: 15px; border-radius: 8px; padding: 8px 16px; margin: 12px 0 16px; }
.preview.editor .page { margin-top: 0; }
.ed-page .main { min-width: 0; }
.ed-pen { width: 32px; height: 32px; display: inline-grid; place-items: center; color: var(--s75); vertical-align: middle; margin-left: 4px; }
.ed-pen:hover { color: var(--s100); }
.ed-ex { padding-right: 4px; }
.ed-tools-b { position: absolute; top: 14px; right: 0; display: flex; gap: 4px; }
.ed-tools-b .ex-more { position: static; border: 1px solid var(--g25); border-radius: 10px; }
.ed-ex .ex-h { padding-right: 72px; }
.ed-ex .ex-menu { top: 46px; right: 0; }
.ex-menu button.danger, .ex-menu button.danger svg { color: var(--red); }
.ex-menu button[disabled] { color: var(--s75); }
.ed-drag { width: 27px; height: 26px; border: 1px solid var(--g25); border-radius: 10px; background: var(--white); color: var(--s75); display: grid; place-items: center; cursor: grab; touch-action: none; }
.ed-drag:hover { color: var(--s100); }
.ed-ex.dragging { opacity: .45; }
.ed-ex.drop-before { box-shadow: inset 0 3px 0 var(--brand-ui); }
.ed-ex.drop-after { box-shadow: inset 0 -3px 0 var(--brand-ui); }
.ed-ghost { position: fixed; z-index: 300; pointer-events: none; background: var(--white); box-shadow: var(--shadow-pop); border-radius: 8px; padding: 8px 12px; font-size: 14px; max-width: 280px; }
.ed-arrows { display: flex; gap: 6px; margin-top: 8px; }
.ed-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 16px; padding: 14px; border: 2px dashed var(--s50); border-radius: 12px; color: var(--brand); font-weight: 500; font-size: 16px; }
.ed-add:hover { border-color: var(--brand-ui); background: var(--brand-tr); }
.ed-secs .ed-sec { position: relative; display: flex; align-items: center; }
.ed-secs .ed-sec-b { flex: 1; }
.ed-secs .ed-sec.cur .ed-sec-b { color: var(--base); }
.ed-secs .ed-sec.cur .ed-sec-b::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brand-ui); }
.ex-more.sm { position: static; width: 26px; height: 26px; border: 0; background: none; margin-right: 4px; flex: none; }
.ed-secs .ex-menu { top: 34px; right: 0; }
.ed-add-sec { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--s75); font-size: 16px; }
.ed-add-sec:hover { color: var(--s100); }
.lesson-row-w { position: relative; display: flex; align-items: center; }
.lesson-row-w .lesson-row { flex: 1; min-width: 0; }
.lesson-row-w > .ex-more { position: static; border: 0; background: none; margin-left: 4px; flex: none; }
.lesson-row-w .ex-menu { top: 40px; right: 0; }
.mod-h { align-items: center; gap: 8px; }
.mod-h h2 { margin: 0; }
.modal.wide { width: min(980px, calc(100vw - 32px)); max-width: none; }
.ed { display: flex; flex-direction: column; gap: 12px; }
.ed-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ed-row { display: flex; gap: 8px; }
.ed-num { width: 80px; flex: none; }
.ed-title { flex: 1; min-width: 0; }
.ed-opts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ed-opts:empty { display: none; }
.sw { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 15px; }
.sw input { width: 18px; height: 18px; accent-color: var(--brand-ui); }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; }
.swatch.gray { background: var(--g50); } .swatch.green { background: var(--green); } .swatch.blue { background: var(--brand); } .swatch.yellow { background: var(--wait); } .swatch.red { background: var(--red); }
.swatch.on { border-color: var(--base); box-shadow: 0 0 0 2px var(--white) inset; }
.ed-label { font-weight: 500; color: var(--base); margin-bottom: 4px; }
.ed-mark { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--brand-tr); color: var(--brand); font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.ed-hint { color: var(--s100); font-size: 14px; margin-bottom: 6px; white-space: pre-line; }
.ed-tools { gap: 8px; margin-bottom: 6px; flex-wrap: wrap; align-items: center; }
.ed-text { width: 100%; min-height: 180px; resize: vertical; font: 15px/1.5 ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--s50); border-radius: 8px; padding: 10px 12px; color: var(--black); }
.ed-err { color: var(--red); font-size: 14px; }
.ed-err:empty, .ed-warn:empty { display: none; }
.ed-warn { color: #b98400; background: var(--wait-tr); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.ed-prev-h { display: flex; gap: 16px; align-items: center; justify-content: space-between; border-top: 1px solid var(--s25); padding-top: 12px; }
.ed-prev { border: 1px dashed var(--s50); border-radius: 12px; padding: 0 16px; }
.type-pick h3 { font-size: 16px; font-weight: 500; margin: 14px 0 8px; color: var(--s100); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.type-btn { border: 1px solid var(--s50); border-radius: 8px; padding: 10px 12px; text-align: left; font-size: 15px; }
.type-btn:hover { border-color: var(--brand-ui); background: var(--brand-tr); color: var(--brand); }
.slash-menu { position: fixed; z-index: 400; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 6px 0; min-width: 180px; }
.slash-menu button { display: block; width: 100%; text-align: left; padding: 8px 16px; font-size: 15px; }
.slash-menu button:hover, .slash-menu button:focus { background: var(--g0); }
.rich-wrap { border: 1px solid var(--s50); border-radius: 8px; }
.rich-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--s50); background: var(--s0); border-radius: 8px 8px 0 0; }
.rich-bar button { padding: 4px 10px; border-radius: 6px; font-size: 14px; }
.rich-bar button:hover { background: var(--s50); }
.rich-bar .rb-b { font-weight: 700; } .rich-bar .rb-i { font-style: italic; } .rich-bar .rb-u { text-decoration: underline; }
.rich { min-height: 160px; padding: 10px 12px; outline: none; }
.rich table td { border: 1px solid var(--s50); padding: 4px 8px; min-width: 60px; }
.op { display: grid; gap: 10px; }
.op-f { display: grid; gap: 4px; }
.op-f span { font-size: 14px; color: var(--s100); }
.op-f select { width: 100%; }
.op-pick { display: grid; gap: 6px; max-height: 240px; overflow: auto; padding: 4px 0; }
.op-plan { margin-top: 12px; }
.op-plan h3 { font-size: 16px; margin: 0 0 6px; }
.plan { margin: 6px 0 12px; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.vers { display: grid; gap: 8px; }
.ver { display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--s25); padding-bottom: 8px; flex-wrap: wrap; }
.ver-m { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.ver-b { white-space: pre-wrap; font-size: 13px; background: var(--s0); border-radius: 6px; padding: 6px 8px; margin: 4px 0 0; max-height: 160px; overflow: auto; }
.copybox.tall { min-height: 320px; width: 100%; font: 14px/1.45 ui-monospace, Menlo, monospace; }
.log-table td { vertical-align: top; padding: 6px 8px; font-size: 14px; }
@media (max-width: 600px) {
  .ed-row { flex-direction: column; } .ed-num { width: 100%; }
  .ed-tools-b { right: 0; }
  .modal.wide { width: calc(100vw - 16px); }
}
.page.ed-page { grid-template-columns: minmax(0, 1fr) 300px; max-width: none; padding: 0; margin: 0; }
@media (max-width: 1100px) { .page.ed-page { grid-template-columns: minmax(0, 1fr); } .page.ed-page .ed-side { order: -1; position: static; } }
.ed-ex > .note, .ed-ex > .divline { margin-right: 70px; }

/* ---------- расписание (reference/progressme-skrin-03) ---------- */
.sched-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sched-h .wk { display: flex; align-items: center; border: 1px solid var(--s50); border-radius: 8px; overflow: hidden; }
.sched-h .wk button { width: 40px; height: 38px; display: grid; place-items: center; color: var(--s100); }
.sched-h .wk button:hover { background: var(--s25); }
.sched-h .wk span { padding: 0 16px; font-weight: 500; border-left: 1px solid var(--s50); border-right: 1px solid var(--s50); line-height: 38px; white-space: nowrap; }
.tz-sel { max-width: 260px; border: 1px solid var(--s50); border-radius: 8px; padding: 8px 10px; background: var(--white); color: var(--s100); }
.sched-h .gear { width: 38px; height: 38px; display: grid; place-items: center; background: var(--s25); border-radius: 8px; color: var(--s100); }
.sched .banner.warn { background: var(--wait-tr); color: #b98400; }
.sc-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); margin-top: 12px; }
.sc-corner { }
.sc-dh { text-align: center; padding: 6px 0 10px; font-weight: 500; color: var(--base); }
.sc-dh span { display: inline-block; padding: 2px 10px; border-radius: 12px; }
.sc-dh.today span { background: var(--red); color: #fff; }
.sc-hours { grid-row: 2; grid-column: 1; color: var(--s75); font-size: 14px; text-align: right; padding-right: 8px; }
.sc-hours div { transform: translateY(-8px); }
.sc-col { grid-row: 2; position: relative; background: var(--s0); border-left: 1px solid var(--white); }
.sc-col.today { background: #f2f4fa; }
.sc-hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--s50); }
.sc-ev { position: absolute; background: linear-gradient(90deg, #7be495, #b6f0c3); color: #1f5133; border-radius: 6px; padding: 4px 6px; display: flex; gap: 6px; align-items: flex-start; cursor: pointer; overflow: hidden; font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.sc-ev.free { background: var(--g50); color: var(--g100); }
.sc-ev:hover { filter: brightness(.97); }
.sc-ev .ava { flex: none; width: 22px; height: 22px; font-size: 12px; }
.sc-t { min-width: 0; display: grid; line-height: 1.2; }
.sc-t b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-t small { opacity: .8; }
.sc-more { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; display: none; place-items: center; border-radius: 4px; background: rgba(255,255,255,.6); }
.sc-ev:hover .sc-more, .sc-ev:focus-within .sc-more { display: grid; }
.sc-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--red); z-index: 2; }
.help-steps { margin: 0; padding-left: 20px; color: var(--s100); font-size: 14px; line-height: 1.5; }
/* телефон: по одному дню, дни — кнопками */
@media (max-width: 700px) {
  .sc-grid { grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
  .sc-dh { font-size: 13px; padding: 4px 0 8px; } .sc-dh span { padding: 2px 4px; }
  .sc-dh.sel span { outline: 2px solid var(--brand-ui); }
  .sc-col { display: none; grid-column: 2 / span 7; }
  .sc-col.on { display: block; }
  .sc-more { display: grid; }
  .sched-h .now { display: none; }
  .tz-sel { max-width: 100%; flex: 1 1 100%; }
}

/* ---------- чат класса и заметки учителя ---------- */
.tools .tool-btn { position: relative; }
.chat-badge { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 11px; line-height: 16px; text-align: center; font-weight: 500; }
.chat-badge[hidden] { display: none; }
.chat-hdr { display: none !important; position: relative; }
@media (max-width: 1120px) { .chat-hdr { display: grid !important; } }
.chat-panel { position: fixed; z-index: 120; left: max(16px, calc(50% - 560px)); top: 84px; bottom: 16px; width: 360px; background: var(--white); border-radius: 16px; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; overflow: hidden; }
.chat-panel[hidden] { display: none; }
.cp-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--s25); font-size: 17px; color: var(--base); }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto 0; text-align: center; }
.msg { display: flex; gap: 8px; align-items: flex-start; max-width: 92%; }
.msg.mine { align-self: flex-end; }
.msg-b { background: var(--s25); border-radius: 12px; padding: 6px 10px; min-width: 0; }
.msg.mine .msg-b { background: var(--brand-tr); }
.msg-h { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--s100); }
.msg-h b { color: var(--base); font-weight: 500; }
.msg-x { margin-left: auto; font-size: 12px; opacity: 0; }
.msg:hover .msg-x { opacity: 1; }
.msg-t { white-space: pre-wrap; word-break: break-word; font-size: 15px; color: var(--black); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--s25); align-items: flex-end; }
.chat-in { flex: 1; resize: none; min-height: 40px; max-height: 120px; border: 1px solid var(--s50); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 15px; }
.chat-form .btn { height: 40px; }
.notes-list { overflow-y: auto; padding: 0 16px 16px; display: grid; gap: 14px; }
.chat-panel > p.muted { padding: 8px 16px 0; margin: 0 0 8px; }
.note-row .nm { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.note-row .nm small { margin-left: auto; }
.note-in { width: 100%; min-height: 70px; resize: vertical; border: 1px solid var(--s50); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; }
@media (max-width: 600px) { .chat-panel { left: 0; right: 0; top: 0; bottom: 0; width: auto; border-radius: 0; } }
.tile-chat { display: inline-flex; align-items: center; gap: 4px; color: var(--red); font-size: 13px; font-weight: 500; }
.chat-panel { left: max(80px, calc(50% - 480px)); }
@media (max-width: 1120px) { .chat-panel { left: 16px; } }
@media (max-width: 600px) { .chat-panel { left: 0; } }

/* ---------- словарь ---------- */
.tr-pop { position: fixed; z-index: 300; background: var(--white); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 12px; display: grid; gap: 8px; }
.tr-h { display: flex; align-items: center; gap: 8px; }
.tr-h b { flex: 1; word-break: break-word; }
.tr-pop .row { gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tr-pop select { max-width: 180px; }
.say { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tr); color: var(--brand); display: grid; place-items: center; flex: none; }
.cp-sub { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 6px; border-top: 1px solid var(--s25); margin-top: 12px; }
.dict-mini { padding: 0 16px; }
.dict-top { align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dict-tabs { display: flex; gap: 0; }
.dict-who { max-width: 260px; }
.dict-add { display: grid; grid-template-columns: 1fr 1fr auto auto auto; gap: 8px; margin-bottom: 14px; align-items: center; }
.dict-q { max-width: 320px; }
.dict-group h3 { font-size: 16px; font-weight: 500; color: var(--s100); margin: 18px 0 6px; }
.dict-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--s25); }
.dict-row .w { font-weight: 500; min-width: 30%; }
.dict-row .tr { flex: 1; color: var(--s100); }
.stage { display: inline-flex; gap: 2px; }
.stage i { width: 6px; height: 14px; border-radius: 2px; background: var(--s50); }
.stage i.on { background: var(--green); }
.trainer .row { gap: 12px; flex-wrap: wrap; align-items: center; }
.tr-card-w { display: grid; place-items: center; margin-top: 12px; }
.tr-card { width: min(520px, 100%); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 24px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.tr-card.done b { font-size: 22px; }
.tr-front { display: flex; gap: 12px; align-items: center; font-size: 26px; }
.tr-back { font-size: 20px; color: var(--s100); }
.tr-opts { display: grid; gap: 8px; width: 100%; }
.tr-opt { justify-content: center; padding: 10px; font-size: 16px; }
.tr-opt.ok, .trainer .inp.ok { background: var(--green-tr); color: var(--green); border-color: var(--green); }
.tr-opt.bad, .trainer .inp.bad { background: var(--red-tr); color: var(--red); border-color: var(--red); }
.tr-res { min-height: 22px; }
.verbs-w { overflow-x: auto; margin-top: 10px; }
.verbs td, .verbs th { padding: 6px 10px; text-align: left; }
.verbs th { color: var(--s100); font-weight: 500; font-size: 14px; }
@media (max-width: 700px) { .dict-add { grid-template-columns: 1fr 1fr; } .dict-row .w { min-width: 0; } }
.dict-add > * { min-width: 0; }
.dict-add .inp { width: 100%; }
@media (max-width: 700px) { .dict-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dict-tabs { gap: 4px; flex-wrap: wrap; }
.dict-tabs button { padding: 8px 12px; border-bottom: 2px solid transparent; color: var(--s100); font-size: 16px; }
.dict-tabs button[aria-selected="true"] { color: var(--base); border-bottom-color: var(--brand-ui); }
@media (max-width: 600px) {
  .verbs thead { display: none; }
  .verbs tr { display: grid; grid-template-columns: 40px repeat(3, minmax(0, 1fr)); align-items: center; border-bottom: 1px solid var(--s25); }
  .verbs td { padding: 4px 6px; border: 0; }
  .verbs td:last-child { grid-column: 2 / -1; padding-top: 0; font-size: 14px; }
  .dict-tabs button { padding: 6px 8px; font-size: 15px; }
}

/* ---------- таймер класса ---------- */
.class-timer { position: fixed; z-index: 110; top: 80px; left: 50%; transform: translateX(-50%); background: var(--white); box-shadow: var(--shadow-pop); border-radius: 20px; padding: 6px 10px 6px 14px; display: flex; align-items: center; gap: 8px; color: var(--brand); font-size: 18px; font-variant-numeric: tabular-nums; }
.class-timer[hidden] { display: none; }
.class-timer b { font-weight: 500; min-width: 48px; }
.class-timer.paused { color: var(--s100); }
.class-timer.soon { color: var(--red); }
.class-timer.done { color: #fff; background: var(--red); animation: ct-blink 0.8s 4; }
@keyframes ct-blink { 50% { opacity: .55; } }
.ct-btn { width: 28px; height: 28px; border-radius: 50%; background: var(--s25); color: var(--s100); display: grid; place-items: center; }
.timer-panel { padding: 16px; display: grid; gap: 14px; }
.tp-set { gap: 8px; align-items: center; }
.tp-set .inp { width: 80px; font-size: 20px; text-align: center; }
.tp-presets, .tp-acts { gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .class-timer { top: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); } }
/* чат, словарь и таймер на телефоне: строка над «Разделами»; в шапке — только на планшете */
.quick { display: none; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.qbtn { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; background: var(--s25); color: var(--s100); font-size: 14px; }
.qbtn .chat-badge { position: static; margin-left: 2px; }
@media (max-width: 600px) { .quick { display: flex; } .chat-hdr { display: none !important; } }

/* видео: встроенный плеер 16:9 */
.videos { display: grid; gap: 14px; }
.vframe-w { margin: 0; }
.vframe { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #1f1f2e; }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vframe-w figcaption { margin-top: 6px; font-size: 13px; }
.vframe-w figcaption a { color: var(--s100); }

/* «Закрепить сверху»: закреплённое упражнение остаётся вверху экрана при прокрутке */
.pinbox { position: sticky; top: 8px; z-index: 19; margin: 8px -12px 4px; padding: 8px 12px 4px; background: var(--white); border: 1px solid var(--s50); border-radius: 12px; box-shadow: 0 4px 16px 0 rgba(153, 153, 191, .2); max-height: 55vh; overflow: auto; overscroll-behavior: contain; }
.pin-h { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--s75); min-width: 0; }
.pin-h + .pin-body { margin-top: 2px; }
.pin-body + .pin-h { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--s25); }
.pin-h .i { color: var(--brand); flex: none; }
.pin-who { font-weight: 500; color: var(--base); flex: none; }
.pin-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-h .link-btn { flex: none; font-size: 14px; }
.pin-ex { padding: 4px 0 8px; }
.pinbox.min .pin-body { display: none; }
.pin-s { display: none; }
.pinbox.min .pin-body + .pin-h { margin-top: 4px; padding-top: 4px; }
@media (max-width: 600px) {
  .pinbox { top: 4px; margin: 8px -8px 4px; padding: 6px 8px 2px; max-height: 40vh; }
  .pin-h { gap: 6px; font-size: 13px; }
  .pin-h .link-btn { font-size: 13px; }
  .pin-l { display: none; }
  .pin-s { display: inline; }
}

/* импорт из ProgressMe */
.badge.pm-ok { background: var(--s25); color: var(--s75); font-weight: 400; }
.badge.pm-miss { background: var(--wait-tr); color: var(--wait); }
.rc-main b .badge { margin-left: 8px; vertical-align: 2px; font-size: 12px; }
.alert-g { background: var(--green-tr); color: #0f8a4c; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; font-weight: 500; }
.pm-imp input[type=file] { max-width: 100%; }
.pm-out .alert-y { margin-bottom: 16px; }
.pm-part h3, .pm-hist h3 { margin: 12px 0 4px; font-size: 16px; }
.pm-part p { margin: 0 0 6px; }
.pm-grp { margin: 6px 0; font-size: 14px; }
.pm-grp ul, .pm-hist ul { margin: 4px 0 0; padding-left: 20px; max-height: 180px; overflow: auto; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cab-acts { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* уведомления на это устройство (окно колокольчика) */
.push-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--s25); margin-top: 8px; padding: 10px 8px 2px; }
.push-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; }
.push-t small { font-size: 13px; }
.push-c { display: flex; align-items: center; gap: 12px; flex: none; }
.push-t b { color: var(--base); font-weight: 500; }

/* ---- мини-сайт (#/welcome): до входа, в стиле платформы ---- */
.site { min-height: 100vh; padding-bottom: 32px; }
.site [hidden] { display: none !important; }
.site-in { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.site-top { background: var(--white); box-shadow: 0 1px 0 var(--s50); }
.site-top .site-in { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-top .logo { margin-right: 0; }
.site-top .logo span:not(.logo-mark) { display: inline; }
.site-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: center; padding: 36px 40px; margin-top: 24px; }
.site-hero h1 { font-size: 40px; line-height: 1.15; font-weight: 500; margin: 0 0 14px; color: var(--black); text-wrap: balance; }
.site-hero .lead { font-size: 19px; margin: 0 0 12px; }
.site-note { display: flex; gap: 8px; align-items: center; color: #0f8a4c; background: var(--green-tr); border-radius: 8px; padding: 8px 12px; margin: 4px 0 0; font-weight: 500; width: fit-content; max-width: 100%; }
.site-note svg { color: var(--green); }
.site-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.site-btns.center { justify-content: center; }
.btn.big { padding: 12px 20px; font-size: 16px; border-radius: 10px; white-space: normal; text-align: center; justify-content: center; }
.site-photo { width: 100%; aspect-ratio: 4 / 5; border-radius: 16px; object-fit: cover; background: var(--brand-tr); }
.site-photo.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--brand); }
.site-photo.ph svg { width: 64px; height: 64px; }
.site-sec { margin-top: 36px; }
.site-sec > h2 { font-size: 28px; font-weight: 500; margin: 0 0 14px; color: var(--black); }
.site-sec > p { font-size: 17px; margin: 0 0 10px; max-width: 720px; }
.site-card { padding: 24px 28px; }
.site-card h3 { margin: 0 0 10px; font-size: 20px; font-weight: 500; }
.site-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 17px; }
.site-list li { display: flex; gap: 10px; align-items: flex-start; }
.site-list svg { color: var(--green); margin-top: 2px; flex: none; width: 20px; height: 20px; }
.site-price { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: center; }
.sp-main { display: flex; flex-direction: column; gap: 4px; background: var(--brand-tr); border-radius: 12px; padding: 16px 18px; }
.sp-main b { font-size: 34px; font-weight: 500; color: var(--brand); line-height: 1.1; }
.site-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.site-shots figure { margin: 0; }
.site-shots .shot { display: block; width: 100%; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-pop); background: var(--white); }
.site-shots img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.site-shots figcaption { font-size: 14px; color: var(--s100); margin-top: 8px; }
.site-photo:not(.ph) { object-position: 40% 30%; }
.site-about { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.site-about-photo { width: 100%; aspect-ratio: 1; border-radius: 14px; object-fit: cover; object-position: 40% 30%; display: block; }
.site-car { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.site-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; min-width: 0; }
.site-strip::-webkit-scrollbar { display: none; }
.site-strip figure { margin: 0; flex: 0 0 170px; scroll-snap-align: start; }
.site-strip .shot { display: block; width: 100%; border-radius: 12px; overflow: hidden; background: var(--s25); }
.site-strip img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.site-strip figcaption { font-size: 14px; color: var(--s100); margin-top: 6px; }
.site-arrow { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--s50); background: var(--white); color: var(--base); display: inline-flex; align-items: center; justify-content: center; }
.site-profi { margin: 8px 0 0; max-width: 100%; overflow-x: auto; }
.site-handle { opacity: .85; font-weight: 400; margin-left: 4px; }
.site-max { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.site-foot .site-contacts { margin: 0 0 14px; justify-content: center; }
.site-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--s50); display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.site-foot a { color: var(--brand); font-weight: 500; }
@media (max-width: 760px) {
  .site-hero { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; gap: 20px; margin-top: 16px; }
  .site-hero .site-photo { order: -1; width: 140px; aspect-ratio: 1; justify-self: start; }
  .site-hero h1 { font-size: 30px; }
  .site-hero .lead { font-size: 17px; }
  .site-btns .btn.big { width: 100%; }
  .site-sec { margin-top: 28px; }
  .site-sec > h2 { font-size: 24px; }
  .site-card { padding: 18px 18px; }
  .site-list { font-size: 16px; }
  .site-price { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .site-shots { grid-template-columns: minmax(0, 1fr); }
  .site-about { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .site-about-photo { width: 112px; }
  .site-arrow { display: none; }
  .site-strip figure { flex-basis: 42%; }
  .site-contacts .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---- показ «Как это работает» (#/tour) ---- */
body.touring .demo { display: none; }
.tour-layer { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.tour-block { position: absolute; inset: 0; pointer-events: auto; }
.tour-layer.free .tour-block, .tour-layer.atend .tour-block, .tour-layer [hidden] { display: none; }
.tour-hl { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px var(--brand-ui), 0 0 0 9999px rgba(36, 36, 58, .38); transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease; pointer-events: none; }
.tour-tip { position: fixed; z-index: 2; background: var(--white); color: var(--base); border-radius: 14px; padding: 14px 18px; box-shadow: 0 10px 40px rgba(41, 41, 64, .3); pointer-events: auto;
  transition: left .35s ease, top .35s ease; max-width: calc(100vw - 32px); }
.tour-tip.center { left: 50%; bottom: 96px; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); }
.tour-tip small { display: block; color: var(--brand); font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.tour-tip small:empty { display: none; }
.tour-tip p { margin: 0; font-size: 16px; line-height: 1.45; }
.tour-cur { position: fixed; left: 0; top: 0; z-index: 3; transform: translate(50vw, 60vh); transition: transform .7s cubic-bezier(.45, .05, .3, 1); filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.tour-cur::after { content: ""; position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border-radius: 50%; background: rgba(51, 204, 255, .45); opacity: 0; transform: scale(.4); }
.tour-cur.press::after { animation: tour-press .55s ease-out; }
@keyframes tour-press { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.2); } }
.tour-layer.free .tour-cur, .tour-layer.free .tour-tip, .tour-layer.free .tour-bar, .tour-layer.atend .tour-cur { display: none; }
.tour-bar { position: fixed; z-index: 4; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 6px;
  background: var(--demo); color: #fff; border-radius: 14px; padding: 8px 10px; box-shadow: 0 8px 30px rgba(36, 36, 58, .35); pointer-events: auto; max-width: calc(100vw - 24px); }
.tb-btn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.tb-btn:hover { background: rgba(255, 255, 255, .12); }
.tour-prog { width: 120px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; margin: 0 6px; flex: 1 1 60px; }
.tour-prog i { display: block; height: 100%; width: 0; background: var(--brand-ui); transition: width .4s ease; }
.tb-try { margin-left: 4px; }
.tour-free { position: fixed; z-index: 4; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  background: var(--white); border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 30px rgba(36, 36, 58, .3); pointer-events: auto; max-width: calc(100vw - 24px); font-size: 14px; }
.tour-scr-w { min-height: 100vh; display: grid; place-items: center; padding-block: 24px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tour-scr { width: min(620px, 100%); padding: 32px; }
.tour-scr h1 { margin: 0 0 8px; font-size: 30px; font-weight: 500; color: var(--black); text-wrap: balance; }
.tour-msg { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; }
.tour-bubble { background: var(--s25); border-radius: 4px 14px 14px 14px; padding: 12px 16px; min-width: 0; }
.tour-bubble p { margin: 4px 0 8px; }
.tour-link { color: var(--brand); text-decoration: underline; overflow-wrap: anywhere; font-weight: 500; }
.tour-icon { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 18px; }
.tour-icon h3 { margin: 0 0 4px; font-size: 17px; font-weight: 500; }
.tour-icon p { margin: 0 0 12px; }
.tour-phone { width: 170px; aspect-ratio: 9 / 17; border-radius: 26px; border: 6px solid var(--black); background: linear-gradient(160deg, #d7f7fc, #eadcff); display: grid; grid-template-columns: repeat(4, 1fr); align-content: start; gap: 10px; padding: 26px 12px; }
.tour-phone i { aspect-ratio: 1; border-radius: 9px; background: rgba(255, 255, 255, .7); }
.tp-app { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tp-app .logo-mark { width: 100%; height: auto; aspect-ratio: 1; border-radius: 9px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-ui); }
.tp-app small { font-size: 9px; color: var(--black); }
@media (max-width: 600px) {
  .tour-tip, .tour-tip.center { left: 12px !important; right: 12px; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: auto !important; transform: none; }
  .tour-bar, .tour-free { left: 12px; right: 12px; justify-content: space-between; padding: 6px; }
  .tb-try { padding: 6px 10px; font-size: 14px; }
  .tour-prog { display: none; }
  .tour-scr { padding: 22px 18px; }
  .tour-scr h1 { font-size: 24px; }
  .tour-icon { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; }
  .tour-icon > div:last-child { justify-self: stretch; }
}

/* ---- пробный урок (#/trial) и «Пробные» у учителя ---- */
.trial { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; max-width: 760px; }
.trial-card { padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; }
.trial-card h1, .trial-head h1 { margin: 0; font-size: 30px; font-weight: 500; color: var(--black); text-wrap: balance; }
.trial-card p { margin: 0; }
.trial-card h2 { margin: 6px 0 0; font-size: 22px; font-weight: 500; }
.trial .small { font-size: 14px; }
.trial-err { color: var(--red); min-height: 0; margin: 0; font-weight: 500; }
.trial-err:empty { display: none; }
.trial-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.trial-seg button { border: 2px solid var(--s50); border-radius: 10px; padding: 8px 16px; font-weight: 500; color: var(--base); background: var(--white); }
.trial-seg button[aria-checked="true"] { border-color: var(--brand-ui); background: var(--brand-tr); color: var(--brand); }
.trial-head { padding: 0 4px; }
.trial-head p { margin: 6px 0 0; }
.trial-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--page); padding-block: 10px; font-weight: 500; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--s50); }
.trial-q { padding: 18px 22px; }
.trial-q.need { box-shadow: 0 0 0 2px var(--wait); }
.trial-q-h { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.trial-q-t { font-size: 18px; line-height: 32px; color: var(--black); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.trial-gap { display: inline-block; width: 56px; border-bottom: 2px solid var(--brand-ui); margin: 0 4px; vertical-align: -2px; }
.trial-opts { display: flex; flex-direction: column; gap: 8px; }
.trial-opts button { display: flex; align-items: center; gap: 10px; text-align: left; border: 2px solid var(--s50); border-radius: 10px; padding: 9px 12px; font-size: 17px; color: var(--black); background: var(--white); }
.trial-opts button:hover { border-color: var(--g75); }
.trial-opts .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--s75); flex: none; }
.trial-opts button[aria-checked="true"] { border-color: var(--brand-ui); background: var(--brand-tr); }
.trial-opts button[aria-checked="true"] .dot { border: 5px solid var(--brand-ui); }
.trial-send { justify-content: center; margin: 4px 0 40px; }
.trial-res { align-items: center; text-align: center; }
.trial-res .up { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 500; }
.trial-level { font-size: 64px; line-height: 1; font-weight: 500; color: var(--brand); }
.trial-meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 6px; }
.tm-seg { border: 2px solid var(--s50); border-radius: 12px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tm-seg b { font-size: 18px; font-weight: 500; }
.tm-sc { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tm-track { width: 100%; height: 6px; border-radius: 3px; background: var(--s50); overflow: hidden; }
.tm-track i { display: block; height: 100%; background: var(--s75); }
.tm-seg small { color: var(--s100); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.tm-seg.ok { border-color: var(--green); background: var(--green-tr); }
.tm-seg.ok b, .tm-seg.ok small { color: #0f8a4c; }
.tm-seg.ok .tm-track i { background: var(--green); }
.trial-groups { display: flex; flex-direction: column; gap: 10px; }
.trial-grp.on { border-color: var(--green); }
.trials h2 { font-size: 20px; font-weight: 500; margin: 26px 0 8px; }
.trials h2:first-child { margin-top: 0; }
.trials > p { margin: 0 0 10px; }
.trials-new { margin: 0 0 12px; }
.trials-new select { border: 2px solid var(--s50); border-radius: 8px; padding: 7px 8px; font: inherit; color: var(--base); background: var(--white); }
.trial-guest .rc-main small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.trial-wrong { flex-basis: 100%; font-size: 15px; }
.trial-wrong ol { margin: 4px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.trial-wrong .bad { color: var(--red); } .trial-wrong .good { color: #0f8a4c; }
.trial-wrong[hidden], .trials [hidden] { display: none; }
.tg-log details { display: block; }
.tg-log summary { cursor: pointer; font-size: 14px; }
.tg-log pre { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 600px) {
  .trial { padding-top: 16px; }
  .trial-card { padding: 20px 18px; }
  .trial-card h1, .trial-head h1 { font-size: 24px; }
  .trial-q { padding: 16px; }
  .trial-level { font-size: 52px; }
}

/* ---- итог урока ---- */
.sum-form .st-pick { max-height: 200px; }
.sum-form .chk { font-size: 15px; }
.summary { max-width: 720px; }
.sum-card { display: flex; flex-direction: column; gap: 8px; }
.sum-card h2 { margin: 0 0 4px; font-size: 26px; font-weight: 500; color: var(--black); text-wrap: balance; }
.sum-card h3, .summary > h3 { margin: 18px 0 6px; font-size: 18px; font-weight: 500; }
.sum-note { margin: 16px 0 0; background: var(--brand-tr); border-radius: 12px; padding: 14px 18px; }
.sum-note p { margin: 0 0 4px; font-size: 17px; color: var(--black); }
.sum-note cite { font-style: normal; color: var(--brand); font-size: 14px; }

/* ---- профиль: мессенджер ---- */
.profile { max-width: 720px; }
.profile h2 { font-size: 20px; font-weight: 500; margin: 26px 0 8px; }
.profile h2:first-child { margin-top: 0; }
.profile h3 { font-size: 16px; font-weight: 500; margin: 18px 0 6px; }
.profile > p, .profile .muted { margin: 0 0 8px; }
.msg-ch.on { border-color: var(--brand-ui); }
.msg-ch .chk .box { border-radius: 50%; }
.who-name { text-decoration: none; }
.ava-link { text-decoration: none; display: inline-flex; }

/* ---- занятия и оплаты ---- */
.payments h2 { font-size: 20px; font-weight: 500; margin: 24px 0 10px; display: flex; align-items: center; gap: 8px; }
.pay-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pay-box { border: 2px solid var(--s25); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.pay-box h2 { margin: 0 0 10px; font-size: 18px; }
.pay-box h2 svg { color: var(--brand); }
.pay-box p { margin: 0; }
.pay-row { width: 100%; text-align: left; }
.pay-stat { display: inline-flex; flex-direction: column; align-items: center; min-width: 64px; font-variant-numeric: tabular-nums; }
.pay-stat small { font-size: 11px; color: var(--s100); text-align: center; line-height: 1.2; }
.pay-stat b { font-size: 18px; font-weight: 500; }
.pay-stat.minus b { color: var(--red); }
.pay-stat.plus b { color: #0f8a4c; }
.pay-sum { display: flex; flex-wrap: wrap; gap: 10px 18px; background: var(--s0); border-radius: 12px; padding: 12px 14px; margin-bottom: 4px; }
.pay-card h3 { margin: 10px 0 0; font-size: 17px; font-weight: 500; }
.pay-card [hidden] { display: none !important; }
.pay-card select, .pay-lessons select { border: 2px solid var(--s50); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 14px; color: var(--base); background: var(--white); max-width: 100%; }
.pay-lessons { max-height: 300px; overflow: auto; }
.row-card.cancelled { opacity: .55; }
.payments .small { font-size: 14px; margin-top: 12px; }
@media (max-width: 760px) { .pay-top { grid-template-columns: minmax(0, 1fr); } .pay-row .pay-stat { min-width: 52px; } }

/* ---- повторение слов к уроку ---- */
.review-banner { margin-bottom: 16px; }
.review-banner .btn { margin-left: auto; }
.rv-bar { height: 6px; border-radius: 3px; background: var(--s50); overflow: hidden; margin: 6px 0 14px; max-width: 520px; }
.rv-bar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s ease; }
/* личный пульт аудио: под инструментами слева; на узком экране — плавающий справа внизу */
.audio-remote { display: flex; align-items: center; color: var(--base); }
.audio-remote[hidden] { display: none !important; }
.audio-remote button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--base); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.audio-remote button:hover { background: var(--g0); }
.audio-remote .ar-play { background: var(--brand-ui); color: #fff; border-radius: 50%; }
.audio-remote .ar-play:hover { background: var(--brand); }
.audio-remote .ar-close { color: var(--s100); font-size: 20px; font-weight: 400; }
.audio-remote.side { flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--s50); width: 40px; }
.audio-remote.fab { display: none; position: fixed; z-index: 115; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  gap: 4px; padding: 6px 6px 6px 12px; background: var(--white); border-radius: 26px; box-shadow: var(--shadow-pop); }
.audio-remote.fab .ar-t { font-size: 13px; color: var(--s100); min-width: 34px; font-variant-numeric: tabular-nums; }
.audio-remote.fab button { width: 40px; height: 40px; }
@media (max-width: 1120px) { .audio-remote.fab:not([hidden]) { display: flex; } }
