/* Compatibility only: keep original CSS and layout where supported. */
@supports not (height:100dvh){.screen.home{--u:var(--msx-home-u)}html,body{height:100%}}
@supports not (color:color-mix(in srgb,red,white)){.neon,.panel{background-color:var(--surface);border-color:var(--primary)}.neon:focus,.neon:focus-within,.home-tools .icon-button:focus{outline:2px solid var(--secondary);background-color:var(--surface)}.screen.home .home-tools.panel,.screen.home .home-system.panel{background:#080D18;border:1px solid var(--secondary)}}

body.gtr-msx-home{background-size:100% 100%;background-position:center center}

/* UP PLAY V4: explicit remote focus, including legacy TV browsers. */
.screen.home .home-grid button.neon:focus,
.screen.home .home-grid button.neon.remote-focused:focus,
.screen.home .home-tools button.neon:focus,
.screen.home .home-system button.neon:focus {
  background: #123e78 !important;
  background: linear-gradient(145deg,#145ba6,#071d40) !important;
  border-color: #53dfff !important;
  outline: 3px solid #53dfff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 18px #009dff, inset 0 0 16px rgba(0,157,255,.55) !important;
  color: #fff !important;
  z-index: 3;
}
.screen.home button.neon:focus img {filter:brightness(0) invert(1) drop-shadow(0 0 5px #7ce8ff) !important;}
.screen.home button.neon:focus span {color:#fff !important;font-weight:700;}

/* V5: one focus ring; current category is not remote focus. */
.screen.catalog .category-row.active:not(:focus), .screen.catalog .tab.active:not(:focus), .screen.catalog .channel-row:not(:focus), .screen.catalog .poster:not(:focus) {box-shadow:none!important;outline:none!important;border-color:#526b8b!important;}
.screen.catalog .category-row.active:not(:focus), .screen.catalog .tab.active:not(:focus) {background:#152b48!important;color:#a8d3ff!important;}
.screen.catalog .neon::before, .screen.home button.neon::before {display:none!important;}
.screen.catalog .neon:not(:focus):not(:focus-within), .screen.catalog .poster:not(:focus) {outline:none!important;}
.screen.catalog button:focus, .screen.home button:focus, #modal-layer button:focus, #player-layer button:focus {outline:none!important;border-color:#55e4ff!important;box-shadow:inset 0 0 0 3px #55e4ff!important;z-index:2;}
.screen.catalog .category-row:focus,.screen.catalog .channel-row:focus,.screen.catalog .tab:focus {background:#104a83!important;color:#fff!important;}
.screen.catalog .poster:focus {box-shadow:inset 0 0 0 3px #55e4ff!important;outline:3px solid #55e4ff!important;outline-offset:-3px;}
.screen.catalog .channel-row.now-playing:not(:focus) {background:#123c32!important;border-color:#48cf91!important;}
.screen.catalog .channel-row.now-playing .channel-name::before {content:"▶ ";color:#65f5a5;}
