/* v116: vista de publicación a pantalla completa
   - Informativa: portada pegada arriba, botón salir y menú encima de la imagen
   - Normal: botón salir arriba del avatar, imágenes debajo del texto y más grandes */

.thread-gallery{margin:.9rem 0 .8rem}
.thread-gallery .thread-gallery-cell{display:block;width:100%;min-width:0;height:auto}

@media (max-width:960px){
  #panel-thread.active{
    position:fixed;inset:0;z-index:50;width:100%;max-width:none;margin:0;padding:0;
    overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    background:var(--void,#0a0713)}
  #panel-thread.active .reply-composer{margin-left:0;margin-right:0;width:100%}

  /* botón salir (común): círculo */
  #panel-thread.active .back-link{
    display:flex;align-items:center;justify-content:center;gap:0;width:2.5rem;height:2.5rem;padding:0;
    border-radius:50%;font-size:0;color:#fff;background:rgba(10,7,19,.55);
    -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
  #panel-thread.active .back-link svg{width:20px;height:20px}

  /* ---------- INFORMATIVA ---------- */
  #panel-thread.is-info-post .back-link{
    position:fixed;z-index:90;top:calc(env(safe-area-inset-top,0px) + .7rem);left:.8rem;margin:0}
  #panel-thread.is-info-post #threadDetail{padding:0}
  #panel-thread.is-info-post .thread-detail-card{border-radius:0;border:0;padding:0 0 .4rem;margin:0}
  #panel-thread.is-info-post .info-post-head{padding:0;margin:0}
  #panel-thread.is-info-post .info-post-banner-btn{border-radius:0;margin:0 0 1.2rem;width:100%}
  #panel-thread.is-info-post .info-post-banner{
    width:100%;height:auto;aspect-ratio:2.17/1;max-height:none;border-radius:0;object-fit:cover;margin:0}
  #panel-thread.is-info-post .info-post-head:not(:has(.info-post-banner-btn)){
    padding-top:calc(env(safe-area-inset-top,0px) + 3.8rem)}
  #panel-thread.is-info-post .info-post-head>:not(.info-post-banner-btn):not(.kebab-menu){
    margin-left:1.2rem;margin-right:1.2rem}
  #panel-thread.is-info-post .info-post-head>.info-tag{display:inline-block}
  #panel-thread.is-info-post .info-post-head>h1{
    font-size:1.45rem;line-height:1.25;margin-top:.5rem;margin-bottom:1.1rem;padding-right:0}
  #panel-thread.is-info-post .post-head{gap:.8rem;margin-bottom:1.2rem}
  #panel-thread.is-info-post .post-head .avatar{width:3.2rem;height:3.2rem}
  #panel-thread.is-info-post .post-author{font-size:1.05rem}
  #panel-thread.is-info-post .info-post-body{font-size:1rem;line-height:1.6;color:#f2ece4}
  #panel-thread.is-info-post .info-post-head>.kebab-menu{
    position:absolute;z-index:90;top:calc(env(safe-area-inset-top,0px) + .7rem);right:.8rem;margin:0}
  #panel-thread.is-info-post .info-post-head>.kebab-menu .kebab-btn{
    width:2.5rem;height:2.5rem;font-size:1.2rem;color:#fff;background:rgba(10,7,19,.55);
    -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
  #panel-thread.is-info-post .thread-detail-reactions{padding:0 1.2rem}
  #panel-thread.is-info-post #threadDetail>:not(.thread-detail-card):not(.reply-composer){
    margin-left:1rem;margin-right:1rem}

  /* ---------- NORMAL ---------- */
  #panel-thread.is-normal-post .back-link{
    position:static;margin:calc(env(safe-area-inset-top,0px) + .7rem) 0 .6rem 1rem;
    background:rgba(255,255,255,.08)}
  #panel-thread.is-normal-post #threadDetail{padding:0 .8rem}
  #panel-thread.is-normal-post .thread-gallery{margin:1rem -1.1rem .8rem;border-radius:0}
}

/* imágenes y videos completos, tamaño normal (sin recorte) */
#threadDetail .thread-gallery{grid-template-columns:1fr;gap:.5rem}
#threadDetail .thread-gallery .thread-gallery-cell{aspect-ratio:auto;max-height:none;height:auto}
#threadDetail .thread-gallery .thread-gallery-cell img{width:100%;height:auto;max-height:none;object-fit:contain}
#threadDetail .thread-detail-card .attach-gallery{display:flex;flex-direction:column;gap:.5rem;margin:.8rem 0}
#threadDetail .thread-detail-card .attach-gallery .attach-image{width:100%;height:auto;max-height:none;border-radius:.6rem}
#threadDetail .thread-detail-card .attach-gallery .attach-image img{width:100%;height:auto;object-fit:contain}
#threadDetail .thread-detail-card .attach-gallery .attach-video video{width:100%;height:auto;max-height:none;object-fit:contain;aspect-ratio:auto}
