/* Forum: one reading surface, clear authors and quiet supporting actions. */
.community-page { --forum-accent:#32664c; --forum-accent-hover:#27543e; --forum-soft:#edf3ef; --forum-muted:#626963; --forum-border:#dfe4e0; margin:0; min-height:100vh; background:var(--cr-bg,#f5f5f7); color:var(--cr-text,#1d1d1f); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; }
.community-main { max-width:1000px; margin:auto; padding:28px 28px 64px; }
.community-main *, .community-dialog * { box-sizing:border-box; }
.community-page-head,.community-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.community-page-head { margin-bottom:24px; }
.community-heading { min-width:0; }
.community-page-head h1 { font-size:26px; line-height:1.4; margin:10px 0 6px; font-weight:700; }
.community-page-head p { margin:0; }
.community-back,.community-source { color:var(--forum-accent); text-decoration:none; }
.community-back { display:inline-flex; align-items:center; min-height:32px; font-size:13px; }
.community-muted,.community-intro { color:var(--forum-muted); font-size:14px; line-height:1.7; }
.community-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:9px 16px; border:1px solid transparent; border-radius:8px; font-family:inherit; font-size:14px; font-weight:600; line-height:1.4; text-decoration:none; cursor:pointer; text-align:center; touch-action:manipulation; transition:background-color 160ms,color 160ms,border-color 160ms; }
.community-primary { background:var(--forum-accent); color:#fff; }
.community-primary:hover:not(:disabled) { background:var(--forum-accent-hover); }
.community-quiet { background:var(--cr-bg-card,#fff); border-color:var(--forum-border); color:var(--cr-text,#1d1d1f); }
.community-quiet:hover:not(:disabled),.community-text-button:hover:not(:disabled) { background:var(--forum-soft); color:var(--forum-accent); }
.community-text-button { background:transparent; color:var(--forum-muted); padding:8px 10px; font-weight:500; }
.community-button:disabled { opacity:.55; cursor:default; }
.community-button:focus-visible,.community-main a:focus-visible,.community-main input:focus-visible,.community-main textarea:focus-visible,.community-main select:focus-visible,.community-dialog :focus-visible { outline:2px solid var(--forum-accent); outline-offset:3px; }
.community-card { min-width:0; background:transparent; border:0; border-radius:0; padding:0; }
.community-button:hover:not(:disabled) { filter:none; }
.community-inline,.community-actions,.community-toolbar,.community-pagination { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.community-inline input { flex:1; min-width:140px; }
.community-main label,.community-dialog label { display:block; font-weight:600; font-size:14px; margin:0 0 8px; }
.community-main input,.community-main textarea,.community-main select,.community-dialog input,.community-dialog textarea,.community-dialog select { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--forum-border); border-radius:8px; background:var(--cr-bg-card,#fff); color:var(--cr-text,#1d1d1f); font:16px/1.5 inherit; font-family:inherit; font-size:16px; line-height:1.5; }
.community-main input::placeholder,.community-main textarea::placeholder,.community-dialog input::placeholder,.community-dialog textarea::placeholder { color:var(--forum-muted); opacity:1; }
.community-main textarea,.community-dialog textarea { resize:vertical; min-height:112px; }
.community-dialog input,.community-dialog textarea,#community-reply-body { margin-bottom:14px; }
.community-toolbar { margin:0 0 12px; gap:8px 12px; }
.community-filter { display:flex; align-items:center; gap:8px; min-width:0; }
.community-toolbar label { margin:0; color:var(--forum-muted); font-size:13px; font-weight:500; }
.community-toolbar select { width:auto; min-width:124px; font-size:14px; }
#forum-search { margin:0 0 18px; }
#forum-query { min-width:140px; max-width:100%; }
.community-list { background:var(--cr-bg-card,#fff); border:1px solid var(--forum-border); border-radius:12px; overflow:hidden; }
.community-topic-link { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:18px; padding:18px 22px; border-bottom:1px solid var(--forum-border); color:inherit; text-decoration:none; min-width:0; }
.community-topic-link:last-child { border-bottom:0; }
.community-topic-link:hover { background:var(--forum-soft); }
.community-topic-summary { min-width:0; }
.community-topic-link h2 { color:var(--cr-text,#1d1d1f); margin:0 0 8px; font-size:17px; line-height:1.5; font-weight:600; overflow-wrap:anywhere; }
.community-topic-count { font-size:13px; color:var(--forum-muted); white-space:nowrap; }
.community-meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; font-size:13px; color:var(--forum-muted); overflow-wrap:anywhere; }
.community-author-name { color:var(--cr-text,#1d1d1f); font-weight:600; }
.community-avatar { display:grid; place-items:center; width:30px; height:30px; flex-shrink:0; border-radius:50%; background:var(--forum-soft); color:var(--forum-accent); font-size:13px; font-weight:600; }
.community-topic-link .community-avatar { display:none; }
.community-topic-link .community-meta { font-size:12px; gap:4px 10px; }
.community-topic-link .community-author-name { color:var(--forum-muted); font-weight:400; }
.community-badge { display:inline-block; background:var(--forum-soft); color:var(--forum-accent); padding:2px 6px; border-radius:4px; font-size:12px; line-height:1.5; }
.community-body,.community-excerpt { max-width:75ch; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.85; font-size:16px; margin:20px 0 8px; }
.community-excerpt { color:var(--forum-muted); }
.community-source { display:block; font-size:13px; line-height:1.7; overflow-wrap:anywhere; margin:12px 0; }
a.community-source { display:inline-flex; align-items:center; min-height:44px; text-decoration:underline; text-underline-offset:3px; }
.community-thread-view .community-page-head { margin-bottom:14px; min-height:44px; }
.community-thread-view .community-heading > h1,.community-thread-view .community-heading > p,.community-thread-view .community-heading > .community-back { display:none; }
.community-thread-view #community-back { padding-left:0; color:var(--forum-accent); font-weight:600; }
.community-thread-view #community-new-topic { background:transparent; color:var(--forum-accent); border-color:var(--forum-border); transition:none; }
.community-thread-view #community-new-topic:hover:not(:disabled) { background:var(--forum-soft); }
.community-reading { border:1px solid var(--forum-border); border-radius:12px; background:var(--cr-bg-card,#fff); overflow:hidden; }
#community-topic { margin-top:0; padding:28px 32px 16px; }
.community-topic-title { margin:0 0 16px; font-size:26px; line-height:1.5; font-weight:700; overflow-wrap:anywhere; text-wrap:pretty; }
.community-post-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:4px; }
.community-post-actions .community-button { font-size:12px; }
.community-reply-jump { display:inline-flex; align-items:center; min-height:44px; margin-right:auto; color:var(--forum-accent); font-size:13px; font-weight:600; text-decoration:none; }
.community-reply-jump:hover { text-decoration:underline; text-underline-offset:3px; }
#community-moderation { margin:0 32px 18px; padding:12px 0; border-top:1px solid var(--forum-border); }
#community-moderation .community-button { font-size:13px; }
.community-identities { margin:0 32px 20px; padding:16px; border:1px solid var(--forum-border); border-radius:8px; overflow-wrap:anywhere; }
.community-identities p { margin:8px 0; line-height:1.7; }
.community-replies-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 32px; padding:12px 0; border-top:1px solid var(--forum-border); }
.community-replies-heading { font-size:16px; font-weight:600; margin:0; }
.community-replies-head .community-button { border-color:transparent; background:transparent; color:var(--forum-muted); font-size:12px; font-weight:500; padding:8px; }
#community-replies { display:block; margin:0 32px; }
.community-reply { padding:18px 0 10px; border-top:1px solid var(--forum-border); }
.community-reply .community-body { margin:12px 0 2px 40px; }
.community-reply > .community-source,.community-reply > .community-muted { margin-left:40px; }
.community-reply .community-meta time { margin-left:auto; }
#community-replies > .community-muted { padding:16px 0 24px; margin:0; }
#community-more-replies { margin:12px 32px 20px; }
#community-reply-form { margin:0; padding:22px 32px 28px; border-top:1px solid var(--forum-border); }
.community-compose-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; margin-bottom:12px; }
.community-compose-head label { margin:0; font-size:15px; }
.community-identity { color:var(--forum-muted); font-size:13px; margin:0; }
.community-identity button { min-height:32px; padding:3px 4px; border:0; background:transparent; color:var(--forum-accent); font:inherit; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.community-pagination { justify-content:center; margin-top:24px; font-size:13px; color:var(--forum-muted); }
.community-message { margin:12px 0; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.community-message:empty { display:none; }
.community-error { color:#b52c22; }
.community-empty { text-align:center; padding:42px 24px; color:var(--forum-muted); line-height:1.8; }
.community-hidden { opacity:.7; }
.community-position { max-width:320px; margin:18px 0; }
.community-position figcaption { margin-bottom:8px; }
.community-mini-board { display:grid; grid-template-columns:repeat(8,1fr); width:100%; aspect-ratio:1; border:1px solid #8b7963; overflow:hidden; }
.community-square { position:relative; aspect-ratio:1; background:#f5e9d5; }
.community-dark-square { background:#b78a63; }
.community-square img { display:block; width:100%; height:100%; padding:2px; }
.community-rank,.community-file { position:absolute; font-size:10px; font-weight:700; line-height:1; color:#4b3426; pointer-events:none; }
.community-rank { top:2px; left:2px; }
.community-file { bottom:2px; right:2px; }
.community-dialog { --forum-accent:#32664c; --forum-accent-hover:#27543e; --forum-soft:#edf3ef; --forum-muted:#626963; --forum-border:#dfe4e0; width:min(560px,calc(100vw - 24px)); max-height:min(860px,calc(100dvh - 32px)); overflow-y:auto; overscroll-behavior:contain; padding:24px; border:1px solid var(--forum-border); border-radius:12px; background:var(--cr-bg-card,#fff); color:var(--cr-text,#1d1d1f); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; margin:auto; box-sizing:border-box; }
.community-dialog { box-shadow:none; }
.community-dialog::backdrop { background:rgba(20,24,30,.46); }
.community-dialog-head h2 { font-size:20px; margin:0; }
.community-dialog .community-intro { margin:16px 0 8px; }
.community-dialog form { margin-top:18px; }
.forum-assistant-opt { display:flex; align-items:center; gap:8px; }
.forum-assistant-opt input { width:auto; }
.community-page [hidden],.community-dialog [hidden] { display:none !important; }
html[data-theme=dark] .community-page,html[data-theme=dark] .community-dialog { --cr-bg:#171c19; --cr-bg-card:#202722; --cr-text:#eef2ef; --forum-accent:#a7d9b7; --forum-accent-hover:#b9e7c7; --forum-soft:#253b2e; --forum-muted:#b1b8b3; --forum-border:#404640; color-scheme:dark; }
html[data-theme=dark] .community-primary { color:#163121; }
html[data-theme=dark] .community-page #cr-nav-root { --cr-bg:#f5f5f7; --cr-bg-card:#fff; --cr-text:#1d1d1f; --cr-text-secondary:#666; background:#fff; color:#1d1d1f; color-scheme:light; }
html[data-theme=dark] .community-error { color:#ffaba3; }
@media (max-width:600px) {
 .community-main { padding:18px 12px 36px; }
 .community-page-head { gap:10px; align-items:flex-start; margin-bottom:20px; }
 .community-page-head h1 { font-size:24px; }
 .community-page-head .community-actions { flex-shrink:0; gap:6px; }
 .community-page-head .community-actions .community-button { padding:9px 12px; }
 .community-page-head .community-actions:has(#forum-manage-link:not([hidden])) { max-width:88px; justify-content:flex-end; }
 .community-thread-view .community-page-head { align-items:center; }
 .community-toolbar { gap:6px 8px; }
 .community-toolbar select { min-width:112px; max-width:100%; padding-right:28px; }
 .community-topic-link { padding:15px 16px; gap:12px; }
 .community-topic-link h2 { font-size:16px; }
 .community-topic-count { font-size:12px; }
 #community-topic { padding:22px 18px 12px; }
 .community-topic-title { font-size:22px; margin-bottom:14px; }
 .community-body { margin-top:18px; }
 .community-replies-head,#community-replies { margin-left:18px; margin-right:18px; }
 .community-reply .community-body { margin-left:0; }
 .community-reply > .community-source,.community-reply > .community-muted { margin-left:0; }
 .community-reply .community-meta time { margin-left:0; }
 #community-reply-form { padding:20px 18px 24px; }
 #community-moderation,.community-identities { margin-left:18px; margin-right:18px; }
 #community-more-replies { margin-left:18px; }
 .community-dialog { padding:18px; }
 .community-dialog .community-actions > * { flex:1 1 120px; }
}
@media (prefers-reduced-motion:reduce) { .community-button { transition:none; } }

/* Keep replies to replies at one readable depth. */
.community-reply-children { margin:0 0 12px 40px; padding:0 0 0 18px; border-left:1px solid var(--forum-border); }
.community-child-reply .community-body { margin-left:0; }
.community-reply-context { font-size:12px; color:var(--forum-muted); margin:10px 0 6px; overflow-wrap:anywhere; }
.community-reply-to { margin-right:auto; color:var(--forum-accent); font-weight:600; }
.community-child-reply .community-post-actions { margin-top:0; }
.community-reply-target { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; margin:0 0 12px; border-radius:8px; background:var(--forum-soft); color:var(--forum-accent); font-size:13px; line-height:1.6; }
.community-reply-target > span { min-width:0; overflow-wrap:anywhere; }
.community-reply-target button { flex-shrink:0; }
.community-parent-unavailable { margin:0; padding:12px 0; }
@media (max-width:600px) { .community-reply-children { margin-left:12px; padding-left:12px; } }
