#web-account-bar{position:relative;z-index:10;max-width:640px;margin:12px auto 0;display:flex;justify-content:space-between;padding:10px 18px;background:#fffaf0;border-radius:14px;font:13px "Segoe UI",sans-serif;color:#214f42}#web-account-bar a{color:inherit}body{padding-top:0}#web-sync-note{font:12px "Segoe UI",sans-serif;text-align:center;color:#687b6a;margin:8px auto}
/* Website classroom: full browser layout, independent of the phone prototype. */
html,body{height:auto;min-height:100%;overflow:auto;background:#fffaf0}
body{padding:0;background-image:none}
#web-account-bar{max-width:1200px;margin:0 auto;padding:20px 28px;border-bottom:1px solid #dfe4db;border-radius:0;font-size:14px}
body .shell{width:100%;max-width:1200px;height:auto;min-height:calc(100dvh - 62px);margin:0 auto;border:0;border-radius:0;box-shadow:none;overflow:visible;background:#faf9f5;display:block}
body .shell main{height:auto;min-height:0;overflow:visible;padding:28px;display:block;background:#faf9f5}
body .shell #screen{display:flex;height:auto;min-height:0;overflow:visible}
body .shell[data-stage="listen"] .dialogue-list{flex:none;max-height:none;overflow:visible;mask-image:none;padding:8px 0;margin:20px 0}
body .shell[data-hub="false"] aside{position:relative;top:auto;min-height:0;height:330px;flex-basis:auto;background:#f4e8d6;padding:0}
body .shell[data-hub="false"] .lesson-artwork{inset:58px 0 0}
body .shell[data-hub="false"] .lesson-artwork>img{object-fit:contain;object-position:center}
body .shell[data-hub="false"] aside .brand{top:8px;right:16px}
body .shell[data-hub="false"] #lesson-home{top:8px;left:16px}
body .shell header{padding-bottom:18px}
body .shell #steps{margin:20px 0 24px}
body .shell #steps button{font-size:14px}
body .shell .header-title{font-size:22px!important;max-width:none}
body .shell .utterance{padding:18px;gap:14px;border-radius:16px}
body .shell .utterance p{font-size:18px}
body .shell .utterance small{font-size:15px}
body .shell #screen>h2{font-size:32px}
body .shell .subtitle{font-size:16px}
body .shell .russian{font-size:24px}
body .shell .btn{font-size:15px;min-height:48px}
body .shell #screen>.actions{position:sticky;top:0;z-index:3;background:#faf9f5;padding:12px 0;margin:0}
body .shell[data-stage="catalog"] #screen>.topic-access-list{overflow:visible;flex:auto}
body .shell[data-hub="true"] main{padding-bottom:90px}
body .shell #hubNav{position:sticky;bottom:0;width:100%;left:auto;right:auto}
@media(min-width:960px){
 body .shell[data-hub="false"]{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.15fr);align-items:start}
 body .shell[data-hub="false"] aside{position:sticky;top:20px;height:440px;margin:28px 0 28px 28px;border-radius:22px;overflow:hidden}
 body .shell[data-hub="false"] main{padding:28px 36px}
 body .shell[data-hub="true"] #screen{max-width:850px;margin:auto}
}
@media(max-width:600px){
 #web-account-bar{padding:14px 18px}
 body .shell main{padding:20px 16px}
 body .shell[data-hub="false"] aside{height:280px}
 body .shell .utterance{padding:12px 8px;gap:7px}
 body .shell .utterance p{font-size:16px}
 body .shell .utterance small{font-size:13px}
 body .shell #steps button{font-size:11px}
}
/* Browser hub: preserve image proportions and use space for the catalogue. */
body .shell[data-hub="true"]{min-height:calc(100dvh - 62px);height:auto}
body .shell[data-hub="true"] aside{height:82px;min-height:0;flex-basis:auto}
body .shell[data-hub="true"] #screen{height:auto;min-height:0;overflow:visible;display:flex}
body .shell[data-hub="true"] .featured-lesson{flex:none!important;min-height:0}
body .shell[data-hub="true"] .feature-art{flex:none;height:auto;min-height:0;aspect-ratio:16/9}
body .shell[data-hub="true"] .feature-art img{object-position:center;object-fit:cover}
body .shell[data-hub="true"] .future-card{min-height:0}
body .shell[data-stage="catalog"][data-catalog-view="topics"] #screen{overflow:visible}
body .shell[data-stage="catalog"] .topic-access-card{padding:18px;min-height:100px}
body .shell[data-stage="catalog"] .topic-access-copy b{font-size:18px}
body .shell[data-stage="catalog"] .topic-access-copy small{font-size:14px}
body .shell[data-stage="catalog"] .access-section-title{font-size:22px}
body .shell[data-stage="catalog"] .access-badge{font-size:12px}
body .shell[data-hub="true"] #hubNav{margin-top:0}
@media(min-width:960px){body .shell[data-stage="catalog"] #screen{max-width:1000px}body .shell[data-stage="catalog"] .topic-access-list{display:grid;grid-template-columns:1fr 1fr;gap:12px 22px}body .shell[data-stage="catalog"] .access-section-title,body .shell[data-stage="catalog"] .paid-pack-summary,body .shell[data-stage="catalog"] .catalog-preview-note{grid-column:1/-1}body .shell[data-stage="catalog"] .topic-access-card{margin:0}}
body .shell[data-stage="catalog"][data-catalog-view="topics"] #screen>.topic-access-list{flex:none!important;height:auto!important;min-height:auto;max-height:none;overflow:visible!important;mask-image:none;scrollbar-gutter:auto}
body .shell[data-stage="catalog"] #screen>.chapter-list{flex:none!important;height:auto;max-height:none;overflow:visible}
body .shell[data-hub="true"] .future-grid{flex:none!important;height:auto}
body .shell[data-hub="true"] .future-grid img{height:auto;aspect-ratio:16/10;flex:none;object-position:center}
body .shell[data-stage="catalog"] .catalog-preview-note{display:none}
body .shell .author-portrait{width:min(320px,100%);height:auto;aspect-ratio:1;border-radius:50%;margin:0 auto 28px;border:6px solid #fffdf7;box-shadow:0 0 0 1px #dce4d4,0 12px 30px #214c4215}
body .shell .author-portrait img{object-position:center 30%}
body .shell .author-portrait figcaption{display:none}
.web-pack-action{display:inline-flex;align-items:center;justify-content:center;margin-top:18px;padding:14px 20px;text-decoration:none;min-height:48px;background:#214f42;color:#fff!important;border-radius:14px;font-weight:700}.web-pack-action:hover{background:#176b5a}.web-pack-action:focus-visible{outline:3px solid #e2a83e;outline-offset:3px}

/* Keep the listening workspace inside the viewport; only the dialogue scrolls. */
body:has(.shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"])){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body:has(.shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"])) #web-account-bar{flex:0 0 auto;width:100%;padding:12px 28px}
body:has(.shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"])) #web-sync-note{position:fixed;bottom:3px;left:12px;z-index:10;max-width:42%;margin:0;font-size:10px;pointer-events:none}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]){flex:1;min-height:0;height:0;overflow:hidden}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) main{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding-top:18px;padding-bottom:18px}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) header{flex:0 0 auto;padding-bottom:10px}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) #steps{flex:0 0 auto;margin:10px 0 12px}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) #screen{flex:1;min-height:0;height:0;overflow:hidden}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) #screen>.actions{position:static;flex:0 0 auto;padding:6px 0;margin:0}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) .dialogue-list{flex:1 1 0;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding:12px;mask-image:none;padding:8px 6px 8px 0;margin:8px 0}
body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) #screen>.btn.full{flex:0 0 auto;margin:0}
@media(min-width:960px){body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]){display:grid;grid-template-rows:minmax(0,1fr)}body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) aside{position:relative;top:0;height:min(440px,calc(100% - 40px));margin-top:20px;margin-bottom:20px;align-self:start}}
@media(max-width:959px){body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]){display:flex;flex-direction:column}body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) aside{flex:0 0 auto!important;height:clamp(110px,22dvh,190px);min-height:0}body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) main{flex:1;height:0;padding:12px 16px}body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) #steps{margin:8px 0}body:has(.shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"])) #web-account-bar{padding:10px 16px}body:has(.shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"])) #web-sync-note{display:none}}
@media(max-height:600px) and (max-width:959px){body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) aside{height:90px}body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) #steps{margin:4px 0}body .shell:is([data-stage="listen"],[data-stage="practice"],[data-stage="complete"]) .btn{min-height:42px;padding:9px 12px}}

body .shell[data-stage="practice"] .practice-scroll{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 6px 6px 0}
body .shell[data-stage="practice"] .practice-scroll h2{font-size:28px;margin:8px 0 12px}
body .shell[data-stage="practice"] .practice-scroll>.card{margin:10px 0;padding:16px}
body .shell[data-stage="practice"] #screen>.recorder{flex:0 0 auto;padding:12px;margin:8px 0 0}
body .shell[data-stage="practice"] #screen>.recorder p{font-size:12px;line-height:1.4}
body .shell[data-stage="practice"] #screen>.actions{flex:0 0 auto;position:static;margin:0;padding:8px 0 0;justify-content:space-between}
body .shell[data-stage="practice"] #screen>.actions .btn{flex:1}
@media(max-width:600px){body .shell[data-stage="practice"] .practice-scroll h2{font-size:25px}body .shell[data-stage="practice"] .practice-scroll .russian{font-size:20px}body .shell[data-stage="practice"] .practice-scroll .card{padding:12px}}

body .shell #save-toast{position:fixed;top:68px;bottom:auto;left:auto;right:24px;width:max-content;max-width:min(380px,calc(100vw - 32px));padding:13px 18px;background:#fff0c7;color:#594319;border:1px solid #d6ac58;border-radius:14px;box-shadow:0 6px 22px #382a1924;font-size:14px;line-height:1.5;z-index:30}
@media(max-width:600px){body .shell #save-toast{top:54px;right:16px;font-size:13px}}

/* Summary content scrolls independently of the always-visible lesson actions. */
body .shell[data-stage="complete"] .complete-scroll{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 6px 8px 0}
body .shell[data-stage="complete"] .complete-scroll>h2{font-size:28px;margin:10px 0}
body .shell[data-stage="complete"] .complete-scroll>.card{margin:12px 0;padding:16px}
body .shell[data-stage="complete"] .complete-controls{flex:0 0 auto;background:#faf9f5;padding-top:8px;border-top:1px solid #dfe4db}
body .shell[data-stage="complete"] .complete-controls>.actions{position:static;display:flex;gap:8px;margin:0;padding:0}
body .shell[data-stage="complete"] .complete-controls>.actions>.btn{flex:1;min-width:0;padding:12px 10px}
body .shell[data-stage="complete"] .complete-controls>p.small{font-size:12px;line-height:1.35;margin:7px 0!important}
@media(max-width:600px){body .shell[data-stage="complete"] .complete-scroll>h2{font-size:24px}body .shell[data-stage="complete"] .complete-controls>.actions>.btn{font-size:13px;padding:10px 8px}}

body:has(.shell[data-phrase-trainer="true"]){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body:has(.shell[data-phrase-trainer="true"]) #web-account-bar{flex:0 0 auto;width:100%;padding:12px 28px}
body:has(.shell[data-phrase-trainer="true"]) #web-sync-note{display:none}
body .shell[data-phrase-trainer="true"]{flex:1;height:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body .shell[data-phrase-trainer="true"] aside{flex:0 0 72px;height:72px}
body .shell[data-phrase-trainer="true"] main{flex:1;min-height:0;height:0;display:flex;flex-direction:column;overflow:hidden;padding:12px 28px 20px}
body .shell[data-phrase-trainer="true"] main>header{flex:0 0 auto;padding-bottom:8px}
body .shell[data-phrase-trainer="true"] #steps{display:none}
body .shell[data-phrase-trainer="true"] #screen{width:100%;max-width:700px;flex:1;height:0;min-height:0;display:flex;gap:14px;overflow:hidden}
body .shell[data-phrase-trainer="true"] .trainer-content{flex:1 1 0;min-height:0;overflow-y:auto}
body .shell[data-phrase-trainer="true"] .trainer-controls{flex:0 0 auto}
body .shell[data-phrase-trainer="true"] .trainer-controls .btn{min-height:48px}
body .shell[data-phrase-trainer="true"] #hubNav{display:none}
@media(max-width:600px){body .shell[data-phrase-trainer="true"] main{padding:10px 16px 14px}body .shell[data-phrase-trainer="true"] aside{flex-basis:66px;height:66px}body .shell[data-phrase-trainer="true"] .trainer-quote{padding:16px}body .shell[data-phrase-trainer="true"] .trainer-quote .russian{font-size:22px}}

/* Pack 2 artwork is composed as 16:9: show the full width without side strips. */
body .shell[data-pack="2"][data-hub="false"] aside{height:auto!important;aspect-ratio:16/9;padding-top:58px!important;box-sizing:content-box;flex-basis:auto!important}
body .shell[data-pack="2"][data-hub="false"] .lesson-artwork>img{object-fit:cover}
@media(max-height:650px) and (max-width:959px){body .shell[data-pack="2"][data-hub="false"] aside{height:100px!important;aspect-ratio:auto;padding-top:0!important}body .shell[data-pack="2"][data-hub="false"] .lesson-artwork{inset:0}body .shell[data-pack="2"][data-hub="false"] .lesson-artwork>img{object-fit:contain}}

/* Classroom theme: controls share the workspace surface, including sticky rows. */
html[data-theme="dark"] #web-account-bar{background:#1c3027;color:#edf3e9;border-color:#40564c}
html[data-theme="dark"] #web-account-bar #site-sound-toggle{background:#31493d;color:#edf3e9;border-color:#617c6b}
html[data-theme="dark"] body .shell #screen>.actions,
html[data-theme="dark"] body .shell .complete-controls{background:#182923;border-color:#40564c}
html[data-theme="dark"] body .shell #steps button{color:#b8c9c0}
html[data-theme="dark"] body .shell #steps button.active{color:#c0f0df}
html[data-theme="dark"] body .shell #steps button:hover:not(:disabled){background:#29483a;color:#edf3e9}
html[data-theme="dark"] body .shell .text-button{color:#d6efe3}
html[data-theme="dark"] body .shell #lesson-home{background:#31493d;color:#f0f4ea;border-color:#617c6b;opacity:1}
html[dir="rtl"] body .shell[data-hub="true"] header{right:auto;left:20px}
/* On desktop, let the full illustration determine its height below a compact toolbar. */
@media(min-width:960px){
 body .shell[data-hub="false"] aside,
 body .shell[data-pack="2"][data-hub="false"] aside{height:auto!important;aspect-ratio:auto;padding:52px 0 0!important;box-sizing:border-box;display:block}
 body .shell[data-hub="false"] .lesson-artwork{position:relative;inset:auto}
 body .shell[data-hub="false"] .lesson-artwork>img{height:auto;object-fit:contain;object-position:center}
 body .shell[data-hub="false"] aside .brand{top:6px}
 body .shell[data-hub="false"] #lesson-home{top:6px}
}
