/* VBA GameVision Desktop Spacing & Replay Theater Optimization 4.0 — Run 75
   Desktop-only flow reset. The page may scroll; the court is never compressed to satisfy viewport chrome. */
:root{
  --gv75-shell-max:1680px;
  --gv75-player-max:1560px;
  --gv75-page-x:clamp(18px,2.4vw,38px);
  --gv75-page-bottom:84px;
  --gv75-stack-gap:18px;
}

/*
 * Runs 5.4 / 8.7 intentionally made the entire desktop broadcast fit one viewport.
 * That was useful before the premium controls + Game Center existed, but it now
 * compresses the replay surface. Run 75 restores a document-flow desktop page.
 */
@media (min-width:1001px){
  html:has(body.gv-desktop-spacing-40),
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed){
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
  }

  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed)>.wrap{
    display:block!important;
    width:min(100%,var(--gv75-shell-max))!important;
    max-width:var(--gv75-shell-max)!important;
    height:auto!important;
    min-height:calc(100vh - 58px)!important;
    margin:0 auto!important;
    padding:22px var(--gv75-page-x) var(--gv75-page-bottom)!important;
    overflow:visible!important;
  }

  /* Let the network breathe vertically instead of packing every strip into one viewport. */
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .gv-livebar{
    min-height:46px!important;
    margin:0 0 14px!important;
    padding:10px 13px!important;
  }
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .board{
    min-height:94px!important;
    margin:0!important;
    padding:11px 20px!important;
    border-radius:14px!important;
  }
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .logo{
    width:50px!important;
    height:50px!important;
    border-radius:10px!important;
  }
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .team .city{font-size:11px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .team .name{font-size:24px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .score{font-size:58px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .center{min-width:142px!important;gap:3px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .clock{font-size:36px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .qtr{font-size:10px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .bug{font-size:9px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .wp{height:10px!important;margin-top:10px!important}
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .wp-l{font-size:9px!important;line-height:16px!important;margin-top:3px!important}

  /*
   * Run 68 moves #fanPanel into Game Center. The old two-column stage must no
   * longer reserve 300-350px beside the player. Even if that move is delayed,
   * stacking the information panel below the game is safer than squeezing it.
   */
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .stage{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:var(--gv75-stack-gap) auto 0!important;
    overflow:visible!important;
  }

  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .court-card{
    display:block!important;
    width:min(100%,var(--gv75-player-max))!important;
    max-width:var(--gv75-player-max)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    margin:0 auto!important;
    padding:12px 12px 82px!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .court-card .hd{
    height:auto!important;
    min-height:34px!important;
    margin:0 4px 9px!important;
  }
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) svg.court{
    position:relative!important;
    inset:auto!important;
    display:block!important;
    grid-row:auto!important;
    flex:none!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0 auto!important;
    border-radius:10px!important;
    object-fit:contain!important;
  }

  /* The premium transport remains inside the player, but no viewport sizing may crush it. */
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .court-card>.controls.gv-viewer-controls{
    left:14px!important;
    right:14px!important;
    bottom:14px!important;
    min-height:52px!important;
    max-height:none!important;
    margin:0!important;
  }

  /* Legacy information panels, if present before/without Game Center, flow below the player. */
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) .stage>.fan-panel{
    width:min(100%,var(--gv75-player-max))!important;
    height:auto!important;
    min-height:320px!important;
    max-height:560px!important;
    margin:18px auto 0!important;
    overflow:auto!important;
  }

  /* Game Center sidecar gets its own space; it may narrow the shell, but never impose a vh cap. */
  body.gv-desktop-spacing-40.gv-info-open:not(.theater):not(.vba-channel-embed) .court-card,
  body.gv-desktop-spacing-40.gv-info-open:not(.theater):not(.vba-channel-embed) svg.court{
    max-height:none!important;
  }

  /* Short laptops should scroll rather than shrink the replay into a postage stamp. */
  body.gv-desktop-spacing-40.gv-screen-short:not(.theater):not(.vba-channel-embed)>.wrap{
    min-height:100%!important;
    padding-top:14px!important;
  }
  body.gv-desktop-spacing-40.gv-screen-short:not(.theater):not(.vba-channel-embed) .stage{margin-top:12px!important}
  body.gv-desktop-spacing-40.gv-screen-short:not(.theater):not(.vba-channel-embed) .court-card{max-height:none!important}
  body.gv-desktop-spacing-40.gv-screen-short:not(.theater):not(.vba-channel-embed) svg.court{max-height:none!important}

  /* Keep browser-page scrolling natural when focus moves through player controls. */
  body.gv-desktop-spacing-40:not(.theater):not(.vba-channel-embed) :where(.court-card,.stage,.wrap){overscroll-behavior:auto!important}
}

/* Theater remains intentionally immersive and viewport-locked. */
body.gv-desktop-spacing-40.theater{overflow:hidden!important}

@media (min-width:1500px){
  :root{--gv75-player-max:1600px;--gv75-shell-max:1740px}
}

@media (prefers-reduced-motion:reduce){
  body.gv-desktop-spacing-40{scroll-behavior:auto!important}
}
