/* Dedicated studio: viewport belongs to the learning activity. */
body.tv-studio-open{overflow:hidden}
#tvLesson.tv-studio{position:fixed!important;inset:0!important;z-index:950;background:#f4f6fc;color:#172033;padding:12px 20px!important;overflow:auto;margin:0!important;border-radius:0!important;display:flex;flex-direction:column;gap:8px;height:100dvh;box-sizing:border-box}
#tvLesson.tv-studio.hidden{display:none!important}
.tv-studio .tv-lesson-topbar{flex-shrink:0;flex-wrap:wrap;margin:0;gap:6px}
.tv-studio .tv-version-actions{display:flex;gap:6px;flex-wrap:wrap}
.tv-studio .tv-learning-layout{display:grid!important;grid-template-columns:minmax(380px,44%) minmax(0,1fr)!important;gap:20px;min-height:0;flex:1}
.tv-studio .tv-video-column,.tv-studio .tv-practice-column{min-width:0;position:static!important;overflow:auto;max-height:none!important}
.tv-studio .tv-video-column{display:flex;flex-direction:column}
.tv-studio .tv-player{width:100%;aspect-ratio:16/9;min-height:200px;flex-shrink:0}
.tv-studio .tv-player iframe{width:100%;height:100%;min-height:200px}
.tv-studio .tv-now,.tv-studio .tv-lesson-footer{display:none}
.tv-studio .tv-save-status{margin:0;min-height:0;font-size:12px}
.tv-studio .tv-live-transcript{display:flex;flex-direction:column;min-height:0;flex:1}
.tv-studio .tv-live-list{flex:1;max-height:none!important;overflow:auto}
.tv-studio .tv-line-text{font-size:18px;line-height:1.6}
.tv-studio .tv-line-actions{display:none}
.tv-studio .tv-live-line.active .tv-line-actions,.tv-studio .tv-live-line:focus-within .tv-line-actions,.tv-studio .tv-live-line:hover .tv-line-actions{display:flex}
.tv-studio .tv-live-toolbar{display:none}
.tv-studio .tv-live-head small{display:none}
.tv-studio .tv-practice-column{display:flex;flex-direction:column}
.tv-studio .tv-skill-nav{display:flex!important;flex-shrink:0;gap:4px;overflow-x:auto;margin:0 0 8px!important;white-space:nowrap;padding:4px!important}
.tv-studio .tv-skill-nav button,.tv-studio select{min-height:44px;border-radius:10px;border:1px solid #d2d8e7;padding:9px 12px;background:#fff;color:#172033;cursor:pointer}
.tv-studio .tv-skill-nav button.active{background:#6d28d9;color:white;border-color:#6d28d9}
.tv-studio .tv-skill-content{flex:1;overflow:auto;min-height:0;padding:12px!important;border-radius:16px;background:#fff}
.tv-studio-focus{max-width:780px;margin:0 auto;padding:20px}
.tv-studio-focus h2{font-size:clamp(24px,3vw,36px);line-height:1.5;margin:24px 0}
.tv-studio-controls{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.tv-studio-controls button{min-height:46px;padding:12px 18px;border-radius:12px;border:1px solid #d7dcef;background:#f1edff;color:#4c1d95;font-weight:700;cursor:pointer;font-size:16px}
.tv-studio-controls button:disabled{opacity:.4;cursor:default}
.tv-studio-next{justify-content:space-between;border-top:1px solid #e5e7eb;padding-top:14px;margin-top:28px}
#tvStudioAnswer{width:100%;box-sizing:border-box;border:1px solid #b5bdd2;border-radius:14px;padding:16px;font-size:20px;line-height:1.5}
.tv-studio-row{display:flex;width:100%;gap:14px;padding:18px;text-align:left;background:#fff;color:#172033;border:0;border-bottom:1px solid #ececf5;font-size:19px;line-height:1.5;cursor:pointer}
.tv-studio-row.active{background:#ede9fe;box-shadow:inset 4px 0 #7c3aed}
.tv-studio-row small{color:#6d28d9;min-width:42px}
body[data-tv-studio-mode="dictation"] .tv-studio .tv-live-transcript{display:none}
.tv-studio .tv-saved-panel:not(.hidden){position:absolute;inset:70px 20px 20px;z-index:5;overflow:auto;background:#fff}
@media(max-width:760px){
 #tvLesson.tv-studio{padding:calc(6px + env(safe-area-inset-top)) 0 env(safe-area-inset-bottom)!important;gap:4px}
 .tv-studio .tv-lesson-topbar{padding:0 10px;flex-wrap:nowrap}
 .tv-studio .tv-version-actions{flex-wrap:nowrap;overflow:auto}
 .tv-studio #tvPublishLesson,.tv-studio #tvMyLessons,.tv-studio #tvLessonIntensity,.tv-studio #tvLessonProgress{display:none}
 .tv-studio #tvSaveStatus{padding:0 10px;font-size:11px}
 .tv-studio .tv-learning-layout{display:flex!important;flex-direction:column;gap:0;overflow:hidden;min-height:0}
 .tv-studio .tv-video-column{overflow:visible;flex-shrink:0}
 .tv-studio .tv-player{aspect-ratio:16/9;min-height:200px;max-height:34dvh}
 .tv-studio .tv-live-transcript{display:none}
 .tv-studio .tv-player-actions{padding:3px 8px;gap:4px;display:flex;justify-content:center;margin:0}
 .tv-studio .tv-player-actions button{padding:8px;min-height:40px;font-size:12px}
 .tv-studio .tv-practice-column{flex:1;overflow:hidden;min-height:0}
 .tv-studio .tv-skill-nav{padding:4px 8px!important;margin:0!important}
 .tv-studio .tv-skill-nav button{padding:8px 10px;font-size:13px}
 .tv-studio .tv-skill-content{border-radius:0;padding:8px!important;overscroll-behavior:contain}
 .tv-studio-focus{padding:8px}
 .tv-studio-focus h2{font-size:24px;margin:14px 0}
 .tv-studio-controls{gap:6px;margin:10px 0}
 .tv-studio-controls button{font-size:14px;padding:10px 12px}
 .tv-studio-row{font-size:18px;padding:14px 8px}
}
@media(max-height:550px) and (max-width:760px){.tv-studio .tv-learning-layout{flex-direction:row}.tv-studio .tv-video-column{width:42%}.tv-studio .tv-practice-column{width:58%}.tv-studio .tv-player{max-height:none}}
.tv-studio .tv-line-text{cursor:pointer}
@media(max-width:760px){.tv-studio .tv-video-column{padding:0!important}.tv-studio .tv-lesson-topbar{flex-direction:row!important;align-items:center!important}}
body[data-tv-studio-mode="listening"]:not([data-tv-listen-help="show"]) .tv-studio .tv-live-transcript{display:none}
.tv-transcript-options{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:8px 12px;border-bottom:1px solid #e5e7eb}
.tv-transcript-options h3{margin:0}.tv-transcript-options small{width:100%;color:#667085}
.tv-studio-transcript-item{border-bottom:1px solid #e5e7eb}
.tv-studio-transcript-item .tv-studio-row{border-bottom:0}
.tv-sentence-translate{margin:0 12px 8px 68px;padding:7px 10px;background:#f2edff;color:#5b21b6;border:0;border-radius:8px;cursor:pointer}
.tv-studio-row-translation{margin:0 12px 12px 68px;padding:12px;background:#eff6ff;border-radius:10px;color:#175cd3;font-size:17px;line-height:1.5}
.tv-studio-row-translation.hidden{display:none!important}
.tv-listen-options{display:flex;gap:10px;align-items:center;margin-top:16px}
#tvListenAnswer{display:block;box-sizing:border-box;width:100%;font-size:18px;padding:12px;border:1px solid #b5bdd2;border-radius:10px;margin:10px 0}
[data-listen-gap-check],[data-listen-show]{padding:10px 14px;min-height:44px;background:#ede9fe;color:#5b21b6;border:0;border-radius:10px;margin:8px 8px 8px 0;cursor:pointer}

/* Own the viewport above the app shell in Chrome and standalone mode. */
body.tv-studio-open #tvLesson.tv-studio{z-index:11000!important;height:100dvh;max-height:100dvh}
@media(max-width:760px){
 .tv-studio .tv-lesson-topbar{min-width:0;max-width:100%;overflow-x:auto;touch-action:pan-x;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .tv-studio .tv-lesson-topbar::-webkit-scrollbar,.tv-studio .tv-version-actions::-webkit-scrollbar,.tv-studio .tv-skill-nav::-webkit-scrollbar{display:none}
 .tv-studio .tv-version-actions{min-width:0;flex:1;scrollbar-width:none;touch-action:pan-x}
 .tv-studio .tv-version-actions button,.tv-studio #tvBackSetup{flex-shrink:0;white-space:nowrap}
 .tv-studio .tv-skill-nav{scrollbar-width:none;touch-action:pan-x}
}

/* The focused feature creates its own stacking context: hide the shell header
   while the studio owns the screen so Back and Save remain reachable. */
@media(max-width:760px){
 body.tv-studio-open .shell > .topbar,body.tv-studio-open > .topbar{display:none!important}
 body.tv-studio-open .feature-view.tiki-focused-feature-v1017{z-index:11001!important}
}

/* V10.1.100: desktop uses document scrolling instead of a locked viewport. */
@media(min-width:761px){
 body.tv-studio-open{overflow-y:auto!important;overflow-x:hidden!important}
 body.tv-studio-open #tvLesson.tv-studio{position:relative!important;inset:auto!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:16px!important;display:block;z-index:auto!important}
 .tv-studio .tv-learning-layout{grid-template-columns:minmax(0,44%) minmax(0,1fr)!important;align-items:start;overflow:visible!important;margin-top:12px}
 .tv-studio .tv-video-column,.tv-studio .tv-practice-column{overflow:visible!important;min-height:0;align-self:start}
 .tv-studio .tv-skill-content{flex:none;height:clamp(320px,65vh,760px);max-height:none!important;overflow-y:scroll!important;scrollbar-width:auto!important;scrollbar-gutter:stable;overscroll-behavior:auto}
 .tv-studio .tv-live-list{flex:none;max-height:50vh!important;overflow-y:scroll!important;scrollbar-width:auto!important;scrollbar-gutter:stable}
 .tv-studio .tv-skill-nav{flex-wrap:wrap;overflow:visible!important;white-space:normal}
 .tv-studio .tv-lesson-topbar{position:relative;overflow:visible;flex-wrap:wrap}
 .tv-studio .tv-skill-content::-webkit-scrollbar,.tv-studio .tv-live-list::-webkit-scrollbar{display:block;width:12px}
 .tv-studio .tv-skill-content::-webkit-scrollbar-thumb,.tv-studio .tv-live-list::-webkit-scrollbar-thumb{background:#8b82ab;border:3px solid #f4f6fc;border-radius:10px}
}
