/* The same responsive UI serves ordinary browsers and Telegram WebViews. */
html{scroll-padding-top:16px;overflow-x:hidden}body{padding-top:env(safe-area-inset-top,0px);-webkit-text-size-adjust:100%;overflow-x:hidden}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{touch-action:manipulation}main{width:100%}h1,h2,h3,p,.course-breadcrumb{overflow-wrap:anywhere}input,select,textarea{min-width:0}.mobile-section-picker{display:none}.sync-warning{padding:20px;border:1px solid #d1a339;background:#fff0c9;border-radius:16px;margin-bottom:20px}.sync-warning details{margin:12px 0}.sync-warning p{font-size:14px}.telegram-connect-link{display:inline-block;border-radius:12px;text-decoration:none;padding:12px 15px;margin-top:12px}.connected{background:#e3f2cb;padding:14px;border-radius:12px}.artifact-frame{height:650px;min-height:350px}.steps{max-height:75vh}.telegram-app body{padding-top:max(env(safe-area-inset-top,0px),var(--tg-content-safe-area-inset-top,0px))}
@media(max-width:1050px){.mobile-section-picker{display:block;font-size:14px;margin:16px 0}.mobile-section-picker select{display:block;width:100%;margin-top:7px;font-size:16px;min-height:46px}.lesson-layout>.steps{display:none}.lesson-layout{display:block}.block-head h2{font-size:27px}.hero>*{max-width:100%}.hero:after{opacity:.15}}
@media(max-width:720px){
 body{padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))}main{padding:22px 15px 35px;max-width:none}.shell{display:block}.sidebar{height:auto;position:static;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:15px 18px;background:#fffdf9}.sidebar .brand{margin:0;font-size:22px}.sidebar .brand small{font-size:10px;letter-spacing:1.2px}.sidebar .brand-icon{width:38px;height:38px}.sidebar .logout{display:block;padding:10px 5px;white-space:nowrap;font-size:12px;margin-left:12px}.sidebar .nav-caption,.sidebar .access-card{display:none}.sidebar nav{position:fixed;z-index:50;bottom:0;left:0;right:0;display:flex;gap:3px;align-items:stretch;padding:7px 8px calc(9px + max(env(safe-area-inset-bottom,0px),var(--tg-content-safe-area-inset-bottom,0px)));background:#fffdf9;border-top:1px solid #e7dfd2;box-shadow:0 -6px 18px #293d240a;overflow-x:auto;overscroll-behavior-x:contain}.sidebar nav button{display:flex;flex:1;min-width:69px;max-width:none;flex-direction:column;justify-content:center;gap:2px;padding:8px 4px;min-height:52px;white-space:normal;text-align:center;font-size:11px;line-height:1.3}.sidebar nav button>span:first-child{font-size:21px;line-height:1.1}.sidebar nav button .nav-count{display:none}.sidebar nav button.active{background:#ffe3eb}.profile .avatar{width:35px;height:35px}header{gap:12px;align-items:center;margin-bottom:23px}header h1{font-size:30px}header .eyebrow{font-size:10px;letter-spacing:1.5px}.hero{padding:25px;margin-bottom:18px}.hero h2{font-size:32px}.hero p{font-size:15px}.stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.stat{padding:14px 10px}.stat strong{font-size:25px}.stat span{font-size:11px}.row{gap:9px}.row.between{align-items:center}.row.between h2{font-size:25px}.course-top{padding:22px;min-height:145px}.course-top h3{font-size:28px}.course-bottom{padding:20px}.lesson-row{flex-direction:column;align-items:stretch;gap:13px}.lesson-row .row{justify-content:flex-end}.lesson-row h3{font-size:18px}.lesson-row button{min-height:44px}.block-head{padding:18px}.block-head h2{font-size:27px}.block-body{padding:18px}.lesson-panel:has(.artifact-frame) .block-body{padding:4px 4px 20px}.block-footer{padding:15px;position:static}.block-footer>button{width:100%;min-height:48px}.block-footer .save-indicator{display:block;margin-top:7px}.block-body>.row{align-items:stretch}.block-body>.row>button{flex:1;min-height:44px;font-size:14px}.block-body .inline{width:100%;display:block}.block-body input[type=file]{display:block;width:100%;font-size:14px;margin-top:8px}.block-body textarea{font-size:16px}.panel,.review-card{padding:19px}.panel h2{font-size:27px}.panel p{font-size:15px}.grid{grid-template-columns:1fr;gap:14px}input,textarea,select{font-size:16px;max-width:100%;min-height:44px}.login-page{padding:18px;background-size:75%;min-height:100svh}.login-panel{padding:28px 23px}.login-panel h1{font-size:43px}.login-panel label{font-size:14px}#toast{bottom:calc(94px + env(safe-area-inset-bottom,0px));left:15px;right:15px;max-width:none;font-size:14px}.sync-warning{padding:16px}.sync-warning .row>button{width:100%;font-size:13px}.editor-block{padding:16px}.editor-block .row{align-items:stretch;flex-direction:column}.toolbar{align-items:stretch}.toolbar input,.toolbar select{width:100%;max-width:none;flex-basis:100%}.scroll{max-width:100%}.file-card audio,.file-card video{width:100%;max-width:100%}.file-card a{overflow-wrap:anywhere}.flashcards{grid-template-columns:repeat(2,minmax(0,1fr))}.flash{min-width:0;padding:15px}.flash b{font-size:21px}.filled-lesson .artifact-frame{height:700px}.scale{gap:8px}.scale button{width:44px;height:44px;min-height:44px}.course-breadcrumb{font-size:12px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.bot-settings{border-top:1px solid #e7dfd2;margin-top:20px;padding-top:16px}.bot-settings>button{margin:12px 0 0 10px}@media(max-width:720px){.bot-settings>button{display:block;margin:12px 0;width:100%}}

.test-access{margin-top:20px;padding:18px;border:1px solid #a9bd95;border-radius:14px;background:#edf6e4}.test-access code{font-size:16px;overflow-wrap:anywhere;user-select:all}.test-access p{font-size:14px}@media(max-width:720px){.test-access .row>button{width:100%}}
