/* Niguro page CSS: directories pages (built on the page kit in niguro.css; see dev/niguro-kit.md) */
/* pages, groups, events, people, directory, notifications — everything is scoped under .ng-dir
   (the hub frame of those templates) or uses classes only these templates print (ng-d*, ng-n*). */

/* ------------------------------- */
/* Search & filter bar (__ng_dir_filters.tpl): Sngine's search on the left, its filters as selects */
/* ------------------------------- */
.ng-dirbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 0; padding: 12px; border: 0; border-radius: var(--ng-r); background: var(--ng-card); }
@media (min-width: 768px) { .ng-dirbar:has(.ng-dirbar__filters) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.ng-dirbar__search { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; }
.ng-dirbar__q, .ng-dirbar__sel { position: relative; display: flex; align-items: center; min-width: 0; margin: 0; }
.ng-dirbar__q { flex: 1; }
.ng-dirbar__q > .ng-ico, .ng-dirbar__sel > .ng-ico { position: absolute; left: 14px; z-index: 1; width: 18px; height: 18px; color: var(--ng-sub); pointer-events: none; }
.ng-dirbar__q .form-control { width: 100%; padding-left: 42px; }
.ng-dirbar__sel .form-select { width: 100%; padding-left: 40px; padding-right: 32px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background-position: right 10px center; }
.ng-dirbar__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.ng-dirbar__sel { flex: 1 1 140px; }
@media (min-width: 768px) { .ng-dirbar__sel { flex: 0 0 196px; } }
.ng-dirbar .ng-pbtn { height: var(--ng-field-h); } /* lines up with the fields, as the kit's .ng-filterbar does */
.ng-dirbar__apply[hidden] { display: none; }

/* ------------------------------- */
/* Sections, counts, See More */
/* ------------------------------- */
.ng-dsec { display: flex; flex-direction: column; min-width: 0; }
.ng-sechead__sub { margin: 4px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ng-sub); }

/* a count in a tab (requests, unread): neutral, brand on the active tab, red when it asks for you */
.ng-dcount {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--ng-fill); color: var(--ng-ink-strong); font-size: 11.5px; font-weight: 700; line-height: 1;
}
.ng-ptabs__list .active .ng-dcount { background: var(--ng-tint); color: var(--ng-brand); }
.ng-dcount.is-hot, .ng-ptabs__list .active .ng-dcount.is-hot { background: var(--ng-red); color: #fff; }
.ng-dcount[hidden] { display: none; }

/* Sngine's "See More" (.js_see-more) as a full-width button under the list */
:is(.ng-dir, .ng-plist) .see-more.ng-dmore {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; margin: 16px 0 0; padding: 0 16px;
  border: 0; border-radius: 10px; background: var(--ng-card); box-shadow: none; color: var(--ng-ink-strong);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
}
:is(.ng-dir, .ng-plist) .see-more.ng-dmore:hover { background: var(--ng-fill); text-decoration: none; }
:is(.ng-dir, .ng-plist) .see-more.ng-dmore:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: 2px; }
:is(.ng-dir, .ng-plist) .see-more.ng-dmore.done { background: transparent; color: var(--ng-sub); cursor: default; }
.ng-dir .ng-lcard .see-more.ng-dmore { margin: 0; min-height: 42px; border-top: 1px solid var(--ng-line); border-radius: 0; }

/* focus ring on buttons the shared card styles leave without one */
.ng-dir .btn:focus-visible, .ng-dir .ng-pbtn:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: 2px; }
.ng-dir .ng-pbtn:disabled { opacity: .55; cursor: default; }

/* ------------------------------- */
/* The grid of cards (__ng_dir_card.tpl). Pages, groups, events (960px hub, no sidebar): 1 column under
   360px, 2 on phones, 3 from 768px, 4 from 1024px. People have their own grid (.ng-pgrid, below) */
/* ------------------------------- */
.ng-dgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 360px) { .ng-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 768px) { .ng-dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .ng-dgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ng-dgrid__item { display: flex; min-width: 0; transition: opacity .2s, scale .2s; }
.ng-dgrid__item.is-out { opacity: 0; scale: .96; }

/* the card: on the canvas, so the kit's card corners and no outline */
.ng-dcard { flex: 1; border: 0; border-radius: var(--ng-r); }
.ng-dcard .ng-scard__media { background-color: var(--ng-fill); }
.ng-dcard__title { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; font-size: 16px; line-height: 1.3; }
.ng-dcard__title > .js_user-popover { display: block; min-width: 0; overflow: hidden; }
.ng-dcard .ng-scard__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.ng-dcard__badge { display: inline-flex; flex: none; }
.ng-dcard__badge svg { display: block; }

/* pages, groups, events (Facebook's "Discover Pages" card): a 2:1 cover with a round Hide / Settings
   button, the picture beside the name, a category and a social-proof line, one full-width row of buttons */
.ng-dcard__cover { position: relative; }
.ng-dcard__cover .ng-scard__media { aspect-ratio: 2 / 1; }
.ng-dcard__corner {
  position: absolute; top: 8px; right: 8px; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0;
  border-radius: 50%; background: hsl(0 0% 0% / .45); color: #fff; cursor: pointer; text-decoration: none; transition: background .15s;
}
.ng-dcard__corner:hover { background: hsl(0 0% 0% / .62); color: #fff; }
.ng-dcard__corner:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.ng-dcard__corner .ng-ico { width: 16px; height: 16px; }
.ng-dcard__head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px 12px 0; }
.ng-dcard__ava { flex: none; display: block; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: var(--ng-fill); }
.ng-dcard__ava img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ng-dcard--group .ng-dcard__ava { border-radius: 10px; }
.ng-dcard__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 40px; border-radius: 10px;
  background: var(--ng-fill); line-height: 1;
}
.ng-dcard__date small { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--destructive)); }
.ng-dcard__date b { margin-top: 2px; font-size: 16px; font-weight: 800; color: var(--ng-ink-strong); }
.ng-dcard__texts { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ng-dcard__line, .ng-dcard__proof { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; line-height: 1.35; color: var(--ng-sub); }
.ng-dcard__proof { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ng-dcard__acts.ng-scard__acts { margin-top: auto; padding: 12px; }
/* the hubs' card buttons on the global button scale (38px, 10px corners), not the feed cards' 30px pills:
   one full-width action reads as the card's call to action (pages, groups, events and people alike) */
:is(.ng-dir, .ng-tcard) .ng-dcard .ng-scard__acts .btn:not(.btn-icon):not(.rounded-circle):not(.btn-close) {
  height: 38px; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600;
}
@media (max-width: 575.98px) {
  .ng-dcard__head { gap: 8px; padding: 10px 10px 0; }
  .ng-dcard__ava { width: 32px; height: 32px; }
  .ng-dcard__date { height: 36px; }
  .ng-dcard .ng-scard__name, .ng-dcard__title { font-size: 15px; }
  .ng-dcard__acts.ng-scard__acts { padding: 10px; }
  .ng-dcard--event .ng-dcard__acts { grid-template-columns: minmax(0, 1fr); }
}

/* the mutual-friends link in the people rows (__ng_dir_prow.tpl) */
.ng-dcard__mutual { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-decoration-color: var(--ng-line); text-underline-offset: 3px; cursor: pointer; }
.ng-dcard__mutual:hover { color: var(--ng-ink-strong); }

/* ------------------------------- */
/* Sngine's action buttons, coloured by their state (the js_ hook they carry): to do = brand,
   done (liked, joined, going, sent, friends) = tint, secondary = fill. Sngine swaps the classes and
   writes Font Awesome icons into the label on click; the cards and rows stay text-only. */
/* ------------------------------- */
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn :is(.fa, .fas, .far, .fa-solid, .fa-regular) { display: none; }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn.btn-light { background: var(--ng-fill); color: var(--ng-ink-strong); }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn:is(.btn-primary, .btn-success, .js_like-page, .js_join-group, .js_go-event, .js_friend-add, .js_follow, .js_friend-accept) {
  background: var(--ng-brand); color: #fff;
}
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn:is(.js_interest-event, .js_friend-decline, .js_unblock-user) { background: var(--ng-fill); color: var(--ng-ink-strong); }
.ng-dir .ng-drow__acts .btn.js_interest-event { background: var(--ng-brand); color: #fff; }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn:is(.js_unlike-page, .js_leave-group, .js_ungo-event, .js_uninterest-event, .js_friend-remove, .js_unfollow, .js_friend-cancel) {
  background: var(--ng-tint); color: var(--ng-brand);
}
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn.btn-light:hover { background: var(--ng-fill-2); color: var(--ng-ink-strong); }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn:is(.btn-primary, .btn-success, .js_like-page, .js_join-group, .js_go-event, .js_friend-add, .js_follow, .js_friend-accept):hover { background: var(--ng-brand); color: #fff; filter: brightness(1.06); }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn:is(.js_interest-event, .js_friend-decline, .js_unblock-user):hover { background: var(--ng-fill-2); color: var(--ng-ink-strong); filter: none; }
.ng-dir .ng-drow__acts .btn.js_interest-event:hover { background: var(--ng-brand); color: #fff; filter: brightness(1.06); }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn:is(.js_unlike-page, .js_leave-group, .js_ungo-event, .js_uninterest-event, .js_friend-remove, .js_unfollow, .js_friend-cancel):hover { background: hsl(var(--primary) / .17); color: var(--ng-brand); filter: none; }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn:disabled { opacity: .7; }
:is(.ng-dir, .ng-tcard) :is(.ng-scard__acts, .ng-drow__acts) .btn .spinner-grow { width: 12px; height: 12px; margin-right: 6px !important; }

/* ------------------------------- */
/* Categories (__ng_dir_cats.tpl): a sideways strip of pills above the grid, the theme's strip arrows
   (hover with a mouse only, towards the side with more); the pills scroll under soft edges */
/* ------------------------------- */
.ng-dcats { position: relative; }
.ng-dcats .ng-dcats__track { padding: 2px; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.ng-dcats .ng-chiprow > a .ng-ico { width: var(--ng-chip-ico); height: var(--ng-chip-ico); /* [Chips: one size] */ }
.ng-dcats .ng-strip__nav { width: 34px; height: 34px; }
.ng-dcats .ng-strip__nav .ng-ico { width: 18px; height: 18px; }
.ng-dcats .ng-strip__nav--prev { left: 2px; }
.ng-dcats .ng-strip__nav--next { right: 2px; }
.ng-dcats::before, .ng-dcats::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 40px; pointer-events: none; opacity: 0; transition: opacity .15s;
}
.ng-dcats::before { left: 0; background: linear-gradient(90deg, var(--ng-canvas), transparent); }
.ng-dcats::after { right: 0; background: linear-gradient(-90deg, var(--ng-canvas), transparent); }
.ng-dcats.can-prev::before, .ng-dcats.can-next::after { opacity: 1; }

/* ------------------------------- */
/* People (/people, people.tpl): one centred grid of tall person cards (__ng_people_card.tpl), the structure
   of Facebook's friend-requests grid in Niguro's tokens. 2 columns on phones, 3 from 600px, 4 from 900px,
   5 from 1200px, 12px apart; the page is up to 1400px wide (5 cards of ~265px), wider than the 1180px hub.
   Card: a square photo full-bleed under 12px corners, the name on one line (17px), the mutual-friends line
   (up to 2 overlapping faces + the count; kept as a blank line without mutual friends, so the cards in a row
   line up), then the buttons stacked full width (38px, 8px apart): brand action first, fill second. */
/* ------------------------------- */
.container.ng-people { max-width: none; }
.ng-people .ng-hubwrap { --ng-hub-max: 1000px; } /* content 1000px wide, centred (user, 2026-10-17) */
.ng-dgrid.ng-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .ng-dgrid.ng-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ng-dgrid.ng-pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .ng-dgrid.ng-pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ng-pcard { display: flex; flex-direction: column; flex: 1; min-width: 0; overflow: hidden; border-radius: var(--ng-r); background: var(--ng-card); /* [Card radius] */ }
.ng-pcard__photo { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--ng-fill); }
.ng-pcard__photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .3s ease; }
.ng-pcard__photo:hover img { scale: 1.03; }
.ng-pcard__body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 12px 14px 14px; }
.ng-pcard__name { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.ng-pcard__name > .js_user-popover { display: block; min-width: 0; overflow: hidden; }
.ng-pcard__name a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ng-ink-strong); text-decoration: none; }
.ng-pcard__name a:hover { text-decoration: underline; }
.ng-pcard__badge { display: inline-flex; flex: none; }
.ng-pcard__badge svg { display: block; }
.ng-pcard__mutual { display: flex; align-items: center; min-width: 0; min-height: 20px; margin-top: 4px; font-size: 13px; line-height: 20px; color: var(--ng-sub); }
.ng-pcard__mutualbtn {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; padding: 0; border: 0; border-radius: 6px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ng-pcard__mutualbtn:hover { color: var(--ng-ink-strong); }
.ng-pcard__mutualbtn:hover .ng-pcard__mutualtxt { text-decoration: underline; text-underline-offset: 3px; }
.ng-pcard__mutualbtn:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: 2px; }
.ng-pcard__faces { display: inline-flex; flex: none; }
.ng-pcard__faces img { display: block; width: 18px; height: 18px; border-radius: 50%; object-fit: cover; background: var(--ng-fill); box-shadow: 0 0 0 2px var(--ng-card); }
.ng-pcard__faces img + img { margin-left: -5px; }
.ng-pcard__mutualtxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-pcard__acts.ng-scard__acts { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; margin-top: auto; padding-top: 12px; }
/* two stacked buttons: the area keeps their height when Sngine swaps them (Confirm → Friends, Delete → none) */
.ng-pcard__acts--two.ng-scard__acts { min-height: calc(12px + 2 * 38px + 8px); }
.ng-pcard__acts .loader { margin: 0 auto; }
/* "Request removed": once Sngine's Delete (js_friend-decline) has taken both buttons away */
.ng-pcard__note { display: none; }
.ng-pcard__acts:not(:has(.btn, .loader)) .ng-pcard__note { display: flex; align-items: center; height: 38px; font-size: 13.5px; font-weight: 600; color: var(--ng-sub); }
@media (max-width: 599.98px) {
  .ng-pcard__body { padding: 10px 10px 12px; }
  .ng-pcard__name { font-size: 15px; }
  .ng-pcard__mutual { font-size: 12.5px; }
  .ng-pcard__acts .btn { padding: 0 8px; }
}

/* ------------------------------- */
/* Directory: the overview cards and the list rows (__ng_dir_tile.tpl, __ng_dir_row.tpl) */
/* ------------------------------- */
.ng-dtiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .ng-dtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ng-dtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ng-dtiles > li { display: flex; min-width: 0; }
.ng-dtile {
  display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; padding: 18px; border-radius: var(--ng-r);
  background: radial-gradient(120% 120% at 0% 0%, hsl(var(--primary) / .08), transparent 60%), var(--ng-card);
  color: var(--ng-ink); text-decoration: none; transition: box-shadow .15s, translate .15s;
}
.ng-dtile:hover { color: var(--ng-ink); box-shadow: 0 6px 20px -10px hsl(var(--primary) / .35); translate: 0 -1px; }
.ng-dtile:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: 2px; }
.ng-dtile .ng-lrow__icon { flex: none; width: 52px; height: 52px; border-radius: 16px; }
.ng-dtile .ng-lrow__icon .ng-ico { width: 24px; height: 24px; }
.ng-dtile__text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ng-dtile__title { font-size: 16px; font-weight: 700; color: var(--ng-ink-strong); }
.ng-dtile__sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--ng-sub); }
.ng-dtile__go { flex: none; color: var(--ng-faint); }
.ng-dtile__go .ng-ico { width: 18px; height: 18px; }

.ng-dlist { margin: 0; padding: 0; list-style: none; }
.ng-drow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; }
@media (min-width: 768px) { .ng-drow { gap: 14px; padding: 14px 18px; } }
.ng-drow + .ng-drow { border-top: 1px solid var(--ng-line); }
.ng-drow__lead { display: block; flex: none; }
.ng-drow__img { display: block; width: 48px; height: 48px; border-radius: 14px; object-fit: cover; background: var(--ng-fill); }
.ng-drow__img.is-round { border-radius: 50%; }
.ng-drow__main { min-width: 0; }
.ng-drow__name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ng-drow__name > .js_user-popover { display: block; min-width: 0; overflow: hidden; }
.ng-drow__title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--ng-ink-strong); text-decoration: none; }
.ng-drow__title:hover { color: var(--ng-ink-strong); text-decoration: underline; }
.ng-drow__meta { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ng-sub); }
.ng-drow__acts { display: flex; gap: 8px; }
.ng-drow__acts .btn {
  display: inline-flex; align-items: center; justify-content: center; height: 38px; margin: 0 !important; padding: 0 14px;
  border: 0; border-radius: 10px; box-shadow: none; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.ng-drow__acts .loader { margin: 0 8px; }
.ng-dposts { margin: 0; padding: 0; list-style: none; }

/* Sngine's pager (class-pager.php) as pills */
.ng-dpager { margin-top: 16px; }
.ng-dpager .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ng-dpager .pagination li.previous.disabled { flex-basis: 100%; text-align: center; }
.ng-dpager .page-link {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 12px; border: 0; border-radius: 10px;
  background: var(--ng-card); color: var(--ng-ink-strong); font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: none;
}
.ng-dpager a.page-link[href]:hover { background: var(--ng-fill); }
.ng-dpager .active .page-link { background: var(--ng-brand); color: #fff; }
.ng-dpager .disabled .page-link { background: transparent; color: var(--ng-sub); font-size: 13px; font-weight: 500; }

/* the side: a nav of other areas, and the button under a key/value card */
.ng-dside__nav { padding: 8px; border-radius: 0; background: transparent; }
.ng-dside__btn { margin-top: 12px; }

/* ------------------------------- */
/* Notifications (notifications.tpl, __ng_dir_note.tpl) */
/* ------------------------------- */
.ng-ntabs .ng-ptabs__list > button {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 10px;
  border: 0; background: none; color: var(--ng-sub); font-size: 14.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.ng-ntabs .ng-ptabs__list > button .ng-ico { width: 18px; height: 18px; }
.ng-ntabs .ng-ptabs__list > button:hover { color: var(--ng-ink-strong); }
.ng-ntabs .ng-ptabs__list > button.active { color: var(--ng-brand); }
.ng-ntabs .ng-ptabs__list > button.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ng-brand); }
.ng-ntabs .ng-ptabs__list > button:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: -2px; border-radius: 10px; }
.ng-ntabs .ng-ptabs__list > button .ng-dcount { margin-left: 2px; }
.ng-ntabs__del { width: 38px; padding: 0 !important; }
.ng-ntabs__del:hover { color: var(--ng-red); }
@media (max-width: 479.98px) {
  .ng-ntabs .ng-ptabs__acts [data-ng-notes-read] { width: 38px; padding: 0; }
  .ng-ntabs__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.ng-notes { padding: 6px 0; }
.ng-ngroup { padding: 4px 8px 8px; }
.ng-ngroup + .ng-ngroup { border-top: 1px solid var(--ng-line); padding-top: 8px; }
.ng-ngroup:not(:has(.feeds-action-item)) { display: none; }
.ng-ngroup:not(:has(.feeds-action-item)) + .ng-ngroup { border-top: 0; }
.ng-ngroup__title { margin: 0; padding: 10px 10px 6px; font-size: 15px; font-weight: 700; color: var(--ng-ink-strong); }
.ng-nlist { margin: 0; padding: 0; list-style: none; }

/* a row: the link fills it; the delete button sits at the end */
.ng-dir .ng-nlist > .feeds-action-item { position: relative; display: flex; align-items: center; margin: 0; border-radius: 14px; background: transparent; cursor: default; }
.ng-dir .ng-nlist > .feeds-action-item + .feeds-action-item { margin-top: 2px; }
.ng-dir .ng-nlist > .feeds-action-item.unread { background: var(--ng-tint); }
.ng-dir .ng-nlist > .feeds-action-item:hover { background: var(--ng-fill); }
.ng-dir .ng-nlist > .feeds-action-item.unread:hover { background: hsl(var(--primary) / .15); }
.ng-nrow__link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 10px 6px 10px 10px; border-radius: 14px; color: var(--ng-ink); text-decoration: none; }
.ng-nrow__link:hover { color: var(--ng-ink); }
.ng-nrow__link:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: -2px; }
.ng-nrow__ava { position: relative; flex: none; }
.ng-nrow__ava > img { display: block; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.ng-nrow__ava .ng-note__badge { width: 22px; height: 22px; }
.ng-nrow__ava .ng-note__badge i { font-size: 11px; }
.ng-nrow__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ng-nrow__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; line-height: 1.4; color: var(--ng-ink); word-wrap: break-word; }
.ng-nrow__text b { font-weight: 700; color: var(--ng-ink-strong); }
.ng-nrow__text .verified-badge, .ng-nrow__text .pro-badge { display: inline-block; vertical-align: -2px; }
.ng-nrow__time { font-size: 12.5px; color: var(--ng-sub); }
.unread .ng-nrow__time { color: var(--ng-brand); font-weight: 600; }
.ng-nrow__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ng-brand); }
.ng-nrow__del {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-right: 8px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--ng-sub); cursor: pointer;
}
.ng-nrow__del .ng-ico { width: 18px; height: 18px; }
.ng-nrow__del:hover { background: var(--ng-card); color: var(--ng-red); }
.ng-nrow__del:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) {
  .ng-nrow__del { opacity: 0; }
  .ng-nlist > .feeds-action-item:hover .ng-nrow__del, .ng-nrow__del:focus-visible { opacity: 1; }
}

/* Unread: only the unread rows; "all caught up" when there are none */
.ng-notes__none { display: none; }
.ng-notes.is-unread-only .ng-nlist > .feeds-action-item:not(.unread) { display: none; }
.ng-notes.is-unread-only .ng-ngroup:not(:has(.feeds-action-item.unread)) { display: none; }
.ng-notes.is-unread-only:not(:has(.feeds-action-item.unread)) .ng-notes__none { display: flex; }
.ng-notes.is-unread-only .see-more { display: none !important; }

/* ------------------------------- */
/* People lists (__ng_dir_plist.tpl, __ng_dir_prow.tpl): the profile's Friends / Followers / Followings /
   Subscribers / Subscriptions and the members lists of pages, groups and events — Facebook's profile
   Friends structure: title, search and the owner's links, sub-tabs, then bordered rows in two columns
   (one on phones) with a ⋯ menu holding Sngine's actions */
/* ------------------------------- */
.ng-plist { margin: 0 0 16px; overflow: visible; border: 0; border-radius: var(--ng-r); background: var(--ng-card); }
.ng-plist__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 16px 4px; }
.ng-plist__title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ng-ink-strong); }
.ng-plist__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ng-plist__search { position: relative; display: flex; align-items: center; width: 220px; margin: 0; }
.ng-plist__search > .ng-ico { position: absolute; left: 12px; z-index: 1; width: 18px; height: 18px; color: var(--ng-sub); pointer-events: none; }
.ng-plist__search .form-control { width: 100%; padding-left: 38px; }
.ng-plist__links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ng-plist__links a { font-size: 14px; font-weight: 600; color: var(--ng-brand); text-decoration: none; white-space: nowrap; }
.ng-plist__links a:hover { text-decoration: underline; }
@media (max-width: 575.98px) {
  .ng-plist__tools { width: 100%; }
  .ng-plist__search { flex: 1 1 100%; width: auto; }
}
.ng-plist__tabs { margin: 0 16px; }
.ng-plist__body { padding: 16px; }
.ng-plist__none { margin: 8px 0 0; padding: 18px 0; text-align: center; font-size: 14px; color: var(--ng-sub); }
.ng-plist__none[hidden] { display: none; }
.ng-plist .see-more.ng-dmore { background: var(--ng-fill); }
.ng-plist .see-more.ng-dmore:hover { background: var(--ng-fill-2); }
.ng-plist .ng-empty { padding: 28px 12px; }

.ng-plist__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 576px) { .ng-plist__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
ul.ng-plist__grid > li.ng-prow {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--ng-line); border-radius: var(--ng-r); background: var(--ng-card); /* [Card radius] */
}
ul.ng-plist__grid > li.ng-prow[hidden] { display: none; }
.ng-prow__pic { display: block; flex: none; }
.ng-prow__pic img { display: block; width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--ng-fill); }
@media (max-width: 575.98px) { .ng-prow__pic img { width: 60px; height: 60px; } }
.ng-prow__main { min-width: 0; }
.ng-prow__name { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.ng-prow__name > .js_user-popover { display: block; min-width: 0; overflow: hidden; }
.ng-prow__name a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ng-ink-strong); text-decoration: none; }
.ng-prow__name a:hover { color: var(--ng-ink-strong); text-decoration: underline; }
.ng-prow__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; min-width: 0; font-size: 13px; color: var(--ng-sub); }
.ng-prow__meta .ng-tag { height: 20px; font-size: 11px; }
.ng-prow__acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
/* action lists only (invites, member requests, admin management): the feed packs' small pills */
.ng-prow__acts .btn:not(.btn-icon):not(.rounded-circle):not(.btn-close) {
  height: 30px; min-height: 30px; padding: 0 12px; border-radius: 999px !important; font-size: 12.5px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.ng-prow__acts .btn i, .ng-prow__acts .btn .ng-ico { width: 14px; height: 14px; font-size: 12px; }

/* ------------------------------- */
/* Media and other tabs on the profile, pages, groups and events (Facebook's profile Photos card):
   the same card as the people lists (title, sub-tabs), then photos as rounded square tiles (3 / 4 / 5 up,
   8px apart), videos 16:9 (2 / 3 up), reels 9:16 (3 / 4 up), albums as cards with a cover (2 / 3 up),
   pages / groups / events as the hub cards (2 / 3 up). __ng_dir_mtile.tpl, __ng_dir_album.tpl */
/* ------------------------------- */
.ng-tcard .ng-plist__head { padding-bottom: 8px; }
.ng-mgrid2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 576px) { .ng-mgrid2 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 768px) { .ng-mgrid2--photos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ng-mgrid2--videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 576px) { .ng-mgrid2--videos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ng-mgrid2--albums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
@media (min-width: 576px) { .ng-mgrid2--albums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ng-mtile { position: relative; min-width: 0; }
.ng-mtile__link, .ng-tcard .ng-mtile__link.pg_photo {
  position: relative; display: block; width: 100%; height: auto; margin: 0; padding: 0; overflow: hidden; aspect-ratio: 1 / 1;
  border-radius: 10px; background: var(--ng-fill) center / cover no-repeat; box-shadow: none;
}
.ng-mtile--video .ng-mtile__link { aspect-ratio: 16 / 9; }
.ng-mtile--reel .ng-mtile__link { aspect-ratio: 9 / 16; }
.ng-mtile__link:focus-visible { outline: 2px solid var(--ng-brand); outline-offset: 2px; }
.ng-mtile--photo .ng-mtile__link::after { content: ""; position: absolute; inset: 0; background: hsl(0 0% 0% / 0); transition: background .15s; }
.ng-mtile--photo .ng-mtile__link:hover::after { background: hsl(0 0% 0% / .08); }
.ng-mtile video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--ng-fill); pointer-events: none; }
.ng-mtile__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: hsl(0 0% 0% / .45); color: #fff;
}
.ng-mtile__play .ng-ico { width: 20px; height: 20px; }
.ng-mtile__tools { position: absolute; top: 6px; right: 6px; z-index: 1; display: flex; gap: 4px; }
.ng-mtile__tool {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: hsl(0 0% 0% / .5); color: #fff; cursor: pointer;
}
.ng-mtile__tool:hover { background: hsl(0 0% 0% / .68); }
.ng-mtile__tool.pinned { background: var(--ng-brand); }
.ng-mtile__tool .ng-ico { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
  .ng-mtile__tool:not(.pinned) { opacity: 0; transition: opacity .15s; }
  .ng-mtile:hover .ng-mtile__tool, .ng-mtile__tool:focus-visible { opacity: 1; }
}

.ng-album { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ng-album__cover { display: block; aspect-ratio: 1 / 1; margin-bottom: 6px; border-radius: 12px; background: var(--ng-fill) center / cover no-repeat; }
.ng-album__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--ng-ink-strong); text-decoration: none; }
.ng-album__title:hover { color: var(--ng-ink-strong); text-decoration: underline; }
.ng-album__meta { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ng-sub); }
.ng-album__meta .ng-ico { width: 14px; height: 14px; }

/* one album: its title, who it's shared with and Sngine's manage buttons over the tiles */
.ng-albumv__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.ng-albumv__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--ng-ink-strong); }
.ng-albumv__meta { margin-top: 2px; font-size: 13px; color: var(--ng-sub); }
.ng-albumv__acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* the hub cards inside the 680px column */
.ng-tcard .ng-dgrid--in { grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 360px) { .ng-tcard .ng-dgrid--in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .ng-tcard .ng-dgrid--in { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
