/* NIGHTSHOT V6.07 — desktop visual language on every device, responsive only */
html,body{max-width:100%;overflow-x:clip}
body{min-width:0}
.ns-app-bottom-nav,.ns-native-toolbar,.ns-native-search,.ns-global-search-trigger{display:none!important}

/* Header: stable desktop grid */
.ns-global-header{overflow:visible!important}
.ns-mainbar{
  display:grid!important;
  grid-template-columns:minmax(150px,220px) minmax(0,1fr) minmax(300px,440px)!important;
  grid-template-areas:"brand nav search"!important;
  align-items:center!important;
  gap:clamp(16px,2vw,34px)!important;
  width:min(100%,1480px)!important;
  margin-inline:auto!important;
}
.ns-global-brand{grid-area:brand!important;min-width:0!important;position:relative!important;z-index:2!important}
.ns-global-brand-logo{display:block!important;width:auto!important;max-width:190px!important;max-height:46px!important;object-fit:contain!important}
.ns-global-nav{grid-area:nav!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:clamp(14px,1.35vw,28px)!important;min-width:0!important;white-space:nowrap!important}
.ns-global-nav a{flex:0 0 auto!important}
.ns-global-search{
  grid-area:search!important;
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) 72px!important;
  width:100%!important;
  min-width:300px!important;
  max-width:440px!important;
  justify-self:end!important;
}
.ns-global-search input{min-width:0!important;width:100%!important}
.ns-menu-toggle{display:none!important}
.ns-mobile-menu{display:none!important}

/* Tablet: same visual hierarchy, nav occupies its own row. */
@media (min-width:761px) and (max-width:1180px){
  .ns-mainbar{
    grid-template-columns:minmax(150px,210px) minmax(320px,1fr)!important;
    grid-template-areas:"brand search" "nav nav"!important;
    row-gap:10px!important;
  }
  .ns-global-search{width:100%!important;min-width:320px!important;max-width:560px!important}
  .ns-global-nav{flex-wrap:wrap!important;gap:8px 20px!important;white-space:normal!important}
  .ns-global-header-spacer{height:124px!important}
}

/* Mobile: same desktop components, only reflowed to fit the screen. */
@media (max-width:760px){
  html,body{height:auto!important;min-height:100%!important;overflow-y:auto!important;overscroll-behavior:auto!important}
  body{position:static!important;height:auto!important;padding-bottom:0!important;overflow-y:auto!important}
  .ns-global-header{position:sticky!important;top:0!important;height:auto!important;background:rgba(5,5,9,.94)!important;backdrop-filter:blur(18px) saturate(135%)!important;-webkit-backdrop-filter:blur(18px) saturate(135%)!important}
  .ns-mainbar{
    grid-template-columns:minmax(0,1fr) 44px!important;
    grid-template-areas:"brand toggle" "search search"!important;
    gap:9px 12px!important;
    padding:10px 14px 12px!important;
    min-height:0!important;
    height:auto!important;
  }
  .ns-global-brand{justify-self:start!important;overflow:hidden!important}
  .ns-global-brand-logo{max-width:min(48vw,170px)!important;max-height:38px!important}
  .ns-menu-toggle{grid-area:toggle!important;display:grid!important;width:44px!important;height:44px!important;justify-self:end!important;place-content:center!important}
  .ns-global-search{
    grid-area:search!important;
    display:grid!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:44px!important;
    grid-template-columns:30px minmax(0,1fr) 54px!important;
    justify-self:stretch!important;
  }
  .ns-global-search input{font-size:16px!important;min-width:0!important;width:100%!important}
  .ns-global-search button{width:54px!important;min-width:54px!important;padding:0 8px!important;font-size:.55rem!important}
  .ns-global-nav,.ns-utilitybar,.ns-tablet-utility{display:none!important}
  .ns-mobile-menu{
    position:absolute!important;
    display:block!important;
    left:10px!important;right:10px!important;top:100%!important;
    width:auto!important;max-height:min(72vh,620px)!important;overflow:auto!important;
    padding:12px!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:18px!important;
    background:rgba(10,9,14,.97)!important;box-shadow:0 24px 70px rgba(0,0,0,.55)!important;
    backdrop-filter:blur(20px)!important;-webkit-backdrop-filter:blur(20px)!important;
    z-index:30!important
  }
  .ns-mobile-menu[hidden]{display:none!important}
  .ns-mobile-menu nav{display:grid!important;gap:2px!important}
  .ns-mobile-menu nav a,.ns-mobile-utility a{padding:11px 10px!important;overflow-wrap:anywhere!important}
  .ns-global-header-spacer{display:none!important;height:0!important}
  main{position:static!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important;padding-bottom:0!important}
  .ns-site-footer{display:block!important}
  .ns-chat{bottom:max(18px,env(safe-area-inset-bottom))!important}
}

/* Never allow the brand to cover the first nav item. */
.ns-global-brand,.ns-global-brand-logo,.ns-global-nav,.ns-global-search{min-width:0}
