/* Touch layouts: media stays in place; only the transcript scrolls. */
.mobile-home-header{display:none}
body[data-view="podcast"] .mode-sidebar{display:none!important}
body[data-view="podcast"] .page-corner-nav{display:flex}
.podcast-page{padding:100px 28px 100px;max-width:1160px}
button:active:not(:disabled){filter:brightness(.95)}
button,a,select{touch-action:manipulation}
.transcript-collapse,.fold-transcript{width:auto!important;min-width:44px;padding:8px!important;font:12px var(--sans)!important}
@media(max-width:900px){
 body{--mobile-top:64px}
 main{padding-bottom:0!important}
 body[data-view="home"] .app{display:flex;flex-direction:column}
 body[data-view="home"] main{order:1}
 #home-view{padding:0 16px!important;min-height:0}
 .mobile-home-header{height:72px;padding-top:env(safe-area-inset-top);display:flex;align-items:center;justify-content:space-between;gap:12px}
 .mobile-home-header>span{font-size:19px;font-weight:750;letter-spacing:-.5px}
 .mobile-home-account .account-launcher{position:static!important;width:auto;height:auto;padding:3px;background:#fff;border:1px solid #dce5f2;box-shadow:none}
 .mobile-home-account .account-launcher-main{min-height:44px;max-width:180px}
 .mobile-home-account [data-account-name]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body[data-view="home"] .mode-sidebar{order:2;position:static!important;width:auto!important;height:auto!important;margin:16px 16px max(24px,env(safe-area-inset-bottom));padding:0!important;background:transparent!important;box-shadow:none!important;border:0;border-radius:0;backdrop-filter:none!important}
 body[data-view="home"] .sidebar-brand,body[data-view="home"] .sidebar-foot{display:none}
 body[data-view="home"] .sidebar-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}
 body[data-view="home"] .mode-link{min-height:90px;padding:18px;text-align:left;background:#fff;border:1px solid #dce5f2;border-radius:18px;color:#29486d;box-shadow:0 3px 14px #27466c04}
 body[data-view="home"] .mode-link b{font-size:17px}
 body[data-view="home"] .mode-link small{display:block;font-size:10px;margin-top:7px;letter-spacing:.06em}
 body[data-view="home"] .mode-link>span{display:none}
 #home-view .hero{height:clamp(230px,34svh,340px)!important;min-height:0!important;border-radius:22px}
 #home-view .hero>img{object-position:65% center}
 #home-view .hero-copy{left:22px;right:22px;top:auto!important;bottom:24px;transform:none!important;max-width:none}
 #home-view .hero-copy .kicker{font-size:10px}
 #home-view .home-brand-lockup{margin:12px 0}
 #home-view .home-brand-lockup>.annotation-mark{display:none}
 #home-view .hero-copy h1,#home-view:not([data-preview="home"]) .hero-copy h1{font-size:36px!important;line-height:1.15;letter-spacing:-1px}
 #home-view .lead,#home-view:not([data-preview="home"]) .lead{font-size:15px;line-height:1.65;margin:10px 0 0;max-width:95%}
 #home-view .hero-shade,body.day-complete #home-view .hero-shade{background:linear-gradient(0deg,#f4f7fdf5,#f4f7fd80 65%,#f4f7fd10)}
 .page-corner-nav{top:10px;left:12px;gap:6px}
 .page-corner-nav button{min-height:44px;height:44px;padding:0 14px;font-size:13px}
 .account-launcher{top:10px;right:12px}
 .podcast-page{padding:78px 18px 40px!important}
 .podcast-heading{margin-bottom:22px}
 .podcast-heading h1{font-size:28px}
 #podcast-view{min-height:100dvh}
 body[data-view="part1"] main,body[data-view="relisten"] main,body[data-view="finale"] main{height:100dvh;overflow:hidden}
 #part1-view,#relisten-view,#finale-view{padding:var(--mobile-top) 0 env(safe-area-inset-bottom)!important;height:100dvh;box-sizing:border-box}
 #relisten-view>.player-head,#finale-view>.player-head,.finale-tools{display:none}
 .segment-layout,.segment-layout.transcript-collapsed,#relisten-layout,#finale-layout{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows: minmax(0,auto) minmax(0,1fr);border-radius:0;box-shadow:none;overflow:hidden}
 .segment-stage{min-height:0;height:auto;grid-template-rows:minmax(0,1fr) 56px}
 .segment-video{height:min(56.25vw,32dvh);min-height:0}
 .segment-video video,.relisten-player>video{object-fit:contain;width:100%;height:100%}
 .segment-video:after{display:none}
 .segment-transport,.relisten-transport{height:56px;padding:4px 12px;gap:12px;box-sizing:border-box}
 .segment-transport button,.relisten-transport button,.transport button{min-width:44px;min-height:44px;font-size:14px}
 .segment-transport>button:first-child{display:block}
 .segment-transport time{min-width:32px;font-size:11px}
 .timeline{min-width:24px;min-height:32px;display:flex;align-items:center;touch-action:none}
 .transcript-panel,.relisten-transcript,.finale-transcript{height:100%;min-height:0!important;border-radius:0;overflow:hidden}
 .transcript-panel>header,.segment-layout.transcript-collapsed .transcript-panel>header{height:auto;min-height:0;padding:8px 14px;background:#f5f8fc;flex:none}
 .transcript-panel>header>div{display:flex!important;align-items:center;justify-content:space-between;width:100%;gap:8px}
 .transcript-panel>header h2{font-size:12px;margin:0;font-weight:500}
 #transcript-section-label,.transcript-panel>header>span,.transcript-collapse{display:none}
 #sentence-understood-progress{margin:0;min-height:44px;padding:8px 12px;font-size:12px}
 .transcript-status{padding:4px 14px;font-size:11px}
 .transcript-stream,#relisten-stream{min-width:0;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scroll-padding:12px}
 .transcript-line{padding:16px 14px;grid-template-columns:46px minmax(0,1fr);gap:10px}
 .line-copy{font-size:17px;line-height:1.8}
 .line-actions{gap:8px}.line-actions button,.transcript-tools button,.word-detail button{min-height:44px;font-size:13px;padding:10px 14px}
 .segment-finish{padding:10px 14px;flex:none}.segment-finish button{min-height:44px}
 .relisten-player{height:min(calc(56.25vw + 56px),calc(32dvh + 56px));grid-template-rows:minmax(0,1fr) 56px}
 .relisten-transcript>header,.finale-transcript>header{min-width:0;padding:10px 14px;min-height:44px}
 .relisten-transcript>header p,.finale-transcript>header p{display:none}
 .relisten-transcript>header h2,.finale-transcript>header h2{font-size:14px;margin:0}
 .fold-transcript{display:none}
 #relisten-layout.transcript-collapsed .relisten-transcript{height:100%}
 #relisten-layout.transcript-collapsed .relisten-transcript>header,#relisten-layout.transcript-collapsed #relisten-stream{visibility:visible}
 #finale-layout .finale-media{height:min(56.25vw,32dvh);aspect-ratio:auto}
 #finale-layout .finale-media video{height:100%;object-fit:contain}
 #finale-view{padding-bottom:calc(66px + env(safe-area-inset-bottom))!important}
 .finale-footer{position:fixed;bottom:0;left:0;right:0;padding:8px 14px max(8px,env(safe-area-inset-bottom));background:#f5f8fc;border-top:1px solid #dce5f2;z-index:40}
 .finale-footer button{min-height:44px;margin:0}
 #free-player-panel{scroll-margin-top:0}
 .free-play-layout{height:calc(100dvh - 130px);min-height:0;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:0}
 .free-media-area video{height:min(56.25vw,32dvh);border-radius:12px;object-fit:contain}
 .free-player-tools{padding:8px 0;gap:6px}.free-player-tools button,.free-player-tools select{min-height:44px}
 #free-transcript{min-height:0;max-height:none;overscroll-behavior:contain;touch-action:pan-y;padding:12px;border-radius:12px}
 .free-audio-art{display:none}
 #listen-dock button,#listen-dock select{min-height:44px;font-size:13px;border-radius:14px}
 #listen-dock [data-listen="play"]{background:#3266ae;color:#fff;border-color:#3266ae;padding-inline:22px}
 #listen-dock input[type="range"]{min-height:32px;touch-action:none}
 #podcast-transcript{padding-top:max(14px,env(safe-area-inset-top))}
 #podcast-sentences{overscroll-behavior:contain;touch-action:pan-y}
 #podcast-collapse{min-height:44px}
 .podcast-row-play,.podcast-download,.podcast-filters button{min-height:44px}
 .podcast-filters{overflow-x:auto;white-space:nowrap;flex-wrap:nowrap}
 .settings-nav{position:static;flex-direction:row;overflow-x:auto;white-space:nowrap}
 .settings-shell{grid-template-columns:1fr;gap:16px}
}
@media(max-width:1000px) and (orientation:landscape) and (max-height:600px){
 body{--mobile-top:56px}
 body[data-view="part1"] main,body[data-view="relisten"] main,body[data-view="finale"] main{height:100dvh;overflow:hidden;margin-left:0}
 #part1-view,#relisten-view,#finale-view{height:100dvh;padding:56px max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px,env(safe-area-inset-left))!important}
 #relisten-view>.player-head,#finale-view>.player-head,.finale-tools{display:none}
 .segment-layout,.segment-layout.transcript-collapsed,#relisten-layout,#finale-layout{height:100%;min-height:0;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);border-radius:12px}
 .segment-stage,.relisten-player{height:100%;min-height:0;grid-template-rows:minmax(0,1fr) 52px}
 .segment-video,#finale-layout .finale-media{height:100%;min-height:0}
 .segment-video video,.relisten-player>video,#finale-layout video{object-fit:contain}
 .segment-transport,.relisten-transport{height:52px;gap:8px;padding:2px 8px}
 .transcript-panel,.relisten-transcript,.finale-transcript{height:100%;min-height:0}
 #sentence-understood-progress{font-size:11px}
 .transcript-panel>header h2{display:none}
 .transcript-panel>header>div{justify-content:flex-end}
 .transcript-line{padding:12px;grid-template-columns:38px minmax(0,1fr);gap:8px}
 #finale-view{padding-bottom:56px!important}
 .free-play-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:12px}
 .free-media-area video{height:calc(100% - 66px)}
 .podcast-now-layout{display:grid;grid-template-columns:32% minmax(0,1fr);padding:10px 0;min-height:0}
 #podcast-now-info{display:block}#podcast-now-info .podcast-cover{display:none}
 #podcast-now-controls #listen-dock{padding:6px 16px}
}
.category-nav-start button:first-child{font:500 13px var(--sans)!important;padding:0 14px!important;min-width:52px}
@media(max-width:900px){
 .transcript-line{opacity:1}
 .transcript-tools{opacity:1;gap:8px;flex-wrap:wrap}
 .transcript-line:not(.active) .transcript-tools{display:none}
 .transcript-line.translated .transcript-tools,.transcript-line:focus-within .transcript-tools{display:flex}
 .transcript-line .line-copy{color:#29415f}
 .transcript-line:not(.active){background:#f3f6fb}
 .transcript-tools button{font-size:12px;padding:9px 12px}
 .transcript-tools button[data-sentence-check]{background:#e5f2eb;color:#286a55;border-color:#c0dacb;flex-basis:100%}
 .word-detail{max-width:100%;padding:14px;gap:10px}
 .word-detail button{width:auto}
 .relisten-line{grid-template-columns:42px minmax(0,1fr);padding:16px 14px;gap:10px;opacity:1}
 #finale-stream .line-copy{font-size:17px}
}
@media(max-width:900px){
 .transcript-line.past,.transcript-line.upcoming{opacity:1}
 .transcript-line .word{color:#52667f}
 .transcript-line.active .word{color:#23324b}
 #relisten-view:has(#day-finish:not(.hidden)) #relisten-layout{height:calc(100% - 130px)}
 #day-finish:not(.hidden){position:fixed;bottom:0;left:0;right:0;z-index:40;margin:0;padding:12px 16px max(12px,env(safe-area-inset-bottom));border-radius:0;background:#f5f8fc;gap:8px}
 #day-finish>div:first-child{display:none}#day-finish>div:last-child{width:100%;display:flex;flex-direction:column;gap:8px}#day-finish button{min-height:44px}
}
@media(max-width:900px){
 body[data-view="player"] main{height:100dvh;overflow:hidden}
 #player-view{height:100dvh;padding:64px 0 env(safe-area-inset-bottom)!important}
 #player-view>.player-head{display:none}
 #player-view .player-layout{height:100%;min-height:0;display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);border-radius:0}
 #player-view .media-frame{height:min(56.25vw,36dvh);min-height:0;flex:none}
 #player-view .media-frame video{height:100%;object-fit:contain}
 #player-view .transport{height:56px;gap:10px;padding:4px 12px;box-sizing:border-box}
 #player-view .workbench{min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
 #player-view .watch-main{padding:24px 20px}
 #player-view .watch-main h2{font-size:26px}
 #player-view .watch-next-actions{position:sticky;bottom:0;z-index:2;background:#f5f8fc}
 #player-view .next-sentence{min-height:48px;height:auto;padding:16px}
 .transcript-tools button,.podcast-row-play{border-radius:12px}
}
@media(max-width:1000px) and (orientation:landscape) and (max-height:600px){
 #player-view{height:100dvh;padding:56px 8px 0!important}
 #player-view .player-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 #player-view .media-column{min-height:0}
 #player-view .media-frame{height:auto;min-height:0;flex:1}
}
#listen-seek{appearance:none;-webkit-appearance:none;width:100%;margin:0;height:28px;background:transparent;cursor:pointer;touch-action:none}
#listen-seek::-webkit-slider-runnable-track{height:3px;background:#c9d7ea;border-radius:4px}
#listen-seek::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:#3266ae;margin-top:-6.5px;box-shadow:0 2px 6px #20355025}
#listen-seek::-moz-range-track{height:3px;background:#c9d7ea;border-radius:4px}
#listen-seek::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:#3266ae}
#listen-dock summary{min-height:44px;display:flex;align-items:center;cursor:pointer;padding:0 10px}
@media(max-width:900px){
 body[data-view="podcast"] .account-launcher{top:10px;right:12px}
 body[data-view="free"] #free-player-panel:not([hidden]){position:fixed;inset:64px 0 0;z-index:100;margin:0;padding:12px 14px max(12px,env(safe-area-inset-bottom));background:#f5f7fb;border:0;display:flex;flex-direction:column;overflow:hidden}
 .free-player-panel>header{flex:none;gap:12px;margin-bottom:10px;align-items:center}
 .free-player-panel>header .kicker{display:none}
 .free-player-panel>header h2{font-size:17px;margin:0;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 #free-player-close{min-height:44px;flex:none;padding:8px 12px!important}
 .free-play-layout{height:auto;flex:1;min-height:0}
}
@media(max-width:1000px) and (orientation:landscape) and (max-height:600px){
 #podcast-transcript{width:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:8px max(18px,env(safe-area-inset-right)) 0 max(18px,env(safe-area-inset-left))}
 #podcast-now-controls{margin:0 -18px}
 #podcast-now-controls #listen-dock{border-radius:0}
 .podcast-now-header{padding:0;min-height:44px}
}
.relisten-line{border-radius:0!important;box-shadow:none;text-align:left}
.relisten-line.active{box-shadow:inset 3px 0 #3266ae}
@media(max-width:900px){
 .finale-footer{margin:0;box-sizing:border-box}
 .finale-footer button{height:44px;min-height:44px;padding:8px 14px;font-size:13px}
 #finale-view{padding-bottom:calc(64px + env(safe-area-inset-bottom))!important}
 .category-nav-start button:first-child{white-space:nowrap;flex:none}
}

