/**
 * Profile / Page / Group — Vue layout (sovfhub_next)
 *
 * Critical fix: grid rules are now scoped to .nf2-profile-shell (available as
 * soon as Vue renders the section) AND body.nf2-profile-vue (added in onMounted).
 * This prevents the blank right-panel flash that occurred when the body class
 * wasn't yet applied but the grid element already existed in the DOM.
 *
 * Uses --sf-* design tokens from design-tokens.css.
 */

/* ── Shell container ──────────────────────────────────────────────────────── */

.nf2-profile-page-frame {
  width: auto;
  max-width: min(calc(100vw - 36px), var(--sf-next-content-max-width, 1508px));
  margin: -16px auto 0;
}

.nf2-profile-page-row,
.nf2-profile-page-main {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.nf2-profile-page-frame .nf2-profile-mobile-sidebar {
  display: none;
}

.nf2-profile-shell {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  margin-bottom: 20px;
}

.nf2-profile-header-mount,
.nf2-profile-tabs-mount,
.nf2-profile-content-mount {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.nf2-profile-content-mount {
  padding-bottom: 12px;
}

@media (min-width: 1200px) {
  .nf2-profile-page-frame {
    width: min(calc(100vw - 36px), var(--sf-next-content-max-width, 1508px));
    max-width: min(calc(100vw - 36px), var(--sf-next-content-max-width, 1508px));
  }
}

.nf2-profile-layout {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: var(--sf-container-gap, 24px);
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.nf2-profile-layout[data-profile-layout="double"] {
  /* Matches the newsfeed's main:sidebar ratio (2:1) instead of a fixed px cap */
  grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
}

.nf2-profile-layout[data-profile-layout="triple"] {
  grid-template-columns: minmax(248px, 0.85fr) minmax(0, 2fr) minmax(260px, 0.95fr);
}

.nf2-profile-rail,
.nf2-profile-main {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.nf2-profile-main > .nf2-profile-pane,
.nf2-profile-rail > .nf2-profile-pane {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
}

/* ── Profile header ───────────────────────────────────────────────────────── */

.nf2-profile-shell .nf2-profile-header,
.nf2-profile-vue .nf2-profile-header {
  position: relative;
  overflow: visible;
  margin-bottom: 20px;
  border: 0;
  border-radius: 0 0 16px 16px;
  background: #fff;
  box-shadow: none;
}

body.night-mode .nf2-profile-shell .nf2-profile-header,
body.night-mode.nf2-profile-vue .nf2-profile-header {
  background: var(--card-dark-color, var(--sf-surface-strong));
}

/* Cover */
.nf2-profile-shell .nf2-profile-header .profile-cover-wrapper,
.nf2-profile-vue .nf2-profile-header .profile-cover-wrapper {
  position: relative;
  height: 180px;
  padding-top: 0;
  overflow: hidden;
  border-radius: 0 0 16px 16px;
  background: #424242;
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-cover-wrapper,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-cover-wrapper {
  background: #151a1f;
}

.nf2-profile-shell .nf2-profile-header .profile-cover-wrapper img.js_position-cover-cropped,
.nf2-profile-vue .nf2-profile-header .profile-cover-wrapper img.js_position-cover-cropped {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nf2-profile-shell .nf2-profile-header .profile-cover-wrapper img.js_position-cover-full,
.nf2-profile-vue .nf2-profile-header .profile-cover-wrapper img.js_position-cover-full {
  width: 100%;
  height: auto;
  cursor: move;
}

.nf2-profile-shell .nf2-profile-header .profile-cover-wrapper::after,
.nf2-profile-vue .nf2-profile-header .profile-cover-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15,23,42,0.02) 45%, rgba(15,23,42,0.58) 100%);
}

/* Cover buttons */
.nf2-profile-shell .nf2-profile-header .profile-cover-buttons,
.nf2-profile-vue .nf2-profile-header .profile-cover-buttons {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  display: flex;
  gap: 5px;
  align-items: center;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.nf2-profile-shell .nf2-profile-header .profile-cover-buttons .action-dropdown-menu,
.nf2-profile-vue .nf2-profile-header .profile-cover-buttons .action-dropdown-menu {
  right: 0;
  left: auto;
}

.nf2-profile-shell .nf2-profile-header .profile-cover-wrapper:hover .profile-cover-buttons,
.nf2-profile-vue .nf2-profile-header .profile-cover-wrapper:hover .profile-cover-buttons {
  opacity: 1;
}

.nf2-profile-shell .nf2-profile-header .profile-cover-buttons > div,
.nf2-profile-shell .nf2-profile-header .profile-avatar-change,
.nf2-profile-shell .nf2-profile-header .profile-avatar-crop,
.nf2-profile-shell .nf2-profile-header .profile-avatar-delete,
.nf2-profile-vue .nf2-profile-header .profile-cover-buttons > div,
.nf2-profile-vue .nf2-profile-header .profile-avatar-change,
.nf2-profile-vue .nf2-profile-header .profile-avatar-crop,
.nf2-profile-vue .nf2-profile-header .profile-avatar-delete {
  background: rgba(0,0,0,0.18);
  box-shadow: none;
  opacity: 0.72;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.nf2-profile-shell .nf2-profile-header .profile-cover-buttons > div:hover,
.nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper:hover .profile-avatar-change,
.nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper:hover .profile-avatar-crop,
.nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper:hover .profile-avatar-delete,
.nf2-profile-vue .nf2-profile-header .profile-cover-buttons > div:hover,
.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper:hover .profile-avatar-change,
.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper:hover .profile-avatar-crop,
.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper:hover .profile-avatar-delete {
  background: rgba(0,0,0,0.28);
  opacity: 1;
}

/* Avatar */
.nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper,
.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper {
  --nf2-avatar-size: 90px;
  position: absolute;
  top: 112px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  place-items: center;
  width: calc(var(--nf2-avatar-size) + 12px);
  height: calc(var(--nf2-avatar-size) + 12px);
  padding: 6px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,249,0.98));
  box-shadow:
    0 18px 34px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.10);
}

.nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper .dropdown-menu,
.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper .dropdown-menu {
  top: calc(100% + 10px) !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  z-index: 2147482100;
  transform: translateX(-50%) !important;
  width: min(230px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 14px;
  background: #fff !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .22);
  opacity: 1 !important;
}

.nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper .dropdown-menu .dropdown-item,
.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper .dropdown-menu .dropdown-item {
  border-radius: 10px;
  white-space: normal;
}

@media (max-width: 575.98px) {
  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper .dropdown-menu,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper .dropdown-menu {
    position: fixed !important;
    top: auto !important;
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    width: auto;
    max-height: min(390px, calc(100vh - 24px));
    transform: none !important;
  }
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper {
  background: var(--body-bg-color-dark, #151a1f);
}

.nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper img,
.nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper img {
  display: block;
  width: var(--nf2-avatar-size);
  height: var(--nf2-avatar-size);
  border-radius: 50%;
  object-fit: cover;
  background: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.nf2-profile-shell .nf2-profile-header .profile-avatar-change,
.nf2-profile-shell .nf2-profile-header .profile-avatar-crop,
.nf2-profile-shell .nf2-profile-header .profile-avatar-delete,
.nf2-profile-vue .nf2-profile-header .profile-avatar-change,
.nf2-profile-vue .nf2-profile-header .profile-avatar-crop,
.nf2-profile-vue .nf2-profile-header .profile-avatar-delete {
  display: flex;
  position: absolute;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  right: -6px;
  bottom: 2px;
  color: #fff;
  font-size: 12px;
  padding: 0;
  border-radius: 50%;
  text-align: center;
  backdrop-filter: blur(10px);
}

.nf2-profile-shell .nf2-profile-header .profile-avatar-crop,
.nf2-profile-vue .nf2-profile-header .profile-avatar-crop {
  bottom: 34px;
  right: -16px;
}

.nf2-profile-shell .nf2-profile-header .profile-avatar-delete,
.nf2-profile-vue .nf2-profile-header .profile-avatar-delete {
  top: 4px;
  right: -8px;
  bottom: auto;
}

.nf2-profile-shell .nf2-profile-header .profile-avatar-change-loader,
.nf2-profile-vue .nf2-profile-header .profile-avatar-change-loader {
  position: absolute;
  right: 50%;
  bottom: -18px;
  width: min(180px, calc(100vw - 64px));
  transform: translateX(50%);
}

/* Name */
.nf2-profile-shell .nf2-profile-header .profile-name-wrapper,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper {
  min-height: 0;
  padding: 34px 18px 14px;
  background: #fff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: 600;
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper {
  background: var(--body-bg-color-dark, #151a1f);
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper a:not(.badge),
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper a:not(.badge) {
  color: #333;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-block,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-block {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-primary,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-display-name,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-display-name {
  font-size: clamp(1.75rem, 4.6vw, 2.45rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-secondary,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-handle,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-handle {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  letter-spacing: 0.01em;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-meta-pill,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-badges,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-badges {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .privacy-badge,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .privacy-badge {
  font-size: 0.9rem;
  color: #0f172a;
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .verified-badge,
.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .privacy-badge,
.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-pro-badge,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .verified-badge,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .privacy-badge,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10);
}

.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .verified-badge svg,
.nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-pro-badge svg,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .verified-badge svg,
.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-pro-badge svg {
  width: 20px !important;
  height: 20px !important;
  display: block;
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper a:not(.badge),
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper a:not(.badge) {
  color: #fff;
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-secondary,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-secondary {
  color: rgba(226, 232, 240, 0.82);
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-meta-pill,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-meta-pill {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .verified-badge,
body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .privacy-badge,
body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-pro-badge,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .verified-badge,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .privacy-badge,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-pro-badge {
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.22);
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .privacy-badge,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper .privacy-badge {
  color: #f8fafc;
}

.nf2-profile-shell .nf2-mobile-accordion-toggle,
.nf2-profile-vue .nf2-mobile-accordion-toggle {
  display: none;
}

/* Action buttons row */
.nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper,
.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper {
  display: flex !important;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: var(--sf-space-2, 8px);
  padding: 0 16px 20px;
  border-radius: 0 0 16px 16px;
  background: #fff;
  width: 100%;
  max-width: 100%;
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper {
  background: var(--body-bg-color-dark, #151a1f);
}

.nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper .btn,
.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper .btn {
  margin: 0 !important;
}

.nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper .btn .main-icon,
.nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper .btn .main-icon *,
.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper .btn .main-icon,
.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper .btn .main-icon * {
  color: #111827 !important;
  fill: #111827 !important;
}

body.night-mode .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper .btn-light .main-icon,
body.night-mode .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper .btn-light .main-icon *,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper .btn-light .main-icon,
body.night-mode.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper .btn-light .main-icon * {
  color: #f8fafc !important;
  fill: #f8fafc !important;
}

.nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .dropdown,
.nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown,
.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .dropdown,
.nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0 !important;
}

/* ── Profile tabs ─────────────────────────────────────────────────────────── */

.nf2-profile-shell .nf2-profile-tabs,
.nf2-profile-vue .nf2-profile-tabs {
  display: flex !important;
  justify-content: flex-start !important;
  gap: var(--sf-space-1, 6px);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 24px;
  padding: var(--sf-space-2, 8px);
  border: 1px solid var(--sf-border, rgba(17,24,39,0.08));
  border-radius: var(--sf-radius-lg, 16px);
  box-shadow: 0 10px 28px rgba(15,23,42,0.06);
  scrollbar-width: none;
}

.nf2-profile-shell .nf2-profile-tabs::-webkit-scrollbar,
.nf2-profile-vue .nf2-profile-tabs::-webkit-scrollbar {
  display: none;
}

body.night-mode .nf2-profile-shell .nf2-profile-tabs,
body.night-mode.nf2-profile-vue .nf2-profile-tabs {
  border-color: var(--card-dark-divider, var(--sf-border));
  background: var(--card-dark-color, var(--sf-surface-strong));
  box-shadow: none;
}

.nf2-profile-shell .nf2-profile-tabs a,
.nf2-profile-vue .nf2-profile-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sf-space-1, 4px);
  min-height: 44px;
  min-width: 52px;
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: var(--sf-radius-sm, 8px);
  border-bottom: 0 !important;
  color: var(--sf-text-muted, #4b5563);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nf2-profile-shell .nf2-profile-tabs a .main-icon,
.nf2-profile-shell .nf2-profile-tabs a .main-icon *,
.nf2-profile-vue .nf2-profile-tabs a .main-icon,
.nf2-profile-vue .nf2-profile-tabs a .main-icon * {
  color: #111 !important;
  fill: #111 !important;
}

.nf2-profile-shell .nf2-profile-tabs a:hover,
.nf2-profile-vue .nf2-profile-tabs a:hover {
  background: var(--sf-primary-surface, rgba(94,114,228,0.08));
}

.nf2-profile-shell .nf2-profile-tabs a.active,
body.night-mode .nf2-profile-shell .nf2-profile-tabs a.active,
.nf2-profile-vue .nf2-profile-tabs a.active,
body.night-mode.nf2-profile-vue .nf2-profile-tabs a.active {
  color: #fff;
  background: #0b84f3;
}

.nf2-profile-shell .nf2-profile-tabs a.active .main-icon,
.nf2-profile-shell .nf2-profile-tabs a.active .main-icon *,
.nf2-profile-vue .nf2-profile-tabs a.active .main-icon,
.nf2-profile-vue .nf2-profile-tabs a.active .main-icon * {
  color: #fff !important;
  fill: #fff !important;
}

/* ── Content grid (THE critical fix) ─────────────────────────────────────── */

/*
 * Both .nf2-profile-shell and body.nf2-profile-vue selectors ensure the grid
 * activates regardless of whether the body class has been added yet.
 */

.nf2-profile-shell .nf2-profile-content-grid,
.nf2-profile-vue .nf2-profile-content-grid {
  display: grid !important;
  width: 100%;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sf-container-gap, 24px);
  align-items: start;
  margin: 0;
}

.nf2-profile-shell .nf2-profile-content-grid[data-profile-layout="double"],
.nf2-profile-vue .nf2-profile-content-grid[data-profile-layout="double"] {
  grid-template-columns:
    minmax(280px, clamp(280px, 28vw, 332px))
    minmax(0, 1fr);
}

.nf2-profile-shell .nf2-profile-content-grid[data-profile-layout="triple"],
.nf2-profile-vue .nf2-profile-content-grid[data-profile-layout="triple"] {
  grid-template-columns:
    minmax(248px, clamp(248px, 22vw, 300px))
    minmax(0, 1fr)
    minmax(260px, clamp(260px, 24vw, 320px));
}

/* Pane reset — strips residual Bootstrap column padding / margins */
.nf2-profile-shell .nf2-profile-content-grid > .nf2-profile-pane,
.nf2-profile-shell .nf2-profile-content-grid > [class*="col-"],
.nf2-profile-vue .nf2-profile-content-grid > .nf2-profile-pane,
.nf2-profile-vue .nf2-profile-content-grid > [class*="col-"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  order: initial !important;
}

/* Pane variants */
.nf2-profile-shell .nf2-profile-pane[data-profile-pane="sidebar"],
.nf2-profile-shell .nf2-profile-pane[data-profile-pane="main"],
.nf2-profile-shell .nf2-profile-pane[data-profile-pane="auxiliary"],
.nf2-profile-vue .nf2-profile-pane[data-profile-pane="sidebar"],
.nf2-profile-vue .nf2-profile-pane[data-profile-pane="main"],
.nf2-profile-vue .nf2-profile-pane[data-profile-pane="auxiliary"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Posts stream inside the main pane must fill the full width */
.nf2-profile-shell .nf2-profile-pane[data-profile-pane="main"] .posts_stream,
.nf2-profile-shell .nf2-profile-pane[data-profile-pane="main"] .posts_stream > *,
.nf2-profile-vue .nf2-profile-pane[data-profile-pane="main"] .posts_stream,
.nf2-profile-vue .nf2-profile-pane[data-profile-pane="main"] .posts_stream > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Cards / composer within any pane */
.nf2-profile-shell .nf2-profile-pane .card,
.nf2-profile-shell .nf2-profile-pane .nf2-composer,
.nf2-profile-shell .nf2-profile-pane .alert,
.nf2-profile-shell .nf2-profile-pane .list-group,
.nf2-profile-shell .nf2-profile-pane .profile-card,
.nf2-profile-vue .nf2-profile-pane .card,
.nf2-profile-vue .nf2-profile-pane .nf2-composer,
.nf2-profile-vue .nf2-profile-pane .alert,
.nf2-profile-vue .nf2-profile-pane .list-group,
.nf2-profile-vue .nf2-profile-pane .profile-card {
  width: 100%;
}

/* Card border-radius inside panes */
.nf2-profile-shell .nf2-profile-pane .card,
.nf2-profile-shell .nf2-profile-pane .nf2-composer,
.nf2-profile-shell .nf2-profile-pane .alert,
.nf2-profile-vue .nf2-profile-pane .card,
.nf2-profile-vue .nf2-profile-pane .nf2-composer,
.nf2-profile-vue .nf2-profile-pane .alert {
  border-radius: var(--sf-card-radius, 20px);
}

/* ── Post stream reset (prevent Bootstrap col constraints) ────────────────── */

.nf2-profile-shell .posts-filter,
.nf2-profile-shell .js_posts_stream,
.nf2-profile-shell .js_posts_stream > ul,
.nf2-profile-shell .js_posts_stream > ul > li,
.nf2-profile-shell .js_posts_stream > .post,
.nf2-profile-shell .js_posts_stream > ul > li > .post,
.nf2-profile-vue .posts-filter,
.nf2-profile-vue .js_posts_stream,
.nf2-profile-vue .js_posts_stream > ul,
.nf2-profile-vue .js_posts_stream > ul > li,
.nf2-profile-vue .js_posts_stream > .post,
.nf2-profile-vue .js_posts_stream > ul > li > .post {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}

.nf2-profile-shell .js_posts_stream > ul,
.nf2-profile-vue .js_posts_stream > ul {
  margin: 0;
  padding: 0;
}

.nf2-profile-shell .js_posts_stream > ul > li,
.nf2-profile-vue .js_posts_stream > ul > li {
  list-style: none;
}

/* Post header / meta layout */
.nf2-profile-shell .post-header,
.nf2-profile-vue .post-header {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.nf2-profile-shell .post-avatar,
.nf2-profile-vue .post-avatar {
  display: block;
  flex: 0 0 60px;
  width: 60px;
  min-width: 60px;
}

.nf2-profile-shell .post-meta,
.nf2-profile-vue .post-meta {
  display: block;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.nf2-profile-shell .post-author,
.nf2-profile-shell .post-time,
.nf2-profile-shell .post-text,
.nf2-profile-shell .post-stats,
.nf2-profile-shell .post-actions,
.nf2-profile-shell .post-footer,
.nf2-profile-shell .post-comments,
.nf2-profile-shell .post-comments *,
.nf2-profile-vue .post-author,
.nf2-profile-vue .post-time,
.nf2-profile-vue .post-text,
.nf2-profile-vue .post-stats,
.nf2-profile-vue .post-actions,
.nf2-profile-vue .post-footer,
.nf2-profile-vue .post-comments,
.nf2-profile-vue .post-comments * {
  max-width: 100%;
  min-width: 0;
}

/* ── Responsive breakpoints ───────────────────────────────────────────────── */

@media (min-width: 576px) {
  .nf2-profile-shell .nf2-profile-header .profile-cover-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-cover-wrapper {
    height: 240px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper {
    --nf2-avatar-size: 120px;
    top: 140px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper img,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper img {
    width: var(--nf2-avatar-size);
    height: var(--nf2-avatar-size);
  }
}

@media (min-width: 768px) {
  .nf2-profile-shell .nf2-profile-header .profile-cover-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-cover-wrapper {
    height: 300px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper {
    --nf2-avatar-size: 150px;
    top: 170px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper img,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper img {
    width: var(--nf2-avatar-size);
    height: var(--nf2-avatar-size);
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-change,
  .nf2-profile-shell .nf2-profile-header .profile-avatar-crop,
  .nf2-profile-shell .nf2-profile-header .profile-avatar-delete,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-change,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-crop,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-delete {
    width: 38px;
    height: 38px;
    right: -4px;
    bottom: 4px;
    font-size: 16px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-crop,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-crop {
    bottom: 42px;
    right: -16px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-delete,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-delete {
    top: 8px;
    right: -10px;
    bottom: auto;
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper {
    padding-top: 70px;
  }
}

@media (min-width: 992px) {
  .nf2-profile-shell .nf2-profile-header,
  .nf2-profile-vue .nf2-profile-header {
    margin-bottom: 40px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-cover-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-cover-wrapper {
    height: 360px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper:not(.static),
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper:not(.static) {
    --nf2-avatar-size: 160px;
    top: auto;
    bottom: -25px;
    left: 55px;
    transform: none;
    padding: 4px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper img,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper img {
    width: var(--nf2-avatar-size);
    height: var(--nf2-avatar-size);
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper {
    position: absolute;
    bottom: 20px;
    left: 255px;
    right: auto;
    min-height: 0;
    padding: 0;
    background: transparent !important;
    text-align: left;
    text-shadow: 0 0 3px rgba(0,0,0,0.9);
    justify-content: flex-start;
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-block,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-block {
    justify-items: start;
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-primary,
  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-secondary,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-primary,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-secondary {
    justify-content: flex-start;
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper a:not(.badge),
  body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper a:not(.badge),
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper a:not(.badge),
  body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper a:not(.badge) {
    color: #fff;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper {
    display: flex !important;
    position: absolute;
    right: 15px;
    bottom: 20px;
    width: max-content;
    max-width: min(760px, calc(100% - 320px));
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    background: transparent !important;
    border-radius: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > *,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > * {
    flex: 0 0 auto;
    margin: 0 !important;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .dropdown,
  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .dropdown,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown {
    margin-left: 4px !important;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper::-webkit-scrollbar,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper::-webkit-scrollbar {
    display: none;
  }

  .nf2-profile-shell .nf2-profile-tabs,
  .nf2-profile-vue .nf2-profile-tabs {
    justify-content: center !important;
    padding: 10px;
  }
}

@media (max-width: 1199px) {
  .nf2-profile-page-frame {
    margin-right: 18px;
    margin-left: 18px;
    max-width: none;
  }

  .nf2-profile-layout[data-profile-layout="triple"] {
    grid-template-columns: minmax(220px, 264px) minmax(0, 1fr);
  }

  .nf2-profile-layout[data-profile-layout="triple"] .nf2-profile-rail--secondary {
    grid-column: 1 / -1;
  }

  .nf2-profile-shell .nf2-profile-content-grid[data-profile-layout="double"],
  .nf2-profile-vue .nf2-profile-content-grid[data-profile-layout="double"] {
    grid-template-columns: minmax(252px, 288px) minmax(0, 1fr);
  }

  .nf2-profile-shell .nf2-profile-content-grid[data-profile-layout="triple"],
  .nf2-profile-vue .nf2-profile-content-grid[data-profile-layout="triple"] {
    grid-template-columns: minmax(220px, 264px) minmax(0, 1fr) minmax(220px, 264px);
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > *,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > * {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .dropdown,
  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .dropdown,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown {
    align-self: center;
    flex: 0 0 auto;
    order: 99;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper::-webkit-scrollbar,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper::-webkit-scrollbar {
    display: none;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper .btn,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Mobile — single column */
@media (max-width: 991px) {
  .nf2-profile-page-frame {
    margin: -16px 10px 0;
  }

  .nf2-profile-page-frame .nf2-profile-mobile-sidebar {
    display: block;
  }

  .nf2-profile-shell {
    max-width: 100%;
  }

  .nf2-profile-layout,
  .nf2-profile-layout[data-profile-layout="double"],
  .nf2-profile-layout[data-profile-layout="triple"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .nf2-profile-layout[data-profile-layout="triple"] .nf2-profile-rail--secondary {
    grid-column: auto;
  }

  .nf2-profile-shell .nf2-profile-content-grid,
  .nf2-profile-shell .nf2-profile-content-grid[data-profile-layout="double"],
  .nf2-profile-shell .nf2-profile-content-grid[data-profile-layout="triple"],
  .nf2-profile-vue .nf2-profile-content-grid,
  .nf2-profile-vue .nf2-profile-content-grid[data-profile-layout="double"],
  .nf2-profile-vue .nf2-profile-content-grid[data-profile-layout="triple"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    padding: 0 12px 16px;
    gap: 8px;
    white-space: normal;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nf2-profile-shell .nf2-profile-tabs,
  .nf2-profile-vue .nf2-profile-tabs {
    justify-content: center !important;
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: visible;
    white-space: normal;
    padding: 0 12px 16px;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > *,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > * {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .dropdown,
  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .dropdown,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper > .d-inline-block.dropdown {
    align-self: center;
    flex: 0 0 auto;
    order: 99;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper::-webkit-scrollbar,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper::-webkit-scrollbar {
    display: none;
  }

  .nf2-profile-shell .nf2-profile-header .profile-buttons-wrapper .btn,
  .nf2-profile-vue .nf2-profile-header .profile-buttons-wrapper .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-display-name,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-display-name {
    font-size: clamp(1.15rem, 6.5vw, 1.95rem);
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-secondary,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-secondary {
    font-size: 0.88rem;
  }
}

@media (max-width: 767px) {
  .nf2-profile-shell .nf2-profile-rail,
  .nf2-profile-vue .nf2-profile-rail {
    display: grid;
    gap: 14px;
  }

  .nf2-profile-shell .nf2-profile-rail > .nf2-profile-pane,
  .nf2-profile-vue .nf2-profile-rail > .nf2-profile-pane {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  .nf2-profile-shell .nf2-profile-rail .nf2-mobile-accordion-card,
  .nf2-profile-vue .nf2-profile-rail .nf2-mobile-accordion-card {
    margin: 0;
    border: 1px solid rgba(15, 122, 229, 0.12);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }

  .nf2-profile-shell .nf2-profile-rail .nf2-mobile-accordion-card + .nf2-mobile-accordion-card,
  .nf2-profile-vue .nf2-profile-rail .nf2-mobile-accordion-card + .nf2-mobile-accordion-card {
    margin-top: 0;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header,
  .nf2-profile-vue .nf2-mobile-accordion-header {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    gap: 10px;
    min-height: 54px;
    padding: 12px 14px 12px 16px !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    text-align: left;
  }

  .nf2-profile-shell .nf2-mobile-accordion-card.is-collapsed .nf2-mobile-accordion-header,
  .nf2-profile-vue .nf2-mobile-accordion-card.is-collapsed .nf2-mobile-accordion-header {
    border-bottom-color: transparent;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header > :not(.nf2-mobile-accordion-toggle),
  .nf2-profile-vue .nf2-mobile-accordion-header > :not(.nf2-mobile-accordion-toggle) {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header strong,
  .nf2-profile-shell .nf2-mobile-accordion-header a,
  .nf2-profile-vue .nf2-mobile-accordion-header strong,
  .nf2-profile-vue .nf2-mobile-accordion-header a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto !important;
    max-width: 100%;
    min-width: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left !important;
    justify-content: flex-start !important;
    color: #102033;
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.2;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header > strong,
  .nf2-profile-shell .nf2-mobile-accordion-header > a,
  .nf2-profile-vue .nf2-mobile-accordion-header > strong,
  .nf2-profile-vue .nf2-mobile-accordion-header > a {
    order: 1;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header .float-end,
  .nf2-profile-shell .nf2-mobile-accordion-header .float-start,
  .nf2-profile-vue .nf2-mobile-accordion-header .float-end,
  .nf2-profile-vue .nf2-mobile-accordion-header .float-start {
    order: 2;
    flex: 0 0 auto;
    float: none !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header small,
  .nf2-profile-vue .nf2-mobile-accordion-header small {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header small a,
  .nf2-profile-vue .nf2-mobile-accordion-header small a {
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(15, 122, 229, 0.08);
    color: #0f7ae5;
    font-size: 12px;
    font-weight: 800;
  }

  .nf2-profile-shell .nf2-mobile-accordion-toggle,
  .nf2-profile-vue .nf2-mobile-accordion-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    order: 3;
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    margin-left: auto;
    margin-right: 0;
    padding: 0;
    border: 1px solid rgba(15, 122, 229, 0.16);
    border-radius: 999px;
    background: rgba(15, 122, 229, 0.08);
    color: #0f7ae5;
    font: inherit;
    font-weight: 700;
    line-height: 1;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header > .nf2-mobile-accordion-toggle:first-child,
  .nf2-profile-vue .nf2-mobile-accordion-header > .nf2-mobile-accordion-toggle:first-child {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .nf2-profile-shell .nf2-mobile-accordion-header > strong:first-child,
  .nf2-profile-shell .nf2-mobile-accordion-header > a:first-child,
  .nf2-profile-vue .nf2-mobile-accordion-header > strong:first-child,
  .nf2-profile-vue .nf2-mobile-accordion-header > a:first-child {
    flex: 0 1 auto;
    justify-content: flex-start;
  }

  .nf2-profile-shell .nf2-mobile-accordion-toggle__label,
  .nf2-profile-vue .nf2-mobile-accordion-toggle__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nf2-profile-shell .nf2-mobile-accordion-toggle__chevron,
  .nf2-profile-vue .nf2-mobile-accordion-toggle__chevron {
    width: 8px;
    height: 8px;
    margin: 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
  }

  .nf2-profile-shell .nf2-mobile-accordion-card.is-open .nf2-mobile-accordion-toggle__chevron,
  .nf2-profile-vue .nf2-mobile-accordion-card.is-open .nf2-mobile-accordion-toggle__chevron {
    transform: rotate(225deg);
  }

  .nf2-profile-shell .nf2-mobile-accordion-card.is-collapsed > .card-body,
  .nf2-profile-shell .nf2-mobile-accordion-card.is-collapsed > .list-group,
  .nf2-profile-vue .nf2-mobile-accordion-card.is-collapsed > .card-body,
  .nf2-profile-vue .nf2-mobile-accordion-card.is-collapsed > .list-group {
    display: none !important;
  }

  body.night-mode .nf2-profile-shell .nf2-mobile-accordion-toggle,
  body.night-mode.nf2-profile-vue .nf2-mobile-accordion-toggle {
    color: #74b6ff;
    border-color: rgba(116, 182, 255, 0.22);
    background: rgba(116, 182, 255, 0.12);
  }

  body.night-mode .nf2-profile-shell .nf2-profile-rail .nf2-mobile-accordion-card,
  body.night-mode.nf2-profile-vue .nf2-profile-rail .nf2-mobile-accordion-card {
    border-color: rgba(148, 163, 184, 0.14);
    background: #172231;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
  }

  body.night-mode .nf2-profile-shell .nf2-mobile-accordion-header,
  body.night-mode.nf2-profile-vue .nf2-mobile-accordion-header {
    border-bottom-color: rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88) 0%, rgba(18, 27, 39, 0.98) 100%);
  }

  body.night-mode .nf2-profile-shell .nf2-mobile-accordion-header strong,
  body.night-mode .nf2-profile-shell .nf2-mobile-accordion-header a,
  body.night-mode.nf2-profile-vue .nf2-mobile-accordion-header strong,
  body.night-mode.nf2-profile-vue .nf2-mobile-accordion-header a {
    color: #e2ebf5;
  }

  body.night-mode .nf2-profile-shell .nf2-mobile-accordion-header small a,
  body.night-mode.nf2-profile-vue .nf2-mobile-accordion-header small a {
    background: rgba(116, 182, 255, 0.12);
    color: #9ccaff;
  }
}

/* Keep the identity block below the overlapping avatar on every compact viewport. */
@media (max-width: 991px) {
  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper {
    position: relative !important;
    inset: auto !important;
    z-index: 2;
    min-height: 0 !important;
    padding: 78px 18px 16px !important;
    background: #fff !important;
    text-align: center;
  }

  body.night-mode .nf2-profile-shell .nf2-profile-header .profile-name-wrapper,
  body.night-mode.nf2-profile-vue .nf2-profile-header .profile-name-wrapper {
    background: var(--body-bg-color-dark, #151a1f) !important;
  }

  .nf2-profile-shell .nf2-profile-header .profile-avatar-wrapper,
  .nf2-profile-vue .nf2-profile-header .profile-avatar-wrapper {
    z-index: 30;
  }

  .nf2-profile-shell .nf2-profile-header .profile-name-wrapper .profile-identity-block,
  .nf2-profile-vue .nf2-profile-header .profile-name-wrapper .profile-identity-block {
    position: relative;
    z-index: 3;
  }
}
