/**
 * Visitor doctor/clinic — AUTHORITATIVE final layer (load AFTER skin/ivory/inline).
 * Restores identity, social, VIP, about, CTAs, posts. Hides owner chrome.
 * Perf: content-visibility on below-fold panels; no opacity-0 entrance traps.
 */

/* Kill editorial/lux modes that hide .bn-profile-hero or explode the avatar */
body.app-shell.bn-profile--visitor #doctorEditorialProfile,
body.app-shell.bn-profile--visitor.doctor-editorial-layout #doctorEditorialProfile {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.app-shell.bn-profile--visitor.doctor-editorial-layout .bn-profile-hero,
body.app-shell.bn-profile--visitor.doctor-editorial-layout .bn-profile-social-shell > .bn-profile-hero,
body.app-shell.bn-profile--visitor .bn-profile-hero.dp-hero,
body.app-shell.bn-profile--visitor .bn-profile-hero.iconic-profile-hero {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Beat lux-photo full-bleed avatar rules (higher specificity) */
body.app-shell.bn-profile--visitor.bn-profile--lux-photo .dp-visitor-identity,
body.app-shell.bn-profile--visitor.bn-profile--lux-photo .bn-visitor-head,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .dp-visitor-identity,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .bn-visitor-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  direction: rtl !important;
  text-align: start !important;
}

body.app-shell.bn-profile--visitor.bn-profile--lux-photo .dp-visitor-identity__photo,
body.app-shell.bn-profile--visitor.bn-profile--lux-photo .dp-avatar-block,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .bn-visitor-head .dp-avatar-block,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .bn-visitor-head .bn-profile-avatar-wrap {
  display: block !important;
  width: auto !important;
  max-width: 132px !important;
  margin: 0 !important;
  overflow: visible !important;
}

body.app-shell.bn-profile--visitor.bn-profile--lux-photo .dp-avatar-ring--square,
body.app-shell.bn-profile--visitor.bn-profile--lux-photo .dp-avatar-ring--square img,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .bn-visitor-head .bn-profile-avatar-ring,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .bn-visitor-head .bn-profile-avatar {
  width: 132px !important;
  height: 132px !important;
  max-width: 132px !important;
  max-height: 132px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 18px !important;
  object-fit: cover !important;
}

body.app-shell.bn-profile--visitor.bn-profile--lux-photo .bn-profile-cover,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .bn-profile-cover,
body.app-shell.bn-profile--visitor.doctor-profile-page.bn-profile--lux-photo .dp-cover {
  display: none !important;
  height: 0 !important;
}

body.app-shell.bn-profile--visitor .bn-profile-card.dp-visitor-stack,
body.app-shell.bn-profile--visitor.bn-profile--lux-photo .bn-profile-card.dp-visitor-stack {
  margin-top: 0 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  overflow: visible !important;
}

/* Hide edge onboarding chip on visitor profiles — clutters the layout */
body.app-shell.bn-profile--visitor .decto-smart-pick {
  display: none !important;
}

/* ── Owner chrome never paints for visitors ── */
body.app-shell.bn-profile--visitor [data-owner-only],
body.app-shell.bn-profile--visitor #doctorOwnerHero,
body.app-shell.bn-profile--visitor #clinicOwnerHero,
body.app-shell.bn-profile--visitor #doctorOwnerNavStack,
body.app-shell.bn-profile--visitor #clinicOwnerNavStack,
body.app-shell.bn-profile--visitor #doctorOwnerCommand,
body.app-shell.bn-profile--visitor #doctorOwnerQuickPanel,
body.app-shell.bn-profile--visitor #providerInsightsPanel,
body.app-shell.bn-profile--visitor #clinicCreateBar,
body.app-shell.bn-profile--visitor .doctor-create-bar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Page shell: clean, full-bleed, no cream double-frame ── */
body.app-shell.bn-profile--visitor,
body.app-shell.bn-profile--visitor .main-content,
body.app-shell.bn-profile--visitor .bn-app-page,
body.app-shell.bn-profile--visitor .bn-profile-page,
body.app-shell.bn-profile--visitor .bn-profile-social-shell,
body.app-shell.bn-profile--visitor .bn-profile-hero,
body.app-shell.bn-profile--visitor .dp-hero,
body.app-shell.bn-profile--visitor .iconic-profile-hero {
  background: #f7f6f3 !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  max-width: none !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  transform: none !important;
}

body.app-shell.bn-profile--visitor .bn-profile-page {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 0 calc(var(--bn-bottom-dock-h, 96px) + 28px + env(safe-area-inset-bottom, 0px)) !important;
  margin: 0 auto !important;
  width: 100% !important;
}

body.app-shell.bn-profile--visitor .bn-profile-social-shell,
body.app-shell.bn-profile--visitor .bn-profile-hero {
  display: block !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Cover/nav intentionally collapsed on flat visitor stack */
body.app-shell.bn-profile--visitor .bn-profile-cover,
body.app-shell.bn-profile--visitor .dp-cover,
body.app-shell.bn-profile--visitor .bn-profile-cover-mesh,
body.app-shell.bn-profile--visitor .dp-cover-mesh,
body.app-shell.bn-profile--visitor .dp-cover-vignette,
body.app-shell.bn-profile--visitor .bn-profile-nav,
body.app-shell.bn-profile--visitor .dp-hero-nav {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ── Hero card ── */
body.app-shell.bn-profile--visitor .bn-profile-card.dp-visitor-stack,
body.app-shell.bn-profile--visitor .bn-profile-card.dp-hero-inner,
body.app-shell.bn-profile--visitor .bn-profile-card.iconic-surface,
body.app-shell.bn-profile--visitor .bn-profile-card.iconic-surface.dp-visitor-stack {
  display: flex !important;
  flex-direction: column !important;
  /* NEVER align-items:center — shrinks services/social to chip width */
  align-items: stretch !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 16px 16px 18px !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(197, 164, 109, 0.1), transparent 55%),
    #ffffff !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(23, 56, 47, 0.06) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation: none !important;
}

/* Guest must never see owner avatar camera */
body.app-shell.bn-profile--visitor .bn-profile-avatar-edit,
body.app-shell.bn-profile--visitor .bn-profile-avatar-edit[hidden],
body.app-shell.bn-profile--visitor #clinicAvatarEditBtn,
body.app-shell.bn-profile--visitor #clinicOwnerAvatarEditBtn,
body.app-shell.bn-profile--visitor #doctorAvatarEditBtn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

/* ── Identity row (name ↔ square photo) ── */
body.app-shell.bn-profile--visitor .dp-visitor-identity,
body.app-shell.bn-profile--visitor #doctorVisitorPhotoTop,
body.app-shell.bn-profile--visitor .clinic-visitor-head {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  direction: rtl !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
  transform: none !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-identity__copy {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  order: 1 !important;
  /* end = toward the photo (order 2 / visual left in this RTL row) */
  text-align: end !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-identity__photo,
body.app-shell.bn-profile--visitor .dp-visitor-photo-wrap,
body.app-shell.bn-profile--visitor .dp-avatar-block,
body.app-shell.bn-profile--visitor .dp-visitor-stack .dp-avatar-block,
body.app-shell.bn-profile--visitor .clinic-visitor-avatar-wrap {
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  order: 2 !important;
  margin: 0 !important;
  overflow: visible !important;
  width: auto !important;
  max-width: 132px !important;
  min-width: 132px !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-identity__copy {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
  order: 1 !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-name,
body.app-shell.bn-profile--visitor #doctorName,
body.app-shell.bn-profile--visitor #clinicName {
  margin: 2px 0 10px !important;
  font-family: 'Peyda', 'Vazirmatn', sans-serif !important;
  font-size: clamp(1.22rem, 4.6vw, 1.48rem) !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  color: #17382f !important;
  text-align: end !important;
  letter-spacing: -0.01em;
}

body.app-shell.bn-profile--visitor .dp-visitor-identity__meta {
  display: grid !important;
  gap: 8px !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-identity__row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 16px !important;
  align-items: flex-start !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-identity__label {
  display: block !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #6b7c74 !important;
  margin-bottom: 2px !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-identity__value {
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  color: #17382f !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-specialty-gold {
  margin: 4px 0 0 !important;
  font-size: 0.92rem !important;
  font-weight: 750 !important;
  color: #b8924a !important;
}

body.app-shell.bn-profile--visitor .dp-avatar-ring--square,
body.app-shell.bn-profile--visitor .dp-avatar-ring--square img,
body.app-shell.bn-profile--visitor .dp-avatar-ring--square .dp-avatar,
body.app-shell.bn-profile--visitor .dp-avatar-ring--square .bn-profile-avatar,
body.app-shell.bn-profile--visitor .clinic-visitor-avatar-wrap .bn-profile-avatar-ring,
body.app-shell.bn-profile--visitor .clinic-visitor-avatar-wrap .bn-profile-avatar,
body.app-shell.bn-profile--visitor .clinic-visitor-avatar-wrap img {
  width: 132px !important;
  height: 132px !important;
  max-width: 132px !important;
  max-height: 132px !important;
  border-radius: 18px !important;
  object-fit: cover !important;
  display: block !important;
}

body.app-shell.bn-profile--visitor .dp-avatar-ring--square {
  padding: 3px !important;
  border: 1.5px solid rgba(197, 164, 109, 0.55) !important;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, #e8d4a8, #c5a46d 45%, #8f7842) border-box !important;
  box-shadow: 0 10px 24px rgba(23, 56, 47, 0.12) !important;
  overflow: hidden !important;
}

/* ── Services chips ── */
body.app-shell.bn-profile--visitor .dp-visitor-services-lux:not([hidden]),
body.app-shell.bn-profile--visitor #clinicServicesInline:not([hidden]),
body.app-shell.bn-profile--visitor #doctorVisitorServicesLux:not([hidden]) {
  display: block !important;
  width: 100% !important;
  align-self: stretch !important;
  margin: 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid rgba(197, 164, 109, 0.18) !important;
  animation: none !important;
  opacity: 1 !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-services-lux__list,
body.app-shell.bn-profile--visitor .bn-visitor-services-lines--chips,
body.app-shell.bn-profile--visitor .bn-visitor-services-lines.bn-visitor-services-lines--chips {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 8px !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
  list-style: none !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-services-lux__list li,
body.app-shell.bn-profile--visitor .bn-visitor-services-lines--chips > li,
body.app-shell.bn-profile--visitor .dp-visitor-service-chip {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  background: #f3f6f3 !important;
  border: 1px solid rgba(23, 56, 47, 0.08) !important;
  color: #17382f !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
}

/* ── CTAs ── */
body.app-shell.bn-profile--visitor .dp-visitor-action-grid,
body.app-shell.bn-profile--visitor #doctorVisitorActions,
body.app-shell.bn-profile--visitor #clinicVisitorActions:not([hidden]),
body.app-shell.bn-profile--visitor .bn-visitor-actions.dp-visitor-action-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 2px 0 0 !important;
  width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-action-secondary {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 9px !important;
  width: 100% !important;
}

/* 3 visible tiles → equal columns (avoid orphan message under map/consult) */
body.app-shell.bn-profile--visitor .dp-visitor-action-secondary:has(> :not([hidden]):nth-child(3)):not(:has(> :not([hidden]):nth-child(4))) {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-action-secondary > [hidden] {
  display: none !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-action-tile--primary,
body.app-shell.bn-profile--visitor #bookAppointmentBtn,
body.app-shell.bn-profile--visitor #clinicBookBtn:not([hidden]),
body.app-shell.bn-profile--visitor .bn-visitor-action--primary {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 52px !important;
  padding: 12px 16px !important;
  border-radius: 16px !important;
  border: 0 !important;
  background: linear-gradient(145deg, #0f4c3a, #1a6b52) !important;
  color: #fffaf2 !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow:
    0 6px 0 rgba(8, 36, 28, 0.28),
    0 12px 24px rgba(15, 76, 58, 0.22) !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-action-tile--primary i,
body.app-shell.bn-profile--visitor .bn-visitor-action--primary i {
  color: #ffe9b8 !important;
  font-size: 1.05rem !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-action-tile--lg:not([hidden]),
body.app-shell.bn-profile--visitor .dp-visitor-action-secondary .bn-visitor-action:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 68px !important;
  padding: 10px 6px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(53, 89, 68, 0.12) !important;
  background: #fff !important;
  color: #17382f !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow:
    0 5px 0 rgba(16, 37, 29, 0.06),
    0 8px 16px rgba(16, 37, 29, 0.07) !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-action-tile--lg i {
  color: #c5a46d !important;
  font-size: 1.05rem !important;
}

/* ── Social row RESTORED ── */
body.app-shell.bn-profile--visitor #doctorVisitorSocialLux:not([hidden]),
body.app-shell.bn-profile--visitor #clinicVisitorSocialLux:not([hidden]),
body.app-shell.bn-profile--visitor .dp-visitor-social-row:not([hidden]),
body.app-shell.bn-profile--visitor .bn-visitor-social-lux:not([hidden]) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 4px 0 0 !important;
  padding: 12px !important;
  width: 100% !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  border-radius: 16px !important;
  background: #f7f8f6 !important;
  border: 1px solid rgba(23, 56, 47, 0.07) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-social-cell,
body.app-shell.bn-profile--visitor .bn-visitor-social-lux__stat {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 56px !important;
  padding: 8px 4px !important;
  border: 0 !important;
  background: transparent !important;
  color: #17382f !important;
  font: inherit !important;
  cursor: pointer;
}

body.app-shell.bn-profile--visitor .dp-visitor-social-cell strong,
body.app-shell.bn-profile--visitor .bn-visitor-social-lux__stat strong {
  font-size: 1.05rem !important;
  font-weight: 850 !important;
  color: #17382f !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-social-cell span,
body.app-shell.bn-profile--visitor .bn-visitor-social-lux__stat span {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #6b7c74 !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-social-cell--follow {
  border-radius: 12px !important;
  background: #17382f !important;
  color: #faf6ee !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-social-cell--follow span,
body.app-shell.bn-profile--visitor .dp-visitor-social-cell--follow i {
  color: #faf6ee !important;
}

/* ── VIP offer RESTORED when active ── */
body.app-shell.bn-profile--visitor #doctorOfferBanner:not([hidden]),
body.app-shell.bn-profile--visitor #clinicOfferBanner:not([hidden]),
body.app-shell.bn-profile--visitor .bn-vip-offer--visitor-inline:not([hidden]) {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin: 2px 0 0 !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background:
    linear-gradient(145deg, rgba(23, 56, 47, 0.96), rgba(15, 40, 33, 0.98)) !important;
  border: 1px solid rgba(197, 164, 109, 0.35) !important;
  color: #f7f1e6 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ── Clinic about RESTORED when present ── */
body.app-shell.bn-profile--visitor #clinicAboutSection:not([hidden]),
body.app-shell.bn-profile--visitor .clinic-about-lux:not([hidden]) {
  display: block !important;
  margin: 2px 0 0 !important;
  padding: 14px !important;
  border-radius: 16px !important;
  background: #f7f8f6 !important;
  border: 1px solid rgba(23, 56, 47, 0.07) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.app-shell.bn-profile--visitor .dp-visitor-clinic-row:not([hidden]) {
  display: block !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(23, 56, 47, 0.08) !important;
  background: #fff !important;
}

/* Legacy / dead blocks stay gone */
body.app-shell.bn-profile--visitor #doctorProfileStats,
body.app-shell.bn-profile--visitor #clinicProfileStats,
body.app-shell.bn-profile--visitor .dp-stats--social,
body.app-shell.bn-profile--visitor .bn-profile-stats,
body.app-shell.bn-profile--visitor .dp-identity--legacy,
body.app-shell.bn-profile--visitor .dp-identity--legacy-extra,
body.app-shell.bn-profile--visitor #doctorVisitorAccentCard,
body.app-shell.bn-profile--visitor #followDoctorBtnTop {
  display: none !important;
}

/* ── Tabs + content ── */
body.app-shell.bn-profile--visitor .bn-profile-tabs,
body.app-shell.bn-profile--visitor .dp-tabs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  overflow-x: auto !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(23, 56, 47, 0.06) !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

body.app-shell.bn-profile--visitor .bn-profile-tabs::-webkit-scrollbar {
  display: none;
}

body.app-shell.bn-profile--visitor .bn-profile-tab,
body.app-shell.bn-profile--visitor .dp-tab {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 40px !important;
  padding: 8px 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #66756e !important;
  font-size: 0.82rem !important;
  font-weight: 750 !important;
}

body.app-shell.bn-profile--visitor .bn-profile-tab.active,
body.app-shell.bn-profile--visitor .dp-tab.active {
  background: #17382f !important;
  color: #faf6ee !important;
}

body.app-shell.bn-profile--visitor .bn-profile-content,
body.app-shell.bn-profile--visitor .dp-content {
  display: block !important;
  padding: 12px 12px 0 !important;
  background: #f7f6f3 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.app-shell.bn-profile--visitor .bn-profile-panel.tab-content:not(.active) {
  display: none !important;
}

body.app-shell.bn-profile--visitor .bn-profile-panel.tab-content.active {
  display: block !important;
  content-visibility: auto;
  contain-intrinsic-size: 1px 480px;
}

/* ── Posts grid ── */
body.app-shell.bn-profile--visitor .bn-profile-grid,
body.app-shell.bn-profile--visitor .dp-posts-grid,
body.app-shell.bn-profile--visitor .posts-grid-luxury {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.app-shell.bn-profile--visitor .bn-profile-grid-cell,
body.app-shell.bn-profile--visitor .grid-cell-luxury {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: #e8eee9 !important;
  border-radius: 0 !important;
}

body.app-shell.bn-profile--visitor .bn-profile-grid-cell img,
body.app-shell.bn-profile--visitor .bn-profile-grid-cell video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ── Reveal safety (never stuck invisible) ── */
body.app-shell.bn-profile--visitor .pm-reveal,
body.app-shell.bn-profile--visitor .pm-reveal:not(.pm-visible),
body.app-shell.bn-profile--visitor .bn-lazy-enter,
body.app-shell.bn-profile--visitor .bn-lazy-enter:not(.bn-entered) {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}

@media (min-width: 768px) {
  body.app-shell.bn-profile--visitor .bn-profile-page {
    max-width: 720px !important;
    margin-inline: auto !important;
  }

  body.app-shell.bn-profile--visitor .bn-profile-card.dp-visitor-stack {
    border-radius: 0 0 22px 22px !important;
    border: 1px solid rgba(197, 164, 109, 0.16) !important;
    border-top: 0 !important;
    box-shadow: 0 16px 40px rgba(23, 56, 47, 0.06) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.app-shell.bn-profile--visitor * {
    animation: none !important;
    transition: none !important;
  }
}
