body.forum-body{background:var(--kp-body-bg);color:var(--kp-text)}
.forum-page{max-width:1240px;margin:20px auto;padding:0 12px}
.forum-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px}
.forum-head h1,.forum-head h2{margin:0 0 6px;color:var(--kp-text)}
.forum-muted{margin:0;color:var(--kp-text-soft)}
.forum-help{margin:0;color:var(--kp-text-soft);font-size:.9rem}
.forum-btn,.forum-btn-danger,.forum-btn-ghost{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border-radius:12px;text-decoration:none;cursor:pointer;font-weight:700;border:1px solid transparent}
.forum-btn{background:var(--kp-brand);color:#fff}.forum-btn:hover{background:var(--kp-brand-strong)}
.forum-btn-ghost{background:var(--kp-ghost-bg);border-color:var(--kp-ghost-border);color:var(--kp-text)}.forum-btn-ghost:hover,.forum-btn-ghost.is-active{background:var(--kp-surface-3)}
.forum-btn-danger{background:#dc2626;color:#fff}.forum-btn-danger:hover{background:#b91c1c}
.forum-grid,.forum-section-list,.forum-topic-list,.forum-post-list,.forum-admin-list,.forum-admin-grid{display:grid;gap:14px}
.forum-card,.forum-section-card,.forum-topic-card,.forum-post-card,.forum-admin-card{background:var(--kp-surface);border:1px solid var(--kp-border);border-radius:20px;padding:18px;box-shadow:var(--kp-shadow)}
.forum-section-card__top,.forum-topic-card__top,.forum-post-card__top,.forum-admin-card__top{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}
.forum-section-card__title,.forum-topic-card__title{margin:0 0 8px;font-size:1.15rem}.forum-section-card__title a,.forum-topic-card__title a{color:var(--kp-text);text-decoration:none}.forum-section-card__title a:hover,.forum-topic-card__title a:hover{color:var(--kp-brand)}
.forum-meta,.forum-stats,.forum-inline-actions,.forum-breadcrumbs,.forum-badges,.forum-post-actions,.forum-topic-toolbar,.forum-admin-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.forum-breadcrumbs{margin-bottom:16px;color:var(--kp-text-soft);font-size:.95rem}.forum-breadcrumbs a{color:inherit;text-decoration:none}.forum-breadcrumbs a:hover{color:var(--kp-brand)}
.forum-badge{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;background:var(--kp-surface-3);border:1px solid var(--kp-border);color:var(--kp-text);font-size:.85rem;font-weight:700}
.forum-badge.is-pinned{background:rgba(37,99,235,.12);border-color:rgba(37,99,235,.24)}.forum-badge.is-closed{background:rgba(220,38,38,.12);border-color:rgba(220,38,38,.24)}
.forum-meta,.forum-stats{color:var(--kp-text-soft);font-size:.92rem}.forum-stats strong{color:var(--kp-text)}
.forum-form{display:grid;gap:14px}.forum-field{display:grid;gap:7px}.forum-field label{font-weight:700;color:var(--kp-text)}
.forum-field input[type="text"],.forum-field input[type="file"],.forum-field input[type="search"],.forum-field select,.forum-field textarea{width:100%;padding:12px 14px;border-radius:14px;border:1px solid var(--kp-input-border);background:var(--kp-input-bg);color:var(--kp-input-text);font:inherit;box-sizing:border-box}.forum-field textarea{min-height:180px;resize:vertical}
.forum-alert{padding:14px 16px;border-radius:16px;border:1px solid var(--kp-border)}.forum-alert.is-error{background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.25);color:#b91c1c}.forum-alert.is-success{background:rgba(22,163,74,.08);border-color:rgba(22,163,74,.25);color:#15803d}
.forum-post-author{display:flex;align-items:center;gap:12px}.forum-post-avatar{width:46px;height:46px;border-radius:999px;object-fit:cover;background:var(--kp-surface-3);border:1px solid var(--kp-border)}
.forum-post-content{margin-top:14px;line-height:1.72;color:var(--kp-text);white-space:normal;word-break:break-word}
.forum-post-content p{margin:0 0 12px}.forum-post-content a{color:var(--kp-brand)}
.forum-pagination{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:18px}
.forum-pagination__btn{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;padding:0 12px;border-radius:12px;text-decoration:none;border:1px solid var(--kp-border);color:var(--kp-text);background:var(--kp-surface)}
.forum-pagination__btn.is-current,.forum-pagination__btn:hover{background:var(--kp-brand);color:#fff;border-color:var(--kp-brand)}
.forum-empty{padding:24px;text-align:center;color:var(--kp-text-soft);background:var(--kp-surface);border:1px dashed var(--kp-border);border-radius:20px}
.forum-inline-form{display:inline}
.forum-admin-grid--stats{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.forum-stat{padding:16px;border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));border:1px solid var(--kp-border)}
html[data-theme="light"] .forum-stat{background:linear-gradient(180deg,#f8fbff,#eef4ff)}
.forum-stat__label{color:var(--kp-text-soft);font-size:.9rem}.forum-stat__value{margin-top:10px;font-size:1.8rem;font-weight:800;color:var(--kp-text)}
.forum-search-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.forum-search-form input[type="search"]{min-width:220px;flex:1 1 240px;height:42px;padding:0 14px;border-radius:12px;border:1px solid var(--kp-input-border);background:var(--kp-input-bg);color:var(--kp-input-text)}
.forum-search-form--wide{margin:0}.forum-search-form--wide input[type="search"]{flex:1 1 520px}
.forum-badge.is-unread{background:rgba(245,158,11,.14);border-color:rgba(245,158,11,.28)}.forum-badge.is-subscribed{background:rgba(22,163,74,.12);border-color:rgba(22,163,74,.24)}
.forum-report-box{position:relative}.forum-report-box summary{list-style:none}.forum-report-box summary::-webkit-details-marker{display:none}.forum-form-compact{margin-top:10px;padding:14px;border-radius:16px;background:var(--kp-surface-2);border:1px solid var(--kp-border);min-width:min(420px,100%)}
.forum-moderation-move select,.forum-report-box select{min-height:42px;padding:0 12px;border-radius:12px;border:1px solid var(--kp-input-border);background:var(--kp-input-bg);color:var(--kp-input-text)}
.forum-editor-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.forum-editor-toolbar__btn{min-height:38px;padding:0 12px;border-radius:10px;border:1px solid var(--kp-border);background:var(--kp-surface-2);color:var(--kp-text);font:inherit;font-weight:700;cursor:pointer}.forum-editor-toolbar__btn:hover{background:var(--kp-surface-3)}
.forum-quote{margin:0 0 16px;padding:14px 16px;border-left:4px solid var(--kp-brand);background:rgba(37,99,235,.08);border-radius:0 16px 16px 0}.forum-quote__head{margin-bottom:8px;font-weight:800;color:var(--kp-text)}.forum-quote__body{color:var(--kp-text)}
.forum-spoiler{display:inline-block;padding:2px 8px;border-radius:8px;background:var(--kp-surface-3);color:transparent;transition:color .2s ease}.forum-spoiler:hover{color:var(--kp-text)}
.forum-inline-code{display:inline-block;padding:2px 6px;border-radius:8px;background:var(--kp-surface-3);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.forum-u{text-decoration:underline}.forum-mention{font-weight:800;color:var(--kp-brand);text-decoration:none}.forum-like-count{display:inline-flex;align-items:center;min-height:42px;padding:0 14px;border-radius:12px;border:1px solid var(--kp-border);background:var(--kp-surface-2);color:var(--kp-text)}
.forum-attachments{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:14px}.forum-attachment{display:grid;gap:8px;padding:12px;border-radius:16px;border:1px solid var(--kp-border);background:var(--kp-surface-2);text-decoration:none;color:var(--kp-text)}.forum-attachment:hover{border-color:rgba(37,99,235,.35)}
.forum-attachment img{display:block;width:100%;height:180px;object-fit:cover;border-radius:12px;background:var(--kp-surface-3)}
.forum-attachment__name{font-weight:700;word-break:break-word}.forum-attachment__meta{font-size:.86rem;color:var(--kp-text-soft)}
.forum-attachment--editable{cursor:pointer;position:relative}.forum-attachment--editable input{position:absolute;top:10px;right:10px;width:18px;height:18px}.forum-attachment__remove{font-size:.84rem;color:#dc2626;font-weight:700}
@media (max-width:767px){.forum-page{padding:0 10px}.forum-card,.forum-section-card,.forum-topic-card,.forum-post-card,.forum-admin-card{padding:14px;border-radius:16px}.forum-search-form{width:100%}.forum-search-form input[type="search"]{min-width:0;width:100%}.forum-form-compact{min-width:0}.forum-attachments{grid-template-columns:1fr}}
