.community-panel{padding:clamp(12px,2vw,28px);border:1px solid #b99549;border-radius:14px;background-color:#081b27;background-size:cover;background-position:center;background-attachment:fixed;color:#e9f0f4;min-width:0}
.community-panel[hidden]{display:none}.community-panel>h2{font:700 clamp(24px,3vw,36px) Georgia,serif;color:#ebc873;margin:0 0 18px;text-shadow:0 2px 6px #000}
.community-card,.community-board{padding:18px;margin:12px 0;border:1px solid #385364;border-radius:12px;background:rgba(5,22,32,.95);min-width:0;overflow-wrap:anywhere}
.community-card h3{color:#edcc82;margin:0 0 14px}.community-card small{display:block;color:#a9c3d2;margin-top:6px}.community-node{display:flex;align-items:center;justify-content:space-between;gap:16px}.community-node>a{font-size:17px;font-weight:700}
.community-board{border-left:3px solid #b99549}.community-board summary{cursor:pointer;font-size:19px;color:#e9cc8b;padding:5px 0}.community-type{font:12px Arial,sans-serif;border:1px solid #536676;border-radius:20px;padding:4px 8px;margin-left:12px;color:#c2d2db}.community-board .community-board{margin-left:16px}.community-board .community-node{margin-left:16px}
.community-actions,.community-crumb{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}.community-actions button,.community-panel button,.community-link{min-height:42px;border-radius:7px}.community-panel button{padding:8px 12px;border:1px solid #456579;background:#0c2838;color:#e7f1f5;cursor:pointer}.community-panel button:hover{border-color:#d9b764}.community-panel button[aria-pressed=true],.community-panel button.primary{background:linear-gradient(#f0cf83,#b58b3b);border-color:#f3d794;color:#17130b}.community-panel button:disabled{opacity:.55;cursor:wait}.community-link{display:inline-flex;align-items:center;color:#e9c875;text-decoration:none;padding:4px 0}.community-link:hover{text-decoration:underline}.community-panel :focus-visible{outline:2px solid #6de1ef;outline-offset:3px}
.community-field{display:flex;flex-direction:column;gap:7px;margin:12px 0;color:#bfd3df;font-size:14px;flex:1;min-width:0}.community-field input,.community-field textarea,.community-panel select{box-sizing:border-box;width:100%;padding:11px;border:1px solid #456579;border-radius:7px;color:#f2f4f6;background:#091b27;font:16px Arial,sans-serif}.community-field textarea{resize:vertical;line-height:1.55;min-height:170px}.community-field input[type=checkbox]{width:22px;height:22px}.community-panel .message{background:#0a1c27;border-radius:6px;padding:0 8px}.community-panel .hint{color:#b9cbd7;font-size:14px;line-height:1.5}
.community-body{line-height:1.65;font-family:var(--chat-font,Arial,sans-serif);overflow-wrap:anywhere}.community-body p{white-space:pre-wrap;margin:8px 0;min-height:.45em}.community-body h3,.community-body h4,.community-body h5{color:#e8c779;margin:20px 0 8px}.community-body blockquote{margin:10px 0;border-left:3px solid #bc9951;padding:8px 14px;color:#c2d4df;background:#112c3a;white-space:pre-wrap}.community-body figure{margin:16px 0}.community-body figure>img{max-width:100%;max-height:640px;object-fit:contain;border-radius:8px}.community-body .mc-emote{width:40px;height:40px;object-fit:contain;vertical-align:middle}
.community-author{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0;color:#a8bfce}.community-author time{font-size:12px}.community-author button:first-child{padding:0;background:none;border:0}.community-author .mc-avatar{width:52px;height:52px;flex:0 0 52px}.community-author button:nth-child(2){color:#efcb75;font-weight:bold;background:none;border:0}
.community-preview{padding:16px;border:1px dashed #b79a5d;border-radius:8px;background:#0b202d}.community-preview[hidden],.community-emoji[hidden]{display:none}.community-emoji{padding:12px;border:1px solid #385565;border-radius:8px;background:#081e2b}.community-emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:6px;max-height:260px;overflow:auto}.community-emoji-grid button{padding:3px;min-height:48px}.community-emoji-grid .mc-emote{width:40px;height:40px;object-fit:contain}.community-page-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.community-page-list .community-card{margin:0}.community-crumb{background:#071d29;padding:8px 14px;border-radius:8px}.community-crumb>a{font-size:14px}
@media(max-width:600px){.community-panel{padding:10px;background-attachment:scroll}.community-card,.community-board{padding:12px}.community-board .community-board,.community-board .community-node{margin-left:5px}.community-node{display:block}.community-author .mc-avatar{width:46px;height:46px;flex-basis:46px}.community-actions{gap:6px}.community-actions>.community-field{flex-basis:100%}.community-panel button{font-size:13px}.community-page-list{grid-template-columns:1fr}.community-type{display:inline-block;margin:6px 0 0 8px}}

/* Compact forum overview and editor, scoped to community components. */
#community-panel .forum-search{display:flex;align-items:center;gap:6px;margin:8px 0 12px;padding:0;border:0;background:transparent}
#community-panel .forum-search>.community-field{font-size:0;margin:0;flex:1 1 150px;gap:0}
#community-panel .forum-search input{height:40px;min-height:40px;padding:7px 9px;font-size:16px}
#community-panel .forum-search button{height:40px;min-height:40px;padding:6px 10px;font-size:13px}
#community-panel .forum-search .community-link{min-height:36px;padding:2px 4px;font-size:12px}
#community-panel .community-tree .community-board{padding:6px 10px;margin:7px 0;border-radius:8px}
#community-panel .community-tree .community-board>summary{display:list-item;min-height:44px;padding:10px 0;font-size:16px;line-height:1.4}
#community-panel .community-tree .community-type{float:right;margin-left:6px;font-size:11px;padding:2px 6px;font-weight:400}
#community-panel .community-tree .community-board>summary strong{font-size:16px}
#community-panel .community-tree .community-board .hint{font-size:13px;margin:4px 0 8px}
#community-panel .community-tree .community-actions{margin:6px 0;gap:5px}
#community-panel .community-tree .community-actions button{font-size:12px;padding:6px 8px;min-height:40px}
#community-panel .community-tree .community-node{padding:8px 10px;margin:6px 0;gap:8px;flex-wrap:wrap}
#community-panel .community-tree .community-node>a{font-size:14px;min-height:36px}
#community-panel .community-tree .community-node>small{font-size:11px;margin:0}
#community-panel .community-tree .community-board .community-board,#community-panel .community-tree .community-board .community-node{margin-left:5px}
.community-font-label{display:flex;align-items:center;gap:7px;font:13px Arial,sans-serif}.community-font-label select{width:auto;max-width:210px;padding:7px;font-size:15px;min-height:40px}
.community-compose>.community-actions{gap:5px;margin:6px 0}.community-compose>.community-actions button{font-size:12px;min-height:40px;padding:6px 9px}
.community-compose .community-field textarea{min-height:170px;font-size:18px;line-height:1.5}
.community-video{margin:12px 0;border:1px solid #526471;border-radius:8px;padding:12px;background:#081e2b;font:14px/1.4 Arial,sans-serif}
.community-video p{font-size:12px}.community-video iframe{width:100%;aspect-ratio:16/9;min-height:200px;border:0;display:block}.community-video a{display:inline-block;margin-left:10px;color:#edca82;font-size:12px}

#community-panel .forum-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 6px}
#community-panel .forum-search .community-link{min-height:24px;padding:0 3px}
@media(min-width:600px){#community-panel .forum-search{grid-template-columns:minmax(180px,1fr) auto auto auto}}

#community-panel .community-body .mc-text{font-family:inherit}

#community-panel .community-card>.community-actions{gap:5px;margin:8px 0 0}
#community-panel .community-card>.community-actions button{min-height:34px;padding:5px 8px;font-size:12px;line-height:1.3;background:#0c2531;border-color:#354c57;box-shadow:none}
#community-panel .community-card>.community-actions button[aria-pressed=true]{background:#51462b;color:#ffe4a3;border-color:#a98c51}
#community-panel .community-card>.community-actions select{width:auto;max-width:220px;min-height:34px;padding:5px 7px;font-size:13px}
#community-panel .forum-search .forum-read-all{grid-column:1/-1;justify-self:start;font-size:11px;height:24px;min-height:24px;background:transparent;border-color:#354c57;padding:3px 7px}

#community-panel .forum-unread-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;margin-left:7px;vertical-align:middle;border-radius:9px;background:#9c3d4c;color:#fff;font:600 11px/1 Arial,sans-serif;text-shadow:none;flex-shrink:0}
#community-panel .community-board[data-unread=true],#community-panel .community-node[data-unread=true]{border-left:3px solid #548f96;background:#0b2730}
#community-panel .community-board[data-unread=false],#community-panel .community-node[data-unread=false]{border-left:3px solid #41535e;background:#071922}
#community-panel .community-node[data-unread=false]>a,#community-panel .community-board[data-unread=false]>summary{color:#bcc8cb}

.community-body .forum-image-open{display:block;max-width:100%;padding:0;border:0;background:transparent;cursor:zoom-in}.forum-image-dialog{box-sizing:border-box;width:min(96vw,1400px);max-width:96vw;max-height:94dvh;padding:12px;border:1px solid #b99551;border-radius:10px;background:#071c2b;color:#eef4f6}.forum-image-dialog::backdrop{background:#000c}.forum-image-dialog>button{display:block;margin:0 0 10px auto;min-height:44px}.forum-image-viewport{max-height:calc(94dvh - 85px);overflow:auto;overscroll-behavior:contain}.forum-image-zoom{display:block;border:0;padding:0;margin:auto;background:transparent;max-width:100%;cursor:zoom-in}.forum-image-zoom img{display:block;max-width:100%;max-height:calc(94dvh - 90px);width:auto;height:auto;object-fit:contain}.forum-image-zoomed .forum-image-zoom{max-width:none;cursor:zoom-out}.forum-image-zoomed .forum-image-zoom img{max-width:none;max-height:none}

/* The image is inside a button now: the former figure > img rule no longer applies. */
.community-body figure{min-width:0;max-width:100%}.community-body .forum-image-open{box-sizing:border-box;width:100%;min-width:0;max-width:100%;overflow:hidden}.community-body .forum-image-open img{display:block;max-width:100%;max-height:640px;width:auto;height:auto;object-fit:contain;border-radius:8px}.forum-image-controls{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.forum-image-controls button{min-height:44px;padding:8px 14px;font-size:16px}.forum-image-zoom{box-sizing:border-box;width:max-content;min-width:0}.forum-image-zoomed .forum-image-zoom{width:max-content}.forum-image-dialog{overflow:hidden}

.forum-existing-images .community-body{display:flex;flex-wrap:wrap;gap:8px}.forum-existing-images figure{width:140px;margin:4px 0}.forum-existing-images .forum-image-open img{max-height:110px}.forum-pending-preview{display:flex;flex-wrap:wrap;gap:8px}.forum-pending-preview img{width:140px;max-width:100%;height:110px;object-fit:contain}

/* Isolated touch viewer: no image button, no inherited image size limits. */
#community-panel .fv-dialog,.fv-dialog{box-sizing:border-box;width:98vw;max-width:1500px;height:94dvh;max-height:94dvh;padding:8px;border:1px solid #56727d;border-radius:8px;background:#071c2b;color:#eef4f6;overflow:hidden}
.fv-dialog::backdrop{background:#000c}#community-panel .fv-bar,.fv-bar{display:flex;align-items:center;gap:6px;height:48px;margin:0 0 8px}#community-panel .fv-bar button,.fv-bar button{box-sizing:border-box;min-width:44px;min-height:44px;padding:6px 10px;margin:0;font-size:16px;touch-action:manipulation}.fv-bar button:last-child{margin-left:auto!important}.fv-scale{font-size:14px;white-space:nowrap;min-width:42px;text-align:center}
#community-panel .fv-stage,.fv-stage{position:relative;width:100%;height:calc(100% - 56px);min-height:0;overflow:hidden;touch-action:none;user-select:none;cursor:grab}#community-panel .fv-stage:active,.fv-stage:active{cursor:grabbing}
#community-panel .fv-stage>.fv-image,.fv-stage>.fv-image{position:absolute!important;left:0!important;top:0!important;display:block!important;max-width:none!important;max-height:none!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;object-fit:fill!important;transform-origin:0 0;pointer-events:none;user-select:none}
@media(max-width:600px){#community-panel .fv-dialog,.fv-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:6px;border:0;border-radius:0}.fv-bar{gap:3px!important}.fv-bar button{padding:6px!important;font-size:14px!important}}

.forum-image-picker input[type=file]{display:none!important}.forum-image-picker img{display:block;object-fit:contain;width:120px;height:90px;max-width:100%}
