/* Keep the approved header controls while letting the brand fit narrow phones. */
@media (max-width:375px){
  html body:is(#oniks-home.home-cockpit,.subpage) #hdr>.wrap{
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding-left:10px!important;
    padding-right:10px!important;
    gap:8px!important;
  }
  html body:is(#oniks-home.home-cockpit,.subpage) #hdr .logo.header-brand{
    display:flex!important;
    align-items:center!important;
    flex:0 1 auto!important;
    width:min(125px,calc(100% - 170px))!important;
    min-width:0!important;
    max-width:min(125px,calc(100% - 170px))!important;
    min-height:44px!important;
    padding:0!important;
  }
  html body:is(#oniks-home.home-cockpit,.subpage) #hdr .logo.header-brand>img{
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    max-height:38px!important;
    object-fit:contain!important;
  }
  html body:is(#oniks-home.home-cockpit,.subpage) #hdr .hdr-right{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    gap:8px!important;
  }
}

/* The video controller removes failed/static media; retain its poster beneath the existing overlay. */
/* Restore native dialog centering after the site's global margin reset. */
.horizon-page dialog#catalog-dialog{margin:auto}

html body#oniks-home.home-cockpit section#top.hero:is(.video-static,.video-failed){
  background-image:url('/hero-poster-v131.jpg')!important;
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
}
@media (max-width:699px),(max-width:1024px) and (orientation:portrait){
  html body#oniks-home.home-cockpit section#top.hero:is(.video-static,.video-failed){
    background-image:url('/hero-poster-mobile-v131.jpg')!important;
  }
}
