/* === Posting: paleta forçada no TOPO (preto #000, primário #3D56F1, borda 1px #2f3336) === */
html {
  background-color: #0f1419 !important;
  background: #0f1419 !important;
}
html,
body,
body.stick-page-feed,
body.stick-page-profile,
body.videos-page,
body.stick-page-feed.user-posts-page,
.app-layout,
.stick-shell,
.stick-grid,
.stick-feed,
.stick-stories,
.stick-composer-card,
.stick-widget,
main.main-content,
main.main-content.profile-page-surface,
.mobile-header,
.profile-header,
#postsFeed,
#profilePostsFeed,
.profile-page-layout,
.profile-content {
  background-color: #0f1419 !important;
  background-image: none !important;
  background: #0f1419 !important;
}
#postsFeed .post-card,
body.stick-page-feed .stick-posts .post-card,
#profilePostsFeed .post-card,
#profilePostsFeed .profile-post-card,
article.post-item.post-card,
.post-item.post-card {
  background-color: #0f1419 !important;
  border: 1px solid #2f3336 !important;
}
.post-username .post-username-link,
.post-username a.post-username-link {
  color: #ffffff !important;
}
.post-username .post-user-at,
.modal-perfil-header .user-at,
.modal-perfil-content .user-at {
  color: #71767b !important;
}
/* Azul de destaque (não depender de variáveis) */
.btn-primary,
.btn-connect:not(.following):not(.connected),
.btn-follow:not(.following),
.feed-composer-publish,
body.stick-page-feed .stick-publish-btn,
.bottom-nav-fab-inner,
.stick-profile .btn-profile-action-split:not(.btn-help-stick),
html body .btn-profile-action-split:not(.btn-help-stick) {
  background-color: #3D56F1 !important;
  background: #3D56F1 !important;
  border-color: #3D56F1 !important;
}
body.stick-page-feed .stick-widget__more { color: #3D56F1 !important; }
.bottom-nav-item.active,
.bottom-nav-item.active .icon,
.bottom-nav-item.active .icon i,
.bottom-nav-item.active > span:not(.icon):not(.bottom-nav-fab-inner) {
  color: #3D56F1 !important;
}
.btn-connect-sm:not(.following):not(.connected),
.btn-follow-sm:not(.following) {
  color: #3D56F1 !important;
  border-color: #3D56F1 !important;
}

/* Composer + stories (foto 1 → mesmo “cartão” que Posting: preto, 1px #2f3336) */
body.stick-page-feed .stick-composer-input,
body.stick-page-feed .stick-composer-chip:not(.btn-help-stick) {
  background-color: #16181c !important;
  background: #16181c !important;
  border: 1px solid #2f3336 !important;
  color: #ffffff !important;
}
body.stick-page-feed .stick-composer-input {
  color: #71767b !important;
  font-weight: 600 !important;
}
body.stick-page-feed .stick-composer-chip:hover {
  background-color: #16181c !important;
  border-color: #3d4144 !important;
}
body.stick-page-feed .stick-composer-avatar {
  border-color: #2f3336 !important;
}
body.stick-page-feed .stick-stories {
  background-color: #16181c !important;
  border: 1px solid #2f3336 !important;
}
body.stick-page-feed .stick-composer-card {
  background-color: #16181c !important;
  border: 1px solid #2f3336 !important;
}
.mobile-header {
  background-color: #0f1419 !important;
  background: #0f1419 !important;
  border-bottom: 1px solid #2f3336 !important;
}
.mobile-logo-icon {
  background: rgba(29, 155, 240, 0.18) !important;
  border: 1px solid rgba(29, 155, 240, 0.45) !important;
}
#postsFeed .post-time-inline,
.post-card .post-time-inline {
  color: #71767b !important;
}

/* ========================================
   MINHA REDE HYPE - Design System
   Hype Social | © 2026
   ======================================== */

/* Tipografia: stack nativo (Instagram / RedNote) — sem carregar webfonts obrigatórios */

/* ---- CSS Variables — paleta global (Posting) ---- */
:root {
  --bg-color: #0f1419 !important;
  --main-bg: #0f1419 !important;
  --background: #0f1419 !important;
  /* Azul Royal (referência) */
  --primary-blue: #3D56F1 !important;

  --posting-blue: #3D56F1;
  --posting-bg: #0f1419;
  --posting-border: #2f3336;
  --posting-text-secondary: #71767b;
  --primary-color: #3D56F1;
  --accent-color: #3D56F1;
  --bg-gradient: linear-gradient(135deg, #3D56F1 0%, #2F46D6 55%, #2438B8 100%);
  --primary: #3D56F1;
  --primary-dark: #2F46D6;
  --primary-light: #ffffff;
  --secondary: #2438B8;
  --secondary-light: #ffffff;
  --accent: #3D56F1;
  --success: #10B981;
  --danger: #ef4444;

  --bg-base: #0f1419;
  --feed-canvas: #0f1419;
  --post-card-feed-border: 1px solid #2f3336;
  --post-card-feed-radius: 15px;
  --bg-card: #16181c;
  --stick-comments-canvas: #0f1419;
  --bg-elevated: #16181c;
  --bg-input: #0f1419;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-overlay: rgba(0, 0, 0, 0.65);

  --text-primary: #ffffff;
  --text-secondary: #71767b;
  --text-muted: #71767b;
  --text-link: #3D56F1;
  --ig-text: #ffffff;
  --ig-text-soft: #71767b;
  --profile-surface: #0f1419;

  --border: #2f3336;
  --border-hover: #3d4144;
  --nav-icon: #ffffff;
  --nav-icon-active: #3D56F1;

  /* ---- Typography (mobile-first, Instagram-like hierarchy) ---- */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Feed / comentários — rem (base html 16px); leitura maior que Instagram padrão */
  --ig-feed-username-size: 1.05rem;
  --ig-feed-username-weight: 700;
  --ig-feed-body-size: 1.05rem;
  --ig-feed-body-weight: 450;
  /* Corpo do comentário (thread / sheets): ligeiramente menor, line-height confortável */
  --ig-feed-comment-size: 1rem;
  --ig-feed-comment-line-height: 1.5;
  --ig-feed-meta-size: 0.75rem;
  --ig-feed-meta-weight: 400;
  --ig-feed-meta-color: #71767b;
  --ig-feed-line-height: 1.4;
  /* Espaço extra no fim da lista para não ficar por baixo do input fixo/sticky */
  --comments-scroll-pad-bottom: 100px;

  /* ---- IA Hype (gradiente + camadas) ---- */
  --stick-ai-grad-start: #3D56F1; /* royal */
  --stick-ai-grad-mid: #3D56F1;   /* royal */
  --stick-ai-grad-end: #2F46D6;   /* darker royal */
  --stick-ai-gradient: linear-gradient(135deg, var(--stick-ai-grad-start), var(--stick-ai-grad-mid), var(--stick-ai-grad-end));
  --stick-ai-glow: 0 10px 30px rgba(29, 155, 240, 0.22), 0 10px 30px rgba(26, 140, 216, 0.18);
  /* Deve ficar acima da bottom-nav (z-index: 99) e de sheets normais */
  --z-ai-modal: 200000;

  /* Sizes use clamp() for comfortable mobile reading */
  --fs-body: clamp(1rem, 4.2vw, 1.125rem);
  --fs-caption: 1.05rem;
  --fs-username: 1.05rem;
  --fs-subtitle: clamp(0.875rem, 3.6vw, 1rem);
  --fs-meta: clamp(0.8125rem, 3.3vw, 0.9375rem);
  --fs-micro: clamp(0.75rem, 3.1vw, 0.8125rem);

  --lh-body: 1.55;
  --lh-tight: 1.25;
  --lh-snug: 1.4;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-glow: none;
  --shadow-brand: none;
  --shadow-brand-hover: none;

  /* Cards de post (Feed = Perfil) */
  --post-card-radius: 20px;
  --post-card-shadow: none;

  /* Neon accents (roxo/azul) */
  --neon-purple: #a78bfa;
  --neon-blue: #38bdf8;
  --stick-story-gradient: linear-gradient(135deg, #3D56F1 0%, #2F46D6 55%, #3D56F1 100%);

  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: all 0.4s cubic-bezier(0.4,0,0.2,1);

  --sidebar-width: 240px;
  --header-height: 60px;
  /* Instagram-like bottom bar height */
  --bottom-nav-height: 74px;
  --feed-max-width: 1120px;
  --feed-main-max: 680px;
  --feed-side-max: 320px;
  /* Reserva inferior (Reels / player): altura efetiva da barra + folga — alinhar com videos-page */
  --reels-player-bottom-offset: 70px;
  --viewport-minus-bottom-nav: calc(100dvh - var(--reels-player-bottom-offset));
}

/* ========================================
   FEED (REFERÊNCIA 9/10) — layout novo
   Escopo: body.stick-page-feed
   ======================================== */
body.stick-page-feed {
  background: var(--bg-base, #000000);
  /* Garante rolagem correta no mobile */
  overflow-x: hidden;
  overflow-y: auto;
}

/* post-detalhes: mesmo layout do index, lista só com posts do autor — rolagem no documento */
html:where(:has(body.stick-page-feed.user-posts-page)) {
  height: auto;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.stick-page-feed.user-posts-page {
  min-height: 100dvh;
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body.stick-page-feed.user-posts-page .stick-shell,
body.stick-page-feed.user-posts-page .stick-grid,
body.stick-page-feed.user-posts-page .stick-feed,
body.stick-page-feed.user-posts-page #postsFeed,
body.stick-page-feed.user-posts-page .stick-posts {
  position: relative;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow: visible;
  width: 100%;
  max-width: 100%;
}

/* Coluna do feed: largura total no mobile (sem 100vw + margens) */
@media (max-width: 1024px) {
  body.stick-page-feed.user-posts-page .stick-grid {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
  body.stick-page-feed.user-posts-page .stick-feed {
    max-width: 100% !important;
  }
}

body.stick-page-feed.user-posts-page .post-item,
body.stick-page-feed.user-posts-page #postsFeed .post-card,
body.stick-page-feed.user-posts-page #postsFeed .post-header,
body.stick-page-feed.user-posts-page #postsFeed .post-feed-media-outer,
body.stick-page-feed.user-posts-page #postsFeed .post-image-wrap,
body.stick-page-feed.user-posts-page #postsFeed .post-body,
body.stick-page-feed.user-posts-page #postsFeed .post-actions,
body.stick-page-feed.user-posts-page #postsFeed .post-caption,
body.stick-page-feed.user-posts-page #postsFeed .video-wrapper {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
}

body.stick-page-feed.user-posts-page .post-item,
body.stick-page-feed.user-posts-page #postsFeed .post-card {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  transform: none;
}

/* Micro-UI e dropdowns: continuam ancorados ao card (não “coluna” do post) */
body.stick-page-feed.user-posts-page #postsFeed .play-overlay,
body.stick-page-feed.user-posts-page #postsFeed .post-image-overlay,
body.stick-page-feed.user-posts-page #postsFeed .post-menu-dropdown,
body.stick-page-feed.user-posts-page #postsFeed .share-dropdown {
  position: absolute;
}

@media (max-width: 768px) {
  body.stick-page-feed.user-posts-page #postsFeed .post-card {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

body.stick-page-feed.user-posts-page.stick-comment-sheet-open {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Cabeçalho mobile: botão voltar (post-detalhes) */
body.stick-page-feed.user-posts-page .mobile-header .user-posts-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  margin-right: 4px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

body.stick-page-feed .stick-shell {
  min-height: 100vh;
  width: 100%;
}

/* Grid 3 colunas (desktop): sidebar | feed | widgets
   Evita o feed “esticar” demais (referência Instagram). */
body.stick-page-feed .stick-grid {
  display: grid;
  grid-template-columns:
    minmax(220px, var(--sidebar-width, 240px))
    minmax(0, var(--feed-main-max, 470px))
    minmax(260px, var(--feed-side-max, 320px));
  justify-content: center;
  gap: 28px;
  width: min(var(--feed-max-width, 1120px), calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 90px;
  align-items: start;
}

/* Sidebar (fixa/sticky) */
body.stick-page-feed .stick-sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  background: #000000;
  border: 1px solid var(--posting-border, #2f3336);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.stick-page-feed .stick-sidebar__brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid #2f3336;
}

body.stick-page-feed .stick-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.stick-page-feed .stick-brand__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color, #3D56F1);
  color: #fff;
  font-size: 18px;
}

body.stick-page-feed .stick-brand__name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
}

body.stick-page-feed .stick-brand__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 1px;
}

body.stick-page-feed .stick-sidebar__nav {
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
}

body.stick-page-feed .stick-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 650;
  font-size: 14px;
  border: 1px solid transparent;
  transition: var(--transition);
}

body.stick-page-feed .stick-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

body.stick-page-feed .stick-nav-item.active {
  background: rgba(29, 155, 240, 0.16);
  border-color: rgba(29, 155, 240, 0.28);
  color: #fff;
}

body.stick-page-feed .stick-nav-icon {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  color: rgba(255, 255, 255, 0.86);
}

body.stick-page-feed .stick-nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(29, 155, 240, 0.24);
  color: #fff;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.stick-page-feed .stick-sidebar__footer {
  margin-top: auto;
  padding: 14px 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}

body.stick-page-feed .stick-profile-mini {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.stick-page-feed .stick-profile-mini__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
}

body.stick-page-feed .stick-profile-mini__name {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.1;
}

body.stick-page-feed .stick-profile-mini__handle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

body.stick-page-feed .stick-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

body.stick-page-feed .stick-help-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

/* Centro */
body.stick-page-feed .stick-feed {
  min-width: 0;
  width: 100%;
  max-width: var(--feed-main-max, 470px);
  margin: 0 auto;
}

body.stick-page-feed .stick-stories {
  background: #000000;
  border: 1px solid var(--posting-border, #2f3336);
  border-radius: 20px;
  padding: 14px 14px 10px;
}

body.stick-page-feed .stick-stories__row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}

body.stick-page-feed .stick-stories__row::-webkit-scrollbar {
  display: none;
}

/* Compat: os itens são injetados pelo JS existente como .active-member-item */
body.stick-page-feed .stick-stories__row .active-member-ring {
  background: var(--stick-story-gradient);
}

body.stick-page-feed .stick-composer-card {
  margin-top: 14px;
  background: #000000;
  border: 1px solid var(--posting-border, #2f3336);
  border-radius: 20px;
  padding: 16px 16px 14px;
}

body.stick-page-feed .stick-composer-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

body.stick-page-feed .stick-composer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #2f3336;
}

body.stick-page-feed .stick-composer-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border-radius: 16px;
  border: 1px solid #2f3336;
  background: #000000;
  color: #71767b;
  font-weight: 600;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
}

body.stick-page-feed .stick-composer-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

body.stick-page-feed .stick-composer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #2f3336;
  background: #000000;
  color: #ffffff;
  font-weight: 750;
  cursor: pointer;
}

body.stick-page-feed .stick-composer-chip:hover {
  background: #000000;
  border-color: #3d4144;
}

/* Botão Ajuda Hype no composer */
body.stick-page-feed .stick-composer-chip.btn-help-stick {
  background: #000000;
  border: 1px solid var(--posting-border, #2f3336);
  color: #fff !important;
}

body.stick-page-feed .stick-composer-chip.btn-help-stick:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

body.stick-page-feed .stick-publish-btn {
  width: 100%;
  margin-top: 12px;
  height: 44px;
  border: 0;
  border-radius: 16px;
  background: var(--primary-color, #3D56F1) !important;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.01em;
  cursor: pointer;
}

body.stick-page-feed .stick-publish-btn:hover {
  filter: brightness(1.05);
}

body.stick-page-feed .stick-posts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.stick-page-feed .stick-posts .post-card {
  border-radius: 20px !important;
  background: var(--bg-card, #000000) !important;
  border: 1px solid var(--posting-border, #2f3336) !important;
  box-shadow: none !important;
}

/* Feed: card em coluna (esquadro) */
#postsFeed .post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #000000) !important;
  border: 1px solid var(--posting-border, #2f3336);
  box-shadow: none;
}

#postsFeed .post-header {
  order: 0;
  padding: 15px !important;
  background: transparent;
  border-top: none;
}

#postsFeed .post-time-inline {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #71767b;
  white-space: nowrap;
}

#postsFeed .post-body {
  order: 1;
  padding: 0 15px 12px !important;
  border-top: none;
  background: transparent;
}

#postsFeed .post-image-wrap {
  order: 2;
  width: 100%;
  /* Limita altura do post no feed (estilo Instagram) */
  max-height: 520px;
  background: transparent;
  border-radius: 12px;
  margin: 0 15px 12px;
}

#postsFeed .post-image-wrap img,
#postsFeed .post-image-wrap video {
  /* Mantém proporção e evita “gigante” vertical */
  display: block !important;
  max-height: 520px;
  height: auto !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 12px;
}

/* Desktop: fotos maiores no feed (sem cortar) */
@media (min-width: 1024px) {
  #postsFeed .post-image-wrap {
    max-height: 70vh;
  }

  /* Foto: ocupa mais largura (evita ficar "pequena") */
  #postsFeed .post-image-wrap img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 70vh;
    object-fit: contain !important;
  }

  /* Vídeo do feed: mantém contain, mas respeita o novo limite */
  #postsFeed .post-image-wrap video {
    max-height: 70vh;
  }
}

/* Template do feed: container dedicado da mídia */
#postsFeed .post-image-container {
  width: 100%;
}

#postsFeed .post-main-image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Feed: espaçamento entre posts */
#postsFeed .post-card {
  margin-bottom: 20px;
}

/* Feed: imagem com cantos levemente arredondados */
#postsFeed .post-image-container .post-main-image {
  border-radius: 8px;
}

/* Feed: indicador de "play" em vídeos */
#postsFeed .video-wrapper {
  position: relative;
  width: 100%;
}

#postsFeed .video-wrapper > video {
  display: block;
  width: 100%;
  height: auto;
}

#postsFeed .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  pointer-events: none;
}

#postsFeed .play-overlay::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.6);
  margin-left: 4px;
}

#postsFeed .video-wrapper.is-playing .play-overlay {
  display: none;
}

/* Desktop: botão "play" central mais sutil/transparente (Feed + Perfil) */
@media (min-width: 1024px) {
  /* Feed: garante altura do wrapper (vídeo no feed pode ter regras globais com position:absolute) */
  #postsFeed .post-image-wrap--video {
    position: relative !important;
  }
  #postsFeed .post-image-wrap--video .video-wrapper {
    position: absolute !important;
    inset: 0 !important;
    width: 100%;
    height: 100%;
  }
  #postsFeed .post-image-wrap--video .video-wrapper > video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  #postsFeed .play-overlay,
  body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .play-overlay {
    background: transparent !important; /* remove fundo sólido */
    border: 2px solid rgba(255, 255, 255, 0.5) !important; /* borda sutil */
    width: 80px;
    height: 80px;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    opacity: 0.9;
  }

  #postsFeed .play-overlay::before,
  body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .play-overlay::before {
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.7) !important; /* ícone semitransparente */
    border-width: 14px 0 14px 24px;
  }

  /* "Hover" no Desktop: aplica no wrapper (overlay não recebe eventos) */
  #postsFeed .video-wrapper:hover .play-overlay,
  body.stick-page-profile
    #profilePostsFeed.profile-posts-feed--vertical
    .video-wrapper:hover
    .play-overlay {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.8) !important;
  }

  #postsFeed .video-wrapper:hover .play-overlay::before,
  body.stick-page-profile
    #profilePostsFeed.profile-posts-feed--vertical
    .video-wrapper:hover
    .play-overlay::before {
    border-color: transparent transparent transparent rgba(255, 255, 255, 1) !important;
  }
}

#postsFeed .post-actions.post-actions--footer {
  order: 3;
  padding: 10px 15px 12px !important;
  background: transparent;
  border-top: none;
  /* Respiro consistente abaixo da mídia (foto/vídeo) */
  margin-top: 8px;
}

#postsFeed .post-caption {
  order: 4;
  padding: 0 15px 15px;
  margin-bottom: 0;
  max-height: none;
}

/* Feed: wrapper único de mídia (foto e vídeo) — força mesmo espaçamento (sobrepõe inline) */
#postsFeed .post-feed-media-outer {
  padding: 0 12px 12px !important;
}

#postsFeed .post-feed-media-outer--video {
  padding-bottom: 0px !important;
  margin-bottom: 0px !important;
}

#postsFeed .post-feed-media-outer--video .post-image-container,
#postsFeed .post-feed-media-outer--video .post-image-wrap,
#postsFeed .post-feed-media-outer--video video {
  padding-bottom: 0px !important;
  margin-bottom: 0px !important;
  display: block !important;
}

#postsFeed .post-meta {
  order: 4;
  padding: 0 15px 15px;
}

/* Widgets direita */
body.stick-page-feed .stick-widgets {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: var(--feed-side-max, 320px);
}

body.stick-page-feed .stick-widget {
  background: #000000;
  border: 1px solid var(--posting-border, #2f3336);
  border-radius: 20px;
  padding: 14px 14px;
}

body.stick-page-feed .stick-widget__title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 10px;
}

body.stick-page-feed .stick-widget__more {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary-color, #3D56F1);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

/* Feed (coluna direita) — Sugestões para você (compacto tipo Instagram) */
body.stick-page-feed .stick-widgets #user-suggestions-list .suggested-user.feed-suggested-user,
body.stick-page-feed .stick-widgets #user-suggestions-list .suggested-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

body.stick-page-feed .stick-widgets #user-suggestions-list .feed-suggested-avatar-link,
body.stick-page-feed .stick-widgets #user-suggestions-list .feed-suggested-avatar-link img,
body.stick-page-feed .stick-widgets #user-suggestions-list .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
}

body.stick-page-feed .stick-widgets #user-suggestions-list .suggested-user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

body.stick-page-feed .stick-widgets #user-suggestions-list .suggested-user-name,
body.stick-page-feed .stick-widgets #user-suggestions-list .suggested-user-name a {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

body.stick-page-feed .stick-widgets #user-suggestions-list .suggested-user-sub {
  margin-top: 2px;
  font-size: 12px !important;
  font-weight: 400;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botão Seguir/Conectado discreto (texto azul, sem borda/fundo) */
body.stick-page-feed .stick-widgets #user-suggestions-list .btn-connect-sm {
  flex-shrink: 0;
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  color: var(--primary);
}

body.stick-page-feed .stick-widgets #user-suggestions-list .btn-connect-sm:hover {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.stick-page-feed .stick-widgets #user-suggestions-list .btn-connect-sm.following,
body.stick-page-feed .stick-widgets #user-suggestions-list .btn-connect-sm.connected {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

body.stick-page-feed .stick-trends {
  display: grid;
  gap: 10px;
}

body.stick-page-feed .stick-trend {
  text-decoration: none;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

body.stick-page-feed .stick-trend:hover {
  background: rgba(255, 255, 255, 0.07);
}

body.stick-page-feed .stick-trend__tag {
  font-weight: 900;
  font-size: 13px;
}

body.stick-page-feed .stick-trend__sub {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

/* Mobile: só coluna 2 + bottom-nav */
@media (max-width: 768px) {
  /*
   * O .mobile-header é position:fixed e sai do fluxo do grid: sem padding-top o feed
   * (stories + compositor + cards) começa em y=0 e fica escondido atrás do header.
   */
  body.stick-page-feed .stick-grid {
    grid-template-columns: 1fr;
    width: 100%;
    /* Não deixa header/bottom-nav cobrirem o conteúdo */
    padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }
  body.stick-page-feed .stick-sidebar,
  body.stick-page-feed .stick-widgets {
    display: none;
  }
}

/* ---- Feed / comentários — Poosting Dark ---- */
.post-username,
.post-username a,
.post-card .post-header .post-username,
.post-card .post-header .post-username a,
.suggested-user-name,
.suggested-user-name a,
.comment-author,
.comment-author a {
  color: #ffffff !important;
  font-weight: var(--ig-feed-username-weight, 700);
}

/* Nome sobre botão de destaque: mantém branco */
.btn-primary .post-username,
.btn-primary .post-username a,
.feed-composer-publish .post-username,
.feed-composer-publish .post-username a {
  color: #ffffff !important;
}

.post-caption,
.post-caption-mobile,
.caption-text,
.post-description,
.post-description .caption-text,
#perfil-post-modal .caption-text {
  color: #ffffff !important;
  font-weight: var(--ig-feed-body-weight, 450);
}

/* Links “linkify” (bio e legendas) — branco; sublinhado no hover para affordance */
.stick-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.stick-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Bio: deixa links discretos e legíveis */
#user-bio-display .stick-link {
  font-weight: 600;
}

.post-handle,
.post-card .post-header .post-handle {
  color: var(--ig-feed-meta-color, #71767b);
  font-weight: var(--ig-feed-meta-weight, 400);
  font-size: var(--ig-feed-meta-size, 0.75rem);
  line-height: var(--ig-feed-line-height, 1.4);
}

.mini-user-handle,
.mini-user-info .mini-user-handle {
  color: #ffffff;
  font-weight: 600;
}

.stat-value {
  color: var(--text-primary);
  font-weight: 700;
}

.stat-label {
  color: #ffffff;
  font-weight: 700;
}

button.stat-item .stat-label {
  color: #ffffff;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  /* Base 1rem — acompanha o zoom de acessibilidade do sistema */
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}
body {
  font-family: var(--font-sans);
  background: var(--feed-canvas, #000000);
  color: #ffffff;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
textarea {
  color: var(--text-primary);
}
input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
ul, ol { list-style: none; }

/* Preview do modal unificado de publicação */
.upload-post-preview-media {
  width: 100%;
  max-height: 320px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  background: var(--bg-hover);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--feed-canvas); }
::-webkit-scrollbar-thumb { background: #4a5568; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #718096; }

/* ========================================
   LAYOUT
   ======================================== */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
  padding: 0;
  overflow: hidden;
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  box-shadow: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-size: var(--fs-subtitle);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.logo-tagline {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: var(--fs-subtitle);
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(29, 155, 240, 0.16);
  color: #ffffff !important;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, #3D56F1, #2F46D6);
  border-radius: 0 4px 4px 0;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: var(--fs-micro);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

#sidebarNotifBadge.sidebar-notif-badge--on {
  background: var(--primary-dark);
  font-weight: 600;
  min-width: 16px;
  padding: 1px 5px;
}

#sidebarMsgBadge.sidebar-msg-badge--on {
  background: var(--primary-dark);
  font-weight: 600;
  min-width: 16px;
  padding: 1px 5px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.user-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.user-mini-card:hover { background: var(--bg-hover); }

.mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

.mini-user-info {
  flex: 1;
  overflow: hidden;
}

.mini-user-name {
  font-size: var(--fs-subtitle);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-user-handle {
  font-size: var(--fs-micro);
  color: var(--text-muted);
}

.mini-settings {
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}
.user-mini-card:hover .mini-settings { color: var(--text-primary); }

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Top Header (Mobile) — Poosting Dark ---- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #000000;
  border-bottom: 1px solid #2f3336;
  z-index: 1000;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-logo { display: flex; align-items: center; gap: 8px; }
.mobile-logo-icon {
  width: 28px;
  height: 28px;
  background: rgba(29, 155, 240, 0.18);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid rgba(29, 155, 240, 0.45);
  color: #ffffff;
}
.mobile-logo-text { font-size: 14px; font-weight: 700; color: var(--text-primary) !important; }

.mobile-actions { display: flex; gap: 4px; align-items: center; }
/* Apenas ícones do header — não use `.mobile-actions button` (afeta menus/dropdowns aninhados). */
.mobile-actions > button,
.profile-settings-gear-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary) !important;
  font-size: 18px;
  transition: var(--transition);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.mobile-actions > button:hover,
.profile-settings-gear-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary) !important;
}

.mobile-actions > a.mobile-header-messages-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary) !important;
  font-size: 18px;
  transition: var(--transition);
  background: transparent;
  text-decoration: none;
  padding: 0;
}
.mobile-actions > a.mobile-header-messages-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary) !important;
}

.mobile-header .header-notif-bell,
.mobile-header a.header-notif-bell {
  color: var(--text-secondary) !important;
}
.mobile-header .header-notif-bell:hover,
.mobile-header a.header-notif-bell:hover {
  background: var(--bg-hover);
  color: var(--text-primary) !important;
}

/* ---- Header: busca (lupa + painel expansível) ---- */
.header-search-wrap {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}
.header-search-wrap.open {
  pointer-events: auto;
  opacity: 1;
  /* Acima do sino (.header-notif-wrap, z-index 12050) para o painel e resultados serem clicáveis */
  z-index: 13000;
}
.header-search-panel {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: none;
  transform: translateY(6px);
  transition: transform 180ms ease;
}
.header-search-wrap.open .header-search-panel {
  transform: translateY(0);
}
.header-search-panel .icon {
  color: var(--text-muted);
  font-size: 16px;
}
.header-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
}
.header-search-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}
.header-search-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Resultados da pesquisa de utilizadores (header mobile — index, perfil, …) */
.header-search-user-results {
  margin-top: 8px;
  max-height: min(52vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: none;
  padding: 6px 4px;
  text-align: left;
}
.header-search-user-results[hidden] {
  display: none !important;
}
.header-search-user-msg {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.header-search-user-list-inner .feed-suggested-user {
  padding: 6px 4px;
}
.mobile-header:has(.header-search-wrap.open) {
  overflow: visible;
  z-index: 260;
}

/* ---- Header: notificações (sininho + dropdown) ---- */
.header-notif-wrap {
  position: relative;
  z-index: 12050;
  display: flex;
  align-items: center;
  isolation: isolate;
}
.header-notif-bell,
a.header-notif-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: var(--transition);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  box-sizing: border-box;
}
.header-notif-bell:hover,
a.header-notif-bell:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
/* Badge estilo Instagram: círculo vermelho, número branco pequeno, canto superior direito do sino */
.header-notif-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  letter-spacing: -0.02em;
}
.header-notif-badge.header-notif-badge--on {
  background: var(--primary-dark);
  box-shadow: 0 0 0 2px var(--feed-canvas);
}
/* `display: flex` vence o atributo HTML `hidden` sem !important — o painel ficava sempre visível no mobile */
.header-notif-dropdown[hidden] {
  display: none !important;
}
.header-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  background-color: var(--bg-elevated);
  background: var(--bg-elevated, #000000);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 12060;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
}
.header-notif-bell.header-notif-bell--has-unread {
  color: var(--text-primary);
}
.header-notif-dropdown-title {
  padding: 12px 14px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.header-notif-list,
.notifications-dropdown,
#notifications-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 1;
  background-color: var(--bg-elevated);
  background: var(--bg-elevated, #000000);
  min-height: 48px;
}
#notifications-list:empty {
  min-height: 0;
}
.header-notif-empty {
  padding: 20px 14px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}
.header-notif-item {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}
.header-notif-item:first-of-type {
  border-top: none;
}
.header-notif-item:hover {
  background: var(--bg-hover);
}
.header-notif-item--unread {
  background: rgba(29, 155, 240, 0.1);
}
.header-notif-item-msg {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-primary);
}
.header-notif-item-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.header-notif-footer {
  width: 100%;
  padding: 12px;
  border: none;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated, #000000);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff !important;
  cursor: pointer;
  transition: background var(--transition);
}
.header-notif-footer:hover {
  background: var(--bg-hover);
}

/* ---- Bottom Nav (Mobile) — fundo preto, ícones brancos, ativo azul Posting ---- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: #000000;
  border-top: 1px solid var(--posting-border, #2f3336);
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  padding: 6px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: none;
}

/* Mobile: garante barra inferior acima do player/controles */
@media (max-width: 768px) {
  .bottom-nav {
    z-index: 1000;
  }
}

/* Header/nav acima do feed, mas sem ficar por baixo/por cima dos botões do post */
#postsFeed .post-actions,
#postsFeed .post-action-btn {
  z-index: 10 !important;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  color: #ffffff !important;
  font-size: var(--fs-micro);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  flex: 1;
  max-width: 92px;
  position: relative;
}

.bottom-nav-item .icon {
  font-size: 24px;
  line-height: 1;
  color: #ffffff !important;
}

.bottom-nav-item .icon i,
.bottom-nav-item .icon svg {
  font-weight: 900;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bottom-nav-item > span:not(.icon):not(.bottom-nav-fab-inner) {
  color: #ffffff !important;
}

.bottom-nav-item.active {
  color: var(--primary-color, #3D56F1) !important;
}

.bottom-nav-item.active .icon,
.bottom-nav-item.active .icon i {
  color: var(--primary-color, #3D56F1) !important;
}

.bottom-nav-item.active > span:not(.icon):not(.bottom-nav-fab-inner) {
  color: var(--primary-color, #3D56F1) !important;
}

/* ========================================
   IA Assistente Hype (UI)
   ======================================== */
.feed-composer {
  position: relative;
}

.feed-composer-ai {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--stick-ai-gradient);
  box-shadow: var(--stick-ai-glow);
  cursor: pointer;
  white-space: nowrap;
}

.feed-composer-ai-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.feed-composer-ai i {
  font-size: 14px;
}

.stick-ai-modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: var(--z-ai-modal);
  pointer-events: auto;
}

.stick-ai-modal-backdrop.open {
  display: flex;
}

.stick-ai-modal {
  width: min(420px, calc(100vw - 28px));
  background: #ffffff;
  color: #111827;
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
  position: relative;
  pointer-events: auto;
}

.stick-ai-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.stick-ai-header {
  padding: 2px 42px 8px 6px;
}

.stick-ai-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 16px;
}

.stick-ai-spark {
  font-size: 16px;
}

.stick-ai-hero {
  display: flex;
  justify-content: center;
  margin: 8px 0 10px;
}

.stick-ai-mic-badge {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--stick-ai-gradient);
  box-shadow: var(--stick-ai-glow);
  color: #ffffff;
}

.stick-ai-mic-badge i {
  font-size: 28px;
}

.stick-ai-question {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  margin: 2px 0 10px;
}

.stick-ai-input {
  width: 100%;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: #f3f4f6;
}

.stick-ai-input:focus {
  border-color: rgba(29, 155, 240, 0.65);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.18);
  background: #ffffff;
}

.stick-ai-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.stick-ai-results {
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  background: #f3f4f6;
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: #111827;
}

.stick-ai-results[hidden] {
  display: none !important;
}

.stick-ai-results-title {
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 8px;
}

.stick-ai-results .stick-ai-cap {
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 10px;
}

.stick-ai-results .stick-ai-cap:last-child {
  margin-bottom: 0;
}

.stick-ai-results .stick-ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.stick-ai-results .stick-ai-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(29, 155, 240, 0.12);
  border: 1px solid rgba(29, 155, 240, 0.28);
  color: #0b4a78;
}

.stick-ai-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stick-ai-card {
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  padding: 12px 12px;
}

.stick-ai-card-title {
  font-weight: 950;
  font-size: 13px;
  margin-bottom: 8px;
}

.stick-ai-card-text {
  font-size: 13px;
  line-height: 1.5;
  color: #111827;
  white-space: pre-wrap;
}

.stick-ai-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.stick-ai-card-btn {
  border: none;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
}

.stick-ai-card-btn--copy {
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
}

.stick-ai-card-btn--use {
  background: var(--stick-ai-gradient);
  color: #ffffff;
  box-shadow: var(--stick-ai-glow);
}

.stick-ai-action {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
}

.stick-ai-action i {
  opacity: 0.9;
}

.stick-ai-action--gradient {
  background: var(--stick-ai-gradient);
  color: #ffffff;
  box-shadow: var(--stick-ai-glow);
}

.stick-ai-action--blue {
  background: var(--primary-color, #3D56F1);
  color: #ffffff;
}

.stick-ai-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.stick-ai-pill {
  border: none;
  border-radius: 16px;
  padding: 12px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}

.stick-ai-pill--blue {
  background: var(--primary-color, #3D56F1);
  color: #ffffff;
}

.stick-ai-pill--gradient {
  background: var(--stick-ai-gradient);
  color: #ffffff;
  box-shadow: var(--stick-ai-glow);
}

@media (max-width: 768px) {
  .stick-ai-modal-backdrop {
    padding: 14px;
    align-items: center;
  }

  .stick-ai-modal {
    width: 100%;
    max-width: 520px;
  }

  .stick-ai-action,
  .stick-ai-pill {
    width: 100%;
  }
}

.bottom-nav-item .dot {
  position: absolute;
  top: 6px;
  right: 14px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--bg-elevated);
}

.bottom-nav-notif-badge {
  position: absolute;
  top: 2px;
  right: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 16px;
  border: 2px solid var(--bg-card);
  letter-spacing: -0.02em;
}
.bottom-nav-notif-badge.bottom-nav-notif-badge--visible {
  display: flex;
}

.bottom-nav-item.bottom-nav-item--has-unread:not(.active) {
  color: #ffffff !important;
}

/* Feed / app: barra inferior 5 ou 6 colunas (mobile — ver @media 768px) */
.bottom-nav.bottom-nav--five .bottom-nav-item,
.bottom-nav.bottom-nav--six .bottom-nav-item {
  flex: unset;
  max-width: none;
  width: 100%;
  min-width: 0;
  padding-left: 4px;
  padding-right: 4px;
}

.bottom-nav.bottom-nav--five .bottom-nav-fab,
.bottom-nav.bottom-nav--six .bottom-nav-fab {
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 2px;
}

/* Botão (não link) na barra inferior — ex.: Buscar */
.bottom-nav.bottom-nav--five button.bottom-nav-item,
.bottom-nav.bottom-nav--six button.bottom-nav-item {
  font-family: inherit;
  border: none;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.bottom-nav.bottom-nav--five button.bottom-nav-item:focus-visible,
.bottom-nav.bottom-nav--six button.bottom-nav-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Linhas de sugestão / busca no header: avatar fixo + texto alinhado */
.header-search-user-list-inner .feed-suggested-user {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 8px;
  text-align: left;
}
.header-search-user-list-inner .feed-suggested-user .feed-suggested-avatar-link {
  flex: 0 0 auto;
}
.header-search-user-list-inner .feed-suggested-user .feed-suggested-avatar-link img,
.header-search-user-list-inner .feed-suggested-user .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.header-search-user-list-inner .feed-suggested-user .suggested-user-info {
  margin-left: 15px;
  flex: 1;
  min-width: 0;
}
.header-search-user-list-inner .feed-suggested-user .suggested-user-name,
.header-search-user-list-inner .feed-suggested-user .suggested-user-name a {
  font-size: 14px;
  font-weight: 600;
}
.header-search-user-list-inner .feed-suggested-user .suggested-user-sub {
  font-size: 12px;
}

.bottom-nav-fab-inner {
  width: 52px;
  height: 52px;
  background: var(--primary-color, #3D56F1) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #ffffff !important;
  margin-top: -10px;
  box-shadow: none;
  border: 2px solid #000000;
}
.bottom-nav-fab-inner i {
  color: #ffffff !important;
}

/* ========================================
   COMPONENTS
   ======================================== */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: var(--fs-subtitle);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  border: none;
}

.btn-primary {
  background: var(--primary-color, #3D56F1) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: none;
}
.btn-primary i,
.btn-primary span {
  color: #ffffff !important;
  font-weight: 800;
}
.btn-primary:hover {
  transform: none;
  filter: brightness(0.96);
  box-shadow: none;
}
.btn-primary:active { transform: none; }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-hover);
}
.btn-outline:hover { background: var(--bg-hover); border-color: var(--text-muted); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 6px 14px; font-size: var(--fs-meta); }
.btn-lg { padding: 13px 28px; font-size: 15px; }

.btn-connect,
.btn-follow {
  background: var(--primary-color, #3D56F1) !important;
  color: #ffffff !important;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: var(--fs-meta);
  font-weight: 600;
  transition: var(--transition);
  border: none;
}
.btn-connect:not(.following):not(.connected),
.btn-follow:not(.following) {
  color: #ffffff !important;
}
.btn-connect.following,
.btn-connect.connected,
.btn-follow.following {
  background: transparent;
  border: 1.5px solid var(--border-hover);
  color: var(--text-secondary);
}
.btn-connect:hover,
.btn-follow:hover { opacity: 0.85; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-hover); }

/* Modal Instagram - Z-Index absurdo */
#modal-instagram {
  display: none !important;
  z-index: 100000 !important;
}

#modal-instagram.active {
  display: flex !important;
  z-index: 100000 !important;
}

/* FORÇAR BOTÕES DO MODAL FUNCIONAREM */
#modal-like-btn, #modal-comment-btn, #modal-publicar-btn {
  pointer-events: auto !important;
  z-index: 999999 !important;
  position: relative !important;
  cursor: pointer !important;
}

#modal-like-btn:hover, #modal-comment-btn:hover, #modal-publicar-btn:hover {
  background: rgba(255,255,255,0.2) !important;
}

/* FORÇAR BOTÕES DO FEED FUNCIONAREM */
.post-action-btn {
  pointer-events: auto !important;
  z-index: 999999 !important;
  position: relative !important;
  cursor: pointer !important;
}

.post-action-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1) !important;
}

.post-action-btn .icon {
  pointer-events: none !important;
}

/* CORREÇÃO EMERGENCIAL - SOBREPOSIÇÃO DE TEXTO (legendas: texto completo; nomes: uma linha) */
.post-username,
.post-handle {
  line-height: 1.4 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-height: none !important;
}

.post-caption,
.post-caption-mobile {
  line-height: 1.4 !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  overflow: visible !important;
  text-overflow: unset !important;
  max-height: none !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  box-orient: unset !important;
}

.post-caption {
  font-size: var(--ig-feed-body-size, 1.05rem);
  line-height: var(--ig-feed-line-height, 1.4);
  color: #ffffff !important;
  font-weight: var(--ig-feed-body-weight, 450);
  margin-bottom: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-header-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.post-username {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: var(--ig-feed-username-weight, 700);
  line-height: var(--ig-feed-line-height, 1.4);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.post-username .verified { color: var(--primary-color); font-size: var(--fs-meta); }
.post-username .post-username-link {
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  display: inline;
}
.post-username .post-user-at {
  display: block;
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: var(--ig-feed-meta-weight, 400);
  line-height: var(--ig-feed-line-height, 1.3);
  color: #71767b !important;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.post-username:has(.post-user-at) {
  white-space: normal;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}
.post-username:has(.post-user-at) .post-username-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-handle {
  font-size: var(--ig-feed-meta-size, 0.75rem);
  margin-top: 0;
  line-height: var(--ig-feed-line-height, 1.4);
  font-weight: var(--ig-feed-meta-weight, 400);
  color: var(--ig-feed-meta-color, #a8a8a8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-card .post-header .post-username,
.post-card .post-header .post-username a {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: var(--ig-feed-username-weight, 700);
  line-height: var(--ig-feed-line-height, 1.4);
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.post-card .post-header .post-handle {
  font-size: var(--ig-feed-meta-size, 0.75rem);
  margin-top: 1px;
  line-height: var(--ig-feed-line-height, 1.4);
  font-weight: var(--ig-feed-meta-weight, 400);
  color: var(--ig-feed-meta-color, #a8a8a8);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ---- Avatar ---- */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 88px; height: 88px; }
.avatar-xxl { width: 120px; height: 120px; }

.avatar-ring {
  padding: 3px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
}
.avatar-ring img { border: 2px solid var(--bg-base); border-radius: var(--radius-full); }

/* ---- Stories ---- */
.stories-bar {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 16px 0;
  scrollbar-width: none;
}
.stories-bar::-webkit-scrollbar { display: none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.story-item:hover { transform: scale(1.05); }

.story-ring {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-full);
  background: var(--primary-color);
  padding: 2.5px;
  position: relative;
}
.story-ring.seen {
  background: #000000;
  border: 1px solid #2f3336;
}

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--bg-card);
}

.story-add-btn {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-full);
  background: #000000;
  border: 2px dashed #2f3336;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #71767b;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.story-add-btn:hover {
  background: #000000;
  border-color: #3d4144;
  color: #ffffff;
}

.story-username {
  font-size: var(--fs-micro);
  color: var(--text-secondary);
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* ---- Post Card ---- */
.feed-accent,
.post-likes,
.action-count,
.view-all-comments {
  --feed-accent-gradient: var(--bg-gradient);
}

/* Fallback: some pages may render posts inside #postsContainer */
#postsContainer > div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--post-card-radius);
  box-shadow: none;
  padding: 16px 18px;
}

.post-card {
  background: #000000;
  border: 1px solid #2f3336;
  border-radius: var(--post-card-radius);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 0;
  box-shadow: var(--post-card-shadow);
  display: flex;
  flex-direction: column;
  height: fit-content;
  position: relative;
}
.post-card:hover {
  border-color: var(--border-hover);
  box-shadow: none;
  transform: none;
}

/* Post só com legenda (sem foto/vídeo) */
.post-card.text-only-post .post-body {
  padding: 15px 18px 16px;
  font-size: 16px;
  line-height: 1.45;
}

/* Lista de posts (Feed): Layout Instagram coluna única centralizada */
#postsFeed {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 24px !important;
  width: 100% !important;
  padding: 24px 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

#postsFeed .post-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background: var(--bg-card) !important;
  border: var(--post-card-feed-border) !important;
  border-radius: var(--post-card-feed-radius) !important;
  box-shadow: none !important;
  overflow: hidden;
}

#postsFeed .post-card:hover {
  box-shadow: none !important;
  transform: none;
  border-color: var(--border-hover);
}

/* Desktop: limita largura do feed (evita posts “gigantes”) */
@media (min-width: 769px) {
  #postsFeed {
    max-width: 600px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }

  #postsFeed .post-card {
    max-width: 600px !important;
  }
}

@media (max-width: 768px) {
  #postsFeed {
    gap: 0 !important;
    padding: 0 !important;
    padding-bottom: calc(var(--bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px) + 12px) !important;
    max-width: 100% !important;
    align-items: stretch !important;
  }

  #postsFeed .post-card {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 480px) {
  #postsFeed {
    gap: 12px !important;
    padding: 0 !important;
  }
}

.feed-discovery-banner {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 8px;
  padding: 0 4px;
  box-sizing: border-box;
}

.feed-discovery-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 14px;
  box-shadow: none;
}

.feed-discovery-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.feed-discovery-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text-primary);
  line-height: 1.25;
}

.feed-discovery-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 16px;
  line-height: 1.45;
}

.feed-suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-suggestion-loading {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
}

.feed-suggested-user .suggested-user-name a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.feed-suggested-user .suggested-user-name a:hover {
  text-decoration: underline;
}

.feed-suggested-avatar-link {
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.feed-empty-filter-msg {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 16px;
  padding: 16px 18px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.feed-empty-filter-msg i {
  font-size: 22px;
  opacity: 0.55;
  margin-bottom: 8px;
  display: block;
}

.feed-empty-filter-msg strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.feed-empty-filter-sub {
  font-size: 13px;
  margin: 0;
  opacity: 0.9;
}

.profile-posts-feed {
  display: grid !important;
  /* Instagram-like grid: 3 colunas, gap fino */
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: 935px !important;
  margin: 18px auto 28px !important;
  padding: 0 12px !important;
}

@media (max-width: 768px) {
  .profile-posts-feed {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
    padding: 0 10px !important;
  }
}

.profile-page-layout {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

.profile-content {
  width: 100% !important;
  max-width: none !important;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  order: 2;
  position: relative;
  z-index: 5;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  overflow: visible !important;
}
.post-header > a:first-of-type {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
}

.post-header-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.post-username {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: var(--ig-feed-username-weight, 700);
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-card .post-header .post-handle {
  font-size: 12px;
  margin-top: 0;
  line-height: 1.35;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-card .post-header .avatar.avatar-sm {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--primary-color);
}

.post-location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-location .fa-map-pin {
  flex-shrink: 0;
  font-size: 10px;
  opacity: 0.85;
}
.post-location span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-menu-btn {
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px;
  border-radius: 50%;
  transition:var(--transition);
  position: relative;
  z-index: 9999;
}
.post-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Dropdown menu do post */
.post-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.post-menu-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===========================
   Moderation status (UI)
   - pending/rejected só visível para o autor
   =========================== */
.post-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  vertical-align: middle;
}
.post-status-pill--pending {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #b45309;
}
.post-status-pill--rejected {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}

.post-media-placeholder {
  width: 100%;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  text-align: center;
  padding: 22px 16px;
}
.post-media-placeholder i {
  font-size: 28px;
  opacity: 0.7;
}
.post-media-placeholder-title {
  font-weight: 900;
  font-size: 15px;
  color: var(--text-primary);
}
.post-media-placeholder-sub {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 360px;
}

.profile-post-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}
.profile-post-placeholder i {
  font-size: 22px;
  opacity: 0.75;
}
.profile-post-placeholder-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
}

.menu-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: var(--fs-subtitle);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

.menu-option:last-child {
  border-bottom: none;
}

.menu-option:hover {
  background: var(--bg-hover);
}

.menu-option.danger {
  color: var(--danger);
}

.menu-option.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.menu-option i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

/* Container para dropdowns - permite que o menu apareça fora do card */
.relative-wrap {
  position: relative;
  overflow: visible !important;
  z-index: 1;
}

/* Três pontinhos: canto superior direito do card (Feed + Perfil) */
.post-card {
  position: relative;
}
.post-options-abs {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 9999;
}
.post-options-abs .post-menu-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255,255,255,0.95);
  padding: 0;
}
.post-options-abs .post-menu-btn:hover {
  background: rgba(0, 0, 0, 0.26);
}
.post-options-abs .post-menu-dropdown {
  z-index: 9999 !important;
}

/* Dropdown de compartilhamento */
.share-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
}

.share-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: var(--fs-subtitle);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

.share-option:last-child {
  border-bottom: none;
}

.share-option:hover {
  background: var(--bg-hover);
}

.share-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.si-tw { background: #1DA1F2; }
.si-wa { background: #25D366; }
.si-fb { background: #4267B2; }
.si-lk { background: #0077B5; }
.si-cp { background: var(--bg-elevated); }

.post-image-wrap {
  position: relative;
  overflow: hidden;
  background: transparent;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 100%;
  max-height: min(100vw, 640px);
  border-radius: var(--post-card-feed-radius, 12px);
  z-index: 1;
}

/* Menu de três pontos no canto superior direito da imagem */
.post-image-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 9999;
}

/* Botão de menu em cima da mídia (branco) */
.post-image-menu .post-menu-btn {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  position: relative;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.25);
  border: none;
}

.post-image-menu .post-menu-btn:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}

/* Garantir dropdown acima da mídia e clicável */
.post-menu-dropdown {
  z-index: 100000 !important;
  pointer-events: auto;
}

.post-image-wrap img,
.post-image-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition-slow);
  cursor: pointer;
}
.post-image-wrap video {
  background: transparent;
}

/* Vídeo (Reels) no feed: proporção 9:16 + contain (evita “zoom” do quadrado 1:1). */
.post-image-wrap--video {
  aspect-ratio: 9 / 16;
  max-height: min(92vh, 920px);
  background: #000;
}
.post-image-wrap--video video {
  object-fit: contain;
  object-position: center;
  background: #000;
}

/* Carrossel horizontal (várias fotos — estilo Instagram) */
.post-image-wrap--carousel .post-media-carousel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.post-media-carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}
.post-media-carousel-track::-webkit-scrollbar {
  display: none;
}
.post-media-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
}
.post-image-wrap--carousel .post-media-carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition-slow);
  user-select: none;
  -webkit-user-drag: none;
}
.post-media-carousel-counter {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}

/* Bolinhas (dots) do carrossel */
.post-media-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 5;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(3px);
}

.post-media-carousel-dot {
  width: 7px;
  height: 7px;
  min-width: 0;
  min-height: 0;
  display: block;
  line-height: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.post-media-carousel-dot.active {
  background: var(--bg-elevated);
  width: 10px;
  height: 10px;
}

/* Mobile: paginador ainda mais compacto (estilo Instagram) */
@media (max-width: 768px) {
  .post-media-carousel-dots {
    bottom: 8px;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(2px);
  }

  .post-media-carousel-dot {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.55);
  }

  .post-media-carousel-dot.active {
    width: 7px;
    height: 7px;
  }
}

/* Modal do post: garante scroll horizontal mesmo com overrides */
#perfil-post-modal .post-media-carousel-track {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  touch-action: pan-x;
}

/* Setas do carrossel (← →) */
.post-media-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  transition: var(--transition);
}
.post-media-carousel-nav:hover {
  background: rgba(0, 0, 0, 0.5);
}
.post-media-carousel-nav:active {
  transform: translateY(-50%) scale(0.98);
}
.post-media-carousel-prev { left: 10px; }
.post-media-carousel-next { right: 10px; }

@media (max-width: 768px) {
  .post-media-carousel-nav {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.28);
  }
  .post-media-carousel-prev { left: 8px; }
  .post-media-carousel-next { right: 8px; }
}
.post-image-wrap:hover .post-media-carousel-slide img {
  transform: none;
}

.post-image-wrap:hover img { transform: none; }

/* Mobile — feed: mídia largura total, sem tarjas pretas (estilo referência) */
@media (max-width: 768px) {
  .post-image-wrap {
    aspect-ratio: auto;
    max-height: none;
    background: transparent !important;
    border-radius: 0;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch;
  }

  .post-image-wrap img,
  .post-image-wrap video {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: cover;
    object-position: center center;
    display: block;
    background: transparent !important;
  }

  .post-image-wrap--carousel .post-media-carousel {
    position: relative !important;
    inset: auto !important;
    min-height: min(92vw, 520px);
    height: auto;
  }
  .post-media-carousel-track {
    height: auto;
    min-height: min(92vw, 520px);
  }
  .post-media-carousel-slide {
    min-height: min(92vw, 520px);
  }
  .post-image-wrap--carousel .post-media-carousel-slide img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: min(92vw, 520px);
    max-height: none;
    object-fit: cover;
  }
}

/* Mobile — feed: post card e mídia full-bleed (100vw) */
@media (max-width: 768px) {
  /* Contêiner principal do post sem margens laterais */
  #postsFeed .post-card {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0 !important;
  }

  /* Remove padding lateral que empurra a mídia */
  #postsFeed .post-feed-media-outer {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Mídia ocupando 100% da largura sem "centralizar" */
  #postsFeed .post-image-wrap {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
  }

  #postsFeed .post-image-wrap img,
  #postsFeed .post-image-wrap video {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }

  /* Curtidas/comentários colados abaixo do vídeo/imagem */
  #postsFeed .post-actions.post-actions--footer {
    margin-top: 2px !important;
  }
}

.post-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-image-wrap:hover .post-image-overlay { opacity: 1; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  order: 2;
  position: relative;
  z-index: 9999;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  pointer-events: auto;
  margin-top: 0;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: var(--fs-meta);
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  z-index: 150;
  background: transparent;
  backdrop-filter: none;
  border: none;
  pointer-events: auto;
  user-select: none;
}
.post-action-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  transform: none;
  border-color: transparent;
}
.post-action-btn.liked { color: #ED4956; } /* Instagram red */
.post-action-btn .icon { font-size: 18px; pointer-events: none; }

.post-action-btn.like-btn.liked .icon { animation: heartPop 0.3s ease; }
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.action-count {
  font-size: var(--fs-meta);
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}
.post-actions .spacer { flex: 1; }

.post-body {
  display: block;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  order: 3;
  position: relative;
  z-index: auto;
  background: var(--bg-elevated);
}
.post-likes {
  display: block;
  font-weight: var(--ig-feed-meta-weight, 400);
  font-size: var(--ig-feed-meta-size, 0.75rem);
  color: var(--ig-feed-meta-color, #a8a8a8);
  margin-bottom: 8px;
  line-height: var(--ig-feed-line-height, 1.4);
}
.post-caption {
  display: block;
  overflow: visible;
  font-size: var(--ig-feed-body-size, 1.05rem);
  line-height: var(--ig-feed-line-height, 1.4);
  color: #ffffff;
  font-weight: var(--ig-feed-body-weight, 450);
  margin-bottom: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.post-caption .username-tag { font-weight: var(--ig-feed-username-weight, 700); color: #ffffff; }
.post-caption .hashtag { color: #ffffff; font-weight: var(--ig-feed-username-weight, 700); cursor: pointer; text-decoration: none; }
.post-caption .hashtag:hover { text-decoration: underline; text-underline-offset: 2px; }
.post-caption .more-text {
  color: var(--ig-feed-meta-color, #a8a8a8);
  font-weight: var(--ig-feed-meta-weight, 400);
  cursor: pointer;
  font-size: var(--ig-feed-meta-size, 0.75rem);
}

.post-comments-preview {
  display: block;
  margin-bottom: 8px;
}
.comment-preview-item {
  font-size: var(--ig-feed-comment-size, 1rem);
  color: #ffffff;
  font-weight: var(--ig-feed-body-weight, 450);
  line-height: var(--ig-feed-comment-line-height, 1.5);
  margin-bottom: 4px;
}
.comment-preview-item .username-tag { color: #ffffff; font-weight: var(--ig-feed-username-weight, 700); }

.view-all-comments {
  display: block;
  color: var(--ig-feed-meta-color, #a8a8a8);
  font-weight: var(--ig-feed-meta-weight, 400);
  font-size: var(--ig-feed-meta-size, 0.75rem);
  line-height: var(--ig-feed-line-height, 1.4);
  cursor: pointer;
  margin-bottom: 8px;
}
.view-all-comments:hover { opacity: 1; text-decoration: underline; }

.post-time {
  display: block;
  color: var(--ig-feed-meta-color, #a8a8a8);
  font-weight: var(--ig-feed-meta-weight, 400);
  font-size: var(--ig-feed-meta-size, 0.75rem);
  line-height: var(--ig-feed-line-height, 1.4);
}

.comment-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  order: 3;
  position: relative;
  z-index: auto;
  background-color: var(--bg-elevated);
  background: var(--bg-elevated);
  isolation: isolate;
}

/* Coluna “legenda + input” no cartão — fluxo normal, sem empilhar por cima do texto */
.post-card-engagement {
  display: flex;
  flex-direction: column;
  width: 100%;
  order: 3;
  min-width: 0;
  background: var(--bg-elevated);
}

.post-card-engagement .post-body {
  order: 0;
  z-index: auto;
  flex: 0 1 auto;
  min-height: 0;
}

.post-card-engagement .comment-input-row {
  order: 0;
  z-index: auto;
  flex: 0 0 auto;
  margin-top: 0;
}

.comment-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: var(--ig-feed-body-size, 1.05rem);
  line-height: var(--ig-feed-line-height, 1.4);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.comment-input:focus { border-color: var(--primary); }
.comment-input::placeholder { color: rgba(255, 255, 255, 0.55); }

.comment-submit { color: #ffffff !important; font-size: 1rem; padding: 4px; }

/* Mobile feed: legenda, comentários e entrada visíveis (paridade com desktop / Instagram) */
@media (max-width: 768px) {
  #postsFeed .post-card-engagement {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    width: 100% !important;
  }

  #postsFeed .post-card-engagement .post-body,
  #postsFeed .post-card-engagement .comment-input-row {
    display: flex !important;
  }

  #postsFeed .post-card-engagement .post-body {
    flex-direction: column;
    align-items: stretch;
    padding: 0 16px 14px !important;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: none;
  }

  /* Perfil (mobile): grid estilo Instagram (3 colunas, gap fino) */
  .profile-posts-feed {
    gap: 3px !important;
    padding: 0 10px 18px !important;
  }

  .post-card {
    margin-bottom: 0 !important;
  }

  #postsFeed .post-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: var(--bg-card) !important;
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
  }

  #postsFeed .post-header {
    padding: 12px 16px !important;
  }

  /* Espaçamento tipo Connections: pouco ar entre mídia e barra de ações */
  #postsFeed .post-actions {
    padding: 8px 16px 10px !important;
    gap: 4px !important;
    border-top: none;
    margin-top: 8px;
  }

  /* Feed (mobile): iguala respiro pós-mídia (foto e vídeo) */
  #postsFeed .post-image-container {
    margin-bottom: 12px;
  }

  /* Feed (mobile): aproxima botões do vídeo (sem afetar fotos) */
  #postsFeed .post-feed-media-outer--video {
    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
  }

  #postsFeed .post-feed-media-outer--video .post-image-container {
    margin-bottom: 0px !important;
  }

  #postsFeed .post-feed-media-outer--video .post-image-wrap--video {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }

  /* Feed (mobile): garante vídeo “normal” (evita gap por sizing fixo) */
  #postsFeed .post-feed-media-outer--video video.post-main-image {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Seletor extra: vídeo dentro do wrapper (sem altura fixa / sem posicionamento absoluto) */
  #postsFeed .post-feed-media-outer--video .post-image-wrap--video video {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
  }

  /* Remove "buraco" entre vídeo e ações (somente posts de vídeo) */
  #postsFeed .post-feed-media-outer--video + .post-actions {
    margin-top: 0 !important;
  }

  #postsFeed .post-card-engagement .comment-input-row {
    padding: 10px 16px !important;
  }

  /* Mídia full-bleed (sem bordas brancas laterais) */
  #postsFeed .post-image-wrap {
    border-radius: 12px !important;
  }
  #postsFeed .post-image-wrap img,
  #postsFeed .post-image-wrap video {
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    height: auto !important;
    object-fit: cover !important;
  }
  #postsFeed .post-image-wrap--video {
    aspect-ratio: auto !important;
    max-height: none !important;
    height: auto !important;
  }
  #postsFeed .post-image-wrap--video video {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
  }
  #postsFeed .post-image-wrap--carousel .post-media-carousel-slide img {
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    height: auto !important;
  }

  .post-header {
    padding: 10px 14px !important;
  }

  .post-actions {
    padding: 10px 14px !important;
    gap: 8px !important;
  }

  .post-action-btn {
    padding: 10px 12px !important;
    font-size: var(--fs-meta) !important;
    border-radius: 12px;
  }

  .post-action-btn .icon {
    font-size: 20px !important;
  }

  .post-username,
  .post-card .post-header .post-username,
  .post-card .post-header .post-username a {
    font-size: var(--ig-feed-username-size, 1.05rem) !important;
    font-weight: var(--ig-feed-username-weight, 700) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
  }

  .post-caption,
  .post-caption-mobile {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    font-weight: var(--ig-feed-body-weight, 450) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
  }
}

/* Legenda no Mobile Feed — texto completo (sem corte por line-clamp) */
@media (max-width: 768px) {
  .post-caption-mobile {
    display: block;
    overflow: visible;
    font-size: var(--ig-feed-body-size, 1.05rem);
    color: #ffffff;
    font-weight: var(--ig-feed-body-weight, 450);
    line-height: var(--ig-feed-line-height, 1.4);
    padding: 6px 14px;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .post-caption-mobile .username-tag {
    font-weight: var(--ig-feed-username-weight, 700);
    color: #ffffff;
    margin-right: 4px;
  }
}

/* ---- Suggested Users ---- */
.suggested-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 24px;
}

/* ========================================
   CREATE POST (Feed + Perfil) — shared UI
   ======================================== */
.create-post-btn {
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.create-post-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Indicador de localização no modal de postagem */
#uploadPostLocationIndicator {
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#uploadPostLocationText {
  font-weight: 700;
}

.create-post-field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.create-post-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.create-post-input:focus {
  outline: none;
  border-color: var(--primary);
}

.upload-area {
  background: var(--bg-elevated);
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  margin: 12px 0;
  transition: var(--transition);
}
.upload-area:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}
.upload-preview-name {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-word;
}

.create-post-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-hover);
  overflow: hidden;
  border: 1px solid var(--border);
}

#createPostProgressFill,
#profilePostProgressFill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.12s ease-out;
}

@media (max-width: 480px) {
  .upload-preview-name { font-size: 14px; }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: var(--fs-subtitle);
  font-weight: 700;
  color: #ffffff !important;
}

.section-action {
  font-size: var(--fs-meta);
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 600;
}
.section-action:hover { text-decoration: underline; }

.suggested-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.suggested-user-info { flex: 1; overflow: hidden; }
.suggested-user-name {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: var(--ig-feed-username-weight, 700);
  color: var(--text-primary);
  line-height: var(--ig-feed-line-height, 1.4);
}
.suggested-user-sub {
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: var(--ig-feed-meta-weight, 400);
  color: var(--ig-feed-meta-color, #a8a8a8);
  line-height: var(--ig-feed-line-height, 1.4);
}

.btn-connect-sm,
.btn-follow-sm {
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--primary);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--primary);
  transition: var(--transition);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-connect-sm:hover,
.btn-follow-sm:hover { background: rgba(29, 155, 240, 0.12); }
.btn-connect-sm.following,
.btn-connect-sm.connected,
.btn-follow-sm.following { color: var(--text-muted); border-color: var(--border-hover); }

/* ---- Tags & Hashtags ---- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-meta);
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.tag:hover { background: var(--bg-hover); color: var(--text-primary); }
.tag-primary { background: rgba(29, 155, 240, 0.15); color: #ffffff; font-weight: 800; border-color: rgba(255, 255, 255, 0.35); }

/* ---- Feed Filters (Chips) ---- */
.feed-header {
  background: var(--bg-card);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: none;
}

.feed-filters-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.feed-filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
  flex: 1;
  min-width: 0;
}
.feed-filters::-webkit-scrollbar { display: none; }

.feed-search-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex: 0 0 auto;
}
.feed-search-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.feed-search-btn:focus-visible {
  outline: 2px solid rgba(29, 155, 240, 0.9);
  outline-offset: 2px;
}

.feed-chip {
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: var(--transition);
}
.feed-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.feed-chip.active,
.feed-chip[aria-selected="true"] {
  background: rgba(29, 155, 240, 0.12);
  border-color: rgba(29, 155, 240, 0.45);
  color: #3D56F1;
}
.feed-chip:focus-visible {
  outline: 2px solid rgba(29, 155, 240, 0.55);
  outline-offset: 2px;
}

/* Compositor rápido no topo do Feed (avatar | campo | Publicar) */
.feed-composer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

/* ---- Membros Ativos (Topo do Feed) ---- */
.active-members-wrap {
  margin-top: 12px;
  margin-bottom: 10px;
  background: #000000;
  border: 1px solid #2f3336;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: none;
}
.active-members-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.active-members-avatars {
  display: flex;
  align-items: center;
  padding-left: 2px;
  padding-right: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 15px;
}
.active-members-avatars::-webkit-scrollbar { display: none; }

/* Estilo tipo "Stories" (Instagram) */
.active-member-item {
  flex: 0 0 auto;
  text-align: center;
  width: 74px;
}
.active-member-ring {
  width: 71px;
  height: 71px;
  padding: 3px;
  border-radius: 999px;
  background: var(--stick-story-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.active-member-photo {
  width: 65px;
  height: 65px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--bg-card);
  background: var(--bg-card);
}
.active-member-name {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.1;
  color: var(--text-secondary);
  font-weight: 600;
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Perfil: link do site abaixo do nome ---- */
.profile-site-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.profile-site-link:hover { text-decoration: underline; }

/* Área de Comentários Expansível (Feed) */
.post-comments-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
  overflow: hidden;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.post-comments-panel.open {
  grid-template-rows: 1fr;
}

.post-comments-inner {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.comment-list-feed {
  max-height: 300px;
  overflow-y: auto;
  padding: 12px 16px;
  padding-bottom: calc(var(--comments-scroll-pad-bottom, 100px) + env(safe-area-inset-bottom, 0px)) !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.comment-item-feed {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-item-feed img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content-feed {
  flex: 1;
  line-height: var(--ig-feed-comment-line-height, 1.5);
  font-weight: var(--ig-feed-body-weight, 450);
}

.comment-content-feed .username {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: var(--ig-feed-username-weight, 700);
  margin-right: 6px;
  color: #ffffff;
}

.comment-content-feed .text {
  font-size: var(--ig-feed-comment-size, 1rem);
  font-weight: var(--ig-feed-body-weight, 450);
  line-height: var(--ig-feed-comment-line-height, 1.5);
  color: #ffffff;
}

.comment-meta-feed {
  font-size: 12px;
  color: var(--ig-feed-meta-color, #a8a8a8);
  margin-top: 2px;
}

.comment-input-feed {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1000;
  background-color: var(--bg-elevated);
  isolation: isolate;
}

.comment-input-feed img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.comment-input-feed input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  font-size: var(--ig-feed-comment-size, 1rem);
  outline: none;
}

.comment-input-feed .publish-btn {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 13px;
  opacity: 0.5;
  cursor: default;
}

.comment-input-feed .publish-btn.active {
  opacity: 1;
  cursor: pointer;
}

/* Perfil: lista embutida — folga para o campo de comentário abaixo do painel */
.post-card .profile-comments-panel .comment-list {
  padding-bottom: calc(var(--comments-scroll-pad-bottom, 100px) + env(safe-area-inset-bottom, 0px)) !important;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
  .post-comments-panel {
    border-top: none;
  }
}

.post-caption .read-more-btn {
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  margin-left: 4px;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.post-caption .read-more-btn:hover {
  text-decoration: underline;
  color: var(--text-secondary);
}

.post-caption.expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: none;
}

/* Opções de Comentário (Modal) */
.comment-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 8px 0;
  transition: var(--transition);
}

.comment-item img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* Evita quebra de layout com textos longos */
}

.comment-user-text {
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  padding-right: 24px; /* Espaço para o trigger de opções */
}

.comment-user-text .username {
  font-weight: 700;
  margin-right: 6px;
  color: var(--text-primary);
}

.comment-body-text {
  color: var(--text-primary);
}

.comment-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  margin-top: 2px;
}

.comment-options-trigger {
  opacity: 0.5; /* Garantir que seja visível mesmo sem hover */
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 14px;
  transition: var(--transition);
  position: absolute;
  right: 0;
  top: 4px;
  border-radius: var(--radius-full);
  z-index: 10;
}

.comment-item:hover .comment-options-trigger {
  opacity: 1;
}

/* Dropdown de Opções do Post (Topo do Modal) */
.post-options-dropdown {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 99999; /* Z-index altíssimo */
  min-width: 180px;
  display: none;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.post-options-dropdown.open {
  display: block;
}

.post-options-dropdown .dropdown-item {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

.post-options-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.post-options-dropdown .dropdown-item:hover {
  background: var(--bg-hover);
}

.post-options-dropdown .dropdown-item.danger {
  color: var(--danger);
}

.post-options-dropdown .dropdown-item i {
  width: 16px;
  text-align: center;
}

.comment-options-trigger:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.comment-dropdown {
  position: absolute;
  top: 32px;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 150px;
  display: none;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-dropdown.open {
  display: block;
}

.comment-dropdown-item {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.comment-dropdown-item:hover {
  background: var(--bg-hover);
}

.comment-dropdown-item.danger {
  color: var(--danger);
}

.comment-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.comment-dropdown-item i {
  width: 16px;
  text-align: center;
}

/* Edição de Comentário */
.comment-edit-box {
  width: 100%;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

.comment-edit-input {
  background: var(--bg-input);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  resize: vertical;
  min-height: 80px;
  outline: none;
  width: 100%;
}

.comment-edit-input:focus {
  border-color: var(--primary);
}

.comment-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.edit-action-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.edit-action-btn.cancel {
  background: transparent;
  color: var(--text-secondary);
}

.edit-action-btn.cancel:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.edit-action-btn.save {
  background: var(--primary);
  color: white;
}

.edit-action-btn.save:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}

.feed-composer-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary-color);
}

/* ========================================
   GRID DE PERFIL (ESTILO INSTAGRAM)
   ======================================== */
#profilePostsFeed {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: 935px !important;
  margin: 18px auto 28px !important;
  padding: 0 12px !important;
}

.profile-post-item {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  background: var(--bg-elevated) !important;
}

.profile-post-item img,
.profile-post-item video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: transform 0.3s ease !important;
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
}

.profile-post-item.text-only-post .profile-post-text-only {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px !important;
  text-align: center !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: var(--text-secondary) !important;
  overflow: hidden !important;
  word-break: break-word !important;
  z-index: 1 !important;
}

.profile-post-item.text-only-post .profile-post-text-only span {
  display: -webkit-box !important;
  -webkit-line-clamp: 6 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* Reforço: grade do perfil (#profilePostsFeed) em telas estreitas */
#profilePostsFeed .profile-post-item {
  min-width: 0 !important;
  min-height: 0 !important;
}

#profilePostsFeed .profile-post-item img,
#profilePostsFeed .profile-post-item video {
  object-fit: cover !important;
  object-position: center !important;
}

.profile-post-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  opacity: 0 !important;
  transition: opacity 0.2s ease !important;
  color: white !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  z-index: 2 !important;
}

.profile-post-item:hover .profile-post-overlay {
  opacity: 1 !important;
}

/* Desktop: centraliza e suaviza o botão de play nas miniaturas de vídeo (Perfil/Reels grid) */
@media (min-width: 1024px) {
  /* Contêiner do vídeo/miniatura */
  #profilePostsFeed .profile-post-item {
    position: relative;
  }

  /* Não escurecer a miniatura inteira; deixa só o "botão" sutil */
  #profilePostsFeed .profile-post-overlay {
    background: transparent !important;
  }

  /* Elemento do "botão" (ícone + label) centralizado */
  #profilePostsFeed .profile-post-overlay-item {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10;

    display: grid;
    place-items: center;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 999px;

    background: transparent !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    transition: opacity 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  }

  /* Ícone do play (Font Awesome) */
  #profilePostsFeed .profile-post-overlay-item .fa-play {
    font-size: 3rem;
    line-height: 1;
  }

  /* Hover (no Desktop o hover vem do card, não do overlay) */
  #profilePostsFeed .profile-post-item:hover .profile-post-overlay-item {
    color: rgba(255, 255, 255, 1) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
  }
}

.profile-post-item:hover img,
.profile-post-item:hover video {
  transform: scale(1.05) !important;
}

/* Cabeçalho do Perfil - Restauração */
.profile-header {
  max-width: 935px;
  margin: 0 auto 44px;
  display: flex;
  align-items: flex-start;
  gap: 100px;
  padding: 0 20px;
}

.profile-header-avatar {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
}

.profile-header-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-info-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-stats {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
}

.profile-stats li {
  font-size: 16px;
}

.profile-stats li strong {
  font-weight: 700;
  margin-right: 4px;
}

@media (max-width: 768px) {
  /* Perfil mobile — grade estilo RedNote: 2 colunas, cantos 12px, sombra leve */
  #profilePostsFeed {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
    padding: 0 10px 18px !important;
    margin: 0 auto !important;
    max-width: 100% !important;
  }

  #profilePostsFeed .profile-post-item {
    border-radius: 2px !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .profile-header {
    flex-direction: column;
    gap: 30px;
    align-items: center;
    text-align: center;
  }

  .profile-info-top {
    flex-direction: column;
  }
}

/* Esconder qualquer card residual no perfil */
#profilePostsFeed .post-card {
  display: none !important;
}

/* ========================================
   MODAL PERFIL (ESTILO INSTAGRAM)
   ======================================== */
.modal-perfil-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh; /* Altura dinâmica para mobile */
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(8px);
}

.modal-perfil-backdrop.open {
  display: flex;
}

.modal-perfil-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10001;
  padding: 10px;
  transition: var(--transition);
}

.modal-perfil-close:hover {
  transform: scale(1.1);
}

.modal-perfil-container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  height: 100%;
  max-height: 850px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* Desktop: modal de post/vídeo mais harmônico (não ocupa "tudo") */
@media (min-width: 1024px) {
  .modal-perfil-backdrop.open {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
  }

  .modal-perfil-container {
    width: auto;
    max-width: 70% !important;
    max-height: 70vh !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  }

  .modal-perfil-left img,
  .modal-perfil-left video {
    width: 100% !important;
    height: auto !important;
    max-height: 70vh !important; /* nunca “estoura” a viewport no Desktop */
    object-fit: contain !important;
    object-position: center !important;
  }
}

/* Coluna Esquerda: Imagem */
.modal-perfil-left {
  flex: 1.2;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.modal-perfil-left img,
.modal-perfil-left video {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.modal-perfil-left .modal-perfil-media-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-perfil-left .post-image-wrap--carousel {
  aspect-ratio: auto;
  max-height: min(92vh, 920px);
  width: 100%;
}
.modal-perfil-left .post-image-wrap--carousel .post-media-carousel {
  position: relative;
  width: 100%;
  max-height: min(92vh, 920px);
}
.modal-perfil-left .post-media-carousel-track {
  max-height: min(92vh, 920px);
}
.modal-perfil-left .post-media-carousel-slide img {
  object-fit: contain;
}

.modal-perfil-left .modal-perfil-media-text-only.text-only-post {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: min(92vh, 920px);
  padding: 28px 32px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-primary);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.modal-perfil-text-only-placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Coluna Direita: Conteúdo */
.modal-perfil-right {
  flex: 0.8;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  min-width: 350px;
}

/* Header do Modal */
.modal-perfil-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-perfil-header .user-info,
.post-description .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-perfil-header .user-info-text,
.post-description .user-info-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.modal-perfil-header .user-at,
.post-description .user-at {
  display: block;
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: 400;
  line-height: 1.3;
  color: #71767b;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-perfil-header img,
.post-description img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.modal-perfil-header .username,
.post-description .username {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: 800;
  color: #ffffff;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-options-btn {
  color: var(--text-primary);
  font-size: 14px;
}

/* Conteúdo: Descrição e Comentários */
.modal-perfil-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
}

.post-description {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.caption-text {
  font-size: var(--ig-feed-body-size, 1.05rem);
  line-height: var(--ig-feed-line-height, 1.4);
  color: #ffffff;
  margin-left: 44px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-user-text {
  font-size: var(--ig-feed-comment-size, 1rem);
  line-height: var(--ig-feed-comment-line-height, 1.5);
}

.comment-user-text .username {
  font-weight: 700;
  margin-right: 6px;
}

.comment-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* Rodapé do Modal */
.modal-perfil-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.left-actions {
  display: flex;
  gap: 16px;
}

.action-btn {
  font-size: 24px;
  color: var(--text-primary);
  transition: var(--transition);
}

.action-btn:hover {
  color: var(--text-secondary);
}

.likes-count {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.post-date {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.comment-input-area {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-input-area i {
  font-size: 24px;
}

.comment-input-area input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--ig-feed-comment-size, 1rem);
  outline: none;
}

.publish-btn {
  color: #ffffff !important;
  font-weight: 800;
  font-size: 14px;
  opacity: 0.5;
  cursor: default;
}

.publish-btn.active {
  opacity: 1;
  cursor: pointer;
}

/* Mobile (≤768px): coluna — classes .modal-perfil-container / .modal-perfil-left / .modal-perfil-right */
@media (max-width: 768px) {
  .modal-perfil-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    max-height: 100dvh;
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-elevated);
  }

  .modal-perfil-left {
    width: 100%;
    max-height: 55vh;
    flex: none;
    min-height: 0;
    overflow: hidden;
    background: transparent;
  }

  .modal-perfil-left img,
  .modal-perfil-left video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .modal-perfil-right {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
  }

  .modal-perfil-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-elevated);
  }

  .modal-perfil-content {
    flex: 1;
    min-height: 0;
    overflow-y: visible;
  }

  .modal-perfil-footer {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 12px);
  }

  .modal-perfil-backdrop {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
  }

  .modal-perfil-close {
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .modal-perfil-container {
    max-width: 100%;
  }
}

.feed-composer-input {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  line-height: 1.35;
}

.feed-composer-input:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.feed-composer-publish {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  border-radius: var(--radius-full);
  background: var(--primary-color, #3D56F1) !important;
  color: #ffffff !important;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none;
  letter-spacing: 0.02em;
}

.feed-composer-publish:hover {
  opacity: 0.96;
  transform: none;
}

@media (max-width: 600px) {
  .feed-composer {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .feed-composer-avatar {
    width: 44px;
    height: 44px;
  }

  .feed-composer-input {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    padding: 12px 16px;
  }

  .feed-composer-publish {
    flex: 1 1 100%;
    margin-top: 4px;
    padding: 12px 16px;
    min-height: 44px;
  }
}

/* ---- Stats ---- */
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-value { font-size: 18px; font-weight: 800; color: #ffffff; }
.stat-label { font-size: var(--fs-meta); color: #ffffff; font-weight: 700; }

/* ---- Modals ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-lg);
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { color: var(--text-muted); font-size: 20px; padding: 4px; border-radius: 50%; transition: var(--transition); }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: 20px; }

/* ========================================
   Bottom Sheet de Comentários (Mobile)
   ======================================== */
.comment-sheet {
  display: none;
}

@media (max-width: 768px) {
  .comment-sheet {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 75vh;
    max-height: 100dvh;
    z-index: 9999;
    background: var(--bg-elevated);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    min-height: 0;
    transform: translateY(100%);
    transition: transform 220ms ease;
    will-change: transform;
    /* Só clip horizontal — scroll vertical fica na lista (evita “sumir” sob o input) */
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .comment-sheet.open {
    transform: translateY(0);
  }

  .comment-sheet__header {
    position: relative;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
  }

  .comment-sheet__handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
  }

  .comment-sheet__title {
    justify-self: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    padding-top: 8px;
  }

  .comment-sheet__close {
    justify-self: end;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: transparent;
  }

  .comment-sheet__list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 14px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-elevated);
  }

  .comment-sheet__input {
    flex: 0 0 auto;
    background-color: var(--bg-elevated);
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    isolation: isolate;
  }

  .comment-sheet__input i {
    color: var(--text-secondary);
    font-size: 20px;
  }

  .comment-sheet__input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: var(--ig-feed-comment-size, 1rem);
    color: var(--text-primary);
    min-width: 0;
  }

  .comment-sheet__input input::placeholder {
    color: rgba(255, 255, 255, 0.55);
  }

  .comment-sheet__input button {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    opacity: 0.6;
  }

  .comment-sheet__input button.active {
    opacity: 1;
  }
}

/* ========================================
   MOBILE — Comment Sheet Mobile (perfil / reutilização)
   ======================================== */
@media (max-width: 768px) {
  /* Acima do header mobile (250) e da bottom-nav (99); abaixo do modal IA (--z-ai-modal) */
  .comment-sheet-backdrop-mobile {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.55) !important;
    z-index: 10050 !important;
    display: none !important;
    opacity: 0 !important;
    transition: opacity 200ms ease !important;
    pointer-events: none !important;
  }

  .comment-sheet-backdrop-mobile.open {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .comment-sheet-mobile {
    position: fixed !important;
    left: 0 !important;
    bottom: 0 !important;
    height: min(92dvh, 720px) !important;
    max-height: 100dvh !important;
    width: 100% !important;
    background: var(--stick-comments-canvas, var(--bg-card)) !important;
    color: #ffffff !important;
    z-index: 10060 !important;
    display: none !important;
    flex-direction: column !important;
    min-height: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3) !important;
    transform: translateY(100%) !important;
    transition: transform 220ms ease !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  .comment-sheet-mobile.open {
    display: flex !important;
    transform: translateY(0) !important;
  }

  .comment-sheet-mobile__header {
    flex: 0 0 auto !important;
    padding-top: 10px !important;
    padding-bottom: 8px !important;
    padding-left: max(14px, calc(10px + env(safe-area-inset-left, 0px))) !important;
    padding-right: max(14px, calc(10px + env(safe-area-inset-right, 0px))) !important;
    border-bottom: 1px solid var(--border) !important;
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    gap: 10px !important;
    background: var(--bg-elevated) !important;
  }

  .comment-sheet-mobile__handle {
    position: absolute !important;
    top: 8px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 42px !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: var(--border) !important;
  }

  .comment-sheet-mobile__title {
    justify-self: center !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--text-secondary) !important;
    padding-top: 8px !important;
  }

  .comment-sheet-mobile__close {
    justify-self: end !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
  }

  .comment-sheet-mobile .comment-list {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-top: 14px !important;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: max(18px, calc(14px + env(safe-area-inset-left, 0px))) !important;
    padding-right: max(18px, calc(14px + env(safe-area-inset-right, 0px))) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    background: var(--bg-elevated) !important;
  }

  /* Um único scroll: o pai (.comment-list); o host do modal só cresce com o conteúdo */
  .comment-sheet-mobile .comment-list > #modal-perfil-comments-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .comment-sheet-mobile__input {
    flex: 0 0 auto !important;
    background-color: var(--bg-elevated) !important;
    background: var(--bg-elevated) !important;
    border-top: 1px solid var(--border) !important;
    padding-top: 12px !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important;
    padding-left: max(14px, calc(10px + env(safe-area-inset-left, 0px))) !important;
    padding-right: max(14px, calc(10px + env(safe-area-inset-right, 0px))) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    isolation: isolate !important;
  }

  .comment-sheet-mobile__input i {
    color: var(--text-secondary) !important;
    font-size: 20px !important;
  }

  .comment-sheet-mobile__input input {
    flex: 1 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: var(--ig-feed-comment-size, 1rem) !important;
    color: #ffffff !important;
    min-width: 0 !important;
  }

  .comment-sheet-mobile__input input::placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
  }

  .comment-sheet-mobile__input button {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    opacity: 0.6 !important;
  }

  .comment-sheet-mobile__input button.active {
    opacity: 1 !important;
  }

  /* Com sheet aberta no feed: o scroll fica na lista interna, não no documento */
  body.stick-comment-sheet-open {
    overflow: hidden;
  }
}

/* ========================================
   PERFIL MOBILE — Post em 2 etapas (viewer + sheet de comentários)
   ======================================== */
.stick-modal-comments-host {
  min-height: 0;
  background: var(--stick-comments-canvas, var(--bg-card));
  color: #ffffff;
}

/* Overlay full-screen de comentários (perfil mobile): antes usava fundo branco inline no JS */
.stick-profile-comments-overlay {
  position: fixed;
  inset: 0;
  z-index: 100750;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  font-family: inherit;
  background: var(--stick-comments-canvas, var(--bg-card));
  color: #ffffff;
}

.stick-profile-comments-overlay__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 48px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: relative;
}

.stick-profile-comments-overlay__title {
  margin: 0;
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
}

.stick-profile-comments-overlay__close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #ffffff;
  border-radius: var(--radius-full);
}

.stick-profile-comments-overlay__close:hover {
  background: var(--bg-hover);
}

.stick-profile-comments-overlay__main {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stick-profile-comments-overlay__list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.stick-profile-comments-overlay__input-row {
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-elevated);
  background: var(--bg-elevated);
  isolation: isolate;
}

.stick-profile-comments-overlay__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--ig-feed-comment-size, 1rem);
  color: #ffffff;
  min-width: 0;
  font-family: inherit;
}

.stick-profile-comments-overlay__input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.stick-profile-comments-overlay__send {
  border: none;
  background: transparent;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  opacity: 0.45;
  cursor: default;
}

.stick-profile-comments-overlay__send:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}

.stick-profile-comments-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  padding: 20px 0;
  text-align: center;
}

.stick-profile-view-comments-btn {
  display: none;
  width: calc(100% - 32px);
  margin: 0 auto 10px;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
}

.stick-profile-view-comments-btn:active {
  opacity: 0.75;
}

@media (max-width: 768px) {
  #perfil-post-modal[data-stick-open-context^="profile"] .stick-profile-view-comments-btn {
    display: block;
  }

  #perfil-post-modal[data-stick-open-context^="profile"] #stick-modal-comments-host,
  #perfil-post-modal[data-stick-open-context^="profile"] .comment-input-area {
    display: none !important;
  }

}

@media (min-width: 769px) {
  #perfil-post-modal[data-stick-open-context^="profile"] .stick-profile-view-comments-btn {
    display: none !important;
  }

  #perfil-post-modal[data-stick-open-context^="profile"] #stick-modal-comments-host {
    display: block !important;
  }

  #perfil-post-modal[data-stick-open-context^="profile"] .comment-input-area {
    display: flex !important;
  }
}

/* Perfil mobile: imagem maior no viewer (sem comentários no 1º passo); sheet de comentários em tela cheia */
@media (max-width: 768px) {
  body.stick-page-profile #perfil-post-modal[data-stick-open-context^="profile"] .modal-perfil-left {
    max-height: min(70vh, 620px);
    min-height: 44vh;
  }

  body.stick-page-profile .comment-sheet-mobile.open {
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   HARD RESET (Mobile) — sheet de comentários acima do bottom-nav
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .comment-sheet-backdrop-mobile.open {
    z-index: 99998 !important;
  }

  .comment-sheet-mobile.open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    z-index: 99999 !important;
    background: #1a1a1a !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .comment-sheet-mobile__header,
  .comment-sheet-mobile__input {
    position: relative !important;
  }
}

/* ---- Post Modal ---- */
#post-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#post-modal.open {
  display: flex;
}

.post-modal-content {
  display: flex;
  flex-direction: row;
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  background: var(--bg-elevated);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.post-modal-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
}

.post-modal-image img,
.post-modal-image video {
  max-width: 100%;
  width: 100%;
  max-height: 90vh;
  height: auto;
  object-fit: cover;
  display: block;
}

.post-modal-comments {
  flex: 0 0 400px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
}

.post-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.post-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.post-modal-close:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.post-modal-comments-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-modal-input {
  flex: 0 0 auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  background-color: var(--bg-card);
  background: var(--bg-card);
  isolation: isolate;
}

.post-modal-input input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: var(--ig-feed-comment-size, 1rem);
  color: var(--text-primary);
  outline: none;
}

.post-modal-input input:focus {
  border-color: var(--primary);
}

.post-modal-input button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-gradient);
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.post-modal-input button:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .post-modal-content {
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .post-modal-comments {
    border-left: none;
    border-top: 1px solid var(--border);
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    display: flex;
    flex-direction: column;
  }

  .post-modal-image {
    max-height: 50vh;
    flex: none;
    background: transparent !important;
    align-items: stretch;
    padding: 0;
  }

  .post-modal-image img,
  .post-modal-image video {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 50vh;
    object-fit: cover;
    background: transparent !important;
  }

  .post-modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-card);
  }

  .post-modal-input {
    flex: 0 0 auto;
    background-color: var(--bg-card);
    background: var(--bg-card);
    padding-bottom: env(safe-area-inset-bottom, 16px);
    isolation: isolate;
  }
}
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item { display: flex; gap: 10px; min-width: 0; }
.comment-content { flex: 1; min-width: 0; max-width: 100%; overflow: hidden; }
.comment-item .comment-line {
  font-size: var(--ig-feed-comment-size, 1rem);
  line-height: var(--ig-feed-comment-line-height, 1.5);
  color: #ffffff;
  font-weight: var(--ig-feed-body-weight, 450);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.comment-item .comment-line .comment-author {
  margin-right: 0.35em;
}
.comment-author {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: var(--ig-feed-username-weight, 700);
  line-height: var(--ig-feed-line-height, 1.4);
  color: #ffffff;
}
.comment-text {
  font-size: var(--ig-feed-comment-size, 1rem);
  font-weight: var(--ig-feed-body-weight, 450);
  color: #ffffff;
  line-height: var(--ig-feed-comment-line-height, 1.5);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.comment-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: var(--ig-feed-meta-weight, 400);
  color: var(--ig-feed-meta-color, #a8a8a8);
  line-height: var(--ig-feed-line-height, 1.4);
}

/* Segurança extra: qualquer texto de comentário deve quebrar linha e não estourar layout */
.comment-text,
.post-comment-text,
.comment-body,
.comment-content-text,
.reply-text {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment-row,
.comment-main,
.comment-right,
.reply-item,
.reply-main {
  min-width: 0;
}
.comment-time {
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: var(--ig-feed-meta-weight, 400);
  color: var(--ig-feed-meta-color, #a8a8a8);
  line-height: var(--ig-feed-line-height, 1.4);
}
.comment-like-btn {
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: var(--ig-feed-meta-weight, 400);
  color: var(--ig-feed-meta-color, #a8a8a8);
  cursor: pointer;
  line-height: var(--ig-feed-line-height, 1.4);
}
.comment-like-btn:hover { color: var(--primary); }

/* ---- Mobile: reforço tipografia (rem + variáveis --ig-feed-*) ---- */
@media (max-width: 768px) {
  .post-username {
    font-size: var(--ig-feed-username-size, 1.05rem) !important;
    font-weight: var(--ig-feed-username-weight, 700) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
  }

  .post-handle {
    font-size: var(--ig-feed-meta-size, 0.75rem) !important;
    color: var(--ig-feed-meta-color, #a8a8a8) !important;
    font-weight: var(--ig-feed-meta-weight, 400) !important;
  }

  .post-location,
  .post-location span {
    font-size: var(--ig-feed-meta-size, 0.75rem) !important;
    color: var(--ig-feed-meta-color, #a8a8a8) !important;
    font-weight: var(--ig-feed-meta-weight, 400) !important;
  }

  .post-caption {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    color: #ffffff !important;
    font-weight: var(--ig-feed-body-weight, 450) !important;
  }

  .post-caption-mobile {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    color: #ffffff !important;
    font-weight: var(--ig-feed-body-weight, 450) !important;
  }

  .post-time {
    font-size: var(--ig-feed-meta-size, 0.75rem) !important;
    color: var(--ig-feed-meta-color, #a8a8a8) !important;
    font-weight: var(--ig-feed-meta-weight, 400) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
  }

  .comment-author {
    font-size: var(--ig-feed-username-size, 1.05rem) !important;
    font-weight: var(--ig-feed-username-weight, 700) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    color: #ffffff !important;
  }

  .comment-text {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    font-weight: var(--ig-feed-body-weight, 450) !important;
    color: #ffffff !important;
  }

  .comment-time {
    font-size: var(--ig-feed-meta-size, 0.75rem) !important;
    color: var(--ig-feed-meta-color, #a8a8a8) !important;
    font-weight: var(--ig-feed-meta-weight, 400) !important;
  }

  .comment-item {
    gap: 12px !important;
    padding: 8px 0 !important;
  }

  .comment-content {
    padding-left: 4px !important;
  }

  .comment-input {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    padding: 10px 16px !important;
  }

  .comment-input::placeholder {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
  }

  .post-modal-comments-list {
    padding: 16px 16px !important;
  }

  .post-modal-input input {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    padding: 12px 16px !important;
  }

  .post-action-btn {
    font-size: 12px !important;
  }

  .action-count {
    font-size: var(--ig-feed-meta-size, 0.75rem) !important;
    color: var(--ig-feed-meta-color, #a8a8a8) !important;
    font-weight: var(--ig-feed-meta-weight, 400) !important;
  }

  .post-likes {
    font-size: var(--ig-feed-meta-size, 0.75rem) !important;
    font-weight: var(--ig-feed-meta-weight, 400) !important;
    color: var(--ig-feed-meta-color, #a8a8a8) !important;
  }

  .view-all-comments {
    font-size: var(--ig-feed-meta-size, 0.75rem) !important;
    color: var(--ig-feed-meta-color, #a8a8a8) !important;
    font-weight: var(--ig-feed-meta-weight, 400) !important;
  }

  .post-modal-header {
    padding: 12px 16px !important;
  }

  .post-modal-comments-list {
    gap: 16px !important;
  }

  .post-modal-input {
    padding: 12px 16px !important;
  }

  .modal-body .comment-author {
    font-size: var(--ig-feed-username-size, 1.05rem) !important;
    font-weight: var(--ig-feed-username-weight, 700) !important;
    color: #ffffff !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
  }

  .modal-body .comment-text {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    font-weight: var(--ig-feed-body-weight, 450) !important;
    color: #ffffff !important;
  }

  .modal-body .comment-item {
    gap: 12px !important;
    padding: 8px 0 !important;
  }

  .modal-body .comment-content {
    padding-left: 4px !important;
  }

  .modal-body .comment-input {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
    padding: 10px 16px !important;
  }

  .modal-body .comment-input::placeholder {
    font-size: var(--ig-feed-body-size, 1.05rem) !important;
  }
}

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 769px) {
  .toast-container { bottom: 24px; }
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: var(--fs-meta);
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  white-space: nowrap;
}
@keyframes toastIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; } }

/* ---- Search Bar ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: var(--fs-subtitle);
  color: var(--text-primary);
}
.search-bar input::placeholder { color: rgba(255, 255, 255, 0.55); }
.search-bar .icon { color: var(--text-muted); font-size: 16px; }

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ---- Loading / Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: var(--fs-micro);
  font-weight: 800;
  color: #ffffff !important;
}
.badge-primary { background: rgba(29, 155, 240, 0.22); color: #ffffff !important; }
.badge-purple { background: rgba(29, 155, 240, 0.2); color: #ffffff !important; }
.badge-gold { background: rgba(245, 158, 11, 0.2); color: #78350f !important; }
.badge-green { background: rgba(16, 185, 129, 0.22); color: #065f46 !important; }

/* Pills / métricas (ex.: “Total visitas”) — texto branco nítido sobre fundo escuro */
.visit-badge,
.card-label,
[class*="visit-badge"],
[class*="card-label"] {
  color: #ffffff !important;
}

.text-white {
  color: #ffffff !important;
}

/* ---- Online Indicator ---- */
.online-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  position: absolute;
  bottom: 1px;
  right: 1px;
}

/* ---- Gradient Text ---- */
.gradient-text {
  background: var(--bg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   PAGES
   ======================================== */

/* ---- Feed Page ---- */
.feed-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: var(--feed-max-width);
  margin: 0 auto;
  padding: 24px 20px;
  width: 100%;
}

.feed-main { min-width: 0; }

/* Desktop: feed central + coluna direita de sugestões (como nas referências) */
@media (min-width: 1000px) {
  .feed-layout.feed-layout-with-suggestions {
    grid-template-columns: minmax(0, var(--feed-main-max)) minmax(0, var(--feed-side-max));
    justify-content: center;
    align-items: start;
  }

  .feed-layout.feed-layout-with-suggestions .feed-main {
    min-width: 0;
  }

  .feed-layout.feed-layout-with-suggestions .feed-sidebar-wrap {
    position: sticky;
    top: 18px;
    align-self: start;
  }
}

/* ---- Profile Page ---- */
.profile-cover {
  position: relative;
  height: 220px;
  background: #000000;
  overflow: hidden;
}

.profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px 20px;
  margin-top: -1px;
}

.profile-avatar-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -54px;
  margin-bottom: 16px;
}

.profile-avatar-ring {
  width: 156px;
  height: 156px;
  border-radius: var(--radius-full);
  background: var(--primary-color);
  padding: 3px;
  flex-shrink: 0;
  cursor: pointer;
}
.profile-avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--bg-card);
}

.profile-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
}

.profile-info-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.profile-name {
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: 700;
  color: #ffffff !important;
}

.profile-handle {
  font-size: var(--fs-subtitle);
  color: var(--text-muted);
  font-weight: 400;
}

.profile-verified {
  color: var(--primary-color);
  font-size: 16px;
}

.profile-bio {
  font-size: var(--fs-body);
  color: #ffffff !important;
  font-weight: 400;
  line-height: 1.6;
  max-width: 460px;
  margin-bottom: 12px;
}

.profile-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.profile-link { font-size: var(--fs-meta); color: #ffffff; font-weight: 700; display:flex; align-items:center; gap:4px; }
.profile-link:hover { text-decoration: underline; }

.profile-stats {
  display: flex;
  gap: 28px;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.profile-tab {
  padding: 14px 20px;
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  border-bottom: 2px solid transparent;
}

.profile-tab:hover { color: var(--text-primary); }
.profile-tab.active { color: var(--text-primary); border-bottom-color: var(--primary); }

/* ---- Photo Grid ---- */
.photo-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 3px;
}

.photo-grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-elevated);
  min-height: 0;
  min-width: 0;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  transition: var(--transition-slow);
}

.photo-grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: var(--transition);
}
.photo-grid-item:hover .photo-grid-overlay { opacity: 1; }
.photo-grid-item:hover img { transform: scale(1.07); }

.grid-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-subtitle);
  font-weight: 700;
  color: white;
}

.photo-grid-item.featured {
  grid-column: span 2 !important;
  grid-row: span 2 !important;
}

/* ---- Explore Page ---- */
/* Sugestões / resultados: lista vertical; cada linha = avatar | nome/bio | Conectar */
.explore-user-suggestions #user-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.explore-user-suggestions #user-suggestions-list > p,
.explore-user-suggestions #user-suggestions-list > div:not(.feed-suggested-user) {
  flex: none;
  width: 100%;
}

/* Mensagens inline (loading / vazio / erro) — lista vertical limpa no Explorar */
.user-suggestions-msg {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  padding: 10px 0;
  width: 100%;
  box-sizing: border-box;
}

.user-suggestions-msg--muted {
  color: var(--text-muted);
}

.user-suggestions-msg--error {
  color: var(--danger);
}

.explore-user-suggestions #user-suggestions-list > .feed-suggested-user {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin: 0;
  min-width: 0;
  text-align: left;
  box-sizing: border-box;
}

.explore-user-suggestions #user-suggestions-list > .feed-suggested-user:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.explore-user-suggestions .feed-suggested-user .feed-suggested-avatar-link {
  flex-shrink: 0;
}

.explore-user-suggestions .feed-suggested-user .suggested-user-info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-align: left;
}

.explore-user-suggestions .feed-suggested-user .suggested-user-name {
  word-break: break-word;
}

.explore-user-suggestions .feed-suggested-user .suggested-user-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.explore-user-suggestions .feed-suggested-user .btn-connect-sm {
  flex-shrink: 0;
  align-self: center;
  width: auto;
  max-width: none;
  margin-left: auto;
}

.explore-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 3px;
}

.explore-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-elevated);
}
.explore-item.tall { aspect-ratio: 1/2; grid-row: span 2; }
.explore-item.wide { aspect-ratio: 2/1; grid-column: span 2; }

.explore-item img { width:100%; height:100%; object-fit:cover; transition: var(--transition-slow); }
.explore-item:hover img { transform: scale(1.05); }

.explore-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  transition: var(--transition);
}
.explore-item:hover .explore-overlay { opacity: 1; }

/* ---- Messages Page ---- */
.messages-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 100vh;
}

.conversations-panel {
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conversations-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.conversations-title {
  font-size: clamp(16px, 4.3vw, 18px);
  font-weight: 700;
  margin-bottom: 12px;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.conversation-item:hover, .conversation-item.active { background: var(--bg-hover); }

.conv-avatar { position: relative; flex-shrink: 0; }
.conv-avatar img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }

.conv-info { flex: 1; overflow: hidden; }
.conv-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; display:flex; justify-content:space-between; }
.conv-name { font-size: var(--fs-subtitle); font-weight: 700; margin-bottom: 2px; display:flex; justify-content:space-between; line-height: var(--lh-tight); }
.conv-time { font-size: var(--fs-micro); color: var(--text-muted); }
.conv-preview { font-size: var(--fs-meta); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-unread { font-weight: 700; color: var(--text-primary); }

.unread-badge {
  background: var(--primary);
  color: white;
  font-size: var(--fs-micro);
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  overflow: hidden;
}

.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
}

.chat-user-info { flex: 1; }
.chat-username { font-size: 15px; font-weight: 700; }
.chat-username { font-size: clamp(15px, 4.0vw, 16px); font-weight: 800; line-height: var(--lh-tight); }
.chat-status { font-size: var(--fs-meta); color: var(--success); display:flex; align-items:center; gap:5px; line-height: var(--lh-tight); }
.online-indicator { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }

.chat-actions { display: flex; gap: 4px; }
.chat-action-btn { width: 36px; height: 36px; display:flex; align-items:center; justify-content:center; border-radius:50%; color:var(--text-secondary); font-size:18px; transition:var(--transition); }
.chat-action-btn:hover { background:var(--bg-hover); color:var(--text-primary); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-bubble {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.message-bubble.sent { align-self: flex-end; align-items: flex-end; }
.message-bubble.received { align-self: flex-start; align-items: flex-start; }

.bubble-content {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
}
.sent .bubble-content {
  background: var(--bg-gradient);
  color: white;
  border-bottom-right-radius: 4px;
}
.received .bubble-content {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.bubble-time {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  padding: 0 4px;
}

.chat-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: var(--fs-body);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: rgba(255, 255, 255, 0.55); }

.send-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  flex-shrink: 0;
}
.send-btn:hover { transform: scale(1.08); }

/* ---- Notifications ---- */
.notifications-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px;
}

.notification-group-label {
  font-size: var(--fs-meta);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 0 10px;
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.notification-item:hover { background: var(--bg-hover); }
.notification-item.unread::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.notif-avatar { position: relative; flex-shrink: 0; }
.notif-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.notif-type-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-micro);
  border: 2px solid var(--bg-base);
}
.notif-icon-like { background: var(--primary); }
.notif-icon-comment { background: var(--secondary); }
.notif-icon-follow { background: var(--success); }
.notif-icon-mention { background: var(--accent); }

.notif-content { flex: 1; min-width: 0; }
.notif-text { font-size: var(--fs-body); line-height: var(--lh-snug); }
.notif-text strong { font-weight: 700; }
.notif-time { font-size: var(--fs-meta); color: var(--text-muted); margin-top: 3px; }

.notif-thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.notif-action-btn { flex-shrink: 0; }

/* ---- Groups Page ---- */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.group-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}
.group-card:hover {
  border-color: var(--border-hover);
  transform: none;
  box-shadow: none;
}

.group-cover {
  height: 110px;
  background: #000000;
  position: relative;
  overflow: hidden;
}
.group-cover img { width:100%; height:100%; object-fit:cover; }
.group-cover-overlay { position:absolute; inset:0; background:linear-gradient(135deg, rgba(29, 155, 240, 0.2), rgba(0, 0, 0, 0.35)); }

.group-card-body { padding: 14px; }
.group-name { font-size: clamp(15px, 4.0vw, 16px); font-weight: 800; margin-bottom: 4px; line-height: var(--lh-tight); }
.group-desc { font-size: var(--fs-meta); color: var(--text-secondary); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: var(--lh-snug); }
.group-meta { display: flex; align-items: center; justify-content: space-between; }
.group-members { font-size: var(--fs-meta); color: var(--text-muted); display:flex; align-items:center; gap:4px; }

/* ---- Page Wrapper ---- */
.page-wrapper {
  padding: 24px 20px;
  max-width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title {
  font-size: clamp(18px, 5.2vw, 22px);
  font-weight: 800;
  color: #ffffff !important;
}

/* ---- Theme Selector ---- */
.theme-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  border: 3px solid transparent;
}
.theme-option:hover { transform: scale(1.1); }
.theme-option.active { border-color: white; }
.theme-option::after { content:''; position:absolute; inset:2px; border-radius:50%; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1100px) {
  .feed-layout { grid-template-columns: 1fr; }
  .feed-sidebar { display: none; }
}

@media (max-width: 900px) {
  /**
   * Mensagens no mobile: lista + abas (incl. Solicitações) ocupam a tela inteira.
   * O painel de chat vazio não pode cobrir a lista — antes .conversations-panel ficava display:none.
   */
  .messages-page .messages-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
  }
  .messages-page .conversations-panel {
    display: flex !important;
    flex: 1;
    min-height: 0;
    width: 100%;
    border-right: none;
    position: relative;
    inset: auto;
    z-index: auto;
  }
  .messages-page .conversations-panel.show {
    position: relative;
    inset: auto;
  }
  .messages-page .chat-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    min-height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
  }
  .bottom-nav:not(.bottom-nav--five):not(.bottom-nav--six) {
    display: flex;
  }
  .bottom-nav.bottom-nav--five {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: flex-end;
    justify-items: center;
    justify-content: stretch;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    column-gap: 6px;
  }
  .bottom-nav.bottom-nav--six {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: flex-end;
    justify-items: center;
    justify-content: stretch;
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    column-gap: 2px;
  }
  .bottom-nav.bottom-nav--six .bottom-nav-item {
    max-width: none;
    padding-left: 2px;
    padding-right: 2px;
  }
  .main-content { margin-left: 0; padding-top: var(--header-height); padding-bottom: var(--bottom-nav-height); }
  .bottom-nav-item {
    min-height: 52px;
    padding: 10px 8px;
    max-width: 64px;
  }
  .photo-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .explore-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .profile-posts-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .profile-stats { gap: 16px; }
  .profile-header { padding: 0 14px 16px; }
  .profile-cover { height: 160px; }

  /* Feed: padding lateral um pouco menor; regra com sugestões por último para não ser sobrescrita */
  .feed-layout {
    padding: 16px 14px;
  }
  .feed-layout.feed-layout-with-suggestions {
    padding: 16px 14px;
  }

  /* Membros ativos + compositor alinhados à mesma faixa horizontal do carrossel (bleed até a borda do feed) */
  .feed-layout.feed-layout-with-suggestions .feed-main > .feed-header {
    padding-left: 0;
    padding-right: 0;
    padding-top: 10px;
    padding-bottom: 4px;
  }
  .feed-layout.feed-layout-with-suggestions .feed-main > .feed-header > .active-members-wrap {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
    max-width: none;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: var(--post-card-radius, 14px);
  }
  .feed-layout.feed-layout-with-suggestions .feed-main > .feed-header > .active-members-avatars {
    padding-left: 0;
    padding-right: 0;
  }
  .feed-layout.feed-layout-with-suggestions .feed-main > .feed-header > .feed-composer {
    margin-left: -10px;
    margin-right: -10px;
    width: calc(100% + 20px);
    padding: 12px 14px 0;
    box-sizing: border-box;
    margin-top: 0;
  }

  .groups-grid { grid-template-columns: 1fr; }

  .post-card { border-radius: var(--post-card-radius); }
  .post-card .post-header { padding: 14px 16px; }
  .post-card .post-actions { padding-left: 16px; padding-right: 16px; }
  .post-card .post-body { padding-left: 16px; padding-right: 16px; }
  .post-card .comment-input-row { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 380px) {
  .bottom-nav:not(.bottom-nav--five):not(.bottom-nav--six) .bottom-nav-item {
    max-width: 56px;
    padding: 10px 6px;
  }
  .bottom-nav:not(.bottom-nav--five):not(.bottom-nav--six) .bottom-nav-item > span:not(.icon) {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    /* Formulários/tap: rem para respeitar zoom de acessibilidade */
    --fs-body: 1rem;
    --fs-caption: 0.875rem;
    --fs-username: 0.875rem;
    --fs-subtitle: 0.9375rem;
    --fs-meta: 0.8125rem;
    --fs-micro: 0.75rem;
  }

  /* Comfortable tap targets + readable form controls */
  button,
  input,
  textarea,
  select {
    font-size: 16px;
  }

  button,
  a.nav-item,
  .bottom-nav a,
  .bottom-nav button.bottom-nav-item {
    min-height: 44px;
  }

  .search-bar { padding: 12px 16px; }
  .search-bar .icon { font-size: 18px; }

  .page-title { font-size: clamp(20px, 6vw, 24px); }

  .explore-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .photo-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .profile-avatar-ring { width: 88px; height: 88px; }
  .profile-name { font-size: 17px; }

  .feed-header { padding: 14px 12px; border-radius: var(--post-card-radius); }
  .feed-chip { font-size: 16px; padding: 10px 14px; min-height: 40px; }
}
/* ========================================
   PROFILE CLEAN (NOVO DESIGN)
======================================== */

/*
  ROLAGEM (mobile + Inspecionar): o documento inteiro cresce com o conteúdo.
  Nada de gaveta com altura fixa/overflow hidden na cadeia perfil → abas → grid.
 */
body.stick-page-profile {
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  min-height: 100dvh;
  height: auto !important;
  max-height: none !important;
  touch-action: pan-y;
}

html:where(:has(body.stick-page-profile)) {
  height: auto !important;
  min-height: 100dvh;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

body.stick-page-profile .app-layout {
  min-height: 100dvh;
  height: auto !important;
  max-height: none !important;
  overflow: visible;
}

body.stick-page-profile main.main-content,
body.stick-page-profile .main-content.profile-page-surface {
  flex: 1 1 auto;
  min-width: 0;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Coluna de conteúdo do perfil: largura total, sem respiro lateral (aba Posts alinhada ao feed) */
body.stick-page-profile .profile-page-layout,
body.stick-page-profile .profile-content {
  min-height: 0;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Aba "Posts": container explícito (fotos borda a borda como no feed) */
body.stick-page-profile #tab-posts {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow: visible;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

/* Outras abas = bloco de conteúdo, sem célula de altura de viewport */
body.stick-page-profile #tab-reels,
body.stick-page-profile #tab-saved,
body.stick-page-profile #tab-tagged {
  display: block;
  width: 100%;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow: visible;
}

/* Conteúdo principal do perfil: preto puro (Posting) */
main.main-content.profile-page-surface {
  background: #000000 !important;
  min-height: auto;
}

/* Aba “Posts” = feed vertical (alinhado ao #postsFeed do index) */
body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 24px !important;
  padding: 0 !important;
  gap: 0 !important;
  grid: none !important;
  box-sizing: border-box;
}

/* Desktop: limita largura do feed no perfil */
@media (min-width: 769px) {
  body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical {
    max-width: 600px !important;
  }

  body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-card {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Mídia no card: coluna cheia, sem célula 1:1 herdada do feed geral */
body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-card {
  display: block !important;
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-feed-media-outer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-image-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-image-wrap,
body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-image-wrap--video {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  max-height: none !important;
  background: transparent !important;
  border-radius: 0;
  overflow: hidden !important;
}

/* Carrossel: scroll horizontal precisa de clip no wrapper */
body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-image-wrap--carousel {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  max-height: none !important;
  background: transparent !important;
  border-radius: 0;
  overflow: hidden !important;
}

/* Desktop: foto/vídeo à largura da coluna */
body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-image-wrap:not(.post-image-wrap--carousel) .post-main-image,
body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-image-wrap--video video.post-main-image {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(85vh, 640px) !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 8px;
  background: var(--bg-elevated, rgba(0, 0, 0, 0.04));
}

/* Perfil: indicador de "play" em vídeos (igual ao feed) */
body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .video-wrapper {
  position: relative;
  width: 100%;
}

body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .video-wrapper > video {
  display: block;
  width: 100%;
  height: auto;
}

body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  pointer-events: none;
}

body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .play-overlay::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.65);
  margin-left: 4px;
}

body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .video-wrapper.is-playing .play-overlay {
  display: none;
}

body.stick-page-profile
  #profilePostsFeed.profile-posts-feed--vertical
  .post-image-wrap--video
  video.post-main-image {
  background: #000;
}

body.stick-page-profile
  #profilePostsFeed.profile-posts-feed--vertical
  .post-image-wrap--carousel
  .post-media-carousel-slide
  img,
body.stick-page-profile
  #profilePostsFeed.profile-posts-feed--vertical
  .post-image-wrap--carousel
  .post-media-carousel-slide
  video {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  margin: 0 !important;
  border-radius: 8px;
}

/* ========================================
   Aba “Reels” = grelha de miniaturas (só #profileReelsFeed)
   ======================================== */
body.stick-page-profile #profileReelsFeed.profile-posts-feed {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 3px !important;
  width: 100% !important;
  max-width: 935px !important;
  margin: 18px auto 28px !important;
  padding: 0 !important;
}

body.stick-page-profile #profileReelsFeed .profile-post-item {
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.stick-page-profile #profileReelsFeed .profile-post-item img,
body.stick-page-profile #profileReelsFeed .profile-post-item video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

@media (max-width: 768px) {
  /* Igual ao #postsFeed: card em 100vw para a mídia colar na borda da viewport */
  body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto 18px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.stick-page-profile #profilePostsFeed.profile-posts-feed--vertical .post-card {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    border-radius: 0 !important;
  }

  /* Foto/vídeo tela a tela (técnica 100vw + "breakout") */
  body.stick-page-profile
    #profilePostsFeed.profile-posts-feed--vertical
    .post-image-wrap:not(.post-image-wrap--carousel)
    .post-main-image,
  body.stick-page-profile
    #profilePostsFeed.profile-posts-feed--vertical
    .post-image-wrap--video
    video.post-main-image {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
  }

  /* Carrossel: borda a borda no cartão 100vw; slides largura 100% */
  body.stick-page-profile
    #profilePostsFeed.profile-posts-feed--vertical
    .post-image-wrap--carousel
    .post-media-carousel-slide
    img,
  body.stick-page-profile
    #profilePostsFeed.profile-posts-feed--vertical
    .post-image-wrap--carousel
    .post-media-carousel-slide
    video {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    object-fit: cover !important;
    border-radius: 0 !important;
  }

  body.stick-page-profile #profileReelsFeed.profile-posts-feed {
    max-width: 520px !important;
    margin: 0 auto 18px !important;
  }
}

.clean-profile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 22px 16px 24px;
  text-align: left;
}

/* Coluna única alinhada à esquerda (estilo feed tipo Red Note) */
.profile-head-rn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

/* Desktop: avatar + conteúdo lado a lado (evita texto "espremido") */
@media (min-width: 769px) {
  .profile-head-rn {
    display: grid;
    grid-template-columns: 132px 1fr;
    column-gap: 18px;
    row-gap: 8px;
    align-items: start;
    max-width: 935px;
  }

  .profile-head-rn .profile-avatar-rn {
    grid-column: 1;
    grid-row: 1 / span 5;
    justify-self: start;
    align-self: start;
  }

  .profile-head-rn .center-name,
  .profile-head-rn .profile-site-link,
  .profile-head-rn .profile-bio-block,
  .profile-head-rn .center-stats,
  .profile-head-rn .profile-actions-clean {
    grid-column: 2;
    min-width: 0;
  }

  .profile-head-rn .center-stats {
    justify-content: flex-start;
    gap: 22px;
  }
}

.profile-head-rn .center-name,
.profile-head-rn .profile-handle,
.profile-head-rn .user-bio-display {
  text-align: left;
  width: 100%;
}

/* Avatar com anel em gradiente (reforço visual) */
.clean-profile .profile-avatar-rn.center-avatar {
  width: 132px;
  height: 132px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.clean-profile .profile-avatar-rn {
  background: var(--bg-gradient);
  padding: 2.5px;
}

.clean-profile .profile-avatar-rn img {
  border-width: 2px;
  border-color: var(--bg-base);
}

.center-name {
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* HANDLE */
.clean-profile .profile-handle {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

/* Bio: integrada, sem caixa — tom suave e cinza */
.profile-bio-block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 4px 0 14px;
  min-height: 0;
}

.user-bio-display {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  border: none;
  background: none;
  box-shadow: none;
  outline: none;
}

.bio-edit-subtle {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 6px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  opacity: 0.85;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.bio-edit-subtle:hover {
  opacity: 1;
  color: var(--primary);
}

/* Botões minimalistas (pill fino, fundo leve) */
.profile-actions-clean {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-profile-minimal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-profile-minimal:hover {
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border-color: var(--border-hover);
}

.btn-profile-minimal:active {
  transform: scale(0.98);
}

.btn-profile-minimal--ghost {
  background: color-mix(in srgb, var(--bg-base) 55%, transparent);
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-profile-minimal--ghost:hover {
  color: var(--text-primary);
}

/* STATS — alinhados à esquerda com o bloco de texto */
.center-stats {
  margin-top: 0;
  display: flex;
  gap: 28px;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
}

.clean-profile .center-stats .stat-item {
  align-items: flex-start;
}

/* ESCONDER POLUIÇÃO ANTIGA */
.profile-links,
.profile-header-actions,
.profile-info-row {
  display: none !important;
}

/* MOBILE NATIVO */
@media (max-width: 768px) {

  .clean-profile .profile-avatar-rn.center-avatar {
    width: 112px;
    height: 112px;
  }

  .clean-profile .center-stats {
    gap: 22px;
  }

  .clean-profile .profile-name {
    font-size: clamp(18px, 5.4vw, 20px);
  }

}

/* ========================================
   PROFILE POSTS GRID (featured + 4-col)
   ======================================== */

/* ========================================
   AJUDA HYPE (LOCAL)
   ======================================== */
.stick-helper-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

/* RESET do componente (pedido): caixa simples e sempre visível */
#stick-helper-chat {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: min(560px, calc(100vw - 40px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  padding: 14px 16px 16px;
  z-index: 10000;
}

.stick-helper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stick-helper-btn {
  border: 1px solid var(--posting-border, #2f3336);
  background: #000000;
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.stick-helper-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

#respostas-container {
  margin-top: 10px;
  min-height: 44px;
  max-height: 260px;
  overflow-y: auto;
}

.balao-stick {
  background-color: #000000;
  color: white;
  padding: 12px;
  border-radius: 15px;
  margin-top: 10px;
  display: block !important;
  white-space: pre-line;
  border: 1px solid var(--posting-border, #2f3336);
}

.btn-help-stick {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-primary) !important;
  font-weight: 800;
}

.btn-help-stick:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.stick-help-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.stick-help-modal-backdrop.open {
  display: flex;
}

.stick-help-modal {
  width: min(560px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

/* Ajuda Hype: acima de qualquer overlay/post modal */
#container-ajuda.stick-help-modal-backdrop {
  z-index: 9999;
}

#container-ajuda .stick-help-modal {
  height: auto;
  max-height: 400px;
  overflow-y: auto;
}

/* Se o assistente estiver sendo atropelado: fixa no canto */
#container-ajuda {
  position: fixed;
  bottom: 100px;
  right: 20px;
  left: auto;
  top: auto;
  width: min(560px, calc(100vw - 40px));
  padding: 0;
  background: transparent;
  align-items: unset;
  justify-content: unset;
}

.stick-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.stick-help-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.stick-help-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stick-help-body {
  padding: 14px 16px 16px;
  padding-bottom: 20px;
}

.stick-help-chip {
  border: 1px solid var(--posting-border, #2f3336);
  background: #000000;
  color: var(--text-primary);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.stick-help-chip:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.stick-help-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(56vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.stick-help-bubble {
  max-width: 92%;
  border-radius: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.stick-help-bubble.me {
  align-self: flex-end;
  background: rgba(29, 155, 240, 0.12);
  border-color: rgba(29, 155, 240, 0.35);
}

.stick-help-bubble.stick {
  align-self: flex-start;
}

.stick-help-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.stick-help-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 12px;
}

.stick-help-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14px;
}

.stick-help-send {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  background: var(--primary-color, #3D56F1) !important;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.92;
}

.stick-help-send:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.2);
}

/* Ajuda Hype: garante visibilidade + animação suave */
.stick-help-bubble {
  display: block;
}

@keyframes stickHelpIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stick-help-bubble-anim {
  animation: stickHelpIn 180ms ease-out both;
}

/* Balão de resposta (pulo do gato) */
.stick-help-answer {
  background-color: #000000;
  color: white;
  padding: 12px;
  border-radius: 15px;
  margin-top: 10px;
  display: block !important;
  border: 1px solid var(--posting-border, #2f3336);
}

/* Evita container sumir / colapsar */
#ajuda-content,
.chat-messages {
  min-height: 100px;
  max-height: 400px;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column;
}

@media (max-width: 640px) {
  .stick-help-modal-backdrop {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .stick-help-modal {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .stick-help-chat {
    max-height: calc(100dvh - 160px);
  }
}

.profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 0 0;
}

.profile-post-tile {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--bg-elevated);
  cursor: pointer;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
}

.profile-post-tile.featured {
  grid-column: 1 / -1;
}

.profile-post-tile img,
.profile-post-tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  min-height: 0;
}

.profile-post-tile--small {
  aspect-ratio: 1 / 1;
}

.profile-post-tile--featured {
  aspect-ratio: 1 / 1;
}

@media (max-width: 480px) {
  .profile-posts-grid {
    gap: 10px;
  }
}
/* ========================================
   MODAL PERFIL (ESTILO INSTAGRAM)
   ======================================== */
.modal-perfil-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  backdrop-filter: blur(8px);
}

.modal-perfil-backdrop.open {
  display: flex;
}

.modal-perfil-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10001;
  padding: 10px;
  transition: var(--transition);
}

.modal-perfil-close:hover {
  transform: scale(1.1);
}

.modal-perfil-container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  height: 100%;
  max-height: 850px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* Coluna Esquerda: Imagem */
.modal-perfil-left {
  flex: 1.2;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.modal-perfil-left img,
.modal-perfil-left video {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* Coluna Direita: Conte�do */
.modal-perfil-right {
  flex: 0.8;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  min-width: 350px;
}

/* Header do Modal */
.modal-perfil-header {
  border-bottom: 1px solid var(--border); /* Borda sutil */
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-perfil-header .user-info,
.post-description .user-info {
  display: flex;
  align-items: center;
  gap: 12px; /* Mantém o gap, mas adiciona o margin-right para a imagem */
}

.modal-perfil-header .user-info-text,
.post-description .user-info-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.modal-perfil-header .user-at,
.post-description .user-at {
  display: block;
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: 400;
  line-height: 1.3;
  color: #71767b;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-perfil-header img,
.post-description img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0;
  flex-shrink: 0;
}

.modal-perfil-header .username,
.post-description .username {
  font-weight: 800;
  color: #ffffff;
  font-size: var(--ig-feed-username-size, 1.05rem);
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-options-btn {
  color: var(--text-primary);
  font-size: 14px;
}

/* Conte�do: Descri��o e Coment�rios */
.modal-perfil-content {
  flex-grow: 1; /* Para ocupar o espaço restante */
  overflow-y: auto; /* Scroll apenas nos comentários */
  padding: 0 16px; /* Ajuste de padding */
  background-color: var(--bg-card);
}

.post-description {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.caption-text {
  font-size: var(--ig-feed-body-size, 1.05rem);
  line-height: var(--ig-feed-line-height, 1.4);
  color: #ffffff;
  margin-left: 44px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0; /* Evitar que o avatar diminua */
  object-fit: cover;
}

.comment-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}



.comment-body-text {
  font-size: 14px; /* Tamanho da fonte padronizado */
  color: var(--text-secondary); /* Cor do texto */
}



.comment-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Rodap� do Modal */
.modal-perfil-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.left-actions {
  display: flex;
  gap: 16px;
}

.action-btn {
  font-size: 24px;
  color: var(--text-primary);
  transition: var(--transition);
}

.action-btn:hover {
  color: var(--text-secondary);
}

.likes-count {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.post-date {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.comment-input-area {
  border-top: 1px solid var(--border);
  padding: 16px;
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
}

.comment-input-area i {
  font-size: 24px;
}

.comment-input-area input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.comment-input-area input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--ig-feed-comment-size, 1rem);
  outline: none;
}

.publish-btn {
  color: #ffffff !important;
  font-weight: 800;
  font-size: 14px;
  opacity: 0.5;
  cursor: default;
}

.publish-btn.active {
  opacity: 1;
  cursor: pointer;
}

@media (max-width: 600px) {
  .modal-perfil-container {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .modal-perfil-backdrop {
    padding: 0;
  }
}

/* Mobile (≤768px) — detalhes extras só do #perfil-post-modal (o layout em coluna vem no bloco .modal-perfil-* acima) */
@media (max-width: 768px) {
  /* Mídia / carrossel: mesmas classes, IDs do modal para altura e cover */
  .modal-perfil-left .modal-perfil-media-wrap,
  .modal-perfil-left .post-image-wrap--carousel,
  .modal-perfil-left .post-media-carousel {
    max-height: 55vh;
    min-height: 0;
  }

  #modal-perfil-img,
  #modal-perfil-video,
  .modal-perfil-left img,
  .modal-perfil-left video {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 55vh;
    height: auto;
    object-fit: cover;
    object-position: center center;
  }

  /* Detalhes só do modal de post (IDs, botão fechar, espaçamentos) */
  #perfil-post-modal .modal-perfil-header {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    position: relative !important;
    z-index: 5;
    top: auto;
  }

  #perfil-post-modal .modal-perfil-right {
    overflow-y: hidden !important;
  }

  #perfil-post-modal .modal-perfil-content {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden !important;
    padding: 12px 16px 10px;
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
  }

  #perfil-post-modal #modal-perfil-comments-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #perfil-post-modal .post-description {
    margin-bottom: 14px;
  }

  #perfil-post-modal .comments-list {
    gap: 18px;
    padding-bottom: 20px !important;
  }

  #perfil-post-modal .comment-item {
    gap: 14px;
  }

  #perfil-post-modal .footer-actions {
    margin-bottom: 10px;
  }

  #perfil-post-modal .likes-count {
    margin-bottom: 6px;
  }

  #perfil-post-modal .post-date {
    margin-bottom: 10px;
  }

  #perfil-post-modal .modal-perfil-footer {
    flex: 0 0 auto;
    position: relative !important;
    bottom: auto;
    background: var(--bg-elevated);
    z-index: 10;
    padding-top: 4px;
  }

  #perfil-post-modal .modal-perfil-close {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 12px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10050;
  }
}

/* ========================================
   MODAL PERFIL — Comentários (Instagram Clean / Light)
   Escopo: apenas dentro de #perfil-post-modal
   ======================================== */
#perfil-post-modal .modal-perfil-container {
  background: var(--bg-elevated);
  box-shadow: none;
}

#perfil-post-modal .modal-perfil-right {
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--border);
}

/* Mobile: coluna direita com scroll (só ≤768px) */
@media (max-width: 768px) {
  #perfil-post-modal .modal-perfil-right {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

#perfil-post-modal .modal-perfil-header,
#perfil-post-modal .modal-perfil-footer {
  background: var(--bg-elevated);
}

#perfil-post-modal .modal-perfil-header {
  border-bottom: 1px solid var(--border);
}

#perfil-post-modal .modal-perfil-footer {
  border-top: 1px solid var(--border);
  position: relative;
  bottom: auto;
  z-index: 20;
}

#perfil-post-modal .modal-options-btn,
#perfil-post-modal .action-btn {
  color: var(--text-secondary);
}

/* Modal: menu dropdown precisa ficar acima do overlay */
#perfil-post-modal .modal-perfil-header {
  position: relative;
}
#perfil-post-modal .modal-options-btn {
  position: relative;
  z-index: 10002;
  pointer-events: auto;
}
#perfil-post-modal .post-menu-dropdown.modal-post-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 10px;
  z-index: 10001 !important;
}

#perfil-post-modal .modal-perfil-header .username,
#perfil-post-modal .post-description .username {
  color: #ffffff;
}

#perfil-post-modal .caption-text {
  color: #ffffff;
}

#perfil-post-modal .modal-perfil-view-all-comments {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 10px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  color: var(--ig-feed-meta-color, #a8a8a8);
  cursor: pointer;
}

#perfil-post-modal .modal-perfil-view-all-comments:hover {
  text-decoration: underline;
  opacity: 1;
}

#perfil-post-modal .modal-perfil-content {
  background: var(--bg-elevated);
  padding: 16px;
}

@media (min-width: 769px) {
  #perfil-post-modal .modal-perfil-content {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
  }
}

#perfil-post-modal .comments-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 12px; /* respiro lateral no mobile também */
  margin: 0;
}

#perfil-post-modal .comment-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  border: none;
}

#perfil-post-modal .comment-main-wrapper.comment-notif-highlight {
  border-radius: 8px;
  outline: 2px solid rgba(255, 48, 64, 0.4);
  outline-offset: 1px;
  animation: stickCommentNotifFlash 2.2s ease-out 1;
}

@keyframes stickCommentNotifFlash {
  from {
    background-color: rgba(255, 48, 64, 0.16);
  }
  to {
    background-color: transparent;
  }
}

#perfil-post-modal .comment-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 32px;
  margin-right: 0;
}

#perfil-post-modal .comment-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#perfil-post-modal .comment-line {
  width: 100%;
  min-width: 0;
  display: block;
  font-size: var(--ig-feed-body-size, 1.05rem);
  line-height: var(--ig-feed-line-height, 1.4);
  color: #ffffff;
  word-break: break-word;
}

#perfil-post-modal .comment-author {
  font-size: var(--ig-feed-username-size, 1.05rem);
  font-weight: var(--ig-feed-username-weight, 700);
  margin-right: 6px;
  color: #ffffff;
}

#perfil-post-modal .comment-text {
  font-size: var(--ig-feed-body-size, 1.05rem);
  font-weight: var(--ig-feed-body-weight, 450);
  color: #ffffff;
  line-height: var(--ig-feed-line-height, 1.4);
}

#perfil-post-modal .comment-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: var(--ig-feed-meta-size, 0.75rem);
  font-weight: var(--ig-feed-meta-weight, 400);
  color: var(--ig-feed-meta-color, #a8a8a8);
  line-height: var(--ig-feed-line-height, 1.4);
  margin-top: 0;
}

#perfil-post-modal .comment-action {
  font-weight: var(--ig-feed-meta-weight, 400);
  cursor: pointer;
  color: var(--ig-feed-meta-color, #a8a8a8);
}

#perfil-post-modal .comment-action:hover {
  color: #cfcfcf;
}

.stick-profile-comments-overlay .comment-action {
  font-weight: var(--ig-feed-meta-weight, 400);
  cursor: pointer;
  color: var(--ig-feed-meta-color, #a8a8a8);
  font-size: var(--ig-feed-meta-size, 0.75rem);
}

.stick-profile-comments-overlay .comment-action:hover {
  color: #cfcfcf;
}

button.comment-action.comment-action--reply {
  font: inherit;
  font-family: var(--font-sans, system-ui, sans-serif);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

#perfil-post-modal .comment-input-area {
  position: relative;
  z-index: 1000;
  background-color: var(--bg-elevated);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  padding-bottom: env(safe-area-inset-bottom, 14px);
  isolation: isolate;
}

#perfil-post-modal .comment-input-area i {
  color: #ffffff;
}

#perfil-post-modal .comment-input-area input {
  color: #ffffff !important;
}

#perfil-post-modal .comment-input-area input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

#perfil-post-modal .publish-btn {
  color: #ffffff !important;
  font-weight: 800;
}

#perfil-post-modal .publish-btn.active {
  color: #ffffff !important;
  font-weight: 800;
  opacity: 1;
}

#perfil-post-modal .comment-item.is-optimistic {
  opacity: 0.75;
}

/* Mobile: sobrescreve sticky global do rodapé no modal de post */
@media (max-width: 768px) {
  #perfil-post-modal .modal-perfil-footer {
    position: relative;
    bottom: auto;
  }

  #perfil-post-modal .comment-input-area {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }
}

/* --------------------------------------------------------------------------
   OVERRIDE FINAL — modal de post em coluna no mobile (força sobre regras anteriores)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .modal-perfil-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100dvh !important;
  }

  .modal-perfil-left {
    width: 100% !important;
    max-height: 55vh !important;
  }

  .modal-perfil-left img,
  .modal-perfil-left video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .modal-perfil-right {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   MOBILE — comentários / nomes em rem (base html 16px; acompanha zoom do SO)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .stick-profile-comments-overlay {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

  .comment-author,
  .comment-author a,
  a.comment-author-link,
  .comment-item .comment-line .comment-author,
  .modal-body .comment-author,
  .modal-body .comment-author a,
  .post-modal-comments-list .comment-author,
  #perfil-post-modal .comment-author,
  #perfil-post-modal .comment-author a,
  #perfil-post-modal .post-description .username,
  .stick-profile-comments-overlay .comment-author,
  .stick-profile-comments-overlay .comment-author a,
  .comment-content-feed .username {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
    color: #ffffff !important;
  }

  .comment-text,
  .post-comment-text,
  .comment-body,
  .comment-content-text,
  .reply-text,
  .comment-user-text,
  .comment-item .comment-line,
  .modal-body .comment-line,
  .modal-body .comment-text,
  .post-modal-comments-list .comment-text,
  .post-modal-comments-list .comment-line,
  #perfil-post-modal .comment-text,
  #perfil-post-modal .comment-line,
  .stick-profile-comments-overlay .comment-text,
  .stick-profile-comments-overlay .comment-line,
  .comment-content-feed .text {
    font-size: var(--ig-feed-comment-size, 1rem) !important;
    font-weight: 450 !important;
    line-height: var(--ig-feed-comment-line-height, 1.5) !important;
    color: #ffffff !important;
  }

  .comment-item .comment-line .comment-author,
  .modal-body .comment-line .comment-author,
  .post-modal-comments-list .comment-line .comment-author,
  #perfil-post-modal .comment-line .comment-author,
  .stick-profile-comments-overlay .comment-line .comment-author {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
  }

  .comment-meta,
  .comment-time,
  .comment-like-btn,
  .comment-meta-feed,
  .comments-reply-banner-text,
  #perfil-post-modal .comment-meta,
  #perfil-post-modal .comment-action,
  .stick-profile-comments-overlay .comment-meta,
  .modal-body .comment-meta,
  .modal-body .comment-time,
  .post-modal-comments-list .comment-meta {
    font-size: 0.75rem !important;
    font-weight: 400 !important;
    line-height: var(--ig-feed-line-height, 1.4) !important;
  }

  .comments-screen-footer-input,
  .stick-profile-comments-overlay__input {
    font-size: var(--ig-feed-comment-size, 1rem) !important;
    line-height: var(--ig-feed-comment-line-height, 1.5) !important;
  }

  .comments-screen-send,
  .stick-profile-comments-overlay__send:not(:disabled) {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
  }

  .comments-screen-loading,
  .comments-screen-empty,
  .stick-profile-comments-empty {
    font-size: var(--ig-feed-comment-size, 1rem) !important;
    font-weight: 450 !important;
    line-height: var(--ig-feed-comment-line-height, 1.5) !important;
  }
}

/* Feed / modal — nomes em rem (legível + zoom do sistema) */
.post-username,
.post-username a,
.post-card .post-header .post-username,
.post-card .post-header .post-username a,
.comment-author,
.comment-author a,
a.comment-author-link,
.comment-author-name,
.suggested-user-name,
.suggested-user-name a,
.username {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: var(--ig-feed-line-height, 1.4) !important;
  color: #ffffff !important;
}

/* Legendas / texto do post (não misturar com corpo do comentário) */
.post-caption,
.post-caption-mobile,
.caption-text,
.post-description,
.post-description .caption-text,
#perfil-post-modal .caption-text {
  font-size: var(--ig-feed-body-size, 1.05rem) !important;
  font-weight: 450 !important;
  line-height: var(--ig-feed-line-height, 1.4) !important;
  color: #ffffff !important;
}

/* Texto do comentário — 1rem / 1.5 */
.comment-text,
.comment-text-block,
.post-comment-text,
.comment-body,
.comment-content-text,
.reply-text,
.comment-user-text,
.comment-item .comment-line,
#perfil-post-modal .comment-text,
#perfil-post-modal .comment-line,
.stick-profile-comments-overlay .comment-text,
.stick-profile-comments-overlay .comment-line,
.modal-body .comment-text,
.modal-body .comment-line,
.post-modal-comments-list .comment-text,
.post-modal-comments-list .comment-line,
.comment-content-feed .text {
  font-size: var(--ig-feed-comment-size, 1rem) !important;
  font-weight: 450 !important;
  line-height: var(--ig-feed-comment-line-height, 1.5) !important;
  color: #ffffff !important;
}

.timestamp,
.reply-btn,
.likes-count,
.post-handle,
.post-time,
.post-location,
.post-location span,
.comment-time,
.comment-meta,
.comment-meta-btn,
.comment-like-btn,
.comment-meta-feed,
.comments-reply-banner-text,
#perfil-post-modal .comment-meta,
#perfil-post-modal .comment-action,
#perfil-post-modal .post-date,
.stick-profile-comments-overlay .comment-action,
.stick-profile-comments-overlay .comment-meta,
.modal-body .comment-meta,
.modal-body .comment-time,
.post-modal-comments-list .comment-meta {
  font-size: 0.75rem !important;
  color: #71767b !important;
}

.comment-meta-btn.is-liked {
  color: var(--primary) !important;
}

.comment-meta-btn--danger {
  color: var(--danger, #e53935) !important;
}

body,
html,
main,
#app,
.main-content,
.feed-container,
.profile-page,
.stick-feed,
.stick-shell,
.app-layout {
  background-color: #000000 !important;
}

.bottom-nav-fab-inner,
.stick-publish-btn,
.feed-composer-publish,
body.stick-page-feed .stick-publish-btn {
  background-color: #3D56F1 !important;
  background: #3D56F1 !important;
}

/* UI: não exibir "@handle" (parece e-mail). Mantemos apenas o nome. */
.mini-user-handle,
.comment-sheet__handle,
.comment-sheet-mobile__handle,
.user-at,
.profile-post-user-handle {
  display: none !important;
}
