/* NearLocal authoritative mobile public shell.
   Mobile-only final lock. Desktop is intentionally untouched.
   Loaded last from index.html so route CSS cannot leak desktop presentation into mobile. */
@media (max-width:700px){
  body .directory-nav-shell{
    position:sticky!important;
    top:0!important;
    z-index:100!important;
    width:100%!important;
    height:64px!important;
    overflow:visible!important;
    background:#fff!important;
    border-bottom:1px solid #f2e2d6!important;
    box-shadow:0 2px 10px rgba(74,42,20,.04)!important;
    backdrop-filter:none!important;
  }

  body .directory-nav-shell .directory-nav{
    width:100%!important;
    max-width:none!important;
    height:64px!important;
    margin:0!important;
    padding:0 12px!important;
    display:grid!important;
    grid-template-columns:minmax(116px,auto) minmax(0,1fr) 40px!important;
    align-items:center!important;
    gap:8px!important;
    overflow:visible!important;
    background:#fff!important;
  }

  body .directory-nav-shell .directory-brand{
    grid-column:1!important;
    min-width:0!important;
    width:auto!important;
    display:inline-flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    gap:1px!important;
    overflow:visible!important;
  }
  body .directory-nav-shell .directory-brand img{
    display:block!important;
    width:124px!important;
    min-width:0!important;
    max-width:124px!important;
    height:auto!important;
    max-height:37px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }
  body .directory-nav-shell .directory-brand small{
    display:block!important;
    margin:0!important;
    color:#75685f!important;
    font-size:7.8px!important;
    line-height:1.05!important;
    font-weight:700!important;
    white-space:nowrap!important;
  }

  body .directory-nav-shell .directory-location-chip{
    grid-column:2!important;
    display:inline-flex!important;
    justify-self:end!important;
    align-items:center!important;
    width:auto!important;
    max-width:122px!important;
    min-width:0!important;
    min-height:38px!important;
    margin:0!important;
    padding:7px 9px!important;
    gap:5px!important;
    border:1px solid rgba(255,106,0,.20)!important;
    border-radius:999px!important;
    background:#fffaf5!important;
    color:#ff6a00!important;
    box-shadow:none!important;
  }
  body .directory-nav-shell .directory-location-chip>span{
    display:flex!important;
    align-items:center!important;
    gap:4px!important;
    min-width:0!important;
  }
  body .directory-nav-shell .directory-location-chip strong{
    display:block!important;
    max-width:64px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:10px!important;
    line-height:1.1!important;
  }
  body .directory-nav-shell .directory-location-chip small{
    display:block!important;
    flex:none!important;
    font-size:8px!important;
    line-height:1!important;
  }

  /* Desktop navigation must never leak into the mobile header. */
  body .directory-nav-shell .directory-links-desktop,
  body .directory-nav-shell .directory-business-desktop,
  body .directory-nav-shell .directory-mobile-search{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  body .directory-nav-shell .directory-menu-toggle{
    grid-column:3!important;
    display:inline-flex!important;
    justify-self:end!important;
    align-items:center!important;
    justify-content:center!important;
    width:40px!important;
    height:40px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:11px!important;
    background:#fff7ef!important;
    color:#342d29!important;
    box-shadow:none!important;
    cursor:pointer!important;
  }

  /* Full-height mobile drawer. React removes it entirely when closed. */
  body .directory-nav-shell .directory-mobile-menu{
    position:fixed!important;
    top:64px!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:110!important;
    width:100%!important;
    height:calc(100dvh - 64px)!important;
    margin:0!important;
    display:block!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    background:#fff!important;
    border-top:1px solid #f2e2d6!important;
    box-shadow:0 18px 34px rgba(74,42,20,.12)!important;
    padding-bottom:calc(20px + env(safe-area-inset-bottom))!important;
  }
  body .directory-nav-shell .directory-mobile-menu .mobile-location{
    min-height:54px!important;
    padding:11px 16px!important;
  }
  body .directory-nav-shell .directory-mobile-menu a{
    min-height:48px!important;
    padding:11px 16px!important;
    font-size:12px!important;
  }
  body .directory-nav-shell .directory-mobile-menu-business{
    padding:10px 12px 12px!important;
  }

  /* Final mobile Home: discovery happens through search. Nothing else sits below it. */
  html body .nl-home .nl-hero-badge{
    display:none!important;
  }
  html body .nl-home .nl-quick-row{
    display:none!important;
  }
  html body .nl-home main > :not(.nl-hero){
    display:none!important;
  }
  html body .nl-home #nl-construction-home-entry{
    display:none!important;
  }
  html body .nl-home main{
    min-height:calc(100dvh - 64px - 70px)!important;
    padding-bottom:0!important;
    background:#fff7ef!important;
  }
  html body .nl-home .nl-hero{
    min-height:calc(100dvh - 64px - 70px)!important;
    margin-bottom:0!important;
  }
  html body .nl-home .nl-hero-inner{
    padding-bottom:24px!important;
  }

  /* App-like colorful mobile category dock. */
  html body .nl-mobile-bottom-nav.nl-five-nav{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:95!important;
    height:calc(70px + env(safe-area-inset-bottom))!important;
    padding:7px 7px env(safe-area-inset-bottom)!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:4px!important;
    background:linear-gradient(90deg,#fff8f1 0%,#f7fbff 25%,#fff7f8 50%,#fffaf0 75%,#f5fbf7 100%)!important;
    border-top:0!important;
    box-shadow:0 -8px 24px rgba(55,37,24,.11)!important;
    backdrop-filter:blur(16px)!important;
    -webkit-backdrop-filter:blur(16px)!important;
  }
  html body .nl-mobile-bottom-nav.nl-five-nav:before{
    content:""!important;
    position:absolute!important;
    left:0!important;
    right:0!important;
    top:0!important;
    height:3px!important;
    background:linear-gradient(90deg,#ff6a00 0 20%,#2563eb 20% 40%,#e11d48 40% 60%,#d97706 60% 80%,#059669 80% 100%)!important;
  }
  html body .nl-mobile-bottom-nav.nl-five-nav a{
    min-width:0!important;
    min-height:56px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    border-radius:11px!important;
    color:#4f4640!important;
    text-decoration:none!important;
    font-size:9px!important;
    font-weight:800!important;
    line-height:1.05!important;
    text-align:center!important;
    white-space:nowrap!important;
    transition:transform .14s ease,background .14s ease!important;
  }
  html body .nl-mobile-bottom-nav.nl-five-nav a svg{
    width:28px!important;
    height:28px!important;
    padding:5px!important;
    border-radius:9px!important;
    flex:none!important;
    stroke-width:2!important;
  }
  html body .nl-mobile-bottom-nav.nl-five-nav a:nth-child(1) svg{color:#ff6a00!important;background:#fff0e5!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a:nth-child(2) svg{color:#2563eb!important;background:#edf4ff!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a:nth-child(3) svg{color:#e11d48!important;background:#fff0f3!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a:nth-child(4) svg{color:#d97706!important;background:#fff7df!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a:nth-child(5) svg{color:#059669!important;background:#eafaf3!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a:active{
    transform:translateY(-1px)!important;
    background:rgba(255,255,255,.78)!important;
  }
}

@media (max-width:390px){
  body .directory-nav-shell .directory-nav{
    padding-inline:9px!important;
    grid-template-columns:minmax(106px,auto) minmax(0,1fr) 38px!important;
    gap:6px!important;
  }
  body .directory-nav-shell .directory-brand img{
    width:114px!important;
    max-width:114px!important;
    max-height:35px!important;
  }
  body .directory-nav-shell .directory-brand small{font-size:7.2px!important}
  body .directory-nav-shell .directory-location-chip{
    max-width:108px!important;
    padding:6px 8px!important;
  }
  body .directory-nav-shell .directory-location-chip strong{
    max-width:58px!important;
    font-size:9.5px!important;
  }
  body .directory-nav-shell .directory-location-chip small{display:none!important}
  body .directory-nav-shell .directory-menu-toggle{width:38px!important;height:38px!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a{font-size:8.5px!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a svg{width:27px!important;height:27px!important}
}

@media (max-width:350px){
  body .directory-nav-shell .directory-nav{
    padding-inline:8px!important;
    grid-template-columns:minmax(98px,auto) minmax(0,1fr) 36px!important;
    gap:5px!important;
  }
  body .directory-nav-shell .directory-brand img{width:106px!important;max-width:106px!important}
  body .directory-nav-shell .directory-brand small{display:none!important}
  body .directory-nav-shell .directory-location-chip{max-width:100px!important;padding-inline:7px!important}
  body .directory-nav-shell .directory-location-chip strong{max-width:52px!important}
  body .directory-nav-shell .directory-menu-toggle{width:36px!important;height:36px!important}
  html body .nl-mobile-bottom-nav.nl-five-nav{gap:2px!important;padding-inline:4px!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a{font-size:8px!important}
  html body .nl-mobile-bottom-nav.nl-five-nav a svg{width:25px!important;height:25px!important;padding:4px!important}
}
