:root{color-scheme:dark;--page:#100b1c;--surface:#21182f;--surface2:#2b203d;--stroke:#52436b;--text:#f6f0ff;--muted:#c6b9d8;--accent:#b59af1;--button:#624396;--link:#d3bdff}
:root[data-theme=light]{color-scheme:light;--page:#f4edfa;--surface:#fffaff;--surface2:#efe4f7;--stroke:#c5a9df;--text:#2e1c43;--muted:#675477;--accent:#7046a0;--button:#8758b6;--link:#65408c}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--page);color:var(--text);font:14px/1.5 Tahoma,"Segoe UI",Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}a{color:var(--link)}[hidden]{display:none!important}
.forum-page{margin:auto;padding:17px;max-width:1350px;min-height:570px}
.forum-topline,.forum-toolbar,.forum-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}.forum-topline{padding:10px 2px 18px}.forum-topline strong{font-size:19px}.forum-topline span{margin-left:10px;color:var(--muted);font-size:13px}.forum-topline #forum-auth{display:flex;align-items:center;gap:9px;font-size:13px}.forum-toolbar{background:var(--surface);border:1px solid var(--stroke);border-radius:9px;padding:11px;margin-bottom:16px}.forum-tools-left,.forum-tools-right{display:flex;align-items:center;gap:9px;min-width:0;flex-wrap:wrap}button,select,input,textarea{border-radius:6px;border:1px solid var(--stroke);background:var(--surface2);color:var(--text);padding:9px 12px}button.secondary{background:transparent}button.primary{background:var(--button);color:#fff;font-weight:800;border-color:transparent}button:hover{filter:brightness(1.13)}button:disabled{opacity:.5;cursor:default}input[type=search]{min-width:190px}#forum-alert{border:1px solid var(--stroke);padding:11px 14px;margin:12px 0;border-radius:7px;background:var(--surface);color:var(--text)}.section-head{font-size:17px;font-weight:800;margin:22px 2px 11px;display:flex;align-items:baseline;justify-content:space-between;gap:8px}.section-head small{font-size:12px;color:var(--muted);font-weight:400}
.forum-category-list,.forum-thread-list,.forum-post-list{border:1px solid var(--stroke);border-radius:9px;overflow:hidden;background:var(--surface)}.forum-category-row,.forum-thread-row{display:grid;grid-template-columns:minmax(0,1fr) 94px 106px;gap:10px;align-items:center;padding:16px 18px;border-bottom:1px solid var(--stroke);text-decoration:none;color:var(--text)}.forum-category-row:last-child,.forum-thread-row:last-child{border-bottom:0}.forum-category-row:hover,.forum-thread-row:hover{background:var(--surface2)}.forum-row-title{display:block;font-weight:800;font-size:15px;color:var(--link);text-decoration:none;overflow-wrap:anywhere}.forum-row-subtitle{display:block;color:var(--muted);font-size:12px;line-height:1.55;margin-top:4px}.forum-row-stats{text-align:center;color:var(--muted);font-size:12px}.forum-row-stats strong{display:block;font-size:15px;color:var(--text)}.forum-row-last{font-size:11px;color:var(--muted);text-align:right;overflow-wrap:anywhere}.forum-tag{display:inline-block;font-size:11px;font-weight:700;padding:2px 7px;border:1px solid var(--stroke);border-radius:4px;color:var(--accent);margin-right:7px}.forum-empty,.forum-loading{padding:35px 18px;text-align:center;color:var(--muted)}.forum-pager{display:flex;align-items:center;justify-content:center;gap:11px;margin:18px 0}.forum-pager span{color:var(--muted)}.forum-pager button{min-width:78px}
.thread-header{background:var(--surface);border:1px solid var(--stroke);border-radius:9px;padding:18px;margin-bottom:14px}.thread-header h2{font-size:clamp(20px,3vw,26px);margin:7px 0;overflow-wrap:anywhere}.thread-meta{font-size:12px;color:var(--muted)}.thread-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}.forum-post{display:grid;grid-template-columns:170px minmax(0,1fr);border-bottom:1px solid var(--stroke);min-height:130px}.forum-post:last-child{border-bottom:0}.forum-author{padding:18px 12px;background:var(--surface2);overflow-wrap:anywhere;border-right:1px solid var(--stroke)}.forum-author strong{display:block;color:var(--link)}.avatar{display:grid;place-items:center;width:48px;height:48px;border-radius:10px;border:1px solid var(--stroke);margin-bottom:9px;background:var(--surface);font-size:22px;color:var(--accent)}.forum-author small{color:var(--muted)}.forum-post-content{padding:16px 19px;min-width:0}.post-header{display:flex;justify-content:space-between;gap:10px;padding-bottom:11px;border-bottom:1px solid var(--stroke);color:var(--muted);font-size:12px}.post-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75;min-height:60px;margin:16px 0 26px}.post-actions{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap}.post-actions button{padding:4px 9px;font-size:12px}.forum-footer{margin-top:28px;padding:16px 2px;border-top:1px solid var(--stroke);color:var(--muted);font-size:11px}
#forum-dialog{border:1px solid var(--stroke);border-radius:12px;background:var(--surface);color:var(--text);width:min(660px,calc(100% - 24px));padding:22px;max-height:92dvh}#forum-dialog::backdrop{background:#05020aca}.dialog-title,.dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-title h2{margin:0}.dialog-title button{border:0;background:transparent;font-size:29px}.forum-form-fields{display:grid;gap:10px}.forum-form-fields label,#forum-body-label{display:block;margin-top:15px;font-weight:750}.forum-form-fields input,.forum-form-fields select,#forum-body{width:100%;resize:vertical}#forum-body{margin-top:8px;min-height:130px}.dialog-footer{margin-top:12px}.dialog-footer span{color:var(--muted);font-size:11px}
@media(max-width:670px){.forum-page{padding:10px}.forum-toolbar{align-items:stretch}.forum-tools-right{width:100%}.forum-tools-right input{flex:1;min-width:120px}.forum-category-row,.forum-thread-row{grid-template-columns:minmax(0,1fr) 52px;gap:7px;padding:13px 10px}.forum-row-last{display:none}.forum-row-stats strong{font-size:12px}.forum-post{grid-template-columns:1fr}.forum-author{display:flex;gap:10px;align-items:center;border-right:0;border-bottom:1px solid var(--stroke);padding:10px}.forum-author .avatar{margin:0;width:36px;height:36px;font-size:17px}.forum-post-content{padding:12px}.forum-topline{align-items:flex-start}.forum-topline span{display:block;margin-left:0}}


.forum-preview-banner{background:var(--surface);border:1px solid var(--stroke);border-left:4px solid var(--accent);padding:13px 16px;margin:0 0 16px;border-radius:7px}
.forum-preview-banner strong{font-size:1rem;color:var(--text)}
.forum-preview-banner p{margin:5px 0 0;color:var(--muted);line-height:1.5}
button:disabled,input:disabled{cursor:not-allowed;opacity:.58}
