/* Shared reading geometry, independent of legacy page-specific overrides. */
html.forum-refined .app{grid-template-columns:360px minmax(0,1fr)!important}
html.forum-refined .sidebar{min-width:0;width:100%;grid-template-columns:minmax(0,1fr)}
html.forum-refined :is(.side-head,.side-filters,.post-list,.side-bottom){min-width:0;width:100%;box-sizing:border-box}
html.forum-refined .post-item{min-width:0;max-width:100%;grid-template-columns:minmax(0,1fr);padding:15px 12px!important}
html.forum-refined .post-item :is(.post-title,.post-excerpt,.post-meta){min-width:0;max-width:100%;overflow-wrap:anywhere}
html.forum-refined .post-thumb{display:none}
html.forum-refined #reader>article .gallery{display:flex;flex-wrap:wrap;align-items:flex-start}
html.forum-refined #reader>article .gallery-item{display:block;max-width:min(400px,100%);width:auto;height:auto;aspect-ratio:auto;overflow:visible;background:transparent}
html.forum-refined #reader>article img{display:inline-block;width:auto!important;height:auto!important;max-width:min(400px,100%)!important;max-height:400px!important;object-fit:contain!important;cursor:zoom-in;vertical-align:middle}
html.forum-refined .article-head:has(.article-seal){position:relative;padding-right:112px;min-height:104px}
html.forum-refined .article-seal{position:absolute;right:3px;top:8px;display:flex;align-items:center;justify-content:center;min-width:86px;height:48px;border:3px double currentColor;border-radius:5px;padding:2px 4px;font-weight:800;font-size:28px;line-height:1;letter-spacing:1px;transform:rotate(10deg);opacity:.85;pointer-events:none;background:transparent}
.article-seal.pending{color:var(--amber)}
.article-seal.approved{color:var(--green)}
.article-seal.rejected{color:var(--red)}
.article-seal.scheduled{color:#00c7be}
.article-seal.completed{color:#0071e3}
.dark-theme .article-seal.scheduled{color:#64fff4}
.dark-theme .article-seal.completed{color:#0a84ff}
html.forum-refined .post-item{position:relative;overflow:hidden;isolation:isolate}
html.forum-refined .post-item .list-seal{left:var(--seal-x,65%);top:var(--seal-y,50%);right:auto;transform:translate(-50%,-50%) rotate(var(--seal-angle,0deg)) scale(2);transform-origin:center;opacity:.30;z-index:0;white-space:nowrap;user-select:none}
html.forum-refined .post-item :is(.post-title,.post-excerpt,.post-meta){position:relative;z-index:1}
html.forum-refined .post-meta{column-gap:12px}
html.forum-refined .dot{display:none}
html.forum-refined #reader>article :is(.article-image-row,.gallery){display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;margin:20px 0}
html.forum-refined #reader>article :is(.article-image-cell,.gallery-item){flex:1 1 160px;min-width:0;max-width:400px;text-align:center;margin:0}
html.forum-refined #reader>article .markdown-body p>img{display:block;margin:12px auto}
.forum-image-dialog{box-sizing:border-box;max-width:none;max-height:none;width:100vw;height:100dvh;margin:0;padding:60px 70px 44px;border:0;background:transparent;color:white;overflow:auto;touch-action:pan-y pinch-zoom}
.forum-image-dialog::backdrop{background:rgba(0,0,0,.65)}
.forum-image-dialog[open]{display:flex;align-items:center;justify-content:center}
.forum-image-dialog img{display:block;max-width:100%;max-height:calc(100dvh - 100px);width:auto;height:auto;object-fit:contain}
.forum-image-dialog button{position:fixed;right:20px;top:16px;border:1px solid #777;border-radius:8px;padding:8px 14px;background:#222;color:#fff;cursor:pointer}
.forum-image-dialog :is(.image-prev,.image-next){top:50%;transform:translateY(-50%);width:44px;height:56px;padding:0;font-size:30px;background:rgba(0,0,0,.35);border-color:#ffffff60}
.forum-image-dialog .image-prev{left:14px;right:auto}
.forum-image-dialog .image-next{right:14px}
.forum-image-dialog .image-count{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);font-size:14px;background:#0006;padding:5px 12px;border-radius:20px}
.forum-image-dialog [hidden]{display:none!important}
@media(max-width:600px){.forum-image-dialog{padding-left:12px;padding-right:12px}.forum-image-dialog .image-prev{left:8px}.forum-image-dialog .image-next{right:8px}}
@media(min-width:901px) and (max-width:1100px){html.forum-refined .app{grid-template-columns:320px minmax(0,1fr)!important}}
@media(max-width:900px){html.forum-refined .app{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:500px){html.forum-refined .article-head:has(.article-seal){padding-right:0;padding-top:64px}html.forum-refined .article-seal{top:0;right:4px}}

html.forum-refined #reader>article img{display:block;margin-left:auto;margin-right:auto}
html.forum-refined .top-title span{white-space:pre}
/* Replies must fit within their grid track after adding the thread indent. */
html.forum-refined .reader>.comments{min-width:0;padding-right:42px!important}
html.forum-refined .comment-list{min-width:0;grid-template-columns:minmax(0,1fr)}
html.forum-refined .comment{box-sizing:border-box;min-width:0;width:100%;max-width:100%;overflow-wrap:anywhere}
html.forum-refined .comment.is-reply{margin-left:24px;width:calc(100% - 24px)}
html.forum-refined :is(.comment-body,.comment-meta,.comment-meta>span,.reply-context){min-width:0;overflow-wrap:anywhere}
@media(min-width:901px) and (max-width:1100px){html.forum-refined .reader>.comments{padding-right:28px!important}}
@media(max-width:900px){html.forum-refined .reader>.comments{padding-right:21px!important}html.forum-refined .comment.is-reply{margin-left:16px;width:calc(100% - 16px);padding-left:12px}}
