:root {
  --post-card-height: 460px;
  --post-card-aspect-ratio: 16/9;
  --post-card-min-height: 260px;
  --post-reel-height: 580px;
  --post-reel-aspect-ratio: 9/16;
}

@media (max-width: 767px) {
  :root {
    --post-card-height: 320px;
    --post-card-aspect-ratio: 4/5;
    --post-card-min-height: 220px;
    --post-reel-height: 460px;
    --post-reel-aspect-ratio: 9/16;
  }
}

.post-media-image,
.post-media-image-wrapper {
  position: relative;
}

.post-media-image {
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
  height: auto;
  min-height: var(--post-card-min-height);
  max-height: var(--post-card-height);
  aspect-ratio: var(--post-card-aspect-ratio);
  position: relative;
  background: #f2f4f8;
}

.post-media-image img,
.post-media-image .image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.post-media-image>.pg_wrapper,
.post-media-image>.plyr__video-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.post-media-image .image {
  background-size: contain;
  background-position: center center;
  padding-top: 0;
}

/* funding covers should fill the media area instead of shrinking */
.post-media-image .image.funding-cover {
  aspect-ratio: 16/9;
  height: auto;
  min-height: 220px;
  max-height: var(--post-card-height);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 16px;
}

.pg_1x {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
  height: 100%;
}

.pg_1x>a {
  display: block;
  width: 100%;
  height: 100%;
}

.pg_1x img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-media-video {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background-color: #000;
  aspect-ratio: var(--post-card-aspect-ratio);
  max-height: var(--post-card-height);
  min-height: var(--post-card-min-height);
}

.post-media-video.is-reel {
  aspect-ratio: var(--post-reel-aspect-ratio);
  max-height: var(--post-reel-height);
}

.post-media-video .plyr {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.post-media-video .plyr__video-wrapper {
  width: 100%;
  height: 100%;
  padding-bottom: 0 !important;
}

.post-media-video video,
.post-media-video iframe,
.post-media-video .plyr__poster,
.post-media-video .plyr__video-embed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-media-video.is-reel .plyr__video-wrapper {
  height: 100%;
  padding-bottom: 0 !important;
}

.post-media-video.is-reel video,
.post-media-video.is-reel .plyr__poster {
  object-fit: cover;
}

/* Prevent cropping/overflow when entering player fullscreen */
.post-media-video .plyr.plyr--fullscreen video,
.post-media-video .plyr.plyr--fullscreen .plyr__poster {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}

.post-media-video .plyr.plyr--fullscreen .plyr__video-wrapper {
  width: 100%;
  height: 100%;
}

/* keep all newsfeed content aligned to the card height */
.post-media > .post-media-image,
.post-media .post-media-video,
.post-media .ratio,
.youtube-player {
  width: 100%;
  max-width: 100%;
}

.post-media-image img,
.youtube-player iframe,
.youtube-player img {
  object-fit: cover;
}

.post-media,
.post-media-image,
.post-media .ratio iframe,
.post-media .ratio video,
.post-media .post-media-video,
.youtube-player {
  width: 100%;
}

.pg_wrapper a,
.pg_1x img {
  object-fit: cover;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

.pg_wrapper {
  overflow: visible;
}

.post-body .mt10 > .pg_wrapper {
  padding: 8px;
  margin: 0 6px;
  background: #f8f9fa;
  border-radius: 14px;
}

body.night-mode .post-body .mt10 > .pg_wrapper {
  background: var(--card-dark-hover);
}

@media (max-width: 575px) {
  .post-body .mt10 > .pg_wrapper {
    margin: 0;
    padding: 0;
    background: transparent;
  }
}

/* Warm-theme post cards for all Vue-backed newsfeed surfaces. */
body.sovfhub-next-theme {
  --warm-post-bg: #fff;
  --warm-post-text: #141414;
  --warm-post-muted: #7f7f7f;
  --warm-post-border: #ececec;
  --warm-post-soft: rgba(0, 0, 0, .06);
  --warm-post-shadow: 0 1px 3px 0 rgba(0, 0, 0, .10), 0 1px 2px 0 rgba(0, 0, 0, .06);
  --warm-post-hover-shadow: 0 6px 18px rgba(15, 23, 42, .10);
  --warm-post-accent: linear-gradient(90deg, #0b5fb4 0%, #1278df 52%, #0e6fce 100%);
  --warm-post-accent-shadow: rgba(18, 120, 223, 0.18);
}

body.night-mode.sovfhub-next-theme {
  --warm-post-bg: #212121;
  --warm-post-text: #f4f4f5;
  --warm-post-muted: #a7a7a7;
  --warm-post-border: #303030;
  --warm-post-soft: rgba(255, 255, 255, .10);
  --warm-post-shadow: none;
  --warm-post-hover-shadow: 0 8px 22px rgba(0, 0, 0, .24);
  --warm-post-accent: linear-gradient(90deg, #1d74d6 0%, #3d96ff 52%, #1e7be0 100%);
  --warm-post-accent-shadow: rgba(61, 150, 255, 0.22);
}

body.sovfhub-next-theme .js_posts_stream > ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.sovfhub-next-theme .js_posts_stream > ul > li {
  list-style: none;
}

body.sovfhub-next-theme .js_posts_stream .post:not(.ele_post_skel),
body.sovfhub-next-theme .newsfeed-v2-stream .post:not(.ele_post_skel),
body.sovfhub-next-theme .post.nf2-warm-post {
  position: relative;
  margin-bottom: 20px;
  color: var(--warm-post-text);
  background: var(--warm-post-bg) !important;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: var(--warm-post-shadow);
  overflow: visible;
}

body.sovfhub-next-theme .js_posts_stream .post:not(.ele_post_skel):hover,
body.sovfhub-next-theme .newsfeed-v2-stream .post:not(.ele_post_skel):hover,
body.sovfhub-next-theme .post.nf2-warm-post:hover {
  box-shadow: var(--warm-post-hover-shadow);
}

body.sovfhub-next-theme .js_posts_stream .post:not(.ele_post_skel)::before,
body.sovfhub-next-theme .newsfeed-v2-stream .post:not(.ele_post_skel)::before,
body.sovfhub-next-theme .post.nf2-warm-post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--warm-post-accent);
  box-shadow: 0 1px 0 var(--warm-post-accent-shadow);
  pointer-events: none;
  z-index: 0;
}

body.night-mode.sovfhub-next-theme .js_posts_stream .post:not(.ele_post_skel),
body.night-mode.sovfhub-next-theme .newsfeed-v2-stream .post:not(.ele_post_skel),
body.night-mode.sovfhub-next-theme .post.nf2-warm-post {
  border-color: var(--warm-post-border);
}

body.sovfhub-next-theme .post .pin-icon,
body.sovfhub-next-theme .post .pending-icon {
  padding: 10px 15px 0;
  color: #ff9800;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

body.sovfhub-next-theme .post.boosted {
  border-color: #ffa412;
}

body.sovfhub-next-theme .post .boosted-icon {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 15px 0 0 15px;
  padding: 0 10px;
  color: #ff7042;
  background: #ffedd3;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  line-height: 22px;
  text-transform: uppercase;
}

body.sovfhub-next-theme .post-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 15px;
}

body.sovfhub-next-theme .post-avatar {
  position: relative;
  flex: 0 0 40px;
  margin: 0;
}

body.sovfhub-next-theme .post-avatar-picture,
body.sovfhub-next-theme .comment-avatar-picture {
  background-color: var(--warm-post-border);
  color: var(--warm-post-muted);
  transition: opacity .15s ease;
}

body.sovfhub-next-theme a.post-avatar-picture:hover {
  opacity: 0.82;
}

body.sovfhub-next-theme .post-avatar-picture .sf-avatar__fallback,
body.sovfhub-next-theme .comment-avatar-picture .sf-avatar__fallback {
  color: var(--warm-post-muted);
}

body.sovfhub-next-theme .post-avatar .sf-avatar__chip,
body.sovfhub-next-theme .post-avatar .online-dot {
  box-shadow: 0 0 0 2px var(--warm-post-bg);
  animation: nf2-online-pulse 2.4s ease-in-out infinite;
}

@keyframes nf2-online-pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--warm-post-bg); }
  50%       { box-shadow: 0 0 0 2px var(--warm-post-bg), 0 0 0 4px rgba(34, 197, 94, .35); }
}

body.sovfhub-next-theme .post-meta {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 52px;
  color: var(--warm-post-muted);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
}

body.sovfhub-next-theme .post-author-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

body.sovfhub-next-theme .post-meta > .dropdown,
body.sovfhub-next-theme .post-header > .dropdown {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

body.sovfhub-next-theme .post-meta > .sf-post-options,
body.sovfhub-next-theme .post-header > .sf-post-options {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto !important;
  float: none !important;
  display: block !important;
  margin: 0 !important;
  z-index: 22;
}

body.sovfhub-next-theme .post-meta > .float-end.dropdown.ele_post_hdr_menu.sf-post-options,
body.sovfhub-next-theme .post-header > .float-end.dropdown.ele_post_hdr_menu.sf-post-options {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  bottom: auto !important;
  float: none !important;
  margin: 0 !important;
  transform: none !important;
}

body.sovfhub-next-theme .post-meta > .float-end.dropdown.ele_post_hdr_menu.sf-post-options .sf-post-options-toggle,
body.sovfhub-next-theme .post-header > .float-end.dropdown.ele_post_hdr_menu.sf-post-options .sf-post-options-toggle {
  margin: 0 !important;
}

body.sovfhub-next-theme .post.nf2-dropdown-host-open,
body.sovfhub-next-theme .post:has(.sf-post-options.show) {
  z-index: 18;
}

/* Keep feed content below sticky header layers while menus are open */
body.sovfhub-next-theme .sg-offcanvas-mainbar,
body.sovfhub-next-theme .js_posts_stream,
body.sovfhub-next-theme .js_posts_stream > ul,
body.sovfhub-next-theme .js_posts_stream > ul > li,
body.sovfhub-next-theme .post {
  position: relative;
  z-index: 1;
}

/* Bootstrap omits btn-group position:relative in this theme; without it the
   dropdown-menu resolves to .post as its containing block and appears in the
   wrong place. Restore it so the audience picker sits below its toggle. */
body.sovfhub-next-theme .btn-group {
  position: relative;
}

body.sovfhub-next-theme .sf-post-options-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--warm-post-muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

body.sovfhub-next-theme .sf-post-options-toggle::after {
  display: none;
}

body.sovfhub-next-theme .sf-post-options-toggle:hover,
body.sovfhub-next-theme .sf-post-options.show .sf-post-options-toggle {
  color: var(--warm-post-text);
  background: rgba(15, 23, 42, .06);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
}

body.night-mode.sovfhub-next-theme .sf-post-options-toggle:hover,
body.night-mode.sovfhub-next-theme .sf-post-options.show .sf-post-options-toggle {
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

body.sovfhub-next-theme .sf-post-options-menu.action-dropdown-menu,
body.sovfhub-next-theme .post .action-dropdown-menu {
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  width: min(286px, calc(100vw - 40px));
  min-width: 236px;
  max-width: calc(100vw - 40px);
  max-height: min(520px, calc(100vh - 120px));
  padding: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(226, 232, 240, .96);
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .18), 0 3px 10px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: none !important;
  z-index: 24;
}

body.night-mode.sovfhub-next-theme .sf-post-options-menu.action-dropdown-menu,
body.night-mode.sovfhub-next-theme .post .action-dropdown-menu {
  border-color: rgba(63, 63, 70, .95);
  background: rgba(32, 32, 35, .98);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .42);
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--warm-post-text);
  white-space: normal;
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item:hover,
body.sovfhub-next-theme .sf-post-options-menu .dropdown-item:focus,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item:hover,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item:focus {
  background: rgba(37, 99, 235, .08);
}

body.night-mode.sovfhub-next-theme .sf-post-options-menu .dropdown-item:hover,
body.night-mode.sovfhub-next-theme .sf-post-options-menu .dropdown-item:focus,
body.night-mode.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item:hover,
body.night-mode.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item:focus {
  background: rgba(147, 197, 253, .12);
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item .action,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item .action {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  color: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item .action.no-desc,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item .action.no-desc {
  min-height: 24px;
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item .action.no-icon,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item .action.no-icon {
  grid-template-columns: 22px minmax(0, 1fr);
  padding-left: 0;
  font-weight: 650;
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item .action.no-icon::before,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item .action.no-icon::before {
  content: "\f111";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 8px;
  line-height: 1;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(100, 116, 139, 0.95);
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item .action span,
body.sovfhub-next-theme .sf-post-options-menu .dropdown-item .action-desc,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item .action span,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item .action-desc {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-item .main-icon,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-item .main-icon {
  width: 20px !important;
  height: 20px !important;
  margin-right: 0 !important;
  opacity: .82;
}

body.sovfhub-next-theme .sf-post-options-menu .dropdown-divider,
body.sovfhub-next-theme .post .action-dropdown-menu .dropdown-divider {
  margin: 7px 4px;
  border-top: 1px solid var(--warm-post-border);
  background: transparent;
}

body.sovfhub-next-theme .post-author,
body.sovfhub-next-theme .post-author a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  color: var(--warm-post-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

body.sovfhub-next-theme .post-meta > .js_user-popover {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

body.sovfhub-next-theme .verified-badge,
body.sovfhub-next-theme .pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 0;
  vertical-align: text-top;
}

body.sovfhub-next-theme .verified-badge svg,
body.sovfhub-next-theme .pro-badge svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
}

body.sovfhub-next-theme .post-title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  max-width: 100%;
  color: #6b7b8f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.sovfhub-next-theme .post-title a,
body.sovfhub-next-theme .post-title .post-author {
  color: #2b78d0;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
}

body.sovfhub-next-theme .post-title .main-icon,
body.sovfhub-next-theme .post-title .main-icon * {
  width: 15px !important;
  height: 15px !important;
  color: #7d8ea3 !important;
  fill: #7d8ea3 !important;
}

body.sovfhub-next-theme .post-title .badge.rounded-pill {
  margin-left: 2px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

body.sovfhub-next-theme .post-time,
body.sovfhub-next-theme .post-time a,
body.sovfhub-next-theme .post-time .post-sub-item {
  color: var(--warm-post-muted);
  font-size: 12.5px;
}

body.sovfhub-next-theme .post-time {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  max-width: 100%;
  line-height: 1.28;
}

body.sovfhub-next-theme .post-time .btn-group {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0 2px;
  vertical-align: middle;
}

body.sovfhub-next-theme .post-time .btn-group .btn {
  min-height: 24px;
  padding: 0 4px;
}

body.sovfhub-next-theme .post-text {
  margin-bottom: 10px;
  padding: 0 15px;
  color: var(--warm-post-text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
}

body.sovfhub-next-theme .post-text a {
  font-weight: 600;
}

body.sovfhub-next-theme .post-media {
  width: auto;
  max-width: none;
  margin: 10px 15px 0;
  background: rgba(48, 48, 48, .02);
  border: 1px solid #e6ecf0;
  border-radius: 10px;
  overflow: hidden;
}

body.night-mode.sovfhub-next-theme .post-media {
  border-color: #424242;
  background: rgba(255, 255, 255, .04);
}

body.sovfhub-next-theme .post-media-image,
body.sovfhub-next-theme .post-media-image img,
body.sovfhub-next-theme .post-media-image .image,
body.sovfhub-next-theme .post-media-video,
body.sovfhub-next-theme .pg_1x {
  border-radius: 10px;
}

body.sovfhub-next-theme .post-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 15px 5px;
  color: #525252;
  font-size: 12.5px;
  text-transform: lowercase;
}

body.sovfhub-next-theme .post-stats .float-start,
body.sovfhub-next-theme .post-stats .float-end {
  float: none !important;
}

body.night-mode.sovfhub-next-theme .post-stats {
  color: var(--warm-post-muted);
}

body.sovfhub-next-theme .post-reactions-strip {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px 4px;
  cursor: pointer;
  user-select: none;
}

/* ── Reaction Picker ─────────────────────────────────────────────────
   Cosmetic overrides only. JS controls display/position/max-width.
─────────────────────────────────────────────────────────────────── */

/* Desktop */
body.sovfhub-next-theme .reactions-container {
  width: max-content !important;
  background: #fff !important;
  border-radius: 999px !important;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.08),
    0 10px 28px -4px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  padding: 5px 6px !important;
  white-space: nowrap !important;
}

body.night-mode.sovfhub-next-theme .reactions-container {
  background: #1e293b !important;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.09) !important;
}

body.sovfhub-next-theme .reactions_item {
  width: 44px !important;
  height: 44px !important;
  position: relative !important;
  transition: transform 0.15s cubic-bezier(0.34, 1.5, 0.64, 1) !important;
  animation: none !important;
  -webkit-animation: none !important;
}

body.sovfhub-next-theme .reactions_item .emoji {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  transform: translate(-50%, -50%) !important;
}

body.sovfhub-next-theme .reactions_item .emoji img {
  width: 32px !important;
  height: 32px !important;
  display: block !important;
}

body.sovfhub-next-theme .reactions_item:hover {
  transform: scale(1.25) translate(0, -6px) !important;
}

body.sovfhub-next-theme .reactions_item::after { display: none !important; }

body.sovfhub-next-theme .post-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0 8px 10px;
  border-top: 0;
}

body.sovfhub-next-theme .post-actions .action-btn,
body.sovfhub-next-theme .post-actions .reaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  color: var(--warm-post-text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

body.sovfhub-next-theme .post-actions .action-btn {
  flex: 0 0 auto;
  border-radius: 999px;
}

body.sovfhub-next-theme .post-actions .reaction-btn-name,
body.sovfhub-next-theme .post-actions .action-btn > span,
body.sovfhub-next-theme .post-actions .reaction-btn > span,
body.sovfhub-next-theme .post-actions [class*="d-xl-"],
body.sovfhub-next-theme .post-actions [class*="d-lg-"] {
  display: none !important;
}

body.sovfhub-next-theme .post-actions .action-btn:hover {
  background: rgba(0, 0, 0, .035);
}

body.night-mode.sovfhub-next-theme .post-actions .action-btn:hover {
  background: rgba(255, 255, 255, .06);
}

body.sovfhub-next-theme .post-actions .reaction-btn-icon,
body.sovfhub-next-theme .post-actions .action-btn > .action-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  min-width: 40px;
  height: 40px !important;
  margin: 0;
  padding: 9px;
  color: #1e293b;
  background: #f1f5f9;
  border: 1.5px solid rgba(15, 23, 42, .09);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .07);
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.sovfhub-next-theme .post-actions .reaction-btn-icon .action-icon {
  width: auto !important;
  min-width: 0;
  height: auto !important;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

body.sovfhub-next-theme .post-actions svg.action-icon {
  overflow: visible;
}

body.sovfhub-next-theme .post-actions .action-btn > .action-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

body.sovfhub-next-theme .post-actions .action-btn > .action-icon path,
body.sovfhub-next-theme .post-actions .action-btn > .action-icon g,
body.sovfhub-next-theme .post-actions .action-btn > .action-icon circle,
body.sovfhub-next-theme .post-actions .action-btn > .action-icon rect {
  fill: #1e293b !important;
  color: #1e293b !important;
}

body.sovfhub-next-theme .post-actions .reaction-btn-icon i,
body.sovfhub-next-theme .post-actions .reaction-btn-icon [class*="fa-"],
body.sovfhub-next-theme .post-actions .reaction-btn-icon .fa {
  color: #1e293b !important;
  fill: #1e293b !important;
}

body.sovfhub-next-theme .post-actions .action-btn:hover .reaction-btn-icon,
body.sovfhub-next-theme .post-actions .action-btn:hover > .action-icon {
  background: #e2e8f0;
  border-color: rgba(15, 23, 42, .15);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .10);
}

body.night-mode.sovfhub-next-theme .post-actions .reaction-btn-icon,
body.night-mode.sovfhub-next-theme .post-actions .action-btn > .action-icon {
  color: #cbd5e1;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .10);
  box-shadow: none;
}

body.night-mode.sovfhub-next-theme .post-actions .action-btn > .action-icon path,
body.night-mode.sovfhub-next-theme .post-actions .action-btn > .action-icon g,
body.night-mode.sovfhub-next-theme .post-actions .action-btn > .action-icon circle,
body.night-mode.sovfhub-next-theme .post-actions .action-btn > .action-icon rect {
  fill: #cbd5e1 !important;
  color: #cbd5e1 !important;
}

body.night-mode.sovfhub-next-theme .post-actions .reaction-btn-icon i,
body.night-mode.sovfhub-next-theme .post-actions .reaction-btn-icon [class*="fa-"],
body.night-mode.sovfhub-next-theme .post-actions .reaction-btn-icon .fa {
  color: #cbd5e1 !important;
}

body.night-mode.sovfhub-next-theme .post-actions .action-btn:hover .reaction-btn-icon,
body.night-mode.sovfhub-next-theme .post-actions .action-btn:hover > .action-icon {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .18);
}

body.sovfhub-next-theme .post-footer {
  padding: 0 15px 15px;
  border-top: 1px solid var(--warm-post-border);
  background: linear-gradient(180deg, rgba(248, 250, 252, .72), rgba(255, 255, 255, 0));
}

body.sovfhub-next-theme .post-comments {
  padding-top: 14px;
}

/* Newly loaded comment (from "View previous comments") — slides in and highlights */
@keyframes nf2CommentIn {
  0%   { opacity: 0; transform: translateY(6px); background: rgba(59,130,246,.06); }
  30%  { opacity: 1; transform: translateY(0);   background: rgba(59,130,246,.06); }
  100% { opacity: 1; transform: translateY(0);   background: transparent; }
}

body.sovfhub-next-theme .nf2-comment-new {
  animation: nf2CommentIn 1.4s ease-out forwards;
}

body.night-mode.sovfhub-next-theme .nf2-comment-new {
  animation: none;
  background: rgba(96,165,250,.08);
}

body.night-mode.sovfhub-next-theme .post-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0));
}

body.sovfhub-next-theme .post-comments .comments-filter {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

body.sovfhub-next-theme .post-comments .comments-filter .btn-group {
  border: 1px solid var(--warm-post-border);
  border-radius: 999px;
  background: var(--warm-post-bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

body.sovfhub-next-theme .post-comments .comments-filter .btn {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px !important;
  color: var(--warm-post-text) !important;
  font-size: 12px;
  font-weight: 600;
}

body.sovfhub-next-theme .post-comments .comments-filter .btn-group-text {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

body.sovfhub-next-theme .post-comments .comments-filter .dropdown-menu {
  min-width: 170px;
  margin-top: 6px;
  border: 1px solid var(--warm-post-border);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
}

body.sovfhub-next-theme .post-comments .comments-filter .dropdown-item {
  padding: 9px 14px;
  font-size: 13px;
}

body.sovfhub-next-theme .post-comments > .comment.js_comment-form {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--warm-post-border);
  border-radius: 10px;
  background: rgba(248, 250, 252, .82);
}

body.night-mode.sovfhub-next-theme .post-comments > .comment.js_comment-form {
  background: rgba(255, 255, 255, .035);
}

body.sovfhub-next-theme .post-comments .comment-form {
  min-height: 42px;
  border: 1px solid var(--warm-post-border);
  border-radius: 10px;
  background: var(--warm-post-bg);
  overflow: hidden;
}

body.sovfhub-next-theme .post-comments .comment-form textarea {
  min-height: 42px;
  padding: 11px 104px 10px 14px;
  color: var(--warm-post-text);
  font-size: 14px;
  line-height: 1.4;
  background: transparent;
}

body.sovfhub-next-theme .post-comments .x-form-tools {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

body.sovfhub-next-theme .post-comments .x-form-tools > li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 0 0 2px;
  border-radius: 8px;
  color: var(--warm-post-muted);
}

body.sovfhub-next-theme .post-comments .x-form-tools > li:hover {
  color: var(--warm-post-text);
  background: var(--warm-post-soft);
}

body.sovfhub-next-theme .post-comments .js_comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2px !important;
}

body.sovfhub-next-theme .post-comments .js_comments > li {
  list-style: none;
}

body.sovfhub-next-theme .post-comments .comment-avatar {
  float: none;
  flex: 0 0 34px;
}

body.sovfhub-next-theme .post-comments .comment-data,
body.sovfhub-next-theme .post-comments .comment-edit {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 10px;
}

body.sovfhub-next-theme .post-comments .comment:not(.js_comment-form) {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 0;
}

body.sovfhub-next-theme .post-comments .comment .comment-btn {
  display: inline-flex !important;
  position: absolute;
  top: 2px;
  right: 0;
  float: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  opacity: 0.78;
  z-index: 3;
}

body.sovfhub-next-theme .post-comments .comment .comment-btn.show,
body.sovfhub-next-theme .post-comments .comment:hover .comment-btn {
  opacity: 1;
}

/* comment options dropdown — compact, right-anchored */
body.sovfhub-next-theme .post-comments .comment .comment-btn .dropdown-menu {
  min-width: 160px;
  padding: 4px 0;
  border: 1px solid var(--warm-post-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
  right: 0;
  left: auto;
}

body.sovfhub-next-theme .post-comments .comment .comment-btn .dropdown-menu .dropdown-item {
  padding: 8px 14px;
  font-size: 13px;
}

/* style voice-notes panel to match the theme when JS makes it visible */
body.sovfhub-next-theme .post-comments .comment-voice-notes {
  border: 1px solid var(--warm-post-border);
  border-radius: 10px;
  background: var(--warm-post-bg);
  margin-top: 6px;
  padding: 8px 12px;
}

body.sovfhub-next-theme .post-comments .comment-voice-notes .btn-voice-start {
  background: #2563eb;
  border-radius: 8px;
  font-size: 13px;
}

body.sovfhub-next-theme .post-comments .comment .dropdown-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
}

body.sovfhub-next-theme .post-comments .comment-inner-wrapper {
  display: flex;
  min-width: 0;
  margin-bottom: 0;
  padding-right: 28px;
}

body.sovfhub-next-theme .post-comments .comment-inner {
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--warm-post-border);
  border-radius: 10px;
  background: var(--warm-post-bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035);
  opacity: 1;
  filter: none;
}

body.sovfhub-next-theme .post-comments .comment-inner:before {
  display: none;
}

body.sovfhub-next-theme .post-comments .comment-author {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
  min-width: 0;
}

body.sovfhub-next-theme .post-comments .comment-author a {
  color: var(--warm-post-text);
  font-size: 13.5px;
  font-weight: 700;
}

body.sovfhub-next-theme .post-comments .comment-text {
  color: #1f2937 !important;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  margin-bottom: 0;
  opacity: 1 !important;
  text-shadow: none;
  -webkit-text-fill-color: currentColor;
}

body.sovfhub-next-theme .post-comments .comment-text,
body.sovfhub-next-theme .post-comments .comment-text > *,
body.sovfhub-next-theme .post-comments .comment-text span,
body.sovfhub-next-theme .post-comments .comment-text p {
  opacity: 1 !important;
  filter: none !important;
}

body.sovfhub-next-theme .post-comments .comment-text.comment-readmore-collapsed {
  padding-bottom: 0;
}

body.sovfhub-next-theme .post-comments .comment-text.comment-readmore-collapsed:after {
  display: none !important;
}

body.night-mode.sovfhub-next-theme .post-comments .comment-text {
  color: #e5e7eb !important;
}

body.sovfhub-next-theme .post-comments .comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 6px 0 0 0;
  padding: 0;
  list-style: none;
  color: var(--warm-post-muted);
  font-size: 12px;
}

body.sovfhub-next-theme .post-comments .comment-actions > li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  float: none;
  margin: 0 !important;
}

body.sovfhub-next-theme .post-comments .comment-actions .reaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

body.sovfhub-next-theme .post-comments .comment-actions .reaction-btn-name {
  margin-left: 0;
}

body.sovfhub-next-theme .post-comments .comment-actions .reactions-stats {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  white-space: nowrap;
}

body.sovfhub-next-theme .post-comments .comment-actions .reactions-stats > .reactions-stats-item {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 -2px 0 0;
  padding: 0;
  background: transparent;
}

body.sovfhub-next-theme .post-comments .comment-actions .reactions-stats .inline-emoji {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}

body.sovfhub-next-theme .post-comments .comment-actions .reactions-stats .inline-emoji .emoji {
  width: 18px;
  height: 18px;
  transform: none;
  top: auto;
  right: auto;
  position: static;
}

body.sovfhub-next-theme .post-comments .comment-actions .reactions-stats .inline-emoji .emoji img {
  width: 18px !important;
  height: 18px !important;
}

body.sovfhub-next-theme .post-comments .comment-actions .reactions-stats > span {
  display: inline-block;
  margin-left: 2px;
  color: inherit;
  font-weight: 600;
}

body.sovfhub-next-theme .post-comments .comment-replies,
body.sovfhub-next-theme .post-comments .js_replies-toggle,
body.sovfhub-next-theme .post-comments .js_see-more {
  clear: both;
}

body.sovfhub-next-theme .post-comments .comment-actions .text-link,
body.sovfhub-next-theme .post-comments .js_replies-toggle .text-link,
body.sovfhub-next-theme .post-comments .js_see-more .text-link {
  color: #2563eb;
  font-weight: 650;
}

body.night-mode.sovfhub-next-theme .post-comments .comment-actions .text-link,
body.night-mode.sovfhub-next-theme .post-comments .js_replies-toggle .text-link,
body.night-mode.sovfhub-next-theme .post-comments .js_see-more .text-link {
  color: #93c5fd;
}

body.sovfhub-next-theme .post-comments .comment-replies {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--warm-post-border);
}

body.sovfhub-next-theme .post-comments .js_see-more {
  margin-top: 8px;
  padding: 8px 0 !important;
}

body.sovfhub-next-theme .post-comments .js_comment-disabled-msg,
body.sovfhub-next-theme .post-comments + .js_comment-disabled-msg {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--warm-post-border);
  border-radius: 10px;
  color: var(--warm-post-muted);
  background: rgba(248, 250, 252, .82);
}

@media (max-width: 767px) {
  body.sovfhub-next-theme .js_posts_stream > ul {
    gap: 10px;
  }

  body.sovfhub-next-theme .js_posts_stream[data-get="newsfeed"] > ul > li,
  body.sovfhub-next-theme .js_posts_stream[data-get="popular"] > ul > li,
  body.sovfhub-next-theme .js_posts_stream[data-get="discover"] > ul > li {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }

  body.sovfhub-next-theme .js_posts_stream .post:not(.ele_post_skel),
  body.sovfhub-next-theme .newsfeed-v2-stream .post:not(.ele_post_skel),
  body.sovfhub-next-theme .post.nf2-warm-post {
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    border-color: #dbe4ee;
  }

  body.sovfhub-next-theme .js_posts_stream[data-get="newsfeed"] > ul > li > .post:not(.ele_post_skel),
  body.sovfhub-next-theme .js_posts_stream[data-get="popular"] > ul > li > .post:not(.ele_post_skel),
  body.sovfhub-next-theme .js_posts_stream[data-get="discover"] > ul > li > .post:not(.ele_post_skel) {
    width: 100%;
    max-width: none;
  }

  body.sovfhub-next-theme .post-header {
    padding: 12px 12px 8px;
  }

  body.sovfhub-next-theme .post-avatar {
    flex-basis: 38px;
  }

  body.sovfhub-next-theme .post-author-row {
    gap: 3px;
  }

  body.sovfhub-next-theme .post-meta > .sf-post-options,
  body.sovfhub-next-theme .post-header > .sf-post-options {
    right: 10px;
  }

  body.sovfhub-next-theme .post-meta {
    padding-right: 48px;
  }

  body.sovfhub-next-theme .sf-post-options-menu.action-dropdown-menu {
    width: min(286px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(440px, calc(100vh - 104px));
  }

  body.sovfhub-next-theme .post-text {
    margin-bottom: 8px;
    padding: 0 12px;
    font-size: 15.5px;
    line-height: 1.42;
  }

  body.sovfhub-next-theme .post-author,
  body.sovfhub-next-theme .post-author a {
    font-size: 15px;
    line-height: 1.16;
  }

  body.sovfhub-next-theme .verified-badge svg,
  body.sovfhub-next-theme .pro-badge svg {
    width: 16px !important;
    height: 16px !important;
  }

  body.sovfhub-next-theme .post-title {
    gap: 3px 5px;
    font-size: 13px;
    line-height: 1.3;
  }

  body.sovfhub-next-theme .post-time,
  body.sovfhub-next-theme .post-time a,
  body.sovfhub-next-theme .post-time .post-sub-item {
    font-size: 11.5px;
  }

  body.sovfhub-next-theme .post-time {
    gap: 3px 5px;
  }

  body.sovfhub-next-theme .post-media {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.sovfhub-next-theme .post-media-image,
  body.sovfhub-next-theme .post-media-image img,
  body.sovfhub-next-theme .post-media-image .image,
  body.sovfhub-next-theme .post-media-video,
  body.sovfhub-next-theme .pg_1x {
    border-radius: 0 !important;
  }

  body.sovfhub-next-theme .post-stats {
    padding: 8px 12px;
    gap: 8px;
    color: #65676b;
    font-size: 12px;
    text-transform: none;
    border-top: 1px solid #e7edf3;
  }

  body.sovfhub-next-theme .post-stats .float-end {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  body.sovfhub-next-theme .post-actions {
    gap: 6px;
    padding: 4px 8px 8px;
    border-top: 1px solid #e7edf3;
  }

  body.sovfhub-next-theme .post-actions .reaction-btn-icon,
  body.sovfhub-next-theme .post-actions .action-btn > .action-icon {
    width: 36px !important;
    min-width: 36px;
    height: 36px !important;
    padding: 7px;
  }

  body.sovfhub-next-theme .post-footer {
    padding: 0 12px 12px;
    background: #fff;
  }

  body.night-mode.sovfhub-next-theme .post-stats {
    color: #cbd5e1 !important;
  }
}

/* ─────────────────────────────────────────────
   Reactions Modal  (#nf2-rm-*)
   Zero Bootstrap — pure CSS, no overflow clipping on badges
───────────────────────────────────────────── */
.nf2-rm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 16, 28, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: nf2-rm-fade-in 0.16s ease;
}

@keyframes nf2-rm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nf2-rm-modal {
  width: 100%;
  max-width: 440px;
  max-height: min(86vh, 600px);
  background: #fff;
  border-radius: 22px;
  box-shadow:
    0 32px 72px -16px rgba(10, 16, 28, 0.28),
    0 0 0 1px rgba(10, 16, 28, 0.05);
  display: flex;
  flex-direction: column;
  /* no overflow:hidden — let badge overflow freely */
  animation: nf2-rm-slide-up 0.2s cubic-bezier(0.34, 1.18, 0.64, 1);
}

@keyframes nf2-rm-slide-up {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

/* ── header ── */
.nf2-rm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
  border-radius: 22px 22px 0 0;
  background: #fff;
}

.nf2-rm-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.nf2-rm-close {
  width: 30px;
  height: 30px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.nf2-rm-close:hover { background: #e2e8f0; color: #0f172a; }

.nf2-rm-close svg { width: 14px; height: 14px; }

/* ── tabs ── */
.nf2-rm-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 10px 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.nf2-rm-tabs::-webkit-scrollbar { display: none; }

.nf2-rm-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  flex-shrink: 0;
}

.nf2-rm-tab:hover { background: #f8fafc; color: #0f172a; }

.nf2-rm-tab.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.nf2-rm-tab-emoji {
  width: 17px;
  height: 17px;
  object-fit: contain;
  vertical-align: middle;
}

/* ── body ── */
.nf2-rm-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
  border-radius: 0 0 22px 22px;
  background: #fff;
}

.nf2-rm-body::-webkit-scrollbar { width: 4px; }
.nf2-rm-body::-webkit-scrollbar-track { background: transparent; }
.nf2-rm-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* ── user list ── */
.nf2-rm-list { list-style: none; margin: 0; padding: 0; }

.nf2-rm-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 20px 9px 18px;
  transition: background 0.1s;
}

.nf2-rm-item:hover { background: #f8fafc; }

/* avatar container — extra right padding accommodates the badge without clipping */
.nf2-rm-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  /* give badge room on bottom-right without overflow clipping */
  margin-bottom: 4px;
  align-self: flex-start;
  margin-top: 2px;
}

.nf2-rm-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.10);
}

/* badge: bottom-right of avatar, slightly overlapping edge */
.nf2-rm-item-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.nf2-rm-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.nf2-rm-item-handle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.nf2-rm-item-handle:hover { color: #2563eb; }

.nf2-rm-verified {
  width: 14px;
  height: 14px;
  color: #3b82f6;
  flex-shrink: 0;
}

.nf2-rm-pro {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #7c3aed;
  background: #f3f0ff;
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* ── empty / error ── */
.nf2-rm-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  padding: 40px 20px;
  margin: 0;
}

/* ── skeletons ── */
.nf2-rm-skeletons { padding: 4px 0; }

.nf2-rm-skeleton-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 18px;
}

.nf2-rm-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e8edf3 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: nf2-rm-shimmer 1.5s infinite linear;
}

@keyframes nf2-rm-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.nf2-rm-skeleton--avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.nf2-rm-skeleton-lines { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.nf2-rm-skeleton--name   { height: 12px; width: 50%; border-radius: 6px; }
.nf2-rm-skeleton--handle { height: 10px; width: 32%; border-radius: 6px; }

/* ── load more ── */
.nf2-rm-load-more-wrap { display: flex; justify-content: center; padding: 12px 20px 4px; }

.nf2-rm-load-more {
  padding: 7px 22px;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.nf2-rm-load-more:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.nf2-rm-load-more:disabled { opacity: 0.55; cursor: default; }

/* ── spinner ── */
.nf2-rm-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  display: inline-block;
  animation: nf2-rm-spin 0.7s linear infinite;
}

@keyframes nf2-rm-spin { to { transform: rotate(360deg); } }

/* ── night mode ── */
body.night-mode .nf2-rm-modal {
  background: #1a2236;
  box-shadow: 0 32px 72px -16px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
}

body.night-mode .nf2-rm-header,
body.night-mode .nf2-rm-tabs,
body.night-mode .nf2-rm-body { background: #1a2236; }

body.night-mode .nf2-rm-header { border-bottom-color: #283449; }
body.night-mode .nf2-rm-tabs   { border-bottom-color: #283449; }
body.night-mode .nf2-rm-title  { color: #f1f5f9; }

body.night-mode .nf2-rm-close { background: rgba(255,255,255,.08); color: #94a3b8; }
body.night-mode .nf2-rm-close:hover { background: rgba(255,255,255,.13); color: #f1f5f9; }

body.night-mode .nf2-rm-tab { color: #94a3b8; }
body.night-mode .nf2-rm-tab:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
body.night-mode .nf2-rm-tab.is-active { background: rgba(59,130,246,.14); border-color: #3b82f6; color: #93c5fd; }

body.night-mode .nf2-rm-item:hover { background: rgba(255,255,255,.03); }
body.night-mode .nf2-rm-avatar { box-shadow: 0 0 0 2px #1a2236, 0 1px 4px rgba(0,0,0,.3); }
body.night-mode .nf2-rm-item-badge { border-color: #1a2236; background: #1a2236; }
body.night-mode .nf2-rm-item-handle { color: #f1f5f9; }
body.night-mode .nf2-rm-item-handle:hover { color: #60a5fa; }
body.night-mode .nf2-rm-pro { background: rgba(124,58,237,.18); color: #a78bfa; }
body.night-mode .nf2-rm-empty { color: #64748b; }

body.night-mode .nf2-rm-skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #263248 50%, #1e293b 75%);
  background-size: 200% 100%;
}

body.night-mode .nf2-rm-load-more { background: transparent; border-color: #334155; color: #94a3b8; }
body.night-mode .nf2-rm-load-more:hover:not(:disabled) { background: rgba(255,255,255,.05); border-color: #475569; color: #e2e8f0; }
body.night-mode .nf2-rm-spinner { border-color: #334155; border-top-color: #3b82f6; }
body.night-mode .nf2-rm-body { scrollbar-color: #334155 transparent; }
body.night-mode .nf2-rm-body::-webkit-scrollbar-thumb { background: #334155; }

/* ── mobile: sheet from bottom ── */
@media (max-width: 540px) {
  .nf2-rm-backdrop { align-items: flex-end; padding: 0; }
  .nf2-rm-modal {
    max-height: 90dvh;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
  }
  .nf2-rm-header { border-radius: 20px 20px 0 0; }
  .nf2-rm-body   { border-radius: 0; }
}

/* ── Announcement cards ──────────────────────────────────────────
   Replaces Bootstrap .alert — zero Bootstrap dependency.
──────────────────────────────────────────────────────────────── */
.nf2-ann {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 52px 16px 20px;
  margin-bottom: 14px;
  border-radius: 14px;
  border-left: 4px solid transparent;
  font-size: 14px;
  line-height: 1.65;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.nf2-ann__icon-wrap {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.nf2-ann__icon-wrap svg {
  width: 22px;
  height: 22px;
  display: block;
}

.nf2-ann__content {
  flex: 1;
  min-width: 0;
}

.nf2-ann__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 5px;
}

.nf2-ann__body {
  font-size: 14px;
  line-height: 1.65;
}

.nf2-ann__body p:first-child { margin-top: 0; }
.nf2-ann__body p:last-child  { margin-bottom: 0; }

.nf2-ann__close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.4;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.nf2-ann__close:hover { opacity: 1; background: rgba(0, 0, 0, 0.08); }

.nf2-ann__close svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* ── Type variants ─────────────────────────────────────────────── */
.nf2-ann--info {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e3a5f;
}
.nf2-ann--info .nf2-ann__icon-wrap { color: #3b82f6; }

.nf2-ann--success {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #14532d;
}
.nf2-ann--success .nf2-ann__icon-wrap { color: #16a34a; }

.nf2-ann--warning {
  background: #fffbeb;
  border-color: #d97706;
  color: #78350f;
}
.nf2-ann--warning .nf2-ann__icon-wrap { color: #d97706; }

.nf2-ann--danger {
  background: #fef2f2;
  border-color: #dc2626;
  color: #7f1d1d;
}
.nf2-ann--danger .nf2-ann__icon-wrap { color: #dc2626; }

/* ── Night mode ────────────────────────────────────────────────── */
body.night-mode .nf2-ann {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.night-mode .nf2-ann--info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #60a5fa;
  color: #bfdbfe;
}
body.night-mode .nf2-ann--info .nf2-ann__icon-wrap { color: #60a5fa; }

body.night-mode .nf2-ann--success {
  background: rgba(22, 163, 74, 0.1);
  border-color: #4ade80;
  color: #bbf7d0;
}
body.night-mode .nf2-ann--success .nf2-ann__icon-wrap { color: #4ade80; }

body.night-mode .nf2-ann--warning {
  background: rgba(217, 119, 6, 0.1);
  border-color: #fbbf24;
  color: #fde68a;
}
body.night-mode .nf2-ann--warning .nf2-ann__icon-wrap { color: #fbbf24; }

body.night-mode .nf2-ann--danger {
  background: rgba(220, 38, 38, 0.1);
  border-color: #f87171;
  color: #fecaca;
}
body.night-mode .nf2-ann--danger .nf2-ann__icon-wrap { color: #f87171; }

body.night-mode .nf2-ann__close { color: inherit; }
body.night-mode .nf2-ann__close:hover { background: rgba(255, 255, 255, 0.1); }

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nf2-ann {
    padding: 14px 48px 14px 16px;
    border-radius: 12px;
    gap: 10px;
  }
  .nf2-ann__close { top: 11px; right: 11px; }
}

/* ─────────────────────────────────────────────
   Post Insights Modal  (.nf2-pi-*)
   Zero Bootstrap — pure CSS, mirrors reactions modal style
───────────────────────────────────────────── */
.nf2-pi-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 16, 28, 0.48);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: nf2-pi-fade-in 0.16s ease;
}

@keyframes nf2-pi-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nf2-pi-modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 22px;
  box-shadow:
    0 32px 72px -16px rgba(10, 16, 28, 0.28),
    0 0 0 1px rgba(10, 16, 28, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: nf2-pi-slide-up 0.2s cubic-bezier(0.34, 1.18, 0.64, 1);
}

@keyframes nf2-pi-slide-up {
  from { transform: translateY(14px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

/* ── header ── */
.nf2-pi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
  background: #fff;
}

.nf2-pi-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nf2-pi-header-icon {
  width: 18px;
  height: 18px;
  color: #6366f1;
  flex-shrink: 0;
}

.nf2-pi-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.nf2-pi-close {
  width: 30px;
  height: 30px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.nf2-pi-close:hover { background: #e2e8f0; color: #0f172a; }
.nf2-pi-close svg { width: 14px; height: 14px; }

/* ── body ── */
.nf2-pi-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}

.nf2-pi-body::-webkit-scrollbar { width: 4px; }
.nf2-pi-body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* ── grid ── */
.nf2-pi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  padding: 20px;
}

/* ── stat cards ── */
.nf2-pi-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 18px 12px 16px;
  text-align: center;
  border: 1.5px solid #f1f5f9;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.nf2-pi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px -4px rgba(10, 16, 28, 0.12);
  border-color: #e2e8f0;
}

.nf2-pi-card-icon {
  font-size: 20px;
  margin-bottom: 10px;
  line-height: 1;
}

.nf2-pi-card-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}

.nf2-pi-card-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* per-metric accent colors */
.nf2-pi-card--reactions .nf2-pi-card-icon { color: #f43f5e; }
.nf2-pi-card--comments  .nf2-pi-card-icon { color: #3b82f6; }
.nf2-pi-card--shares    .nf2-pi-card-icon { color: #10b981; }
.nf2-pi-card--views     .nf2-pi-card-icon { color: #8b5cf6; }
.nf2-pi-card--plays     .nf2-pi-card-icon { color: #f97316; }
.nf2-pi-card--donations .nf2-pi-card-icon { color: #eab308; }
.nf2-pi-card--reviews   .nf2-pi-card-icon { color: #f59e0b; }

/* empty state */
.nf2-pi-empty {
  text-align: center;
  padding: 32px 20px;
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
}

/* ── Night mode ────────────────────────────────────────────────── */
body.night-mode .nf2-pi-modal {
  background: #1e293b;
  box-shadow:
    0 32px 72px -16px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.night-mode .nf2-pi-header {
  background: #1e293b;
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

body.night-mode .nf2-pi-title { color: #f1f5f9; }

body.night-mode .nf2-pi-close {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

body.night-mode .nf2-pi-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
}

body.night-mode .nf2-pi-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
}

body.night-mode .nf2-pi-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.4);
}

body.night-mode .nf2-pi-card-value { color: #f1f5f9; }
body.night-mode .nf2-pi-card-label { color: #64748b; }

body.night-mode .nf2-pi-body {
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body.night-mode .nf2-pi-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .nf2-pi-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px;
  }

  .nf2-pi-card {
    padding: 14px 8px 12px;
    border-radius: 14px;
  }

  .nf2-pi-card-icon  { font-size: 18px; margin-bottom: 8px; }
  .nf2-pi-card-value { font-size: 18px; }
  .nf2-pi-card-label { font-size: 10px; }
}
