/* R365 Home + Search catalog paint only.
   Existing hero/brand/art, responsive card dimensions, favorite order,
   native scroll, 44px controls and intentional zoom remain unchanged.
   Static cyan edges and blue depth; no new motion, filters or content.
   Forced colors inherit the accepted R364/R363 system-color rules. */
@media(forced-colors:none) {
  html body.home-page[data-ui-layout]:has(#game-search-panel):has(#catalog-scroll) {
    background:radial-gradient(ellipse at 50% 0,#10334d66,transparent 64%),#061222!important;
    color:#f2f8ff!important;
  }
  html body.home-page[data-ui-layout]:has(#catalog-scroll) .promo-inner {
    background:#071c30!important;border-color:#2d6a85!important;
    box-shadow:inset 0 1px 0 #37ddff24,0 8px 22px #01091666!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) .catalog:has(#catalog-scroll) {
    background:linear-gradient(155deg,#0d2941,#0b1f35 65%,#08192d)!important;
    border-color:#2c657f!important;
    box-shadow:inset 0 1px 0 #37ddff29,0 8px 22px #020a173d!important;
  }
  html body.home-page[data-ui-layout]:has(#catalog-scroll) #game-search-panel > .search-heading {
    background:#081e34!important;border-color:#2b6c88!important;
    box-shadow:inset 0 1px 0 #37ddff1f!important;
  }
  html body.home-page[data-ui-layout]:has(#catalog-scroll) #game-search-panel :is(.ticker-window,.ticker-track) {
    color:#afcce1!important;
  }
  html body.home-page[data-ui-layout]:has(#catalog-scroll) #game-search-panel > #ht-catalog-search-open-r324 {
    background:linear-gradient(145deg,#155575,#12364f)!important;
    border-color:#37ddff!important;color:#e9fbff!important;
    box-shadow:inset 0 1px 0 #a9f4ff33,0 3px 10px #010c194d!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll {
    scrollbar-color:#258ba8 #081d32!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll::-webkit-scrollbar-track {
    background:#081d32!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll::-webkit-scrollbar-thumb {
    background:#258ba8!important;border-color:#081d32!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-card-r324 > a.game {
    background:linear-gradient(145deg,#143a58,#102f4a 55%,#0a2038)!important;
    border-color:#2e7897!important;color:#f2f8ff!important;
    box-shadow:inset 0 1px 0 #37ddff52,inset 0 -1px 0 #030e2373,0 5px 13px #010a184d!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll a.game .app-icon-frame {
    background:#08223a!important;border-color:#3886a1!important;
    box-shadow:0 0 0 1px #37ddff1f!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-name-r359 {
    color:#f2f8ff!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-region-r359 {
    color:#9db6d1!important;
  }

  /* Search stays its existing full-screen/desktop dialog and scrollport. */
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) {
    background:linear-gradient(155deg,#0b233b,#07182b 70%)!important;
    color:#f2f8ff!important;border-color:#367d98!important;
    box-shadow:inset 0 1px 0 #37ddff26,0 18px 48px #010a1773!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) #ht-catalog-search-title-r324 {
    color:#f2f8ff!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-field-r324 {
    background:#061728!important;border-color:#2e83a2!important;
    box-shadow:inset 0 1px 0 #37ddff1f!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-field-r324 > svg {
    color:#37ddff!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) #ht-catalog-query-r324 {
    color:#f2f8ff!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) #ht-catalog-query-r324::placeholder {
    color:#9db6d1!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) :is(.ht-search-back-r324,.ht-search-clear-r324) {
    background:#102f4a!important;color:#d5f7ff!important;border-color:#2f718b!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-tabs-r324 {
    border-color:#245470!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-tab-r324 {
    background:#0b2238!important;border-color:#245776!important;color:#afcbe2!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-tab-r324[aria-selected="true"] {
    background:#124d69!important;border-color:#37ddff!important;color:#ecfcff!important;
    box-shadow:inset 0 1px 0 #a9f4ff26!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) :is(.ht-search-summary-r324,.ht-search-empty-r324,.ht-search-hint-r324) {
    color:#9db6d1!important;border-color:#245470!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-game-r324 {
    background:linear-gradient(145deg,#143a58,#102f4a 55%,#0a2038)!important;
    border-color:#2e7897!important;color:#f2f8ff!important;
    box-shadow:inset 0 1px 0 #37ddff52,inset 0 -1px 0 #030e2373,0 5px 13px #010a184d!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-game-r324 > b {
    color:#f2f8ff!important;
  }
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-catalog-region-r359 {
    color:#9db6d1!important;
  }

  /* Existing favorite badge/18px vector/44px hit area: paint only. */
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-favorite-r324,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-catalog-favorite-r324 {
    color:#d3ecff!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-favorite-r324::before,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-catalog-favorite-r324::before {
    background:#06192bf0!important;border-color:#568ba4!important;
    box-shadow:inset 0 1px 0 #c6f4ff1f,0 2px 5px #01091666!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-favorite-r324 > svg,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-catalog-favorite-r324 > svg {
    fill:none!important;stroke:currentColor!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-favorite-r324[aria-pressed="true"],
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-catalog-favorite-r324[aria-pressed="true"] {
    color:#ffe18c!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-favorite-r324[aria-pressed="true"]::before,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-catalog-favorite-r324[aria-pressed="true"]::before {
    background:#302916!important;border-color:#e1c77c!important;
    box-shadow:inset 0 1px 0 #fff1b533,0 2px 6px #01091666!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-favorite-r324[aria-pressed="true"] > svg,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-catalog-favorite-r324[aria-pressed="true"] > svg {
    fill:currentColor!important;
  }
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll :is(a.game,.ht-catalog-favorite-r324):focus-visible,
  html body.home-page[data-ui-layout]:has(#catalog-scroll) #game-search-panel > #ht-catalog-search-open-r324:focus-visible,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) :is(button,input,a):focus-visible {
    outline-color:#92edff!important;
  }
}
@media(hover:hover) and (pointer:fine) and (forced-colors:none) {
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-card-r324 > a.game:hover,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-game-r324:hover {
    background:linear-gradient(145deg,#154761,#10334f)!important;
    border-color:#37ddff!important;
    box-shadow:inset 0 1px 0 #92edff66,0 5px 15px #01091666!important;
  }
  html body.home-page[data-ui-layout]:has(#catalog-scroll) #game-search-panel > #ht-catalog-search-open-r324:hover {
    background:linear-gradient(145deg,#1a6382,#12445e)!important;border-color:#92edff!important;
  }
}
@media(forced-colors:none) {
  html body.home-page[data-ui-layout]:has(#game-search-panel) #catalog-scroll .ht-catalog-card-r324 > a.game:active,
  html body[data-ui-layout] dialog#ht-catalog-search-r324:has(#ht-catalog-search-title-r324) .ht-search-game-r324:active {
    background:linear-gradient(145deg,#10344f,#0b243d)!important;border-color:#92edff!important;
  }
}
