/* El Contraataque · Community Modern v82
   Temas a ancho completo + chat con reacciones por pulsación larga y composer tipo mensajería. */

body.community-modern-v82{
  --ec82-gold:#b87408;
  --ec82-gold-2:#d99a20;
  --ec82-ink:#17130f;
  --ec82-muted:#7d766d;
  --ec82-soft:#f5f4f1;
  --ec82-line:rgba(61,49,34,.10);
  --ec82-dock-h:4.85rem;
}

/* ---------- TEMAS: limpio, actual y a ancho completo ---------- */
body[data-screen="community"].community-modern-v82 .mobile-content,
body[data-screen="community"].community-modern-v82 #screen-community,
body[data-screen="community"].community-modern-v82 #communityList{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
}
body[data-screen="community"].community-modern-v82 .mobile-content{
  padding-left:0!important;
  padding-right:0!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topics{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0 0 calc(5.4rem + env(safe-area-inset-bottom))!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-sticky,
body[data-screen="community"].community-modern-v82 .community-v48-search-row,
body[data-screen="community"].community-modern-v82 .community-v48-chips,
body[data-screen="community"].community-modern-v82 .community-v48-extra-filters{
  display:none!important;
}

body[data-screen="community"].community-modern-v82 .community-v82-topic-toolbar{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:.58rem!important;
  width:100%!important;
  margin:0!important;
  padding:.72rem .78rem .68rem!important;
  background:linear-gradient(180deg,#fff 0%,#fbfaf7 100%)!important;
  border-bottom:1px solid rgba(66,52,35,.07)!important;
}
body[data-screen="community"].community-modern-v82 .community-v82-topic-segment{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:.18rem!important;
  min-width:0!important;
  border:1px solid rgba(68,53,34,.10)!important;
  border-radius:1rem!important;
  padding:.2rem!important;
  background:#f2f0eb!important;
}
body[data-screen="community"].community-modern-v82 .community-v82-topic-segment button{
  min-width:0!important;
  min-height:2.65rem!important;
  border:0!important;
  border-radius:.82rem!important;
  padding:0 .72rem!important;
  color:#756e65!important;
  background:transparent!important;
  box-shadow:none!important;
  font-size:clamp(.61rem,2.6vw,.72rem)!important;
  font-weight:850!important;
  letter-spacing:-.01em!important;
  white-space:nowrap!important;
}
body[data-screen="community"].community-modern-v82 .community-v82-topic-segment button.is-active{
  color:#17130f!important;
  background:#fff!important;
  box-shadow:0 .18rem .55rem rgba(48,36,20,.08)!important;
}
body[data-screen="community"].community-modern-v82 .community-v82-create{
  display:inline-flex!important;
  min-width:2.9rem!important;
  min-height:2.9rem!important;
  align-items:center!important;
  justify-content:center!important;
  gap:.36rem!important;
  border:0!important;
  border-radius:999px!important;
  padding:0 .82rem!important;
  color:#fff!important;
  background:linear-gradient(145deg,var(--ec82-gold-2),var(--ec82-gold))!important;
  box-shadow:0 .35rem .9rem rgba(170,102,4,.23)!important;
  font-size:clamp(.61rem,2.6vw,.72rem)!important;
  font-weight:950!important;
  white-space:nowrap!important;
}
body[data-screen="community"].community-modern-v82 .community-v82-create svg{
  width:1.02rem!important;
  height:1.02rem!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
}
body[data-screen="community"].community-modern-v82 .community-v69-topic-create,
body[data-screen="community"].community-modern-v82 .community-v48-create{
  display:none!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-recent{
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-recent>.community-v48-section-head{
  box-sizing:border-box!important;
  min-height:3.3rem!important;
  margin:0!important;
  padding:.72rem .9rem .5rem!important;
  border:0!important;
  background:#fbfaf7!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-recent>.community-v48-section-head>strong:first-child{
  color:#7e5008!important;
  font-size:.63rem!important;
  font-weight:950!important;
  letter-spacing:.09em!important;
}
body[data-screen="community"].community-modern-v82 .community-v69-topic-head-actions{
  margin-left:auto!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-live{
  display:inline-flex!important;
  align-items:center!important;
  gap:.3rem!important;
  color:#6e6961!important;
  font-size:.58rem!important;
  font-weight:760!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-list{
  box-sizing:border-box!important;
  width:100%!important;
  margin:0!important;
  overflow:hidden!important;
  border-top:1px solid rgba(62,49,32,.08)!important;
  border-bottom:1px solid rgba(62,49,32,.08)!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 3.7rem!important;
  align-items:stretch!important;
  width:100%!important;
  min-height:6.35rem!important;
  margin:0!important;
  border:0!important;
  border-bottom:1px solid rgba(67,53,35,.075)!important;
  border-radius:0!important;
  padding:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic:last-child{
  border-bottom:0!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-main{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:4.15rem minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  column-gap:.7rem!important;
  row-gap:.13rem!important;
  width:100%!important;
  min-width:0!important;
  align-items:center!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  padding:.68rem .2rem .66rem .78rem!important;
  text-align:left!important;
  background:transparent!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-image{
  grid-column:1!important;
  grid-row:1 / span 2!important;
  align-self:center!important;
  display:grid!important;
  width:4.15rem!important;
  height:4.15rem!important;
  place-items:center!important;
  overflow:hidden!important;
  border:1px solid rgba(184,116,8,.2)!important;
  border-radius:1.08rem!important;
  background:#f5f2eb!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-image img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-copy{
  grid-column:2!important;
  grid-row:1!important;
  align-self:end!important;
  display:grid!important;
  min-width:0!important;
  gap:.08rem!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-copy>small{
  overflow:hidden!important;
  color:#a56608!important;
  font-size:.51rem!important;
  font-weight:950!important;
  letter-spacing:.09em!important;
  line-height:1.15!important;
  text-transform:uppercase!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-copy>strong{
  overflow:hidden!important;
  color:#17130f!important;
  font-size:clamp(.76rem,3.25vw,.91rem)!important;
  font-weight:950!important;
  line-height:1.1!important;
  letter-spacing:-.025em!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-meta{
  color:#8a837a!important;
  font-size:.55rem!important;
  line-height:1.15!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-latest{
  grid-column:2!important;
  grid-row:2!important;
  align-self:start!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:.35rem!important;
  min-width:0!important;
  margin:0!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-latest>small,
body[data-screen="community"].community-modern-v82 .community-v48-topic-last-author{
  display:none!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-latest>strong{
  display:block!important;
  overflow:hidden!important;
  color:#69635c!important;
  font-size:.56rem!important;
  font-weight:600!important;
  line-height:1.22!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-latest>time{
  color:#aaa299!important;
  font-size:.5rem!important;
  white-space:nowrap!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-topic-actions{
  box-sizing:border-box!important;
  display:grid!important;
  place-items:center!important;
  align-self:stretch!important;
  width:3.7rem!important;
  min-width:3.7rem!important;
  margin:0!important;
  padding:0!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-follow{
  display:grid!important;
  width:2.75rem!important;
  height:2.75rem!important;
  place-items:center!important;
  margin:0!important;
  border:1px solid rgba(70,57,39,.11)!important;
  border-radius:50%!important;
  padding:0!important;
  color:#81796f!important;
  background:#fff!important;
  box-shadow:0 .12rem .4rem rgba(44,34,22,.025)!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-follow.is-followed{
  color:#a96805!important;
  border-color:rgba(197,126,16,.28)!important;
  background:#fff6e4!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-follow svg{
  width:1.16rem!important;
  height:1.16rem!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-arrow{
  display:none!important;
}
body[data-screen="community"].community-modern-v82 .community-v82-recent-hidden{
  display:none!important;
}
body[data-screen="community"].community-modern-v82 .community-v48-pinned{
  margin:0!important;
  padding:0 .78rem!important;
}

/* ---------- DETALLE: Volver contextual ---------- */
body[data-screen="communityPostDetail"].community-modern-v82 .community-hub-exit,
body[data-screen="communityPostDetail"].community-modern-v82 [data-community-v41-back]{
  min-width:5.9rem!important;
  justify-content:center!important;
  padding:0 .72rem!important;
}

/* ---------- CHAT: sin corazón lateral; reacciones sólo debajo del bocadillo ---------- */
body[data-screen="communityPostDetail"].community-modern-v82 [data-comment-like],
body[data-screen="communityPostDetail"].community-modern-v82 .community-v53-like,
body[data-screen="communityPostDetail"].community-modern-v82 .community-v62-like{
  display:none!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .post-comment{
  position:relative!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v53-message-bubble,
body[data-screen="communityPostDetail"].community-modern-v82 .post-comment__body{
  -webkit-touch-callout:none!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v82-reaction-summary{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:.25rem!important;
  min-height:0!important;
  margin:.25rem 0 .05rem!important;
  padding:0!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v82-reaction-summary:empty{
  display:none!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v82-reaction-pill{
  display:inline-flex!important;
  min-height:1.42rem!important;
  align-items:center!important;
  justify-content:center!important;
  gap:.18rem!important;
  border:1px solid rgba(66,52,35,.1)!important;
  border-radius:999px!important;
  padding:.08rem .38rem!important;
  color:#675f56!important;
  background:#fff!important;
  box-shadow:0 .08rem .25rem rgba(40,31,20,.03)!important;
  font-size:.55rem!important;
  line-height:1!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v82-reaction-pill.is-mine{
  border-color:rgba(190,117,10,.3)!important;
  background:#fff7e7!important;
}

/* ---------- Composer tipo mensajería, ancho completo ---------- */
body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .post-comment-form.community-v62-composer,
body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .post-comment-form.community-v81-composer,
body[data-screen="communityPostDetail"].community-modern-v82 .post-comments .post-comment-form.community-v62-composer{
  box-sizing:border-box!important;
  position:fixed!important;
  z-index:330!important;
  left:0!important;
  right:0!important;
  bottom:var(--keyboard-offset,0px)!important;
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  gap:.34rem!important;
  width:100vw!important;
  min-width:0!important;
  max-width:none!important;
  min-height:var(--ec82-dock-h)!important;
  margin:0!important;
  overflow:visible!important;
  border:0!important;
  border-top:1px solid rgba(62,49,33,.09)!important;
  border-radius:0!important;
  padding:.48rem .62rem calc(.48rem + env(safe-area-inset-bottom))!important;
  background:rgba(255,255,255,.985)!important;
  box-shadow:0 -.4rem 1.1rem rgba(44,33,19,.06)!important;
  backdrop-filter:blur(20px)!important;
  -webkit-backdrop-filter:blur(20px)!important;
  transform:none!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v62-composer .community-v60-composer-avatar,
body[data-screen="communityPostDetail"].community-modern-v82 .community-v62-composer .community-v62-composer-avatar{
  display:none!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .community-v62-composer textarea,
body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .community-v81-composer textarea{
  box-sizing:border-box!important;
  order:1!important;
  flex:1 1 0!important;
  width:auto!important;
  min-width:0!important;
  height:2.72rem!important;
  min-height:2.72rem!important;
  max-height:6.4rem!important;
  margin:0!important;
  border:0!important;
  border-radius:1.35rem!important;
  outline:0!important;
  padding:.72rem .88rem!important;
  color:#211d18!important;
  background:#f4f3f0!important;
  box-shadow:none!important;
  font-size:16px!important;
  line-height:1.2!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v62-composer .comment-image-input{
  order:2!important;
  display:grid!important;
  flex:0 0 2.35rem!important;
  width:2.35rem!important;
  height:2.35rem!important;
  min-width:2.35rem!important;
  place-items:center!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  padding:0!important;
  color:#2e2923!important;
  background:transparent!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v82-plus{
  order:3!important;
  display:grid!important;
  flex:0 0 2.35rem!important;
  width:2.35rem!important;
  height:2.35rem!important;
  min-width:2.35rem!important;
  place-items:center!important;
  margin:0!important;
  border:1.5px solid #29241f!important;
  border-radius:50%!important;
  padding:0!important;
  color:#29241f!important;
  background:#fff!important;
  font-size:1.28rem!important;
  font-weight:500!important;
  line-height:1!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .community-v62-composer>button[type="submit"],
body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .community-v81-composer>button[type="submit"]{
  order:4!important;
  display:grid!important;
  flex:0 0 2.5rem!important;
  width:2.5rem!important;
  height:2.5rem!important;
  min-width:2.5rem!important;
  min-height:2.5rem!important;
  place-items:center!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  padding:0!important;
  color:#fff!important;
  background:linear-gradient(145deg,var(--ec82-gold-2),var(--ec82-gold))!important;
  box-shadow:0 .25rem .6rem rgba(170,102,4,.2)!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v62-composer>button[type="submit"] svg{
  width:1.2rem!important;
  height:1.2rem!important;
  fill:none!important;
  stroke:#fff!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .post-comments__list{
  scroll-padding-bottom:calc(var(--ec82-dock-h) + 2.3rem + env(safe-area-inset-bottom))!important;
  padding-bottom:calc(var(--ec82-dock-h) + 2.3rem + env(safe-area-inset-bottom))!important;
}
body[data-screen="communityPostDetail"].community-modern-v82 .community-v81-latest{
  bottom:calc(var(--ec82-dock-h) + .58rem + env(safe-area-inset-bottom) + var(--keyboard-offset,0px))!important;
}

/* ---------- Menú de pulsación larga ---------- */
.community-v82-context-backdrop{
  position:fixed!important;
  z-index:900!important;
  inset:0!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  padding:1rem .72rem calc(1rem + env(safe-area-inset-bottom))!important;
  background:rgba(20,17,13,.18)!important;
  backdrop-filter:blur(9px)!important;
  -webkit-backdrop-filter:blur(9px)!important;
}
.community-v82-context-backdrop[hidden]{display:none!important}
.community-v82-context-sheet{
  box-sizing:border-box!important;
  width:min(100%,28rem)!important;
  max-height:min(76vh,34rem)!important;
  overflow:auto!important;
  border:1px solid rgba(61,49,34,.09)!important;
  border-radius:1.45rem!important;
  padding:.5rem!important;
  background:rgba(255,255,255,.985)!important;
  box-shadow:0 1.2rem 3.2rem rgba(32,24,14,.22)!important;
}
.community-v82-context-reactions{
  display:grid!important;
  grid-template-columns:repeat(7,1fr)!important;
  gap:.16rem!important;
  width:100%!important;
  margin:0 0 .42rem!important;
  border-radius:1.05rem!important;
  padding:.42rem .3rem!important;
  background:#fff!important;
}
.community-v82-context-reaction{
  display:grid!important;
  min-width:0!important;
  min-height:2.9rem!important;
  place-items:center!important;
  border:0!important;
  border-radius:.85rem!important;
  padding:0!important;
  background:transparent!important;
  font-size:1.55rem!important;
  line-height:1!important;
}
.community-v82-context-reaction.is-active{
  background:#fff2d7!important;
  transform:translateY(-.08rem) scale(1.04)!important;
}
.community-v82-context-preview{
  margin:.15rem .25rem .45rem!important;
  border-radius:1rem!important;
  padding:.72rem .8rem!important;
  color:#26211c!important;
  background:#f4f3f1!important;
}
.community-v82-context-preview strong{
  display:block!important;
  margin-bottom:.18rem!important;
  font-size:.68rem!important;
  font-weight:950!important;
}
.community-v82-context-preview p{
  display:-webkit-box!important;
  margin:0!important;
  overflow:hidden!important;
  font-size:.68rem!important;
  line-height:1.3!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:3!important;
}
.community-v82-context-actions{
  overflow:hidden!important;
  border:1px solid rgba(61,49,34,.08)!important;
  border-radius:1.05rem!important;
  background:#fff!important;
}
.community-v82-context-action{
  box-sizing:border-box!important;
  display:flex!important;
  width:100%!important;
  min-height:3rem!important;
  align-items:center!important;
  gap:.72rem!important;
  border:0!important;
  border-bottom:1px solid rgba(61,49,34,.08)!important;
  padding:0 .85rem!important;
  color:#27221d!important;
  background:#fff!important;
  font-size:.74rem!important;
  font-weight:760!important;
  text-align:left!important;
}
.community-v82-context-action:last-child{border-bottom:0!important}
.community-v82-context-action svg{
  width:1.2rem!important;
  height:1.2rem!important;
  flex:0 0 1.2rem!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.7!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

@media(max-width:380px){
  body[data-screen="community"].community-modern-v82 .community-v82-topic-toolbar{
    gap:.4rem!important;
    padding-inline:.55rem!important;
  }
  body[data-screen="community"].community-modern-v82 .community-v82-create{
    width:2.8rem!important;
    min-width:2.8rem!important;
    padding:0!important;
    font-size:0!important;
  }
  body[data-screen="community"].community-modern-v82 .community-v82-create svg{
    width:1.12rem!important;
    height:1.12rem!important;
  }
  body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .post-comment-form.community-v62-composer,
  body[data-screen="communityPostDetail"].community-modern-v82 #screen-communityPostDetail .post-comment-form.community-v81-composer{
    gap:.22rem!important;
    padding-left:.42rem!important;
    padding-right:.42rem!important;
  }
  body[data-screen="communityPostDetail"].community-modern-v82 .community-v62-composer .comment-image-input,
  body[data-screen="communityPostDetail"].community-modern-v82 .community-v82-plus{
    flex-basis:2.15rem!important;
    width:2.15rem!important;
    height:2.15rem!important;
    min-width:2.15rem!important;
  }
  .community-v82-context-reactions{
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    padding-inline:.15rem!important;
  }
  .community-v82-context-reaction{font-size:1.36rem!important}
}
