/* Kourse Platform Shell integration — global chrome belongs to Kourse Suite. */
body.km-platform-shell-active{margin:0!important;padding:0!important;min-height:100vh!important;background:var(--kms-bg,#f4f7fb)!important;overflow:hidden!important}
body.km-platform-shell-active>.kourse-platform-shell{position:relative!important;z-index:2147483647!important;flex:0 0 auto!important}
body.km-platform-shell-active>.kmn-app,
body.km-platform-shell-active>.kmn-player{position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;width:100%!important;height:calc(100vh - var(--ks-header-h,74px))!important;max-width:none!important;margin:0!important;z-index:1!important;grid-template-rows:minmax(0,1fr)!important}
body.km-platform-shell-active>.kmn-app>.kmn-shared-app-header,
body.km-platform-shell-active .kmn-shared-app-header{display:none!important}
body.km-platform-shell-active>.kmn-app .kmn-appscroll{min-height:0!important;height:100%!important;overflow:auto!important}
body.km-platform-shell-active.km-teacher-native-shell{display:flex!important;flex-direction:column!important;height:100vh!important;overflow:hidden!important}
body.km-platform-shell-active.km-teacher-native-shell>.kourse-platform-shell{width:100%!important}
body.km-platform-shell-active.km-teacher-native-shell>:not(.kourse-platform-shell):not(script):not(style):not(link){min-height:0}
/* Old fullscreen isolation must not hide the new platform header. */
body.km-platform-shell-active.kmn-native-active>*:not(.kmn-app):not(.kourse-platform-shell):not(script):not(style):not(link){display:none!important}
body.km-platform-shell-active.kmn-native-active>.kourse-platform-shell{display:block!important}
body.km-platform-shell-active.kmn-native-active>.kmn-app{position:relative!important;inset:auto!important;height:calc(100vh - var(--ks-header-h,74px))!important;z-index:1!important}
@supports(height:100dvh){body.km-platform-shell-active>.kmn-app,body.km-platform-shell-active.kmn-native-active>.kmn-app{height:calc(100dvh - var(--ks-header-h,74px))!important}}


/* v5.7.2 — Suite owns the viewport and theme whenever Mastery is in application mode. */
body.km-platform-shell-active.kmn-studio-home-active{display:flex!important;flex-direction:column!important;height:100vh!important;min-height:100vh!important;overflow:hidden!important;background:#f4f7fb!important}
body.km-platform-shell-active.kmn-studio-home-active>.kourse-platform-shell{position:relative!important;display:block!important;flex:0 0 auto!important;width:100%!important;z-index:2147483647!important}
body.km-platform-shell-active.kmn-studio-home-active>.kmn-studio-home,
body.km-platform-shell-active.kmn-studio-home-active>.ks2-app,
body.km-platform-shell-active.kmn-studio-home-active>.kmn-editor-workspace{
  position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  z-index:1!important;flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:0!important;max-width:none!important;
  margin:0!important;overflow:auto!important;
}
body.km-platform-shell-active.kmn-studio-home-active>.kmn-studio-home>.kmn-standard-app-header,
body.km-platform-shell-active .kmn-teacher-workspace>.kmn-standard-app-header{display:none!important}
body.km-platform-shell-active.kmn-studio-home-active>.kmn-studio-home>.kmn-admin-page{padding-top:32px!important}

/* The Suite theme is authoritative. Legacy Mastery theme state must not create a second theme. */
html[data-km-teacher-theme="light"] body.km-platform-shell-active .kmn-teacher-workspace{background:#f4f7fb!important;color:#15263a!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-teacher-workspace{background:#071322!important;color:#f5f8fb!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active :is(.kmn-framework-strip,.kmn-coverage-hero,.kmn-admin-panel,.kmn-framework-drawer,.kmn-teacher-mastery-coming){background:#0d2235!important;border-color:#294963!important;color:#f5f8fb!important;box-shadow:none!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-coverage-stats div,
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-update-summary div,
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-framework-actions-grid article{background:#132f47!important;color:#f5f8fb!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active :is(.kmn-admin-heading p,.kmn-coverage-copy p,.kmn-skill-map-standard span,.kmn-framework-strip span,.kmn-framework-drawer-head p){color:#9fb2c4!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active :is(.kmn-alignment-tools input,.kmn-alignment-tools select){background:#0b2134!important;color:#f4f8fc!important;border-color:#31516c!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-grade-tabs{background:#0d2237!important;border-color:#294b68!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-grade-tabs a{color:#aebfd0!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-grade-tabs a.is-active{background:#173652!important;color:#fff!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-skill-map-row{border-color:#203c53!important;color:#f5f8fb!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-coverage-ring{background:radial-gradient(circle at center,#10283d 58%,transparent 59%),conic-gradient(#5ddbd2 calc(var(--pct)*1%),#203a50 0)!important}
html[data-km-teacher-theme="dark"] body.km-platform-shell-active .kmn-coverage-ring strong{color:#f5f8fb!important}
@supports(height:100dvh){body.km-platform-shell-active.kmn-studio-home-active{height:100dvh!important;min-height:100dvh!important}}


/* v5.7.3 — Platform shell owns first paint and lesson-editor viewport. */
html[data-kourse-shell-theme="light"] body.km-platform-shell-active{--kms-bg:var(--ks-light-bg,#fff);background:var(--ks-light-bg,#fff)!important}
html[data-kourse-shell-theme="dark"] body.km-platform-shell-active{--kms-bg:var(--ks-dark-bg,#101827);background:var(--ks-dark-bg,#101827)!important}
body.km-platform-shell-active.km-teacher-native-shell>.ks2-app.kmn-editor-workspace{
  position:relative!important;inset:auto!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  flex:1 1 auto!important;width:100%!important;min-height:0!important;margin:0!important;
}
body.km-platform-shell-active .ks2-app.kmn-editor-workspace>.kmn-standard-app-header,
body.km-platform-shell-active .ks2-app.kmn-editor-workspace>[data-km-shared-header]{display:none!important}


/* v5.7.7 — final Platform editor outer-viewport ownership.
   Suite's header is rendered in normal document flow. The lesson editor itself
   is viewport-owned, so pin it to the measured shell height instead of allowing
   a relative-position top offset to add a second header-height gap. */
html body.km-platform-shell-active.km-teacher-native-shell > .ks2-app.kmn-editor-workspace.kmn-platform-editor{
  position:fixed!important;
  top:var(--ks-header-h,72px)!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  flex:none!important;
  overflow:hidden!important;
  z-index:1!important;
  grid-template-rows:58px minmax(0,1fr)!important;
}
html body.km-platform-shell-active.km-teacher-native-shell > .ks2-app.kmn-editor-workspace.kmn-platform-editor > .ks2-editorbar{grid-row:1!important}
html body.km-platform-shell-active.km-teacher-native-shell > .ks2-app.kmn-editor-workspace.kmn-platform-editor > .ks2-workspace{grid-row:2!important;min-height:0!important}
@media(max-width:760px){
  html body.km-platform-shell-active.km-teacher-native-shell > .ks2-app.kmn-editor-workspace.kmn-platform-editor{grid-template-rows:82px minmax(0,1fr)!important}
}
\n\n/* v6.5.9 — native lesson player owns the viewport.\n   Do not reserve the Suite header slot above a lesson or render two app headers. */\nbody.km-platform-shell-active.kmn-player-active>.kourse-platform-shell{display:none!important}\nbody.km-platform-shell-active.kmn-player-active>.kmn-player,\nbody.km-platform-shell-active>.kmn-player.kmn-standard-player{\n  position:fixed!important;inset:0!important;top:0!important;right:0!important;bottom:0!important;left:0!important;\n  width:100vw!important;height:100vh!important;max-width:none!important;margin:0!important;z-index:2147483647!important;\n  grid-template-rows:58px minmax(0,1fr) 58px!important;\n}\n@supports(height:100dvh){body.km-platform-shell-active.kmn-player-active>.kmn-player,body.km-platform-shell-active>.kmn-player.kmn-standard-player{height:100dvh!important}}\n