/* El Contraataque · Community Topic Frame v81
   Corrección del detalle de temas: hero fotográfico, composer usable y conversación estable. */

body[data-screen="communityPostDetail"].community-topic-frame-v81{
  --ec81-gold:#c68513;
  --ec81-gold-soft:#efc56c;
  --ec81-ink:#17130f;
  --ec81-line:rgba(76,58,34,.12);
  --ec81-composer-h:4.65rem;
}

/* En el detalle del tema no se desplaza el AppShell: solo la conversación. */
body[data-screen="communityPostDetail"].community-topic-frame-v81 .mobile-content{
  box-sizing:border-box!important;
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
  padding:.42rem .62rem 0!important;
  scroll-padding:0!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 #screen-communityPostDetail.is-active{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 #communityPostDetail{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:0!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 #communityPostDetail>.community-hub-header{
  position:relative!important;
  top:auto!important;
  z-index:90!important;
  flex:0 0 auto!important;
  width:100%!important;
  margin:0 0 .48rem!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-post-detail,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v41-chat-article{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
}

/* HERO NUEVO: se elimina por completo el bloque/bocadillo naranja. */
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact{
  position:relative!important;
  top:auto!important;
  z-index:20!important;
  isolation:isolate!important;
  display:grid!important;
  grid-template-columns:minmax(7rem,31%) minmax(0,69%)!important;
  align-items:stretch!important;
  flex:0 0 auto!important;
  width:100%!important;
  min-height:9rem!important;
  max-height:none!important;
  margin:0 0 .5rem!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:1.08rem!important;
  padding:0!important;
  color:#fff!important;
  background:
    linear-gradient(90deg,rgba(5,7,10,.18) 0 31%,rgba(4,6,9,.84) 31%,rgba(4,6,9,.92) 100%),
    url('/assets/home/hero-contraataque.jpg') center 44%/cover no-repeat!important;
  box-shadow:0 .5rem 1.35rem rgba(28,21,13,.14)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  transform:none!important;
  transition:none!important;
  clip-path:none!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41::before{
  display:block!important;
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  inset:0!important;
  background:linear-gradient(90deg,rgba(8,10,14,0) 0 29%,rgba(8,10,14,.48) 38%,rgba(8,10,14,.66) 100%)!important;
  pointer-events:none!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41::after{
  display:block!important;
  content:""!important;
  position:absolute!important;
  z-index:1!important;
  right:.72rem!important;
  bottom:.55rem!important;
  width:4.6rem!important;
  height:4.6rem!important;
  opacity:.105!important;
  background:url('/assets/icons/icono-rm-logo.svg') center/contain no-repeat!important;
  transform:none!important;
  clip-path:none!important;
  pointer-events:none!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__image,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact .community-topic-hero-v41__image{
  position:relative!important;
  z-index:3!important;
  display:block!important;
  align-self:stretch!important;
  width:100%!important;
  height:100%!important;
  min-height:9rem!important;
  overflow:hidden!important;
  margin:0!important;
  border:0!important;
  border-radius:1.02rem 0 0 1.02rem!important;
  padding:0!important;
  background:#e9e7e1!important;
  transform:none!important;
  transition:none!important;
  clip-path:none!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__image img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:9rem!important;
  object-fit:cover!important;
  object-position:center 15%!important;
  border:0!important;
  border-radius:0!important;
  transform:none!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__copy,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact .community-topic-hero-v41__copy{
  position:relative!important;
  z-index:4!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  align-content:center!important;
  align-items:start!important;
  gap:.3rem!important;
  min-width:0!important;
  min-height:9rem!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  padding:.78rem 1rem .72rem .95rem!important;
  color:#fff!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
  transition:none!important;
  clip-path:none!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__copy>small,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact .community-topic-hero-v41__copy>small{
  display:inline-flex!important;
  justify-self:start!important;
  margin:0 0 .04rem!important;
  border:1px solid rgba(255,255,255,.38)!important;
  border-radius:999px!important;
  padding:.2rem .55rem!important;
  color:#a66506!important;
  background:rgba(255,255,255,.96)!important;
  font-size:clamp(.5rem,2.1vw,.6rem)!important;
  font-weight:950!important;
  letter-spacing:.11em!important;
  line-height:1!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__copy h3,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact .community-topic-hero-v41__copy h3{
  display:-webkit-box!important;
  margin:.03rem 0 0!important;
  overflow:hidden!important;
  color:#fff!important;
  background:none!important;
  font-size:clamp(1.08rem,4.8vw,1.48rem)!important;
  font-weight:1000!important;
  line-height:1.02!important;
  letter-spacing:-.035em!important;
  text-overflow:clip!important;
  text-transform:uppercase!important;
  white-space:normal!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  -webkit-text-fill-color:#fff!important;
  text-shadow:0 2px 12px rgba(0,0,0,.2)!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__copy p,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact .community-topic-hero-v41__copy p{
  display:-webkit-box!important;
  margin:0!important;
  overflow:hidden!important;
  color:rgba(255,255,255,.86)!important;
  background:none!important;
  font-size:clamp(.61rem,2.45vw,.72rem)!important;
  font-weight:500!important;
  line-height:1.27!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  -webkit-text-fill-color:rgba(255,255,255,.86)!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__stats,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact .community-topic-hero-v41__stats{
  display:flex!important;
  grid-column:auto!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:.3rem .72rem!important;
  margin:.05rem 0 0!important;
  color:var(--ec81-gold-soft)!important;
  font-size:clamp(.52rem,2.15vw,.62rem)!important;
  font-weight:850!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__stats>span{
  display:inline-flex!important;
  align-items:center!important;
  gap:.23rem!important;
  color:inherit!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__stats svg{
  width:.92rem!important;
  height:.92rem!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
}

/* Conversación: una sola superficie y un solo scroll. */
body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comments.community-chat-v41,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-chat-v41.post-comments{
  box-sizing:border-box!important;
  position:relative!important;
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
  border:1px solid var(--ec81-line)!important;
  border-radius:1.05rem!important;
  padding:0!important;
  background:#fff!important;
  box-shadow:0 .28rem .9rem rgba(45,34,20,.04)!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comments.community-chat-v41>.post-comments__head,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-chat-v41.post-comments>.post-comments__head{
  box-sizing:border-box!important;
  display:flex!important;
  flex:0 0 auto!important;
  min-height:3.15rem!important;
  align-items:center!important;
  justify-content:space-between!important;
  margin:0!important;
  border:0!important;
  border-bottom:1px solid rgba(54,42,27,.08)!important;
  border-radius:0!important;
  padding:0 .82rem!important;
  background:#fff!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comments.community-chat-v41>.post-comments__list,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-chat-v41.post-comments>.post-comments__list{
  box-sizing:border-box!important;
  display:block!important;
  flex:1 1 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
  overflow-anchor:auto!important;
  scrollbar-width:thin!important;
  scroll-behavior:auto!important;
  scroll-padding-top:.7rem!important;
  scroll-padding-bottom:calc(var(--ec81-composer-h) + 1rem + env(safe-area-inset-bottom))!important;
  padding:.2rem .72rem calc(var(--ec81-composer-h) + 1rem + env(safe-area-inset-bottom))!important;
  background:#fff!important;
  touch-action:pan-y!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v80-date-separator{
  display:none!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v41-chat-tools,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v80-latest{
  display:none!important;
}

/* Composer definitivo: flex real, ancho completo y campo siempre pulsable. */
body[data-screen="communityPostDetail"].community-topic-frame-v81 #screen-communityPostDetail .post-comment-form.community-v62-composer,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comments.community-chat-v41 .post-comment-form.community-v62-composer,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-chat-v41.post-comments .post-comment-form.community-v62-composer{
  box-sizing:border-box!important;
  position:fixed!important;
  z-index:300!important;
  left:50%!important;
  right:auto!important;
  bottom:calc(.5rem + env(safe-area-inset-bottom) + var(--keyboard-offset,0px))!important;
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:.42rem!important;
  width:min(calc(100vw - 1rem),29.5rem)!important;
  min-width:0!important;
  max-width:29.5rem!important;
  min-height:4rem!important;
  height:auto!important;
  margin:0!important;
  overflow:visible!important;
  border:1px solid rgba(176,108,9,.2)!important;
  border-radius:1.38rem!important;
  padding:.48rem .52rem!important;
  color:var(--ec81-ink)!important;
  background:rgba(255,255,255,.995)!important;
  box-shadow:0 .55rem 1.55rem rgba(41,30,15,.16)!important;
  backdrop-filter:blur(20px)!important;
  -webkit-backdrop-filter:blur(20px)!important;
  transform:translateX(-50%)!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  isolation:isolate!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .community-v60-composer-avatar,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .community-v62-composer-avatar{
  box-sizing:border-box!important;
  order:1!important;
  display:grid!important;
  flex:0 0 2.25rem!important;
  width:2.25rem!important;
  height:2.25rem!important;
  min-width:2.25rem!important;
  place-items:center!important;
  overflow:hidden!important;
  margin:0!important;
  border:1px solid rgba(79,63,43,.13)!important;
  border-radius:50%!important;
  padding:0!important;
  color:#5f5548!important;
  background:#f4f0e8!important;
  font-size:.68rem!important;
  font-weight:900!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .community-v60-composer-avatar img,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .community-v62-composer-avatar img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 #screen-communityPostDetail .community-v62-composer textarea,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comment-form.community-v62-composer textarea,
body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comment-form.community-v62-composer textarea[name="body"]{
  box-sizing:border-box!important;
  order:2!important;
  display:block!important;
  flex:1 1 0!important;
  visibility:visible!important;
  opacity:1!important;
  width:auto!important;
  min-width:7rem!important;
  max-width:none!important;
  height:2.72rem!important;
  min-height:2.72rem!important;
  max-height:6.25rem!important;
  margin:0!important;
  overflow-y:auto!important;
  resize:none!important;
  border:1px solid rgba(64,52,38,.12)!important;
  border-radius:1.12rem!important;
  outline:0!important;
  padding:.7rem .78rem!important;
  color:#211d18!important;
  -webkit-text-fill-color:#211d18!important;
  caret-color:#b46e08!important;
  background:#faf9f6!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
  font-size:16px!important;
  line-height:1.2!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  user-select:text!important;
  -webkit-user-select:text!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer textarea::placeholder{
  color:#918a80!important;
  -webkit-text-fill-color:#918a80!important;
  opacity:1!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .comment-image-input{
  box-sizing:border-box!important;
  order:3!important;
  display:grid!important;
  flex:0 0 2.35rem!important;
  visibility:visible!important;
  opacity:1!important;
  width:2.35rem!important;
  height:2.35rem!important;
  min-width:2.35rem!important;
  place-items:center!important;
  overflow:hidden!important;
  margin:0!important;
  border:1px solid rgba(64,52,38,.13)!important;
  border-radius:50%!important;
  padding:0!important;
  color:#4b443b!important;
  background:#fff!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .comment-image-input svg{
  display:block!important;
  width:1.22rem!important;
  height:1.22rem!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.7!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 #screen-communityPostDetail .community-v62-composer>button[type="submit"],
body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comment-form.community-v62-composer>button[type="submit"]{
  box-sizing:border-box!important;
  order:4!important;
  display:grid!important;
  flex:0 0 2.55rem!important;
  visibility:visible!important;
  opacity:1!important;
  width:2.55rem!important;
  height:2.55rem!important;
  min-width:2.55rem!important;
  min-height:2.55rem!important;
  place-items:center!important;
  margin:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:50%!important;
  padding:0!important;
  color:#fff!important;
  background:linear-gradient(145deg,#dfa11f,#b86d05)!important;
  box-shadow:0 .28rem .65rem rgba(166,99,4,.22)!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer>button[type="submit"] svg{
  display:block!important;
  width:1.3rem!important;
  height:1.3rem!important;
  fill:none!important;
  stroke:#fff!important;
  stroke-width:1.8!important;
}

/* Botón controlado por el usuario: nunca provoca movimiento por sí solo. */
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v81-latest{
  position:fixed!important;
  z-index:285!important;
  left:50%!important;
  bottom:calc(var(--ec81-composer-h) + .55rem + env(safe-area-inset-bottom) + var(--keyboard-offset,0px))!important;
  display:inline-flex!important;
  min-height:2.2rem!important;
  max-width:min(84vw,19rem)!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid rgba(178,108,8,.3)!important;
  border-radius:999px!important;
  padding:.2rem .88rem!important;
  color:#875205!important;
  background:rgba(255,250,240,.99)!important;
  box-shadow:0 .4rem 1.1rem rgba(57,41,18,.14)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
  transform:translateX(-50%)!important;
  font-size:.61rem!important;
  font-weight:900!important;
  white-space:nowrap!important;
  pointer-events:auto!important;
}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v81-latest[hidden]{display:none!important}
body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v81-latest.is-new{
  color:#fff!important;
  border-color:#b9740b!important;
  background:linear-gradient(135deg,#d99a25,#b66e06)!important;
}

@media(max-width:370px){
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .mobile-content{
    padding-inline:.38rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41,
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41.is-compact{
    grid-template-columns:minmax(6.25rem,30%) minmax(0,70%)!important;
    min-height:8.55rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__image,
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__image img,
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__copy{
    min-height:8.55rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-topic-hero-v41__copy{
    padding:.68rem .72rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 #screen-communityPostDetail .post-comment-form.community-v62-composer,
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .post-comment-form.community-v62-composer{
    gap:.28rem!important;
    width:calc(100vw - .6rem)!important;
    padding:.42rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .community-v60-composer-avatar,
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .community-v62-composer-avatar{
    flex-basis:2rem!important;
    width:2rem!important;
    height:2rem!important;
    min-width:2rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer .comment-image-input{
    flex-basis:2.15rem!important;
    width:2.15rem!important;
    height:2.15rem!important;
    min-width:2.15rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer>button[type="submit"]{
    flex-basis:2.35rem!important;
    width:2.35rem!important;
    height:2.35rem!important;
    min-width:2.35rem!important;
    min-height:2.35rem!important;
  }
  body[data-screen="communityPostDetail"].community-topic-frame-v81 .community-v62-composer textarea{
    min-width:6.2rem!important;
    padding-inline:.62rem!important;
  }
}
