/* Учебный хаб. Основа (цвета, кнопки, строки, лист) — в app.css, общем с тренажёром. */
:root { --sky:#1C7FD6; --slate:#4F5B73; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sky:#5DB3FF; --slate:#9AA6BE; } }
:root[data-theme="dark"] { --sky:#5DB3FF; --slate:#9AA6BE; }

a { color:var(--lapis); }
a.row, a.tile, a.btn, a.circ, a.pillbtn, a.stile, a.notice, a.lesson, .stabs a, .pills a, .seg2 a, .tabs a { text-decoration:none; color:inherit; }
a.btn.primary { color:#fff; }
a.btn.soft { color:var(--lapis); } a.btn.soft.o { color:var(--ochre); } a.btn.soft.v { color:var(--violet); } a.btn.soft.n { color:var(--ink); }
.btn.sm { min-height:44px; font-size:14.5px; margin:4px 0 12px; }
.btn-row .btn { margin:6px 0; }

/* запуск */
.boot { display:flex; justify-content:center; padding:120px 0; }
.boot.sm { padding:30px 0; }
.hspin { width:28px; height:28px; border-radius:50%; border:3px solid var(--surf2); border-top-color:var(--lapis); animation:spin .8s linear infinite; }

/* нижняя панель: ссылки вместо кнопок */
.tabs a { position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:7px 0 6px; border-radius:999px; color:var(--ink3); font-size:10.5px; font-weight:700; transition:color .3s; }
.tabs a .ic { width:23px; height:23px; stroke-width:2; }
.tabs a.on { color:var(--lapis); }
.tabs a:active { transform:scale(.94); }

/* заголовки */
.h2.row-h { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.h2.row-h a { font-family:var(--fb); font-size:14px; font-weight:700; text-decoration:none; }
.h2-s { font-family:var(--fb); font-size:13px; font-weight:600; color:var(--ink2); margin-left:8px; }
.h2-c { font-family:var(--fb); font-size:13px; font-weight:700; color:var(--ink3); margin-left:4px; }

/* плашки */
.warn, .notice { display:flex; align-items:center; gap:12px; padding:14px 16px; margin:12px 0 0; border-radius:20px; font-size:14px; }
.warn { background:color-mix(in srgb,var(--cin) 12%,transparent); color:var(--cin); font-weight:600; }
.notice { background:color-mix(in srgb,var(--lapis) 11%,var(--surf)); }
.notice > .ic:first-child { color:var(--lapis); width:24px; height:24px; }
.notice > span { flex:1; display:flex; flex-direction:column; gap:2px; }
.notice b { font-size:15px; } .notice span span { color:var(--ink2); font-size:13.5px; line-height:1.35; }
.notice > .ic:last-child { color:var(--ink3); width:18px; height:18px; }
.notice.sm { margin:0 0 12px; }
.notice:active { transform:scale(.985); }

/* герой главной: цвет предмета */
.hub-hero { background:var(--hc); cursor:pointer; transition:transform .25s var(--ease); }
.hub-hero:active { transform:scale(.985); }
.hh-t { font-family:var(--fd); font-size:20px; font-weight:600; line-height:1.2; margin-top:6px; }
.hh-n { display:flex; align-items:baseline; gap:8px; margin:14px 0 2px; }
.hh-n b { font-family:var(--fd); font-size:40px; font-weight:600; line-height:1; letter-spacing:-.02em; }
.hh-n span { font-size:16px; font-weight:600; opacity:.8; }
.hub-hero .hero-s { margin:8px 0 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-hero { background:color-mix(in srgb,var(--hc) 55%,#10131a); } }
:root[data-theme="dark"] .hub-hero { background:color-mix(in srgb,var(--hc) 55%,#10131a); }

/* пары */
.lessons { background:var(--surf); border-radius:22px; padding:6px; }
.lesson { display:flex; align-items:center; gap:12px; padding:10px 10px; border-radius:16px; }
a.lesson:active { background:var(--press); }
.lesson + .lesson { border-top:1px solid var(--line); border-radius:0; }
.lesson.past { opacity:.45; }
.lesson.now { background:color-mix(in srgb,var(--mal) 10%,transparent); border-radius:16px; }
.ls-t { flex:none; width:46px; display:flex; flex-direction:column; font-variant-numeric:tabular-nums; }
.ls-t b { font-size:15px; } .ls-t span { font-size:12.5px; color:var(--ink3); }
.ls-bar { flex:none; width:4px; align-self:stretch; border-radius:4px; background:var(--c); }
.lesson .rt { font-size:15px; } .lesson .rs { font-size:13px; }

/* события */
.ev-b { flex:none; width:44px; height:44px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px; color:var(--c); background:color-mix(in srgb,var(--c) 15%,transparent); }
.rs.note { display:flex; align-items:flex-start; gap:5px; margin-top:3px; font-size:13px; color:var(--ochre); font-weight:600; }
.rs.note .ic { width:15px; height:15px; margin-top:1px; }
.card.soft-empty { display:flex; align-items:center; gap:12px; color:var(--ink2); font-size:14.5px; }
.card.soft-empty .ic { color:var(--mal); }

/* сетка предметов на главной */
.sgrid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.stile { display:flex; flex-direction:column; gap:3px; min-height:118px; padding:14px 12px 12px; border-radius:22px; background:var(--surf); transition:transform .22s var(--ease); }
.stile:active { transform:scale(.95); }
.st-i { width:38px; height:38px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:var(--c); background:color-mix(in srgb,var(--c) 14%,transparent); margin-bottom:8px; }
.st-i .ic { width:21px; height:21px; }
.stile { min-width:0; }
.stile b { font-size:14px; line-height:1.2; overflow-wrap:anywhere; hyphens:auto; }
.st-s, .st-m { font-size:12px; color:var(--ink2); line-height:1.25; }
.st-m { color:var(--ink3); }
@media (max-width:360px) { .sgrid { grid-template-columns:1fr 1fr; } }

/* список предметов */
.srow { align-items:flex-start; padding:14px; }
.srow .bub { margin-top:2px; }
.mods { display:flex; align-items:center; gap:4px; margin-top:8px; }
.mods i { width:22px; height:6px; border-radius:4px; background:var(--surf2); }
.mods i.d { background:var(--c); opacity:.45; } .mods i.c { background:var(--c); }
.mods em { font-style:normal; font-size:12.5px; color:var(--ink3); margin-left:6px; }

/* страница предмета */
.shead { display:flex; align-items:flex-start; gap:14px; padding:16px 2px 4px; }
.sh-i { flex:none; width:56px; height:56px; border-radius:18px; display:flex; align-items:center; justify-content:center; color:#fff; background:var(--c); box-shadow:0 8px 20px color-mix(in srgb,var(--c) 35%,transparent); }
.sh-i .ic { width:28px; height:28px; }
.shead .h1 { font-size:23px; }
.nextev { display:flex; align-items:center; gap:12px; width:100%; margin:14px 0 0; padding:12px 14px; border:0; border-radius:20px; text-align:left; background:color-mix(in srgb,var(--c) 10%,var(--surf)); }
.nextev > span:nth-child(2) { flex:1; display:flex; flex-direction:column; }
.nextev b { font-size:15px; } .nextev span span { font-size:13.5px; color:var(--ink2); }
.nextev:active { transform:scale(.985); }
.stabs { position:sticky; top:calc(env(safe-area-inset-top,0px) + 64px); z-index:9; display:flex; gap:6px; overflow-x:auto; margin:16px -18px 0; padding:8px 18px; background:var(--bg); scrollbar-width:none; }
.stabs::-webkit-scrollbar { display:none; }
.stabs a { flex:none; padding:9px 15px; border-radius:999px; font-size:14.5px; font-weight:700; color:var(--ink2); background:var(--surf); transition:background .2s, color .2s; }
.stabs a.on { background:var(--c); color:#fff; }
.stab-body { min-height:50vh; }
.row.big { min-height:84px; }

/* модули */
.modtl { display:flex; flex-direction:column; gap:10px; }
.modc { background:var(--surf); border-radius:22px; padding:12px; }
.modc-h { display:flex; align-items:center; gap:10px; padding:2px 4px 8px; }
.modc-h b { font-size:15.5px; } .modc-h span:last-child { margin-left:auto; font-size:13px; color:var(--ink3); font-weight:600; }
.modc-n { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px; background:var(--surf2); color:var(--ink2); }
.modc-n .ic { width:16px; height:16px; stroke-width:3; }
.modc.cur { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--lapis) 45%,transparent); }
.modc.cur .modc-n { background:var(--lapis); color:#fff; } .modc.cur .modc-h span:last-child { color:var(--lapis); }
.modc.done { opacity:.7; } .modc.done .modc-n { background:var(--mal); color:#fff; }
.modc-e { display:flex; align-items:center; gap:12px; width:100%; padding:8px 4px; border:0; background:none; text-align:left; border-top:1px solid var(--line); }
.modc-e.past { opacity:.55; }
.modc-e .rt { font-size:15px; }
.card.kv { display:flex; align-items:center; gap:12px; font-size:14.5px; }
.card.kv > .ic { flex:none; width:22px; height:22px; color:var(--lapis); }
.card.kv { margin-top:12px; line-height:1.45; }
.card.list { padding:4px 16px; }
.li { display:flex; flex-direction:column; gap:2px; padding:11px 0; }
.li + .li { border-top:1px solid var(--line); }
.li b { font-size:15px; } .li span { font-size:14px; color:var(--ink2); line-height:1.45; }
.mblock { background:var(--surf); border-radius:24px; padding:12px 12px 4px; margin-bottom:12px; }
.mb-h { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:2px 4px 10px; }
.mb-h b { font-size:15.5px; } .mb-h span { font-size:13px; color:var(--ink2); }
.mblock .row { background:var(--bg); }
.mblock .cap { margin:6px 4px 8px; }
.mblock .foot { margin:0 4px 10px; }

/* фильтры */
.seg2 a, .seg2 button { display:flex; align-items:center; justify-content:center; gap:6px; min-height:40px; border:0; border-radius:999px; background:none; color:var(--ink2); font:inherit; font-size:14px; font-weight:700; transition:background .25s, color .25s; }
.seg2 a.on, .seg2 button.on { background:var(--surf); color:var(--ink); box-shadow:0 2px 8px rgba(20,25,50,.10); }
.seg2.three { grid-template-columns:repeat(3,1fr); }
.seg2 .ic { width:17px; height:17px; }
.pills { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 14px; }
.pills.scroll { flex-wrap:nowrap; overflow-x:auto; margin:0 -18px 14px; padding:0 18px; scrollbar-width:none; }
.pills.scroll::-webkit-scrollbar { display:none; }
.pills a, .pills button { flex:none; padding:8px 14px; border:0; border-radius:999px; background:var(--surf); color:var(--ink2); font:inherit; font-size:14px; font-weight:700; }
.pills .on { background:var(--c, var(--ink)); color:var(--bg); }
.circ.acc { background:var(--lapis); color:#fff; }

/* публикации в списках */
.row.post { cursor:pointer; }
.row.post .rt { overflow-wrap:anywhere; }
.row.post.mine { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--mal) 55%,transparent); }
.row.post.late .meta { color:var(--cin); }
.row.post.is-done .rt { text-decoration:line-through; color:var(--ink3); }
.meta { display:flex; flex-wrap:wrap; align-items:center; gap:0 2px; }
.meta .ic { display:inline-block; width:14px; height:14px; vertical-align:-2px; margin-right:2px; }
.dotsep { display:inline-block; width:3px; height:3px; border-radius:50%; background:currentColor; opacity:.5; margin:0 6px; }
.chk-o { flex:none; width:30px; height:30px; margin:0 7px; border-radius:50%; border:2px solid var(--ink3); display:flex; align-items:center; justify-content:center; color:transparent; transition:background .2s, border-color .2s, transform .2s var(--spring); }
.chk-o .ic { width:17px; height:17px; stroke-width:3; }
.chk-o.on { background:var(--mal); border-color:var(--mal); color:#fff; }
.chk-o:active { transform:scale(.85); }
.sdot { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--c); margin-right:7px; flex:none; }

/* просмотр публикации */
.post-v { padding-top:8px; }
.chips-l { display:flex; flex-wrap:wrap; gap:6px; }
.schip { display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:999px; font-size:13px; font-weight:700; color:var(--c, var(--ink2)); background:color-mix(in srgb,var(--c, var(--ink3)) 13%,transparent); text-decoration:none; }
.schip .ic { width:15px; height:15px; }
.schip.mine { --c:var(--mal); }
.h1.pt { font-size:25px; margin:14px 0 8px; overflow-wrap:anywhere; }
.due { display:inline-flex; align-items:center; gap:7px; padding:8px 13px; border-radius:14px; background:var(--surf); font-weight:700; font-size:14.5px; margin:4px 0 6px; }
.due .ic { width:18px; height:18px; color:var(--lapis); }
.due.late { color:var(--cin); } .due.late .ic { color:var(--cin); }
.byline { color:var(--ink3); font-size:13px; margin:16px 2px 6px; }
.gal { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:14px 0; }
.gal.one { grid-template-columns:1fr; }
.gi { padding:0; border:0; border-radius:18px; overflow:hidden; background:var(--surf2); aspect-ratio:4/3; }
.gal.one .gi { aspect-ratio:auto; max-height:70vh; }
.gi img { width:100%; height:100%; object-fit:cover; display:block; }
.gal.one .gi img { object-fit:contain; max-height:70vh; }
.files { margin:14px 0; }

/* текст с оформлением */
.md { font-size:16px; line-height:1.6; overflow-wrap:anywhere; margin:10px 0; }
.md > :first-child { margin-top:0; } .md > :last-child { margin-bottom:0; }
.md p { margin:0 0 10px; }
.md h1, .md h2, .md h3 { font-family:var(--fd); font-weight:600; line-height:1.25; margin:18px 0 8px; }
.md h1 { font-size:21px; } .md h2 { font-size:18px; } .md h3 { font-size:16px; }
.md ul, .md ol { padding-left:22px; margin:0 0 10px; }
.md li { margin:3px 0; }
.md blockquote { margin:10px 0; padding:8px 14px; border-left:4px solid var(--lapis); background:var(--surf); border-radius:0 14px 14px 0; color:var(--ink2); }
.md code { font-family:ui-monospace,"Cascadia Code",Consolas,monospace; font-size:.9em; padding:2px 6px; border-radius:6px; background:var(--surf2); }
.md pre { overflow-x:auto; padding:12px 14px; border-radius:14px; background:var(--surf); }
.md pre code { padding:0; background:none; }
.md table { border-collapse:collapse; min-width:100%; font-size:14.5px; margin:0; }
.md .tblw { overflow-x:auto; margin:10px 0; -webkit-overflow-scrolling:touch; }
.md .mmd { overflow-x:auto; margin:12px 0; text-align:center; }
.md .mmd svg { max-width:100%; height:auto; }
.md pre.mmd-err { border:1px dashed var(--line); }
.md th, .md td { border:1px solid var(--line); padding:6px 10px; text-align:left; }
.md th { background:var(--surf); }
.md img { max-width:100%; border-radius:12px; }
.md hr { border:0; border-top:1px solid var(--line); margin:16px 0; }
mark { padding:1px 3px; border-radius:4px; color:inherit; }
mark.mk-y { background:color-mix(in srgb,#FFD43B 55%,transparent); }
mark.mk-g { background:color-mix(in srgb,var(--mal) 30%,transparent); }
mark.mk-r { background:color-mix(in srgb,var(--cin) 26%,transparent); }
mark.mk-b { background:color-mix(in srgb,var(--lapis) 24%,transparent); }
mark.mk-v { background:color-mix(in srgb,var(--violet) 26%,transparent); }

/* просмотр фото */
.viewer { position:fixed; inset:0; z-index:70; background:rgba(5,6,10,.94); display:flex; align-items:center; justify-content:center; animation:fadeUp .25s var(--ease); }
.viewer img { max-width:100%; max-height:100%; object-fit:contain; }
.viewer .circ { position:absolute; background:rgba(255,255,255,.14); color:#fff; }
.vx { top:calc(14px + env(safe-area-inset-top,0px)); right:14px; }
.vd { top:calc(14px + env(safe-area-inset-top,0px)); right:66px; }
.vp { left:10px; top:50%; } .vn { right:10px; top:50%; }
.vc { position:absolute; bottom:calc(20px + env(safe-area-inset-bottom,0px)); left:50%; transform:translateX(-50%); color:#fff; font-weight:700; font-size:14px; opacity:.8; }

/* редактор */
.editor { padding-top:6px; }
.fl { display:block; font-size:14px; font-weight:700; color:var(--ink2); margin:18px 4px 8px; }
.fl-s { font-weight:600; color:var(--ink3); margin-left:4px; }
.kinds { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.kinds button { display:flex; align-items:center; gap:10px; min-height:52px; padding:10px 14px; border:2px solid transparent; border-radius:18px; background:var(--surf); font-weight:700; font-size:14.5px; text-align:left; transition:border-color .2s, background .2s; }
.kinds button .ic { color:var(--c); }
.kinds button.on { border-color:var(--c); background:color-mix(in srgb,var(--c) 9%,var(--surf)); }
.hint { font-size:13.5px; color:var(--ink2); line-height:1.45; margin:10px 4px 0; }
.inp, .selw select { width:100%; font:inherit; font-size:16px; color:var(--ink); background:var(--surf); border:2px solid transparent; border-radius:16px; padding:13px 14px; outline:none; transition:border-color .2s; -webkit-appearance:none; appearance:none; }
.inp:focus, .selw select:focus { border-color:color-mix(in srgb,var(--lapis) 55%,transparent); }
.inp.ta { resize:vertical; min-height:130px; line-height:1.5; }
.selw { position:relative; }
.selw select { padding-right:40px; cursor:pointer; }
.selw .ic { position:absolute; right:14px; top:50%; transform:translateY(-50%); width:18px; height:18px; color:var(--ink3); pointer-events:none; }
.two { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.dues { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.dues button, .mdtabs button { padding:8px 13px; border:0; border-radius:999px; background:var(--surf); font-weight:700; font-size:13.5px; color:var(--ink2); }
.dues button.on, .mdtabs button.on { background:var(--lapis); color:#fff; }
.mdtabs { display:flex; gap:6px; margin-bottom:8px; }
.md.prev { background:var(--surf); border-radius:16px; padding:13px 14px; min-height:130px; margin:0; }
.upl { display:flex; flex-direction:column; gap:8px; }
.upf { position:relative; overflow:hidden; display:flex; align-items:center; gap:10px; padding:8px 8px 8px 8px; border-radius:16px; background:var(--surf); }
.upf img, .upf .fi { flex:none; width:44px; height:44px; border-radius:10px; object-fit:cover; display:flex; align-items:center; justify-content:center; background:var(--surf2); color:var(--ink2); }
.fn { flex:1; min-width:0; display:flex; flex-direction:column; }
.fn b { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .fn span { font-size:12.5px; color:var(--ink2); }
.upf.bad .fn span { color:var(--cin); }
.fx { flex:none; width:36px; height:36px; border:0; border-radius:50%; background:none; color:var(--ink3); display:flex; align-items:center; justify-content:center; }
.fx .ic { width:18px; height:18px; }
.fbar { position:absolute; left:0; bottom:0; height:3px; background:var(--lapis); transition:width .2s; }
.upbtn { cursor:pointer; margin-top:8px; }
.err { color:var(--cin); font-weight:700; font-size:14.5px; min-height:20px; margin:14px 4px 0; }

/* календарь */
.legend { display:flex; flex-wrap:wrap; gap:6px 14px; margin:2px 2px 14px; font-size:13px; color:var(--ink2); }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.legend .ev-b { width:26px; height:22px; border-radius:7px; font-size:11px; }
.wk { background:var(--surf); border-radius:22px; padding:12px 14px 6px; margin-bottom:10px; }
.wk.cur { box-shadow:inset 0 0 0 2.5px var(--lapis), 0 6px 20px color-mix(in srgb,var(--lapis) 14%,transparent); }
.wk.cur .wk-h b { color:var(--lapis); }
.wk .today { display:flex; align-items:center; gap:8px; margin:0 0 6px; padding:7px 10px; border-radius:12px; font-size:13px; font-weight:700; color:var(--lapis); background:color-mix(in srgb,var(--lapis) 9%,transparent); }
.wk .today i { width:8px; height:8px; border-radius:50%; background:var(--lapis); }
.wk.past { opacity:.6; }
.wk-h { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 10px; padding-bottom:6px; }
.wk-h b { font-family:var(--fd); font-size:16px; font-weight:600; } .wk-h span { font-size:13px; color:var(--ink2); }
.wk-h .pill { margin-left:auto; }
.wk-e { display:flex; align-items:center; gap:12px; width:100%; padding:8px 0; border:0; background:none; text-align:left; border-top:1px solid var(--line); }
.wk-e .ev-b { width:40px; height:40px; border-radius:12px; }
.wk-e .rt { font-size:15px; }
.wk-empty { font-size:13.5px; color:var(--ink3); padding:4px 0 10px; }
.wk-hw { margin:6px -6px 4px; }
.wk-hw .row { background:var(--bg); min-height:56px; margin-bottom:6px; }
.ptable-w { position:relative; overflow-x:auto; margin:0 -18px; padding:26px 18px 8px 0; }
/* текущая неделя: рамка и подпись — одна фигура (подпись — залитая «шапка» рамки) */
.pt-now { position:absolute; top:0; z-index:1; pointer-events:none; overflow:hidden; border:2.5px solid var(--lapis); border-radius:13px; box-shadow:0 6px 18px color-mix(in srgb,var(--lapis) 16%,transparent); animation:fadeUp .45s var(--ease) both; }
.pt-now span { position:absolute; left:0; right:0; top:0; height:17px; display:flex; align-items:center; justify-content:center; padding-bottom:1px; background:var(--lapis); color:#fff; font-size:10px; font-weight:800; letter-spacing:.02em; white-space:nowrap; }
.ptable { border-collapse:separate; border-spacing:3px; font-size:13px; }
.ptable th, .ptable td { text-align:center; font-weight:700; }
.ptable thead th { color:var(--ink3); padding:4px 0 6px; min-width:34px; }
.ptable thead th.zn { color:var(--ink2); }
.ptable thead th.cur { color:var(--lapis); }
.ptable thead th small { display:block; font-size:10px; font-weight:600; color:var(--ink3); margin-top:1px; white-space:nowrap; }
.ptable thead th.cur small { color:var(--lapis); }
.ptable .pt-s { position:sticky; left:-18px; z-index:2; box-shadow:0 0 0 3.5px var(--bg); text-align:left; background:var(--bg); padding:0 8px 0 18px; min-width:138px; white-space:nowrap; }
.ptable thead .pt-s { color:var(--ink3); }
.ptable .pt-s a { display:flex; align-items:center; color:var(--ink); text-decoration:none; font-size:13.5px; }
.ptable td { height:34px; border-radius:8px; background:var(--surf); }
.ptable td.past { opacity:.5; }
.ptable td button { width:100%; height:100%; min-width:34px; min-height:34px; border:0; border-radius:8px; font-weight:800; font-size:12px; color:var(--c); background:color-mix(in srgb,var(--c) 18%,transparent); }

/* событие в листе */
.evh { display:flex; align-items:center; gap:12px; margin:0 2px 6px; }
.evh > span:last-child { display:flex; flex-direction:column; }
.evh b { font-size:16.5px; } .evh span span { color:var(--ink2); font-size:14px; }
.adm { margin-top:18px; padding:12px 14px 4px; border-radius:22px; border:2px dashed var(--line); }
.adm .cap { display:flex; align-items:center; gap:6px; }
.adm .cap .ic { width:16px; height:16px; }
.adm .fl { margin-top:12px; }

/* профиль */
.card.login { display:flex; gap:14px; align-items:flex-start; }
.card.login > .ic { color:var(--lapis); width:28px; height:28px; margin-top:2px; }
.card.login b { display:block; font-size:16px; } .card.login span { display:block; color:var(--ink2); font-size:14px; margin-top:4px; line-height:1.45; }
.rlist { display:flex; flex-direction:column; gap:6px; }
.rsel { display:flex; align-items:center; gap:12px; width:100%; min-height:52px; padding:8px 14px 8px 8px; border:0; border-radius:16px; background:var(--surf); text-align:left; font-weight:600; }
.rsel .rn { flex:none; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--surf2); font-weight:800; font-variant-numeric:tabular-nums; }
.rsel .rt { flex:1; } .rsel .rs { font-size:12.5px; color:var(--ink3); }
.rsel.on { background:color-mix(in srgb,var(--lapis) 12%,var(--surf)); } .rsel.on .rn { background:var(--lapis); color:#fff; }
.rsel .ic { color:var(--lapis); }
.card.about p { margin:0 0 8px; font-size:14.5px; color:var(--ink2); line-height:1.5; }

/* уведомление с действием */
.toast.act { display:flex; align-items:center; gap:14px; }
.toast.act button { border:0; background:none; color:var(--ochre); font-weight:800; font-size:14px; padding:4px 2px; }

/* широкие экраны: две колонки для сеток */
@media (min-width:700px) {
  .sgrid { grid-template-columns:repeat(3,1fr); }
  .h1 { font-size:30px; }
}

/* начерталка: 3D-модель проекций */
.ng { padding-top:6px; }
.ng-stage { position:relative; height:min(58vh, 460px); min-height:300px; margin:0 -18px; background:radial-gradient(ellipse at 50% 40%, var(--surf) 0%, var(--bg) 75%); overflow:hidden; touch-action:none; }
.ng-stage canvas { display:block; width:100%; height:100%; }
.ng-labels { position:absolute; inset:0; pointer-events:none; }
.ng-lb { font-family:var(--fb); font-weight:800; font-size:13px; color:var(--ink); text-shadow:0 0 3px var(--bg), 0 0 3px var(--bg), 0 0 6px var(--bg); white-space:nowrap; user-select:none; }
.ng-lb.ax { font-size:14px; font-style:italic; color:var(--ink2); }
.ng-lb.pl { font-size:13px; color:var(--ink3); }
.ng-lb.pt.big { font-size:16px; }
.ng-load { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap:10px; color:var(--ink2); font-weight:600; font-size:14px; }
.ng-views { position:absolute; left:12px; right:12px; top:10px; display:flex; gap:6px; justify-content:center; flex-wrap:wrap; z-index:2; }
.ng-views button { padding:7px 12px; border:0; border-radius:999px; background:var(--bar); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); font-weight:700; font-size:13px; color:var(--ink2); box-shadow:0 2px 10px rgba(20,25,50,.08); }
.ng-views button.on { background:var(--lapis); color:#fff; }
.ng-tip { position:absolute; left:0; right:0; bottom:8px; margin:0; text-align:center; font-size:12px; color:var(--ink3); pointer-events:none; }
.ng-unf { display:flex; align-items:center; gap:12px; margin:14px 0 12px; }
.ng-unf .circ { width:52px; height:52px; }
.ng-sl { flex:1; }
.ng-sl-l { display:flex; justify-content:space-between; align-items:baseline; font-size:12.5px; color:var(--ink2); font-weight:600; }
.ng-sl-l b { color:var(--ink); font-variant-numeric:tabular-nums; }
.ng input[type=range], .dz-unf input[type=range] { width:100%; accent-color:var(--lapis); height:28px; margin:2px 0 0; }
.ng-info { margin-top:4px; }
.ng-ih { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:6px; }
.ng-ih b { font-family:var(--fd); font-size:16px; font-weight:600; line-height:1.3; }
.ng-info p { margin:4px 0 0; font-size:14.5px; line-height:1.5; color:var(--ink2); }
.ng-ep { color:var(--ink) !important; }
.srcb { flex:none; display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border-radius:999px; font-size:11.5px; font-weight:700; color:var(--ink2); background:var(--surf2); }
.srcb .ic { width:13px; height:13px; }
.ng-ptabs { display:flex; gap:8px; margin:14px 0 8px; }
.ng-ptabs button { flex:1; min-height:44px; border:2px solid transparent; border-radius:14px; background:var(--surf); font-weight:800; font-size:16px; color:var(--c); }
.ng-ptabs button.on { border-color:var(--c); background:color-mix(in srgb,var(--c) 10%,var(--surf)); }
.ng-coords { border-left:4px solid var(--c); }
.ng-cn { font-weight:800; font-size:15px; margin-bottom:6px; font-variant-numeric:tabular-nums; }
.ng-c { display:flex; align-items:center; gap:12px; }
.ng-c span { width:14px; font-style:italic; font-weight:700; color:var(--ink2); }
.ng-c input { flex:1; accent-color:var(--c) !important; }
.ng-c b { width:30px; text-align:right; font-variant-numeric:tabular-nums; }
.ng-tog { display:flex; flex-direction:column; gap:2px; margin:12px 0 0; background:var(--surf); border-radius:20px; padding:6px 14px; }
.ng-tog label { display:flex; align-items:center; gap:12px; min-height:44px; font-size:15px; font-weight:600; cursor:pointer; }
.ng-tog input { width:20px; height:20px; accent-color:var(--lapis); }
.ng .foot .ic { display:inline-block; width:15px; height:15px; vertical-align:-3px; }
@media (min-width:700px) { .ng-stage { margin:0; border-radius:24px; } }

/* формулы */
.katex { font-size:1.08em; }
.mathd { display:block; overflow-x:auto; overflow-y:hidden; padding:4px 0; margin:6px 0; }

/* ИИ-помощник */
#aichat { position:fixed; inset:0; z-index:55; visibility:hidden; background:rgba(8,10,20,0); transition:visibility 0s .4s, background .35s; }
#aichat.open { visibility:visible; background:rgba(8,10,20,.42); transition:background .35s; }
.ac-panel { position:absolute; inset:0; max-width:720px; margin:0 auto; display:flex; flex-direction:column; background:var(--bg); transform:translateY(100%); transition:transform .45s var(--ease); padding-top:env(safe-area-inset-top,0px); }
#aichat.open .ac-panel { transform:none; }
@media (min-width:760px) { .ac-panel { top:24px; bottom:24px; border-radius:28px; overflow:hidden; box-shadow:var(--shadow); } }
.ac-h { flex:none; display:flex; align-items:center; gap:8px; padding:10px 14px; border-bottom:1px solid var(--line); }
.ac-t { flex:1; display:flex; align-items:center; gap:8px; }
.ac-t .ic { color:var(--violet); }
.ac-t b { font-family:var(--fd); font-size:17px; font-weight:600; }
.ac-body { flex:1; overflow-y:auto; padding:16px 16px 8px; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.ac-empty { display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px; padding:26px 6px; color:var(--ink2); font-size:14.5px; line-height:1.5; }
.ac-empty > .ic { width:40px; height:40px; color:var(--violet); }
.ac-empty b { color:var(--ink); font-family:var(--fd); font-size:19px; font-weight:600; }
.ac-empty .btn { margin-top:10px; }
.ac-starts { display:flex; flex-direction:column; gap:8px; width:100%; margin-top:14px; }
.ac-starts button { display:flex; align-items:center; gap:12px; padding:13px 14px; border:0; border-radius:18px; background:var(--surf); text-align:left; font-weight:600; font-size:15px; color:var(--ink); }
.ac-starts button .ic { color:var(--violet); width:20px; height:20px; }
.ac-starts button:active { transform:scale(.98); }
.msg { margin:0 0 14px; display:flex; flex-direction:column; }
.msg.me { align-items:flex-end; }
.msg.me .bubble { max-width:86%; padding:10px 14px; border-radius:20px 20px 6px 20px; background:var(--hero); color:#fff; font-size:15.5px; line-height:1.45; overflow-wrap:anywhere; }
.msg-imgs { display:flex; gap:6px; margin-bottom:6px; }
.msg-imgs img { width:96px; height:96px; object-fit:cover; border-radius:14px; }
.msg.ai .md { background:var(--surf); border-radius:20px 20px 20px 6px; padding:12px 15px; margin:0; max-width:100%; font-size:15.5px; }
.msg.ai.err .md { color:var(--cin); background:color-mix(in srgb,var(--cin) 10%,var(--surf)); }
.msg.ai .md h3 { font-size:16px; margin:14px 0 6px; }
.msg-act { display:flex; gap:6px; margin:4px 4px 0; }
.msg-act button { display:inline-flex; align-items:center; gap:5px; border:0; background:none; color:var(--ink3); font-size:12.5px; font-weight:700; padding:4px 6px; }
.msg-act .ic { width:14px; height:14px; }
.typing { flex-direction:row; gap:5px; padding:14px 16px; background:var(--surf); border-radius:20px; width:max-content; }
.typing span { width:7px; height:7px; border-radius:50%; background:var(--ink3); animation:blink 1.2s infinite both; }
.typing span:nth-child(2) { animation-delay:.2s; } .typing span:nth-child(3) { animation-delay:.4s; }
@keyframes blink { 0%,80%,100% { opacity:.25; transform:translateY(0); } 40% { opacity:1; transform:translateY(-3px); } }
.ac-foot { flex:none; padding:8px 12px calc(10px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--line); background:var(--bg); }
.ac-ctx:empty, .ac-media:empty { display:none; }
.ac-ctx { margin:0 0 8px; }
.ac-ctx .chip { max-width:100%; background:color-mix(in srgb,var(--violet) 12%,transparent); color:var(--violet); }
.ac-ctx .chip span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ac-ctx .chip button { border:0; background:none; color:inherit; padding:0 0 0 2px; display:flex; }
.ac-media { display:flex; gap:8px; margin:0 0 8px; }
.acm { position:relative; }
.acm img { width:64px; height:64px; object-fit:cover; border-radius:12px; display:block; }
.acm button { position:absolute; top:-6px; right:-6px; width:24px; height:24px; border:0; border-radius:50%; background:var(--ink); color:var(--bg); display:flex; align-items:center; justify-content:center; padding:0; }
.acm button .ic { width:14px; height:14px; }
.ac-in { display:flex; align-items:flex-end; gap:8px; }
.ac-in textarea { flex:1; min-height:44px; max-height:140px; resize:none; font:inherit; font-size:16px; line-height:1.4; color:var(--ink); background:var(--surf); border:2px solid transparent; border-radius:22px; padding:10px 14px; outline:none; }
.ac-in textarea:focus { border-color:color-mix(in srgb,var(--violet) 50%,transparent); }
.ac-att { cursor:pointer; }
.ac-in .circ.acc { background:var(--violet); }

/* чат: несколько разговоров, инкогнито */
.ac-panel { overflow:hidden; padding-top:0 !important; }
.ac-view { position:absolute; inset:0; display:flex; flex-direction:column; background:var(--bg); transition:transform .4s var(--ease); padding-top:env(safe-area-inset-top,0px); }
.ac-listv { transform:translateX(-100%); }
#aichat.list .ac-listv { transform:none; }
#aichat.list .ac-conv { transform:translateX(30%); }
.ac-h { gap:4px; }
.ac-h .circ { width:40px; height:40px; background:none; }
.ac-h .circ .ic { width:21px; height:21px; }
.ac-title { flex:1; min-width:0; display:flex; align-items:center; gap:6px; border:0; background:none; padding:6px 8px; border-radius:12px; text-align:left; color:var(--ink); }
.ac-title b { font-family:var(--fd); font-size:16px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ac-title .ic { flex:none; width:15px; height:15px; color:var(--ink3); }
.ac-title:disabled { cursor:default; }
.ac-title:not(:disabled):active { background:var(--press); }
.ac-lt { flex:1; font-family:var(--fd); font-size:17px; font-weight:600; padding-left:4px; }
#acIncog.on { color:#fff; background:var(--violet); }
.ac-incog { display:none; align-items:flex-start; gap:10px; margin:10px 14px 0; padding:10px 14px; border-radius:16px; font-size:13.5px; line-height:1.45; color:var(--violet); background:color-mix(in srgb,var(--violet) 11%,var(--surf)); }
.ac-incog .ic { flex:none; width:20px; height:20px; margin-top:1px; }
#aichat.incog .ac-incog { display:flex; }
#aichat.incog .ac-conv { background:color-mix(in srgb,var(--violet) 5%,var(--bg)); }
#aichat.incog .ac-foot { background:transparent; }
.msg-ph { display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--ink3); margin-bottom:4px; }
.msg-ph .ic { width:14px; height:14px; }
.ac-lwrap { flex:1; overflow-y:auto; padding:14px 14px calc(20px + env(safe-area-inset-bottom,0px)); }
.ac-lbtns { display:grid; grid-template-columns:1.4fr 1fr; gap:8px; }
.ac-lbtns .btn { margin:0; min-height:48px; font-size:15px; }
.ac-lwrap .search { margin:12px 0 6px; }
.ac-g { margin:16px 6px 6px; }
.ac-row { position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:4px; padding:4px 4px 4px 0; margin-bottom:6px; border-radius:18px; background:var(--surf); }
.ac-row.on { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--violet) 45%,transparent); }
.ac-open { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; padding:10px 6px 10px 14px; border:0; background:none; text-align:left; color:var(--ink); }
.ac-open b { display:flex; align-items:center; gap:5px; font-size:15px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ac-open b .ic { flex:none; width:14px; height:14px; color:var(--violet); }
.ac-open span { font-size:12.5px; color:var(--ink3); }
.circ.sm { width:38px; height:38px; background:none; color:var(--ink3); }
.ac-acts { flex-basis:100%; display:flex; flex-wrap:wrap; gap:6px; padding:2px 10px 10px 12px; }
.ac-acts[hidden] { display:none; }
.ac-acts button { display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border:0; border-radius:999px; background:var(--surf2); font-weight:700; font-size:13.5px; color:var(--ink); }
.ac-acts button .ic { width:15px; height:15px; }
.ac-acts button.danger { color:var(--cin); background:color-mix(in srgb,var(--cin) 11%,transparent); }
.ac-none { text-align:center; margin-top:26px; }
@media (min-width:760px) {
  .ac-panel { max-width:980px; }
  .ac-listv { transform:none; width:300px; border-right:1px solid var(--line); }
  .ac-conv { left:300px; }
  #aichat.list .ac-conv { transform:none; }
  #acList, #acBack { display:none; }
  .ac-lbtns { grid-template-columns:1fr; }
}

/* уведомления не шире экрана */
.toast { white-space:normal; max-width:calc(100vw - 32px); width:max-content; text-align:center; line-height:1.35; }

/* ДЗ другой подгруппы — приглушено */
.row.post.other { opacity:.55; }

/* ДЗ по НГ: эпюр по шагам */
.dz-cond p { margin:0 0 10px; font-size:14.5px; line-height:1.5; }
.dz-tab { border-collapse:collapse; font-variant-numeric:tabular-nums; font-size:14.5px; }
.dz-tab th, .dz-tab td { border:1px solid var(--line); padding:5px 12px; text-align:center; }
.dz-tab th { color:var(--ink2); font-weight:700; }
.dz-mode { margin-top:14px; }
.dz-view { position:relative; height:min(62vh, 560px); min-height:320px; margin:0 -18px; }
.dz-ep { position:absolute; inset:0; background:var(--surf); }
.dz-3d { position:absolute; inset:0; height:auto; margin:0; }
@media (min-width:700px) { .dz-view { margin:0; } .dz-ep { border-radius:24px; overflow:hidden; } }
.dz-zoom { position:absolute; right:10px; bottom:10px; display:flex; flex-direction:column; gap:6px; z-index:2; }
.dz-zoom .circ { width:40px; height:40px; background:var(--bar); box-shadow:0 2px 10px rgba(20,25,50,.12); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); }
.dz-zoom[hidden] { display:none; }
.dz-nav { display:flex; align-items:center; gap:12px; margin:12px 0 4px; }
.dz-nav .circ { width:50px; height:50px; }
.dz-prog { flex:1; min-width:0; display:block; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.dz-prog b { display:block; font-size:14px; margin-bottom:2px; font-variant-numeric:tabular-nums; }
.dz-prog .dz-pt { display:block; font-size:12.5px; color:var(--ink2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:6px; }
.dz-prog .tbar { display:block; margin:0; } .dz-prog .tbar i { background:var(--lapis); transition:width .35s var(--ease); }
.dz-all { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--ink2); margin:8px 4px 0; cursor:pointer; }
.dz-all input { width:18px; height:18px; accent-color:var(--lapis); }
.dz-step { min-height:120px; }
.dz-unf { margin:12px 0 2px; }
.dz-unf[hidden] { display:none; }
/* полоса шагов: номера, пройденные подсвечены, текущий — заливкой */
.dz-steps { display:flex; gap:6px; overflow-x:auto; margin:12px -18px 0; padding:2px 18px 6px; scrollbar-width:none; }
.dz-steps::-webkit-scrollbar { display:none; }
.dz-steps button { flex:none; min-width:34px; height:34px; padding:0 8px; border:0; border-radius:999px; background:var(--surf); color:var(--ink2); font-weight:700; font-size:13px; font-variant-numeric:tabular-nums; transition:background .2s, color .2s; }
.dz-steps button.done { background:color-mix(in srgb,var(--lapis) 15%,transparent); color:var(--lapis); }
.dz-steps button.on { background:var(--lapis); color:#fff; box-shadow:0 2px 10px color-mix(in srgb,var(--lapis) 35%,transparent); }
.dz-pn { display:flex; gap:10px; margin:12px 0 4px; }
.dz-pn .btn { flex:1 1 0; width:auto; min-width:0; min-height:48px; margin:0; padding:10px 18px; font-size:15px; }
.dz-pn #dzBack { flex:0 0 auto; }
.dz-pn .btn span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dz-pn [hidden] { display:none; }
.dz-sl { padding:4px 0; }
.dz-sli { display:flex; align-items:center; gap:12px; width:100%; padding:11px 14px; border:0; background:none; color:var(--ink); font:inherit; font-size:14.5px; text-align:left; }
.dz-sli + .dz-sli { border-top:1px solid var(--line); }
.dz-sli.on { color:var(--lapis); font-weight:700; }
.h2.dz-st { margin:0 0 8px; }
.dz-ans .li { flex-direction:row; justify-content:space-between; align-items:baseline; gap:12px; }
.dz-ans .li b { font-variant-numeric:tabular-nums; }

.ep { display:block; width:100%; height:100%; touch-action:none; cursor:grab; user-select:none; }
.ep:active { cursor:grabbing; }
.ep line, .ep polyline, .ep path, .ep polygon { vector-effect:non-scaling-stroke; fill:none; stroke-linecap:round; }
.ep-axes line { stroke:var(--ink2); stroke-width:1px; }
.ep .ep-ax { font:italic 600 4.4px var(--fb); fill:var(--ink2); }
.ep-main { stroke:var(--ink); stroke-width:1.6px; }
.ep-fig { stroke:var(--ink); stroke-width:2.2px; fill:color-mix(in srgb,var(--lapis) 12%,transparent) !important; }
.ep-link { stroke:var(--ink3); stroke-width:.8px; }
.ep-aux, .ep-arc { stroke:var(--ink2); stroke-width:1px; stroke-dasharray:5 3; }
.ep-arc { stroke-dasharray:none; }
.ep-hl, .ep-hl2 { stroke:var(--ink); stroke-width:1.5px; }
.ep-mark { stroke:var(--ink2); stroke-width:1px; }
.ep .now { stroke:var(--cin); }
.ep .ep-hl.now, .ep .ep-main.now { stroke-width:2.4px; }
.ep .ep-aux.now { stroke:var(--cin); stroke-width:1.4px; }
.ep .ep-fig.now { stroke:var(--cin); fill:color-mix(in srgb,var(--cin) 12%,transparent) !important; }
.ep circle { fill:var(--ink); stroke:none; }
.ep circle.now, .ep circle.hl.now { fill:var(--cin); }
.ep .ep-t { font:italic 600 4.6px var(--fb); fill:var(--ink); paint-order:stroke; stroke:var(--surf); stroke-width:1.2px; stroke-linejoin:round; }
.ep .ep-t.now { fill:var(--cin); }
.ep .ep-dim { font:500 3.4px var(--fb); fill:var(--ink2); font-style:normal; }
.ep .ep-dim.now, .ep .ep-angt.now { fill:var(--cin); }
.ep .ep-angt { font-size:3.8px; }
.ep circle.ep-o { fill:none; vector-effect:non-scaling-stroke; }
.ep .ep-c { stroke-linejoin:round; }
.ep-res { stroke:var(--lapis); stroke-width:2.3px; }
.ep polygon.ep-res { fill:color-mix(in srgb,var(--lapis) 14%,transparent); }
.ep-hid { stroke:var(--ink); stroke-width:1.2px; stroke-dasharray:4 2.5; }
.ep-resh { stroke:var(--lapis); stroke-width:1.6px; stroke-dasharray:4 2.5; }
.ep-axis { stroke:var(--ink2); stroke-width:1px; }
.ep-trace { stroke:var(--ochre); stroke-width:1.8px; }
.ep-surf { stroke:var(--ink); stroke-width:1.4px; }
.ep-thin { stroke:var(--ink2); stroke-width:.8px; }
.ep polygon.ep-face { stroke:var(--ink); stroke-width:1.4px; fill:color-mix(in srgb,var(--lapis) 10%,transparent); }
.ep circle.res { fill:var(--lapis); }
.ep .ep-t.res { fill:var(--lapis); }
.ep .ep-rest { fill:var(--lapis); font-weight:700; }
.ep .ep-res.now { stroke:var(--cin); }
.ep .ep-hid.now, .ep .ep-resh.now { stroke:var(--cin); }
.ep .ep-trace.now, .ep .ep-axis.now, .ep .ep-thin.now { stroke:var(--cin); }

/* чат: ничего не вылезает за края */
.msg, .msg.ai .md { min-width:0; max-width:100%; }
.msg.ai .md { overflow-x:auto; }
.msg.me .bubble { white-space:normal; overflow-wrap:anywhere; }
.ac-in textarea { white-space:pre-wrap; overflow-wrap:anywhere; overflow-x:hidden; }
.md .katex-display, .mathd { overflow-x:auto; overflow-y:hidden; max-width:100%; }
.md img, .md svg { max-width:100%; }
.md code { overflow-wrap:anywhere; }
.ac-send-hint { font-size:11.5px; color:var(--ink3); text-align:center; margin:4px 0 0; }
@media (pointer:coarse) { .ac-send-hint { display:none; } }

/* нижняя панель: посередине — помощник */
.tabs .tab-ai { color:var(--violet); }
.tab-ai-c { display:flex; align-items:center; justify-content:center; width:36px; height:26px; border-radius:999px; background:color-mix(in srgb,var(--violet) 14%,transparent); }
.tab-ai-c .ic { width:20px; height:20px; }
.tabs .tab-ai:active { transform:scale(.94); }
.tabind { transition:transform .5s var(--spring), opacity .25s; }
.topbar .circ.ai { color:var(--violet); }
.tb-side.r { gap:8px; }

/* экран входа и «нет доступа» */
body.gated { padding-bottom:0; }
.gate { min-height:calc(100vh - 80px); display:flex; flex-direction:column; justify-content:center; align-items:stretch; text-align:center; max-width:420px; margin:0 auto; padding:24px 0; }
.gate .h1 { margin-top:18px; }
.gate .sub { margin:10px 0 22px; line-height:1.5; }
.gate .btn { margin:6px 0; }
.gate-logo { align-self:center; display:block; width:78px; height:78px; border-radius:22px; box-shadow:0 12px 30px color-mix(in srgb,var(--lapis) 35%,transparent); }
.gate-logo .ic { width:40px; height:40px; }
.gate-who { display:flex; align-items:center; gap:12px; text-align:left; padding:12px 14px; margin:0 0 14px; border-radius:20px; background:var(--surf); }
.gate-who > span:last-child { display:flex; flex-direction:column; } .gate-who b { font-size:15px; } .gate-who span span { font-size:13.5px; color:var(--ink2); }

/* «Как устроен сайт» в профиле */
.card.list.guide { padding:4px 8px; }
.guide .li { flex-direction:row; align-items:center; gap:14px; padding:11px 8px; width:100%; background:none; border:0; text-align:left; color:inherit; font:inherit; text-decoration:none; cursor:pointer; border-radius:14px; }
.guide .li + .li { border-top:1px solid var(--line); }
.guide .li > .ic { flex:none; width:22px; height:22px; color:var(--lapis); }
.guide .li > span { display:flex; flex-direction:column; gap:1px; }
.guide .li span span { font-size:13.5px; }

/* подготовка к РК */
.hero-go { display:inline-flex; align-items:center; gap:4px; margin-top:14px; padding:8px 14px 8px 16px; border-radius:999px; font-weight:700; font-size:14.5px; background:rgba(255,255,255,.2); }
.hero-go .ic { width:16px; height:16px; }
a.hub-hero { display:block; text-decoration:none; color:var(--heroInk); }
.rkline { display:flex; gap:8px; overflow-x:auto; padding:2px 0 6px; scrollbar-width:none; }
.rkline::-webkit-scrollbar { display:none; }
.rkp { flex:none; display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:104px; padding:10px 14px; border:0; border-radius:16px; text-align:left; color:var(--ink); background:color-mix(in srgb,var(--c) 12%,var(--surf)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c) 25%,transparent); }
.rkp b { font-size:15px; color:var(--c); } .rkp span { font-size:13px; color:var(--ink2); }
.rkp.past { opacity:.5; }
.rkp:active { transform:scale(.96); }

/* чат: инкогнито */
.ac-incog { align-items:center; }
.ac-incog span { flex:1; }
.ac-incog button { flex:none; border:0; border-radius:999px; padding:6px 12px; font:inherit; font-weight:700; font-size:13px; color:var(--violet); background:color-mix(in srgb,var(--violet) 14%,transparent); }
.ac-incog-btn { display:inline-flex; align-items:center; gap:8px; margin-top:14px; padding:8px 14px; border:0; border-radius:999px; font:inherit; font-size:13.5px; font-weight:600; color:var(--ink2); background:none; box-shadow:inset 0 0 0 1px var(--line); }
.ac-incog-btn .ic { width:17px; height:17px; }

/* «Доступ ограничен»: фото во всю ширину, лента касается краёв экрана */
.denied { position:fixed; inset:0; z-index:40; overflow-y:auto; background:#0A0A0C; color:#F4F4F6; -webkit-overflow-scrolling:touch; }
.denied-ph { display:block; }
.denied-ph img { display:block; width:100vw; height:auto; aspect-ratio:1; object-fit:cover; animation:dnIn .9s var(--ease) both; }
.denied-in { position:relative; max-width:480px; margin:-14vw auto 0; padding:0 20px calc(28px + env(safe-area-inset-bottom,0px)); display:flex; flex-direction:column; gap:10px; animation:dnUp .7s .15s var(--ease) both; }
.denied-in::before { content:""; position:absolute; left:-50vw; right:-50vw; top:-10vw; height:24vw; background:linear-gradient(to bottom, transparent, #0A0A0C 70%); z-index:-1; }
.denied-tape { height:10px; margin:0 0 8px; border-radius:3px; background:repeating-linear-gradient(-45deg,#FFD31A 0 14px,#111 14px 28px); box-shadow:0 2px 10px rgba(255,211,26,.25); }
.denied h1 { font-family:var(--fd); font-size:30px; font-weight:700; line-height:1.15; margin:0; letter-spacing:-.01em; }
.denied p { margin:0 0 6px; font-size:15.5px; line-height:1.5; color:#B9BCC6; }
.denied p b { color:#FFD31A; }
.denied .denied-s { font-size:13.5px; color:#8D919C; }
.denied-who { display:flex; align-items:center; gap:12px; padding:12px 14px; margin:0 0 6px; border-radius:20px; background:#17181D; box-shadow:inset 0 0 0 1px #24262D; }
.denied-who .circ.av { flex:none; }
.denied-who > span:last-child { display:flex; flex-direction:column; } .denied-who b { font-size:15px; } .denied-who span span { font-size:13.5px; color:#8D919C; }
.dbtn { display:flex; align-items:center; justify-content:center; gap:10px; min-height:52px; padding:0 18px; border:0; border-radius:18px; font:inherit; font-size:16px; font-weight:700; text-decoration:none; color:#F4F4F6; background:#1D1F25; cursor:pointer; transition:transform .2s var(--ease); }
.dbtn .ic { width:20px; height:20px; }
.dbtn.y { color:#111; background:#FFD31A; box-shadow:0 8px 24px rgba(255,211,26,.22); }
.dbtn.ghost { background:none; color:#8D919C; min-height:44px; font-weight:600; }
.dbtn:active { transform:scale(.97); }
@keyframes dnIn { from { opacity:0; transform:scale(1.06); } to { opacity:1; transform:none; } }
@keyframes dnUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
/* широкий экран: фото во всю высоту слева (лента уходит за края), текст справа */
@media (min-aspect-ratio:1/1) and (min-width:700px) {
  .denied { display:grid; grid-template-columns:min(100vh,60vw) 1fr; align-items:center; }
  .denied-ph { position:sticky; top:0; }
  .denied-ph img { width:min(100vh,60vw); height:100vh; }
  .denied-in { margin:0 auto; padding:24px 40px; }
  .denied-in::before { display:none; }
}
@media (prefers-reduced-motion:reduce) { .denied-ph img, .denied-in { animation:none; } }

/* Рабочая тетрадь по НГ */
.wb-search { display:flex; align-items:center; gap:10px; padding:0 14px; height:48px; border-radius:16px; background:var(--surf); box-shadow:inset 0 0 0 1px var(--line); margin:4px 0 8px; }
.wb-search .ic { width:18px; height:18px; color:var(--ink3); flex:none; }
.wb-search input { flex:1; min-width:0; border:0; background:none; font:inherit; font-size:15.5px; color:var(--ink); outline:none; }
.wb-src { margin-top:0; }
.wb-ch[hidden], .wb-row[hidden], .wb-sub[hidden] { display:none; }
.wb-list { padding:4px 0; }
.wb-sub { padding:12px 16px 4px; font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--ink3); }
.wb-row { display:flex; align-items:center; gap:12px; padding:10px 14px; color:var(--ink); text-decoration:none; border-radius:14px; }
.wb-row:hover { background:var(--surf2); }
.wb-row .rl { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.wb-row .rt { font-weight:650; font-size:15px; line-height:1.3; }
.wb-row .rs { font-size:12.5px; color:var(--ink3); }
.wb-row > .ic { width:16px; height:16px; color:var(--ink3); flex:none; }
.wb-n { flex:none; width:36px; height:36px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-weight:800; font-variant-numeric:tabular-nums; background:color-mix(in srgb,var(--lapis) 12%,transparent); color:var(--lapis); }
.wb-row.seen .wb-n { background:var(--lapis); color:#fff; }
.wb-cond { display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.wb-cond p { margin:0; }
.wb-parts { margin:12px 0 0; }
.wb-intro { margin:12px 4px 0; font-size:14.5px; }
.wb-note { display:flex; gap:10px; align-items:flex-start; font-size:14px; }
.wb-note > .ic { flex:none; width:18px; height:18px; color:var(--ochre); margin-top:2px; }
.wb-note .md p:first-child { margin-top:0; } .wb-note .md p:last-child { margin-bottom:0; }
.wb-pn { display:flex; justify-content:space-between; gap:10px; margin:18px 0 8px; }
.ep-brace { stroke:var(--ink2); stroke-width:1px; stroke-linejoin:round; }
.ep-tick { stroke:var(--ink); stroke-width:1.3px; fill:none; }
.ep .ep-brace.now, .ep .ep-tick.now { stroke:var(--cin); }
.ep-tr2 { stroke:var(--ochre); stroke-width:1px; stroke-dasharray:6 2 1.5 2; }
.ep .ep-tr2.now { stroke:var(--cin); }

/* ---------- админ-панель (#/admin) ---------- */
.ap-load { display:flex; justify-content:center; padding:48px 0; }
.ap-tiles { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:16px 0 4px; }
.ap-tile { display:flex; flex-direction:column; gap:3px; padding:14px; border-radius:20px; background:var(--surf); }
.ap-tile b { font-family:var(--fd, inherit); font-size:26px; line-height:1.1; color:var(--c); font-variant-numeric:tabular-nums; }
.ap-tile b small { font-size:15px; color:var(--ink3); font-weight:700; }
.ap-tile span { font-size:14px; font-weight:600; }
.ap-tile i { font-style:normal; font-size:12.5px; color:var(--ink2); line-height:1.35; }
.ap-names { display:flex; flex-wrap:wrap; gap:6px; }
.ap-names span { padding:6px 11px; border-radius:999px; background:var(--surf2); font-size:13.5px; font-weight:600; }
.ap-kv { flex-direction:row; justify-content:space-between; align-items:baseline; gap:12px; }
.ap-kv span { text-align:right; }
.ap-bad { background:color-mix(in srgb,var(--cin) 11%,var(--surf)); } .ap-bad > .ic:first-child { color:var(--cin); }
.ap-legend { display:flex; flex-wrap:wrap; gap:12px; margin:14px 2px 0; font-size:12.5px; color:var(--ink2); }
.ap-legend span { display:flex; align-items:center; gap:5px; }
.ap-dot { flex:none; width:10px; height:10px; border-radius:50%; background:var(--line); }
.ap-dot.day { background:var(--mal); } .ap-dot.week { background:var(--ochre); } .ap-dot.old { background:var(--ink3); } .ap-dot.bl { background:var(--cin); }
.ap-dot.no { background:none; box-shadow:inset 0 0 0 2px var(--line); }
.ap-n { display:inline-block; min-width:26px; color:var(--ink3); font-variant-numeric:tabular-nums; }
.ap-p:disabled { opacity:.6; }
.ap-red { color:var(--cin); }
.ap-foot { margin:14px 4px 0; font-size:12.5px; color:var(--ink3); line-height:1.45; }
.ap-log { align-items:flex-start; min-height:0; }
.ap-log[data-post] { cursor:pointer; }
.ap-log .rt { font-size:15px; overflow-wrap:anywhere; }
.ap-sm { font-size:14px !important; font-weight:500 !important; }
.ap-when { font-size:12px; color:var(--ink3); }
.ap-mute { color:var(--ink3); }
.ap-rest { flex:none; align-self:center; }
.ap-hw { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--mal) 45%,transparent); }
.ap-chart { position:relative; padding:16px 14px 10px; }
.ap-bars { display:flex; align-items:flex-end; gap:2px; height:120px; border-bottom:1px solid var(--line); }
.ap-bar { flex:1; height:100%; display:flex; align-items:flex-end; cursor:pointer; outline:none; }
.ap-bar i { display:block; width:100%; border-radius:4px 4px 0 0; background:var(--violet); transition:opacity .15s; }
.ap-bar:hover i, .ap-bar:focus i { opacity:.7; }
.ap-axis { display:flex; justify-content:space-between; margin-top:6px; font-size:11.5px; color:var(--ink3); }
.ap-tip { position:absolute; top:4px; padding:5px 9px; border-radius:10px; background:var(--ink); color:var(--bg); font-size:12.5px; font-weight:600; white-space:nowrap; pointer-events:none; }
.ap-table { padding:6px 12px; overflow-x:auto; }
.ap-table table { width:100%; border-collapse:collapse; font-size:13.5px; font-variant-numeric:tabular-nums; }
.ap-table th { text-align:right; font-size:11.5px; color:var(--ink3); font-weight:700; padding:8px 4px; }
.ap-table th:first-child, .ap-table td:first-child { text-align:left; }
.ap-table td { text-align:right; padding:8px 4px; border-top:1px solid var(--line); }
.ap-table code { font-size:12px; }
.ap-form { display:flex; flex-direction:column; gap:10px; }
.ap-form .btn { margin:0; }
.ap-chk { display:flex; align-items:center; gap:8px; font-size:14px; color:var(--ink2); }
.ap-sw { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; }
.ap-sw > span { display:flex; flex-direction:column; gap:2px; }
.ap-sw input[type=checkbox] { flex:none; width:22px; height:22px; accent-color:var(--violet); }
.ap-time { width:auto; min-height:38px; padding:4px 10px; }
.ap-code { font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.ap-form .inp { background:var(--surf2); }

/* главная: приветствие и кнопки в первой строке, строка недели — во всю ширину и в одну строку */
.ph.home-h { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"t b" "w w"; align-items:start; column-gap:12px; }
.home-h > div:first-child { grid-area:t; }
.home-h > .ph-btns { grid-area:b; }
.home-h .hh-week { grid-area:w; margin-top:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:350px) { .home-h .hh-week { font-size:13.5px; } }

/* 3D: подписи чертежа построения на плоскостях и размеры в пространстве */
.ng-lb.ep3 { font-size:11px; font-weight:700; font-style:italic; color:var(--ink2); }
.ng-lb.ep3.ptl { font-size:12px; color:var(--ink); }
.ng-lb.ep3.ang { font-style:italic; }
.ng-lb.ep3.res { color:var(--lapis); }
.ng-lb.ep3.now, .ng-lb.dim3 { color:var(--cin); }
.ng-lb.dim3 { font-size:12.5px; font-style:italic; }

/* ======================= плавность ======================= */
.a-none { }
#tabs { view-transition-name:tabbar; }  /* имя на самой панели: на #tabwrap оно отключило бы размытие фона под ней */
::view-transition-group(tabbar) { animation-duration:.3s; }
html[data-vt="fwd"]::view-transition-old(root) { animation:vtOutL .24s var(--ease) both; }
html[data-vt="fwd"]::view-transition-new(root) { animation:vtInR .38s var(--ease) both; }
html[data-vt="back"]::view-transition-old(root) { animation:vtOutR .24s var(--ease) both; }
html[data-vt="back"]::view-transition-new(root) { animation:vtInL .38s var(--ease) both; }
html[data-vt="tab"]::view-transition-old(root) { animation:vtFadeOut .18s ease both; }
html[data-vt="tab"]::view-transition-new(root) { animation:vtFadeIn .34s var(--ease) both; }
@keyframes vtOutL { to { opacity:0; transform:translateX(-28px); } }
@keyframes vtOutR { to { opacity:0; transform:translateX(28px); } }
@keyframes vtInR { from { opacity:0; transform:translateX(40px); } }
@keyframes vtInL { from { opacity:0; transform:translateX(-40px); } }
@keyframes vtFadeOut { to { opacity:0; } }
@keyframes vtFadeIn { from { opacity:0; transform:translateY(8px) scale(.995); } }
/* смена шага решения, режима «эпюр / 3D», линии и точки текущего шага */
.dz-step.swap { animation:stepIn .34s var(--ease) both; }
@keyframes stepIn { from { opacity:0; transform:translateY(6px); } }
.dz-ep:not([hidden]), .dz-3d:not([hidden]) { animation:fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity:0; } }
.ep .now { animation:fadeIn .45s ease both; }
.ep circle.now { animation:dotIn .45s var(--spring) both; transform-box:fill-box; transform-origin:center; }
@keyframes dotIn { from { opacity:0; transform:scale(.2); } }
.pills a, .pills button, .seg2 a, .seg2 button, .stabs a, .dz-steps button, .chk-o, .circ, .btn, .row, .stile, .notice, .lesson, .wb-row, .pillbtn { transition:background-color .25s, color .25s, box-shadow .25s, transform .22s var(--ease), opacity .25s; }
.viewer.out { animation:fadeIn .2s ease reverse both; }
@media (hover:hover) and (pointer:fine) {
  .row:hover:not(.static):not(:disabled), .wb-row:hover, a.lesson:hover { background:color-mix(in srgb,var(--lapis) 5%,var(--surf)); }
  .pills a:hover:not(.on), .pills button:hover:not(.on), .stabs a:hover:not(.on), .dz-steps button:hover:not(.on) { background:var(--surf2); }
  .circ:hover:not(:disabled):not(.acc):not(.av), .pillbtn:hover { background:var(--surf2); }
  .btn:hover:not(:disabled) { filter:brightness(1.04); }
  .stile:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
  .hub-hero:hover { transform:translateY(-2px); }
}

/* ======================= планшет и компьютер ======================= */
.tabs .rail-brand, .tabs .rail-x { display:none; }
.tabs-main { display:contents; }
.cols2 > .row { margin-bottom:10px; }

/* планшет в портретной ориентации: шире поля, всё крупнее */
@media (min-width:700px) {
  #app { max-width:760px; padding-left:28px; padding-right:28px; }
  .topbar { margin:0 -28px; padding:12px 28px; }
  .stabs { margin:16px -28px 0; padding:8px 28px; }
  .pills.scroll { margin:0 -28px 14px; padding:0 28px; }
  .dz-steps { margin:12px -28px 0; padding:2px 28px 6px; }
  .cols2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .cols2 > .row { margin:0; }
  .h1 { font-size:32px; }
  .dz-view { height:min(66vh, 680px); }
  .ng-stage { height:min(62vh, 620px); }
  #sheet .spanel { max-width:680px; }
}

/* широкий экран: боковая панель вместо нижней, две колонки на главной и в решениях */
@media (min-width:1024px) {
  body.hub { padding-left:252px; }
  body.hub.gated { padding-left:0; }
  body.gated #tabwrap { display:none; }
  #tabwrap, #tabwrap.hide { left:0; right:auto; top:0; bottom:0; width:252px; padding:16px 0 16px 16px; display:block; transform:none; opacity:1; pointer-events:auto; }
  #tabwrap .tabs { display:flex; flex-direction:column; gap:4px; height:100%; max-width:none; padding:16px 12px; border-radius:28px; overflow-y:auto; }
  .tabs .rail-brand { display:flex; align-items:center; gap:12px; padding:4px 8px 18px; text-decoration:none; color:var(--ink); }
  .rail-logo { width:42px; height:42px; border-radius:12px; display:block; box-shadow:0 8px 20px color-mix(in srgb,var(--lapis) 30%,transparent); }
  .rail-brand b { display:block; font-family:var(--fd); font-size:16px; font-weight:600; }
  .rail-brand span span { display:block; font-size:12.5px; color:var(--ink2); }
  .tabs-main { position:relative; display:flex; flex-direction:column; }
  .tabs-main > a, .tabs-main > button, .rail-x a { position:relative; z-index:1; flex-direction:row; justify-content:flex-start; gap:14px; height:50px; padding:0 14px; border-radius:16px; font-size:15px; font-weight:700; color:var(--ink2); text-decoration:none; }
  .tabs-main > a span, .tabs-main > button > span:last-child, .rail-x a span { font-size:15px; }
  .tabs-main > a.on { color:var(--lapis); }
  .tabs-main > .tab-ai { color:var(--violet); }
  .tabs-main .tab-ai-c { width:23px; height:23px; background:none; }
  .tabs-main .tab-ai-c .ic { width:22px; height:22px; }
  .tabind { top:0; left:0; right:0; bottom:auto; width:auto; height:50px; border-radius:16px; }
  .tabs .rail-x { display:flex; flex-direction:column; gap:2px; margin-top:auto; padding-top:12px; border-top:1px solid var(--line); }
  .rail-x a { display:flex; align-items:center; }
  .rail-x a .ic { width:22px; height:22px; }
  .rail-x a.on { color:var(--lapis); background:color-mix(in srgb,var(--lapis) 10%,transparent); }
  body.notabs .topbar .circ.ai { display:none; }
  .home-h .ph-btns { display:none; }

  #app { max-width:920px; padding:0 36px 72px; }
  body[data-screen="home"] #app, body[data-screen="ng"] #app, body[data-screen="calendar"] #app, body[data-screen="subjects"] #app { max-width:1260px; }
  .topbar { margin:0 -36px; padding:14px 36px; }
  .stabs { margin:16px -36px 0; padding:8px 36px; }
  .pills.scroll { margin:0 -36px 14px; padding:0 36px; }
  .ph { padding-top:30px; }
  .h1 { font-size:34px; }

  /* главная: слева — ближайшее, пары и план, справа — домашка и предметы */
  .home-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:0 36px; align-items:start; }
  .hg-side > .h2:first-child { margin-top:12px; }
  .hub-hero .hh-n b { font-size:52px; }

  /* решение по шагам: чертёж слева (закреплён), шаги справа */
  .sol { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(360px,1fr); gap:28px; align-items:start; margin-top:4px; }
  .sol-fig { position:sticky; top:76px; }
  .sol-fig .dz-mode { margin-top:0; }
  .sol-fig .dz-view { height:calc(100vh - 168px); min-height:460px; margin:12px 0 0; }
  .sol-fig .dz-ep, .sol-fig .dz-3d { border-radius:26px; overflow:hidden; }
  .sol-fig .dz-unf { margin:12px 0 0; }
  .sol-side .dz-steps { margin:0; padding:2px 0 8px; flex-wrap:wrap; overflow:visible; }
  .sol-side .dz-nav { margin-top:10px; }
  .sol-side .dz-step { min-height:200px; }
  .sol-side .dz-step .md { font-size:15.5px; }
  /* 3D-модель: сцена слева, настройки справа */
  .ng { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(340px,1fr); gap:28px; align-items:start; }
  .ng-fig { position:sticky; top:76px; }
  .ng-fig .ng-stage { height:calc(100vh - 220px); min-height:440px; }
  .ng-side .seg2 { margin-top:0; }

  /* лист — по центру экрана, как окно */
  #sheet .spanel { left:50%; right:auto; top:50%; bottom:auto; width:min(620px, calc(100% - 48px)); max-width:none; max-height:min(82vh, 820px); margin:0; border-radius:28px; opacity:0; transform:translate(-50%,-46%) scale(.97); transition:transform .38s var(--ease), opacity .25s; box-shadow:var(--shadow); }
  #sheet.open .spanel { opacity:1; transform:translate(-50%,-50%); }
  #sheet .grab { display:none; }
  #sheet .sheet-head { padding-top:16px; }
}
@media (min-width:1400px) {
  body.hub { padding-left:272px; }
  #tabwrap, #tabwrap.hide { width:272px; }
}

/* решение: заголовок с условием — над чертежом на телефоне, справа от него на широком экране */
.sol-head > .ph:first-child { padding-top:22px; }
@media (min-width:1024px) {
  .tabs a.rail-brand { flex-direction:row; align-items:center; gap:12px; padding:4px 8px 18px; border-radius:0; font-size:inherit; color:var(--ink); }
  .ph.home-h > .ph-btns { display:none; }
  .sol { grid-template-areas:"fig head" "fig side"; grid-template-rows:auto 1fr; gap:0 28px; margin-top:0; }
  .sol-head { grid-area:head; }
  .sol-head .ph { padding-top:18px; }
  .sol-head .h1 { font-size:30px; }
  .sol-head .pills.scroll { margin:0 0 12px; padding:0; flex-wrap:wrap; overflow:visible; }
  .sol-fig { grid-area:fig; top:72px; padding-top:18px; }
  .sol-fig .dz-view { height:calc(100vh - 160px); }
  .sol-fig:has(.dz-unf:not([hidden])) .dz-view { height:calc(100vh - 240px); }
  .sol-side { grid-area:side; padding-top:14px; }
  .wb-pn { margin-top:28px; }
}

/* эпюр: размер подписей и точек не меньше читаемого (--ls считает epure.js по масштабу) */
.ep .ep-t { font-size:calc(4.6px * var(--ls, 1)); }
.ep .ep-dim { font-size:calc(3.4px * var(--ls, 1)); }
.ep .ep-angt { font-size:calc(3.8px * var(--ls, 1)); }
.ep .ep-ax { font-size:calc(4.4px * var(--ls, 1)); }
.ep circle.ep-p { r:calc(.9px * var(--ls, 1)); }
.ep circle.ep-p.sm { r:calc(.6px * var(--ls, 1)); }

/* таблица календаря на широком экране — крупнее, весь семестр помещается без прокрутки */
@media (min-width:1024px) {
  .ptable { border-spacing:4px; font-size:14px; }
  .ptable thead th { min-width:46px; }
  .ptable td { height:42px; border-radius:10px; }
  .ptable td button { min-width:46px; min-height:42px; border-radius:10px; font-size:13px; }
  .ptable .pt-s a { font-size:14.5px; }
}
@media (min-width:1024px) {
  .post-v > .btn { display:inline-flex; width:auto; min-width:240px; padding:0 24px; margin:8px 8px 0 0; }
  .post-v .h1.pt { font-size:32px; }
}

/* календарь ДЗ по неделям (#/hw/week) */
.seg2.four { grid-template-columns:repeat(4,1fr); }
.seg2.four a { font-size:13.5px; padding:0 4px; white-space:nowrap; }
.hwk-nav { display:flex; align-items:center; gap:10px; margin:2px 0 10px; }
.hwk-nav .circ { flex:none; }
.hwk-t { flex:1; min-width:0; text-align:center; display:flex; flex-direction:column; }
.hwk-t b { font-family:var(--fd); font-size:17px; font-weight:600; } .hwk-t span { font-size:13px; color:var(--ink2); }
.hwk-now { width:100%; }
.hwk-prog { display:flex; flex-direction:column; gap:7px; background:var(--surf); border-radius:18px; padding:12px 14px; margin-bottom:10px; }
.hwk-pt { font-size:14px; } .hwk-pt b { font-weight:700; }
.hwk-bar { display:block; height:8px; border-radius:8px; background:var(--line); overflow:hidden; }
.hwk-bar i { display:block; height:100%; border-radius:8px; background:var(--mal); transition:width .4s var(--ease); }
.hwk-d { background:var(--surf); border-radius:22px; padding:12px 12px 6px; margin-bottom:10px; scroll-margin-top:70px; }
.hwk-d.cur { box-shadow:inset 0 0 0 2.5px var(--lapis), 0 6px 20px color-mix(in srgb,var(--lapis) 14%,transparent); }
.hwk-d.past { opacity:.62; }
.hwk-dh { display:flex; align-items:baseline; gap:8px; padding:0 4px 8px; }
.hwk-dh b { font-family:var(--fd); font-size:16px; font-weight:600; } .hwk-dh span { font-size:13px; color:var(--ink2); }
.hwk-d.cur .hwk-dh b { color:var(--lapis); }
.hwk-dh .pill { margin-left:auto; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; color:var(--lapis); background:color-mix(in srgb,var(--lapis) 12%,transparent); }
.hwk-dh .pill.n { color:var(--ink2); background:var(--bg); }
.hwk-ev { display:flex; align-items:center; gap:10px; width:100%; margin:0 0 8px; padding:7px 9px; border:0; border-radius:14px; background:var(--bg); color:inherit; font:inherit; font-size:13.5px; text-align:left; }
.hwk-ev .ev-b { width:30px; height:30px; border-radius:9px; font-size:11px; }
.hwk-l { border-top:1px solid var(--line); padding:8px 0; }
.hwk-l:first-of-type, .hwk-ev + .hwk-l { border-top:0; }
.hwk-l.dim { opacity:.55; }
.hwk-lh { display:flex; align-items:center; gap:8px; }
.hwk-lt { flex:1; min-width:0; display:flex; align-items:center; gap:12px; padding:2px 4px; border-radius:12px; color:inherit; text-decoration:none; }
a.hwk-lt:active { background:var(--press); }
.hwk-lt .rt { font-size:15px; } .hwk-lt .rs { font-size:12.5px; }
.hwk-l:not(.has) .hwk-lt .rs { color:var(--ink3); }
.hwk-add { flex:none; width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:var(--ink3); background:var(--bg); }
.hwk-add .ic { width:17px; height:17px; }
.hwk-add:hover { color:var(--lapis); }
.hwk-hw { margin:6px 0 2px 62px; }
.hwk-hw .row { background:var(--bg); min-height:54px; margin-bottom:6px; }
@media (max-width:380px) { .hwk-hw { margin-left:0; } .seg2.four a { font-size:12.5px; } }
@media (min-width:1024px) { .hwk { display:grid; grid-template-columns:1fr 1fr; gap:10px; align-items:start; } .hwk-d { margin:0; } }

/* ---------- матанализ: решения ДЗ 2, РК 1, семинары ---------- */
.mz-top { display:flex; flex-direction:column; gap:8px; margin:0 0 6px; }
.mz-eq { padding:12px 16px; }
.mz-eq summary { display:flex; align-items:center; gap:8px; font-weight:700; font-size:14.5px; cursor:pointer; list-style:none; }
.mz-eq summary::-webkit-details-marker { display:none; }
.mz-eq summary .ic { width:18px; height:18px; color:var(--violet); flex:none; }
.mz-eq .md { font-size:14.5px; }
.mz-task { margin:12px 0; }
.mz-h { display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.mz-h b { font-family:var(--fd); font-size:17px; }
.mz-h span { font-size:13px; color:var(--ink2); }
.mz-q { margin:8px 0 4px; }
.ch-cnote { font-size:14px; color:var(--ink2); }
.ch-ctab { margin:10px 0 2px; overflow-x:auto; }
.ch-ctcap { font-size:12px; font-weight:700; color:var(--ink3); text-transform:uppercase; letter-spacing:.04em; margin-bottom:6px; }
.ch-ctab table { border-collapse:collapse; font-size:14px; min-width:100%; }
.ch-ctab th, .ch-ctab td { border:1px solid color-mix(in srgb,var(--ink) 16%,transparent); padding:6px 9px; text-align:center; vertical-align:middle; }
.ch-ctab th, .ch-ctab td { overflow-wrap:normal; word-break:normal; hyphens:manual; }
.ch-crow { padding:8px 12px; border-radius:12px; background:var(--surf2); overflow-x:auto; }
.ch-crow .katex-display { margin:4px 0; }
.ch-cone { line-height:2; }
.ch-ceq { font-size:16px; line-height:2; text-align:center; }
.ch-ceq span { white-space:nowrap; }
.ch-ctab tr > :first-child { white-space:nowrap; }
.ch-ctab th { font-weight:600; font-size:12.5px; color:var(--ink2); background:var(--surf2); }
.mz-steps { margin:6px 0 0; padding-left:24px; }
.mz-step { margin:0 0 8px; padding-left:4px; animation:mzIn .35s ease both; }
.mz-step::marker { color:var(--violet); font-weight:800; }
@keyframes mzIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.mz-ans { display:flex; flex-direction:column; gap:2px; margin:10px 0 2px; padding:10px 14px; border-radius:14px; background:color-mix(in srgb,var(--mal) 12%,var(--surf)); }
.mz-ans > span { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--mal); }
.mz-ans .md { margin:2px 0 0; font-weight:600; }
.mz-btns { display:flex; flex-wrap:wrap; gap:6px 8px; margin-top:8px; }
.mz-btns .btn { margin:0; flex:1 1 auto; }
.mz-plot { margin:10px 0 0; }
.mz-plot svg { display:block; width:100%; max-width:520px; height:auto; margin:0 auto; background:var(--surf); border-radius:14px; }
.mz-plot .g { stroke:var(--line); stroke-width:.6; }
.mz-plot .ax { stroke:var(--ink3); stroke-width:1.1; }
.mz-plot .t { fill:var(--ink3); font-size:9px; text-anchor:middle; font-family:inherit; }
.mz-plot .t.b { fill:var(--ink2); font-weight:700; font-size:11px; }
.mz-plot .c { fill:none; stroke:var(--lapis); stroke-width:2.2; stroke-linejoin:round; stroke-linecap:round; }
.mz-plot .as, .mz-plot .dl { stroke:var(--cin); stroke-width:1.1; stroke-dasharray:4 4; }
.mz-plot .dl { stroke:var(--mal); }
.mz-plot .hl { stroke:var(--ochre); stroke-width:1.3; stroke-dasharray:6 3; }
.mz-plot .bd { fill:color-mix(in srgb,var(--ochre) 18%,transparent); }
.mz-plot .h { fill:var(--bg); stroke:var(--lapis); stroke-width:2; }
.mz-plot .d { fill:var(--lapis); }
.mz-leg { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 14px; margin-top:6px; font-size:12px; color:var(--ink2); }
.mz-leg i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:5px; vertical-align:-1px; }
.mz-leg i.d { background:var(--lapis); } .mz-leg i.h { border:2px solid var(--lapis); width:6px; height:6px; }
.mz-leg i.as { width:14px; height:0; border-radius:0; border-top:2px dashed var(--cin); vertical-align:3px; }
.rk-q { margin:8px 0; transition:box-shadow .2s; }
.rk-q.ok { box-shadow:inset 4px 0 0 var(--mal); }
.rk-q.again { box-shadow:inset 4px 0 0 var(--ochre); }
.rk-ql { display:flex; flex-direction:column; gap:4px; }
.rk-n { font-size:12px; font-weight:800; color:var(--cin); text-transform:uppercase; letter-spacing:.04em; }
.rk-qt { font-size:15.5px; font-weight:600; line-height:1.45; }
.rk-show { margin:10px 0 0; }
.rk-a { margin-top:8px; animation:mzIn .3s ease both; }
.rk-src { display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--ochre); margin:4px 0; }
.rk-src.ok { color:var(--mal); } .rk-src .ic { width:14px; height:14px; }
.rk-btns { display:flex; gap:8px; } .rk-btns .btn { flex:1; margin:6px 0 0; }
.rk-prog { display:flex; flex-direction:column; gap:4px; margin:12px 0; }
.rk-prog span { font-size:13px; color:var(--ink2); }
.rk-prog .bar { height:8px; border-radius:99px; background:var(--surf2); overflow:hidden; margin-top:4px; }
.rk-prog .bar i { display:block; height:100%; background:var(--mal); border-radius:99px; transition:width .4s; }
.ms { margin:10px 0; }
.ms.cur { box-shadow:0 0 0 2px var(--cin); }
.ms.past { opacity:.62; }
.ms.rk { background:color-mix(in srgb,var(--cin) 9%,var(--surf)); }
.ms-h { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 10px; }
.ms-h b { font-family:var(--fd); font-size:17px; }
.ms-d { font-size:13px; color:var(--ink2); margin-left:auto; }
.ms-now { font-size:11.5px; font-weight:800; color:#fff; background:var(--cin); border-radius:99px; padding:2px 8px; }
.ms-t { margin:6px 0 8px; font-size:15px; font-weight:600; line-height:1.4; }
.ms-l { margin:8px 0; }
.ms-k { display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; color:var(--ink2); margin-bottom:5px; }
.ms-k .ic { width:15px; height:15px; }
.ms-l > div { display:flex; flex-wrap:wrap; gap:5px; }
.ms-n { border:0; border-radius:9px; padding:4px 8px; background:var(--surf2); color:var(--ink); font:inherit; font-size:13.5px; font-variant-numeric:tabular-nums; cursor:pointer; }
.ms-n:not(.off):hover { background:color-mix(in srgb,var(--lapis) 18%,var(--surf2)); }
.ms-n.off { cursor:default; color:var(--ink2); }
.ms-alt { margin:6px 0 0; font-size:13.5px; color:var(--ink2); }
.ms-alt summary { cursor:pointer; font-weight:700; }
.ms-alt p { margin:6px 0; }
.ms-pg img { display:block; width:100%; border-radius:10px; background:#fff; }
.mz-task [hidden], .rk-q [hidden] { display:none !important; }

/* ---------- Твердыня: переписка с помощником ---------- */
.tv-av { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; background:#1f6fe0; }
.ac-title { gap:10px; padding:4px 8px 4px 4px; }
.ac-avw { position:relative; flex:none; width:40px; height:40px; }
.ac-dot { position:absolute; right:-1px; bottom:-1px; width:12px; height:12px; border-radius:50%; background:#2fbf71; box-shadow:0 0 0 2.5px var(--bg); }
#aichat.incog .ac-dot { background:var(--violet); }
.ac-who { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.25; }
.ac-who b { font-family:var(--fd); font-size:16.5px; font-weight:600; }
.ac-st { font-size:12.5px; color:var(--ink3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.typing-st { color:var(--violet); font-weight:600; }
.typing-st i { font-style:normal; animation:blink 1.2s infinite both; display:inline-block; }
.typing-st i:nth-child(2) { animation-delay:.2s; } .typing-st i:nth-child(3) { animation-delay:.4s; }
.msg.ai { flex-direction:row; align-items:flex-end; gap:8px; }
.msg-avw { flex:none; width:30px; height:30px; }
.msg-col { flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start; }
.msg-col > .md { max-width:100%; }
.msg.ai .msg-act { margin:3px 2px 0; align-items:center; }
.msg-act time { font-size:11.5px; color:var(--ink3); padding:0 4px; font-variant-numeric:tabular-nums; }
.msg.me .bubble time { float:right; margin:7px -2px -3px 10px; font-size:11px; opacity:.72; font-variant-numeric:tabular-nums; }
.msg-day { display:flex; justify-content:center; margin:4px 0 14px; }
.msg-day span { padding:4px 12px; border-radius:999px; font-size:12px; font-weight:700; color:var(--ink2); background:color-mix(in srgb,var(--surf) 85%,transparent); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.msg.ai .md blockquote { margin:10px 0 2px; padding:10px 13px; border-left:0; border-radius:14px; background:var(--bg); box-shadow:inset 0 0 0 1px var(--line); color:var(--ink); font-size:14.5px; }
.msg.ai .md blockquote + blockquote { margin-top:6px; }
.ac-hello { display:flex; flex-direction:column; gap:14px; padding:6px 0 4px; }
.ac-card { display:flex; flex-direction:column; align-items:center; text-align:center; gap:3px; padding:8px 0 6px; }
.ac-card .tv-av, .ac-empty .tv-av { width:92px; height:92px; margin-bottom:8px; box-shadow:0 10px 30px rgba(31,111,224,.32); }
.ac-card b { font-family:var(--fd); font-size:21px; font-weight:600; color:var(--ink); }
.ac-card span { font-size:13.5px; color:var(--ink3); }
.ac-hello .ac-starts { flex-direction:row; flex-wrap:wrap; gap:8px; margin:0; padding-left:38px; }
.ac-hello .ac-starts button { padding:9px 14px; border-radius:999px; font-size:14px; background:var(--bg); box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--violet) 30%,var(--line)); }
.ac-hello .ac-starts button .ic { width:17px; height:17px; }
.ac-hello .ac-incog-btn { align-self:center; margin-top:4px; }
.msg-col .typing { padding:13px 16px; border-radius:20px 20px 20px 6px; }
.tab-ai-c:has(.tv-av) { width:auto; height:auto; background:none; }
.tab-ai-c .tv-av { width:30px; height:30px; box-shadow:0 0 0 2px color-mix(in srgb,var(--violet) 40%,transparent); }
.tabs-main .tab-ai-c .tv-av { width:24px; height:24px; }
.topbar .circ.ai { padding:0; overflow:hidden; }
.topbar .circ.ai .tv-av { width:34px; height:34px; }
.guide .li > .li-av { flex:none; width:22px; height:22px; }
@media (min-width:760px) { .ac-hello .ac-starts { padding-left:38px; } .msg-col { flex:0 1 auto; max-width:calc(100% - 38px); } }

/* ---------- Матанализ: конспект лекций ---------- */
.lec-row .lec-n { flex:none; display:flex; align-items:center; justify-content:center; min-width:44px; height:44px; padding:0 8px; border-radius:14px; font-family:var(--fd); font-weight:700; font-size:17px; color:var(--cin); background:color-mix(in srgb,var(--cin) 13%,transparent); }
.lec-row.new .lec-n { color:#fff; background:var(--cin); }
.lec-links { display:flex; flex-wrap:wrap; gap:8px; margin:-2px 0 14px 4px; }
.lec-kick { margin:0 0 4px; font-size:13px; font-weight:700; color:var(--cin); letter-spacing:.02em; }
.lec-toc { margin:0 0 10px; }
.lec-toc a.rk { box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--cin) 55%,transparent); }
.lec-h { margin-top:26px; }
.lec-thm, .lec-def { position:relative; padding:16px 16px 14px; scroll-margin-top:72px; }
.lec-thm { border-left:4px solid var(--violet); }
.lec-def { border-left:4px solid var(--lapis); }
.lec-top { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.lec-tag { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; color:var(--ink3); }
.lec-tag .ic { width:15px; height:15px; }
.lec-thm .lec-top .lec-tag { color:var(--violet); }
.lec-def .lec-top .lec-tag { color:var(--lapis); }
.lec-rk { padding:4px 10px; border-radius:999px; font-size:12px; font-weight:800; color:#fff; background:var(--cin); text-decoration:none; }
.lec-name { margin:0 0 6px; font-family:var(--fd); font-size:17px; font-weight:600; line-height:1.3; }
.lec-proof { margin-top:10px; border-top:1px solid var(--line); padding-top:8px; }
.lec-proof summary { display:inline-flex; align-items:center; gap:6px; cursor:pointer; list-style:none; font-weight:700; font-size:14.5px; color:var(--violet); padding:4px 0; }
.lec-proof summary::-webkit-details-marker { display:none; }
.lec-proof summary .ic { width:16px; height:16px; transition:transform .2s; }
.lec-proof[open] summary .ic { transform:rotate(90deg); }
.lec-proof ol { margin:8px 0 0; padding-left:22px; }
.lec-proof li { margin:0 0 10px; padding-left:4px; }
.lec-proof li::marker { color:var(--ink3); font-weight:700; }
.lec-note { margin:4px 2px 14px; padding:10px 14px; border-radius:14px; font-size:14.5px; color:var(--ink2); background:color-mix(in srgb,var(--ochre) 10%,var(--surf)); }
.lec-ex { margin:4px 0 14px; padding:10px 14px; border-radius:14px; background:var(--surf); box-shadow:inset 0 0 0 1px var(--line); }
.lec-ex .lec-tag { color:var(--lapis); margin-bottom:2px; }
.lec-fig { display:block; width:100%; max-width:300px; margin:8px auto 2px; font-family:var(--fd); }
.lec-fig .lf-c { fill:none; stroke:var(--ink2); stroke-width:1.6; }
.lec-fig .lf-ax { fill:none; stroke:var(--ink3); stroke-width:1.1; }
.lec-fig .lf-l { fill:none; stroke:var(--ink); stroke-width:1.6; }
.lec-fig .lf-sec { fill:color-mix(in srgb,var(--violet) 22%,transparent); stroke:none; }
.lec-fig .lf-tri { fill:color-mix(in srgb,var(--lapis) 12%,transparent); stroke:none; }
.lec-fig .lf-ang { fill:none; stroke:var(--cin); stroke-width:1.5; }
.lec-fig text { font-size:14px; font-style:italic; fill:var(--ink); }
.lec-fig .lf-r { fill:var(--ink3); font-size:12.5px; }
.lec-more { display:inline-flex; align-items:center; gap:6px; margin:4px 0 6px; font-size:13.5px; font-weight:700; color:var(--violet); }
.lec-more .ic { width:15px; height:15px; }

/* ---------- Химия: лабораторные работы ---------- */
.lec-kick.ch { color:var(--mal); }
.ch-paper { margin:4px 0 8px; padding:34px 22px 30px; border-radius:6px; background:#fffdf6; color:#1d1d1d; box-shadow:0 1px 2px rgba(0,0,0,.08), 0 10px 28px rgba(0,0,0,.08); text-align:center; font-family:"Times New Roman", Georgia, serif; background-image:repeating-linear-gradient(transparent 0 27px, rgba(70,110,200,.13) 27px 28px); }
.ch-paper p { margin:0; line-height:1.5; }
.ch-p1 { font-size:20px; font-weight:700; }
.ch-p2 { font-size:18px; margin:6px 0 22px !important; }
.ch-p3, .ch-p4 { font-size:16px; text-align:right; }
.ch-p4 { font-weight:700; margin-top:4px !important; }
.ch-paper input { font:inherit; width:7.5em; border:0; border-bottom:1px dashed #888; background:transparent; color:inherit; text-align:center; padding:0 2px; }
.ch-steps .ch-step { display:flex; gap:12px; align-items:flex-start; cursor:pointer; }
.ch-step input { flex:none; width:20px; height:20px; margin-top:2px; accent-color:var(--mal); }
.ch-step > span { display:flex; flex-direction:column; gap:2px; }
.ch-step > span > span { font-size:13.5px; color:var(--ink2); }
.ch-step input:checked + span b { text-decoration:line-through; color:var(--ink3); }
.ch-mine { padding:14px 16px; }
.ch-mine-h { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.ch-mine-h > span:last-child { display:flex; flex-direction:column; font-size:13.5px; color:var(--ink2); }
.ch-mine-h b { color:var(--ink); font-size:15.5px; }
.ch-code { flex:none; padding:8px 10px; border-radius:12px; font-family:var(--fd); font-weight:700; color:#fff; background:var(--mal); font-variant-numeric:tabular-nums; }
.ch-mine .btn-row { margin:0; }
.ch-sheet { margin:12px 0; padding:18px 18px 8px; border-radius:18px; background:var(--surf); }
.ch-sheet h3 { margin:16px 0 6px; font-family:var(--fd); }
.ch-exp { padding:14px 16px; }
.ch-et { display:flex; flex-direction:column; gap:2px; margin:0 0 10px; font-family:var(--fd); font-size:16.5px; font-weight:600; }
.ch-en { font-size:12.5px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; color:var(--mal); }
.ch-rg { padding:8px 0; border-top:1px dashed var(--line); }
.ch-row { display:grid; grid-template-columns:118px 1fr; gap:8px; align-items:baseline; margin:4px 0; font-size:14.5px; }
.ch-row .md p { margin:0; }
.ch-l { font-size:12.5px; font-weight:700; color:var(--ink3); }
.ch-v { min-width:0; overflow-x:auto; }
.ch-concl { margin-top:10px; padding:10px 12px; border-radius:14px; background:color-mix(in srgb,var(--mal) 10%,var(--surf)); font-size:14.5px; }
.ch-concl .md p { margin:4px 0 0; }
@media (max-width:420px) { .ch-row { grid-template-columns:1fr; gap:0; } }
:root[data-theme="dark"] .ch-paper { background:#f4efe2; }
.card.list .li.ch-step { flex-direction:row; align-items:flex-start; }
.ch-mine .btn-row { display:flex; flex-wrap:wrap; gap:8px; }
.ch-mine .btn-row .btn { margin:0; flex:0 1 auto; }
.lec-h1 { font-size:clamp(23px, 6vw, 32px); line-height:1.15; }

/* РК 1 по НГ: подготовка и билеты (#/ng/rk1) */
.rk1-hero { display:flex; flex-direction:column; gap:12px; }
.rk1-lead { margin:0; font-size:15px; line-height:1.5; }
.rk1-prog { display:flex; gap:28px; }
.rk1-prog div { display:flex; flex-direction:column; }
.rk1-prog b { font-size:28px; line-height:1.1; font-variant-numeric:tabular-nums; color:var(--lapis); }
.rk1-prog span { font-size:12.5px; color:var(--ink3); }
.rk1-acts { display:flex; flex-wrap:wrap; gap:8px; }
.rk1-acts .btn { width:auto; flex:1 1 auto; margin:0; }
.rk1-acts.sm .btn { flex:0 1 auto; min-height:40px; padding:8px 16px; font-size:14px; }
.rk1-m { padding:0; overflow:hidden; }
.rk1-m > summary, .rk1-chk > summary { display:flex; align-items:center; gap:12px; padding:14px 16px; cursor:pointer; list-style:none; }
.rk1-m > summary::-webkit-details-marker, .rk1-chk > summary::-webkit-details-marker { display:none; }
.rk1-m > summary .rl, .rk1-chk > summary .rl { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.rk1-m > summary .rt, .rk1-chk > summary .rt { font-weight:700; font-size:15.5px; }
.rk1-m > summary .rs, .rk1-chk > summary .rs { font-size:13px; color:var(--ink3); line-height:1.35; }
.rk1-m[open] > summary { border-bottom:1px solid var(--line); }
.rk1-m > .md { padding:4px 16px 0; font-size:14.5px; }
.rk1-wb { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:8px 16px 16px; font-size:13px; color:var(--ink3); }
.rk1-wb a { padding:5px 11px; border-radius:999px; background:color-mix(in srgb,var(--lapis) 12%,transparent); color:var(--lapis); font-weight:700; text-decoration:none; }
.rk1-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; }
.rk1-t { position:relative; display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 8px 8px; border-radius:18px; background:var(--surf); color:var(--ink); text-decoration:none; box-shadow:inset 0 0 0 1px var(--line); transition:transform .2s var(--ease), box-shadow .2s; }
.rk1-t:active { transform:scale(.96); }
.rk1-t:hover { box-shadow:inset 0 0 0 1.5px var(--lapis); }
.rk1-t.seen { box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--lapis) 45%,transparent); background:color-mix(in srgb,var(--lapis) 6%,var(--surf)); }
.rk1-t.ok { box-shadow:inset 0 0 0 2px var(--teal); background:color-mix(in srgb,var(--teal) 8%,var(--surf)); }
.rk1-th { width:100%; height:64px; }
.rk1-th line { stroke:var(--ink); stroke-width:1.6; stroke-linecap:round; }
.rk1-th line.ax { stroke:var(--ink3); stroke-width:.9; }
.rk1-th circle { fill:var(--surf); stroke:var(--ink); stroke-width:1.2; }
.rk1-th circle.d { stroke:var(--cin); stroke-width:1.8; }
.rk1-n { font-weight:800; font-size:14px; font-variant-numeric:tabular-nums; }
.rk1-t.seen .rk1-n { color:var(--lapis); }
.rk1-b { position:absolute; top:6px; right:6px; width:20px; height:20px; border-radius:50%; background:var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; }
.rk1-b .ic { width:13px; height:13px; stroke-width:3; }
.rk1-okb { display:inline-flex; align-items:center; gap:4px; vertical-align:middle; margin-left:6px; padding:3px 10px 3px 8px; border-radius:999px; background:color-mix(in srgb,var(--teal) 15%,transparent); color:var(--teal); font-size:13px; font-weight:800; }
.rk1-okb .ic { width:14px; height:14px; stroke-width:3; }
.rk1-cond ol { margin:0 0 10px; padding-left:20px; font-size:14.5px; line-height:1.45; }
.rk1-cond li { margin:0 0 4px; }
.rk1-sim { margin:8px 0 0; font-size:13px; color:var(--ink3); }
.rk1-chk { padding:0; overflow:hidden; margin-top:12px; }
.rk1-chk form { padding:4px 16px 8px; border-top:1px solid var(--line); }
.rk1-f { display:grid; grid-template-columns:1fr 92px 64px; align-items:center; gap:10px; padding:8px 0; font-size:14px; border-bottom:1px solid var(--line); }
.rk1-f input { width:100%; height:40px; border:0; border-radius:12px; padding:0 10px; background:var(--surf2); color:var(--ink); font:inherit; font-size:16px; text-align:center; font-variant-numeric:tabular-nums; }
.rk1-f i { font-style:normal; font-size:13px; font-weight:800; }
.rk1-f i.ok { color:var(--teal); } .rk1-f i.no { color:var(--cin); } .rk1-f i.ans { color:var(--lapis); }
.rk1-fb { display:flex; gap:8px; margin-top:10px; }
.rk1-fb .btn { margin:0; min-height:46px; font-size:15px; }
.rk1-given { padding:10px; }
.rk1-given .dz-view { height:min(70vh,520px); margin:0; }
.btn.wide { margin-top:14px; }

/* Матанализ: теория по-простому (#/ma/easy) и тренировка (#/ma/drill) */
.ez-hero { display:flex; flex-direction:column; gap:12px; }
.ez-hero p { margin:0; font-size:15px; line-height:1.5; }
.ez-modes { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.ez-mode { display:flex; flex-direction:column; gap:4px; padding:14px 12px; border-radius:20px; background:var(--surf); color:var(--ink); text-decoration:none; transition:transform .2s var(--ease); }
.ez-mode:active { transform:scale(.96); }
.ez-mode b { font-size:15px; margin-top:6px; }
.ez-mode > span:not(.bub) { font-size:12.5px; color:var(--ink3); line-height:1.35; }
@media (max-width:520px) { .ez-modes { grid-template-columns:1fr; } .ez-mode { flex-direction:row; flex-wrap:wrap; align-items:center; column-gap:12px; } .ez-mode b { margin:0; } .ez-mode > span:not(.bub) { flex-basis:100%; padding-left:52px; margin-top:-6px; } }
.ez-bar { display:block; height:4px; margin-top:6px; border-radius:4px; background:var(--surf2); overflow:hidden; }
.ez-bar i { display:block; height:100%; background:var(--teal); border-radius:4px; }
.ez-k { flex:none; font-size:13px; font-weight:800; color:var(--ink3); font-variant-numeric:tabular-nums; }
.ez-nav { position:sticky; top:62px; z-index:3; padding-top:6px !important; padding-bottom:6px !important; background:var(--bg); }
.ez-nav a.on { background:color-mix(in srgb,var(--teal) 16%,var(--surf)); color:var(--teal); }
.ez-item { scroll-margin-top:120px; display:flex; flex-direction:column; gap:12px; margin-bottom:14px; }
.ez-item.ok { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--teal) 55%,transparent); }
.ez-tag { font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--ink3); }
.ez-t { margin:-6px 0 0; font-size:19px; line-height:1.3; }
.ez-cap { display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; margin-bottom:4px; }
.ez-cap .ic { width:16px; height:16px; }
.ez-plain .ez-cap { color:var(--violet); }
.ez-plain .md { font-size:15.5px; line-height:1.55; }
.ez-lect { padding:12px 14px; border-radius:16px; background:color-mix(in srgb,var(--lapis) 7%,var(--surf)); box-shadow:inset 3px 0 0 var(--lapis); }
.ez-lect .ez-cap { color:var(--lapis); }
.ez-lect .md { font-size:15px; }
.ez-lect .rk-src { margin-top:8px; }
.ez-ex { margin-top:8px; font-size:14px; color:var(--ink2); }
.ez-memo { margin:8px 0 0; padding:8px 10px; border-radius:10px; background:color-mix(in srgb,var(--ochre) 12%,transparent); font-size:13.5px; font-weight:600; }
.ez-trap { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border-radius:14px; background:color-mix(in srgb,var(--cin) 9%,transparent); font-size:14px; line-height:1.45; }
.ez-trap .ic { width:18px; height:18px; flex:none; color:var(--cin); margin-top:1px; }
.ez-trap.good { background:color-mix(in srgb,var(--teal) 10%,transparent); }
.ez-trap.good .ic { color:var(--teal); }
.ez-btns { display:flex; flex-wrap:wrap; gap:8px; }
.ez-btns .btn { width:auto; flex:1 1 auto; margin:0; }
.vz { margin:0; }
.vz-svg svg { display:block; width:100%; max-width:560px; height:auto; margin:0 auto; background:var(--surf2); border-radius:14px; }
.vz .ax { stroke:var(--ink3); stroke-width:1.1; }
.vz .t { fill:var(--ink3); font-size:10px; font-family:inherit; }
.vz .t.b { fill:var(--ink2); font-weight:700; font-size:11.5px; }
.vz .t.dl { fill:var(--mal); font-weight:700; }
.vz .t.hl { fill:var(--ochre); font-weight:700; }
.vz .c { fill:none; stroke:var(--lapis); stroke-width:2.2; stroke-linejoin:round; stroke-linecap:round; }
.vz .c2 { fill:none; stroke:var(--violet); stroke-width:2; stroke-dasharray:5 3; }
.vz .c3 { fill:none; stroke:var(--teal); stroke-width:2.4; }
.vz .sg { stroke:var(--lapis); stroke-width:1; opacity:.4; }
.vz .as { stroke:var(--cin); stroke-width:1.1; stroke-dasharray:4 4; }
.vz .dl { stroke:var(--mal); stroke-width:1.2; stroke-dasharray:4 3; }
.vz .hl { stroke:var(--ochre); stroke-width:1.4; stroke-dasharray:6 3; }
.vz .hl2 { stroke:var(--cin); stroke-width:1.2; }
.vz .lk { stroke:var(--ink3); stroke-width:.7; stroke-dasharray:2 3; }
.vz .bd { fill:color-mix(in srgb,var(--ochre) 18%,transparent); }
.vz .vb { fill:color-mix(in srgb,var(--mal) 14%,transparent); }
.vz .nbi { stroke:var(--teal); stroke-width:6; stroke-linecap:butt; opacity:.75; }
.vz .d { fill:var(--lapis); }
.vz .d.out { fill:var(--cin); }
.vz .d.hot { fill:var(--cin); }
.vz .h { fill:var(--surf2); stroke:var(--lapis); stroke-width:2; }
.vz-sl { display:flex; align-items:center; gap:10px; margin:10px 2px 0; font-weight:700; }
.vz-sl span { font-style:italic; font-size:16px; min-width:16px; }
.vz-sl input { flex:1; accent-color:var(--lapis); }
.vz-sl b { min-width:44px; text-align:right; font-variant-numeric:tabular-nums; }
.vz-note { margin:8px 2px 0; font-size:13.5px; color:var(--ink2); line-height:1.45; }
.vz .mz-leg { display:flex; flex-wrap:wrap; gap:6px 14px; justify-content:center; margin-top:6px; font-size:12px; color:var(--ink3); }
.vz .mz-leg i { display:inline-block; width:16px; height:3px; border-radius:2px; vertical-align:middle; margin-right:5px; }
.vz .mz-leg i.lc { background:var(--lapis); } .vz .mz-leg i.lc2 { background:var(--violet); } .vz .mz-leg i.lc3 { background:var(--teal); }
/* матан «по-простому»: примеры (ezx) */
.ezx .ez-cap { color:var(--teal); }
.ezx-g { display:grid; grid-template-columns:1fr; gap:8px; align-items:start; }
@media (min-width:560px) { .ezx-g { grid-template-columns:1fr 1fr; } }
.ezx-i { --c:var(--lapis); display:flex; flex-direction:column; gap:6px; min-width:0; padding:10px 12px 12px; border-radius:16px; background:color-mix(in srgb,var(--c) 7%,var(--surf)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c) 22%,transparent); }
.ezx-i.yes { --c:var(--teal); } .ezx-i.no { --c:var(--cin); } .ezx-i.calc { --c:var(--violet); }
.ezx-b { display:inline-flex; align-self:flex-start; align-items:center; gap:4px; padding:2px 9px 2px 6px; border-radius:999px; background:color-mix(in srgb,var(--c) 16%,transparent); color:var(--c); font-size:11.5px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
.ezx-b .ic { width:14px; height:14px; }
.ezx-t { font-size:15px; line-height:1.4; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.ezx-d { font-size:14px; line-height:1.5; color:var(--ink2); overflow-x:auto; overflow-y:hidden; scrollbar-width:none; }
.ezx-fig svg { display:block; width:100%; max-height:130px; height:auto; background:color-mix(in srgb,var(--c) 5%,var(--surf2)); border-radius:12px; }
.ezx-fig .t { display:none; }
.ezx-fig .c, .ezx-fig .c2, .ezx-fig .c3 { stroke-width:2.8; }
.ez-cnt { margin:6px 2px 8px; font-size:13px; font-weight:700; color:var(--ink3); }
.ez-card { display:flex; flex-direction:column; gap:12px; }
.ez-card .btn { margin:0; }
.ez-ask { margin:0; font-size:17px; font-weight:700; line-height:1.4; }
.ez-card textarea { width:100%; box-sizing:border-box; border:0; border-radius:14px; padding:12px; background:var(--surf2); color:var(--ink); font:inherit; font-size:16px; line-height:1.5; resize:vertical; }
.ez-sym { display:flex; flex-wrap:wrap; gap:6px; }
.ez-sym button { min-width:38px; height:36px; padding:0 10px; border:0; border-radius:10px; background:var(--surf2); color:var(--ink); font:inherit; font-size:15px; font-weight:700; cursor:pointer; }
.ez-sym button:active { background:color-mix(in srgb,var(--lapis) 18%,var(--surf2)); transform:scale(.96); }
.ez-symkb { display:flex; flex-direction:column; gap:8px; }
.ez-sym .ez-more { min-width:0; padding:0 12px; font-size:13.5px; font-weight:700; color:var(--lapis); background:color-mix(in srgb,var(--lapis) 12%,transparent); }
.ez-symall { display:flex; flex-direction:column; gap:8px; padding:10px; border-radius:14px; background:var(--surf); box-shadow:inset 0 0 0 1px var(--line); }
.ez-symall[hidden], .ez-symall .ez-sym[hidden] { display:none; }
.ez-symtabs { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; }
.ez-symtabs button { flex:none; height:30px; padding:0 12px; border:0; border-radius:999px; background:var(--surf2); color:var(--ink2); font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.ez-symtabs button.on { background:var(--lapis); color:#fff; }
.ez-cmp { display:flex; flex-direction:column; gap:10px; }
.ez-ai { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:14px; background:var(--surf2); font-size:14px; }
.ez-ai.done { display:block; box-shadow:inset 3px 0 0 var(--c); }
.ez-ai.done p { margin:6px 0 0; }
.ez-v { font-size:17px; color:var(--c); }
.ez-ai .ez-btns { margin-top:10px; }
.ez-opts { display:flex; flex-direction:column; gap:8px; }
.ez-opt { text-align:left; padding:12px 14px; border:0; border-radius:14px; background:var(--surf2); color:var(--ink); font:inherit; font-size:15px; line-height:1.4; cursor:pointer; box-shadow:inset 0 0 0 1px var(--line); transition:background .2s, box-shadow .2s; }
.ez-opt:hover:not(:disabled) { box-shadow:inset 0 0 0 1.5px var(--lapis); }
.ez-opt.good { background:color-mix(in srgb,var(--teal) 14%,var(--surf)); box-shadow:inset 0 0 0 2px var(--teal); }
.ez-opt.bad { background:color-mix(in srgb,var(--cin) 12%,var(--surf)); box-shadow:inset 0 0 0 2px var(--cin); }
.ez-opt:disabled { cursor:default; color:var(--ink); }
.ez-done { display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; }
.ez-done .row { width:100%; text-align:left; }
.ez-h1 { font-size:clamp(26px, 7.4vw, 40px); overflow-wrap:anywhere; hyphens:auto; }

/* ---------- Химия: ДЗ 1 — рисунки к решениям (ячейки, ММО, столбики, цепочки, формы орбиталей, 3D) ---------- */
.cd-due { display:flex; align-items:flex-start; gap:8px; margin:0; }
.cd-due .ic { width:18px; height:18px; flex:none; color:var(--mal); margin-top:1px; }
.cd-sem { font-style:normal; font-weight:700; color:var(--mal); }
.katex.cd-wide { display:block; max-width:100%; overflow-x:auto; overflow-y:hidden; padding:2px 0; }
.mz-task { min-width:0; }
/* блочная формула внутри абзаца рвёт его: убираем оставшиеся переносы и пустые абзацы вокруг */
.mz-step p:empty, .mz-ans p:empty, .mz-step .mathd + br, .mz-step p > br:last-child { display:none; }
.mz-step .mathd .katex-display { margin:.35em 0; }
.ch-fig { margin:10px 0 4px; overflow-x:auto; }
.ch-fig figure { margin:0; }
.ch-fig figcaption { margin-top:4px; font-size:12.5px; color:var(--ink2); text-align:center; }
.ch-cells-row { display:flex; flex-wrap:wrap; gap:14px 22px; align-items:flex-end; }
.ch-cells-row figure { flex:0 1 auto; min-width:0; }
.ch-cells, .ch-mo, .ch-bars { display:block; width:100%; height:auto; overflow:visible; }
.ch-mo { max-width:440px; margin:0 auto; }
.ch-bars { max-width:380px; margin:0 auto; }
.ch-fig .cb { fill:var(--surf); stroke:var(--ink2); stroke-width:1.2; }
.ch-fig .cb.em { fill:transparent; stroke-dasharray:3 2; stroke:var(--ink3); }
.ch-fig .cb.mk { fill:color-mix(in srgb,var(--ochre) 22%,var(--surf)); stroke:var(--ochre); }
.ch-fig .cb.bd { fill:color-mix(in srgb,var(--teal) 12%,var(--surf)); }
.ch-fig .cb.ab { fill:color-mix(in srgb,var(--cin) 10%,var(--surf)); }
.ch-fig .ar { fill:none; stroke:var(--lapis); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ch-fig .cl, .ch-fig .ct, .ch-fig .ml, .ch-fig .bl, .ch-fig .bv, .ch-fig .ol { fill:var(--ink2); font-size:11px; font-family:inherit; }
.ch-fig .cl.b, .ch-fig .bl { font-weight:700; fill:var(--ink); }
.ch-fig .ct { font-size:8.5px; }
.ch-fig .ml { font-size:10px; } .ch-fig .ml.ab { fill:var(--cin); }
.ch-fig .axe { fill:none; stroke:var(--ink3); stroke-width:1.1; }
.ch-fig .lk { fill:none; stroke:var(--ink3); stroke-width:.8; stroke-dasharray:3 3; }
.ch-fig .br { fill:color-mix(in srgb,var(--lapis) 55%,var(--surf)); } .ch-fig .br.hi { fill:var(--mal); }
.ch-fig .bv { font-weight:700; fill:var(--ink); }
.ch-cap { text-align:center; font-size:12px; color:var(--ink2); }
.ch-orbs { display:flex; flex-wrap:wrap; justify-content:center; gap:10px 18px; }
.ch-orbs svg { width:120px; height:120px; }
.ch-fig .oax { stroke:var(--ink3); stroke-width:.8; stroke-dasharray:3 3; }
.ch-fig .ob { fill:color-mix(in srgb,var(--lapis) 30%,transparent); stroke:var(--lapis); stroke-width:1.2; }
.ch-fig .ob.n { fill:color-mix(in srgb,var(--cin) 26%,transparent); stroke:var(--cin); }
.ch-chain { display:flex; flex-wrap:wrap; align-items:center; gap:6px 4px; font-weight:700; }
.ch-sp { padding:4px 10px; border-radius:10px; background:var(--surf2); }
.ch-arr { position:relative; display:inline-flex; align-items:center; justify-content:center; width:34px; height:20px; }
.ch-arr::before { content:"→"; font-size:18px; color:var(--ink2); }
.ch-arr i { position:absolute; top:-9px; font-style:normal; font-size:10px; color:var(--mal); }
.ch3d-fig { margin:0; }
.ch3d { position:relative; }
.ch3d-st { position:relative; height:260px; border-radius:14px; background:radial-gradient(circle at 50% 40%, var(--surf), var(--surf2)); display:flex; align-items:center; justify-content:center; overflow:hidden; touch-action:none; }
.ch3d-st canvas { display:block; }
.ch3d-lb { position:absolute; inset:0; }
.ch3d-t { font-size:12px; font-weight:800; color:var(--ink); text-shadow:0 0 3px var(--surf); }
.ch3d-t.c { color:var(--mal); } .ch3d-t.a { color:var(--ochre); font-size:11px; }
.ch3d-hint { margin-top:4px; font-size:11.5px; color:var(--ink3); text-align:center; }
/* химия: плоские рисунки «как на доске» (ch/draw2d.js) */
.ch-2d { display:flex; flex-wrap:wrap; gap:12px 22px; align-items:center; justify-content:center; margin-top:8px; }
.ch-2d figure { flex:1 1 260px; min-width:0; max-width:420px; margin:0; }
.ch-scheme, .ch-ovl, .ch-dip, .ch-cell, .ch-sec svg { display:block; width:100%; height:auto; margin:0 auto; overflow:visible; }
.ch-ovl, .ch-dip { max-width:330px; }
.ch-fig .lnk { fill:none; stroke:var(--teal); stroke-width:1.4; }
.ch-fig .lnk.pi { stroke:var(--violet); stroke-dasharray:5 3; }
.ch-fig .lnk.da { stroke:var(--ochre); stroke-width:1.6; }
.ch-fig .lnk-h { fill:var(--ochre); }
.ch-fig .lt { font-size:11px; font-weight:700; fill:var(--teal); paint-order:stroke; stroke:var(--surf); stroke-width:3px; stroke-linejoin:round; }
.ch-fig .lt.pi { fill:var(--violet); } .ch-fig .lt.da { fill:var(--ochre); }
/* столбик гибридизации */
.ch-hybw { flex:0 1 auto; }
.ch-hyb { display:flex; align-items:stretch; gap:8px; font-size:14px; }
.ch-hyb-l { display:flex; flex-direction:column; gap:3px; }
.ch-hyb-l b { display:inline-block; min-width:26px; font-family:var(--fd); }
.ch-hyb-r { display:flex; align-items:center; gap:6px; }
.ch-hyb-r i { width:9px; align-self:stretch; border:2px solid var(--ink2); border-left:0; border-radius:0 10px 10px 0; }
.ch-hyb-r b { font-family:var(--fd); font-size:18px; color:var(--mal); }
.ch-hyb-n { margin:6px 0 0; max-width:240px; font-size:12.5px; color:var(--ink2); }
/* перекрывание */
.ch-fig .ohy { fill:color-mix(in srgb,var(--lapis) 20%,transparent); stroke:var(--lapis); stroke-width:1.3; }
.ch-fig .ohy.bk { fill:color-mix(in srgb,var(--lapis) 12%,transparent); }
.ch-fig .ohy.far, .ch-fig .olg.far { opacity:.55; stroke-dasharray:4 2; }
.ch-fig .olg { fill:color-mix(in srgb,var(--teal) 16%,transparent); stroke:var(--teal); stroke-width:1.2; }
.ch-fig .olp { fill:color-mix(in srgb,var(--cin) 8%,transparent); stroke:var(--cin); stroke-width:1.2; stroke-dasharray:4 3; }
.ch-fig .olp.bk { stroke:none; }
.ch-fig .olpt { font-size:11px; font-weight:800; fill:var(--cin); }
.ch-fig .ovl { fill:var(--ink); opacity:.55; }
.ch-fig .opi { fill:color-mix(in srgb,var(--violet) 18%,transparent); stroke:var(--violet); stroke-width:1; }
.ch-fig .opil { stroke:var(--violet); stroke-width:1; stroke-dasharray:3 2; }
.ch-fig .opit { font-size:11px; font-weight:800; fill:var(--violet); }
.ch-fig .oc { fill:var(--surf); stroke:var(--ink); stroke-width:1.2; }
.ch-fig .oct { font-size:10px; font-weight:800; fill:var(--ink); }
.ch-fig .oat { font-size:13px; font-weight:800; fill:var(--ink); }
.ch-fig .osg { font-size:10px; font-weight:700; fill:var(--lapis); }
/* диполи */
.ch-fig .dbond { stroke:var(--ink2); stroke-width:2; }
.ch-fig .dbond.far { stroke-dasharray:4 3; opacity:.7; }
.ch-fig .mu { stroke:var(--cin); stroke-width:1.8; }
.ch-fig .mu.lp { stroke:var(--ochre); }
.ch-fig .mu-h { fill:var(--cin); } .ch-fig .mu-hl { fill:var(--ochre); }
.ch-fig .mut { font-size:10px; font-weight:700; fill:var(--cin); }
.ch-fig .dat { font-size:14px; font-weight:800; fill:var(--ink); }
.ch-fig .dq { font-size:9px; font-weight:700; fill:var(--ink2); }
.ch-fig .dlp { font-size:15px; font-weight:900; fill:var(--ochre); letter-spacing:-1px; }
.ch-fig .dang { fill:none; stroke:var(--ink3); stroke-width:1; }
.ch-fig .dant { font-size:10px; font-weight:700; fill:var(--ink2); }
.ch-fig .dc { fill:var(--surf); stroke:var(--ink3); stroke-width:1; }
.ch-fig .dct { font-size:10.5px; font-weight:800; fill:var(--ink); }
.ch-fig .dsum { font-size:13px; font-weight:800; fill:var(--teal); }
.ch-fig .dsum.pol { fill:var(--cin); }
/* кристаллы */
.ch-cell2 { display:flex; flex-wrap:wrap; gap:10px 24px; align-items:center; justify-content:center; }
.ch-cell { flex:1 1 220px; max-width:280px; }
.ch-sec { flex:1 1 170px; max-width:230px; margin:0; }
.ch-fig .ced { stroke:var(--ink2); stroke-width:1.4; }
.ch-fig .ced.h { stroke-dasharray:4 3; opacity:.6; }
.ch-fig .cbd { stroke:var(--ochre); stroke-width:1.2; opacity:.8; }
.ch-fig .cat { stroke:var(--ink); stroke-width:1; fill:var(--ink); }
.ch-fig .cat.f { fill:var(--lapis); } .ch-fig .cat.c, .ch-fig .cat.i { fill:var(--mal); }
.ch-fig .cat.far { opacity:.6; }
.ch-fig .cl-l { stroke:var(--cin); stroke-width:3; stroke-linecap:round; }
.ch-fig .cl-lt { font-size:12px; font-weight:800; fill:var(--cin); paint-order:stroke; stroke:var(--surf); stroke-width:3px; }
.ch-fig .cl-a { font-size:11px; font-weight:700; fill:var(--ink2); }
.ch-fig .sq { fill:none; stroke:var(--ink2); stroke-width:1.2; }
.ch-fig .sph { fill:color-mix(in srgb,var(--ink) 10%,transparent); stroke:var(--ink2); stroke-width:1; }
.ch-fig .sph.c { fill:color-mix(in srgb,var(--mal) 22%,transparent); stroke:var(--mal); }
.ch-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 14px; margin:8px 0 0; font-size:12px; color:var(--ink2); }
.ch-legend span { display:inline-flex; align-items:center; gap:5px; }
.ch-legend i { width:10px; height:10px; border-radius:50%; background:var(--ink); }
.ch-legend i.f { background:var(--lapis); } .ch-legend i.c { background:var(--mal); } .ch-legend i.l { width:14px; height:3px; border-radius:2px; background:var(--cin); }
/* 3D по кнопке */
.ch-3dd { margin-top:10px; }
.ch-3dd > summary { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; background:var(--surf2); font-size:13.5px; font-weight:700; cursor:pointer; list-style:none; }
.ch-3dd > summary::-webkit-details-marker { display:none; }
.ch-3dd > summary::before { content:"⟳"; color:var(--lapis); }
.ch-3dd[open] > summary { margin-bottom:8px; }
/* электронный баланс как в тетради */
.ch-bal { display:inline-grid; grid-template-columns:auto auto 1fr; align-items:center; margin:4px 0; font-size:15px; }
.ch-bal-n { padding:0 10px 0 2px; font-family:var(--fd); font-weight:800; color:var(--ink2); }
.ch-bal-k { display:flex; flex-direction:column; border-left:2px solid var(--ink); border-right:2px solid var(--ink); padding:0 8px; }
.ch-bal-k span, .ch-bal-e > span { min-height:54px; display:flex; align-items:center; }
.ch-bal-k span { font-family:var(--fd); font-weight:800; color:var(--mal); justify-content:center; }
.ch-bal-e { display:flex; flex-direction:column; padding-left:10px; min-width:0; overflow-x:auto; }
.ch-bal-e > span { flex-direction:column; align-items:flex-start; justify-content:center; gap:2px; white-space:nowrap; }
.ch-bal-q .katex { font-size:.94em; }
.ch-bal-e i { font-style:normal; font-size:11.5px; font-weight:700; padding:2px 8px; border-radius:999px; }
.ch-bal-e i.ox { color:var(--cin); background:color-mix(in srgb,var(--cin) 12%,transparent); }
.ch-bal-e i.rd { color:var(--teal); background:color-mix(in srgb,var(--teal) 12%,transparent); }
.ch-fig .ch-bal { display:grid; max-width:100%; }

/* ======================= плавность 2: внутри экрана, нажатия, раскрытие ======================= */
/* тот же экран с другим вариантом / фильтром / вкладкой — растворение без сдвига (ленты кнопок стоят на месте) */
html[data-vt="same"]::view-transition-old(root) { animation:vtFadeOut .16s ease both; }
html[data-vt="same"]::view-transition-new(root) { animation:vtSoftIn .3s var(--ease) both; }
@keyframes vtSoftIn { from { opacity:0; transform:translateY(4px); } }
.a-soft { animation:softIn .3s var(--ease) both; }
@keyframes softIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
/* отклик на нажатие — у всего, что нажимается */
.pills a:active, .pills button:active, .stabs a:active, .seg2 a:active, .seg2 button:active, .dz-steps button:active,
.btn:active:not(:disabled), .pillbtn:active, .circ:active:not(:disabled), a.row:active, button.row:active, .wb-row:active,
.hwk-lt:active, .ez-opt:active, .tcard:active, .qbtn:active { transform:scale(.96); }
a.row:active, button.row:active { transform:scale(.985); }
.pills a.on, .pills button.on, .stabs a.on, .dz-steps button.on { animation:pillOn .32s var(--spring) backwards; }
@keyframes pillOn { 0% { transform:scale(.92); } 60% { transform:scale(1.03); } 100% { transform:none; } }
/* ленты кнопок прокручиваются плавно (колесом/кнопками) и с привязкой на телефоне */
.pills.scroll, .stabs, .dz-steps, .rkline { scroll-behavior:smooth; overscroll-behavior-x:contain; }
/* раскрывающиеся блоки (details) — плавно по высоте; стрелка поворачивается */
:root { interpolate-size:allow-keywords; }
details::details-content { block-size:0; overflow:clip; transition:block-size .32s var(--ease), content-visibility .32s allow-discrete; }
details[open]::details-content { block-size:auto; }
details > summary { transition:color .2s; }
/* строки списков появляются лесенкой при открытии экрана */
.a-fade .row, .a-push .row, .a-pop .row, .a-fade .card, .a-push .card { animation:rowIn .42s var(--ease) backwards; }
.a-fade .row:nth-child(2), .a-push .row:nth-child(2), .a-pop .row:nth-child(2) { animation-delay:.03s; }
.a-fade .row:nth-child(3), .a-push .row:nth-child(3), .a-pop .row:nth-child(3) { animation-delay:.06s; }
.a-fade .row:nth-child(4), .a-push .row:nth-child(4), .a-pop .row:nth-child(4) { animation-delay:.09s; }
.a-fade .row:nth-child(5), .a-push .row:nth-child(5), .a-pop .row:nth-child(5) { animation-delay:.12s; }
.a-fade .row:nth-child(n+6), .a-push .row:nth-child(n+6), .a-pop .row:nth-child(n+6) { animation-delay:.15s; }
@keyframes rowIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
/* картинки проявляются по загрузке, ссылки и поля — без резких смен цвета */
.md img, .post-img, .mat-img { animation:fadeIn .4s ease both; }
a, .inp, textarea, select { transition:color .2s, background-color .2s, border-color .2s, box-shadow .2s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-delay:0s !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* ======================= аналитическая геометрия ======================= */
.ag-given .md p { margin:0 0 6px; }
.ag-3dd { margin:8px 0 4px; }
.ag-3dd > summary { display:inline-flex; align-items:center; gap:7px; padding:8px 14px; border-radius:999px; background:var(--surf2); font-size:13.5px; font-weight:700; cursor:pointer; list-style:none; }
.ag-3dd > summary::-webkit-details-marker { display:none; }
.ag-3dd > summary .ic { width:17px; height:17px; color:var(--violet); }
.ag-3dd[open] > summary { margin-bottom:8px; }
.ag3d-st { position:relative; height:min(60vh, 380px); min-height:280px; border-radius:18px; background:radial-gradient(ellipse at 50% 40%, var(--surf) 0%, var(--bg) 80%); overflow:hidden; touch-action:none; display:flex; align-items:center; justify-content:center; }
.ag3d-st canvas { display:block; width:100%; height:100%; }
.ag3d-v { display:flex; gap:6px; justify-content:center; flex-wrap:wrap; margin-top:8px; }
.ag3d-v button { border:0; padding:6px 12px; border-radius:999px; background:var(--surf2); color:var(--ink2); font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; }
.ag3d-v button.on { background:var(--violet); color:#fff; }
.ng-lb.vec { font-size:12px; font-style:italic; } .ng-lb.vec.a { color:var(--lapis); } .ng-lb.vec.b { color:var(--mal); } .ng-lb.vec.c { color:var(--ochre); } .ng-lb.vec.h { color:var(--cin); }
.ng-lb.pt.ag-hot { color:var(--cin); }
.ag-figbox { margin:10px 0 4px; overflow-x:auto; }
.ag-figw { margin:0; } .ag-figw figcaption { margin-top:2px; font-size:12px; color:var(--ink2); text-align:center; }
.ag-fig { display:block; width:100%; max-width:380px; height:auto; margin:0 auto; overflow:visible; }
.ag-fig .ag-ln { stroke:var(--ink2); stroke-width:2; }
.ag-fig .ag-br { fill:none; stroke:var(--lapis); stroke-width:1.4; } .ag-fig .ag-br2 { fill:none; stroke:var(--ochre); stroke-width:1.4; }
.ag-fig .ag-pt { fill:var(--ink); } .ag-fig .ag-pt.m { fill:var(--cin); } .ag-fig .ag-pt.s { fill:var(--ink2); }
.ag-fig .ag-l { font-size:14px; font-weight:800; fill:var(--ink); font-style:italic; } .ag-fig .ag-l.m { fill:var(--cin); }
.ag-fig .ag-t { font-size:12px; font-weight:600; fill:var(--ink2); } .ag-fig .ag-t.b { font-weight:800; fill:var(--violet); }
.ag-fig .ag-pg { fill:color-mix(in srgb,var(--violet) 7%,transparent); stroke:var(--ink2); stroke-width:1.6; stroke-linejoin:round; }
.ag-fig .ag-pg.fill { fill:color-mix(in srgb,var(--violet) 22%,transparent); }
.ag-fig .ag-dg { stroke:var(--cin); stroke-width:1.8; } .ag-fig .ag-dg.b { stroke:var(--violet); }
.ag-fig .ag-arc { fill:none; stroke:var(--ink); stroke-width:1.3; }
.ag-ans { padding:6px 14px; }
.ag-ar { display:grid; grid-template-columns:26px 1fr; gap:6px; align-items:baseline; padding:7px 0; border-top:1px solid var(--line); }
.ag-ar:first-child { border-top:0; }
.ag-ar > b { font-family:var(--fd); color:var(--violet); }
.ag-ar .md p { margin:0; } .ag-ar .md { min-width:0; overflow-x:auto; }
.seg2.four { grid-template-columns:repeat(4,1fr); }
.seg2.four a { font-size:13px; }
.ag-plan { margin:6px 0 4px; padding-left:20px; font-size:14px; } .ag-plan li { margin:3px 0; }
.ag-ok { font-style:normal; color:var(--violet); font-weight:700; }
.ms-hw { display:block; font-size:12.5px; margin:-2px 0 4px; }
.ms-n.ok { border:0; cursor:pointer; color:var(--violet); background:color-mix(in srgb,var(--violet) 12%,transparent); font:inherit; font-weight:700; padding:3px 8px; border-radius:8px; margin:2px 0; }
.ag-sq { margin-bottom:8px; }
.ez-fig { margin:10px 0 6px; } .ez-fig figcaption { margin-top:4px; font-size:12.5px; color:var(--ink2); text-align:center; }
.ez-svg { display:block; width:100%; max-width:420px; height:auto; margin:0 auto; overflow:visible; }
.ez-svg .ez-v { stroke-width:2.4; stroke:var(--lapis); } .ez-svg .ez-v.b { stroke:var(--cin); } .ez-svg .ez-v.s { stroke:var(--violet); } .ez-svg .ez-v.h { stroke:var(--cin); stroke-width:2; } .ez-svg .ez-v.dim { opacity:.35; stroke:var(--mal); }
.ez-svg .ez-v.a { stroke:var(--lapis); }
.ez-svg .ez-vl { font-size:13px; font-weight:800; font-style:italic; fill:var(--lapis); } .ez-svg .ez-vl.b { fill:var(--cin); } .ez-svg .ez-vl.s { fill:var(--violet); } .ez-svg .ez-vl.h { fill:var(--cin); }
.ez-svg .ez-t { font-size:11px; fill:var(--ink2); }
.ez-svg .ez-pg { fill:color-mix(in srgb,var(--violet) 9%,transparent); stroke:var(--ink3); stroke-dasharray:4 3; }
.ez-svg .ez-ax { stroke:var(--ink3); stroke-width:1.2; }
.ez-svg .ez-dash { stroke:var(--ink3); stroke-dasharray:4 3; }
.ez-svg .ez-pt { fill:var(--ink); }
.ez-svg .ez-arc { fill:none; stroke:var(--ink2); }
.ez-svg .ez-pr { stroke-width:6; stroke-linecap:round; opacity:.55; } .ez-svg .ez-pr.p { stroke:var(--mal); } .ez-svg .ez-pr.n { stroke:var(--cin); } .ez-svg .ez-pr.z { stroke:var(--ink3); }
.ez-svg .ez-res { font-size:12.5px; font-weight:800; } .ez-svg .ez-res.p { fill:var(--mal); } .ez-svg .ez-res.n { fill:var(--cin); } .ez-svg .ez-res.z { fill:var(--violet); }
.ez-sl { display:flex; align-items:center; gap:10px; max-width:420px; margin:6px auto 0; font-size:13px; color:var(--ink2); }
.ez-sl input { flex:1; accent-color:var(--violet); } .ez-sl b { min-width:38px; text-align:right; color:var(--ink); }

/* химия: рисунки теории по-простому (ch/easyfig.js) */
.ez-svg .ez-orb { fill:color-mix(in srgb,var(--lapis) 16%,transparent); stroke:var(--lapis); stroke-width:1.2; }
.ez-svg .ez-orb.b { fill:color-mix(in srgb,var(--cin) 14%,transparent); stroke:var(--cin); }
.ez-svg .ez-orbit { fill:none; stroke:var(--ink3); stroke-dasharray:3 3; }
.ez-svg .ez-nuc { fill:var(--cin); } .ez-svg .ez-el { fill:var(--lapis); }
.ez-svg .ez-wave { fill:none; stroke:var(--ochre); stroke-width:2; }
.ez-svg .ez-hot { fill:color-mix(in srgb,var(--ochre) 35%,transparent); stroke:var(--ochre); }
.ez-svg .ez-curve { fill:none; stroke:var(--violet); stroke-width:2.4; }
.ez-svg .ez-box { fill:none; stroke:var(--ink2); stroke-width:1.3; } .ez-svg .ez-box.em { stroke-dasharray:3 2; }
.ez-svg .ez-box.bd { stroke:var(--teal); } .ez-svg .ez-box.ab { stroke:var(--cin); }
.ez-svg .ez-bond { stroke:var(--ink2); stroke-width:2; }
.ez-svg .ez-t.big { font-size:14px; font-weight:800; fill:var(--ink); } .ez-svg .ez-t.w { fill:#fff; font-weight:800; } .ez-svg .ez-t.s { font-size:10px; fill:var(--ink); }
.ez-svg .ez-v.z { stroke:var(--ink3); stroke-width:1.2; }
.ch-ez-row { justify-content:center; } .ch-ez-row figure { margin:0; text-align:center; } .ch-ez-row figcaption { font-size:12px; color:var(--ink2); }
.ch-ez-row .ez-svg { max-width:170px; }
.ch-klech { display:flex; flex-wrap:wrap; gap:6px 4px; align-items:center; justify-content:center; color:var(--ink3); font-size:13px; }
.ch-klech span { display:inline-flex; flex-direction:column; align-items:center; padding:4px 8px; border-radius:10px; background:var(--card2, color-mix(in srgb,var(--ink) 5%,transparent)); color:var(--ink); }
.ch-klech span b { font-size:14px; } .ch-klech span i { font-style:normal; font-size:11px; color:var(--ink2); }
.ch-klech span.hi { background:color-mix(in srgb,var(--ochre) 22%,transparent); }
.ch-klech.ox span.b { background:color-mix(in srgb,var(--lapis) 16%,transparent); } .ch-klech.ox span.m { background:color-mix(in srgb,var(--violet) 16%,transparent); } .ch-klech.ox span.a { background:color-mix(in srgb,var(--cin) 16%,transparent); }
.ez-svg path.ez-v { fill:none; }
.ch-ez-row figure { flex:1 1 0; min-width:96px; }

/* ======================= Успеваемость (ЭУ): #/eu, #/eu/<предмет> ======================= */
.eu-upd { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; font-size:13.5px; }
.eu-upd > .ic { width:16px; height:16px; color:var(--ink3); }
.eu-upd > span:not(.hspin) { flex:1 1 220px; }
.eu-upd > .hspin { flex:none; width:16px; height:16px; border-width:2px; }
.eu-upd .linkbtn { padding:0; font-size:13.5px; }
.eu-views { margin:14px 0 4px; }
.eu-body { min-height:50vh; }

/* значок предмета и плашка статуса */
.eu-si { flex:none; width:38px; height:38px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:var(--c); background:color-mix(in srgb,var(--c) 14%,transparent); }
.eu-si .ic { width:20px; height:20px; }
.eu-pill { display:inline-flex; align-items:center; gap:5px; flex:none; padding:4px 10px 4px 8px; border-radius:999px; font-size:12.5px; font-weight:700; line-height:1.2; color:var(--c); background:color-mix(in srgb,var(--c) 13%,transparent); white-space:nowrap; }
.eu-pill .ic { width:14px; height:14px; stroke-width:2.6; }

/* шкала модуля: зоны (ниже порога / удовл. / хор. / отл.) и полоса балла поверх */
.eu-scale { position:relative; flex:1; min-width:0; padding:3px 0; }
.eu-sc-track { display:flex; height:10px; border-radius:999px; overflow:hidden; gap:2px; }
.eu-sc-track i { display:block; height:100%; }
.eu-sc-track .z-fail { background:color-mix(in srgb,var(--cin) 16%,var(--surf2)); }
.eu-sc-track .z-pass { background:color-mix(in srgb,var(--ochre) 20%,var(--surf2)); }
.eu-sc-track .z-good { background:color-mix(in srgb,var(--teal) 20%,var(--surf2)); }
.eu-sc-track .z-great { background:color-mix(in srgb,var(--mal) 22%,var(--surf2)); }
.eu-sc-fill { position:absolute; left:0; right:0; top:3px; height:10px; pointer-events:none; }
.eu-sc-fill i { display:block; height:100%; width:0; border-radius:999px; background:var(--c); box-shadow:0 0 0 2px var(--surf), 0 2px 10px color-mix(in srgb,var(--c) 45%,transparent); transition:width 1.1s var(--ease); }
.eu-scale.sm .eu-sc-track, .eu-scale.sm .eu-sc-fill { height:7px; }
.eu-sc-ticks { position:relative; height:18px; margin-top:4px; font-size:11.5px; font-weight:700; color:var(--ink3); font-variant-numeric:tabular-nums; }
.eu-sc-ticks span { position:absolute; top:0; transform:translateX(-50%); }
.eu-sc-ticks span:last-child { transform:translateX(-100%); }

/* главная вкладка: сводка */
.eu-hero { position:relative; overflow:hidden; margin-top:14px; padding:20px 18px 16px; border-radius:26px; color:#fff;
  background:linear-gradient(135deg, var(--lapis), color-mix(in srgb,var(--violet) 85%,var(--lapis))); box-shadow:0 14px 34px color-mix(in srgb,var(--lapis) 30%,transparent); }
.eu-hero::after { content:""; position:absolute; right:-60px; top:-70px; width:220px; height:220px; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.22), transparent 65%); pointer-events:none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eu-hero { background:linear-gradient(135deg, #2741a8, #4b2f94); } }
:root[data-theme="dark"] .eu-hero { background:linear-gradient(135deg, #2741a8, #4b2f94); }
.eu-hero-k { font-size:13px; font-weight:700; letter-spacing:.02em; opacity:.85; }
.eu-hero-n { display:flex; align-items:baseline; gap:8px; margin:6px 0 2px; font-variant-numeric:tabular-nums; }
.eu-hero-n b { font-family:var(--fd); font-size:46px; font-weight:600; line-height:1; letter-spacing:-.02em; }
.eu-hero-n span { font-size:17px; font-weight:700; opacity:.8; }
.eu-hero-s { margin:8px 0 0; font-size:14px; line-height:1.45; opacity:.92; }
.eu-hero-s a { display:inline-flex; align-items:center; gap:2px; color:#fff; font-weight:800; text-decoration:none; padding:2px 8px 2px 10px; margin-left:2px; border-radius:999px; background:rgba(255,255,255,.18); }
.eu-hero-s a .ic { width:14px; height:14px; }
.eu-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:16px; }
.eu-stats div { padding:10px 10px 9px; border-radius:16px; background:rgba(255,255,255,.14); }
.eu-stats b { display:block; font-family:var(--fd); font-size:20px; font-weight:600; font-variant-numeric:tabular-nums; }
.eu-stats b small { font-size:13px; opacity:.75; font-family:var(--fb); font-weight:700; }
.eu-stats span { display:block; font-size:12px; line-height:1.25; opacity:.85; margin-top:2px; }

.eu-news, .eu-list { display:flex; flex-direction:column; gap:8px; }
.eu-nw, .eu-wr { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:18px; background:var(--surf); text-decoration:none; color:inherit; }
.eu-nw:active, .eu-wr:active { transform:scale(.985); }
.eu-nw .rt, .eu-wr .rt { font-size:15px; }
.eu-nw-t { flex:none; font-size:12px; color:var(--ink3); }
.eu-wr { box-shadow:inset 3px 0 0 var(--c); }
.eu-wr .eu-pill { white-space:normal; max-width:46%; text-align:left; }

/* карточки предметов */
.eu-cards { display:flex; flex-direction:column; gap:10px; }
.eu-card { display:block; padding:12px 14px 14px; border-radius:22px; background:var(--surf); text-decoration:none; color:inherit; transition:transform .22s var(--ease), box-shadow .25s; animation:rowIn .45s var(--ease) both; }
.eu-card:nth-child(2) { animation-delay:40ms; } .eu-card:nth-child(3) { animation-delay:80ms; } .eu-card:nth-child(4) { animation-delay:120ms; } .eu-card:nth-child(n+5) { animation-delay:160ms; }
.eu-card:active { transform:scale(.985); }
@media (hover:hover) { .eu-card:hover { box-shadow:0 8px 24px rgba(20,25,50,.08); } }
.eu-ch { display:flex; align-items:center; gap:12px; }
.eu-ch > .ic { color:var(--ink3); width:18px; height:18px; }
.eu-ch .rt { font-size:16px; }
.eu-tot { flex:none; display:flex; align-items:baseline; gap:3px; font-variant-numeric:tabular-nums; }
.eu-tot b { font-family:var(--fd); font-size:20px; font-weight:600; }
.eu-tot span { font-size:12.5px; color:var(--ink3); font-weight:700; }
.eu-mods { display:flex; flex-direction:column; gap:6px; margin:12px 0 2px; }
.eu-mrow { display:grid; grid-template-columns:30px 1fr 64px; align-items:center; gap:10px; }
.eu-mn { font-size:12.5px; font-weight:800; color:var(--ink2); }
.eu-mv { text-align:right; font-size:12.5px; color:var(--ink3); font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
.eu-mv b { font-size:16px; }
.eu-mv em { font-style:normal; font-weight:600; font-size:12px; }
.eu-kmrow { display:flex; align-items:center; gap:10px; margin-top:10px; }
.eu-lbl { flex:none; width:76px; font-size:12px; font-weight:700; color:var(--ink3); }
.eu-dots { display:flex; flex-wrap:wrap; gap:5px; }
.eu-dot { display:inline-flex; align-items:baseline; gap:2px; padding:3px 7px; border-radius:9px; font-size:11.5px; font-weight:800; color:var(--c); background:color-mix(in srgb,var(--c) 14%,transparent); }
.eu-dot small { font-size:10px; opacity:.75; }
.eu-semtxt { font-size:13px; color:var(--ink2); }
@media (min-width:700px) { .eu-cards { display:grid; grid-template-columns:1fr 1fr; align-items:start; } }

/* пояснения и настройки */
.eu-legend { margin-top:22px; border-radius:20px; background:var(--surf); }
.eu-legend summary { display:flex; align-items:center; gap:10px; padding:14px 16px; list-style:none; cursor:pointer; font-weight:700; font-size:15px; }
.eu-legend summary::-webkit-details-marker { display:none; }
.eu-legend summary > span { flex:1; }
.eu-legend summary .ic:first-child { color:var(--lapis); }
.eu-legend summary .ic:last-child { width:18px; height:18px; color:var(--ink3); transition:transform .3s var(--ease); }
.eu-legend[open] summary .ic:last-child { transform:rotate(180deg); }
.eu-lg { padding:0 16px 14px; font-size:14px; line-height:1.5; color:var(--ink2); }
.eu-lg p { margin:0 0 10px; } .eu-lg b { color:var(--ink); }
.eu-lg-sc { padding:10px 12px 4px; margin:0 0 12px; border-radius:16px; background:var(--bg); }
.eu-lg-sc .foot { margin:6px 0 6px; }
.eu-lg-st { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.eu-prefs { margin-top:12px; padding:6px 16px; }
.eu-sw { display:flex; align-items:center; gap:14px; padding:12px 0; cursor:pointer; }
.eu-sw + .eu-sw { border-top:1px solid var(--line); }
.eu-sw > span { flex:1; display:flex; flex-direction:column; gap:3px; }
.eu-sw b { font-size:15px; } .eu-sw > span > span { font-size:13px; color:var(--ink2); line-height:1.4; }
.eu-sw input { position:absolute; opacity:0; width:0; height:0; }
.eu-sw i { flex:none; position:relative; width:50px; height:30px; border-radius:999px; background:var(--surf2); transition:background .25s; }
.eu-sw i::after { content:""; position:absolute; left:3px; top:3px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 2px 6px rgba(0,0,0,.2); transition:transform .3s var(--spring); }
.eu-sw input:checked + i { background:var(--mal); }
.eu-sw input:checked + i::after { transform:translateX(20px); }
.eu-sw input:focus-visible + i { outline:3px solid color-mix(in srgb,var(--lapis) 50%,transparent); outline-offset:2px; }

/* страница предмета */
.eu-total { margin-top:14px; padding:16px 16px 12px; border-radius:24px; background:color-mix(in srgb,var(--c) 9%,var(--surf)); }
.eu-tt { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:8px; }
.eu-total .eu-hero-k { color:var(--ink2); opacity:1; }
.eu-total .eu-hero-n span { color:var(--ink3); opacity:1; }
.eu-grade { padding:6px 12px; border-radius:999px; font-weight:800; background:var(--c); color:#fff; }
.eu-tt-s { margin:4px 0 0; font-size:14px; color:var(--ink2); line-height:1.45; }
.eu-tt-s b { color:var(--ink); }
.eu-modlist { display:flex; flex-direction:column; gap:10px; }
.eu-mod { padding:14px 16px 12px; border-radius:22px; background:var(--surf); }
.eu-mod-h { display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.eu-mod-h b { font-size:16px; } .eu-mod-h span { font-size:13px; color:var(--ink2); }
.eu-mod-v { display:flex; align-items:center; gap:10px; margin:8px 0 6px; flex-wrap:wrap; }
.eu-big { font-family:var(--fd); font-size:30px; font-weight:600; line-height:1; font-variant-numeric:tabular-nums; }
.eu-big small { font-family:var(--fb); font-size:15px; color:var(--ink3); font-weight:700; }
.eu-mod-k { margin:2px 0 0; font-size:12.5px; color:var(--ink2); }
.eu-mod-k b { color:var(--ink); }
.eu-mod-g { display:flex; gap:8px; align-items:flex-start; margin:10px 0 0; padding-top:10px; border-top:1px solid var(--line); font-size:13px; color:var(--ink2); line-height:1.4; }
.eu-mod-g .ic { width:16px; height:16px; flex:none; margin-top:1px; color:var(--ink3); }
.eu-mod-g b { color:var(--ink); }
.eu-kms { display:flex; flex-direction:column; gap:8px; }
.eu-km { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:18px; background:var(--surf); }
.eu-km.past { opacity:.92; } .eu-km.now { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--lapis) 40%,transparent); }
.eu-km-i { flex:none; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:var(--c); background:color-mix(in srgb,var(--c) 15%,transparent); }
.eu-km-i .ic { width:18px; height:18px; stroke-width:2.5; }
.eu-km .rt { font-size:15px; } .eu-km .rs + .rs { color:var(--c); font-weight:600; }
.eu-km-t { flex:none; font-size:12px; font-weight:800; color:var(--ink3); padding:4px 8px; border-radius:8px; background:var(--bg); }
.eu-now { display:inline-block; margin-left:4px; padding:1px 7px; border-radius:999px; font-size:11px; font-weight:800; color:#fff; background:var(--lapis); vertical-align:2px; }
.eu-sems { display:grid; grid-template-columns:repeat(auto-fill, minmax(48px,1fr)); gap:6px; }
.eu-sd { display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 0 6px; border-radius:14px; background:var(--surf); }
.eu-sd b { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; background:var(--surf2); color:var(--ink3); }
.eu-sd b .ic { width:15px; height:15px; stroke-width:3; }
.eu-sd small { font-size:11px; color:var(--ink2); font-variant-numeric:tabular-nums; }
.eu-sd.y b { background:var(--teal); color:#fff; } .eu-sd.w b { background:var(--mal); color:#fff; } .eu-sd.n b { background:color-mix(in srgb,var(--cin) 14%,transparent); color:var(--cin); }
.eu-sd.f { opacity:.45; }
.eu-att { display:flex; align-items:center; gap:16px; }
.eu-ring { flex:none; width:86px; height:86px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:radial-gradient(closest-side, var(--surf) 76%, transparent 78%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--surf2) 0); }
.eu-ring b { font-family:var(--fd); font-size:22px; line-height:1; } .eu-ring span { font-size:12px; color:var(--ink2); }
.eu-att .foot { margin:4px 0 0; }

/* вся группа */
.eu-spills { margin-top:16px; }
.eu-gmodes { margin:0 0 12px; }
.eu-gstats { display:flex; flex-wrap:wrap; gap:6px 14px; margin:0 2px 10px; font-size:13px; color:var(--ink2); }
.eu-gstats b { color:var(--ink); }
.eu-gtop { margin:0 4px 10px; }
.eu-tw { overflow-x:auto; margin:0 -18px; padding:0 18px 4px; overscroll-behavior-x:contain; }
@media (min-width:700px) { .eu-tw { margin:0 -28px; padding:0 28px 4px; } }
.eu-t { border-collapse:separate; border-spacing:0; min-width:100%; background:var(--surf); border-radius:20px; overflow:hidden; font-variant-numeric:tabular-nums; }
.eu-t th, .eu-t td { padding:9px 8px; text-align:center; border-bottom:1px solid var(--line); white-space:nowrap; }
.eu-t tbody tr:last-child th, .eu-t tbody tr:last-child td { border-bottom:0; }
.eu-t thead th { font-size:12.5px; font-weight:800; color:var(--ink2); background:var(--surf); vertical-align:bottom; }
.eu-t thead th small { display:block; font-size:10.5px; font-weight:700; color:var(--ink3); }
.eu-t th:first-child { position:sticky; left:0; z-index:1; text-align:left; background:var(--surf); box-shadow:1px 0 0 var(--line); }
.eu-sort { cursor:pointer; user-select:none; }
.eu-sort.on { color:var(--lapis); }
.eu-sort.on::after { content:"↓"; margin-left:3px; } .eu-sort.on.asc::after { content:"↑"; }
.eu-nm { display:table-cell; font-size:14px; font-weight:600; max-width:44vw; }
.eu-nm i { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; margin-right:8px; border-radius:7px; font-style:normal; font-size:11px; font-weight:800; color:var(--ink3); background:var(--bg); vertical-align:middle; }
.eu-nm i .ic { width:12px; height:12px; }
.eu-nm span { vertical-align:middle; overflow:hidden; text-overflow:ellipsis; }
.eu-t tr.me th, .eu-t tr.me td { background:color-mix(in srgb,var(--lapis) 9%,var(--surf)); }
.eu-t tr.me th:first-child { box-shadow:inset 3px 0 0 var(--lapis), 1px 0 0 var(--line); }
.eu-c { font-size:14px; } .eu-c.e { color:var(--ink3); } .eu-c.l { text-align:left; font-size:13px; color:var(--ink2); white-space:normal; min-width:140px; }
.eu-c small { color:var(--ink3); font-size:11.5px; }
.eu-cv { display:inline-block; min-width:34px; padding:3px 7px; border-radius:9px; font-weight:800; color:var(--c); background:color-mix(in srgb,var(--c) 14%,transparent); }
.eu-ci { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; font-weight:800; font-size:12px; color:var(--c, var(--ink3)); background:color-mix(in srgb,var(--c, var(--ink3)) 14%,transparent); }
.eu-ci .ic { width:13px; height:13px; stroke-width:3; }
.eu-sum { font-family:var(--fd); font-weight:600; }
.eu-keys { display:flex; flex-wrap:wrap; gap:6px 14px; margin:10px 4px 0; font-size:12.5px; color:var(--ink2); }
.eu-keys span { display:inline-flex; align-items:center; gap:6px; }
.eu-keys i { width:12px; height:12px; border-radius:4px; background:color-mix(in srgb,var(--c) 45%,transparent); }
.eu-keys i.e { background:var(--surf2); }
.eu-keys .eu-ci { width:20px; height:20px; }
.eu-gnote { display:flex; gap:6px; align-items:flex-start; margin-top:14px; }
.eu-gnote .ic { width:15px; height:15px; flex:none; margin-top:2px; }

/* рейтинг */
.eu-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:16px; }
.eu-metrics button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:10px 4px; border:0; border-radius:18px; background:var(--surf); color:var(--ink2); font-size:12.5px; font-weight:800; line-height:1.15; text-align:center; }
.eu-metrics button .ic { width:22px; height:22px; }
.eu-metrics button.on { color:#fff; background:linear-gradient(135deg,#ff8a3d,#e8402e); box-shadow:0 8px 20px rgba(232,64,46,.3); }
.eu-metrics button:active { transform:scale(.96); }
.eu-metrics + .eu-spills { margin-top:12px; }
.eu-modp { margin:-4px 0 10px; }
.eu-modp button { padding:6px 12px; font-size:13px; }
.eu-mdesc { margin:0 4px 6px; }
.eu-mine { display:flex; align-items:center; gap:10px; margin:12px 0 0; padding:12px 14px; border-radius:18px; font-size:14.5px; background:color-mix(in srgb,var(--lapis) 11%,var(--surf)); }
.eu-mine > .ic { color:var(--lapis); }
.eu-podium { display:grid; grid-template-columns:repeat(3,1fr); align-items:end; gap:8px; margin:18px 0 14px; padding-top:8px; }
.eu-pod { position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; animation:podIn .7s var(--spring) both; animation-delay:var(--d); }
.eu-pod-av { position:relative; z-index:1; width:54px; height:54px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:var(--fd); font-size:22px; font-weight:600; color:#fff; background:var(--pc); box-shadow:0 0 0 4px var(--bg), 0 8px 20px color-mix(in srgb,var(--pc) 45%,transparent); }
.eu-pod-av .ic { width:22px; height:22px; }
.eu-pod.p1 .eu-pod-av { font-size:28px; }
.eu-pod-nm { margin-top:8px; font-size:14.5px; line-height:1.2; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.eu-pod-nm small { display:block; font-size:11.5px; font-weight:600; color:var(--ink2); }
.eu-pod-v { margin:4px 0 8px; font-weight:800; font-size:13px; color:var(--ink2); font-variant-numeric:tabular-nums; }
.eu-pod-v b { font-family:var(--fd); font-size:20px; color:var(--ink); }
.eu-pod-col { width:100%; display:flex; align-items:flex-start; justify-content:center; padding-top:10px; border-radius:18px 18px 8px 8px;
  background:linear-gradient(180deg, color-mix(in srgb,var(--pc) 34%,var(--surf)), color-mix(in srgb,var(--pc) 10%,var(--surf))); transform-origin:bottom; animation:podGrow .9s var(--ease) both; animation-delay:calc(var(--d) + 150ms); }
.eu-pod-col em { font-style:normal; font-family:var(--fd); font-size:26px; font-weight:600; color:var(--pc); }
.eu-pod.p1 { --pc:#f39c12; } .eu-pod.p2 { --pc:#8e9bb0; } .eu-pod.p3 { --pc:#c0763a; }
.eu-pod.p1 .eu-pod-col { height:132px; } .eu-pod.p2 .eu-pod-col { height:98px; } .eu-pod.p3 .eu-pod-col { height:74px; }
.eu-pod.me .eu-pod-nm { color:var(--lapis); }
/* первое место: аватар в живом пламени */
.eu-blaze { position:relative; display:block; width:92px; height:103px; margin-bottom:-2px; }
.eu-fl { position:absolute; inset:0; width:100%; height:100%; overflow:visible; filter:drop-shadow(0 6px 14px rgba(232,64,46,.25)); }
.eu-fl g { transform-box:fill-box; transform-origin:50% 100%; }
.eu-fl .tm { animation:swayM 4.2s ease-in-out infinite; }
.eu-fl .tc { animation:core 2.6s ease-in-out infinite; }
@keyframes swayM { 0%,100% { transform:rotate(0) scale(1); } 30% { transform:rotate(-1.6deg) scale(1.01,1.035); } 65% { transform:rotate(1.4deg) scale(.995,.99); } }
@keyframes swayL { 0%,100% { transform:rotate(-4deg) scaleY(1); } 50% { transform:rotate(3deg) scaleY(1.08); } }
@keyframes swayR { 0%,100% { transform:rotate(4deg) scaleY(1.04); } 50% { transform:rotate(-3deg) scaleY(.96); } }
@keyframes core { 0%,100% { transform:scale(1); } 35% { transform:scale(.96,1.06); } 70% { transform:scale(1.02,.97); } }
.eu-glow { position:absolute; left:50%; bottom:6px; width:112px; height:84px; margin-left:-56px; border-radius:50%; pointer-events:none;
  background:radial-gradient(closest-side, rgba(255,140,50,.28), transparent); animation:glow 4.5s ease-in-out infinite; }
.eu-blaze .em { position:absolute; left:50%; top:18px; width:4px; height:4px; border-radius:50%; background:#ffd36a; box-shadow:0 0 6px 2px rgba(255,150,40,.55); opacity:0; animation:ember 4.2s ease-out infinite; pointer-events:none; }
.eu-blaze .em:nth-of-type(1) { --x:-18px; animation-delay:.3s; }
.eu-blaze .em:nth-of-type(2) { --x:14px; animation-delay:1.7s; width:3px; height:3px; }
.eu-blaze .em:nth-of-type(3) { --x:-4px; animation-delay:3s; }
@keyframes ember { 0% { opacity:0; transform:translate(0,0) scale(1); } 20% { opacity:.9; } 100% { opacity:0; transform:translate(var(--x),-34px) scale(.4); } }
.eu-blaze .eu-pod-av { position:absolute; left:50%; bottom:3px; margin-left:-25px; width:50px; height:50px; font-size:22px; z-index:1;
  background:linear-gradient(160deg,#ffc061,#ff8a3d 55%,#e8402e); box-shadow:0 0 0 3px #fff3d6, 0 4px 14px rgba(232,64,46,.35); }
.eu-blaze .eu-medal { right:14px; bottom:-1px; }
.eu-medal.m1 { --m1:#fff6c8; --m2:#f5b82e; --m3:#b9780c; }
.eu-medal.m1 b { color:#7a4a00; text-shadow:0 1px 0 rgba(255,255,255,.6); }
/* медали второго и третьего места */
.eu-medal { position:absolute; right:-3px; bottom:-2px; width:20px; height:20px; z-index:2; animation:medalIn .6s .5s var(--spring) both; }
@keyframes medalIn { from { opacity:0; transform:scale(.3) rotate(-40deg); } }
.eu-medal b { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; border-radius:50%; font-family:var(--fd); font-size:10.5px; font-weight:700; color:#fff; text-shadow:0 1px 1px rgba(0,0,0,.35);
  background:radial-gradient(circle at 35% 30%, var(--m1), var(--m2) 60%, var(--m3)); box-shadow:0 0 0 2px var(--bg), inset 0 -2px 3px rgba(0,0,0,.25), 0 3px 8px rgba(0,0,0,.25); overflow:hidden; }
.eu-medal b::after { content:""; position:absolute; top:-40%; left:-60%; width:40%; height:180%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent); transform:rotate(25deg); animation:shine 3.6s ease-in-out infinite; }
.eu-medal.m2 { --m1:#ffffff; --m2:#cfd6e0; --m3:#8d99aa; }
.eu-medal.m2 b { color:#3a4558; text-shadow:0 1px 0 rgba(255,255,255,.7); }
.eu-medal b { border:1.5px solid color-mix(in srgb,var(--m3) 70%,#fff); }
.eu-medal.m3 { --m1:#ffd9b0; --m2:#d08a4c; --m3:#8d4f22; }
.eu-medal.m3 b::after { animation-delay:1.2s; }
@keyframes shine { 0%,70% { left:-60%; } 100% { left:140%; } }
@keyframes glow { 0%,100% { opacity:.7; transform:scale(.95); } 50% { opacity:1; transform:scale(1.08); } }
@keyframes podIn { from { opacity:0; transform:translateY(24px) scale(.9); } to { opacity:1; transform:none; } }
@keyframes podGrow { from { transform:scaleY(0); } to { transform:scaleY(1); } }
.eu-rank { display:flex; flex-direction:column; gap:6px; }
.eu-rr { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:18px; background:var(--surf); animation:rowIn .45s var(--ease) both; animation-delay:var(--d); }
.eu-rr.me { background:color-mix(in srgb,var(--lapis) 11%,var(--surf)); box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--lapis) 35%,transparent); }
.eu-rr.none { opacity:.55; }
.eu-rp { flex:none; width:28px; text-align:center; font-family:var(--fd); font-size:16px; font-weight:600; color:var(--ink3); }
.eu-rr .rt { font-size:14.5px; display:flex; align-items:center; gap:5px; }
.eu-rr .rt .ic { width:14px; height:14px; color:var(--ink3); }
.eu-rbar { display:block; height:6px; margin-top:6px; border-radius:999px; background:var(--surf2); overflow:hidden; }
.eu-rbar i { display:block; height:100%; width:0; border-radius:999px; background:linear-gradient(90deg,#ffb340,#e8402e); transition:width 1s var(--ease); }
.eu-rr.me .eu-rbar i { background:linear-gradient(90deg,var(--lapis),var(--violet)); }
.eu-rv { flex:none; display:flex; flex-direction:column; align-items:flex-end; font-variant-numeric:tabular-nums; }
.eu-rv b { font-size:16px; } .eu-rv small { font-size:11.5px; color:var(--ink3); white-space:nowrap; }

/* главная и страница предмета */
.eu-hrow { margin-top:14px; }
.eu-hcard { display:block; margin:14px 0 0; padding:12px 14px; border-radius:22px; background:var(--surf); text-decoration:none; color:inherit; transition:transform .22s var(--ease); }
.eu-hcard:active { transform:scale(.985); }
.eu-hc-h { display:flex; align-items:center; gap:14px; }
.eu-hc-h > .ic { color:var(--ink3); width:18px; height:18px; }
.eu-hc-m { display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.eu-hc-m .eu-mrow { grid-template-columns:62px 1fr 56px; }
.eu-hc-m .eu-mn { font-size:11.5px; white-space:nowrap; overflow:hidden; }
.eu-new { display:inline-block; margin-left:4px; padding:1px 8px; border-radius:999px; font-size:11.5px; font-weight:800; color:#fff; background:var(--cin); vertical-align:2px; animation:pillOn .5s var(--spring) both; }
@media (prefers-reduced-motion: reduce) {
  .eu-pod, .eu-pod-col, .eu-rr, .eu-card, .eu-fl g, .eu-glow, .eu-medal b::after { animation:none !important; }
  .eu-blaze .em { display:none; }
}
.eu-ifoot .ic, .eu-lg p .ic { display:inline-block; width:15px; height:15px; vertical-align:-3px; }
.eu-pod-av { overflow:visible; }
.eu-pod-av img, .eu-rav img { width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.eu-rav { flex:none; width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px; color:var(--ink2); background:var(--surf2); overflow:hidden; }
.eu-rav .ic { width:15px; height:15px; color:var(--ink3); }
.eu-rr.me .eu-rav { box-shadow:0 0 0 2px var(--lapis); }

/* ======================= Редизайн 04.10.2026: стекло, ленты, дневник ======================= */
/* Стекло — только у «плавающих» элементов: нижняя панель, круглые кнопки шапки, бегунки, кнопка «к сегодня».
   Карточки и строки остаются плоскими — как в Telegram. */
:root {
  --gl-bg:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.58));
  --gl-brd:rgba(255,255,255,.75);
  --gl-hl:inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(20,30,60,.05);
  --gl-sh:0 10px 30px rgba(23,30,60,.14), 0 2px 6px rgba(23,30,60,.06);
  --gl-thumb:linear-gradient(180deg, color-mix(in srgb,var(--lapis) 16%,rgba(255,255,255,.9)), color-mix(in srgb,var(--lapis) 22%,rgba(255,255,255,.6)));
  --gl-blur:blur(22px) saturate(180%);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --gl-bg:linear-gradient(180deg, rgba(44,48,60,.72), rgba(26,29,38,.62));
  --gl-brd:rgba(255,255,255,.10);
  --gl-hl:inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(0,0,0,.25);
  --gl-sh:0 12px 34px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
  --gl-thumb:linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
} }
:root[data-theme="dark"] {
  --gl-bg:linear-gradient(180deg, rgba(44,48,60,.72), rgba(26,29,38,.62));
  --gl-brd:rgba(255,255,255,.10);
  --gl-hl:inset 0 1px 0 rgba(255,255,255,.14), inset 0 -1px 0 rgba(0,0,0,.25);
  --gl-sh:0 12px 34px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
  --gl-thumb:linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
}
.glass { background:var(--gl-bg); border:1px solid var(--gl-brd); box-shadow:var(--gl-hl), var(--gl-sh); -webkit-backdrop-filter:var(--gl-blur); backdrop-filter:var(--gl-blur); }

/* нижняя панель — как в Telegram: ровная плотная капсула без градиентов, выбранная вкладка — мягкая серая «таблетка»,
   значок и подпись выбранной — синие, остальные — цвета текста. В боковой панели (компьютер) — то же. */
:root { --tb-bg:rgba(255,255,255,.94); --tb-sel:rgba(118,118,128,.12); --tb-sh:0 0 0 .5px rgba(20,25,45,.08), 0 8px 28px rgba(20,25,45,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tb-bg:rgba(24,26,33,.94); --tb-sel:rgba(255,255,255,.10); --tb-sh:0 0 0 .5px rgba(255,255,255,.09), 0 10px 30px rgba(0,0,0,.6); } }
:root[data-theme="dark"] { --tb-bg:rgba(24,26,33,.94); --tb-sel:rgba(255,255,255,.10); --tb-sh:0 0 0 .5px rgba(255,255,255,.09), 0 10px 30px rgba(0,0,0,.6); }
#tabwrap .tabs { background:var(--tb-bg); border:0; box-shadow:var(--tb-sh); -webkit-backdrop-filter:blur(24px) saturate(180%); backdrop-filter:blur(24px) saturate(180%); }
.tabind { background:var(--tb-sel); box-shadow:none; }
.tabs a, .tabs .tab-ai { color:var(--ink); }
.tabs a.on { color:var(--lapis); }
.tabs a .ic { transition:transform .4s var(--spring); }
.tabs a:active .ic, .tabs .tab-ai:active .tab-ai-c { transform:scale(.86); }
@media (max-width:1023px) {
  #tabwrap .tabs { padding:6px; max-width:460px; }
  .tabind { top:6px; bottom:6px; left:6px; width:calc((100% - 12px) / 5); }
  .tabs a, .tabs .tab-ai { gap:3px; padding:7px 0 6px; font-size:11px; font-weight:700; letter-spacing:-.01em; }
  .tabs a .ic { width:25px; height:25px; stroke-width:1.9; }
  .tabs a:active, .tabs .tab-ai:active { transform:none; }
}

/* круглые кнопки шапки и «Назад» — стеклянные; аватар — фото в стеклянном кольце (как кнопка профиля в Telegram) */
.ph-btns .circ, .topbar .circ, .topbar .pillbtn, .sheet-head .circ, .dk-arr .circ {
  background:var(--gl-bg); border:1px solid var(--gl-brd); box-shadow:var(--gl-hl), 0 4px 14px rgba(23,30,60,.10); -webkit-backdrop-filter:var(--gl-blur); backdrop-filter:var(--gl-blur); }
.ph-btns .circ.acc { background:linear-gradient(180deg, color-mix(in srgb,var(--lapis) 80%,#fff), var(--lapis)); border-color:color-mix(in srgb,var(--lapis) 60%,#fff); color:#fff; box-shadow:inset 0 1px 0 rgba(255,255,255,.45), 0 6px 16px color-mix(in srgb,var(--lapis) 38%,transparent); }
.ph-btns .circ.av { width:48px; height:48px; padding:3px; background:var(--gl-bg); }
.ph-btns .circ.av img { position:static; width:100%; height:100%; border-radius:50%; }
.ph-btns .circ.av::after { content:""; position:absolute; inset:0; border-radius:50%; pointer-events:none; box-shadow:inset 0 0 0 1px rgba(255,255,255,.55), inset 0 2px 3px rgba(255,255,255,.5); }
.topbar .pillbtn { min-height:40px; max-width:62vw; }
.topbar .pillbtn span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.circ:active, .pillbtn:active { transform:scale(.92); }
.dk-arr .circ.sm { width:38px; height:38px; color:var(--ink); }
.hspin.sm { display:inline-block; width:14px; height:14px; border-width:2px; vertical-align:-2px; }

/* бегунок переключателей (сегменты, вкладки предмета, фильтры) */
.seg2, .eu-metrics, .pills { position:relative; }
.seg-th { position:absolute; z-index:0; pointer-events:none; transition:left .42s var(--spring), top .42s var(--spring), width .42s var(--spring), height .42s var(--spring), background-color .3s; }
.th-run > :not(.seg-th) { position:relative; z-index:1; }
.th-run > .on { background:transparent !important; box-shadow:none !important; animation:none !important; }
.seg2 { background:color-mix(in srgb,var(--ink3) 16%,transparent); }
.seg2 a.on, .seg2 button.on { box-shadow:0 1px 1px rgba(20,25,50,.06), 0 3px 10px rgba(20,25,50,.10); }

/* ======================= лента страниц и полоса над ней ======================= */
.dy-top { margin:6px 0 10px; }
.dy-head { display:flex; align-items:center; gap:10px; margin:0 2px 10px; }
.dy-t { flex:1; min-width:0; display:flex; flex-direction:column; }
.dy-t b { font-family:var(--fd); font-size:17px; font-weight:600; line-height:1.2; }
.sem-bar { display:block; height:6px; margin:7px 0 2px; border-radius:6px; background:var(--surf2); overflow:hidden; max-width:260px; }
.sem-bar i { display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,var(--mal),var(--teal)); transition:width .6s var(--ease); }
.ptable .pt-s { min-width:0; max-width:132px; }
.ptable .pt-s a { overflow:hidden; text-overflow:ellipsis; }
.dy-t span { font-size:13px; color:var(--ink2); margin-top:3px; }
.dk-arr { flex:none; display:flex; gap:6px; }
.dk-strip { position:relative; display:flex; gap:6px; overflow-x:auto; margin:0 -18px; padding:4px 18px 6px; scrollbar-width:none; overscroll-behavior-x:contain; }
.dk-strip::-webkit-scrollbar { display:none; }
.dk-strip button { position:relative; z-index:1; flex:1 0 auto; min-width:46px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; padding:7px 8px 6px; border:0; border-radius:16px; background:var(--surf); color:var(--ink); font:inherit; transition:color .3s, background-color .3s, opacity .3s, transform .2s var(--ease); }
.dk-strip button:active { transform:scale(.92); }
.dk-strip button small { font-size:11px; font-weight:700; color:var(--ink3); text-transform:lowercase; transition:color .3s; }
.dk-strip button b { font-size:17px; font-weight:800; font-variant-numeric:tabular-nums; line-height:1.2; }
.dk-strip button.past { opacity:.55; }
.dk-strip button.td b { color:var(--lapis); }
.dk-strip button.on { background:transparent; color:#fff; opacity:1; }
.dk-strip button.on small { color:rgba(255,255,255,.82); }
.dk-strip button.on.td b { color:#fff; }
.dk-th { position:absolute; left:0; top:4px; z-index:0; width:46px; height:58px; border-radius:16px; opacity:0; pointer-events:none;
  background:linear-gradient(180deg, color-mix(in srgb,var(--lapis) 82%,#fff), var(--lapis)); box-shadow:inset 0 1px 0 rgba(255,255,255,.4), 0 6px 16px color-mix(in srgb,var(--lapis) 35%,transparent);
  transition:transform .42s var(--spring), width .42s var(--spring), opacity .2s; }
.dy-dots { display:flex; gap:3px; height:6px; margin-top:2px; }
.dy-dots i { width:5px; height:5px; border-radius:50%; background:var(--lapis); }
.dy-dots i.h { background:var(--ochre); } .dy-dots i.e { background:var(--cin); }
.dk-strip button.on .dy-dots i { background:#fff !important; opacity:.9; }
.dk-strip.in-r { animation:stripR .38s var(--ease) both; } .dk-strip.in-l { animation:stripL .38s var(--ease) both; }
@keyframes stripR { from { opacity:0; transform:translateX(30px); } } @keyframes stripL { from { opacity:0; transform:translateX(-30px); } }
.sem-strip button, .cw-strip button { flex:0 0 auto; min-width:50px; }
.sem-strip button.rk::after { content:""; position:absolute; top:5px; right:6px; width:6px; height:6px; border-radius:50%; background:var(--cin); }

.dk { display:flex; align-items:flex-start; gap:36px; overflow-x:auto; overflow-y:hidden; margin:0 -18px; padding:0 18px 4px; scroll-snap-type:x mandatory; scroll-padding:0 18px; scrollbar-width:none; overscroll-behavior-x:contain; transition:height .38s var(--ease); outline:none; }
.dk::-webkit-scrollbar { display:none; }
.dk-p { flex:0 0 100%; min-width:0; scroll-snap-align:start; scroll-snap-stop:always; min-height:60px; transition:opacity .35s; }
.dk-p:not(.on) { opacity:.45; }
@media (min-width:700px) {
  .dk, .dk-strip, .toolx, .modx { margin-left:-28px; margin-right:-28px; padding-left:28px; padding-right:28px; scroll-padding:0 28px; }
  .dk { gap:56px; }
}
@media (min-width:1024px) {
  .dk, .dk-strip, .toolx, .modx { margin-left:-36px; margin-right:-36px; padding-left:36px; padding-right:36px; scroll-padding:0 36px; }
  .dk { gap:12px; }
  .dy-deck .dk-p { flex-basis:calc((100% - 24px) / 3); }
  .sem-deck .dk-p, #cwDeck .dk-p { flex-basis:calc((100% - 12px) / 2); }
  .dk-p:not(.on) { opacity:.6; }
  body[data-screen="hw"] #app { max-width:1180px; }
}

/* ======================= дневник ======================= */
.dl { display:grid; grid-template-columns:50px minmax(0,1fr); gap:8px; margin:0 0 8px; }
.dl-time { display:flex; flex-direction:column; align-items:flex-end; padding-top:13px; font-variant-numeric:tabular-nums; }
.dl-time b { font-size:15px; } .dl-time span { font-size:12.5px; color:var(--ink3); }
.dl-card { position:relative; min-width:0; padding:11px 12px 10px 16px; border-radius:20px; background:var(--surf); overflow:hidden; }
.dl-card::before { content:""; position:absolute; left:0; top:12px; bottom:12px; width:4px; border-radius:0 4px 4px 0; background:var(--c); }
.dl-h { display:flex; flex-direction:column; text-decoration:none; color:inherit; min-width:0; }
.dl-k { font-size:12px; font-weight:700; color:var(--ink3); text-transform:lowercase; }
.dl-n { font-size:16.5px; font-weight:800; line-height:1.25; margin-top:1px; }
.dl-tc { font-size:12.5px; color:var(--ink2); margin-top:1px; }
.dl.past { opacity:.55; }
.dl.dim .dl-card { background:color-mix(in srgb,var(--surf) 60%,transparent); }
.dl.now .dl-card { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--mal) 55%,transparent), 0 8px 22px color-mix(in srgb,var(--mal) 16%,transparent); }
.dl.now .dl-time b { color:var(--mal); }
.dl-prog { position:relative; margin:8px 0 2px; height:20px; border-radius:999px; background:color-mix(in srgb,var(--mal) 12%,transparent); overflow:hidden; }
.dl-prog i { position:absolute; inset:0 auto 0 0; background:color-mix(in srgb,var(--mal) 28%,transparent); border-radius:999px; }
.dl-prog span { position:relative; display:block; text-align:center; font-size:11.5px; font-weight:800; line-height:20px; color:var(--mal); }
.dl-br { display:flex; align-items:center; gap:8px; margin:2px 0 10px 58px; font-size:11.5px; font-weight:700; color:var(--ink3); }
.dl-br i { flex:1; height:1px; background:var(--line); }
.dl-hw { display:flex; flex-direction:column; gap:6px; margin-top:9px; }
.dl-add { display:inline-flex; align-items:center; gap:4px; margin:8px 0 0; padding:4px 10px 4px 6px; border-radius:999px; font-size:12.5px; font-weight:700; color:var(--ink3); text-decoration:none; background:var(--bg); }
.dl-add .ic { width:15px; height:15px; }
.dl-add:active { transform:scale(.94); }
.dy-evs { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.dy-free { display:flex; flex-direction:column; align-items:center; text-align:center; gap:4px; padding:34px 18px; border-radius:24px; background:var(--surf); color:var(--ink2); }
.dy-free .ic { width:30px; height:30px; color:var(--mal); margin-bottom:6px; }
.dy-free b { color:var(--ink); font-size:16px; } .dy-free span { font-size:13.5px; }
.dy-loose { margin-top:6px; padding:10px; border-radius:20px; background:var(--surf); }
.dy-loose .cap { margin:2px 4px 8px; }
.dy-loose .hwi { background:var(--bg); }
.dy-only { display:inline-flex; align-items:center; gap:8px; margin:0 0 10px; padding:6px 10px 6px 14px; border-radius:999px; background:color-mix(in srgb,var(--lapis) 12%,var(--surf)); color:var(--lapis); font-weight:800; font-size:13.5px; text-decoration:none; }
.dy-only span { font-weight:600; color:var(--ink2); }
.dy-only .ic { width:15px; height:15px; }
.dy-today { position:fixed; left:50%; bottom:calc(96px + env(safe-area-inset-bottom,0px)); z-index:20; display:inline-flex; align-items:center; gap:6px; padding:10px 16px; border-radius:999px; font:inherit; font-size:14px; font-weight:800; color:var(--lapis); transform:translateX(-50%);
  background:var(--gl-bg); border:1px solid var(--gl-brd); box-shadow:var(--gl-hl), var(--gl-sh); -webkit-backdrop-filter:var(--gl-blur); backdrop-filter:var(--gl-blur); animation:todayIn .4s var(--spring) both; }
.dy-today[hidden] { display:none; }
.dy-today .ic { width:16px; height:16px; }
@keyframes todayIn { from { opacity:0; transform:translate(-50%,16px) scale(.9); } }
@media (min-width:1024px) { .dy-today { bottom:28px; left:calc(50% + 126px); } }

/* строка ДЗ: кружок, заголовок, начало текста (2 строки) */
.hwi { display:flex; align-items:flex-start; gap:10px; width:100%; padding:10px 12px 10px 8px; border-radius:16px; background:color-mix(in srgb,var(--c, var(--lapis)) 7%,var(--bg)); cursor:pointer; text-align:left; transition:transform .22s var(--ease), background .25s, opacity .3s; }
.hwi:active { transform:scale(.985); }
.hwi .chk-o.sm { width:24px; height:24px; margin:1px 2px 0 4px; border-width:2px; }
.hwi .chk-o.sm .ic { width:14px; height:14px; }
.hwi-x { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.hwi-x b { font-size:14.5px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
.hwi-t { font-size:13.5px; color:var(--ink2); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.hwi-m { display:flex; align-items:center; flex-wrap:wrap; font-size:12px; font-weight:600; color:var(--ink3); margin-top:2px; }
.hwi-m .ic { width:13px; height:13px; margin-right:2px; }
.hwi-s { display:inline-flex; align-items:center; gap:5px; color:var(--c); font-weight:800; }
.hwi-s::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--c); }
.hwi.is-done { opacity:.55; }
.hwi.is-done .hwi-x b { text-decoration:line-through; text-decoration-color:color-mix(in srgb,var(--ink) 40%,transparent); }
.hwi.other { opacity:.5; }
.hw-body > .hwi, .hwl-d > .hwi, .stab-body > .hwi, .hwl-in > .hwi { background:var(--surf); margin-bottom:6px; }
.chk-o.on { animation:chkPop .4s var(--spring); }
@keyframes chkPop { 40% { transform:scale(1.25); } }

/* событие плана: метка «РК1», название, результат из ЭУ */
.dev { display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px 8px 8px; margin-top:8px; border:0; border-radius:14px; background:color-mix(in srgb,var(--c) 11%,var(--bg)); color:var(--ink); font:inherit; text-align:left; transition:transform .22s var(--ease); }
.dev:active { transform:scale(.985); }
.dev-b { flex:none; min-width:40px; height:30px; padding:0 6px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; color:#fff; background:var(--c); }
.dev-x { flex:1; min-width:0; display:flex; flex-direction:column; }
.dev-x b { font-size:14px; } .dev-x span { font-size:12.5px; color:var(--ink2); }
.dev > .ic { width:16px; height:16px; color:var(--ink3); }
.dev-r { flex:none; display:flex; align-items:center; justify-content:center; min-width:28px; height:28px; padding:0 6px; border-radius:999px; font-weight:800; font-size:13px; color:#fff; background:var(--c); }
.dev-r .ic { width:15px; height:15px; stroke-width:3; }
.dy-evs .dev, .hwl-d .dev, .cw-evs .dev { margin-top:0; background:var(--surf); }
.modc .dev { background:var(--bg); }

/* ======================= домашки списком ======================= */
.hwl-w { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin:22px 4px 8px; font-family:var(--fd); font-size:16px; font-weight:600; }
.hwl-w span { font-family:var(--fb); font-size:12.5px; font-weight:600; color:var(--ink3); }
.hwl-d { margin:0 0 12px; }
.hwl-dh { position:sticky; top:calc(env(safe-area-inset-top,0px) + 6px); z-index:3; display:inline-flex; align-items:baseline; gap:8px; margin:0 0 8px; padding:6px 14px; border-radius:999px;
  background:var(--gl-bg); border:1px solid var(--gl-brd); box-shadow:var(--gl-hl), 0 4px 12px rgba(23,30,60,.08); -webkit-backdrop-filter:var(--gl-blur); backdrop-filter:var(--gl-blur); }
.hwl-dh b { font-size:14.5px; } .hwl-dh span { font-size:12.5px; color:var(--ink2); font-weight:600; }
.hwl-d.td .hwl-dh b { color:var(--lapis); }
.hwl-d > .dev { margin-bottom:6px; }
.hw-chips { margin-top:12px; }
.hw-var { margin:4px 4px 12px; }
.hw-var .ic { display:inline-block; width:15px; height:15px; color:var(--lapis); vertical-align:-3px; }
/* раскрывающиеся блоки (плавно — см. main.js) */
.hwl-acc { margin:0 0 10px; border-radius:20px; }
.hwl-acc > summary { list-style:none; display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:20px; background:var(--surf); cursor:pointer; font-weight:700; font-size:14.5px; transition:transform .22s var(--ease); }
.hwl-acc > summary::-webkit-details-marker { display:none; }
.hwl-acc > summary:active { transform:scale(.985); }
.hwl-acc > summary > span:first-child:not(.bub):not(.modc-n) { flex:1; display:flex; align-items:center; gap:8px; }
.hwl-acc > summary > .ic:last-child { flex:none; width:18px; height:18px; color:var(--ink3); margin-left:auto; transition:transform .35s var(--ease); }
.hwl-acc[open] > summary > .ic:last-child { transform:rotate(180deg); }
.hwl-acc > summary .ic { width:17px; height:17px; }
.hwl-acc.late > summary { color:var(--cin); background:color-mix(in srgb,var(--cin) 9%,var(--surf)); }
.hwl-n { font-size:12.5px; font-weight:800; color:var(--ink3); padding:2px 8px; border-radius:999px; background:var(--bg); }
.hwl-in { padding:8px 0 0; }
.hwl-st { flex:1; min-width:0; display:flex; flex-direction:column; }
.hwl-st b { font-size:15.5px; } .hwl-st small { font-size:12.5px; font-weight:600; color:var(--ink2); margin-top:1px; }
.card-acc > summary { padding:12px; min-height:62px; }
.card-acc[open] > summary { border-radius:20px 20px 8px 8px; }
.hwl-m { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin:10px 6px 8px; }
.hwl-m b { font-size:14px; } .hwl-m span { font-size:12.5px; color:var(--ink2); }
details.hwl-acc .hwl-in > .row:last-child { margin-bottom:4px; }

/* быстрый просмотр ДЗ */
.pk-h { display:flex; align-items:flex-start; gap:12px; margin:2px 0 12px; }
.pk-h > span:last-child { display:flex; flex-direction:column; gap:3px; min-width:0; }
.pk-h b { font-family:var(--fd); font-size:19px; font-weight:600; line-height:1.25; overflow-wrap:anywhere; }
.pk-h span span { font-size:13.5px; color:var(--ink2); }
.pk-md { font-size:15.5px; }
.pk-btns { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.pk-btns .btn { margin:0; min-height:48px; font-size:15px; }
.pk-btns .btn:only-child { grid-column:1 / -1; }
.pk .byline { margin:10px 2px 0; }

/* ======================= календарь ======================= */
.cw-day { display:grid; grid-template-columns:42px minmax(0,1fr); gap:8px; margin-bottom:10px; }
.cw-dh { display:flex; flex-direction:column; align-items:center; padding-top:6px; }
.cw-dh b { font-size:12px; font-weight:800; color:var(--ink3); text-transform:uppercase; }
.cw-dh b .ic { width:18px; height:18px; }
.cw-dh span { font-size:20px; font-weight:800; font-variant-numeric:tabular-nums; }
.cw-day.td .cw-dh span { color:#fff; background:var(--lapis); border-radius:12px; padding:1px 8px; }
.cw-day.past { opacity:.6; }
.cw-evs { display:flex; flex-direction:column; gap:6px; }
.cw-hw { margin-top:10px; }
.ptable td button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; min-width:42px; padding:3px 2px; }
.ptable td button b { font-size:11.5px; font-weight:800; line-height:1.1; }
.ptable td { height:40px; }
.ptable thead th { min-width:42px; }
.pt-r { display:flex; align-items:center; justify-content:center; min-width:20px; height:15px; padding:0 4px; border-radius:999px; font-size:10.5px; font-weight:800; font-style:normal; color:#fff; background:var(--r); }
.pt-r .ic { width:11px; height:11px; stroke-width:3.4; }
.ptable td.past button.has-r { opacity:1; }
.ptable td.past:has(.has-r) { opacity:1; }
.ev-eu { display:inline-flex; align-items:center; gap:6px; font-weight:800; color:var(--c) !important; }
.ev-eu .ic { width:16px; height:16px; }

/* ======================= страница предмета ======================= */
.toolx { display:flex; gap:10px; overflow-x:auto; margin:0 -18px 6px; padding:2px 18px 8px; scroll-snap-type:x proximity; scroll-padding:0 18px; scrollbar-width:none; }
.toolx::-webkit-scrollbar { display:none; }
.toolx > .row { flex:0 0 min(58vw, 220px); flex-direction:column; align-items:flex-start; gap:8px; min-height:128px; margin:0; padding:14px; scroll-snap-align:start; border-radius:22px; }
.toolx > .row .rl { gap:4px; }
.toolx > .row .rt { font-size:15px; line-height:1.25; }
.toolx > .row .rs { font-size:12.5px; line-height:1.35; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.toolx > .row .chev { display:none; }
.toolx > .row:active { transform:scale(.97); }
.modx { display:flex; gap:10px; overflow-x:auto; margin:0 -18px; padding:2px 18px 8px; scroll-snap-type:x mandatory; scroll-padding:0 18px; scrollbar-width:none; align-items:flex-start; }
.modx::-webkit-scrollbar { display:none; }
.modx > .modc { flex:0 0 min(84%, 360px); scroll-snap-align:start; }
.modx .dev { margin-top:6px; }
.sinfo { padding:14px 16px; }
.si-h { display:flex; align-items:center; gap:8px; margin:4px 0 8px; font-size:14px; color:var(--ink2); }
.si-h .ic { width:16px; height:16px; }
.si-h ~ .si-h { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.si-chips { display:flex; flex-wrap:wrap; gap:6px; }
.si-c { display:inline-flex; gap:6px; padding:6px 10px; border-radius:12px; background:var(--bg); font-size:13px; color:var(--ink2); }
.si-c b { color:var(--ink); font-weight:800; }
.si-t { display:flex; flex-direction:column; padding:4px 0; }
.si-t b { font-size:14.5px; } .si-t span { font-size:12.5px; color:var(--ink2); }
.si-sub { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); font-size:14px; color:var(--ink2); }
.btn-row.two { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:8px 0 0; }
.btn-row.two .btn { margin:0; }
.stabs { background:transparent; }
.stabs::before { content:""; position:absolute; inset:0; z-index:-1; background:color-mix(in srgb,var(--bg) 82%,transparent); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.stab-body { animation:softIn .3s var(--ease) both; }

/* ======================= семинары ======================= */
.sem-deck .ms { margin:0; }
.sem-deck .ms.cur { box-shadow:inset 0 0 0 2px var(--cin); }
.sem-deck .ms.past { opacity:1; }
.ms-mod { font-size:11.5px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; color:var(--ink3); margin-bottom:6px; }
.ms-was { font-size:11.5px; font-weight:800; color:var(--ink2); background:var(--surf2); border-radius:99px; padding:2px 8px; }
.sem-top { margin-top:10px; }
.sem-strip button.td { box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--cin) 55%,transparent); }

/* главная: к паре — что задано */
.ls-hw { display:flex; align-items:center; gap:5px; margin-top:3px; font-size:12.5px; font-weight:700; color:var(--ochre); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ls-hw .ic { flex:none; width:13px; height:13px; }

/* плавное появление при переключении внутри экрана — без сдвига шапки и переключателей */
.a-soft { animation:none; }
.a-soft > :not(.topbar):not(.ph):not(.seg2):not(.stabs):not(.shead):not(.pills):not(.eu-views) { animation:softIn .32s var(--ease) both; }
@keyframes softIn { from { opacity:0; transform:translateY(5px); } }
@media (prefers-reduced-motion: reduce) {
  .dk { transition:none; } .dk-th, .seg-th { transition:none; } .a-soft > * { animation:none !important; }
}

.dy-today { white-space:nowrap; }
.dy-pdh { display:none; }
@media (min-width:1024px) {
  .dk { margin-left:0; margin-right:0; padding-left:0; padding-right:0; scroll-padding:0; }
  .dy-pdh { display:flex; align-items:baseline; gap:8px; margin:0 0 10px 58px; }
  .dy-pdh b { font-size:15px; } .dy-pdh span { font-size:13px; color:var(--ink2); }
  .dy-pdh.td b { color:var(--lapis); }
}
.dev-x .dev-n { display:flex; align-items:center; gap:4px; color:var(--ochre); font-weight:700; }
.dev-n .ic { flex:none; width:13px; height:13px; }

/* ======================= Редизайн 2 (04.10.2026, вечер): единый стиль, плавность, тёмная тема ======================= */
/* токены переключателей: серая дорожка и белый (в тёмной — светлее фона) бегунок, как сегменты iOS */
:root { --seg-track:color-mix(in srgb,var(--ink3) 16%,transparent); --seg-thumb:var(--surf); --seg-sh:0 1px 1px rgba(20,25,50,.06), 0 3px 10px rgba(20,25,50,.10); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --seg-track:rgba(255,255,255,.07); --seg-thumb:#30364a; --seg-sh:inset 0 1px 0 rgba(255,255,255,.07), 0 3px 10px rgba(0,0,0,.35); } }
:root[data-theme="dark"] { --seg-track:rgba(255,255,255,.07); --seg-thumb:#30364a; --seg-sh:inset 0 1px 0 rgba(255,255,255,.07), 0 3px 10px rgba(0,0,0,.35); }
.seg2 { background:var(--seg-track); }
.seg2 a.on, .seg2 button.on { background:var(--seg-thumb); color:var(--ink); box-shadow:var(--seg-sh); }

/* вкладки предмета — тот же сегмент: дорожка липнет к верху и остаётся видна над содержимым */
.stabs { margin:16px 0 10px; padding:4px; gap:2px; border-radius:999px; background:color-mix(in srgb,var(--bg) 72%,transparent); box-shadow:inset 0 0 0 100px var(--seg-track);
  -webkit-backdrop-filter:blur(18px) saturate(170%); backdrop-filter:blur(18px) saturate(170%); }
.stabs::before { display:none; }
.stabs a { flex:1 1 auto; padding:8px 7px; text-align:center; white-space:nowrap; background:transparent; color:var(--ink2); font-size:13.5px; }
.stabs a.on { background:var(--seg-thumb); color:var(--c); box-shadow:var(--seg-sh); animation:none; }
@media (min-width:700px) { .stabs { margin:16px 0 10px; padding:4px; } }
@media (min-width:1024px) { .stabs { margin:16px 0 10px; padding:4px; } }
@media (hover:hover) { .stabs a:hover:not(.on) { background:color-mix(in srgb,var(--ink3) 12%,transparent); } }
.seg2 a.on, .seg2 button.on, .pills .on { animation:none; }

/* ничего не обрезается снизу: у лент с прокруткой вбок есть запас под тень и «пружину» нажатия */
.pills.scroll { padding:4px 18px 10px; margin:0 -18px 4px; }
.dk-strip { padding-top:6px; padding-bottom:16px; margin-top:-2px; margin-bottom:-10px; }
.dz-steps { padding:4px 18px 10px; margin-bottom:-4px; }
.rkline { padding:4px 2px 10px; margin:-4px -2px 0; }
.toolx { padding-top:4px; padding-bottom:12px; margin-bottom:2px; }
.modx { padding-top:4px; padding-bottom:12px; }
@media (min-width:700px) { .pills.scroll { margin:0 -28px 4px; padding:4px 28px 10px; } }
@media (min-width:1024px) { .pills.scroll { margin:0 -36px 4px; padding:4px 36px 10px; } }

/* смена вкладки внутри экрана: содержимое растворяется, переключатели (ctl0…ctl5) стоят, по ним живьём едет бегунок */
html[data-vt="same"]::view-transition-old(root) { animation:vtFadeOut .2s ease both; }
html[data-vt="same"]::view-transition-new(root) { animation:vtSoftIn .34s var(--ease) both; }
::view-transition-group(ctl0), ::view-transition-group(ctl1), ::view-transition-group(ctl2), ::view-transition-group(ctl3), ::view-transition-group(ctl4), ::view-transition-group(ctl5) { animation-duration:.38s; animation-timing-function:var(--ease); }
::view-transition-old(ctl0), ::view-transition-old(ctl1), ::view-transition-old(ctl2), ::view-transition-old(ctl3), ::view-transition-old(ctl4), ::view-transition-old(ctl5) { animation:none; opacity:0; }
::view-transition-new(ctl0), ::view-transition-new(ctl1), ::view-transition-new(ctl2), ::view-transition-new(ctl3), ::view-transition-new(ctl4), ::view-transition-new(ctl5) { animation:none; }
::view-transition-old(ctl0):only-child, ::view-transition-old(ctl1):only-child, ::view-transition-old(ctl2):only-child, ::view-transition-old(ctl3):only-child, ::view-transition-old(ctl4):only-child, ::view-transition-old(ctl5):only-child { opacity:1; animation:vtFadeOut .2s ease both; }
::view-transition-new(ctl0):only-child, ::view-transition-new(ctl1):only-child, ::view-transition-new(ctl2):only-child, ::view-transition-new(ctl3):only-child, ::view-transition-new(ctl4):only-child, ::view-transition-new(ctl5):only-child { animation:vtSoftIn .34s var(--ease) both; }
/* нижняя панель во время перехода не двоится: показываем только живую, по ней едет индикатор */
::view-transition-old(tabbar) { animation:none; opacity:0; }
::view-transition-new(tabbar) { animation:none; }
::view-transition-group(tabbar) { animation-duration:.42s; animation-timing-function:var(--ease); }
/* переходы между экранами — мягче, с заметным сдвигом (как в iOS) */
html[data-vt="fwd"]::view-transition-old(root) { animation:vtOutL2 .32s var(--ease) both; }
html[data-vt="fwd"]::view-transition-new(root) { animation:vtInR2 .42s var(--ease) both; }
html[data-vt="back"]::view-transition-old(root) { animation:vtOutR2 .32s var(--ease) both; }
html[data-vt="back"]::view-transition-new(root) { animation:vtInL2 .42s var(--ease) both; }
html[data-vt="tab"]::view-transition-old(root) { animation:vtFadeOut .2s ease both; }
html[data-vt="tab"]::view-transition-new(root) { animation:vtTabIn .38s var(--ease) both; }
@keyframes vtOutL2 { to { opacity:0; transform:translateX(-18%); } }
@keyframes vtInR2 { from { opacity:0; transform:translateX(24%); } }
@keyframes vtOutR2 { to { opacity:0; transform:translateX(18%); } }
@keyframes vtInL2 { from { opacity:0; transform:translateX(-24%); } }
@keyframes vtTabIn { from { opacity:0; transform:scale(.985); } }

/* ======================= дневник: день помещается на экран ======================= */
.hw-ph .sub { display:none; }
.dy-top { margin:12px 0 6px; }
.dy-head { margin:0 2px 6px; }
.dy-t b { font-size:16px; }
.dy-t span { margin-top:1px; font-size:12.5px; }
.dk-arr .circ.sm { width:36px; height:36px; }
.dk-strip button { padding:5px 6px 4px; border-radius:15px; }
.dk-strip button b { font-size:16px; line-height:1.15; }
.dk-th { border-radius:15px; box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 5px 14px color-mix(in srgb,var(--lapis) 32%,transparent); }
.dl { grid-template-columns:44px minmax(0,1fr); gap:8px; margin:0 0 6px; }
.dl-time { padding-top:9px; }
.dl-time b { font-size:14px; } .dl-time span { font-size:11.5px; }
.dl-card { padding:8px 44px 9px 14px; border-radius:18px; }
.dl-card::before { top:10px; bottom:10px; width:3px; }
.dl-k { font-size:11.5px; }
.dl-n { font-size:15.5px; line-height:1.2; }
.dl-tc { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--ink3); }
.dl-add { position:absolute; top:8px; right:8px; width:30px; height:30px; margin:0; padding:0; justify-content:center; border-radius:50%; background:var(--seg-track); color:var(--ink2); }
.dl-add .ic { width:16px; height:16px; }
.dl-br { margin:0 0 6px 52px; font-size:11px; }
.dl-hw { gap:5px; margin-top:7px; margin-right:-34px; }
.dl-hw .hwi { padding:7px 10px 7px 6px; border-radius:13px; }
.dl-hw .hwi-x b { font-size:14px; }
.dl-hw .hwi-t { -webkit-line-clamp:1; font-size:13px; }
.dl-card > .dev { margin:7px -34px 0 0; width:calc(100% + 34px); padding:5px 8px 5px 5px; border-radius:12px; }
.dl-card .dev-b { min-width:34px; height:24px; border-radius:8px; font-size:12px; }
.dl-card .dev-x b { font-size:13.5px; }
.dl-card .dev-r { min-width:24px; height:24px; font-size:12px; }
.dl-prog { height:17px; margin:6px -34px 0 0; }
.dl-prog span { line-height:17px; font-size:11px; }
.dy-free { padding:22px 16px; }
.dy-hint { margin-top:10px; }

/* ======================= единые карточки-герои: как «Баллы за выставленные модули» ======================= */
.hub-hero { background:linear-gradient(135deg, var(--hc), color-mix(in srgb,var(--hc) 62%,var(--violet))); box-shadow:0 14px 34px color-mix(in srgb,var(--hc) 28%,transparent); border-radius:26px; }
.hub-hero::after { border:0; background:radial-gradient(circle, rgba(255,255,255,.22), transparent 65%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-hero { background:linear-gradient(135deg, color-mix(in srgb,var(--hc) 62%,#0e1220), color-mix(in srgb,var(--violet) 46%,#0e1220)); box-shadow:0 14px 34px rgba(0,0,0,.45); }
  :root:not([data-theme="light"]) .hub-hero::after { opacity:.5; }
  :root:not([data-theme="light"]) .dk-th { background:linear-gradient(180deg,#5f83ff,#3d60e0); box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 5px 14px rgba(61,96,224,.35); } }
:root[data-theme="dark"] .hub-hero { background:linear-gradient(135deg, color-mix(in srgb,var(--hc) 62%,#0e1220), color-mix(in srgb,var(--violet) 46%,#0e1220)); box-shadow:0 14px 34px rgba(0,0,0,.45); }
:root[data-theme="dark"] .hub-hero::after { opacity:.5; }
:root[data-theme="dark"] .dk-th { background:linear-gradient(180deg,#5f83ff,#3d60e0); box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 5px 14px rgba(61,96,224,.35); }
/* ======================= тёмная тема: заливки с белым текстом — насыщенные, а не пастельные ======================= */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pills .on[style*="--c"]:not([style*="--ink"]) { color:#fff; } }
:root[data-theme="dark"] .pills .on[style*="--c"]:not([style*="--ink"]) { color:#fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph-btns .circ.acc { background:linear-gradient(180deg,#6b8cff,#4a6cf0); border-color:rgba(255,255,255,.18); } }
:root[data-theme="dark"] .ph-btns .circ.acc { background:linear-gradient(180deg,#6b8cff,#4a6cf0); border-color:rgba(255,255,255,.18); }

/* Твердыня в панели — без фиолетовой подписи, кольцо аватара нейтральное */
.tab-ai-c .tv-av { box-shadow:0 0 0 1.5px color-mix(in srgb,var(--ink3) 45%,transparent); }
.tabs-main > .tab-ai { color:var(--ink); }

/* нажатия: всё, что нажимается, отвечает одинаково — лёгким сжатием */
.row:active, .stile:active, .lesson:active, .notice:active, .eu-card:active, .eu-hcard:active, .hwi:active, .dev:active { transform:scale(.985); }
.btn:active { transform:scale(.97); }

/* медали: объёмная монета — светлый ободок, внутреннее кольцо, номер с тиснением, мягкая тень */
.eu-medal { width:22px; height:22px; right:-4px; bottom:-3px; }
.eu-medal b { border:0; font-size:11px; font-weight:700; line-height:1;
  background:linear-gradient(150deg, var(--m1) 0%, var(--m2) 48%, var(--m3) 100%);
  box-shadow:0 0 0 2px var(--bg), 0 3px 8px rgba(0,0,0,.28), inset 0 1px 1px rgba(255,255,255,.75), inset 0 -2px 2px rgba(0,0,0,.18); }
.eu-medal b::before { content:""; position:absolute; inset:3px; border-radius:50%; border:1px solid rgba(255,255,255,.55); box-shadow:inset 0 1px 1px rgba(0,0,0,.12); }
.eu-medal b::after { opacity:.7; }
.eu-medal.m1 { --m1:#fff4c2; --m2:#f7c64a; --m3:#c98510; }
.eu-medal.m1 b { color:#6e4300; text-shadow:0 1px 0 rgba(255,255,255,.55); }
.eu-medal.m2 { --m1:#ffffff; --m2:#d7dde7; --m3:#97a3b6; }
.eu-medal.m2 b { color:#3a4558; text-shadow:0 1px 0 rgba(255,255,255,.7); }
.eu-medal.m3 { --m1:#ffe0c2; --m2:#e19a5e; --m3:#a2592a; }
.eu-medal.m3 b { color:#fff; text-shadow:0 1px 1px rgba(90,40,10,.55); }
.eu-blaze .eu-medal { right:12px; bottom:-2px; }
.eu-blaze .eu-pod-av { box-shadow:0 0 0 3px #fff3d6, 0 4px 14px rgba(232,64,46,.35); }
.eu-fl { filter:drop-shadow(0 4px 10px rgba(232,64,46,.28)); }

/* ======================= Единый переключатель (эталон — «Мои · Группа · Рейтинг») =======================
   Серая дорожка, светлый бегунок с едва заметной тенью, выбранная подпись — цвета текста. Так выглядят все панели
   со скользящим выделением: сегменты, вкладки предмета, фильтры, полосы дней и недель, метрики рейтинга. */
:root { --seg-sh:0 0 0 .5px rgba(20,25,50,.05), 0 1px 3px rgba(20,25,50,.10); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --seg-sh:0 0 0 .5px rgba(255,255,255,.06), 0 1px 3px rgba(0,0,0,.3); } }
:root[data-theme="dark"] { --seg-sh:0 0 0 .5px rgba(255,255,255,.06), 0 1px 3px rgba(0,0,0,.3); }
.stabs a.on { color:var(--ink); }

/* фильтры-«пилюли», полосы дней и метрики рейтинга — отдельные кнопки; выбранная — ровная заливка без тени и свечения */
.pills .on { box-shadow:none; }
.eu-metrics button.on { background:linear-gradient(135deg,#ff8a3d,#e8402e); box-shadow:none; }
.eu-metrics + .eu-spills { margin-top:12px; }
.eu-modseg { margin:-2px 0 10px; }
.eu-modseg button { min-height:36px; font-size:13px; padding:0 4px; white-space:nowrap; }
.dk-th { background:var(--lapis) !important; box-shadow:none !important; }
.dk-strip { padding-bottom:12px; margin-bottom:-6px; }
.dk-strip button.on .dy-dots i { background:#fff !important; }

/* стеклянные кнопки: ровная полупрозрачная заливка и размытие, «стекло» — только светлой рамкой (без перелива и бликов) */
:root { --gl-bg:rgba(255,255,255,.72); --gl-brd:rgba(255,255,255,.95); --gl-hl:0 0 0 .5px rgba(20,25,45,.10); --gl-sh:0 4px 16px rgba(23,30,60,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gl-bg:rgba(30,33,42,.66); --gl-brd:rgba(255,255,255,.16); --gl-hl:0 0 0 .5px rgba(0,0,0,.5); --gl-sh:0 4px 16px rgba(0,0,0,.35); } }
:root[data-theme="dark"] { --gl-bg:rgba(30,33,42,.66); --gl-brd:rgba(255,255,255,.16); --gl-hl:0 0 0 .5px rgba(0,0,0,.5); --gl-sh:0 4px 16px rgba(0,0,0,.35); }
.ph-btns .circ, .topbar .circ, .topbar .pillbtn, .sheet-head .circ, .dk-arr .circ { box-shadow:var(--gl-hl), var(--gl-sh); }
.ph-btns .circ.av::after { box-shadow:none; }
.ph-btns .circ.acc, .ph-btns .circ.acc { background:var(--lapis); border:1px solid rgba(255,255,255,.4); box-shadow:var(--gl-hl), 0 4px 14px color-mix(in srgb,var(--lapis) 25%,transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph-btns .circ.acc { background:var(--lapis); border-color:rgba(255,255,255,.22); } }
:root[data-theme="dark"] .ph-btns .circ.acc { background:var(--lapis); border-color:rgba(255,255,255,.22); }
.dl-add { background:var(--seg-track); }
.eu-blaze .eu-pod-av { width:48px; height:48px; margin-left:-24px; bottom:4px; font-size:21px; box-shadow:0 0 0 3px #fff, 0 4px 12px rgba(200,50,20,.35); }
.eu-blaze .eu-medal { right:16px; bottom:0; }
.eu-fl { filter:drop-shadow(0 3px 8px rgba(240,80,30,.25)); }
.eu-blaze .em { top:2px; }

/* ======================= Редизайн 3 (04.10.2026, ночь) ======================= */
/* бегунок переключателей: едет «каплей» (WAAPI в ui.dropMove), в конце выделение возвращается кнопке мгновенно — без моргания */
.seg-th { transition:none !important; }
.th-snap > *, .th-snap > * * { transition:none !important; animation:none !important; }
.dk-th { transition:opacity .25s !important; left:0 !important; top:0 !important; }
/* все переключатели экрана стоят на месте при смене вкладки (раньше имён было 6 — остальные растворялись вместе с содержимым) */
::view-transition-group(ctl6), ::view-transition-group(ctl7), ::view-transition-group(ctl8), ::view-transition-group(ctl9) { animation-duration:.38s; animation-timing-function:var(--ease); }
::view-transition-old(ctl6), ::view-transition-old(ctl7), ::view-transition-old(ctl8), ::view-transition-old(ctl9) { animation:none; opacity:0; }
::view-transition-new(ctl6), ::view-transition-new(ctl7), ::view-transition-new(ctl8), ::view-transition-new(ctl9) { animation:none; }
::view-transition-old(ctl6):only-child, ::view-transition-old(ctl7):only-child, ::view-transition-old(ctl8):only-child, ::view-transition-old(ctl9):only-child { opacity:1; animation:vtFadeOut .2s ease both; }
::view-transition-new(ctl6):only-child, ::view-transition-new(ctl7):only-child, ::view-transition-new(ctl8):only-child, ::view-transition-new(ctl9):only-child { animation:vtSoftIn .34s var(--ease) both; }

/* подсказки: видны, пока не сделал то, о чём они (или не нажал ×) */
.hint { display:flex; align-items:center; gap:10px; margin:12px 0; padding:10px 8px 10px 14px; border-radius:16px; font-size:13.5px; line-height:1.35; color:var(--ink2);
  background:color-mix(in srgb,var(--lapis) 8%,var(--surf)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--lapis) 14%,transparent); animation:softIn .4s var(--ease) both; }
.hint > .ic { flex:none; width:18px; height:18px; color:var(--lapis); }
.hint > span { flex:1; min-width:0; }
.hint-x { flex:none; width:30px; height:30px; display:flex; align-items:center; justify-content:center; border:0; border-radius:50%; background:transparent; color:var(--ink3); cursor:pointer; }
.hint-x .ic { width:16px; height:16px; }
.hint-x:active { background:var(--press); }
.dy-hint { margin-top:10px; }

/* «Решено»: чип в заголовке задачи и широкая кнопка под решением */
.slv { display:inline-flex; align-items:center; gap:7px; margin-left:auto; padding:5px 12px 5px 6px; border:0; border-radius:999px; font:inherit; font-size:13px; font-weight:700; cursor:pointer;
  color:var(--ink2); background:var(--seg-track); transition:background-color .3s, color .3s, transform .2s var(--ease); }
.slv:active { transform:scale(.95); }
.slv-c { width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center; box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--ink3) 60%,transparent); color:transparent; transition:background-color .3s, box-shadow .3s, color .3s; }
.slv-c .ic { width:13px; height:13px; stroke-width:3; }
.slv.on { color:var(--mal); background:color-mix(in srgb,var(--mal) 13%,transparent); }
.slv.on .slv-c { background:var(--mal); box-shadow:none; color:#fff; }
.mz-h .slv { align-self:center; }
.slv.big { display:flex; width:100%; justify-content:center; gap:10px; margin:14px 0; padding:13px 16px; border-radius:18px; font-size:15px; color:var(--ink); background:var(--surf); box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--mal) 40%,transparent); }
.slv.big .slv-c { width:26px; height:26px; }
.slv.big.on { color:#fff; background:var(--mal); box-shadow:0 8px 20px -6px color-mix(in srgb,var(--mal) 60%,transparent); }
.slv.big.on .slv-c { background:rgba(255,255,255,.25); }
.sheet .slv.big { margin:12px 0 4px; }
.slv-prog { display:grid; grid-template-columns:auto 1fr; align-items:baseline; column-gap:8px; margin:10px 0 4px; }
.slv-prog b { font-family:var(--fd); font-size:24px; } .slv-prog > span:not(.tbar) { font-size:14px; color:var(--ink2); }
.slv-prog .tbar { grid-column:1 / -1; } .slv-prog .tbar i, .pt-p .tbar i, .rks-p .tbar i, .evsol .tbar i { background:var(--mal); }
.wb-row.solved .wb-n { background:var(--mal); color:#fff; }
.wb-row.solved .wb-n .ic { width:18px; height:18px; stroke-width:3; }
.ms-n.ok.solved { color:#fff; background:var(--mal); }
.ms-n.ok.solved::after { content:" ✓"; }

/* ======================= карточка-герой «до события осталось» — как логотип: глянцевый градиент цвета предмета ======================= */
.hub-hero, .hub-hero.static { position:relative; overflow:hidden; isolation:isolate; display:block; color:#fff; text-decoration:none; border-radius:28px; padding:22px 20px 20px;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb,var(--hc) 40%,#fff) 0%, transparent 58%),
    linear-gradient(155deg, color-mix(in srgb,var(--hc) 72%,#fff) 0%, var(--hc) 46%, color-mix(in srgb,var(--hc) 78%,#000) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.14), 0 18px 38px -14px color-mix(in srgb,var(--hc) 70%,transparent); }
.hub-hero::after { content:""; position:absolute; z-index:-1; left:0; right:0; top:0; width:auto; height:55%; border:0; border-radius:28px 28px 50% 50% / 28px 28px 34px 34px;
  background:linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,0)); opacity:1; }
.hub-hero .hero-k { opacity:.9; font-weight:700; }
.hub-hero .hh-t { max-width:calc(100% - 92px); }
.hh-ic { position:absolute; z-index:-1; right:16px; top:16px; width:84px; height:84px; border-radius:26px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(160deg, rgba(255,255,255,.28), rgba(255,255,255,.06)); box-shadow:inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.2), 0 10px 24px -8px rgba(0,0,0,.25); transform:rotate(-8deg); }
.hh-ic .ic { width:44px; height:44px; stroke-width:2.2; color:#fff; filter:drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.hub-hero .hero-go { background:rgba(255,255,255,.22); box-shadow:inset 0 1px 0 rgba(255,255,255,.35); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.hh-res { display:inline-flex; align-items:center; gap:6px; margin-top:10px; padding:6px 12px 6px 8px; border-radius:999px; font-size:13.5px; font-weight:700; background:rgba(255,255,255,.92); color:var(--r); }
.hh-res .ic { width:16px; height:16px; }
.hub-hero.static { cursor:default; } .hub-hero.static:active { transform:none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-hero {
  background:radial-gradient(110% 75% at 0% 0%, color-mix(in srgb,var(--hc) 55%,transparent) 0%, transparent 60%), linear-gradient(155deg, color-mix(in srgb,var(--hc) 92%,#000) 0%, color-mix(in srgb,var(--hc) 66%,#000) 52%, color-mix(in srgb,var(--hc) 38%,#0a0d16) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.1), 0 20px 44px -16px color-mix(in srgb,var(--hc) 55%,transparent); } }
:root[data-theme="dark"] .hub-hero {
  background:radial-gradient(110% 75% at 0% 0%, color-mix(in srgb,var(--hc) 55%,transparent) 0%, transparent 60%), linear-gradient(155deg, color-mix(in srgb,var(--hc) 92%,#000) 0%, color-mix(in srgb,var(--hc) 66%,#000) 52%, color-mix(in srgb,var(--hc) 38%,#0a0d16) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.1), 0 20px 44px -16px color-mix(in srgb,var(--hc) 55%,transparent); }

/* ======================= страница события ======================= */
.h1.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.evf { display:flex; gap:8px; margin:12px -18px 4px; padding:2px 18px 6px; overflow-x:auto; scrollbar-width:none; }
.evf::-webkit-scrollbar { display:none; }
.evf-c { flex:1 0 auto; display:flex; align-items:center; gap:10px; padding:10px 14px 10px 12px; border-radius:18px; background:var(--surf); }
.evf-c > .ic { flex:none; width:20px; height:20px; color:var(--ink3); }
.evf-c span { display:flex; flex-direction:column; } .evf-c b { font-size:14.5px; white-space:nowrap; } .evf-c small { font-size:12px; color:var(--ink2); white-space:nowrap; }
.evn { display:flex; gap:10px; align-items:flex-start; margin-top:10px; font-size:14.5px; }
.evn .ic { flex:none; width:18px; height:18px; margin-top:2px; color:var(--ochre); }
.evsol { display:flex; align-items:center; gap:14px; margin:14px 0 6px; padding:16px; border-radius:22px; text-decoration:none; color:var(--ink);
  background:linear-gradient(135deg, color-mix(in srgb,var(--c) 14%,var(--surf)), var(--surf)); box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--c) 30%,transparent); transition:transform .22s var(--ease); }
.evsol:active { transform:scale(.985); }
.evsol-i { flex:none; width:48px; height:48px; border-radius:16px; display:flex; align-items:center; justify-content:center; color:#fff; background:var(--c); box-shadow:0 8px 18px -6px color-mix(in srgb,var(--c) 70%,transparent); }
.evsol .rl { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; } .evsol b { font-size:16px; } .evsol .rl > span:not(.pt-p) { font-size:13px; color:var(--ink2); }
.evsol > .ic { flex:none; color:var(--ink3); }
.evl { display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
.evt { display:flex; gap:6px; overflow-x:auto; margin:0 -18px; padding:4px 18px 10px; scrollbar-width:none; }
.evt::-webkit-scrollbar { display:none; }
.evt-c { flex:none; display:flex; flex-direction:column; align-items:center; gap:1px; min-width:58px; padding:8px 10px; border-radius:15px; text-decoration:none; color:var(--ink); background:var(--surf); transition:transform .2s var(--ease); }
.evt-c b { font-size:14px; color:var(--c); } .evt-c span { font-size:11.5px; color:var(--ink2); }
.evt-c.past { opacity:.5; } .evt-c:active { transform:scale(.94); }
.evt-c.on { background:var(--c); opacity:1; } .evt-c.on b, .evt-c.on span { color:#fff; }
.evx-foot { display:flex; gap:8px; flex-wrap:wrap; margin-top:18px; }
.evx-foot .btn { margin:0; flex:1 1 auto; }
.chips-ai { display:flex; flex-wrap:wrap; gap:8px; }
.chip-ai { display:inline-flex; align-items:center; gap:7px; padding:9px 14px 9px 11px; border:0; border-radius:999px; font:inherit; font-size:14px; font-weight:700; cursor:pointer;
  color:var(--violet); background:color-mix(in srgb,var(--violet) 11%,var(--surf)); transition:transform .2s var(--ease); }
.chip-ai .ic { width:16px; height:16px; } .chip-ai:active { transform:scale(.95); }

/* плитки подготовки: «Учить · Решать · Проверить себя» */
.pt-g { margin-top:16px; }
.pt-gh { display:flex; align-items:center; gap:7px; margin:0 2px 8px; font-size:12.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:var(--ink3); }
.pt-gh .ic { width:15px; height:15px; }
.pt-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
.ptile { position:relative; display:flex; flex-direction:column; gap:3px; min-height:112px; padding:13px 13px 12px; border-radius:20px; text-decoration:none; color:var(--ink); background:var(--surf); overflow:hidden; transition:transform .22s var(--ease); }
.ptile:active { transform:scale(.97); }
.ptile::before { content:""; position:absolute; inset:auto -30px -40px auto; width:110px; height:110px; border-radius:50%; background:radial-gradient(circle, color-mix(in srgb,var(--c) 16%,transparent), transparent 70%); pointer-events:none; }
.pt-i { width:36px; height:36px; margin-bottom:5px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:var(--c); background:color-mix(in srgb,var(--c) 13%,transparent); }
.pt-i .ic { width:19px; height:19px; }
.ptile b { font-size:14.5px; line-height:1.22; }
.pt-s { font-size:12.5px; line-height:1.3; color:var(--ink2); }
.pt-p { display:flex; align-items:center; gap:8px; margin-top:auto; padding-top:8px; }
.pt-p .tbar { flex:1; height:5px; margin:0; } .pt-p em { font-style:normal; font-size:11.5px; font-weight:800; color:var(--ink2); white-space:nowrap; }
@media (min-width:700px) { .pt-grid { grid-template-columns:repeat(3, minmax(0,1fr)); } }

/* #/rk: лента РК по порядку и предметы с готовностью */
.rkq { display:flex; gap:10px; overflow-x:auto; margin:0 -18px; padding:4px 18px 12px; scroll-snap-type:x proximity; scroll-padding:0 18px; scrollbar-width:none; }
.rkq::-webkit-scrollbar { display:none; }
.rkq-c { flex:0 0 150px; scroll-snap-align:start; display:flex; flex-direction:column; gap:2px; padding:13px; border-radius:20px; text-decoration:none; color:var(--ink); background:var(--surf); transition:transform .22s var(--ease); }
.rkq-c:active { transform:scale(.96); }
.rkq-t { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.rkq-i { width:32px; height:32px; border-radius:11px; display:flex; align-items:center; justify-content:center; color:var(--c); background:color-mix(in srgb,var(--c) 13%,transparent); }
.rkq-i .ic { width:17px; height:17px; }
.rkq-t em { font-style:normal; font-size:12px; font-weight:800; color:var(--c); }
.rkq-c b { font-size:15px; line-height:1.2; } .rkq-d { font-size:12.5px; color:var(--ink2); } .rkq-n { margin-top:6px; font-size:13px; font-weight:800; color:var(--c); }
.rks { display:flex; flex-direction:column; gap:8px; }
.rks-r { margin:0; }
.rks-p { display:flex; align-items:center; gap:8px; margin-top:6px; } .rks-p .tbar { flex:1; height:5px; margin:0; max-width:160px; }
.rks-p em, .rks-t { font-style:normal; font-size:12px; font-weight:700; color:var(--ink3); }
.rks-t { margin-top:3px; }
.rkp { text-decoration:none; } .rkp.cur { box-shadow:inset 0 0 0 2px var(--c); }
@media (min-width:700px) { .rkq, .evt, .evf { margin:0 -28px; padding-left:28px; padding-right:28px; scroll-padding:0 28px; } .rks { display:grid; grid-template-columns:1fr 1fr; } }
@media (min-width:1024px) { .rkq, .evt, .evf { margin:0 -36px; padding-left:36px; padding-right:36px; } }

/* ======================= тёмная тема: глубокий синий вместо чёрного, мягкое свечение сверху, карточки с тонкой светлой гранью ======================= */
:root { --edge:none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg:#0A0D16; --surf:#141927; --surf2:#1D2334; --ink:#EEF1F8; --ink2:#A6ADBF; --ink3:#6C7488; --line:rgba(255,255,255,.07);
  --seg-thumb:#283048; --seg-track:rgba(255,255,255,.06); --tb-bg:rgba(20,25,38,.9); --gl-bg:rgba(22,27,41,.7);
  --edge:inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(255,255,255,.035); } }
:root[data-theme="dark"] {
  --bg:#0A0D16; --surf:#141927; --surf2:#1D2334; --ink:#EEF1F8; --ink2:#A6ADBF; --ink3:#6C7488; --line:rgba(255,255,255,.07);
  --seg-thumb:#283048; --seg-track:rgba(255,255,255,.06); --tb-bg:rgba(20,25,38,.9); --gl-bg:rgba(22,27,41,.7);
  --edge:inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 0 1px rgba(255,255,255,.035); }
.ptile, .rkq-c, .evf-c, .evt-c:not(.on), .dl-card, .stile, .lesson { box-shadow:var(--edge); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .row:not(.ev):not(.big), :root:not([data-theme="light"]) .card { box-shadow:var(--edge); }
  :root:not([data-theme="light"]) body::before { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
    background:radial-gradient(900px 560px at 10% -12%, rgba(84,112,255,.20), transparent 62%), radial-gradient(760px 520px at 105% -6%, rgba(156,104,255,.13), transparent 60%), radial-gradient(800px 600px at 50% 120%, rgba(40,160,200,.07), transparent 60%); }
  :root:not([data-theme="light"]) .ptile::before { background:radial-gradient(circle, color-mix(in srgb,var(--c) 22%,transparent), transparent 70%); }
  :root:not([data-theme="light"]) .hh-res { background:rgba(10,13,22,.55); color:#fff; }
}
:root[data-theme="dark"] .row:not(.ev):not(.big), :root[data-theme="dark"] .card { box-shadow:var(--edge); }
:root[data-theme="dark"] body::before { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(900px 560px at 10% -12%, rgba(84,112,255,.20), transparent 62%), radial-gradient(760px 520px at 105% -6%, rgba(156,104,255,.13), transparent 60%), radial-gradient(800px 600px at 50% 120%, rgba(40,160,200,.07), transparent 60%); }
:root[data-theme="dark"] .ptile::before { background:radial-gradient(circle, color-mix(in srgb,var(--c) 22%,transparent), transparent 70%); }
:root[data-theme="dark"] .hh-res { background:rgba(10,13,22,.55); color:#fff; }
.hub-hero .hero-k { max-width:calc(100% - 96px); }
.evf { flex-wrap:wrap; overflow:visible; margin-left:0; margin-right:0; padding-left:0; padding-right:0; }
.evf-c { flex:1 1 auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-hero::after { background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)); } }
:root[data-theme="dark"] .hub-hero::after { background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)); }
/* скрытое атрибутом hidden не показывается, даже если у класса свой display (ответ в окне задачи был виден сразу) */
[hidden] { display:none !important; }
/* нижняя панель полупрозрачная, как в iOS: сквозь неё видно содержимое, размытие сильнее */
:root { --tb-bg:rgba(255,255,255,.68); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tb-bg:rgba(20,25,38,.62); } }
:root[data-theme="dark"] { --tb-bg:rgba(20,25,38,.62); }
#tabwrap .tabs { -webkit-backdrop-filter:blur(28px) saturate(190%); backdrop-filter:blur(28px) saturate(190%); }
/* свечение героя не заходит на карточку ниже: тень короче, отступ больше */
.hub-hero, .hub-hero.static { box-shadow:inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.14), 0 10px 20px -12px color-mix(in srgb,var(--hc) 75%,transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-hero { box-shadow:inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.1), 0 10px 20px -12px color-mix(in srgb,var(--hc) 60%,transparent); } }
:root[data-theme="dark"] .hub-hero { box-shadow:inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.1), 0 10px 20px -12px color-mix(in srgb,var(--hc) 60%,transparent); }
.hg-main > .hub-hero + * { margin-top:20px; }
/* ДЗ НГ, задача 3: выбор вопроса */
.dz3-q { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0 4px; }
.dz3-q a { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border-radius:16px; background:var(--surf); color:inherit; text-decoration:none; box-shadow:var(--edge); transition:background .2s var(--ease); }
.dz3-q a b { flex:none; width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; background:var(--surf2); }
.dz3-q a span { font-size:13px; font-weight:600; line-height:1.25; }
.dz3-q a small { display:block; margin-top:2px; font-weight:500; color:var(--ink3); font-size:11.5px; }
.dz3-q a.on { background:color-mix(in srgb,var(--lapis) 14%,var(--surf)); box-shadow:inset 0 0 0 1.5px var(--lapis); }
.dz3-q a.on b { background:var(--lapis); color:#fff; }
