/* Click · Perfil: publicaciones por tandas de 5 */
.profile-v396-post-grid[data-profile-feed-more] .profile-feed-batch-item{
  min-width:0;
  margin:0;
}
.profile-v396-post-grid[data-profile-feed-more] .profile-feed-batch-item[hidden]{
  display:none!important;
}
.profile-v396-post-grid[data-profile-feed-more] .profile-feed-batch-item>.post-card{
  width:100%;
  height:100%;
  margin:0!important;
}
.profile-v396-post-grid[data-profile-feed-more] .profile-feed-batch-item.is-profile-feed-revealing{
  animation:profileFeedReveal .28s ease both;
}
.profile-feed-more-wrap{
  grid-column:1/-1;
  display:flex;
  justify-content:center;
  width:100%;
  padding:4px 0 1px;
}
.profile-feed-more-button{
  width:min(100%,430px);
  min-height:48px;
  border:1px solid rgba(155,118,255,.34);
  border-radius:16px;
  background:linear-gradient(135deg,rgba(126,77,245,.14),rgba(190,86,255,.10));
  color:#6e47df;
  font:inherit;
  font-weight:900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:11px 16px;
  transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.profile-feed-more-button:hover{
  transform:translateY(-1px);
  border-color:rgba(126,77,245,.58);
  background:linear-gradient(135deg,rgba(126,77,245,.20),rgba(190,86,255,.14));
  box-shadow:0 10px 22px rgba(93,59,178,.10);
}
.profile-feed-more-button small{
  display:inline-flex;
  min-height:25px;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(126,77,245,.11);
  color:inherit;
  font-size:10px;
  font-weight:900;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-feed-more-button{
  border-color:rgba(172,144,255,.28);
  background:linear-gradient(135deg,rgba(127,83,245,.22),rgba(202,91,255,.13));
  color:#d9c8ff;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-feed-more-button small{
  background:rgba(194,164,255,.13);
}
@media(max-width:640px){
  .profile-feed-more-wrap{padding-top:2px}
  .profile-feed-more-button{
    width:100%;
    min-height:46px;
    border-radius:14px;
    font-size:12px;
  }
}
@keyframes profileFeedReveal{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

/* ============================================================
   V2 · Feed modular realmente responsive dentro de la tarjeta
   La tarjeta puede ser angosta en PC aunque la ventana sea grande.
   Por eso la adaptación depende del ancho del módulo, no del viewport.
   ============================================================ */
.profile-v396-feed-panel{
  container-type:inline-size;
  container-name:profile-feed-card;
  min-width:0!important;
  overflow:hidden;
}
.profile-v396-feed-panel .profile-v396-post-grid,
.profile-v396-feed-panel .profile-feed-batch-item,
.profile-v396-feed-panel .post-card,
.profile-v396-feed-panel .post-head,
.profile-v396-feed-panel .post-author,
.profile-v396-feed-panel .post-body,
.profile-v396-feed-panel .post-image-wrap,
.profile-v396-feed-panel .post-stats,
.profile-v396-feed-panel .post-actions,
.profile-v396-feed-panel .comments,
.profile-v396-feed-panel .comment-form{
  min-width:0;
  max-width:100%;
}

/* En tamaño pequeño nunca intentamos meter dos publicaciones lado a lado. */
@media(min-width:901px){
  .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="small"]{
    padding:11px!important;
  }
  .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="small"] .profile-v396-post-grid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:11px!important;
    padding-top:11px!important;
  }
  .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="medium"] .profile-v396-post-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* El diseño cambia automáticamente cuando la tarjeta se hace angosta. */
@container profile-feed-card (max-width:620px){
  .profile-v396-post-grid[data-profile-feed-more]{
    grid-template-columns:minmax(0,1fr)!important;
    gap:11px!important;
    padding-top:11px!important;
  }
  .profile-v396-tabs{
    display:flex!important;
    gap:4px!important;
    padding:0 1px 9px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none;
    scroll-snap-type:x proximity;
  }
  .profile-v396-tabs::-webkit-scrollbar{display:none}
  .profile-v396-tabs a{
    flex:0 0 auto!important;
    min-width:max-content!important;
    padding:9px 11px!important;
    border-radius:11px!important;
    font-size:10px!important;
    scroll-snap-align:start;
  }
  .profile-feed-batch-item>.post-card{
    border-radius:17px!important;
    overflow:hidden!important;
  }
  .profile-feed-batch-item .post-head{
    display:grid!important;
    grid-template-columns:40px minmax(0,1fr) auto!important;
    gap:8px!important;
    align-items:start!important;
    padding:11px 10px 7px!important;
  }
  .profile-feed-batch-item .post-head>a:first-child{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
  }
  .profile-feed-batch-item .post-head>a:first-child .avatar{
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    border-radius:10px!important;
  }
  .profile-feed-batch-item .post-author{
    width:auto!important;
    overflow:hidden!important;
  }
  .profile-feed-batch-item .post-author>a:first-child{
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:3px!important;
    max-width:100%!important;
    line-height:1.12!important;
  }
  .profile-feed-batch-item .post-author>a:first-child strong{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:12px!important;
  }
  .profile-feed-batch-item .post-author>span{
    display:block!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:9px!important;
  }
  .profile-feed-batch-item .community-chip{
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .profile-feed-batch-item .post-head-tools{
    display:flex!important;
    align-items:center!important;
    gap:3px!important;
    align-self:start!important;
  }
  .profile-feed-batch-item .post-delete-button{
    max-width:58px!important;
    padding:6px 7px!important;
    border-radius:8px!important;
    font-size:8px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .profile-feed-batch-item .dots{
    width:28px!important;
    min-width:28px!important;
    height:28px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
  }
  .profile-feed-batch-item .post-body{
    padding:4px 10px 10px!important;
    font-size:12px!important;
    line-height:1.42!important;
    overflow-wrap:anywhere!important;
  }
  .profile-feed-batch-item .post-image-wrap{
    width:auto!important;
    margin:0 10px 9px!important;
    padding:0!important;
    border-radius:13px!important;
    overflow:hidden!important;
  }
  .profile-feed-batch-item .post-image-wrap img,
  .profile-feed-batch-item .post-image-wrap video{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    max-height:300px!important;
    margin:0!important;
    border-radius:12px!important;
    object-fit:contain!important;
  }
  .profile-feed-batch-item .post-open-video-link{
    max-width:calc(100% - 14px)!important;
    left:7px!important;
    right:7px!important;
    bottom:7px!important;
  }
  .profile-feed-batch-item .poll-box{
    margin:0 10px 10px!important;
    padding:10px!important;
  }
  .profile-feed-batch-item .post-stats{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:6px!important;
    padding:7px 10px!important;
    margin:0!important;
    font-size:9px!important;
  }
  .profile-feed-batch-item .post-stats span:last-child{text-align:right}
  .profile-feed-batch-item .post-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:5px!important;
    margin:0!important;
    padding:7px 8px!important;
  }
  .profile-feed-batch-item .post-actions form{min-width:0!important}
  .profile-feed-batch-item .post-actions button{
    width:100%!important;
    min-width:0!important;
    min-height:36px!important;
    padding:6px 5px!important;
    border-radius:10px!important;
    font-size:9px!important;
    white-space:normal!important;
    line-height:1.15!important;
  }
  .profile-feed-batch-item .comments{
    margin:0!important;
    padding:5px 8px 0!important;
  }
  .profile-feed-batch-item .comment{
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr) auto!important;
    gap:6px!important;
    align-items:start!important;
  }
  .profile-feed-batch-item .comment>.avatar{
    width:28px!important;
    min-width:28px!important;
    height:28px!important;
    min-height:28px!important;
  }
  .profile-feed-batch-item .comment-content{
    min-width:0!important;
    padding:7px 8px!important;
    border-radius:11px!important;
  }
  .profile-feed-batch-item .comment-content a,
  .profile-feed-batch-item .comment-content p{
    overflow-wrap:anywhere!important;
  }
  .profile-feed-batch-item .comment-content p{
    margin:3px 0!important;
    font-size:10px!important;
    line-height:1.35!important;
  }
  .profile-feed-batch-item .comment-form{
    display:grid!important;
    grid-template-columns:30px minmax(0,1fr)!important;
    gap:6px!important;
    align-items:center!important;
    margin:0!important;
    padding:8px!important;
  }
  .profile-feed-batch-item .comment-form>.avatar{
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    min-height:30px!important;
  }
  .profile-feed-batch-item .comment-form input{
    width:100%!important;
    min-width:0!important;
    height:35px!important;
    padding:7px 9px!important;
    font-size:9px!important;
  }
  .profile-feed-batch-item .comment-form button{
    grid-column:2!important;
    width:100%!important;
    min-height:32px!important;
    margin:0!important;
    padding:5px 8px!important;
    border-radius:9px!important;
    font-size:9px!important;
  }
  .profile-feed-batch-item .report-pop form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:6px!important;
  }
  .profile-feed-batch-item .report-pop select,
  .profile-feed-batch-item .report-pop button{
    width:100%!important;
    min-width:0!important;
    min-height:34px!important;
  }
  .profile-feed-more-button{
    width:100%!important;
    min-width:0!important;
  }
}

/* Muy angosta: sigue siendo usable sin aplastar nombre, botones o comentarios. */
@container profile-feed-card (max-width:360px){
  .profile-v396-tabs a{
    padding:8px 9px!important;
    font-size:9px!important;
  }
  .profile-feed-batch-item .post-head{
    grid-template-columns:36px minmax(0,1fr) auto!important;
    gap:6px!important;
    padding:9px 8px 6px!important;
  }
  .profile-feed-batch-item .post-head>a:first-child,
  .profile-feed-batch-item .post-head>a:first-child .avatar{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
  }
  .profile-feed-batch-item .post-delete-button{
    max-width:48px!important;
    padding:5px!important;
    font-size:7px!important;
  }
  .profile-feed-batch-item .post-body{padding-left:8px!important;padding-right:8px!important}
  .profile-feed-batch-item .post-image-wrap{margin-left:8px!important;margin-right:8px!important}
  .profile-feed-batch-item .post-actions button{font-size:8px!important}
  .profile-feed-batch-item .post-stats{font-size:8px!important;padding-left:8px!important;padding-right:8px!important}
}

/* Navegadores sin container queries: el tamaño elegido en el editor sigue protegiendo el layout. */
@supports not (container-type:inline-size){
  @media(min-width:901px){
    .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="small"] .profile-v396-tabs a{
      padding:8px 9px!important;font-size:9px!important
    }
    .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="small"] .post-head{
      gap:7px!important;padding:10px 9px 6px!important
    }
    .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="small"] .post-actions button{
      font-size:9px!important;padding-left:4px!important;padding-right:4px!important
    }
    .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="small"] .comment-form{
      display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;gap:6px!important
    }
    .profile-modular-zone-main .profile-v396-feed-panel[data-module-size="small"] .comment-form button{
      grid-column:2!important;width:100%!important
    }
  }
}
