:root {
    color-scheme: dark;
    --bg: #111111;
    --bg-soft: #151515;
    --chrome: rgba(17, 17, 17, 0.86);
    --panel: #1d1d1d;
    --panel-2: #242424;
    --panel-3: #191919;
    --row: #202020;
    --row-hover: #262626;
    --line: #3a3a3a;
    --line-soft: #2e2e2e;
    --text: #f4f4f4;
    --muted: #b8b8b8;
    --soft: #828282;
    --accent: #ff2f5f;
    --accent-dark: #b50f35;
    --green: #61c86f;
    --yellow: #e0c44f;
    --orange: #e8953f;
    --purple: #b06cff;
    --danger: #e85b5b;
    --radius: 2px;
    --topbar: 64px;
    --font: "Helvetica Neue", Arial, Helvetica, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 0;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    min-width: 0;
    margin: 0;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
        linear-gradient(180deg, #171717 0, #121212 280px, #101010 100%);
    background-size: 18px 18px, 18px 18px, auto;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hidden {
    display: none !important;
}

.forum-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--topbar);
    border-bottom: 1px solid #333333;
    background: var(--chrome);
    backdrop-filter: blur(14px);
}

.topbar-inner {
    display: grid;
    grid-template-columns: auto minmax(320px, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: min(1220px, calc(100vw - 28px));
    min-height: var(--topbar);
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #4a4a4a;
    border-radius: var(--radius);
    background: #f5f5f5;
    color: #111111;
    font-size: 17px;
    font-weight: 750;
}

.brand-copy strong {
    display: block;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 0.1px;
}

.brand-copy small {
    display: block;
    margin-top: 3px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.top-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #d7d7d7;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.top-nav-item:hover,
.top-nav-item.active {
    border-bottom-color: var(--accent);
    color: #ffffff;
}

.top-nav-item.link {
    color: #e8e8e8;
}

.top-nav-item.muted-link {
    color: #a6a6a6;
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.top-search {
    display: flex;
    align-items: center;
    width: 220px;
    min-width: 0;
    height: 34px;
    border: 1px solid #3b3b3b;
    border-radius: var(--radius);
    background: #151515;
}

.top-search span {
    padding: 0 8px;
    color: var(--soft);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.top-search input {
    min-width: 0;
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
}

.top-search input::placeholder {
    color: #777777;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 126px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #3b3b3b;
    border-radius: var(--radius);
    background: #171717;
}

.profile-avatar,
.avatar {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    width: 28px;
    height: 28px;
    border: 1px solid #4b4b4b;
    border-radius: var(--radius);
    background: #2a2a2a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 650;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-copy {
    min-width: 0;
}

.profile-copy strong,
.profile-copy small {
    display: block;
    overflow: hidden;
    max-width: 86px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-copy strong {
    font-size: 12px;
}

.profile-copy small {
    margin-top: 1px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.btn,
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #3c3c3c;
    border-radius: var(--radius);
    background: #191919;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn:hover,
.icon-btn:hover {
    border-color: #585858;
    background: #222222;
}

.btn.primary {
    border-color: #d31a45;
    background: var(--accent);
    color: #ffffff;
}

.btn.primary:hover {
    background: #ff466f;
}

.btn.ghost {
    background: #171717;
}

.btn.danger {
    border-color: #63303a;
    color: #ff8aa2;
}

.btn.danger:hover {
    border-color: #9f2444;
    background: #241417;
    color: #ffffff;
}

.btn.compact,
.icon-btn {
    min-height: 30px;
    padding: 0 10px;
}

.forum-shell {
    width: min(1220px, calc(100vw - 28px));
    margin: 14px auto 48px;
}

.forum-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 70px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(29, 29, 29, 0.9);
    backdrop-filter: blur(12px);
    padding: 12px 14px;
}

.forum-head h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}

.forum-head p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.35;
}

.forum-stats {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.forum-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid #3b3b3b;
    background: #171717;
    color: var(--muted);
    white-space: nowrap;
}

.forum-stats strong {
    color: #ffffff;
}

.board-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.metrics-store {
    display: none;
}

.board-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 38px;
    border-bottom: 1px solid var(--line);
    background: #242424;
}

.board-tab {
    min-height: 38px;
    padding: 0 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #e5e5e5;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.board-tab:hover,
.board-tab.active {
    border-bottom-color: var(--accent);
    color: #ffffff;
}

.reset-tab {
    margin-left: auto;
    color: #b2b2b2;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin: 0 10px;
    padding: 0 7px;
    border: 1px solid #454545;
    background: #181818;
    color: #9d9d9d;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.view-stack {
    min-width: 0;
}

.index-stack {
    display: grid;
    gap: 0;
}

.thread-table {
    background: var(--panel);
}

.table-head,
.index-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--line);
    background: #222222;
}

.table-head h2,
.index-title h2 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
}

.table-head span,
.index-title span {
    display: block;
    margin-top: 2px;
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px 168px;
    gap: 0;
    min-height: 28px;
    padding: 0 9px 0 58px;
    border-bottom: 1px solid var(--line-soft);
    background: #191919;
    color: #9a9a9a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.topic-cols span {
    display: flex;
    align-items: center;
}

.topic-cols span:nth-child(2),
.topic-cols span:nth-child(3) {
    justify-content: flex-end;
}

.topic-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 88px 168px;
    align-items: center;
    min-height: 58px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--row);
    cursor: pointer;
}

.topic-row:last-child {
    border-bottom: 0;
}

.topic-row:hover,
.topic-row:focus-visible {
    outline: 0;
    background: var(--row-hover);
}

.topic-status {
    position: relative;
    display: flex;
    justify-content: center;
}

.topic-status svg {
    position: absolute;
    right: 5px;
    bottom: -2px;
    width: 13px;
    height: 13px;
    padding: 2px;
    border: 1px solid #4b4b4b;
    background: #191919;
    color: var(--accent);
}

.thread-main {
    min-width: 0;
    padding: 8px 8px 8px 0;
}

.thread-title-line {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.thread-title-line strong {
    overflow: hidden;
    min-width: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-label {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 6px;
    background: #585858;
    color: #ffffff;
    font-size: 10px;
    font-weight: 650;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.topic-label.guide,
.topic-label.bypass,
.topic-label.fix {
    background: #35763d;
}

.topic-label.question,
.topic-label.help {
    background: #5d5d5d;
}

.topic-label.source,
.topic-label.snippet,
.topic-label.release {
    background: #c58b21;
}

.topic-label.report,
.topic-label.anti-cheat {
    background: #a31636;
}

.topic-label.research,
.topic-label.showcase,
.topic-label.team {
    background: #7d4eb3;
}

.thread-meta-line,
.thread-excerpt {
    overflow: hidden;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread-meta-line {
    display: flex;
    gap: 8px;
    color: #9f9f9f;
}

.thread-stats,
.thread-latest {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 0 10px;
    color: var(--muted);
}

.thread-stats strong,
.thread-latest strong {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.1;
}

.thread-stats span,
.thread-latest span {
    overflow: hidden;
    max-width: 100%;
    color: #a5a5a5;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pinned-topic-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 120px 150px;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line-soft);
    background: #1c1c1c;
    color: #d7d7d7;
    cursor: pointer;
}

.pinned-topic-row:hover,
.pinned-topic-row:focus-visible {
    outline: 0;
    background: #232323;
}

.pinned-topic-row .pin-icon {
    width: 9px;
    height: 9px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0.75;
    transform: rotate(-45deg);
}

.pinned-topic-row strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pinned-topic-row span {
    color: #cfcfcf;
    text-align: right;
}

.pinned-topic-row.green strong {
    color: #2eff53;
}

.pinned-topic-row.yellow strong {
    color: #ffe04f;
}

.pinned-topic-row.pink strong {
    color: #ff6a93;
}

.pinned-topic-row.purple strong {
    color: var(--purple);
}

.pinned-topic-row.orange strong {
    color: var(--orange);
}

.pinned-topic-row.neutral strong {
    color: #f2f2f2;
}

.forum-index {
    border-top: 1px solid var(--line);
    background: var(--panel);
}

.forum-section-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 250px 96px;
    align-items: stretch;
    min-height: 82px;
    border-bottom: 1px solid var(--line-soft);
    background: #202020;
    cursor: pointer;
}

.forum-section-row:hover,
.forum-section-row:focus-visible {
    outline: 0;
    background: #262626;
}

.section-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    place-items: center;
    margin: 16px 9px;
    border: 1px solid #555555;
    background: #2b2b2b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 650;
}

.section-code svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.section-code small {
    margin-top: 3px;
    color: #d8d8d8;
    font-size: 10px;
    font-weight: 650;
}

.section-main {
    min-width: 0;
    padding: 12px 10px 10px 0;
}

.section-heading strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.2;
}

.section-heading span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.35;
}

.sub-board-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 14px;
    margin-top: 8px;
}

.sub-board-link {
    overflow: hidden;
    padding: 0;
    border: 0;
    background: transparent;
    color: #eeeeee;
    font-size: 12px;
    font-weight: 550;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.sub-board-link::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 6px;
    border: 1px solid var(--accent);
    transform: translateY(-1px);
}

.sub-board-link:hover {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: var(--accent);
}

.forum-latest-cell,
.stat-pair {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 10px;
    border-left: 1px solid var(--line-soft);
}

.forum-latest-cell strong,
.stat-pair strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-latest-cell span,
.stat-pair span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-pair {
    align-items: flex-end;
}

.lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 10px;
    margin-top: 10px;
}

.section-index-host {
    margin-top: 10px;
}

.section-index-host .forum-index {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.chat-panel,
.side-panel,
.rules-card,
.thread-header,
.post-card,
.comment-card,
.reply-composer {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.chat-box {
    min-width: 0;
}

.chat-top,
.side-head,
.composer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    background: #242424;
}

.chat-top strong,
.side-head strong,
.composer-head strong {
    display: block;
    font-size: 13px;
}

.chat-top span,
.composer-head span {
    display: block;
    margin-top: 1px;
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
}

.chat-tabs {
    display: flex;
    min-height: 34px;
    border-bottom: 1px solid var(--line-soft);
    background: #191919;
}

.chat-tabs button {
    min-height: 34px;
    padding: 0 10px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #c7c7c7;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.chat-tabs button.active {
    border-bottom-color: var(--accent);
    color: #ffffff;
}

.chat-tabs button:disabled {
    color: #666666;
    cursor: not-allowed;
}

.chat-lines {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 170px;
    max-height: 260px;
    overflow-y: auto;
    background: #1b1b1b;
}

.chat-line {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #2d2d2d;
}

.chat-line .avatar {
    width: 26px;
    height: 26px;
}

.chat-message-body {
    min-width: 0;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.chat-meta strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-meta span {
    color: var(--soft);
    font-size: 11px;
}

.chat-message-body p {
    margin: 3px 0 0;
    color: #e8e8e8;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.chat-message-body a,
.content-render a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: var(--accent);
}

.chat-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 7px;
    padding: 8px;
    border-top: 1px solid var(--line);
    background: #202020;
}

.chat-input textarea {
    min-width: 0;
    min-height: 34px;
    max-height: 92px;
    resize: none;
    border: 1px solid #3d3d3d;
    border-radius: var(--radius);
    background: #141414;
    color: #ffffff;
    padding: 8px;
    outline: 0;
    line-height: 1.35;
}

.chat-input textarea:focus {
    border-color: var(--accent);
}

.chat-counter {
    align-self: center;
    color: var(--soft);
    font-size: 10px;
    font-weight: 600;
}

.send-btn {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d31a45;
    border-radius: var(--radius);
    background: var(--accent);
    color: #ffffff;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.send-btn:disabled {
    border-color: #444444;
    background: #333333;
    color: #777777;
    cursor: not-allowed;
}

.chat-hidden {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px;
    color: var(--muted);
}

.side-widgets {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
}

.side-head span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    min-height: 20px;
    border: 1px solid #4a4a4a;
    background: #181818;
    color: #ffffff;
    font-size: 11px;
    font-weight: 650;
}

.online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    padding: 10px;
}

.online-user {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 128px;
    color: #d7d7d7;
    font-size: 12px;
}

.online-user:hover {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: var(--accent);
}

.online-empty {
    color: var(--muted);
    font-size: 12px;
}

.online-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
}

.tool-list {
    display: grid;
    gap: 6px;
    padding: 10px;
}

.tool-list a,
.tool-list button {
    display: flex;
    align-items: center;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid #3d3d3d;
    border-radius: var(--radius);
    background: #1a1a1a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.tool-list a:hover,
.tool-list button:hover {
    border-color: #565656;
    background: #242424;
}

.thread-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
}

.thread-header-copy {
    min-width: 0;
}

.thread-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 430px;
}

.thread-header h2 {
    margin: 6px 0 0;
    font-size: 21px;
    line-height: 1.25;
}

.thread-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.post-card,
.comment-card {
    display: grid;
    grid-template-columns: 175px minmax(0, 1fr);
    margin-top: 8px;
    overflow: hidden;
}

.author-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 12px 10px;
    border-right: 1px solid var(--line);
    background: #191919;
    text-align: center;
}

.author-side .avatar {
    width: 74px;
    height: 74px;
    font-size: 20px;
}

.author-side strong {
    max-width: 100%;
    overflow: hidden;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-side span {
    color: var(--muted);
    font-size: 12px;
}

.status-text.online {
    color: var(--green);
}

.status-text.away {
    color: var(--yellow);
}

.status-text.offline {
    color: var(--accent);
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.badge {
    display: inline-flex;
    min-height: 18px;
    align-items: center;
    padding: 0 6px;
    background: #565656;
    color: #ffffff;
    font-size: 10px;
    font-weight: 650;
    text-transform: uppercase;
}

.badge.admin,
.badge.badge-admin {
    background: var(--accent-dark);
}

.badge.winware {
    background: #6c5320;
}

.badge.loveyware {
    background: #6d3152;
}

.badge.verified,
.badge.tester,
.badge.researcher {
    background: #35763d;
}

.post-body {
    min-width: 0;
    padding: 10px 12px 12px;
    background: #202020;
}

.post-meta-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 12px;
}

.post-meta-info,
.post-item-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.post-item-actions {
    justify-content: flex-end;
}

.link-action {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.link-action:hover {
    color: #ffffff;
}

.link-action.danger-link {
    color: #ff8aa2;
}

.link-action.danger-link:hover {
    color: #ffffff;
}

.content-render {
    padding: 10px 0;
    color: #eeeeee;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.content-render p {
    margin: 0 0 10px;
}

.content-render p:last-child {
    margin-bottom: 0;
}

.attachment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-grid a {
    display: block;
    overflow: hidden;
    width: 180px;
    border: 1px solid #3d3d3d;
    background: #181818;
}

.attachment-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.attachment-file {
    display: grid;
    min-height: 70px;
    place-items: center;
    padding: 10px;
    color: #ffffff;
    font-weight: 600;
}

.reaction-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
}

.reaction-btn {
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid #3c3c3c;
    border-radius: var(--radius);
    background: #181818;
    color: #dddddd;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.reaction-btn:hover,
.reaction-btn.active {
    border-color: var(--accent);
    color: #ffffff;
}

.reply-composer {
    margin-top: 8px;
    overflow: hidden;
}

.reply-composer textarea {
    display: block;
    width: calc(100% - 20px);
    margin: 10px;
    resize: vertical;
    border: 1px solid #3d3d3d;
    border-radius: var(--radius);
    background: #151515;
    color: #ffffff;
    padding: 9px;
    outline: 0;
}

.reply-composer textarea:focus {
    border-color: var(--accent);
}

.reply-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px 10px;
}

.reply-actions input {
    min-width: 0;
    color: var(--muted);
}

.rules-panel {
    display: grid;
    gap: 8px;
    padding: 8px;
}

.rules-card {
    padding: 14px;
}

.rules-card h2,
.rules-card h3 {
    margin: 0 0 8px;
}

.rules-card p,
.rules-card li {
    color: #dddddd;
    line-height: 1.5;
}

.rules-card ol {
    margin: 0;
    padding-left: 22px;
}

.empty-state {
    display: flex;
    min-height: 80px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    color: #ffffff;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.modal[hidden] {
    display: none;
}

.modal-card {
    width: min(760px, 100%);
    max-height: min(760px, calc(100vh - 32px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: #242424;
}

.modal-kicker {
    display: block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
}

.modal-head h2 {
    margin: 4px 0 0;
    font-size: 18px;
}

.thread-form {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.thread-form label {
    display: grid;
    gap: 5px;
}

.thread-form label > span {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

.thread-form input,
.thread-form select,
.thread-form textarea {
    width: 100%;
    border: 1px solid #3d3d3d;
    border-radius: var(--radius);
    background: #151515;
    color: #ffffff;
    padding: 9px;
    outline: 0;
}

.thread-form input:focus,
.thread-form select:focus,
.thread-form textarea:focus {
    border-color: var(--accent);
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.editor-toolbar button {
    min-height: 28px;
    padding: 0 8px;
    border: 1px solid #3d3d3d;
    border-radius: var(--radius);
    background: #191919;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.upload-row {
    border: 1px dashed #4a4a4a;
    padding: 9px;
    background: #181818;
}

.upload-row small {
    color: var(--soft);
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-chip {
    overflow: hidden;
    width: 120px;
    border: 1px solid #3d3d3d;
    background: #181818;
}

.file-chip img {
    width: 100%;
    height: 76px;
    object-fit: cover;
}

.file-chip span {
    display: block;
    overflow: hidden;
    padding: 5px;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.toast-stack {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 90;
    display: grid;
    gap: 8px;
    width: min(320px, calc(100vw - 28px));
}

.toast {
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: #202020;
    color: #ffffff;
    font-weight: 600;
}

.toast.success {
    border-color: #35763d;
}

.toast.error {
    border-color: var(--accent);
}

@media (max-width: 1120px) {
    .topbar-inner {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 0;
    }

    .forum-topbar {
        position: static;
    }

    .top-nav,
    .top-actions {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .top-search {
        width: 260px;
    }

    .lower-grid {
        grid-template-columns: 1fr;
    }

    .side-widgets {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body {
        font-size: 12px;
    }

    .forum-shell,
    .topbar-inner {
        width: min(100vw - 18px, 1220px);
    }

    .forum-head {
        grid-template-columns: 1fr;
    }

    .forum-stats {
        overflow-x: auto;
    }

    .board-tabs {
        overflow-x: auto;
    }

    .forum-stats {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .source-badge,
    .top-nav-item.muted-link {
        display: none;
    }

    .topic-cols {
        display: none;
    }

    .topic-row {
        grid-template-columns: 38px minmax(0, 1fr);
        padding-right: 8px;
    }

    .pinned-topic-row {
        grid-template-columns: 18px minmax(0, 1fr);
        min-height: 30px;
        gap: 6px;
    }

    .pinned-topic-row span:not(.pin-icon) {
        display: none;
    }

    .topic-row .thread-stats,
    .topic-row .thread-latest {
        grid-column: 2;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        padding: 0 0 7px;
    }

    .topic-row .thread-latest {
        padding-top: 0;
    }

    .thread-title-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .thread-title-line strong,
    .thread-meta-line,
    .thread-excerpt {
        white-space: normal;
    }

    .forum-section-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .forum-latest-cell,
    .stat-pair {
        grid-column: 2;
        align-items: flex-start;
        border-left: 0;
        border-top: 1px solid var(--line-soft);
        padding: 8px 10px 8px 0;
    }

    .sub-board-list {
        grid-template-columns: 1fr;
    }

    .post-card,
    .comment-card {
        grid-template-columns: 1fr;
    }

    .author-side {
        align-items: flex-start;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        text-align: left;
    }

    .author-side .avatar {
        width: 42px;
        height: 42px;
        font-size: 13px;
    }

    .badge-list {
        justify-content: flex-start;
    }

    .side-widgets,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .chat-input {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .chat-counter {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 480px) {
    .brand-copy small {
        display: none;
    }

    .top-actions {
        flex-wrap: wrap;
    }

    .top-search {
        width: 100%;
    }

    .profile-chip {
        min-width: 0;
    }

    .profile-copy {
        display: none;
    }

    .forum-head h1 {
        font-size: 17px;
    }

    .table-head,
    .thread-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .thread-actions {
        justify-content: flex-start;
        max-width: 100%;
    }

    .post-meta-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-item-actions {
        justify-content: flex-start;
    }

    .chat-lines {
        max-height: 220px;
    }
}
