/* Shared responsive attachments: list images in unused right-side space. */
.community-post-body{display:flex;align-items:flex-start;gap:14px;min-width:0}
.community-post-body>.community-post-title{flex:1 1 auto;min-width:0;margin-bottom:0}
.community-post-thumbnail{
 display:block;flex:0 0 106px;width:106px;height:76px;
 overflow:hidden;border-radius:9px;
 border:1px solid var(--sg-border-346d73,#346d73);
 background:var(--sg-bg-102f44,#102f44);
}
.community-post-thumbnail img{display:block;width:100%;height:100%;object-fit:cover;margin:0}
.community-post-thumbnail[hidden]{display:none!important}
/* All ordinary posts share a fixed card height, regardless of attachment or text length. */
.community-post:not(.hot-post){
 box-sizing:border-box;position:relative;display:flex;flex-direction:column;
 height:108px;min-height:108px;max-height:108px;
}
.community-post:not(.hot-post) .community-post-meta{flex:0 0 auto;min-width:0}
.community-post:not(.hot-post) .community-post-meta time{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.community-post:not(.hot-post) .community-post-meta button{flex-shrink:0}
.community-post:not(.hot-post) .community-post-body{flex:1 1 0;min-height:0;overflow:hidden}
.community-post:not(.hot-post) .community-post-title{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 overflow:hidden;max-height:2.9em;line-height:1.45;
}
@media(min-width:781px){
 .community-post:not(.hot-post).has-image{
  padding-right:calc(clamp(116px,16vw,160px) + 28px);
 }
 .community-post:not(.hot-post).has-image .community-post-thumbnail{
  position:absolute;top:12px;right:14px;bottom:12px;
  flex:none;width:clamp(116px,16vw,160px);height:auto;min-height:0;
 }
 /* Only attached HOT posts retain the expanded editorial card. */
 .community-hot .hot-post.has-image{
  position:relative;min-height:236px;
  padding:18px 20px;
  padding-right:calc(clamp(200px,29vw,296px) + 40px);
 }
 .community-hot .hot-post.has-image .community-post-body{
  min-height:166px;align-items:flex-start;
 }
 .community-hot .hot-post.has-image .community-post-thumbnail{
  position:absolute;top:18px;right:20px;bottom:18px;
  flex:none;width:clamp(200px,29vw,296px);
  height:auto;min-height:0;border-radius:12px;
 }
}
@media(max-width:780px){
 .community-post:not(.hot-post){height:104px;min-height:104px;max-height:104px}
 .community-post:not(.hot-post) .community-post-thumbnail{height:100%;min-height:0}
}
/* Post details: full-width attachment below text, preserving aspect ratio. */
.post-dialog-body{min-width:0}
.post-dialog-body.has-image{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start}
.post-dialog-body .post-dialog-content{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere}
.post-dialog-body .community-attachment-picture{min-width:0;width:100%}
.post-dialog-body .community-attachment-picture img{
 display:block;box-sizing:border-box;width:100%;max-width:100%;height:auto;max-height:none;
 object-fit:contain;margin:0;
 border:1px solid var(--sg-border-346d73,#346d73);border-radius:10px;
}
/* Comments and replies: keep short text from being forced below a large image. */
.comment-item-body{min-width:0}
.comment-item-body.has-image{display:grid;grid-template-columns:minmax(0,1fr) minmax(92px,150px);gap:12px;align-items:start}
.comment-item-body>p{min-width:0}
.comment-item-body .comment-attachment{min-width:0}
.comment-item-body .comment-attachment img{
 display:block;width:100%;height:auto;max-height:175px;object-fit:contain;
 margin:0;border-radius:9px;border:1px solid var(--sg-border-346d73,#346d73);
}
@media(max-width:780px){
 .community-post-body{gap:10px}
 .community-post-thumbnail{flex-basis:78px;width:78px;height:70px}
}
@media(max-width:620px){
 .comment-item-body.has-image{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .comment-item-body .comment-attachment img{width:auto;max-width:100%;max-height:210px}
 .community-post-thumbnail{flex-basis:72px;width:72px;height:66px}
}
