/* Phase 6.2: route-scoped geometry. Existing Watch/TV renderers and video engine retained.
   Phase 2 owns the regular shell, Phase 3 owns navigation, Phase 4 owns back controls.
   Experimental TV preview and unrelated dedicated video routes retain their styles. */
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen, html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv {width:100%!important;max-width:var(--mx-content-max)!important;min-width:0!important;box-sizing:border-box!important;margin-inline:auto!important;padding-inline:var(--mx-page-gutter)!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen {min-height:0!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .mx-watch-welcome {height:auto!important;min-height:62px;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .mx-watch-greeting :is(strong,small) {white-space:normal!important;overflow-wrap:anywhere;overflow:visible!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .flutter-watch-filters {max-width:100%;min-width:0;overflow-x:auto!important;overflow-y:hidden;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .flutter-watch-list {grid-template-columns:minmax(0,1fr)!important;max-width:100%!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .flutter-watch-tile {min-width:0!important;height:auto!important;grid-template-columns:clamp(44px,14vw,58px) minmax(0,1fr) 38px!important;gap:10px!important;padding:12px!important;align-items:center;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .flutter-watch-icon {width:100%!important;max-width:58px;height:auto!important;aspect-ratio:1;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .flutter-watch-copy :is(strong,small) {display:block!important;white-space:normal!important;overflow-wrap:anywhere;overflow:visible!important;-webkit-line-clamp:unset!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .flutter-watch-chevron {width:38px!important;height:38px!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-head {display:flex!important;align-items:center;gap:8px;min-width:0;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-head .media-native-head {flex:1 1 0;min-width:0;gap:8px!important;justify-content:flex-start!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .media-native-head > div {padding-right:0!important;min-width:0!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .media-native-head :is(h1,p) {white-space:normal!important;overflow-wrap:anywhere;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-header-actions {position:static!important;flex:0 0 auto;display:flex!important;gap:6px;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-header-actions > * {width:44px!important;height:44px!important;flex:0 0 44px;box-sizing:border-box;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv :is(.mx-fl-tv-category-grid,.mx-fl-tv-channel-list) {display:grid!important;width:100%!important;max-width:100%!important;min-width:0!important;margin-inline:0!important;gap:var(--mx-grid-gap)!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-category-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-channel-list {grid-template-columns:minmax(0,1fr)!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv :is(.mx-fl-tv-category,.mx-fl-tv-channel,.mx-fl-tv-selected,.mx-fl-tv-search-wrap) {box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-category {min-height:150px!important;padding:12px!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-category-top {min-width:0;gap:6px;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-category-top .mx-fl-tv-category-icon {width:clamp(40px,12vw,58px)!important;height:clamp(40px,12vw,58px)!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-chevron {flex:0 0 32px!important;width:32px!important;height:32px!important;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv :is(.mx-fl-tv-channel-info,.mx-fl-tv-selected) :is(strong,small,span), html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-category :is(strong,small) {white-space:normal!important;overflow-wrap:anywhere;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-channel-art {flex:0 0 clamp(48px,14vw,66px)!important;width:clamp(48px,14vw,66px)!important;height:auto!important;aspect-ratio:1;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-channel-play {flex:none;margin-right:0;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-selected button {flex:none;min-height:44px;}
html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-search-wrap input {min-width:0!important;max-width:100%!important;font-size:16px!important;min-height:36px;}
@media(max-width:1050px){html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen, html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv {padding-block:12px 16px!important;}}
@media(min-width:1051px){html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen, html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv {padding-block:16px 24px!important;}}
@media(max-width:479px){html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-head {flex-wrap:wrap;} html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-head .media-native-head {flex:1 1 100%;} html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-header-actions {margin-inline-start:auto;}}
@media(min-width:768px){html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .flutter-watch-screen .flutter-watch-list {grid-template-columns:repeat(2,minmax(0,1fr))!important;} html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-category-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;} html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-channel-list {grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(min-width:1200px){html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-category-grid {grid-template-columns:repeat(5,minmax(0,1fr))!important;} html body:not(.auth-route,.mx-auth-mockup,.video-playback-active,.mxso-launching,.mxtv-approved-v2):not(:has(.mx-flutter-login)) > #app.app-shell > #page.page > .mx-flutter-tv .mx-fl-tv-channel-list {grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
/* Playing Now: keep the original dedicated player and fullscreen rules. Use one scrollport,
   reserve safe areas inside it, and allow its panels to scroll below the 16:9 stage. */
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) {height:100vh!important;height:100dvh!important;min-height:0!important;max-height:none!important;overflow:hidden!important;}
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell {position:fixed!important;inset:0!important;width:100%!important;max-width:none!important;height:100vh!important;height:100dvh!important;min-height:0!important;max-height:none!important;overflow:hidden!important;padding:0!important;margin:0!important;transform:none!important;}
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell > #page.page {position:absolute!important;inset:0!important;display:block!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0 var(--mx-shell-safe-right) 0 var(--mx-shell-safe-left)!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;}
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell > #page.page > section.dedicated-video-screen.native-only-video-screen.mx-live-clean-screen:not(:fullscreen) {width:100%!important;max-width:960px!important;min-width:0!important;margin:0 auto!important;padding:max(12px,var(--mx-shell-safe-top)) var(--mx-page-gutter) calc(96px + var(--mx-shell-safe-bottom))!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;box-sizing:border-box!important;}
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell > #page.page > section.dedicated-video-screen.native-only-video-screen.mx-live-clean-screen:not(:fullscreen) .dedicated-player-title {min-width:0!important;}
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell > #page.page > section.dedicated-video-screen.native-only-video-screen.mx-live-clean-screen:not(:fullscreen) .dedicated-player-title :is(b,small,strong,span) {white-space:normal!important;overflow-wrap:anywhere;}
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell > #page.page > section.dedicated-video-screen.native-only-video-screen.mx-live-clean-screen:not(:fullscreen) .xtra-dedicated-stage:not(:fullscreen) {width:100%!important;max-width:100%!important;min-height:0!important;height:auto!important;max-height:none!important;aspect-ratio:16/9!important;}
html:not(:has(:fullscreen)) body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell > #page.page > section.dedicated-video-screen.native-only-video-screen.mx-live-clean-screen:not(:fullscreen) .mx-live-clean-btn {white-space:normal!important;overflow-wrap:anywhere;}
@media(max-width:767px){html:not(:has(:fullscreen))[data-mx-phase3="1"][data-mx-unified-nav-owner=""] body.video-playback-active:is([data-mx-route="tv"],[data-mx-route^="tv-"],[data-mx-route="watch-live-tv"],[data-mx-route^="watch-live-tv-"]):has(> #app > #page > .mx-live-clean-screen) > #app.app-shell > #page.page > section.dedicated-video-screen.native-only-video-screen.mx-live-clean-screen:not(:fullscreen) {padding-bottom:calc(24px + var(--mx-shell-safe-bottom))!important;}}
