@font-face{font-family:"Balsamiq Sans";font-weight:700;font-display:swap;src:url(/static/fonts/balsamiq-sans-cyrillic-700-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Balsamiq Sans";font-weight:700;font-display:swap;src:url(/static/fonts/balsamiq-sans-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Balsamiq Sans";font-weight:400;font-display:swap;src:url(/static/fonts/balsamiq-sans-cyrillic-400-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Balsamiq Sans";font-weight:400;font-display:swap;src:url(/static/fonts/balsamiq-sans-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Manrope";font-weight:500;font-display:swap;src:url(/static/fonts/manrope-cyrillic-500-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Manrope";font-weight:500;font-display:swap;src:url(/static/fonts/manrope-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Manrope";font-weight:600;font-display:swap;src:url(/static/fonts/manrope-cyrillic-600-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Manrope";font-weight:600;font-display:swap;src:url(/static/fonts/manrope-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Manrope";font-weight:700;font-display:swap;src:url(/static/fonts/manrope-cyrillic-700-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Manrope";font-weight:700;font-display:swap;src:url(/static/fonts/manrope-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Manrope";font-weight:800;font-display:swap;src:url(/static/fonts/manrope-cyrillic-800-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Manrope";font-weight:800;font-display:swap;src:url(/static/fonts/manrope-latin-800-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ===== Стиль «Киану» поверх тетрадной темы (телефон в первую очередь) ===== */
:root{--text:#10303a;--muted:#5f7f88;--line:#d3e6e9;--acc:#0f8f9c;--kb:"Balsamiq Sans",system-ui,sans-serif;--body:"Manrope",-apple-system,system-ui,sans-serif}
body{font:500 16px/1.45 var(--body);color:var(--text)}
main{max-width:560px;padding:12px max(16px,env(safe-area-inset-right)) 28px max(22px,env(safe-area-inset-left))}
body:has(.course) main{max-width:1180px}
/* верхняя полоса: тонкая, без рамки */
#topbar{background:transparent;border:0;box-shadow:none;padding:10px max(16px,env(safe-area-inset-right)) 4px max(22px,env(safe-area-inset-left));padding-top:calc(10px + env(safe-area-inset-top,0px));justify-content:flex-end;position:static;gap:10px}
#topbar::after{display:none}
#topbar .brand,#topbar nav{display:none}
.who{gap:8px}
.who #whoami{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;color:#fff;font:800 16px var(--body);background:linear-gradient(140deg,#ff7a9a,#e8418a);text-transform:uppercase}
button.ghost#logout{height:38px;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--text);font:600 14px var(--body);box-shadow:0 4px 16px rgba(0,0,0,.1)}
/* логотип */
.kla{position:relative;display:block;width:100%;max-width:250px;aspect-ratio:250/100;container-type:inline-size}
.kla b{position:absolute;left:2.4%;top:-2%;font:400 19cqw/1 "Marck Script",cursive;color:var(--ink);letter-spacing:.2cqw;white-space:nowrap}
.kla svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.hero{margin:0 0 4px}.hero .kla{max-width:300px}
.lead{color:var(--muted);margin:2px 0 4px}
.auth .kla{margin:0 0 4px}
/* заголовки: рукописные, с иконкой и двоеточием */
h2.cth{font:400 29px/1.1 "Marck Script",cursive;color:var(--ink);display:flex;align-items:center;margin:22px 0 10px}
h2.cth::after{content:':'}
h2.cth::before{content:'';flex:none;margin-right:9px;width:22px;height:22px;background:var(--ink);-webkit-mask:var(--hi) center/contain no-repeat;mask:var(--hi) center/contain no-repeat}
.i-grad{--hi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.8 9 12 4.6 21.2 9 12 13.4 2.8 9Z'/%3E%3Cpath d='M6.6 11v4.6c0 1.4 2.4 3.2 5.4 3.2s5.4-1.8 5.4-3.2V11'/%3E%3C/svg%3E")}
.i-gear{--hi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='7' rx='2'/%3E%3Crect x='4' y='13' width='16' height='7' rx='2'/%3E%3Cpath d='M8 7.5h.01M8 16.5h.01'/%3E%3C/svg%3E")}
/* плитки-наклейки */
.tiles{display:flex;gap:10px;overflow-x:auto;padding:12px 4px 6px;scrollbar-width:none}.tiles::-webkit-scrollbar{display:none}
.tiles .c{flex:0 0 auto;min-width:104px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 0 8px;transform:rotate(var(--r,0deg));transition:transform .1s}
.tiles .c:nth-of-type(odd){--r:1.6deg}.tiles .c:nth-of-type(even){--r:-1.3deg}.tiles .c:active{transform:rotate(var(--r,0deg)) scale(.96)}
.tiles .ic{width:84px;height:84px;border-radius:50%;background:var(--p);border:4px solid #fff;box-shadow:0 0 0 1.5px color-mix(in srgb,var(--k) 35%,transparent),0 6px 10px -4px rgba(60,40,90,.35);display:flex;align-items:center;justify-content:center}
.tiles .ic img{width:58px;height:58px;transform:rotate(-6deg) scale(1.05);filter:drop-shadow(0 0 .8px #fff) drop-shadow(0 0 .8px #fff)}
.tiles .c b{position:relative;font:400 19px "Marck Script",cursive;color:var(--ink);padding:0 4px 6px;white-space:nowrap}
.tiles .c b::after{content:"";position:absolute;left:0;right:0;bottom:0;height:7px;background:var(--k);-webkit-mask:no-repeat center/100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 Q25 1 50 4 T98 3' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");mask:no-repeat center/100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 Q25 1 50 4 T98 3' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E")}
.t-blue{--p:#d8e6ff;--k:#4d7cf0}.t-pink{--p:#ffdce8;--k:#e84a8a}.t-lilac{--p:#e8dcff;--k:#7b5bd0}.t-teal{--p:#d6f3f1;--k:#1fa5a0}
.tiles .c:not(.on) .ic{opacity:.92}
/* карточки-строки */
.rcs{display:flex;flex-direction:column;gap:12px}
.rc{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-left:5px solid var(--acc);border-radius:20px;padding:14px 12px 14px 14px;color:var(--text);box-shadow:0 8px 18px -14px rgba(30,30,80,.35);transition:transform .12s}
.rc:active{transform:scale(.985)}
.g1c{--acc:#0f9fa0}.g2c{--acc:#f08a24}.g3c{--acc:#3b6fe0}.g4c{--acc:#7b5bd0}.g5c{--acc:#e8418a}
.rt{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.rt b{font:700 17px/1.25 var(--kb);word-break:break-word;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.rt small{color:var(--muted);font-size:13px}.rt small em{font-style:normal;font-weight:800;color:var(--acc)}
.chev{flex:none;color:var(--acc);display:grid;place-items:center}.chev svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.gi{flex:none;width:48px;height:48px;border-radius:15px;display:grid;place-items:center;color:#fff;box-shadow:0 6px 16px -6px var(--sh,rgba(0,0,0,.35)),inset 0 1px 0 rgba(255,255,255,.35)}
.gi svg{width:26px;height:26px;fill:none;stroke:#fff;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.gi.sm{width:38px;height:38px;border-radius:12px}.gi.sm svg{width:21px;height:21px}
.g1{background:linear-gradient(140deg,#34d3c2,#0f9fa0);--sh:rgba(15,159,160,.5)}.g2{background:linear-gradient(140deg,#ffc24b,#f08a24);--sh:rgba(240,138,36,.5)}
.g3{background:linear-gradient(140deg,#5aa8ff,#3b6fe0);--sh:rgba(59,111,224,.5)}.g4{background:linear-gradient(140deg,#b08cff,#7b5bd0);--sh:rgba(123,91,208,.5)}.g5{background:linear-gradient(140deg,#ff8a7a,#e8418a);--sh:rgba(232,65,138,.5)}
.bar{display:block;height:9px;border-radius:6px;background:repeating-linear-gradient(90deg,rgba(37,48,159,.1) 0 6px,transparent 6px 9px);overflow:hidden}
.bar>i{display:block;height:100%;background:#ffe46b;border-radius:6px;box-shadow:inset 0 -3px 0 rgba(240,170,0,.35)}
.bar.done>i{background:#b9efc9;box-shadow:inset 0 -3px 0 rgba(47,143,91,.4)}
/* таблетка «Назад» */
.pill.back{display:inline-flex;align-items:center;gap:6px;height:44px;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:999px;padding:0 18px 0 12px;font:600 16px var(--body);box-shadow:0 4px 16px rgba(0,0,0,.12);margin:4px 0 14px}
.pill.back svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
/* страница курса */
.course{gap:18px;grid-template-columns:minmax(0,1fr)}
.stage h1{font:400 32px/1.15 "Marck Script",cursive;margin:16px 0 2px}
.stage .crumb{font-size:14px}
.player{border-radius:3px}
.controls button{font:600 14px var(--body);border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--text);box-shadow:0 4px 12px rgba(0,0,0,.08);padding:9px 14px;transform:none}
.playlist{position:static;max-height:none;overflow:visible;background:transparent;border:0;box-shadow:none}
.playlist .head{position:static;background:transparent;border:0;padding:4px 0 6px}
.playlist .head b{font:400 29px/1.15 "Marck Script",cursive;color:var(--ink)}
.playlist .head span{font-size:13.5px;color:var(--muted)}
details.mod{margin:0 0 14px}
details.mod>summary{background:none;border:0;padding:6px 2px;font:700 17px/1.25 var(--kb);color:var(--ink);align-items:center}
details.mod>summary small{font:600 13px var(--body);background:#e3d8ff;color:#5a3fb0;border-radius:999px;padding:3px 10px}
.lesson{background:#fff;border:1px solid var(--line);border-left:5px solid var(--acc);border-radius:16px;padding:9px 12px 9px 10px;margin:0 0 8px;align-items:center;gap:11px;font-size:15px}
.lesson:has(.g1){--acc:#0f9fa0}.lesson:has(.g2){--acc:#f08a24}.lesson:has(.g3){--acc:#3b6fe0}
.lesson:hover{background:#fff}
.lesson.current{background:#fff8d6;box-shadow:0 0 0 2px #ffe46b}
.lesson .t{font:700 15px/1.25 var(--kb)}.lesson .t small{display:block;font:600 12.5px var(--body);color:var(--muted);margin-top:2px}
.lesson .d{display:none}
.lesson .dot{margin:0}
/* вход и панели */
.auth{margin-top:4vh}
.auth h1{font:400 34px/1.1 "Marck Script",cursive}
.auth button,button{font:400 21px "Marck Script",cursive}
.auth button{background:#fff}
.panel{border-radius:10px}.panel h2{font:400 27px/1.1 "Marck Script",cursive}
table{font-size:14px}
.empty{font:500 16px var(--body)}
#ver{font-size:11.5px}
@media (min-width:700px){.course{grid-template-columns:minmax(0,1fr) 380px}.playlist{position:sticky;top:12px;max-height:calc(100dvh - 24px);overflow:auto}main{padding-top:16px}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* окно просмотра: кнопка «на весь экран» и сам режим */
.lb-full-btn{top:calc(14px + env(safe-area-inset-top,0px));right:68px}
.lb.full{padding:calc(68px + env(safe-area-inset-top,0px)) 0 0}
.lb.full .lb-fig{width:100%;max-width:100%;height:100%;max-height:100%;border-radius:0;padding:6px 0 0;transform:none;box-shadow:none}
.lb.full .lb-fig iframe{flex:1;min-height:0;width:100%;height:auto}
.lb.full .lb-fig img{flex:1;min-height:0;max-height:none;width:100%;height:auto;object-fit:contain}
.lb.full .lb-fig figcaption{padding:4px 6px calc(6px + env(safe-area-inset-bottom,0px));font-size:18px}
.lb.full .lb-count{display:none}
@media (max-width:520px){.lb-full-btn{right:68px}.lb.full .lb-prev,.lb.full .lb-next{bottom:calc(52px + env(safe-area-inset-bottom,0px))}}

/* названия: рукописный шрифт только для коротких заголовков, длинное — Balsamiq Sans */
.stage h1{font:700 21px/1.25 var(--kb);margin:0;color:var(--ink);word-break:break-word}
.lt{position:relative;margin:18px 0 0;padding:18px 16px 14px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 10px 22px -16px rgba(30,30,80,.45)}
.lt::before{content:"";position:absolute;top:-10px;left:22px;width:64px;height:20px;background:rgba(255,214,102,.75);transform:rotate(-3deg);box-shadow:0 1px 2px rgba(0,0,0,.08);clip-path:polygon(3% 0,97% 4%,100% 50%,96% 100%,4% 96%,0 52%)}
.lt h1{background:linear-gradient(95deg,#25309f 10%,#7b3fd0 60%,#e8418a);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 9px}
.chip{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:999px;padding:4px 11px;font:700 12.5px var(--kb);transform:rotate(var(--r,0deg))}
.chip.c-num{background:linear-gradient(140deg,#ff8a7a,#e8418a);color:#fff;--r:-1.2deg;box-shadow:0 4px 10px -4px rgba(232,65,138,.6)}
.chip.c-mod{background:#fff0b8;color:#7a5200;--r:.8deg}
.chip.c-course{background:#e3d8ff;color:#4b34a8;--r:-.6deg}
.playlist .head{position:relative;padding:14px 14px 12px;margin:0 0 10px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 8px 18px -14px rgba(30,30,80,.4);display:flex;flex-direction:column;gap:7px}
.playlist .head .hk{font:400 22px/1 "Marck Script",cursive;color:var(--ink)}
.playlist .head b{font:700 17px/1.3 var(--kb);word-break:break-word;background:linear-gradient(95deg,#25309f 10%,#7b3fd0 70%);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.playlist .head .hs{font:600 12.5px var(--body);color:var(--muted)}
.stage .crumb{display:none}

/* плейлист: компактная шапка вместо большой карточки */
.playlist .head{flex-direction:row;align-items:center;justify-content:space-between;background:transparent;border:0;box-shadow:none;padding:2px 2px 4px;margin:6px 0 4px}
.playlist .head .hk{font-size:26px}
.donepill{font:700 13px var(--kb);color:#1f7a3a;background:#d9f5df;border-radius:999px;padding:4px 12px}

/* панель под видео: компактная */
.controls{display:flex;align-items:center;gap:8px;margin:12px 0 0;flex-wrap:nowrap}
.controls .spacer{flex:1}
button.cbtn,button.cdone,.spd{height:42px;border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:999px;box-shadow:0 4px 12px -4px rgba(30,30,80,.25);transform:none;padding:0}
button.cbtn{width:46px;display:grid;place-items:center}
button.cbtn svg,button.cdone svg,.spd svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
button.cbtn:disabled{opacity:.35;box-shadow:none}
button.cdone{display:inline-flex;align-items:center;gap:6px;padding:0 16px 0 12px;font:700 14px var(--kb);color:#1f7a3a;background:#fff;border-color:#bfe8cb}
button.cdone.on{background:linear-gradient(140deg,#5fd68a,#2fae63);color:#fff;border-color:transparent;box-shadow:0 6px 14px -6px rgba(47,174,99,.6)}
.spd{display:inline-flex;align-items:center;gap:4px;padding:0 6px 0 12px;color:var(--ink)}
.spd select{border:0;background:transparent;font:700 14px var(--kb);color:var(--ink);padding:8px 4px 8px 0;outline:none;-webkit-appearance:none;appearance:none;width:44px}
.spd:focus-within{outline:2px solid var(--pen);outline-offset:2px}
.controls .spacer{display:none}
.controls{gap:10px}
button.cdone{margin-left:auto}
/* «Уроки:» — наклейка-дощечка */
.playlist .head .hk{position:relative;display:inline-block;padding:3px 16px 5px 14px;font-size:26px;color:var(--ink);background:linear-gradient(160deg,#fff1a8,#ffd54a);border-radius:255px 14px 225px 14px/14px 225px 14px 255px;border:2px solid rgba(37,48,159,.75);box-shadow:3px 4px 0 rgba(37,48,159,.18);transform:rotate(-2deg)}
.playlist .head .hk::before{content:"";position:absolute;left:-9px;top:-7px;width:30px;height:13px;background:rgba(232,74,138,.55);transform:rotate(-28deg);clip-path:polygon(4% 0,96% 6%,100% 50%,94% 100%,6% 94%,0 48%)}

/* порядок: карточка урока сверху, под видео — кнопки */
.lt{margin:14px 0 14px}
.stage .player{margin-top:0}
.pill.back{margin-bottom:6px}

.chips{align-items:center;gap:5px}
.chips .sep{font:700 16px var(--kb);color:#9a8fd6;line-height:1}
.chips .ci{display:inline-flex;align-items:center;gap:5px;max-width:100%;min-width:0}
.chips .ci .chip{flex:0 1 auto;min-width:0}.chips .ci .sep{flex:none}

/* материалы (PDF, картинки) — отдельно от уроков */
.matt{display:flex;align-items:center;gap:8px;margin:12px 2px 6px;font:400 22px/1 "Marck Script",cursive;color:#b4560a}
.matt::before{content:"";width:18px;height:18px;background:#f08a24;-webkit-mask:var(--pc) center/contain no-repeat;mask:var(--pc) center/contain no-repeat;--pc:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12l-7.5 7.5a5 5 0 0 1-7-7L13 5a3.3 3.3 0 0 1 4.7 4.7L10.5 17a1.7 1.7 0 0 1-2.4-2.4L14.5 8'/%3E%3C/svg%3E")}
.matt::after{content:"";flex:1;border-top:2px dashed rgba(240,138,36,.4)}
.mats .lesson.material{background:#fffaf0;border:1.5px dashed rgba(240,138,36,.55);border-left:5px solid #f08a24;box-shadow:none}
.mats .lesson.material:has(.g3){border-color:rgba(59,111,224,.45);border-left-color:#3b6fe0;background:#f7faff}
.lesson .open{flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#c26a12;box-shadow:inset 0 0 0 1.5px rgba(240,138,36,.45)}
.lesson:has(.g3) .open{color:#3b6fe0;box-shadow:inset 0 0 0 1.5px rgba(59,111,224,.4)}
.lesson .open svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.tag{display:inline-block;font:800 10.5px var(--body);letter-spacing:.06em;border-radius:6px;padding:2px 6px;margin-right:4px;color:#fff;background:linear-gradient(140deg,#ffc24b,#f08a24);vertical-align:1px}
.tag-img{background:linear-gradient(140deg,#5aa8ff,#3b6fe0)}

/* компактная карточка урока: «Урок N из M» и название в одной строке */
.lt{padding:16px 14px 12px}
.chips{margin:0 0 8px}
.lrow{display:flex;align-items:center;gap:10px;flex-wrap:nowrap}
.lrow .chip{flex:none}
.lrow h1{font:700 18px/1.25 var(--kb);min-width:0;overflow-wrap:anywhere}

/* материалы — таймлайн из папок */
.mhead{margin-top:26px}
.playlist .head .hk2{background:linear-gradient(160deg,#efe6ff,#cdb9ff)}
.playlist .head .hk2::before{background:rgba(240,138,36,.6)}
.donepill.dp2{background:#efe6ff;color:#5a3fb0}
.tl{position:relative;margin:10px 0 0;padding-left:26px}
.tl::before{content:"";position:absolute;left:21px;top:22px;bottom:22px;border-left:3px dotted rgba(123,91,208,.5)}
details.fold{position:relative;margin:0 0 12px;background:#fff;border:1.5px solid var(--line);border-radius:18px;box-shadow:0 6px 14px -10px rgba(60,40,90,.4)}
details.fold>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:10px 12px 10px 28px;min-height:56px}
details.fold>summary::-webkit-details-marker{display:none}
details.fold .node{position:absolute;left:-26px;top:8px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(140deg,#b08cff,#7b5bd0);border:3px solid #f7f5fb;box-shadow:0 4px 10px -4px rgba(123,91,208,.7)}
details.fold .node svg{width:21px;height:21px;fill:none;stroke:#fff;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
details.fold .fn{flex:1;min-width:0;font:700 17px/1.25 var(--kb);color:var(--ink)}
details.fold>summary small{flex:none;font:600 13px var(--body);background:#e3d8ff;color:#5a3fb0;border-radius:999px;padding:3px 10px}
details.fold>summary::after{content:"";flex:none;width:9px;height:9px;border-right:2.5px solid #7b5bd0;border-bottom:2.5px solid #7b5bd0;transform:rotate(45deg);transition:transform .15s;margin:0 4px 3px 2px}
details.fold[open]>summary::after{transform:rotate(-135deg);margin-bottom:-3px}
details.fold .mats{padding:2px 10px 10px;display:grid;gap:8px}

/* закладки и «поделиться» */
.i-mark{--hi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4h10a1.500 1.500 0 0 1 1.500 1.500V21L12 16.800 5.500 21V5.500A1.500 1.500 0 0 1 7 4z'/%3E%3C/svg%3E")}
button.cbtn.on{background:linear-gradient(140deg,#ff9bb8,#e84a8a);color:#fff;border-color:transparent;box-shadow:0 6px 14px -6px rgba(232,74,138,.6)}
button.cbtn.on svg{fill:#fff}
.tiles{gap:6px}.tiles .c{min-width:88px}

.backrow{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
button.pill.mv svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;margin-right:6px;vertical-align:-3px}
button.pill.mv{font:600 13px var(--body);color:#5a3fb0;background:#efe6ff;border:1px solid #d6c6ff;border-radius:999px;padding:9px 14px;box-shadow:none}

.t-green{--p:#daf5dc;--k:#2ea51c}.t-yellow{--p:#fff3b8;--k:#d9a400}.t-orange{--p:#ffe3c4;--k:#f08a24}
.tiles{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;padding-right:20px}.tiles .c{scroll-snap-align:center}
.sheet-ov{position:fixed;inset:0;z-index:60;background:rgba(30,20,60,.45);display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:520px;background:#fffef9;border-radius:26px 26px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px));display:grid;gap:8px;box-shadow:0 -10px 30px rgba(30,20,60,.25)}
.sheet h3{margin:0 4px 4px;font:400 24px "Marck Script",cursive;color:var(--ink)}
.sopt{display:flex;align-items:center;gap:12px;text-align:left;font:700 17px var(--kb);color:var(--ink);background:#fff;border:1.5px solid var(--line);border-radius:18px;padding:10px 14px;box-shadow:none;transform:none}
.sopt img{width:38px;height:38px}.sopt span{flex:1}.sopt em{font:600 12px var(--body);font-style:normal;color:#5a3fb0;background:#e3d8ff;border-radius:999px;padding:3px 10px}
.sopt.cur{background:#f1ecff;border-color:#cdb9ff}
.sclose{background:none;border:0;color:var(--muted);font:600 15px var(--body);padding:10px;box-shadow:none}
.secrow{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px}.secrow input{flex:1 1 140px;min-width:0}.secrow select{flex:0 0 auto}
form#sec-add{margin-top:6px;flex-wrap:wrap}

.iconbtn{flex:none;width:52px;height:52px;border-radius:50%;padding:0;background:#efe6ff;border:2px solid #d6c6ff;box-shadow:none;display:grid;place-items:center;transform:none}
.iconbtn img{width:38px;height:38px}
.picker{position:fixed;inset:0;z-index:80;background:#f7f5fb;display:flex;flex-direction:column;background-image:linear-gradient(rgba(67,97,238,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(67,97,238,.07) 1px,transparent 1px);background-size:26px 26px}
.picker-top{display:flex;align-items:center;justify-content:space-between;padding:calc(14px + env(safe-area-inset-top,0px)) 16px 8px}
.picker-top h3{margin:0;font:400 30px "Marck Script",cursive;color:var(--ink)}
.picker-top .pclose{width:42px;height:42px}
.picker-body{flex:1;overflow-y:auto;padding:0 14px calc(24px + env(safe-area-inset-bottom,0px));-webkit-overflow-scrolling:touch}
.picker-body h4{margin:18px 4px 8px;font:400 22px "Marck Script",cursive;color:#b4560a}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:10px}
.pbtn{aspect-ratio:1;border-radius:22px;padding:0;background:#fff;border:2px solid var(--line);box-shadow:0 6px 12px -8px rgba(60,40,90,.4);display:grid;place-items:center;transform:none}
.pbtn img{width:70%;height:70%}
.pbtn:active{transform:scale(.95)}.pbtn.cur{background:#efe6ff;border-color:#9b7ee6}

.tbact{display:flex;gap:8px;margin-right:auto;align-items:center}
.tbact:empty{display:none}
.rbtn{width:38px;height:38px;padding:0;border-radius:50%;display:grid;place-items:center;background:#fff;border:1px solid var(--line);color:var(--ink);box-shadow:0 4px 14px -4px rgba(30,30,80,.25);transform:none;text-decoration:none}
.rbtn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.rbtn:active{transform:scale(.94)}
#movesec{color:#5a3fb0;background:#efe6ff;border-color:#d6c6ff}

/* индикатор загрузки: тонкая полоска сверху и подсказка, если долго */
#busy{position:fixed;left:0;right:0;top:0;height:4px;z-index:90;pointer-events:none;opacity:0;transition:opacity .2s;overflow:hidden;padding-top:env(safe-area-inset-top,0px)}
#busy.on{opacity:1}
#busy i{display:block;height:4px;width:40%;border-radius:4px;background:linear-gradient(90deg,#ffe46b,#ff8fa8,#9b7ee6);animation:busy 1.1s ease-in-out infinite}
@keyframes busy{0%{transform:translateX(-100%)}100%{transform:translateX(250%)}}
#busy-msg{position:fixed;left:50%;top:calc(72px + env(safe-area-inset-top,0px));transform:translate(-50%,-10px);z-index:90;pointer-events:none;opacity:0;transition:.25s;background:#fffef9;border:1.5px solid var(--line);border-radius:999px;padding:8px 16px;font:600 13px var(--body);color:var(--ink);box-shadow:0 6px 18px -6px rgba(40,30,90,.35);white-space:nowrap}
#busy-msg.on{opacity:1;transform:translate(-50%,0)}
@media (prefers-reduced-motion:reduce){#busy i{animation:none;width:100%}}

/* переименование и режим «только звук» */
.rbtn.on{background:var(--pen);color:#fff;border-color:var(--pen)}
.crow{margin-bottom:8px}
.cname{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-radius:14px;border:1.5px dashed var(--pen);background:#fff;color:var(--ink);font:700 15px/1.25 var(--kb);text-align:left}
.cname svg{flex:none;width:18px;height:18px;fill:none;stroke:var(--pen);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
body.editing .lesson{outline:1.5px dashed var(--pen);outline-offset:2px}
.rninput{width:100%;box-sizing:border-box;margin:4px 0 10px;padding:12px 14px;border-radius:14px;border:1.5px solid var(--line);font:600 16px var(--body);color:var(--ink);background:#fff}
.sopt.save{background:var(--ink);color:#fff;justify-content:center}
.sopt.reset{justify-content:center;color:var(--muted)}
.cbtn.on{color:#fff}
#aud.on{background:var(--ink);border-color:var(--ink)}
#aud.on svg{stroke:#fff}
.audiomode{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:14px;background:linear-gradient(160deg,#eceaff,#ffe8f2);text-align:center;color:var(--ink);font:600 14px/1.35 var(--body)}
.audiomode .ab svg{width:44px;height:44px;fill:none;stroke:var(--ink);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.audiomode p{margin:0}
.audiomode audio{width:100%;max-width:520px}
#aud.on svg{fill:none}

/* порядок курсов */
.chead{display:flex;align-items:center;justify-content:space-between;gap:10px}
.chead .cth{margin-right:auto}
.sortbtn{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:999px;background:#fff;border:1px solid var(--line);color:var(--ink);font:700 14px var(--kb);box-shadow:0 4px 14px -6px rgba(30,30,80,.25)}
.sortbtn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.sortbtn.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.sorthint{margin:2px 0 10px;color:var(--muted);font:600 13px var(--body)}
.sortrow{user-select:none;-webkit-user-select:none}
.sortrow .rt{flex:1}
.grip{flex:none;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#f1effa;border:1px solid var(--line);color:var(--ink);cursor:grab}
.grip svg{width:22px;height:22px;fill:currentColor;stroke:none}
.sortrow.lift{transform:scale(1.02);box-shadow:0 14px 28px -10px rgba(30,30,80,.5);border-color:var(--pen);position:relative;z-index:2}

#resetcache{display:block;margin:8px auto 0;padding:7px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);color:var(--ink);font:700 13px var(--kb)}
#resetcache:disabled{opacity:.6}

/* обложки альбомов */
.gi.cov{padding:0;overflow:hidden;background:#eceaff}
.gi.cov img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
.mcov{flex:none;width:40px;height:40px;border-radius:10px;object-fit:cover;box-shadow:0 3px 8px -3px rgba(30,30,80,.45);margin-right:10px}
details.mod>summary{display:flex;align-items:center}
.audiomode .ab.has img{width:min(46vw,190px);aspect-ratio:1;object-fit:cover;border-radius:16px;box-shadow:0 12px 26px -10px rgba(30,30,80,.55)}
details.mod>summary>span{flex:1}
.audiomode{gap:6px;padding:10px 14px}
.audiomode .ab.has img{width:min(30vw,112px);border-radius:14px}
.audiomode p{font-size:13px;line-height:1.3}
.audiomode .ab svg{width:34px;height:34px}

/* ---------- музыка: альбомы и плеер ---------- */
.mi-play,.mi-pause,.mi-nexts,.mi-prevs{fill:currentColor;stroke:none}
.mi-shuf,.mi-rep,.mi-down,.mi-b15{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body.hasmini main{padding-bottom:104px}
body.hasmini #ver{padding-bottom:84px}
body.npopen{overflow:hidden}

#mini{position:fixed;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom,0px));z-index:55;display:flex;align-items:center;gap:4px;height:64px;padding:0 8px 0 8px;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:20px;box-shadow:0 14px 30px -12px rgba(30,30,90,.5);max-width:560px;margin:0 auto}
#mini[hidden]{display:none}
#mini .mprog{position:absolute;left:14px;right:14px;top:0;height:3px;border-radius:3px;background:rgba(37,48,159,.12);overflow:hidden}
#mini .mprog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--pen),var(--ink))}
#mini .mopen{flex:1;min-width:0;display:flex;align-items:center;gap:11px;text-align:left;background:none;border:0;padding:6px 4px;color:var(--ink)}
#mini .mcv{flex:none;width:46px;height:46px;border-radius:11px;object-fit:cover;background:#eceaff;box-shadow:0 3px 9px -3px rgba(30,30,80,.45)}
#mini .mtx{min-width:0;display:flex;flex-direction:column}
#mini .mtx b{font:700 15px/1.2 var(--kb);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#mini .mtx small{font:600 12.5px var(--body);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#mini .mbtn{flex:none;width:46px;height:46px;display:grid;place-items:center;border-radius:50%;background:none;border:0;color:var(--ink)}
#mini .mbtn svg{width:26px;height:26px}
#mini .mbtn:active{background:#eceaff}

#np{position:fixed;inset:0;z-index:70;background:linear-gradient(170deg,#eceaff 0%,#fbe9f2 100%);overflow:auto;padding:env(safe-area-inset-top,0) 0 env(safe-area-inset-bottom,0)}
#np[hidden]{display:none}
.npin{max-width:520px;margin:0 auto;padding:14px 26px 30px;display:flex;flex-direction:column;align-items:center;min-height:100%}
.npclose{align-self:flex-start;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.8);border:1px solid var(--line);color:var(--ink)}
.npclose svg{width:24px;height:24px}
.npcov{width:min(80vw,360px);aspect-ratio:1;object-fit:cover;border-radius:22px;margin:14px 0 22px;box-shadow:0 26px 46px -18px rgba(30,30,90,.6);background:#fff}
.npcov.ph{object-fit:contain;padding:18%;background:#fff}
.npinfo{width:100%;text-align:left;display:flex;flex-direction:column;gap:3px}
.npinfo b{font:700 22px/1.2 var(--kb);color:var(--ink)}
.npinfo small{font:600 14px var(--body);color:var(--muted)}
.npbar{width:100%;margin-top:20px}
#npseek{-webkit-appearance:none;appearance:none;width:100%;height:28px;background:transparent;--p:0%}
#npseek::-webkit-slider-runnable-track{height:6px;border-radius:6px;background:linear-gradient(90deg,var(--ink) var(--p),rgba(37,48,159,.18) var(--p))}
#npseek::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:#fff;border:3px solid var(--ink);margin-top:-7px;box-shadow:0 3px 8px -2px rgba(30,30,90,.5)}
#npseek::-moz-range-track{height:6px;border-radius:6px;background:rgba(37,48,159,.18)}
#npseek::-moz-range-progress{height:6px;border-radius:6px;background:var(--ink)}
#npseek::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid var(--ink)}
.npt{display:flex;justify-content:space-between;font:600 12.5px var(--body);color:var(--muted);margin-top:2px}
.npctl{width:100%;display:flex;align-items:center;justify-content:space-between;margin-top:14px}
.npctl button{display:grid;place-items:center;border-radius:50%;background:none;border:0;color:var(--ink)}
.npctl .stk{width:48px;height:48px;color:#8a86b8}
.npctl .stk svg{width:24px;height:24px}
.npctl .stk.on{color:var(--pen)}
.npctl #nprep.on[data-one="1"]::after{content:"1";position:absolute;font:800 10px var(--kb);margin:-2px 0 0 1px}
.npctl .mp{width:62px;height:62px}
.npctl .mp svg{width:34px;height:34px}
.npctl .mp.big{width:84px;height:84px;background:var(--ink);color:#fff;box-shadow:0 14px 26px -10px rgba(37,48,159,.7)}
.npctl .mp.big svg{width:42px;height:42px}

.alb{max-width:560px;margin:0 auto}
.albhead{display:flex;flex-direction:column;align-items:center;text-align:center;padding:6px 0 14px}
.albcov{width:min(58vw,230px);aspect-ratio:1;object-fit:cover;border-radius:20px;box-shadow:0 22px 38px -16px rgba(30,30,90,.55);background:#fff}
.albcov.ph{display:grid;place-items:center;background:#fff}
.albcov.ph img{width:55%;height:55%;object-fit:contain}
.albhead h1{font:700 23px/1.2 var(--kb);color:var(--ink);margin:16px 0 4px;text-wrap:balance}
.albsub{margin:0;font:600 14px var(--body);color:var(--muted)}
.albbtns{display:flex;gap:10px;width:100%;margin-top:16px}
.albbtns button{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;height:50px;border-radius:15px;border:0;font:700 16px var(--kb)}
.albbtns svg{width:22px;height:22px}
.bigplay{background:var(--ink);color:#fff;box-shadow:0 10px 20px -10px rgba(37,48,159,.75)}
.shufbtn{background:#fff;color:var(--ink);border:1px solid var(--line)!important}
.trks{list-style:none;margin:6px 0 0;padding:0;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}
.trks li{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid #efecf6;cursor:pointer}
.trks li:last-child{border-bottom:0}
.trks li:active{background:#f4f1fb}
.trks .tn{flex:none;width:26px;text-align:center;color:var(--muted);font:700 14px var(--kb);position:relative;height:18px}
.trks .tn em{font-style:normal}
.trks .tn .eq{display:none;position:absolute;inset:0;align-items:flex-end;justify-content:center;gap:2px;text-decoration:none}
.trks .tn .eq i{width:3px;height:100%;background:var(--pen);border-radius:2px;transform-origin:bottom;animation:eq 0.9s ease-in-out infinite;animation-play-state:paused}
.trks .tn .eq i:nth-child(2){animation-delay:.25s}.trks .tn .eq i:nth-child(3){animation-delay:.5s}
@keyframes eq{0%,100%{transform:scaleY(.25)}50%{transform:scaleY(1)}}
.trks li.cur .tt{color:var(--pen)}
.trks li.cur .tn em{display:none}
.trks li.cur .tn .eq{display:flex}
.trks li.playing .tn .eq i{animation-play-state:running}
.trks .tt{flex:1;min-width:0;font:700 15.5px/1.25 var(--kb);color:var(--ink);overflow-wrap:anywhere}
.trks .td{flex:none;font:600 13px var(--body);color:var(--muted)}
body.editing .trks li{outline:1.5px dashed var(--pen);outline-offset:-3px}
.afiles{margin-top:16px}
.afiles summary{font:700 15px var(--kb);color:var(--ink);padding:8px 2px}
.alist{display:flex;flex-direction:column;gap:10px}
.arow{display:flex;align-items:center;gap:13px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:10px 12px 10px 10px;color:var(--text);box-shadow:0 8px 18px -14px rgba(30,30,80,.35)}
.arow .acv{flex:none;width:64px;height:64px;border-radius:13px;overflow:hidden;background:#eceaff;display:grid;place-items:center;box-shadow:0 5px 12px -5px rgba(30,30,80,.45)}
.arow .acv img{width:100%;height:100%;object-fit:cover}
.arow .acv img.ph{width:55%;height:55%;object-fit:contain}
.arow .atx{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.arow .atx b{font:700 16px/1.25 var(--kb);color:var(--ink);overflow-wrap:anywhere}
.arow .atx small{font:600 13px var(--body);color:var(--muted)}
.arow .chev{flex:none;width:22px;color:var(--ink)}
.arow .chev svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#mini button,#np button:not(.big),.albbtns button,.trks li{box-shadow:none;transform:none}
.albbtns .bigplay{box-shadow:0 10px 20px -10px rgba(37,48,159,.75)}
#np .npctl .mp.big{box-shadow:0 14px 26px -10px rgba(37,48,159,.7);transform:none}
#mini button:active,#np button:active{transform:none}

/* тексты песен */
#np .npinfo{display:flex;align-items:center;gap:10px}
#np .npinfo .npit{min-width:0;flex:1}
#np .lybtn{flex:none;width:44px;height:44px;border-radius:50%;border:0;background:rgba(37,48,159,.1);color:var(--ink);display:grid;place-items:center;box-shadow:none;transform:none}
#np .lybtn svg{width:22px;height:22px;fill:currentColor}
#np .lybtn.on{background:var(--ink);color:#fff}
#np .nply{display:none}
#np.lyon .nply{display:block;height:min(46vh,420px);overflow-y:auto;margin:6px 0 4px;-webkit-overflow-scrolling:touch;scrollbar-width:none;-webkit-mask-image:linear-gradient(transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(transparent,#000 12%,#000 88%,transparent)}
#np.lyon .nply::-webkit-scrollbar{display:none}
#np.lyon .npcov{display:none}
#np .nply .lypad{height:30%}
#np .nply p{margin:0;padding:7px 4px;font:700 22px/1.25 var(--kb,inherit);color:rgba(37,48,159,.38);transition:color .25s,transform .25s;transform-origin:left center}
#np .nply p.sy{cursor:pointer}
#np .nply p.on{color:var(--ink);transform:scale(1.04)}
#np .nply p:not(.sy){color:var(--ink)}
#np .npinfo .npit{display:flex;flex-direction:column;gap:3px}
#np.lyon .nply{flex:none;width:100%}
#np.lyon .npclose{order:0}#np.lyon .npinfo{order:1;margin-top:8px}#np.lyon .nply{order:2}#np.lyon .npbar{order:3}#np.lyon .npctl{order:4}
#np .npinfo{flex-direction:row}
#np .nply p{font-size:20px}
@media (min-width:600px){.npclose{position:fixed;top:calc(env(safe-area-inset-top,0px) + 16px);left:20px;z-index:3}.npin{padding-top:30px}}
#np .nply p.on .w{opacity:.4;transition:opacity .15s}#np .nply p.on .w.d{opacity:1}
