/* newfront2 — layout fixes (slider + messages). Loads last. */

/* ========== Discover / swipe slider ========== */
body.nf2 .nf2-discover .nf2-page__layout,
body.nf2 .nf2-discover .site-love__cnt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1020px) {
  body.nf2 .nf2-discover .nf2-page__layout,
  body.nf2 .nf2-discover .site-love__cnt {
    grid-template-columns: 1fr;
  }
}

body.nf2 .nf2-discover__stage,
body.nf2 .nf2-discover .question__flex {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: start;
  flex-direction: unset !important;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  background: transparent;
}

@media (max-width: 1020px) {
  body.nf2 .nf2-discover__stage,
  body.nf2 .nf2-discover .question__flex {
    grid-template-columns: 1fr;
  }
  body.nf2 .nf2-discover__bio,
  body.nf2 .nf2-discover .question__cnt { order: 2; }
  body.nf2 .nf2-discover__card,
  body.nf2 .nf2-discover .watch-profile { order: 1; }
}

/* Kill old max-width that crushed the card next to sidebar */
body.nf2 .watch-profile,
body.nf2 .nf2-discover .watch-profile {
  max-width: none !important;
  width: 100% !important;
  position: relative;
  margin: 0;
}

body.nf2 .watch-profile__rel {
  position: relative;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
  min-height: 0 !important;
  box-shadow: none !important;
}

body.nf2 .watch-profile__slider {
  width: 100% !important;
  max-width: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #0b2e2b;
  box-shadow: var(--nf2-shadow);
  isolation: isolate;
}

body.nf2 .watch-profile__slider .swiper-wrapper {
  align-items: stretch;
}

body.nf2 .watch-profile__slider .swiper-slide {
  width: 100% !important;
  height: auto;
  overflow: hidden;
  border-radius: 24px;
  background: #0b2e2b;
}

body.nf2 .watch-profile__photo {
  display: block !important;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
}

body.nf2 .watch-profile__photo img {
  display: block !important;
  width: 100% !important;
  height: min(620px, calc(100dvh - 220px)) !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 24px !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Name overlay on photo — discover keeps room for action bar */
body.nf2 .nf2-discover .watch-profile__moblie {
  display: block !important;
  position: absolute;
  left: 0; right: 0; bottom: 78px;
  z-index: 2;
  padding: 48px 18px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 28, 26, 0.85) 100%);
  pointer-events: none;
  text-align: left;
}
body.nf2 .nf2-discover .watch-profile__moblie h2 {
  margin: 0 0 6px;
  color: #fff !important;
  font-family: var(--nf2-display);
  font-size: 28px;
  line-height: 1.15;
}
body.nf2 .nf2-discover .watch-profile__moblie p {
  margin: 0;
  color: rgba(255,255,255,.85) !important;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 1021px) {
  body.nf2 .nf2-discover .watch-profile__moblie {
    display: block;
  }
}

/* Action bar — over photo, not colliding with next slide */
body.nf2 .watch-profile__fave,
body.nf2 .watch-profile__fave.nf2-actions {
  position: absolute !important;
  left: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  width: auto !important;
  z-index: 6;
  display: grid !important;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  margin: 0;
  padding: 8px;
  background: rgba(244, 247, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

body.nf2 .watch-profile__fave button:not(.open-this-profile) {
  position: static !important;
  width: auto !important;
  height: 48px !important;
  min-width: 0;
  margin: 0 !important;
  border: 0;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Desktop: bio beside the card — «Ещё» not needed */
body.nf2 .watch-profile__fave .open-this-profile,
body.nf2 .watch-profile__fave .btn-info-user.open-this-profile,
body.nf2 .watch-profile__fave button.open-this-profile {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.nf2 .watch-profile__fave .btn-close-user { background: #e8eeeb !important; }
body.nf2 .watch-profile__fave .btn-favorite-user { background: var(--nf2-coral) !important; color: #fff !important; }
body.nf2 .watch-profile__fave .btn-info-user { background: var(--nf2-teal) !important; color: #fff !important; }

body.nf2 .nf2-discover__bio,
body.nf2 .nf2-discover .question__cnt {
  background: var(--nf2-surface);
  border: 1px solid var(--nf2-line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--nf2-shadow);
  max-width: none !important;
  width: 100%;
  min-width: 0;
}

@media (max-width: 1020px) {
  body.nf2 .watch-profile__photo img {
    height: min(70dvh, 580px) !important;
  }
  body.nf2 .watch-profile,
  body.nf2 .nf2-discover .watch-profile {
    max-width: 100% !important;
  }
}

/* ========== Messages ========== */
body.nf2 .nf2-messages .nf2-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1020px) {
  body.nf2 .nf2-messages .nf2-page__layout {
    grid-template-columns: 1fr;
  }
}

body.nf2 .nf2-messages .messages__main {
  max-width: none !important;
  width: 100%;
  background: var(--nf2-surface);
  border: 1px solid var(--nf2-line);
  border-radius: 22px;
  box-shadow: var(--nf2-shadow);
  padding: 14px 14px 10px;
  overflow: hidden;
  min-width: 0;
}

body.nf2 .nf2-messages .place-comment__flex,
body.nf2 .nf2-messages .nf2-messages__split {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 14px !important;
  margin: 0 !important;
  min-height: calc(100dvh - 180px);
  width: 100%;
}

body.nf2 .nf2-messages .chats-comment-hrefs {
  flex: 0 0 320px;
  max-width: 320px !important;
  width: 320px !important;
  background: var(--nf2-paper-2) !important;
  border-radius: 16px !important;
  padding: 8px !important;
  border: 1px solid var(--nf2-line);
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.nf2 .nf2-messages .comment-hrefs {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

body.nf2 .nf2-messages #chats {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: none;
}

body.nf2 .nf2-messages #chats .click-comment,
body.nf2 .nf2-messages .comment-hrefs ul li {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 12px !important;
  width: 100%;
  padding: 10px 12px !important;
  margin: 0 0 6px;
  border-radius: 14px !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  position: relative;
  box-sizing: border-box;
}

body.nf2 .nf2-messages #chats .click-comment:hover,
body.nf2 .nf2-messages .comment-hrefs ul .active-comment {
  background: rgba(15, 76, 72, 0.08) !important;
  transform: none !important;
}

body.nf2 .nf2-messages .comment-place__photo {
  flex: 0 0 48px;
  width: 48px;
  display: block;
}
body.nf2 .nf2-messages .comment-place__photo img {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  object-fit: cover;
  display: block;
}

body.nf2 .nf2-messages .comment-place__user {
  flex: 1;
  min-width: 0;
  padding-right: 28px;
}
body.nf2 .nf2-messages .comment-place__user h3 {
  margin: 0 0 4px !important;
  color: var(--nf2-ink) !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.nf2 .nf2-messages .incoming-message__flex {
  margin: 0 !important;
  gap: 4px;
  pointer-events: auto;
}
body.nf2 .nf2-messages .incoming-message,
body.nf2 .nf2-messages .writing-time,
body.nf2 .nf2-messages .form-you-message {
  color: var(--nf2-muted) !important;
  font-size: 13px !important;
}
body.nf2 .nf2-messages .incoming-message {
  max-width: 100%;
}

body.nf2 .nf2-messages .incoming-message__number {
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--nf2-coral) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

body.nf2 .nf2-messages .comment-min-info {
  flex: 1 1 auto;
  max-width: none !important;
  width: auto !important;
  min-width: 0;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  height: auto !important;
  z-index: 1;
}

/* Chat interior styles live in chat-pane.css (chat.php markup) */

@media (max-width: 900px) {
  body.nf2 .nf2-messages .place-comment__flex {
    flex-direction: column !important;
    min-height: 0;
  }
  body.nf2 .nf2-messages .chats-comment-hrefs {
    flex: 1 1 auto;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* When no chat selected — list takes full width */
body.nf2 .nf2-messages .place-comment__flex:not(:has(.comment-min-info)) .chats-comment-hrefs {
  flex: 1 1 auto;
  max-width: 100% !important;
  width: 100% !important;
}

/* Profile view slider shouldn't fight either */
body.nf2 .nf2-profile-view .profile-glob__content {
  position: relative !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  align-self: start;
}
body.nf2 .nf2-profile-view .profile-glob__slider,
body.nf2 .nf2-profile-view .use-profile-glob__pic {
  max-width: none !important;
  width: 100% !important;
}
body.nf2 .nf2-profile-view .profile-glob__slider,
body.nf2 .nf2-profile-view .use-profile-glob__pic img {
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
}
body.nf2 .nf2-profile-view .use-profile-glob__pic img {
  display: block;
  height: min(620px, calc(100dvh - 180px)) !important;
  object-fit: cover;
}
body.nf2 .nf2-profile-view .use-profile-glob__pic_icon {
  line-height: 1 !important;
  font-size: 18px !important;
  color: var(--nf2-teal) !important;
  text-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  text-align: center !important;
  position: relative;
  top: 1px; /* optical center for icon font */
}

/* Visible photo nav arrows */
body.nf2 .nf2-profile-view .profile-glob__slider {
  position: relative !important;
}
body.nf2 .nf2-profile-view .profile-glob-button-prev,
body.nf2 .nf2-profile-view .profile-glob-button-next,
body.nf2 .nf2-profile-view .profile-glob__slider .swiper-button-prev,
body.nf2 .nf2-profile-view .profile-glob__slider .swiper-button-next {
  border: 0 !important;
  appearance: none;
  -webkit-appearance: none;
  position: absolute !important;
  top: calc(50% + 18px) !important;
  margin: 0 !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 8 !important;
  transform: translateY(-50%) !important;
  left: auto !important;
  right: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease, opacity .15s ease;
}
body.nf2 .nf2-profile-view .profile-glob-button-prev,
body.nf2 .nf2-profile-view .profile-glob__slider .swiper-button-prev {
  left: 12px !important;
}
body.nf2 .nf2-profile-view .profile-glob-button-next,
body.nf2 .nf2-profile-view .profile-glob__slider .swiper-button-next {
  right: 12px !important;
}
body.nf2 .nf2-profile-view .profile-glob-button-prev:hover,
body.nf2 .nf2-profile-view .profile-glob-button-next:hover {
  background: #fff !important;
  transform: translateY(-50%) scale(1.06) !important; /* keep centered on top offset */
}
body.nf2 .nf2-profile-view .profile-glob-button-prev::after,
body.nf2 .nf2-profile-view .profile-glob-button-next::after,
body.nf2 .nf2-profile-view .profile-glob__slider .swiper-button-prev::after,
body.nf2 .nf2-profile-view .profile-glob__slider .swiper-button-next::after {
  display: none !important;
  content: none !important;
}
body.nf2 .nf2-profile-view .profile-glob-button-prev.swiper-button-disabled,
body.nf2 .nf2-profile-view .profile-glob-button-next.swiper-button-disabled {
  opacity: 0.35 !important;
  pointer-events: none !important;
}
body.nf2 .nf2-profile-view .profile__mob {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  z-index: 7;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
body.nf2 .nf2-profile-view .profile-glob-pagination {
  position: static !important;
  width: auto !important;
  pointer-events: auto;
}
body.nf2 .nf2-profile-view .profile-glob-pagination .swiper-pagination-bullet {
  background: rgba(255,255,255,.55);
  opacity: 1;
}
body.nf2 .nf2-profile-view .profile-glob-pagination .swiper-pagination-bullet-active {
  background: #fff;
}
@media (max-width: 1020px) {
  body.nf2 .nf2-profile-view .profile-glob-button-prev,
  body.nf2 .nf2-profile-view .profile-glob-button-next {
    width: 38px !important;
    height: 38px !important;
  }
  body.nf2 .nf2-profile-view .profile-glob-button-prev {
    left: 8px !important;
  }
  body.nf2 .nf2-profile-view .profile-glob-button-next {
    right: 8px !important;
  }
}

/* Name overlay flush to photo bottom (no discover action-bar gap) */
body.nf2 .nf2-profile-view .watch-profile__moblie {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  z-index: 3;
  margin: 0 !important;
  padding: 56px 16px 16px !important;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 28, 26, 0.88) 100%) !important;
  text-align: left !important;
  box-sizing: border-box;
  pointer-events: none;
}
body.nf2 .nf2-profile-view .watch-profile__moblie h2 {
  margin: 0 0 6px !important;
  color: #fff !important;
  font-family: var(--nf2-display) !important;
  font-size: clamp(22px, 4vw, 28px) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  text-align: left !important;
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
body.nf2 .nf2-profile-view .watch-profile__moblie p {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  color: rgba(255,255,255,.88) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stage: bio | photos on desktop; photos on top on mobile */
body.nf2 .nf2-profile-view__stage,
body.nf2 .nf2-profile-view .question__flex {
  display: grid !important;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1.15fr) !important;
  gap: 18px !important;
  align-items: start !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-direction: unset !important;
}
body.nf2 .nf2-profile-view__bio,
body.nf2 .nf2-profile-view .use-prof-question__cnt {
  order: 1;
}
body.nf2 .nf2-profile-view .profile-glob__content {
  order: 2;
}

/* Bio name card */
body.nf2 .nf2-profile-view .question__name {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 0 12px !important;
  margin: 0 0 12px !important;
  box-shadow: none !important;
}
body.nf2 .nf2-profile-view .question__name h1 {
  margin: 0 !important;
  font-family: var(--nf2-display) !important;
  font-size: clamp(24px, 3vw, 32px) !important;
  line-height: 1.15 !important;
  color: var(--nf2-teal) !important;
}

body.nf2 .nf2-profile-view .nf2-page__layout,
body.nf2 .nf2-profile-view .site-love__cnt {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: 18px !important;
  align-items: start;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 0 8px !important;
}
@media (max-width: 1020px) {
  body.nf2 .nf2-profile-view .nf2-page__layout,
  body.nf2 .nf2-profile-view .site-love__cnt {
    grid-template-columns: 1fr !important;
  }
  body.nf2 .nf2-profile-view__stage,
  body.nf2 .nf2-profile-view .question__flex {
    grid-template-columns: 1fr !important;
  }
  /* Photos on top on mobile */
  body.nf2 .nf2-profile-view .profile-glob__content {
    order: 1 !important;
  }
  body.nf2 .nf2-profile-view__bio,
  body.nf2 .nf2-profile-view .use-prof-question__cnt {
    order: 2 !important;
  }
  body.nf2 .nf2-profile-view .use-profile-glob__pic img {
    height: min(70dvh, 560px) !important;
  }
  body.nf2 .nf2-profile-view .watch-profile__moblie {
    bottom: 0 !important;
    padding: 48px 14px 14px !important;
  }
  /* Overlay already has the name — hide duplicate in bio header on mobile */
  body.nf2 .nf2-profile-view .question__name {
    display: none !important;
  }
}
body.nf2 .nf2-profile-view .question__main,
body.nf2 .nf2-profile-view .nf2-page__main {
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: clip;
}
body.nf2 .nf2-profile-view .view-profiles {
  order: 3;
  grid-column: 1 / -1;
}

/* Profile fields — readable ink on white (home.css still has white-on-purple colors) */
body.nf2 .nf2-profile-view__bio,
body.nf2 .nf2-profile-view .use-prof-question__cnt {
  background: var(--nf2-surface) !important;
  border: 1px solid var(--nf2-line) !important;
  border-radius: 22px !important;
  padding: 18px !important;
  box-shadow: var(--nf2-shadow) !important;
  color: var(--nf2-ink) !important;
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
}
body.nf2 .nf2-profile-view .about-me__block,
body.nf2 .nf2-profile-view .about-use__marg {
  margin: 0 0 16px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  max-width: none !important;
  width: 100% !important;
  height: auto !important;
}
body.nf2 .nf2-profile-view .about-me__text {
  margin: 0 0 16px !important;
  max-width: none !important;
  width: 100% !important;
}
body.nf2 .nf2-profile-view .about-me__text strong,
body.nf2 .nf2-profile-view .about-me__block strong,
body.nf2 .nf2-profile-view .about-me__mobile strong {
  display: block !important;
  margin: 0 0 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--nf2-teal) !important;
  line-height: 1.3 !important;
}
body.nf2 .nf2-profile-view .about-me__text p,
body.nf2 .nf2-profile-view .about-me__block > p,
body.nf2 .nf2-profile-view .about-me__text > p {
  margin: 0 !important;
  color: var(--nf2-ink) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}
body.nf2 .nf2-profile-view .about-me__mobile {
  display: block !important;
  margin: 0 0 8px !important;
}
body.nf2 .nf2-profile-view .question__location,
body.nf2 .nf2-profile-view .question__location p {
  color: var(--nf2-ink-soft) !important;
  font-size: 13px !important;
  margin: 0 !important;
}
body.nf2 .nf2-profile-view .about-user__mob {
  margin: 12px 0 16px !important;
}
body.nf2 .nf2-profile-view .about-user__mob ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  gap: 8px !important;
}
body.nf2 .nf2-profile-view .about-user__mob ul li {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 4px 8px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  padding-left: 12px !important;
  border-radius: 12px !important;
  background: var(--nf2-paper-2) !important;
  position: relative !important;
}
body.nf2 .nf2-profile-view .about-user__mob ul li:before {
  display: none !important;
}
body.nf2 .nf2-profile-view .about-user__mob ul li p {
  margin: 0 !important;
  color: var(--nf2-ink-soft) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}
body.nf2 .nf2-profile-view .about-user__mob ul li span {
  color: var(--nf2-ink) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}
body.nf2 .nf2-profile-view .about-user__mob .citylink,
body.nf2 .nf2-profile-view .about-me__text .citylink,
body.nf2 .nf2-profile-view a.citylink {
  color: var(--nf2-coral) !important;
  text-decoration: underline;
  font-weight: 600;
}
body.nf2 .nf2-profile-view .about-me__skil {
  margin: 0 0 8px !important;
}
body.nf2 .nf2-profile-view .about-me__skil ul {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
body.nf2 .nf2-profile-view .about-me__skil ul li {
  margin: 0 !important;
  padding: 8px 12px !important;
  height: auto !important;
  border-radius: 999px !important;
  background: rgba(15, 76, 72, 0.1) !important;
  color: var(--nf2-teal) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  transform: none !important;
}
body.nf2 .nf2-profile-view .about-me__skil ul li:before {
  display: none !important;
}

/* Neutralize theme-v2 order swap that put the narrow column on the photo */
body.nf2 .nf2-discover .question__cnt,
body.nf2 .nf2-discover__bio {
  order: 0 !important;
}
body.nf2 .nf2-discover .watch-profile,
body.nf2 .nf2-discover__card {
  order: 0 !important;
}
body.nf2 .nf2-discover__stage,
body.nf2 .nf2-discover .question__flex {
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr) !important;
}
@media (max-width: 1020px) {
  body.nf2 .nf2-discover__stage,
  body.nf2 .nf2-discover .question__flex {
    grid-template-columns: 1fr !important;
  }
  body.nf2 .nf2-discover__bio,
  body.nf2 .nf2-discover .question__cnt { order: 2 !important; }
  body.nf2 .nf2-discover__card,
  body.nf2 .nf2-discover .watch-profile { order: 1 !important; }
}

/* Fave bar lives on the slide stack, keep photo readable above it */
body.nf2 .watch-profile__rel {
  padding-bottom: 0;
}
body.nf2 .watch-profile__slider .swiper-slide-prev,
body.nf2 .watch-profile__slider .swiper-slide-next {
  opacity: 0 !important;
  pointer-events: none !important;
}
body.nf2 .watch-profile__slider .swiper-slide-active {
  opacity: 1 !important;
}

/* Chat pane styles: see assets/css/chat-pane.css */

/* Bio panel: don't reserve fake photo height */
body.nf2 .nf2-discover .heightlikeimg,
body.nf2 .nf2-discover .padd-photos {
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

/* Desktop: keep .mobile-user-block as the only name header; back btn hidden in discover-bio */
body.nf2 .nf2-discover .mobile-user-block {
  display: flex;
}
body.nf2 .open-this-profile,
body.nf2 .watch-profile__fave .open-this-profile,
body.nf2 .watch-profile__fave button.open-this-profile {
  display: none !important;
}

/* Mobile: bio is a fullscreen sheet; info button opens it, back closes it */
@media (max-width: 1020px) {
  body.nf2 .watch-profile__fave,
  body.nf2 .watch-profile__fave.nf2-actions {
    grid-template-columns: 1fr 1.4fr 1fr;
  }
  body.nf2 .open-this-profile,
  body.nf2 .watch-profile__fave .open-this-profile,
  body.nf2 .watch-profile__fave button.open-this-profile {
    display: inline-flex !important;
  }
  body.nf2 .nf2-discover .question__cnt,
  body.nf2 .nf2-discover__bio {
    display: none !important;
    position: fixed !important;
    inset: 0;
    z-index: 1000;
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh;
    margin: 0;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px calc(96px + env(safe-area-inset-bottom)) !important;
    background: var(--nf2-surface) !important;
  }
  body.nf2 .nf2-discover .question__cnt.question-cnt__opened,
  body.nf2 .nf2-discover__bio.question-cnt__opened {
    display: block !important;
  }
  body.nf2 .nf2-discover .question-cnt__opened .mobile-user-block {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 4px 0 14px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--nf2-surface);
  }
  body.nf2 .nf2-discover .go-back-profile {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    position: fixed !important;
    right: 14px;
    bottom: calc(var(--nf2-dock-h, 88px) + 12px + env(safe-area-inset-bottom));
    z-index: 1002;
    margin: 0;
    padding: 0 14px 0 0;
    border: 0;
    border-radius: 999px;
    background: var(--nf2-teal) !important;
    box-shadow: 0 10px 24px rgba(15, 76, 72, 0.35);
    cursor: pointer;
  }
  body.nf2 .nf2-discover .go-back-profile span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
  }
  body.nf2 .nf2-discover .go-back-profile span i {
    color: #fff !important;
    font-size: 18px;
  }
  body.nf2 .nf2-discover .go-back-profile small {
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
  }
  body.nf2 .nf2-discover .question__name h1 {
    font-size: 24px !important;
  }
}

/* Prevent old absolute fave geometry from home.css */
body.nf2 .btn-close-user,
body.nf2 .btn-favorite-user,
body.nf2 .btn-info-user {
  width: auto !important;
  height: 48px !important;
  border-radius: 12px !important;
}
body.nf2 .btn-close-user .icon-close,
body.nf2 .btn-favorite-user .icon-heart,
body.nf2 .btn-info-user .icon-information {
  font-size: 18px !important;
  color: inherit !important;
}
