/* NABWORK v31 — MOBILE-ONLY adaptive polish of existing homepage elements.
   Approved desktop (>=601px) intentionally untouched. No DOM nodes, images,
   copy, data, navigation, auth or sphere effects added/replaced. */
@media (max-width:600px) {
  /* Give the current heading the full phone width, never squeeze it
     beside the "all categories" action. */
  #homeView .nab-premium-categories {
    width:calc(100% - 32px)!important;
    max-width:100%!important;
    padding:20px 0 15px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  #homeView .nab-cat-intro {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:11px!important;
    margin-bottom:15px!important;
    min-width:0!important;
  }
  #homeView .nab-cat-intro > div:first-child {
    width:100%!important;
    min-width:0!important;
  }
  #homeView .nab-cat-intro > div:first-child > p {
    font-size:11px!important;
    line-height:1.4!important;
    margin:0 0 6px!important;
    letter-spacing:.015em;
  }
  #homeView .nab-cat-intro h2 {
    margin:0!important;
    max-width:100%!important;
    font-size:clamp(20px,5.65vw,24px)!important;
    line-height:1.28!important;
    letter-spacing:-.028em!important;
    font-weight:900!important;
    text-wrap:balance;
    overflow-wrap:normal!important;
  }
  #homeView .nab-cat-intro .nw-v6-all-cat {
    align-self:flex-start!important;
    width:auto!important;
    min-height:40px!important;
    padding:9px 15px!important;
    border-radius:13px!important;
    font-size:11.5px!important;
    font-weight:800!important;
    white-space:nowrap!important;
    line-height:1.25!important;
    box-shadow:0 4px 12px rgba(8,113,190,.075)!important;
  }

  /* Same eight existing categories; smaller coordinated cards, equal rows,
     unbroken icons and comfortable Georgian type on narrow screens. */
  #homeView .nab-category-rail.nw-v30-category-rail {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:1fr!important;
    gap:10px!important;
    width:100%!important;
    padding:0!important;
    overflow:visible!important;
    align-items:stretch!important;
  }
  #homeView .nab-category-rail.nw-v30-category-rail > button {
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    min-height:107px!important;
    height:100%!important;
    padding:12px 12px 13px!important;
    gap:9px!important;
    border-radius:16px!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  #homeView .nab-category-rail.nw-v30-category-rail .nw-v6-cat-icon {
    display:grid!important;
    place-items:center!important;
    width:37px!important;
    height:37px!important;
    min-width:37px!important;
    flex:0 0 37px!important;
    border-radius:12px!important;
  }
  #homeView .nab-category-rail.nw-v30-category-rail .nw-v6-cat-icon svg {
    width:22px!important;
    height:22px!important;
  }
  #homeView .nab-category-rail.nw-v30-category-rail .nw-v6-cat-label {
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    font-size:clamp(12.1px,3.3vw,13.5px)!important;
    line-height:1.38!important;
    letter-spacing:-.017em!important;
    font-weight:810!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    white-space:normal!important;
    text-wrap:pretty;
  }

  /* Existing six directions, same artwork and actions. Phone portraits are
     horizontal editorial rows: large enough to read, but less visual height
     than tall two-column poster cards. */
  #homeView .nw-v30-popular {
    width:calc(100% - 32px)!important;
    max-width:100%!important;
    padding:14px 0 16px!important;
    margin:5px auto 30px!important;
  }
  #homeView .nw-v30-popular-head {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:12px!important;
    margin-bottom:18px!important;
    min-width:0!important;
  }
  #homeView .nw-v30-popular-head > div {
    width:100%!important;
    min-width:0!important;
  }
  #homeView .nw-v30-popular-kicker {
    font-size:11px!important;
    line-height:1.4!important;
    font-weight:800!important;
    letter-spacing:.02em!important;
    margin:0 0 7px!important;
  }
  #homeView .nw-v30-popular h2 {
    margin:0!important;
    font-size:clamp(23px,6vw,27px)!important;
    line-height:1.23!important;
    letter-spacing:-.035em!important;
    font-weight:900!important;
    text-wrap:balance;
    overflow-wrap:normal!important;
  }
  #homeView .nw-v30-popular-note {
    margin:10px 0 0!important;
    font-size:12px!important;
    line-height:1.58!important;
    font-weight:550!important;
    color:#54738c!important;
    max-width:100%!important;
    overflow-wrap:normal!important;
  }
  #homeView .nw-v30-popular-all {
    align-self:flex-start!important;
    width:auto!important;
    flex:none!important;
    min-height:40px!important;
    padding:10px 15px!important;
    border-radius:13px!important;
    font-size:11.5px!important;
    font-weight:800!important;
    line-height:1.2!important;
    white-space:nowrap!important;
  }
  #homeView .nw-v30-popular-grid {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:11px!important;
    width:100%!important;
  }
  #homeView .nw-v30-popular-card {
    display:grid!important;
    grid-template-columns:clamp(108px,32vw,137px) minmax(0,1fr)!important;
    align-items:stretch!important;
    gap:0!important;
    width:100%!important;
    min-height:128px!important;
    height:auto!important;
    border-radius:17px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    text-align:left!important;
  }
  #homeView .nw-v30-popular-picture {
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    align-self:stretch!important;
    width:100%!important;
    min-width:0!important;
    height:100%!important;
    min-height:128px!important;
    aspect-ratio:auto!important;
    padding:6px!important;
    background:#e9f7ff!important;
    box-sizing:border-box!important;
  }
  #homeView .nw-v30-popular-picture img {
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    border-radius:11px!important;
  }
  #homeView .nw-v30-popular-info {
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    gap:7px!important;
    min-width:0!important;
    min-height:128px!important;
    padding:12px 36px 13px 13px!important;
    box-sizing:border-box!important;
  }
  #homeView .nw-v30-popular-name {
    display:block!important;
    font-size:clamp(13.2px,3.65vw,15px)!important;
    line-height:1.36!important;
    font-weight:890!important;
    letter-spacing:-.023em!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    text-wrap:pretty;
  }
  #homeView .nw-v30-popular-description {
    display:block!important;
    font-size:clamp(11.3px,3.05vw,12.5px)!important;
    line-height:1.45!important;
    font-weight:570!important;
    color:#5c7890!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    white-space:normal!important;
  }
  #homeView .nw-v30-popular-arrow {
    right:9px!important;
    bottom:11px!important;
    width:27px!important;
    height:27px!important;
    font-size:16px!important;
    border-radius:50%!important;
  }
}

/* Avoid inherited hover translations on touch-only devices. */
@media (max-width:600px) and (hover:none) {
  #homeView .nw-v30-popular-card:hover,
  #homeView .nw-v30-category-rail > button:hover {
    transform:none!important;
  }
}

@media (max-width:359px) {
  #homeView .nab-premium-categories,
  #homeView .nw-v30-popular {
    width:calc(100% - 24px)!important;
  }
  #homeView .nab-cat-intro h2 {font-size:19px!important}
  #homeView .nab-category-rail.nw-v30-category-rail {
    gap:8px!important;
  }
  #homeView .nab-category-rail.nw-v30-category-rail > button {
    min-height:108px!important;
    padding:11px 10px 12px!important;
    gap:7px!important;
  }
  #homeView .nab-category-rail.nw-v30-category-rail .nw-v6-cat-label {
    font-size:11.9px!important;
    line-height:1.35!important;
  }
  #homeView .nw-v30-popular h2 {font-size:22px!important}
  #homeView .nw-v30-popular-card {
    grid-template-columns:104px minmax(0,1fr)!important;
  }
  #homeView .nw-v30-popular-info {
    padding:10px 30px 11px 10px!important;
    gap:5px!important;
  }
  #homeView .nw-v30-popular-name {font-size:12.5px!important}
  #homeView .nw-v30-popular-description {
    font-size:11px!important;
    line-height:1.41!important;
  }
  #homeView .nw-v30-popular-arrow {
    right:5px!important;
    bottom:8px!important;
    width:23px!important;
    height:23px!important;
  }
}

/* Preserves full desktop v30 appearance. */
