/* GameVision 8.7 — Commercial LiveVision shell.
   Preserve the rich LiveVision layout; make the viewport, fullscreen and channel embed feel like television. */
:root{--gv87-control-bg:rgba(5,9,15,.88);--gv87-panel-bg:rgba(7,11,18,.97)}
html,body{max-width:100%;overflow-x:hidden}

/* Desktop: the entire broadcast fits the browser. The old stage, fan panel and controls remain intact. */
@media (min-width:900px) and (min-height:620px){
  body:not(.theater) .wrap{max-width:1480px;height:100dvh;min-height:620px;padding:10px 14px 10px;display:flex;flex-direction:column;overflow:hidden}
  body:not(.theater) .gv-livebar{flex:0 0 auto;margin-bottom:7px}
  body:not(.theater) .board{flex:0 0 auto}
  body:not(.theater) .stage{flex:1 1 auto;min-height:0;grid-template-columns:minmax(0,2.18fr) minmax(340px,.82fr);gap:10px;margin-top:8px;align-items:stretch}
  body:not(.theater) .court-card{height:100%;min-height:0;display:flex;flex-direction:column}
  body:not(.theater) .court-card svg.court{flex:1 1 auto;min-height:0;width:100%;height:auto;max-height:100%;object-fit:contain}
  body:not(.theater) .fan-panel{display:flex;min-height:0;max-height:none;height:100%}
  body:not(.theater) .controls{flex:0 0 auto;margin-top:8px;padding:7px 8px;border-radius:12px;background:var(--gv87-control-bg);backdrop-filter:blur(14px);box-shadow:0 10px 28px rgba(0,0,0,.28)}
}

/* The Live Channel uses the same rich LiveVision, not the stripped court-only embed. */
body.vba-channel-embed .wrap{max-width:none;padding:5px 7px 6px}
body.vba-channel-embed .controls{display:flex!important;margin-top:6px}
body.vba-channel-embed .fan-panel{display:flex!important}
body.vba-channel-embed .stage{margin-top:6px}
body.vba-channel-embed .gv-livebar{padding:7px 9px;margin-bottom:5px}
body.vba-channel-embed .court-card{min-height:0}
@media (min-width:900px){body.vba-channel-embed .stage{grid-template-columns:minmax(0,2.25fr) minmax(300px,.75fr)!important}}

/* Fullscreen = television. Existing scoreboard and court stay authoritative. */
body.theater{background:#020406}
body.theater .wrap{background:#020406}
body.theater .court-card{background:#020406!important}
body.theater .gv-station-bug{left:auto;right:22px;top:18px;opacity:.52;background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important;backdrop-filter:none!important;text-shadow:0 2px 9px #000,0 0 16px rgba(0,0,0,.8);font-size:9px;letter-spacing:.18em}
body.theater .gv-station-bug span{opacity:.72}
body.theater .controls{background:linear-gradient(180deg,rgba(3,6,10,.72),rgba(3,6,10,.94));border-color:rgba(255,255,255,.14);box-shadow:0 12px 40px rgba(0,0,0,.5);backdrop-filter:blur(16px)}
body.theater.gv-box-open .fan-panel{display:flex!important;position:fixed;right:16px;top:68px;bottom:82px;width:min(440px,42vw);height:auto;max-height:none;z-index:160;background:var(--gv87-panel-bg);border:1px solid color-mix(in srgb,var(--gv-station-accent,#f0bb55) 28%,rgba(255,255,255,.12));border-radius:15px;box-shadow:0 28px 70px rgba(0,0,0,.62);backdrop-filter:blur(18px)}
body.theater.gv-box-open #gvBoxScoreToggle{border-color:var(--gv-station-accent,#f0bb55);color:#fff;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--gv-station-accent,#f0bb55) 18%,transparent)}

/* Keep rich fatigue/lineup data readable without stealing the court. */
.fan-lineup-row{grid-template-columns:25px minmax(0,1fr) 76px 54px}
.fan-fatigue b{font-weight:800}
.fan-fatigue-track{height:5px}

@media(max-width:899px){
  body.vba-channel-embed .fan-panel{display:flex!important}
  body.vba-channel-embed .controls{display:flex!important;position:sticky;bottom:6px;z-index:75}
  body.theater.gv-box-open .fan-panel{right:7px;left:7px;top:auto;bottom:66px;width:auto;height:min(54dvh,470px);border-radius:15px}
}
@media(orientation:landscape) and (max-height:620px){
  body:not(.theater) .wrap{padding-top:4px}
  body:not(.theater) .gv-livebar{display:none}
  body.vba-channel-embed .fan-panel{min-width:290px}
}
