/* Phase 13 final visual repair. No media engine, service navigation or Home markup changes. */
html[data-mx11-active] body:not(.mxso-home) #app>#page>#mx11Header{border-radius:16px!important;border:1px solid #253543!important;min-width:0!important;margin-block:8px!important;}
/* PHASE13_TV_DETAIL_FINAL_V2 */

html[data-mx11-active]
body:not(.video-playback-active,.auth-route,.mxso-home)
#app:has(> #page > #mx11Header:not([hidden]))
> #page:has(> .flutter-media-detail #videoMyList)
> .page-title.xtra-page-title{
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
}
html[data-mx11-active]
body:not(.video-playback-active,.auth-route,.mxso-home)
#app:has(> #page > #mx11Header:not([hidden]))
> #page:has(> .flutter-media-detail #videoMyList)
> .flutter-media-detail{
    margin-top: 0 !important;
    min-width: 0 !important;
}
/* Nonsticky normal-page header: same scroller as content. No player or nav changes. */
html body #app.app-shell > #page.page > #mx11Header:not(#mx-scroll-unused) {position:relative!important;inset:auto!important;transform:none!important;top:auto!important;z-index:21;flex:none!important;box-sizing:border-box!important;min-width:0!important;max-width:100%!important;}
html body #app.app-shell > #page.page > #mx11Header[hidden] {display:none!important;}
html body #app.app-shell > #page.page .mxso-header:not(#mx-scroll-unused) {position:relative!important;inset:auto!important;transform:none!important;}
/* Constrain Home avatar despite late-injected rules. */
html body #app #page .mxso-header #mxsoAccount:not(#mx-scroll-unused),html body.mxso-home #app #page #mxsoAccount[data-mx11-avatar] {position:relative!important;display:grid!important;place-items:center!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;flex:0 0 44px!important;overflow:hidden!important;border-radius:50%!important;padding:0!important;box-sizing:border-box!important;}
html body #app #page #mxsoAccount[data-mx11-avatar] > .mx11-avatar:not(#mx-scroll-unused) {position:absolute!important;inset:0!important;width:44px!important;height:44px!important;max-width:44px!important;max-height:44px!important;object-fit:cover!important;border-radius:50%!important;}
@media(max-width:1050px){
 html[data-mx13-clearance] body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching) > #app.app-shell > #page.page:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx13-unused):not(#mx-scroll-unused) {padding-bottom:max(24px,var(--mx13-page-clearance,116px))!important;scroll-padding-bottom:max(24px,var(--mx13-page-clearance,116px))!important;}
}


/* MX_SCROLL_REPAIR_V3 */
@media (max-width:1050px){

html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):not(:has(.mx-flutter-login))
> #app.app-shell > #page.page:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx13-unused):not(#mx-scroll-unused){
    display:block!important;
    flex:1 1 0%!important;
    height:0!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    touch-action:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
}

html body.mxso-home:not(.video-playback-active,.mxso-launching)
> #app.app-shell > #page.page > .mxso-page,

html body.mxso-home:not(.video-playback-active,.mxso-launching)
> #app.app-shell > #page.page > .mxso-page .mxso-layout{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    flex:none!important;
    overflow:visible!important;
    touch-action:auto!important;
}

html body.mxso-home:not(.video-playback-active,.mxso-launching)
> #app.app-shell > #page.page > .mxso-page .mxso-header{
    position:relative!important;
    inset:auto!important;
}
}


/* MX_HOME_SCROLL_SINGLE_OWNER_V4 */
@media(max-width:1050px) {

html:has(> body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login))) {
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    overflow:hidden!important;
}

html body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login)) {
    height:100vh!important;
    height:var(--mx-shell-keyboard-height,100dvh)!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
    touch-action:auto!important;
    margin:0!important;
}

html body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login)) > #app.app-shell {
    display:flex!important;
    flex-direction:column!important;
    position:relative!important;
    inset:auto!important;
    box-sizing:border-box!important;
    height:100vh!important;
    height:var(--mx-shell-keyboard-height,100dvh)!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
    transform:none!important;
    margin:0 auto!important;
    padding:var(--mx-shell-safe-top,0px)
            var(--mx-shell-safe-right,0px)
            0 var(--mx-shell-safe-left,0px)!important;
    touch-action:auto!important;
}

html body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx13-unused):not(#mx-scroll-unused) {
    display:block!important;
    position:relative!important;
    inset:auto!important;
    flex:1 1 0%!important;
    height:0!important;
    min-height:0!important;
    max-height:none!important;
    box-sizing:border-box!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain;
    touch-action:auto!important;
    -webkit-overflow-scrolling:touch;
    transform:none!important;
    margin:0!important;
    padding-bottom:max(
        var(--mx13-page-clearance,116px),
        calc(96px + env(safe-area-inset-bottom,0px))
    )!important;
    scroll-padding-bottom:max(
        var(--mx13-page-clearance,116px),
        calc(96px + env(safe-area-inset-bottom,0px))
    )!important;
}

html body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx13-unused):not(#mx-scroll-unused) > .mxso-page,
html body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx13-unused):not(#mx-scroll-unused) > .mxso-page .mxso-layout {
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    touch-action:auto!important;
}

html body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx13-unused):not(#mx-scroll-unused) > .mxso-page .mxso-header {
    position:relative!important;
    inset:auto!important;
    transform:none!important;
    touch-action:auto!important;
}

html body.mxso-home[data-mx-route="home"]:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching):has(> #app.app-shell > #page.page > .mxso-page):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx13-unused):not(#mx-scroll-unused) > .mxso-page .mxso-header > #mxsoNotification {
    position:relative!important;
    inset:auto!important;
}

}
