/* Preserve the picture's proportions; unused theatre space stays black. */
.provider-fallback { position:absolute; bottom:8px; right:8px; z-index:11; padding:10px 12px; background:#151e2ef2; border:1px solid #526781; border-radius:6px; color:#dce9ff; font-size:11px; line-height:1.5; max-width:calc(100% - 16px); text-decoration:none; }
.provider-fallback[hidden], .discovery-provider-link[hidden] { display:none; }
.provider-fallback:focus-visible, .discovery-provider-link:focus-visible { outline:2px solid #b4d1ff; outline-offset:2px; }
.discovery-provider-link { display:block; padding:10px 0; color:#b4d1ff; font-size:12px; }
@media(pointer:coarse) { .provider-fallback, .discovery-provider-link { min-height:44px; } }
html, body.game-view, body.game-view .video-tile, body.game-view .tile-player-container { background:#000; }
body.game-view .tile-player-container { container-type:size; }
body.game-view .tile-player-container iframe {
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:min(100%,177.7778cqh); height:min(100%,56.25cqw); background:#000; color-scheme:normal;
}
body.game-view .tile-player-container video { object-fit:contain; background:#000; }
body.game-view .primary-nav { scrollbar-width:thin; overscroll-behavior-x:contain; }
body.game-view #wall-mode-pill { display:none; }
body.game-view.wall-mode #wall-mode-pill { display:block; opacity:1; transform:translateX(-50%); top:max(10px,env(safe-area-inset-top)); min-height:44px; color:#e0eaff; border-color:#526781; }
body.game-view .modal-card, body.game-view .drawer { overscroll-behavior:contain; }
@media(pointer:coarse) {
  button, a, input, select { touch-action:manipulation; }
  body.game-view .hud-btn { width:40px; height:40px; }
  body.game-view .tile-hud { padding:4px 8px; }
  .modal-close, .drawer-close, .day-button, .sport-pill, .cat-pill { min-height:44px; min-width:44px; }
}
@media(max-width:640px) {
  body.game-view { height:100dvh; }
  body.game-view #top-bar { height:auto; min-height:104px; padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left)); }
  body.game-view .primary-nav { height:44px; gap:20px; justify-content:flex-start; width:100%; scrollbar-width:none; }
  body.game-view .primary-nav .nav-item { font-size:12px; min-height:44px; }
  body.game-view #btn-add-stream, body.game-view #btn-open-settings { min-height:44px; }
  body.game-view .profile-mark { display:none; }
  body.game-view .viewing-toolbar { flex-wrap:wrap; padding:4px 8px; gap:2px; }
  body.game-view .layout-tools { flex-basis:100%; width:100%; }
  body.game-view .layout-selector { width:100%; overflow-x:auto; }
  body.game-view .layout-btn { min-height:44px; padding:8px 12px; }
  body.game-view .viewing-actions { width:100%; justify-content:flex-end; }
  body.game-view .viewing-actions .action-btn, body.game-view .btn-icon { min-width:44px; min-height:44px; }
  body.game-view .viewing-actions #btn-wall-mode { width:auto; padding:8px 12px; }
  body.game-view .viewing-actions #btn-wall-mode span { display:inline; }
  body.game-view .tile-hud { flex-wrap:wrap; }
  body.game-view .hud-left { flex-basis:100%; overflow:hidden; }
  body.game-view .hud-right { flex-wrap:nowrap; max-width:100%; overflow-x:auto; }
  body.game-view .hud-btn { flex-shrink:0; }
  body.game-view .hud-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.game-view .modal-overlay { padding:8px; }
  body.game-view .modal-card, body.game-view .modal-card.wide { width:100%; max-width:100%; max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  body.game-view input, body.game-view select, body.game-view textarea { font-size:16px!important; }
  body.game-view .btn, body.game-view .btn-full { min-height:44px; }
  body.game-view .discovery-game { flex-wrap:wrap; gap:10px; }
  body.game-view .discovery-game>div { flex:1 1 200px; }
  body.game-view .discovery-game strong { font-size:14px; }
  body.game-view .discovery-game p { font-size:12px; line-height:1.5; }
  body.game-view .discovery-days select { min-height:44px; }
  body.game-view .drawer-footer { padding-bottom:max(16px,env(safe-area-inset-bottom)); }
  body.game-view #sports-ticker { padding-bottom:env(safe-area-inset-bottom); }
}
@media(max-width:640px) and (orientation:portrait) {
  body.game-view #video-matrix.layout-dual { grid-template-columns:minmax(0,1fr)!important; grid-template-rows:repeat(2,minmax(0,1fr))!important; }
  body.game-view #video-matrix.layout-grid-6 { grid-template-columns:repeat(2,minmax(0,1fr))!important; grid-template-rows:repeat(3,minmax(0,1fr))!important; }
}
@media(max-height:500px) and (orientation:landscape) {
  body.game-view #top-bar { min-height:48px; height:48px; flex-wrap:nowrap; }
  body.game-view .brand, body.game-view .header-tools { display:none; }
  body.game-view .primary-nav { width:100%; order:0; }
  body.game-view .viewing-toolbar { flex-wrap:nowrap; }
  body.game-view .layout-tools { flex-basis:auto; }
  body.game-view .viewing-actions { width:auto; }
  body.game-view #sports-ticker { display:none; }
}
