.nighty-home-v2 .nh-directory .nh-profile-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Keep status labels anchored despite the generic photo-child rule. */
.nighty-home-v2 .nh-directory .nh-profile-photo > .nh-directory-badges {
    position: absolute;
    z-index: 3;
    bottom: 8px;
    left: 8px;
    right: 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    pointer-events: none;
}

.nh-directory-badges span {
    padding: 4px 6px;
    border-radius: 5px;
    background: #15141aeb;
    color: #fff;
    font-size: 11px;
    line-height: 1.25;
    font-weight: 700;
}

.nh-directory-pages {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.nh-directory-pages:empty { display: none; }

@media (max-width: 1150px) {
    .nighty-home-v2 .nh-directory .nh-profile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .nighty-home-v2 .nh-directory .nh-profile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .nighty-home-v2 .nh-directory .nh-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep contact labels readable on the narrowest two-column phones. */
@media(max-width:480px){
 .nighty-home-v2 .nh-directory .nighty-listing-actions .nighty-card-action{flex-direction:column;justify-content:center;gap:3px;min-height:52px;padding:5px 2px;font-size:11px;line-height:1.15;white-space:nowrap}
}

/* Keep the original Stories-first flow and only normal card spacing. */
.nighty-home-v2 #nighty-home-intro{padding-bottom:12px}
.nighty-home-v2>.nvs-home{margin-top:0;margin-bottom:12px}
#nighty-home-vip,#nighty-home-directory{padding-top:0!important;padding-bottom:0!important;margin-top:0}
#nighty-home-vip{margin-bottom:14px}
#nighty-home-vip[hidden]{display:none!important;margin:0}
#nighty-home-vip:not([hidden])+#nighty-home-directory .nh-title-row{display:none}

/* One continuous grid: ordinary cards fill the unfinished TOP row at every width.
   Keep the existing sections in the DOM for pagination and timed TOP replacement. */
.nighty-home-v2 .nh-catalog{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.nighty-home-v2 .nh-catalog>.nh-directory:not([hidden]),
.nighty-home-v2 .nh-catalog>.nh-directory>.nh-wrap,
.nighty-home-v2 .nh-catalog .nh-profile-grid{display:contents!important}
.nighty-home-v2 .nh-catalog .nh-title-row,
.nighty-home-v2 .nh-catalog .nh-directory-pages,
.nighty-home-v2 .nh-catalog .nh-empty{grid-column:1/-1}
.nighty-home-v2 .nh-catalog .nh-title-row{margin-bottom:0}
@media(max-width:1150px){.nighty-home-v2 .nh-catalog{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.nighty-home-v2 .nh-catalog{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.nighty-home-v2 .nh-catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
