.newsfeed-v2-root {
  --nf2-bg: #f5f8fd;
  --nf2-surface: #ffffff;
  --nf2-text: #10213a;
  --nf2-muted: #61708a;
  --nf2-border: #d8e3f0;
  --nf2-accent: #0f766e;
}

.newsfeed-v2-shell {
  border: 1px solid var(--nf2-border);
  border-radius: 18px;
  background: radial-gradient(1000px 360px at 0% -40%, #daf4ff 0%, var(--nf2-bg) 45%, #f5f8fd 100%);
  padding: 16px;
  margin-bottom: 16px;
  animation: nf2-fade .25s ease;
}

.newsfeed-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.newsfeed-v2-kicker {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 11px;
  color: var(--nf2-muted);
}

.newsfeed-v2-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  color: var(--nf2-text);
}

.newsfeed-v2-actions {
  display: flex;
  gap: 8px;
}

.newsfeed-v2-rail {
  display: flex;
  gap: 8px;
  margin: 6px 0 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.newsfeed-v2-chip {
  border: 1px solid var(--nf2-border);
  background: #fff;
  color: var(--nf2-text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.newsfeed-v2-chip.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

.newsfeed-v2-mode,
.newsfeed-v2-refresh {
  border: 1px solid var(--nf2-border);
  background: var(--nf2-surface);
  color: var(--nf2-text);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  text-decoration: none;
}

.newsfeed-v2-mode.is-active {
  background: var(--nf2-accent);
  color: #fff;
  border-color: var(--nf2-accent);
}

.newsfeed-v2-alert {
  margin-bottom: 10px;
  border: 1px dashed var(--nf2-border);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--nf2-muted);
  font-size: 13px;
}

.newsfeed-v2-loader,
.newsfeed-v2-error {
  margin-bottom: 10px;
}

.newsfeed-v2-loader:not(.x-hidden)::after {
  content: "";
  display: block;
  margin-top: 8px;
  height: 88px;
  border-radius: 14px;
  background: linear-gradient(90deg, #edf2f7 0%, #f7fafc 40%, #edf2f7 100%);
  background-size: 200% 100%;
  animation: nf2-shimmer 1.1s linear infinite;
}

.newsfeed-v2-error {
  color: #b42318;
}

.newsfeed-v2-stream .posts-filter {
  border: 1px solid var(--nf2-border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--nf2-surface);
}

/* ── Newsfeed v2: post-type filter bar ───────────────────────────────────── */
body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters,
.js_posts-filter.ele_post_filters {
  margin: 0 0 12px;
  padding: 6px;
  border: 1px solid var(--nf2-border);
  border-radius: 14px;
  background: var(--nf2-surface);
  /* clip children to rounded corners without hiding the scrollbar */
  overflow: hidden;
}

body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav,
.js_posts-filter .ele_post_filters_nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  scrollbar-width: none;
}

body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav.is-dragging,
.js_posts-filter .ele_post_filters_nav.is-dragging {
  cursor: grabbing;
  user-select: none;
}

body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav::-webkit-scrollbar,
.js_posts-filter .ele_post_filters_nav::-webkit-scrollbar {
  display: none;
}

body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby,
.js_posts-filter .ele_post_filters_nav > .filterby {
  /* override btn-mat's line-height: 40px so height is driven by padding alone */
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1 !important;
  min-height: unset !important;
  height: 36px;
  padding: 0 14px !important;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--nf2-muted);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby svg,
.js_posts-filter .ele_post_filters_nav > .filterby svg {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  flex-shrink: 0;
}

body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby:hover,
.js_posts-filter .ele_post_filters_nav > .filterby:hover {
  background: rgba(15, 118, 110, 0.06);
  color: var(--nf2-text);
}

body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby.active,
.js_posts-filter .ele_post_filters_nav > .filterby.active {
  background: var(--nf2-accent, #0f766e);
  color: #fff;
  border-color: transparent;
}

/* night-mode filter overrides */
body.night-mode.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters,
body.night-mode .js_posts-filter.ele_post_filters {
  background: var(--card-dark-color, #1e2431);
  border-color: rgba(255,255,255,0.08);
}

body.night-mode.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby,
body.night-mode .js_posts-filter .ele_post_filters_nav > .filterby {
  color: #9aa5b4;
}

body.night-mode.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby:hover,
body.night-mode .js_posts-filter .ele_post_filters_nav > .filterby:hover {
  background: rgba(255,255,255,0.06);
  color: #e8eaf0;
}

body.night-mode.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby.active,
body.night-mode .js_posts-filter .ele_post_filters_nav > .filterby.active {
  background: #0f766e;
  color: #fff;
}

.newsfeed-v2-stream .js_posts_stream > ul {
  gap: 10px;
}

/* ── Mobile full-bleed feed (≤600px) ─────────────────────────────────────── */
@media (max-width: 600px) {
  /* Break out of Bootstrap column padding so feed fills viewport edge-to-edge */
  body.newsfeed-v2-active .newsfeed-v2-shell,
  .newsfeed-v2-shell {
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 0;
    padding-right: 0;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  /* Keep top/bottom internal padding on composer and filter bar */
  body.newsfeed-v2-active .newsfeed-v2-shell .nf2-composer,
  .newsfeed-v2-shell .nf2-composer,
  body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters,
  .newsfeed-v2-stream .posts-filter {
    margin-left: 10px;
    margin-right: 10px;
  }

  /* Header (For You / Following) keeps side padding */
  .newsfeed-v2-shell .newsfeed-v2-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Posts fill full width — no rounded corners, no side shadow */
  body.nf2-site-shell-active .js_posts_stream > ul > li > .post:not(.ele_post_skel),
  body.nf2-site-shell-active .js_posts_stream > .post:not(.ele_post_skel),
  .newsfeed-v2-stream .post:not(.ele_post_skel) {
    border-radius: 0 !important;
    border-left: none;
    border-right: none;
    box-shadow: none !important;
  }

  /* Tighten gap between posts on mobile */
  .newsfeed-v2-stream .js_posts_stream > ul {
    gap: 6px;
  }
}

body.nf2-site-shell-active .js_posts_stream > ul > li > .post:not(.ele_post_skel),
body.nf2-site-shell-active .js_posts_stream > .post:not(.ele_post_skel),
.newsfeed-v2-stream .post:not(.ele_post_skel) {
  border-radius: 16px;
  overflow: visible;
  border-color: var(--nf2-border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  background: linear-gradient(90deg, #0f766e, #38bdf8, #f59e0b) top/100% 4px no-repeat, #fff !important;
  transform: translateY(10px);
  opacity: .01;
  animation: nf2-rise .28s ease forwards;
}

body.nf2-site-shell-active .nf2-dropdown-host-open,
body.newsfeed-v2-active .nf2-dropdown-host-open {
  position: relative;
  z-index: 1043 !important;
}

body.nf2-site-shell-active .nf2-dropdown-host-open .dropdown-menu.show,
body.newsfeed-v2-active .nf2-dropdown-host-open .dropdown-menu.show {
  z-index: 1044 !important;
}

body.nf2-site-shell-active .js_posts_stream > ul > li > .post::before,
body.nf2-site-shell-active .js_posts_stream > .post::before,
body.newsfeed-v2-active .newsfeed-v2-stream .post::before {
  content: none !important;
}

.nf2-composer {
  margin: 0 0 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--nf2-border);
  border-radius: 14px;
}

.nf2-composer-box {
  width: 100%;
  border: 1px solid #dce6f4;
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fbff;
  color: var(--nf2-text);
}

.nf2-composer-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  color: #fff;
  font-size: 12px;
}

.nf2-composer-text {
  color: var(--nf2-muted);
  font-weight: 500;
}

.nf2-composer-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nf2-pill {
  border: 1px solid var(--nf2-border);
  background: #fff;
  color: var(--nf2-text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

.nf2-post {
  border-width: 1px !important;
  transition: box-shadow .18s ease, transform .18s ease;
}

.nf2-post:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  transform: translateY(-1px);
}

.newsfeed-v2-stream .post-footer,
.newsfeed-v2-stream .post-actions {
  border-top-color: #e6edf7 !important;
}

.newsfeed-v2-stream .post-action,
.newsfeed-v2-stream .post-footer .btn,
.newsfeed-v2-stream .post-footer button {
  border-radius: 11px !important;
  font-weight: 600;
}

.newsfeed-v2-stream .post-action:hover,
.newsfeed-v2-stream .post-footer .btn:hover,
.newsfeed-v2-stream .post-footer button:hover {
  background: #f1f6fd !important;
}

.newsfeed-v2-stream .js_see-more {
  border-radius: 12px;
  border: 1px solid #d8e3f0;
  background: #fff;
  color: #1d3557;
  font-weight: 600;
}

.newsfeed-v2-stream .js_see-more.done {
  background: #f8fbff;
  color: #6b7a90;
}

.nf2-empty-state {
  border: 1px dashed #cbd8ea;
  border-radius: 14px;
  padding: 14px;
  background: #f8fbff;
}

.newsfeed-v2-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 12px;
}

/* Right-side card upgrades for v2 mode */
body.newsfeed-v2-active .right-sidebar .card {
  border: 1px solid #dbe5f2;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

body.newsfeed-v2-active .right-sidebar .card .card-header {
  border-bottom: 1px solid #e6edf7;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.newsfeed-v2-active .right-sidebar .card .card-body {
  padding: 12px;
}

body.newsfeed-v2-active .right-sidebar .user-box {
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

body.newsfeed-v2-active .right-sidebar .user-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.10);
}

body.newsfeed-v2-active .right-sidebar .user-box img {
  border-radius: 10px;
}

body.newsfeed-v2-active .right-sidebar .badge,
body.newsfeed-v2-active .right-sidebar .list-group-item,
body.newsfeed-v2-active .right-sidebar .trending-item {
  border-radius: 12px;
}

body.newsfeed-v2-active .right-sidebar a[href*="hashtag"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e3f0;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  color: #1e293b;
  font-weight: 600;
}

.newsfeed-v2-stream .post + .post {
  animation-delay: .04s;
}

.newsfeed-v2-stream .post-header,
.newsfeed-v2-stream .post-footer {
  padding-left: 2px;
  padding-right: 2px;
}

.newsfeed-v2-stream .post .post__action-btn,
.newsfeed-v2-stream .post .reaction-btn {
  border-radius: 12px;
}

@keyframes nf2-rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes nf2-fade {
  from { opacity: .4; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes nf2-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.nf2-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(12, 18, 28, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  height: 100dvh;
  min-height: 0;
  overflow: auto;
  backdrop-filter: blur(8px);
}

body.newsfeed-v2-active.nf2-modal-open {
  overflow: hidden !important;
}

body.nf2-publisher-modal-open {
  overflow: hidden !important;
}

.nf2-modal-window {
  width: min(860px, calc(100vw - 28px));
  max-height: min(92dvh, calc(100dvh - 28px));
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(210, 224, 240, 0.85);
  box-shadow: 0 26px 64px rgba(9, 23, 46, 0.34);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.newsfeed-v2-active,
body.nf2-header-mounted {
  --nf2-composer-modal-top: var(--sovf-fixed-header-offset, 56px);
}

.nf2-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e6edf7;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  min-height: 58px;
}

.nf2-modal-head strong {
  font-size: 16px;
  line-height: 1.2;
  color: #10213a;
}

.nf2-modal-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nf2-modal-post-btn {
  border: 0;
  min-width: 104px;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: #087ee8;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 24px -16px rgba(8, 126, 232, 0.9);
}

.nf2-modal-post-btn:hover,
.nf2-modal-post-btn:focus {
  background: #076fcc;
  color: #fff;
}

.nf2-modal-close-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 0;
  border-radius: 999px;
  background-color: #f1f5f9;
  color: #0f172a;
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 1;
  position: relative;
}

.nf2-modal-close-btn::before,
.nf2-modal-close-btn::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nf2-modal-close-btn::before {
  transform: rotate(45deg);
}

.nf2-modal-close-btn::after {
  transform: rotate(-45deg);
}

.nf2-modal-close-btn:hover,
.nf2-modal-close-btn:focus {
  background: #e2e8f0;
  color: #020617;
}

/* Loading / error states inside Vue publisher modal */
.nf2-modal-loading {
  padding: 20px 14px;
  color: #6b7a90;
  font-size: 14px;
}

.nf2-modal-error {
  padding: 10px 14px;
  color: #991b1b;
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  font-size: 13px;
}

.nf2-create-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding: 18px 22px 16px;
  background:
    radial-gradient(120px 80px at 0% 0%, rgba(59, 130, 246, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.nf2-create-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.nf2-create-modal-close {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  margin: 0;
  background: rgba(241, 245, 249, 0.96);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.nf2-create-modal-close:hover,
.nf2-create-modal-close:focus {
  background: #e2e8f0;
  color: #020617;
}

.nf2-create-modal-close span {
  display: block;
  transform: translateY(-1px);
}

.nf2-create-modal-kicker {
  margin-bottom: 4px;
  color: #5f6f86;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nf2-create-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: #fff;
  box-shadow: 0 16px 32px rgba(29, 78, 216, 0.22);
  flex-shrink: 0;
}

.nf2-create-modal-icon i {
  font-size: 17px;
}

.nf2-create-form__body {
  padding: 22px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(191, 219, 254, 0.28), transparent 72%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.nf2-create-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.nf2-create-form__intro {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #5f6f86;
}

.nf2-create-form__intro strong {
  color: #11213a;
  font-size: 15px;
}

.nf2-create-form__section {
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.nf2-create-form__section + .nf2-create-form__section {
  margin-top: 16px;
}

.nf2-create-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.nf2-create-field {
  margin-bottom: 0;
}

.nf2-create-field--full {
  grid-column: 1 / -1;
}

.nf2-create-form .form-control-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 8px;
  color: #12243d;
  font-size: 13px;
  font-weight: 700;
}

.nf2-create-form .form-control,
.nf2-create-form .input-group-text {
  min-height: 48px;
  border-radius: 14px;
  border-color: #d8e3f0;
  background: #f8fbff;
  color: #11213a;
  box-shadow: none;
}

.nf2-create-form textarea.form-control {
  min-height: 128px;
  resize: vertical;
}

.nf2-create-form .form-control:focus {
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.nf2-create-form .input-group-text {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #5f6f86;
}

.nf2-create-form .form-text {
  color: #6b7b91;
  font-size: 12px;
  line-height: 1.5;
}

.nf2-create-form__section--toggles {
  display: grid;
  gap: 14px;
}

.nf2-create-toggle-row {
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 14px 0;
}

.nf2-create-toggle-row + .nf2-create-toggle-row {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.nf2-create-form__footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.nf2-create-form__submit {
  min-width: 140px;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18);
}

body.night-mode .nf2-create-modal-header {
  border-bottom-color: rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(120px 80px at 0% 0%, rgba(59, 130, 246, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(18, 27, 42, 0.96), rgba(15, 23, 42, 0.98));
}

body.night-mode .nf2-create-modal-kicker,
body.night-mode .nf2-create-form__intro,
body.night-mode .nf2-create-form .form-text,
body.night-mode .nf2-create-form .input-group-text {
  color: #97a6ba;
}

body.night-mode .nf2-create-form__body {
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(37, 99, 235, 0.12), transparent 72%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

body.night-mode .nf2-create-form__intro,
body.night-mode .nf2-create-form__section,
body.night-mode .nf2-create-form__footer {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.86);
}

body.night-mode .nf2-create-form__intro strong,
body.night-mode .nf2-create-form .form-control-label,
body.night-mode .nf2-create-modal-header .modal-title {
  color: #e5edf8;
}

body.night-mode .nf2-create-form .form-control,
body.night-mode .nf2-create-form .input-group-text {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(30, 41, 59, 0.88);
  color: #e5edf8;
}

body.night-mode .nf2-create-modal-close {
  background: rgba(30, 41, 59, 0.92);
  color: #e5edf8;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

/* Hide duplicate close btn rendered by _publisher.tpl _modal_mode;
   the Vue modal header already provides a close button. */
.nf2-publisher-modal-root .js_close-publisher-modal {
  display: none !important;
}

/* Hide the publisher-overlay inside the Vue modal — Bootstrap backdrop
   is replaced by .nf2-modal-backdrop */
.nf2-publisher-modal-root .publisher-overlay {
  display: none !important;
}

.nf2-modal-mount {
  padding: 10px;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.nf2-modal-mount #publisher-wapper {
  margin: 0;
}

.nf2-vue-publisher {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  flex-direction: column;
  background: #fff;
}

.nf2-vue-rich-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid #e6edf7;
}

.nf2-vue-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.nf2-vue-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nf2-vue-switch span {
  position: relative;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: inset 0 0 0 1px #d1d5db;
}

.nf2-vue-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.24);
  transition: transform 0.16s ease;
}

.nf2-vue-switch input:checked + span {
  background: #087ee8;
  box-shadow: none;
}

.nf2-vue-switch input:checked + span::after {
  transform: translateX(14px);
}

.nf2-vue-switch b {
  font-weight: 500;
}

.nf2-vue-composer-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  min-height: 160px;
  padding: 18px 28px 22px;
  border-bottom: 1px solid #e6edf7;
}

.nf2-vue-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.nf2-vue-avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f1f5f9;
}

.nf2-vue-composer-main textarea {
  width: 100%;
  min-height: 132px;
  padding: 8px 0;
  border: 0;
  outline: 0;
  resize: none;
  color: #111827;
  background: transparent;
  font-size: 16px;
  line-height: 1.55;
}

.nf2-vue-composer-main textarea::placeholder {
  color: #111827;
  opacity: 1;
  font-weight: 700;
}

.nf2-vue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 6px 28px;
  border-bottom: 1px solid #e6edf7;
  background: #f8fafc;
}

.nf2-vue-privacy,
.nf2-vue-inline-actions button {
  border: 0;
  background: transparent;
  color: #111827;
  cursor: pointer;
}

.nf2-vue-privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #dbe3ee;
  font-size: 13px;
  font-weight: 700;
}

.nf2-vue-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nf2-vue-inline-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 18px;
}

.nf2-vue-inline-actions button:hover {
  background: #e8eef6;
}

.nf2-vue-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 28px;
}

.nf2-vue-tool {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 78px;
  padding: 10px;
  border: 1px solid #dfe8f5;
  border-radius: 10px;
  background: #f8fbff;
  color: #203047;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nf2-vue-tool i {
  color: #087ee8;
  font-size: 22px;
}

.nf2-vue-tool:hover,
.nf2-vue-tool.is-active {
  background: #edf6ff;
  border-color: #9dccf8;
  color: #075aa0;
}

.nf2-vue-options {
  margin: 0 28px 22px;
  border-top: 1px solid #e6edf7;
}

.nf2-vue-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  margin: 0;
  border-bottom: 1px solid #e6edf7;
  cursor: pointer;
}

.nf2-vue-option span {
  display: grid;
  gap: 3px;
}

.nf2-vue-option strong {
  color: #1f2937;
  font-size: 15px;
  line-height: 1.2;
}

.nf2-vue-option small {
  color: #75859c;
  font-size: 13px;
}

.nf2-vue-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nf2-vue-option i {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 30px;
  border-radius: 999px;
  background: #e5e7eb;
}

.nf2-vue-option i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18);
  transition: transform 0.16s ease;
}

.nf2-vue-option input:checked + i {
  background: #087ee8;
}

.nf2-vue-option input:checked + i::after {
  transform: translateX(18px);
}

.nf2-publisher-legacy-backing {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.nf2-publisher-legacy-backing input[type="file"] {
  pointer-events: auto !important;
}

@media (max-width: 767px) {
  .nf2-create-modal-header,
  .nf2-create-form__body,
  .nf2-create-form__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nf2-create-form__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .nf2-create-form__section {
    padding: 16px;
    border-radius: 18px;
  }

  .nf2-modal-backdrop {
    inset: 0 !important;
    align-items: center;
    justify-content: center;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }

  .nf2-modal-window {
    width: min(720px, calc(100vw - 20px));
    height: auto;
    max-height: min(92dvh, calc(100dvh - 20px));
    border-radius: 16px;
  }

  .nf2-modal-mount {
    padding: 6px;
  }

  .nf2-vue-rich-row,
  .nf2-vue-composer-main,
  .nf2-vue-toolbar,
  .nf2-vue-tool-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nf2-vue-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nf2-vue-options {
    margin-left: 16px;
    margin-right: 16px;
  }

  .nf2-modal-head {
    min-height: 56px;
    padding: 8px 10px 8px 14px;
  }

  .nf2-modal-post-btn {
    min-width: 86px;
    min-height: 40px;
    padding: 0 16px;
  }

  .nf2-modal-close-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 26px;
  }

  .newsfeed-v2-stream .post-actions {
    gap: 8px;
  }

  .newsfeed-v2-stream .post-actions > .valign {
    width: auto;
    justify-content: flex-start;
    gap: 6px;
  }

  .newsfeed-v2-stream .post-actions > .valign:last-child {
    margin-left: auto;
  }

  .newsfeed-v2-stream .post-actions .action-btn,
  .newsfeed-v2-stream .post-actions .reaction-btn {
    flex: 0 0 auto;
    width: 42px;
    min-width: 42px;
    height: 42px;
    justify-content: center;
    font-size: 0;
    gap: 0;
    padding: 0;
  }

  .newsfeed-v2-stream .post-actions .action-btn span,
  .newsfeed-v2-stream .post-actions .reaction-btn-name,
  .newsfeed-v2-stream .post-actions .action-btn.js_comment span {
    display: none !important;
  }

  .newsfeed-v2-stream .post-meta .title {
    align-items: flex-start;
    row-gap: 3px;
  }

  .newsfeed-v2-stream .post-meta .title .post-title {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    line-height: 1.25;
    color: #64748b;
    font-weight: 600;
  }

  .newsfeed-v2-stream .post-meta .title .post-title .post-author {
    color: #0f172a;
    font-weight: 700;
  }

  .newsfeed-v2-stream .post-meta .title .post-title .fa-caret-right {
    margin-left: 2px !important;
    margin-right: 2px !important;
    opacity: 0.65;
  }

  .newsfeed-v2-stream .post-meta .title .post-title .badge.rounded-pill {
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
  }

  .newsfeed-v2-stream .post-time {
    margin-top: 6px;
    gap: 4px;
  }

  .newsfeed-v2-stream .post-time .post-sub-item {
    font-size: 12px;
    color: #64748b;
  }
}

/* Vue modal owns the frame; flatten legacy publisher chrome when embedded */
.nf2-publisher-embedded .publisher-overlay,
.nf2-publisher-embedded .publisher-close,
.nf2-publisher-embedded .daytime_message {
  display: none !important;
}

.nf2-publisher-embedded .publisher {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  width: 100% !important;
  max-width: none !important;
}

.nf2-publisher-embedded .publisher-message,
.nf2-publisher-embedded .publisher-tools-tabs,
.nf2-publisher-embedded .publisher-footer,
.nf2-publisher-embedded .publisher-meta,
.nf2-publisher-embedded .publisher-attachments {
  border-left: 0 !important;
  border-right: 0 !important;
}

.nf2-publisher-embedded .publisher-message {
  border-top: 0 !important;
  padding: 14px 14px 14px 68px !important;
  min-height: 138px !important;
  position: relative !important;
}

.nf2-publisher-embedded .x-form.publisher,
.nf2-publisher-embedded .publisher {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.nf2-publisher-embedded .publisher-slider {
  display: block !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
}

.nf2-publisher-embedded .publisher > .publisher-slider:first-of-type {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: #fff !important;
  box-shadow: none !important;
}

.nf2-publisher-embedded .publisher-footer.valign {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-height: 56px !important;
  padding: 8px 12px !important;
  background: #fff !important;
}

/* Vue modal already provides the primary submit action in the header */
.nf2-modal-mount .publisher-footer .publisher-footer-options,
.nf2-publisher-embedded .publisher-footer .js_publisher-btn {
  display: none !important;
}

.nf2-publisher-embedded .publisher-message:not(.colored) .colored-text-wrapper,
body.publisher-focus .nf2-publisher-embedded .publisher-message:not(.colored) .colored-text-wrapper {
  display: flex !important;
  align-items: stretch !important;
  height: auto !important;
  min-height: 112px !important;
}

.nf2-publisher-embedded .publisher-message:not(.colored) .colored-text-wrapper textarea,
body.publisher-focus .nf2-publisher-embedded .publisher-message:not(.colored) .colored-text-wrapper textarea {
  height: auto !important;
  min-height: 112px !important;
  max-height: 190px !important;
  line-height: 1.5 !important;
  padding: 0 !important;
  text-align: left !important;
  background: transparent !important;
  border-radius: 0 !important;
}


/* Critical v2 fallback styles (scoped) */
body.newsfeed-v2-active .newsfeed-v2-shell {
  border: 1px solid #d8e3f0;
  border-radius: 16px;
  background: #f7fbff;
  padding: 14px;
  margin-bottom: 14px;
}

body.newsfeed-v2-active .newsfeed-v2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

body.newsfeed-v2-active .newsfeed-v2-actions {
  display: flex;
  gap: 8px;
}

body.newsfeed-v2-active .newsfeed-v2-mode {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8e3f0;
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  color: #10213a;
  background: #fff;
  font-weight: 600;
}

body.newsfeed-v2-active .newsfeed-v2-mode.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

body.newsfeed-v2-active .nf2-composer {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #fff;
}

body.newsfeed-v2-active .nf2-composer-box {
  width: 100%;
  border: 1px solid #dce6f4;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fbff;
  color: #10213a;
}

body.newsfeed-v2-active .nf2-composer-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.newsfeed-v2-active .nf2-pill {
  border: 1px solid #d8e3f0;
  border-radius: 999px;
  background: #fff;
  color: #10213a;
  padding: 6px 12px;
  font-weight: 600;
}

@media  (max-width: 767px) {
  body.newsfeed-v2-active .newsfeed-v2-actions,
  body.newsfeed-v2-active .nf2-composer-actions,
  body.newsfeed-v2-active .newsfeed-v2-stream .posts-filter {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  body.newsfeed-v2-active .newsfeed-v2-mode,
  body.newsfeed-v2-active .nf2-pill {
    flex: 0 0 auto;
  }
}

/* Sidebar polish for Vue newsfeed mode */
body.newsfeed-v2-active .ele_navbar_top_side {
  border-radius: 18px;
  border: 1px solid #d8e3f0;
  background: #ffffff;
  box-shadow: 0 24px 50px -30px rgba(15, 23, 42, 0.45);
}

body.newsfeed-v2-active .ele_navbar_top_side .sidebar_innr {
  padding: 14px 14px 18px !important;
}

body.newsfeed-v2-active .ele_navbar_top_side_all_heading.js_mobile_menu_accordion {
  margin: 12px 0 8px;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #344256;
}

body.newsfeed-v2-active .ele_navbar_top_side_all_heading.js_mobile_menu_accordion:hover {
  background: #f5f8fc;
}

body.newsfeed-v2-active .ele_navbar_top_side_all_sec.menu-accordion-body a {
  border: 1px solid #e3ebf5;
  background: #fbfdff;
  border-radius: 12px;
  color: #223047;
  transition: all .18s ease;
}

body.newsfeed-v2-active .ele_navbar_top_side_all_sec.menu-accordion-body a:hover {
  border-color: #cfe0f5;
  background: #f3f8ff;
  transform: translateY(-1px);
}

body.newsfeed-v2-active .ele_navbar_top_side .ele_navbar_profile_quick {
  margin-bottom: 10px;
  padding-bottom: 14px;
}

/* Professional polish pass (scoped to Vue newsfeed only) */
body.newsfeed-v2-active,
body.nf2-site-shell-active {
  --nf2-surface: #ffffff;
  --nf2-surface-soft: #f8fbff;
  --nf2-border: #dbe7f4;
  --nf2-border-strong: #cbdcf0;
  --nf2-text: #1a2840;
  --nf2-muted: #6e7f96;
  --nf2-accent: #0b84f3;
}

body.newsfeed-v2-active .newsfeed-v2-shell {
  background: linear-gradient(180deg, #f9fcff 0%, #f3f8ff 100%);
  border: 1px solid var(--nf2-border);
  border-radius: 18px;
  box-shadow: 0 20px 42px -32px rgba(14, 40, 74, 0.5);
  padding: 16px;
}

body.newsfeed-v2-active .newsfeed-v2-title {
  color: var(--nf2-text);
  letter-spacing: 0.02em;
}

body.newsfeed-v2-active .newsfeed-v2-kicker {
  color: var(--nf2-muted);
  letter-spacing: 0.12em;
}

body.newsfeed-v2-active .newsfeed-v2-mode {
  border: 1px solid var(--nf2-border-strong);
  background: var(--nf2-surface);
  color: var(--nf2-text);
  font-weight: 700;
  box-shadow: 0 6px 14px -12px rgba(15, 33, 60, 0.35);
}

body.newsfeed-v2-active .newsfeed-v2-mode.is-active {
  background: linear-gradient(135deg, #0e8af8 0%, #0a71d4 100%);
  border-color: #0a71d4;
  color: #fff;
}

body.newsfeed-v2-active .nf2-composer {
  border: 1px solid var(--nf2-border);
  border-radius: 16px;
  background: var(--nf2-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.newsfeed-v2-active .nf2-composer-box {
  border: 1px solid var(--nf2-border);
  background: var(--nf2-surface-soft);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

body.newsfeed-v2-active .nf2-composer-box:hover {
  border-color: #bfd5ee;
  background: #f3f9ff;
  box-shadow: 0 10px 20px -18px rgba(17, 74, 136, 0.5);
}

body.newsfeed-v2-active .nf2-pill {
  border: 1px solid var(--nf2-border);
  background: var(--nf2-surface);
  color: #243651;
  font-weight: 700;
  transition: all .18s ease;
}

body.newsfeed-v2-active .nf2-pill:hover {
  border-color: #bdd4ef;
  background: #f2f8ff;
}

body.nf2-site-shell-active .js_posts_stream > ul > li > .post:not(.ele_post_skel),
body.nf2-site-shell-active .js_posts_stream > .post:not(.ele_post_skel),
body.newsfeed-v2-active .newsfeed-v2-stream .post:not(.ele_post_skel) {
  box-shadow: 0 16px 34px -28px rgba(15, 34, 64, 0.45);
}

body.nf2-site-shell-active .js_posts_stream .post .post-header,
body.newsfeed-v2-active .newsfeed-v2-stream .post .post-header {
  color: var(--nf2-text);
}

body.nf2-site-shell-active .js_posts_stream .post .post-time,
body.nf2-site-shell-active .js_posts_stream .post .post-meta,
body.nf2-site-shell-active .js_posts_stream .post .text-muted,
body.newsfeed-v2-active .newsfeed-v2-stream .post .post-time,
body.newsfeed-v2-active .newsfeed-v2-stream .post .post-meta,
body.newsfeed-v2-active .newsfeed-v2-stream .post .text-muted {
  color: var(--nf2-muted) !important;
}

body.newsfeed-v2-active .ele_navbar_top_side {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

body.newsfeed-v2-active .ele_navbar_top_side .sidebar_innr {
  scrollbar-width: thin;
}

body.newsfeed-v2-active .ele_navbar_top_side .sidebar_innr::-webkit-scrollbar {
  width: 7px;
}

body.newsfeed-v2-active .ele_navbar_top_side .sidebar_innr::-webkit-scrollbar-thumb {
  background: #d2deec;
  border-radius: 99px;
}

body.newsfeed-v2-active .ele_navbar_profile_link {
  border: 1px solid var(--nf2-border);
  border-radius: 12px;
  background: #fbfdff;
  padding: 8px;
}

body.newsfeed-v2-active .ele_navbar_wallet_chip {
  border-radius: 999px;
  background: #eef6ff;
  color: #145aa8;
}

/* Header migration skin (Vue mode only) */
body.newsfeed-v2-active .main-header {
  margin-bottom: 20px;
}

body.newsfeed-v2-active .ele_navbar_top {
  height: 62px;
  background: linear-gradient(90deg, #0767b8 0%, #0b84f3 45%, #0a74d8 100%);
  box-shadow: 0 14px 28px -24px rgba(5, 37, 73, 0.8);
}

body.newsfeed-v2-active .ele_header {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.newsfeed-v2-active .ele_toggle_sidebar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  margin: 0 2px 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #eaf4ff;
  background: rgba(255, 255, 255, 0.12);
}

body.newsfeed-v2-active .main-header .logo-wrapper {
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  line-height: 1;
}

body.newsfeed-v2-active .main-header .logo-wrapper img {
  max-height: 34px;
}

body.newsfeed-v2-active .main-header .search-wrapper {
  margin: 0 0 0 8px;
}

body.newsfeed-v2-active .main-header .search-wrapper > form {
  margin: 0;
}

body.newsfeed-v2-active .main-header .search-wrapper .form-control {
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d2d43;
  border: 1px solid rgba(9, 55, 102, 0.2);
}

body.newsfeed-v2-active .main-header .search-wrapper > form svg {
  color: #46678f;
  opacity: 0.9;
}

body.newsfeed-v2-active .ele_navbar_top_right {
  top: 0;
  padding: 10px 14px;
}

body.newsfeed-v2-active .ele_hdr_droptoggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f4f9ff;
  background: rgba(255, 255, 255, 0.14);
}

body.newsfeed-v2-active .ele_hdr_droptoggle:before {
  display: none;
}

body.newsfeed-v2-active .ele_header_shadow {
  opacity: 0.35;
}

@media (max-width: 768px) {
  body.newsfeed-v2-active .ele_navbar_top {
    height: 60px;
  }

  body.newsfeed-v2-active .main-header .search-wrapper .form-control {
    height: 40px;
    font-size: 14px;
  }

  body.newsfeed-v2-active .ele_navbar_top_right {
    padding: 0;
  }
}

/* Keep action cluster in header on mobile (disable legacy bottom dock in Vue mode) */
@media (max-width: 668px) {
  body.newsfeed-v2-active .ele_navbar_top_right,
  body.newsfeed-v2-force .ele_navbar_top_right {
    top: 0 !important;
    bottom: auto !important;
    left: auto !important;
    right: 0 !important;
    height: 60px !important;
    width: auto !important;
    border-top: 0 !important;
    background: transparent !important;
    justify-content: flex-end !important;
    padding: 10px 10px !important;
    z-index: 1046 !important;
  }

  body.newsfeed-v2-active .ele_navbar_top_right .hide_botm_menu_home,
  body.newsfeed-v2-force .ele_navbar_top_right .hide_botm_menu_home {
    display: none !important;
  }
}

/* ------------------------------------------------------------------
   Final hard override: desktop logo scale + sidebar/header alignment
   ------------------------------------------------------------------ */
body.newsfeed-v2-active,
body.nf2-header-mounted,
body.nf2-site-shell-active {
  --sovf-fixed-header-offset: 64px !important;
}

body.newsfeed-v2-active .ele_sidebar_left,
body.nf2-header-mounted .ele_sidebar_left,
body.nf2-site-shell-active .ele_sidebar_left {
  top: var(--sovf-fixed-header-offset) !important;
  height: calc(100% - var(--sovf-fixed-header-offset)) !important;
}

body.newsfeed-v2-active .chat-sidebar,
body.nf2-header-mounted .chat-sidebar,
body.nf2-site-shell-active .chat-sidebar {
  top: var(--sovf-fixed-header-offset) !important;
  height: calc(100% - var(--sovf-fixed-header-offset)) !important;
}

body.newsfeed-v2-active .nf2-site-header-brand .logo-wrapper img,
body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper img,
body.nf2-site-shell-active .nf2-site-header-brand .logo-wrapper img,
body.newsfeed-v2-active .nf2-site-header-brand .logo-wrapper svg,
body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper svg,
body.nf2-site-shell-active .nf2-site-header-brand .logo-wrapper svg {
  max-height: 44px !important;
  max-width: 56px !important;
}

body.newsfeed-v2-active .nf2-site-header-brand .logo-wrapper,
body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper,
body.nf2-site-shell-active .nf2-site-header-brand .logo-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  line-height: 1 !important;
  transform: translateY(1px);
}

@media (max-width: 768px) {
  #modal .modal-header {
    padding: 12px 14px;
  }

  #modal .modal-title {
    font-size: 16px;
    line-height: 1.3;
  }

  #modal .modal-content {
    border-radius: 14px;
  }

  #modal .modal-body {
    padding: 14px;
    font-size: 14px;
    line-height: 1.45;
  }

  #modal .x-form textarea,
  #modal .post-form textarea,
  #modal .comment-form textarea {
    font-size: 15px;
    line-height: 1.5;
  }

  #modal .btn,
  #modal button {
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted,
  body.nf2-site-shell-active {
    --sovf-fixed-header-offset: 60px !important;
  }
}

@media (max-width: 668px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted,
  body.nf2-site-shell-active {
    --sovf-fixed-header-offset: 56px !important;
  }
}

/* Header step 2: action cluster cleanup */
body.newsfeed-v2-active .ele_navbar_top_right {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.newsfeed-v2-active .ele_navbar_top_right > .dropdown {
  margin: 0;
}

body.newsfeed-v2-active .ele_navbar_top_right > .dropdown .counter {
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  line-height: 18px;
  font-size: 10px;
  border: 2px solid #0b84f3;
}

body.newsfeed-v2-active .ele_hdr_user_droptoggle {
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.14);
}

body.newsfeed-v2-active .ele_hdr_user_droptoggle img {
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

/* Prevent cramped/cut username in upgraded header; keep dropdown avatar clean */
body.newsfeed-v2-active .ele_hdr_user_droptoggle span {
  display: none;
}

@media (min-width: 992px) {
  body.newsfeed-v2-active .main-header .search-wrapper {
    width: min(560px, 52vw);
  }
}

@media (max-width: 991px) {
  body.newsfeed-v2-active .main-header .search-wrapper {
    width: calc(100% - 110px);
    max-width: none;
  }

  body.newsfeed-v2-active .ele_header .logo-wrapper {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  body.newsfeed-v2-active .ele_hdr_droptoggle,
  body.newsfeed-v2-active .ele_toggle_sidebar,
  body.newsfeed-v2-active .ele_hdr_user_droptoggle img {
    width: 34px;
    height: 34px;
  }

  body.newsfeed-v2-active .main-header .search-wrapper {
    width: calc(100% - 96px);
    margin-left: 6px;
  }

  body.newsfeed-v2-active .main-header .search-wrapper .form-control {
    padding-left: 34px;
  }
}

/* Hard header overrides (active + forced) */
body.newsfeed-v2-active .ele_navbar_top_right .ele_hdr_user_droptoggle span,
body.newsfeed-v2-force .ele_navbar_top_right .ele_hdr_user_droptoggle span {
  display: none !important;
}

body.newsfeed-v2-active .ele_navbar_top_right,
body.newsfeed-v2-force .ele_navbar_top_right {
  gap: 6px !important;
  overflow: hidden !important;
}

body.newsfeed-v2-active .ele_navbar_top_right > .dropdown,
body.newsfeed-v2-force .ele_navbar_top_right > .dropdown {
  margin: 0 !important;
}

body.newsfeed-v2-active .ele_navbar_top_right > .dropdown .counter,
body.newsfeed-v2-force .ele_navbar_top_right > .dropdown .counter {
  top: -2px !important;
  right: -2px !important;
}

body.nf2-header-mounted .ele_navbar_top .ele_header,
body.nf2-header-mounted .ele_navbar_top_right {
  display: none !important;
}

body.nf2-header-mounted .ele_navbar_top .container-fluid {
  display: flex;
  align-items: center;
  height: 100%;
}

.nf2-site-header-shell {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 10px;
}

.nf2-site-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nf2-site-header-search {
  flex: 1 1 auto;
  min-width: 0;
}

.nf2-site-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.nf2-site-header-actions > * {
  margin: 0 !important;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle span {
  display: none !important;
}

/* Stable mobile header layout for Vue mode */
@media (max-width: 668px) {
  body.nf2-header-mounted .nf2-site-header-shell {
    gap: 8px;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper,
  body.nf2-header-mounted .nf2-site-header-search {
    min-width: 0;
    width: 100%;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper > form {
    display: block !important;
    margin: 0 !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search {
    display: none !important;
  }

  body.nf2-header-mounted .nf2-site-header-actions .js_live-requests {
    display: none !important;
  }
}

@media (max-width: 420px) {
  body.nf2-header-mounted .nf2-site-header-shell {
    gap: 6px;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper {
    flex: 0 0 auto !important;
    width: 38px !important;
    min-width: 38px !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper > form {
    display: none !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search {
    display: inline-flex !important;
    position: static !important;
    width: 38px !important;
    height: 38px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #f4f9ff !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search .icon-search {
    display: block !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search .icon-close {
    display: none !important;
  }

  body.nf2-header-mounted .nf2-site-header-actions .js_live-messages {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body.static-page-shell:not(.nf2-header-mounted) .main-header .ele_header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .logo-wrapper {
    flex: 0 0 auto;
    min-width: 40px;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .logo-wrapper img {
    max-width: 42px;
    max-height: 28px;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .search-wrapper {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0 0 0 8px !important;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .search-wrapper > form {
    width: 100%;
    margin: 0 !important;
  }
}

@media (max-width: 520px) {
  body.static-page-shell:not(.nf2-header-mounted) .main-header .ele_toggle_sidebar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 7px;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .logo-wrapper {
    min-width: 30px;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .logo-wrapper img {
    max-width: 30px;
    max-height: 22px;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .search-wrapper .form-control {
    height: 38px;
    padding-left: 38px;
    font-size: 14px;
  }

  body.static-page-shell:not(.nf2-header-mounted) .main-header .search-wrapper > form svg {
    left: 12px;
  }
}

/* Vue header shell: modernized header surface */
body.nf2-header-mounted .main-header {
  margin-bottom: 26px;
}

body.nf2-header-mounted .ele_navbar_top {
  height: 82px;
  overflow: visible;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.24), transparent 20%),
    radial-gradient(circle at 82% 0%, rgba(125, 211, 252, 0.22), transparent 24%),
    linear-gradient(135deg, #0a5fb8 0%, #117be8 48%, #0d6dd2 100%);
  box-shadow: 0 22px 45px -30px rgba(5, 37, 73, 0.88);
}

body.nf2-header-mounted .ele_navbar_top .container-fluid {
  padding: 11px 20px;
}

body.nf2-header-mounted [data-newsfeed-vue-header-root] {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

body.nf2-header-mounted .ele_header_shadow {
  display: none;
}

body.nf2-header-mounted .nf2-site-header-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 14px;
}

body.nf2-header-mounted .nf2-site-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.nf2-header-mounted .nf2-site-header-menu,
body.nf2-header-mounted .nf2-site-header-brand,
body.nf2-header-mounted .nf2-site-header-search-wrap,
body.nf2-header-mounted .nf2-site-header-actions-wrap {
  position: relative;
}

body.nf2-header-mounted .nf2-site-header-menu .ele_toggle_sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  margin: 0;
  color: #edf6ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 28px -24px rgba(2, 16, 44, 0.95);
  backdrop-filter: blur(12px);
}

body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper img {
  max-width: 52px;
  max-height: 38px;
}

body.nf2-header-mounted .nf2-site-header-search-wrap {
  min-width: 0;
  width: 100%;
}

body.nf2-header-mounted .nf2-site-header-search {
  width: 100%;
  min-width: 0;
}

body.nf2-header-mounted .nf2-site-header-search .search-wrapper {
  width: min(760px, 100%);
  margin: 0;
}

body.nf2-header-mounted .nf2-site-header-search .search-wrapper > form {
  margin: 0 !important;
}

body.nf2-header-mounted .nf2-site-header-search .search-wrapper .form-control {
  height: 48px;
  padding: 0 18px 0 48px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(243, 248, 255, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 18px 30px -24px rgba(2, 16, 44, 0.72);
  color: #163659;
  font-size: 15px;
  font-weight: 500;
}

body.nf2-header-mounted .nf2-site-header-search .search-wrapper .form-control::placeholder {
  color: #6781a1;
  opacity: 1;
}

body.nf2-header-mounted .nf2-site-header-search .search-wrapper .form-control:focus {
  background: #ffffff;
  border-color: rgba(125, 211, 252, 0.95);
  box-shadow:
    0 0 0 4px rgba(125, 211, 252, 0.16),
    0 20px 34px -24px rgba(2, 16, 44, 0.74);
}

body.nf2-header-mounted .nf2-site-header-search .search-wrapper > form svg {
  left: 15px;
  color: #5c7697;
  opacity: 0.96;
}

body.nf2-header-mounted .nf2-site-header-actions-wrap {
  display: flex;
  align-items: center;
  justify-self: end;
  margin-left: auto;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(7, 37, 74, 0.14), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 30px -26px rgba(2, 16, 44, 0.95);
  backdrop-filter: blur(14px);
}

body.nf2-header-mounted .nf2-site-header-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  line-height: 0;
}

body.nf2-header-mounted .nf2-site-header-actions > * {
  margin: 0 !important;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
  color: #eff7ff;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.17);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle:hover,
body.nf2-header-mounted .nf2-site-header-actions .show > .ele_hdr_droptoggle {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle:before {
  display: none;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle svg {
  width: 22px;
  height: 22px;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle {
  width: 42px;
  min-width: 42px;
  padding: 0 !important;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

body.nf2-header-mounted .nf2-site-header-actions .counter {
  position: absolute !important;
  top: 2px !important;
  right: -1px !important;
  z-index: 3;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: #ff4f7b;
  color: #ffffff;
  line-height: 14px;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 8px 16px -10px rgba(255, 79, 123, 0.9);
  pointer-events: none;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-menu,
body.nf2-header-mounted .nf2-site-header-search .ele_header_sarch_dropdown {
  border: 1px solid rgba(207, 223, 241, 0.95);
  border-radius: 20px;
  box-shadow: 0 28px 48px -34px rgba(4, 28, 55, 0.48);
}

@media (max-width: 900px) {
  body.nf2-header-mounted .ele_navbar_top {
    height: 76px;
  }

  body.nf2-header-mounted .ele_navbar_top .container-fluid {
    padding: 10px 14px;
  }

  body.nf2-header-mounted .nf2-site-header-shell {
    gap: 10px;
  }

  body.nf2-header-mounted .nf2-site-header-actions .js_live-requests {
    display: none !important;
  }
}

@media (max-width: 668px) {
  body.nf2-header-mounted .main-header {
    margin-bottom: 10px;
  }

  body.nf2-header-mounted .ele_navbar_top {
    height: 64px;
  }

  body.nf2-header-mounted .nf2-site-header-menu .ele_toggle_sidebar,
  body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper {
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper {
    min-width: 50px;
    padding: 0 11px;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper .form-control {
    height: 44px;
    border-radius: 16px;
    font-size: 14px;
  }

  body.nf2-header-mounted .nf2-site-header-actions-wrap {
    padding: 3px;
    border-radius: 18px;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
}

@media (max-width: 560px) {
  body.nf2-header-mounted .nf2-site-header-search-wrap {
    position: relative;
    align-self: stretch;
    margin-left: auto;
    width: 44px;
    min-width: 44px;
  }

  body.nf2-header-mounted .nf2-site-header-actions-wrap {
    margin-left: 0;
  }

  body.nf2-header-mounted .nf2-site-header-search {
    width: 44px !important;
    min-width: 44px !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper {
    position: static !important;
    width: 44px !important;
    min-width: 44px !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper > form {
    display: none !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search {
    display: flex !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    width: 42px !important;
    height: 42px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 15px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)) !important;
    color: #f4fbff !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search .icon-search {
    display: block !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search .icon-close {
    display: none !important;
  }

  body.nf2-header-mounted.mobile-search-open .nf2-site-header-search .ele_toggle_search .icon-search {
    display: none !important;
  }

  body.nf2-header-mounted.mobile-search-open .nf2-site-header-search .ele_toggle_search .icon-close {
    display: block !important;
  }

  body.nf2-header-mounted.mobile-search-open .nf2-site-header-search .search-wrapper > form {
    position: fixed !important;
    top: 76px;
    right: 10px;
    left: 10px;
    z-index: 1083;
    display: block !important;
    margin: 0 !important;
    padding: 10px;
    border: 1px solid rgba(207, 223, 241, 0.95);
    border-radius: 22px;
    background:
      radial-gradient(420px 160px at 0% -30%, rgba(15, 126, 232, 0.16), transparent 70%),
      rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 58px -34px rgba(4, 28, 55, 0.62);
    backdrop-filter: blur(16px);
  }

  body.nf2-header-mounted.mobile-search-open .nf2-site-header-search .search-wrapper .form-control {
    width: 100%;
    height: 46px;
    padding-right: 14px;
    border-color: rgba(205, 219, 236, 0.98);
    background: #f8fbff;
  }

  body.nf2-header-mounted.mobile-search-open .nf2-site-header-search .search-wrapper > form svg {
    left: 24px;
    z-index: 1;
  }

  body.nf2-header-mounted.mobile-search-open .nf2-site-header-search .ele_header_sarch_dropdown.show,
  body.nf2-header-mounted.mobile-search-open .nf2-site-header-search .ele_header_sarch_dropdown[style*="display: block"] {
    top: 146px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100vh - 236px) !important;
    border-radius: 22px !important;
  }

  body.nf2-header-mounted .nf2-site-header-actions .js_live-messages {
    display: none !important;
  }
}

@media (max-width: 420px) {
  body.nf2-header-mounted .ele_navbar_top {
    height: 66px;
  }

  body.nf2-header-mounted .ele_navbar_top .container-fluid {
    padding: 9px 10px;
  }

  body.nf2-header-mounted .nf2-site-header-shell {
    gap: 8px;
  }

  body.nf2-header-mounted .nf2-site-header-search .search-wrapper {
    width: 40px !important;
    min-width: 40px !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search {
    padding: 0 !important;
    box-sizing: border-box !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f4fbff !important;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_toggle_search svg {
    width: 20px;
    height: 20px;
  }

  body.nf2-header-mounted .nf2-site-header-actions-wrap {
    padding: 2px;
    border-radius: 16px;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0 !important;
    border-radius: 11px;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle {
    width: 36px;
    min-width: 36px;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle img {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
}

/* Vue header stabilization: reserve real header space and keep flyouts usable */
html.nf2-site-shell-pending body,
body.newsfeed-v2-active,
body.nf2-header-mounted {
  padding-top: 96px;
}

html.nf2-site-shell-pending body.n_activated,
html.nf2-site-shell-pending body.n_live,
body.newsfeed-v2-active.n_activated,
body.newsfeed-v2-active.n_live,
body.nf2-header-mounted.n_activated,
body.nf2-header-mounted.n_live {
  padding-top: 140px;
}

html.nf2-site-shell-pending .ele_navbar_top {
  height: 82px;
  overflow: visible;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.24), transparent 20%),
    radial-gradient(circle at 82% 0%, rgba(125, 211, 252, 0.22), transparent 24%),
    linear-gradient(135deg, #0a5fb8 0%, #117be8 48%, #0d6dd2 100%);
  box-shadow: 0 22px 45px -30px rgba(5, 37, 73, 0.88);
}

html.nf2-site-shell-pending .ele_navbar_top .ele_header,
html.nf2-site-shell-pending .ele_navbar_top_right {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  html.nf2-site-shell-pending body,
  body.newsfeed-v2-active,
  body.nf2-header-mounted {
    padding-top: 86px;
  }
}

@media (max-width: 668px) {
  html.nf2-site-shell-pending body,
  body.newsfeed-v2-active,
  body.nf2-header-mounted {
    padding-top: calc(88px + env(safe-area-inset-top));
  }
}

/* Mobile create-post must render above migrated fixed header layer */
@media (max-width: 668px) {
  body.nf2-header-mounted.publisher-focus #publisher-wapper,
  body.newsfeed-v2-active.publisher-focus #publisher-wapper {
    position: relative;
    z-index: 2147483002;
    margin-top: 12px;
  }

  body.nf2-header-mounted.publisher-focus .publisher-overlay,
  body.newsfeed-v2-active.publisher-focus .publisher-overlay {
    z-index: 2147483000 !important;
  }

  body.nf2-header-mounted.publisher-focus .publisher,
  body.newsfeed-v2-active.publisher-focus .publisher {
    position: relative;
    z-index: 2147483001 !important;
  }
}

body.nf2-header-mounted .main-header {
  margin-bottom: 12px;
}

body.nf2-header-mounted .main-wrapper {
  min-height: calc(100vh - 82px);
}

body.nf2-header-mounted .ele_navbar_top {
  z-index: 1060;
}

body.nf2-header-mounted .ele_sidebar_left {
  top: 82px;
  height: calc(100% - 82px);
  z-index: 100;
  border-right: 1px solid rgba(210, 222, 236, 0.72);
  box-shadow: 18px 0 34px -34px rgba(6, 35, 66, 0.42);
}

html.nf2-site-shell-pending .chat-sidebar,
body.nf2-header-mounted .chat-sidebar {
  top: 96px !important;
  bottom: 0 !important;
  max-height: calc(100vh - 96px) !important;
  z-index: 100 !important;
}

html.nf2-site-shell-pending body.n_activated .chat-sidebar,
html.nf2-site-shell-pending body.n_live .chat-sidebar,
body.nf2-header-mounted.n_activated .chat-sidebar,
body.nf2-header-mounted.n_live .chat-sidebar {
  top: 140px !important;
  max-height: calc(100vh - 140px) !important;
}

@media (max-width: 900px) {
  html.nf2-site-shell-pending .chat-sidebar,
  body.nf2-header-mounted .chat-sidebar {
    top: 86px !important;
    max-height: calc(100vh - 86px) !important;
  }
}

body.nf2-header-mounted.n_activated .ele_sidebar_left,
body.nf2-header-mounted.n_live .ele_sidebar_left {
  top: 126px;
  height: calc(100% - 126px);
}

body.nf2-header-mounted .ele_sidebar_left .sidebar_innr {
  padding: 18px 12px;
}

body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn {
  position: relative;
  min-height: 48px;
  margin-bottom: 6px;
  border-radius: 16px;
  color: #4c5564;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn:hover {
  transform: translateX(2px);
  background: #f5f9fd;
  color: #1e6fb8;
}

body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn.active {
  background: linear-gradient(90deg, #e2f2ff 0%, #f7fbff 100%);
  color: #1688e8;
  box-shadow: inset 4px 0 0 #54b5f8;
}

body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn.active:before {
  display: none;
}

body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn svg,
body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn img {
  opacity: 0.72;
}

body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn.active svg,
body.nf2-header-mounted .ele_sidebar_left .sidebar_innr > .btn.active img {
  opacity: 1;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-menu.show {
  position: fixed !important;
  top: 92px !important;
  right: 18px !important;
  left: auto !important;
  transform: none !important;
  width: min(390px, calc(100vw - 24px)) !important;
  min-width: 0 !important;
  max-width: min(390px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 112px) !important;
  padding: 8px 10px !important;
  overflow: hidden auto !important;
  z-index: 1075 !important;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-header {
  position: sticky;
  top: -8px;
  z-index: 2;
  margin: -8px -10px 8px;
  padding: 16px 14px 10px;
  border-bottom: 1px solid rgba(219, 229, 241, 0.74);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-header .title {
  font-size: 20px;
  line-height: 1.15;
  color: #1d2b3a;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-body {
  max-height: calc(100vh - 220px);
  overflow: visible;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-body .js_scroller {
  height: auto !important;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-footer {
  position: sticky;
  bottom: 0;
  margin: 10px 0 0;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(185, 241, 234, 0.9), rgba(206, 245, 239, 0.92));
  color: #08776f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(41, 177, 165, 0.16);
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-footer:hover,
body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-footer:focus {
  color: #045d57;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(159, 232, 223, 0.96), rgba(193, 242, 235, 0.98));
}

body.nf2-header-mounted .js_live-notifications .dropdown-widget-footer,
body.nf2-header-mounted .js_live-messages .dropdown-widget-footer {
  display: block;
  border-radius: 14px;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_notifis > a.data-container,
body.nf2-header-mounted .nf2-site-header-actions .ele_side_users .data-container {
  border-radius: 16px;
  padding: 10px;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_notifis_avatar,
body.nf2-header-mounted .nf2-site-header-actions .ele_friend_reqs .feeds-item .data-avatar {
  width: 54px;
  min-width: 54px;
  height: 54px;
}

body.nf2-header-mounted .js_live-notifications .dropdown-widget-body ul,
body.nf2-header-mounted .js_live-messages .dropdown-widget-body ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

body.nf2-header-mounted .js_live-notifications .dropdown-widget-body li:nth-child(n+6),
body.nf2-header-mounted .js_live-messages .dropdown-widget-body li:nth-child(n+6),
body.nf2-notifications-open .nf2-notifications-sheet .dropdown-widget-body li:nth-child(n+6) {
  display: none !important;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis,
body.nf2-header-mounted .js_live-messages .ele_notifis {
  position: relative;
  margin: 0;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(218, 229, 242, 0.74);
}

body.nf2-header-mounted .js_live-notifications .ele_notifis.unread,
body.nf2-header-mounted .js_live-messages .ele_notifis.unread {
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.96), rgba(247, 251, 255, 0.9));
}

body.nf2-header-mounted .js_live-notifications .ele_notifis > a.data-container,
body.nf2-header-mounted .js_live-messages .ele_notifis > a.data-container {
  display: block;
  min-height: 0;
  padding: 10px 12px !important;
  border-radius: 18px;
  color: #162437;
  text-decoration: none;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis > a.data-container:hover,
body.nf2-header-mounted .js_live-messages .ele_notifis > a.data-container:hover {
  background: rgba(15, 126, 232, 0.07);
}

body.nf2-header-mounted .js_live-notifications .ele_notifis .valign,
body.nf2-header-mounted .js_live-messages .ele_notifis .valign {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis_avatar,
body.nf2-header-mounted .js_live-messages .ele_notifis_avatar {
  width: 54px;
  min-width: 54px;
  height: 54px;
  margin: 0 !important;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis_avatar img,
body.nf2-header-mounted .js_live-messages .ele_notifis_avatar img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: cover;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis_avatar > div.icon,
body.nf2-header-mounted .js_live-messages .ele_notifis_avatar > div.icon {
  right: -3px;
  bottom: -3px;
  width: 24px;
  height: 24px;
  line-height: 24px;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis_data,
body.nf2-header-mounted .js_live-messages .ele_notifis_data {
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0;
  color: #243247;
  line-height: 1.28;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis_data > .name,
body.nf2-header-mounted .js_live-messages .ele_notifis_data > .name {
  display: inline;
  color: #13243a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis_data > span:not(.name):not(.verified-color),
body.nf2-header-mounted .js_live-messages .ele_notifis_data > div.text {
  color: #34445a;
  font-size: 13px;
  font-weight: 500;
}

body.nf2-header-mounted .js_live-messages .ele_notifis_data.message {
  display: grid;
  gap: 2px;
  max-width: none;
  padding-right: 28px;
}

body.nf2-header-mounted .js_live-messages .ele_notifis_data.message .name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nf2-header-mounted .js_live-messages .ele_notifis_data.message .text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nf2-header-mounted .js_live-notifications .ele_notifis_data .time,
body.nf2-header-mounted .js_live-messages .ele_notifis_data .time {
  display: block;
  margin: 4px 0 0;
  color: #77859a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

body.nf2-header-mounted .js_live-messages .ele_notifis_data.message .time {
  order: 3;
}

body.nf2-header-mounted .js_live-messages .js_delete-thread {
  top: 12px !important;
  right: 12px !important;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 77, 106, 0.1);
}

body.nf2-header-mounted .nf2-site-header-search .ele_header_sarch_dropdown.show,
body.nf2-header-mounted .nf2-site-header-search .ele_header_sarch_dropdown[style*="display: block"] {
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: min(760px, calc(100vw - 32px)) !important;
  min-width: min(360px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 112px) !important;
  overflow: hidden auto;
  z-index: 1070;
}

body.nf2-header-mounted {
  --nf2-sidebar-top: 82px;
  --nf2-sidebar-width: min(424px, calc(100vw - 32px));
}

body.nf2-header-mounted .ele_navbar_top_side {
  position: fixed !important;
  top: var(--nf2-sidebar-top) !important;
  bottom: 0 !important;
  left: 0 !important;
  width: var(--nf2-sidebar-width);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(207, 223, 241, 0.92);
  border-left: 0;
  border-radius: 0 26px 26px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 253, 0.98));
  box-shadow: 28px 0 78px -38px rgba(6, 35, 66, 0.66);
  opacity: 1 !important;
  pointer-events: none;
  transform: translate3d(calc(-100% - 18px), 0, 0) !important;
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
  visibility: hidden;
  z-index: 1074;
}

body.nf2-sidebar-drawer-open .ele_navbar_top_side,
body.nf2-header-mounted.side_open .ele_navbar_top_side {
  pointer-events: auto;
  transform: translate3d(0, 0, 0) !important;
  visibility: visible;
}

body.nf2-header-mounted .ele_navbar_top_side .sidebar_innr {
  max-height: none;
  height: 100%;
  padding: 24px 20px calc(26px + env(safe-area-inset-bottom)) !important;
}

body.nf2-header-mounted .ele_navbar_top_side_all_arrow {
  display: none;
}

body.nf2-header-mounted .ele_toggle_navbar_top {
  top: calc(var(--nf2-sidebar-top) + 14px);
  left: calc(var(--nf2-sidebar-width) - 22px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(207, 223, 241, 0.92);
  border-radius: 999px;
  background: #ffffff;
  color: #102a43;
  box-shadow: 0 16px 30px -22px rgba(4, 28, 55, 0.58);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1077;
}

body.nf2-sidebar-drawer-open .ele_toggle_navbar_top,
body.nf2-header-mounted.side_open .ele_toggle_navbar_top {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.nf2-sidebar-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(6, 16, 28, 0.48);
  cursor: default;
  animation: nf2SidebarBackdropIn 0.18s ease both;
  z-index: 1072;
}

@keyframes nf2SidebarBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body.nf2-sidebar-drawer-open {
  overflow: hidden;
}

body.nf2-header-mounted .nf2-sidebar-brand {
  margin: 2px 0 20px;
  text-align: center;
  color: #202833;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 2px;
}

body.nf2-header-mounted .nf2-drawer-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding-bottom: 16px;
}

body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #4c5564;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item:hover {
  border-color: rgba(207, 223, 241, 0.78);
  background: #f5f9fd;
  color: #1e6fb8;
  transform: translateX(2px);
}

body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item.active {
  border-color: rgba(147, 205, 249, 0.6);
  background: linear-gradient(90deg, #e2f2ff 0%, #f7fbff 100%);
  color: #1688e8;
  box-shadow: inset 4px 0 0 #54b5f8;
}

body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item.active:before {
  display: none;
}

body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item svg,
body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item img,
body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item i {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  opacity: 0.78;
}

body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item span {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nf2-header-mounted .nf2-drawer-nav hr {
  width: 100%;
  height: 1px;
  margin: 12px 0;
  border: 0;
  background: rgba(207, 223, 241, 0.78);
}

body.night-mode.nf2-header-mounted .ele_sidebar_left,
body.night-mode.nf2-header-mounted .ele_navbar_top_side {
  border-color: rgba(255, 255, 255, 0.1);
}

body.night-mode.nf2-header-mounted .ele_navbar_top_side {
  background: linear-gradient(180deg, rgba(33, 33, 33, 0.99), rgba(24, 27, 31, 0.98));
  box-shadow: 28px 0 78px -38px rgba(0, 0, 0, 0.86);
}

body.night-mode.nf2-header-mounted .ele_toggle_navbar_top {
  border-color: rgba(255, 255, 255, 0.12);
  background: #24272c;
  color: #edf4ff;
}

body.night-mode.nf2-header-mounted .nf2-sidebar-brand {
  color: #f4f7fb;
}

body.night-mode.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item {
  color: #cbd5e1;
}

body.night-mode.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #7cc7ff;
}

body.night-mode.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item.active {
  border-color: rgba(84, 181, 248, 0.34);
  background: rgba(84, 181, 248, 0.13);
  color: #7cc7ff;
}

body.night-mode.nf2-header-mounted .nf2-drawer-nav hr {
  background: rgba(255, 255, 255, 0.1);
}

body.night-mode .nf2-sidebar-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

[dir="RTL"] body.nf2-header-mounted .ele_navbar_top_side {
  right: 0 !important;
  left: auto !important;
  border-right: 0;
  border-left: 1px solid rgba(207, 223, 241, 0.92);
  border-radius: 26px 0 0 26px;
  transform: translate3d(calc(100% + 18px), 0, 0) !important;
}

[dir="RTL"] body.nf2-sidebar-drawer-open .ele_navbar_top_side,
[dir="RTL"] body.nf2-header-mounted.side_open .ele_navbar_top_side {
  transform: translate3d(0, 0, 0) !important;
}

[dir="RTL"] body.nf2-header-mounted .ele_toggle_navbar_top {
  right: calc(var(--nf2-sidebar-width) - 22px);
  left: auto;
}

[dir="RTL"] body.nf2-header-mounted .nf2-drawer-nav .nf2-drawer-nav-item:hover {
  transform: translateX(-2px);
}

body.night-mode.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(46, 46, 46, 0.96);
}

body.night-mode.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-header .title {
  color: #f4f7fb;
}

@media (max-width: 900px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted {
    padding-top: 76px;
  }

  body.nf2-header-mounted .main-wrapper {
    min-height: calc(100vh - 76px);
  }

  body.nf2-header-mounted .ele_sidebar_left {
    top: 76px;
    height: calc(100% - 76px);
  }

  body.nf2-header-mounted .nf2-site-header-actions .dropdown-menu.show {
    top: 86px !important;
    right: 12px !important;
    max-height: calc(100vh - 100px) !important;
  }

  body.nf2-header-mounted {
    --nf2-sidebar-top: 76px;
  }
}

@media (max-width: 668px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted {
    padding-top: 70px;
  }

  body.nf2-header-mounted .main-wrapper {
    min-height: calc(100vh - 70px);
  }

  body.nf2-header-mounted .ele_sidebar_left {
    top: 70px;
    height: calc(100% - 70px);
  }

  body.nf2-header-mounted .nf2-site-header-actions .dropdown-menu.show {
    top: 78px !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100vh - 88px) !important;
    border-radius: 22px !important;
  }

  body.nf2-header-mounted .nf2-site-header-actions .dropdown-widget-body {
    max-height: calc(100vh - 190px);
  }

  body.nf2-header-mounted .js_live-notifications {
    position: absolute !important;
    width: 0;
    height: 0;
    margin: 0 !important;
    overflow: visible;
    pointer-events: none;
  }

  body.nf2-header-mounted .js_live-notifications > .noti_ddown,
  body.nf2-header-mounted .js_live-notifications > .counter {
    display: none !important;
  }

  body.nf2-header-mounted .js_live-notifications .dropdown-menu.show,
  body.nf2-notifications-open .js_live-notifications .dropdown-menu.show,
  body.nf2-notifications-open .nf2-notifications-sheet,
  body.nf2-header-mounted .js_live-messages .dropdown-menu.show {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    left: 0 !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: min(82vh, calc(100vh - 126px)) !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(207, 223, 241, 0.95) !important;
    border-radius: 28px 28px 0 0 !important;
    background:
      radial-gradient(420px 170px at 8% -12%, rgba(15, 126, 232, 0.14), transparent 68%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.98)) !important;
    box-shadow: 0 -26px 74px -28px rgba(4, 28, 55, 0.72) !important;
    pointer-events: auto;
    z-index: 2147483001 !important;
  }

  body.nf2-header-mounted .js_live-notifications .dropdown-widget-header,
  body.nf2-notifications-open .js_live-notifications .dropdown-widget-header,
  body.nf2-notifications-open .nf2-notifications-sheet .dropdown-widget-header,
  body.nf2-header-mounted .js_live-messages .dropdown-widget-header {
    top: 0;
    margin: 0;
    padding: 20px 20px 14px;
    background: rgba(255, 255, 255, 0.9);
    flex: 0 0 auto;
  }

  body.nf2-header-mounted .js_live-notifications .dropdown-widget-header .title,
  body.nf2-notifications-open .js_live-notifications .dropdown-widget-header .title,
  body.nf2-notifications-open .nf2-notifications-sheet .dropdown-widget-header .title,
  body.nf2-header-mounted .js_live-messages .dropdown-widget-header .title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: normal;
    word-break: normal;
  }

  body.nf2-header-mounted .js_live-notifications .dropdown-widget-header .btn,
  body.nf2-notifications-open .js_live-notifications .dropdown-widget-header .btn,
  body.nf2-notifications-open .nf2-notifications-sheet .dropdown-widget-header .btn,
  body.nf2-header-mounted .js_live-messages .dropdown-widget-header .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #1c2e45;
    background: rgba(10, 31, 55, 0.06) !important;
  }

  body.nf2-header-mounted .js_live-notifications .dropdown-widget-body,
  body.nf2-notifications-open .js_live-notifications .dropdown-widget-body,
  body.nf2-notifications-open .nf2-notifications-sheet .dropdown-widget-body,
  body.nf2-header-mounted .js_live-messages .dropdown-widget-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden auto;
    padding: 10px 14px 0;
  }

  body.nf2-header-mounted .js_live-notifications .dropdown-widget-footer,
  body.nf2-notifications-open .js_live-notifications .dropdown-widget-footer,
  body.nf2-notifications-open .nf2-notifications-sheet .dropdown-widget-footer,
  body.nf2-header-mounted .js_live-messages .dropdown-widget-footer {
    flex: 0 0 auto;
    margin: 10px 14px 14px;
  }

  body.nf2-header-mounted .nf2-site-header-search .ele_header_sarch_dropdown.show,
  body.nf2-header-mounted .nf2-site-header-search .ele_header_sarch_dropdown[style*="display: block"] {
    position: fixed !important;
    top: 78px !important;
    right: 8px !important;
    left: 8px !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100vh - 88px) !important;
    border-radius: 22px;
  }

  body.nf2-header-mounted {
    --nf2-sidebar-top: 70px;
    --nf2-sidebar-width: min(390px, calc(100vw - 14px));
  }

  body.nf2-header-mounted .ele_navbar_top_side {
    border-radius: 0 22px 22px 0;
  }

  body.nf2-header-mounted .ele_toggle_navbar_top {
    top: calc(var(--nf2-sidebar-top) + 12px);
  }
}

@media (max-width: 420px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted {
    padding-top: 66px;
  }

  body.nf2-header-mounted .main-wrapper {
    min-height: calc(100vh - 66px);
  }

  body.nf2-header-mounted .ele_sidebar_left {
    top: 66px;
    height: calc(100% - 66px);
  }

  body.nf2-header-mounted .nf2-site-header-actions .dropdown-menu.show,
  body.nf2-header-mounted .nf2-site-header-search .ele_header_sarch_dropdown.show,
  body.nf2-header-mounted .nf2-site-header-search .ele_header_sarch_dropdown[style*="display: block"] {
    top: 72px !important;
    max-height: calc(100vh - 80px) !important;
  }

  body.nf2-header-mounted {
    --nf2-sidebar-top: 66px;
    --nf2-sidebar-width: calc(100vw - 10px);
  }
}

/* Account drawer and mobile quick actions */
body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.show > .ele_hdr_user_dropdown,
body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.nf2-account-open > .ele_hdr_user_dropdown,
body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu > .ele_hdr_user_dropdown.show,
body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu > .ele_hdr_user_dropdown[style*="display: block"],
body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.open-lang > .ele_mobi_langs_menu.show,
body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.open-lang > .ele_mobi_langs_menu[style*="display: block"] {
  position: fixed !important;
  display: block !important;
  top: 92px !important;
  right: 18px !important;
  left: auto !important;
  transform: none !important;
  width: min(420px, calc(100vw - 24px)) !important;
  min-width: 0 !important;
  max-width: min(420px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 112px) !important;
  padding: 12px !important;
  overflow: hidden auto !important;
  white-space: normal !important;
  word-break: normal !important;
  z-index: 1080 !important;
}

body.nf2-header-mounted .ele_hdr_user_dropdown .ele_mobi_hdr_not_title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px !important;
  padding: 6px 6px 14px;
  border-bottom: 1px solid rgba(219, 229, 241, 0.78);
  color: #172536;
  font-size: 20px;
  line-height: 1.2;
  white-space: normal;
  word-break: normal;
}

body.nf2-header-mounted .ele_hdr_user_dropdown > .dropdown-item,
body.nf2-header-mounted .ele_main_usr_ddmenu .ele_mobi_langs_menu > .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 14px;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
}

body.nf2-header-mounted .ele_hdr_user_dropdown > .dropdown-item:hover,
body.nf2-header-mounted .ele_main_usr_ddmenu .ele_mobi_langs_menu > .dropdown-item:hover {
  background: #f3f8fe;
  color: #126fc2;
}

body.nf2-header-mounted .ele_hdr_user_dropdown > .dropdown-item svg,
body.nf2-header-mounted .ele_hdr_user_dropdown > .dropdown-item i,
body.nf2-header-mounted .ele_hdr_user_dropdown > .dropdown-item > img {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: 0;
}

body.nf2-header-mounted .ele_hdr_user_dropdown .ele_hdr_user_submenu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

body.nf2-header-mounted .ele_hdr_user_dropdown .ele_hdr_user_submenu a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border-radius: 14px;
  line-height: 1.2;
}

body.nf2-account-drawer-open {
  overflow: hidden;
}

.nf2-account-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(8, 18, 32, 0.38);
  backdrop-filter: blur(8px);
}

.nf2-notifications-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(8, 18, 32, 0.38);
  backdrop-filter: blur(8px);
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet {
  position: fixed !important;
  display: block !important;
  top: auto !important;
  right: 8px !important;
  bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  left: 8px !important;
  transform: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: min(74vh, calc(100vh - 156px)) !important;
  padding: 14px !important;
  overflow: hidden auto !important;
  border: 1px solid rgba(207, 223, 241, 0.95) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(420px 190px at 10% -12%, rgba(15, 126, 232, 0.14), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.98)) !important;
  box-shadow: 0 30px 74px -28px rgba(4, 28, 55, 0.66) !important;
  white-space: normal !important;
  word-break: normal !important;
  z-index: 1081 !important;
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet .ele_mobi_hdr_not_title {
  top: -14px;
  margin: -14px -14px 12px !important;
  padding: 18px 18px 14px !important;
  border-bottom: 1px solid rgba(211, 224, 239, 0.88);
  background: rgba(255, 255, 255, 0.9);
  color: #0f2138;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet .ele_mobi_hdr_not_title .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #1c2e45;
  background: rgba(10, 31, 55, 0.06) !important;
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet > .dropdown-item {
  min-height: 54px;
  margin: 3px 0;
  padding: 9px 10px !important;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #172536;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet > .dropdown-item:hover,
body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet > .dropdown-item:focus {
  border-color: rgba(13, 126, 229, 0.14);
  background: rgba(15, 126, 232, 0.08);
  color: #096fc9;
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet > .dropdown-item svg,
body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet > .dropdown-item i,
body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet > .dropdown-item > img {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(12, 30, 50, 0.08);
  color: #13263d;
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet .ele_hdr_user_submenu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 8px;
  border: 1px solid rgba(215, 226, 240, 0.92);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}

body.nf2-header-mounted .ele_hdr_user_dropdown.nf2-account-sheet hr {
  margin: 12px 4px !important;
  border-color: rgba(214, 225, 238, 0.86);
}

.nf2-mobile-quick-dock {
  display: none;
}

@media (max-width: 900px) {
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.show > .ele_hdr_user_dropdown,
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.nf2-account-open > .ele_hdr_user_dropdown,
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu > .ele_hdr_user_dropdown.show,
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu > .ele_hdr_user_dropdown[style*="display: block"],
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.open-lang > .ele_mobi_langs_menu[style*="display: block"],
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.open-lang > .ele_mobi_langs_menu.show {
    top: 86px !important;
    right: 12px !important;
    max-height: calc(100vh - 100px) !important;
  }
}

@media (max-width: 668px) {
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.show > .ele_hdr_user_dropdown,
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.nf2-account-open > .ele_hdr_user_dropdown,
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu > .ele_hdr_user_dropdown.show,
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu > .ele_hdr_user_dropdown[style*="display: block"],
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.open-lang > .ele_mobi_langs_menu[style*="display: block"],
  body.nf2-header-mounted .nf2-site-header-actions .ele_main_usr_ddmenu.open-lang > .ele_mobi_langs_menu.show {
    top: auto !important;
    right: 8px !important;
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(74vh, calc(100vh - 156px)) !important;
    border-radius: 24px !important;
  }

  body.nf2-header-mounted .ele_hdr_user_dropdown .ele_mobi_hdr_not_title {
    position: sticky;
    top: -12px;
    z-index: 2;
    margin: -12px -12px 12px !important;
    padding: 16px 16px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
  }

  body.nf2-header-mounted .ele_hdr_user_dropdown .mini-footer {
    margin-bottom: 6px;
  }

  body.nf2-header-mounted {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .nf2-mobile-quick-dock {
    position: fixed;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 1044;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(197, 216, 237, 0.92);
    border-radius: 24px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 247, 255, 0.92));
    box-shadow:
      0 24px 54px -34px rgba(6, 35, 66, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
  }

  .nf2-mobile-quick-action {
    display: inline-flex;
    min-width: 0;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: #2d4158;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
  }

  .nf2-mobile-quick-action:hover,
  .nf2-mobile-quick-action:focus {
    color: #0f72c7;
    text-decoration: none;
    background: rgba(15, 114, 199, 0.08);
  }

  .nf2-mobile-quick-action i {
    font-size: 18px;
    line-height: 1;
  }

  .nf2-mobile-quick-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
  }

  .nf2-mobile-quick-action .nf2-quick-counter {
    position: absolute;
    top: -8px;
    right: -11px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    background: #ff4f7b;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    line-height: 13px;
    box-shadow: 0 8px 16px -10px rgba(255, 79, 123, 0.9);
  }

  .nf2-mobile-quick-action img {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    object-fit: cover;
  }

  .nf2-mobile-quick-action-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0b7ee8 0%, #0897f2 100%);
    box-shadow: 0 14px 24px -18px rgba(8, 111, 209, 0.9);
  }

  .nf2-mobile-quick-action-primary:hover,
  .nf2-mobile-quick-action-primary:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #066dcc 0%, #078be0 100%);
  }
}

@media (max-width: 380px) {
  .nf2-mobile-quick-dock {
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
    gap: 4px;
    padding: 7px;
  }

  .nf2-mobile-quick-action {
    min-height: 50px;
    border-radius: 15px;
    font-size: 9px;
  }
}

body.night-mode.nf2-header-mounted .ele_hdr_user_dropdown .ele_mobi_hdr_not_title {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #f4f7fb;
}

body.night-mode.nf2-header-mounted .ele_hdr_user_dropdown .ele_mobi_hdr_not_title,
body.night-mode .nf2-mobile-quick-dock {
  background: rgba(32, 38, 45, 0.94);
}

body.night-mode .nf2-mobile-quick-dock {
  border-color: rgba(255, 255, 255, 0.1);
}

body.night-mode .nf2-mobile-quick-action {
  color: #d6e2ef;
}

.nf2-site-footer-source {
  display: none;
}

body.nf2-footer-mounted .nf2-site-footer {
  margin: 18px 0 0;
  padding: 0 0 18px;
}

body.nf2-footer-mounted .nf2-site-footer .footer {
  margin-top: 0;
  padding: 18px 0;
  border-top: 1px solid rgba(210, 222, 236, 0.72);
  color: #607187;
}

body.nf2-footer-mounted .nf2-site-footer .footer .links {
  text-align: right;
}

body.nf2-footer-mounted .nf2-site-footer a {
  color: #385674;
}

body.nf2-footer-mounted .nf2-site-footer a:hover {
  color: #0b7ee8;
  text-decoration: none;
}

body.night-mode.nf2-footer-mounted .nf2-site-footer .footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #aeb9c7;
}

body.night-mode.nf2-footer-mounted .nf2-site-footer a {
  color: #d6e2ef;
}

@media (max-width: 767px) {
  body.nf2-footer-mounted .nf2-site-footer {
    padding-bottom: 88px;
  }

  body.nf2-footer-mounted .nf2-site-footer .footer,
  body.nf2-footer-mounted .nf2-site-footer .footer .links {
    text-align: center;
  }
}

/* ================================================================
   Publisher / Create-Post — professional layout, all breakpoints
   ================================================================ */

/* Constrain auto-growing textarea so tools stay visible */
.publisher .colored-text-wrapper textarea,
.publisher textarea.js_autosize {
  min-height: 88px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  resize: none !important;
  line-height: 1.55;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PUBLISHER MODAL — Professional polish
   ═══════════════════════════════════════════════════════════════════════════ */

/* Header row: "Create Post" | [Post] [✕] */
.publisher .publisher-footer.valign {
  padding: 12px 16px !important;
  border-bottom: 1px solid #edf1f8;
  gap: 8px !important;
  min-height: 56px;
  background: #fff;
}

.publisher .publisher-footer .publisher-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em;
}

/* "Post" submit button */
.publisher .js_publisher-btn {
  border-radius: 999px !important;
  padding: 8px 22px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  min-height: 38px !important;
  background: linear-gradient(135deg, #0e8af8 0%, #0a71d4 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px -4px rgba(11, 132, 243, 0.45) !important;
  transition: opacity .15s ease !important;
}

.publisher .js_publisher-btn:hover {
  opacity: 0.88 !important;
}

/* Close / X button */
.publisher .js_close-publisher-modal,
.publisher .publisher-close {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  background: #f1f5fb !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  color: #475569 !important;
  transition: background .15s ease !important;
}

.publisher .js_close-publisher-modal:hover,
.publisher .publisher-close:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Keep only the Vue modal header close button.
   The embedded publisher template can also render legacy close controls. */
.nf2-publisher-modal-root .nf2-publisher-embedded .js_close-publisher-modal,
.nf2-publisher-modal-root .nf2-publisher-embedded .publisher-close {
  display: none !important;
}

/* ── Privacy selector ── */
.publisher .ele_pub_btn_as-selector {
  border: 1px solid #d8e3f0 !important;
  border-radius: 999px !important;
  padding: 5px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: #f8fbff !important;
  gap: 5px !important;
}

/* ── Footer action bar (privacy, #, @, emoji, collapse) ── */
.publisher .ele_pub_box_foot {
  flex-wrap: wrap !important;
  gap: 4px !important;
  padding: 6px 14px !important;
  border-top: 1px solid #edf1f8;
  background: #fafcff;
}

/* ── TOOLS GRID ── card tiles with icon on top + label below ── */
.valign.publisher-tools-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  padding: 10px 12px 12px !important;
  background: #fff;
  border-top: 1px solid #edf1f8;
}

/* Override the default flex per-li */
.publisher-tools-tabs li {
  display: block !important;
  flex: unset !important;
  width: unset !important;
  max-width: unset !important;
  padding: 0 !important;
}

.publisher-tools-tab {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 10px 6px 8px !important;
  border-radius: 12px !important;
  border: 1px solid #e8eef8 !important;
  background: #f8fbff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: break-word !important;
  min-height: 72px !important;
  transition: background .14s ease, border-color .14s ease, color .14s ease !important;
  cursor: pointer;
}

.publisher-tools-tab svg {
  width: 26px !important;
  height: 26px !important;
  color: #0b84f3 !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.publisher-tools-tab:not(.disabled):hover {
  background: #eef6ff !important;
  border-color: #b8d8fa !important;
  color: #0b84f3 !important;
}

.publisher-tools-tab:not(.disabled):hover svg {
  color: #0b84f3 !important;
}

.publisher-tools-tab.active,
.publisher-tools-tab.activated {
  background: #e8f4ff !important;
  border-color: #90c8fa !important;
  color: #0369a1 !important;
}

.publisher-tools-tab.activated::before {
  display: none !important;
}

/* ── 2 columns on very narrow phones ── */
@media (max-width: 360px) {
  .valign.publisher-tools-tabs {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── 4 columns on tablet / desktop ── */
@media (min-width: 576px) {
  .valign.publisher-tools-tabs {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ── Advanced options (Schedule, Anonymous, etc.) ── */
.publisher-footer-options {
  padding: 0 14px 4px !important;
}

.publisher-footer-options .form-table-row {
  padding: 12px 0 !important;
  border-bottom: 1px solid #f1f5fb;
  gap: 12px !important;
}

.publisher-footer-options .form-table-row:last-child {
  border-bottom: none;
}

.publisher-footer-options .form-control-label.h6 {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  margin: 0 !important;
}

.publisher-footer-options .form-text {
  font-size: 12px !important;
  color: #64748b !important;
  margin-top: 2px !important;
}

/* Modal publisher: flex column, scrolls as a unit, never clips */
#publisher-wapper-modal .x-form.publisher {
  display: flex !important;
  flex-direction: column !important;
  max-height: min(88vh, 740px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: 16px !important;
}

/* Publisher scrolls as a whole — don't stretch the slider to fill space */
#publisher-wapper-modal .publisher > .publisher-slider:last-of-type {
  flex: 0 0 auto !important;
  overflow-y: visible !important;
}

/* Inline publisher on the page: also cap textarea, keep reasonable height */
#publisher-wapper .x-form.publisher {
  border-radius: 14px;
  overflow: hidden;
}

/* Night mode */
body.night-mode .publisher .publisher-footer.valign,
body.night-mode .publisher .ele_pub_box_foot {
  border-color: rgba(255, 255, 255, 0.08);
  background: #1a1a2e;
}

body.night-mode .publisher-tools-tab {
  background: #1e2537 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

body.night-mode .publisher-tools-tab:not(.disabled):hover {
  background: #253047 !important;
  border-color: rgba(11, 132, 243, 0.35) !important;
  color: #60a5fa !important;
}

body.night-mode .publisher-tools-tab svg {
  color: #60a5fa !important;
}

body.night-mode .valign.publisher-tools-tabs {
  background: #141925 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Mobile-specific overrides */
@media (max-width: 767px) {
  /* Tighter textarea on phones */
  .publisher .colored-text-wrapper textarea,
  .publisher textarea.js_autosize {
    min-height: 72px !important;
    max-height: 130px !important;
    font-size: 15px;
  }

  /* Full-screen modal, scrollable */
  #publisher-wapper-modal .x-form.publisher {
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  /* Compact header on mobile */
  .publisher .publisher-footer.valign {
    padding: 10px 14px !important;
    min-height: 52px;
  }

  /* Hide privacy label text on very small screens — keep icon only */
  .publisher .ele_post_pub_privacy .btn-group-text {
    display: none !important;
  }

  /* Post button: show icon only on mobile */
  .publisher .js_publisher-btn .d-none {
    display: inline-block !important;
  }

  /* On mobile, publisher modal is bounded by viewport minus header */
  #publisher-wapper-modal .x-form.publisher {
    max-height: calc(100dvh - var(--sovf-fixed-header-offset, 92px)) !important;
    border-radius: 0 !important;
  }

  body.publisher-focus.newsfeed-v2-active #publisher-wapper:not(.nf2-publisher-embedded) .publisher:not(.mini),
  body.publisher-focus.nf2-header-mounted #publisher-wapper:not(.nf2-publisher-embedded) .publisher:not(.mini) {
    position: fixed !important;
    top: var(--sovf-fixed-header-offset, 92px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 2147482995 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100dvh - var(--sovf-fixed-header-offset, 92px)) !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  body.publisher-focus.newsfeed-v2-active #publisher-wapper:not(.nf2-publisher-embedded) .publisher-overlay,
  body.publisher-focus.nf2-header-mounted #publisher-wapper:not(.nf2-publisher-embedded) .publisher-overlay {
    top: var(--sovf-fixed-header-offset, 92px) !important;
    z-index: 2147482990 !important;
  }

  body.publisher-focus.newsfeed-v2-active #publisher-wapper:not(.nf2-publisher-embedded) .publisher > .publisher-slider:first-of-type,
  body.publisher-focus.nf2-header-mounted #publisher-wapper:not(.nf2-publisher-embedded) .publisher > .publisher-slider:first-of-type,
  body.publisher-focus.newsfeed-v2-active #publisher-wapper.nf2-publisher-embedded .publisher > .publisher-slider:first-of-type,
  body.publisher-focus.nf2-header-mounted #publisher-wapper.nf2-publisher-embedded .publisher > .publisher-slider:first-of-type {
    display: block !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    flex: 0 0 auto !important;
    background: #fff !important;
    box-shadow: 0 1px 0 #edf1f8, 0 12px 24px -22px rgba(15, 23, 42, 0.55);
  }

  body.publisher-focus.newsfeed-v2-active #publisher-wapper:not(.nf2-publisher-embedded) .publisher-message,
  body.publisher-focus.nf2-header-mounted #publisher-wapper:not(.nf2-publisher-embedded) .publisher-message {
    flex: 0 0 auto !important;
    padding-top: 12px !important;
  }

  body.publisher-focus.newsfeed-v2-active #publisher-wapper:not(.nf2-publisher-embedded) .publisher > .publisher-slider:last-of-type,
  body.publisher-focus.nf2-header-mounted #publisher-wapper:not(.nf2-publisher-embedded) .publisher > .publisher-slider:last-of-type,
  body.publisher-focus.newsfeed-v2-active #publisher-wapper.nf2-publisher-embedded .publisher > .publisher-slider:last-of-type,
  body.publisher-focus.nf2-header-mounted #publisher-wapper.nf2-publisher-embedded .publisher > .publisher-slider:last-of-type {
    display: block !important;
    flex: 0 0 auto !important;
  }
}

/* ================================================================
   Header — slim down across all templates & devices
   ================================================================ */

/* Vue-mounted header shell: was 82px, now 54px */
body.nf2-header-mounted .ele_navbar_top {
  height: 54px !important;
  overflow: visible !important;
}

body.nf2-header-mounted .ele_navbar_top .container-fluid {
  padding: 6px 14px !important;
}

body.nf2-header-mounted .main-header {
  margin-bottom: 16px !important;
}

/* Hide legacy header wrappers on ALL pages once Vue shell takes over.
   .ele_header: emptied by Vue (toggle/logo/search moved to shell)
   .ele_navbar_top_right: its action nodes moved to shell; leftover home/reels
   dropdowns have no defined position on non-feed pages causing layout breakage. */
body.nf2-header-mounted .ele_navbar_top .ele_header,
body.nf2-header-mounted .ele_navbar_top_right {
  display: none !important;
}

/* Hamburger + logo pill: scaled for 54px bar */
body.nf2-header-mounted .nf2-site-header-menu .ele_toggle_sidebar,
body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper {
  min-width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
}

body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper {
  min-width: 56px !important;
  padding: 0 12px !important;
}

body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper img {
  max-height: 26px !important;
  max-width: 36px !important;
}

/* Search bar */
body.nf2-header-mounted .nf2-site-header-search .search-wrapper .form-control {
  height: 36px !important;
  font-size: 13px !important;
  border-radius: 12px !important;
  padding-left: 40px !important;
}

body.nf2-header-mounted .nf2-site-header-search .search-wrapper > form svg {
  left: 12px !important;
}

/* Action cluster wrap */
body.nf2-header-mounted .nf2-site-header-actions-wrap {
  padding: 3px !important;
  border-radius: 13px !important;
}

/* Action icon buttons: 34px */
body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
}

body.nf2-header-mounted .nf2-site-header-actions .dropdown {
  height: 34px !important;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle svg {
  width: 18px !important;
  height: 18px !important;
}

/* Avatar */
body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle {
  width: 34px !important;
  min-width: 34px !important;
  border-radius: 10px !important;
}

body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle img {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
}

/* Non-Vue-mounted header (fallback path) */
body.newsfeed-v2-active .ele_navbar_top {
  height: var(--sovf-fixed-header-offset, 56px) !important;
}

body.newsfeed-v2-active .ele_navbar_top_right {
  padding: 7px 12px !important;
}

@media (max-width: 768px) {
  body.newsfeed-v2-active .ele_navbar_top {
    height: var(--sovf-fixed-header-offset, 56px) !important;
  }
}

@media (max-width: 668px) {
  body.newsfeed-v2-active .ele_navbar_top_right,
  body.newsfeed-v2-force .ele_navbar_top_right {
    height: 45px !important;
  }

  body.nf2-header-mounted .ele_navbar_top {
    height: var(--sovf-fixed-header-offset, 92px) !important;
  }
}

/* Final mobile conflict guard:
   when legacy publisher focus is active, temporarily remove fixed header layers
   so composer cannot render behind migrated header/navigation stacks. */
@media (max-width: 668px) {
  body.publisher-focus.nf2-header-mounted .main-header,
  body.publisher-focus.newsfeed-v2-active .main-header,
  body.publisher-focus.nf2-header-mounted .ele_navbar_top,
  body.publisher-focus.newsfeed-v2-active .ele_navbar_top,
  body.publisher-focus.nf2-header-mounted .ele_navbar_top_right,
  body.publisher-focus.newsfeed-v2-active .ele_navbar_top_right {
    display: none !important;
  }

  body.publisher-focus.nf2-header-mounted,
  body.publisher-focus.newsfeed-v2-active {
    padding-top: 0 !important;
  }

  body.publisher-focus.nf2-header-mounted #publisher-wapper,
  body.publisher-focus.newsfeed-v2-active #publisher-wapper {
    position: relative !important;
    z-index: 2147483002 !important;
    margin-top: 0 !important;
  }

  body.publisher-focus.nf2-header-mounted #publisher-wapper .publisher-overlay,
  body.publisher-focus.newsfeed-v2-active #publisher-wapper .publisher-overlay {
    z-index: 2147483000 !important;
  }

  body.publisher-focus.nf2-header-mounted #publisher-wapper .publisher,
  body.publisher-focus.newsfeed-v2-active #publisher-wapper .publisher {
    position: relative !important;
    z-index: 2147483001 !important;
  }
}

/* ------------------------------------------------------------------
   Legacy create-post modal polish (all entry points, all devices)
   ------------------------------------------------------------------ */
#modal,
#modal.show {
  z-index: 2147483002 !important;
}

.modal-backdrop,
.modal-backdrop.show {
  z-index: 2147483001 !important;
}

#modal.modal-publisher {
  padding: 12px !important;
}

#modal.modal-publisher .modal-dialog {
  width: min(860px, calc(100vw - 24px)) !important;
  max-width: 860px !important;
  max-height: min(92dvh, calc(100dvh - 24px)) !important;
  margin: auto !important;
}

#modal.modal-publisher .modal-content {
  border-radius: 20px !important;
  overflow: hidden !important;
  border: 1px solid rgba(210, 224, 240, 0.9) !important;
  box-shadow: 0 28px 64px rgba(9, 23, 46, 0.34) !important;
}

#modal.modal-publisher .modal-body,
#modal.modal-publisher #publisher-wapper-modal,
#modal.modal-publisher #publisher-wapper-modal .publisher {
  padding: 0 !important;
  margin: 0 !important;
  overflow-x: hidden !important;
}

#modal.modal-publisher #publisher-wapper-modal .publisher {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-height: min(92dvh, calc(100dvh - 24px)) !important;
}

#modal.modal-publisher #publisher-wapper-modal .publisher > .publisher-slider:first-of-type {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  background: #fff !important;
  border-bottom: 1px solid #e7eef8 !important;
  box-shadow: none !important;
}

#modal.modal-publisher #publisher-wapper-modal .publisher-footer {
  min-height: 64px !important;
  padding: 10px 14px !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

#modal.modal-publisher #publisher-wapper-modal .publisher-footer::before {
  content: "Create Post";
  margin-right: auto;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
}

/* Keep the modal header clean: single submit action + close */
#modal.modal-publisher #publisher-wapper-modal .publisher-footer .form-check,
#modal.modal-publisher #publisher-wapper-modal .publisher-footer .js_post-as-page {
  display: none !important;
}

#modal.modal-publisher #publisher-wapper-modal .publisher-footer .js_close-publisher-modal {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#modal.modal-publisher #publisher-wapper-modal .publisher-footer .js_close-publisher-modal svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.2 !important;
}

/* ------------------------------------------------------------------
   Group create modal viewport fit
   ------------------------------------------------------------------ */
#modal.modal-group-create {
  padding: 12px !important;
}

#modal.modal-page-create {
  padding: 12px !important;
}

#modal.modal-group-create .modal-dialog,
#modal.modal-page-create .modal-dialog {
  width: min(760px, calc(100vw - 24px)) !important;
  max-width: 760px !important;
  max-height: min(92dvh, calc(100dvh - 24px)) !important;
  margin: auto !important;
}

#modal.modal-group-create .modal-content,
#modal.modal-page-create .modal-content {
  max-height: min(92dvh, calc(100dvh - 24px)) !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  height: min(92dvh, calc(100dvh - 24px)) !important;
}

#modal.modal-group-create .modal-header,
#modal.modal-group-create .modal-footer,
#modal.modal-page-create .modal-header,
#modal.modal-page-create .modal-footer {
  flex: 0 0 auto !important;
}

#modal.modal-group-create .modal-content > form,
#modal.modal-group-create .modal-content > .nf2-create-form,
#modal.modal-page-create .modal-content > form,
#modal.modal-page-create .modal-content > .nf2-create-form {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#modal.modal-group-create .modal-body,
#modal.modal-page-create .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#modal.modal-group-create .nf2-create-form__body,
#modal.modal-page-create .nf2-create-form__body {
  padding-top: 18px !important;
}

@media (max-width: 767px) {
  #modal.modal-group-create,
  #modal.modal-page-create {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) !important;
  }

  #modal.modal-group-create .modal-dialog,
  #modal.modal-group-create .modal-content,
  #modal.modal-page-create .modal-dialog,
  #modal.modal-page-create .modal-content {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
  }

  #modal.modal-group-create .nf2-create-form__body,
  #modal.modal-page-create .nf2-create-form__body {
    padding-top: 14px !important;
  }
}

@media (max-width: 767px) {
  #modal.modal-publisher {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) !important;
  }

  #modal.modal-publisher .modal-dialog {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
  }

  #modal.modal-publisher .modal-content {
    border-radius: 16px !important;
  }

  #modal.modal-publisher #publisher-wapper-modal .publisher-footer {
    min-height: 58px !important;
    padding: 8px 10px !important;
  }

  #modal.modal-publisher #publisher-wapper-modal .publisher-footer::before {
    font-size: 20px;
  }
}

/* ------------------------------------------------------------------
   Final compact header sizing (wins over earlier migration overrides)
   ------------------------------------------------------------------ */
body.newsfeed-v2-active,
body.nf2-header-mounted {
  --sovf-fixed-header-offset: 68px;
}

body.newsfeed-v2-active .home_padd_top {
  padding-top: 0 !important;
}

html.nf2-site-shell-pending body,
body.newsfeed-v2-active,
body.nf2-header-mounted {
  padding-top: var(--sovf-fixed-header-offset) !important;
}

body.newsfeed-v2-active .main-header,
body.nf2-header-mounted .main-header {
  margin-bottom: 4px !important;
}

body.newsfeed-v2-active .ele_navbar_top,
body.nf2-header-mounted .ele_navbar_top {
  height: var(--sovf-fixed-header-offset) !important;
  min-height: var(--sovf-fixed-header-offset) !important;
}

body.newsfeed-v2-active .ele_navbar_top .container-fluid,
body.nf2-header-mounted .ele_navbar_top .container-fluid {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

@media (max-width: 900px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted {
    --sovf-fixed-header-offset: 62px;
  }
}

@media (max-width: 668px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted {
    --sovf-fixed-header-offset: 56px;
  }

  body.newsfeed-v2-active .ele_navbar_top .container-fluid,
  body.nf2-header-mounted .ele_navbar_top .container-fluid {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  body.nf2-header-mounted .nf2-site-header-menu .ele_toggle_sidebar,
  body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper {
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 12px !important;
  }

  body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper {
    min-width: 48px !important;
    padding: 0 10px !important;
  }

  body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper img {
    max-height: 24px !important;
    max-width: 32px !important;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 10px !important;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_user_droptoggle img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
  }
}

/* ------------------------------------------------------------------
   Absolute final override (do not place new header/sidebar rules below)
   ------------------------------------------------------------------ */

/* Bootstrap 4's .navbar class adds padding: 0.5rem 1rem to the nav element.
   This reduces the actual inner content height and causes cramping on all pages
   including static pages where newsfeed-v2-active is not added. */
body.nf2-header-mounted .ele_navbar_top,
body.newsfeed-v2-active .ele_navbar_top,
body.nf2-site-shell-active .ele_navbar_top {
  padding: 0 !important;
}

/* Hide legacy header children whose content has been moved to the Vue shell.
   Applies to all pages (feed, static, profile, etc.) once Vue header mounts. */
body.nf2-header-mounted .ele_navbar_top .ele_header,
body.nf2-header-mounted .ele_navbar_top_right {
  display: none !important;
}

body.newsfeed-v2-active,
body.nf2-header-mounted,
body.nf2-site-shell-active {
  --sovf-fixed-header-offset: 64px !important;
}

body.newsfeed-v2-active .ele_sidebar_left,
body.nf2-header-mounted .ele_sidebar_left,
body.nf2-site-shell-active .ele_sidebar_left,
body.newsfeed-v2-active .chat-sidebar,
body.nf2-header-mounted .chat-sidebar,
body.nf2-site-shell-active .chat-sidebar {
  top: var(--sovf-fixed-header-offset) !important;
  height: calc(100% - var(--sovf-fixed-header-offset)) !important;
}

body.newsfeed-v2-active .nf2-site-header-brand .logo-wrapper img,
body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper img,
body.nf2-site-shell-active .nf2-site-header-brand .logo-wrapper img,
body.newsfeed-v2-active .nf2-site-header-brand .logo-wrapper svg,
body.nf2-header-mounted .nf2-site-header-brand .logo-wrapper svg,
body.nf2-site-shell-active .nf2-site-header-brand .logo-wrapper svg {
  max-height: 44px !important;
  max-width: 56px !important;
}

@media (max-width: 900px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted,
  body.nf2-site-shell-active {
    --sovf-fixed-header-offset: 60px !important;
  }
}

@media (max-width: 668px) {
  body.newsfeed-v2-active,
  body.nf2-header-mounted,
  body.nf2-site-shell-active {
    --sovf-fixed-header-offset: 56px !important;
  }
}

/* Composer accessibility polish: stronger contrast and subtle surface tint */
body.newsfeed-v2-active .nf2-composer {
  background: linear-gradient(180deg, #f1f5fb 0%, #eef3fa 100%) !important;
  border: 1px solid #c8d8ec !important;
  box-shadow: 0 8px 20px rgba(14, 41, 84, 0.08) !important;
}

body.newsfeed-v2-active .nf2-composer-box {
  background: #f7faff !important;
  border: 1px solid #bfd1e8 !important;
}

body.newsfeed-v2-active .nf2-composer-text {
  color: #35506f !important;
  font-weight: 600 !important;
}

/* Unified publisher card for groups/pages to match newsfeed composer */
.nf2-unified-publisher {
  margin-bottom: 16px;
}

.nf2-unified-publisher > #publisher-wapper {
  margin: 0 !important;
}

.nf2-unified-publisher > #publisher-wapper > .publisher-overlay,
.nf2-unified-publisher > #publisher-wapper > .daytime_message {
  display: none !important;
}

.nf2-unified-publisher > #publisher-wapper .x-form.publisher,
.nf2-unified-publisher > #publisher-wapper .publisher {
  border: 1px solid #c8d8ec !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #f1f5fb 0%, #eef3fa 100%) !important;
  box-shadow: 0 10px 22px rgba(14, 41, 84, 0.08) !important;
  overflow: hidden !important;
}

.nf2-unified-publisher > #publisher-wapper .publisher-message {
  background: #f7faff !important;
  border-bottom: 1px solid #d8e4f3 !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.nf2-unified-publisher > #publisher-wapper .publisher-message textarea {
  color: #35506f !important;
  font-weight: 600 !important;
}

/* Groups/pages composer entry now opens modal (same flow as newsfeed) */
.nf2-unified-publisher-trigger {
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #bfd1e8;
  border-radius: 14px;
  background: #f7faff;
  padding: 12px 14px;
  color: #35506f;
  text-align: left;
}

.nf2-unified-publisher-trigger:hover {
  background: #f1f6fd;
  border-color: #a9c2df;
}

body.static-page-vue-active {
  --static-page-surface: #ffffff;
  --static-page-border: #d8e3f0;
  --static-page-text: #10213a;
  --static-page-muted: #61708a;
  --static-page-accent: #0f766e;
  --static-page-warn-bg: #fff6db;
  --static-page-warn-border: #f3d07a;
  --static-page-warn-text: #6a4b00;
}

.static-page-vue-shell {
  display: block;
}

.static-page-vue-frame {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto 28px;
}

.static-page-vue-hero-card {
  margin-bottom: 24px;
}

.static-page-vue-panel {
  padding: 28px;
  border: 1px solid var(--static-page-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f8fbff 100%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.static-page-vue-richtext {
  color: var(--static-page-text);
}

.static-page-vue-richtext > :first-child {
  margin-top: 0;
}

.static-page-vue-richtext > :last-child {
  margin-bottom: 0;
}

.static-page-vue-richtext .container,
.static-page-vue-richtext .container-fluid,
.static-page-vue-richtext .row,
.static-page-vue-richtext [class*="col-"] {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
  flex: initial;
  display: block;
}

.static-page-vue-richtext .card,
.static-page-vue-richtext .card-body,
.static-page-vue-richtext .card-header,
.static-page-vue-richtext .card-footer {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.static-page-vue-richtext .btn,
.static-page-vue-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--static-page-accent) 0%, #0b84f3 100%);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 24px rgba(11, 132, 243, 0.22);
}

.static-page-vue-richtext .btn:hover,
.static-page-vue-action:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.static-page-vue-richtext .alert,
.static-page-vue-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--static-page-warn-border);
  border-radius: 18px;
  background: var(--static-page-warn-bg);
  color: var(--static-page-warn-text);
  padding: 14px 16px;
}

.static-page-vue-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: rgba(106, 75, 0, 0.12);
}

.static-page-vue-form {
  margin-top: 18px;
}

.static-page-vue-richtext img,
.static-page-vue-richtext video,
.static-page-vue-richtext iframe {
  max-width: 100%;
  border-radius: 18px;
}

.static-page-vue-richtext table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.static-page-vue-richtext table th,
.static-page-vue-richtext table td {
  border: 1px solid var(--static-page-border);
  padding: 10px 12px;
}

body.night-mode.static-page-vue-active {
  --static-page-surface: #19202c;
  --static-page-border: rgba(255, 255, 255, 0.08);
  --static-page-text: #edf3fb;
  --static-page-muted: #a6b5cb;
  --static-page-warn-bg: rgba(146, 101, 0, 0.2);
  --static-page-warn-border: rgba(243, 208, 122, 0.35);
  --static-page-warn-text: #f7dda1;
}

body.night-mode .static-page-vue-panel {
  background: linear-gradient(180deg, rgba(25, 32, 44, 0.96) 0%, rgba(20, 27, 39, 0.98) 100%);
  box-shadow: none;
}

body.night-mode .static-page-vue-richtext .card,
body.night-mode .static-page-vue-richtext .card-body,
body.night-mode .static-page-vue-richtext .card-header,
body.night-mode .static-page-vue-richtext .card-footer {
  color: var(--static-page-text);
}

@media (max-width: 767px) {
  .static-page-vue-frame {
    width: calc(100% - 20px);
  }

  .static-page-vue-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .static-page-vue-richtext .btn,
  .static-page-vue-action {
    width: 100%;
  }
}

.nf2-unified-publisher-trigger-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f8b8d;
  color: #fff;
}

.nf2-unified-publisher-trigger-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}


/* ==============================================
   Compact Hover Card (user / page popover)
   ============================================== */

.user-popover-wrapper {
  width: 260px !important;
  min-height: auto !important;
}

/* Disable legacy hovercard overlay globally (chat/header/feed avatars) */
body .user-popover-wrapper {
  display: none !important;
}

.user-popover-content.sovf-hovercard {
  width: 260px !important;
  padding: 14px 16px 12px !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.13) !important;
  position: absolute !important;
  top: 6px !important;
  left: 0 !important;
}

body.night-mode .user-popover-content.sovf-hovercard {
  background: #1e2431 !important;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45) !important;
}

/* top row: avatar + info */
.sovf-hovercard .hc-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sovf-hovercard .hc-avatar-link { flex-shrink: 0; }

.sovf-hovercard .hc-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0,0,0,0.07);
  display: block;
}

body.night-mode .sovf-hovercard .hc-avatar {
  border-color: rgba(255,255,255,0.1);
}

.sovf-hovercard .hc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sovf-hovercard .hc-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f1923;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sovf-hovercard .hc-name:hover { text-decoration: underline; }

body.night-mode .sovf-hovercard .hc-name { color: #e8eaf0; }

.sovf-hovercard .hc-verified {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.sovf-hovercard .hc-followers {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.sovf-hovercard .hc-followers a {
  color: inherit;
  text-decoration: none;
}

.sovf-hovercard .hc-followers a:hover { text-decoration: underline; }

body.night-mode .sovf-hovercard .hc-followers { color: #9aa5b4; }

.sovf-hovercard .hc-sub {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* action buttons row */
.sovf-hovercard .hc-actions {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border-radius: 20px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.hc-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

.hc-btn-primary {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.hc-btn-primary:hover { background: #0d6460; }

.hc-btn-success {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}

.hc-btn-success:hover { background: #16a34a; }

.hc-btn-ghost {
  background: transparent;
  color: #374151;
  border-color: #d1d5db;
}

.hc-btn-ghost:hover { background: #f3f4f6; }

body.night-mode .hc-btn-ghost {
  color: #c9d1db;
  border-color: #3a4251;
}

/* ==============================================
   Responsive Hardening (newsfeed v2 scope)
   ============================================== */
body.nf2-site-shell-active,
body.newsfeed-v2-active {
  overflow-x: hidden;
}

body.nf2-site-shell-active .newsfeed-v2-shell,
body.newsfeed-v2-active .newsfeed-v2-shell,
body.nf2-site-shell-active .newsfeed-v2-stream,
body.newsfeed-v2-active .newsfeed-v2-stream,
body.nf2-site-shell-active .newsfeed-v2-stream .js_posts_stream,
body.newsfeed-v2-active .newsfeed-v2-stream .js_posts_stream {
  min-width: 0;
}

body.nf2-site-shell-active .newsfeed-v2-stream img,
body.nf2-site-shell-active .newsfeed-v2-stream video,
body.nf2-site-shell-active .newsfeed-v2-stream iframe,
body.newsfeed-v2-active .newsfeed-v2-stream img,
body.newsfeed-v2-active .newsfeed-v2-stream video,
body.newsfeed-v2-active .newsfeed-v2-stream iframe {
  max-width: 100%;
}

body.nf2-site-shell-active .newsfeed-v2-stream .ele_post_filters_nav,
body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav {
  scroll-snap-type: x proximity;
}

body.nf2-site-shell-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby,
body.newsfeed-v2-active .newsfeed-v2-stream .ele_post_filters_nav > .filterby {
  scroll-snap-align: start;
}

@media (max-width: 991px) {
  body.nf2-site-shell-active .newsfeed-v2-stream .post .dropdown-menu,
  body.nf2-site-shell-active .newsfeed-v2-stream .comment .dropdown-menu,
  body.nf2-site-shell-active .newsfeed-v2-stream .comments-filter .dropdown-menu,
  body.newsfeed-v2-active .newsfeed-v2-stream .post .dropdown-menu,
  body.newsfeed-v2-active .newsfeed-v2-stream .comment .dropdown-menu,
  body.newsfeed-v2-active .newsfeed-v2-stream .comments-filter .dropdown-menu {
    right: 0;
    left: auto;
    min-width: min(240px, calc(100vw - 24px));
    max-width: min(320px, calc(100vw - 24px));
  }
}

@media (max-width: 600px) {
  body.nf2-site-shell-active .newsfeed-v2-stream .post .dropdown-menu,
  body.nf2-site-shell-active .newsfeed-v2-stream .comment .dropdown-menu,
  body.nf2-site-shell-active .newsfeed-v2-stream .comments-filter .dropdown-menu,
  body.newsfeed-v2-active .newsfeed-v2-stream .post .dropdown-menu,
  body.newsfeed-v2-active .newsfeed-v2-stream .comment .dropdown-menu,
  body.newsfeed-v2-active .newsfeed-v2-stream .comments-filter .dropdown-menu {
    min-width: 0;
    width: min(300px, calc(100vw - 20px));
  }
}

body.night-mode .hc-btn-ghost:hover { background: #252d3b; }

.hc-btn-muted {
  background: #f3f4f6;
  color: #6b7280;
  border-color: #e5e7eb;
}

.hc-btn-muted:hover { background: #e5e7eb; }

.hc-btn-icon {
  background: transparent;
  color: #6b7280;
  border-color: #d1d5db;
  padding: 5px 9px;
}

.hc-btn-icon:hover { background: #f3f4f6; color: #374151; }

body.night-mode .hc-btn-icon {
  color: #9aa5b4;
  border-color: #3a4251;
}

body.night-mode .hc-btn-icon:hover { background: #252d3b; }

/* ==============================================
   Responsive Hardening (newsfeed v2 scope v2.1)
   ============================================== */
body.nf2-site-shell-active .newsfeed-v2-stream .post,
body.nf2-site-shell-active .newsfeed-v2-stream .comment,
body.newsfeed-v2-active .newsfeed-v2-stream .post,
body.newsfeed-v2-active .newsfeed-v2-stream .comment {
  min-width: 0;
}

body.nf2-site-shell-active .newsfeed-v2-stream .post .post-body,
body.nf2-site-shell-active .newsfeed-v2-stream .post .post-message,
body.nf2-site-shell-active .newsfeed-v2-stream .post .post-text,
body.nf2-site-shell-active .newsfeed-v2-stream .comment .comment-body,
body.nf2-site-shell-active .newsfeed-v2-stream .comment .comment-text,
body.newsfeed-v2-active .newsfeed-v2-stream .post .post-body,
body.newsfeed-v2-active .newsfeed-v2-stream .post .post-message,
body.newsfeed-v2-active .newsfeed-v2-stream .post .post-text,
body.newsfeed-v2-active .newsfeed-v2-stream .comment .comment-body,
body.newsfeed-v2-active .newsfeed-v2-stream .comment .comment-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.nf2-site-shell-active .newsfeed-v2-stream table,
body.newsfeed-v2-active .newsfeed-v2-stream table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.nf2-site-shell-active .newsfeed-v2-stream pre,
body.newsfeed-v2-active .newsfeed-v2-stream pre {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 480px) {
  body.nf2-header-mounted .nf2-site-header-shell {
    gap: 6px;
  }

  body.nf2-header-mounted .nf2-site-header-actions {
    gap: 4px;
  }

  body.nf2-header-mounted .nf2-site-header-actions .ele_hdr_droptoggle {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }
}

@media (max-width: 360px) {
  body.nf2-header-mounted .nf2-site-header-left {
    gap: 6px;
  }

  body.nf2-header-mounted .nf2-site-header-actions {
    gap: 3px;
  }
}

/* ==============================================
   Reactions Anchoring Guard (newsfeed v2)
   ============================================== */
body.nf2-site-shell-active .newsfeed-v2-stream .reactions-wrapper,
body.newsfeed-v2-active .newsfeed-v2-stream .reactions-wrapper {
  position: relative !important;
}

body.nf2-site-shell-active .newsfeed-v2-stream .reactions-container,
body.newsfeed-v2-active .newsfeed-v2-stream .reactions-container {
  position: fixed !important;
  top: auto;
  bottom: auto !important;
  max-width: calc(100vw - 16px);
  z-index: 2147482000;
}
