/* Profile: full-dimension card feed (beats the cropped TikTok grid). */

body.sg-profile-tiktok-active {
  --sg-profile-page: #080a0d;
  --sg-profile-card: #16181d;
  --sg-profile-border: #292e36;
  --sg-profile-text: #f5f6f8;
  background: var(--sg-profile-page) !important;
}

body.sg-profile-tiktok-active .main-wrapper {
  background: var(--sg-profile-page) !important;
}

body.sg-profile-tiktok-active .container,
body.sg-profile-tiktok-active .ele_prof_cont_wide,
body.sg-profile-tiktok-active .profile-header > .container,
body.sg-profile-tiktok-active .profile-header.sg-profile-tiktok {
  max-width: 720px !important;
}

/* ----- Cover banner ----- */

body.sg-profile-tiktok-active .profile-header.sg-profile-tiktok {
  background: var(--sg-profile-page);
}

body.sg-profile-tiktok-active .sg-profile-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
}

body.sg-profile-tiktok-active .profile-header .ele_cover_sec_bg {
  display: block !important;
  position: relative;
  height: 188px;
  overflow: hidden;
  background: linear-gradient(135deg, #22102c 0%, #0d1117 48%, #16181d 100%);
}

body.sg-profile-tiktok-active .profile-header .ele_cover_sec_bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.sg-profile-tiktok-active .profile-header .ele_cover_bg_grad {
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  background: linear-gradient(180deg, transparent, var(--sg-profile-page));
}

body.sg-profile-tiktok-active .profile-header .profile-cover-wrapper {
  display: block !important;
  position: relative;
  height: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
  z-index: 4;
}

body.sg-profile-tiktok-active .profile-header .profile-cover-wrapper img.js_position-cover-full,
body.sg-profile-tiktok-active .profile-header .profile-cover-wrapper img.js_position-cover-cropped {
  display: none !important;
}

body.sg-profile-tiktok-active .profile-header .profile-cover-buttons {
  position: absolute;
  top: -148px;
  right: 12px;
  z-index: 6;
}

body.sg-profile-tiktok-active .profile-header .profile-info-cont {
  margin-top: -54px;
  padding: 0 16px 8px !important;
  z-index: 3;
}

body.sg-profile-tiktok-active .profile-avatar-wrapper {
  width: 112px !important;
  height: 112px !important;
  margin: 0 auto 12px !important;
  box-shadow: 0 0 0 4px var(--sg-profile-page);
}

/* Desktop header */
@media (min-width: 992px) {
  body.sg-profile-tiktok-active .profile-header .ele_cover_sec_bg {
    height: 240px;
  }

  body.sg-profile-tiktok-active .profile-header .profile-cover-buttons {
    top: -220px;
  }

  body.sg-profile-tiktok-active .profile-header .profile-info-cont {
    margin-top: -64px;
  }

  body.sg-profile-tiktok-active .profile-avatar-wrapper {
    width: 128px !important;
    height: 128px !important;
  }

  body.sg-profile-tiktok-active .sg-profile-tab {
    font-size: 12px !important;
    line-height: 1.2 !important;
    flex-direction: column;
    gap: 6px;
    padding: 12px 8px 10px !important;
  }

  body.sg-profile-tiktok-active .sg-profile-tab .sg-tab-label {
    display: block !important;
    font-size: 12px;
    font-weight: 650;
  }

  body.sg-profile-tiktok-active .sg-profile-tabs li {
    max-width: none;
    min-width: 64px;
  }
}

/* ----- Timeline: full cards, not a crop grid ----- */

body.sg-profile-tiktok-active .sg-profile-view-timeline .publisher,
body.sg-profile-tiktok-active .sg-profile-view-timeline .ele_post_filters {
  display: block !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .publisher {
  margin: 12px 16px 0 !important;
  border-radius: 14px !important;
  background: var(--sg-profile-card) !important;
  border: 1px solid var(--sg-profile-border) !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .ele_post_filters {
  margin: 8px 12px 0 !important;
  overflow: visible;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .ele_post_filters_nav {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 2px 2px 8px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .ele_post_filters_nav > .filterby {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 12px !important;
  line-height: 34px;
  overflow: visible;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .ele_post_filters_nav > .filterby svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  overflow: visible;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream {
  width: 100%;
  padding: 0;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 16px !important;
  list-style: none;
  padding: 16px 16px 96px !important;
  margin: 0 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul > li {
  position: relative !important;
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  border: 1px solid var(--sg-profile-border) !important;
  border-radius: 16px !important;
  background: var(--sg-profile-card) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-body,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-body {
  position: relative !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 16px !important;
  overflow: visible !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-header,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .valign.post-header,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-actions,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-stats,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-text,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-snippet,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .funding-description,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .job-description,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-funding-meta .funding-completion,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-product-container,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .poll-options,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-downloader,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-job-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-course-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-merit-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-site-link .post-media .post-media-meta,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-header,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-actions,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-text {
  display: block !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  max-height: none !important;
  overflow: visible !important;
  color: inherit !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .valign.post-header,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .valign.post-header {
  display: flex !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-footer:not(.as-comments-open):not(.x-hidden) {
  display: block !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-footer.x-hidden {
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-colored {
  position: relative !important;
  inset: auto !important;
  margin: 0 0 12px !important;
  border-radius: 12px !important;
  min-height: 160px;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-colored .post-text {
  display: block !important;
  font-size: 18px !important;
  line-height: 1.4 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul > li:not(:has(.post-media)):not(:has(.pg_wrapper)):not(:has(video)):not(:has(.post-colored)):not(:has(.post-map)) .post-text {
  display: block !important;
  position: static !important;
  inset: auto !important;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  padding: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.5;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .js_readmore {
  display: block !important;
  position: static !important;
  inset: auto !important;
  max-width: 100%;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .js_readmore[data-readmore] {
  overflow: hidden !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream a[data-readmore-toggle],
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-replace > a[data-readmore-toggle] {
  display: inline-block !important;
  position: relative !important;
  float: none !important;
  clear: both !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  z-index: 2;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-body > .mt10,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .as-media-stage,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_1x,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media-image,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .youtube-player,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .plyr,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-site-link {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 12px !important;
  overflow: visible !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_1o3,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_2x ~ .pg_2x,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_3x .pg_1o3,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper .pg_4x .pg_1o3 {
  display: block !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .pg_wrapper img,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media img,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .as-media-stage img,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media-image img {
  width: 100% !important;
  height: auto !important;
  max-height: min(720px, 85svh) !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #fff;
  border-radius: 12px;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream video.js_video-plyr,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .plyr,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .plyr__video-wrapper,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .plyr video,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .youtube-player {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  max-height: min(56svh, 560px) !important;
  object-fit: contain !important;
  background: #000 !important;
  border-radius: 12px;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .youtube-player {
  padding-top: 56.25% !important;
  height: 0 !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .youtube-player img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-media .plyr__controls {
  display: flex !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="article"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="link"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="product"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="poll"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="file"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="funding"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="audio"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="offer"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="job"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post[data-post-type="course"]::before,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post::after,
body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post.sg-grid-has-label .post-body::after {
  content: none !important;
  display: none !important;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .pin-icon,
body.sg-profile-tiktok-active .sg-profile-view-timeline .post .pin-icon,
body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .pin-icon {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  background: #fe2c55;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1.2;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .pin-icon svg {
  display: inline-block;
  width: 12px;
  height: 12px;
}

body.sg-profile-tiktok-active .sg-profile-view-timeline .alert-post.see-more,
body.sg-profile-tiktok-active .sg-profile-view-timeline .alert-info.see-more {
  display: block;
  grid-column: auto;
  margin: 0 16px 24px;
  background: var(--sg-profile-card) !important;
  border: 1px solid var(--sg-profile-border) !important;
  color: #fff !important;
  border-radius: 12px;
}

@media (max-width: 991px) {
  body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream > ul {
    padding: 12px 12px 96px !important;
    gap: 12px !important;
  }

  body.sg-profile-tiktok-active .sg-profile-view-timeline .js_posts_stream .post-body,
  body.sg-profile-tiktok-active .sg-profile-view-timeline .middlecol > .post .post-body {
    padding: 14px !important;
  }
}
