/* MF 1.0.0 RC1 — Member Profile Redesign
   Scoped to .profile_wrapper / .mf_profile_v15 to preserve the rest of the platform. */

.profile_wrapper {
  background:
    radial-gradient(circle at 92% 12%, rgba(109,93,251,.08), transparent 28%),
    radial-gradient(circle at 8% 74%, rgba(20,184,166,.07), transparent 26%),
    var(--fancy-theme-page-background, #f5f7fb);
  overflow: visible;
  padding-bottom: 48px;
}

.profile_wrapper .mf_profile_v15 {
  position: relative;
  z-index: 1;
}

.profile_wrapper .mf_profile_v15 .i_profile_i_container {
  max-width: 1240px;
  padding: 26px 18px 0;
}

.profile_wrapper .mf_profile_hero_card {
  overflow: visible;
  border: 1px solid var(--fancy-theme-panel-border, rgba(100,116,139,.14));
  border-radius: 24px;
  background: var(--fancy-theme-panel-background, #fff);
  box-shadow: 0 22px 60px rgba(15,23,42,.08);
}

.profile_wrapper .mf_profile_cover {
  height: 292px;
  overflow: visible;
  border-radius: 24px 24px 0 0;
  background: #dfe6f3;
  isolation: isolate;
}

.profile_wrapper .mf_profile_cover_media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 23px 23px 0 0;
  background: linear-gradient(135deg, #243b78, #6d5dfb 48%, #0e7490);
}

.profile_wrapper .mf_profile_cover_media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.profile_wrapper .mf_profile_cover_overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: 23px 23px 0 0;
  background: linear-gradient(180deg, rgba(4,11,31,.03) 42%, rgba(4,11,31,.28) 100%);
}

.profile_wrapper .mf_profile_cover_edit {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 5;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 12px;
  background: rgba(9,18,43,.72);
  color: #fff;
  font: 700 13px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
  box-shadow: 0 10px 30px rgba(2,6,23,.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.profile_wrapper .mf_profile_cover_edit:hover {
  background: rgba(9,18,43,.88);
  transform: translateY(-1px);
}

.profile_wrapper .mf_profile_action_svg,
.profile_wrapper .mf_profile_cover_edit svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.profile_wrapper .mf_profile_avatar_container {
  bottom: -70px;
  z-index: 4;
}

.profile_wrapper .mf_profile_avatar_container .i_profile_avatar_wrp {
  pointer-events: none;
}

.profile_wrapper .mf_profile_avatar_container .i_profile_avatar {
  pointer-events: auto;
  width: 142px;
  height: 142px;
  border: 5px solid var(--fancy-theme-panel-background, #fff);
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 42px rgba(15,23,42,.16);
}

.profile_wrapper .mf_profile_avatar_container .i_profile_gift_frame {
  width: 166px;
  height: 166px;
  z-index: 7;
}

.profile_wrapper .mf_profile_avatar_container .i_profile_gift_frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile_wrapper .mf_profile_avatar_edit {
  position: absolute;
  right: -2px;
  bottom: 7px;
  z-index: 10;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 3px solid var(--fancy-theme-panel-background, #fff);
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  box-shadow: 0 8px 20px rgba(15,23,42,.16);
  cursor: pointer;
}

.profile_wrapper .mf_profile_avatar_edit:hover {
  background: #e0e7ff;
  transform: scale(1.04);
}

.profile_wrapper .mf_profile_avatar_edit svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.profile_wrapper .mf_profile_avatar_container .creator_badge {
  top: 6px;
  right: -4px;
  border-color: var(--fancy-theme-panel-background, #fff);
  background: var(--fancy-theme-panel-background, #fff);
  box-shadow: 0 6px 16px rgba(15,23,42,.12);
}

.profile_wrapper .mf_profile_avatar_container .frame_badge {
  z-index: 11;
}

.profile_wrapper .mf_profile_identity {
  padding: 86px 28px 24px;
  background: transparent;
}

.profile_wrapper .mf_profile_name_line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.profile_wrapper .mf_profile_name_line .i_u_name {
  color: var(--fancy-theme-text-primary, #111827);
  font-size: 23px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.02em;
}

.profile_wrapper .mf_profile_handle {
  color: var(--fancy-theme-text-muted, #64748b);
  font: 500 13px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif;
}

.profile_wrapper .mf_profile_presence .i_p_lpt_online,
.profile_wrapper .mf_profile_presence .i_p_lpt_offline {
  padding: 5px 0 0;
  font-size: 13px;
}

.profile_wrapper .mf_profile_presence .i_p_lpt_online {
  color: #16a34a;
}

.profile_wrapper .mf_profile_presence .i_p_lpt_online::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.12);
}

.profile_wrapper .mf_profile_category_row {
  padding-top: 10px;
}

.profile_wrapper .mf_profile_category_row .i_creator_category {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(109,93,251,.14);
  border-radius: 9px;
  background: rgba(109,93,251,.09);
  color: #4f46e5;
  font-size: 12px;
  font-weight: 700;
}

.profile_wrapper .mf_profile_category_row .i_creator_category a,
.profile_wrapper .mf_profile_category_row .i_creator_category svg {
  color: inherit;
  fill: currentColor;
}

.profile_wrapper .mf_profile_hero_bio {
  max-width: 620px;
  margin-top: 11px;
  color: var(--fancy-theme-text-muted, #64748b);
  font: 400 14px/1.65 system-ui,-apple-system,"Segoe UI",sans-serif;
  text-align: center;
}

.profile_wrapper .mf_profile_actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.profile_wrapper .mf_profile_actions .i_btn_item,
.profile_wrapper .mf_profile_actions .i_btn_like_item,
.profile_wrapper .mf_profile_actions .i_btn_like_item_flw,
.profile_wrapper .mf_profile_actions .mf_profile_follow_action,
.profile_wrapper .mf_profile_owner_primary,
.profile_wrapper .mf_profile_owner_secondary {
  margin: 0;
  min-height: 43px;
  border-radius: 12px;
  border: 1px solid rgba(100,116,139,.12);
  font: 700 13px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
  box-shadow: none;
}

.profile_wrapper .mf_profile_message_action {
  min-width: 128px;
  padding: 0 !important;
  border-color: transparent !important;
  background: linear-gradient(100deg, #4f46e5 0%, #6d5dfb 55%, #0e7490 140%) !important;
  color: #fff;
  overflow: hidden;
}

.profile_wrapper .mf_profile_message_action > a,
.profile_wrapper .mf_profile_message_action > div {
  width: 100%;
  min-height: 43px;
  padding: 0 17px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.profile_wrapper .mf_profile_message_action svg {
  width: 18px;
  height: 18px;
  margin: 0;
  fill: #fff !important;
}

.profile_wrapper .mf_profile_action_label {
  display: inline-block;
  color: inherit;
  white-space: nowrap;
}

.profile_wrapper .mf_profile_icon_action {
  width: 43px;
  min-width: 43px;
  padding: 0 !important;
  display: grid !important;
  place-items: center;
  background: #f3f6fb;
  color: #172033;
}

.profile_wrapper .mf_profile_icon_action:hover {
  background: #e9eef7;
  transform: translateY(-1px);
}

.profile_wrapper .mf_profile_icon_action svg {
  width: 18px;
  height: 18px;
  margin: 0 !important;
  fill: currentColor !important;
}

.profile_wrapper .mf_profile_follow_action,
.profile_wrapper .mf_profile_actions .i_btn_like_item,
.profile_wrapper .mf_profile_actions .i_btn_like_item_flw {
  min-width: 116px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(109,93,251,.09);
  color: #4f46e5;
  border-color: rgba(109,93,251,.16);
}

.profile_wrapper .mf_profile_follow_action svg,
.profile_wrapper .mf_profile_actions .i_btn_like_item svg,
.profile_wrapper .mf_profile_actions .i_btn_like_item_flw svg {
  width: 18px;
  height: 18px;
  margin-right: 7px;
  fill: currentColor !important;
}

.profile_wrapper .mf_profile_owner_primary,
.profile_wrapper .mf_profile_owner_secondary {
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.profile_wrapper .mf_profile_owner_primary {
  background: linear-gradient(100deg, #4f46e5, #6d5dfb);
  color: #fff;
  border-color: transparent;
}

.profile_wrapper .mf_profile_owner_secondary {
  background: #f3f6fb;
  color: #172033;
}

.profile_wrapper .mf_profile_owner_primary svg,
.profile_wrapper .mf_profile_owner_secondary svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.profile_wrapper .mf_profile_creator_actions {
  margin-top: 14px;
  gap: 9px;
}

.profile_wrapper .mf_profile_creator_actions .i_btn_become_fun,
.profile_wrapper .mf_profile_creator_actions .i_btn_unsubscribe {
  min-height: 44px;
  border-radius: 12px;
  font-size: 13px;
}

.profile_wrapper .mf_profile_creator_actions .profile_secondary_actions {
  gap: 9px;
}

.profile_wrapper .mf_profile_creator_actions .i_btn_send_to_point,
.profile_wrapper .mf_profile_creator_actions .i_btn_send_to_frame {
  min-height: 42px;
  border-radius: 12px;
  font-size: 13px;
}

.profile_wrapper .mf_profile_social_links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.profile_wrapper .mf_profile_social_links .s_m_link {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f4f6fa;
  border: 1px solid rgba(100,116,139,.11);
  transition: .2s ease;
}

.profile_wrapper .mf_profile_social_links .s_m_link:hover {
  transform: translateY(-2px);
  background: #eef2ff;
}

.profile_wrapper .mf_profile_social_links a {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.profile_wrapper .mf_profile_social_links svg {
  width: 16px;
  height: 16px;
}

.profile_wrapper .mf_profile_subscription_notice {
  margin-top: 12px;
}

.profile_wrapper .mf_profile_relationship_stats {
  width: auto;
  margin: 17px auto 0;
  padding: 0;
  gap: 9px;
  background: transparent;
}

.profile_wrapper .mf_profile_relationship_stats .i_p_ffs {
  min-width: 156px;
  margin: 0;
  border: 1px solid rgba(100,116,139,.14);
  border-radius: 12px;
  background: transparent;
  overflow: hidden;
}

.profile_wrapper .mf_profile_relationship_stats .i_p_ffs a {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  gap: 9px;
  text-decoration: none;
  color: var(--fancy-theme-text-primary, #111827);
}

.profile_wrapper .mf_profile_relationship_stats .i_p_ffs svg {
  width: 18px;
  height: 18px;
  fill: #475569;
}

.profile_wrapper .mf_profile_relationship_stats .i_p_ffs span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--fancy-theme-text-muted, #64748b);
  font-size: 12px;
  font-weight: 600;
}

.profile_wrapper .mf_profile_relationship_stats .i_p_ffs strong {
  color: var(--fancy-theme-text-primary, #111827);
  font-size: 13px;
}

.profile_wrapper .mf_profile_relationship_stats .active_page_menu {
  border-color: rgba(109,93,251,.34);
  background: rgba(109,93,251,.06);
}

.profile_wrapper .mf_profile_content_nav {
  width: 100%;
  margin: 0;
  border-top: 1px solid var(--fancy-theme-panel-border, rgba(100,116,139,.14));
  background: rgba(248,250,252,.74);
  border-radius: 0 0 23px 23px;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile_wrapper .mf_profile_content_nav::-webkit-scrollbar { display: none; }

.profile_wrapper .mf_profile_content_nav .i_profile_menu_middle {
  width: 100%;
  min-width: max-content;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(128px, 1fr);
  justify-content: stretch;
  align-items: stretch;
}

.profile_wrapper .mf_profile_content_nav .i_profile_menu_item {
  min-width: 0;
  height: 68px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  position: relative;
}

.profile_wrapper .mf_profile_content_nav .i_profile_menu_item a {
  width: 100%;
  height: 100%;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--fancy-theme-text-muted, #64748b);
  text-decoration: none;
}

.profile_wrapper .mf_profile_content_nav .i_p_sum {
  position: static;
  order: 1;
  margin: 0;
  color: var(--fancy-theme-text-primary, #111827);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.profile_wrapper .mf_profile_content_nav .i_profile_menu_item_con {
  order: 2;
  gap: 6px;
  color: inherit;
}

.profile_wrapper .mf_profile_content_nav .i_profile_menu_icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor !important;
}

.profile_wrapper .mf_profile_content_nav .i_profile_menu_item_name {
  font-size: 12px;
  font-weight: 650;
  color: inherit;
}

.profile_wrapper .mf_profile_content_nav .i_profile_menu_item::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.profile_wrapper .mf_profile_content_nav .i_profile_menu_item:hover a,
.profile_wrapper .mf_profile_content_nav .active_page_menu a {
  color: #5b50ea;
}

.profile_wrapper .mf_profile_content_nav .active_page_menu::after {
  background: linear-gradient(90deg, #6d5dfb, #0e7490);
}

/* Main profile content */
.profile_wrapper .th_middle .pageMiddle {
  max-width: 1240px;
  padding: 18px 18px 0;
}

.profile_wrapper .pageMiddleRow {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile_wrapper .pageMiddleRow .pageMiddleInfo {
  width: 100%;
  min-width: 0;
  max-width: none;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile_wrapper .pageMiddleRow .pageMiddlePosts,
.profile_wrapper .pageMiddleRow #moreType {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.profile_wrapper .profile_meta_card,
.profile_wrapper .profile_media_section,
.profile_wrapper .profile_follow_section,
.profile_wrapper .profile_scheduled_lives {
  border: 1px solid var(--fancy-theme-panel-border, rgba(100,116,139,.14));
  border-radius: 18px;
  background: var(--fancy-theme-panel-background, #fff);
  box-shadow: 0 12px 34px rgba(15,23,42,.055);
}

.profile_wrapper .profile_meta_card {
  padding: 18px;
  gap: 13px;
}

.profile_wrapper .profile_meta_header,
.profile_wrapper .profile_media_header,
.profile_wrapper .profile_follow_header {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.profile_wrapper .profile_meta_title,
.profile_wrapper .profile_media_title {
  color: var(--fancy-theme-text-primary, #111827);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.profile_wrapper .mf_profile_meta_edit {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.profile_wrapper .mf_profile_meta_edit:hover {
  background: #e8edff;
  color: #4f46e5;
}

.profile_wrapper .mf_profile_meta_edit svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.profile_wrapper .profile_meta_list {
  gap: 0;
}

.profile_wrapper .profile_meta_row {
  min-height: 48px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(148,163,184,.14);
  align-items: center;
}

.profile_wrapper .profile_meta_row:last-child { border-bottom: 0; }

.profile_wrapper .profile_meta_icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f3f6fb;
  color: #334155;
}

.profile_wrapper .profile_meta_icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor !important;
}

.profile_wrapper .profile_meta_row .meta_text {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(86px, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.profile_wrapper .profile_meta_row .label {
  color: var(--fancy-theme-text-muted, #64748b);
  font-size: 12px;
  font-weight: 650;
}

.profile_wrapper .profile_meta_row .value {
  color: var(--fancy-theme-text-primary, #111827);
  font-size: 12px;
  font-weight: 650;
  text-align: right;
}

.profile_wrapper .profile_meta_bio {
  padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,.14);
}

.profile_wrapper .profile_meta_bio_title {
  color: var(--fancy-theme-text-primary, #111827);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.profile_wrapper .profile_meta_bio_text {
  margin-top: 7px;
  color: var(--fancy-theme-text-muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
}

.profile_wrapper .profile_meta_social_list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile_wrapper .profile_meta_social_link {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(100,116,139,.12);
  border-radius: 9px;
  background: #f4f6fa;
}

.profile_wrapper .profile_meta_social_link svg {
  width: 15px;
  height: 15px;
}

.profile_wrapper .profile_media_section,
.profile_wrapper .profile_follow_section {
  padding: 16px;
}

.profile_wrapper .profile_media_link {
  color: #5b50ea;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.profile_wrapper .profile_media_grid,
.profile_wrapper .profile_follow_grid {
  margin-top: 12px;
  gap: 7px;
}

.profile_wrapper .profile_media_item,
.profile_wrapper .profile_follow_thumb {
  border-radius: 11px;
  overflow: hidden;
}

.profile_wrapper .profile_media_thumb {
  min-height: 92px;
}

.profile_wrapper .profile_follow_item {
  min-width: 0;
}

.profile_wrapper .profile_follow_thumb {
  aspect-ratio: 1 / 1;
}

.profile_wrapper .profile_follow_name {
  margin-top: 6px;
  color: var(--fancy-theme-text-primary, #111827);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Post cards and empty state */
.profile_wrapper .pageMiddlePosts > .i_post,
.profile_wrapper #moreType > .i_post,
.profile_wrapper .i_post_container,
.profile_wrapper .i_post_details {
  border-radius: 18px;
}

.profile_wrapper .noPost {
  min-height: 330px;
  margin: 0;
  padding: 52px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--fancy-theme-panel-border, rgba(100,116,139,.14));
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(109,93,251,.09), transparent 27%),
    var(--fancy-theme-panel-background, #fff);
  box-shadow: 0 12px 34px rgba(15,23,42,.055);
  text-align: center;
}

.profile_wrapper .noPostIcon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(109,93,251,.11), rgba(14,116,144,.08));
  color: #6d5dfb;
  transform: rotate(-3deg);
}

.profile_wrapper .noPostIcon svg {
  width: 46px;
  height: 46px;
  fill: currentColor !important;
}

.profile_wrapper .noPostNote {
  max-width: 430px;
  color: var(--fancy-theme-text-muted, #64748b);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.profile_wrapper .profile-product-filter {
  margin: 0 0 12px;
  border-radius: 16px;
}

/* Full-width profile footer — MF r1.5.1 layout isolation */
.profile_wrapper .mf_profile_footer {
  width: 100%;
  margin: 20px auto 0;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 20px;
  border: 1px solid var(--fancy-theme-panel-border, rgba(100,116,139,.14));
  border-radius: 18px;
  background: var(--fancy-theme-panel-background, #fff);
  box-shadow: 0 12px 34px rgba(15,23,42,.045);
}

/* Reset legacy sticky/sidebar footer rules inside the new profile footer. */
.profile_wrapper .mf_profile_footer .footer_container {
  position: static;
  inset: auto;
  z-index: auto;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 5px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.profile_wrapper .mf_profile_footer .footer_menu_item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: none;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.45;
}

.profile_wrapper .mf_profile_footer .footer_menu_item a {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.profile_wrapper .mf_profile_footer .footer_social_links_container {
  position: static;
  z-index: auto;
  width: auto;
  min-width: max-content;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  background: transparent;
  border: 0;
}

.profile_wrapper .mf_profile_footer .i_wsocial_link_ {
  padding: 0;
  flex: 0 0 auto;
}

.profile_wrapper .mf_profile_footer .i_iw_social_icon,
.profile_wrapper .mf_profile_footer .iisocialicon,
.profile_wrapper .mf_profile_footer .i_iw_social_icon > a {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
}

.profile_wrapper .mf_profile_footer .iisocialicon svg {
  width: 18px;
  height: 18px;
}

/* Avatar / cover editing modal refinement */
.i_modal_bg_in .i_block_user_avatar_cover_wrapper .coverImageArea {
  border-radius: 16px;
  overflow: hidden;
}

.i_modal_bg_in .newCoverUpload,
.i_modal_bg_in .newAvatarUpload {
  transition: .2s ease;
}

/* Dark mode */
body.night_mode .profile_wrapper,
body.dark_mode .profile_wrapper {
  background:
    radial-gradient(circle at 92% 12%, rgba(109,93,251,.13), transparent 28%),
    radial-gradient(circle at 8% 74%, rgba(20,184,166,.08), transparent 26%),
    #0b1020;
}

body.night_mode .profile_wrapper .mf_profile_content_nav,
body.dark_mode .profile_wrapper .mf_profile_content_nav {
  background: rgba(17,24,39,.82);
}

body.night_mode .profile_wrapper .mf_profile_icon_action,
body.night_mode .profile_wrapper .mf_profile_owner_secondary,
body.night_mode .profile_wrapper .mf_profile_social_links .s_m_link,
body.night_mode .profile_wrapper .profile_meta_icon,
body.night_mode .profile_wrapper .profile_meta_social_link,
body.dark_mode .profile_wrapper .mf_profile_icon_action,
body.dark_mode .profile_wrapper .mf_profile_owner_secondary,
body.dark_mode .profile_wrapper .mf_profile_social_links .s_m_link,
body.dark_mode .profile_wrapper .profile_meta_icon,
body.dark_mode .profile_wrapper .profile_meta_social_link {
  background: #182235;
  color: #e5e7eb;
  border-color: rgba(148,163,184,.14);
}

body.night_mode .profile_wrapper .mf_profile_meta_edit,
body.dark_mode .profile_wrapper .mf_profile_meta_edit {
  background: #182235;
  color: #cbd5e1;
}

body.night_mode .profile_wrapper .mf_profile_category_row .i_creator_category,
body.dark_mode .profile_wrapper .mf_profile_category_row .i_creator_category {
  background: rgba(109,93,251,.16);
  color: #b8b2ff;
  border-color: rgba(129,120,255,.22);
}

body.night_mode .profile_wrapper .mf_profile_relationship_stats .i_p_ffs,
body.dark_mode .profile_wrapper .mf_profile_relationship_stats .i_p_ffs {
  border-color: rgba(148,163,184,.16);
}

body.night_mode .profile_wrapper .mf_profile_relationship_stats .active_page_menu,
body.dark_mode .profile_wrapper .mf_profile_relationship_stats .active_page_menu {
  background: rgba(109,93,251,.12);
}

/* Tablet */
@media (max-width: 1024px) {
  .profile_wrapper .pageMiddleRow {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
    gap: 13px;
  }

  .profile_wrapper .mf_profile_content_nav .i_profile_menu_middle {
    grid-auto-columns: minmax(118px, 1fr);
  }
}

/* Mobile / small tablet */
@media (max-width: 860px) {
  .profile_wrapper { padding-bottom: 28px; }

  .profile_wrapper .mf_profile_v15 .i_profile_i_container,
  .profile_wrapper .th_middle .pageMiddle {
    padding-left: 10px;
    padding-right: 10px;
  }

  .profile_wrapper .mf_profile_hero_card {
    border-radius: 18px;
  }

  .profile_wrapper .mf_profile_cover,
  .profile_wrapper .mf_profile_cover_media,
  .profile_wrapper .mf_profile_cover_overlay {
    height: 210px;
    border-radius: 17px 17px 0 0;
  }

  .profile_wrapper .mf_profile_cover_edit {
    right: 12px;
    bottom: 12px;
    min-height: 38px;
    padding: 0 11px;
    border-radius: 10px;
  }

  .profile_wrapper .mf_profile_cover_edit span:last-child { display: none; }

  .profile_wrapper .mf_profile_avatar_container {
    bottom: -56px;
  }

  .profile_wrapper .mf_profile_avatar_container .i_profile_avatar {
    width: 112px;
    height: 112px;
    border-width: 4px;
  }

  .profile_wrapper .mf_profile_avatar_edit {
    width: 34px;
    height: 34px;
    bottom: 3px;
  }

  .profile_wrapper .mf_profile_identity {
    padding: 70px 15px 18px;
  }

  .profile_wrapper .mf_profile_name_line .i_u_name { font-size: 20px; }
  .profile_wrapper .mf_profile_hero_bio { max-width: 94%; }

  .profile_wrapper .mf_profile_actions {
    width: 100%;
    gap: 7px;
  }

  .profile_wrapper .mf_profile_message_action,
  .profile_wrapper .mf_profile_owner_primary {
    flex: 1 1 145px;
  }

  .profile_wrapper .mf_profile_owner_secondary { flex: 0 1 auto; }

  .profile_wrapper .mf_profile_relationship_stats {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .profile_wrapper .mf_profile_relationship_stats::-webkit-scrollbar { display: none; }
  .profile_wrapper .mf_profile_relationship_stats .i_p_ffs { min-width: 145px; }

  .profile_wrapper .mf_profile_content_nav { border-radius: 0 0 17px 17px; }
  .profile_wrapper .mf_profile_content_nav .i_profile_menu_middle { grid-auto-columns: 105px; }
  .profile_wrapper .mf_profile_content_nav .i_profile_menu_item { height: 64px; }

  .profile_wrapper .pageMiddleRow {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .profile_wrapper .pageMiddleRow .pageMiddlePosts {
    order: 1;
    width: 100%;
  }

  .profile_wrapper .pageMiddleRow .pageMiddleInfo {
    order: 2;
    position: static;
    width: 100%;
  }

  .profile_wrapper .profile_meta_card,
  .profile_wrapper .profile_media_section,
  .profile_wrapper .profile_follow_section,
  .profile_wrapper .noPost {
    border-radius: 16px;
  }

  .profile_wrapper .mf_profile_footer {
    margin-top: 12px;
    padding: 16px;
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 12px;
  }

  .profile_wrapper .mf_profile_footer .footer_container {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .profile_wrapper .mf_profile_footer .footer_social_links_container {
    width: auto;
    min-width: 0;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .profile_wrapper .mf_profile_v15 .i_profile_i_container { padding-top: 10px; }
  .profile_wrapper .mf_profile_cover,
  .profile_wrapper .mf_profile_cover_media,
  .profile_wrapper .mf_profile_cover_overlay { height: 164px; }

  .profile_wrapper .mf_profile_avatar_container { bottom: -48px; }
  .profile_wrapper .mf_profile_avatar_container .i_profile_avatar { width: 96px; height: 96px; }
  .profile_wrapper .mf_profile_avatar_edit { width: 31px; height: 31px; right: -4px; }
  .profile_wrapper .mf_profile_identity { padding-top: 61px; }

  .profile_wrapper .mf_profile_owner_secondary span { display: none; }
  .profile_wrapper .mf_profile_owner_secondary { width: 43px; padding: 0; }

  .profile_wrapper .mf_profile_creator_actions,
  .profile_wrapper .mf_profile_creator_actions .profile_secondary_actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .profile_wrapper .mf_profile_creator_actions .i_btn_become_fun,
  .profile_wrapper .mf_profile_creator_actions .i_btn_unsubscribe,
  .profile_wrapper .mf_profile_creator_actions .profile_secondary_actions {
    width: 100%;
  }

  .profile_wrapper .profile_meta_row .meta_text {
    grid-template-columns: minmax(80px,.7fr) minmax(0,1fr);
  }

  .profile_wrapper .noPost { min-height: 250px; padding: 36px 18px; }
  .profile_wrapper .noPostIcon { width: 68px; height: 68px; border-radius: 20px; }
  .profile_wrapper .noPostIcon svg { width: 38px; height: 38px; }
}

.profile_wrapper .mf_profile_empty_title {
  color: var(--fancy-theme-text-primary, #111827);
  font: 800 20px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing: -.02em;
}
