/* VBA GameVision Mobile / Tablet / TV Responsive System 4.0 — Run 67 */
:root{--gvr-target:40px;--gvr-safe-x:clamp(12px,2vw,30px);--gvr-focus:#4ad8ff;--gvr-tv-inset:max(30px,2.2vw)}
body.gv-responsive-40{--gvr-stage-max:min(760px,67dvh);text-size-adjust:100%;-webkit-text-size-adjust:100%}
body.gv-responsive-40 *,body.gv-responsive-40 *:before,body.gv-responsive-40 *:after{box-sizing:border-box}

/* Every input mode gets an obvious focus state. On TV/remote it becomes intentionally stronger. */
body.gv-responsive-40 :where(a,button,input,[tabindex]):focus-visible{outline:2px solid var(--gvr-focus)!important;outline-offset:3px!important;box-shadow:0 0 0 4px rgba(38,201,255,.16),0 0 24px rgba(38,201,255,.24)!important}
body.gv-responsive-40.gv-remote-ready :where(a,button,[tabindex]):focus-visible{outline-width:3px!important;outline-offset:5px!important;transform:translateY(-1px);z-index:20}
body.gv-responsive-40.gv-coarse-ui :where(button,.btn,.gvh-btn,.gvh-rail-btn,.gv-network-nav a){min-height:var(--gvr-target)}
body.gv-responsive-40.gv-touch-ui{-webkit-tap-highlight-color:rgba(38,201,255,.16)}

/* Viewport/court sizing: protect controls first, then give the court everything left. */
body.gv-responsive-40.gv-game-view:not(.gv-device-phone) svg.court{max-height:var(--gvr-stage-max)!important}
body.gv-responsive-40.gv-screen-short.gv-game-view{--gvr-stage-max:max(330px,calc(100dvh - 205px))}
body.gv-responsive-40.gv-screen-short.gv-game-view .title{margin-bottom:4px!important}
body.gv-responsive-40.gv-screen-short.gv-game-view .gv-livebar{margin-bottom:4px!important}
body.gv-responsive-40.gv-screen-short.gv-game-view .stage{margin-top:6px!important}
body.gv-responsive-40.gv-screen-short.gv-game-view .court-card .hd{min-height:26px!important;margin-bottom:3px!important}

/* Tablet: stop squeezing the court beside a desktop rail. Information follows the game. */
body.gv-responsive-40.gv-device-tablet.gv-game-view:not(.gv-channel-view) .stage{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
body.gv-responsive-40.gv-device-tablet.gv-game-view:not(.gv-channel-view) .fan-panel{width:100%!important;max-height:250px!important;overflow:auto!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
body.gv-responsive-40.gv-device-tablet.gv-game-view:not(.gv-channel-view) .fan-panel>*{min-width:0}
body.gv-responsive-40.gv-device-tablet.gv-game-view .court-card{max-width:none!important}
body.gv-responsive-40.gv-device-tablet.gv-orientation-landscape.gv-game-view{--gvr-stage-max:min(68dvh,720px)}
body.gv-responsive-40.gv-device-tablet.gv-orientation-portrait.gv-game-view{--gvr-stage-max:min(48dvh,610px)}

/* Phone landscape: true player canvas, notch-safe score and controls, never a shrunken desktop. */
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .board{left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;top:max(6px,env(safe-area-inset-top))!important}
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .court-card>.controls.gv-viewer-controls{left:max(7px,env(safe-area-inset-left))!important;right:max(7px,env(safe-area-inset-right))!important;bottom:max(6px,env(safe-area-inset-bottom))!important}
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .gvpc-main{width:100%;overflow:hidden}
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .gvpc-left,body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .gvpc-right{flex:0 1 auto}
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .gvpc-btn,body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .gvpc-main .btn{min-width:36px!important;width:auto;min-height:36px!important;height:36px!important}
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-game-view .gvpc-play{min-width:44px!important;width:44px!important}
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-screen-short.gv-game-view .board{height:44px!important;min-height:44px!important}
body.gv-responsive-40.gv-device-phone.gv-orientation-landscape.gv-screen-short.gv-game-view .gvpc-more{max-height:58dvh}

/* Narrow landscape phones prioritize watch controls. The volume slider already collapses in Run 66. */
@media(max-width:640px) and (orientation:landscape){
  body.gv-responsive-40.gv-device-phone .gvpc-left,body.gv-responsive-40.gv-device-phone .gvpc-right{gap:3px!important}
  body.gv-responsive-40.gv-device-phone .gvpc-btn,body.gv-responsive-40.gv-device-phone .gvpc-main .btn{padding-inline:7px!important}
  body.gv-responsive-40.gv-device-phone .gvpc-edge{font-size:7px!important;min-width:39px!important}
  body.gv-responsive-40.gv-device-phone .gvpc-more{width:min(410px,78vw)!important}
}

/* Network home and shelves: swipe on touch, four-across breathing room on desktop/TV. */
body.gv-responsive-40 .gvh-rail{scroll-snap-type:x mandatory;scroll-padding-inline:4px;-webkit-overflow-scrolling:touch}
body.gv-responsive-40 .gvh-card{scroll-snap-align:start}
body.gv-responsive-40.gv-touch-ui .gvh-rail-btn{display:none!important}
body.gv-responsive-40.gv-device-tablet .gvh-rail{grid-auto-columns:minmax(260px,43vw)!important}
body.gv-responsive-40.gv-device-tablet .gvh-hero{min-height:390px}
body.gv-responsive-40.gv-device-tablet .gvh-hero-copy{padding-left:28px;padding-right:28px}

/* TV / large-screen safe title area. Works for 1080p and 4K CSS viewports without scaling the court absurdly. */
body.gv-responsive-40.gv-screen-tv{--gvr-stage-max:min(70dvh,900px)}
body.gv-responsive-40.gv-screen-tv .gv-network-header{padding-left:var(--gvr-tv-inset)!important;padding-right:var(--gvr-tv-inset)!important;min-height:64px}
body.gv-responsive-40.gv-screen-tv:not(.vba-tonight):not(.vba-library) .wrap{padding-left:var(--gvr-tv-inset)!important;padding-right:var(--gvr-tv-inset)!important}
body.gv-responsive-40.gv-screen-tv.gv-game-view .court-card>.controls.gv-viewer-controls{left:var(--gvr-tv-inset)!important;right:var(--gvr-tv-inset)!important;bottom:max(18px,2vh)!important}
body.gv-responsive-40.gv-screen-tv.gv-game-view .board{margin-left:max(10px,1vw)!important;margin-right:max(10px,1vw)!important}
body.gv-responsive-40.gv-screen-tv .gvpc-btn,body.gv-responsive-40.gv-screen-tv .gvpc-main .btn{min-height:44px!important;height:44px!important;min-width:44px!important;font-size:12px!important}
body.gv-responsive-40.gv-screen-tv .gvpc-play{min-width:54px!important;width:54px!important;font-size:19px!important}
body.gv-responsive-40.gv-screen-tv .gvpc-volume-wrap{height:44px}.gv-screen-tv .gvpc-volume{width:84px}
body.gv-responsive-40.gv-screen-tv .gvpc-seek::-webkit-slider-thumb{width:18px;height:18px;margin-top:-7px}.gv-screen-tv .gvpc-seek::-moz-range-thumb{width:16px;height:16px}
body.gv-responsive-40.gv-screen-tv.vba-library>.wrap{max-width:1760px!important;padding-left:var(--gvr-tv-inset)!important;padding-right:var(--gvr-tv-inset)!important}
body.gv-responsive-40.gv-screen-tv .gvh-hero{min-height:450px;border-radius:20px}.gv-screen-tv .gvh-hero-copy{min-height:450px;padding-left:52px}.gv-screen-tv .gvh-rail{grid-auto-columns:minmax(290px,24%)!important;gap:14px}.gv-screen-tv .gvh-card{min-height:190px}.gv-screen-tv .gvh-game-card{min-height:205px}.gv-screen-tv .gvh-program-card{min-height:210px}
body.gv-responsive-40.gv-screen-tv .gvh-shelf-title h2{font-size:28px}.gv-screen-tv .gvh-view-all{font-size:11px}

/* Ultra-wide screens keep the action centered rather than stretching the UI into the corners. */
body.gv-responsive-40.gv-screen-wide:not(.gv-device-phone) .gv-network-header{padding-inline:max(28px,4vw)}
body.gv-responsive-40.gv-screen-wide.vba-library>.wrap{max-width:1800px!important}
body.gv-responsive-40.gv-screen-wide.gv-game-view:not(.gv-channel-view) .wrap{max-width:1680px!important;margin-inline:auto!important}

/* VBA Tonight / channel responsive cleanup. Secondary rails yield before program video does. */
body.gv-responsive-40.gv-device-tablet.vba-tonight .show-shell,body.gv-responsive-40.gv-device-tablet.vba-tonight .vba-tonight-layout{max-width:100%!important}
body.gv-responsive-40.gv-screen-short.vba-tonight .show-sidebar,body.gv-responsive-40.gv-screen-short.vba-tonight .show-rail{max-height:calc(100dvh - 130px)!important;overflow:auto}
body.gv-responsive-40.gv-screen-tv.vba-tonight{padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}

/* TV/remote browse interaction: make cards/buttons readable from couch distance. */
body.gv-responsive-40.gv-remote-ready :where(.gvh-card,.gv-program-card,.gv-network-tile,.gvh-btn,.gv-network-nav a){cursor:default}
body.gv-responsive-40.gv-remote-ready .gvh-card:focus-visible,body.gv-responsive-40.gv-remote-ready .gv-program-card:focus-visible,body.gv-responsive-40.gv-remote-ready .gv-network-tile:focus-visible{border-color:#61e2ff!important;box-shadow:0 0 0 3px rgba(38,201,255,.22),0 18px 46px rgba(0,0,0,.46)!important}
body.gv-responsive-40.gv-remote-ready .gv-network-nav a{padding-inline:4px}

/* Keep browser chrome and safe areas from clipping bottom navigation on touch devices. */
body.gv-responsive-40.gv-touch-ui .bottom-nav{padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
body.gv-responsive-40.gv-touch-ui .gv-network-header{padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}

@media(prefers-reduced-motion:reduce){body.gv-responsive-40 *{scroll-behavior:auto!important}.gv-responsive-40 :where(a,button,[tabindex]):focus-visible{transition:none!important}}
