/* Phase 13 final visual repair. No media engine, service navigation or Home markup changes. */
html[data-mx11-active] body:not(.mxso-home) #app>#mx11Header {border-radius:16px!important;border:1px solid #253543!important;min-width:0!important;margin-block:8px!important;}
/* Older page-title grids retain a 48px column after the global X hides the original button. */
html[data-mx11-active] body:not(.mxso-home,.video-playback-active) #app #page :is(.page-title,.xtra-page-title,.media-native-head):has(> :is([data-mx11-suppressed],[data-mx-page-x-duplicate])),
html[data-mx11-active] body:not(.mxso-home,.video-playback-active) #app #page :is(.page-title,.xtra-page-title,.media-native-head):not(:has(> :is(button,a))) {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;margin-block:0 8px!important;padding-block:0!important;}
html[data-mx11-active] body:not(.mxso-home,.video-playback-active) #app #page :is(.page-title,.xtra-page-title,.media-native-head)>div {grid-column:1/-1!important;width:100%!important;max-width:100%!important;min-width:0!important;}
html[data-mx11-active] body:not(.mxso-home,.video-playback-active) #app #page :is(.page-title,.media-native-head,.media-detail-copy) :is(h1,h2) {writing-mode:horizontal-tb!important;word-break:normal!important;overflow-wrap:break-word!important;white-space:normal!important;max-width:100%!important;}
/* Exact duplicate semantic heading remains in DOM for assistive technology. */
html[data-mx11-active] body:not(.mxso-home) #app #page [data-mx114-duplicate-title] {position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;max-width:1px!important;max-height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;margin:-1px!important;padding:0!important;border:0!important;}
html[data-mx11-active] body:not(.mxso-home) #app #page :is([data-mx11-suppressed],[data-mx-page-x-duplicate]) {display:none!important;pointer-events:none!important;}
/* Remove only the Marketplace outer canvas, not cards, fields or buttons. */
html[data-mx11-active] body.market-route #app #page:has(.market-v2),
html[data-mx11-active] body.market-route #app #page .market-v2,
html[data-mx11-active] body.market-route #app #page .market-v2-top {background:transparent!important;box-shadow:none!important;}
html[data-mx11-active] body.market-route #app #page .market-v2 {min-width:0!important;max-width:100%!important;padding-top:12px!important;}
html[data-mx11-active] body.market-route #app #page .market-v2-top {min-width:0!important;max-width:100%!important;gap:14px!important;}
html[data-mx11-active] body.market-route #app #page .market-v2-brand:has([data-mx114-duplicate-title]) {min-width:0!important;}
html[data-mx11-active] body.market-route #app #page .market-v2-brand:has([data-mx114-duplicate-title]) .market-v2-cart {display:none!important;}
html[data-mx11-active] body.market-route #app #page .market-v2-brand p {margin:0!important;max-width:none!important;}
@media(min-width:900px){html[data-mx11-active] body.market-route #app #page .market-v2-top {grid-template-columns:minmax(160px, .65fr) minmax(0, 1.35fr) minmax(145px,170px)!important;}}
@media(max-width:899px){html[data-mx11-active] body.market-route #app #page .market-v2-top {grid-template-columns:minmax(0,1fr)!important;}}
/* TV detail card stays in the existing responsive layout, with no collapsed title column. */
html[data-mx11-active] body:not(.video-playback-active) #app #page:has(#videoMyList) .flutter-media-detail {min-width:0!important;min-height:0!important;height:auto!important;max-width:100%!important;}
html[data-mx11-active] body:not(.video-playback-active) #app #page:has(#videoMyList) .media-detail-copy {width:100%!important;min-width:0!important;}
/* One actual bottom bar is selected by the existing providers. Emergency reuse of
   original main nav ONLY if no normal provider is visible. Not shown on auth/video. */
html[data-mx13-fallback="1"] body #bottomNav:not(#mx-phase3-unused-a):not(#mx-phase3-unused-b):not(#mx-phase3-unused-c):not(#mx13-unused) {display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;position:fixed!important;inset:auto auto max(8px,env(safe-area-inset-bottom,0px)) 50%!important;transform:translateX(-50%)!important;box-sizing:border-box!important;width:min(560px,calc(100vw - 24px))!important;max-width:none!important;min-width:0!important;height:76px!important;min-height:76px!important;max-height:76px!important;margin:0!important;padding:5px!important;justify-content:space-around!important;align-items:stretch!important;gap:0!important;border-radius:24px!important;border:1px solid #273344!important;background:#0b121a!important;z-index:2147483000!important;}
html[data-mx13-fallback="1"] body #bottomNav>a {display:flex!important;visibility:visible!important;flex:1 1 0!important;min-width:0!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:4px!important;color:#a9acb8!important;font-size:11px!important;}
html[data-mx13-fallback="1"] body #bottomNav>a.active {color:#ff2675!important;}
html[data-mx13-fallback="1"] body #bottomNav>a :is(.flutter-nav-icon,small,svg) {visibility:visible!important;display:block!important;}
html[data-mx13-fallback="1"][data-mx-unified-nav-hidden="1"] body #bottomNav {transform:translate3d(-50%,calc(100% + 24px + env(safe-area-inset-bottom,0px)),0)!important;visibility:hidden!important;pointer-events:none!important;}
/* Reserve scrollable space for fixed overlays; mobile shell already has a nav lane. */
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) {padding-bottom:var(--mx13-page-clearance,116px)!important;scroll-padding-bottom:var(--mx13-page-clearance,116px)!important;min-width:0!important;}
html[data-mx13-clearance] body:not(.auth-route,.video-playback-active) #app #page > :is(.mxso-page,.mxss-screen,.market-v2) {box-sizing:border-box!important;max-width:100%!important;min-width:0!important;}

html[data-mx11-active] body:not(.video-playback-active) #app #page > .page-title[data-mx13-redundant-detail] {position:absolute!important;clip-path:inset(50%)!important;width:1px!important;height:1px!important;min-height:0!important;max-height:1px!important;min-width:0!important;max-width:1px!important;overflow:hidden!important;padding:0!important;margin:0!important;border:0!important;pointer-events:none!important;}


/* PHASE13_TV_DETAIL_FINAL_V2 */

html[data-mx11-active]
body:not(.video-playback-active,.auth-route,.mxso-home)
#app:has(> #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(> #mx11Header:not([hidden]))
> #page:has(> .flutter-media-detail #videoMyList)
> .flutter-media-detail {
    margin-top: 0 !important;
    min-width: 0 !important;
}
