/* One document scroll surface: long lessons and quizzes must not be clipped. */
html:has(body.player-page){height:auto;min-height:100%;overflow-y:auto}
body.player-page{height:auto!important;min-height:100dvh;overflow:visible!important;background:var(--page)}
.player-page .player-top{position:sticky;top:0;z-index:40;height:auto;min-height:72px;flex-wrap:wrap;gap:12px;padding:12px 20px;background:var(--paper);color:var(--ink)}
.player-page .player-layout{height:auto!important;min-height:calc(100dvh - 80px);align-items:start;grid-template-columns:minmax(240px,310px) minmax(0,1fr)}
.player-page .lesson-main{overflow:visible!important;height:auto!important;max-height:none!important;min-width:0;background:var(--page);color:var(--ink)}
.player-page .lesson-sidebar{position:sticky;top:90px;max-height:calc(100dvh - 100px);height:auto;overflow:auto;background:var(--paper);color:var(--ink)}
.lesson-document,.focus-reading,.quiz-question{overflow-wrap:anywhere}
.lesson-content{max-width:100%;box-sizing:border-box}
.focus-reading{line-height:1.8}.focus-reading p{max-width:78ch}
.focus-reading pre{overflow:auto;max-width:100%}
.focus-reading img{max-width:100%;height:auto}
.welcome h1{font-size:clamp(28px,4vw,48px)}
.course-grid .course-cover{position:relative;overflow:hidden;min-height:200px;background:#143e29}
.course-grid .course-cover:has(img){padding-top:220px}
.v2-course-image{position:absolute;top:0;left:0;width:100%;height:200px;object-fit:cover}
.course-grid .course-body>p{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.course-grid .course-actions{flex-wrap:wrap;gap:12px}
.course-grid .meta{flex-wrap:wrap;line-height:1.6}
input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #39a961;outline-offset:3px}
@media(max-width:900px){
 .topbar .nav{gap:10px;flex-wrap:wrap;height:auto;min-height:72px;padding-top:12px;padding-bottom:12px}
 .topbar .nav .brand{margin-right:auto;flex-shrink:0}
 .topbar .nav .avatar{flex-shrink:0}
 .topbar .nav .logout-link{font-size:12px;padding:0}
 .player-page .player-layout{grid-template-columns:minmax(0,1fr)}
 .player-page .lesson-sidebar{position:fixed;top:140px;bottom:0;left:0;max-height:calc(100dvh - 140px);z-index:45;width:min(340px,90vw)}
 .player-page .lesson-sidebar:not(.open){display:none}
 .player-page .player-title{display:none}
 .player-page .lesson-content{padding:24px 18px}
 .player-page .player-actions{gap:6px}
 .player-page .player-actions .btn{font-size:13px;padding:10px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
