/* Aminosocial feed presentation repair — scoped to post cards only */

.post.as-feed-post {
  --as-page: #080a0d;
  --as-card: #16181d;
  --as-elevated: #1b2027;
  --as-border: #292e36;
  --as-text: #f5f6f8;
  --as-muted: #a3abb8;
  --as-accent: #a78bfa;
  --as-btn: #6d28d9;
  --as-photo-matte: #ffffff;
  --as-video-matte: #000000;
  --as-video-max-h: min(56svh, calc(100svh - 280px), 560px);
  --as-radius: 14px;
  --as-pad: 16px;
  --as-icon: 20px;
  --as-target: 44px;
}

body:not(.night-mode) .post.as-feed-post {
  --as-page: #f3f4f6;
  --as-card: #ffffff;
  --as-elevated: #f3f4f6;
  --as-border: #e5e7eb;
  --as-text: #111827;
  --as-muted: #6b7280;
  --as-photo-matte: #ffffff;
}

@media (max-width: 767.98px) {
  .post.as-feed-post {
    --as-radius: 12px;
    --as-pad: 12px;
  }
}

/* ----- Card shell (feed / profile / search / single / immersive slides) ----- */

.post.as-feed-post {
  position: relative;
  background: var(--as-card);
  color: var(--as-text);
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius);
  box-shadow: none;
  overflow: visible;
  min-height: 0;
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.post.as-feed-post .post-body {
  display: block;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: var(--as-pad);
  overflow: visible;
}

.post.as-feed-post .post-body > .post-header {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  width: 100%;
  margin: 0 0 12px !important;
  padding: 0 !important;
  background: none !important;
}

.post.as-feed-post .post-body > .as-type-content,
.post.as-feed-post .post-body > .as-media-stage,
.post.as-feed-post .post-body > .mt10,
.post.as-feed-post .post-body > .post-site-link,
.post.as-feed-post .post-body > .post-map,
.post.as-feed-post .post-body > .post-product-container,
.post.as-feed-post .post-body > .post-funding-meta,
.post.as-feed-post .post-body > .post-job-meta,
.post.as-feed-post .post-body > .quiz-post,
.post.as-feed-post .post-body > .poll-options,
.post.as-feed-post .post-body > .post-downloader,
.post.as-feed-post .post-body > .post-snippet,
.post.as-feed-post .post-body > .plr15,
.post.as-feed-post .post-body > .as-type-detail {
  min-width: 0;
}

.post.as-feed-post .post-avatar-picture {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.post.as-feed-post .post-author,
.post.as-feed-post .post-header a.post-author {
  color: var(--as-text) !important;
  text-shadow: none !important;
  font-weight: 650;
  word-break: break-word;
}

.post.as-feed-post .post-title,
.post.as-feed-post .post-time,
.post.as-feed-post .post-sub-item {
  color: var(--as-muted) !important;
  text-shadow: none !important;
  font-size: 12.5px;
  white-space: normal;
}

.post.as-feed-post .post-meta,
.post.as-feed-post .post-meta .title {
  min-width: 0;
}

.post.as-feed-post .ele_post_hdr_menu {
  flex: 0 0 auto;
  overflow: visible;
}

.post.as-feed-post .post-text,
.post.as-feed-post .js_readmore {
  position: static !important;
  inset: auto !important;
  color: var(--as-text) !important;
  text-shadow: none !important;
  font-size: 15.5px;
  line-height: 1.5;
  margin: 0 0 4px !important;
  padding: 0 !important;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.post.as-feed-post .js_readmore[data-readmore] {
  overflow: hidden !important;
}

.post.as-feed-post a[data-readmore-toggle],
.post.as-feed-post .post-replace > a[data-readmore-toggle] {
  display: inline-block !important;
  position: relative !important;
  z-index: 2;
  float: none !important;
  clear: both;
  margin: 8px 0 12px !important;
  padding: 0 !important;
  line-height: 1.4;
}

.post.as-feed-post .post-colored {
  min-height: 0 !important;
  border-radius: 12px;
}

/* ----- Media stages ----- */

.post.as-feed-post .as-media-stage,
.post.as-feed-post .as-media-stage--photo,
.post.as-feed-post .pg_wrapper.as-album,
.post.as-feed-post .post-media-image,
.post.as-feed-post .pg_1x {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
}

.post.as-feed-post .as-media-stage--photo,
.post.as-feed-post .pg_wrapper.as-album,
.post.as-feed-post .pg_1x,
.post.as-feed-post a.js_lightbox,
.post.as-feed-post .post-site-link .post-media-image,
.post.as-feed-post .post-product-container .as-media-stage--photo {
  background: var(--as-photo-matte);
}

.post.as-feed-post .as-media-stage--video,
.post.as-feed-post .as-media-stage--live {
  background: transparent;
  border-radius: 12px;
}

.post.as-feed-post .youtube-player,
.post.as-feed-post .embed-iframe-wrapper,
.post.as-feed-post .embed-responsive {
  background: var(--as-video-matte);
  border-radius: 12px;
}

.post.as-feed-post .as-media-stage img,
.post.as-feed-post .pg_1x img,
.post.as-feed-post .as-album img,
.post.as-feed-post .post-media-image img,
.post.as-feed-post .as-cover-img,
.post.as-feed-post .as-entity-art img {
  display: block;
  width: 100%;
  height: auto !important;
  max-width: 100%;
  max-height: min(720px, 85svh);
  object-fit: contain !important;
  object-position: center;
  background: var(--as-photo-matte);
}

.post.as-feed-post .as-media-stage--video,
.post.as-feed-post .as-media-stage--live {
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  background: transparent;
}

.post.as-feed-post .plyr,
.post.as-feed-post .plyr.as-native-video,
.post.as-feed-post .plyr__video-wrapper {
  display: block !important;
  width: fit-content !important;
  max-width: 100%;
  height: fit-content !important;
  min-height: 0 !important;
  max-height: var(--as-video-max-h) !important;
  margin-left: auto;
  margin-right: auto;
  padding: 0 !important;
  aspect-ratio: unset !important;
  background: var(--as-video-matte);
}

.post.as-feed-post .as-media-stage--video video,
.post.as-feed-post .as-media-stage--live video,
.post.as-feed-post video.js_video-plyr,
.post.as-feed-post .plyr video {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: var(--as-video-max-h) !important;
  min-height: 0 !important;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain !important;
  object-position: center;
  background: var(--as-video-matte);
}

.post.as-feed-post .post-media-image .image,
.post.as-feed-post .as-bg-fallback {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(720px, 85svh);
  padding-top: 0 !important;
  background-color: var(--as-photo-matte) !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Album / combo carousel */
.post.as-feed-post .as-album {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--as-photo-matte);
  border-radius: 12px;
  overflow: hidden;
}

.post.as-feed-post .as-album__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.post.as-feed-post .as-album__item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-width: 100%;
  margin: 0;
  background: var(--as-photo-matte);
}

.post.as-feed-post .as-album__thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 8px 8px;
}

.post.as-feed-post .as-album__thumbs a {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--as-photo-matte);
}

.post.as-feed-post .as-album__thumbs img {
  width: 56px;
  height: 56px;
  max-height: 56px;
  object-fit: contain !important;
}

.post.as-feed-post .as-album__count {
  font-size: 12px;
  color: var(--as-muted);
  padding: 0 8px 8px;
}

/* Combo / mixed posts: space between photos, video, audio, and files */
body:not(.sg-immersive-active) .post.as-feed-post .post-body > .as-type-content + .as-media-stage,
body:not(.sg-immersive-active) .post.as-feed-post .post-body > .as-type-content + .post-downloader,
body:not(.sg-immersive-active) .post.as-feed-post .post-body > .as-type-content + .plr15,
body:not(.sg-immersive-active) .post.as-feed-post .post-body > .as-media-stage + .as-media-stage,
body:not(.sg-immersive-active) .post.as-feed-post .post-body > .as-media-stage + .post-downloader,
body:not(.sg-immersive-active) .post.as-feed-post .post-body > .as-media-stage + .plr15,
body:not(.sg-immersive-active) .post.as-feed-post .post-body > .plr15 + .post-downloader,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .as-type-content + .as-media-stage,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .as-type-content + .post-downloader,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .as-type-content + .plr15,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .as-media-stage + .as-media-stage,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .as-media-stage + .post-downloader,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .as-media-stage + .plr15,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .mt10 + .as-media-stage,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .mt10 + .post-downloader,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .mt10 + .plr15,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .as-media-stage + .mt10,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .as-type-content + .as-media-stage,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .as-media-stage + .as-media-stage,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .as-media-stage + .post-downloader,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .mt10 + .as-media-stage,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .mt10 + .post-downloader {
  margin-top: 16px !important;
}

/* Embeds and maps */
.post.as-feed-post .embed-responsive {
  position: relative;
  height: auto;
}

.post.as-feed-post .embed-responsive-16by9 {
  aspect-ratio: 16 / 9;
  padding-bottom: 0;
  height: auto;
}

.post.as-feed-post .embed-iframe-wrapper iframe,
.post.as-feed-post .embed-responsive iframe,
.post.as-feed-post .post-map iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 12px;
}

.post.as-feed-post .post-map {
  height: auto;
}

.post.as-feed-post .post-map iframe {
  height: min(280px, 50svh);
}

.post.as-feed-post .as-map-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  min-width: 0;
}

.post.as-feed-post .as-map-detail p {
  margin: 0;
  color: var(--as-muted);
  overflow-wrap: break-word;
}

/* Titles must wrap */
.post.as-feed-post .post-media-meta .title,
.post.as-feed-post h5.title,
.post.as-feed-post .truncate.title,
.post.as-feed-post .job-title,
.post.as-feed-post .funding-title,
.post.as-feed-post .course-title,
.post.as-feed-post .ele_post_prod_name,
.post.as-feed-post .ele_events_list_info h2,
.post.as-feed-post .ele_main_group_list .h6 {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: break-word;
  word-break: normal;
  max-width: 100%;
  line-height: 1.35;
}

.post.as-feed-post audio.js_audio {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
}

.post.as-feed-post .post-downloader {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background: var(--as-elevated);
  border-radius: 12px;
}

.post.as-feed-post .post-downloader .info {
  min-width: 0;
  overflow-wrap: break-word;
}

/* ----- Actions ----- */

.post.as-feed-post .post-actions.as-feed-actions,
.post.as-feed-post .post-body > .post-actions {
  position: static !important;
  inset: auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 2px;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 8px 0 0 !important;
  padding: 4px 0 0 !important;
  background: none !important;
  border-top: 1px solid var(--as-border);
  transform: none !important;
}

.post.as-feed-post .post-actions.as-feed-actions > .valign {
  display: contents;
}

.post.as-feed-post .as-feed-actions .reactions-wrapper,
.post.as-feed-post .as-feed-actions .action-btn,
.post.as-feed-post .as-feed-actions .js_comment,
.post.as-feed-post .as-feed-actions .as-feed-action {
  display: inline-flex !important;
  flex: 1 1 0;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  min-width: 0;
  min-height: var(--as-target);
  margin: 0 !important;
  padding: 0 4px !important;
  color: var(--as-muted) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  cursor: pointer;
}

.post.as-feed-post .as-feed-actions .reaction-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px;
  min-width: 0;
  min-height: var(--as-target);
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
}

.post.as-feed-post .as-feed-actions .reaction-btn::before {
  content: none !important;
  display: none !important;
}

.post.as-feed-post .as-feed-actions .reaction-btn-icon,
.post.as-feed-post .as-feed-actions .stat-ico-bg {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--as-icon);
  height: var(--as-icon);
  min-width: var(--as-icon);
  border-radius: 0;
  margin: 0 !important;
  background: none !important;
  filter: none;
}

.post.as-feed-post .as-feed-actions .reaction-btn-icon i,
.post.as-feed-post .as-feed-actions .stat-ico-bg svg,
.post.as-feed-post .as-feed-actions .as-feed-action svg {
  width: var(--as-icon);
  height: var(--as-icon);
}

.post.as-feed-post .as-feed-actions .reaction-btn-name,
.post.as-feed-post .as-feed-actions .as-feed-action__label,
.post.as-feed-post .as-feed-actions .action-btn > span:not(.as-feed-count):not(.sg-action-counter),
.post.as-feed-post .as-feed-actions .js_comment > span:not(.as-feed-count):not(.sg-action-counter) {
  display: none !important;
}

.post.as-feed-post .as-feed-count,
.post.as-feed-post .as-feed-actions .sg-action-counter {
  display: inline !important;
  margin: 0 !important;
  min-width: 0 !important;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  color: inherit !important;
  text-shadow: none !important;
}

.post.as-feed-post .as-feed-actions .reactions-wrapper:hover,
.post.as-feed-post .as-feed-actions .action-btn:hover,
.post.as-feed-post .as-feed-actions .js_comment:hover,
.post.as-feed-post .as-feed-actions .as-feed-action:hover,
.post.as-feed-post .as-feed-actions .reaction-btn:hover {
  background: var(--as-elevated) !important;
  color: var(--as-text) !important;
}

.post.as-feed-post .as-feed-actions .reaction-btn:focus-visible,
.post.as-feed-post .as-feed-actions .action-btn:focus-visible,
.post.as-feed-post .as-feed-actions .as-feed-action:focus-visible {
  outline: 2px solid var(--as-accent);
  outline-offset: 2px;
}

.post.as-feed-post .as-feed-actions .reactions-wrapper.is-reacted,
.post.as-feed-post .as-feed-actions .reactions-wrapper.js_unreact-post,
.post.as-feed-post .as-feed-actions .reactions-wrapper.as-just-liked {
  color: #ff2d55 !important;
}

.post.as-feed-post .as-feed-actions .reactions-wrapper.is-reacted .reaction-btn-icon,
.post.as-feed-post .as-feed-actions .reactions-wrapper.js_unreact-post .reaction-btn-icon,
.post.as-feed-post .as-feed-actions .reaction-btn.is-reacted .reaction-btn-icon {
  color: #ff2d55 !important;
  filter: drop-shadow(0 0 8px rgba(255, 45, 85, 0.65));
}

.post.as-feed-post .as-feed-actions .reaction-btn.as-like-pop .reaction-btn-icon,
.post.as-feed-post .as-feed-actions .reaction-btn.is-bouncing .reaction-btn-icon {
  animation: as-like-icon-pop 0.62s cubic-bezier(0.2, 1.45, 0.32, 1);
}

.post.as-feed-post .as-feed-actions .as-like-count-pop {
  animation: as-like-count-pop 0.45s cubic-bezier(0.2, 1.4, 0.32, 1);
  color: #ff2d55 !important;
}

.post.as-feed-post .as-feed-actions .js_unsave-post,
.post.as-feed-post .as-feed-actions .as-feed-action.is-saved,
.post.as-feed-post .as-feed-actions .js_unsave-post .stat-ico-bg {
  color: #a78bfa !important;
}

.post.as-feed-post .as-feed-actions .js_unsave-post .stat-ico-bg svg,
.post.as-feed-post .as-feed-actions .as-feed-action.is-saved .stat-ico-bg svg {
  fill: currentColor;
}

.post.as-feed-post .as-feed-actions .as-feed-action.as-save-pop .stat-ico-bg {
  animation: as-like-icon-pop 0.5s cubic-bezier(0.2, 1.45, 0.32, 1);
}

.post.as-feed-post .reactions-container {
  z-index: 30;
  bottom: calc(100% + 6px);
  top: auto;
  left: 0;
  right: auto;
}

.post.as-feed-post .as-feed-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: flex-start;
  margin: 8px 0 0;
  padding: 0;
  color: var(--as-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.post.as-feed-post .as-feed-metrics:empty {
  display: none;
}

.post.as-feed-post .as-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--as-btn);
  color: #fff !important;
  font-weight: 650;
  text-decoration: none !important;
  border: 0;
  float: none;
  clear: both;
}

.post.as-feed-post .post-media-meta {
  min-width: 0;
}

.post.as-feed-post .post-media-meta > a {
  display: block;
  min-width: 0;
}

.post.as-feed-post .post-media-meta .text {
  display: block;
  margin-bottom: 8px;
}

.post.as-feed-post .as-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  min-width: 0;
}

.post.as-feed-post .as-identity__meta {
  min-width: 0;
}

.post.as-feed-post .quiz-question,
.post.as-feed-post .poll-option,
.post.as-feed-post .form-check-label {
  overflow-wrap: break-word;
  white-space: normal;
}

.post.as-feed-post .post-snippet {
  border: 1px solid var(--as-border);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}

.post.as-feed-post .post-footer {
  overflow: visible;
  padding: 0 var(--as-pad) var(--as-pad);
}

.post.as-feed-post > .pin-icon,
.post.as-feed-post.is-pinned > .pin-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 0;
  color: var(--as-accent, #a78bfa);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post.as-feed-post > .pin-icon svg {
  flex: 0 0 auto;
}

.post.as-feed-post .post-footer:not(.as-comments-open),
body.sg-immersive-active .post.as-feed-post .post-footer:not(.as-comments-open),
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-footer:not(.as-comments-open),
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-footer:not(.as-comments-open),
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-footer.x-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.post.as-feed-post .post-footer.as-comments-open,
body.sg-immersive-active .post.as-feed-post .post-footer.as-comments-open,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-footer.as-comments-open,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-footer.as-comments-open {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (max-width: 429.98px) {
  .post.as-feed-post .as-feed-actions .reaction-btn-name,
  .post.as-feed-post .as-feed-actions .as-feed-action__label,
  .post.as-feed-post .as-feed-actions .action-btn > span:not(.as-feed-count):not(.sg-action-counter),
  .post.as-feed-post .as-feed-actions .js_comment > span:not(.as-feed-count):not(.sg-action-counter) {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post.as-feed-post * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ----- Immersive home: card flow, keep nav chrome (desktop only) ----- */

@media (min-width: 992px) {
body.sg-immersive-active.sg-feed-cards,
html.sg-immersive-active.sg-feed-cards {
  height: auto !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.sg-immersive-active.sg-feed-cards {
  background: var(--as-page, #080a0d);
}

body.sg-immersive-active.sg-feed-cards .main-wrapper {
  display: block !important;
  max-height: none !important;
  overflow: visible !important;
  background: var(--as-page, #080a0d);
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-root {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  background: var(--as-page, #080a0d);
  color: var(--as-text, #f5f6f8);
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-stream {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  scroll-snap-align: none !important;
  background: transparent;
  padding: 8px 12px 16px;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide::after {
  display: none;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible;
  background: var(--as-card, #111418);
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-caption,
body.sg-immersive-active.sg-feed-cards .sg-immersive-author-rail,
body.sg-immersive-active.sg-feed-cards .sg-immersive-disc,
body.sg-immersive-active.sg-feed-cards .sg-immersive-rail-more,
body.sg-immersive-active.sg-feed-cards .sg-tweet-stage,
body.sg-immersive-active.sg-immersive-desktop .sg-tweet-stage,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-tab--posts {
  display: none !important;
}

@media (min-width: 992px) {
  .sg-immersive-tab--posts {
    display: none !important;
  }
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .valign.post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-text,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .js_readmore,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-replace {
  display: block !important;
  position: static !important;
  inset: auto !important;
  color: inherit !important;
  text-shadow: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .valign.post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-replace {
  max-height: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .valign.post-header {
  display: flex !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-media,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-media-image,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .pg_wrapper,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .pg_1x,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .plyr,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .youtube-player,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-body > .mt10,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-body > .post-site-link {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide video,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .plyr,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .plyr__video-wrapper {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: var(--as-video-max-h, min(56svh, 560px));
  margin-left: auto;
  margin-right: auto;
  object-fit: contain !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-media-image img,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .pg_wrapper img {
  width: 100% !important;
  height: auto !important;
  max-height: min(720px, 85svh);
  object-fit: contain !important;
  background: #fff;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-topbar {
  position: sticky !important;
  top: 0;
  background: var(--as-page, #080a0d) !important;
  pointer-events: auto !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-footer {
  display: block;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-footer.x-hidden,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post-footer.x-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
}
}

/* Type-specific compact cards */
.post.as-feed-post[data-post-type=""],
.post.as-feed-post[data-post-type="file"],
.post.as-feed-post[data-post-type="audio"],
.post.as-feed-post[data-post-type="job"],
.post.as-feed-post[data-post-type="poll"],
.post.as-feed-post[data-post-type="quiz"],
.post.as-feed-post[data-post-type="article"] {
  min-height: 0;
}

.post.as-feed-post .as-offer-art,
.post.as-feed-post .as-product-art {
  background: var(--as-photo-matte);
  border-radius: 12px;
}

.post.as-feed-post .ele_main_group_list .img,
.post.as-feed-post .ele_events_list .img {
  position: relative !important;
  padding-top: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
  border-radius: 12px;
}

.post.as-feed-post .ele_main_group_list .img img,
.post.as-feed-post .ele_events_list .img img {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: min(720px, 85svh);
  object-fit: contain !important;
  background: var(--as-photo-matte);
}

.post.as-feed-post .ele_events_list_mid {
  position: static !important;
  inset: auto !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  padding: 0;
  background: none !important;
}

.post.as-feed-post .ele_events_list_btns {
  margin: 0;
}

.post.as-feed-post .merit-panel {
  text-align: center;
  padding: 16px;
  background: var(--as-elevated);
  border-radius: 12px;
}

.post.as-feed-post .merit-panel img {
  max-height: 200px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  background: var(--as-photo-matte);
}

/* =====================================================================
   Board-matching card system.
   Beats sg-immersive-feed.css !important rules on the home stream.
   ===================================================================== */

body.sg-immersive-active.sg-feed-cards {
  --as-page: #080a0d;
  --as-card: #16181d;
  --as-elevated: #1f232b;
  --as-border: #2c313a;
  --as-text: #f5f6f8;
  --as-muted: #a3abb8;
  --as-accent: #a78bfa;
  --as-btn: #6d28d9;
}

body.sg-immersive-active.sg-feed-cards,
body.sg-immersive-active.sg-feed-cards .main-wrapper,
body.sg-immersive-active.sg-feed-cards .sg-immersive-root,
body.sg-immersive-active.sg-feed-cards .sg-immersive-stream {
  background: var(--as-page) !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-list {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px 96px;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 0 16px !important;
  margin: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide::after {
  display: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post {
  background: var(--as-card) !important;
  color: var(--as-text) !important;
  border: 1px solid var(--as-border) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: visible;
  max-width: 100%;
  margin: 0 auto !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 16px 16px 8px !important;
  overflow: visible !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .valign.post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-text,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .js_readmore,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-replace {
  display: block !important;
  position: static !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  top: auto !important;
  order: 0 !important;
  color: var(--as-text) !important;
  text-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .valign.post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-replace {
  max-height: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .js_readmore[data-readmore] {
  overflow: hidden !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide a[data-readmore-toggle] {
  display: inline-block !important;
  position: relative !important;
  z-index: 2;
  margin: 8px 0 12px !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .valign.post-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .ele_post_hdr_menu {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 36px;
  margin-left: 8px;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
  z-index: 8;
  flex: 0 0 auto;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu .dropdown-toggle,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .ele_post_hdr_menu .dropdown-toggle {
  position: relative !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow: visible !important;
  color: var(--as-muted, #a3abb8) !important;
  cursor: pointer;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu .dropdown-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide:has(.ele_post_hdr_menu.show) {
  position: relative;
  z-index: 8;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu .dropdown-menu,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu .dropdown-menu.show {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 40 !important;
  min-width: 240px;
  max-height: min(72vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  margin-top: 4px;
  padding: 8px 0;
  background: #1c1c1c !important;
  color: #f5f6f8 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu .dropdown-menu {
  display: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu .dropdown-menu.show {
  display: block !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .ele_post_hdr_menu .dropdown-item {
  color: #f5f6f8 !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-header,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-text,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-stats {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-avatar-picture {
  width: 42px !important;
  height: 42px !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-author {
  font-size: 15px !important;
  font-weight: 650 !important;
}

/* Media stays inside the card, never full-bleed to the page */
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .mt10,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-media-stage,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .pg_wrapper,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .pg_1x,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .pg_1x a,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-media,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-media-image,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-media-image .image,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .youtube-player,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .embed-responsive,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .embed-iframe-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 12px !important;
  overflow: hidden;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-media-stage--photo,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .pg_wrapper.as-album,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-media-image {
  background: #fff !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-media-stage--video,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-media-stage--live {
  background: transparent !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .youtube-player,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .embed-responsive {
  background: #000 !important;
}

/* ----- Action row: icon + count, one baseline ----- */

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-actions.as-feed-actions,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .post-actions.as-feed-actions,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .valign.post-actions {
  position: static !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 4px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 4px 0 0 !important;
  padding: 6px 0 4px !important;
  border-top: 1px solid var(--as-border) !important;
  background: transparent !important;
  pointer-events: auto !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .reactions-wrapper,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .action-btn,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .js_comment,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .as-feed-action,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .post-actions .reactions-wrapper,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .post-actions .js_comment,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .post-actions .action-btn {
  display: inline-flex !important;
  flex: 1 1 0 !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  color: var(--as-muted) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .post-actions .reaction-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .reaction-btn::before,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .post-actions .reaction-btn::before {
  content: none !important;
  display: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .reaction-btn-name,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .as-feed-action__label {
  display: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-actions .as-feed-count,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-body > .post-actions .sg-action-counter {
  display: inline !important;
  margin: 0 !important;
  min-width: 0 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  color: inherit !important;
  text-shadow: none !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-feed-metrics,
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .post-stats {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 12px !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  color: var(--as-muted) !important;
  font-size: 13px !important;
}

/* Type details and purple CTAs */
.post.as-feed-post .as-identity,
.post.as-feed-post .as-map-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  background: var(--as-elevated);
  border-radius: 12px;
}

.post.as-feed-post .as-cta,
.post.as-feed-post .btn.btn-success.btn-block,
.post.as-feed-post .btn.btn-primary.btn-block,
.post.as-feed-post .quiz-post .btn-primary,
.post.as-feed-post .js_quiz-form .btn-primary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-height: 40px;
  margin-top: 10px;
  padding: 8px 18px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--as-btn) !important;
  color: #fff !important;
  font-weight: 650;
  float: none !important;
}

.post.as-feed-post .btn.btn-success.btn-block,
.post.as-feed-post .btn.btn-primary.btn-block {
  width: 100% !important;
}

.post.as-feed-post .post-snippet {
  margin-top: 8px;
  padding: 12px !important;
  background: var(--as-elevated);
  border: 1px solid var(--as-border);
  border-radius: 14px;
}

.post.as-feed-post .post-site-link .post-media,
.post.as-feed-post .post-funding-meta,
.post.as-feed-post .post-job-meta,
.post.as-feed-post .post-course-meta,
.post.as-feed-post .post-merit-meta,
.post.as-feed-post .post-product-container {
  overflow: hidden;
  background: var(--as-elevated);
  border-radius: 12px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

/* Listing cards: cancel Sngine side padding + negative description bleed */
.post.as-feed-post .post-job-meta,
.post.as-feed-post .post-course-meta,
.post.as-feed-post .post-funding-meta,
.post.as-feed-post .post-merit-meta {
  padding: 0 0 14px !important;
}

.post.as-feed-post .post-product-container {
  padding: 14px !important;
}

.post.as-feed-post .post-job-meta > .post-media,
.post.as-feed-post .post-course-meta > .post-media,
.post.as-feed-post .post-funding-meta > .post-media,
.post.as-feed-post .post-merit-meta > .post-media {
  margin: 0 !important;
  padding: 0 !important;
}

.post.as-feed-post .post-job-meta > .job-title,
.post.as-feed-post .post-course-meta > .job-title,
.post.as-feed-post .post-course-meta > .course-title,
.post.as-feed-post .post-job-meta > p,
.post.as-feed-post .post-course-meta > p,
.post.as-feed-post .post-job-meta > .mb10,
.post.as-feed-post .post-course-meta > .mb10,
.post.as-feed-post .post-job-meta > .mt10,
.post.as-feed-post .post-course-meta > .mt10,
.post.as-feed-post .post-job-meta > .clearfix,
.post.as-feed-post .post-course-meta > .clearfix,
.post.as-feed-post .post-funding-meta > .funding-completion,
.post.as-feed-post .post-funding-meta > .mt10,
.post.as-feed-post .post-funding-meta > .clearfix,
.post.as-feed-post .post-merit-meta > .merit-title,
.post.as-feed-post .post-merit-meta > .mt10 {
  padding-left: 14px;
  padding-right: 14px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.post.as-feed-post .job-description,
.post.as-feed-post .course-description,
.post.as-feed-post .funding-description,
.post.as-feed-post .merit-description {
  margin: 0 !important;
  padding: 0 14px !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.post.as-feed-post .job-description .post-replace,
.post.as-feed-post .course-description .post-replace,
.post.as-feed-post .funding-description .post-replace,
.post.as-feed-post .merit-description .post-replace,
.post.as-feed-post .job-description .post-text,
.post.as-feed-post .course-description .post-text,
.post.as-feed-post .funding-description .post-text,
.post.as-feed-post .merit-description .post-text,
.post.as-feed-post .job-description .js_readmore,
.post.as-feed-post .course-description .js_readmore,
.post.as-feed-post .funding-description .js_readmore,
.post.as-feed-post .merit-description .js_readmore,
.post.as-feed-post .post-product-container .post-text,
.post.as-feed-post .post-product-container .js_readmore,
.post.as-feed-post .post-media-meta .post-text,
.post.as-feed-post .post-media-meta .js_readmore {
  display: block !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: none;
  margin: 0 !important;
  padding: 0 !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  box-sizing: border-box;
}

.post.as-feed-post .ele_post_job_info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 12px 0 !important;
  padding: 12px 14px !important;
  box-sizing: border-box;
  min-width: 0;
}

.post.as-feed-post .ele_post_job_info > div {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
}

.post.as-feed-post .ele_post_job_info p,
.post.as-feed-post .ele_post_job_info b {
  overflow-wrap: break-word;
  word-break: normal;
}

.post.as-feed-post .post-job-meta .btn,
.post.as-feed-post .post-course-meta .btn,
.post.as-feed-post .post-funding-meta .btn,
.post.as-feed-post .post-product-container .btn {
  max-width: 100%;
  white-space: normal;
  box-sizing: border-box;
}

.post.as-feed-post .post-media-meta {
  padding: 12px 14px !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.post.as-feed-post .post-media-meta .source {
  color: var(--as-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.post.as-feed-post .post-media-meta .title,
.post.as-feed-post .funding-title,
.post.as-feed-post .job-title,
.post.as-feed-post .course-title {
  color: var(--as-text) !important;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.post.as-feed-post .job-title a,
.post.as-feed-post .course-title a,
.post.as-feed-post .funding-title a,
.post.as-feed-post .post-media-meta .title a {
  color: inherit !important;
}

.post.as-feed-post .poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.post.as-feed-post .poll-option {
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  background: var(--as-elevated);
  border: 1px solid var(--as-border);
  border-radius: 12px;
  cursor: pointer;
}

.post.as-feed-post .poll-option:has(input:checked) {
  border-color: var(--as-accent);
}

.post.as-feed-post .poll-option label {
  display: block;
  width: 100%;
  margin: 0;
  color: var(--as-text);
}

.post.as-feed-post .poll-option .percentage-bg {
  background: rgba(167, 139, 250, 0.18);
}

.post.as-feed-post .quiz-post .form-check {
  margin-bottom: 8px;
  padding: 12px 14px 12px 36px;
  background: var(--as-elevated);
  border: 1px solid var(--as-border);
  border-radius: 12px;
}

.post.as-feed-post .progress {
  height: 8px;
  overflow: hidden;
  background: var(--as-elevated);
  border-radius: 999px;
}

.post.as-feed-post .progress-bar,
.post.as-feed-post .progress-bar-info {
  background: var(--as-accent) !important;
}

.post.as-feed-post .youtube-player,
.post.as-feed-post .embed-responsive-16by9 {
  aspect-ratio: 16 / 9;
  background: #000;
}

.post.as-feed-post .post-footer:not(.x-hidden) {
  padding: 0 16px 16px;
  background: transparent;
  border-top: 1px solid var(--as-border);
}

/* Event/group share: keep cover and chrome in document flow */
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .ele_events_list .img,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .ele_main_group_list .img,
.post.as-feed-post .ele_events_list .img,
.post.as-feed-post .ele_main_group_list .img {
  position: relative !important;
  padding-top: 0 !important;
  height: auto !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .ele_events_list .img img,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .ele_main_group_list .img img {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: min(720px, 85svh) !important;
  object-fit: contain !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .ele_events_list_mid {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  background: none !important;
}

/* Player hugs the file on desktop cards only. Mobile TikTok needs a full-slide stage. */
@media (min-width: 992px) {
body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-root {
  min-height: 0 !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill .post-body > .mt10,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill .post-media,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill .youtube-player,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill .with-live,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill .embed-responsive {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}

body.sg-immersive-active.sg-immersive-desktop .sg-immersive-media-stage .plyr,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-media-stage .plyr__video-wrapper,
.post.as-feed-post .plyr,
.post.as-feed-post .plyr.as-native-video,
.post.as-feed-post .plyr.as-native-video .plyr__video-wrapper,
.post.as-feed-post .plyr__video-wrapper,
body.sg-immersive-active .post.as-feed-post .plyr,
body.sg-immersive-active .post.as-feed-post .plyr__video-wrapper,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr__video-wrapper,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-slide .post.as-feed-post .plyr,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill .plyr,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill .plyr__video-wrapper {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  display: block !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: fit-content !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: var(--as-video-max-h) !important;
  margin-left: auto;
  margin-right: auto;
  padding: 0 !important;
  padding-bottom: 0 !important;
  aspect-ratio: unset !important;
  flex: none !important;
}

.post.as-feed-post .plyr__video-wrapper::before,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .plyr__video-wrapper::before {
  display: none !important;
  content: none !important;
  padding: 0 !important;
}

.post.as-feed-post .plyr.as-native-video video,
.post.as-feed-post .plyr video,
body.sg-immersive-active .post.as-feed-post .plyr video,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post video,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide.sg-immersive-slide--video-fill video,
body.sg-immersive-active.sg-immersive-desktop .sg-immersive-media-stage video {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: var(--as-video-max-h) !important;
  min-height: 0 !important;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain !important;
  object-position: center center;
}
}

/* Fullscreen must beat the in-feed hug rules or the <video> collapses to 0px. */
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr:fullscreen,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr:-webkit-full-screen,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr.plyr--fullscreen-fallback,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr.fullscreen,
body.sg-immersive-active .post.as-feed-post .plyr:fullscreen,
body.sg-immersive-active .post.as-feed-post .plyr.fullscreen,
.post.as-feed-post .plyr:fullscreen,
.post.as-feed-post .plyr:-webkit-full-screen,
.post.as-feed-post .plyr.plyr--fullscreen-fallback,
.post.as-feed-post .plyr.fullscreen {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr.plyr--fullscreen-fallback,
.post.as-feed-post .plyr.plyr--fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000000;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr:fullscreen .plyr__video-wrapper,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr.fullscreen .plyr__video-wrapper,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr.plyr--fullscreen-fallback .plyr__video-wrapper,
body.sg-immersive-active .post.as-feed-post .plyr:fullscreen .plyr__video-wrapper,
.post.as-feed-post .plyr:fullscreen .plyr__video-wrapper,
.post.as-feed-post .plyr.fullscreen .plyr__video-wrapper,
.post.as-feed-post .plyr.plyr--fullscreen-fallback .plyr__video-wrapper {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr:fullscreen video,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr.fullscreen video,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr.plyr--fullscreen-fallback video,
body.sg-immersive-active .post.as-feed-post .plyr:fullscreen video,
.post.as-feed-post .plyr:fullscreen video,
.post.as-feed-post .plyr.fullscreen video,
.post.as-feed-post .plyr.plyr--fullscreen-fallback video {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Poster stays a true overlay. In-flow posters covered the play button. */
.post.as-feed-post .plyr__poster,
body.sg-immersive-active .post.as-feed-post .plyr__poster {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  pointer-events: none;
  z-index: 1;
}

/* Feed play button is ours. Plyr's overlay/bar play vanish on skinny or light videos. */
.post.as-feed-post .plyr,
body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr {
  overflow: hidden;
}

.post.as-feed-post .plyr .plyr__control--overlaid,
body.sg-immersive-active.sg-feed-cards .post.as-feed-post .plyr .plyr__control--overlaid {
  display: none !important;
}

.post.as-feed-post .plyr > .as-feed-play {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 8 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 68px !important;
  height: 68px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 3px solid #fff !important;
  border-radius: 50% !important;
  background: #111418 !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.post.as-feed-post .plyr > .as-feed-play.is-hidden {
  display: none !important;
}

.post.as-feed-post .plyr > .as-feed-play svg {
  display: block;
  width: 30px;
  height: 30px;
  margin-left: 4px;
  fill: #fff !important;
}

.post.as-feed-post .plyr [data-plyr="play"],
.post.as-feed-post .plyr [data-plyr="play"][hidden] {
  display: inline-flex !important;
}

.post.as-feed-post .plyr .plyr__progress__container,
.post.as-feed-post .plyr .plyr__progress__container[hidden] {
  display: block !important;
}

.post.as-feed-post .plyr--video .plyr__controls {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.82) 100%) !important;
  color: #fff !important;
  z-index: 5;
}

.post.as-feed-post .plyr--video .plyr__controls .plyr__control,
.post.as-feed-post .plyr--video .plyr__controls .plyr__control svg {
  color: #fff !important;
  fill: #fff !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

/* Mobile home: one post per screen, snap-scroll. Beats card-hug rules. */
@media (max-width: 991px) {
  html.sg-immersive-active,
  html.sg-immersive-active.sg-feed-cards,
  body.sg-immersive-active,
  body.sg-immersive-active.sg-feed-cards {
    height: 100% !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  body.sg-immersive-active .main-wrapper,
  body.sg-immersive-active.sg-feed-cards .main-wrapper,
  body.sg-immersive-active .sg-immersive-root,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-root {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    inset: auto !important;
  }

  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-stream,
  body.sg-immersive-active.sg-feed-cards:not(.sg-feed-posts-tab) .sg-immersive-stream {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-snap-type: y mandatory !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body.sg-immersive-active .sg-immersive-list,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-list {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide,
  body.sg-immersive-active.sg-feed-cards:not(.sg-feed-posts-tab) .sg-immersive-slide,
  body.sg-immersive-active.sg-feed-cards.sg-immersive-desktop .sg-immersive-slide {
    height: var(--sg-immersive-stream-px, var(--sg-immersive-fallback-h, 100dvh)) !important;
    min-height: var(--sg-immersive-stream-px, var(--sg-immersive-fallback-h, 100dvh)) !important;
    max-height: var(--sg-immersive-stream-px, var(--sg-immersive-fallback-h, 100dvh)) !important;
    overflow: hidden !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #000 !important;
  }

  body.sg-immersive-active .sg-immersive-slide::after,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide::after {
    display: block !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post {
    --as-video-max-h: 100%;
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
    overflow: hidden !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-body {
    display: block !important;
    height: 100% !important;
    min-height: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .as-media-stage,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .as-media-stage--photo,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .as-media-stage--video,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .pg_wrapper,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .pg_1x,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-media,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-media-image,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-body > .mt10 {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    border-radius: 0 !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .plyr,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .plyr.as-native-video,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .plyr__video-wrapper,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post video,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--video-fill .plyr,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--video-fill .plyr__video-wrapper,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--video-fill video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    object-fit: cover !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-media-image img,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .pg_wrapper img,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .as-media-stage img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    background: transparent !important;
  }

  body.sg-immersive-active .sg-immersive-topbar,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-topbar {
    position: absolute !important;
    top: 0 !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%) !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post-actions .reaction-btn .reaction-btn-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    font-size: 28px !important;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
  }

  body.sg-immersive-active .sg-immersive-slide .post-actions .reaction-btn::before {
    content: none !important;
    display: none !important;
  }

  body.sg-immersive-active .sg-immersive-slide .reactions-wrapper.is-reacted .reaction-btn-icon,
  body.sg-immersive-active .sg-immersive-slide .reactions-wrapper.js_unreact-post .reaction-btn-icon,
  body.sg-immersive-active .sg-immersive-slide .reaction-btn.is-reacted .reaction-btn-icon {
    color: #ff2d55 !important;
    filter: drop-shadow(0 0 10px rgba(255, 45, 85, 0.95)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post > .pin-icon {
    display: flex !important;
    position: absolute;
    top: calc(var(--sg-immersive-top, 44px) + 8px);
    left: 12px;
    right: 72px;
    z-index: 7;
    padding: 0;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
    pointer-events: none;
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-header,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .valign.post-header,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .ele_post_hdr_menu {
    display: none !important;
  }

  body.sg-immersive-active .sg-immersive-slide[data-post-type]::before {
    display: none !important;
  }

  /* TikTok rail — beat card-row action CSS */
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-actions.as-feed-actions,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .post-body > .post-actions,
  body.sg-immersive-active .sg-immersive-slide .post-actions {
    position: absolute !important;
    right: 6px !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-38%) !important;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    z-index: 8 !important;
    pointer-events: none !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post-actions > *,
  body.sg-immersive-active .sg-immersive-slide .post-actions .reactions-wrapper,
  body.sg-immersive-active .sg-immersive-slide .post-actions .action-btn,
  body.sg-immersive-active .sg-immersive-slide .post-actions .js_comment,
  body.sg-immersive-active .sg-immersive-slide .post-actions .as-feed-action,
  body.sg-immersive-active .sg-immersive-slide .post-actions .sg-immersive-rail-btn {
    pointer-events: auto !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    flex-direction: column !important;
    justify-content: center !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post-actions .sg-immersive-rail-save {
    display: none !important;
  }

  /* Videos: full slide, whole picture, centered */
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .as-media-stage--video,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--video-fill .post-body > .mt10,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--video-fill .plyr,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--video-fill .plyr__video-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
  }

  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .plyr,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .plyr.as-native-video,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post .plyr__video-wrapper,
  body.sg-immersive-active .sg-immersive-slide .post.as-feed-post video,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--video-fill video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Live: fill the phone. Beat the 16:9 youtube-player padding box. */
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .youtube-player,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .youtube-player.with-live,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .js_lightbox-live,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .as-media-stage--live,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide[data-post-type="live"] .as-media-stage {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }

  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .youtube-player img,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .youtube-player.with-live img,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .as-media-stage--live video,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .as-media-stage--live .plyr,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .as-media-stage--live .plyr__video-wrapper,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .as-media-stage--live .plyr video,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide[data-post-type="live"] video,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide[data-post-type="live"] .plyr,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide[data-post-type="live"] .plyr__video-wrapper,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide[data-post-type="live"] .post.as-feed-post video {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    background: #000 !important;
  }

  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .youtube-player .play,
  body.sg-immersive-active:not(.sg-feed-posts-tab) .sg-immersive-slide .youtube-player.with-live .play {
    z-index: 3;
  }

  body.lightbox-open .lightbox[data-live-post-id],
  body.sg-immersive-active .lightbox[data-live-post-id] {
    padding: 0 !important;
  }

  body.lightbox-open .lightbox[data-live-post-id] .lightbox-container,
  body.sg-immersive-active .lightbox[data-live-post-id] .lightbox-container {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
  }

  body.lightbox-open .lightbox[data-live-post-id] .lightbox-preview.with-live,
  body.sg-immersive-active .lightbox[data-live-post-id] .lightbox-preview.with-live,
  body.lightbox-open .lightbox[data-live-post-id] .live-stream-video,
  body.sg-immersive-active .lightbox[data-live-post-id] .live-stream-video,
  body.lightbox-open .lightbox[data-live-post-id] .live-video-player,
  body.sg-immersive-active .lightbox[data-live-post-id] .live-video-player {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #000 !important;
  }

  body.lightbox-open .lightbox[data-live-post-id] video,
  body.sg-immersive-active .lightbox[data-live-post-id] video {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  body.lightbox-open .lightbox[data-live-post-id] .lightbox-data,
  body.sg-immersive-active .lightbox[data-live-post-id] .lightbox-data {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: auto !important;
    background: transparent !important;
    z-index: 4;
  }

  /* Text posts: Twitter/X-style full body, centered. Hide TikTok caption. */
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--text-only .sg-immersive-caption,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide[data-post-type=""]:not(.sg-immersive-slide--video-fill):not(.sg-immersive-slide--photo-fill):not(.sg-immersive-slide--link-card):not(.sg-immersive-slide--rich-card):not(.sg-immersive-slide--text-colored) .sg-immersive-caption,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--text-only .sg-immersive-disc,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--text-only .sg-immersive-caption-sound {
    display: none !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--text-only .post.as-feed-post {
    background: #000 !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage {
    position: absolute;
    left: 22px;
    right: 76px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-height: min(68vh, 640px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    pointer-events: auto;
    text-shadow: none;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-author {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 12px;
    color: #e7e9ea;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-author a,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-name {
    color: #e7e9ea !important;
    text-decoration: none !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-text,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-text p,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-text .js_readmore {
    display: block !important;
    position: static !important;
    inset: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #e7e9ea !important;
    font-size: 23px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.022em;
    text-shadow: none !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-text--long,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-text--long p,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-text--long .js_readmore {
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage-text a {
    color: #1d9bf0 !important;
    text-decoration: none !important;
    text-shadow: none !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .sg-tweet-stage a[data-readmore-toggle] {
    display: none !important;
  }

  body.sg-immersive-active .sg-immersive-slide:has(.sg-immersive-caption):not(.sg-immersive-slide--text-only):not(:has(.sg-tweet-stage)) .post.as-feed-post .post-text,
  body.sg-immersive-active .sg-immersive-slide:has(.sg-immersive-caption):not(.sg-immersive-slide--text-only):not(:has(.sg-tweet-stage)) .post.as-feed-post .js_readmore,
  body.sg-immersive-active .sg-immersive-slide:has(.sg-immersive-caption):not(.sg-immersive-slide--text-only):not(:has(.sg-tweet-stage)) .post.as-feed-post .post-replace,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide:has(.sg-tweet-stage) .post.as-feed-post .post-replace,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide:has(.sg-tweet-stage) .post.as-feed-post .post-text,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide:has(.sg-tweet-stage) .post.as-feed-post .js_readmore {
    display: none !important;
  }

  /* Fallback if the tweet stage has not been built yet */
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--text-only:not(:has(.sg-tweet-stage)) .post.as-feed-post .post-replace,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--text-only:not(:has(.sg-tweet-stage)) .post.as-feed-post .post-text,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--text-only:not(:has(.sg-tweet-stage)) .post.as-feed-post .js_readmore,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide[data-post-type=""]:not(.sg-immersive-slide--video-fill):not(.sg-immersive-slide--photo-fill):not(.sg-immersive-slide--link-card):not(.sg-immersive-slide--rich-card):not(.sg-immersive-slide--text-colored):not(:has(.sg-tweet-stage)) .post.as-feed-post .post-replace,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide[data-post-type=""]:not(.sg-immersive-slide--video-fill):not(.sg-immersive-slide--photo-fill):not(.sg-immersive-slide--link-card):not(.sg-immersive-slide--rich-card):not(.sg-immersive-slide--text-colored):not(:has(.sg-tweet-stage)) .post.as-feed-post .post-text {
    display: block !important;
    position: absolute !important;
    left: 22px !important;
    right: 76px !important;
    top: 50% !important;
    bottom: auto !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(68vh, 640px) !important;
    transform: translateY(-50%) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #e7e9ea !important;
    font-size: 23px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.022em;
    text-shadow: none !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    z-index: 6;
  }

  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--text-colored .sg-immersive-caption-author {
    left: 16px !important;
    right: 76px !important;
    top: auto !important;
    bottom: calc(var(--sg-immersive-dock-h, 64px) + 10px) !important;
    transform: none !important;
  }

  /* Shared / poll / job / audio / file cards stay readable in the stage */
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet .post,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet .post-body,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet .post-header,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet .post-text,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet .js_readmore {
    display: block !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    height: auto !important;
    max-height: none !important;
    color: #fff !important;
    background: transparent !important;
    border: none !important;
  }

  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet {
    left: 14px !important;
    right: 76px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    max-height: min(58vh, 520px) !important;
    overflow-y: auto !important;
  }

  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .job-description,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .course-description,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .funding-description,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .merit-description {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .job-description .post-text,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .job-description .js_readmore,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .funding-description .post-text,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .merit-description .post-text,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-product-container .post-text,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .post-job-meta .post-text,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .ele_post_job_info,
  body.sg-immersive-active .sg-immersive-slide.sg-immersive-slide--rich-card .ele_post_job_info p {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Photos / albums / embeds: sit in the middle of the slide, not the top */
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post.as-feed-post .as-media-stage,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post.as-feed-post .as-media-stage--photo,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post.as-feed-post .as-media-stage--video,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post.as-feed-post .pg_wrapper,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post.as-feed-post .as-album,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post.as-feed-post .post-media-image,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post.as-feed-post .post-body > .mt10 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-album {
    gap: 0 !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-album__count,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-album__thumbs {
    display: none !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-album__track {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
    background: transparent !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-album__item,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-album__item > a,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .pg_1x,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .pg_1x > a,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post-media-image > a,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-media-stage--photo > a,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post-media-image .image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
    background: transparent !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-album img,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-media-stage img,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .pg_wrapper img,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .post-media-image img,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide .as-cover-img {
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
  }

  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--link-card .post-site-link,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--rich-card .post-job-meta,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--rich-card .post-funding-meta,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--rich-card .post-product-container,
  body.sg-immersive-active:not(.sg-immersive-desktop) .sg-immersive-slide.sg-immersive-slide--rich-card .post-snippet {
    left: 14px !important;
    right: 76px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
  }

  /* Modals, pickers, and the overflow sheet sit above the snap feed */
  body.sg-immersive-active .modal,
  body.modal-open .modal {
    z-index: 20050 !important;
  }

  body.sg-immersive-active .modal-backdrop,
  body.modal-open .modal-backdrop {
    z-index: 20040 !important;
  }

  body.sg-immersive-active .modal-dialog {
    margin: 16px auto !important;
    max-width: calc(100vw - 24px) !important;
  }

  body.sg-immersive-active .modal-content {
    max-height: calc(100dvh - 32px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.sg-immersive-active .lightbox,
  body.sg-immersive-active .js_lightbox-live {
    z-index: 20060 !important;
  }

  body > .dropdown-menu.sg-immersive-post-menu-portal,
  body > .dropdown-menu.sg-immersive-menu-sheet {
    z-index: 20070 !important;
    background: #1c1c1e !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
  }

  body > .dropdown-menu.sg-immersive-menu-sheet .dropdown-item {
    color: #fff !important;
    padding: 12px 16px !important;
  }

  body.sg-immersive-active .sg-immersive-tabs {
    gap: 12px;
  }

  body.sg-immersive-active .sg-immersive-tab {
    font-size: 13px;
    padding: 6px 0 8px;
  }

  /* Posts tab: keep the TikTok shell locked; the stream is the card scroller */
  html.sg-immersive-active.sg-feed-cards,
  html.sg-immersive-active.sg-feed-posts-tab,
  body.sg-immersive-active.sg-feed-cards,
  body.sg-immersive-active.sg-feed-posts-tab {
    height: 100% !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  body.sg-immersive-active.sg-feed-cards .main-wrapper,
  body.sg-immersive-active.sg-feed-posts-tab .main-wrapper,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-root,
  body.sg-immersive-active.sg-feed-posts-tab .sg-immersive-root {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-stream,
  body.sg-immersive-active.sg-feed-posts-tab .sg-immersive-stream {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain;
    padding: 56px 12px calc(96px + var(--sg-immersive-dock-h, 78px)) !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-list {
    max-width: 720px !important;
    margin: 0 auto !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide,
  body.sg-immersive-active.sg-feed-posts-tab .sg-immersive-slide {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
    padding: 0 !important;
    margin: 0 0 12px !important;
    background: transparent !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide::after,
  body.sg-immersive-active.sg-feed-posts-tab .sg-immersive-slide::after {
    display: none !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post {
    height: auto !important;
    min-height: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: 1px solid var(--as-border, #292e36) !important;
    border-radius: 14px !important;
    background: var(--as-card, #16181d) !important;
    overflow: hidden !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 14px !important;
    overflow: visible !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-header,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .valign.post-header,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .ele_post_hdr_menu {
    display: flex !important;
    position: static !important;
    inset: auto !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-media-stage,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-media-stage--photo,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .as-media-stage--video,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .pg_wrapper,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .pg_1x,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-media,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-media-image,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .post-body > .mt10,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post video {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    transform: none !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post .plyr,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post.as-feed-post video {
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-tweet-stage,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-caption,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-author-rail,
  body.sg-immersive-active.sg-feed-cards .sg-immersive-disc {
    display: none !important;
  }

  body.sg-immersive-active.sg-feed-cards .sg-immersive-slide .post-actions {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    pointer-events: auto !important;
  }
}

/* Like celebration — TikTok-style stamp, burst, and icon pop */
.sg-immersive-slide,
.post.as-feed-post {
  --as-like: #ff2d55;
}

.as-like-stamp,
.as-like-burst {
  pointer-events: none;
  z-index: 20;
}

.as-like-stamp {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(42vw, 148px);
  height: min(42vw, 148px);
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--as-like);
  filter: drop-shadow(0 10px 28px rgba(255, 45, 85, 0.55));
  animation: as-like-stamp 0.78s cubic-bezier(0.18, 1.4, 0.28, 1) forwards;
}

.as-like-stamp svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.as-like-burst {
  position: absolute;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
}

.as-like-burst i {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--as-like);
  box-shadow: 0 0 8px rgba(255, 45, 85, 0.85);
  animation: as-like-burst 0.55s ease-out forwards;
  transform: rotate(calc(var(--as-burst-i) * 45deg)) translateY(0);
}

.as-like-burst i:nth-child(odd) {
  width: 6px;
  height: 6px;
  background: #ff8fb3;
}

.sg-immersive-slide .post-actions .reaction-btn.as-like-pop,
.sg-immersive-slide .post-actions .reaction-btn.is-bouncing {
  animation: as-like-rail-pop 0.62s cubic-bezier(0.2, 1.45, 0.32, 1);
}

@keyframes as-like-stamp {
  0% {
    transform: translate(-50%, -50%) scale(0.2) rotate(-18deg);
    opacity: 0;
  }
  28% {
    transform: translate(-50%, -50%) scale(1.28) rotate(10deg);
    opacity: 1;
  }
  48% {
    transform: translate(-50%, -50%) scale(0.9) rotate(-6deg);
  }
  68% {
    transform: translate(-50%, -50%) scale(1.08) rotate(3deg);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -40%) scale(1.05) rotate(0deg);
    opacity: 0;
  }
}

@keyframes as-like-rail-pop {
  0% {
    transform: scale(1);
  }
  18% {
    transform: scale(0.72);
  }
  48% {
    transform: scale(1.42);
  }
  72% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes as-like-icon-pop {
  0% {
    transform: scale(1);
  }
  18% {
    transform: scale(0.7);
  }
  48% {
    transform: scale(1.55);
  }
  72% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes as-like-burst {
  0% {
    opacity: 1;
    transform: rotate(calc(var(--as-burst-i) * 45deg)) translateY(0) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: rotate(calc(var(--as-burst-i) * 45deg)) translateY(-28px) scale(1);
  }
}

@keyframes as-like-count-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .as-like-stamp,
  .as-like-burst,
  .as-like-burst i,
  .sg-immersive-slide .post-actions .reaction-btn.as-like-pop,
  .post.as-feed-post .as-feed-actions .reaction-btn.as-like-pop .reaction-btn-icon,
  .as-like-count-pop {
    animation: none !important;
  }

  .as-like-stamp {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(1);
  }
}
