/* Scoped repair, preserve the existing design and all player controls. */
body:has(.video-page), body:has(.course-detail-page), body:has(.video-player-page) { min-width:0 !important; }
body:has(.video-page) #wp, body:has(.course-detail-page) #wp, body:has(.video-player-page) #wp { min-width:0; width:100%; max-width:100%; }
.video-page,.course-detail-page,.video-player-page { width:100%; min-width:0; }
.video-page *,.course-detail-page *,.video-player-page * { box-sizing:border-box; }
.academy-hero-inner>*,.course-grid>*,.course-detail-layout>*,.course-hero-card>*,.watch-shell>*,.lesson-content-shell>* { min-width:0; }
.course-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.member-learning-card,.course-tools,.course-search,.filter-line>div { min-width:0; max-width:100%; }
.course-toolbar,.course-tools,.hero-actions,.course-breadcrumb,.watch-footer,.lesson-nav { flex-wrap:wrap; }
.course-breadcrumb b { min-width:0; }
.pagination .pg { flex-wrap:wrap; }
.course-card h3,.course-hero-info h1,.chapter-item strong,.side-lessons strong { overflow-wrap:anywhere; }
.rich-course-copy img,.intro-copy img { max-width:100%; height:auto; }
.rich-course-copy,.intro-copy { overflow-wrap:anywhere; overflow-x:auto; }
.course-chapter .chapter-index:empty { display:none; }
@media(max-width:1100px) {
 .course-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .academy-hero-inner { grid-template-columns:minmax(0,1fr); gap:24px; }
 .member-learning-card { display:block; width:100%; }
 .watch-shell { grid-template-columns:minmax(0,1fr); }
 .watch-stage.playleft,.study-side.playside { width:100%; float:none; }
 .course-detail-layout,.lesson-content-shell { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:760px) {
 .course-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .course-hero-card { grid-template-columns:minmax(0,1fr); }
 .filter-line { grid-template-columns:minmax(0,1fr); gap:6px; }
 .course-tools { width:100%; }
 .course-search { flex:1 1 180px; }
 .lesson-context { grid-template-columns:minmax(0,1fr); padding:12px 0; }
 .lesson-context .context-status { margin-left:0; }
 .watch-stage { grid-template-rows:auto minmax(210px,auto) auto; }
 .lesson-titlebar,.watch-footer { padding:12px; gap:10px; }
 .lesson-titlebar { flex-wrap:wrap; }
 .watch-shell,.lesson-content-shell { width:calc(100% - 24px); }
 .member-learning-card ul { grid-template-columns:minmax(0,1fr); }
 .member-learning-card>a { width:100%; }
 .below-tabs { display:flex; flex-wrap:wrap; }
}
@media(max-width:420px) {
 .course-grid { grid-template-columns:minmax(0,1fr); }
 .hero-copy h1 { font-size:32px; }
}
