/* Readable, naturally sized lesson content on phones. Desktop slide layout is retained. */
.player>*,.mat>*,.s-body>*,.s-body.two>*,.tb,.kz-intro,.kz,.kz-res{min-width:0}
.mobile-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
@media(max-width:980px){
 .topbar{flex-wrap:wrap;gap:10px}.brand{min-width:0;max-width:100%}.brand-text{min-width:0}.brand-text b{overflow-wrap:anywhere}.topnav{flex-wrap:wrap;max-width:100%;gap:5px}
 .topnav a,#userMenu a,.topnav button,.langsw button,.seg button,.seg2 button{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
 .topnav a,#userMenu a{font-size:14px;padding:9px 10px}.linkbtn{min-height:44px}.uname{max-width:140px;overflow:hidden;text-overflow:ellipsis}
 input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px;min-height:44px;max-width:100%}
 .btn,.act{min-height:44px}.mat-toc a{min-height:44px;align-items:center}.tw,figure.kode pre{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
}
@media(max-width:640px){
 html{scroll-padding-top:16px}body{min-width:0}.topbar{position:relative;padding:12px 14px}.brand{width:100%;gap:10px}.brand-text b{font-size:16px}.brand-text small{display:none}.logo{flex:none}
 .topnav{width:100%;justify-content:flex-start;border-top:1px solid var(--line);padding-top:7px;gap:3px}.topnav a,#userMenu a{font-size:13px;padding:9px 8px}.langsw{margin-left:auto;order:10}.langsw button{min-width:44px}
 main{padding:20px 14px 40px;max-width:100%}.grid,.next,.glos{grid-template-columns:minmax(0,1fr)}
 h1,#app>h1{font-size:clamp(1.55rem,6.5vw,2rem);overflow-wrap:anywhere}.lead{font-size:1rem;line-height:1.7}.part h2{line-height:1.7}.row{padding:14px 10px;gap:10px}.row .t b{font-size:14px!important;line-height:1.6}.row .t span{font-size:12px!important}.row .n{width:32px;height:36px}.row .badge{max-width:80px;white-space:normal;text-align:center;font-size:10px}
 .tcard{padding:16px 13px;gap:12px;grid-template-columns:36px minmax(0,1fr)}.tn{width:36px;height:36px;font-size:17px}.tb h3{line-height:1.4}.tb p{line-height:1.65}.tact{grid-column:1/-1;gap:7px}.act{flex:1;min-width:0;min-height:62px;justify-content:center;font-size:12px;padding:10px 6px}
 .tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:4px;padding:4px;overflow:visible}.tabs a{min-height:52px;min-width:0;padding:9px 6px;gap:5px;font-size:12px;text-align:center;justify-content:center;line-height:1.5}
 .player{grid-template-columns:minmax(0,1fr);gap:18px}.stage{aspect-ratio:auto;min-height:260px;overflow:visible;border-radius:12px 12px 0 0}
 .stage .slide{position:relative;inset:auto;min-height:300px;padding:22px 18px 18px;gap:17px;--f:1!important;animation:none}
 .stage .s-kicker{font-size:10px;line-height:1.5;flex-wrap:wrap;gap:6px}.stage .s-tag{font-size:10px;padding:3px 7px}.stage .s-title{font-size:22px!important;line-height:1.35;overflow-wrap:anywhere}
 .stage .s-body,.stage .s-body.two,.stage .s-body.hasimg.cap{grid-template-columns:minmax(0,1fr)!important;gap:17px!important;min-height:0;align-content:start}
 .stage .s-list{gap:12px!important}.stage .s-list li,.stage .s-body.hasimg.cap .s-list li{font-size:16px!important;line-height:1.65;padding-left:18px!important;overflow-wrap:anywhere}
 .stage .s-list li::before{width:6px;height:6px;top:10px}.stage .s-foot{font-size:11px;line-height:1.7;gap:15px;margin-top:12px}.stage .s-foot span:first-child{min-width:0;overflow-wrap:anywhere}.stage .s-foot span:last-child{flex-shrink:0}
 .stage .s-img img,.stage .s-body.hasimg .s-img img{max-height:none!important;max-width:100%;height:auto;border-radius:8px}.stage .s-img.multi{grid-template-columns:minmax(0,1fr);gap:12px}
 .stage .s-code{font-size:13px!important;line-height:1.7;padding:13px;white-space:pre;overflow:auto;max-width:100%}
 .stage .s-table{font-size:14px!important;min-width:360px;width:100%;table-layout:auto}.stage .s-table th,.stage .s-table td{padding:9px 10px!important;line-height:1.6}
 .stage .s-math,.stage .s-math .mline{min-width:0;max-width:100%;--m:1!important}.stage .s-math .mline,.stage .s-math.few .mline{font-size:16px!important;line-height:1.7;padding:12px;overflow:auto;--m:1!important}.stage .s-cap{font-size:12px!important;line-height:1.6}
 .katex-display{max-width:100%;overflow-x:auto;overflow-y:hidden;padding:4px 0}.mobile-table-scroll:focus-visible,.tw:focus-visible,pre:focus-visible{outline:3px solid #54a9ff;outline-offset:2px}
 .mobile-table-scroll[data-scrollable=true]::after{content:attr(data-hint);display:block;position:sticky;left:0;bottom:0;background:var(--soft);color:var(--muted);padding:6px 8px;font-size:12px}
 .controls{padding:12px;gap:13px}.ctl-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.ctl-row .spacer{display:none}.ctl{min-width:0;width:100%;height:48px;font-size:13px;padding:0 8px}.ctl.primary{font-size:14px;padding:0 7px}.opts{gap:12px;font-size:14px}.opts label{min-height:44px}.seg button{min-width:52px;min-height:44px;padding:8px 11px}.prog{min-width:0;gap:8px}.prog input[type=range]{min-width:0;min-height:32px}
 .transcript{padding:6px 14px}.transcript summary{min-height:44px;display:list-item;line-height:1.6;padding:12px 0}.transcript p{font-size:16px}.side{position:static}.slide-list{max-height:45svh;overscroll-behavior-y:contain}.slide-item{min-height:52px;font-size:14px}.slide-list[hidden]{display:none!important}
 .mobile-slide-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;margin-top:10px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--ink);font:600 14px var(--font);cursor:pointer}.mobile-slide-toggle::after{content:'+'}.mobile-slide-toggle[aria-expanded=true]::after{content:'−'}
 .mat{grid-template-columns:minmax(0,1fr);gap:18px}.mat-toc{max-height:280px}.mat-tools{gap:8px}.mat-tools .btn{min-height:44px}.page{padding:20px 16px;line-height:1.8}.page .lede h1{font-size:1.45em;overflow-wrap:anywhere}.page h2{font-size:1.2em;line-height:1.45;gap:8px}.page p,.co-b{overflow-wrap:anywhere;overflow-x:auto}.page .co-b{padding:7px 13px 12px}.page table{min-width:400px}.page .src,.page figure.gbr figcaption{font-size:13px}.pdfbox .btn{flex:1 1 180px;justify-content:center;min-height:48px;white-space:normal}
 .kz-hero{padding:20px 16px;gap:12px;align-items:flex-start}.kz-hero>div{min-width:0}.kz-badge{width:44px;height:44px;border-radius:12px}.kz-badge .ico{width:25px;height:25px}.kz-hero h1{font-size:1.35rem;line-height:1.4}.kz-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.kz-top{flex-wrap:wrap;gap:12px}.kz-dots{flex-basis:100%}.kz-meta{flex-wrap:wrap}.kz-card{padding:20px 15px}.kz-tanya{font-size:18px;line-height:1.65;overflow-wrap:anywhere}.kz-opt{min-height:52px;padding:13px 12px;font-size:16px;overflow-wrap:anywhere}.kz-opt>*{min-width:0}.kz-order{padding-left:0}.kz-order li{min-width:0;gap:8px}.kz-order li span{min-width:0;overflow-wrap:anywhere}.kz-order button{min-width:44px;min-height:44px}.kz-match{grid-template-columns:minmax(0,1fr)}.kz-match select{max-width:100%}.kz-foot .btn{width:100%;justify-content:center;min-height:48px}.kz-tp .row{grid-template-columns:minmax(0,1fr) auto}.kz-tp .bar{grid-column:1/-1}
 .lightbox button{min-width:48px;min-height:48px;top:max(10px,env(safe-area-inset-top));right:10px}.lightbox img{max-height:85svh}
}
@media(min-width:641px){.mobile-slide-toggle{display:none}}
@media print{.mobile-slide-toggle{display:none!important}.stage .slide{position:absolute}.mobile-table-scroll{overflow:visible}}
